index.vue 47 KB

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