index.vue 46 KB

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