Fixed something.

pull/3445/head
ruibaby 2019-09-09 21:32:21 +08:00
parent 0749ffa696
commit ec5dccb7b8
5 changed files with 35 additions and 9 deletions

View File

@ -34,7 +34,11 @@
:key="index" :key="index"
@click="handleSelectAttachment(item)" @click="handleSelectAttachment(item)"
> >
<img :src="item.thumbPath"> <span v-show="!handleJudgeMediaType(item)"></span>
<img
:src="item.thumbPath"
v-show="handleJudgeMediaType(item)"
>
</div> </div>
</a-col> </a-col>
</a-skeleton> </a-skeleton>
@ -172,6 +176,23 @@ export default {
this.loadSkeleton() this.loadSkeleton()
this.loadAttachments() this.loadAttachments()
}, },
handleJudgeMediaType(attachment) {
var mediaType = attachment.mediaType
//
if (mediaType) {
var prefix = mediaType.split('/')[0]
if (prefix === 'image') {
//
return true
} else {
//
return false
}
}
// false
return false
},
onClose() { onClose() {
this.$emit('close', false) this.$emit('close', false)
} }

View File

@ -40,7 +40,7 @@
slot="addonAfter" slot="addonAfter"
@click="togglePasswordVisible" @click="togglePasswordVisible"
> >
<a-icon type="eye" /> <a-icon type="eye-invisible" />
</a> </a>
</a-input> </a-input>
<a-input <a-input
@ -53,7 +53,7 @@
slot="addonAfter" slot="addonAfter"
@click="togglePasswordVisible" @click="togglePasswordVisible"
> >
<a-icon type="eye-invisible" /> <a-icon type="eye" />
</a> </a>
</a-input> </a-input>
</a-form-item> </a-form-item>

View File

@ -203,7 +203,12 @@ export default {
this.$message.error('确认密码和新密码不匹配!') this.$message.error('确认密码和新密码不匹配!')
return return
} }
userApi.updatePassword(this.passwordParam.oldPassword, this.passwordParam.newPassword).then(response => {}) userApi.updatePassword(this.passwordParam.oldPassword, this.passwordParam.newPassword).then(response => {
this.$message.success('密码修改成功!')
this.passwordParam.oldPassword = null
this.passwordParam.newPassword = null
this.passwordParam.confirmPassword = null
})
}, },
handleUpdateProfile() { handleUpdateProfile() {
if (!this.user.username) { if (!this.user.username) {