Files
dvcp_v2_wxcp_app/library/project/saas/AppHome/UploadPhoto.vue
2024-10-31 14:34:57 +08:00

74 lines
1.2 KiB
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div class="uploadPhoto">
<div class="photo">
<div class="photo-title">图片 <span>最多1张</span></div>
<div class="pad-120">
<AiUploader :limit="1" multiple placeholder="上传图片" :def.sync="picture" action="/admin/file/add-portrait"/>
</div>
</div>
<div style="height: 56px;"></div>
<div class="btn" @click="back">返回</div>
</div>
</template>
<script>
import {mapActions} from "vuex";
export default {
name: 'uploadPhoto',
data() {
return {
picture: []
}
},
methods: {
...mapActions(['getAccount']),
back() {
uni.navigateBack({
success: () => {
this.getAccount()
}
})
}
},
onShow() {
document.title = '头像上传'
},
}
</script>
<style lang="scss" scoped>
.uploadPhoto {
.photo {
background-color: #FFFFFF;
padding: 20px 30px;
.photo-title {
width: 100%;
height: 100px;
line-height: 80px;
color: #333333;
& > span {
color: #999999;
}
}
}
.btn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 112px;
line-height: 112px;
text-align: center;
background-color: #1365DD;
color: #FFFFFF;
}
}
</style>