user.vue 35 KB

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