|
@@ -1,42 +1,36 @@
|
|
|
<template>
|
|
|
<view class="box">
|
|
|
- <view class="topBox">
|
|
|
- <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
|
|
|
- <view class="nav" :style="{top: iStatusBarHeight + 'px'}">
|
|
|
- <view></view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
|
|
|
-
|
|
|
- <view class="customerMes">
|
|
|
- <image :src="headImg" mode="" style="width: 120rpx;height: 120rpx;border-radius: 60rpx;"></image>
|
|
|
- <view class="mes">
|
|
|
- <view class="nick">
|
|
|
- <view class="nickName" v-if="userInfo.nickName">{{userInfo.nickName}}</view>
|
|
|
- <view class="grade" v-if="numList.levelName">{{numList.levelName}}</view>
|
|
|
+ <view class="top">
|
|
|
+ <view class="customerMes">
|
|
|
+ <image :src="headImg" mode="" style="width: 88rpx;height: 88rpx;border-radius: 44rpx;"></image>
|
|
|
+ <view class="mes">
|
|
|
+ <view class="nick">
|
|
|
+ <view class="nickName" v-if="userInfo.nickName">{{userInfo.nickName}}</view>
|
|
|
+ <view class="grade" v-if="numList.levelName">{{numList.levelName}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="phone">{{userInfo.mobilePhone}}</view>
|
|
|
</view>
|
|
|
- <view class="phone">{{userInfo.mobilePhone}}</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
- <view class="headerBox">
|
|
|
- <view class="quan" @click="gonavigateTo('../index/discountCard')">
|
|
|
- <view class="numStr">{{numList.count?numList.count:0}}</view>
|
|
|
- <view class="nameStr">优惠券</view>
|
|
|
- </view>
|
|
|
- <view class="quan">
|
|
|
- <view class="numStr">{{numList.totalIntegral?numList.totalIntegral:0}}</view>
|
|
|
- <view class="nameStr">积分</view>
|
|
|
- </view>
|
|
|
- <view class="quan" @click="gonavigateTo('../index/vipCard')">
|
|
|
- <view class="numStr">{{numList.cardNum?numList.cardNum:0}}</view>
|
|
|
- <view class="nameStr">会员卡</view>
|
|
|
+ <view class="headerBox">
|
|
|
+ <view class="quan" @click="gonavigateTo('../index/discountCard')">
|
|
|
+ <view class="numStr">{{numList.count?numList.count:0}}</view>
|
|
|
+ <view class="nameStr">优惠券</view>
|
|
|
+ </view>
|
|
|
+ <view class="quan">
|
|
|
+ <view class="numStr">{{numList.totalIntegral?numList.totalIntegral:0}}</view>
|
|
|
+ <view class="nameStr">积分</view>
|
|
|
+ </view>
|
|
|
+ <view class="quan" @click="gonavigateTo('../index/vipCard')">
|
|
|
+ <view class="numStr">{{numList.cardNum?numList.cardNum:0}}</view>
|
|
|
+ <view class="nameStr">会员卡</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
-
|
|
|
<!-- 我的订单 -->
|
|
|
<view class="orderBox">
|
|
|
|
|
@@ -45,21 +39,21 @@
|
|
|
<view class="orderLIneBox">
|
|
|
<view class="orderLine" @click="goorder(1)">
|
|
|
<view class="orderImgBox">
|
|
|
- <view class="orderNum" v-show="numList.waitPurchaseSize>0">{{numList.waitPurchaseSize}}</view>
|
|
|
+ <view class="orderNum" v-show="numList.waitPurchaseSize>0">{{numList.waitPurchaseSize>99?'99+':numList.waitPurchaseSize}}</view>
|
|
|
<image src="../../static/img/icon_daifukuan.png" mode="" class="orderLineImg"></image>
|
|
|
</view>
|
|
|
<view class="orderLineTxt">待付款</view>
|
|
|
</view>
|
|
|
<view class="orderLine" @click="goorder(2)">
|
|
|
<view class="orderImgBox">
|
|
|
- <view class="orderNum" v-show="numList.waitServiceSize>0">{{numList.waitServiceSize}}</view>
|
|
|
+ <view class="orderNum" v-show="numList.waitServiceSize>0">{{numList.waitServiceSize>99?'99+':numList.waitServiceSize}}</view>
|
|
|
<image src="../../static/img/icon_daifuwu.png" mode="" class="orderLineImg"></image>
|
|
|
</view>
|
|
|
<view class="orderLineTxt">待服务</view>
|
|
|
</view>
|
|
|
<view class="orderLine" @click="goorder(3)">
|
|
|
<view class="orderImgBox">
|
|
|
- <view class="orderNum" v-show="numList.hasOverSize>0">{{numList.hasOverSize}}</view>
|
|
|
+ <view class="orderNum" v-show="numList.hasOverSize>0">{{numList.hasOverSize>99?'99+':numList.hasOverSize}}</view>
|
|
|
<image src="../../static/img/icon_yiwancheng.png" mode="" class="orderLineImg"></image>
|
|
|
</view>
|
|
|
<view class="orderLineTxt">已完成</view>
|
|
@@ -67,7 +61,7 @@
|
|
|
|
|
|
<view class="orderLine" @click="goorder(0)">
|
|
|
<view class="orderImgBox">
|
|
|
- <view class="orderNum" v-show="numList.allSize>0">{{numList.allSize}}</view>
|
|
|
+ <view class="orderNum" v-show="numList.allSize>0">{{numList.allSize>99?'99+':numList.allSize}}</view>
|
|
|
<image src="../../static/img/icon_allorder.png" mode="" class="orderLineImg"></image>
|
|
|
</view>
|
|
|
<view class="orderLineTxt">全部</view>
|
|
@@ -88,9 +82,11 @@
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
- <view class="shopTime" v-if="numList.shopInfo.startTime && numList.shopInfo.endTime">{{numList.shopInfo.startTime}}-{{numList.shopInfo.endTime}}</view>
|
|
|
+ <view class="shopTime" v-if="numList.shopInfo.startTime && numList.shopInfo.endTime">
|
|
|
+ {{numList.shopInfo.startTime}}-{{numList.shopInfo.endTime}}</view>
|
|
|
<view class="address">
|
|
|
- <view class="Address">{{numList.shopInfo.provinceName}}{{numList.shopInfo.cityName}}{{numList.shopInfo.areaName}}{{numList.shopInfo.address}}
|
|
|
+ <view class="Address">
|
|
|
+ {{numList.shopInfo.provinceName}}{{numList.shopInfo.cityName}}{{numList.shopInfo.areaName}}{{numList.shopInfo.address}}
|
|
|
</view>
|
|
|
<!-- <view class="distance" v-if="numList.shopInfo.distance&&numList.shopInfo.distance!= '0.00'">{{numList.shopInfo.distance}}km</view> -->
|
|
|
</view>
|
|
@@ -173,17 +169,18 @@
|
|
|
|
|
|
|
|
|
<!-- <view class="signOut" @click="signOut">退出登录</view> -->
|
|
|
-<!-- 手机号授权 -->
|
|
|
- <view class="authorizBox" v-if="authorizShow" @click="authorizShow=false">
|
|
|
- <view class="authorizCont" @click.stop="">
|
|
|
- <view class="authorizName">{{wxOpenData.miniAppName}}</view>
|
|
|
- <view class="authorizMs">您好,欢迎访问本店,授权手机号登录能获取我们最新的促销活动哦~</view>
|
|
|
- <button class="authorizContbutton" type="default" open-type="getPhoneNumber" @getphonenumber="decryptPhoneNumber">授权</button>
|
|
|
- </view>
|
|
|
- <view style="text-align: center;padding-top: 56rpx;">
|
|
|
- <image src="../../static/timg/icon_guanbi@2x.png" mode="" class="authorizCloseImg"></image>
|
|
|
+ <!-- 手机号授权 -->
|
|
|
+ <view class="authorizBox" v-if="authorizShow" @click="authorizShow=false">
|
|
|
+ <view class="authorizCont" @click.stop="">
|
|
|
+ <view class="authorizName">{{wxOpenData.miniAppName}}</view>
|
|
|
+ <view class="authorizMs">您好,欢迎访问本店,授权手机号登录能获取我们最新的促销活动哦~</view>
|
|
|
+ <button class="authorizContbutton" type="default" open-type="getPhoneNumber"
|
|
|
+ @getphonenumber="decryptPhoneNumber">授权</button>
|
|
|
+ </view>
|
|
|
+ <view style="text-align: center;padding-top: 56rpx;">
|
|
|
+ <image src="../../static/timg/icon_guanbi@2x.png" mode="" class="authorizCloseImg"></image>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
</view>
|
|
|
</template>
|
|
@@ -202,9 +199,9 @@
|
|
|
lng: '',
|
|
|
lat: '',
|
|
|
},
|
|
|
- authorizShow:false,
|
|
|
- code:'',
|
|
|
- wxOpenData:'',
|
|
|
+ authorizShow: false,
|
|
|
+ code: '',
|
|
|
+ wxOpenData: '',
|
|
|
}
|
|
|
},
|
|
|
onLoad(opt) {
|
|
@@ -215,12 +212,12 @@
|
|
|
// console.log(res)
|
|
|
// that.location.lat = res.latitude
|
|
|
// that.location.lng = res.longitude
|
|
|
-
|
|
|
+
|
|
|
// that.queryMyDetail()
|
|
|
-
|
|
|
+
|
|
|
// },
|
|
|
// fail(err) {
|
|
|
-
|
|
|
+
|
|
|
// }
|
|
|
// });
|
|
|
this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
|
@@ -231,43 +228,43 @@
|
|
|
this.uid = wxOpenData.loginInfo.uid;
|
|
|
}
|
|
|
//this.userInfo = uni.getStorageSync("userInfo")
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
onShow() {
|
|
|
- this.userInfo=this.$store.state.userInfo;
|
|
|
- if(this.userInfo){
|
|
|
+ this.userInfo = this.$store.state.userInfo;
|
|
|
+ if (this.userInfo) {
|
|
|
this.queryMyDetail();
|
|
|
- }else{
|
|
|
- this.authorizShow=true;
|
|
|
+ } else {
|
|
|
+ this.authorizShow = true;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
decryptPhoneNumber: function(e) {
|
|
|
- console.log(e);
|
|
|
- this.code=e.detail.code
|
|
|
- this.wxPhoneLogin()
|
|
|
- this.authorizShow=false;
|
|
|
+ console.log(e);
|
|
|
+ this.code = e.detail.code
|
|
|
+ this.wxPhoneLogin()
|
|
|
+ this.authorizShow = false;
|
|
|
},
|
|
|
- wxPhoneLogin(){
|
|
|
- var that=this;
|
|
|
- this.$http('miniApp2/sys/wxPhoneLogin', {
|
|
|
- appId:'wx33053a645546ec31',
|
|
|
- unionId:'EEADACCD-8A19-499D-8AD7-6975D2C93243',
|
|
|
- code:this.code,
|
|
|
- openId:this.wxOpenData.openid
|
|
|
- },'POST').then(res => {
|
|
|
- var data = res.data;
|
|
|
- if(data.loginInfo){
|
|
|
- this.userInfo=data.loginInfo.openUser;
|
|
|
- this.wxOpenData=data.loginInfo;
|
|
|
- this.$store.commit('mutationswxOpenData', data.loginInfo)
|
|
|
- this.$store.commit('mutationsuserInfo', this.userInfo)
|
|
|
-
|
|
|
- this.queryMyDetail()
|
|
|
- }
|
|
|
- })
|
|
|
+ wxPhoneLogin() {
|
|
|
+ var that = this;
|
|
|
+ this.$http('miniApp2/sys/wxPhoneLogin', {
|
|
|
+ appId: 'wx33053a645546ec31',
|
|
|
+ unionId: 'EEADACCD-8A19-499D-8AD7-6975D2C93243',
|
|
|
+ code: this.code,
|
|
|
+ openId: this.wxOpenData.openid
|
|
|
+ }, 'POST').then(res => {
|
|
|
+ var data = res.data;
|
|
|
+ if (data.loginInfo) {
|
|
|
+ this.userInfo = data.loginInfo.openUser;
|
|
|
+ this.wxOpenData = data.loginInfo;
|
|
|
+ this.$store.commit('mutationswxOpenData', data.loginInfo)
|
|
|
+ this.$store.commit('mutationsuserInfo', this.userInfo)
|
|
|
+
|
|
|
+ this.queryMyDetail()
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
map() {
|
|
|
console.log("打开地图")
|
|
@@ -283,7 +280,8 @@
|
|
|
latitude: Number(that.numList.shopInfo.lat),
|
|
|
longitude: Number(that.numList.shopInfo.lng),
|
|
|
name: that.numList.shopInfo.shopName,
|
|
|
- address: that.numList.shopInfo.provinceName+that.numList.shopInfo.cityName+that.numList.shopInfo.areaName+that.numList.shopInfo.address,
|
|
|
+ address: that.numList.shopInfo.provinceName + that.numList.shopInfo.cityName + that.numList
|
|
|
+ .shopInfo.areaName + that.numList.shopInfo.address,
|
|
|
success: function() {
|
|
|
console.log('success');
|
|
|
},
|
|
@@ -304,7 +302,7 @@
|
|
|
url: './myOrder/myOrder?num=' + num
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
queryMyDetail() {
|
|
|
uni.showLoading({
|
|
|
title: '加载中'
|
|
@@ -312,11 +310,11 @@
|
|
|
this.$http('openreservation/getInfo', {
|
|
|
lat: this.location.lat ? this.location.lat : '',
|
|
|
lng: this.location.lng ? this.location.lng : '',
|
|
|
-
|
|
|
+
|
|
|
}, 'GET').then(res => {
|
|
|
uni.hideLoading();
|
|
|
this.numList = res.data
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
gonavigateTo(url) {
|
|
@@ -334,10 +332,10 @@
|
|
|
},
|
|
|
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 下拉刷新
|
|
|
onPullDownRefresh() {
|
|
|
-
|
|
|
+
|
|
|
this.queryMyDetail()
|
|
|
setTimeout(function() {
|
|
|
uni.stopPullDownRefresh();
|
|
@@ -351,87 +349,57 @@
|
|
|
|
|
|
width: 100vw;
|
|
|
min-height: 100vh;
|
|
|
- background: linear-gradient(180deg, #FFFFFF 0%, #F4F5F7 100%);
|
|
|
- padding-bottom: 60rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .topBox {
|
|
|
- background: url(http://dmsphoto.66km.com.cn/thFiles/F3AB15EB-B3EC-4597-8E07-0D550032BE54.png);
|
|
|
- background-size: 100% 100%;
|
|
|
- height: 302rpx;
|
|
|
- width: 100vw;
|
|
|
- }
|
|
|
-
|
|
|
- .status_bar {
|
|
|
-
|
|
|
- width: 100vw;
|
|
|
- position: fixed;
|
|
|
- top: 0;
|
|
|
- left: 0;
|
|
|
- z-index: 999;
|
|
|
- }
|
|
|
-
|
|
|
- .nav {
|
|
|
- line-height: 44px;
|
|
|
- font-size: 34rpx;
|
|
|
- font-weight: 600;
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- color: #333333;
|
|
|
- position: fixed;
|
|
|
- width: 100vw;
|
|
|
- left: 0;
|
|
|
|
|
|
+ background: #F4F5F7;
|
|
|
+ padding-bottom: 60rpx;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- .flex {
|
|
|
- display: flex;
|
|
|
+ .top {
|
|
|
+ height: 350rpx;
|
|
|
+ padding: 20rpx 24rpx 0;
|
|
|
+ background-color: #D53533;
|
|
|
+ border-radius: 0 0 10% 10%;
|
|
|
}
|
|
|
|
|
|
.customerMes {
|
|
|
display: flex;
|
|
|
- height: 120rpx;
|
|
|
- padding-left: 24rpx;
|
|
|
- margin-top: -120rpx;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
.mes {
|
|
|
- margin: 20rpx 15rpx 0rpx;
|
|
|
+ margin-left: 20rpx;
|
|
|
}
|
|
|
|
|
|
.nick {
|
|
|
|
|
|
margin-bottom: 5rpx;
|
|
|
|
|
|
-
|
|
|
display: flex;
|
|
|
justify-content: flex-start;
|
|
|
-
|
|
|
+ align-items: center;
|
|
|
}
|
|
|
|
|
|
.nickName {
|
|
|
font-size: 34rpx;
|
|
|
color: #333333;
|
|
|
font-weight: bold;
|
|
|
-
|
|
|
+ line-height: 48rpx;
|
|
|
+ height: 38rpx;
|
|
|
}
|
|
|
|
|
|
.grade {
|
|
|
margin-left: 15rpx;
|
|
|
font-size: 24rpx;
|
|
|
- color: #F19D01;
|
|
|
+ color: #FFFFFF;
|
|
|
padding: 0rpx 10rpx;
|
|
|
- border: 1rpx solid #F19D01;
|
|
|
+ border: 1rpx solid #FFFFFF;
|
|
|
border-radius: 4rpx;
|
|
|
- height: 32rpx;
|
|
|
+ height: 36rpx;
|
|
|
}
|
|
|
|
|
|
.phone {
|
|
|
font-size: 24rpx;
|
|
|
- color: #666666;
|
|
|
+ color: #FFFFFF;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -452,13 +420,13 @@
|
|
|
.numStr {
|
|
|
font-size: 40rpx;
|
|
|
font-weight: bold;
|
|
|
- color: #222222;
|
|
|
+ color: #FFFFFF;
|
|
|
line-height: 56rpx;
|
|
|
}
|
|
|
|
|
|
.nameStr {
|
|
|
font-size: 24rpx;
|
|
|
- color: #666666;
|
|
|
+ color: #FFFFFF;
|
|
|
}
|
|
|
|
|
|
.orderBox {
|
|
@@ -466,7 +434,8 @@
|
|
|
|
|
|
background: #FFFFFF;
|
|
|
padding: 30rpx 20rpx;
|
|
|
- border-radius: 10rpx;
|
|
|
+ border-radius: 10rpx;
|
|
|
+ margin-top: -100rpx;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -510,9 +479,9 @@
|
|
|
padding-top: 30rpx;
|
|
|
}
|
|
|
|
|
|
- .orderNum {
|
|
|
- width: 36rpx;
|
|
|
- height: 26rpx;
|
|
|
+ .orderNum {
|
|
|
+
|
|
|
+ height: 26rpx;
|
|
|
line-height: 26rpx;
|
|
|
background: #FF0000;
|
|
|
padding: 0 8rpx;
|
|
@@ -520,8 +489,8 @@
|
|
|
color: #FFFFFF;
|
|
|
font-size: 20rpx;
|
|
|
position: absolute;
|
|
|
- top: -5rpx;
|
|
|
- right: 38rpx;
|
|
|
+
|
|
|
+ left: 90rpx;
|
|
|
z-index: 11;
|
|
|
}
|
|
|
|
|
@@ -537,7 +506,7 @@
|
|
|
.rowBoxBg {
|
|
|
|
|
|
margin: 20rpx 24rpx;
|
|
|
- margin-top: 30rpx;
|
|
|
+
|
|
|
background: #FFFFFF;
|
|
|
|
|
|
border-radius: 10rpx;
|
|
@@ -631,7 +600,7 @@
|
|
|
color: #999999;
|
|
|
font-size: 24rpx;
|
|
|
padding-top: 15rpx;
|
|
|
-
|
|
|
+
|
|
|
/* 隐藏文字显示 ...不换行 */
|
|
|
overflow: hidden;
|
|
|
text-overflow: ellipsis;
|
|
@@ -646,7 +615,8 @@
|
|
|
width: 44rpx;
|
|
|
height: 45rpx;
|
|
|
}
|
|
|
- .authorizBox{
|
|
|
+
|
|
|
+ .authorizBox {
|
|
|
width: 100vw;
|
|
|
height: 100vh;
|
|
|
background: rgba(0, 0, 0, 0.5);
|
|
@@ -654,7 +624,8 @@
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
}
|
|
|
- .authorizCont{
|
|
|
+
|
|
|
+ .authorizCont {
|
|
|
margin-top: 30vh;
|
|
|
width: 564rpx;
|
|
|
height: 408rpx;
|
|
@@ -663,11 +634,13 @@
|
|
|
margin-left: 93rpx;
|
|
|
position: relative;
|
|
|
}
|
|
|
- .authorizCloseImg{
|
|
|
+
|
|
|
+ .authorizCloseImg {
|
|
|
width: 62rpx;
|
|
|
height: 62rpx;
|
|
|
}
|
|
|
- .sqLogoBox{
|
|
|
+
|
|
|
+ .sqLogoBox {
|
|
|
width: 180rpx;
|
|
|
height: 180rpx;
|
|
|
background: #FFFFFF;
|
|
@@ -677,14 +650,16 @@
|
|
|
top: -50rpx;
|
|
|
left: 192rpx;
|
|
|
}
|
|
|
- .authorizName{
|
|
|
+
|
|
|
+ .authorizName {
|
|
|
color: #333333;
|
|
|
line-height: 42rpx;
|
|
|
font-size: 30rpx;
|
|
|
text-align: center;
|
|
|
padding-top: 58rpx;
|
|
|
}
|
|
|
- .authorizMs{
|
|
|
+
|
|
|
+ .authorizMs {
|
|
|
color: #999999;
|
|
|
line-height: 36rpx;
|
|
|
font-size: 26rpx;
|
|
@@ -693,16 +668,17 @@
|
|
|
text-align: center;
|
|
|
margin-left: 56rpx;
|
|
|
}
|
|
|
- .authorizContbutton{
|
|
|
+
|
|
|
+ .authorizContbutton {
|
|
|
width: 422rpx;
|
|
|
height: 88rpx;
|
|
|
background: #D53533;
|
|
|
border-radius: 44rpx;
|
|
|
line-height: 88rpx;
|
|
|
text-align: center;
|
|
|
- font-size:30rpx;
|
|
|
+ font-size: 30rpx;
|
|
|
color: #FFFFFF;
|
|
|
margin-top: 62rpx;
|
|
|
- margin-left:71rpx;
|
|
|
+ margin-left: 71rpx;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|