|
|
@@ -28,16 +28,18 @@
|
|
|
goWork() {
|
|
|
|
|
|
//修改当前用户身份
|
|
|
- var res = this.updateUserResumes(1)
|
|
|
- if (!res) {
|
|
|
- uni.showToast({
|
|
|
- title: "登录信息过期,请重新登录",
|
|
|
- icon: "none"
|
|
|
- });
|
|
|
- }
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/my/jobApplicant/welcomePage'
|
|
|
+ this.updateUserResumes(1,function(res){
|
|
|
+ if (!res) {
|
|
|
+ return uni.showToast({
|
|
|
+ title: "登录信息过期,请重新登录",
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/my/jobApplicant/welcomePage'
|
|
|
+ })
|
|
|
})
|
|
|
+
|
|
|
},
|
|
|
|
|
|
// 查询用户企业状态
|
|
|
@@ -45,10 +47,11 @@
|
|
|
this.$Request.get("/app/company/selectCompanyByUserId", "")
|
|
|
.then((res) => {
|
|
|
if (res.code != 0) {
|
|
|
- uni.showToast({
|
|
|
+ /* uni.showToast({
|
|
|
title: res.msg || "查询状态失败",
|
|
|
icon: "none"
|
|
|
- });
|
|
|
+ }); */
|
|
|
+ uni.hideToast()//因为现在get所有异常均会抛出了
|
|
|
return;
|
|
|
}
|
|
|
this.companyinfo = res.data || {};
|
|
|
@@ -64,54 +67,52 @@
|
|
|
},
|
|
|
gotocompany() {
|
|
|
|
|
|
-
|
|
|
+ var that=this
|
|
|
//修改当前用户身份
|
|
|
- var res = this.updateUserResumes(2)
|
|
|
- if (!res) {
|
|
|
- uni.showToast({
|
|
|
- title: "登录信息过期,请重新登录",
|
|
|
- icon: "none"
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- console.log("ssss");
|
|
|
- //应该要判断这个人有没有公司,
|
|
|
- var status = this.companyinfo.status || ""
|
|
|
- if (!status) { //没有企业,那就是第一次进来,走企业注册流程
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/my/businessLicense'
|
|
|
- })
|
|
|
- } else if (status == 2) { //审核通过,如果有职位,跳首页、如果没职位跳职位发布页。
|
|
|
- uni.setStorageSync("firstLogin",true)
|
|
|
- if (status == 2) {
|
|
|
- uni.preloadPage({
|
|
|
- url: "/pages/index/index"
|
|
|
+ this.updateUserResumes(2,function(res){
|
|
|
+ if (!res) {
|
|
|
+ return uni.showToast({
|
|
|
+ title: "登录信息过期,请重新登录",
|
|
|
+ icon: "none"
|
|
|
});
|
|
|
- uni.switchTab({
|
|
|
- url: '/pages/index/index'
|
|
|
+ }
|
|
|
+ console.log("ssss");
|
|
|
+ //应该要判断这个人有没有公司,
|
|
|
+ var status = that.companyinfo.status || ""
|
|
|
+ if (!status) { //没有企业,那就是第一次进来,走企业注册流程
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/my/businessLicense'
|
|
|
})
|
|
|
-
|
|
|
- } else {
|
|
|
- uni.redirectTo({
|
|
|
- url: '/pages/index/index.vue'
|
|
|
+ } else if (status == 2) { //审核通过,如果有职位,跳首页、如果没职位跳职位发布页。
|
|
|
+ uni.setStorageSync("firstLogin",true)
|
|
|
+ if (status == 2) {
|
|
|
+ uni.preloadPage({
|
|
|
+ url: "/pages/index/index"
|
|
|
+ });
|
|
|
+ uni.switchTab({
|
|
|
+ url: '/pages/index/index'
|
|
|
+ })
|
|
|
+
|
|
|
+ } else {
|
|
|
+ uni.redirectTo({
|
|
|
+ url: '/pages/index/index.vue'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else if (status == 1) { //审核未通过,跳审核信息页。
|
|
|
+ uni.setStorageSync("firstLogin",true)
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/package/jobIntention/underReview'
|
|
|
})
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: "网络异常",
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
}
|
|
|
- } else if (status == 1) { //审核未通过,跳审核信息页。
|
|
|
- uni.setStorageSync("firstLogin",true)
|
|
|
- uni.navigateTo({
|
|
|
- url: '/package/jobIntention/underReview'
|
|
|
- })
|
|
|
- } else {
|
|
|
- uni.showToast({
|
|
|
- title: "网络异常",
|
|
|
- icon: "none"
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
+ })
|
|
|
},
|
|
|
//修改用户身份状态
|
|
|
- updateUserResumes(userType) {
|
|
|
+ updateUserResumes(userType,callback) {
|
|
|
var that=this
|
|
|
// 调用接口提交
|
|
|
uni.showLoading({
|
|
|
@@ -125,9 +126,9 @@
|
|
|
if (res.code === 0) {
|
|
|
uni.setStorageSync('userType', userType)
|
|
|
that.$queue.changeTabbar(userType)
|
|
|
- return true
|
|
|
+ callback(true)
|
|
|
} else {
|
|
|
- return false
|
|
|
+ callback(false)
|
|
|
}
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
@@ -138,7 +139,7 @@
|
|
|
title: "网络异常",
|
|
|
icon: "none"
|
|
|
});
|
|
|
- return false
|
|
|
+ callback(false)
|
|
|
});
|
|
|
},
|
|
|
|