index copy.vue 17 KB

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