用户注册跳转登录bug/switch转为u-switch组件
This commit is contained in:
parent
959a846bcf
commit
3641cf4fb5
|
|
@ -127,7 +127,7 @@
|
|||
onShow() {
|
||||
// debugger;
|
||||
// console.log(this.vuex_perm)
|
||||
if(this.vuex_user.type==='visitor'){
|
||||
if(this.vuex_user.type==='visitor'||this.vuex_user.type==='driver'){
|
||||
this.limitedVisit = true;
|
||||
}else{
|
||||
let date = new Date();
|
||||
|
|
|
|||
|
|
@ -390,34 +390,34 @@
|
|||
}
|
||||
console.log(perms);
|
||||
that.$u.vuex('vuex_perm', perms)
|
||||
})
|
||||
that.$u.api.hrmUserInfo().then(res => {
|
||||
that.$u.vuex('vuex_employee', res)
|
||||
if (res.type === 'employee') {
|
||||
uni.reLaunch({
|
||||
url: '/pages/home/home_'
|
||||
})
|
||||
} else {
|
||||
//非正式员工
|
||||
if (res.id_number == '' || res.photo == '' || res.id_number == null || res
|
||||
.photo == null) {
|
||||
//信息不完善,进入信息完善页面
|
||||
that.$u.api.hrmUserInfo().then(res => {
|
||||
that.$u.vuex('vuex_employee', res)
|
||||
if (res.type === 'employee') {
|
||||
uni.reLaunch({
|
||||
url: '/pages/my/myInfoChange'
|
||||
url: '/pages/home/home_'
|
||||
})
|
||||
} else {
|
||||
//信息完善
|
||||
if (res.type === 'remployee') {
|
||||
//非正式员工
|
||||
if (res.id_number == '' || res.photo == '' || res.id_number == null || res
|
||||
.photo == null) {
|
||||
//信息不完善,进入信息完善页面
|
||||
uni.reLaunch({
|
||||
url: '/pages/home/home_'
|
||||
url: '/pages/my/myInfoChange'
|
||||
})
|
||||
} else {
|
||||
uni.reLaunch({
|
||||
url: '/pages/workSpace/workSpace'
|
||||
})
|
||||
//信息完善
|
||||
if (res.type === 'remployee') {
|
||||
uni.reLaunch({
|
||||
url: '/pages/home/home_'
|
||||
})
|
||||
} else {
|
||||
uni.reLaunch({
|
||||
url: '/pages/workSpace/workSpace'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
// #ifdef APP-PLUS
|
||||
let secret = that.ranStr(12)
|
||||
|
|
|
|||
|
|
@ -107,8 +107,12 @@
|
|||
if (!that.checkedParams(obj)) return;
|
||||
that.$u.api.visitorRegister(obj).then(res => {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title:"注册成功,请重新登录",
|
||||
icon: "none"
|
||||
})
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login_'
|
||||
url: '/pages/login/login_?autoLoading=no'
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<view class="item item_bottom_border">
|
||||
<view class="title">手机号</view>
|
||||
<view class="content">
|
||||
<input type="text" v-model="userInfo.phone" maxlength="20" placeholder="请输入" />
|
||||
<input type="text" v-model="userInfo.phone" maxlength="20" placeholder="请输入" disabled/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item item_bottom_border">
|
||||
|
|
@ -112,12 +112,21 @@
|
|||
if (!that.paramsCheck()) {
|
||||
return;
|
||||
} else {
|
||||
uni.showLoading({
|
||||
title: '保存中...',
|
||||
mask: true
|
||||
})
|
||||
this.$u.api.hrmUpdateInfo(this.userInfo).then(res=>{
|
||||
debugger;
|
||||
console.log(res)
|
||||
uni.navigateTo({
|
||||
url: '/pages/my/my'
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '保存成功',
|
||||
icon: 'none'
|
||||
})
|
||||
uni.reLaunch({
|
||||
url: '/pages/workSpace/workSpace'
|
||||
})
|
||||
}).catch(e=>{
|
||||
uni.hideLoading()
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -56,13 +56,13 @@
|
|||
<view class="item item_bottom_border">
|
||||
<view class="title">是否报备</view>
|
||||
<view class="content">
|
||||
<switch name="is_main" v-model="formData.is_reported" />
|
||||
<u-switch v-model="formData.is_reported"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item item_bottom_border">
|
||||
<view class="title">是否主访客</view>
|
||||
<view class="content">
|
||||
<switch name="is_main" v-model="formData.is_main" />
|
||||
<u-switch v-model="formData.is_main"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item item_bottom_border" style="height: fit-content;">
|
||||
|
|
@ -143,7 +143,7 @@
|
|||
},
|
||||
onShow() {
|
||||
this.getHeader();
|
||||
// this.getUserRange();
|
||||
this.getUserRange();
|
||||
},
|
||||
methods: {
|
||||
getHeader() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue