|
@ -188,6 +188,19 @@ |
|
|
<img src="@/assets/img/modules/wx-mini/index-set/info.png"> |
|
|
<img src="@/assets/img/modules/wx-mini/index-set/info.png"> |
|
|
<span>{{ focusedCpt.configurationDescription }}</span> |
|
|
<span>{{ focusedCpt.configurationDescription }}</span> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div class="d-set-banners"> |
|
|
|
|
|
<span>Banner图</span> |
|
|
|
|
|
<el-upload |
|
|
|
|
|
class="upload-demos" |
|
|
|
|
|
:show-file-list="false" |
|
|
|
|
|
:on-success="handleBannerSuccess" |
|
|
|
|
|
:before-upload="beforeBannerUpload" |
|
|
|
|
|
:action="uploadUlr" |
|
|
|
|
|
> |
|
|
|
|
|
<i class="el-icon-plus avatar-uploader-icon"></i> |
|
|
|
|
|
</el-upload> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
</el-form> |
|
|
</el-form> |
|
|
|
|
|
|
|
|
<div class="d-operate"> |
|
|
<div class="d-operate"> |
|
@ -519,7 +532,8 @@ export default { |
|
|
lastSavedCptList: [], |
|
|
lastSavedCptList: [], |
|
|
focusedCpt: { |
|
|
focusedCpt: { |
|
|
tempOnlyId: '' |
|
|
tempOnlyId: '' |
|
|
} |
|
|
}, |
|
|
|
|
|
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/customerlogo/upload' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -820,7 +834,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 聚焦实例组件 |
|
|
// 聚焦实例组件 |
|
|
focusCpt (item) { |
|
|
focusCpt (item) { |
|
|
console.log('聚焦实例组件') |
|
|
console.log('聚焦实例组件', item) |
|
|
if (this.isInPreview) return |
|
|
if (this.isInPreview) return |
|
|
if (this.focusedCpt.tempOnlyId === item.tempOnlyId) { |
|
|
if (this.focusedCpt.tempOnlyId === item.tempOnlyId) { |
|
|
this.cleanFocusCpt() |
|
|
this.cleanFocusCpt() |
|
@ -870,6 +884,32 @@ export default { |
|
|
// 改变可用列表组件展开与收起 |
|
|
// 改变可用列表组件展开与收起 |
|
|
shiftCptTypeItemUnfold (item) { |
|
|
shiftCptTypeItemUnfold (item) { |
|
|
item.isUnfold = !item.isUnfold |
|
|
item.isUnfold = !item.isUnfold |
|
|
|
|
|
}, |
|
|
|
|
|
// 上传爱心互助banner图 |
|
|
|
|
|
beforeBannerUpload (file) { |
|
|
|
|
|
console.log('file', file.size / 1024) |
|
|
|
|
|
let testmsg = file.name.substring(file.name.lastIndexOf('.') + 1) |
|
|
|
|
|
const imgs = ['png', 'PNG'] |
|
|
|
|
|
const extension = imgs.includes(testmsg) |
|
|
|
|
|
const isLt2M = file.size / 1024 < 100 |
|
|
|
|
|
|
|
|
|
|
|
if (!extension) { |
|
|
|
|
|
this.$message.error('上传图片只能是png格式!') |
|
|
|
|
|
} |
|
|
|
|
|
if (!isLt2M) { |
|
|
|
|
|
this.$message.error('上传图片大小不能超过 100KB!') |
|
|
|
|
|
} |
|
|
|
|
|
return extension && isLt2M |
|
|
|
|
|
}, |
|
|
|
|
|
handleBannerSuccess (res, file) { |
|
|
|
|
|
console.log('res', res) |
|
|
|
|
|
console.log('files', file) |
|
|
|
|
|
if (res.code === 0 && res.msg === 'success') { |
|
|
|
|
|
this.focusedCpt.configuration = { |
|
|
|
|
|
url: res.data.url |
|
|
|
|
|
} |
|
|
|
|
|
this.focusedCpt.configuration = JSON.stringify(this.focusedCpt.configuration) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|