You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.vue 28KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252
  1. <template>
  2. <view class='container'>
  3. <view class="bg-img">
  4. <image :src="`${fileURL}image/newHome/header.png`" mode="scaleToFill" class="icon"></image>
  5. </view>
  6. <view class="content">
  7. <view class="header">
  8. <!-- <navBar :isBack='false' :title='首页'></navBar> -->
  9. <view class="title">
  10. <view :style="{ height: `${statusBarHeight}px` }"></view>
  11. <!-- 自定义导航栏高度 -->
  12. <view class='title-txt' :style="{
  13. height: `${barHeight}px`,
  14. 'line-height': `${barHeight}px`
  15. }">
  16. <text :style="{fontWeight: 'bold', fontSize: '28rpx'}">首页</text>
  17. </view>
  18. </view>
  19. <view class="search-box">
  20. <image :src="`${fileURL}image/newHome/search.png`" class="icon" mode="aspectFill"></image>
  21. <input class="search" placeholder="办业务·搜一搜" @input="onKeyInput" />
  22. </view>
  23. </view>
  24. <view class="nav">
  25. <view class="item-box" v-for='(item,index) in navList' :key='index' @click="handleNav(item)">
  26. <view class="icon-img">
  27. <image :src="item.imgUrl" mode="aspectFit" class='img'></image>
  28. </view>
  29. <view class="b-txt">
  30. {{item.title}}
  31. </view>
  32. </view>
  33. </view>
  34. <view class="notice" v-if="state.notice != '无'"
  35. :style="{'--bgimg':`url(${fileURL}image/newHome/tongzhi.png)`}">
  36. <view class="l-img">
  37. <image :src="`${fileURL}image/newHome/tongzhi-l.png`" class='img' mode="aspectFit"></image>
  38. </view>
  39. <view class="r-info">
  40. <uni-notice-bar style="width: 100%;" scrollable single :text="state.notice"></uni-notice-bar>
  41. </view>
  42. </view>
  43. <view class="supervision-con">
  44. <swiper class="swiper" circular :indicator-dots="swiper.indicatorDots" :autoplay="swiper.autoplay"
  45. :interval="swiper.interval" :duration="swiper.duration">
  46. <block v-if="state.swiperList.length >0" v-for="item in state.swiperList" :key="item.id">
  47. <swiper-item class="swiper-item">
  48. <image :src="fileURLList + item.imgUrl" mode="widthFix" class='img' @click="call()"></image>
  49. </swiper-item>
  50. </block>
  51. </swiper>
  52. </view>
  53. <view class="title-name title-h">
  54. 快速办理
  55. </view>
  56. <view class="express-lane">
  57. <view class="item keche" @click="showMask(1)"
  58. :style="{'--bgimg':`url(${fileURL}image/newHome/keche.png)`}">
  59. <view class="item-con">
  60. <view class="top-txt">
  61. 客车用户
  62. </view>
  63. <view class="btn">
  64. 进入
  65. </view>
  66. </view>
  67. </view>
  68. <view class="item huoche" @click="showMask(2)"
  69. :style="{'--bgimg':`url(${fileURL}image/newHome/huoche.png)`}">
  70. <view class="item-con">
  71. <view class="top-txt">
  72. 货车用户
  73. </view>
  74. <view class="btn">
  75. 进入
  76. </view>
  77. </view>
  78. </view>
  79. </view>
  80. <view class="news-con" v-if="state.highMsgData.length>0">
  81. <view class="title-con">
  82. <text class='title-h'>高速快讯</text>
  83. <view class="r-more" @click="$util.navTo('/subpackage/orders/moreHighMsg/moreHighMsg',true)">
  84. <text class='txt'>更多</text>
  85. <image :src="`${fileURL}image/newHome/r-icon.png`" mode="aspectFit" class='icon'></image>
  86. </view>
  87. </view>
  88. <view class="news-box">
  89. <template v-if='state.highMsgData'>
  90. <view class="news-item" v-for="(item,index) in state.highMsgData" :key='index'
  91. @click="link(item)">
  92. <view class="l-img">
  93. <image :src="fileURLList + item.imgUrl" mode="aspectFill" class="img"></image>
  94. </view>
  95. <view class="r-txt">
  96. <view class="tit">
  97. {{item.title}}
  98. </view>
  99. <view class="b-time">
  100. {{item.updateTime}}
  101. </view>
  102. </view>
  103. </view>
  104. </template>
  105. <view class="empty-news" v-else>
  106. <u-empty text="暂无数据" mode="news" :icon-size='90' :font-size='24'></u-empty>
  107. </view>
  108. </view>
  109. </view>
  110. <!-- 办理流程 -->
  111. <view class="flow-path">
  112. <view class="top-menu">
  113. <view :class="item == state.tabActive ? 'tab active' : 'tab'" v-for="item in state.flowPathTabList"
  114. :key="item" @click="flowPathTabHandle(item)">
  115. <view class="txt">
  116. {{ item }}
  117. </view>
  118. <view class="border" :style="{'--bgimg':`url(${fileURL}image/newHome/bottom-select.png)`}">
  119. </view>
  120. </view>
  121. </view>
  122. <view v-if="state.tabActive === '办理流程'">
  123. <view class="flow-list">
  124. <flow-path-list :options="state.flowList"></flow-path-list>
  125. </view>
  126. </view>
  127. <view v-else-if="state.tabActive === '办理条件'">
  128. <view class="flow-list tiaojian">
  129. <view class="title-top">
  130. <image :src="`${fileURL}image/newHome/tiaojian.png`" mode="scaleToFill" class="icon-img">
  131. </image>
  132. <view class="txt">
  133. 基本条件
  134. </view>
  135. <image :src="`${fileURL}image/newHome/tiaojianr.png`" mode="scaleToFill" class="icon-img">
  136. </image>
  137. </view>
  138. <!-- <view class="list-info"> {{state.processeConditionText}} </view> -->
  139. <view class="item" v-for="(item,index) in state.processeConditionText" :key="index">
  140. <view class="tu" :style="{'--bgimg':`url(${fileURL}image/newHome/condition.png)`}">
  141. {{index+1}}</view>
  142. <view>{{item}}</view>
  143. </view>
  144. </view>
  145. </view>
  146. <view v-else-if="state.tabActive === '常见问题'">
  147. <view class="flow-list wenti">
  148. <view class="item-box" v-for='(item,index) in state.commonQuestionArr' :key='index'>
  149. <view class="l-icon">
  150. <image :src="`${fileURL}image/newHome/wenhao.png`" mode="scaleToFill" class="icon-img">
  151. </image>
  152. </view>
  153. <view class="txt">
  154. {{item}}
  155. </view>
  156. </view>
  157. </view>
  158. </view>
  159. </view>
  160. </view>
  161. </view>
  162. <!-- ETC选择弹窗 -->
  163. <view class="mask" v-if="isShowMask">
  164. <view class="mask-content">
  165. <filter>
  166. <view class="mask-close">
  167. <image :src="`${fileURL}image/newHome/close-dan.png`" class="icon-closed" @click="closeMask">
  168. </image>
  169. </view>
  170. <view class="mask-title">请选择ETC卡用户类型</view>
  171. <view class="mask-tab">
  172. <view class="tab-item" @click="toCreatOrder('1')">
  173. <image :src="`${fileURL}image/newHome/geren.png`" mode="aspectFill" class='img'></image>
  174. <view class="r-info">
  175. <view class="tab-tit">个人办理用户</view>
  176. <view class="tab-desc">个人办理用户</view>
  177. </view>
  178. </view>
  179. <view class="tab-item" @click="toCreatOrder('2')">
  180. <image :src="`${fileURL}image/newHome/danwei.png`" mode="aspectFill" class='img'></image>
  181. <view class="r-info">
  182. <view class="tab-tit">单位办理用户</view>
  183. <view class="tab-desc">单位办理用户</view>
  184. </view>
  185. </view>
  186. </view>
  187. </filter>
  188. </view>
  189. </view>
  190. <!-- 提示 -->
  191. <TipsInfo v-model="state.showTips" des="服务开通中,敬请期待!"></TipsInfo>
  192. </template>
  193. <script setup lang="ts">
  194. import { onMounted, ref, reactive } from "vue";
  195. import { onPageScroll, onLoad, onShow, onReachBottom, onReady } from "@dcloudio/uni-app";
  196. import flowPathList from "./components/flow-path-list.vue";
  197. import filter from '@/components/filter/filter.vue';
  198. import TipsInfo from '@/components/common/TipsInfo.vue';
  199. import { requestNew } from "@/utils/network/request.js";
  200. import { setItem } from "@/utils/storage";
  201. import { queryKey, querySwiper, infoQuery, queryHighMsg, orderQuery, isHaveNotFinishOrder } from "@/utils/network/api.js";
  202. import { fileURL, fileURLList } from "@/datas/fileURL.js";
  203. import { navTo, msg, hasLogin, confirm, jumpOldMini } from "@/utils/utils";
  204. import { getCodeName } from "@/datas/queryKey.js";
  205. import { getCurrentInstance } from 'vue';
  206. import { useUserStore } from "@/stores/user";
  207. const tools = require("../../static/etcUtil/tools.js");
  208. const instance = getCurrentInstance();
  209. const userStore = useUserStore();
  210. import { storeToRefs } from 'pinia';
  211. const { isNewLogin } = storeToRefs(userStore); // 保持响应式
  212. const state = reactive({
  213. vanType: 0, //1客车 2货车
  214. userType: 1, //1个人 2单位
  215. notice: "",
  216. swiperList: [],
  217. swiperListArr: [],
  218. noticeList: [], //公告栏列表
  219. flowPathTabList: ["办理流程", "办理条件", "常见问题"],
  220. tabActive: "办理流程",
  221. flowList: [
  222. //办理流程数据
  223. {
  224. title: "01 产品选择",
  225. desc: "选择购买的发行产品",
  226. imgUrl: `${fileURL}image/newHome/1.png`,
  227. },
  228. {
  229. title: "02 信息校验",
  230. desc: "提交车牌号、车牌颜色、收货地址相关信息",
  231. imgUrl: `${fileURL}image/newHome/2.png`,
  232. },
  233. {
  234. title: "03 证件上传",
  235. desc: "上传身份证、行驶证等相关信息",
  236. imgUrl: `${fileURL}image/newHome/3.png`,
  237. },
  238. {
  239. title: "04 订单支付",
  240. desc: "支付完成订单",
  241. imgUrl: `${fileURL}image/newHome/4.png`,
  242. },
  243. {
  244. title: "05 签约代扣",
  245. desc: "选择签约账户并关联",
  246. imgUrl: `${fileURL}image/newHome/5.png`,
  247. },
  248. ],
  249. highMsgData: '',//高速快讯内容
  250. processeConditionText: [], //办理条件文本
  251. commonQuestionText: "", //常见问题文本
  252. commonQuestionArr: [], //常见问题数组
  253. isEnableSetGray: false,
  254. showTips: false,
  255. });
  256. const swiper = reactive({
  257. indicatorDots: false,
  258. autoplay: true,
  259. interval: 6000,
  260. duration: 500,
  261. easing: "default"
  262. })
  263. const query = () => {
  264. const options = {
  265. type: 2,
  266. data: {},
  267. method: "POST",
  268. showLoading: true,
  269. };
  270. // requestNew(orderQuery, options).then((res) => {
  271. // console.log("擦寻", res,)
  272. // if (res.vehicPlateOrderList.length > 0) {
  273. // uni.showModal({
  274. // title: '提示',
  275. // content: '有未完成的线下渠道订单,是否继续办理',
  276. // success: function (res) {
  277. // if (res.confirm) {
  278. // console.log('用户点击确定');
  279. // navTo('/subpackage/orders/transfer-page-sign')
  280. // } else if (res.cancel) {
  281. // console.log('用户点击取消');
  282. // }
  283. // }
  284. // });
  285. // }
  286. // })
  287. requestNew(isHaveNotFinishOrder, options).then((res) => {
  288. if (res.hasQd) {
  289. confirm('有未完成的线下渠道订单,是否继续办理', (res) => {
  290. uni.navigateTo({
  291. url: '/pages/order/order'
  292. })
  293. }, '温馨提示', true, '确认');
  294. }
  295. })
  296. }
  297. onLoad((options) => {
  298. console.log("wechatSignNo", options)
  299. // setTimeout(() => {
  300. // uni.navigateTo({
  301. // url: 'plugin://issuer-plugin/signGetAuth'
  302. // })
  303. // }, 3000)
  304. getInfo();
  305. })
  306. onShow (() => {
  307. // 订单查询
  308. if (userStore.isNewLogin && hasLogin()) {
  309. console.log("订单长训=========")
  310. userStore.setIsNewLogin(false)
  311. query()
  312. }
  313. })
  314. const cancle = (val) => {
  315. state.showTips = val
  316. }
  317. onMounted(() => {
  318. const query = uni.createSelectorQuery().in(instance.proxy);
  319. query
  320. .select(".news-con")
  321. .boundingClientRect((data) => {
  322. console.log("得到布局位置信息", data);
  323. if (data) {
  324. console.log("节点离页面顶部的距离为" + data.top);
  325. newTop.value = data.top
  326. }
  327. })
  328. .exec();
  329. let systemInfo = uni.getSystemInfoSync()
  330. viewHeight.value = systemInfo.windowHeight
  331. statusBarHeight.value = systemInfo.statusBarHeight;
  332. const {
  333. top,
  334. height
  335. } = uni.getMenuButtonBoundingClientRect();
  336. barHeight.value = height ? height + (top - statusBarHeight.value) * 2 : 38;
  337. console.log(barHeight.value, statusBarHeight.value, systemInfo, '计算的顶部高度');
  338. getSwiper()
  339. })
  340. const statusBarHeight = ref(0)
  341. const viewHeight = ref(0) //可视区高度
  342. const barHeight = ref(0)
  343. const searchParams = ref('')
  344. const newTop = ref(0) //高速快讯距离顶部距离
  345. const isShowMask = ref(false);
  346. //搜索
  347. const onKeyInput = (event) => {
  348. searchParams.value = event.target.value;
  349. console.log('搜索内容', searchParams.value);
  350. }
  351. const navList = [{
  352. imgUrl: `${fileURL}image/newHome/kaqian.png`,
  353. title: "卡签信息查询",
  354. path: '/pages/bluetooth/bluetooth?routeType=4&&backIndex=1'
  355. }, {
  356. imgUrl: `${fileURL}image/newHome/jihuo.png`,
  357. title: "激活服务",
  358. path: '/subpackage/personal-center/etc-activation'
  359. },
  360. // {
  361. // imgUrl: `${fileURL}image/newHome/zhuxiao.png`,
  362. // title: "设备注销",
  363. // path: "",
  364. // handlePath: () => {
  365. // cardRecharge(3)
  366. // }
  367. // }, {
  368. // imgUrl: `${fileURL}image/newHome/shenji.png`,
  369. // title: "设备升级",
  370. // path: `/subpackage/after-sale/equipment-upgrade/select-car`
  371. // }, {
  372. // imgUrl: `${fileURL}image/newHome/kefu.png`,
  373. // title: "在线客服",
  374. // path: `/subpackage/after-sale/onlineService`
  375. // }, {
  376. // imgUrl: `${fileURL}image/newHome/wangdian.png`,
  377. // title: "网点查询",
  378. // path: "/subpackage/after-sale/wangdian"
  379. // }, {
  380. // imgUrl: `${fileURL}image/newHome/yewu.png`,
  381. // title: "业务指引",
  382. // path: ""
  383. // },
  384. {
  385. imgUrl: `${fileURL}image/newHome/more.png`,
  386. title: "更多",
  387. path: `/pages/service/service`
  388. }]
  389. const handleNav = (item) => {
  390. console.log("item", item)
  391. if (item.title == '更多') {
  392. if (!hasLogin()) {
  393. confirm('您需要登录过后才能使用此功能', () => {
  394. uni.navigateTo({
  395. url: '/login/login',
  396. });
  397. }, '温馨提示', true, '去登录');
  398. } else {
  399. uni.switchTab({
  400. url: item.path
  401. })
  402. }
  403. } else {
  404. console.log("进来了")
  405. if (item.title == '设备注销' || item.title == '设备升级') {
  406. // 跳转到运维
  407. jumpOldMini()
  408. return;
  409. }
  410. if (item.title == '业务指引') {
  411. state.showTips = true
  412. return;
  413. }
  414. if (item.path) {
  415. navTo(item.path, true)
  416. } else if (item.handlePath) {
  417. item.handlePath()
  418. }
  419. }
  420. }
  421. const cardRecharge = (val) => {
  422. // #ifdef MP-ALIPAY
  423. if (val == 1 || val == 2 || val == 3) {
  424. msg("业务升级中,请前往九州ETC公众号进行办理。或拨打客服电话400-800-8787")
  425. }
  426. // #endif
  427. // #ifdef MP-WEIXIN
  428. if (val == 1) {
  429. navTo('/pages/recharge/recharge-pay', true)
  430. } else if (val == 2) {
  431. navTo('/subpackage/after-sale/rescind-carId/rescind-carId-select', true)
  432. } else if (val == 3) {
  433. navTo('/subpackage/after-sale/activation-once-again/select-car?type=2', true)
  434. }
  435. // #endif
  436. }
  437. // 页面初次渲染完成时触发
  438. onReady(() => {
  439. quanKeyAction()
  440. })
  441. onMounted(() => {
  442. uni.getSystemInfo({
  443. success: (e : any) => {
  444. statusBarHeight.value = e.statusBarHeight;
  445. }
  446. })
  447. getSwiper()
  448. });
  449. onReachBottom(() => {
  450. highMsg(); //高速快讯
  451. })
  452. // const tip = () => {
  453. // const params = encodeURIComponent(JSON.stringify("https://webzeus.hltgz.com/throughBilManager/index"))
  454. // tools.toUrl(`/subpackage/personal-center/webview?url=` + params);
  455. // }
  456. //办理流程tab选择
  457. const flowPathTabHandle = (tab) => {
  458. state.tabActive = tab;
  459. if (tab == "办理条件") {
  460. processeCondition();//办理条件
  461. } else if (tab == "常见问题") {
  462. commonQuestion();
  463. }
  464. };
  465. const showMask = (val : any) => {
  466. if (val == 2) {
  467. state.showTips = true
  468. return;
  469. }
  470. state.vanType = val; //1 客车 2货车
  471. isShowMask.value = true;
  472. };
  473. const closeMask = () => {
  474. isShowMask.value = false;
  475. };
  476. // 获取文本信息----用户协议
  477. const getInfo = () => {
  478. //参数说明
  479. let options = {
  480. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  481. data: {
  482. businessType: 'BROADCAST' //广播栏信息
  483. }, //请求参数
  484. method: "POST", //提交方式(默认POST)
  485. showLoading: true, //是否显示加载中(默认显示)
  486. };
  487. //调用方式
  488. requestNew(infoQuery, options)
  489. .then((res) => {
  490. let data = res
  491. state.notice=data.list[0].text
  492. console.log(data, state.notice, '公告',state.notice=='无');
  493. })
  494. .catch((err) => {
  495. console.log(err, '错误');
  496. });
  497. }
  498. let newLock = false
  499. // 高速快讯查询接口
  500. const highMsg = () => {
  501. newLock = true
  502. let options = {
  503. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  504. data: {
  505. pageNo: 1,
  506. pageSize: 2
  507. }, //请求参数
  508. method: "POST", //提交方式(默认POST)
  509. showLoading: true, //是否显示加载中(默认显示)
  510. };
  511. //调用方式
  512. // requestNew(queryHighMsg, options).then((res) => {
  513. // console.log("高速快讯查询接口", res);
  514. // state.highMsgData = res.result.slice(0, 4)
  515. // for (var i = 0; i < state.highMsgData.length; i++) {
  516. // state.highMsgData[i]["copywriting"] = getCodeName('COPYWRITING', state.highMsgData[i]["copywriting"])
  517. // state.highMsgData[i]["updateTime"] = state.highMsgData[i]["updateTime"].replace('T', ' ')
  518. // if (state.highMsgData[i]["type"] == 3) {
  519. // state.highMsgData[i]["title"] = state.highMsgData[i]["hyperLink"]
  520. // }
  521. // }
  522. // state.highMsgData.sort(function (a, b) {
  523. // return a.sequence - b.sequence//正序
  524. // })
  525. // }).catch((err) => { console.log(err) });
  526. }
  527. const processeCondition = () => {
  528. let options = {
  529. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  530. data: {
  531. businessType: 'PROCESSING_CONDITIONS' //办理条件
  532. }, //请求参数
  533. method: "POST", //提交方式(默认POST)
  534. showLoading: true, //是否显示加载中(默认显示)
  535. };
  536. //调用方式
  537. requestNew(infoQuery, options)
  538. .then((res) => {
  539. let data = res
  540. console.log("办理条件", data)
  541. state.processeConditionText = data.list[0].text.split('。').filter(item => item)
  542. })
  543. .catch((err) => {
  544. console.log(err);
  545. });
  546. }
  547. const commonQuestion = () => {
  548. let options = {
  549. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  550. data: {
  551. businessType: 'COMMON_PROBLEM' //常见问题
  552. }, //请求参数
  553. method: "POST", //提交方式(默认POST)
  554. showLoading: true, //是否显示加载中(默认显示)
  555. };
  556. //调用方式
  557. requestNew(infoQuery, options)
  558. .then((res) => {
  559. let data = res
  560. console.log("常见问题", data)
  561. state.commonQuestionText = data.list[0].text
  562. state.commonQuestionArr = data.list[0].text.split('。').filter(item => item)
  563. })
  564. .catch((err) => {
  565. console.log(err);
  566. });
  567. }
  568. //监听页面滚动
  569. onPageScroll((e) => {
  570. let h = viewHeight.value + e.scrollTop
  571. if (h >= newTop.value - 50 && !newLock) {
  572. highMsg()
  573. }
  574. });
  575. const toCreatOrder = (val : number) => {
  576. console.log(typeof (val));
  577. state.userType = val;
  578. navTo(`/subpackage/orders/choice-product?vanType=${state.vanType}&&userType=${state.userType}`)
  579. closeMask();
  580. };
  581. //全量枚举值查询
  582. const quanKeyAction = () => {
  583. var data = {};
  584. const options = {
  585. type: 2,
  586. data: data,
  587. method: "POST",
  588. };
  589. requestNew(queryKey, options).then((res) => {
  590. const data = res
  591. console.log("枚举", data)
  592. setItem('key', data)
  593. })
  594. .catch((err) => {
  595. console.log(err);
  596. });
  597. }
  598. //获取轮播
  599. const getSwiper = () => {
  600. let options = {
  601. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  602. data: {
  603. }, //请求参数
  604. method: "POST", //提交方式(默认POST)
  605. showLoading: true, //是否显示加载中(默认显示)
  606. };
  607. //调用方式
  608. requestNew(querySwiper, options).then((res) => {
  609. const data = res
  610. console.log("轮播图", data)
  611. state.swiperList = data.list ? data.list : [],
  612. state.swiperListArr = state.swiperList.map(item => fileURLList + item.imgUrl)
  613. })
  614. .catch((err) => {
  615. console.log(err);
  616. });
  617. };
  618. const link = (item : any) => {
  619. console.log(item);
  620. if (item.type == 1) {
  621. const params = encodeURIComponent(JSON.stringify(item.hyperLink))
  622. tools.toUrl(`/subpackage/personal-center/webview?url=` + params);
  623. } else if (item.type == 2) {
  624. navTo(item.hyperLink)
  625. } else if (item.type == 3) {
  626. const param = encodeURIComponent(JSON.stringify(item))
  627. tools.toUrl(`/subpackage/orders/moreHighMsg/textDetails?item=` + param);
  628. } else if (item.type == 4) {
  629. uni.navigateToMiniProgram({
  630. appId: item.hyperLink,
  631. path: item.speedUrl,
  632. success(res) {
  633. console.log(res);
  634. },
  635. complete(res) {
  636. console.log(res);
  637. },
  638. fail(res) {
  639. console.log(res);
  640. // 未成功跳转到车主小程序
  641. },
  642. });
  643. }
  644. }
  645. const call = () => {
  646. console.log("点击")
  647. uni.makePhoneCall({
  648. phoneNumber: '0851-88306555' //仅为示例,并非真实的电话号码
  649. })
  650. }
  651. </script>
  652. <style lang="scss" scoped>
  653. .container {
  654. height: 100%;
  655. background-color: #f2f5f7;
  656. position: relative;
  657. }
  658. .bg-img {
  659. width: 100%;
  660. position: absolute;
  661. z-index: 0;
  662. .icon {
  663. width: 100%;
  664. height: 750rpx;
  665. }
  666. }
  667. .content {
  668. position: relative;
  669. padding-bottom: 30rpx;
  670. }
  671. .header {
  672. height: 590rpx;
  673. .title {
  674. .title-txt {
  675. font-family: PingFangSC, PingFang SC;
  676. font-weight: bold;
  677. font-size: 32rpx;
  678. color: #FFFFFF;
  679. text-align: center;
  680. }
  681. }
  682. .search-box {
  683. margin: 10rpx 30rpx 0;
  684. position: relative;
  685. height: 80rpx;
  686. background: #1a394d;
  687. // border: 1px solid #DCDCDC;
  688. border-radius: 40rpx;
  689. display: flex;
  690. justify-content: center;
  691. align-items: center;
  692. box-sizing: border-box;
  693. flex: 1;
  694. .icon {
  695. width: 27rpx;
  696. height: 27rpx;
  697. margin-left: 26rpx;
  698. }
  699. .search {
  700. flex: 1;
  701. margin-right: 20rpx;
  702. height: 100%;
  703. padding: 0 10rpx;
  704. color: #fff;
  705. font-weight: 500;
  706. font-size: 26rpx;
  707. background: #1a394d;
  708. ::v-deep .input-placeholder {
  709. color: #fff !important;
  710. }
  711. }
  712. }
  713. }
  714. .nav {
  715. background-color: #fff;
  716. margin: 0 30rpx;
  717. width: 100%;
  718. width: 690rpx;
  719. height: 180rpx;//原高度360rox
  720. background: #FFFFFF;
  721. border-radius: 12rpx;
  722. display: grid;
  723. grid-template-columns: repeat(4, 25%);
  724. grid-template-rows: repeat(2, 50%);
  725. // grid-gap: 10px;
  726. .item-box {
  727. display: flex;
  728. align-items: center;
  729. justify-content: center;
  730. flex-direction: column;
  731. .icon-img {
  732. height: 100rpx;
  733. width: 100rpx;
  734. border-radius: 50%;
  735. padding: 25rpx;
  736. background: #ECF1F4;
  737. box-sizing: border-box;
  738. margin-top: 40px;//临时样式,
  739. .img {
  740. width: 100%;
  741. height: 100%;
  742. }
  743. }
  744. .b-txt {
  745. margin-top: 16rpx;
  746. font-size: 26rpx;
  747. color: #111111;
  748. }
  749. }
  750. }
  751. .notice {
  752. background-image: var(--bgimg);
  753. background-size: 100% 100%;
  754. background-repeat: no-repeat;
  755. height: 80rpx;
  756. width: 690rpx;
  757. margin: 24rpx 30rpx 0;
  758. display: flex;
  759. align-items: center;
  760. .l-img {
  761. width: 136rpx;
  762. height: 80rpx;
  763. margin-left: 20rpx;
  764. .img {
  765. height: 100%;
  766. width: 100%;
  767. }
  768. }
  769. .r-info {
  770. line-height: 80rpx;
  771. margin-left: 16rpx;
  772. font-size: 27rpx;
  773. color: #000;
  774. font-weight: 500;
  775. width: 400rpx;
  776. }
  777. }
  778. .supervision-con {
  779. box-sizing: border-box;
  780. height: 180rpx;
  781. width: 690rpx;
  782. margin: 24rpx 30rpx 0;
  783. border-radius: 12rpx;
  784. overflow: hidden;
  785. .swiper {
  786. height: 180rpx;
  787. width: 690rpx;
  788. }
  789. .swiper-item .img {
  790. overflow: hidden;
  791. border-radius: 12rpx;
  792. height: 180rpx !important;
  793. width: 690rpx;
  794. }
  795. .txt {
  796. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  797. font-weight: 400;
  798. font-size: 26rpx;
  799. color: #111111;
  800. }
  801. .phone {
  802. margin: 10rpx 0 10rpx;
  803. font-family: Arial, Arial;
  804. font-weight: normal;
  805. font-size: 38rpx;
  806. color: #B99A46;
  807. }
  808. .btn {
  809. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  810. font-weight: 400;
  811. font-size: 24rpx;
  812. color: #01243A;
  813. }
  814. }
  815. .title-name {
  816. margin: 24rpx 30rpx 0;
  817. }
  818. .title-h {
  819. font-family: PingFangSC, PingFang SC;
  820. font-weight: bold;
  821. font-size: 34rpx;
  822. color: #01243A;
  823. }
  824. .express-lane {
  825. margin: 22rpx 30rpx 0;
  826. display: flex;
  827. align-items: center;
  828. justify-content: space-between;
  829. .item {
  830. background-size: 100% 100%;
  831. background-repeat: no-repeat;
  832. width: 334rpx;
  833. height: 168rpx;
  834. text-align: right;
  835. display: flex;
  836. align-items: flex-end;
  837. justify-content: center;
  838. flex-direction: column;
  839. background-image: var(--bgimg);
  840. .item-con {
  841. margin-right: 53rpx;
  842. }
  843. .top-txt {
  844. font-family: PingFangSC, PingFang SC;
  845. font-size: 30rpx;
  846. color: #FFFFFF;
  847. }
  848. .btn {
  849. margin-top: 30rpx;
  850. background: #03385D;
  851. border-radius: 20rpx;
  852. font-family: PingFangSC, PingFang SC;
  853. font-size: 24rpx;
  854. color: #FFFFFF;
  855. height: 40rpx;
  856. width: 80rpx;
  857. line-height: 40rpx;
  858. text-align: center;
  859. }
  860. }
  861. .keche {
  862. .btn {
  863. background-color: #03385D;
  864. }
  865. }
  866. .huoche {
  867. margin-left: 22rpx;
  868. .btn {
  869. background-color: #C2A75F;
  870. }
  871. }
  872. }
  873. .news-con {
  874. margin: 39rpx 30rpx 0;
  875. .title-con {
  876. display: flex;
  877. align-items: center;
  878. justify-content: space-between;
  879. .r-more {
  880. width: 100rpx;
  881. height: 44rpx;
  882. border-radius: 22rpx;
  883. border: 1rpx solid #01243A;
  884. display: flex;
  885. align-items: center;
  886. justify-content: center;
  887. .txt {
  888. font-family: PingFangSC, PingFang SC;
  889. font-weight: bold;
  890. font-size: 24rpx;
  891. color: #01243A;
  892. }
  893. .icon {
  894. width: 10rpx;
  895. height: 100%;
  896. margin-left: 5rpx;
  897. }
  898. }
  899. }
  900. .empty-news {}
  901. .news-box {
  902. border-radius: 12rpx;
  903. background-color: #fff;
  904. margin-top: 22rpx;
  905. padding: 0 20rpx;
  906. .news-item {
  907. padding: 20rpx 0;
  908. display: flex;
  909. &:nth-child(n+2) {
  910. border-top: 1rpx solid #eee;
  911. }
  912. .l-img {
  913. width: 180rpx;
  914. height: 135rpx;
  915. .img {
  916. height: 100%;
  917. width: 100%;
  918. }
  919. }
  920. .r-txt {
  921. margin-left: 20rpx;
  922. display: flex;
  923. flex-direction: column;
  924. justify-content: space-between;
  925. .tit {
  926. font-family: PingFangSC, PingFang SC;
  927. font-weight: bold;
  928. font-size: 30rpx;
  929. color: #111111;
  930. }
  931. .b-time {
  932. font-family: PingFangSC, PingFang SC;
  933. font-size: 24rpx;
  934. color: #999999;
  935. }
  936. }
  937. }
  938. }
  939. }
  940. .flow-path {
  941. margin: 31rpx 30rpx 0;
  942. .top-menu {
  943. display: flex;
  944. .tab {
  945. font-family: MicrosoftYaHeiUI;
  946. font-size: 28rpx;
  947. color: #5A5E61;
  948. margin-right: 39rpx;
  949. position: relative;
  950. &.active {
  951. font-size: 34rpx;
  952. color: #01243A;
  953. .border {
  954. position: relative;
  955. }
  956. .border::after {
  957. content: "";
  958. background-image: var(--bgimg);
  959. background-repeat: no-repeat;
  960. background-size: 100% 100%;
  961. position: absolute;
  962. bottom: 0;
  963. left: 0;
  964. width: 100%;
  965. height: 16rpx;
  966. }
  967. }
  968. .txt {
  969. position: relative;
  970. z-index: 2;
  971. }
  972. }
  973. }
  974. .flow-list {
  975. margin-top: 30rpx;
  976. background-color: #fff;
  977. border-radius: 12rpx;
  978. padding: 20rpx;
  979. }
  980. .tiaojian {
  981. .title-top {
  982. display: flex;
  983. justify-content: center;
  984. align-items: center;
  985. padding-bottom: 20rpx;
  986. .txt {
  987. margin: 0 24rpx;
  988. font-family: MicrosoftYaHei;
  989. font-size: 30rpx;
  990. color: #01243A;
  991. }
  992. .icon-img {
  993. width: 16rpx;
  994. height: 20rpx;
  995. }
  996. }
  997. .item {
  998. font-size: 26rpx;
  999. color: #222222;
  1000. display: flex;
  1001. margin-bottom: 16rpx;
  1002. font-family: MicrosoftYaHeiUI;
  1003. .tu {
  1004. background-image: var(--bgimg);
  1005. background-size: 100% 100%;
  1006. background-repeat: no-repeat;
  1007. height: 44rpx;
  1008. width: 44rpx;
  1009. display: flex;
  1010. align-items: center;
  1011. text-align: center;
  1012. color: white;
  1013. justify-content: center;
  1014. margin-right: 10rpx;
  1015. flex-shrink: 0;
  1016. font-size: 22rpx;
  1017. }
  1018. }
  1019. }
  1020. .list-info {
  1021. font-family: MicrosoftYaHeiUI;
  1022. font-size: 26rpx;
  1023. color: #222222;
  1024. }
  1025. .wenti {
  1026. .item-box:nth-child(n+2) {
  1027. border-top: 1rpx solid #E8E8E8;
  1028. }
  1029. .item-box {
  1030. display: flex;
  1031. padding: 15rpx 0;
  1032. }
  1033. .l-icon {
  1034. flex-shrink: 0;
  1035. width: 38rpx;
  1036. height: 38rpx;
  1037. display: flex;
  1038. align-items: center;
  1039. justify-content: center;
  1040. background-color: #c2a75f;
  1041. border-radius: 50%;
  1042. .icon-img {
  1043. width: 14rpx;
  1044. height: 24rpx;
  1045. }
  1046. }
  1047. .txt {
  1048. margin-left: 14rpx;
  1049. font-family: PingFangSC, PingFang SC;
  1050. font-size: 28rpx;
  1051. color: #222222;
  1052. line-height: 38rpx;
  1053. }
  1054. }
  1055. }
  1056. .mask {
  1057. background: $uni-bg-color-mask;
  1058. position: fixed;
  1059. left: 0;
  1060. top: 0;
  1061. right: 0;
  1062. bottom: 0;
  1063. z-index: 999;
  1064. }
  1065. .mask-content {
  1066. background: #fff;
  1067. width: 570rpx;
  1068. position: absolute;
  1069. left: 50%;
  1070. top: 50%;
  1071. transform: translate(-50%, -50%);
  1072. display: flex;
  1073. flex-direction: column;
  1074. border-radius: 20rpx;
  1075. z-index: 999;
  1076. }
  1077. .mask-close {
  1078. text-align: right;
  1079. }
  1080. .mask-title {
  1081. text-align: center;
  1082. margin-bottom: 50rpx;
  1083. font-family: MicrosoftYaHei;
  1084. font-size: 34rpx;
  1085. color: #666666;
  1086. }
  1087. .mask-tab {
  1088. // display: flex;
  1089. // justify-content: space-evenly;
  1090. margin: 0 40rpx;
  1091. }
  1092. .icon-closed {
  1093. width: 30rpx;
  1094. height: 30rpx;
  1095. margin: 24rpx 24rpx 0 0;
  1096. }
  1097. .tab-item {
  1098. padding: 20rpx 25rpx;
  1099. display: flex;
  1100. align-items: center;
  1101. background: #F7F7F7;
  1102. border-radius: 15rpx;
  1103. margin-bottom: 30rpx;
  1104. }
  1105. .r-info {
  1106. margin-left: 25rpx;
  1107. .tab-tit {
  1108. font-family: MicrosoftYaHei;
  1109. font-size: 28rpx;
  1110. color: #333333;
  1111. }
  1112. .tab-desc {
  1113. font-family: MicrosoftYaHei;
  1114. font-size: 24rpx;
  1115. color: #999999;
  1116. margin-top: 10rpx;
  1117. }
  1118. }
  1119. .tab-item .img {
  1120. width: 120rpx;
  1121. height: 120rpx;
  1122. }
  1123. .backlog-notice {
  1124. margin: 50rpx 30rpx 0rpx;
  1125. }
  1126. </style>