|
|
@@ -323,6 +323,7 @@ export default {
|
|
|
})
|
|
|
.then((res) => {
|
|
|
if (res.code === 0) {
|
|
|
+ return this.dealUserData(res)
|
|
|
this.$queue.showToast("注册成功");
|
|
|
|
|
|
this.$queue.setData("token", res.token);
|
|
|
@@ -417,11 +418,12 @@ export default {
|
|
|
this.userName = res.data.userName;
|
|
|
this.invitationCode = res.data.invitationCode;
|
|
|
uni.setStorageSync("invitationCode", res.data.invitationCode);
|
|
|
- setTimeout(function () {
|
|
|
+ /* setTimeout(function () {
|
|
|
uni.reLaunch({
|
|
|
url: "/pages/my/jobApplicant/registerSuccess",//pages/my/jobApplicant/registerSuccess
|
|
|
});
|
|
|
- }, 1000);
|
|
|
+ }, 1000); */
|
|
|
+
|
|
|
return
|
|
|
} else {
|
|
|
uni.showModal({
|
|
|
@@ -433,6 +435,90 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ dealUserData(res){
|
|
|
+ this.$queue.setData("userId", res.user.userId);
|
|
|
+ this.$queue.setData("token", res.token);
|
|
|
+ this.$queue.setData("phone", res.user.phone);
|
|
|
+ this.$queue.setData("userName", res.user.userName);
|
|
|
+ this.$queue.setData("avatar", res.user.avatar);
|
|
|
+ if(res.user.invitationCode)
|
|
|
+ this.$queue.setData("invitationCode", res.user.invitationCode);
|
|
|
+ if(res.user.inviterCode)
|
|
|
+ this.$queue.setData("inviterCode", res.user.inviterCode);
|
|
|
+ this.$queue.setData("isVip", false);
|
|
|
+ uni.hideLoading();
|
|
|
+ if(res.user.userType)
|
|
|
+ this.$queue.setData("userType", res.user.userType);
|
|
|
+ this.$queue.connectSocket()
|
|
|
+ //判断是否开启身份选择 是/否
|
|
|
+ this.$Request.get("/app/common/type/339").then((rest) => {
|
|
|
+ if (rest.code == 0) {
|
|
|
+ if (rest.data.value == "是") {
|
|
|
+ // 这里是跳转到选择职场身份的界面
|
|
|
+ uni.reLaunch({
|
|
|
+ url: "/pages/public/selectIdentity/selectIdentity",
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ if (res.user.userType == 2) { //企业
|
|
|
+ // 原有的。判断第一次根据userType ==null
|
|
|
+ uni.reLaunch({
|
|
|
+ url: "/pages/my/index",
|
|
|
+ });
|
|
|
+ // 这里判断一下看是否是第一次登录如果是就跳到引导页,如果不是就正常跳
|
|
|
+ // let firstLogin = uni.getStorageSync("firstLogin") || false;
|
|
|
+ // if (!firstLogin) {
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: "/pages/my/jobApplicant/guidePage",
|
|
|
+ // });
|
|
|
+ // } else {
|
|
|
+ // uni.reLaunch({
|
|
|
+ // url: "/pages/my/index",
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ } else if (res.user.userType == 1) {
|
|
|
+ uni.reLaunch({
|
|
|
+ url: "/pages/my/index",
|
|
|
+ });
|
|
|
+ // 这里判断一下看是否是第一次登录如果是就跳到引导页,如果不是就正常跳
|
|
|
+ // let firstLogin = uni.getStorageSync("firstLogin") || false;
|
|
|
+ // if (!firstLogin) {
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: "/pages/my/jobApplicant/guidePage",
|
|
|
+ // });
|
|
|
+ // } else {
|
|
|
+ // uni.reLaunch({
|
|
|
+ // url: "/pages/my/index",
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ } else {
|
|
|
+ //表示是第一次进来,走引导页
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "/pages/my/jobApplicant/guidePage",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+
|
|
|
+ if (res.user.userType == 2) { //企业
|
|
|
+ // 原有的。判断第一次根据userType ==null
|
|
|
+ uni.reLaunch({
|
|
|
+ url: "/pages/my/index",
|
|
|
+ });
|
|
|
+
|
|
|
+ } else if (res.user.userType == 1) {
|
|
|
+ uni.reLaunch({
|
|
|
+ url: "/pages/my/index",
|
|
|
+ });
|
|
|
+
|
|
|
+ } else {
|
|
|
+ //表示是第一次进来,走引导页
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "/pages/my/jobApplicant/guidePage",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
};
|
|
|
</script>
|