index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795
  1. <template>
  2. <div class="flex w-full h-[100px] title fixed top-0 left-0 bottom-0 z-20 bg-[#fff]"
  3. style="border-bottom: 1px solid #E1E1E1;">
  4. <div class="flex-[1]"></div>
  5. <div class="h-[100px] bg-[#fff] flex items-center justify-between w-[1200px]"
  6. style="border-bottom: 1px solid #E1E1E1;">
  7. <!-- 头部title -->
  8. <div class="flex items-center">
  9. <img src="~/public/favicon.ico" class="w-[50px] h-[50px] mr-[10px]" alt="">
  10. <div class="flex flex-col">
  11. <span class="text-[#333333] text-[24px] font-medium">惠融易客</span>
  12. <span class="text-[16px] font-light">
  13. HUIRONG CRM
  14. </span>
  15. </div>
  16. </div>
  17. <!-- 右边 -->
  18. <ul class='flex items-center'>
  19. <li v-for="i in headerTitle" :key="i.go" @mouseenter="mouseenterFn(i.go)" @mouseleave="mouseleaveFn"
  20. :class="headerClass == i.go ? 'text-[#1f4df5!important]' : ''" @click="titleRight(i.go)"
  21. class="pr-[70px] text-[#999999] cursor-pointer text-[18px]">
  22. {{ i.title }}
  23. </li>
  24. <li class="px-[16px] text-[#999999] font-medium" @click="loginBtn">
  25. <!-- <n-button type="info" class="bg-[#165DFF] text-[18px] w-[130px] h-[42px]" style="border-radius: 6px;" >
  26. 登录/注册
  27. </n-button> -->
  28. <van-button type="primary"> 登录/注册</van-button>
  29. </li>
  30. </ul>
  31. </div>
  32. <div class="flex-[1]">
  33. </div>
  34. </div>
  35. <!-- 图片 -->
  36. <div id="home" class="mt-[100px]">
  37. <div class="relatives flex ">
  38. <div class="flex-[1]">
  39. </div>
  40. <!-- <img src="~/public/image/img_home.png" class="w-full" alt=""> -->
  41. <div class="w-[1200px] flex flex-col text-[#fff] mt-[160px]">
  42. <div class="text-[54px] font-normal flex">
  43. <h1 class="pr-[15px]">惠融易客</h1>
  44. <div>
  45. 数字金融服务商
  46. </div>
  47. </div>
  48. <span class="mt-[12px] mb-[50px] text-[20px] font-light"
  49. style="letter-spacing: 1px;">提交申请,立即开启企业数字化升级/提供专家1V1服务,提供企业定制化数字解决方案</span>
  50. <!-- <n-button type="info" class="bg-[#165DFF] w-[256px] h-[67px] text-[26px]" @click="btn">
  51. 立即申请试用
  52. </n-button>
  53. <br> -->
  54. <van-button type="primary" class="bg-[#165DFF] w-[256px] h-[67px] text-[26px]" @click="btn">立即申请试用</van-button>
  55. </div>
  56. <div class="flex-[1]">
  57. </div>
  58. </div>
  59. </div>
  60. <!-- 传统问题 traditional-->
  61. <div class="flex flex-col items-center justify-center py-[100px] bg-[#fafafa]">
  62. <h2 class="text-[36px] font-medium">传统方式管理难点</h2>
  63. <span class="text-[#999999] pt-[10px] pb-[60px] text-[18px]">传统方式管理过程中有哪些问题?</span>
  64. <div class="flex">
  65. <div></div>
  66. <ul class="flex items-center justify-between w-[1200px]">
  67. <li class="w-[386px] h-[286px]">
  68. <img src="~/public/image/p_img_home_qs_0_0.png" alt="">
  69. </li>
  70. <li class="w-[386px] h-[286px]">
  71. <img src="~/public/image/p_img_home_qs_0_1.png" alt="">
  72. </li>
  73. <li class="w-[386px] h-[286px]">
  74. <img src="~/public/image/p_img_home_qs_0_2.png" alt="">
  75. </li>
  76. </ul>
  77. <div></div>
  78. </div>
  79. </div>
  80. <div class="w-full advantage flex flex-col items-center justify-center text-[#fff]">
  81. <h2 class="text-[36px] font-medium mt-[100px]">我们的优势</h2>
  82. <span class=" pb-[60px] text-[18px] mt-[10px]">与传统方式相比较,惠融易客的优势又有哪些?</span>
  83. <div class="flex mb-[102px]">
  84. <div></div>
  85. <ul class="flex items-center justify-between w-[1200px]">
  86. <li class="w-[386px] h-[294px]">
  87. <img src="~/public/image/advant-01.png" alt="">
  88. </li>
  89. <li class="w-[386px] h-[294px]">
  90. <img src="~/public/image/advant-02.png" alt="">
  91. </li>
  92. <li class="w-[386px] h-[294px]">
  93. <img src="~/public/image/advant-03.png" alt="">
  94. </li>
  95. </ul>
  96. <div></div>
  97. </div>
  98. <!-- <img src="~/public/image/advantage-title.png" class="w-[1200px] mx-auto" alt=""> -->
  99. </div>
  100. <!-- 精准获客 -->
  101. <div id="solution" class="flex flex-col items-center justify-center pt-[100px] pb-[100px]">
  102. <h2 class="text-[36px] font-medium">精准获客</h2>
  103. <span class="text-[#999999] pt-[10px] pb-[60px] text-[18px]">多渠道投放对接,帮助企业精准推广产品矩阵</span>
  104. <div class="flex w-full">
  105. <div class="flex-[1]"></div>
  106. <ul class="w-[1200px] flex items-center flex-wrap justify-center mx-auto">
  107. <li class="w-[285px] h-[150px] mr-[20px] mb-[20px]">
  108. <img src="~/public/image/img_home_ad_0.png" alt="">
  109. </li>
  110. <li class="w-[285px] h-[150px] mr-[20px] mb-[20px]">
  111. <img src="~/public/image/img_home_ad_1.png" alt="">
  112. </li>
  113. <li class="w-[285px] h-[150px] mr-[20px] mb-[20px]">
  114. <img src="~/public/image/img_home_ad_2.png" alt="">
  115. </li>
  116. <li class="w-[285px] h-[150px] mb-[20px]">
  117. <img src="~/public/image/img_home_ad_3.png" alt="">
  118. </li>
  119. <li class="w-[285px] h-[150px] mr-[20px]">
  120. <img src="~/public/image/img_home_ad_4.png" alt="">
  121. </li>
  122. <li class="w-[285px] h-[150px] mr-[20px]">
  123. <img src="~/public/image/img_home_ad_5.png" alt="">
  124. </li>
  125. <li class="w-[285px] h-[150px] mr-[20px]">
  126. <img src="~/public/image/img_home_ad_6.png" alt="">
  127. </li>
  128. <li class="w-[285px] h-[150px]">
  129. <img src="~/public/image/img_home_ad_7.png" alt="">
  130. </li>
  131. </ul>
  132. <div class="flex-[1]">
  133. </div>
  134. </div>
  135. </div>
  136. <!-- 免费试用 trial-->
  137. <div class="w-full h-full trial">
  138. <div></div>
  139. <div class="w-[1200px] mx-auto flex flex-col items-center text-[#161616] pt-[100px] pb-[110px]">
  140. <h2 class="font-medium text-[36px]" @click="btn">免费试用</h2>
  141. <div class="mt-[10px] mb-[18px] text-[18px] text-[#999999]">
  142. 立即免费试用惠融易客CRM 提升企业业绩
  143. </div>
  144. <div class="mb-[25px] flex items-center font-medium text-[30px]">
  145. <span>已有</span>
  146. <ul class="flex justify-center items-center mx-[5px] my-[20px]">
  147. <li v-for="item in freeList"
  148. class=" bg-[#fff] w-[50px] h-[60px] text-[36px] text-center mx-[5px] rounded-[4px]">
  149. {{ item }}
  150. </li>
  151. </ul>
  152. <!-- <div class="flex justify-center items-center mx-[5px] my-[20px]">
  153. <section class="text-center">
  154. <number-roll ref="numberRollRef" class="custom" custom-class="num-item"
  155. start-number="00000000" end-number="30701374"
  156. transition-timing-function="ease-in-out"
  157. min-length="5" roll-height="60"
  158. :reverse-direction="false" :autoplay="false" />
  159. </section>
  160. </div> -->
  161. <span>
  162. 人加入
  163. </span>
  164. </div>
  165. <!-- <n-button type="info" class="bg-[#165DFF] w-[400px] h-[70px] text-[24px]" @click="btn">
  166. 立即申请试用
  167. </n-button>
  168. <br> -->
  169. <van-button type="primary" @click="btn">立即申请试用</van-button>
  170. </div>
  171. <div>
  172. </div>
  173. </div>
  174. <!-- 咨询信息 message-->
  175. <div class="flex flex-col items-center justify-center pt-[70px] pb-[70px] mx-[50px] message" v-if="homeList[0]">
  176. <h2 class="text-[36px] font-medium">资讯信息</h2>
  177. <span class="text-[#999999] px-[10px] pt-[10px] pb-[40px] text-[18px]">点击了解惠融易客的更多信息</span>
  178. <div class="flex flex-row items-center w-[100%] 2xl:px-[100px] box-border">
  179. <div @click="go(-1)" class="w-[50px]">
  180. <img src="~/public/image/left.png" class="w-[50px] h-[40px]" alt="">
  181. </div>
  182. <div class="flex w-[1200px] flex-col items-center mx-auto">
  183. <div class="flex justify-center pb-[20px]">
  184. <n-carousel autoplay :currentIndex="currentIndex">
  185. <img v-for="item in homeList" class="carousel-img" :src="item.images">
  186. </n-carousel>
  187. <div class="flex flex-col justify-between ml-[30px] font-medium text-[24px] w-[500px]">
  188. <h1>{{ homeList[currentIndex].title }}</h1>
  189. <div class="flex items-center justify-between h-[50px]">
  190. <span class="text-[18px] text-[#666] text1">
  191. {{ homeList[currentIndex].summary }}
  192. </span>
  193. <!-- <n-button type="info" class="bg-[#165DFF] text-[18px] w-[130px] h-[42px]" @click="btnContent(currentIndex)">
  194. 查看详情
  195. </n-button> -->
  196. <van-button type="primary" @click="btnContent(currentIndex)">查看详情</van-button>
  197. </div>
  198. </div>
  199. </div>
  200. <ul class="custom-dots">
  201. <li v-for="(i, index) in homeList" :key="index" :class="{ ['is-active']: currentIndex === index }"
  202. @click="customFn(index)">
  203. </li>
  204. </ul>
  205. </div>
  206. <div @click="go(+1)" class="w-[50px]">
  207. <img src="~/public/image/right.png" class="w-[50px] h-[40px]" alt="">
  208. </div>
  209. </div>
  210. </div>
  211. <div class="w-full bg-[#1f1d2a] pt-[20px] pb-[10px] relative" id="contact">
  212. <div class="w-[1200px] m-auto">
  213. <div class="flex justify-between my-[20px]">
  214. <!-- 左侧 -->
  215. <div class="flex">
  216. <!-- 左边 -->
  217. <div class="flex flex-col text-[#999999] mr-[30px]">
  218. <h3 class="text-[17px] font-medium text-[#fff]">
  219. 联系方式
  220. </h3>
  221. <span class="text-[13px] my-[20px]">
  222. 客服: kefu@meloinfo.com
  223. </span>
  224. <span class="text-[13px]">
  225. 商务: 17723267692(微信同号)
  226. </span>
  227. </div>
  228. <!-- 地址 -->
  229. <div class="text-[#999999]">
  230. <h3 class="text-[17px] font-medium mb-[20px] text-[#fff]">
  231. 公司地址
  232. </h3>
  233. <span class="text-[13px]">
  234. 重庆市两江新区大竹林街道清枫北路10号3幢双子座A座1406
  235. </span>
  236. </div>
  237. </div>
  238. <!-- 二维码 -->
  239. <div class="flex items-center justify-center">
  240. <div class="flex flex-col items-center justify-center ml-" v-if="bottomCode.wxQrUrl">
  241. <!-- <div class="flex flex-col items-center justify-center"> -->
  242. <span class="text-[#fff] text-[17px] mb-[20px]">
  243. 关注公众号
  244. </span>
  245. <n-popover trigger="hover">
  246. <template #trigger>
  247. <img :src="bottomCode.wxQrUrl" class="w-[100px] h-[100px]" alt="">
  248. </template>
  249. <img :src="bottomCode.wxQrUrl" class="w-[200px] h-[200px]" alt="">
  250. </n-popover>
  251. </div>
  252. <div class="flex flex-col items-center justify-center mx-[50px]" v-if="bottomCode.iosQrUrl">
  253. <span class="text-[#fff] text-[17px] mb-[20px]">
  254. iosAPP下载
  255. </span>
  256. <n-popover trigger="hover">
  257. <template #trigger>
  258. <img :src="bottomCode.iosQrUrl" class="w-[100px] h-[100px]" alt="">
  259. </template>
  260. <img :src="bottomCode.wxQrUrl" class="w-[200px] h-[200px]" alt="">
  261. </n-popover>
  262. </div>
  263. <div class="flex flex-col items-center justify-center" v-if="bottomCode.androidQrUrl">
  264. <!-- <div class="flex flex-col items-center justify-center"> -->
  265. <span class="text-[#fff] text-[17px] mb-[20px]">
  266. 安卓APP下载
  267. </span>
  268. <n-popover trigger="hover">
  269. <template #trigger>
  270. <img :src="bottomCode.androidQrUrl" class="w-[100px] h-[100px]" alt="">
  271. </template>
  272. <img :src="bottomCode.androidQrUrl" class="w-[200px] h-[200px]" alt="">
  273. </n-popover>
  274. </div>
  275. </div>
  276. </div>
  277. <!-- 备案号 -->
  278. <div class="h-[154px] flex flex-col items-center justify-center text-[#585667] text-[13px] py-[60px]">
  279. <div class="pt-[30px]">
  280. <span>Copyright © 2023 重庆惠融数字科技有限公司版权所有</span>
  281. <span class="mx-[5px] cursor-pointer">
  282. <a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank" class="text-[#585667!important]">渝ICP备2023000211号-4</a>
  283. </span>
  284. <span class="mx-[10px]">
  285. 营业执照:91500000MA5UJ59N6Q
  286. </span>
  287. </div>
  288. <div class="my-[20px]">
  289. 违法和不良信息举报邮箱:tousu@meloinfo.com
  290. </div>
  291. <div>
  292. <span class="ml-[20px] mr-[5px] cursor-pointer">
  293. <a href="https://www.beian.gov.cn/portal/registerSystemInfo?recordcode=50019002503593#" target="_blank" class="text-[#585667!important]">联网备案号:50019002503593</a>
  294. </span>
  295. <span class="cursor-pointer">
  296. <a href="https://www.12377.cn/" target="_blank" class="text-[#585667!important]">中国互联网违法和不良信息举报中心</a>
  297. </span>
  298. </div>
  299. </div>
  300. </div>
  301. <div class="absolute bottom-[140px] left-0 w-full">
  302. <div class="w-full h-0 opacity-[1] border-[0.5px] border-[#2B374A]">
  303. </div>
  304. </div>
  305. </div>
  306. <n-modal v-model:show="showModal" class="modalCss">
  307. <n-card style="width: 800px" title="申请试用" :bordered="false" size="huge" role="dialog" aria-modal="true">
  308. <div class="text-[#999999] text-[18px] pt-[15px] pb-[12px]">
  309. 为了我们能更好的服务您,请您填写以下信息,如遇到问题,请您拨打免费服务热线
  310. </div>
  311. <n-form ref="formRef" :model="customer" :rules="rules">
  312. <n-form-item path="companyName" label="公司名称">
  313. <n-input v-model:value="customer.companyName" @keydown.enter.prevent class="h-[55px] leading-[55px]"
  314. placeholder="请输入公司名称" />
  315. </n-form-item>
  316. <n-form-item path="city" label="所在城市">
  317. <n-input v-model:value="customer.city" class="h-[55px] leading-[55px]" placeholder="请选择所在城市" />
  318. <!-- <n-cascader v-model:value="customer.city" placeholder="请选择所在城市" class="h-[55px] leading-[55px]"
  319. :options="provice" check-strategy="child" :show-path="true" value-field="name" label-field="name" @update:value="handleUpdateValue"
  320. /> -->
  321. </n-form-item>
  322. <n-form-item path="customName" label="姓名">
  323. <n-input v-model:value="customer.customName" class="h-[55px] leading-[55px]" placeholder="请输入姓名" />
  324. </n-form-item>
  325. <n-form-item path="phone" label="联系方式">
  326. <n-input v-model:value="customer.phone" class="h-[55px] leading-[55px]" placeholder="请输入联系方式" />
  327. </n-form-item>
  328. <n-form-item path="verifyCode" label="验证码" class="">
  329. <n-input v-model:value="customer.verifyCode" class="h-[55px] leading-[55px]" placeholder="请输入验证码" />
  330. <n-button type="info" class="w-[150px] h-[55px] text-[#fff] bg-[#1f4df5] ml-[20px] rounded-[4px] text-[18px]"
  331. :disabled="countdown != 0" @click="verifyCodeFn">
  332. {{ countdown == 0 ? '获取验证码' : countdown }}
  333. </n-button>
  334. </n-form-item>
  335. <div class="flex justify-center mt-[20px] submission">
  336. <n-button type="info" class="w-[700px] h-[55px] text-[20px] text-[#fff] bg-[#1f4df5] rounded-[4px]"
  337. @click="handleValidateButtonClick">
  338. 立即提交
  339. </n-button>
  340. </div>
  341. </n-form>
  342. </n-card>
  343. </n-modal>
  344. <!-- <nuxt-link to="/list/123">news-1</nuxt-link> -->
  345. </template>
  346. <script lang="ts" setup>
  347. import { reactive, ref } from 'vue'
  348. import { useRouter } from 'vue-router'
  349. import { postListData, downInfo, sendSms, postCustomer } from '~/server/api/index'
  350. // import { provice } from '~/utils/city'
  351. // import NumberRoll from '~/composables/NumberRoll.vue'
  352. import {
  353. FormRules,
  354. useMessage,
  355. FormInst,
  356. } from 'naive-ui'
  357. // 滚动
  358. // const numberRollRef = ref<typeof NumberRoll>()
  359. const goTo = () => {
  360. // @ts-ignore
  361. numberRollRef.value.start()
  362. }
  363. const entryPage =()=>{
  364. let entryPage =localStorage.getItem('entryPage')
  365. if(entryPage){
  366. console.log('进入页面了',localStorage.getItem('entryPage'))
  367. document.querySelector('#' + entryPage)?.scrollIntoView()
  368. localStorage.removeItem('entryPage')
  369. }
  370. }
  371. // 组件更新完成之后执行的函数
  372. onUpdated(()=>{
  373. entryPage()
  374. })
  375. // console.log('provice',provice)
  376. const router = useRouter()
  377. const headerTitle = reactive([
  378. {
  379. title: '首页',
  380. go: 'home'
  381. },
  382. {
  383. title: '解决方案',
  384. go: 'solution'
  385. },
  386. {
  387. title: '联系我们',
  388. go: 'contact'
  389. },
  390. {
  391. title: '申请试用',
  392. go: 'probation'
  393. }
  394. ]
  395. )
  396. const headerClass = ref<string>('')
  397. const titleRight = (i: string) => {
  398. if (i == 'probation') {
  399. btn()
  400. return
  401. }
  402. document.querySelector('#' + i)?.scrollIntoView()
  403. }
  404. const mouseenterFn = (i: string) => {
  405. // console.log('mouseenterFn')
  406. headerClass.value = i
  407. }
  408. const mouseleaveFn = () => {
  409. headerClass.value = ''
  410. }
  411. const freeList = reactive(['3', '0', '7', '0', '1', '3', '7', '4'])
  412. const message = useMessage()
  413. const num = reactive([{
  414. img: '~/public/image/p_img_home_qs_0_0.png'
  415. },
  416. {
  417. img: '~/public/image/p_img_home_qs_0_1.png'
  418. },
  419. {
  420. img: '~/public/image/p_img_home_qs_0_2.png'
  421. }
  422. ])
  423. // console.log('import.meta.url', import.meta.url)
  424. const getImg = (name: number) => {
  425. return new URL(`/public/image/p_img_home_qs_0_${name}.png`, import.meta.url).href;
  426. }
  427. const loginBtn = () => {
  428. console.log('跳转')
  429. // window.location.replace('http://p.daicrm.com/#/login')
  430. window.open('http://p.daicrm.com/#/login')
  431. // window.location.href('http://p.daicrm.com/#/login')
  432. }
  433. const currentIndex = ref(1)
  434. const customFn = (i: number) => {
  435. console.log('i', i)
  436. currentIndex.value = i
  437. }
  438. const go = (i: number) => {
  439. currentIndex.value = currentIndex.value + i
  440. if (currentIndex.value > homeList.value.length - 1) {
  441. currentIndex.value = 0
  442. return
  443. }
  444. if (currentIndex.value < 0) {
  445. currentIndex.value = homeList.value.length - 1
  446. return
  447. }
  448. }
  449. const btnContent = (i: number) => {
  450. // 跳转
  451. console.log('跳转', i)
  452. localStorage.setItem('hryk-id', homeList.value[i].id)
  453. router.push({
  454. path: '/list/'
  455. })
  456. }
  457. let homeList: any = ref([])
  458. const postListDataFn = async () => {
  459. let list = await postListData({
  460. "categoryId": 1
  461. })
  462. console.log('postListDataFn', list)
  463. list.data.data ? homeList.value = list.data.data.list : ''
  464. }
  465. let bottomCode: any = ref([])
  466. postListDataFn()
  467. const downInfoFn = async () => {
  468. const list = await downInfo()
  469. console.log('list', list)
  470. bottomCode.value = list.data.data
  471. }
  472. downInfoFn()
  473. // 框显示隐藏
  474. let showModal = ref<boolean>(false)
  475. const rules: FormRules = {
  476. companyName: [
  477. {
  478. required: true,
  479. trigger: ['blur', 'input'],
  480. message: '请输入公司名称'
  481. }
  482. ],
  483. customName: [
  484. {
  485. required: true,
  486. trigger: ['blur', 'input'],
  487. message: '请输入姓名'
  488. }
  489. ],
  490. city: [
  491. {
  492. required: true,
  493. trigger: ['blur', 'input'],
  494. message: '请选择所在城市'
  495. }
  496. ],
  497. phone: [
  498. {
  499. required: true,
  500. trigger: ['blur', 'input'],
  501. message: '请输入手机号'
  502. }
  503. ],
  504. verifyCode: [
  505. {
  506. required: true,
  507. trigger: ['blur', 'input'],
  508. message: '请输入验证码'
  509. }
  510. ],
  511. }
  512. interface customerType {
  513. sceneType?: string;
  514. companyName?: null | string;
  515. customName?: null | string;
  516. city?: null | string;
  517. phone?: null | string;
  518. verifyCode?: null | string;
  519. channel?: number;
  520. }
  521. let countdown = ref(0)
  522. const customer = ref<customerType>({
  523. sceneType: "loanofficial", // 场景
  524. companyName: null,// 公司名称
  525. customName: null, // 姓名
  526. city: null, // 所在城市
  527. phone: null, // 手机号
  528. verifyCode: null, //验证码
  529. channel: 16, //pc官网16 手机端17
  530. })
  531. const verifyCodeFn = async () => {
  532. if (customer.value.phone) {
  533. if (new RegExp('^1[0-9]{10}$').test(customer.value.phone)) {
  534. let z = await sendSms({
  535. sceneType: "loanofficial",
  536. userMobile: customer.value.phone
  537. })
  538. if (z.data.code == 0) {
  539. message.success('发送成功')
  540. countdown.value = 60
  541. // this.countDown()
  542. countDown()
  543. // console.log('进来了', this.countdown)
  544. } else {
  545. message.error('发送失败')
  546. }
  547. } else {
  548. message.error('请输入正确手机号')
  549. }
  550. } else {
  551. // 唤起提示
  552. message.error('请输入手机号')
  553. }
  554. }
  555. const intervalBtn = ref()
  556. // 倒计时
  557. const countDown = () => {
  558. // 设置倒计时
  559. intervalBtn.value = setInterval(() => {
  560. if (countdown.value == 1) {
  561. // 清除定时器
  562. clearInterval(intervalBtn.value)
  563. // 重置倒计时状态
  564. countdown.value = 1
  565. };
  566. // 倒计时
  567. countdown.value--
  568. }, 1000)
  569. }
  570. const formRef = ref<FormInst | null>(null)
  571. const handleValidateButtonClick = (e: MouseEvent) => {
  572. e.preventDefault()
  573. formRef.value?.validate(async (errors) => {
  574. if (!errors) {
  575. message.success('验证成功')
  576. console.log('customer.value', customer.value)
  577. let z = await postCustomer(customer.value)
  578. console.log('zzz', z)
  579. if (z.data.msg == '成功') {
  580. // 关闭页面
  581. fouse()
  582. }
  583. } else {
  584. console.log(errors)
  585. message.error('验证失败')
  586. }
  587. })
  588. }
  589. const fouse = () => {
  590. showModal.value = false
  591. }
  592. const btn = () => {
  593. customer.value = {
  594. sceneType: "loanofficial", // 场景
  595. companyName: null,// 公司名称
  596. customName: null, // 姓名
  597. city: null, // 所在城市
  598. phone: null, // 手机号
  599. verifyCode: null, //验证码
  600. channel: 16, //pc官网16 手机端17
  601. }
  602. clearInterval(intervalBtn.value)
  603. countdown.value = 0
  604. showModal.value = true
  605. }
  606. const handleUpdateValue = (value: string) => {
  607. console.log(value, '进来了')
  608. }
  609. </script>
  610. <style scoped lang="scss">
  611. .num-item {
  612. border-radius: 4px;
  613. width: 50px;
  614. height: 60px;
  615. margin: 10px;
  616. background: linear-gradient(0deg, rgb(255, 255, 255) 0%, rgba(244, 244, 255, 0.961) 50%, rgb(255, 255, 255) 100%);
  617. font-size: 36px;
  618. color: #fff;
  619. }
  620. p {
  621. color: var(--link-color)
  622. }
  623. .trial {
  624. background: url(~/public/image/try_out.png) no-repeat;
  625. background-size: cover;
  626. }
  627. .advantage {
  628. background: url(~/public/image/advantage.png) no-repeat;
  629. background-size: cover;
  630. }
  631. img {
  632. height: 100%;
  633. }
  634. .n-carousel {
  635. width: 529px !important;
  636. }
  637. .carousel-img {
  638. width: 509px;
  639. height: 306px;
  640. border-radius: 4px;
  641. }
  642. .custom-dots {
  643. display: flex;
  644. margin: 0;
  645. padding: 0;
  646. }
  647. .custom-dots li {
  648. display: inline-block;
  649. width: 20px;
  650. height: 4px;
  651. margin: 0 5px;
  652. // border-radius: 4px;
  653. background: #0000001d;
  654. transition: width 0.3s, background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  655. cursor: pointer;
  656. }
  657. .custom-dots li.is-active {
  658. width: 40px;
  659. background: #0047FF;
  660. }
  661. .text1 {
  662. display: inline-block;
  663. white-space: nowrap;
  664. width: 300px;
  665. overflow: hidden;
  666. text-overflow: ellipsis;
  667. }
  668. ::v-deep(.n-button) {
  669. border-radius: 4px !important;
  670. }
  671. // 框
  672. ::v-deep(.n-card-header__main) {
  673. flex: inherit !important;
  674. margin: 0 auto !important;
  675. }
  676. ::v-deep(.n-card-header) {
  677. padding: 0 !important;
  678. padding-top: 50px !important;
  679. }
  680. ::v-deep(.n-card__content) {
  681. flex: inherit;
  682. margin: 0 auto;
  683. margin-bottom: 50px !important;
  684. }
  685. ::v-deep(.n-form-item-label) {
  686. display: none !important;
  687. }
  688. ::v-deep(.n-form-item) {
  689. --n-label-height: 10px !important;
  690. }
  691. ::v-deep(.n-carousel__dots) {
  692. display: none !important;
  693. }
  694. ::v-deep(.n-input__input-el) {
  695. height: 55px !important;
  696. line-height: 55px !important;
  697. }
  698. ::v-deep(.n-card-header__main) {
  699. font-size: 30px;
  700. }
  701. // 按钮样式
  702. ::v-deep(.van-button--normal) {
  703. border-radius: 6px;
  704. background: #0047FF;
  705. border: 0;
  706. height: 67px;
  707. }
  708. .trial ::v-deep(.van-button--normal) {
  709. border-radius: 6px;
  710. background: #0047FF;
  711. border: 0;
  712. width: 400px;
  713. height: 67px;
  714. }
  715. ::v-deep(.van-button__content) {
  716. font-size: 24px;
  717. }
  718. .title ::v-deep(.van-button--normal) {
  719. border-radius: 6px;
  720. background: #0047FF;
  721. border: 0;
  722. width: 130px;
  723. height: 42px;
  724. }
  725. .title ::v-deep(.van-button__content) {
  726. font-size: 16px;
  727. }
  728. .message ::v-deep(.van-button--normal) {
  729. border-radius: 6px;
  730. background: #0047FF;
  731. border: 0;
  732. width: 130px;
  733. height: 42px;
  734. }
  735. .message ::v-deep(.van-button__content) {
  736. font-size: 16px;
  737. }
  738. .modalCss ::v-deep(.n-button) {
  739. border-radius: 4px !important;
  740. height: 55px !important;
  741. }
  742. .submission ::v-deep(.n-button) {
  743. width: 700px !important;
  744. }
  745. </style>