diff --git a/package.json b/package.json index 6ed18dc..24cbbf8 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "dependencies": { "axios": "^1.3.2", "core-js": "^3.8.3", + "js-base64": "^3.7.5", "vant": "^2.12.53", "vconsole": "^3.15.0", "vue": "^2.6.14", diff --git a/src/main.js b/src/main.js index d4cabfe..c405ef3 100644 --- a/src/main.js +++ b/src/main.js @@ -6,14 +6,16 @@ import store from "./store"; import vant from "vant"; import "vant/lib/index.css"; import GlobalConfig from "./utils/aisdapp"; +import { Base64 } from "js-base64"; import VConsole from "vconsole"; -let vConsole = new VConsole(); +// let vConsole = new VConsole(); Vue.use(vant); Vue.config.productionTip = false; Vue.prototype.GlobalConfig = GlobalConfig; +Vue.prototype.Base64 = Base64; new Vue({ router, diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index ac91612..09f37bb 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -125,7 +125,7 @@ export default { }) if (this.GlobalConfig.appMode) { try { - vaildInterfacefn("cgstjyyxuwxt", "qdsgajjtjczdyhhmdyz", JSON.stringify({ cupCardNo: this.userInfo.papersnumber }), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway).then((value) => { + vaildInterfacefn("cgstjyyxuwxt", "qdsgajjtjczdyhhmdyz", JSON.stringify({ cupCardNo: this.Base64.encode(this.userInfo.papersnumber) }), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway).then((value) => { this.$toast.clear(); let retData = JSON.parse(value); if (retData.code == 200 && retData.data) { @@ -143,7 +143,7 @@ export default { } else { try { - checkBacklist(this.userInfo.papersnumber).then(res => { + checkBacklist(this.Base64.encode(this.userInfo.papersnumber)).then(res => { this.$toast.clear(); if (res.data) { this.errMsg = res.data; diff --git a/src/views/examProject.vue b/src/views/examProject.vue index 0c62fcc..aaf5df7 100644 --- a/src/views/examProject.vue +++ b/src/views/examProject.vue @@ -1,6 +1,6 @@