選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

index.vue 28KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241
  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 { 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. })
  440. onMounted(() => {
  441. uni.getSystemInfo({
  442. success: (e : any) => {
  443. statusBarHeight.value = e.statusBarHeight;
  444. }
  445. })
  446. getSwiper()
  447. });
  448. onReachBottom(() => {
  449. highMsg(); //高速快讯
  450. })
  451. // const tip = () => {
  452. // const params = encodeURIComponent(JSON.stringify("https://webzeus.hltgz.com/throughBilManager/index"))
  453. // tools.toUrl(`/subpackage/personal-center/webview?url=` + params);
  454. // }
  455. //办理流程tab选择
  456. const flowPathTabHandle = (tab) => {
  457. state.tabActive = tab;
  458. if (tab == "办理条件") {
  459. processeCondition();//办理条件
  460. } else if (tab == "常见问题") {
  461. commonQuestion();
  462. }
  463. };
  464. const showMask = (val : any) => {
  465. if (!hasLogin()) {
  466. confirm('您需要登录过后才能使用此功能', () => {
  467. uni.navigateTo({
  468. url: '/login/login',
  469. });
  470. }, '温馨提示', true, '去登录');
  471. } else {
  472. if (val == 2) {
  473. state.showTips = true
  474. return;
  475. }
  476. state.vanType = val; //1 客车 2货车
  477. isShowMask.value = true;
  478. }
  479. };
  480. const closeMask = () => {
  481. isShowMask.value = false;
  482. };
  483. // 获取文本信息----用户协议
  484. const getInfo = () => {
  485. //参数说明
  486. let options = {
  487. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  488. data: {
  489. businessType: 'BROADCAST' //广播栏信息
  490. }, //请求参数
  491. method: "POST", //提交方式(默认POST)
  492. showLoading: true, //是否显示加载中(默认显示)
  493. };
  494. //调用方式
  495. requestNew(infoQuery, options)
  496. .then((res) => {
  497. let data = res
  498. state.notice=data.list[0].text
  499. console.log(data, state.notice, '公告',state.notice=='无');
  500. })
  501. .catch((err) => {
  502. console.log(err, '错误');
  503. });
  504. }
  505. let newLock = false
  506. // 高速快讯查询接口
  507. const highMsg = () => {
  508. newLock = true
  509. let options = {
  510. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  511. data: {
  512. pageNo: 1,
  513. pageSize: 2
  514. }, //请求参数
  515. method: "POST", //提交方式(默认POST)
  516. showLoading: true, //是否显示加载中(默认显示)
  517. };
  518. //调用方式
  519. // requestNew(queryHighMsg, options).then((res) => {
  520. // console.log("高速快讯查询接口", res);
  521. // state.highMsgData = res.result.slice(0, 4)
  522. // for (var i = 0; i < state.highMsgData.length; i++) {
  523. // state.highMsgData[i]["copywriting"] = getCodeName('COPYWRITING', state.highMsgData[i]["copywriting"])
  524. // state.highMsgData[i]["updateTime"] = state.highMsgData[i]["updateTime"].replace('T', ' ')
  525. // if (state.highMsgData[i]["type"] == 3) {
  526. // state.highMsgData[i]["title"] = state.highMsgData[i]["hyperLink"]
  527. // }
  528. // }
  529. // state.highMsgData.sort(function (a, b) {
  530. // return a.sequence - b.sequence//正序
  531. // })
  532. // }).catch((err) => { console.log(err) });
  533. }
  534. const processeCondition = () => {
  535. let options = {
  536. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  537. data: {
  538. businessType: 'PROCESSING_CONDITIONS' //办理条件
  539. }, //请求参数
  540. method: "POST", //提交方式(默认POST)
  541. showLoading: true, //是否显示加载中(默认显示)
  542. };
  543. //调用方式
  544. requestNew(infoQuery, options)
  545. .then((res) => {
  546. let data = res
  547. console.log("办理条件", data)
  548. state.processeConditionText = data.list[0].text.split('。').filter(item => item)
  549. })
  550. .catch((err) => {
  551. console.log(err);
  552. });
  553. }
  554. const commonQuestion = () => {
  555. let options = {
  556. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  557. data: {
  558. businessType: 'COMMON_PROBLEM' //常见问题
  559. }, //请求参数
  560. method: "POST", //提交方式(默认POST)
  561. showLoading: true, //是否显示加载中(默认显示)
  562. };
  563. //调用方式
  564. requestNew(infoQuery, options)
  565. .then((res) => {
  566. let data = res
  567. console.log("常见问题", data)
  568. state.commonQuestionText = data.list[0].text
  569. state.commonQuestionArr = data.list[0].text.split('。').filter(item => item)
  570. })
  571. .catch((err) => {
  572. console.log(err);
  573. });
  574. }
  575. //监听页面滚动
  576. onPageScroll((e) => {
  577. let h = viewHeight.value + e.scrollTop
  578. if (h >= newTop.value - 50 && !newLock) {
  579. highMsg()
  580. }
  581. });
  582. const toCreatOrder = (val : number) => {
  583. console.log(typeof (val));
  584. state.userType = val;
  585. navTo(`/subpackage/orders/choice-product?vanType=${state.vanType}&&userType=${state.userType}`)
  586. closeMask();
  587. };
  588. //获取轮播
  589. const getSwiper = () => {
  590. let options = {
  591. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  592. data: {
  593. }, //请求参数
  594. method: "POST", //提交方式(默认POST)
  595. showLoading: true, //是否显示加载中(默认显示)
  596. };
  597. //调用方式
  598. requestNew(querySwiper, options).then((res) => {
  599. const data = res
  600. console.log("轮播图", data)
  601. state.swiperList = data.list ? data.list : [],
  602. state.swiperListArr = state.swiperList.map(item => fileURLList + item.imgUrl)
  603. })
  604. .catch((err) => {
  605. console.log(err);
  606. });
  607. };
  608. const link = (item : any) => {
  609. console.log(item);
  610. if (item.type == 1) {
  611. const params = encodeURIComponent(JSON.stringify(item.hyperLink))
  612. tools.toUrl(`/subpackage/personal-center/webview?url=` + params);
  613. } else if (item.type == 2) {
  614. navTo(item.hyperLink)
  615. } else if (item.type == 3) {
  616. const param = encodeURIComponent(JSON.stringify(item))
  617. tools.toUrl(`/subpackage/orders/moreHighMsg/textDetails?item=` + param);
  618. } else if (item.type == 4) {
  619. uni.navigateToMiniProgram({
  620. appId: item.hyperLink,
  621. path: item.speedUrl,
  622. success(res) {
  623. console.log(res);
  624. },
  625. complete(res) {
  626. console.log(res);
  627. },
  628. fail(res) {
  629. console.log(res);
  630. // 未成功跳转到车主小程序
  631. },
  632. });
  633. }
  634. }
  635. const call = () => {
  636. console.log("点击")
  637. uni.makePhoneCall({
  638. phoneNumber: '0851-88306555' //仅为示例,并非真实的电话号码
  639. })
  640. }
  641. </script>
  642. <style lang="scss" scoped>
  643. .container {
  644. height: 100%;
  645. background-color: #f2f5f7;
  646. position: relative;
  647. }
  648. .bg-img {
  649. width: 100%;
  650. position: absolute;
  651. z-index: 0;
  652. .icon {
  653. width: 100%;
  654. height: 750rpx;
  655. }
  656. }
  657. .content {
  658. position: relative;
  659. padding-bottom: 30rpx;
  660. }
  661. .header {
  662. height: 590rpx;
  663. .title {
  664. .title-txt {
  665. font-family: PingFangSC, PingFang SC;
  666. font-weight: bold;
  667. font-size: 32rpx;
  668. color: #FFFFFF;
  669. text-align: center;
  670. }
  671. }
  672. .search-box {
  673. margin: 10rpx 30rpx 0;
  674. position: relative;
  675. height: 80rpx;
  676. background: #1a394d;
  677. // border: 1px solid #DCDCDC;
  678. border-radius: 40rpx;
  679. display: flex;
  680. justify-content: center;
  681. align-items: center;
  682. box-sizing: border-box;
  683. flex: 1;
  684. .icon {
  685. width: 27rpx;
  686. height: 27rpx;
  687. margin-left: 26rpx;
  688. }
  689. .search {
  690. flex: 1;
  691. margin-right: 20rpx;
  692. height: 100%;
  693. padding: 0 10rpx;
  694. color: #fff;
  695. font-weight: 500;
  696. font-size: 26rpx;
  697. background: #1a394d;
  698. ::v-deep .input-placeholder {
  699. color: #fff !important;
  700. }
  701. }
  702. }
  703. }
  704. .nav {
  705. background-color: #fff;
  706. margin: 0 30rpx;
  707. width: 100%;
  708. width: 690rpx;
  709. height: 180rpx;//原高度360rox
  710. background: #FFFFFF;
  711. border-radius: 12rpx;
  712. display: grid;
  713. grid-template-columns: repeat(4, 25%);
  714. grid-template-rows: repeat(2, 50%);
  715. // grid-gap: 10px;
  716. .item-box {
  717. display: flex;
  718. align-items: center;
  719. justify-content: center;
  720. flex-direction: column;
  721. .icon-img {
  722. height: 100rpx;
  723. width: 100rpx;
  724. border-radius: 50%;
  725. padding: 25rpx;
  726. background: #ECF1F4;
  727. box-sizing: border-box;
  728. margin-top: 40px;//临时样式,
  729. .img {
  730. width: 100%;
  731. height: 100%;
  732. }
  733. }
  734. .b-txt {
  735. margin-top: 16rpx;
  736. font-size: 26rpx;
  737. color: #111111;
  738. }
  739. }
  740. }
  741. .notice {
  742. background-image: var(--bgimg);
  743. background-size: 100% 100%;
  744. background-repeat: no-repeat;
  745. height: 80rpx;
  746. width: 690rpx;
  747. margin: 24rpx 30rpx 0;
  748. display: flex;
  749. align-items: center;
  750. .l-img {
  751. width: 136rpx;
  752. height: 80rpx;
  753. margin-left: 20rpx;
  754. .img {
  755. height: 100%;
  756. width: 100%;
  757. }
  758. }
  759. .r-info {
  760. line-height: 80rpx;
  761. margin-left: 16rpx;
  762. font-size: 27rpx;
  763. color: #000;
  764. font-weight: 500;
  765. width: 400rpx;
  766. }
  767. }
  768. .supervision-con {
  769. box-sizing: border-box;
  770. height: 180rpx;
  771. width: 690rpx;
  772. margin: 24rpx 30rpx 0;
  773. border-radius: 12rpx;
  774. overflow: hidden;
  775. .swiper {
  776. height: 180rpx;
  777. width: 690rpx;
  778. }
  779. .swiper-item .img {
  780. overflow: hidden;
  781. border-radius: 12rpx;
  782. height: 180rpx !important;
  783. width: 690rpx;
  784. }
  785. .txt {
  786. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  787. font-weight: 400;
  788. font-size: 26rpx;
  789. color: #111111;
  790. }
  791. .phone {
  792. margin: 10rpx 0 10rpx;
  793. font-family: Arial, Arial;
  794. font-weight: normal;
  795. font-size: 38rpx;
  796. color: #B99A46;
  797. }
  798. .btn {
  799. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  800. font-weight: 400;
  801. font-size: 24rpx;
  802. color: #01243A;
  803. }
  804. }
  805. .title-name {
  806. margin: 24rpx 30rpx 0;
  807. }
  808. .title-h {
  809. font-family: PingFangSC, PingFang SC;
  810. font-weight: bold;
  811. font-size: 34rpx;
  812. color: #01243A;
  813. }
  814. .express-lane {
  815. margin: 22rpx 30rpx 0;
  816. display: flex;
  817. align-items: center;
  818. justify-content: space-between;
  819. .item {
  820. background-size: 100% 100%;
  821. background-repeat: no-repeat;
  822. width: 334rpx;
  823. height: 168rpx;
  824. text-align: right;
  825. display: flex;
  826. align-items: flex-end;
  827. justify-content: center;
  828. flex-direction: column;
  829. background-image: var(--bgimg);
  830. .item-con {
  831. margin-right: 53rpx;
  832. }
  833. .top-txt {
  834. font-family: PingFangSC, PingFang SC;
  835. font-size: 30rpx;
  836. color: #FFFFFF;
  837. }
  838. .btn {
  839. margin-top: 30rpx;
  840. background: #03385D;
  841. border-radius: 20rpx;
  842. font-family: PingFangSC, PingFang SC;
  843. font-size: 24rpx;
  844. color: #FFFFFF;
  845. height: 40rpx;
  846. width: 80rpx;
  847. line-height: 40rpx;
  848. text-align: center;
  849. }
  850. }
  851. .keche {
  852. .btn {
  853. background-color: #03385D;
  854. }
  855. }
  856. .huoche {
  857. margin-left: 22rpx;
  858. .btn {
  859. background-color: #C2A75F;
  860. }
  861. }
  862. }
  863. .news-con {
  864. margin: 39rpx 30rpx 0;
  865. .title-con {
  866. display: flex;
  867. align-items: center;
  868. justify-content: space-between;
  869. .r-more {
  870. width: 100rpx;
  871. height: 44rpx;
  872. border-radius: 22rpx;
  873. border: 1rpx solid #01243A;
  874. display: flex;
  875. align-items: center;
  876. justify-content: center;
  877. .txt {
  878. font-family: PingFangSC, PingFang SC;
  879. font-weight: bold;
  880. font-size: 24rpx;
  881. color: #01243A;
  882. }
  883. .icon {
  884. width: 10rpx;
  885. height: 100%;
  886. margin-left: 5rpx;
  887. }
  888. }
  889. }
  890. .empty-news {}
  891. .news-box {
  892. border-radius: 12rpx;
  893. background-color: #fff;
  894. margin-top: 22rpx;
  895. padding: 0 20rpx;
  896. .news-item {
  897. padding: 20rpx 0;
  898. display: flex;
  899. &:nth-child(n+2) {
  900. border-top: 1rpx solid #eee;
  901. }
  902. .l-img {
  903. width: 180rpx;
  904. height: 135rpx;
  905. .img {
  906. height: 100%;
  907. width: 100%;
  908. }
  909. }
  910. .r-txt {
  911. margin-left: 20rpx;
  912. display: flex;
  913. flex-direction: column;
  914. justify-content: space-between;
  915. .tit {
  916. font-family: PingFangSC, PingFang SC;
  917. font-weight: bold;
  918. font-size: 30rpx;
  919. color: #111111;
  920. }
  921. .b-time {
  922. font-family: PingFangSC, PingFang SC;
  923. font-size: 24rpx;
  924. color: #999999;
  925. }
  926. }
  927. }
  928. }
  929. }
  930. .flow-path {
  931. margin: 31rpx 30rpx 0;
  932. .top-menu {
  933. display: flex;
  934. .tab {
  935. font-family: MicrosoftYaHeiUI;
  936. font-size: 28rpx;
  937. color: #5A5E61;
  938. margin-right: 39rpx;
  939. position: relative;
  940. &.active {
  941. font-size: 34rpx;
  942. color: #01243A;
  943. .border {
  944. position: relative;
  945. }
  946. .border::after {
  947. content: "";
  948. background-image: var(--bgimg);
  949. background-repeat: no-repeat;
  950. background-size: 100% 100%;
  951. position: absolute;
  952. bottom: 0;
  953. left: 0;
  954. width: 100%;
  955. height: 16rpx;
  956. }
  957. }
  958. .txt {
  959. position: relative;
  960. z-index: 2;
  961. }
  962. }
  963. }
  964. .flow-list {
  965. margin-top: 30rpx;
  966. background-color: #fff;
  967. border-radius: 12rpx;
  968. padding: 20rpx;
  969. }
  970. .tiaojian {
  971. .title-top {
  972. display: flex;
  973. justify-content: center;
  974. align-items: center;
  975. padding-bottom: 20rpx;
  976. .txt {
  977. margin: 0 24rpx;
  978. font-family: MicrosoftYaHei;
  979. font-size: 30rpx;
  980. color: #01243A;
  981. }
  982. .icon-img {
  983. width: 16rpx;
  984. height: 20rpx;
  985. }
  986. }
  987. .item {
  988. font-size: 26rpx;
  989. color: #222222;
  990. display: flex;
  991. margin-bottom: 16rpx;
  992. font-family: MicrosoftYaHeiUI;
  993. .tu {
  994. background-image: var(--bgimg);
  995. background-size: 100% 100%;
  996. background-repeat: no-repeat;
  997. height: 44rpx;
  998. width: 44rpx;
  999. display: flex;
  1000. align-items: center;
  1001. text-align: center;
  1002. color: white;
  1003. justify-content: center;
  1004. margin-right: 10rpx;
  1005. flex-shrink: 0;
  1006. font-size: 22rpx;
  1007. }
  1008. }
  1009. }
  1010. .list-info {
  1011. font-family: MicrosoftYaHeiUI;
  1012. font-size: 26rpx;
  1013. color: #222222;
  1014. }
  1015. .wenti {
  1016. .item-box:nth-child(n+2) {
  1017. border-top: 1rpx solid #E8E8E8;
  1018. }
  1019. .item-box {
  1020. display: flex;
  1021. padding: 15rpx 0;
  1022. }
  1023. .l-icon {
  1024. flex-shrink: 0;
  1025. width: 38rpx;
  1026. height: 38rpx;
  1027. display: flex;
  1028. align-items: center;
  1029. justify-content: center;
  1030. background-color: #c2a75f;
  1031. border-radius: 50%;
  1032. .icon-img {
  1033. width: 14rpx;
  1034. height: 24rpx;
  1035. }
  1036. }
  1037. .txt {
  1038. margin-left: 14rpx;
  1039. font-family: PingFangSC, PingFang SC;
  1040. font-size: 28rpx;
  1041. color: #222222;
  1042. line-height: 38rpx;
  1043. }
  1044. }
  1045. }
  1046. .mask {
  1047. background: $uni-bg-color-mask;
  1048. position: fixed;
  1049. left: 0;
  1050. top: 0;
  1051. right: 0;
  1052. bottom: 0;
  1053. z-index: 999;
  1054. }
  1055. .mask-content {
  1056. background: #fff;
  1057. width: 570rpx;
  1058. position: absolute;
  1059. left: 50%;
  1060. top: 50%;
  1061. transform: translate(-50%, -50%);
  1062. display: flex;
  1063. flex-direction: column;
  1064. border-radius: 20rpx;
  1065. z-index: 999;
  1066. }
  1067. .mask-close {
  1068. text-align: right;
  1069. }
  1070. .mask-title {
  1071. text-align: center;
  1072. margin-bottom: 50rpx;
  1073. font-family: MicrosoftYaHei;
  1074. font-size: 34rpx;
  1075. color: #666666;
  1076. }
  1077. .mask-tab {
  1078. // display: flex;
  1079. // justify-content: space-evenly;
  1080. margin: 0 40rpx;
  1081. }
  1082. .icon-closed {
  1083. width: 30rpx;
  1084. height: 30rpx;
  1085. margin: 24rpx 24rpx 0 0;
  1086. }
  1087. .tab-item {
  1088. padding: 20rpx 25rpx;
  1089. display: flex;
  1090. align-items: center;
  1091. background: #F7F7F7;
  1092. border-radius: 15rpx;
  1093. margin-bottom: 30rpx;
  1094. }
  1095. .r-info {
  1096. margin-left: 25rpx;
  1097. .tab-tit {
  1098. font-family: MicrosoftYaHei;
  1099. font-size: 28rpx;
  1100. color: #333333;
  1101. }
  1102. .tab-desc {
  1103. font-family: MicrosoftYaHei;
  1104. font-size: 24rpx;
  1105. color: #999999;
  1106. margin-top: 10rpx;
  1107. }
  1108. }
  1109. .tab-item .img {
  1110. width: 120rpx;
  1111. height: 120rpx;
  1112. }
  1113. .backlog-notice {
  1114. margin: 50rpx 30rpx 0rpx;
  1115. }
  1116. </style>