index.vue 47 KB

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