m_user.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576
  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 title="斯通纳">
  201. 《斯通纳》是美国作家约翰·威廉姆斯在 1965 年出版的小说。
  202. </n-drawer-content>
  203. </n-drawer>
  204. <n-modal v-model:show="showModal">
  205. <n-card style="width: 800px" title="申请试用" :bordered="false" size="huge" role="dialog" aria-modal="true">
  206. <div class="text-[#999999] text-[12px] pt-[15px] pb-[30px]">
  207. 为了我们能更好的服务您,请您填写以下信息,如遇到问题,请您拨打免费服务热线
  208. </div>
  209. <n-form ref="formRef" :model="customer" :rules="rules">
  210. <n-form-item path="companyName" label="公司名称">
  211. <n-input v-model:value="customer.companyName" @keydown.enter.prevent class="h-[55px] leading-[55px]"
  212. placeholder="请输入公司名称" />
  213. </n-form-item>
  214. <n-form-item path="city" label="所在城市">
  215. <n-input v-model:value="customer.city" class="h-[55px] leading-[55px]" placeholder="请选择所在城市" />
  216. <!-- <n-cascader v-model:value="customer.city" placeholder="请选择所在城市" class="h-[55px] leading-[55px]"
  217. :options="provice" check-strategy="child" :show-path="true" value-field="name" label-field="name" @update:value="handleUpdateValue"
  218. /> -->
  219. </n-form-item>
  220. <n-form-item path="customName" label="姓名">
  221. <n-input v-model:value="customer.customName" class="h-[55px] leading-[55px]" placeholder="请输入姓名" />
  222. </n-form-item>
  223. <n-form-item path="phone" label="联系方式">
  224. <n-input v-model:value="customer.phone" class="h-[55px] leading-[55px]" placeholder="请输入联系方式" />
  225. </n-form-item>
  226. <n-form-item path="verifyCode" label="验证码" class="">
  227. <n-input v-model:value="customer.verifyCode" class="h-[55px] leading-[55px]" placeholder="请输入验证码" />
  228. <n-button type="info" class="w-[100px] h-[50px] text-[#fff] bg-[#1f4df5] ml-[10px]" :disabled="countdown != 0"
  229. @click="verifyCodeFn">
  230. {{ countdown == 0 ? '获取验证码' : countdown }}
  231. </n-button>
  232. </n-form-item>
  233. <div class="flex justify-center">
  234. <n-button type="info" class="w-[300px] h-[50px] text-[#fff] bg-[#1f4df5]" @click="handleValidateButtonClick">
  235. 立即提交
  236. </n-button>
  237. </div>
  238. </n-form>
  239. </n-card>
  240. </n-modal>
  241. <!-- <nuxt-link to="/list/123">news-1</nuxt-link> -->
  242. </template>
  243. <script lang="ts" setup>
  244. import { reactive, ref } from 'vue'
  245. import { useRouter } from 'vue-router'
  246. import { postListData, downInfo, sendSms, postCustomer } from '~/server/api/index'
  247. import { provice } from '~/utils/city'
  248. import {
  249. FormRules,
  250. useMessage,
  251. FormInst,
  252. } from 'naive-ui'
  253. // console.log('provice',provice)
  254. const router = useRouter()
  255. const headerTitle = reactive([
  256. {
  257. title: '首页',
  258. go: 'home'
  259. },
  260. {
  261. title: '解决方案',
  262. go: 'solution'
  263. },
  264. {
  265. title: '联系我们',
  266. go: 'contact'
  267. },
  268. {
  269. title: '申请试用',
  270. go: 'probation'
  271. }
  272. ]
  273. )
  274. const activeNames = ref(['1']);
  275. // 抽屉展示
  276. const active = ref(false)
  277. const freeList = reactive(['3', '0', '7', '0', '1', '3', '7', '4'])
  278. const message = useMessage()
  279. const num = reactive([{
  280. img: '~/public/image/p_img_home_qs_0_0.png'
  281. },
  282. {
  283. img: '~/public/image/p_img_home_qs_0_1.png'
  284. },
  285. {
  286. img: '~/public/image/p_img_home_qs_0_2.png'
  287. }
  288. ])
  289. // console.log('import.meta.url', import.meta.url)
  290. const getImg = (name: number) => {
  291. return new URL(`/public/image/p_img_home_qs_0_${name}.png`, import.meta.url).href;
  292. }
  293. const currentIndex = ref(1)
  294. const customFn = (i: number) => {
  295. console.log('i', i)
  296. currentIndex.value = i
  297. }
  298. const go = (i: number) => {
  299. currentIndex.value = currentIndex.value + i
  300. if (currentIndex.value > homeList.value.length - 1) {
  301. currentIndex.value = 0
  302. return
  303. }
  304. if (currentIndex.value < 0) {
  305. currentIndex.value = homeList.value.length - 1
  306. return
  307. }
  308. }
  309. const btnContent = (i: number) => {
  310. // 跳转
  311. console.log('跳转', i)
  312. router.push({
  313. path: `/list/${homeList.value[i].id}`
  314. })
  315. }
  316. let homeList: any = ref([])
  317. const postListDataFn = async () => {
  318. let list = await postListData({
  319. "categoryId": 1
  320. })
  321. console.log('postListDataFn', list)
  322. list.data.data ? homeList.value = list.data.data.list : ''
  323. }
  324. let bottomCode: any = ref([])
  325. postListDataFn()
  326. const downInfoFn = async () => {
  327. const list = await downInfo()
  328. console.log('list', list)
  329. bottomCode.value = list.data.data
  330. }
  331. downInfoFn()
  332. // 框显示隐藏
  333. let showModal = ref<boolean>(false)
  334. const rules: FormRules = {
  335. companyName: [
  336. {
  337. required: true,
  338. trigger: ['blur', 'input'],
  339. message: '请输入公司名称'
  340. }
  341. ],
  342. customName: [
  343. {
  344. required: true,
  345. trigger: ['blur', 'input'],
  346. message: '请输入姓名'
  347. }
  348. ],
  349. city: [
  350. {
  351. required: true,
  352. trigger: ['blur', 'input'],
  353. message: '请选择所在城市'
  354. }
  355. ],
  356. phone: [
  357. {
  358. required: true,
  359. trigger: ['blur', 'input'],
  360. message: '请输入手机号'
  361. }
  362. ],
  363. verifyCode: [
  364. {
  365. required: true,
  366. trigger: ['blur', 'input'],
  367. message: '请输入验证码'
  368. }
  369. ],
  370. }
  371. interface customerType {
  372. sceneType?: string;
  373. companyName?: null | string;
  374. customName?: null | string;
  375. city?: null | string;
  376. phone?: null | string;
  377. verifyCode?: null | string;
  378. channel?: number;
  379. }
  380. let countdown = ref(0)
  381. const customer = ref<customerType>({
  382. sceneType: "loanofficial", // 场景
  383. companyName: null,// 公司名称
  384. customName: null, // 姓名
  385. city: null, // 所在城市
  386. phone: null, // 手机号
  387. verifyCode: null, //验证码
  388. channel: 16, //pc官网16 手机端17
  389. })
  390. const verifyCodeFn = async () => {
  391. if (customer.value.phone) {
  392. if (new RegExp('^1[0-9]{10}$').test(customer.value.phone)) {
  393. let z = await sendSms({
  394. sceneType: "loanofficial",
  395. userMobile: customer.value.phone
  396. })
  397. if (z.data.code == 0) {
  398. message.success('发送成功')
  399. countdown.value = 60
  400. // this.countDown()
  401. countDown()
  402. // console.log('进来了', this.countdown)
  403. } else {
  404. message.error('发送失败')
  405. }
  406. } else {
  407. message.error('请输入正确手机号')
  408. }
  409. } else {
  410. // 唤起提示
  411. message.error('请输入手机号')
  412. }
  413. }
  414. // 倒计时
  415. const countDown = () => {
  416. // 设置倒计时
  417. const intervalBtn = setInterval(() => {
  418. if (countdown.value == 1) {
  419. // 清除定时器
  420. clearInterval(intervalBtn)
  421. // 重置倒计时状态
  422. countdown.value = 0
  423. };
  424. // 倒计时
  425. countdown.value--
  426. }, 1000)
  427. }
  428. const formRef = ref<FormInst | null>(null)
  429. const handleValidateButtonClick = (e: MouseEvent) => {
  430. e.preventDefault()
  431. formRef.value?.validate(async (errors) => {
  432. if (!errors) {
  433. message.success('验证成功')
  434. console.log('customer.value', customer.value)
  435. let z = await postCustomer(customer.value)
  436. console.log('zzz', z)
  437. if (z.data.msg == '成功') {
  438. // 关闭页面
  439. fouse()
  440. }
  441. } else {
  442. console.log(errors)
  443. message.error('验证失败')
  444. }
  445. })
  446. }
  447. const fouse = () => {
  448. showModal.value = false
  449. }
  450. const btn = () => {
  451. showModal.value = true
  452. }
  453. const handleUpdateValue = (value: string) => {
  454. console.log(value, '进来了')
  455. }
  456. </script>
  457. <style scoped lang="scss">
  458. p {
  459. color: var(--link-color)
  460. }
  461. .relatives {
  462. width: 100%;
  463. height: 210px;
  464. background: url(~/public/image/img_home.png) no-repeat;
  465. background-size: cover;
  466. }
  467. .trial {
  468. background: url(~/public/image/try_out.png) no-repeat;
  469. background-size: cover;
  470. }
  471. .n-carousel {
  472. width: 529px !important;
  473. }
  474. .carousel-img {
  475. width: 343px;
  476. height: 163px;
  477. margin: 0 auto;
  478. }
  479. .custom-dots {
  480. display: flex;
  481. align-items: center;
  482. justify-content: center;
  483. // margin: 0;
  484. margin: 0 auto;
  485. padding: 0;
  486. }
  487. .custom-dots li {
  488. display: inline-block;
  489. width: 20px;
  490. height: 4px;
  491. margin: 0 3px;
  492. border-radius: 4px;
  493. background: #888888;
  494. transition: width 0.3s, background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  495. cursor: pointer;
  496. }
  497. .custom-dots li.is-active {
  498. width: 50px;
  499. background: #0047FF;
  500. }
  501. .custom-indicator {
  502. // position: absolute;
  503. // right: 5px;
  504. // bottom: 5px;
  505. padding: 2px 5px;
  506. font-size: 12px;
  507. background: #fafafa;
  508. }
  509. // 框
  510. // .n-drawer.n-drawer--left-placement
  511. ::v-deep(.n-drawer){
  512. top: 44px !important;
  513. }
  514. ::v-deep(.n-card-header__main) {
  515. flex: inherit !important;
  516. margin: 0 auto !important;
  517. }
  518. ::v-deep(.n-card-header) {
  519. padding: 0;
  520. padding-top: 50px;
  521. }
  522. ::v-deep(.n-card__content) {
  523. flex: inherit;
  524. margin: 0 auto;
  525. }
  526. ::v-deep(.n-form-item-label) {
  527. display: none !important;
  528. }
  529. ::v-deep(.n-carousel__dots) {
  530. display: none !important;
  531. }
  532. ::v-deep(.n-input__input-el) {
  533. height: 55px !important;
  534. line-height: 55px !important;
  535. }
  536. // 移动
  537. ::v-deep(.van-cell) {
  538. color: #fff !important;
  539. background: #131820 !important;
  540. }
  541. ::v-deep(.van-collapse-item__content) {
  542. color: #fff !important;
  543. background: #131820 !important;
  544. }
  545. </style>