list.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554
  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 cursor-pointer" @click="titlebtn">
  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. <div class="flex w-full flex-col items-center justify-center mt-[100px]">
  36. <h1 class="my-[20px] font-black text-[30px]">
  37. {{title}}
  38. </h1>
  39. <!-- <div > -->
  40. <p v-html="list" class="w-[1000px] h-[80vh] overflow-y-scroll">
  41. </p>
  42. <!-- </div> -->
  43. </div>
  44. <div class="w-full bg-[#1f1d2a] pt-[20px] pb-[10px] relative" id="contact">
  45. <div class="w-[1200px] m-auto">
  46. <div class="flex justify-between my-[20px]">
  47. <!-- 左侧 -->
  48. <div class="flex">
  49. <!-- 左边 -->
  50. <div class="flex flex-col text-[#999999] mr-[30px]">
  51. <h3 class="text-[17px] font-medium text-[#fff]">
  52. 联系方式
  53. </h3>
  54. <span class="text-[13px] my-[20px]">
  55. 客服: kefu@meloinfo.com
  56. </span>
  57. <span class="text-[13px]">
  58. 商务: 17723267692(微信同号)
  59. </span>
  60. </div>
  61. <!-- 地址 -->
  62. <div class="text-[#999999]">
  63. <h3 class="text-[17px] font-medium mb-[20px] text-[#fff]">
  64. 公司地址
  65. </h3>
  66. <span class="text-[13px]">
  67. 重庆市两江新区大竹林街道清枫北路10号3幢双子座A座1406
  68. </span>
  69. </div>
  70. </div>
  71. <!-- 二维码 -->
  72. <div class="flex items-center justify-center">
  73. <div class="flex flex-col items-center justify-center ml-" v-if="bottomCode.wxQrUrl">
  74. <!-- <div class="flex flex-col items-center justify-center"> -->
  75. <span class="text-[#fff] text-[17px] mb-[20px]">
  76. 关注公众号
  77. </span>
  78. <n-popover trigger="hover">
  79. <template #trigger>
  80. <img :src="bottomCode.wxQrUrl" class="w-[100px] h-[100px]" alt="">
  81. </template>
  82. <img :src="bottomCode.wxQrUrl" class="w-[200px] h-[200px]" alt="">
  83. </n-popover>
  84. </div>
  85. <div class="flex flex-col items-center justify-center mx-[50px]" v-if="bottomCode.iosQrUrl">
  86. <span class="text-[#fff] text-[17px] mb-[20px]">
  87. iosAPP下载
  88. </span>
  89. <n-popover trigger="hover">
  90. <template #trigger>
  91. <img :src="bottomCode.iosQrUrl" class="w-[100px] h-[100px]" alt="">
  92. </template>
  93. <img :src="bottomCode.wxQrUrl" class="w-[200px] h-[200px]" alt="">
  94. </n-popover>
  95. </div>
  96. <div class="flex flex-col items-center justify-center" v-if="bottomCode.androidQrUrl">
  97. <!-- <div class="flex flex-col items-center justify-center"> -->
  98. <span class="text-[#fff] text-[17px] mb-[20px]">
  99. 安卓APP下载
  100. </span>
  101. <n-popover trigger="hover">
  102. <template #trigger>
  103. <img :src="bottomCode.androidQrUrl" class="w-[100px] h-[100px]" alt="">
  104. </template>
  105. <img :src="bottomCode.androidQrUrl" class="w-[200px] h-[200px]" alt="">
  106. </n-popover>
  107. </div>
  108. </div>
  109. </div>
  110. <!-- 备案号 -->
  111. <div class="h-[154px] flex flex-col items-center justify-center text-[#585667] text-[13px] py-[60px]">
  112. <div class="pt-[30px]">
  113. <span>Copyright © 2023 重庆惠融数字科技有限公司版权所有</span>
  114. <span class="mx-[5px] cursor-pointer">
  115. <a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank" class="text-[#585667!important]">渝ICP备2023000211号-4</a>
  116. </span>
  117. <span class="mx-[10px]">
  118. 营业执照:91500000MA5UJ59N6Q
  119. </span>
  120. </div>
  121. <div class="my-[20px]">
  122. 违法和不良信息举报邮箱:tousu@meloinfo.com
  123. </div>
  124. <div>
  125. <span class="ml-[20px] mr-[5px] cursor-pointer">
  126. <a href="https://www.beian.gov.cn/portal/registerSystemInfo?recordcode=50019002503593#" target="_blank" class="text-[#585667!important]">联网备案号:50019002503593</a>
  127. </span>
  128. <span class="cursor-pointer">
  129. <a href="https://www.12377.cn/" target="_blank" class="text-[#585667!important]">中国互联网违法和不良信息举报中心</a>
  130. </span>
  131. </div>
  132. </div>
  133. </div>
  134. <div class="absolute bottom-[140px] left-0 w-full">
  135. <div class="w-full h-0 opacity-[1] border-[0.5px] border-[#2B374A]">
  136. </div>
  137. </div>
  138. </div>
  139. <n-modal v-model:show="showModal" class="modalCss">
  140. <n-card style="width: 800px" title="申请试用" :bordered="false" size="huge" role="dialog" aria-modal="true">
  141. <div class="text-[#999999] text-[18px] pt-[15px] pb-[12px]">
  142. 为了我们能更好的服务您,请您填写以下信息,如遇到问题,请您拨打免费服务热线
  143. </div>
  144. <n-form ref="formRef" :model="customer" :rules="rules">
  145. <n-form-item path="companyName" label="公司名称">
  146. <n-input v-model:value="customer.companyName" @keydown.enter.prevent class="h-[55px] leading-[55px]"
  147. placeholder="请输入公司名称" />
  148. </n-form-item>
  149. <n-form-item path="city" label="所在城市">
  150. <n-input v-model:value="customer.city" class="h-[55px] leading-[55px]" placeholder="请选择所在城市" />
  151. <!-- <n-cascader v-model:value="customer.city" placeholder="请选择所在城市" class="h-[55px] leading-[55px]"
  152. :options="provice" check-strategy="child" :show-path="true" value-field="name" label-field="name" @update:value="handleUpdateValue"
  153. /> -->
  154. </n-form-item>
  155. <n-form-item path="customName" label="姓名">
  156. <n-input v-model:value="customer.customName" class="h-[55px] leading-[55px]" placeholder="请输入姓名" />
  157. </n-form-item>
  158. <n-form-item path="phone" label="联系方式">
  159. <n-input v-model:value="customer.phone" class="h-[55px] leading-[55px]" placeholder="请输入联系方式" />
  160. </n-form-item>
  161. <n-form-item path="verifyCode" label="验证码" class="">
  162. <n-input v-model:value="customer.verifyCode" class="h-[55px] leading-[55px]" placeholder="请输入验证码" />
  163. <n-button type="info" class="w-[150px] h-[55px] text-[#fff] bg-[#1f4df5] ml-[20px] rounded-[4px] text-[18px]"
  164. :disabled="countdown != 0" @click="verifyCodeFn">
  165. {{ countdown == 0 ? '获取验证码' : countdown }}
  166. </n-button>
  167. </n-form-item>
  168. <div class="flex justify-center mt-[20px] submission">
  169. <n-button type="info" class="w-[700px] h-[55px] text-[20px] text-[#fff] bg-[#1f4df5] rounded-[4px]"
  170. @click="handleValidateButtonClick">
  171. 立即提交
  172. </n-button>
  173. </div>
  174. </n-form>
  175. </n-card>
  176. </n-modal>
  177. </template>
  178. <script lang="ts" setup>
  179. import {
  180. FormRules,
  181. useMessage,
  182. FormInst,
  183. } from 'naive-ui'
  184. import { postListData, downInfo, sendSms, postCustomer } from '~/server/api/index'
  185. import axios from 'axios'
  186. const message = useMessage()
  187. let list = ref('')
  188. let title =ref('')
  189. const postListIDFn = async () => {
  190. localStorage.getItem('hryk-id')
  191. // console.log('localStorage.getItem',localStorage.getItem('hryk-id'))
  192. let z: any = await axios.get(`https://official.webapi.bicredit.xin/api/news/detail/${localStorage.getItem('hryk-id')}`)
  193. console.log('zzz', z)
  194. // if(z.msg == '成功'){
  195. list.value = z.data.data.content
  196. title.value =z.data.data.title
  197. // console.log('list',list.value)
  198. // }
  199. }
  200. postListIDFn()
  201. const headerTitle = reactive([
  202. {
  203. title: '首页',
  204. go: 'home'
  205. },
  206. {
  207. title: '解决方案',
  208. go: 'solution'
  209. },
  210. {
  211. title: '联系我们',
  212. go: 'contact'
  213. },
  214. {
  215. title: '申请试用',
  216. go: 'probation'
  217. }
  218. ]
  219. )
  220. const headerClass = ref<string>('')
  221. const titleRight = (i: string) => {
  222. if (i == 'probation') {
  223. btn()
  224. return
  225. }
  226. console.log('iii',i)
  227. // document.querySelector('#' + i)?.scrollIntoView()
  228. localStorage.setItem('entryPage',i)
  229. history.back()
  230. }
  231. const mouseenterFn = (i: string) => {
  232. // console.log('mouseenterFn')
  233. headerClass.value = i
  234. }
  235. const mouseleaveFn = () => {
  236. headerClass.value = ''
  237. }
  238. const loginBtn = () => {
  239. console.log('跳转')
  240. // window.location.replace('http://p.daicrm.com/#/login')
  241. window.open('http://p.daicrm.com/#/login')
  242. // window.location.href('http://p.daicrm.com/#/login')
  243. }
  244. const titlebtn =()=>{
  245. history.back()
  246. }
  247. // 框显示隐藏
  248. let showModal = ref<boolean>(false)
  249. const rules: FormRules = {
  250. companyName: [
  251. {
  252. required: true,
  253. trigger: ['blur', 'input'],
  254. message: '请输入公司名称'
  255. }
  256. ],
  257. customName: [
  258. {
  259. required: true,
  260. trigger: ['blur', 'input'],
  261. message: '请输入姓名'
  262. }
  263. ],
  264. city: [
  265. {
  266. required: true,
  267. trigger: ['blur', 'input'],
  268. message: '请选择所在城市'
  269. }
  270. ],
  271. phone: [
  272. {
  273. required: true,
  274. trigger: ['blur', 'input'],
  275. message: '请输入手机号'
  276. }
  277. ],
  278. verifyCode: [
  279. {
  280. required: true,
  281. trigger: ['blur', 'input'],
  282. message: '请输入验证码'
  283. }
  284. ],
  285. }
  286. interface customerType {
  287. sceneType?: string;
  288. companyName?: null | string;
  289. customName?: null | string;
  290. city?: null | string;
  291. phone?: null | string;
  292. verifyCode?: null | string;
  293. channel?: number;
  294. }
  295. let countdown = ref(0)
  296. const customer = ref<customerType>({
  297. sceneType: "loanofficial", // 场景
  298. companyName: null,// 公司名称
  299. customName: null, // 姓名
  300. city: null, // 所在城市
  301. phone: null, // 手机号
  302. verifyCode: null, //验证码
  303. channel: 16, //pc官网16 手机端17
  304. })
  305. const verifyCodeFn = async () => {
  306. if (customer.value.phone) {
  307. if (new RegExp('^1[0-9]{10}$').test(customer.value.phone)) {
  308. let z = await sendSms({
  309. sceneType: "loanofficial",
  310. userMobile: customer.value.phone
  311. })
  312. if (z.data.code == 0) {
  313. message.success('发送成功')
  314. countdown.value = 60
  315. // this.countDown()
  316. countDown()
  317. // console.log('进来了', this.countdown)
  318. } else {
  319. message.error('发送失败')
  320. }
  321. } else {
  322. message.error('请输入正确手机号')
  323. }
  324. } else {
  325. // 唤起提示
  326. message.error('请输入手机号')
  327. }
  328. }
  329. const intervalBtn = ref()
  330. // 倒计时
  331. const countDown = () => {
  332. // 设置倒计时
  333. intervalBtn.value = setInterval(() => {
  334. if (countdown.value == 1) {
  335. // 清除定时器
  336. clearInterval(intervalBtn.value)
  337. // 重置倒计时状态
  338. countdown.value = 1
  339. };
  340. // 倒计时
  341. countdown.value--
  342. }, 1000)
  343. }
  344. const formRef = ref<FormInst | null>(null)
  345. const handleValidateButtonClick = (e: MouseEvent) => {
  346. e.preventDefault()
  347. formRef.value?.validate(async (errors) => {
  348. if (!errors) {
  349. message.success('验证成功')
  350. console.log('customer.value', customer.value)
  351. let z = await postCustomer(customer.value)
  352. console.log('zzz', z)
  353. if (z.data.msg == '成功') {
  354. // 关闭页面
  355. fouse()
  356. }
  357. } else {
  358. console.log(errors)
  359. message.error('验证失败')
  360. }
  361. })
  362. }
  363. const fouse = () => {
  364. showModal.value = false
  365. }
  366. const btn = () => {
  367. customer.value = {
  368. sceneType: "loanofficial", // 场景
  369. companyName: null,// 公司名称
  370. customName: null, // 姓名
  371. city: null, // 所在城市
  372. phone: null, // 手机号
  373. verifyCode: null, //验证码
  374. channel: 16, //pc官网16 手机端17
  375. }
  376. clearInterval(intervalBtn.value)
  377. countdown.value = 0
  378. showModal.value = true
  379. }
  380. let bottomCode: any = ref([])
  381. const downInfoFn = async () => {
  382. const list = await downInfo()
  383. console.log('list', list)
  384. bottomCode.value = list.data.data
  385. }
  386. downInfoFn()
  387. </script>
  388. <style scoped lang="scss">
  389. .num-item {
  390. border-radius: 4px;
  391. width: 50px;
  392. height: 60px;
  393. margin: 10px;
  394. background: linear-gradient(0deg, rgb(255, 255, 255) 0%, rgba(244, 244, 255, 0.961) 50%, rgb(255, 255, 255) 100%);
  395. font-size: 36px;
  396. color: #fff;
  397. }
  398. .trial {
  399. background: url(~/public/image/try_out.png) no-repeat;
  400. background-size: cover;
  401. }
  402. .advantage {
  403. background: url(~/public/image/advantage.png) no-repeat;
  404. background-size: cover;
  405. }
  406. img {
  407. height: 100%;
  408. }
  409. .n-carousel {
  410. width: 529px !important;
  411. }
  412. .carousel-img {
  413. width: 509px;
  414. height: 306px;
  415. border-radius: 4px;
  416. }
  417. .custom-dots {
  418. display: flex;
  419. margin: 0;
  420. padding: 0;
  421. }
  422. .custom-dots li {
  423. display: inline-block;
  424. width: 20px;
  425. height: 4px;
  426. margin: 0 5px;
  427. // border-radius: 4px;
  428. background: #0000001d;
  429. transition: width 0.3s, background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  430. cursor: pointer;
  431. }
  432. .custom-dots li.is-active {
  433. width: 40px;
  434. background: #0047FF;
  435. }
  436. .text1 {
  437. display: inline-block;
  438. white-space: nowrap;
  439. width: 300px;
  440. overflow: hidden;
  441. text-overflow: ellipsis;
  442. }
  443. ::v-deep(.n-button) {
  444. border-radius: 4px !important;
  445. }
  446. // 框
  447. ::v-deep(.n-card-header__main) {
  448. flex: inherit !important;
  449. margin: 0 auto !important;
  450. }
  451. ::v-deep(.n-card-header) {
  452. padding: 0 !important;
  453. padding-top: 50px !important;
  454. }
  455. ::v-deep(.n-card__content) {
  456. flex: inherit;
  457. margin: 0 auto;
  458. margin-bottom: 50px !important;
  459. }
  460. ::v-deep(.n-form-item-label) {
  461. display: none !important;
  462. }
  463. ::v-deep(.n-form-item) {
  464. --n-label-height: 10px !important;
  465. }
  466. ::v-deep(.n-carousel__dots) {
  467. display: none !important;
  468. }
  469. ::v-deep(.n-input__input-el) {
  470. height: 55px !important;
  471. line-height: 55px !important;
  472. }
  473. ::v-deep(.n-card-header__main) {
  474. font-size: 30px;
  475. }
  476. // 按钮样式
  477. ::v-deep(.van-button--normal) {
  478. border-radius: 6px;
  479. background: #0047FF;
  480. border: 0;
  481. height: 67px;
  482. }
  483. .trial ::v-deep(.van-button--normal) {
  484. border-radius: 6px;
  485. background: #0047FF;
  486. border: 0;
  487. width: 400px;
  488. height: 67px;
  489. }
  490. ::v-deep(.van-button__content) {
  491. font-size: 24px;
  492. }
  493. .title ::v-deep(.van-button--normal) {
  494. border-radius: 6px;
  495. background: #0047FF;
  496. border: 0;
  497. width: 130px;
  498. height: 42px;
  499. }
  500. .title ::v-deep(.van-button__content) {
  501. font-size: 16px;
  502. }
  503. .message ::v-deep(.van-button--normal) {
  504. border-radius: 6px;
  505. background: #0047FF;
  506. border: 0;
  507. width: 130px;
  508. height: 42px;
  509. }
  510. .message ::v-deep(.van-button__content) {
  511. font-size: 16px;
  512. }
  513. .modalCss ::v-deep(.n-button) {
  514. border-radius: 4px !important;
  515. height: 55px !important;
  516. }
  517. .submission ::v-deep(.n-button) {
  518. width: 700px !important;
  519. }
  520. </style>