维护
This commit is contained in:
parent
669e845324
commit
870d0eec2a
@ -8,7 +8,7 @@ var request = function(config) {
|
|||||||
method: config.method,
|
method: config.method,
|
||||||
timeout: 5000,
|
timeout: 5000,
|
||||||
header: {
|
header: {
|
||||||
// token: uni.getStorageSync('token')
|
// token: uni.getStorageSync('token')
|
||||||
},
|
},
|
||||||
success(res) {
|
success(res) {
|
||||||
resolve(res.data)
|
resolve(res.data)
|
||||||
|
|||||||
@ -2,24 +2,25 @@
|
|||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="" style="width:100%">
|
<view class="" style="width:100%">
|
||||||
<view class="top" v-show="top"></view>
|
<view class="top" v-show="top"></view>
|
||||||
<view class="nicheng" v-if="login">
|
<view class="nicheng" v-if="login" @tap='wxGetUserInfo'>
|
||||||
<view class="tx-w">
|
<view class="tx-w">
|
||||||
<view class="tx">
|
<view class="tx">
|
||||||
<image class="tx-img" src="/static/dl.png" v-if="yonghuwx.avatarUrl==''"></image>
|
<image class="tx-img" src="/static/dl.png" v-if="yonghuwx.length==0"></image>
|
||||||
|
<image class="tx-img" src="/static/dl.png" v-else-if="yonghuwx.avatarUrl==''"></image>
|
||||||
<image class="tx-img" :src="yonghuwx.avatarUrl" v-else></image>
|
<image class="tx-img" :src="yonghuwx.avatarUrl" v-else></image>
|
||||||
<view class="zx"></view>
|
<view class="zx"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="infos">
|
<view class="infos">
|
||||||
<view class="studentName" v-if="parentList.parentName==''">姓名:{{yonghuwx.nickName}}</view>
|
<view class="studentName" v-if="parentList.parentName==''">姓名:{{yonghuwx.nickName}}</view>
|
||||||
<view class="studentName" v-else>姓名:{{parentList.parentName}}</view>
|
<view class="studentName" v-else>姓名:{{parentList.parentName}}</view>
|
||||||
<view class="name" v-if="yonghuwx.nickName==''">昵称:{{parentList.parentName}} </view>
|
<view class="name" v-if="yonghuwx.length==0">昵称:{{parentList.parentName}} </view>
|
||||||
|
<view class="name" v-else-if="yonghuwx.nickName==''">昵称:{{parentList.parentName}} </view>
|
||||||
<view class="name" v-else>昵称:{{yonghuwx.nickName}} </view>
|
<view class="name" v-else>昵称:{{yonghuwx.nickName}} </view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="nicheng2" v-else>
|
<view class="nicheng2" v-else>
|
||||||
<view class="tx-w" @tap='wxGetUserInfo'>
|
<view class="tx-w">
|
||||||
<view class="tx" style="margin-left: 130rpx;">
|
<view class="tx" style="margin-left: 130rpx;">
|
||||||
<image class="tx-img" src="/static/dl.png"></image>
|
<image class="tx-img" src="/static/dl.png"></image>
|
||||||
<view class="zx"></view>
|
<view class="zx"></view>
|
||||||
@ -33,14 +34,14 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="top2" v-show="top2"></view>
|
<view class="top2" v-show="top2"></view>
|
||||||
<view class="tip" v-show="tip">
|
<view class="tip" v-show="tip">
|
||||||
<button @tap='wxGetUserInfo'>授权登录</button>
|
<!-- <button @tap='wxGetUserInfo'>授权登录</button> -->
|
||||||
|
<button open-type="getPhoneNumber" @getphonenumber="getPhoneNumberp">授权登录</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="stuinfos" v-show="stuinfos">
|
<view class="stuinfos" v-show="stuinfos">
|
||||||
<view class="student">
|
<view class="student">
|
||||||
<view class="stinfo">
|
<view class="stinfo">
|
||||||
<img src="/static/student.png" alt="" sizes="" srcset="">
|
<img src="/static/student.png" alt="" sizes="" srcset="">
|
||||||
<view class="st">学生信息</view>
|
<view class="st">学生信息</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="th">
|
<view class="th">
|
||||||
<view class="stname">姓名</view>
|
<view class="stname">姓名</view>
|
||||||
@ -76,8 +77,6 @@
|
|||||||
<span class='teachername'> {{item.classTeacher}}</span>
|
<span class='teachername'> {{item.classTeacher}}</span>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="parentinfo">
|
<view class="parentinfo">
|
||||||
<view class="stinfo">
|
<view class="stinfo">
|
||||||
@ -99,7 +98,7 @@
|
|||||||
<view class="title">
|
<view class="title">
|
||||||
提示
|
提示
|
||||||
</view>
|
</view>
|
||||||
<view class="text">
|
<view class="text" style="margin-top:40rpx">
|
||||||
您的手机号不符合,请更改信息
|
您的手机号不符合,请更改信息
|
||||||
</view>
|
</view>
|
||||||
<view class="btns">
|
<view class="btns">
|
||||||
@ -108,13 +107,13 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="masks" style="" v-if="mask2">
|
<!-- <view class="masks" style="" v-if="mask2">
|
||||||
<view class="mask2">
|
<view class="mask2">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
微信授权
|
微信授权
|
||||||
</view>
|
</view>
|
||||||
<view class="sq">
|
<view class="sq">
|
||||||
<!-- <img src="/static/sq.png" alt="" sizes="" srcset=""> -->
|
<img src="/static/sq.png" alt="" sizes="" srcset="">
|
||||||
<img src="/static/sq1.png" alt="" sizes="" srcset="">
|
<img src="/static/sq1.png" alt="" sizes="" srcset="">
|
||||||
</view>
|
</view>
|
||||||
<view class="text">
|
<view class="text">
|
||||||
@ -122,12 +121,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="btns">
|
<view class="btns">
|
||||||
<button class="btn1" @tap='mask2=false'>拒绝</button>
|
<button class="btn1" @tap='mask2=false'>拒绝</button>
|
||||||
<!-- <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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -166,7 +163,6 @@
|
|||||||
key: 'user',
|
key: 'user',
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
that.yonghuwx = res.data
|
that.yonghuwx = res.data
|
||||||
console.log(that.yonghuwx);
|
|
||||||
that.login = true
|
that.login = true
|
||||||
that.stuinfos = true
|
that.stuinfos = true
|
||||||
that.tip = false
|
that.tip = false
|
||||||
@ -186,7 +182,6 @@
|
|||||||
},
|
},
|
||||||
getPreOrderById() {
|
getPreOrderById() {
|
||||||
getPreOrderById(this.logincode, this.phonecode).then(res => {
|
getPreOrderById(this.logincode, this.phonecode).then(res => {
|
||||||
console.log((res))
|
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
if (res.data.flag == "EMPTY") {
|
if (res.data.flag == "EMPTY") {
|
||||||
this.mask = true;
|
this.mask = true;
|
||||||
@ -206,7 +201,7 @@
|
|||||||
this.tip = false
|
this.tip = false
|
||||||
this.top2 = true
|
this.top2 = true
|
||||||
this.top = false
|
this.top = false
|
||||||
this.mask2 = false;
|
// this.mask2 = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -214,16 +209,13 @@
|
|||||||
|
|
||||||
getPhoneNumberp(val) {
|
getPhoneNumberp(val) {
|
||||||
this.phonecode = val.detail.code
|
this.phonecode = val.detail.code
|
||||||
console.log(val)
|
|
||||||
let that = this;
|
let that = this;
|
||||||
wx.login({
|
wx.login({
|
||||||
provider: 'weixin',
|
provider: 'weixin',
|
||||||
success: function(loginRes) {
|
success: function(loginRes) {
|
||||||
console.log(loginRes)
|
|
||||||
that.logincode = loginRes.code
|
that.logincode = loginRes.code
|
||||||
console.log(that.logincode)
|
|
||||||
that.getPreOrderById();
|
that.getPreOrderById();
|
||||||
that.mask2 = false;
|
// that.mask2 = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -233,7 +225,6 @@
|
|||||||
desc: "获取用户信息",
|
desc: "获取用户信息",
|
||||||
lang: "zh_CN",
|
lang: "zh_CN",
|
||||||
success(res) {
|
success(res) {
|
||||||
console.log(res)
|
|
||||||
that.yonghuwx = res.userInfo
|
that.yonghuwx = res.userInfo
|
||||||
uni.setStorage({
|
uni.setStorage({
|
||||||
key: 'user',
|
key: 'user',
|
||||||
@ -245,17 +236,23 @@
|
|||||||
//失败则返回home页面
|
//失败则返回home页面
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getInfoByPhoneinfo() {
|
getInfoByPhoneinfo() {
|
||||||
|
var that = this
|
||||||
getInfoByPhone(this.phone).then(res => {
|
getInfoByPhone(this.phone).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
console.log(res)
|
|
||||||
this.studentList = res.data.studentInfoList;
|
this.studentList = res.data.studentInfoList;
|
||||||
this.classList = res.data.classInfoList;
|
this.classList = res.data.classInfoList;
|
||||||
this.parentList = res.data;
|
this.parentList = res.data;
|
||||||
|
that.login = true
|
||||||
|
that.stuinfos = true
|
||||||
|
that.tip = false
|
||||||
|
that.top2 = true
|
||||||
|
that.top = false
|
||||||
// this.mask = true;
|
// this.mask = true;
|
||||||
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -267,43 +264,19 @@
|
|||||||
"FAMELE": "女",
|
"FAMELE": "女",
|
||||||
"MALE": "男",
|
"MALE": "男",
|
||||||
}
|
}
|
||||||
|
|
||||||
return sexEnum[str];
|
return sexEnum[str];
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
onShow() {},
|
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
let that = this;
|
let that = this;
|
||||||
uni.getStorage({
|
|
||||||
key: 'user',
|
|
||||||
success: function(res) {
|
|
||||||
that.yonghuwx = res.data
|
|
||||||
that.login = true
|
|
||||||
that.stuinfos = true
|
|
||||||
that.tip = false
|
|
||||||
that.top2 = true
|
|
||||||
that.top = false
|
|
||||||
// that.mask = true
|
|
||||||
},
|
|
||||||
fail: function(err) {
|
|
||||||
console.log('1', (err))
|
|
||||||
that.login = false
|
|
||||||
that.stuinfos = false
|
|
||||||
that.tip = true
|
|
||||||
that.top2 = false
|
|
||||||
that.top = true
|
|
||||||
}
|
|
||||||
});
|
|
||||||
uni.getStorage({
|
uni.getStorage({
|
||||||
key: 'phone',
|
key: 'phone',
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
console.log((res))
|
|
||||||
that.phone = res.data
|
that.phone = res.data
|
||||||
// that.mask = true
|
// that.mask = true
|
||||||
that.getInfoByPhoneinfo();
|
that.getInfoByPhoneinfo();
|
||||||
},
|
},
|
||||||
fail: function(err) {
|
fail: function(err) {
|
||||||
console.log('1', (err))
|
|
||||||
that.login = false
|
that.login = false
|
||||||
that.stuinfos = false
|
that.stuinfos = false
|
||||||
that.tip = true
|
that.tip = true
|
||||||
@ -311,7 +284,14 @@
|
|||||||
that.top = true
|
that.top = true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
uni.getStorage({
|
||||||
|
key: 'user',
|
||||||
|
success: function(res) {
|
||||||
|
that.yonghuwx = res.data
|
||||||
|
// that.mask = true
|
||||||
|
},
|
||||||
|
fail: function(err) {}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -319,7 +299,6 @@
|
|||||||
|
|
||||||
|
|
||||||
// this.yonghuwx = JSON.parse(options.userinfo)
|
// this.yonghuwx = JSON.parse(options.userinfo)
|
||||||
// console.log(this.yonghuwx)
|
|
||||||
// uni.request({
|
// uni.request({
|
||||||
// url: '/kindergarten/applet/appletLogin', //仅为示例,并非真实接口地址。
|
// url: '/kindergarten/applet/appletLogin', //仅为示例,并非真实接口地址。
|
||||||
// method:'GET'
|
// method:'GET'
|
||||||
@ -328,7 +307,6 @@
|
|||||||
// },
|
// },
|
||||||
|
|
||||||
// success: (res) => {
|
// success: (res) => {
|
||||||
// console.log(res.data);
|
|
||||||
// this.text = 'request success';
|
// this.text = 'request success';
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user