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

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
3 weeks ago
10 months ago
3 weeks ago
9 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
1 month ago
1 week ago
10 months ago
10 months ago
10 months ago
9 months ago
9 months ago
9 months ago
10 months ago
10 months ago
10 months ago
1 year ago
10 months ago
11 months ago
10 months ago
10 months ago
11 months ago
1 year ago
11 months ago
1 year ago
9 months ago
10 months ago
10 months ago
10 months ago
1 month ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
1 month ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
1 month ago
2 years ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
1 month ago
10 months ago
9 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
1 week ago
10 months ago
1 week ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
9 months ago
9 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245
  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. <tips :showTips="state.showTips" @cancle="cancle"></tips>
  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 tips from '@/components/tips/tips.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. getInfo();
  300. })
  301. onShow (() => {
  302. // 订单查询
  303. if (userStore.isNewLogin && hasLogin()) {
  304. console.log("订单长训=========")
  305. userStore.setIsNewLogin(false)
  306. query()
  307. }
  308. })
  309. const cancle = (val) => {
  310. state.showTips = val
  311. }
  312. onMounted(() => {
  313. const query = uni.createSelectorQuery().in(instance.proxy);
  314. query
  315. .select(".news-con")
  316. .boundingClientRect((data) => {
  317. console.log("得到布局位置信息", data);
  318. if (data) {
  319. console.log("节点离页面顶部的距离为" + data.top);
  320. newTop.value = data.top
  321. }
  322. })
  323. .exec();
  324. let systemInfo = uni.getSystemInfoSync()
  325. viewHeight.value = systemInfo.windowHeight
  326. statusBarHeight.value = systemInfo.statusBarHeight;
  327. const {
  328. top,
  329. height
  330. } = uni.getMenuButtonBoundingClientRect();
  331. barHeight.value = height ? height + (top - statusBarHeight.value) * 2 : 38;
  332. console.log(barHeight.value, statusBarHeight.value, systemInfo, '计算的顶部高度');
  333. getSwiper()
  334. })
  335. const statusBarHeight = ref(0)
  336. const viewHeight = ref(0) //可视区高度
  337. const barHeight = ref(0)
  338. const searchParams = ref('')
  339. const newTop = ref(0) //高速快讯距离顶部距离
  340. const isShowMask = ref(false);
  341. //搜索
  342. const onKeyInput = (event) => {
  343. searchParams.value = event.target.value;
  344. console.log('搜索内容', searchParams.value);
  345. }
  346. const navList = [{
  347. imgUrl: `${fileURL}image/newHome/kaqian.png`,
  348. title: "卡签信息查询",
  349. path: '/pages/bluetooth/bluetooth?routeType=4&&backIndex=1'
  350. }, {
  351. imgUrl: `${fileURL}image/newHome/jihuo.png`,
  352. title: "激活服务",
  353. path: '/subpackage/personal-center/etc-activation'
  354. },
  355. // {
  356. // imgUrl: `${fileURL}image/newHome/zhuxiao.png`,
  357. // title: "设备注销",
  358. // path: "",
  359. // handlePath: () => {
  360. // cardRecharge(3)
  361. // }
  362. // }, {
  363. // imgUrl: `${fileURL}image/newHome/shenji.png`,
  364. // title: "设备升级",
  365. // path: `/subpackage/after-sale/equipment-upgrade/select-car`
  366. // }, {
  367. // imgUrl: `${fileURL}image/newHome/kefu.png`,
  368. // title: "在线客服",
  369. // path: `/subpackage/after-sale/onlineService`
  370. // }, {
  371. // imgUrl: `${fileURL}image/newHome/wangdian.png`,
  372. // title: "网点查询",
  373. // path: "/subpackage/after-sale/wangdian"
  374. // }, {
  375. // imgUrl: `${fileURL}image/newHome/yewu.png`,
  376. // title: "业务指引",
  377. // path: ""
  378. // },
  379. {
  380. imgUrl: `${fileURL}image/newHome/more.png`,
  381. title: "更多",
  382. path: `/pages/service/service`
  383. }]
  384. const handleNav = (item) => {
  385. console.log("item", item)
  386. if (item.title == '更多') {
  387. if (!hasLogin()) {
  388. confirm('您需要登录过后才能使用此功能', () => {
  389. uni.navigateTo({
  390. url: '/login/login',
  391. });
  392. }, '温馨提示', true, '去登录');
  393. } else {
  394. uni.switchTab({
  395. url: item.path
  396. })
  397. }
  398. } else {
  399. console.log("进来了")
  400. if (item.title == '设备注销' || item.title == '设备升级') {
  401. // 跳转到运维
  402. jumpOldMini()
  403. return;
  404. }
  405. if (item.title == '业务指引') {
  406. state.showTips = true
  407. return;
  408. }
  409. if (item.path) {
  410. navTo(item.path, true)
  411. } else if (item.handlePath) {
  412. item.handlePath()
  413. }
  414. }
  415. }
  416. const cardRecharge = (val) => {
  417. // #ifdef MP-ALIPAY
  418. if (val == 1 || val == 2 || val == 3) {
  419. msg("业务升级中,请前往九州ETC公众号进行办理。或拨打客服电话400-800-8787")
  420. }
  421. // #endif
  422. // #ifdef MP-WEIXIN
  423. if (val == 1) {
  424. navTo('/pages/recharge/recharge-pay', true)
  425. } else if (val == 2) {
  426. navTo('/subpackage/after-sale/rescind-carId/rescind-carId-select', true)
  427. } else if (val == 3) {
  428. navTo('/subpackage/after-sale/activation-once-again/select-car?type=2', true)
  429. }
  430. // #endif
  431. }
  432. // 页面初次渲染完成时触发
  433. onReady(() => {
  434. quanKeyAction()
  435. })
  436. onMounted(() => {
  437. uni.getSystemInfo({
  438. success: (e : any) => {
  439. statusBarHeight.value = e.statusBarHeight;
  440. }
  441. })
  442. getSwiper()
  443. });
  444. onReachBottom(() => {
  445. highMsg(); //高速快讯
  446. })
  447. // const tip = () => {
  448. // const params = encodeURIComponent(JSON.stringify("https://webzeus.hltgz.com/throughBilManager/index"))
  449. // tools.toUrl(`/subpackage/personal-center/webview?url=` + params);
  450. // }
  451. //办理流程tab选择
  452. const flowPathTabHandle = (tab) => {
  453. state.tabActive = tab;
  454. if (tab == "办理条件") {
  455. processeCondition();//办理条件
  456. } else if (tab == "常见问题") {
  457. commonQuestion();
  458. }
  459. };
  460. const showMask = (val : any) => {
  461. if (val == 2) {
  462. state.showTips = true
  463. return;
  464. }
  465. state.vanType = val; //1 客车 2货车
  466. isShowMask.value = true;
  467. };
  468. const closeMask = () => {
  469. isShowMask.value = false;
  470. };
  471. // 获取文本信息----用户协议
  472. const getInfo = () => {
  473. //参数说明
  474. let options = {
  475. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  476. data: {
  477. businessType: 'BROADCAST' //广播栏信息
  478. }, //请求参数
  479. method: "POST", //提交方式(默认POST)
  480. showLoading: true, //是否显示加载中(默认显示)
  481. };
  482. //调用方式
  483. requestNew(infoQuery, options)
  484. .then((res) => {
  485. let data = res
  486. state.notice=data.list[0].text
  487. console.log(data, state.notice, '公告',state.notice=='无');
  488. })
  489. .catch((err) => {
  490. console.log(err, '错误');
  491. });
  492. }
  493. let newLock = false
  494. // 高速快讯查询接口
  495. const highMsg = () => {
  496. newLock = true
  497. let options = {
  498. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  499. data: {
  500. pageNo: 1,
  501. pageSize: 2
  502. }, //请求参数
  503. method: "POST", //提交方式(默认POST)
  504. showLoading: true, //是否显示加载中(默认显示)
  505. };
  506. //调用方式
  507. // requestNew(queryHighMsg, options).then((res) => {
  508. // console.log("高速快讯查询接口", res);
  509. // state.highMsgData = res.result.slice(0, 4)
  510. // for (var i = 0; i < state.highMsgData.length; i++) {
  511. // state.highMsgData[i]["copywriting"] = getCodeName('COPYWRITING', state.highMsgData[i]["copywriting"])
  512. // state.highMsgData[i]["updateTime"] = state.highMsgData[i]["updateTime"].replace('T', ' ')
  513. // if (state.highMsgData[i]["type"] == 3) {
  514. // state.highMsgData[i]["title"] = state.highMsgData[i]["hyperLink"]
  515. // }
  516. // }
  517. // state.highMsgData.sort(function (a, b) {
  518. // return a.sequence - b.sequence//正序
  519. // })
  520. // }).catch((err) => { console.log(err) });
  521. }
  522. const processeCondition = () => {
  523. let options = {
  524. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  525. data: {
  526. businessType: 'PROCESSING_CONDITIONS' //办理条件
  527. }, //请求参数
  528. method: "POST", //提交方式(默认POST)
  529. showLoading: true, //是否显示加载中(默认显示)
  530. };
  531. //调用方式
  532. requestNew(infoQuery, options)
  533. .then((res) => {
  534. let data = res
  535. console.log("办理条件", data)
  536. state.processeConditionText = data.list[0].text.split('。').filter(item => item)
  537. })
  538. .catch((err) => {
  539. console.log(err);
  540. });
  541. }
  542. const commonQuestion = () => {
  543. let options = {
  544. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  545. data: {
  546. businessType: 'COMMON_PROBLEM' //常见问题
  547. }, //请求参数
  548. method: "POST", //提交方式(默认POST)
  549. showLoading: true, //是否显示加载中(默认显示)
  550. };
  551. //调用方式
  552. requestNew(infoQuery, options)
  553. .then((res) => {
  554. let data = res
  555. console.log("常见问题", data)
  556. state.commonQuestionText = data.list[0].text
  557. state.commonQuestionArr = data.list[0].text.split('。').filter(item => item)
  558. })
  559. .catch((err) => {
  560. console.log(err);
  561. });
  562. }
  563. //监听页面滚动
  564. onPageScroll((e) => {
  565. let h = viewHeight.value + e.scrollTop
  566. if (h >= newTop.value - 50 && !newLock) {
  567. highMsg()
  568. }
  569. });
  570. const toCreatOrder = (val : number) => {
  571. console.log(typeof (val));
  572. state.userType = val;
  573. navTo(`/subpackage/orders/choice-product?vanType=${state.vanType}&&userType=${state.userType}`)
  574. closeMask();
  575. };
  576. //全量枚举值查询
  577. const quanKeyAction = () => {
  578. var data = {};
  579. const options = {
  580. type: 2,
  581. data: data,
  582. method: "POST",
  583. };
  584. requestNew(queryKey, options).then((res) => {
  585. const data = res
  586. console.log("枚举", data)
  587. setItem('key', data)
  588. })
  589. .catch((err) => {
  590. console.log(err);
  591. });
  592. }
  593. //获取轮播
  594. const getSwiper = () => {
  595. let options = {
  596. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  597. data: {
  598. }, //请求参数
  599. method: "POST", //提交方式(默认POST)
  600. showLoading: true, //是否显示加载中(默认显示)
  601. };
  602. //调用方式
  603. requestNew(querySwiper, options).then((res) => {
  604. const data = res
  605. console.log("轮播图", data)
  606. state.swiperList = data.list ? data.list : [],
  607. state.swiperListArr = state.swiperList.map(item => fileURLList + item.imgUrl)
  608. })
  609. .catch((err) => {
  610. console.log(err);
  611. });
  612. };
  613. const link = (item : any) => {
  614. console.log(item);
  615. if (item.type == 1) {
  616. const params = encodeURIComponent(JSON.stringify(item.hyperLink))
  617. tools.toUrl(`/subpackage/personal-center/webview?url=` + params);
  618. } else if (item.type == 2) {
  619. navTo(item.hyperLink)
  620. } else if (item.type == 3) {
  621. const param = encodeURIComponent(JSON.stringify(item))
  622. tools.toUrl(`/subpackage/orders/moreHighMsg/textDetails?item=` + param);
  623. } else if (item.type == 4) {
  624. uni.navigateToMiniProgram({
  625. appId: item.hyperLink,
  626. path: item.speedUrl,
  627. success(res) {
  628. console.log(res);
  629. },
  630. complete(res) {
  631. console.log(res);
  632. },
  633. fail(res) {
  634. console.log(res);
  635. // 未成功跳转到车主小程序
  636. },
  637. });
  638. }
  639. }
  640. const call = () => {
  641. console.log("点击")
  642. uni.makePhoneCall({
  643. phoneNumber: '0851-88306555' //仅为示例,并非真实的电话号码
  644. })
  645. }
  646. </script>
  647. <style lang="scss" scoped>
  648. .container {
  649. height: 100%;
  650. background-color: #f2f5f7;
  651. position: relative;
  652. }
  653. .bg-img {
  654. width: 100%;
  655. position: absolute;
  656. z-index: 0;
  657. .icon {
  658. width: 100%;
  659. height: 750rpx;
  660. }
  661. }
  662. .content {
  663. position: relative;
  664. padding-bottom: 30rpx;
  665. }
  666. .header {
  667. height: 590rpx;
  668. .title {
  669. .title-txt {
  670. font-family: PingFangSC, PingFang SC;
  671. font-weight: bold;
  672. font-size: 32rpx;
  673. color: #FFFFFF;
  674. text-align: center;
  675. }
  676. }
  677. .search-box {
  678. margin: 10rpx 30rpx 0;
  679. position: relative;
  680. height: 80rpx;
  681. background: #1a394d;
  682. // border: 1px solid #DCDCDC;
  683. border-radius: 40rpx;
  684. display: flex;
  685. justify-content: center;
  686. align-items: center;
  687. box-sizing: border-box;
  688. flex: 1;
  689. .icon {
  690. width: 27rpx;
  691. height: 27rpx;
  692. margin-left: 26rpx;
  693. }
  694. .search {
  695. flex: 1;
  696. margin-right: 20rpx;
  697. height: 100%;
  698. padding: 0 10rpx;
  699. color: #fff;
  700. font-weight: 500;
  701. font-size: 26rpx;
  702. background: #1a394d;
  703. ::v-deep .input-placeholder {
  704. color: #fff !important;
  705. }
  706. }
  707. }
  708. }
  709. .nav {
  710. background-color: #fff;
  711. margin: 0 30rpx;
  712. width: 100%;
  713. width: 690rpx;
  714. height: 180rpx;//原高度360rox
  715. background: #FFFFFF;
  716. border-radius: 12rpx;
  717. display: grid;
  718. grid-template-columns: repeat(4, 25%);
  719. grid-template-rows: repeat(2, 50%);
  720. // grid-gap: 10px;
  721. .item-box {
  722. display: flex;
  723. align-items: center;
  724. justify-content: center;
  725. flex-direction: column;
  726. .icon-img {
  727. height: 100rpx;
  728. width: 100rpx;
  729. border-radius: 50%;
  730. padding: 25rpx;
  731. background: #ECF1F4;
  732. box-sizing: border-box;
  733. margin-top: 40px;//临时样式,
  734. .img {
  735. width: 100%;
  736. height: 100%;
  737. }
  738. }
  739. .b-txt {
  740. margin-top: 16rpx;
  741. font-size: 26rpx;
  742. color: #111111;
  743. }
  744. }
  745. }
  746. .notice {
  747. background-image: var(--bgimg);
  748. background-size: 100% 100%;
  749. background-repeat: no-repeat;
  750. height: 80rpx;
  751. width: 690rpx;
  752. margin: 24rpx 30rpx 0;
  753. display: flex;
  754. align-items: center;
  755. .l-img {
  756. width: 136rpx;
  757. height: 80rpx;
  758. margin-left: 20rpx;
  759. .img {
  760. height: 100%;
  761. width: 100%;
  762. }
  763. }
  764. .r-info {
  765. line-height: 80rpx;
  766. margin-left: 16rpx;
  767. font-size: 27rpx;
  768. color: #000;
  769. font-weight: 500;
  770. width: 400rpx;
  771. }
  772. }
  773. .supervision-con {
  774. box-sizing: border-box;
  775. height: 180rpx;
  776. width: 690rpx;
  777. margin: 24rpx 30rpx 0;
  778. border-radius: 12rpx;
  779. overflow: hidden;
  780. .swiper {
  781. height: 180rpx;
  782. width: 690rpx;
  783. }
  784. .swiper-item .img {
  785. overflow: hidden;
  786. border-radius: 12rpx;
  787. height: 180rpx !important;
  788. width: 690rpx;
  789. }
  790. .txt {
  791. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  792. font-weight: 400;
  793. font-size: 26rpx;
  794. color: #111111;
  795. }
  796. .phone {
  797. margin: 10rpx 0 10rpx;
  798. font-family: Arial, Arial;
  799. font-weight: normal;
  800. font-size: 38rpx;
  801. color: #B99A46;
  802. }
  803. .btn {
  804. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  805. font-weight: 400;
  806. font-size: 24rpx;
  807. color: #01243A;
  808. }
  809. }
  810. .title-name {
  811. margin: 24rpx 30rpx 0;
  812. }
  813. .title-h {
  814. font-family: PingFangSC, PingFang SC;
  815. font-weight: bold;
  816. font-size: 34rpx;
  817. color: #01243A;
  818. }
  819. .express-lane {
  820. margin: 22rpx 30rpx 0;
  821. display: flex;
  822. align-items: center;
  823. justify-content: space-between;
  824. .item {
  825. background-size: 100% 100%;
  826. background-repeat: no-repeat;
  827. width: 334rpx;
  828. height: 168rpx;
  829. text-align: right;
  830. display: flex;
  831. align-items: flex-end;
  832. justify-content: center;
  833. flex-direction: column;
  834. background-image: var(--bgimg);
  835. .item-con {
  836. margin-right: 53rpx;
  837. }
  838. .top-txt {
  839. font-family: PingFangSC, PingFang SC;
  840. font-size: 30rpx;
  841. color: #FFFFFF;
  842. }
  843. .btn {
  844. margin-top: 30rpx;
  845. background: #03385D;
  846. border-radius: 20rpx;
  847. font-family: PingFangSC, PingFang SC;
  848. font-size: 24rpx;
  849. color: #FFFFFF;
  850. height: 40rpx;
  851. width: 80rpx;
  852. line-height: 40rpx;
  853. text-align: center;
  854. }
  855. }
  856. .keche {
  857. .btn {
  858. background-color: #03385D;
  859. }
  860. }
  861. .huoche {
  862. margin-left: 22rpx;
  863. .btn {
  864. background-color: #C2A75F;
  865. }
  866. }
  867. }
  868. .news-con {
  869. margin: 39rpx 30rpx 0;
  870. .title-con {
  871. display: flex;
  872. align-items: center;
  873. justify-content: space-between;
  874. .r-more {
  875. width: 100rpx;
  876. height: 44rpx;
  877. border-radius: 22rpx;
  878. border: 1rpx solid #01243A;
  879. display: flex;
  880. align-items: center;
  881. justify-content: center;
  882. .txt {
  883. font-family: PingFangSC, PingFang SC;
  884. font-weight: bold;
  885. font-size: 24rpx;
  886. color: #01243A;
  887. }
  888. .icon {
  889. width: 10rpx;
  890. height: 100%;
  891. margin-left: 5rpx;
  892. }
  893. }
  894. }
  895. .empty-news {}
  896. .news-box {
  897. border-radius: 12rpx;
  898. background-color: #fff;
  899. margin-top: 22rpx;
  900. padding: 0 20rpx;
  901. .news-item {
  902. padding: 20rpx 0;
  903. display: flex;
  904. &:nth-child(n+2) {
  905. border-top: 1rpx solid #eee;
  906. }
  907. .l-img {
  908. width: 180rpx;
  909. height: 135rpx;
  910. .img {
  911. height: 100%;
  912. width: 100%;
  913. }
  914. }
  915. .r-txt {
  916. margin-left: 20rpx;
  917. display: flex;
  918. flex-direction: column;
  919. justify-content: space-between;
  920. .tit {
  921. font-family: PingFangSC, PingFang SC;
  922. font-weight: bold;
  923. font-size: 30rpx;
  924. color: #111111;
  925. }
  926. .b-time {
  927. font-family: PingFangSC, PingFang SC;
  928. font-size: 24rpx;
  929. color: #999999;
  930. }
  931. }
  932. }
  933. }
  934. }
  935. .flow-path {
  936. margin: 31rpx 30rpx 0;
  937. .top-menu {
  938. display: flex;
  939. .tab {
  940. font-family: MicrosoftYaHeiUI;
  941. font-size: 28rpx;
  942. color: #5A5E61;
  943. margin-right: 39rpx;
  944. position: relative;
  945. &.active {
  946. font-size: 34rpx;
  947. color: #01243A;
  948. .border {
  949. position: relative;
  950. }
  951. .border::after {
  952. content: "";
  953. background-image: var(--bgimg);
  954. background-repeat: no-repeat;
  955. background-size: 100% 100%;
  956. position: absolute;
  957. bottom: 0;
  958. left: 0;
  959. width: 100%;
  960. height: 16rpx;
  961. }
  962. }
  963. .txt {
  964. position: relative;
  965. z-index: 2;
  966. }
  967. }
  968. }
  969. .flow-list {
  970. margin-top: 30rpx;
  971. background-color: #fff;
  972. border-radius: 12rpx;
  973. padding: 20rpx;
  974. }
  975. .tiaojian {
  976. .title-top {
  977. display: flex;
  978. justify-content: center;
  979. align-items: center;
  980. padding-bottom: 20rpx;
  981. .txt {
  982. margin: 0 24rpx;
  983. font-family: MicrosoftYaHei;
  984. font-size: 30rpx;
  985. color: #01243A;
  986. }
  987. .icon-img {
  988. width: 16rpx;
  989. height: 20rpx;
  990. }
  991. }
  992. .item {
  993. font-size: 26rpx;
  994. color: #222222;
  995. display: flex;
  996. margin-bottom: 16rpx;
  997. font-family: MicrosoftYaHeiUI;
  998. .tu {
  999. background-image: var(--bgimg);
  1000. background-size: 100% 100%;
  1001. background-repeat: no-repeat;
  1002. height: 44rpx;
  1003. width: 44rpx;
  1004. display: flex;
  1005. align-items: center;
  1006. text-align: center;
  1007. color: white;
  1008. justify-content: center;
  1009. margin-right: 10rpx;
  1010. flex-shrink: 0;
  1011. font-size: 22rpx;
  1012. }
  1013. }
  1014. }
  1015. .list-info {
  1016. font-family: MicrosoftYaHeiUI;
  1017. font-size: 26rpx;
  1018. color: #222222;
  1019. }
  1020. .wenti {
  1021. .item-box:nth-child(n+2) {
  1022. border-top: 1rpx solid #E8E8E8;
  1023. }
  1024. .item-box {
  1025. display: flex;
  1026. padding: 15rpx 0;
  1027. }
  1028. .l-icon {
  1029. flex-shrink: 0;
  1030. width: 38rpx;
  1031. height: 38rpx;
  1032. display: flex;
  1033. align-items: center;
  1034. justify-content: center;
  1035. background-color: #c2a75f;
  1036. border-radius: 50%;
  1037. .icon-img {
  1038. width: 14rpx;
  1039. height: 24rpx;
  1040. }
  1041. }
  1042. .txt {
  1043. margin-left: 14rpx;
  1044. font-family: PingFangSC, PingFang SC;
  1045. font-size: 28rpx;
  1046. color: #222222;
  1047. line-height: 38rpx;
  1048. }
  1049. }
  1050. }
  1051. .mask {
  1052. background: $uni-bg-color-mask;
  1053. position: fixed;
  1054. left: 0;
  1055. top: 0;
  1056. right: 0;
  1057. bottom: 0;
  1058. z-index: 999;
  1059. }
  1060. .mask-content {
  1061. background: #fff;
  1062. width: 570rpx;
  1063. position: absolute;
  1064. left: 50%;
  1065. top: 50%;
  1066. transform: translate(-50%, -50%);
  1067. display: flex;
  1068. flex-direction: column;
  1069. border-radius: 20rpx;
  1070. z-index: 999;
  1071. }
  1072. .mask-close {
  1073. text-align: right;
  1074. }
  1075. .mask-title {
  1076. text-align: center;
  1077. margin-bottom: 50rpx;
  1078. font-family: MicrosoftYaHei;
  1079. font-size: 34rpx;
  1080. color: #666666;
  1081. }
  1082. .mask-tab {
  1083. // display: flex;
  1084. // justify-content: space-evenly;
  1085. margin: 0 40rpx;
  1086. }
  1087. .icon-closed {
  1088. width: 30rpx;
  1089. height: 30rpx;
  1090. margin: 24rpx 24rpx 0 0;
  1091. }
  1092. .tab-item {
  1093. padding: 20rpx 25rpx;
  1094. display: flex;
  1095. align-items: center;
  1096. background: #F7F7F7;
  1097. border-radius: 15rpx;
  1098. margin-bottom: 30rpx;
  1099. }
  1100. .r-info {
  1101. margin-left: 25rpx;
  1102. .tab-tit {
  1103. font-family: MicrosoftYaHei;
  1104. font-size: 28rpx;
  1105. color: #333333;
  1106. }
  1107. .tab-desc {
  1108. font-family: MicrosoftYaHei;
  1109. font-size: 24rpx;
  1110. color: #999999;
  1111. margin-top: 10rpx;
  1112. }
  1113. }
  1114. .tab-item .img {
  1115. width: 120rpx;
  1116. height: 120rpx;
  1117. }
  1118. .backlog-notice {
  1119. margin: 50rpx 30rpx 0rpx;
  1120. }
  1121. </style>