Commit 25dc8fad authored by Mac's avatar Mac

1

parent d02570f7
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
<div class="auth-page"> <div class="auth-page">
<u-popup v-model="showDialog" mode="center" :mask-close-able="false" custom-style="padding:0;background:none;"> <u-popup v-model="showDialog" mode="center" :mask-close-able="false" custom-style="padding:0;background:none;">
<img :src="pageinfo.pic_url" mode="widthFix" /> <img :src="pageinfo.pic_url" mode="widthFix" />
<button :style="sureStyle" class="hotsopt" open-type="getUserInfo" @getuserinfo="showLogin==true?getUserInfo():''"></button> <!-- <button :style="sureStyle" class="hotsopt" open-type="getUserInfo" @getuserinfo="showLogin==true?getUserInfo():''"></button> -->
<button :style="sureStyle" class="hotsopt" @tap="showLogin==true?getUserProfile():''"></button>
<button :style="cancelStyle" class="hotsopt" @click="close"></button> <button :style="cancelStyle" class="hotsopt" @click="close"></button>
</u-popup> </u-popup>
<coupon v-if="showCoupons" :coupon-message="couponMessage" :cform="ComeFrom" @goLook="goLook" @closeBtn="closeBtn"></coupon> <coupon v-if="showCoupons" :coupon-message="couponMessage" :cform="ComeFrom" @goLook="goLook" @closeBtn="closeBtn"></coupon>
...@@ -35,7 +36,23 @@ ...@@ -35,7 +36,23 @@
this.cancelStyle = `height:${y.height}rpx;width:${y.width}rpx;left:${y.left}rpx;top:${y.top}rpx;`; this.cancelStyle = `height:${y.height}rpx;width:${y.width}rpx;left:${y.left}rpx;top:${y.top}rpx;`;
}, },
methods: { methods: {
getUserInfo(e) { getUserProfile(){
var that = this;
wx.getUserProfile({
desc: '用于完善资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: info => {
console.log(info.userInfo)
that.getUserInfo(info)
},
fail: () => {
uni.showToast({
title: '微信登录授权失败',
icon: 'none'
});
}
});
},
getUserInfo(info) {
var that = this; var that = this;
that.showDialog = true; that.showDialog = true;
uni.getProvider({ uni.getProvider({
...@@ -45,10 +62,6 @@ ...@@ -45,10 +62,6 @@
uni.login({ uni.login({
provider: 'weixin', provider: 'weixin',
success: res => { success: res => {
that.authorization = res.code;
uni.getUserInfo({
provider: 'weixin',
success: info => {
//这里请求接口 //这里请求接口
let obj = { let obj = {
Source: 1, Source: 1,
...@@ -60,14 +73,7 @@ ...@@ -60,14 +73,7 @@
code: res.code code: res.code
}; };
that.getCode(obj); that.getCode(obj);
},
fail: () => {
uni.showToast({
title: '微信登录授权失败',
icon: 'none'
});
}
});
}, },
fail: () => { fail: () => {
uni.showToast({ uni.showToast({
...@@ -95,9 +101,6 @@ ...@@ -95,9 +101,6 @@
uni.showLoading({ uni.showLoading({
title: '登录中' title: '登录中'
}); });
uni.getUserInfo({
provider: 'weixin',
success: info => {
//这里请求接口 //这里请求接口
var OpenId = ''; var OpenId = '';
that.request2({ that.request2({
...@@ -113,8 +116,6 @@ ...@@ -113,8 +116,6 @@
} }
} }
); );
}
});
}, },
//登录 //登录
getLogin(obj) { getLogin(obj) {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</view> </view>
</view> </view>
<view style="width: 1px;flex: 1;display: flex;align-items: flex-end;color: #FF4544;font-size: 12px;justify-content: flex-end;"> <view style="width: 1px;flex: 1;display: flex;align-items: flex-end;color: #FF4544;font-size: 12px;justify-content: flex-end;">
余额¥ <text style="font-size: 20px;">{{x.SurplusPrice}}99999</text> 余额¥ <text style="font-size: 20px;">{{x.SurplusPrice}}</text>
</view> </view>
<view class="chosen"> <view class="chosen">
<u-radio-group v-model="currentChosen"> <u-radio-group v-model="currentChosen">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment