m_user.vue 18 KB

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