|
|
|
@ -18,11 +18,11 @@ |
|
|
|
|
<view class="items"> |
|
|
|
|
<view class="a">进群分享图<text></text></view> |
|
|
|
|
<view class="c"> |
|
|
|
|
<u-upload :action="action" :header="header" @on-uploaded="success" width="160" height="160" |
|
|
|
|
:file-list="fileList" :custom-btn="true" max-count="1"> |
|
|
|
|
<u-upload :action="action" :header="header" @on-remove="onRemove" @on-uploaded="success" width="160" |
|
|
|
|
height="160" :file-list="fileList" :custom-btn="true" max-count="1"> |
|
|
|
|
<template v-slot:addBtn> |
|
|
|
|
<view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150"> |
|
|
|
|
<image :src="$picUrl+'/static/news/icon-upload.png'"></image> |
|
|
|
|
<image :src="$picUrl + '/static/news/icon-upload.png'"></image> |
|
|
|
|
<view class="1">上传图片</view> |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
@ -42,12 +42,10 @@ import * as help from '@/api/help' |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
checked: false, |
|
|
|
|
action: '', |
|
|
|
|
header: {}, |
|
|
|
|
value: "", |
|
|
|
|
fileList: [], |
|
|
|
|
image_ids: [] |
|
|
|
|
image_id: '', |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
onReady() { |
|
|
|
@ -58,6 +56,9 @@ export default { |
|
|
|
|
'platform': "MP-WEIXIN", |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onLoad() { |
|
|
|
|
this.onShowInfo() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
//接受上传返回的数据 |
|
|
|
|
success(list) { |
|
|
|
@ -67,12 +68,20 @@ export default { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: "上传成功" |
|
|
|
|
}) |
|
|
|
|
// this.image_ids = response.data.fileInfo.file_id |
|
|
|
|
this.image_id = response.data.fileInfo.file_id |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onSaveSubmit() { |
|
|
|
|
help.storeSet({image_ids:this.image_ids}) |
|
|
|
|
if (!this.image_id) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '请先上传图片!', |
|
|
|
|
icon: 'none', |
|
|
|
|
duration: 2000 |
|
|
|
|
}) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
help.storeSet({ group_share_img_id: this.image_id }) |
|
|
|
|
.then(res => { |
|
|
|
|
if (res.status) { |
|
|
|
|
uni.showToast({ |
|
|
|
@ -83,6 +92,22 @@ export default { |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.finally() |
|
|
|
|
}, |
|
|
|
|
onRemove() { |
|
|
|
|
this.image_id = '' |
|
|
|
|
this.fileList = [] |
|
|
|
|
}, |
|
|
|
|
onShowInfo() { |
|
|
|
|
help.storeInfo() |
|
|
|
|
.then(res => { |
|
|
|
|
if (res.status == 200) { |
|
|
|
|
this.fileList = [{ |
|
|
|
|
url: res.data.group_share_img |
|
|
|
|
}] |
|
|
|
|
this.image_id = res.data.group_share_img_id |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.finally() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -96,13 +121,16 @@ export default { |
|
|
|
|
|
|
|
|
|
&-hd { |
|
|
|
|
background-color: #fff; |
|
|
|
|
|
|
|
|
|
.items { |
|
|
|
|
line-height: 50rpx; |
|
|
|
|
font-size: 28rpx; |
|
|
|
|
color: #212121; |
|
|
|
|
|
|
|
|
|
.a { |
|
|
|
|
font-size: 28rpx; |
|
|
|
|
color: #3B3B3B; |
|
|
|
|
|
|
|
|
|
text { |
|
|
|
|
font-size: 24rpx; |
|
|
|
|
font-weight: 400; |
|
|
|
@ -125,6 +153,7 @@ export default { |
|
|
|
|
font-size: 24rpx; |
|
|
|
|
font-weight: 500; |
|
|
|
|
color: #757575; |
|
|
|
|
|
|
|
|
|
image { |
|
|
|
|
width: 50rpx; |
|
|
|
|
height: 50rpx; |
|
|
|
|