|
@@ -45,15 +45,12 @@
|
|
|
notify('warning', '请登录后访问');
|
|
|
}
|
|
|
else if(this.isLogin){
|
|
|
- Http.get(`/api/user/${this.user.id}`).then(res => {
|
|
|
- res.roleList.forEach(function(item) {
|
|
|
- if(item.indexOf("part") != -1){
|
|
|
- this.$router.push('/project/create');
|
|
|
- }
|
|
|
- })
|
|
|
- notify('warning', '请先认证成为发包用户');
|
|
|
- });
|
|
|
-
|
|
|
+ Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
|
|
|
+ console.log(res)
|
|
|
+ this.$router.push('/project/create');
|
|
|
+ }).catch((error) => {
|
|
|
+ notify('error', error.data)
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
checkCreateTaskAuth() {
|
|
@@ -62,15 +59,12 @@
|
|
|
notify('warning', '请登录后访问');
|
|
|
}
|
|
|
else if(this.isLogin){
|
|
|
- Http.get(`/api/user/${this.user.id}`).then(res => {
|
|
|
- console.log(res.roleList);
|
|
|
- res.roleList.forEach(function(item) {
|
|
|
- if(item.indexOf("evaluation") != -1){
|
|
|
- this.$router.push("/square")
|
|
|
- }
|
|
|
- })
|
|
|
- notify('warning', '请先认证成为接包用户');
|
|
|
- });
|
|
|
+ Http.get(Apis.USER.IS_AGENCY.replace('{userId}', this.user.id)).then((res) => {
|
|
|
+ console.log(res)
|
|
|
+ this.$router.push('/square');
|
|
|
+ }).catch((error) => {
|
|
|
+ notify('error', error.data)
|
|
|
+ })
|
|
|
|
|
|
}
|
|
|
},
|