From 882fa937ada214e5d524192b105e8447ca5f09a5 Mon Sep 17 00:00:00 2001 From: hcj Date: Fri, 5 Jul 2024 17:59:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=E7=94=9F=E6=88=90=E6=8F=92=E4=BB=B6=EF=BC=88qr=EF=BC=89,?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=AF=BE=E7=A8=8B=E7=AE=A1=E7=90=86mock?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- .env.production | 4 +- package.json | 1 + src/components/ImageUpload/index.vue | 6 +- src/components/vueQr/index.vue | 43 ++++ src/utils/encodeChinese.js | 16 ++ src/views/system/user/profile/resetPwd.vue | 2 +- src/views/trainService/courseManage.vue | 258 +++++++++++++++++++++ src/views/trainService/trainTeacher.vue | 6 +- 9 files changed, 330 insertions(+), 8 deletions(-) create mode 100644 src/components/vueQr/index.vue create mode 100644 src/utils/encodeChinese.js create mode 100644 src/views/trainService/courseManage.vue diff --git a/.env.development b/.env.development index 361bff0..32f1e1f 100644 --- a/.env.development +++ b/.env.development @@ -5,7 +5,7 @@ ENV = 'development' VUE_APP_BASE_API = '/prod-api' # VUE_APP_BASE_TARGET = 'http://www.bjkeyware.com/test-api' -VUE_APP_BASE_TARGET = 'http://192.168.0.230:9999' +VUE_APP_BASE_TARGET = 'http://192.168.0.229:9999' # VUE_APP_BASE_TARGET = 'http://192.168.0.129:9999' # VUE_APP_BASE_TARGET = 'http://172.16.36.180:9999' diff --git a/.env.production b/.env.production index 51c588c..b1d511a 100644 --- a/.env.production +++ b/.env.production @@ -5,8 +5,8 @@ ENV = 'production' VUE_APP_BASE_API = '/prod-api' # VUE_APP_BASE_API = '/test-api' -# VUE_APP_BASE_TARGET = 'https://www.keyitest.cn/prod-api' -VUE_APP_BASE_TARGET = 'http://192.168.0.229:9999' +VUE_APP_BASE_TARGET = 'https://www.keyitest.cn/prod-api' +# VUE_APP_BASE_TARGET = 'http://192.168.0.229:9999' # VUE_APP_BASE_TARGET = 'http://192.168.0.230:9999' # VUE_APP_BASE_TARGET = 'http://www.bjkeyware.com/test-api' # VUE_APP_BASE_TARGET = 'http://www.bjkeyware.com/prod-api' diff --git a/package.json b/package.json index a7a7746..b04b729 100644 --- a/package.json +++ b/package.json @@ -70,6 +70,7 @@ "vue": "2.6.12", "vue-count-to": "1.0.13", "vue-cropper": "0.5.5", + "vue-qr": "^4.0.9", "vue-quill-editor": "^3.0.6", "vue-router": "3.4.9", "vuedraggable": "2.24.3", diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue index 0c1484a..080f265 100644 --- a/src/components/ImageUpload/index.vue +++ b/src/components/ImageUpload/index.vue @@ -16,6 +16,7 @@ +
@@ -31,7 +32,7 @@
- +
@@ -56,6 +57,9 @@ export default { default: '', }, }, + mounted(){ + console.log(this.value); + }, methods: { removeImage() { this.$emit('input', '') diff --git a/src/components/vueQr/index.vue b/src/components/vueQr/index.vue new file mode 100644 index 0000000..cd4d2bb --- /dev/null +++ b/src/components/vueQr/index.vue @@ -0,0 +1,43 @@ + + + + + \ No newline at end of file diff --git a/src/utils/encodeChinese.js b/src/utils/encodeChinese.js new file mode 100644 index 0000000..f973f59 --- /dev/null +++ b/src/utils/encodeChinese.js @@ -0,0 +1,16 @@ +function encodeChinese(str){ + if(!str){ + return '' + } + return encodeURIComponent(str) +} + +function decodeChinse(str){ + if(str){ + return decodeURIComponent(str) + } +} + +export { + encodeChinese,decodeChinse +} \ No newline at end of file diff --git a/src/views/system/user/profile/resetPwd.vue b/src/views/system/user/profile/resetPwd.vue index 46480dc..8373460 100644 --- a/src/views/system/user/profile/resetPwd.vue +++ b/src/views/system/user/profile/resetPwd.vue @@ -57,7 +57,7 @@ export default { if (valid) { // updateUserPwd(encrypt(this.user.oldPassword), encrypt(this.user.newPassword)).then( - updateUserPwd(this.user.oldPassword, this.user.newPassword).then( + updateUserPwd(encrypt(this.user.oldPassword),encrypt(this.user.newPassword)).then( response => { this.msgSuccess("修改成功"); } diff --git a/src/views/trainService/courseManage.vue b/src/views/trainService/courseManage.vue new file mode 100644 index 0000000..eb2f6ba --- /dev/null +++ b/src/views/trainService/courseManage.vue @@ -0,0 +1,258 @@ + + + + diff --git a/src/views/trainService/trainTeacher.vue b/src/views/trainService/trainTeacher.vue index 623972b..f67eec9 100644 --- a/src/views/trainService/trainTeacher.vue +++ b/src/views/trainService/trainTeacher.vue @@ -109,7 +109,7 @@ export default { components: { ImageUpload }, data() { return { - imgbase: process.env.VUE_APP_BASE_TARGET, + imgbase: process.env.VUE_APP_BASE_API, loading: false, schoolList: [], // 总条数 @@ -151,7 +151,8 @@ export default { detailTalent(row.talentId).then((res) => { this.form = res if (this.form.avatar) { - this.form.avatar = this.imgbase + this.form.avatar + // this.imgbase + + this.form.avatar = this.form.avatar } this.title = '修改教师' this.visibleopen = true @@ -180,7 +181,6 @@ export default { const url = this.form.avatar const index = url.indexOf('/profile') this.form.avatar = url.substring(index) - console.log(this.form) updateTeacher(this.form).then((res) => { this.$message.success('修改成功') this.colsedia()