user.vue 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271
  1. <template>
  2. <view class="box">
  3. <view class="top" :style="{background:'#'+themeColor}">
  4. <view class="customerMes">
  5. <image @click="updateUserInfo" v-if="headImg" :src="headImg" mode=""
  6. style="width: 88rpx;height: 88rpx;border-radius: 44rpx;"></image>
  7. <image @click="updateUserInfo" v-else src="../../static/img/icon_me.png" mode=""
  8. style="width: 88rpx;height: 88rpx;border-radius: 44rpx;"></image>
  9. <view class="mes">
  10. <view class="nick">
  11. <view class="nickName" v-if="nickName">{{nickName}}</view>
  12. <view class="grade" v-if="numList.levelName&&showSetting.isShowLevel">{{numList.levelName}}</view>
  13. </view>
  14. <view class="phone">{{phone}} <span @click="seeQr">{{numList.customerInfo.wxMiniV2OpenID?' / 已绑定微信>':' / 未绑定微信>'}}</span> </view>
  15. </view>
  16. </view>
  17. <view class="headerBox">
  18. <view class="quan" @click="gonavigateTo('../index/discountCard')" v-if="showSetting.isShowCoupon">
  19. <view class="numStr">{{numList.count?numList.count:0}}</view>
  20. <view class="nameStr">优惠券</view>
  21. </view>
  22. <view class="quan" v-if="showSetting.isShowIntergral" @click="gonavigateTo('../integral/integral?totalIntegral='+numList.totalIntegral)">
  23. <view class="numStr">{{numList.totalIntegral?numList.totalIntegral:0}}</view>
  24. <view class="nameStr">积分</view>
  25. </view>
  26. <view class="quan" v-if="showSetting.isShowCard" @click="gonavigateTo('../index/vipCard')">
  27. <view class="numStr">{{numList.cardNum?numList.cardNum:0}}</view>
  28. <view class="nameStr">会员卡</view>
  29. </view>
  30. </view>
  31. <view class="remindBox" v-if="numList.remindType!=0">
  32. <view class="remindLeft">
  33. <span>您有</span>
  34. <span style="color: #FFFD00;">{{numList.remindIntegral}}</span>
  35. <span v-if="numList.remindType==1">积分将于本月天内过期</span>
  36. <span v-if="numList.remindType==2">积分将于30天内过期</span>
  37. </view>
  38. <view class="useremind" @click="useremind">去使用></view>
  39. </view>
  40. </view>
  41. <view class="marginTop"></view>
  42. <!-- 卡制度-->
  43. <view v-if="showSetting.isShowCardSystem">
  44. <view >
  45. <swiper class="swiper2" circular :autoplay="false" :interval="interval"
  46. :duration="duration" :indicator-dots="true" indicator-color="#CCCCCC" :indicator-active-color="'#'+themeColor">
  47. <swiper-item v-for="(item,index) in f2csystemlist">
  48. <view class="cardBox">
  49. <view class="cardTOp" :style="{background:'url('+item.Banner+')'}">
  50. <img class="vipBsIcon" v-if="item.growthState==1" src="http://dmsphoto.66km.com.cn/thFiles/91FCABC6-775C-47CA-B7D4-3579A4DE8497.png" alt="">
  51. <view class="cardName">{{item.system.name}}</view>
  52. <!-- 当前卡制度-->
  53. <view class="cardtimeBox" v-if="item.growthState==1">
  54. <view class="cardtimeLeft">成长值 {{numList.f2ccard.growthValue}}/{{item.system.growthvalueup}}</view>
  55. <view class="cartimeRight">有效期 {{numList.f2ccard.expireTime.slice(0,10)}}</view>
  56. </view>
  57. <view class="cardtimeBox" v-if="item.growthState==2">
  58. <view class="cardtimeLeft">高于该等级</view>
  59. </view>
  60. <view class="cardtimeBox" v-if="item.growthState==3">
  61. <view class="cardtimeLeft">还差多{{item.addGrowth}}成长值</view>
  62. </view>
  63. </view>
  64. <view class="cardCont">
  65. <view class="cardLine" v-for="(c,cindex) in item.contents">
  66. <view class="cardLineImgBox"></view>
  67. <view class="cardlineTitle">{{c.title}}</view>
  68. </view>
  69. </view>
  70. </view>
  71. </swiper-item>
  72. </swiper>
  73. </view>
  74. </view>
  75. <!-- 我的订单 -->
  76. <view class="orderBox">
  77. <view class="orderTitle">我的订单</view>
  78. <view class="orderLIneBox">
  79. <view class="orderLine" @click="goorder(1)">
  80. <view class="orderImgBox">
  81. <view class="orderNum" v-show="numList.waitPurchaseSize>0">
  82. {{numList.waitPurchaseSize>99?'99+':numList.waitPurchaseSize}}
  83. </view>
  84. <image src="../../static/img/icon_daifukuan.png" mode="" class="orderLineImg"></image>
  85. </view>
  86. <view class="orderLineTxt">待付款</view>
  87. </view>
  88. <view class="orderLine" @click="goorder(5)">
  89. <view class="orderImgBox">
  90. <view class="orderNum" v-show="numList.waitGroupSize>0">
  91. {{numList.waitGroupSize>99?'99+':numList.waitGroupSize}}
  92. </view>
  93. <image src="../../static/timg/my_icon_4.png" mode="" class="orderLineImg"></image>
  94. </view>
  95. <view class="orderLineTxt">待成团</view>
  96. </view>
  97. <view class="orderLine" @click="goorder(2)">
  98. <view class="orderImgBox">
  99. <view class="orderNum" v-show="numList.waitServiceSize>0">
  100. {{numList.waitServiceSize>99?'99+':numList.waitServiceSize}}
  101. </view>
  102. <image src="../../static/img/icon_daifuwu.png" mode="" class="orderLineImg"></image>
  103. </view>
  104. <view class="orderLineTxt">待服务</view>
  105. </view>
  106. <view class="orderLine" @click="goorder(3)">
  107. <view class="orderImgBox">
  108. <view class="orderNum" v-show="numList.hasOverSize>0">
  109. {{numList.hasOverSize>99?'99+':numList.hasOverSize}}
  110. </view>
  111. <image src="../../static/img/icon_yiwancheng.png" mode="" class="orderLineImg"></image>
  112. </view>
  113. <view class="orderLineTxt">已完成</view>
  114. </view>
  115. <view class="orderLine" @click="goorder(0)">
  116. <view class="orderImgBox">
  117. <view class="orderNum" v-show="numList.allSize>0">{{numList.allSize>99?'99+':numList.allSize}}
  118. </view>
  119. <image src="../../static/img/icon_allorder.png" mode="" class="orderLineImg"></image>
  120. </view>
  121. <view class="orderLineTxt">全部</view>
  122. </view>
  123. </view>
  124. </view>
  125. <!-- 店铺信息 -->
  126. <view class="shopBox" v-if="userInfo&showSetting.isShowCardShop">
  127. <view class="shopCont">
  128. <view class="shopName">{{numList.shopInfo.shopName}}</view>
  129. <view class="shopRightBox">
  130. <image src="../../static/img/icon_ditu.png" mode="" class="shopRightImg"
  131. style="margin-right: 67rpx;" @click="map"></image>
  132. <image src="../../static/img/icon_phone.png" mode="" class="shopRightImg" @click="call"></image>
  133. </view>
  134. </view>
  135. <view v-if="numList.isShowScore == 1 && numList.isShowEvaluate == 1" class="appraiseBox">
  136. <view v-if="numList.isShowScore == 1 && numList.shopInfo.miniV2ShopScore" class="appraise">
  137. {{numList.shopInfo.miniV2ShopScore}}
  138. <span style='font-size: 26rpx; margin-left: 3rpx;'>分</span>
  139. </view>
  140. <view v-if="numList.isShowScore == 1 && !numList.shopInfo.miniV2ShopScore" class="appraise"
  141. style='font-size: 26rpx;'>暂无评分</span>
  142. </view>
  143. <view v-if="numList.isShowScore == 1" class="line"></view>
  144. <view @click="goShopAppraiseList()" v-if="numList.isShowEvaluate == 1 && numList.evaluateCount "
  145. class="appraiseCount">评价数
  146. {{numList.evaluateCount}}
  147. <image v-if="numList.isShowEvaluate == 1" class="rightArrow"
  148. src="../../static/timg/icon_arrow_right.png" mode=""></image>
  149. </view>
  150. <view v-if="numList.isShowEvaluate == 1 && !numList.evaluateCount " class="appraiseCount">暂无评价
  151. </view>
  152. </view>
  153. <view class="shopTime" v-if="numList.shopInfo.startTime && numList.shopInfo.endTime">
  154. {{numList.shopInfo.startTime}}-{{numList.shopInfo.endTime}}
  155. </view>
  156. <view class="address">
  157. <view class="Address">
  158. {{numList.shopInfo.provinceName?numList.shopInfo.provinceName:''}}
  159. {{numList.shopInfo.cityName?numList.shopInfo.cityName:''}}
  160. {{numList.shopInfo.areaName?numList.shopInfo.areaName:''}}
  161. {{numList.shopInfo.address?numList.shopInfo.address:''}}
  162. </view>
  163. <!-- <view class="distance" v-if="numList.shopInfo.distance&&numList.shopInfo.distance!= '0.00'">{{numList.shopInfo.distance}}km</view> -->
  164. </view>
  165. </view>
  166. <!-- 我的 相关 -->
  167. <view class="rowBoxBg">
  168. <view class="rowBox" @click="gonavigateTo('../user/expertServices')">
  169. <view class="leftView">
  170. <image src="../../static/img/icon_me1.png" mode="" class="liftIcon"></image>
  171. <view class="rowTitle">服务专家</view>
  172. </view>
  173. <image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
  174. </view>
  175. <view class="rowBox" @click="gonavigateTo('./addCar/cailist?type=3')">
  176. <view class="leftView">
  177. <image src="../../static/img/icon_me2.png" mode="" class="liftIcon"></image>
  178. <view class="rowTitle">我的车库</view>
  179. </view>
  180. <image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
  181. </view>
  182. <view class="rowBox" @click="gonavigateTo('myBespeak')">
  183. <view class="leftView">
  184. <image src="../../static/img/icon_me3.png" mode="" class="liftIcon"></image>
  185. <view class="rowTitle">我的预约</view>
  186. </view>
  187. <image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
  188. </view>
  189. <view class="rowBox" @click="gonavigateTo('historySpend')">
  190. <view class="leftView">
  191. <image src="../../static/img/icon_me4.png" mode="" class="liftIcon"></image>
  192. <view class="rowTitle">历史消费</view>
  193. </view>
  194. <image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
  195. </view>
  196. <view class="rowBox" @click="gonavigateTo('checkReport')">
  197. <view class="leftView">
  198. <image src="../../static/img/icon_me5.png" mode="" class="liftIcon"></image>
  199. <view class="rowTitle">车检报告</view>
  200. </view>
  201. <image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
  202. </view>
  203. <view class="rowBox" @click="gonavigateTo('../subPack/depositList')">
  204. <view class="leftView">
  205. <image src="../../static/timg/icon_jydd.png" mode="" class="liftIcon"></image>
  206. <view class="rowTitle">我的寄存</view>
  207. </view>
  208. <image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
  209. </view>
  210. <view class="rowBox" @click="gonavigateTo('../subPack/rescueOrder')">
  211. <view class="leftView">
  212. <image src="../../static/timg/sos.png" mode="" class="liftIcon"></image>
  213. <view class="rowTitle">救援订单</view>
  214. </view>
  215. <image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
  216. </view>
  217. </view>
  218. <view class="rowBoxBg">
  219. <view class="rowBox" @click="gonavigateTo('myAppraise')">
  220. <view class="leftView">
  221. <image src="../../static/img/icon_pingjia.png" mode="" class="liftIcon"></image>
  222. <view class="rowTitle">我的评价</view>
  223. </view>
  224. <image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
  225. </view>
  226. </view>
  227. <view class="rowBoxBg" v-if="kkshow">
  228. <view class="rowBox" @click="gonavigateTo('../partner/partner')"
  229. v-if="numList.customerInfo.pState==1&&numList.shopSettings.partnerDisabled">
  230. <view class="leftView">
  231. <image src="../../static/img/icon_hehuoren.png" mode="" class="liftIcon"></image>
  232. <view class="rowTitle">车主合伙人</view>
  233. </view>
  234. <image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
  235. </view>
  236. <view class="rowBox" @click="gonavigateTo('../referral/referral')"
  237. v-if="numList.customerInfo.rebateState==1&&numList.shopSettings.introductionDisabled">
  238. <view class="leftView">
  239. <image src="../../static/img/icon_kehuzhuanjieshao.png" mode="" class="liftIcon"></image>
  240. <view class="rowTitle">客户转介绍</view>
  241. </view>
  242. <image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
  243. </view>
  244. </view>
  245. <view class="rowBoxBg">
  246. <view class="rowBox" v-if="showSetting.isShowTel">
  247. <view class="leftView">
  248. <image src="../../static/timg/icon_qingchu.png" mode="" class="liftIcon"></image>
  249. <view class="rowTitle">{{showSetting.telTitle}}</view>
  250. </view>
  251. <view class="rowRight">{{showSetting.tel}}</view>
  252. </view>
  253. <view class="rowBox" v-if="showSetting.isShowMember" @click="gomember(showSetting.memberTitle)">
  254. <view class="leftView">
  255. <image src="../../static/timg/icon_yijian.png" mode="" class="liftIcon"></image>
  256. <view class="rowTitle">{{showSetting.memberTitle}}</view>
  257. </view>
  258. <image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
  259. </view>
  260. <view class="rowBox" v-if="showSetting.isShowAbout" @click="gonavigateaboutUS">
  261. <view class="leftView">
  262. <image src="../../static/timg/icon_fenxiang.png" mode="" class="liftIcon"></image>
  263. <view class="rowTitle">{{showSetting.aboutTitle}}</view>
  264. </view>
  265. <image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
  266. </view>
  267. </view>
  268. <view class="rowBoxBg">
  269. <button open-type="share" class="rowBox">
  270. <view class="leftView">
  271. <image src="../../static/img/icon_me6.png" mode="" class="liftIcon"></image>
  272. <view class="rowTitle">分享给好友</view>
  273. </view>
  274. <image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
  275. </button>
  276. <view class="rowBox" @click="gonavigateTo('feedBack')">
  277. <view class="leftView">
  278. <image src="../../static/img/icon_me7.png" mode="" class="liftIcon"></image>
  279. <view class="rowTitle">意见反馈</view>
  280. </view>
  281. <image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
  282. </view>
  283. <!-- <view class="rowBox" @click="gonavigateTo('../report/working?id=56D5F8C1-9F11-40BA-8937-B4AABD4666B5')">
  284. <view class="leftView">
  285. <image src="../../static/img/icon_kehuzhuanjieshao.png" mode="" class="liftIcon"></image>
  286. <view class="rowTitle">施工报告</view>
  287. </view> -->
  288. <!-- <view class="rowBox" @click="gonavigateTo('../report/complete?id=278569FB-6F21-47AD-8B66-D62D2EA6981D')">
  289. <view class="leftView">
  290. <image src="../../static/img/icon_kehuzhuanjieshao.png" mode="" class="liftIcon"></image>
  291. <view class="rowTitle">完工报告</view>
  292. </view>
  293. <image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
  294. </view>
  295. <image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
  296. </view> -->
  297. <!-- 先隐藏 -->
  298. <!-- <view class="rowBox" @click="gonavigateTo('')">
  299. <view class="leftView">
  300. <image src="../../static/img/icon_me8.png" mode="" class="liftIcon"></image>
  301. <view class="rowTitle">清除缓存</view>
  302. </view>
  303. <image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
  304. </view> -->
  305. </view>
  306. <view class="releaseVersion">版本号:{{release_version}}</view>
  307. <!-- <view class="signOut" @click="signOut">退出登录</view> -->
  308. <!-- 手机号授权 -->
  309. <view class="authorizBox" v-if="authorizShow" @click="authorizShowHide">
  310. <view class="authorizCont" @click.stop="">
  311. <view class="authorizName">{{wxOpenData.miniAppName}}</view>
  312. <view class="authorizMs">您好,欢迎访问本店,授权手机号登录能获取我们最新的促销活动哦~</view>
  313. <button class="authorizContbutton" type="default" open-type="getPhoneNumber"
  314. @getphonenumber="decryptPhoneNumber">授权</button>
  315. </view>
  316. <view style="text-align: center;padding-top: 56rpx;">
  317. <image src="../../static/timg/icon_guanbi@2x.png" mode="" class="authorizCloseImg"></image>
  318. </view>
  319. </view>
  320. <!-- <image :src="qrimg" mode=""></image> -->
  321. <view class="qrBox" v-if="qrSHow">
  322. <view class="qrimgBox">
  323. <view class="qrTitle">微信绑定
  324. <image src="../../static/timg/chahao.png" mode="" class="qrimgchahao" @click="qrclose"></image>
  325. </view>
  326. <view class="qrms">扫描/长按下方二维码进行绑定</view>
  327. <view class="qrms2">绑定后可接收微信消息通知</view>
  328. <view style="text-align: center;padding-top: 30rpx;">
  329. <image :src="qrimg" mode="" class="qrimg" :show-menu-by-longpress='true'></image>
  330. </view>
  331. <view class="qrBtn" @click="qrclose">我知道了</view>
  332. </view>
  333. </view>
  334. </view>
  335. </template>
  336. <script>
  337. export default {
  338. data() {
  339. return {
  340. userInfo: '',
  341. shopData: '',
  342. numList: '',
  343. uid: '',
  344. headImg: '',
  345. location: {
  346. lng: '',
  347. lat: '',
  348. },
  349. authorizShow: false,
  350. code: '',
  351. wxOpenData: '',
  352. nickName: '',
  353. phone: '',
  354. ext: '',
  355. themeColor: '',
  356. release_version: '',
  357. qrimg:'',
  358. qrSHow:false,
  359. kkshow:false,
  360. duration:500,
  361. interval:3000,
  362. showSetting:'',
  363. f2csystemlist:'',
  364. }
  365. },
  366. onLoad(opt) {
  367. this.ext = this.$common.getExtStoreId();
  368. this.themeColor = uni.getStorageSync("themeColor");
  369. if (this.themeColor) {
  370. if (this.themeColor == '6F2BE8') {
  371. var backgroundImage = '/static/tabimg/me6F2BE8.png'
  372. }
  373. if (this.themeColor == '1677FF') {
  374. var backgroundImage = '/static/tabimg/me1677FF.png'
  375. }
  376. if (this.themeColor == 'FF4F00') {
  377. var backgroundImage = '/static/tabimg/meFF4F00.png'
  378. }
  379. if (this.themeColor == 'D53533') {
  380. var backgroundImage = '/static/tabimg/me1.png'
  381. }
  382. uni.setTabBarStyle({
  383. // color: '#FF0000',
  384. selectedColor: '#' + this.themeColor,
  385. })
  386. uni.setTabBarItem({
  387. index: 3,
  388. text: '我的',
  389. selectedIconPath: backgroundImage
  390. })
  391. }
  392. uni.setNavigationBarColor({
  393. frontColor: "#ffffff",
  394. backgroundColor: '#' + this.themeColor
  395. })
  396. this.getVersionInfo()
  397. // const accountInfo = wx.getAccountInfoSync();
  398. // var version_number = accountInfo.miniProgram.version;
  399. // console.log(version_number)
  400. },
  401. onShow() {
  402. const wxOpenData = this.$store.state.wxOpenData;
  403. this.wxOpenData = wxOpenData
  404. console.log("onshowuser")
  405. this.userInfo = this.$store.state.userInfo;
  406. console.log(this.userInfo)
  407. if (this.userInfo) {
  408. this.queryMyDetail();
  409. } else {
  410. //console.log("授权")
  411. //this.authorizShow = true;
  412. }
  413. if (wxOpenData) {
  414. this.uid = wxOpenData.loginInfo.uid;
  415. }
  416. },
  417. methods: {
  418. seeQr(){
  419. // this.authorizShow = true;
  420. // return false;
  421. if (this.userInfo) {
  422. } else {
  423. this.authorizShow = true;
  424. return false;
  425. }
  426. uni.showLoading({
  427. title: '加载中'
  428. })
  429. this.$request.httpBinary('wxV2/createQrCode', {
  430. type:'bindWx',
  431. customerId:this.numList.customerInfo.id,
  432. unionID:this.numList.customerInfo.unionID,
  433. }, 'GET').then(res => {
  434. uni.hideLoading();
  435. this.qrimg = 'data:image/png;base64,'+uni.arrayBufferToBase64(res);
  436. this.qrSHow=true;
  437. //this.img= uni.arrayBufferToBase64(res)
  438. //console.log('list+=', this.queryShopList);
  439. })
  440. },
  441. qrclose(){
  442. this.qrSHow=false;
  443. },
  444. goShopAppraiseList() {
  445. uni.navigateTo({
  446. url: 'ShopAppraiseList?shopID=' + this.numList.shopInfo.id
  447. })
  448. },
  449. useremind(){
  450. uni.navigateTo({
  451. url: '../integral/integral'
  452. })
  453. },
  454. gonavigateaboutUS(){
  455. uni.navigateTo({
  456. url: '../index/aboutUS?unionID='+this.numList.customerInfo.unionID
  457. })
  458. },
  459. gomember(memberTitle){
  460. uni.navigateTo({
  461. url: '../index/aboutUS?unionID='+this.numList.customerInfo.unionID+'&memberTitle='+memberTitle
  462. })
  463. },
  464. getVersionInfo() {
  465. this.$http('miniApp2/sys/getVersionInfo', {
  466. appId: this.ext.appId,
  467. }, 'POST').then(res => {
  468. this.release_version = res.data.release_version
  469. })
  470. },
  471. updateUserInfo() {
  472. var that = this;
  473. uni.getUserProfile({
  474. lang: 'zh_CN',
  475. desc: '登录',
  476. success: (res) => {
  477. console.log(res);
  478. that.headImg = res.userInfo.avatarUrl;
  479. that.nickName = res.userInfo.nickName;
  480. that.$http('miniApp2/sys/updateUserInfo', {
  481. nickName: res.userInfo.nickName,
  482. unionId: that.ext.unionId,
  483. headImg: res.userInfo.avatarUrl,
  484. openId: that.wxOpenData.openid
  485. }, 'POST').then(res => {
  486. })
  487. },
  488. fail: (res) => {
  489. console.log(res)
  490. }
  491. });
  492. },
  493. decryptPhoneNumber: function(e) {
  494. console.log(e);
  495. this.code = e.detail.code
  496. this.wxPhoneLogin()
  497. this.authorizShow = false;
  498. },
  499. wxPhoneLogin() {
  500. var that = this;
  501. this.$http('miniApp2/sys/wxPhoneLogin', {
  502. appId: this.ext.appId,
  503. unionId: this.ext.unionId,
  504. code: this.code,
  505. openId: this.wxOpenData.openid
  506. }, 'POST').then(res => {
  507. var data = res.data;
  508. if (data.loginInfo) {
  509. this.userInfo = data.loginInfo.openUser;
  510. this.wxOpenData = data.loginInfo;
  511. this.numList=data.loginInfo
  512. this.headImg = data.loginInfo.openUser.headImg;
  513. this.nickName = data.loginInfo.openUser.nickName;
  514. this.phone = data.loginInfo.openUser.mobilePhone;
  515. this.$store.commit('mutationswxOpenData', data)
  516. this.$store.commit('mutationsuserInfo', this.userInfo)
  517. /*setTimeout(() => {
  518. that.queryMyDetail()
  519. }, 1000); */
  520. that.queryMyDetail()
  521. if(this.numList.customerInfo.pState==1&&this.numList.shopSettings.partnerDisabled){
  522. this.kkshow=true
  523. }
  524. if(this.numList.customerInfo.rebateState==1&&this.numList.shopSettings.introductionDisabled){
  525. this.kkshow=true
  526. }
  527. }
  528. })
  529. },
  530. map() {
  531. console.log("打开地图")
  532. var that = this;
  533. if (!that.numList.shopInfo.lat || !that.numList.shopInfo.lng) {
  534. uni.showToast({
  535. title: '该店铺未设置定位',
  536. icon: 'none',
  537. duration: 3000
  538. });
  539. } else {
  540. uni.openLocation({
  541. latitude: Number(that.numList.shopInfo.lat),
  542. longitude: Number(that.numList.shopInfo.lng),
  543. name: that.numList.shopInfo.shopName,
  544. address: that.numList.shopInfo.provinceName + that.numList.shopInfo.cityName + that.numList
  545. .shopInfo.areaName + that.numList.shopInfo.address,
  546. success: function() {
  547. console.log('success');
  548. },
  549. fail(err) {
  550. console.log(err)
  551. }
  552. });
  553. }
  554. },
  555. call() {
  556. if (this.userInfo) {
  557. } else {
  558. this.authorizShow = true;
  559. return false;
  560. }
  561. uni.makePhoneCall({
  562. phoneNumber: this.numList.shopInfo.mobilePhone
  563. });
  564. },
  565. goorder(num) {
  566. if (this.userInfo) {
  567. } else {
  568. this.authorizShow = true;
  569. return false;
  570. }
  571. uni.navigateTo({
  572. url: './myOrder/myOrder?num=' + num
  573. })
  574. },
  575. queryMyDetail() {
  576. console.log("getinfo")
  577. console.log(this.$store.state.wxOpenData)
  578. uni.showLoading({
  579. title: '加载中'
  580. })
  581. this.$http('openreservation/getInfo', {
  582. lat: this.location.lat ? this.location.lat : '',
  583. lng: this.location.lng ? this.location.lng : '',
  584. }, 'GET').then(res => {
  585. uni.hideLoading();
  586. this.numList = res.data
  587. this.headImg = res.data.openUser.headImg;
  588. this.nickName = res.data.openUser.nickName;
  589. this.phone = res.data.openUser.mobilePhone;
  590. this.showSetting=res.data.showSetting
  591. this.f2csystemlist=res.data.f2csystemlist
  592. })
  593. },
  594. gonavigateTo(url) {
  595. if (this.userInfo) {
  596. uni.navigateTo({
  597. url: url
  598. })
  599. } else {
  600. this.authorizShow = true;
  601. }
  602. /* uni.navigateTo({
  603. url: url
  604. }) */
  605. },
  606. signOut() {
  607. //uni.clearStorageSync();
  608. uni.removeStorageSync('logodata');
  609. // uni.navigateTo({
  610. // url: '../login/login'
  611. // })
  612. },
  613. authorizShowHide(){
  614. this.authorizShow=false
  615. }
  616. },
  617. onShareAppMessage(res) {
  618. return {
  619. title: this.wxOpenData.miniAppName,
  620. //imageUrl:img,
  621. path: 'pages/index/index',
  622. success(res) {
  623. uni.showToast({
  624. title: '分享成功'
  625. })
  626. },
  627. fail(res) {
  628. uni.showToast({
  629. title: '分享失败',
  630. icon: 'none',
  631. duration: 3000
  632. })
  633. }
  634. }
  635. },
  636. // 下拉刷新
  637. onPullDownRefresh() {
  638. this.queryMyDetail()
  639. setTimeout(function() {
  640. uni.stopPullDownRefresh();
  641. }, 1000);
  642. },
  643. }
  644. </script>
  645. <style scoped>
  646. .remindBox{
  647. width: 596rpx;
  648. box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(153,153,153,0.1);
  649. background: rgba(255,255,255,0.1);
  650. display: flex;justify-content: space-between;
  651. margin: 0 auto;font-size: 22rpx;
  652. padding: 9rpx 20rpx;
  653. color: #FFFFFF;
  654. line-height: 30rpx;
  655. }
  656. .useremind{
  657. font-weight: 500;
  658. color: #FFFD00;
  659. }
  660. .swiper2{
  661. height: 495rpx;
  662. /* margin-top: -100rpx; */
  663. }
  664. .marginTop{
  665. margin-top: -90rpx;
  666. }
  667. .cardBox{
  668. width: 702rpx;
  669. height: 495rpx;
  670. background: #FFFFFF;
  671. border-radius: 22rpx;
  672. margin-left:24rpx ;
  673. overflow: hidden;
  674. }
  675. .cardCont{
  676. display: flex;
  677. flex-wrap: wrap;
  678. }
  679. .cardLineImgBox{
  680. width: 84rpx;
  681. height: 84rpx;
  682. background: linear-gradient(150deg, #222439 0%, #1A2027 100%);
  683. border-radius: 50%;
  684. margin: 0 auto;
  685. margin-top: 30rpx;
  686. }
  687. .cardlineTitle{
  688. color: #3C3C3C;font-size: 24rpx;
  689. line-height: 33rpx;padding-top: 10rpx;
  690. }
  691. .cardLine{
  692. width: 25%;
  693. text-align: center;
  694. }
  695. .rowRight{
  696. color: #666666;font-size: 28rpx;padding-right: 32rpx;
  697. }
  698. .cardTOp{
  699. height: 155rpx;
  700. background-size: 100% 100%;
  701. position: relative;
  702. }
  703. .vipBsIcon{
  704. position: absolute;width: 112rpx;height: 33rpx;top: 0;right: 0;
  705. }
  706. .cardName{
  707. font-weight: 500;font-size: 30rpx;padding-top: 30rpx;padding-left: 30rpx;
  708. color: #50402A;
  709. }
  710. .cardtimeBox{
  711. display: flex;justify-content: space-between;
  712. color: #786140;font-size: 24rpx;
  713. padding-top: 20rpx;padding-left: 30rpx;padding-right: 20rpx;
  714. }
  715. .qrBox{
  716. position: fixed;
  717. width: 100vw;
  718. height: 100vh;
  719. background: rgba(0,0,0,0.5);
  720. left: 0;
  721. top: 0;
  722. z-index: 11;
  723. display: flex;
  724. justify-content: center;
  725. align-items: center;
  726. flex-direction: column;
  727. }
  728. .qrimgBox{
  729. width: 562rpx;
  730. height: 704rpx;
  731. background: #FFFFFF;
  732. border-radius: 24rpx;
  733. }
  734. .qrTitle{
  735. font-size: 30rpx;
  736. font-family: PingFangSC-Medium, PingFang SC;
  737. font-weight: 500;
  738. color: #333333;
  739. border-bottom: 1px solid #EEEEEE;
  740. text-align: center;
  741. line-height: 90rpx;
  742. position: relative;
  743. }
  744. .qrimgchahao{
  745. width: 38rpx;
  746. height: 38rpx;
  747. position: absolute;
  748. top: 26rpx;
  749. right: 20rpx;
  750. }
  751. .qrms{
  752. font-weight: 400;
  753. color: #999999;
  754. line-height: 37rpx;
  755. font-size: 26rpx;
  756. padding-top: 23rpx;
  757. text-align: center;
  758. }
  759. .qrms2{
  760. font-weight: 400;
  761. color: #999999;
  762. line-height: 37rpx;
  763. font-size: 26rpx;
  764. text-align: center;
  765. }
  766. .qrimg{
  767. width: 328rpx;
  768. height: 328rpx;
  769. }
  770. .qrBtn{
  771. width: 292rpx;
  772. height: 64rpx;
  773. background: #D53533;
  774. border-radius: 32rpx;
  775. color: #FFFFFF;
  776. line-height: 64rpx;
  777. text-align: center;
  778. margin: 0 auto;
  779. margin-top:40rpx;
  780. }
  781. .releaseVersion {
  782. font-size: 24rpx;
  783. font-family: PingFangSC-Regular, PingFang SC;
  784. font-weight: 400;
  785. color: #666666;
  786. padding: 40rpx;
  787. text-align: center;
  788. }
  789. button::after {
  790. border: none;
  791. }
  792. button {
  793. position: relative;
  794. display: block;
  795. margin-left: 0;
  796. margin-right: 0;
  797. padding-left: 0px;
  798. padding-right: 0px;
  799. box-sizing: border-box;
  800. // font-size: 18px;
  801. text-align: center;
  802. text-decoration: none;
  803. // line-height: 1;
  804. line-height: 1.35;
  805. // border-radius: 5px;
  806. -webkit-tap-highlight-color: transparent;
  807. overflow: hidden;
  808. color: #000000;
  809. background-color: #fff;
  810. height: 100%;
  811. }
  812. .box {
  813. width: 100vw;
  814. min-height: 100vh;
  815. background: #F4F5F7;
  816. padding-bottom: 60rpx;
  817. }
  818. .top {
  819. height: 350rpx;
  820. padding: 20rpx 24rpx 0;
  821. background-color: #D53533;
  822. border-radius: 0 0 5% 5%;
  823. }
  824. .customerMes {
  825. display: flex;
  826. }
  827. .mes {
  828. margin-left: 20rpx;
  829. }
  830. .nick {
  831. margin-bottom: 5rpx;
  832. display: flex;
  833. justify-content: flex-start;
  834. align-items: center;
  835. }
  836. .nickName {
  837. font-size: 34rpx;
  838. color: #FFFFFF;
  839. font-weight: bold;
  840. line-height: 48rpx;
  841. height: 48rpx;
  842. width: 430rpx;
  843. overflow: hidden; /*内容会被修剪,并且其余内容是不可见的*/
  844. text-overflow:ellipsis; /*显示省略符号来代表被修剪的文本。*/
  845. white-space: nowrap; /*文本不换行*/
  846. }
  847. .grade {
  848. margin-left: 15rpx;
  849. font-size: 24rpx;
  850. color: #FFFFFF;
  851. padding: 0rpx 10rpx;
  852. border: 1rpx solid #FFFFFF;
  853. border-radius: 4rpx;
  854. height: 36rpx;
  855. }
  856. .phone {
  857. font-size: 24rpx;
  858. color: #FFFFFF;
  859. }
  860. .headerBox {
  861. padding: 16rpx 24rpx;
  862. display: flex;
  863. justify-content: space-around;
  864. }
  865. .quan {
  866. display: flex;
  867. flex-direction: column;
  868. align-items: center;
  869. }
  870. .numStr {
  871. font-size: 32rpx;
  872. font-weight: bold;
  873. color: #FFFFFF;
  874. line-height: 45rpx;
  875. }
  876. .numStr2{
  877. font-size: 40rpx;
  878. font-weight: 500;
  879. color: #FFFFFF;
  880. line-height: 60rpx;
  881. }
  882. .nameStr {
  883. font-size: 24rpx;
  884. color: #FFFFFF;
  885. }
  886. .orderBox {
  887. margin: 0rpx 24rpx;
  888. background: #FFFFFF;
  889. padding: 30rpx 20rpx;
  890. border-radius: 10rpx;
  891. margin-top: 20rpx;
  892. }
  893. .orderTitle {
  894. font-size: 30rpx;
  895. color: #333333;
  896. font-weight: bold;
  897. }
  898. .orderAll {
  899. display: flex;
  900. justify-content: space-between;
  901. align-items: center;
  902. }
  903. .orderLine {
  904. width: 25%;
  905. text-align: center;
  906. }
  907. .orderLineImg {
  908. width: 60rpx;
  909. height: 60rpx;
  910. }
  911. .orderLineTxt {
  912. font-size: 24rpx;
  913. color: #333333;
  914. }
  915. .orderImgBox {
  916. text-align: center;
  917. position: relative;
  918. }
  919. .orderLIneBox {
  920. display: flex;
  921. justify-content: space-between;
  922. padding-top: 30rpx;
  923. }
  924. .orderNum {
  925. height: 26rpx;
  926. line-height: 26rpx;
  927. background: #FF0000;
  928. padding: 0 8rpx;
  929. border-radius: 13rpx;
  930. color: #FFFFFF;
  931. font-size: 20rpx;
  932. position: absolute;
  933. left: 82rpx;
  934. z-index: 11;
  935. }
  936. .big_rightArrow {
  937. margin-right: 20rpx;
  938. width: 30rpx;
  939. height: 30rpx;
  940. }
  941. .rowBoxBg {
  942. margin: 20rpx 24rpx;
  943. background: #FFFFFF;
  944. border-radius: 10rpx;
  945. }
  946. .rowBox {
  947. display: flex;
  948. justify-content: space-between;
  949. background: #FFFFFF;
  950. padding: 35rpx 0rpx;
  951. border-radius: 10rpx;
  952. align-items: center;
  953. }
  954. .leftView {
  955. display: flex;
  956. align-items: center;
  957. }
  958. .rightView {
  959. display: flex;
  960. align-items: center;
  961. }
  962. .liftIcon {
  963. width: 34rpx;
  964. height: 34rpx;
  965. margin: 0rpx 20rpx;
  966. }
  967. .rowTitle {
  968. color: #3C3C3C;
  969. font-size: 28rpx;
  970. }
  971. .signOut {
  972. width: 702rpx;
  973. height: 98rpx;
  974. background: #FFFFFF;
  975. border-radius: 10rpx;
  976. font-size: 30rpx;
  977. color: #FF3B30;
  978. line-height: 98rpx;
  979. text-align: center;
  980. margin: 40rpx 24rpx;
  981. }
  982. .shopBox {
  983. padding: 20rpx;
  984. margin: 20rpx 24rpx;
  985. background-color: #FFFFFF;
  986. border-radius: 10rpx;
  987. }
  988. .shopCont {
  989. display: flex;
  990. justify-content: space-between;
  991. align-items: center;
  992. }
  993. .shopName {
  994. font-size: 30rpx;
  995. font-weight: bold;
  996. color: #3C3C3C;
  997. line-height: 42rpx;
  998. }
  999. .appraiseBox {
  1000. padding: 5rpx 0;
  1001. margin-top: 10rpx;
  1002. height: 62rpx;
  1003. display: flex;
  1004. align-items: center;
  1005. }
  1006. .appraise {
  1007. color: #FF0000;
  1008. font-size: 38rpx;
  1009. font-weight: bold;
  1010. }
  1011. .line {
  1012. margin: 0 12rpx;
  1013. width: 1rpx;
  1014. height: 30rpx;
  1015. }
  1016. .appraiseCount {
  1017. font-size: 24rpx;
  1018. font-weight: 400;
  1019. color: #666666;
  1020. flex-grow: 1;
  1021. margin-top: 10rpx;
  1022. }
  1023. .rightArrow {
  1024. width: 7rpx;
  1025. height: 15rpx;
  1026. margin-left: 16rpx;
  1027. }
  1028. .shopRightBox {
  1029. display: flex;
  1030. justify-content: space-between;
  1031. }
  1032. .address {
  1033. display: flex;
  1034. justify-content: space-between;
  1035. align-items: center;
  1036. }
  1037. .Address,
  1038. .shopTime,
  1039. .distance {
  1040. color: #999999;
  1041. font-size: 24rpx;
  1042. padding-top: 15rpx;
  1043. /* 隐藏文字显示 ...不换行 */
  1044. overflow: hidden;
  1045. text-overflow: ellipsis;
  1046. white-space: nowrap;
  1047. }
  1048. .shopRightBox {}
  1049. .shopRightImg {
  1050. width: 44rpx;
  1051. height: 45rpx;
  1052. }
  1053. .authorizBox {
  1054. width: 100vw;
  1055. height: 100vh;
  1056. background: rgba(0, 0, 0, 0.5);
  1057. position: fixed;
  1058. top: 0;
  1059. left: 0;
  1060. }
  1061. .authorizCont {
  1062. margin-top: 30vh;
  1063. width: 564rpx;
  1064. height: 408rpx;
  1065. background: #FFFFFF;
  1066. border-radius: 24rpx;
  1067. margin-left: 93rpx;
  1068. position: relative;
  1069. }
  1070. .authorizCloseImg {
  1071. width: 62rpx;
  1072. height: 62rpx;
  1073. }
  1074. .sqLogoBox {
  1075. width: 180rpx;
  1076. height: 180rpx;
  1077. background: #FFFFFF;
  1078. border-radius: 90rpx;
  1079. text-align: center;
  1080. position: absolute;
  1081. top: -50rpx;
  1082. left: 192rpx;
  1083. }
  1084. .authorizName {
  1085. color: #333333;
  1086. line-height: 42rpx;
  1087. font-size: 30rpx;
  1088. text-align: center;
  1089. padding-top: 58rpx;
  1090. }
  1091. .authorizMs {
  1092. color: #999999;
  1093. line-height: 36rpx;
  1094. font-size: 26rpx;
  1095. width: 452rpx;
  1096. padding-top: 24rpx;
  1097. text-align: center;
  1098. margin-left: 56rpx;
  1099. }
  1100. .authorizContbutton {
  1101. width: 422rpx;
  1102. height: 88rpx;
  1103. background: #D53533;
  1104. border-radius: 44rpx;
  1105. line-height: 88rpx;
  1106. text-align: center;
  1107. font-size: 30rpx;
  1108. color: #FFFFFF;
  1109. margin-top: 62rpx;
  1110. margin-left: 71rpx;
  1111. }
  1112. </style>