|
@@ -53,7 +53,7 @@
|
|
|
</view>
|
|
|
|
|
|
<!-- 服务顾问 -->
|
|
|
- <view class="adviser" v-if="homeCardList.openMUsers">
|
|
|
+ <view class="adviser" v-if="homeCardList.openMUsers" @click="goRoter">
|
|
|
<view class="adviserLeft">
|
|
|
<img src="../../static/timg/pic_def_ava@2x.png" alt="" class="advisertx">
|
|
|
<view class="adviserNema">{{homeCardList.openMUsers.operatorName}}</view>
|
|
@@ -162,10 +162,25 @@
|
|
|
|
|
|
|
|
|
<view style="height: 60rpx;"></view>
|
|
|
+ <!-- 手机号授权 -->
|
|
|
+ <view class="authorizBox" v-if="authorizShow" @click="authorizShow=false">
|
|
|
+ <view class="authorizCont" @click.stop="">
|
|
|
+ <view class="sqLogoBox">
|
|
|
+ logo
|
|
|
+ </view>
|
|
|
+ <view class="authorizName">这是小程序名称</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 @getphonenumber="decryptPhoneNumber" >shopId:{{shopId}}</view>
|
|
|
|
|
|
- <button type="default" open-type="getPhoneNumber" @getphonenumber="decryptPhoneNumber">获取手机号</button> -->
|
|
|
+ -->
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -177,8 +192,9 @@
|
|
|
url:'',
|
|
|
wxOpenData:'',
|
|
|
code:'',
|
|
|
- carInfo:{},
|
|
|
+ carInfo:'',
|
|
|
homeCardList:'',
|
|
|
+ authorizShow:false,
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
@@ -208,6 +224,13 @@
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ addCar(){
|
|
|
+ if(!this.userInfo){
|
|
|
+ this.authorizShow=true;
|
|
|
+ }else{
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
information(){
|
|
|
|
|
|
},
|
|
@@ -215,9 +238,14 @@
|
|
|
|
|
|
},
|
|
|
goRoter(url){
|
|
|
- uni.navigateTo({
|
|
|
- url:url
|
|
|
- })
|
|
|
+ if(!this.userInfo){
|
|
|
+ this.authorizShow=true;
|
|
|
+ }else{
|
|
|
+ uni.navigateTo({
|
|
|
+ url:url
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
decryptPhoneNumber: function(e) {
|
|
|
console.log(e);
|
|
@@ -261,9 +289,11 @@
|
|
|
// this.code=e.code;
|
|
|
this.$http('miniApp2/sys/getWxOpenID', {
|
|
|
code:e.code,
|
|
|
- shopId:'E37BB296-5A08-4534-859D-B351BA611AF9'
|
|
|
+ unionId:'EEADACCD-8A19-499D-8AD7-6975D2C93243'
|
|
|
},'GET').then(res => {
|
|
|
this.wxOpenData=res.data;
|
|
|
+
|
|
|
+ that.queryHomeCardList()
|
|
|
//that.wxPhoneLogin()
|
|
|
uni.setStorage({
|
|
|
key: 'wxOpenData',
|
|
@@ -278,8 +308,7 @@
|
|
|
key: 'userInfo',
|
|
|
data: that.wxOpenData.loginInfo.openUser,
|
|
|
success: function () {
|
|
|
- // that.uniLogin()
|
|
|
-
|
|
|
+ that.getCarList()
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -291,12 +320,13 @@
|
|
|
var that=this;
|
|
|
this.$http('miniApp2/sys/wxPhoneLogin', {
|
|
|
appId:'wx33053a645546ec31',
|
|
|
- shopId:'E37BB296-5A08-4534-859D-B351BA611AF9',
|
|
|
+ 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
|
|
|
uni.setStorage({
|
|
|
key: 'userInfo',
|
|
|
data: data.loginInfo.openUser,
|
|
@@ -330,6 +360,65 @@
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
+ .authorizBox{
|
|
|
+ width: 100vw;
|
|
|
+ height: 100vh;
|
|
|
+ background: rgba(0, 0, 0, 0.5);
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ }
|
|
|
+ .authorizCont{
|
|
|
+ margin-top: 30vh;
|
|
|
+ width: 564rpx;
|
|
|
+ height: 484rpx;
|
|
|
+ background: #FFFFFF;
|
|
|
+ border-radius: 24rpx;
|
|
|
+ margin-left: 93rpx;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+ .authorizCloseImg{
|
|
|
+ width: 62rpx;
|
|
|
+ height: 62rpx;
|
|
|
+ }
|
|
|
+ .sqLogoBox{
|
|
|
+ width: 180rpx;
|
|
|
+ height: 180rpx;
|
|
|
+ background: #FFFFFF;
|
|
|
+ border-radius: 90rpx;
|
|
|
+ text-align: center;
|
|
|
+ position: absolute;
|
|
|
+ top: -50rpx;
|
|
|
+ left: 192rpx;
|
|
|
+ }
|
|
|
+ .authorizName{
|
|
|
+ color: #333333;
|
|
|
+ line-height: 42rpx;
|
|
|
+ font-size: 30rpx;
|
|
|
+ text-align: center;
|
|
|
+ padding-top: 140rpx;
|
|
|
+ }
|
|
|
+ .authorizMs{
|
|
|
+ color: #999999;
|
|
|
+ line-height: 36rpx;
|
|
|
+ font-size: 26rpx;
|
|
|
+ width: 452rpx;
|
|
|
+ padding-top: 24rpx;
|
|
|
+ text-align: center;
|
|
|
+ margin-left: 56rpx;
|
|
|
+ }
|
|
|
+ .authorizContbutton{
|
|
|
+ width: 422rpx;
|
|
|
+ height: 88rpx;
|
|
|
+ background: #D53533;
|
|
|
+ border-radius: 44rpx;
|
|
|
+ line-height: 88rpx;
|
|
|
+ text-align: center;
|
|
|
+ font-size:30rpx;
|
|
|
+ color: #FFFFFF;
|
|
|
+ margin-top: 62rpx;
|
|
|
+ margin-left:71rpx;
|
|
|
+ }
|
|
|
.content{
|
|
|
min-height: 100vh;
|
|
|
background: #F4F5F7;
|
|
@@ -362,6 +451,9 @@
|
|
|
margin-left: 24rpx;
|
|
|
overflow: hidden;
|
|
|
|
|
|
+ }
|
|
|
+ .carinfoBox2{
|
|
|
+
|
|
|
}
|
|
|
.carinfoBox .carLogo{
|
|
|
width: 72rpx;height: 72rpx;
|
|
@@ -457,6 +549,9 @@
|
|
|
.shoptopbox{
|
|
|
margin-top: -200rpx;
|
|
|
}
|
|
|
+ .shoptopbox2{
|
|
|
+ margin-top: -160rpx;
|
|
|
+ }
|
|
|
.adviser{
|
|
|
width: 662rpx;
|
|
|
margin-left: 24rpx;
|