diff --git a/admin-web-master/src/views/shopRental/manage/index.vue b/admin-web-master/src/views/shopRental/manage/index.vue index 4a5c40b..195687b 100644 --- a/admin-web-master/src/views/shopRental/manage/index.vue +++ b/admin-web-master/src/views/shopRental/manage/index.vue @@ -55,13 +55,13 @@ @@ -71,9 +71,9 @@ - + diff --git a/yanshouban/src/main.js b/yanshouban/src/main.js index 7ce758b..a63e656 100644 --- a/yanshouban/src/main.js +++ b/yanshouban/src/main.js @@ -12,7 +12,7 @@ import '@/assets/font.css' import App from './App.vue' import store from './store' import router from './router' -import {encrypt,decrypt} from './utils/jiami.js' +import {encrypt,decrypt,decryptall} from './utils/jiami.js' import '@/icons' // icon import '@/permission' // permission control @@ -30,6 +30,7 @@ Vue.prototype.$echarts = echarts Vue.prototype.$API = 'https://jy.scjysm.asia:18086/meserver/api' Vue.prototype.$encrypt = encrypt; Vue.prototype.$decrypt = decrypt; +Vue.prototype.$decryptall = decryptall; // Vue.prototype.$API = 'https://wjdc.scjysm.asia:1443/meserver/api' // Vue.prototype.$API = 'http://8.130.38.56:8019/api' // https://jy.scjysm.asia:18086 http://172.16.61.126:8080 http://8.130.38.56:8027 diff --git a/yanshouban/src/utils/jiami.js b/yanshouban/src/utils/jiami.js index af9895c..659fff3 100644 --- a/yanshouban/src/utils/jiami.js +++ b/yanshouban/src/utils/jiami.js @@ -34,3 +34,42 @@ export const decrypt = (str) => {         return '解密失败!'     } } + +export const decryptall = (obj,isjmlist) => { + console.error(isjmlist) + console.error(obj) + let list = [] + let objnew = {} + for (let key in obj) { + let item = { + typeis:'2',//是否加密 1加密 2不加密 + keyname:key,//变量名 + value:obj[key],//值 + } + if(isjmlist.length> 0) { + + // let found = isjmlist.find(function(element) { + // return key == element; + // }); + console.log(isjmlist.indexOf(key) != -1) + if(isjmlist.indexOf(key) != -1) { + item.typeis = '1' + } + } else { + item.typeis = '1' + } + console.error(item) + list.push(item) + } + console.log(list); + + list.forEach(element => { + if(element.typeis == '1' && element.value) { + console.error(element) + element.value = encrypt(element.value) + } + objnew[element.keyname] = element.value + }); + console.log(objnew); + return objnew +} \ No newline at end of file diff --git a/yanshouban/src/utils/request.js b/yanshouban/src/utils/request.js index 45810fa..be1f8f5 100644 --- a/yanshouban/src/utils/request.js +++ b/yanshouban/src/utils/request.js @@ -21,9 +21,9 @@ if (host == '172.16.61.48' || host == '172.16.61.49:5173' || host =='172.16.61.1 // PREFIX = 'http://172.16.61.48/meserver/admin-server'; // PREFIX = 'http://192.168.2.213:9003'; // PREFIX = 'http://8.130.38.56:8019/admin-server'; - PREFIX = 'http://192.168.2.7:9003'; +// PREFIX = 'http://192.168.2.7:9003'; // PREFIX = 'https://wjdc.scjysm.asia:1443/meserver/admin-server'; - // PREFIX = 'https://jy.scjysm.asia:18086/admin-server'; + PREFIX = 'https://jy.scjysm.asia:18086/admin-server'; // PREFIX = 'http://172.16.61.126:8080/meserver/admin-server'; // PREFIX = 'https://wjdc.scjysm.asia:1443/meserver/admin-server' diff --git a/yanshouban/src/views/business/businessList/index.vue b/yanshouban/src/views/business/businessList/index.vue index 874e737..cb548be 100644 --- a/yanshouban/src/views/business/businessList/index.vue +++ b/yanshouban/src/views/business/businessList/index.vue @@ -910,6 +910,10 @@ export default { }, // 新建商家确定 addCheck (ruleForm) { + let newinfo = this.$decryptall(this.ruleForm,['shopPhone','shopPassword']) + console.error(newinfo) + return + this.$refs[ruleForm].validate(valid => { if (valid) { @@ -944,7 +948,7 @@ export default { } if (!this.userState) { - + // this.ruleForm.shopPhone = this.$encrypt(this.ruleForm.shopPhone) // this.ruleForm.shopPassword = this.$encrypt(this.ruleForm.shopPassword) // this.ruleForm.idCardNum = this.$encrypt(this.ruleForm.idCardNum)