index.vue 47 KB

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