user.vue 27 KB

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