diff --git a/src/main.js b/src/main.js index d4cabfe..aeaec96 100644 --- a/src/main.js +++ b/src/main.js @@ -8,7 +8,7 @@ import "vant/lib/index.css"; import GlobalConfig from "./utils/aisdapp"; import VConsole from "vconsole"; -let vConsole = new VConsole(); +// let vConsole = new VConsole(); Vue.use(vant); diff --git a/src/utils/aisdapp.js b/src/utils/aisdapp.js index c5dff29..9158f9e 100644 --- a/src/utils/aisdapp.js +++ b/src/utils/aisdapp.js @@ -5,7 +5,7 @@ export const appword = "aKd20dbGdFvmuwrt" const appid = 'cgstjyyjzpzp'; -const appMode = false;//是否开启爱山东中控台接口调用方式 +const appMode = true;//是否开启爱山东中控台接口调用方式 export default { appid, diff --git a/src/views/examProject.vue b/src/views/examProject.vue index 5ad99c2..6306c6a 100644 --- a/src/views/examProject.vue +++ b/src/views/examProject.vue @@ -111,39 +111,49 @@ export default { confirm() { let param = this.proArr; - if (this.GlobalConfig.appMode) { - // console.log(JSON.stringify(param)) - vaildInterfacefn("cgstjyyjzpzp", "qdsgajjtjczdtjyytj", JSON.stringify({ data: param }), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway).then((value) => { - - console.log('value', value); - let retData = JSON.parse(value); - console.log('value2', retData); - if (retData.code == 200) { - this.isShow = true; - this.isSuccess = true - } else { - this.failTips = retData.msg; - this.isShow = true; - this.isSuccess = false - } - }) - } - else { - postExam({ data: param }).then(res => { - console.log(res) - if (res.code == 200) { - this.isShow = true; - this.isSuccess = true - } else { - this.failTips = res.msg - this.isShow = true; - this.isSuccess = false - } - }) + this.$toast.loading({ + message: '请求中', + duration: 0, + }) + try { + if (this.GlobalConfig.appMode) { + // console.log(JSON.stringify(param)) + vaildInterfacefn("cgstjyyjzpzp", "qdsgajjtjczdtjyytj", JSON.stringify({ data: param }), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway).then((value) => { + this.$toast.clear(); + console.log('value', value); + let retData = JSON.parse(value); + console.log('value2', retData); + if (retData.code == 200) { + this.isShow = true; + this.isSuccess = true + } else { + this.failTips = retData.msg; + this.isShow = true; + this.isSuccess = false + } + }, err => { + this.$toast.clear(); + }) + } + else { + postExam({ data: param }).then(res => { + this.$toast.clear(); + console.log(res) + if (res.code == 200) { + this.isShow = true; + this.isSuccess = true + } else { + this.failTips = res.msg + this.isShow = true; + this.isSuccess = false + } + }, err => { + this.$toast.clear(); + }) + } + } catch (error) { + this.$toast.clear(); } - // if(this.proArr.length != 0){ - // - // } }, clickFail() { diff --git a/vue.config.js b/vue.config.js index f8eea76..6727f25 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,6 +1,7 @@ const { defineConfig } = require("@vue/cli-service"); module.exports = defineConfig({ lintOnSave: false, + publicPath: './', transpileDependencies: true, //开发模式反向代理配置,生产模式请使用Nginx部署并配置反向代理 devServer: {