From a4d147c26c29cbc1470ca34468e93a3e14635bf0 Mon Sep 17 00:00:00 2001 From: shidongli Date: Fri, 26 Aug 2022 12:48:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.vue | 74 +++++++++++++++++++++++++++++++++---------- 1 file changed, 57 insertions(+), 17 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index 305768f..8147708 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -122,7 +122,7 @@ 授权绑定您的手机号码 - + @@ -188,7 +188,7 @@ this.classList = res.data.classInfoList; this.parentList = res.data; // this.mask = true; - this.mask2=false; + this.mask2 = false; } else if (res.code == 500 && res.msg == "EMPTY") { this.mask = true; } @@ -197,6 +197,11 @@ getPhoneNumberp(val) { this.phonecode = val.detail.code + console.log(val) + uni.setStorage({ + key: 'phonecode', + data: val.detail.code + }); console.log(this.phonecode) let that = this; wx.login({ @@ -211,6 +216,7 @@ that.tip = false that.top2 = true that.top = false + that.mask2 = false; } }); }, @@ -247,8 +253,46 @@ }, }, onLoad(options) { - // this.wxGetUserInfo(); - this.setitem(); + let that = this; + 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) // console.log(this.yonghuwx) // uni.request({ @@ -288,43 +332,43 @@ .btn2 { border-top: 1px solid #eeeeee; /* background-color: #4486e8; */ - right: 0; } - .btn1 { border-top: 1px solid #eeeeee; border-right: 1px solid #eeeeee; - - /* color: #fff; */ + background-color: #4486e8; + color: #fff; left: 0; } .masks { background-color: #f0f0f0; - height: 2000rpx; + height: 100%; width: 100%; position: absolute; opacity: 0.9; top: 0; z-index: 999; } - .mask2{ + .mask2 { width: 70%; height: 400rpx; background-color: #fff; margin: 200rpx auto; position: relative; } - .sq{ + + .sq { width: 90rpx; height: 90rpx; /* background-color: red; */ - margin:0 auto; + margin: 0 auto; padding-top: 25rpx; padding-bottom: 40rpx; } - .masks img{ + + .masks img { width: 90rpx; height: 90rpx; } @@ -422,10 +466,6 @@ } .name { - /*text-align: center;*/ - /*margin-top: -120rpx;*/ - /* margin-left: 10rpx; */ - /*margin-top: 10rpx;*/ margin-left: 280rpx; }