|
@@ -92,14 +92,10 @@
|
|
|
if (this.$route.query.project) {
|
|
|
this.visterScene.project = this.$route.query.project
|
|
|
}
|
|
|
- //如果storage存在则只替换role,防止直接提交报错同时兼顾传递过来的project参数
|
|
|
- if (this.vister_scene && this.vister_scene.role) {
|
|
|
- this.visterScene.role = this.vister_scene.role;
|
|
|
- }
|
|
|
},
|
|
|
methods: {
|
|
|
//确认
|
|
|
- sure() {
|
|
|
+ sure(auto) {
|
|
|
this.set_vister_scene(this.visterScene);
|
|
|
if (this.visterScene.project == 'business') {
|
|
|
if (this.visterScene.role == '1') {
|
|
@@ -109,7 +105,9 @@
|
|
|
} else if (this.visterScene.role == '3') {
|
|
|
window.location.href = "../" + this.visterScene.project + '/#/houseKeeper/control';
|
|
|
} else {
|
|
|
- mui.toast('请选择角色');
|
|
|
+ if (!auto) {
|
|
|
+ mui.toast('请选择角色');
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
mui.toast('未开放场景');
|
|
@@ -126,7 +124,7 @@
|
|
|
|
|
|
//如果场景是存在的则直接跳转
|
|
|
if (!this.$route.query.exchange && this.vister_scene.project && this.vister_scene.role) {
|
|
|
- this.sure();
|
|
|
+ this.sure(true);
|
|
|
}
|
|
|
},
|
|
|
...mapMutations({
|