Merge branch 'youda' into youda_wz
This commit is contained in:
commit
504452087e
|
|
@ -5,7 +5,7 @@
|
|||
<image :src="$img1('common/logo.png?x=1')"></image>
|
||||
</view>
|
||||
<view class="" style="width: 676rpx; height: 2rpx; background-color: #E8E8E8; margin-left: 38rpx;">
|
||||
|
||||
|
||||
</view>
|
||||
<view class="content">
|
||||
<view>申请获取以下权限</view>
|
||||
|
|
@ -14,155 +14,155 @@
|
|||
<!-- type='primary' -->
|
||||
<view class="flex center column" style="width: 100%;">
|
||||
<button class="bottom flex center" withCredentials="true" lang="zh_CN" open-type="getPhoneNumber"
|
||||
@getphonenumber="getPhoneNumber">
|
||||
授权手机号
|
||||
</button>
|
||||
|
||||
<view class="quxiao" @click="back()">取消</view>
|
||||
@getphonenumber="getPhoneNumber">
|
||||
授权手机号
|
||||
</button>
|
||||
|
||||
<view class="quxiao" @click="back()">取消</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- </uni-popup> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
z_imgPath: this.$z_img2
|
||||
}
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
z_imgPath: this.$z_img2
|
||||
}
|
||||
},
|
||||
created() {
|
||||
//默认加载
|
||||
// this.login();
|
||||
},
|
||||
methods: {
|
||||
back() {
|
||||
// uni.navigateBack()
|
||||
uni.reLaunch({
|
||||
url: 'index'
|
||||
})
|
||||
},
|
||||
created() {
|
||||
//默认加载
|
||||
// this.login();
|
||||
},
|
||||
methods: {
|
||||
back() {
|
||||
// uni.navigateBack()
|
||||
uni.reLaunch({
|
||||
url: 'index'
|
||||
})
|
||||
},
|
||||
getPhoneNumber(e) {
|
||||
// console.log(e)
|
||||
let that = this
|
||||
uni.login({
|
||||
success(res) {
|
||||
// console.log(res)
|
||||
uni.checkSession({
|
||||
success() {
|
||||
that.req({
|
||||
url: 'login_bind_mobile',
|
||||
data: {
|
||||
code: e.detail.code,
|
||||
encryptedData: e.detail.encryptedData,
|
||||
iv: e.detail.iv
|
||||
},
|
||||
success(res) {
|
||||
if (res.status == 1) {
|
||||
// uni.setStorageSync('token', res.data)
|
||||
uni.showToast({
|
||||
title: '绑定成功~',
|
||||
icon: 'success',
|
||||
success() {
|
||||
// var pageurl = uni.getStorageSync(
|
||||
// 'page');
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: 'index'
|
||||
})
|
||||
// console.log(pageurl);
|
||||
// if (pageurl != null &&
|
||||
// pageurl != '') {
|
||||
// console.log(pageurl +
|
||||
// "12321312");
|
||||
// // uni.reLaunch({
|
||||
// // url: pageurl
|
||||
// // })
|
||||
// } else {
|
||||
// uni.navigateBack()
|
||||
// }
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
}
|
||||
getPhoneNumber(e) {
|
||||
// console.log(e)
|
||||
let that = this
|
||||
uni.login({
|
||||
success(res) {
|
||||
// console.log(res)
|
||||
uni.checkSession({
|
||||
success() {
|
||||
that.req({
|
||||
url: 'login_bind_mobile',
|
||||
data: {
|
||||
code: e.detail.code,
|
||||
encryptedData: e.detail.encryptedData,
|
||||
iv: e.detail.iv
|
||||
},
|
||||
success(res) {
|
||||
if (res.status == 1) {
|
||||
// uni.setStorageSync('token', res.data)
|
||||
uni.showToast({
|
||||
title: '绑定成功~',
|
||||
icon: 'success',
|
||||
success() {
|
||||
// var pageurl = uni.getStorageSync(
|
||||
// 'page');
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: 'index'
|
||||
})
|
||||
// console.log(pageurl);
|
||||
// if (pageurl != null &&
|
||||
// pageurl != '') {
|
||||
// console.log(pageurl +
|
||||
// "12321312");
|
||||
// // uni.reLaunch({
|
||||
// // url: pageurl
|
||||
// // })
|
||||
// } else {
|
||||
// uni.navigateBack()
|
||||
// }
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/* .box {
|
||||
/* .box {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
} */
|
||||
|
||||
.header {
|
||||
padding-top: 90rpx;
|
||||
/* padding: 90rpx 0 90rpx 50rpx; */
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
height: 300rpx;
|
||||
line-height: 450rpx;
|
||||
}
|
||||
.header {
|
||||
padding-top: 90rpx;
|
||||
/* padding: 90rpx 0 90rpx 50rpx; */
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
height: 300rpx;
|
||||
line-height: 450rpx;
|
||||
}
|
||||
|
||||
.header image {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.header image {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.content {
|
||||
margin-top: 68rpx;
|
||||
margin-left: 50rpx;
|
||||
margin-bottom: 90rpx;
|
||||
color: #333333;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.content {
|
||||
margin-top: 68rpx;
|
||||
margin-left: 50rpx;
|
||||
margin-bottom: 90rpx;
|
||||
color: #333333;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.content text {
|
||||
display: block;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
.content text {
|
||||
display: block;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
/* border-radius: 80rpx; */
|
||||
width: 416rpx;
|
||||
height: 80rpx;
|
||||
margin: 70rpx 50rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.bottom {
|
||||
/* border-radius: 80rpx; */
|
||||
width: 416rpx;
|
||||
height: 80rpx;
|
||||
margin: 70rpx 50rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
button::after {
|
||||
border: none;
|
||||
}
|
||||
button::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
button {
|
||||
background: #333333;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #CDEF27;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
button {
|
||||
background: #333333;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #CDEF27;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.quxiao {
|
||||
background-color: #CDEF27;
|
||||
width: 416rpx;
|
||||
height: 80rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 16rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
.quxiao {
|
||||
background-color: #CDEF27;
|
||||
width: 416rpx;
|
||||
height: 80rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 16rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -415,7 +415,7 @@ export default {
|
|||
methods: {
|
||||
toChange() {
|
||||
var user = uni.getStorageSync('userinfo');
|
||||
if (user == null || user == "") {
|
||||
if (user == null || user == "" || this.userinfo == '') {
|
||||
this.$c.nav("/pages/user/login")
|
||||
return;
|
||||
}
|
||||
|
|
@ -531,7 +531,13 @@ export default {
|
|||
iv: e.detail.iv
|
||||
},
|
||||
success(res) {
|
||||
console.log(res);
|
||||
|
||||
if (res.status == 1) {
|
||||
if (res.data != null && res.data.token != null) {
|
||||
uni.setStorageSync('token', res.data.token);
|
||||
|
||||
}
|
||||
uni.showToast({
|
||||
title: '绑定成功~',
|
||||
success() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user