Commit 77db558d authored by 高宇's avatar 高宇

会员权益

parent dcfae003
......@@ -80,6 +80,7 @@
list-type="picture"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"
>
<img v-if="imageUrl" :src="imageUrl" class="avatar">
......
......@@ -43,6 +43,7 @@
:on-preview="handlePreview"
:on-remove="handleRemove"
:file-list="fileList"
:show-file-list="false"
:limit="1"
list-type="picture"
>
......@@ -61,14 +62,17 @@
:on-preview="handlePreview"
:on-remove="handleRemove"
:file-list="imageFileList"
:show-file-list="false"
list-type="picture"
:limit="1"
>
<img v-if="imgageUrl" :src="imgageUrl" class="avatar">
<!-- <el-button size="small" type="primary">点击上传</el-button>-->
<div class="upload-trademark">
<div v-if="!imgageUrl" class="upload-trademark">
<i class="el-icon-plus" style="width: 20px;height: 20px;margin-top: 10px;" />
<div class="upload-trademark-title">上传封面</div></div>
<div slot="tip" class="el-upload__tip">支持文件格式:.jpg .gpeg .png.单个文件不能超过4M</div>
<div class="upload-trademark-title">上传封面</div>
</div>
<div v-if="!imgageUrl" slot="tip" class="el-upload__tip">支持文件格式:.jpg .gpeg .png.单个文件不能超过4M</div>
</el-upload>
</el-form-item>
</el-form>
......@@ -92,6 +96,8 @@ export default {
validMobile(value) ? callback() : callback(new Error('手机号格式不正确'))
}
return {
imgUrl: '',
imgageUrl: '',
// 表单数据
form: {},
manageLoading: false,
......@@ -129,6 +135,7 @@ export default {
}
},
created() {
// const baseURL = 'http://192.144.239.97:20043/file/'
if (this.type === 0) {
this.form = {}
} else if (this.type === 1) {
......@@ -151,6 +158,7 @@ export default {
activityupload(formData).then(res => {
console.log('res', res)
if (res.code === 200) {
this.imgageUrl = res.data.url
this.form.image = res.data.businessId
}
})
......@@ -163,6 +171,7 @@ export default {
activityupload(formData).then(res => {
console.log('res', res)
if (res.code === 200) {
this.imgUrl = res.data.url
this.form.img = res.data.businessId
}
})
......@@ -214,6 +223,10 @@ export default {
</script>
<style lang="scss">
.avatar{
width: 100px;
height: 100px;
}
.businessadd {
padding: 20px;
//display: flex;
......
......@@ -651,9 +651,6 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
// this.reset()
// this.open = true
// this.title = '新增商家'
this.$router.push({
path: '/business/businessadd',
query: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment