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