Commit 7e459f3b authored by 李俊赕's avatar 李俊赕

bug-commit

parent f8c9a5fa
...@@ -101,17 +101,12 @@ ...@@ -101,17 +101,12 @@
}, },
onLaunch: function() { onLaunch: function() {
console.log('App Launch')
var that=this var that=this
uni.getStorage({ uni.getStorage({
key: 'token', key: 'token',
success: function (res) { success: function (res) {
// console.log('本地获取token成功')
// console.log(res.data);
that.globalData.token = res.data that.globalData.token = res.data
that.initAPIneedToken() that.initAPIneedToken()
// console.log('当前token',that.token)
} }
}) })
...@@ -121,24 +116,9 @@ ...@@ -121,24 +116,9 @@
AnalysysAgent.registerSuperProperty("platform","take-order"); AnalysysAgent.registerSuperProperty("platform","take-order");
}, },
onShow: function() { onShow: function() {},
//console.log('App Show')
//
//RTOKEN45f41a3053238cb72b3b72fe14df8d7040c9f502
//this.globalData.token = 'RTOKEN52e603131ae93ac83ac0b3628064822690ee4de0'
},
methods: { methods: {
async getBaseInfo(vm,callBack){ async getBaseInfo(vm,callBack){
console.log('getbaseifno')
uni.showLoading({ uni.showLoading({
title:'加载中……' title:'加载中……'
}) })
...@@ -157,13 +137,7 @@ ...@@ -157,13 +137,7 @@
return res.data return res.data
}, },
initAPIneedToken: function() { initAPIneedToken: function() {
//RTOKEN45f41a3053238cb72b3b72fe14df8d7040c9f502 //RTOKEN45f41a3053238cb72b3b72fe14df8d7040c9f502
///* ///*
if(this.globalData.token){ if(this.globalData.token){
......
...@@ -21,7 +21,7 @@ export default { ...@@ -21,7 +21,7 @@ export default {
selectNum: { selectNum: {
//选择图片的数量 //选择图片的数量
type: Number, type: Number,
default: 9, default: 9999,
}, },
}, },
computed: { computed: {
......
...@@ -372,7 +372,7 @@ ...@@ -372,7 +372,7 @@
if(this.bottomTitle == '完成考试,现在签约'){ if(this.bottomTitle == '完成考试,现在签约'){
uni.navigateTo({ uni.navigateTo({
url:'/pages/settle/sign-contract' url:'/pages/settle/prompt'
}) })
return return
} }
......
...@@ -302,10 +302,10 @@ ...@@ -302,10 +302,10 @@
}); });
return !flagArr || flagArr.length < 1; return !flagArr || flagArr.length < 1;
}, },
submitBaseInfo() { async submitBaseInfo() {
this.newSubmitBaseInfo() // this.newSubmitBaseInfo()
return // return
const baseInfo = this.baseInfo; const baseInfo = this.baseInfo;
if (!this.checkBaseInfo()) { if (!this.checkBaseInfo()) {
...@@ -319,10 +319,10 @@ ...@@ -319,10 +319,10 @@
...baseInfo, ...baseInfo,
} }
params.service_area = baseInfo.service_area.join(',') params.service_area = baseInfo.service_area.join(',')
const res = this.$u.api.submitSettleBaseInfo(params) const res = await this.$u.api.submitSettleBaseInfo(params)
this.saving = false; this.saving = false;
uni.hideLoading() uni.hideLoading()
if (res.status != 200) { if (res.code != 200) {
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
icon: 'none' icon: 'none'
...@@ -340,88 +340,86 @@ ...@@ -340,88 +340,86 @@
}) })
}, 2000) }, 2000)
}, },
// newSubmitBaseInfo: function(){
// const baseInfo = this.baseInfo;
// if (!this.checkBaseInfo()) {
// return;
// }
// this.saving = true;
// uni.showLoading({
// title: '加载中'
// });
// const params = {
// ...baseInfo,
// }
// params.service_area = baseInfo.service_area.join(',')
// //http://rest-u.yunya.com
// let that = this
// uni.request({
// url: 'https://rest-u.test.ibanshou.cn/v1/settled/save-info'
// +'?access-token='+getApp().globalData.token,
// method: 'POST',
// data: {
// name: params.name,
// mobile: params.mobile,
// service_area: params.service_area,
// working_age: params.working_age,
// worker_num:params.worker_num,
// address:params.address
// //access_token:getApp().globalData.token
// },
// success: (res) => {
// uni.hideLoading()
// console.log('提交 入驻信息 成功')
// console.log(res)
// if(res.statusCode==401){
// uni.navigateTo({
// url:'/pages/login/wxlogin'
// })
// return
// }
newSubmitBaseInfo: function(){ // if(res.statusCode==200){
// console.log('提交 入驻信息 成功 200')
const baseInfo = this.baseInfo;
if (!this.checkBaseInfo()) {
return;
}
this.saving = true;
uni.showLoading({
title: '加载中'
});
const params = {
...baseInfo,
}
params.service_area = baseInfo.service_area.join(',')
//http://rest-u.yunya.com
let that = this
uni.request({
url: 'https://rest-u.test.ibanshou.cn/v1/settled/save-info'
+'?access-token='+getApp().globalData.token,
method: 'POST',
data: {
name: params.name,
mobile: params.mobile,
service_area: params.service_area,
working_age: params.working_age,
worker_num:params.worker_num,
address:params.address
//access_token:getApp().globalData.token
},
success: (res) => {
uni.hideLoading()
console.log('提交 入驻信息 成功')
console.log(res)
if(res.statusCode==401){
uni.navigateTo({
url:'/pages/login/wxlogin'
})
return
}
if(res.statusCode==200){
console.log('提交 入驻信息 成功 200')
uni.showToast({ // uni.showToast({
title: '入驻基本信息提交成功', // title: '入驻基本信息提交成功',
icon: 'success' // icon: 'success'
}); // });
let timer = setTimeout(() => { // let timer = setTimeout(() => {
clearTimeout(timer) // clearTimeout(timer)
uni.navigateTo({ // uni.navigateTo({
url:'/pages/settle/file' // url:'/pages/settle/file'
}) // })
}, 2000) // }, 2000)
}else{ // }else{
uni.showToast({ // uni.showToast({
icon:'none', // icon:'none',
title:res.data.message // title:res.data.message
}) // })
} // }
}, // },
fail: (e) => { // fail: (e) => {
uni.hideLoading() // uni.hideLoading()
uni.showToast({ // uni.showToast({
icon:'none', // icon:'none',
title:'提交入驻信息失败' // title:'提交入驻信息失败'
}) // })
console.log('提交 入驻信息 失败') // console.log('提交 入驻信息 失败')
console.log(e) // console.log(e)
} // }
}) // })
}, // },
}, },
} }
......
...@@ -343,12 +343,15 @@ ...@@ -343,12 +343,15 @@
return return
} }
uni.showToast({ uni.showToast({
title:'工作人员2个工作日内审核回复', title:'资料提交成功',
icon:'none'
}) })
let timer = setTimeout(()=>{
clearTimeout(timer)
uni.navigateTo({ uni.navigateTo({
url:'/pages/settle/prompt' url:'/pages/settle/prompt'
}) })
},2000)
this.submitSuccess = true; this.submitSuccess = true;
// this.$u.api.post("@u/v1/h5/settled/submit-info", submitInfoData) // this.$u.api.post("@u/v1/h5/settled/submit-info", submitInfoData)
// .then((res) => { // .then((res) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment