index.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595
  1. <template>
  2. <div class="flex w-full">
  3. <div class="flex-[1]"></div>
  4. <div id="home" class="h-[100px] bg-[#fff] flex items-center justify-between w-[1200px]">
  5. <!-- 头部title -->
  6. <div class="flex items-center">
  7. <img src="~/public/favicon.ico" class="w-[50px] h-[50px] mr-[10px]" alt="">
  8. <div class="flex flex-col">
  9. <span class="text-[#333333] text-[24px] font-medium">惠融易客</span>
  10. <span class="text-[16px] font-light">
  11. HUIRONG CRM
  12. </span>
  13. </div>
  14. </div>
  15. <!-- 右边 -->
  16. <ul class='flex items-center'>
  17. <li v-for="i in headerTitle" :key="i.go" @click="titleRight(i.go)"
  18. class="pr-[80px] text-[#999999] cursor-pointer text-[18px]">
  19. {{ i.title }}
  20. </li>
  21. <li class="px-[16px] text-[#999999] font-medium">
  22. <n-button type="info" class="bg-[#165DFF] text-[18px] w-[130px] h-[42px]">
  23. 登录/注册
  24. </n-button>
  25. </li>
  26. </ul>
  27. </div>
  28. <div class="flex-[1]">
  29. </div>
  30. </div>
  31. <!-- 图片 -->
  32. <div>
  33. <div class="relatives flex ">
  34. <div class="flex-[1]">
  35. </div>
  36. <!-- <img src="~/public/image/img_home.png" class="w-full" alt=""> -->
  37. <div class="w-[1200px] flex flex-col text-[#fff] mt-[160px]">
  38. <div class="text-[54px] font-normal flex">
  39. <h1 class="pr-[15px]">惠融易客</h1>
  40. <div>
  41. 数字金融服务商
  42. </div>
  43. </div>
  44. <span class="mt-[12px] mb-[50px] text-[20px] font-light" style="letter-spacing: 1px;">提交申请,立即开启企业数字化升级/提供专家1V1服务,提供企业定制化数字解决方案</span>
  45. <n-button type="info" class="bg-[#165DFF] w-[256px] h-[67px] text-[26px]" @click="btn">
  46. 立即申请试用
  47. </n-button>
  48. </div>
  49. <div class="flex-[1]">
  50. </div>
  51. </div>
  52. </div>
  53. <!-- 传统问题 traditional-->
  54. <div class="flex flex-col items-center justify-center py-[100px]">
  55. <h2 class="text-[40px] font-medium">传统方式管理难点</h2>
  56. <span class="text-[#999999] pt-[20px] pb-[60px] text-[18px]">传统方式管理过程中有哪些问题?</span>
  57. <div class="flex">
  58. <div></div>
  59. <ul class="flex items-center justify-between w-[1200px]">
  60. <li class="w-[386px] h-[286px]">
  61. <img src="~/public/image/p_img_home_qs_0_0.png" alt="">
  62. </li>
  63. <li class="w-[386px] h-[286px]">
  64. <img src="~/public/image/p_img_home_qs_0_1.png" alt="">
  65. </li>
  66. <li class="w-[386px] h-[286px]">
  67. <img src="~/public/image/p_img_home_qs_0_2.png" alt="">
  68. </li>
  69. </ul>
  70. <div></div>
  71. </div>
  72. </div>
  73. <div class="w-full">
  74. <img src="~/public/image/advantage.png" class="w-full" alt="">
  75. </div>
  76. <!-- 精准获客 -->
  77. <div id="solution" class="flex flex-col items-center justify-center pt-[100px] pb-[100px]">
  78. <h2 class="text-[40px] font-medium">精准获客</h2>
  79. <span class="text-[#999999] pt-[20px] pb-[60px] text-[18px]">多渠道投放对接,帮助企业精准推广产品矩阵</span>
  80. <div class="flex w-full">
  81. <div class="flex-[1]"></div>
  82. <ul class="w-[1200px] flex items-center flex-wrap justify-center mx-auto">
  83. <li class="w-[285px] h-[150px] mr-[20px] mb-[20px]">
  84. <img src="~/public/image/img_home_ad_0.png" alt="">
  85. </li>
  86. <li class="w-[285px] h-[150px] mr-[20px] mb-[20px]">
  87. <img src="~/public/image/img_home_ad_1.png" alt="">
  88. </li>
  89. <li class="w-[285px] h-[150px] mr-[20px] mb-[20px]">
  90. <img src="~/public/image/img_home_ad_2.png" alt="">
  91. </li>
  92. <li class="w-[285px] h-[150px] mb-[20px]">
  93. <img src="~/public/image/img_home_ad_3.png" alt="">
  94. </li>
  95. <li class="w-[285px] h-[150px] mr-[20px]">
  96. <img src="~/public/image/img_home_ad_4.png" alt="">
  97. </li>
  98. <li class="w-[285px] h-[150px] mr-[20px]">
  99. <img src="~/public/image/img_home_ad_5.png" alt="">
  100. </li>
  101. <li class="w-[285px] h-[150px] mr-[20px]">
  102. <img src="~/public/image/img_home_ad_6.png" alt="">
  103. </li>
  104. <li class="w-[285px] h-[150px]">
  105. <img src="~/public/image/img_home_ad_7.png" alt="">
  106. </li>
  107. </ul>
  108. <div class="flex-[1]">
  109. </div>
  110. </div>
  111. </div>
  112. <!-- 免费试用 trial-->
  113. <div class="w-full h-full trial">
  114. <div></div>
  115. <div class="w-[1200px] mx-auto flex flex-col items-center text-[#161616] pt-[100px] pb-[110px]">
  116. <h2 class="font-medium text-[40px]" @click="btn">免费试用</h2>
  117. <div class="mt-[12px] mb-[18px] text-[18px] text-[#999999]">
  118. 立即免费试用惠融易客CRM 提升企业业绩
  119. </div>
  120. <div class="mb-[25px] flex items-center font-medium text-[30px]">
  121. <span>已有</span>
  122. <ul class="flex justify-center items-center mx-[5px] my-[20px] bg-[#f7f8fa]">
  123. <li v-for="item in freeList" class=" py-[10px] px-[15px] bg-[#fff] mx-[5px] text-[36px]">
  124. {{ item }}
  125. </li>
  126. </ul>
  127. <span>
  128. 人加入
  129. </span>
  130. </div>
  131. <n-button type="info" class="bg-[#165DFF] w-[400px] h-[70px] text-[24px]" @click="btn">
  132. 立即申请试用
  133. </n-button>
  134. </div>
  135. <div>
  136. </div>
  137. </div>
  138. <!-- 咨询信息 message-->
  139. <div class="flex flex-col items-center justify-center pt-[70px] pb-[70px] mx-[50px]" v-if="homeList[0]">
  140. <h2 class="text-[40px] font-medium">资讯信息</h2>
  141. <span class="text-[#999999] px-[12px] pt-[15px] pb-[40px] text-[18px]">点击了解惠融易客的更多信息</span>
  142. <div class="flex flex-row items-center w-[100%] 2xl:px-[100px] box-border">
  143. <div @click="go(-1)" class="w-[50px]">
  144. <img src="~/public/image/left.png" class="w-[50px] h-[40px]" alt="">
  145. </div>
  146. <div class="flex w-[1200px] flex-col items-center mx-auto">
  147. <div class="flex justify-center pb-[20px]">
  148. <n-carousel autoplay :currentIndex="currentIndex">
  149. <img v-for="item in homeList" class="carousel-img" :src="item.images">
  150. </n-carousel>
  151. <div class="flex flex-col justify-between ml-[30px] font-medium text-[24px] w-[500px]">
  152. <h1>{{ homeList[currentIndex].title }}</h1>
  153. <div class="flex items-center justify-between h-[50px]">
  154. <span class="text-[18px] text-[#666]">
  155. {{ homeList[currentIndex].summary }}
  156. </span>
  157. <n-button type="info" class="bg-[#165DFF] text-[18px] w-[130px] h-[42px]" @click="btnContent(currentIndex)">
  158. 查看详情
  159. </n-button>
  160. </div>
  161. </div>
  162. </div>
  163. <ul class="custom-dots">
  164. <li v-for="(i, index) in homeList" :key="index" :class="{ ['is-active']: currentIndex === index }"
  165. @click="customFn(index)">
  166. </li>
  167. </ul>
  168. </div>
  169. <div @click="go(+1)" class="w-[50px]">
  170. <img src="~/public/image/right.png" class="w-[50px] h-[40px]" alt="">
  171. </div>
  172. </div>
  173. </div>
  174. <div class="w-full bg-[#1f1d2a] pt-[20px] pb-[10px]" id="contact">
  175. <div class="w-[1200px] m-auto">
  176. <div class="flex justify-between">
  177. <!-- 左侧 -->
  178. <div class="flex">
  179. <!-- 左边 -->
  180. <div class="flex flex-col text-[#999999] mr-[30px]">
  181. <h3 class="text-[16px] font-medium text-[#fff]">
  182. 联系方式
  183. </h3>
  184. <span class="text-[12px] my-[16px]">
  185. 客服: kefu@meloinfo.com
  186. </span>
  187. <span class="text-[12px]">
  188. 商务: 17723267692(微信同号)
  189. </span>
  190. </div>
  191. <!-- 地址 -->
  192. <div class="text-[#999999]">
  193. <h3 class="text-[16px] font-medium mb-[16px] text-[#fff]">
  194. 公司地址
  195. </h3>
  196. <span class="text-[12px]">
  197. 重庆市两江新区大竹林街道清枫北路10号3幢双子座A座1406
  198. </span>
  199. </div>
  200. </div>
  201. <!-- 二维码 -->
  202. <div class="flex items-center justify-center">
  203. <div class="flex flex-col items-center justify-center" v-if="bottomCode.wxQrUrl">
  204. <!-- <div class="flex flex-col items-center justify-center"> -->
  205. <span class="text-[#fff] text-[12px]" style="font-size: 11px; margin-bottom: 5px;">
  206. 关注公众号
  207. </span>
  208. <img :src="bottomCode.wxQrUrl" style="width:100px;height:100px" alt="">
  209. </div>
  210. <div class="flex flex-col items-center justify-center" v-if="bottomCode.iosQrUrl" style="margin: 0 30px">
  211. <span class="text-[#fff] text-[12px]" style="font-size: 11px; margin-bottom: 5px;">
  212. iosAPP下载
  213. </span>
  214. <img :src="bottomCode.iosQrUrl" style="width:100px;height:100px" alt="">
  215. </div>
  216. <div class="flex flex-col items-center justify-center" v-if="bottomCode.androidQrUrl">
  217. <!-- <div class="flex flex-col items-center justify-center"> -->
  218. <span class="text-[#fff] text-[12px]" style="font-size: 11px; margin-bottom: 5px;">
  219. 安卓APP下载
  220. </span>
  221. <img :src="bottomCode.androidQrUrl" style="width:100px;height:100px" alt="">
  222. <!-- <img src="~/public/image/tryOut.png" style="width:100px;height:100px" alt=""> -->
  223. </div>
  224. </div>
  225. </div>
  226. <!-- 备案号 -->
  227. <div class="flex items-center justify-center text-[#585667] text-[10px] my-[30px]">
  228. <span>重庆惠融数字科技有限公司版权所有</span>
  229. <span>
  230. 渝ICP备2023000211号-4
  231. </span>
  232. </div>
  233. </div>
  234. </div>
  235. <n-modal v-model:show="showModal">
  236. <n-card style="width: 800px" title="申请试用" :bordered="false" size="huge" role="dialog" aria-modal="true">
  237. <div class="text-[#999999] text-[18px] pt-[15px] pb-[12px]">
  238. 为了我们能更好的服务您,请您填写以下信息,如遇到问题,请您拨打免费服务热线
  239. </div>
  240. <n-form ref="formRef" :model="customer" :rules="rules">
  241. <n-form-item path="companyName" label="公司名称">
  242. <n-input v-model:value="customer.companyName" @keydown.enter.prevent class="h-[55px] leading-[55px]"
  243. placeholder="请输入公司名称" />
  244. </n-form-item>
  245. <n-form-item path="city" label="所在城市">
  246. <n-input v-model:value="customer.city" class="h-[55px] leading-[55px]" placeholder="请选择所在城市" />
  247. <!-- <n-cascader v-model:value="customer.city" placeholder="请选择所在城市" class="h-[55px] leading-[55px]"
  248. :options="provice" check-strategy="child" :show-path="true" value-field="name" label-field="name" @update:value="handleUpdateValue"
  249. /> -->
  250. </n-form-item>
  251. <n-form-item path="customName" label="姓名">
  252. <n-input v-model:value="customer.customName" class="h-[55px] leading-[55px]" placeholder="请输入姓名" />
  253. </n-form-item>
  254. <n-form-item path="phone" label="联系方式">
  255. <n-input v-model:value="customer.phone" class="h-[55px] leading-[55px]" placeholder="请输入联系方式" />
  256. </n-form-item>
  257. <n-form-item path="verifyCode" label="验证码" class="">
  258. <n-input v-model:value="customer.verifyCode" class="h-[55px] leading-[55px]" placeholder="请输入验证码" />
  259. <n-button type="info" class="w-[150px] h-[55px] text-[#fff] bg-[#1f4df5] ml-[20px] rounded-[4px] text-[18px]" :disabled="countdown != 0"
  260. @click="verifyCodeFn">
  261. {{ countdown == 0 ? '获取验证码' : countdown }}
  262. </n-button>
  263. </n-form-item>
  264. <div class="flex justify-center mt-[20px]">
  265. <n-button type="info" class="w-[700px] h-[55px] text-[20px] text-[#fff] bg-[#1f4df5] rounded-[4px]" @click="handleValidateButtonClick">
  266. 立即提交
  267. </n-button>
  268. </div>
  269. </n-form>
  270. </n-card>
  271. </n-modal>
  272. <!-- <nuxt-link to="/list/123">news-1</nuxt-link> -->
  273. </template>
  274. <script lang="ts" setup>
  275. import { reactive, ref } from 'vue'
  276. import { useRouter } from 'vue-router'
  277. import { postListData, downInfo, sendSms, postCustomer } from '~/server/api/index'
  278. import { provice } from '~/utils/city'
  279. import {
  280. FormRules,
  281. useMessage,
  282. FormInst,
  283. } from 'naive-ui'
  284. // console.log('provice',provice)
  285. const router = useRouter()
  286. const headerTitle = reactive([
  287. {
  288. title: '首页',
  289. go: 'home'
  290. },
  291. {
  292. title: '解决方案',
  293. go: 'solution'
  294. },
  295. {
  296. title: '联系我们',
  297. go: 'contact'
  298. },
  299. {
  300. title: '申请试用',
  301. go: 'probation'
  302. }
  303. ]
  304. )
  305. const titleRight = (i: string) => {
  306. if (i == 'probation') {
  307. btn()
  308. return
  309. }
  310. document.querySelector('#' + i)?.scrollIntoView()
  311. }
  312. const freeList = reactive(['3', '0', '7', '0', '1', '3', '7', '4'])
  313. const message = useMessage()
  314. const num = reactive([{
  315. img: '~/public/image/p_img_home_qs_0_0.png'
  316. },
  317. {
  318. img: '~/public/image/p_img_home_qs_0_1.png'
  319. },
  320. {
  321. img: '~/public/image/p_img_home_qs_0_2.png'
  322. }
  323. ])
  324. // console.log('import.meta.url', import.meta.url)
  325. const getImg = (name: number) => {
  326. return new URL(`/public/image/p_img_home_qs_0_${name}.png`, import.meta.url).href;
  327. }
  328. const currentIndex = ref(1)
  329. const customFn = (i: number) => {
  330. console.log('i', i)
  331. currentIndex.value = i
  332. }
  333. const go = (i: number) => {
  334. currentIndex.value = currentIndex.value + i
  335. if (currentIndex.value > homeList.value.length - 1) {
  336. currentIndex.value = 0
  337. return
  338. }
  339. if (currentIndex.value < 0) {
  340. currentIndex.value = homeList.value.length - 1
  341. return
  342. }
  343. }
  344. const btnContent = (i: number) => {
  345. // 跳转
  346. console.log('跳转', i)
  347. router.push({
  348. path: `/list/${homeList.value[i].id}`
  349. })
  350. }
  351. let homeList: any = ref([])
  352. const postListDataFn = async () => {
  353. let list = await postListData({
  354. "categoryId": 1
  355. })
  356. console.log('postListDataFn', list)
  357. list.data.data ? homeList.value = list.data.data.list : ''
  358. }
  359. let bottomCode: any = ref([])
  360. postListDataFn()
  361. const downInfoFn = async () => {
  362. const list = await downInfo()
  363. console.log('list', list)
  364. bottomCode.value = list.data.data
  365. }
  366. downInfoFn()
  367. // 框显示隐藏
  368. let showModal = ref<boolean>(false)
  369. const rules: FormRules = {
  370. companyName: [
  371. {
  372. required: true,
  373. trigger: ['blur', 'input'],
  374. message: '请输入公司名称'
  375. }
  376. ],
  377. customName: [
  378. {
  379. required: true,
  380. trigger: ['blur', 'input'],
  381. message: '请输入姓名'
  382. }
  383. ],
  384. city: [
  385. {
  386. required: true,
  387. trigger: ['blur', 'input'],
  388. message: '请选择所在城市'
  389. }
  390. ],
  391. phone: [
  392. {
  393. required: true,
  394. trigger: ['blur', 'input'],
  395. message: '请输入手机号'
  396. }
  397. ],
  398. verifyCode: [
  399. {
  400. required: true,
  401. trigger: ['blur', 'input'],
  402. message: '请输入验证码'
  403. }
  404. ],
  405. }
  406. interface customerType {
  407. sceneType?: string;
  408. companyName?: null | string;
  409. customName?: null | string;
  410. city?: null | string;
  411. phone?: null | string;
  412. verifyCode?: null | string;
  413. channel?: number;
  414. }
  415. let countdown = ref(0)
  416. const customer = ref<customerType>({
  417. sceneType: "loanofficial", // 场景
  418. companyName: null,// 公司名称
  419. customName: null, // 姓名
  420. city: null, // 所在城市
  421. phone: null, // 手机号
  422. verifyCode: null, //验证码
  423. channel: 16, //pc官网16 手机端17
  424. })
  425. const verifyCodeFn = async () => {
  426. if (customer.value.phone) {
  427. if (new RegExp('^1[0-9]{10}$').test(customer.value.phone)) {
  428. let z = await sendSms({
  429. sceneType: "loanofficial",
  430. userMobile: customer.value.phone
  431. })
  432. if (z.data.code == 0) {
  433. message.success('发送成功')
  434. countdown.value = 60
  435. // this.countDown()
  436. countDown()
  437. // console.log('进来了', this.countdown)
  438. } else {
  439. message.error('发送失败')
  440. }
  441. } else {
  442. message.error('请输入正确手机号')
  443. }
  444. } else {
  445. // 唤起提示
  446. message.error('请输入手机号')
  447. }
  448. }
  449. // 倒计时
  450. const countDown = () => {
  451. // 设置倒计时
  452. const intervalBtn = setInterval(() => {
  453. if (countdown.value == 1) {
  454. // 清除定时器
  455. clearInterval(intervalBtn)
  456. // 重置倒计时状态
  457. countdown.value = 0
  458. };
  459. // 倒计时
  460. countdown.value--
  461. }, 1000)
  462. }
  463. const formRef = ref<FormInst | null>(null)
  464. const handleValidateButtonClick = (e: MouseEvent) => {
  465. e.preventDefault()
  466. formRef.value?.validate(async (errors) => {
  467. if (!errors) {
  468. message.success('验证成功')
  469. console.log('customer.value', customer.value)
  470. let z = await postCustomer(customer.value)
  471. console.log('zzz', z)
  472. if (z.data.msg == '成功') {
  473. // 关闭页面
  474. fouse()
  475. }
  476. } else {
  477. console.log(errors)
  478. message.error('验证失败')
  479. }
  480. })
  481. }
  482. const fouse = () => {
  483. showModal.value = false
  484. }
  485. const btn = () => {
  486. showModal.value = true
  487. }
  488. const handleUpdateValue = (value: string) => {
  489. console.log(value, '进来了')
  490. }
  491. </script>
  492. <style scoped lang="scss">
  493. p {
  494. color: var(--link-color)
  495. }
  496. .relatives {
  497. width: 100%;
  498. height: 600px;
  499. background: url(~/public/image/img_home.png) no-repeat;
  500. background-size: cover;
  501. }
  502. .trial {
  503. background: url(~/public/image/try_out.png) no-repeat;
  504. background-size: cover;
  505. }
  506. img{
  507. height: 100%;
  508. }
  509. .n-carousel {
  510. width: 529px !important;
  511. }
  512. .carousel-img {
  513. width: 509px;
  514. height: 306px;
  515. border-radius: 4px;
  516. }
  517. .custom-dots {
  518. display: flex;
  519. margin: 0;
  520. padding: 0;
  521. }
  522. .custom-dots li {
  523. display: inline-block;
  524. width: 20px;
  525. height: 4px;
  526. margin: 0 5px;
  527. // border-radius: 4px;
  528. background: #0000001d;
  529. transition: width 0.3s, background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  530. cursor: pointer;
  531. }
  532. .custom-dots li.is-active {
  533. width: 40px;
  534. background: #0047FF;
  535. }
  536. // 框
  537. ::v-deep(.n-card-header__main) {
  538. flex: inherit !important;
  539. margin: 0 auto !important;
  540. }
  541. ::v-deep(.n-card-header) {
  542. padding: 0 !important;
  543. padding-top: 50px !important;
  544. }
  545. ::v-deep(.n-card__content) {
  546. flex: inherit;
  547. margin: 0 auto;
  548. margin-bottom: 50px !important;
  549. }
  550. ::v-deep(.n-form-item-label) {
  551. display: none !important;
  552. }
  553. ::v-deep(.n-form-item){
  554. --n-label-height: 10px !important;
  555. }
  556. ::v-deep(.n-carousel__dots) {
  557. display: none !important;
  558. }
  559. ::v-deep(.n-input__input-el) {
  560. height: 55px !important;
  561. line-height: 55px !important;
  562. }
  563. ::v-deep(.n-card-header__main){
  564. font-size: 30px;
  565. }
  566. </style>