m_user.vue 17 KB

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