添加加载脚本失败后,提示后台错误

This commit is contained in:
ival 2019-09-03 14:39:50 +08:00
parent c239e98ae8
commit c433cb5045
3 changed files with 21 additions and 24 deletions

View File

@ -3,8 +3,8 @@ export function getBaseUrl() {
let BASE_API; let BASE_API;
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud'; // BASE_API = 'https://joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud'; BASE_API = 'https://test.joylink.club/jlcloud';
BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.4:9000' // 琰培 // BASE_API = 'http://192.168.3.4:9000' // 琰培
} else { } else {

View File

@ -470,6 +470,7 @@ export default {
}, },
// //
async selectQuest(row, id) { async selectQuest(row, id) {
try {
const res = await loadScript(row.id, id, this.group); const res = await loadScript(row.id, id, this.group);
if (res && res.code == 200) { if (res && res.code == 200) {
this.questId = parseInt(row.id); this.questId = parseInt(row.id);
@ -486,6 +487,9 @@ export default {
if (this.$refs.menuScript) { if (this.$refs.menuScript) {
this.$refs.menuScript.initLoadPage(); this.$refs.menuScript.initLoadPage();
} }
} catch (error) {
this.$messageBox(error.message);
}
}, },
// 退 // 退
async quitQuest() { async quitQuest() {

View File

@ -328,7 +328,6 @@ export default {
} }
}, },
async mounted() { async mounted() {
this.getRoomState();
this.userId = this.$store.state.user.id; this.userId = this.$store.state.user.id;
this.getRoomInfo(); // info this.getRoomInfo(); // info
this.getUserList(); // this.getUserList(); //
@ -364,15 +363,6 @@ export default {
} }
this.$store.dispatch('socket/setJointRoomInfo'); // this.$store.dispatch('socket/setJointRoomInfo'); //
}, },
//
async getRoomState() {
const res = await postRoomDetail(this.$route.query.group);
this.mapId = res.data.mapId;
this.starting = false;
if (res.data.state == '02') {
this.starting = true;
}
},
// //
showContextMenu(e, obj, node, vueElem) { showContextMenu(e, obj, node, vueElem) {
e.preventDefault(); e.preventDefault();
@ -503,6 +493,9 @@ export default {
async getRoomInfo() { async getRoomInfo() {
// //
const res = await postRoomDetail(this.$route.query.group); const res = await postRoomDetail(this.$route.query.group);
this.starting = res.data.state == '02';
this.mapId = res.data.mapId;
this.roomInfo = { this.roomInfo = {
creatorId: res.data.creatorId, creatorId: res.data.creatorId,
totalNum: Number(res.data.permissionNum) + Number(res.data.audiencePermissionNum), totalNum: Number(res.data.permissionNum) + Number(res.data.audiencePermissionNum),