逻辑调整优化
This commit is contained in:
parent
814573aa62
commit
59fc1be7c7
@ -57,6 +57,7 @@
|
||||
import {
|
||||
RegisterUser
|
||||
} from '../../services/apply.js'
|
||||
import config from '../../config/common.js'
|
||||
import {
|
||||
isChinaMobilePhone,
|
||||
easyCheckID,
|
||||
@ -66,9 +67,10 @@
|
||||
data() {
|
||||
return {
|
||||
showSex: false,
|
||||
appurl: config.uni_app_url,
|
||||
formatter: null,
|
||||
pickerShow: false,
|
||||
loading:false,
|
||||
loading: false,
|
||||
pickerColumns: [Array(60).fill(null).map((_, i) => i)],
|
||||
model1: {
|
||||
userInfo: {
|
||||
@ -200,13 +202,13 @@
|
||||
}
|
||||
this.loading = true
|
||||
const json = {
|
||||
Name: this.model1.userInfo.Name,
|
||||
Sex: this.model1.userInfo.Sex == '男'?'1':'0',
|
||||
Phone: this.model1.userInfo.Phone,
|
||||
ID_CARD: this.model1.userInfo.ID_CARD,
|
||||
InTime: this.model1.userInfo.InTime,
|
||||
WORKINGYEAR: this.model1.userInfo.WORKINGYEAR,
|
||||
}
|
||||
Name: this.model1.userInfo.Name,
|
||||
Sex: this.model1.userInfo.Sex == '男' ? '1' : '0',
|
||||
Phone: this.model1.userInfo.Phone,
|
||||
ID_CARD: this.model1.userInfo.ID_CARD,
|
||||
InTime: this.model1.userInfo.InTime,
|
||||
WORKINGYEAR: this.model1.userInfo.WORKINGYEAR,
|
||||
}
|
||||
// const json = {
|
||||
// Name: '云',
|
||||
// Sex: '0',
|
||||
@ -217,16 +219,31 @@
|
||||
// }
|
||||
RegisterUser(json).then((res) => {
|
||||
if (res.code == 200) {
|
||||
console.log('成功', res);
|
||||
this.loading = false
|
||||
uni.navigateTo({
|
||||
url: '/pages/apply/complete?type=success'
|
||||
uni.showToast({
|
||||
title: '注册成功!',
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.hideToast();
|
||||
location.href = this.appurl
|
||||
// uni.redirectTo({
|
||||
// url: '/pages/webview/webview?url=' + this.appurl
|
||||
// })
|
||||
},1500)
|
||||
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/apply/complete?type=success'
|
||||
// })
|
||||
} else {
|
||||
this.loading = false
|
||||
uni.navigateTo({
|
||||
url: `/pages/apply/complete?type=failed&title=${res.msg}`
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
// uni.navigateTo({
|
||||
// url: `/pages/apply/complete?type=failed&title=${res.msg}`
|
||||
// })
|
||||
}
|
||||
|
||||
}).catch((err) => {
|
||||
|
||||
@ -117,18 +117,18 @@
|
||||
// })
|
||||
},
|
||||
getCaidan() {
|
||||
|
||||
const json = {
|
||||
Company: this.company,
|
||||
Company: uni.getStorageSync('Company'),
|
||||
Post: '搬运工',
|
||||
Type: 1
|
||||
}
|
||||
getMenu(json).then((res) => {
|
||||
console.log('成功', res);
|
||||
this.baseList = res.data
|
||||
|
||||
}).catch((err) => {
|
||||
console.error('失败', err);
|
||||
uni.showToast({
|
||||
title: '请求错误',
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,10 @@ import handle401 from './handle401'
|
||||
|
||||
export default {
|
||||
send(params) {
|
||||
let Company = uni.getStorageSync('Company')
|
||||
const pages = getCurrentPages()
|
||||
const currentPage = pages[pages.length - 1]
|
||||
const Options = currentPage.options
|
||||
let Company = Options.Company?Options.Company:'XLK'
|
||||
let tenantId = ''
|
||||
if (Company == 'DCJD') {
|
||||
tenantId = 'A0000025'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user