小程序
This commit is contained in:
parent
201245bd45
commit
a3c83995b4
@ -104,7 +104,7 @@
|
||||
margin-top: 80rpx;
|
||||
text-align: center;
|
||||
margin-bottom: 50rpx;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.score {
|
||||
|
||||
@ -16,9 +16,9 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="nicheng2" v-else>
|
||||
<view class="tx-w">
|
||||
<view class="tx-w" @tap='wxGetUserInfo'>
|
||||
<view class="tx" style="margin-left: 130rpx;">
|
||||
<image class="tx-img" src="/static/登陆头像.png"></image>
|
||||
<image class="tx-img" src="/static/dl.png"></image>
|
||||
<view class="zx"></view>
|
||||
</view>
|
||||
<view class="login" style="margin-left:45% ;">
|
||||
@ -31,7 +31,6 @@
|
||||
<view class="top2" v-show="top2"></view>
|
||||
<view class="tip" v-show="tip">
|
||||
<button @tap='wxGetUserInfo'>授权登录</button>
|
||||
|
||||
</view>
|
||||
<view class="stuinfos" v-show="stuinfos">
|
||||
<view class="student">
|
||||
@ -42,7 +41,6 @@
|
||||
</view>
|
||||
<view class="th">
|
||||
|
||||
<!-- <button open-type="getPhoneNumber" @getphonenumber="getPhoneNumberp">获取手机号</button> -->
|
||||
<view class="stname">姓名</view>
|
||||
<view class="sex">性别</view>
|
||||
<view class="age">年龄</view>
|
||||
@ -80,7 +78,6 @@
|
||||
|
||||
</view>
|
||||
<view class="parentinfo">
|
||||
|
||||
<view class="stinfo">
|
||||
<img src="/static/parent.png" alt="" sizes="" srcset="">
|
||||
<text>家长信息</text>
|
||||
@ -109,6 +106,29 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="masks" style="" v-if="mask2">
|
||||
<view class="mask2">
|
||||
<view class="title">
|
||||
微信授权
|
||||
</view>
|
||||
<view class="sq">
|
||||
<!-- <img src="/static/sq.png" alt="" sizes="" srcset=""> -->
|
||||
<img src="/static/sq1.png" alt="" sizes="" srcset="">
|
||||
</view>
|
||||
|
||||
<view class="text">
|
||||
授权绑定您的手机号码
|
||||
</view>
|
||||
<view class="btns">
|
||||
<button class="btn1" @tap='mask=false'>拒绝</button>
|
||||
<!-- <view class="btn1" @tap='mask=false'>拒绝</view> -->
|
||||
<button class="btn2" open-type="getPhoneNumber" @getphonenumber="getPhoneNumberp">允许</button>
|
||||
<!-- <view class="btn2" @tap='gophone()'>确定</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@ -124,11 +144,13 @@
|
||||
top2: false,
|
||||
login: false,
|
||||
mask: false,
|
||||
mask2: false,
|
||||
before: false,
|
||||
stuinfos: false,
|
||||
tip: true,
|
||||
yonghuwx: [],
|
||||
code: 11,
|
||||
logincode: '',
|
||||
phonecode: '',
|
||||
studentList: [],
|
||||
classList: [],
|
||||
parentList: [],
|
||||
@ -159,13 +181,14 @@
|
||||
})
|
||||
},
|
||||
getPreOrderById() {
|
||||
getPreOrderById(this.code).then(res => {
|
||||
getPreOrderById(this.logincode, this.phonecode).then(res => {
|
||||
console.log((res))
|
||||
if (res.code == 200) {
|
||||
this.studentList = res.data.studentInfoList;
|
||||
this.classList = res.data.classInfoList;
|
||||
this.parentList = res.data;
|
||||
// this.mask = true;
|
||||
this.mask2=false;
|
||||
} else if (res.code == 500 && res.msg == "EMPTY") {
|
||||
this.mask = true;
|
||||
}
|
||||
@ -173,10 +196,21 @@
|
||||
},
|
||||
|
||||
getPhoneNumberp(val) {
|
||||
this.phonecode = val.detail.code
|
||||
console.log(this.phonecode)
|
||||
let that = this;
|
||||
wx.login({
|
||||
provider: 'weixin',
|
||||
success: function(loginRes) {
|
||||
console.log(loginRes)
|
||||
that.logincode = loginRes.code
|
||||
console.log(that.logincode)
|
||||
that.getPreOrderById();
|
||||
that.login = true
|
||||
that.stuinfos = true
|
||||
that.tip = false
|
||||
that.top2 = true
|
||||
that.top = false
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -192,13 +226,7 @@
|
||||
key: 'user',
|
||||
data: res.userInfo
|
||||
});
|
||||
that.getPreOrderById()
|
||||
that.getPhoneNumberp();
|
||||
that.login = true
|
||||
that.stuinfos = true
|
||||
that.tip = false
|
||||
that.top2 = true
|
||||
that.top = false
|
||||
that.mask2 = true
|
||||
},
|
||||
fail(res) {
|
||||
//失败则返回home页面
|
||||
@ -219,6 +247,7 @@
|
||||
},
|
||||
},
|
||||
onLoad(options) {
|
||||
// this.wxGetUserInfo();
|
||||
this.setitem();
|
||||
// this.yonghuwx = JSON.parse(options.userinfo)
|
||||
// console.log(this.yonghuwx)
|
||||
@ -257,15 +286,17 @@
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
border-top: 1px solid #4486e8;
|
||||
border-top: 1px solid #eeeeee;
|
||||
/* background-color: #4486e8; */
|
||||
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.btn1 {
|
||||
border-top: 1px solid #4486e8;
|
||||
border-right: 1px solid #4486e8;
|
||||
background-color: #4486e8;
|
||||
color: #fff;
|
||||
border-top: 1px solid #eeeeee;
|
||||
border-right: 1px solid #eeeeee;
|
||||
|
||||
/* color: #fff; */
|
||||
left: 0;
|
||||
}
|
||||
|
||||
@ -278,21 +309,45 @@
|
||||
top: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
.mask2{
|
||||
width: 70%;
|
||||
height: 400rpx;
|
||||
background-color: #fff;
|
||||
margin: 200rpx auto;
|
||||
position: relative;
|
||||
}
|
||||
.sq{
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
/* background-color: red; */
|
||||
margin:0 auto;
|
||||
padding-top: 25rpx;
|
||||
padding-bottom: 40rpx;
|
||||
}
|
||||
.masks img{
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 30rpx;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
padding-top: 40rpx;
|
||||
/* padding-top: 40rpx; */
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 40rpx;
|
||||
margin: 0 auto;
|
||||
width: 20%;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
border-bottom: 1px solid #eeeeee;
|
||||
/* background-color: red; */
|
||||
font-size: 36rpx;
|
||||
margin: 0px auto;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
/* line-height: 80rpx; */
|
||||
}
|
||||
|
||||
.mask {
|
||||
@ -367,10 +422,11 @@
|
||||
}
|
||||
|
||||
.name {
|
||||
text-align: center;
|
||||
margin-top: -120rpx;
|
||||
/*text-align: center;*/
|
||||
/*margin-top: -120rpx;*/
|
||||
/* margin-left: 10rpx; */
|
||||
margin-top: 10rpx;
|
||||
/*margin-top: 10rpx;*/
|
||||
margin-left: 280rpx;
|
||||
}
|
||||
|
||||
.name-qm {
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
<template>
|
||||
<view class="content">
|
||||
<uni-section class="card">
|
||||
@ -19,7 +20,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</uni-card>
|
||||
</uni-section>
|
||||
</uni-section>
|
||||
<!-- <img src="/static/name.png" alt="" sizes="" srcset=""> -->
|
||||
<!-- <text v-model="data.parentName">{{data.parentName}}</text> -->
|
||||
<!-- <input type="text" v-model="data.phone">-->
|
||||
@ -37,16 +38,16 @@
|
||||
return {
|
||||
data: {
|
||||
// 370883199909083232
|
||||
// 18363008969
|
||||
// 小刘
|
||||
|
||||
// 18363008969
|
||||
// 小刘
|
||||
|
||||
cardNo: "",
|
||||
parentName: "",
|
||||
phone: "",
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
bindParent() {
|
||||
bindParent(this.data).then(res => {
|
||||
|
||||
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
Loading…
Reference in New Issue
Block a user