|
|
|
|
@ -26,6 +26,26 @@
|
|
|
|
|
</view>
|
|
|
|
|
<u-picker @confirm="selectCourse" v-model="showCourse" :range="courseList" range-key="value"
|
|
|
|
|
mode="selector"></u-picker>
|
|
|
|
|
|
|
|
|
|
<!-- 进入后没有手机号的话 绑定 或者 注册 -->
|
|
|
|
|
<view class="modal">
|
|
|
|
|
<u-popup v-model="showRegister" mode="bottom" :mask-close-able='false'>
|
|
|
|
|
<view>
|
|
|
|
|
<view class="modal-tip">提示</view>
|
|
|
|
|
<view class="modal-content">
|
|
|
|
|
<view>如您已是我方校友,请先绑定账号</view>
|
|
|
|
|
<view @click="goBind" class="modal-bind">
|
|
|
|
|
去绑定
|
|
|
|
|
</view>
|
|
|
|
|
<view>如您还不是我方校友,请先注册</view>
|
|
|
|
|
<view @click="toRegister" class="modal-register">
|
|
|
|
|
去注册
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</u-popup>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
@ -33,8 +53,10 @@
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
showRegister: false,
|
|
|
|
|
hasMobile: false,
|
|
|
|
|
showCourse: false,
|
|
|
|
|
isLocked:false,
|
|
|
|
|
isLocked: false,
|
|
|
|
|
form: {
|
|
|
|
|
username: '',
|
|
|
|
|
course: '',
|
|
|
|
|
@ -112,7 +134,7 @@
|
|
|
|
|
let that = this
|
|
|
|
|
this.$refs.uForm.validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if(this.isLocked){
|
|
|
|
|
if (this.isLocked) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.isLocked = true
|
|
|
|
|
@ -154,6 +176,13 @@
|
|
|
|
|
'vuex_token': res1.token,
|
|
|
|
|
'vuex_user': res2.user
|
|
|
|
|
})
|
|
|
|
|
if (that.base.isNull(res.user.mobile)) {
|
|
|
|
|
that.showRegister = true
|
|
|
|
|
that.hasMobile = false
|
|
|
|
|
} else {
|
|
|
|
|
that.showRegister = false
|
|
|
|
|
that.hasMobile = true
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}).catch(err => {
|
|
|
|
|
console.log('login-error:', JSON.stringify(err))
|
|
|
|
|
@ -165,14 +194,36 @@
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getUserInfo() {
|
|
|
|
|
let that = this
|
|
|
|
|
this.$u.api.user().then(res => {
|
|
|
|
|
this.form.username = res.user.username
|
|
|
|
|
this.form.mobile = res.user.mobile
|
|
|
|
|
this.form.company_position = res.user.company_position
|
|
|
|
|
this.form.company_name = res.user.company_name
|
|
|
|
|
this.$u.vuex('vuex_user', res.user)
|
|
|
|
|
if (that.base.isNull(res.user.mobile)) {
|
|
|
|
|
that.showRegister = true
|
|
|
|
|
that.hasMobile = false
|
|
|
|
|
} else {
|
|
|
|
|
that.showRegister = false
|
|
|
|
|
that.hasMobile = true
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 去绑定登录
|
|
|
|
|
goBind() {
|
|
|
|
|
uni.redirectTo({
|
|
|
|
|
url: '/packages/register/login?isDonate=isDonate'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 去注册
|
|
|
|
|
toRegister() {
|
|
|
|
|
uni.redirectTo({
|
|
|
|
|
url: '/packages/register/index?isDonate=isDonate'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
@ -214,6 +265,48 @@
|
|
|
|
|
padding: 20rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.modal {
|
|
|
|
|
::v-deep .u-drawer-bottom {
|
|
|
|
|
border-radius: 40rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-tip {
|
|
|
|
|
text-align: center;
|
|
|
|
|
padding: 30rpx;
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-content {
|
|
|
|
|
height: 450rpx;
|
|
|
|
|
padding: 0 30rpx;
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
|
|
&>view {
|
|
|
|
|
margin: 30rpx auto;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-bind {
|
|
|
|
|
width: 45%;
|
|
|
|
|
text-align: center;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
color: #fff;
|
|
|
|
|
border-radius: 30rpx;
|
|
|
|
|
padding: 20rpx;
|
|
|
|
|
background: linear-gradient(to right, #e4cdb4, #c69c6d);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-register {
|
|
|
|
|
width: 45%;
|
|
|
|
|
text-align: center;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
color: #fff;
|
|
|
|
|
border-radius: 30rpx;
|
|
|
|
|
padding: 20rpx;
|
|
|
|
|
background: linear-gradient(to right, #5e5fbc, #0d0398);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
</style>
|