user.vue 36 KB

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