index.vue 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618
  1. <template>
  2. <view>
  3. <zj-page-layout
  4. :hasFooter="false"
  5. :isScroll="true"
  6. :isLoading="isLoading"
  7. :refresherTriggered="refresherTriggered"
  8. @refresherrefresh="refresherrefresh"
  9. >
  10. <!-- <view style="color: #fff; background: red; height: 50px" @click="quzhifu">支付测试</view> -->
  11. <Loading v-if="isError || !isLogin" :type="3" :loadStatus="2" :showText="'加载失败,请下拉重新加载'" />
  12. <view class="all-container" v-else>
  13. <view class="noticebar-container" v-if="noticeContent">
  14. <u-notice-bar :text="noticeContent"></u-notice-bar>
  15. </view>
  16. <!-- 去除商城和服务业务 -->
  17. <!-- <view class="swiper-container" v-if="bannerList.length > 0">
  18. <u-swiper
  19. :list="bannerList"
  20. keyName="imgSrc"
  21. autoplay
  22. circular
  23. indicator
  24. indicatorMode="line"
  25. height="175"
  26. @click="clickBanner"
  27. ></u-swiper>
  28. </view>
  29. <view class="noticebar-container" v-if="noticeContent">
  30. <u-notice-bar :text="noticeContent"></u-notice-bar>
  31. </view>
  32. <block v-if="categoryList.length > 0">
  33. <view
  34. class="service-container card"
  35. v-for="(item, index) in categoryList.filter(o => o.sub.length > 0)"
  36. :key="index"
  37. >
  38. <view class="home-title">
  39. <view class="left">{{ item.name }}</view>
  40. <view class="right" @tap="toClassifyList(item.categoryId)">
  41. <text class="text">查看更多</text>
  42. <text class="iconfont icon-jinru"></text>
  43. </view>
  44. </view>
  45. <view class="list">
  46. <view
  47. class="item"
  48. v-for="(it, idx) in item.sub.slice(0, 4)"
  49. :key="idx"
  50. @tap="toGoodsList(item.categoryId, it.categoryId, it.name)"
  51. >
  52. <image :src="it.imgUrl" mode="aspectFill"></image>
  53. <text>{{ it.name }}</text>
  54. </view>
  55. </view>
  56. </view>
  57. </block> -->
  58. <!-- 自助服务 -->
  59. <!-- <view class="service-container card">
  60. <view class="home-title">
  61. <view class="left">自助服务</view>
  62. <view class="right" @tap="toWorkorder">
  63. <text class="text">我的服务单</text>
  64. <text class="iconfont icon-jinru"></text>
  65. </view>
  66. </view>
  67. <view class="list">
  68. <view class="item" v-for="(item, index) in serviceList" :key="index" @tap="toPage(item.url)">
  69. <image :src="item.icon" mode="aspectFill" v-if="item.icon"></image>
  70. <image
  71. :src="require(`@/static/images/home/service-icon${item.code}.png`)"
  72. mode="aspectFill"
  73. v-else-if="item.code"
  74. ></image>
  75. <text>{{ item.title }}</text>
  76. </view>
  77. <view class="item" v-if="userInfo.isShowLease" @tap="toPage('/packageHome/pages/service/tenancy')">
  78. <image :src="require(`@/static/images/home/service-icon5.png`)" mode="aspectFill"></image>
  79. <text>设备租赁</text>
  80. </view>
  81. </view>
  82. </view> -->
  83. <!-- 扫码活动 -->
  84. <view class="swiper2-container" v-if="codeActivityList.length > 0">
  85. <u-swiper
  86. :list="codeActivityList"
  87. keyName="banner"
  88. autoplay
  89. circular
  90. indicator
  91. indicatorMode="line"
  92. height="100"
  93. @click="toCodeActivityList"
  94. ></u-swiper>
  95. </view>
  96. <!-- 增值服务 -->
  97. <!-- <view class="other-container card" v-if="userInfo.moduleYb">
  98. <view class="home-title">
  99. <view class="left">增值服务</view>
  100. </view>
  101. <view class="list">
  102. <view
  103. class="item"
  104. v-for="(item, index) in addvalueList.filter(o => !o.root || (o.root && o.root.includes(userInfo.type)))"
  105. :key="index"
  106. @tap="item.fn ? toFn(item.fn) : toPage(item.url)"
  107. >
  108. <image :src="require(`@/static/images/home/other-icon${item.code}.png`)" mode=""></image>
  109. <text>{{ item.title }}</text>
  110. </view>
  111. </view>
  112. </view> -->
  113. <!-- 工程维保服务 -->
  114. <!-- <view
  115. class="other-container card"
  116. v-if="(isWorkerUser || isShowMaintenance) && userInfo.moduleWb && userInfo.mobile"
  117. >
  118. <view class="home-title">
  119. <view class="left">工程维保服务</view>
  120. </view>
  121. <view class="list">
  122. <view
  123. class="item"
  124. v-for="(item, index) in maintenanceList"
  125. :key="index"
  126. @tap="item.fn ? toFn(item.fn) : toPage(item.url)"
  127. >
  128. <image :src="require(`@/static/images/home/other-icon${item.code}.png`)" mode=""></image>
  129. <text>{{ item.title }}</text>
  130. </view>
  131. </view>
  132. </view> -->
  133. <!-- 二手商城 -->
  134. <!-- <view class="other-container card" v-if="(isServiceUser || isWorkerUser) && userInfo.moduleEs">
  135. <view class="home-title">
  136. <view class="left">二手商城</view>
  137. </view>
  138. <view class="list">
  139. <view
  140. class="item"
  141. v-for="(item, index) in recycleList.filter(
  142. o => !o.root || (o.root == 1 && userInfo.isEs) || (o.root == 2 && !userInfo.isEs)
  143. )"
  144. :key="index"
  145. @tap="item.fn ? toFn(item.fn) : toPage(item.url)"
  146. >
  147. <image :src="require(`@/static/images/home/other-icon${item.code}.png`)" mode=""></image>
  148. <text>{{ item.title }}</text>
  149. </view>
  150. </view>
  151. </view> -->
  152. <!-- 分享收益 -->
  153. <!-- <view class="share-container card" v-if="isServiceUser || isWorkerUser">
  154. <view class="home-title">
  155. <view class="left">分享收益</view>
  156. <view class="right" @tap="toPage(`/packageMine/pages/order/list?tab=`)">
  157. <text class="text">我的订单</text>
  158. <text class="iconfont icon-jinru"></text>
  159. </view>
  160. </view>
  161. <view class="list">
  162. <view class="item" @tap="toMall()">
  163. <image src="@/static/images/home/share-icon1.png"></image>
  164. <view class="text">分销商城</view>
  165. </view>
  166. <view class="item" @tap="toActivityList(5)">
  167. <image src="@/static/images/home/share-icon2.png"></image>
  168. <view class="text">活动专区</view>
  169. </view>
  170. </view>
  171. </view> -->
  172. <!-- 工单管理 -->
  173. <view class="order-container card">
  174. <view class="home-title">
  175. <view class="left">工单管理</view>
  176. </view>
  177. <view class="list">
  178. <view
  179. class="item"
  180. style="position: relative"
  181. v-for="(item, index) in orderList"
  182. :key="index"
  183. @tap="toPageaa(item.url, item.tab)"
  184. >
  185. <image :src="require(`@/static/images/home/order-icon${item.code}.png`)" mode=""></image>
  186. <text>{{ item.title }}</text>
  187. <text
  188. v-if="statusCount[['djd', 'fwz', '', 'ycd'][index]]"
  189. style="position: absolute; top: -10rpx; right: -10rpx"
  190. >{{ statusCount[['djd', 'fwz', '', 'ycd'][index]] }}</text
  191. >
  192. </view>
  193. </view>
  194. </view>
  195. <!-- 其他 -->
  196. <view class="other-container card">
  197. <view class="home-title">
  198. <view class="left">辅材</view>
  199. <view class="right" @tap="toPage(`/packageMaterial/pages/index?type=M`)">
  200. <text class="text">查看详细</text>
  201. <text class="iconfont icon-jinru"></text>
  202. </view>
  203. </view>
  204. <view class="list">
  205. <view
  206. class="item"
  207. style="position: relative"
  208. v-for="(item, index) in otherList"
  209. :key="index"
  210. @tap="toPage(item.url)"
  211. >
  212. <image :src="require(`@/static/images/home/other-icon${item.code}.png`)" mode=""></image>
  213. <text>{{ item.title }}</text>
  214. <text v-if="index == 1 && fucaidzf" style="position: absolute; top: 0rpx; right: 8rpx">{{
  215. fucaidzf
  216. }}</text>
  217. </view>
  218. </view>
  219. </view>
  220. <view class="other-container card">
  221. <view class="home-title">
  222. <view class="left">配件</view>
  223. <view class="right" @tap="toPage(`/packageMaterial/pages/index?type=P`)">
  224. <text class="text">查看详细</text>
  225. <text class="iconfont icon-jinru"></text>
  226. </view>
  227. </view>
  228. <view class="list">
  229. <view
  230. class="item"
  231. style="position: relative"
  232. v-for="(item, index) in otherList2"
  233. :key="index"
  234. @tap="toPage(item.url)"
  235. >
  236. <image :src="require(`@/static/images/home/other-icon${item.code}.png`)" mode=""></image>
  237. <text>{{ item.title }}</text>
  238. <text v-if="index == 1 && peijiandzf" style="position: absolute; top: 0rpx; right: 8rpx">{{
  239. peijiandzf
  240. }}</text>
  241. </view>
  242. </view>
  243. </view>
  244. <!-- 联系我们 -->
  245. <view class="contact-container card">
  246. <view class="home-title">
  247. <view class="left">联系我们</view>
  248. </view>
  249. <view class="list">
  250. <!-- <button open-type="contact" class="item bb">
  251. <image src="@/static/images/home/home-icon1.png"></image>
  252. <view class="title">在线客服</view>
  253. <text class="iconfont icon-jinru"></text>
  254. </button> -->
  255. <view class="item" :class="isShowContact1 ? '' : 'bb'" @tap="isShowContact1 = !isShowContact1">
  256. <image src="@/static/images/home/home-icon2.png"></image>
  257. <view class="title">服务网点</view>
  258. <text class="iconfont icon-jinru"></text>
  259. </view>
  260. <view class="wrap1" v-if="isShowContact1">
  261. <view class="it" v-for="(item, index) in websitList" :key="index">
  262. <view class="top">
  263. <view class="left">{{ item.name }} {{ item.websitPhone || '' }}</view>
  264. <view class="right" @tap="$callPhone(item.websitPhone)" v-if="item.websitPhone"
  265. ><text class="iconfont icon-call"></text
  266. ></view>
  267. </view>
  268. <view class="address">{{ item.address }}</view>
  269. </view>
  270. </view>
  271. <!-- <view class="item" @tap="isShowContact2 = !isShowContact2">
  272. <image src="@/static/images/home/home-icon3.png"></image>
  273. <view class="title">投诉热线</view>
  274. <text class="iconfont icon-jinru"></text>
  275. </view>
  276. <view class="wrap2" v-if="isShowContact2">
  277. <view class="left">投诉电话:{{ userInfo.companyWechatMobile || '暂无' }}</view>
  278. <view class="right" @tap="$callPhone(userInfo.companyWechatMobile)" v-if="userInfo.companyWechatMobile"
  279. ><text class="iconfont icon-call"></text
  280. ></view>
  281. </view> -->
  282. </view>
  283. </view>
  284. </view>
  285. </zj-page-layout>
  286. <!-- <view class="dialog-container" v-if="couponDialogImgUrl && isShowCouponDialog">
  287. <uni-transition ref="dialog" mode-class="zoom-in" :duration="500" :show="couponDialogImgUrl && isShowCouponDialog">
  288. <image class="image" :src="couponDialogImgUrl" mode="widthFix" @tap="handleCoupon()"></image>
  289. </uni-transition>
  290. <uni-transition ref="dialogBtn" mode-class="fade" :duration="500" :show="couponDialogImgUrl && isShowCouponDialog">
  291. <text class="iconfont icon-close2" @tap="closeDialog()"></text>
  292. </uni-transition>
  293. </view> -->
  294. <view class="top-tooltip" v-if="isShowTopTooltip">
  295. <view class="content">
  296. <view class="left">
  297. <view>点击<text class="iconfont icon-gengduo"></text>添加到我的小程序</view>
  298. <view>微信下拉使用更方便哟!</view>
  299. </view>
  300. <text class="iconfont icon-close2 close" @tap="isShowTopTooltip = false"></text>
  301. </view>
  302. <view class="arrow"></view>
  303. </view>
  304. <view class="bottom-tooltip" v-if="isShowBottomTooltip">
  305. <view class="left">
  306. <text class="iconfont icon-close2 close" @tap="isShowBottomTooltip = false"></text>
  307. <view class="text">关注公众号及时获取服务进度</view>
  308. </view>
  309. <view class="btn" @tap="toWxLink()">前往关注</view>
  310. </view>
  311. <!-- 保险过期提示弹窗 -->
  312. <insuranceDialog ref="insuranceDialog" :data="baoxiandangqianxianxitishi"> </insuranceDialog>
  313. </view>
  314. </template>
  315. <script>
  316. import { getNoticeNum, getOrderNum, selectionChange, mini_env } from '@/common/utils/util.js'
  317. import insuranceDialog from '@/components/insuranceDialog'
  318. export default {
  319. components: {
  320. insuranceDialog
  321. },
  322. data() {
  323. return {
  324. isLoading: true,
  325. refresherTriggered: false, // 下拉刷新状态
  326. userInfo: {},
  327. configInfo: {},
  328. scene: {
  329. // 页面参数(扫码进入小程序时产生)
  330. type: '',
  331. goodsId: '',
  332. orderId: '',
  333. serviceId: '',
  334. couponId: ''
  335. },
  336. isCouponDialog: false, // 是否显示过期优惠券弹窗
  337. isReceiveDialog: false,
  338. isSmsReceive: false,
  339. isShowTopTooltip: false,
  340. isShowBottomTooltip: false,
  341. noticeContent: '', // 公告内容
  342. categoryList: [],
  343. serviceList: [],
  344. baseServiceList: [
  345. // 自助服务列表
  346. { code: 3, title: '收费标准', url: `/packageHome/pages/service/chargeStandard` },
  347. { code: 4, title: '故障自查', url: `/packageHome/pages/service/troubleshoot` }
  348. ],
  349. addvalueList: [
  350. // 增值服务列表
  351. { code: 1, title: '延保服务', fn: 'toServiceIndex' },
  352. { code: 2, title: '我的延保', url: `/packageHome/pages/addvalue/orderList` },
  353. { code: 3, title: '服务记录', fn: `toServiceRecods` },
  354. { code: 3, title: '延保查询', url: `/packageHome/pages/addvalue/check`, root: ['WORKER'] }
  355. ],
  356. maintenanceList: [
  357. // 工程维保服务列表
  358. { code: 1, title: '创建维保单', fn: `toMaintenanceCreate` },
  359. { code: 2, title: '维保单记录', fn: `toMaintenanceRecods` },
  360. { code: 3, title: '费用申请单', url: `/packageHome/pages/maintenance/applyList` }
  361. ],
  362. recycleList: [
  363. { code: 1, title: '二手商城', url: `/packageHome/pages/recycle/index`, root: 0 },
  364. { code: 2, title: '已发布的', url: `/packageHome/pages/recycle/issue/list`, root: 1 },
  365. { code: 3, title: '我买到的', url: `/packageHome/pages/recycle/order/list`, root: 2 }
  366. ],
  367. orderList: [
  368. // 工单管理列表
  369. { code: 1, title: '待接单', url: `/packageWorkorder/pages/orderList?tab=DJD`, tab: 'DJD' },
  370. { code: 2, title: '服务中', url: `/packageWorkorder/pages/orderList?tab=FWZ`, tab: 'FWZ' },
  371. { code: 3, title: '已完成', url: `/packageWorkorder/pages/orderList?tab=YWG`, tab: 'YWG' },
  372. { code: 4, title: '异常单', url: `/packageWorkorder/pages/orderList?tab=YCD`, tab: 'YCD' }
  373. ],
  374. otherList: [
  375. // 其他列表
  376. { code: 1, title: '辅材管理', url: `/packageMaterial/pages/stock/index` },
  377. { code: 2, title: '辅材收款', url: `/packageMaterial/pages/sale/orderList?type=M&tabCurrent=1` }
  378. // { code: 2, title: '辅材收款', url: `/packageMaterial/pages/sale/index?type=M` }
  379. ],
  380. otherList2: [
  381. // 其他列表
  382. { code: 1, title: '配件管理', url: `/packageAttachment/pages/fittingsManagement/index` },
  383. { code: 2, title: '配件收款', url: `/packageMaterial/pages/newSale/orderList?type=P&tabCurrent=1` }
  384. // { code: 2, title: '配件收款', url: `/packageMaterial/pages/newSale/index?type=P` }
  385. ],
  386. bannerList: [], // 轮播图列表
  387. couponList: [], // 可领取优惠券列表
  388. codeActivityList: [],
  389. couponDialogImgUrl: '',
  390. isShowCouponDialog: true,
  391. isError: false,
  392. websitList: [],
  393. isShowContact1: false,
  394. isShowContact2: false,
  395. isShowMaintenance: false,
  396. baoxiandangqianxianxitishi: [],
  397. statusCount: {},
  398. peijiandzf: 0,
  399. fucaidzf: 0
  400. }
  401. },
  402. computed: {
  403. isLogin() {
  404. return this.$store.state.user.token ? true : false
  405. },
  406. isServiceUser() {
  407. // 是否业务员
  408. return this.userInfo && this.userInfo.type === 'SERVICE'
  409. },
  410. isWorkerUser() {
  411. // 是否师傅
  412. return this.userInfo && this.userInfo.type === 'WORKER'
  413. }
  414. },
  415. async onShow() {
  416. selectionChange()
  417. try {
  418. await this.$onLaunched
  419. this.configInfo = await this.$getConfigInfo()
  420. await this.getBannerList()
  421. this.getNoticebar()
  422. if (this.isLogin) {
  423. try {
  424. this.userInfo = await this.$getUserInfo()
  425. if (!this.userInfo.isGZSign && !this.userInfo.isFSSign) {
  426. this.isShowMaintenance = await this.checkMaintenance()
  427. this.getCategoryList()
  428. this.getServiceList()
  429. this.getCouponList()
  430. this.getWebsitList()
  431. this.getCodeActivityList()
  432. getNoticeNum()
  433. getOrderNum()
  434. } else {
  435. if (this.userInfo.isGZSign) {
  436. uni.showModal({
  437. title: '温馨提示',
  438. content: '您未签署确认书!',
  439. cancelText: '取消',
  440. confirmText: '去签署',
  441. success: res => {
  442. if (res.confirm) {
  443. this.navToPage('/pages/repairConfirmation?type=gz')
  444. }
  445. }
  446. })
  447. } else if (this.userInfo.isFSSign) {
  448. uni.showModal({
  449. title: '温馨提示',
  450. content: '您未签署确认书!',
  451. cancelText: '取消',
  452. confirmText: '去签署',
  453. success: res => {
  454. if (res.confirm) {
  455. this.navToPage('/pages/repairConfirmation?type=fs')
  456. }
  457. }
  458. })
  459. }
  460. }
  461. } catch (error) {}
  462. }
  463. this.$nextTick(() => {
  464. this.isError = false
  465. this.isLoading = false
  466. this.refresherTriggered = false
  467. })
  468. } catch {
  469. this.isError = true
  470. this.isLoading = false
  471. }
  472. },
  473. async onLoad({
  474. scene, // 扫码进入的参数
  475. goodsId, // 商品id
  476. serviceId, // 业务员id
  477. smsServiceId, // 短信业务员id
  478. otherType, // 类型:groupbuyList=团购活动,activityList=专区活动,orderList=订单列表,workOrderList=工单列表,couponList=优惠券列表,workOrderDetail
  479. activityType, // 专区活动类型
  480. appOrderId, // 师傅端app订单id(下单支付)
  481. orderId, // 订单id(进入订单详情)
  482. workOrderId, // 工单id(进入工单详情)
  483. workOrderTypeId,
  484. workOrderType,
  485. workOrderImgUrl,
  486. mpOpenId,
  487. type,
  488. objId,
  489. isYB,
  490. isWB,
  491. sharerOpenId
  492. }) {
  493. await this.$onLaunched
  494. setTimeout(() => {
  495. this.isShowTopTooltip = false
  496. this.isShowBottomTooltip = false
  497. }, 10000)
  498. if (this.isLogin) {
  499. this.checkCoupon()
  500. }
  501. if (mpOpenId) {
  502. uni.login({
  503. provider: 'weixin',
  504. success: loginRes => {
  505. this.$api.post('/user/auth', {
  506. code: loginRes.code,
  507. mpOpenId: mpOpenId
  508. })
  509. }
  510. })
  511. }
  512. if (sharerOpenId) {
  513. this.$api
  514. .post('/user/bind', {
  515. serviceOpenId: sharerOpenId,
  516. userId: this.$store.state.user.userId
  517. })
  518. .then(res => {
  519. console.log('绑定成功:' + res.message)
  520. })
  521. }
  522. try {
  523. this.userInfo = await this.$getUserInfo()
  524. if (!this.userInfo.isGZSign && !this.userInfo.isFSSign) {
  525. // 点击短信链接进入小程序
  526. if (smsServiceId) {
  527. this.bindUser(smsServiceId)
  528. if (this.userInfo.type !== 'SERVICE') {
  529. this.isSmsReceive = true
  530. this.isReceiveDialog = true
  531. }
  532. }
  533. // 从链接进入小程序
  534. if (serviceId) {
  535. this.bindUser(serviceId)
  536. }
  537. if (goodsId) {
  538. setTimeout(() => {
  539. this.toGoodsDetail(goodsId)
  540. }, 1000)
  541. }
  542. if (isYB) {
  543. setTimeout(() => {
  544. this.toServiceIndex()
  545. }, 1000)
  546. }
  547. if (isWB) {
  548. setTimeout(() => {
  549. this.toMaintenanceCreate()
  550. }, 1000)
  551. }
  552. if (otherType) {
  553. // 团购列表
  554. if (otherType === 'groupbuyList') {
  555. this.navToPage('/packageMine/pages/groupbuy/list')
  556. }
  557. // 活动专区列表
  558. if (otherType === 'activityList') {
  559. this.navToPage('/packageGoods/pages/activity?type=' + activityType)
  560. }
  561. // 订单列表
  562. if (otherType === 'orderList') {
  563. this.navToPage('/packageMine/pages/order/list')
  564. }
  565. // 工单列表
  566. if (otherType === 'workOrderList') {
  567. this.navToPage('/packageMine/pages/workOrder/list')
  568. }
  569. // 优惠券列表
  570. if (otherType === 'couponList') {
  571. this.navToPage('/packageMine/pages/coupon/list')
  572. }
  573. }
  574. if (orderId) {
  575. this.navToPage(`/packageMine/pages/order/detail?orderId=${orderId}`)
  576. } else if (workOrderId && workOrderTypeId && workOrderType) {
  577. workOrderType = workOrderType.replace(/\\\\/g, '\\')
  578. this.navToPage(
  579. `/packageMine/pages/workOrder/detail?id=${workOrderTypeId}&type=${workOrderType}&orderNo=${workOrderId}`
  580. )
  581. } else if (workOrderId) {
  582. this.navToPage(`/packageMine/pages/workOrder/list`)
  583. } else if (workOrderImgUrl) {
  584. this.navToPage(`/packageMine/pages/workOrder/receipt?imgurl=${workOrderImgUrl}`)
  585. }
  586. // 扫码进入小程序
  587. if (scene) {
  588. console.log(scene)
  589. // 拿scene的id去获取
  590. this.$api
  591. .get('/common/scene', {
  592. scene: scene
  593. })
  594. .then(res => {
  595. let newScene = res.data.split('&')
  596. this.scene.type = newScene[0]
  597. this.scene.serviceId = newScene[2] || ''
  598. // 如果是商品
  599. if (newScene[0] == 'goods') {
  600. this.scene.goodsId = newScene[1]
  601. this.toGoodsDetail(this.scene.goodsId)
  602. }
  603. // 如果是优惠券
  604. else if (newScene[0] == 'coupon') {
  605. this.scene.couponId = newScene[1]
  606. this.isReceiveDialog = true
  607. // this.receiveCoupon(this.scene.couponId);
  608. }
  609. // 如果是团购分享码
  610. else if (newScene[0] == 'promotion_group') {
  611. this.navToPage('/packageMine/pages/groupbuy/list')
  612. }
  613. // 如果是活动专区分享码
  614. else if (newScene[0] == 'HDZQ') {
  615. this.navToPage('/packageGoods/pages/activity?type=' + newScene[1])
  616. }
  617. // 如果是工程维保
  618. else if (newScene[0] == 'ENGIN_PROJECT_REPAIR') {
  619. this.$navToPage({
  620. url: `/packageHome/pages/maintenance/create?projectId=${newScene[1]}`
  621. })
  622. }
  623. console.log(this.scene)
  624. if (this.scene.serviceId) {
  625. this.bindUser(this.scene.serviceId)
  626. }
  627. })
  628. }
  629. this.$api.post('/worker/remind').then(res => {
  630. this.baoxiandangqianxianxitishi = res.data
  631. })
  632. this.$api.post('/pg/order/base/status/count', {}).then(res => {
  633. this.statusCount = res.data
  634. })
  635. this.$api
  636. .post('/pay/orderCount', {
  637. goodsType: 'P'
  638. })
  639. .then(res => {
  640. this.peijiandzf = res.data.dzf
  641. console.log(res.data)
  642. })
  643. this.$api
  644. .post('/pay/orderCount', {
  645. goodsType: 'M'
  646. })
  647. .then(res => {
  648. this.fucaidzf = res.data.dzf
  649. console.log(res.data)
  650. })
  651. }
  652. } catch (error) {}
  653. },
  654. methods: {
  655. quqianming(err) {},
  656. // 测试支付
  657. quzhifu() {
  658. mini_env(bool => {
  659. this.$api
  660. .post('/order/buytest', {
  661. orderId: Date.now(),
  662. amount: 0.01
  663. })
  664. .then(res => {
  665. // 小程序环境
  666. if (bool) {
  667. uniWebview.navigateTo({
  668. url: `/pages/pay/pay?${Object.entries({
  669. ...res.data,
  670. payPackage: res.data.payPackage.split('=')[0] || '',
  671. payPackageVal: res.data.payPackage.split('=')[1] || ''
  672. })
  673. .map(item => item.join('='))
  674. .join('&')}`
  675. })
  676. }
  677. })
  678. })
  679. },
  680. // 获取公告栏
  681. getNoticebar() {
  682. this.$api.get('/shpping/cart/notice').then(res => {
  683. this.noticeContent = res.data
  684. })
  685. },
  686. // 触发下拉刷新
  687. async refresherrefresh(e) {
  688. this.refresherTriggered = true
  689. this.configInfo = await this.$getConfigInfo()
  690. await this.getBannerList()
  691. try {
  692. if (this.isLogin) {
  693. this.userInfo = await this.$getUserInfo()
  694. if (!this.userInfo.isGZSign && !this.userInfo.isFSSign) {
  695. this.getCategoryList()
  696. this.getServiceList()
  697. this.getCouponList()
  698. this.getWebsitList()
  699. this.getCodeActivityList()
  700. }
  701. } else {
  702. await this.wxLogin()
  703. this.userInfo = await this.$getUserInfo()
  704. if (!this.userInfo.isGZSign && !this.userInfo.isFSSign) {
  705. this.getCategoryList()
  706. this.getServiceList()
  707. this.getCouponList()
  708. this.getWebsitList()
  709. this.getCodeActivityList()
  710. }
  711. }
  712. } catch (error) {}
  713. this.$nextTick(() => {
  714. this.$isResolve()
  715. this.isError = false
  716. this.refresherTriggered = false
  717. })
  718. },
  719. async wxLogin() {
  720. return new Promise((resolve, reject) => {
  721. uni.login({
  722. provider: 'weixin',
  723. success: loginRes => {
  724. this.$api
  725. .post('/user/auth', {
  726. code: loginRes.code
  727. })
  728. .then(async res => {
  729. this.$store.commit('user/set_token', res.data.token)
  730. this.$store.commit('user/set_openId', res.data.openId)
  731. this.$store.commit('user/set_name', res.data.nickName)
  732. this.$store.commit('user/set_avatar', res.data.avatar)
  733. this.$store.commit('user/set_userId', res.data.userId)
  734. if (res.data.mobile) {
  735. this.$store.commit('user/set_mobile', res.data.mobile)
  736. }
  737. if (!res.data.avatar || !res.data.nickName) {
  738. await this.saveUserInfo(res.data)
  739. }
  740. resolve(1)
  741. })
  742. .catch(() => {
  743. this.refresherTriggered = false
  744. reject(0)
  745. })
  746. }
  747. })
  748. })
  749. },
  750. // 保存用户信息
  751. async saveUserInfo(userInfo) {
  752. let randomNum = new Date().getTime().toString().substr(-6)
  753. let configInfo = await this.$getConfigInfo()
  754. return new Promise((resolve, reject) => {
  755. this.$api
  756. .post('/user/userinfo/save', {
  757. userId: userInfo.userId,
  758. avatarUrl: configInfo.minLogo3,
  759. nickName: `微信用户_${randomNum}`
  760. })
  761. .then(res => {
  762. resolve(res.data)
  763. })
  764. })
  765. },
  766. getCategoryList() {
  767. this.$api
  768. .get('/goods/category/list/all', {
  769. isServiceShow: true
  770. })
  771. .then(res => {
  772. this.categoryList = res.data
  773. })
  774. },
  775. getServiceList() {
  776. this.$api.post('/pg/order/base/type/list').then(res => {
  777. let list = res.data.map(item => {
  778. return {
  779. title: item.orderSmallTypeText,
  780. icon: item.imgUrl,
  781. url: `/packageWorkorder/pages/create/index?typeId=${item.id}&typeName=${item.orderSmallTypeText}`
  782. }
  783. })
  784. this.serviceList = [...list, ...this.baseServiceList]
  785. })
  786. },
  787. getWebsitList() {
  788. this.$api
  789. .get('/user/apply/websit', {
  790. // isAll: false,
  791. examineStatus: 'OK'
  792. })
  793. .then(res => {
  794. this.websitList = res.data || []
  795. })
  796. },
  797. toPage(url) {
  798. if (!url) return this.$toast('敬请期待~')
  799. this.navToPage(url)
  800. },
  801. toPageaa(url, tab) {
  802. if (!url) return this.$toast('敬请期待~')
  803. this.navToPage(url)
  804. this.$nextTick(() => {
  805. this.crossPage.$emit('refreshWorkorderList', { tab: tab })
  806. })
  807. },
  808. toFn(fn) {
  809. if (!fn) return this.$toast('敬请期待~')
  810. this[fn]()
  811. },
  812. toServiceIndex() {
  813. if (this.isWorkerUser) {
  814. this.navToPage(`/packageHome/pages/addvalue/serviceBuy`)
  815. } else {
  816. this.navToPage(`/packageHome/pages/addvalue/explainList`)
  817. }
  818. },
  819. toServiceRecods() {
  820. if (this.isWorkerUser) {
  821. this.navToPage(`/packageWorkorder/pages/orderList?isYb=true`)
  822. } else {
  823. this.navToPage(`/packageWorkorder/pages/userWorkorderList`)
  824. }
  825. },
  826. async checkMaintenance() {
  827. const hasApply = await this.$api
  828. .post('/engin/material/list/page', {
  829. pageNum: 1,
  830. pageSize: -1,
  831. examineStatus: ''
  832. })
  833. .then(res => {
  834. return res.data.records && res.data.records.length > 0
  835. })
  836. const hasOrder = await this.$api
  837. .post('/pg/order/base/list', {
  838. pageNum: 1,
  839. pageSize: -1,
  840. isWb: true
  841. })
  842. .then(res => {
  843. return res.data.records && res.data.records.length > 0
  844. })
  845. return hasApply || hasOrder
  846. },
  847. toMaintenanceCreate() {
  848. if ((this.isWorkerUser || this.isShowMaintenance) && this.userInfo.mobile) {
  849. this.navToPage(`/packageHome/pages/maintenance/create`)
  850. } else {
  851. this.$tips('您暂无维保工程')
  852. }
  853. },
  854. toMaintenanceRecods() {
  855. if (this.isWorkerUser) {
  856. this.navToPage(`/packageWorkorder/pages/orderList?isWb=true`)
  857. } else {
  858. this.navToPage(`/packageWorkorder/pages/userWorkorderList?isWb=1`)
  859. }
  860. },
  861. toMall() {
  862. this.$navToPage(
  863. {
  864. url: '/pages/goods/index'
  865. },
  866. 'switchTab'
  867. )
  868. },
  869. // 获取轮播图列表
  870. async getBannerList() {
  871. return new Promise((resolve, reject) => {
  872. this.$api
  873. .get('/common/list/page', {
  874. pageNum: 1,
  875. pageSize: 10,
  876. state: true,
  877. port: 'SHOP'
  878. })
  879. .then(res => {
  880. this.bannerList = res.data.records
  881. resolve(1)
  882. })
  883. .catch(res => {
  884. reject(0)
  885. })
  886. })
  887. },
  888. // 点击轮播图
  889. clickBanner(index) {
  890. let item = this.bannerList[index]
  891. if (item.type == 3) {
  892. this.toActivityList(item.goodsId)
  893. } else {
  894. this.toGoodsDetail(item.goodsId)
  895. }
  896. },
  897. // 获取扫码活动列表
  898. async getCodeActivityList() {
  899. return new Promise((resolve, reject) => {
  900. this.$api
  901. .post('/promotion/questionnaire/list', {
  902. state: 1
  903. })
  904. .then(res => {
  905. this.codeActivityList = res.data
  906. resolve(1)
  907. })
  908. .catch(res => {
  909. reject(0)
  910. })
  911. })
  912. },
  913. // 获取可领优惠券列表
  914. getCouponList() {
  915. this.$api
  916. .get('/coupon/list/all', {
  917. userId: this.$store.state.user.userId
  918. })
  919. .then(res => {
  920. this.couponList = res.data.filter(item => {
  921. return item.obtainType === 1
  922. })
  923. if (this.couponList && this.couponList.length > 0) {
  924. this.couponDialogImgUrl = this.couponList[0].imgSrc
  925. }
  926. })
  927. },
  928. // 关闭弹窗
  929. closeDialog() {
  930. this.$refs.dialog.step(
  931. {
  932. scale: 0
  933. },
  934. {
  935. duration: 400
  936. }
  937. )
  938. this.$refs.dialog.run(() => {
  939. this.isShowCouponDialog = false
  940. })
  941. this.$refs.dialogBtn.step(
  942. {
  943. scale: 0
  944. },
  945. {
  946. duration: 400
  947. }
  948. )
  949. this.$refs.dialogBtn.run(() => {
  950. this.isShowCouponDialog = false
  951. })
  952. },
  953. // 领取优惠券
  954. handleCoupon() {
  955. let ids = this.couponList.map(item => {
  956. return item.couponId
  957. })
  958. this.$api
  959. .post('/coupon/obtain', {
  960. userId: this.$store.state.user.userId,
  961. couponIds: ids.join(',')
  962. })
  963. .then(res => {
  964. this.closeDialog()
  965. setTimeout(() => {
  966. this.$tips('优惠券领取成功,请及时使用!')
  967. }, 500)
  968. })
  969. },
  970. // 进入商品详情
  971. toGoodsDetail(id) {
  972. if (!id) {
  973. return false
  974. }
  975. this.$navToPage({
  976. url: '/packageGoods/pages/detail?id=' + id
  977. })
  978. },
  979. // 进入活动列表
  980. toActivityList(type) {
  981. this.$navToPage({
  982. url: '/packageGoods/pages/activity?type=' + type
  983. })
  984. },
  985. // 进入扫码活动列表
  986. toCodeActivityList() {
  987. this.$navToPage({
  988. url: '/packageHome/pages/codeActivity/activityList'
  989. })
  990. },
  991. // 绑定用户关系
  992. bindUser(serviceId) {
  993. this.$api
  994. .post('/user/bind', {
  995. serviceId: serviceId,
  996. userId: this.$store.state.user.userId
  997. })
  998. .then(res => {
  999. console.log('绑定成功:' + res.message)
  1000. })
  1001. },
  1002. // 去分类列表
  1003. toClassifyList(categoryId) {
  1004. this.navToPage(`/packageGoods/pages/classify?categoryId=${categoryId}`)
  1005. },
  1006. // 点击二级分类
  1007. toGoodsList(pid, cid, cname) {
  1008. this.$navToPage({
  1009. url: `/packageGoods/pages/list?pid=${pid}&cid=${cid}&cname=${cname}`
  1010. })
  1011. },
  1012. // 进入商品详情
  1013. toGoodsDetail(id) {
  1014. if (!id) {
  1015. return false
  1016. }
  1017. this.$navToPage({
  1018. url: '/packageGoods/pages/detail?id=' + id
  1019. })
  1020. },
  1021. // 检查是否有优惠券过期
  1022. checkCoupon() {
  1023. this.$api.get('/coupon/timeout').then(res => {
  1024. if (res.data) {
  1025. this.isCouponDialog = true
  1026. }
  1027. })
  1028. },
  1029. // 进入我的优惠券
  1030. toMyCoupon() {
  1031. this.isCouponDialog = false
  1032. this.navToPage('/packageMine/pages/coupon/list')
  1033. },
  1034. // 领取优惠券
  1035. receiveCoupon(id) {
  1036. if (!this.isLogin) {
  1037. return this.navToPage('/pages/login/indexs')
  1038. }
  1039. if (this.isSmsReceive) {
  1040. this.$api
  1041. .get('/coupon/obtain')
  1042. .then(res => {
  1043. this.isReceiveDialog = false
  1044. this.$modal({
  1045. content: '领取成功',
  1046. confirmText: '去看看'
  1047. })
  1048. .then(() => {
  1049. this.toMyCoupon()
  1050. })
  1051. .catch(() => {})
  1052. })
  1053. .catch(res => {
  1054. this.isReceiveDialog = false
  1055. this.$tips(`领取失败:${res.message}`)
  1056. })
  1057. } else {
  1058. this.$api
  1059. .get('/coupon/transfer/coupon2', {
  1060. userCouponId: this.scene.couponId,
  1061. shareUserId: this.scene.serviceId
  1062. })
  1063. .then(res => {
  1064. this.isReceiveDialog = false
  1065. this.$modal({
  1066. content: '领取成功',
  1067. confirmText: '去看看'
  1068. })
  1069. .then(() => {
  1070. this.toMyCoupon()
  1071. })
  1072. .catch(() => {})
  1073. })
  1074. .catch(res => {
  1075. this.isReceiveDialog = false
  1076. this.$tips(`领取失败:${res.message}`)
  1077. })
  1078. }
  1079. },
  1080. // 跳转微信公众号链接
  1081. toWxLink() {
  1082. let link = this.configInfo.pubOfficeAddr
  1083. if (!link) return false
  1084. this.navToPage('/pages/index/webview?link=' + link)
  1085. },
  1086. navToPage(url) {
  1087. this.$navToPage({
  1088. url
  1089. })
  1090. },
  1091. toWorkorder() {
  1092. this.$navToPage({
  1093. url: `/packageWorkorder/pages/userWorkorderList`
  1094. })
  1095. }
  1096. }
  1097. }
  1098. </script>
  1099. <style lang="scss" scoped>
  1100. .all-container {
  1101. box-sizing: border-box;
  1102. padding: 1rpx 20rpx 20rpx;
  1103. }
  1104. .top-tooltip {
  1105. width: 390rpx;
  1106. transform-origin: center bottom;
  1107. z-index: 1025;
  1108. position: fixed;
  1109. top: 20rpx;
  1110. right: 20rpx;
  1111. background: rgba(0, 0, 0, 0.8);
  1112. min-width: 150px;
  1113. border-radius: 8rpx;
  1114. padding: 15rpx 20rpx;
  1115. color: #ffffff;
  1116. text-align: justify;
  1117. box-shadow: 0 4rpx 24rpx 0 rgba(0, 0, 0, 0.1);
  1118. word-break: break-all;
  1119. box-sizing: border-box;
  1120. .content {
  1121. display: flex;
  1122. align-items: center;
  1123. justify-content: space-between;
  1124. .left {
  1125. view {
  1126. color: #ffffff;
  1127. font-size: 24rpx;
  1128. display: flex;
  1129. align-items: center;
  1130. &:last-child {
  1131. margin-top: 8rpx;
  1132. }
  1133. }
  1134. .iconfont {
  1135. color: #ffffff;
  1136. font-size: 36rpx;
  1137. margin: 0 4rpx;
  1138. }
  1139. }
  1140. .close {
  1141. flex-shrink: 0;
  1142. font-size: 34rpx;
  1143. color: #ffffff;
  1144. margin-left: 20rpx;
  1145. }
  1146. }
  1147. .arrow {
  1148. top: -6px;
  1149. right: 110rpx;
  1150. margin-right: 3px;
  1151. border-top-width: 0;
  1152. border-bottom-color: #ebeef5;
  1153. border-width: 6px;
  1154. filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
  1155. position: absolute;
  1156. display: block;
  1157. width: 0;
  1158. height: 0;
  1159. border-color: transparent;
  1160. border-style: solid;
  1161. &::after {
  1162. position: absolute;
  1163. display: block;
  1164. width: 0;
  1165. height: 0;
  1166. border-color: transparent;
  1167. border-style: solid;
  1168. top: -12px;
  1169. margin-left: -6px;
  1170. border-top-width: 0;
  1171. border-bottom-color: rgba(0, 0, 0, 0.8);
  1172. content: ' ';
  1173. border-width: 6px;
  1174. }
  1175. }
  1176. }
  1177. .bottom-tooltip {
  1178. z-index: 1025;
  1179. position: fixed;
  1180. bottom: 20rpx;
  1181. left: 20rpx;
  1182. width: 710rpx;
  1183. background: rgba(0, 0, 0, 0.8);
  1184. border-radius: 8rpx;
  1185. display: flex;
  1186. align-items: center;
  1187. justify-content: space-between;
  1188. height: 72rpx;
  1189. padding: 0 20rpx 0 30rpx;
  1190. box-sizing: border-box;
  1191. .left {
  1192. display: flex;
  1193. align-items: center;
  1194. .close {
  1195. font-size: 34rpx;
  1196. color: #ffffff;
  1197. }
  1198. .text {
  1199. font-size: 24rpx;
  1200. color: #ffffff;
  1201. margin-left: 16rpx;
  1202. }
  1203. }
  1204. .btn {
  1205. font-size: 24rpx;
  1206. color: #ffffff;
  1207. background: #ff3f42;
  1208. padding: 0 16rpx;
  1209. height: 48rpx;
  1210. line-height: 48rpx;
  1211. border-radius: 48rpx;
  1212. }
  1213. }
  1214. .home-title {
  1215. display: flex;
  1216. align-items: center;
  1217. justify-content: space-between;
  1218. .left {
  1219. font-size: 34rpx;
  1220. color: $main-font;
  1221. font-weight: bold;
  1222. }
  1223. .right {
  1224. display: flex;
  1225. align-items: center;
  1226. .text {
  1227. color: $sec-font;
  1228. font-size: 28rpx;
  1229. }
  1230. .iconfont {
  1231. font-size: 24rpx;
  1232. color: $sec-font;
  1233. margin-left: 8rpx;
  1234. }
  1235. }
  1236. }
  1237. .home-container {
  1238. background: #f5f5f5;
  1239. }
  1240. .all-container {
  1241. padding: 1rpx 20rpx 20rpx;
  1242. }
  1243. .card {
  1244. @include zj-card;
  1245. padding: 30rpx;
  1246. margin-top: 20rpx;
  1247. background: linear-gradient(180deg, #f3f9fe 0%, #ffffff 100%);
  1248. }
  1249. .swiper-container {
  1250. @include zj-card;
  1251. margin-top: 20rpx;
  1252. padding: 0 20rpx;
  1253. ::v-deep .u-swiper {
  1254. height: 350rpx !important;
  1255. .u-swiper__wrapper {
  1256. height: 350rpx !important;
  1257. }
  1258. .u-swiper__wrapper__item__wrapper__image {
  1259. height: 350rpx !important;
  1260. }
  1261. }
  1262. }
  1263. .swiper2-container {
  1264. @include zj-card;
  1265. position: relative;
  1266. margin-top: 20rpx;
  1267. ::v-deep .u-swiper {
  1268. height: 188rpx !important;
  1269. .u-swiper__wrapper {
  1270. height: 188rpx !important;
  1271. }
  1272. .u-swiper__wrapper__item__wrapper__image {
  1273. height: 188rpx !important;
  1274. }
  1275. }
  1276. }
  1277. .noticebar-container {
  1278. margin-top: 30rpx;
  1279. }
  1280. .service-container {
  1281. padding: 0;
  1282. .home-title {
  1283. padding: 30rpx 30rpx 0;
  1284. }
  1285. .list {
  1286. display: flex;
  1287. margin-top: 40rpx;
  1288. flex-wrap: wrap;
  1289. padding-bottom: 30rpx;
  1290. .item {
  1291. width: 25%;
  1292. display: flex;
  1293. flex-direction: column;
  1294. align-items: center;
  1295. box-sizing: border-box;
  1296. margin-bottom: 20rpx;
  1297. &:nth-child(5),
  1298. &:nth-child(6),
  1299. &:nth-child(7),
  1300. &:nth-child(8) {
  1301. margin-bottom: 0;
  1302. }
  1303. image {
  1304. width: 76rpx;
  1305. height: 76rpx;
  1306. }
  1307. text {
  1308. font-size: 26rpx;
  1309. font-weight: 500;
  1310. margin-top: 16rpx;
  1311. }
  1312. }
  1313. }
  1314. }
  1315. .share-container {
  1316. .list {
  1317. display: flex;
  1318. margin-top: 40rpx;
  1319. .item {
  1320. flex: 1;
  1321. padding: 20rpx;
  1322. border-radius: 12rpx;
  1323. display: flex;
  1324. align-items: center;
  1325. image {
  1326. flex-shrink: 0;
  1327. width: 88rpx;
  1328. height: 88rpx;
  1329. }
  1330. .text {
  1331. margin-left: 20rpx;
  1332. font-size: 32rpx;
  1333. }
  1334. &:first-child {
  1335. margin-right: 30rpx;
  1336. background: #e8f5fe;
  1337. .text {
  1338. color: #6ca2f8;
  1339. }
  1340. }
  1341. &:last-child {
  1342. background: #fff9f4;
  1343. .text {
  1344. color: #d87e3b;
  1345. }
  1346. }
  1347. }
  1348. }
  1349. }
  1350. .order-container {
  1351. .list {
  1352. display: flex;
  1353. justify-content: space-between;
  1354. margin-top: 40rpx;
  1355. .item {
  1356. display: flex;
  1357. flex-direction: column;
  1358. align-items: center;
  1359. box-sizing: border-box;
  1360. padding: 0 10rpx;
  1361. image {
  1362. width: 76rpx;
  1363. height: 76rpx;
  1364. }
  1365. text {
  1366. font-size: 26rpx;
  1367. font-weight: 500;
  1368. margin-top: 16rpx;
  1369. }
  1370. }
  1371. }
  1372. }
  1373. .other-container {
  1374. padding: 30rpx 0;
  1375. .home-title {
  1376. padding: 0 30rpx;
  1377. }
  1378. .list {
  1379. display: flex;
  1380. margin-top: 40rpx;
  1381. .item {
  1382. width: 25%;
  1383. display: flex;
  1384. flex-direction: column;
  1385. align-items: center;
  1386. box-sizing: border-box;
  1387. padding: 0 10rpx;
  1388. image {
  1389. width: 76rpx;
  1390. height: 76rpx;
  1391. }
  1392. text {
  1393. font-size: 26rpx;
  1394. font-weight: 500;
  1395. margin-top: 16rpx;
  1396. }
  1397. }
  1398. }
  1399. }
  1400. .contact-container {
  1401. .list {
  1402. margin-top: 20rpx;
  1403. .item {
  1404. display: flex;
  1405. align-items: center;
  1406. height: 100rpx;
  1407. background: none;
  1408. padding: 0;
  1409. &::after {
  1410. border: none;
  1411. }
  1412. image {
  1413. width: 44rpx;
  1414. height: 44rpx;
  1415. margin-right: 20rpx;
  1416. }
  1417. .title {
  1418. flex: 1;
  1419. font-size: 30rpx;
  1420. font-weight: 500;
  1421. text-align: left;
  1422. line-height: 1;
  1423. }
  1424. .iconfont {
  1425. font-size: 26rpx;
  1426. color: $sec-font;
  1427. }
  1428. }
  1429. .wrap1 {
  1430. // border-bottom: 1px solid #eaeaea;
  1431. padding-bottom: 20rpx;
  1432. padding-left: 60rpx;
  1433. .it {
  1434. padding: 20rpx 0;
  1435. border-bottom: 1px solid #f5f5f5;
  1436. &:last-child {
  1437. border-bottom: none;
  1438. }
  1439. .top {
  1440. display: flex;
  1441. align-items: center;
  1442. justify-content: space-between;
  1443. .left {
  1444. font-size: 28rpx;
  1445. }
  1446. .right {
  1447. .iconfont {
  1448. font-size: 36rpx;
  1449. color: $theme-color;
  1450. }
  1451. }
  1452. }
  1453. .address {
  1454. margin-top: 12rpx;
  1455. font-size: 28rpx;
  1456. color: $sec-font;
  1457. }
  1458. }
  1459. }
  1460. .wrap2 {
  1461. display: flex;
  1462. align-items: center;
  1463. justify-content: space-between;
  1464. padding-left: 60rpx;
  1465. .left {
  1466. font-size: 28rpx;
  1467. }
  1468. .right {
  1469. .iconfont {
  1470. font-size: 36rpx;
  1471. color: $theme-color;
  1472. }
  1473. }
  1474. }
  1475. }
  1476. }
  1477. .dialog-container {
  1478. position: fixed;
  1479. z-index: 1000000;
  1480. top: 0;
  1481. left: 0;
  1482. width: 100%;
  1483. height: 100vh;
  1484. display: flex;
  1485. align-items: center;
  1486. justify-content: center;
  1487. flex-direction: column;
  1488. background: rgba($color: #000000, $alpha: 0.6);
  1489. .image {
  1490. width: 600rpx;
  1491. display: block;
  1492. border-radius: 20rpx;
  1493. margin-top: 40rpx;
  1494. }
  1495. .iconfont {
  1496. font-size: 68rpx;
  1497. color: #ffffff;
  1498. margin-top: 40rpx;
  1499. }
  1500. }
  1501. </style>
  1502. <style>
  1503. ::-webkit-scrollbar {
  1504. display: none;
  1505. width: 0 !important;
  1506. height: 0 !important;
  1507. -webkit-appearance: none;
  1508. background: transparent;
  1509. color: transparent;
  1510. }
  1511. </style>