群发
This commit is contained in:
@@ -73,6 +73,18 @@
|
|||||||
<div class="remove" @click="removeWeb(index)" style="color: #f72c27">删除</div>
|
<div class="remove" @click="removeWeb(index)" style="color: #f72c27">删除</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 小程序 -->
|
||||||
|
<div class="fodder_file" v-for="(item, index) in appListInfo" :key="index">
|
||||||
|
<div class="item">
|
||||||
|
<div class="images">
|
||||||
|
<img src="https://cdn.cunwuyun.cn/dvcp/h5/file.png" alt="">
|
||||||
|
</div>
|
||||||
|
<div class="info">
|
||||||
|
<div class="name">{{ item.mpTitle }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="remove" @click="removeApp(index)" style="color: #f72c27">删除</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -223,6 +235,36 @@
|
|||||||
<div class="popup-btn" @click="addWeb">确定</div>
|
<div class="popup-btn" @click="addWeb">确定</div>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
|
||||||
|
<u-popup v-model="showAddApp" mode="bottom" border-radius="24" class="popup-form">
|
||||||
|
<div class="item">
|
||||||
|
<div class="left">
|
||||||
|
<span>*</span><span>小程序appid</span>
|
||||||
|
</div>
|
||||||
|
<input type="text" class="right__text" v-model="appInfo.mpAppid" placeholder="请输入" />
|
||||||
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<div class="left">
|
||||||
|
<span>*</span><span>小程序page路径</span>
|
||||||
|
</div>
|
||||||
|
<input type="text" class="right__text" v-model="appInfo.mpPage" placeholder="请输入" />
|
||||||
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<div class="left">
|
||||||
|
<span>*</span><span>标题</span>
|
||||||
|
</div>
|
||||||
|
<input type="text" class="right__text" v-model="appInfo.mpTitle" placeholder="请输入" maxlength="170"/>
|
||||||
|
</div>
|
||||||
|
<div class="items">
|
||||||
|
<div class="left">
|
||||||
|
<span style="margin-right: 8px">*</span><span>封面图</span>
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 10px;">
|
||||||
|
<AiUploader v-model="appInfo.media" :limit="1" multiple action="/admin/file/add2"></AiUploader>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="popup-btn" @click="addApp">确定</div>
|
||||||
|
</u-popup>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
@@ -363,7 +405,7 @@ export default {
|
|||||||
msgType: 'web'
|
msgType: 'web'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: 'https://cdn.cunwuyun.cn/dvcp/announce/ic-web.png',
|
icon: 'https://cdn.cunwuyun.cn/dvcp/announce/ic-routine.png',
|
||||||
name: '小程序',
|
name: '小程序',
|
||||||
msgType: 'app'
|
msgType: 'app'
|
||||||
},
|
},
|
||||||
@@ -433,9 +475,14 @@ export default {
|
|||||||
'https://cdn.cunwuyun.cn/dvcp/announce/ic-web.png',
|
'https://cdn.cunwuyun.cn/dvcp/announce/ic-web.png',
|
||||||
],
|
],
|
||||||
tagList: [],
|
tagList: [],
|
||||||
|
|
||||||
showAddWeb: false,
|
showAddWeb: false,
|
||||||
webInfo: {},
|
webInfo: {},
|
||||||
webListInfo: []
|
webListInfo: [],
|
||||||
|
|
||||||
|
showAddApp: false,
|
||||||
|
appInfo: {},
|
||||||
|
appListInfo: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -483,9 +530,13 @@ export default {
|
|||||||
uploadBtn(type) {
|
uploadBtn(type) {
|
||||||
if(type == 'web') {
|
if(type == 'web') {
|
||||||
this.showAddWeb = true
|
this.showAddWeb = true
|
||||||
|
this.webInfo = {}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if(type == 'app') {
|
if(type == 'app') {
|
||||||
|
this.showAddApp = true
|
||||||
|
this.appInfo = {}
|
||||||
|
// this.appInfo.media = []
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let count = 9 - (this.files?.length || 0) - (this.checkedList?.length || 0)
|
let count = 9 - (this.files?.length || 0) - (this.checkedList?.length || 0)
|
||||||
@@ -651,9 +702,18 @@ export default {
|
|||||||
}
|
}
|
||||||
item.msgType = '4'
|
item.msgType = '4'
|
||||||
})
|
})
|
||||||
|
|
||||||
this.form.contents.push(...this.webListInfo)
|
this.form.contents.push(...this.webListInfo)
|
||||||
|
|
||||||
|
//小程序
|
||||||
|
this.appListInfo.map((item) => {
|
||||||
|
if(item.media && item.media.length) {
|
||||||
|
item.mediaId = this.appListInfo.media[0].media.mediaId
|
||||||
|
item.sysFileId = this.appListInfo.media[0].id
|
||||||
|
}
|
||||||
|
item.msgType = '5'
|
||||||
|
})
|
||||||
|
this.form.contents.push(...this.appListInfo)
|
||||||
|
|
||||||
if(this.checkedList.length) {
|
if(this.checkedList.length) {
|
||||||
this.form.contents.push(...this.checkedList)
|
this.form.contents.push(...this.checkedList)
|
||||||
}
|
}
|
||||||
@@ -775,7 +835,27 @@ export default {
|
|||||||
},
|
},
|
||||||
removeWeb(index) {
|
removeWeb(index) {
|
||||||
this.webListInfo.splice(index, 1)
|
this.webListInfo.splice(index, 1)
|
||||||
}
|
},
|
||||||
|
addApp() {
|
||||||
|
if(!this.appInfo.mpAppid) {
|
||||||
|
return this.$u.toast('请输入小程序appid')
|
||||||
|
}
|
||||||
|
if(!this.appInfo.mpPage) {
|
||||||
|
return this.$u.toast('请输入小程序page路径')
|
||||||
|
}
|
||||||
|
if(!this.appInfo.mpTitle) {
|
||||||
|
return this.$u.toast('请输入标题')
|
||||||
|
}
|
||||||
|
if(!this.appInfo.media.length) {
|
||||||
|
return this.$u.toast('请上传封面图')
|
||||||
|
}
|
||||||
|
|
||||||
|
this.appListInfo.push(this.appInfo)
|
||||||
|
this.showAddApp = false
|
||||||
|
},
|
||||||
|
removeApp(index) {
|
||||||
|
this.appListInfo.splice(index, 1)
|
||||||
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -1134,7 +1214,6 @@ export default {
|
|||||||
|
|
||||||
.upload_list {
|
.upload_list {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 106px;
|
|
||||||
height: 140px;
|
height: 140px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
|
|||||||
Reference in New Issue
Block a user