index.vue 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840
  1. <template>
  2. <view class="content">
  3. <view v-show="homeCardList">
  4. <view class="top" :style="{background:'#'+themeColor}">
  5. <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
  6. <view class="logoBox">
  7. <!-- <image src="../../static/img2/indexlogo.png" mode="" class="logoImg"></image> -->
  8. <image v-if="appletHomeSetting.showImageType==0" :src="appletHomeSetting.showImage" mode="" class="logoImg"></image>
  9. </view>
  10. </view>
  11. <view>
  12. <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
  13. <view style="height: 98rpx;"></view>
  14. </view>
  15. <view class="topCont" :style="{background:'#'+themeColor}">
  16. <!-- 有车 -->
  17. <view class="carBox" v-if="carInfo">
  18. <view class="carBox2">
  19. <view class="carLeft">
  20. <view class="carTop" @click="changeCar">
  21. <image :src="carInfo.brandLogo" mode="" class="carLogo"></image>
  22. <view class="carInfomodel">{{carInfo.brand?carInfo.brand:''}}&nbsp;{{carInfo.series?carInfo.series:''}}</view>
  23. <image src="../../static/img2/xia.png" mode="" class="carXia"></image>
  24. <view class="plateNumber" v-if="carInfo.plateNumber">
  25. <span class="plateNumberSpan1">{{carInfo.plateNumber.slice(0, 2)}}</span>
  26. <span class="plateNumberSpan2">{{carInfo.plateNumber.slice(2)}}</span>
  27. </view>
  28. <!-- <image src="../../static/img2/carBj.png" mode="" class="carBj"></image> -->
  29. </view>
  30. <view class="carBq">
  31. <view class="carBqLine">
  32. <image src="../../static/img2/carDui.png" mode="" class="carDui"></image>
  33. <view class="carTitle">车况报告</view>
  34. </view>
  35. <view class="carBqLine">
  36. <image src="../../static/img2/carDui.png" mode="" class="carDui"></image>
  37. <view class="carTitle">保养记录</view>
  38. </view>
  39. <view class="carBqLine">
  40. <image src="../../static/img2/carDui.png" mode="" class="carDui"></image>
  41. <view class="carTitle">快速救援</view>
  42. </view>
  43. </view>
  44. </view>
  45. <view class="carRight">
  46. <image src="../../static/img2/carLogo.png" mode="" class="carLogoBg"></image>
  47. </view>
  48. </view>
  49. <view class="carTimeBox" v-if="appletHomeSetting.carInsuranceType==2||appletHomeSetting.carInsuranceType==3||appletHomeSetting.carMaintainType==3||appletHomeSetting.carMaintainType==2||appletHomeSetting.carAuditType==2||appletHomeSetting.carAuditType==3||homeCardList.openMCar.showType==1">
  50. <view class="bxBox">
  51. <view class="bxline bxline1" v-if="appletHomeSetting.carInsuranceType==3">
  52. <img src="../../static/timg/car1.png" alt="" class="bxlineIcon">
  53. <view class="bxlineTitle">保险</view>
  54. <view class="bxlineMs1" v-if="carInfo.insuranceExpireDate">{{InsuranceExpireDate}}天到期</view>
  55. <view class="bxlineMs2" v-else>--</view>
  56. </view>
  57. <view class="bxline bxline1" v-if="appletHomeSetting.carInsuranceType==2">
  58. <img src="../../static/timg/car1.png" alt="" class="bxlineIcon">
  59. <view class="bxlineTitle">保险</view>
  60. <view class="bxlineMs1" v-if="carInfo.insuranceExpireDate">{{carInfo.insuranceExpireDate.slice(0,10)}}</view>
  61. <view class="bxlineMs2" v-else>--</view>
  62. </view>
  63. <view class="bxline bxline2" v-if="appletHomeSetting.carMaintainType ==3">
  64. <img src="../../static/timg/car2.png" alt="" class="bxlineIcon" >
  65. <view class="bxlineTitle">下次保养</view>
  66. <view class="bxlineMs1" v-if="carInfo.nextCareDate||carInfo.nextCareMilage">
  67. <span v-if="NextCareDate||NextCareDate===0">{{NextCareDate}}天后</span>
  68. <span v-if="NextCareDate===0&&carInfo.nextCareMilage">或</span>
  69. <span v-if="carInfo.nextCareMilage&&NextCareDate">或</span>
  70. <span v-if="carInfo.nextCareMilage">{{carInfo.nextCareMilage}}km</span>
  71. </view>
  72. <view class="bxlineMs2" v-else>--</view>
  73. </view>
  74. <view class="bxline bxline2" v-if="appletHomeSetting.carMaintainType ==2">
  75. <img src="../../static/timg/car2.png" alt="" class="bxlineIcon" >
  76. <view class="bxlineTitle" style="width: 140rpx;">下次保养</view>
  77. <view class="bxlineMs1" v-if="carInfo.nextCareDate||carInfo.nextCareMilage">
  78. <span v-if="NextCareDate||NextCareDate===0">{{carInfo.nextCareDate.slice(0,10)}}</span>
  79. <span v-if="NextCareDate===0&&carInfo.nextCareMilage">或</span>
  80. <span v-if="carInfo.nextCareMilage&&NextCareDate">或</span>
  81. <span v-if="carInfo.nextCareMilage">{{carInfo.nextCareMilage}}km</span>
  82. </view>
  83. <view class="bxlineMs2" v-else>--</view>
  84. </view>
  85. <view class="bxline bxline1" v-if="appletHomeSetting.carAuditType==3">
  86. <img src="../../static/timg/car3.png" alt="" class="bxlineIcon" >
  87. <view class="bxlineTitle">年审</view>
  88. <view class="bxlineMs1" v-if="carInfo.nextAuditDate">{{NextAuditDate}}天到期</view>
  89. <view class="bxlineMs2" v-else>--</view>
  90. </view>
  91. <view class="bxline bxline1" v-if="appletHomeSetting.carAuditType==2">
  92. <img src="../../static/timg/car3.png" alt="" class="bxlineIcon" >
  93. <view class="bxlineTitle">年审</view>
  94. <view class="bxlineMs1" v-if="carInfo.nextAuditDate">{{carInfo.nextAuditDate.slice(0,10)}}</view>
  95. <view class="bxlineMs2" v-else>--</view>
  96. </view>
  97. <view class="bxline bxline2" v-if="homeCardList.openMCar.showType==1">
  98. <img src="../../static/timg/car4.png" alt="" class="bxlineIcon" >
  99. <view class="bxlineTitle">保养手册</view>
  100. <view class="bxlineMs2" @click="information">点击查看</view>
  101. </view>
  102. </view>
  103. </view>
  104. </view>
  105. <!-- 有车 -->
  106. <!-- 无车 -->
  107. <view class="nocarBox" v-if="!carInfo" >
  108. <image @click="addCar" :src="appletHomeSetting.carAddImage" mode="" style="width: 100%;height: 148rpx;"></image>
  109. <!-- <view style="display: flex;">
  110. <image v-if="appletHomeSetting.carAddImageType==1" src="../../static/img2/pic.png" mode="" class="carAddImage"></image>
  111. <image v-else :src="appletHomeSetting.carAddImage" mode="" class="carAddImage"></image>
  112. <view class="addCarMs">
  113. <view class="addCarMs1">添加爱车推荐精准服务</view>
  114. <view class="addCarMs2">车辆有问题,安徒生来帮您!</view>
  115. </view>
  116. </view>
  117. <view class="addCarBtn" @click="addCar">添加爱车</view> -->
  118. </view>
  119. <!-- 无车 -->
  120. </view>
  121. <view class="contBox">
  122. <!-- 服务顾问 -->
  123. <view v-if="homeCardList.openMUsers">
  124. <view class="adviser" v-if="homeCardList.openMUsers.showType!=2&&managerInfo" @click="goMUsers()">
  125. <view class="adviserLeft">
  126. <img v-if="managerInfo.avatar" :src="managerInfo.avatar" alt="" class="advisertx">
  127. <img v-else src="../../static/timg/pic_def_ava@2x.png" alt="" class="advisertx">
  128. <view class="adviserNema">{{managerInfo.name}}</view>
  129. <view class="adviserms" :style="{border:'1px solid #'+themeColor,color:'#'+themeColor}">服务顾问</view>
  130. </view>
  131. <img src="../../static/timg/icon_arrow_right.png" alt="" class="adviserJt">
  132. </view>
  133. </view>
  134. <!-- 服务顾问 -->
  135. <!-- 中间应用模块 -->
  136. <view class="modular">
  137. <view class="modularLine">
  138. <view class="modularMk" @click="goRoter(item)" v-if="index<4" v-for="(item,index) in homeCardList.application">
  139. <view class="modularLogoBox">
  140. <image :src="item.icon" mode="" class="modularLogo"></image>
  141. </view>
  142. <view class="modularTitle">{{item.name}}</view>
  143. </view>
  144. </view>
  145. <view class="modularLine">
  146. <view class="modularMk" @click="goRoter(item)" v-if="index>3" v-for="(item,index) in homeCardList.application">
  147. <view class="modularLogoBox">
  148. <image :src="item.icon" mode="" class="modularLogo"></image>
  149. </view>
  150. <view class="modularTitle2">{{item.name}}</view>
  151. </view>
  152. </view>
  153. </view>
  154. <!-- 中间应用模块 -->
  155. <!-- 广告区 -->
  156. <view class="advertisement" v-if="homeCardList.ad1.length>0">
  157. <swiper class="swiper2" :style="{height: appletHomeSetting.adHeightSize1 + 'rpx'}" circular :autoplay="true" :interval="interval"
  158. :duration="duration" :indicator-dots="true" indicator-color="#CCCCCC" :indicator-active-color="'#'+themeColor">
  159. <swiper-item v-for="(item,index) in homeCardList.ad1">
  160. <view class="swiper-item2" @click="goRoter(item)">
  161. <image class="swiper-item2Img" :style="{height: appletHomeSetting.adHeightSize1 + 'rpx'}" :src="item.icon" mode=""></image>
  162. </view>
  163. </swiper-item>
  164. </swiper>
  165. </view>
  166. <view class="advertisement" v-if="homeCardList.ad2.length>0">
  167. <swiper class="swiper2" circular :autoplay="true" :interval="interval" :style="{height: appletHomeSetting.adHeightSize2 + 'rpx'}"
  168. :duration="duration" :indicator-dots="true" indicator-color="#CCCCCC" :indicator-active-color="'#'+themeColor">
  169. <swiper-item v-for="(item,index) in homeCardList.ad2">
  170. <view class="swiper-item2" @click="goRoter(item)">
  171. <image class="swiper-item2Img" :src="item.icon" :style="{height: appletHomeSetting.adHeightSize2 + 'rpx'}" mode=""></image>
  172. </view>
  173. </swiper-item>
  174. </swiper>
  175. </view>
  176. <view class="advertisement" v-if="homeCardList.ad3.length>0">
  177. <swiper class="swiper2" circular :autoplay="true" :interval="interval" :style="{height: appletHomeSetting.adHeightSize3 + 'rpx'}"
  178. :duration="duration" :indicator-dots="true" indicator-color="#CCCCCC" :indicator-active-color="'#'+themeColor">
  179. <swiper-item v-for="(item,index) in homeCardList.ad3">
  180. <view class="swiper-item2" @click="goRoter(item)">
  181. <image class="swiper-item2Img" :src="item.icon" mode="" :style="{height: appletHomeSetting.adHeightSize3 + 'rpx'}"></image>
  182. </view>
  183. </swiper-item>
  184. </swiper>
  185. </view>
  186. <!-- 广告区 -->
  187. <!-- 商品区 -->
  188. <view class="goodsBox">
  189. <view class="goodsTabBox">
  190. <view class="goodsTab " :class="{goodsACt:tabIndex==index}" v-for="(item,index) in appletHomeSetting.sortSettingList">
  191. <view @click="tabFn(index)" v-if="item.type==2">热销商品</view>
  192. <view @click="tabFn(index)" v-if="item.type==1">热门活动</view>
  193. <view @click="tabFn(index)" v-if="item.type==3&&homeCardList.isShowMaintain==1">{{homeCardList.maintainTitle}}</view>
  194. <image v-if="tabIndex==index" class="activeGoodsIcon" src="../../static/img2/activeGoods.png" mode=""></image>
  195. </view>
  196. </view>
  197. <view class="goodsLIneBox">
  198. <view class="goodsLine">
  199. <view class="goodsLeft">
  200. <image class="goodsIcon" src="../../static/img2/icon_1.png" mode=""></image>
  201. </view>
  202. <view class="goodsRight">
  203. <view class="goodsRtop">
  204. <view class="goodsName">全合成机油保养2次</view>
  205. <view class="goodsMs">含:发动机机油、机油滤芯、雾化杀菌等</view>
  206. </view>
  207. <view class="goodsRb">
  208. <view class="goodsCBox">
  209. <view class="goodsCLeft">
  210. <view style="display: flex;"><view class="goodsTitle">2次更划算</view></view>
  211. <view class="goodsPriceBox">
  212. <span class="goodsPrice1">¥</span>
  213. <span class="goodsPrice2">294</span>
  214. <span class="goodsPrice3">/次¥588</span>
  215. </view>
  216. </view>
  217. <view class="goodsCRight">
  218. 立即抢购
  219. </view>
  220. </view>
  221. <view class="goodsKbox">
  222. <view class="goosK1">增效全合成</view>
  223. <view class="goosK2">粘度级别</view>
  224. <!-- <view class="goosK2">0W-20/5W-40/5W-30</view> -->
  225. </view>
  226. </view>
  227. </view>
  228. </view>
  229. </view>
  230. </view>
  231. <!-- 商品区 -->
  232. </view>
  233. <view style="height: 60rpx;"></view>
  234. <!-- 手机号授权 -->
  235. <view class="authorizBox" v-if="authorizShow" @click="authorizShowHide">
  236. <view class="authorizCont" @click.stop="">
  237. <view class="authorizName">{{wxOpenData.miniAppName}}</view>
  238. <view class="authorizMs">未注册的手机号登录后将自动创会员账号,如果您不同意授权获取手机号,会影响您使用我们的产品和服务。</view>
  239. <view class="sqLine">
  240. <button class="authorizContbutton" type="default" open-type="getPhoneNumber" @getphonenumber="decryptPhoneNumber">授权</button>
  241. <view class="sqRefuse" @click="authorizShowHide">拒绝</view>
  242. </view>
  243. </view>
  244. <view style="text-align: center;padding-top: 56rpx;">
  245. <image src="../../static/timg/icon_guanbi@2x.png" mode="" class="authorizCloseImg"></image>
  246. </view>
  247. </view>
  248. <view class="qrBox" v-if="qrSHow">
  249. <view class="qrimgBox">
  250. <view class="qrTitle">微信绑定
  251. <image src="../../static/timg/chahao.png" mode="" class="qrimgchahao" @click="qrclose"></image>
  252. </view>
  253. <view class="qrms">扫描/长按下方二维码进行绑定</view>
  254. <view class="qrms2">绑定后可接收微信消息通知</view>
  255. <view style="text-align: center;padding-top: 30rpx;">
  256. <image :src="qrimg" mode="" class="qrimg" :show-menu-by-longpress='true'></image>
  257. </view>
  258. <view class="qrBtn" @click="qrclose">我知道了</view>
  259. </view>
  260. </view>
  261. <!-- 弹框广告区-->
  262. <view class="qrBox" v-if="activityModulesShow" @click="activityModulesHide">
  263. <view class="tkHdBox" @click.stop="">
  264. <swiper class="swiperTk" circular :autoplay="true" :interval="interval"
  265. :duration="duration" :indicator-dots="true" indicator-color="#CCCCCC" :indicator-active-color="'#'+themeColor">
  266. <swiper-item v-for="(item,index) in homeCardList.activityModules">
  267. <view class="swiper-itemTk" @click="goRoter(item)">
  268. <image class="tkHdImg" :src="item.icon" mode="widthFix"></image>
  269. </view>
  270. </swiper-item>
  271. </swiper>
  272. <view style="text-align: center;padding-top: 30rpx;">
  273. <image @click="activityModulesHide" class="closeTk" src="../../static/img/icon_delete.png" mode=""></image>
  274. </view>
  275. </view>
  276. </view>
  277. <!-- 弹框广告区-->
  278. </view>
  279. </view>
  280. </template>
  281. <script>
  282. export default {
  283. data() {
  284. return {
  285. shopId: '',
  286. url:'',
  287. wxOpenData:'',
  288. code:'',
  289. carInfo:'',
  290. homeCardList:'',
  291. authorizShow:false,
  292. miniAppName:'',
  293. iStatusBarHeight:'',
  294. managerInfo:'',
  295. unionId:'',
  296. ext:'',
  297. duration:500,
  298. interval:3000,
  299. InsuranceExpireDate:'',
  300. NextCareDate:'',
  301. NextAuditDate:'',
  302. themeColor:'',
  303. getwxLoing:false,
  304. shareID:'',
  305. discount:'',
  306. bizUserId:'',
  307. coCouponsMsg:'',
  308. coNoNewCustMsg:'',
  309. qrimg:'',
  310. qrSHow:false,
  311. customerInfo:'',
  312. exitNum:'',
  313. appletHomeSetting:'',
  314. activityModulesShow:false,
  315. tabIndex:0,
  316. OpenMGoods:'',
  317. OpenMActivity:'',
  318. }
  319. },
  320. onLoad(opt) {
  321. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  322. var that=this;
  323. //this.$common.getExtStoreId()
  324. var ext=this.$common.getExtStoreId();
  325. this.ext=ext
  326. console.log("ext--themeColor")
  327. console.log(ext)
  328. //console.log( String(Date.now()))
  329. this.shopId=ext.shopId;
  330. this.url=ext.url;
  331. this.unionId=ext.unionId;
  332. var shareID = opt.scene //'F16E7299-6850-4015-ABCE-A9F2794B45B5'
  333. if (shareID) {
  334. this.shareID = shareID
  335. console.log('this.shareID==='+this.shareID)
  336. //this.$store.commit('mutationsshareID', shareID)
  337. }
  338. //this.shareID='F16E7299-6850-4015-ABCE-A9F2794B45B5'
  339. //this.shareID='1BF04FAEC8844ECE9C40E880C3B13721'
  340. //this.unionId="26A1039A-DB10-4D0E-BBA2-541C06274EED";
  341. //this.ext.appId="wxffd2502e67d37908"
  342. // uni.setStorage({
  343. // key: 'extdata',
  344. // data: {
  345. // shopId:'E37BB296-5A08-4534-859D-B351BA611AF9',
  346. // },
  347. // success: function () {
  348. // that.uniLogin()
  349. // }
  350. // });
  351. //this.userInfo = uni.getStorageSync("userInfo");
  352. this.userInfo=this.$store.state.userInfo
  353. if(this.userInfo){
  354. //this.wxOpenData = uni.getStorageSync("wxOpenData");
  355. this.getCarList();
  356. this.queryHomeCardList()
  357. this.queryManagerInfo()
  358. }else{
  359. this.uniLogin()
  360. }
  361. //版本更新
  362. this.UpdateManager();
  363. },
  364. onShow() {
  365. this.userInfo=this.$store.state.userInfo;
  366. this.wxOpenData=this.$store.state.wxOpenData;
  367. var indexaddcar = uni.getStorageSync("indexaddcar");
  368. var themeColor = uni.getStorageSync("themeColor");
  369. if(themeColor){
  370. this.themeColor=themeColor
  371. }
  372. this.getwxLoing=true;
  373. this.exitNum=this.$store.state.exitNum;
  374. if(this.exitNum==1){
  375. this.carInfo=''
  376. }else{
  377. if(indexaddcar==1){
  378. uni.removeStorageSync('indexaddcar');
  379. this.getCarList();
  380. }else{
  381. this.carInfo=this.$store.state.carInfo;
  382. console.log("车辆信息")
  383. console.log(this.carInfo)
  384. if(!this.carInfo){
  385. this.getCarList();
  386. }
  387. this.jsTime()
  388. }
  389. }
  390. },
  391. onPullDownRefresh(){
  392. this.getCarList();
  393. this.queryHomeCardList()
  394. this.queryManagerInfo()
  395. setTimeout(() => {
  396. uni.stopPullDownRefresh(); // 关闭下拉刷新
  397. }, 1000);
  398. },
  399. methods: {
  400. tabData(){
  401. this.$http('openHome/queryOpenMGoods', {
  402. unionId:this.unionId
  403. },'GET').then(res => {
  404. })
  405. this.$http('openHome/queryOpenMActivity', {
  406. unionId:this.unionId
  407. },'GET').then(res => {
  408. })
  409. },
  410. tabFn(index){
  411. this.tabIndex=index
  412. },
  413. activityModulesHide(){
  414. this.activityModulesShow=false
  415. },
  416. seeQr(){
  417. // this.authorizShow = true;
  418. // return false;
  419. if (this.userInfo) {
  420. } else {
  421. this.authorizShow = true;
  422. return false;
  423. }
  424. uni.showLoading({
  425. title: '加载中'
  426. })
  427. this.$request.httpBinary('wxV2/createQrCode', {
  428. type:'bindWx',
  429. customerId:this.customerInfo.id,
  430. unionID:this.customerInfo.unionID,
  431. }, 'GET').then(res => {
  432. uni.hideLoading();
  433. this.qrimg = 'data:image/png;base64,'+uni.arrayBufferToBase64(res);
  434. this.qrSHow=true;
  435. //this.img= uni.arrayBufferToBase64(res)
  436. //console.log('list+=', this.queryShopList);
  437. })
  438. },
  439. qrclose(){
  440. this.qrSHow=false;
  441. },
  442. authorizShowHide(){
  443. this.authorizShow=false
  444. },
  445. UpdateManager(){
  446. const updateManager = uni.getUpdateManager();
  447. updateManager.onCheckForUpdate(function (res) {
  448. // 请求完新版本信息的回调
  449. console.log(res.hasUpdate);
  450. });
  451. updateManager.onUpdateReady(function (res) {
  452. uni.showModal({
  453. title: '更新提示',
  454. content: '新版本已经准备好,是否重启应用?',
  455. success(res) {
  456. if (res.confirm) {
  457. // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
  458. updateManager.applyUpdate();
  459. }
  460. }
  461. });
  462. });
  463. updateManager.onUpdateFailed(function (res) {
  464. // 新的版本下载失败
  465. uni.showToast({
  466. title: '新的版本下载失败',
  467. icon:'none',
  468. duration: 3000
  469. });
  470. });
  471. },
  472. addCar(){
  473. if(!this.userInfo){
  474. if(this.exitNum!=1){
  475. this.authorizShow=true;
  476. }else{
  477. this.$common.automaticlogin().then(val => {
  478. this.userInfo=this.$store.state.userInfo;
  479. this.wxOpenData=this.$store.state.wxOpenData;
  480. /* uni.navigateTo({
  481. url:'../user/addCar/addCar?type=1'
  482. }) */
  483. this.exitNum=''
  484. this.$store.commit('mutationsexitNum', '')
  485. this.getCarList();
  486. uni.navigateTo({
  487. url:'../user/addCar/cailist'
  488. })
  489. })
  490. }
  491. }else{
  492. /* uni.navigateTo({
  493. url:'../user/addCar/addCar?type=1'
  494. }) */
  495. uni.navigateTo({
  496. url:'../subPack/addCarCK'
  497. })
  498. }
  499. },
  500. goShopList(){
  501. uni.navigateTo({
  502. url:'shopList'
  503. })
  504. },
  505. goShop(){
  506. uni.switchTab({
  507. url:'../shop/shop'
  508. })
  509. },
  510. moreJk(){
  511. uni.switchTab({
  512. url:'../activity/activity'
  513. })
  514. },
  515. information(){
  516. console.log('车辆信息--',this.carInfo);
  517. uni.navigateTo({
  518. url:'handbook?mileage='+this.carInfo.milage+'&liyangId='+this.carInfo.nLevelID
  519. })
  520. },
  521. changeCar(){
  522. /* uni.scanCode({
  523. success: function (res) {
  524. console.log('条码类型:' + res.scanType);
  525. console.log( res);
  526. }
  527. });
  528. return false; */
  529. uni.navigateTo({
  530. url:'../user/addCar/cailist'
  531. })
  532. },
  533. goMUsers(){
  534. if(!this.userInfo){
  535. this.authorizShow=true;
  536. }else{
  537. var managerInfo={
  538. name:this.managerInfo.name,
  539. shopInfo:{
  540. shopName:this.managerInfo.shopInfo.shopName,
  541. provinceName:this.managerInfo.shopInfo.provinceName,
  542. cityName:this.managerInfo.shopInfo.cityName,
  543. areaName:this.managerInfo.shopInfo.areaName,
  544. Address:this.managerInfo.shopInfo.Address,
  545. },
  546. avatar:this.managerInfo.avatar,
  547. phone:this.managerInfo.phone,
  548. shopID:this.managerInfo.shopInfo.id
  549. }
  550. uni.navigateTo({
  551. url:'../index/personalCard?adInfo='+JSON.stringify(managerInfo)
  552. })
  553. }
  554. },
  555. goGoods(item){
  556. uni.navigateTo({
  557. url:'../shop/goodsDetail?id='+item.id
  558. })
  559. /* if(!this.userInfo){
  560. if(this.exitNum!=1){
  561. this.authorizShow=true;
  562. }else{
  563. this.$common.automaticlogin().then(val => {
  564. this.userInfo=this.$store.state.userInfo;
  565. this.wxOpenData=this.$store.state.wxOpenData;
  566. this.exitNum=''
  567. this.$store.commit('mutationsexitNum', '')
  568. uni.navigateTo({
  569. url:'../shop/goodsDetail?id='+item.id
  570. })
  571. })
  572. }
  573. }else{
  574. uni.navigateTo({
  575. url:'../shop/goodsDetail?id='+item.id
  576. })
  577. } */
  578. /* if(!this.userInfo){
  579. this.authorizShow=true;
  580. }else{
  581. uni.navigateTo({
  582. url:'../shop/goodsDetail?id='+item.id
  583. })
  584. } */
  585. },
  586. goJk(item){
  587. uni.navigateTo({
  588. url:'../activity/jkDetail?id='+item.id
  589. })
  590. /* if(!this.userInfo){
  591. this.authorizShow=true;
  592. }else{
  593. uni.navigateTo({
  594. url:'../activity/jkDetail?id='+item.id
  595. })
  596. } */
  597. /* if(!this.userInfo){
  598. if(this.exitNum!=1){
  599. this.authorizShow=true;
  600. }else{
  601. this.$common.automaticlogin().then(val => {
  602. this.userInfo=this.$store.state.userInfo;
  603. this.wxOpenData=this.$store.state.wxOpenData;
  604. this.exitNum=''
  605. this.$store.commit('mutationsexitNum', '')
  606. uni.navigateTo({
  607. url:'../activity/jkDetail?id='+item.id
  608. })
  609. })
  610. }
  611. }else{
  612. uni.navigateTo({
  613. url:'../activity/jkDetail?id='+item.id
  614. })
  615. } */
  616. },
  617. goRoter(item){
  618. /* if(!this.userInfo){
  619. if(this.exitNum!=1){
  620. this.authorizShow=true;
  621. }else{
  622. this.$common.automaticlogin().then(val => {
  623. this.userInfo=this.$store.state.userInfo;
  624. this.wxOpenData=this.$store.state.wxOpenData;
  625. this.exitNum=''
  626. this.$store.commit('mutationsexitNum', '')
  627. this.goRoter2(item)
  628. })
  629. }
  630. }else{
  631. this.goRoter2(item)
  632. } */
  633. this.$common.automaticlogin().then(val => {
  634. this.userInfo=this.$store.state.userInfo;
  635. this.wxOpenData=this.$store.state.wxOpenData;
  636. this.exitNum=''
  637. this.$store.commit('mutationsexitNum', '')
  638. this.goRoter2(item)
  639. })
  640. },
  641. goRoter2(item){
  642. console.log(item)
  643. if(!this.userInfo){
  644. //this.authorizShow=true;
  645. }else{
  646. if(item.bizType==0){
  647. if(item.name=='新车'){ //
  648. uni.navigateTo({
  649. url:'../subPack/newCar'
  650. })
  651. }else if(item.name=='二手车'){
  652. uni.navigateTo({
  653. url:'usedCar'
  654. })
  655. }else if(item.name=='爱车估价'){
  656. uni.navigateTo({
  657. url:'evaluation'
  658. })
  659. }else if(item.sortId==18){ //领券中心
  660. uni.navigateTo({
  661. url:'receiveCoupon'
  662. })
  663. }else if(item.sortId==19){ //救援测试
  664. uni.navigateTo({
  665. url:'rescue'
  666. })
  667. }
  668. else{
  669. uni.showToast({
  670. title: '敬请期待',
  671. icon:'none',
  672. duration: 3000
  673. });
  674. }
  675. }else if(item.bizType==1){ //紧急救援
  676. uni.navigateTo({
  677. url:'rescue'
  678. })
  679. /* uni.showToast({
  680. title: '敬请期待',
  681. icon:'none',
  682. duration: 3000
  683. }); */
  684. }else if(item.bizType==2){ //钣金喷漆
  685. uni.navigateTo({
  686. url:'paint'
  687. })
  688. /* uni.navigateTo({
  689. url:'receiveCoupon'
  690. }) */
  691. }else if(item.bizType==3){ //保养
  692. uni.navigateTo({
  693. url:'maintain'
  694. })
  695. }else if(item.bizType==4){ //在线预约
  696. uni.navigateTo({
  697. url:'onlineBooking?naShopId='+item.naShopId
  698. })
  699. }else if(item.bizType==5){ //导航
  700. this.getShopinfo(5,item.reShopId)
  701. }else if(item.bizType==6){ //联系本店
  702. this.getShopinfo(6,item.orShopId)
  703. }else if(item.bizType==7){ //7门店列表
  704. uni.navigateTo({
  705. url:'shopList'
  706. })
  707. }else if(item.bizType==8){ //我的会员卡
  708. uni.navigateTo({
  709. url:'vipCard'
  710. })
  711. }else if(item.bizType==9){ //我的优惠券
  712. uni.navigateTo({
  713. url:'discountCard'
  714. })
  715. }else if(item.bizType==10){ //我的订单
  716. uni.navigateTo({
  717. url:'../user/myOrder/myOrder'
  718. })
  719. }else if(item.bizType==11){ //我的预约
  720. uni.navigateTo({
  721. url:'../user/myBespeak'
  722. })
  723. }else if(item.bizType==12){ //历史消费
  724. uni.navigateTo({
  725. url:'../user/historySpend'
  726. })
  727. }else if(item.bizType==12){ //历史消费
  728. uni.navigateTo({
  729. url:'../user/historySpend'
  730. })
  731. }else if(item.bizType==13){ //车检报告
  732. uni.navigateTo({
  733. url:'../user/checkReport'
  734. })
  735. }else if(item.bizType==14){ //指定商品分类
  736. uni.setStorage({
  737. key: 'shopcategoryID',
  738. data: item.bizId,
  739. success: function () {
  740. getApp().globalData.shopcategoryID=item.bizId;
  741. uni.switchTab({
  742. url:'../shop/shop?shopcategoryID='+ item.bizId
  743. })
  744. }
  745. });
  746. }else if(item.bizType==15){ //商品详情
  747. uni.navigateTo({
  748. url:'../shop/goodsDetail?id='+item.bizId
  749. })
  750. }else if(item.bizType==16){ //积分商城
  751. uni.navigateTo({
  752. url:'../integral/integral'
  753. })
  754. }else if(item.bizType==17){ //公司介绍
  755. uni.navigateTo({
  756. url:'../subPack/aboutUS?unionID='+this.userInfo.unionId
  757. })
  758. }else if(item.bizType==18){ //领券中心
  759. uni.navigateTo({
  760. url:'receiveCoupon'
  761. })
  762. /* uni.navigateTo({
  763. url:'rescue'
  764. }) */
  765. }else if(item.bizType==19){
  766. //我的车库pages/user/addCar/cailist
  767. uni.navigateTo({
  768. url:'../user/addCar/cailist'
  769. })
  770. }
  771. // uni.navigateTo({
  772. // url:url
  773. // })
  774. }
  775. },
  776. decryptPhoneNumber: function(e) {
  777. console.log(e);
  778. this.code=e.detail.code
  779. this.wxPhoneLogin()
  780. this.authorizShow=false;
  781. },
  782. wxgologin(){
  783. var that=this;
  784. uni.getUserProfile({
  785. lang:'zh_CN',
  786. desc:'登录',
  787. success:(res)=>{
  788. console.log(res);
  789. that.wxdata=res;
  790. uni.setStorage({
  791. key: 'wxdata',
  792. data: res,
  793. success: function () {
  794. that.uniLogin()
  795. }
  796. });
  797. },
  798. fail:(res)=>{
  799. console.log(res)
  800. }
  801. });
  802. },
  803. uniLogin(){
  804. var that=this;
  805. uni.login({
  806. provider: 'weixin',
  807. success: function (loginRes) {
  808. console.log(loginRes);
  809. that.getWxOpenID(loginRes)
  810. }
  811. });
  812. },
  813. getWxOpenID(e){
  814. var that=this;
  815. // uni.showLoading({
  816. // title: '加载中'
  817. // })
  818. this.$http('miniApp2/sys/getWxOpenID', {
  819. code:e.code,
  820. unionId:this.unionId,
  821. shareId:this.shareID
  822. },'GET').then(res => {
  823. console.log(res.code);
  824. console.log("授权信息")
  825. console.log(res)
  826. //uni.hideLoading();
  827. if(res.code!=0){
  828. //uni.hideLoading();
  829. var msg=res.msg
  830. if(!msg){
  831. msg='授权失败'
  832. }
  833. console.log(msg);
  834. }
  835. this.wxOpenData=res.data;
  836. this.themeColor=res.data.themeColor
  837. //this.themeColor='FFFFFF'
  838. this.getwxLoing=true;
  839. uni.setNavigationBarTitle({
  840. title:this.wxOpenData.miniAppName
  841. })
  842. if(this.themeColor=='6F2BE8'){
  843. var backgroundImage='/static/tabimg/index6F2BE8.png'
  844. }
  845. if(this.themeColor=='1677FF'){
  846. var backgroundImage='/static/tabimg/index1677FF.png'
  847. }
  848. if(this.themeColor=='FF4F00'){
  849. var backgroundImage='/static/tabimg/indexFF4F00.png'
  850. }
  851. if(this.themeColor=='D53533'){
  852. var backgroundImage='/static/tabimg/index1.png'
  853. }
  854. uni.setTabBarStyle({
  855. // color: '#FF0000',
  856. //selectedColor: '#'+this.themeColor,
  857. selectedColor: '#222222',
  858. })
  859. /* uni.setTabBarItem({
  860. index: 0,
  861. text: '首页',
  862. selectedIconPath: backgroundImage
  863. }) */
  864. if(res.code==0){
  865. that.queryHomeCardList()
  866. }
  867. //that.wxPhoneLogin()
  868. this.$store.commit('mutationswxOpenData', that.wxOpenData)
  869. uni.setStorage({
  870. key: 'wxOpenData',
  871. data: that.wxOpenData,
  872. success: function () {
  873. // that.uniLogin()
  874. }
  875. });
  876. uni.setStorage({
  877. key: 'themeColor',
  878. data: that.themeColor,
  879. success: function () {
  880. // that.uniLogin()
  881. console.log("themeColor=="+that.themeColor)
  882. }
  883. });
  884. if(this.wxOpenData.loginInfo){
  885. this.$store.commit('mutationsuserInfo', that.wxOpenData.loginInfo.openUser)
  886. this.userInfo=that.wxOpenData.loginInfo.openUser
  887. that.queryManagerInfo()
  888. that.tabData()
  889. uni.setStorage({
  890. key: 'userInfo',
  891. data: that.wxOpenData.loginInfo.openUser,
  892. success: function () {
  893. that.getCarList()
  894. }
  895. });
  896. }else{
  897. //this.authorizShow=true;
  898. }
  899. if(res.data.loginInfo.discount){
  900. that.discount=res.data.loginInfo.discount;
  901. if(that.discount==2){
  902. that.bizUserId=res.data.loginInfo.bizUserId;
  903. }
  904. if(that.shareID){
  905. that.getCouponList()
  906. }
  907. }
  908. if(res.data.loginInfo.coNoNewCustMsg){ //车主合伙人二维码提示
  909. uni.showModal({
  910. title: '提示',
  911. content:res.data.loginInfo.coNoNewCustMsg,
  912. success: function(resTKk) {
  913. }
  914. });
  915. }
  916. //console.log("优惠券")
  917. })
  918. },
  919. wxPhoneLogin(){
  920. var that=this;
  921. this.$http('miniApp2/sys/wxPhoneLogin', {
  922. appId:this.ext.appId,
  923. unionId:this.unionId,
  924. code:this.code,
  925. openId:this.wxOpenData.openid,
  926. shareId:this.shareID
  927. },'POST').then(res => {
  928. var data = res.data;
  929. if(data.loginInfo){
  930. this.userInfo=data.loginInfo.openUser;
  931. this.customerInfo=data.loginInfo.customerInfo
  932. this.$store.commit('mutationsuserInfo', this.userInfo);
  933. this.$store.commit('mutationswxOpenData', data);
  934. uni.setStorage({
  935. key: 'userInfo',
  936. data: data.loginInfo.openUser,
  937. success: function () {
  938. that.getCarList()
  939. that.queryHomeCardList()
  940. that.queryManagerInfo();
  941. if(data.loginInfo.coCouponsMsg){
  942. uni.hideLoading()
  943. that.coCouponsMsg =data.loginInfo.coCouponsMsg;
  944. that.ownerCoupon()
  945. }
  946. if(data.loginInfo.coNoNewCustMsg){
  947. //console.log(data.loginInfo.coNoNewCustMsg)
  948. uni.hideLoading()
  949. that.coNoNewCustMsg =data.loginInfo.coNoNewCustMsg;
  950. that.coNoNewCust()
  951. }
  952. if(data.loginInfo.discount){
  953. that.discount=data.loginInfo.discount;
  954. if(that.discount==2){
  955. that.bizUserId=data.loginInfo.bizUserId;
  956. }
  957. if(that.shareID&&that.discount==2){
  958. that.getCouponList()
  959. }
  960. }
  961. }
  962. });
  963. if(!this.customerInfo.wxMiniV2OpenID){
  964. this.seeQr()
  965. }
  966. }
  967. })
  968. },
  969. coNoNewCust(){
  970. console.log(111111)
  971. var that=this;
  972. uni.showModal({
  973. title: '提示',
  974. content: that.coNoNewCustMsg,
  975. success: function(resTK) {
  976. }
  977. });
  978. },
  979. ownerCoupon(){
  980. console.log(22222)
  981. var that=this;
  982. uni.showModal({
  983. title: '提示',
  984. content: that.coCouponsMsg,
  985. cancelText:'回到首页',
  986. confirmText:'查看',
  987. success: function(resTK) {
  988. if (resTK.confirm) {
  989. uni.navigateTo({
  990. url:'discountCard'
  991. })
  992. }
  993. }
  994. });
  995. },
  996. getCouponList(){
  997. if(this.discount!=2){
  998. var params={
  999. discount:this.discount
  1000. }
  1001. }else{
  1002. var params={
  1003. discount:this.discount,
  1004. bizId:this.bizUserId
  1005. }
  1006. }
  1007. var that=this;
  1008. this.$http('opencoupon/getCouponList', params, 'GET').then(res => {
  1009. var list = res.data;
  1010. if(list.length>0){
  1011. uni.showModal({
  1012. title: '提示',
  1013. content: '您有优惠券待领取',
  1014. cancelText:'回到首页',
  1015. confirmText:'查看',
  1016. success: function(resTK) {
  1017. if (resTK.confirm) {
  1018. uni.navigateTo({
  1019. url:'discountDlq?bizUserId='+that.bizUserId+'&discount='+that.discount
  1020. })
  1021. }
  1022. }
  1023. });
  1024. }
  1025. })
  1026. },
  1027. getCarList(){
  1028. /* this.$http('opencarOwnerHome/queryCarInfoList', {
  1029. },'GET').then(res => {
  1030. if(res.code==401){
  1031. this.carInfo=''
  1032. this.$store.commit('mutationscarInfo', '')
  1033. }else{
  1034. this.carInfo=res.data[0]
  1035. this.$store.commit('mutationscarInfo', this.carInfo)
  1036. this.jsTime()
  1037. }
  1038. }) */
  1039. this.$http('opencarOwnerHome/queryDefaultCarInfo', {
  1040. },'GET').then(res => {
  1041. if(res.code==401){
  1042. this.carInfo=''
  1043. this.$store.commit('mutationscarInfo', '')
  1044. }else{
  1045. if(res.data){
  1046. this.carInfo = res.data
  1047. }else{
  1048. this.carInfo=''
  1049. }
  1050. this.$store.commit('mutationscarInfo', this.carInfo)
  1051. this.jsTime()
  1052. }
  1053. })
  1054. },
  1055. jsTime(){
  1056. if(this.carInfo.insuranceExpireDate){
  1057. if (Number(new Date().getTime()) > (Number(new Date(this.carInfo.insuranceExpireDate.replace(/-/g, '/')).getTime()) || 0)) {
  1058. console.log("现在时间大于开始时间")
  1059. this.InsuranceExpireDate = 0
  1060. } else {
  1061. this.clock()
  1062. }
  1063. }else{
  1064. this.InsuranceExpireDate=''
  1065. }
  1066. if(this.carInfo.nextCareDate){
  1067. if (Number(new Date().getTime()) > (Number(new Date(this.carInfo.nextCareDate.replace(/-/g, '/')).getTime()) || 0)) {
  1068. this.NextCareDate = 0
  1069. } else {
  1070. this.clock2()
  1071. }
  1072. }else{
  1073. this.NextCareDate = ''
  1074. }
  1075. if(this.carInfo.nextAuditDate){
  1076. if (Number(new Date().getTime()) > (Number(new Date(this.carInfo.nextAuditDate.replace(/-/g, '/')).getTime()) || 0)) {
  1077. this.NextAuditDate = 0
  1078. } else {
  1079. this.clock3()
  1080. }
  1081. }else{
  1082. this.NextAuditDate=''
  1083. }
  1084. },
  1085. clock () {
  1086. let _this = this
  1087. let today = new Date() // 当前时间
  1088. let h = today.getHours()
  1089. let m = today.getMinutes()
  1090. let s = today.getSeconds()
  1091. let stopTime = new Date(_this.carInfo.insuranceExpireDate.replace(/-/g, '/')) // 结束时间
  1092. let stopH = stopTime.getHours()
  1093. let stopM = stopTime.getMinutes()
  1094. let stopS = stopTime.getSeconds()
  1095. let shenyu = stopTime.getTime() - today.getTime() // 倒计时毫秒数
  1096. let shengyuD = parseInt(shenyu / (60 * 60 * 24 * 1000)) // 转换为天
  1097. this.InsuranceExpireDate=shengyuD+1;
  1098. // setTimeout(_this.clock, 500)
  1099. },
  1100. clock2 () {
  1101. let _this = this
  1102. let today = new Date() // 当前时间
  1103. let stopTime = new Date(_this.carInfo.nextCareDate.replace(/-/g, '/')) // 结束时间
  1104. let stopH = stopTime.getHours()
  1105. let stopM = stopTime.getMinutes()
  1106. let stopS = stopTime.getSeconds()
  1107. let shenyu = stopTime.getTime() - today.getTime() // 倒计时毫秒数
  1108. let shengyuD = parseInt(shenyu / (60 * 60 * 24 * 1000)) // 转换为天
  1109. this.NextCareDate=shengyuD+1;
  1110. // setTimeout(_this.clock, 500)
  1111. },
  1112. clock3 () {
  1113. let _this = this
  1114. let today = new Date() // 当前时间
  1115. let stopTime = new Date(_this.carInfo.nextAuditDate.replace(/-/g, '/')) // 结束时间
  1116. let shenyu = stopTime.getTime() - today.getTime() // 倒计时毫秒数
  1117. let shengyuD = parseInt(shenyu / (60 * 60 * 24 * 1000)) // 转换为天
  1118. this.NextAuditDate=shengyuD+1;
  1119. // setTimeout(_this.clock, 500)
  1120. },
  1121. queryManagerInfo(){
  1122. console.log("11")
  1123. this.$http('openHome/queryManagerInfo', {
  1124. },'GET').then(res => {
  1125. this.managerInfo=res.data
  1126. })
  1127. },
  1128. queryHomeCardList(){
  1129. //console.log(this.wxOpenData)
  1130. var that=this;
  1131. uni.showLoading({
  1132. title: '加载中'
  1133. })
  1134. this.$http('openHome/queryHomeCardList', {
  1135. unionId:this.unionId
  1136. },'GET').then(res => {
  1137. uni.hideLoading();
  1138. this.homeCardList=res.data;
  1139. this.appletHomeSetting=res.data.appletHomeSetting;
  1140. var appletHomeSetting=this.appletHomeSetting
  1141. if(this.homeCardList.activityModules.length>0){
  1142. this.activityModulesShow=true
  1143. }
  1144. uni.setStorage({
  1145. key: 'openMCar',
  1146. data: res.data.openMCar,
  1147. success: function () {
  1148. that.getCarList()
  1149. }
  1150. });
  1151. uni.setStorage({
  1152. key: 'carAddImage',
  1153. data: appletHomeSetting.carAddImage,
  1154. success: function () {
  1155. }
  1156. });
  1157. uni.setTabBarItem({
  1158. index: 0,
  1159. text: '首页',
  1160. iconPath:appletHomeSetting.homeImageUnCheck,
  1161. selectedIconPath: appletHomeSetting.homeImageCheck
  1162. })
  1163. uni.setTabBarItem({
  1164. index: 1,
  1165. text: '商城',
  1166. iconPath:appletHomeSetting.mallImageUnCheck,
  1167. selectedIconPath: appletHomeSetting.mallImageCheck
  1168. })
  1169. uni.setTabBarItem({
  1170. index: 2,
  1171. text: '活动',
  1172. iconPath:appletHomeSetting.activityImageUnCheck,
  1173. selectedIconPath: appletHomeSetting.activityImageCheck
  1174. })
  1175. uni.setTabBarItem({
  1176. index: 3,
  1177. text: '门店',
  1178. iconPath:appletHomeSetting.storeImageUnCheck,
  1179. selectedIconPath: appletHomeSetting.storeImageCheck
  1180. })
  1181. uni.setTabBarItem({
  1182. index: 4,
  1183. text: '我的',
  1184. iconPath:appletHomeSetting.mineImageUnCheck,
  1185. selectedIconPath: appletHomeSetting.mineImageCheck
  1186. })
  1187. })
  1188. },
  1189. getShopinfo(num,shopId){
  1190. var that=this;
  1191. uni.showLoading({
  1192. title: '加载中'
  1193. })
  1194. if(!shopId){
  1195. shopId=''
  1196. }
  1197. this.$http('openmy/getShopinfo', {
  1198. shopId:shopId
  1199. },'GET').then(res => {
  1200. uni.hideLoading();
  1201. var res=res.data
  1202. if(num==5){
  1203. uni.openLocation({
  1204. latitude:Number(res.lat),
  1205. longitude:Number(res.lng),
  1206. name: res.shopName,
  1207. address: res.address,
  1208. success: function() {
  1209. console.log('success');
  1210. },
  1211. fail(err) {
  1212. console.log(err)
  1213. }
  1214. });
  1215. }else{
  1216. uni.makePhoneCall({
  1217. phoneNumber: res.mobilePhone
  1218. });
  1219. }
  1220. })
  1221. }
  1222. },
  1223. onShareAppMessage(){
  1224. }
  1225. }
  1226. </script>
  1227. <style scoped>
  1228. .content{
  1229. background: #F4F4F4;
  1230. }
  1231. .top{
  1232. position: fixed;
  1233. left: 0;
  1234. width: 750rpx;
  1235. top: 0;
  1236. }
  1237. .logoImg{
  1238. height: 72rpx;width: 492rpx;
  1239. }
  1240. .logoBox{
  1241. height: 78rpx;
  1242. }
  1243. .logoBox{
  1244. padding-left: 20rpx;
  1245. padding-bottom: 20rpx;
  1246. padding-top: 8rpx;
  1247. }
  1248. .topCont{
  1249. padding: 8rpx 20rpx;
  1250. height: 100rpx;
  1251. /* padding-bottom: 210rpx; */
  1252. }
  1253. .carBox{
  1254. background: #FFFFFF;
  1255. border-radius: 17rpx;
  1256. padding-top: 20rpx;
  1257. padding-right: 24rpx;
  1258. padding-left: 30rpx;
  1259. }
  1260. .carBox2{
  1261. display: flex;
  1262. justify-content: space-between;
  1263. }
  1264. .carLogoBg{
  1265. width: 123rpx;
  1266. height: 127rpx;
  1267. }
  1268. .carLogo{
  1269. width: 42rpx;height: 42rpx;border-radius: 22rpx;
  1270. }
  1271. .carInfomodel{
  1272. font-size: 30rpx;
  1273. color: #0B0B0B;
  1274. line-height: 42rpx;
  1275. font-weight: 500;
  1276. padding-left: 12rpx;
  1277. max-width: 270rpx;
  1278. }
  1279. .carTop{
  1280. display: flex;
  1281. }
  1282. .carXia{
  1283. width: 12rpx;height: 9rpx;
  1284. margin-left: 4rpx;margin-top: 18rpx;
  1285. }
  1286. .plateNumber{
  1287. color: #0B0B0B;padding-right: 20rpx;
  1288. line-height: 42rpx;
  1289. font-size: 22rpx;padding-left: 20rpx;
  1290. }
  1291. .carBj{
  1292. width: 12rpx;height: 15rpx;margin-top: 16rpx;
  1293. }
  1294. .carBq{
  1295. display: flex;
  1296. width: 446rpx;
  1297. height: 47rpx;
  1298. background: #FBF0E4;
  1299. border-radius: 10rpx;
  1300. margin-top: 22rpx;
  1301. }
  1302. .carDui{
  1303. width: 24rpx;height: 24rpx;
  1304. }
  1305. .carBqLine{
  1306. display: flex;
  1307. padding-left: 20rpx;padding-right: 10rpx;padding-top: 10rpx;
  1308. font-size: 22rpx;
  1309. color: #A26D4F;line-height: 26rpx;
  1310. }
  1311. .carTitle{
  1312. padding-left: 6rpx;
  1313. }
  1314. .modular{
  1315. background: #FFFFFF;
  1316. border-radius: 17rpx;
  1317. padding: 34rpx 0 4rpx 0;
  1318. }
  1319. .modularMk{
  1320. width: 25%;text-align: center;
  1321. padding-bottom: 30rpx;
  1322. }
  1323. .modularLine{
  1324. display: flex;flex-wrap: wrap;
  1325. }
  1326. .modularLogo{
  1327. width: 97rpx;height: 97rpx;
  1328. }
  1329. .modularTitle{
  1330. /* font-weight: 600; */
  1331. font-size: 24rpx;
  1332. color: #222222;line-height: 40rpx;
  1333. }
  1334. .modularTitle2{
  1335. font-size: 24rpx;
  1336. color: #222222;line-height: 40rpx;
  1337. }
  1338. .contBox{
  1339. padding: 20rpx;
  1340. margin-top: 160rpx;
  1341. /* margin-top: -200rpx; */
  1342. }
  1343. .swiper2{
  1344. height: 200rpx;
  1345. }
  1346. .swiper-item2Img{
  1347. height: 200rpx;
  1348. width: 100%;
  1349. border-radius: 10rpx;
  1350. }
  1351. /* .swiper-item2{
  1352. height: 200rpx;
  1353. } */
  1354. .advertisement{
  1355. background: #FFFFFF;
  1356. margin-top: 20rpx;
  1357. border-radius: 16rpx;
  1358. /* height: 200rpx; */
  1359. /* padding: 12rpx 15rpx; */
  1360. }
  1361. .activeGoodsIcon{
  1362. width: 55rpx;height: 19rpx;margin-top: 10rpx;
  1363. }
  1364. .goodsTabBox{
  1365. display: flex;
  1366. }
  1367. .goodsTab{
  1368. text-align: center;
  1369. font-weight: 400;
  1370. font-size: 28rpx;
  1371. color: #8B8B8B;
  1372. line-height: 40rpx;
  1373. padding-right: 50rpx;
  1374. }
  1375. .goodsBox{
  1376. margin-top: 20rpx;
  1377. }
  1378. .goodsACt{
  1379. font-weight: 500;
  1380. font-size: 28rpx;
  1381. color: #222222;
  1382. }
  1383. .goodsLine{
  1384. background: #FFFFFF;border-radius: 16rpx;
  1385. padding: 24rpx;
  1386. }
  1387. .goodsIcon{
  1388. width: 246rpx;border-radius: 12rpx;
  1389. height: 246rpx;
  1390. }
  1391. .goodsLine{
  1392. display: flex;
  1393. }
  1394. .goodsName{
  1395. font-weight: 500;
  1396. font-size: 28rpx;
  1397. color: #222222;
  1398. line-height: 40rpx;
  1399. }
  1400. .goodsRight{
  1401. padding-left: 24rpx;
  1402. width: 438rpx;
  1403. display: flex;
  1404. flex-direction: column;justify-content: space-between;
  1405. }
  1406. .goodsMs{
  1407. font-weight: 400;padding-top: 5rpx;
  1408. font-size: 20rpx;
  1409. color: #8B8B8B;
  1410. line-height: 28rpx;
  1411. }
  1412. .goodsCBox{
  1413. display: flex;justify-content: space-between;
  1414. }
  1415. .goodsTitle{
  1416. height: 25rpx;line-height: 25rpx;font-size: 18rpx;
  1417. color: #EC0F0A;padding: 0 10rpx;
  1418. background: #FEE6E5;
  1419. }
  1420. .goodsCRight{
  1421. width: 147rpx;
  1422. height: 58rpx;
  1423. background: #EC0F0A;
  1424. border-radius: 29rpx;
  1425. line-height: 58rpx;
  1426. text-align: center;
  1427. font-size: 24rpx;
  1428. color: #FFFFFF;
  1429. }
  1430. .goodsPriceBox{
  1431. line-height: 45rpx;
  1432. font-size: 22rpx;
  1433. color: #8B8B8B;
  1434. }
  1435. .goodsPrice1{
  1436. font-weight: 500;
  1437. font-size: 20rpx;
  1438. color: #EC0F0A;
  1439. }
  1440. .goodsPrice2{
  1441. font-weight: 500;
  1442. font-size: 34rpx;
  1443. color: #EC0F0A;
  1444. }
  1445. .goodsKbox{
  1446. display: flex;flex-wrap: wrap;
  1447. }
  1448. .goosK1 {
  1449. height: 25rpx;line-height: 25rpx;padding: 0 8rpx;
  1450. border: 1rpx solid #EC0F0A;font-size: 18rpx;
  1451. color: #EC0F0A;margin-right: 10rpx;
  1452. }
  1453. .goosK2{
  1454. height: 25rpx;line-height: 25rpx;padding: 0 8rpx;color: #000000;
  1455. border: 1rpx solid #FCD903;font-size: 18rpx;
  1456. }
  1457. .carAddImage{
  1458. width: 91rpx;height: 123rpx;
  1459. }
  1460. .nocarBox{
  1461. background: #FFFFFF;
  1462. border-radius: 17rpx;
  1463. padding: 12rpx 20rpx;
  1464. display: flex;
  1465. margin-top: 20rpx;
  1466. justify-content: space-between;
  1467. }
  1468. .addCarMs{
  1469. padding-left: 26rpx;padding-top: 32rpx;
  1470. }
  1471. .addCarMs1{
  1472. font-weight: 500;
  1473. font-size: 30rpx;
  1474. color: #222222;
  1475. }
  1476. .addCarMs1{
  1477. font-weight: 500;
  1478. font-size: 30rpx;
  1479. color: #222222;
  1480. }
  1481. .addCarMs2{
  1482. font-weight: 400;
  1483. font-size: 24rpx;
  1484. color: #999999;
  1485. }
  1486. .addCarBtn{
  1487. width: 183rpx;
  1488. height: 53rpx;
  1489. background: #222222;
  1490. border-radius: 27rpx;
  1491. font-weight: 600;
  1492. font-size: 28rpx;
  1493. color: #FCD903;
  1494. text-align: center;
  1495. line-height: 53rpx;
  1496. margin-top: 40rpx;
  1497. }
  1498. .authorizBox{
  1499. width: 100vw;
  1500. height: 100vh;
  1501. background: rgba(0, 0, 0, 0.5);
  1502. position: fixed;
  1503. top: 0;
  1504. left: 0;
  1505. }
  1506. .authorizCont{
  1507. margin-top: 30vh;
  1508. width: 564rpx;
  1509. height: 408rpx;
  1510. background: #FFFFFF;
  1511. border-radius: 24rpx;
  1512. margin-left: 93rpx;
  1513. position: relative;
  1514. }
  1515. .authorizCloseImg{
  1516. width: 62rpx;
  1517. height: 62rpx;
  1518. }
  1519. .sqLogoBox{
  1520. width: 180rpx;
  1521. height: 180rpx;
  1522. background: #FFFFFF;
  1523. border-radius: 90rpx;
  1524. text-align: center;
  1525. position: absolute;
  1526. top: -50rpx;
  1527. left: 192rpx;
  1528. }
  1529. .authorizName{
  1530. color: #333333;
  1531. line-height: 42rpx;
  1532. font-size: 30rpx;
  1533. text-align: center;
  1534. padding-top: 58rpx;
  1535. }
  1536. .authorizMs{
  1537. color: #999999;
  1538. line-height: 36rpx;
  1539. font-size: 26rpx;
  1540. width: 452rpx;
  1541. padding-top: 24rpx;
  1542. text-align: center;
  1543. margin-left: 56rpx;
  1544. }
  1545. .authorizContbutton{
  1546. width: 210rpx;
  1547. height: 66rpx;
  1548. background: #D53533;
  1549. border-radius: 44rpx;
  1550. line-height: 66rpx;
  1551. text-align: center;
  1552. font-size:30rpx;
  1553. color: #FFFFFF;
  1554. margin-left:40rpx;
  1555. }
  1556. .qrBox{
  1557. position: fixed;
  1558. width: 100vw;
  1559. height: 100vh;
  1560. background: rgba(0,0,0,0.5);
  1561. left: 0;
  1562. top: 0;
  1563. z-index: 11;
  1564. display: flex;
  1565. justify-content: center;
  1566. align-items: center;
  1567. flex-direction: column;
  1568. }
  1569. .qrimgBox{
  1570. width: 562rpx;
  1571. height: 704rpx;
  1572. background: #FFFFFF;
  1573. border-radius: 24rpx;
  1574. }
  1575. .qrTitle{
  1576. font-size: 30rpx;
  1577. font-family: PingFangSC-Medium, PingFang SC;
  1578. font-weight: 500;
  1579. color: #333333;
  1580. border-bottom: 1px solid #EEEEEE;
  1581. text-align: center;
  1582. line-height: 90rpx;
  1583. position: relative;
  1584. }
  1585. .qrimgchahao{
  1586. width: 38rpx;
  1587. height: 38rpx;
  1588. position: absolute;
  1589. top: 26rpx;
  1590. right: 20rpx;
  1591. }
  1592. .qrms{
  1593. font-weight: 400;
  1594. color: #999999;
  1595. line-height: 37rpx;
  1596. font-size: 26rpx;
  1597. padding-top: 23rpx;
  1598. text-align: center;
  1599. }
  1600. .qrms2{
  1601. font-weight: 400;
  1602. color: #999999;
  1603. line-height: 37rpx;
  1604. font-size: 26rpx;
  1605. text-align: center;
  1606. }
  1607. .qrimg{
  1608. width: 328rpx;
  1609. height: 328rpx;
  1610. }
  1611. .qrBtn{
  1612. width: 292rpx;
  1613. height: 64rpx;
  1614. background: #D53533;
  1615. border-radius: 32rpx;
  1616. color: #FFFFFF;
  1617. line-height: 64rpx;
  1618. text-align: center;
  1619. margin: 0 auto;
  1620. margin-top:40rpx;
  1621. }
  1622. .adviser{
  1623. background: #FFFFFF;
  1624. border-radius: 10px;
  1625. display: flex;
  1626. justify-content: space-between;
  1627. padding: 18rpx 20rpx;
  1628. margin-bottom: 20rpx;
  1629. }
  1630. .adviserLeft{
  1631. display: flex;
  1632. }
  1633. .advisertx{
  1634. width: 62rpx;height: 62rpx;
  1635. }
  1636. .adviserNema{
  1637. color: #333333;font-size: 30rpx;
  1638. line-height: 62rpx;padding-left: 24rpx;
  1639. }
  1640. .adviserms{
  1641. width: 118rpx;
  1642. height: 36rpx;
  1643. border-radius: 4rpx;
  1644. border: 1px solid #D53533;
  1645. line-height: 36rpx;
  1646. text-align: center;
  1647. margin-top: 12rpx;
  1648. margin-left: 20rpx;
  1649. color: #D53533;
  1650. font-size: 24rpx;
  1651. }
  1652. .adviserJt{
  1653. width: 12rpx;
  1654. height: 20rpx;
  1655. margin-top: 20rpx;
  1656. }
  1657. .bxBox{
  1658. display: flex;
  1659. flex-wrap: wrap;
  1660. }
  1661. .bxline{
  1662. display: flex;
  1663. padding-bottom: 20rpx;
  1664. }
  1665. .bxline1{
  1666. width: 40%;
  1667. }
  1668. .bxline2{
  1669. width: 60%;
  1670. }
  1671. .bxlineTitle{
  1672. color: #333333;
  1673. font-size: 26rpx;
  1674. line-height: 37rpx;
  1675. padding-left: 10rpx;
  1676. }
  1677. .bxlineMs1{
  1678. line-height: 37rpx;
  1679. color: #D53533;
  1680. font-size: 26rpx;
  1681. padding-left: 12rpx;
  1682. }
  1683. .bxlineMs2{
  1684. line-height: 37rpx;
  1685. color: #999999;
  1686. font-size: 24rpx;
  1687. padding-left: 12rpx;
  1688. }
  1689. .bxlineIcon{
  1690. width: 34rpx;
  1691. height: 34rpx;
  1692. /* margin-left: 24rpx; */
  1693. }
  1694. .carTimeBox{
  1695. /* border-top: 1px solid #EEEEEE; */
  1696. /* padding-bottom: 15rpx; */
  1697. }
  1698. .plateNumberSpan1{
  1699. background: #0041FF;
  1700. border-radius: 4rpx 0rpx 0rpx 4rpx;
  1701. color: #FFFFFF;
  1702. border: 1px solid #0041FF;
  1703. padding: 0 6rpx;
  1704. }
  1705. .plateNumberSpan2{
  1706. color: #0B0B0B;
  1707. border: 1px solid #0041FF;
  1708. padding: 0 6rpx;
  1709. border-radius: 0rpx 4rpx 4rpx 0rpx;
  1710. }
  1711. .swiperTk{
  1712. height: 50vh;
  1713. width: 100vw;
  1714. }
  1715. .swiper-itemTk{
  1716. display: flex;
  1717. justify-content: flex-end;
  1718. flex-direction: column;
  1719. align-items: center;
  1720. height: 50vh;
  1721. padding-bottom: 50rpx;
  1722. }
  1723. .tkHdImg{
  1724. width: 80vw;margin-bottom: 10px;
  1725. }
  1726. .swiper-itemTk{
  1727. text-align: center;
  1728. }
  1729. .closeTk{
  1730. width: 60rpx;height: 60rpx;
  1731. }
  1732. </style>