user.vue 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106
  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="authorizShowHide">
  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. authorizShowHide(){
  518. this.authorizShow=false
  519. }
  520. },
  521. onShareAppMessage(res) {
  522. return {
  523. title: this.wxOpenData.miniAppName,
  524. //imageUrl:img,
  525. path: 'pages/index/index',
  526. success(res) {
  527. uni.showToast({
  528. title: '分享成功'
  529. })
  530. },
  531. fail(res) {
  532. uni.showToast({
  533. title: '分享失败',
  534. icon: 'none',
  535. duration: 3000
  536. })
  537. }
  538. }
  539. },
  540. // 下拉刷新
  541. onPullDownRefresh() {
  542. this.queryMyDetail()
  543. setTimeout(function() {
  544. uni.stopPullDownRefresh();
  545. }, 1000);
  546. },
  547. }
  548. </script>
  549. <style scoped>
  550. .qrBox{
  551. position: fixed;
  552. width: 100vw;
  553. height: 100vh;
  554. background: rgba(0,0,0,0.5);
  555. left: 0;
  556. top: 0;
  557. z-index: 11;
  558. display: flex;
  559. justify-content: center;
  560. align-items: center;
  561. flex-direction: column;
  562. }
  563. .qrimgBox{
  564. width: 562rpx;
  565. height: 704rpx;
  566. background: #FFFFFF;
  567. border-radius: 24rpx;
  568. }
  569. .qrTitle{
  570. font-size: 30rpx;
  571. font-family: PingFangSC-Medium, PingFang SC;
  572. font-weight: 500;
  573. color: #333333;
  574. border-bottom: 1px solid #EEEEEE;
  575. text-align: center;
  576. line-height: 90rpx;
  577. position: relative;
  578. }
  579. .qrimgchahao{
  580. width: 38rpx;
  581. height: 38rpx;
  582. position: absolute;
  583. top: 26rpx;
  584. right: 20rpx;
  585. }
  586. .qrms{
  587. font-weight: 400;
  588. color: #999999;
  589. line-height: 37rpx;
  590. font-size: 26rpx;
  591. padding-top: 23rpx;
  592. text-align: center;
  593. }
  594. .qrms2{
  595. font-weight: 400;
  596. color: #999999;
  597. line-height: 37rpx;
  598. font-size: 26rpx;
  599. text-align: center;
  600. }
  601. .qrimg{
  602. width: 328rpx;
  603. height: 328rpx;
  604. }
  605. .qrBtn{
  606. width: 292rpx;
  607. height: 64rpx;
  608. background: #D53533;
  609. border-radius: 32rpx;
  610. color: #FFFFFF;
  611. line-height: 64rpx;
  612. text-align: center;
  613. margin: 0 auto;
  614. margin-top:40rpx;
  615. }
  616. .releaseVersion {
  617. font-size: 24rpx;
  618. font-family: PingFangSC-Regular, PingFang SC;
  619. font-weight: 400;
  620. color: #666666;
  621. padding: 40rpx;
  622. text-align: center;
  623. }
  624. button::after {
  625. border: none;
  626. }
  627. button {
  628. position: relative;
  629. display: block;
  630. margin-left: 0;
  631. margin-right: 0;
  632. padding-left: 0px;
  633. padding-right: 0px;
  634. box-sizing: border-box;
  635. // font-size: 18px;
  636. text-align: center;
  637. text-decoration: none;
  638. // line-height: 1;
  639. line-height: 1.35;
  640. // border-radius: 5px;
  641. -webkit-tap-highlight-color: transparent;
  642. overflow: hidden;
  643. color: #000000;
  644. background-color: #fff;
  645. height: 100%;
  646. }
  647. .box {
  648. width: 100vw;
  649. min-height: 100vh;
  650. background: #F4F5F7;
  651. padding-bottom: 60rpx;
  652. }
  653. .top {
  654. height: 350rpx;
  655. padding: 20rpx 24rpx 0;
  656. background-color: #D53533;
  657. border-radius: 0 0 5% 5%;
  658. }
  659. .customerMes {
  660. display: flex;
  661. }
  662. .mes {
  663. margin-left: 20rpx;
  664. }
  665. .nick {
  666. margin-bottom: 5rpx;
  667. display: flex;
  668. justify-content: flex-start;
  669. align-items: center;
  670. }
  671. .nickName {
  672. font-size: 34rpx;
  673. color: #FFFFFF;
  674. font-weight: bold;
  675. line-height: 48rpx;
  676. height: 48rpx;
  677. width: 430rpx;
  678. overflow: hidden; /*内容会被修剪,并且其余内容是不可见的*/
  679. text-overflow:ellipsis; /*显示省略符号来代表被修剪的文本。*/
  680. white-space: nowrap; /*文本不换行*/
  681. }
  682. .grade {
  683. margin-left: 15rpx;
  684. font-size: 24rpx;
  685. color: #FFFFFF;
  686. padding: 0rpx 10rpx;
  687. border: 1rpx solid #FFFFFF;
  688. border-radius: 4rpx;
  689. height: 36rpx;
  690. }
  691. .phone {
  692. font-size: 24rpx;
  693. color: #FFFFFF;
  694. }
  695. .headerBox {
  696. padding: 30rpx 24rpx;
  697. display: flex;
  698. justify-content: space-around;
  699. }
  700. .quan {
  701. display: flex;
  702. flex-direction: column;
  703. align-items: center;
  704. height: 120rpx;
  705. }
  706. .numStr {
  707. font-size: 40rpx;
  708. font-weight: bold;
  709. color: #FFFFFF;
  710. line-height: 56rpx;
  711. }
  712. .numStr2{
  713. font-size: 40rpx;
  714. font-weight: 500;
  715. color: #FFFFFF;
  716. line-height: 60rpx;
  717. }
  718. .nameStr {
  719. font-size: 24rpx;
  720. color: #FFFFFF;
  721. }
  722. .orderBox {
  723. margin: 0rpx 24rpx;
  724. background: #FFFFFF;
  725. padding: 30rpx 20rpx;
  726. border-radius: 10rpx;
  727. margin-top: -100rpx;
  728. }
  729. .orderTitle {
  730. font-size: 30rpx;
  731. color: #333333;
  732. font-weight: bold;
  733. }
  734. .orderAll {
  735. display: flex;
  736. justify-content: space-between;
  737. align-items: center;
  738. }
  739. .orderLine {
  740. width: 25%;
  741. text-align: center;
  742. }
  743. .orderLineImg {
  744. width: 60rpx;
  745. height: 60rpx;
  746. }
  747. .orderLineTxt {
  748. font-size: 24rpx;
  749. color: #333333;
  750. }
  751. .orderImgBox {
  752. text-align: center;
  753. position: relative;
  754. }
  755. .orderLIneBox {
  756. display: flex;
  757. justify-content: space-between;
  758. padding-top: 30rpx;
  759. }
  760. .orderNum {
  761. height: 26rpx;
  762. line-height: 26rpx;
  763. background: #FF0000;
  764. padding: 0 8rpx;
  765. border-radius: 13rpx;
  766. color: #FFFFFF;
  767. font-size: 20rpx;
  768. position: absolute;
  769. left: 82rpx;
  770. z-index: 11;
  771. }
  772. .big_rightArrow {
  773. margin-right: 20rpx;
  774. width: 30rpx;
  775. height: 30rpx;
  776. }
  777. .rowBoxBg {
  778. margin: 20rpx 24rpx;
  779. background: #FFFFFF;
  780. border-radius: 10rpx;
  781. }
  782. .rowBox {
  783. display: flex;
  784. justify-content: space-between;
  785. background: #FFFFFF;
  786. padding: 35rpx 0rpx;
  787. border-radius: 10rpx;
  788. align-items: center;
  789. }
  790. .leftView {
  791. display: flex;
  792. align-items: center;
  793. }
  794. .rightView {
  795. display: flex;
  796. align-items: center;
  797. }
  798. .liftIcon {
  799. width: 34rpx;
  800. height: 34rpx;
  801. margin: 0rpx 20rpx;
  802. }
  803. .rowTitle {
  804. color: #3C3C3C;
  805. font-size: 28rpx;
  806. }
  807. .signOut {
  808. width: 702rpx;
  809. height: 98rpx;
  810. background: #FFFFFF;
  811. border-radius: 10rpx;
  812. font-size: 30rpx;
  813. color: #FF3B30;
  814. line-height: 98rpx;
  815. text-align: center;
  816. margin: 40rpx 24rpx;
  817. }
  818. .shopBox {
  819. padding: 20rpx;
  820. margin: 20rpx 24rpx;
  821. background-color: #FFFFFF;
  822. border-radius: 10rpx;
  823. }
  824. .shopCont {
  825. display: flex;
  826. justify-content: space-between;
  827. align-items: center;
  828. }
  829. .shopName {
  830. font-size: 30rpx;
  831. font-weight: bold;
  832. color: #3C3C3C;
  833. line-height: 42rpx;
  834. }
  835. .appraiseBox {
  836. padding: 5rpx 0;
  837. margin-top: 10rpx;
  838. height: 62rpx;
  839. display: flex;
  840. align-items: center;
  841. }
  842. .appraise {
  843. color: #FF0000;
  844. font-size: 38rpx;
  845. font-weight: bold;
  846. }
  847. .line {
  848. margin: 0 12rpx;
  849. width: 1rpx;
  850. height: 30rpx;
  851. }
  852. .appraiseCount {
  853. font-size: 24rpx;
  854. font-weight: 400;
  855. color: #666666;
  856. flex-grow: 1;
  857. margin-top: 10rpx;
  858. }
  859. .rightArrow {
  860. width: 7rpx;
  861. height: 15rpx;
  862. margin-left: 16rpx;
  863. }
  864. .shopRightBox {
  865. display: flex;
  866. justify-content: space-between;
  867. }
  868. .address {
  869. display: flex;
  870. justify-content: space-between;
  871. align-items: center;
  872. }
  873. .Address,
  874. .shopTime,
  875. .distance {
  876. color: #999999;
  877. font-size: 24rpx;
  878. padding-top: 15rpx;
  879. /* 隐藏文字显示 ...不换行 */
  880. overflow: hidden;
  881. text-overflow: ellipsis;
  882. white-space: nowrap;
  883. }
  884. .shopRightBox {}
  885. .shopRightImg {
  886. width: 44rpx;
  887. height: 45rpx;
  888. }
  889. .authorizBox {
  890. width: 100vw;
  891. height: 100vh;
  892. background: rgba(0, 0, 0, 0.5);
  893. position: fixed;
  894. top: 0;
  895. left: 0;
  896. }
  897. .authorizCont {
  898. margin-top: 30vh;
  899. width: 564rpx;
  900. height: 408rpx;
  901. background: #FFFFFF;
  902. border-radius: 24rpx;
  903. margin-left: 93rpx;
  904. position: relative;
  905. }
  906. .authorizCloseImg {
  907. width: 62rpx;
  908. height: 62rpx;
  909. }
  910. .sqLogoBox {
  911. width: 180rpx;
  912. height: 180rpx;
  913. background: #FFFFFF;
  914. border-radius: 90rpx;
  915. text-align: center;
  916. position: absolute;
  917. top: -50rpx;
  918. left: 192rpx;
  919. }
  920. .authorizName {
  921. color: #333333;
  922. line-height: 42rpx;
  923. font-size: 30rpx;
  924. text-align: center;
  925. padding-top: 58rpx;
  926. }
  927. .authorizMs {
  928. color: #999999;
  929. line-height: 36rpx;
  930. font-size: 26rpx;
  931. width: 452rpx;
  932. padding-top: 24rpx;
  933. text-align: center;
  934. margin-left: 56rpx;
  935. }
  936. .authorizContbutton {
  937. width: 422rpx;
  938. height: 88rpx;
  939. background: #D53533;
  940. border-radius: 44rpx;
  941. line-height: 88rpx;
  942. text-align: center;
  943. font-size: 30rpx;
  944. color: #FFFFFF;
  945. margin-top: 62rpx;
  946. margin-left: 71rpx;
  947. }
  948. </style>