小程序

This commit is contained in:
shidongli 2022-08-26 12:48:59 +08:00
parent a3c83995b4
commit a4d147c26c

View File

@ -122,7 +122,7 @@
授权绑定您的手机号码 授权绑定您的手机号码
</view> </view>
<view class="btns"> <view class="btns">
<button class="btn1" @tap='mask=false'>拒绝</button> <button class="btn1" @tap='mask2=false'>拒绝</button>
<!-- <view class="btn1" @tap='mask=false'>拒绝</view> --> <!-- <view class="btn1" @tap='mask=false'>拒绝</view> -->
<button class="btn2" open-type="getPhoneNumber" @getphonenumber="getPhoneNumberp">允许</button> <button class="btn2" open-type="getPhoneNumber" @getphonenumber="getPhoneNumberp">允许</button>
<!-- <view class="btn2" @tap='gophone()'>确定</view> --> <!-- <view class="btn2" @tap='gophone()'>确定</view> -->
@ -188,7 +188,7 @@
this.classList = res.data.classInfoList; this.classList = res.data.classInfoList;
this.parentList = res.data; this.parentList = res.data;
// this.mask = true; // this.mask = true;
this.mask2=false; this.mask2 = false;
} else if (res.code == 500 && res.msg == "EMPTY") { } else if (res.code == 500 && res.msg == "EMPTY") {
this.mask = true; this.mask = true;
} }
@ -197,6 +197,11 @@
getPhoneNumberp(val) { getPhoneNumberp(val) {
this.phonecode = val.detail.code this.phonecode = val.detail.code
console.log(val)
uni.setStorage({
key: 'phonecode',
data: val.detail.code
});
console.log(this.phonecode) console.log(this.phonecode)
let that = this; let that = this;
wx.login({ wx.login({
@ -211,6 +216,7 @@
that.tip = false that.tip = false
that.top2 = true that.top2 = true
that.top = false that.top = false
that.mask2 = false;
} }
}); });
}, },
@ -247,8 +253,46 @@
}, },
}, },
onLoad(options) { onLoad(options) {
// this.wxGetUserInfo(); let that = this;
this.setitem(); uni.getStorage({
key: 'phonecode',
success: function(res) {
that.phonecode = res.data
// that.mask = true
}
});
wx.login({
provider: 'weixin',
success: function(loginRes) {
console.log(loginRes)
that.logincode = loginRes.code
console.log(that.logincode)
if (that.logincode != '') {
that.getPreOrderById();
}
}
});
uni.getStorage({
key: 'user',
success: function(res) {
that.yonghuwx = res.data
console.log(that.yonghuwx);
that.login = true
that.stuinfos = true
that.tip = false
that.top2 = true
that.top = false
// that.mask = true
}
});
// this.yonghuwx = JSON.parse(options.userinfo) // this.yonghuwx = JSON.parse(options.userinfo)
// console.log(this.yonghuwx) // console.log(this.yonghuwx)
// uni.request({ // uni.request({
@ -288,43 +332,43 @@
.btn2 { .btn2 {
border-top: 1px solid #eeeeee; border-top: 1px solid #eeeeee;
/* background-color: #4486e8; */ /* background-color: #4486e8; */
right: 0; right: 0;
} }
.btn1 { .btn1 {
border-top: 1px solid #eeeeee; border-top: 1px solid #eeeeee;
border-right: 1px solid #eeeeee; border-right: 1px solid #eeeeee;
background-color: #4486e8;
/* color: #fff; */ color: #fff;
left: 0; left: 0;
} }
.masks { .masks {
background-color: #f0f0f0; background-color: #f0f0f0;
height: 2000rpx; height: 100%;
width: 100%; width: 100%;
position: absolute; position: absolute;
opacity: 0.9; opacity: 0.9;
top: 0; top: 0;
z-index: 999; z-index: 999;
} }
.mask2{ .mask2 {
width: 70%; width: 70%;
height: 400rpx; height: 400rpx;
background-color: #fff; background-color: #fff;
margin: 200rpx auto; margin: 200rpx auto;
position: relative; position: relative;
} }
.sq{
.sq {
width: 90rpx; width: 90rpx;
height: 90rpx; height: 90rpx;
/* background-color: red; */ /* background-color: red; */
margin:0 auto; margin: 0 auto;
padding-top: 25rpx; padding-top: 25rpx;
padding-bottom: 40rpx; padding-bottom: 40rpx;
} }
.masks img{
.masks img {
width: 90rpx; width: 90rpx;
height: 90rpx; height: 90rpx;
} }
@ -422,10 +466,6 @@
} }
.name { .name {
/*text-align: center;*/
/*margin-top: -120rpx;*/
/* margin-left: 10rpx; */
/*margin-top: 10rpx;*/
margin-left: 280rpx; margin-left: 280rpx;
} }