修改教师管理照片预览、修改密码添加加密

main
hcj 5 months ago
parent 862d6c5cdc
commit 464fab3e2a
  1. 2
      .env.development
  2. 6
      src/components/ImageUpload/index.vue
  3. 2
      src/views/system/user/profile/resetPwd.vue
  4. 6
      src/views/trainService/trainTeacher.vue

@ -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'

@ -16,6 +16,7 @@
<i class="el-icon-plus" />
</div>
</el-image>
<div v-else class="image">
<el-image :src="base + value" :style="`width:150px;height:150px;`" fit="fill" />
<div class="mask">
@ -31,7 +32,7 @@
</div>
</el-upload>
<el-dialog :visible.sync="dialogVisible" title="预览" width="800" append-to-body>
<img :src="value" style="display: block; max-width: 100%; margin: 0 auto" />
<img :src="base + value" style="display: block; max-width: 100%; margin: 0 auto" />
</el-dialog>
</div>
</template>
@ -56,6 +57,9 @@ export default {
default: '',
},
},
mounted(){
console.log(this.value);
},
methods: {
removeImage() {
this.$emit('input', '')

@ -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("修改成功");
}

@ -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()

Loading…
Cancel
Save