index.vue 17 KB

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