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] mt-[20px]">
  222. 客服邮箱: kefu@hrshuke.com
  223. </span>
  224. <span class="text-[13px] my-[20px]">
  225. 客户投诉:4000039350
  226. </span>
  227. <span class="text-[13px]">
  228. 商务合作: 17723267692(微信同号)
  229. </span>
  230. </div>
  231. <!-- 地址 -->
  232. <div class="text-[#999999]">
  233. <h3 class="text-[17px] font-medium mb-[20px] text-[#fff]">
  234. 公司地址
  235. </h3>
  236. <span class="text-[13px]">
  237. 重庆市两江新区大竹林街道清枫北路10号3幢双子座A座1406
  238. </span>
  239. </div>
  240. </div>
  241. <!-- 二维码 -->
  242. <div class="flex items-center justify-center">
  243. <div class="flex flex-col items-center justify-center ml-" v-if="bottomCode.wxQrUrl">
  244. <!-- <div class="flex flex-col items-center justify-center"> -->
  245. <span class="text-[#fff] text-[17px] mb-[20px]">
  246. 关注公众号
  247. </span>
  248. <n-popover trigger="hover">
  249. <template #trigger>
  250. <img :src="bottomCode.wxQrUrl" class="w-[100px] h-[100px]" alt="">
  251. </template>
  252. <img :src="bottomCode.wxQrUrl" class="w-[200px] h-[200px]" alt="">
  253. </n-popover>
  254. </div>
  255. <div class="flex flex-col items-center justify-center mx-[50px]" v-if="bottomCode.iosQrUrl">
  256. <span class="text-[#fff] text-[17px] mb-[20px]">
  257. iosAPP下载
  258. </span>
  259. <n-popover trigger="hover">
  260. <template #trigger>
  261. <img :src="bottomCode.iosQrUrl" class="w-[100px] h-[100px]" alt="">
  262. </template>
  263. <img :src="bottomCode.wxQrUrl" class="w-[200px] h-[200px]" alt="">
  264. </n-popover>
  265. </div>
  266. <div class="flex flex-col items-center justify-center" v-if="bottomCode.androidQrUrl">
  267. <!-- <div class="flex flex-col items-center justify-center"> -->
  268. <span class="text-[#fff] text-[17px] mb-[20px]">
  269. 安卓APP下载
  270. </span>
  271. <n-popover trigger="hover">
  272. <template #trigger>
  273. <img :src="bottomCode.androidQrUrl" class="w-[100px] h-[100px]" alt="">
  274. </template>
  275. <img :src="bottomCode.androidQrUrl" class="w-[200px] h-[200px]" alt="">
  276. </n-popover>
  277. </div>
  278. </div>
  279. </div>
  280. <!-- 备案号 -->
  281. <div class="h-[154px] flex flex-col items-center justify-center text-[#585667] text-[13px] py-[60px]">
  282. <div class="pt-[30px]">
  283. <span>Copyright © 2023 重庆惠融数字科技有限公司版权所有</span>
  284. <span class="mx-[5px] cursor-pointer">
  285. <a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank" class="text-[#585667!important]">渝ICP备2023000211号-4</a>
  286. </span>
  287. <span class="mx-[10px]">
  288. 营业执照:91500000MA5UJ59N6Q
  289. </span>
  290. </div>
  291. <div class="my-[20px]">
  292. 违法和不良信息举报邮箱:tousu@hrshuke.com
  293. </div>
  294. <div>
  295. <span class="ml-[20px] mr-[5px] cursor-pointer">
  296. <a href="https://www.beian.gov.cn/portal/registerSystemInfo?recordcode=50019002503593#" target="_blank" class="text-[#585667!important]">联网备案号:50019002503593</a>
  297. </span>
  298. <span class="cursor-pointer">
  299. <a href="https://www.12377.cn/" target="_blank" class="text-[#585667!important]">中国互联网违法和不良信息举报中心</a>
  300. </span>
  301. </div>
  302. </div>
  303. </div>
  304. <div class="absolute bottom-[140px] left-0 w-full">
  305. <div class="w-full h-0 opacity-[1] border-[0.5px] border-[#2B374A]">
  306. </div>
  307. </div>
  308. </div>
  309. <n-modal v-model:show="showModal" class="modalCss">
  310. <n-card style="width: 800px" title="申请试用" :bordered="false" size="huge" role="dialog" aria-modal="true">
  311. <div class="text-[#999999] text-[18px] pt-[15px] pb-[12px]">
  312. 为了我们能更好的服务您,请您填写以下信息,如遇到问题,请您拨打免费服务热线
  313. </div>
  314. <n-form ref="formRef" :model="customer" :rules="rules">
  315. <n-form-item path="companyName" label="公司名称">
  316. <n-input v-model:value="customer.companyName" @keydown.enter.prevent class="h-[55px] leading-[55px]"
  317. placeholder="请输入公司名称" />
  318. </n-form-item>
  319. <n-form-item path="city" label="所在城市">
  320. <n-input v-model:value="customer.city" class="h-[55px] leading-[55px]" placeholder="请选择所在城市" />
  321. <!-- <n-cascader v-model:value="customer.city" placeholder="请选择所在城市" class="h-[55px] leading-[55px]"
  322. :options="provice" check-strategy="child" :show-path="true" value-field="name" label-field="name" @update:value="handleUpdateValue"
  323. /> -->
  324. </n-form-item>
  325. <n-form-item path="customName" label="姓名">
  326. <n-input v-model:value="customer.customName" class="h-[55px] leading-[55px]" placeholder="请输入姓名" />
  327. </n-form-item>
  328. <n-form-item path="phone" label="联系方式">
  329. <n-input v-model:value="customer.phone" class="h-[55px] leading-[55px]" placeholder="请输入联系方式" />
  330. </n-form-item>
  331. <n-form-item path="verifyCode" label="验证码" class="">
  332. <n-input v-model:value="customer.verifyCode" class="h-[55px] leading-[55px]" placeholder="请输入验证码" />
  333. <n-button type="info" class="w-[150px] h-[55px] text-[#fff] bg-[#1f4df5] ml-[20px] rounded-[4px] text-[18px]"
  334. :disabled="countdown != 0" @click="verifyCodeFn">
  335. {{ countdown == 0 ? '获取验证码' : countdown }}
  336. </n-button>
  337. </n-form-item>
  338. <div class="flex justify-center mt-[20px] submission">
  339. <n-button type="info" class="w-[700px] h-[55px] text-[20px] text-[#fff] bg-[#1f4df5] rounded-[4px]"
  340. @click="handleValidateButtonClick">
  341. 立即提交
  342. </n-button>
  343. </div>
  344. </n-form>
  345. </n-card>
  346. </n-modal>
  347. <!-- <nuxt-link to="/list/123">news-1</nuxt-link> -->
  348. </template>
  349. <script lang="ts" setup>
  350. import { reactive, ref } from 'vue'
  351. import { useRouter } from 'vue-router'
  352. import { postListData, downInfo, sendSms, postCustomer } from '~/server/api/index'
  353. // import { provice } from '~/utils/city'
  354. // import NumberRoll from '~/composables/NumberRoll.vue'
  355. import {
  356. FormRules,
  357. useMessage,
  358. FormInst,
  359. } from 'naive-ui'
  360. // 滚动
  361. // const numberRollRef = ref<typeof NumberRoll>()
  362. const goTo = () => {
  363. // @ts-ignore
  364. numberRollRef.value.start()
  365. }
  366. const entryPage =()=>{
  367. let entryPage =localStorage.getItem('entryPage')
  368. if(entryPage){
  369. console.log('进入页面了',localStorage.getItem('entryPage'))
  370. document.querySelector('#' + entryPage)?.scrollIntoView()
  371. localStorage.removeItem('entryPage')
  372. }
  373. }
  374. // 组件更新完成之后执行的函数
  375. onUpdated(()=>{
  376. entryPage()
  377. })
  378. // console.log('provice',provice)
  379. const router = useRouter()
  380. const headerTitle = reactive([
  381. {
  382. title: '首页',
  383. go: 'home'
  384. },
  385. {
  386. title: '解决方案',
  387. go: 'solution'
  388. },
  389. {
  390. title: '联系我们',
  391. go: 'contact'
  392. },
  393. {
  394. title: '申请试用',
  395. go: 'probation'
  396. }
  397. ]
  398. )
  399. const headerClass = ref<string>('')
  400. const titleRight = (i: string) => {
  401. if (i == 'probation') {
  402. btn()
  403. return
  404. }
  405. document.querySelector('#' + i)?.scrollIntoView()
  406. }
  407. const mouseenterFn = (i: string) => {
  408. // console.log('mouseenterFn')
  409. headerClass.value = i
  410. }
  411. const mouseleaveFn = () => {
  412. headerClass.value = ''
  413. }
  414. const freeList = reactive(['3', '0', '7', '0', '1', '3', '7', '4'])
  415. const message = useMessage()
  416. const num = reactive([{
  417. img: '~/public/image/p_img_home_qs_0_0.png'
  418. },
  419. {
  420. img: '~/public/image/p_img_home_qs_0_1.png'
  421. },
  422. {
  423. img: '~/public/image/p_img_home_qs_0_2.png'
  424. }
  425. ])
  426. // console.log('import.meta.url', import.meta.url)
  427. const getImg = (name: number) => {
  428. return new URL(`/public/image/p_img_home_qs_0_${name}.png`, import.meta.url).href;
  429. }
  430. const loginBtn = () => {
  431. console.log('跳转')
  432. // window.location.replace('http://p.daicrm.com/#/login')
  433. window.open('http://p.daicrm.com/#/login')
  434. // window.location.href('http://p.daicrm.com/#/login')
  435. }
  436. const currentIndex = ref(1)
  437. const customFn = (i: number) => {
  438. console.log('i', i)
  439. currentIndex.value = i
  440. }
  441. const go = (i: number) => {
  442. currentIndex.value = currentIndex.value + i
  443. if (currentIndex.value > homeList.value.length - 1) {
  444. currentIndex.value = 0
  445. return
  446. }
  447. if (currentIndex.value < 0) {
  448. currentIndex.value = homeList.value.length - 1
  449. return
  450. }
  451. }
  452. const btnContent = (i: number) => {
  453. // 跳转
  454. console.log('跳转', i)
  455. localStorage.setItem('hryk-id', homeList.value[i].id)
  456. router.push({
  457. path: '/list/'
  458. })
  459. }
  460. let homeList: any = ref([])
  461. const postListDataFn = async () => {
  462. let list = await postListData({
  463. "categoryId": 1
  464. })
  465. console.log('postListDataFn', list)
  466. list.data.data ? homeList.value = list.data.data.list : ''
  467. }
  468. let bottomCode: any = ref([])
  469. postListDataFn()
  470. const downInfoFn = async () => {
  471. const list = await downInfo()
  472. console.log('list', list)
  473. bottomCode.value = list.data.data
  474. }
  475. downInfoFn()
  476. // 框显示隐藏
  477. let showModal = ref<boolean>(false)
  478. const rules: FormRules = {
  479. companyName: [
  480. {
  481. required: true,
  482. trigger: ['blur', 'input'],
  483. message: '请输入公司名称'
  484. }
  485. ],
  486. customName: [
  487. {
  488. required: true,
  489. trigger: ['blur', 'input'],
  490. message: '请输入姓名'
  491. }
  492. ],
  493. city: [
  494. {
  495. required: true,
  496. trigger: ['blur', 'input'],
  497. message: '请选择所在城市'
  498. }
  499. ],
  500. phone: [
  501. {
  502. required: true,
  503. trigger: ['blur', 'input'],
  504. message: '请输入手机号'
  505. }
  506. ],
  507. verifyCode: [
  508. {
  509. required: true,
  510. trigger: ['blur', 'input'],
  511. message: '请输入验证码'
  512. }
  513. ],
  514. }
  515. interface customerType {
  516. sceneType?: string;
  517. companyName?: null | string;
  518. customName?: null | string;
  519. city?: null | string;
  520. phone?: null | string;
  521. verifyCode?: null | string;
  522. channel?: number;
  523. }
  524. let countdown = ref(0)
  525. const customer = ref<customerType>({
  526. sceneType: "loanofficial", // 场景
  527. companyName: null,// 公司名称
  528. customName: null, // 姓名
  529. city: null, // 所在城市
  530. phone: null, // 手机号
  531. verifyCode: null, //验证码
  532. channel: 16, //pc官网16 手机端17
  533. })
  534. const verifyCodeFn = async () => {
  535. if (customer.value.phone) {
  536. if (new RegExp('^1[0-9]{10}$').test(customer.value.phone)) {
  537. let z = await sendSms({
  538. sceneType: "loanofficial",
  539. userMobile: customer.value.phone
  540. })
  541. if (z.data.code == 0) {
  542. message.success('发送成功')
  543. countdown.value = 60
  544. // this.countDown()
  545. countDown()
  546. // console.log('进来了', this.countdown)
  547. } else {
  548. message.error('发送失败')
  549. }
  550. } else {
  551. message.error('请输入正确手机号')
  552. }
  553. } else {
  554. // 唤起提示
  555. message.error('请输入手机号')
  556. }
  557. }
  558. const intervalBtn = ref()
  559. // 倒计时
  560. const countDown = () => {
  561. // 设置倒计时
  562. intervalBtn.value = setInterval(() => {
  563. if (countdown.value == 1) {
  564. // 清除定时器
  565. clearInterval(intervalBtn.value)
  566. // 重置倒计时状态
  567. countdown.value = 1
  568. };
  569. // 倒计时
  570. countdown.value--
  571. }, 1000)
  572. }
  573. const formRef = ref<FormInst | null>(null)
  574. const handleValidateButtonClick = (e: MouseEvent) => {
  575. e.preventDefault()
  576. formRef.value?.validate(async (errors) => {
  577. if (!errors) {
  578. message.success('验证成功')
  579. console.log('customer.value', customer.value)
  580. let z = await postCustomer(customer.value)
  581. console.log('zzz', z)
  582. if (z.data.msg == '成功') {
  583. // 关闭页面
  584. fouse()
  585. }
  586. } else {
  587. console.log(errors)
  588. message.error('验证失败')
  589. }
  590. })
  591. }
  592. const fouse = () => {
  593. showModal.value = false
  594. }
  595. const btn = () => {
  596. customer.value = {
  597. sceneType: "loanofficial", // 场景
  598. companyName: null,// 公司名称
  599. customName: null, // 姓名
  600. city: null, // 所在城市
  601. phone: null, // 手机号
  602. verifyCode: null, //验证码
  603. channel: 16, //pc官网16 手机端17
  604. }
  605. clearInterval(intervalBtn.value)
  606. countdown.value = 0
  607. showModal.value = true
  608. }
  609. const handleUpdateValue = (value: string) => {
  610. console.log(value, '进来了')
  611. }
  612. </script>
  613. <style scoped lang="scss">
  614. .num-item {
  615. border-radius: 4px;
  616. width: 50px;
  617. height: 60px;
  618. margin: 10px;
  619. background: linear-gradient(0deg, rgb(255, 255, 255) 0%, rgba(244, 244, 255, 0.961) 50%, rgb(255, 255, 255) 100%);
  620. font-size: 36px;
  621. color: #fff;
  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>