素材
This commit is contained in:
@@ -113,6 +113,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="exit" @click="showPopup = false">退出预览</div>
|
||||
@@ -124,12 +126,15 @@
|
||||
<div class="uploadPopup">
|
||||
<div class="upload_card" v-for="(item,index) in uploadList" :key="index">
|
||||
<div class="upload_item">{{ item.title }}</div>
|
||||
<div class="upload_list">
|
||||
<div class="list_item" v-for="(e, i) in item.list" :key="i" @click="uploadBtn(e.msgType)">
|
||||
<img :src="e.icon" alt="">
|
||||
<span>{{ e.name }}</span>
|
||||
<scroll-view scroll-x="">
|
||||
<div class="upload_list">
|
||||
<div class="lists_item" v-for="(e, i) in item.list" :key="i" @click="uploadBtn(e.msgType)">
|
||||
<img :src="e.icon" alt="">
|
||||
<span>{{ e.name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</scroll-view>
|
||||
|
||||
</div>
|
||||
<div class="btnCancel" @click="showUpload = false">取消</div>
|
||||
</div>
|
||||
@@ -213,45 +218,104 @@ export default {
|
||||
},
|
||||
flag: false,
|
||||
uploadList: [
|
||||
{
|
||||
title: '从素材库上传',
|
||||
list: [
|
||||
{
|
||||
icon: 'https://cdn.cunwuyun.cn/dvcp/announce/ic-script.png',
|
||||
name: '话术',
|
||||
msgType: '0'
|
||||
},
|
||||
{
|
||||
icon: 'https://cdn.cunwuyun.cn/dvcp/announce/ic-picture.png',
|
||||
name: '图片',
|
||||
msgType: '1'
|
||||
},
|
||||
{
|
||||
icon: 'https://cdn.cunwuyun.cn/dvcp/announce/ic-video.png',
|
||||
name: '视频',
|
||||
msgType: '4'
|
||||
},
|
||||
{
|
||||
icon: 'https://cdn.cunwuyun.cn/dvcp/announce/ic-document.png',
|
||||
name: '文件',
|
||||
msgType: '3'
|
||||
},
|
||||
{
|
||||
icon: 'https://cdn.cunwuyun.cn/dvcp/announce/ic-routine.png',
|
||||
name: '小程序',
|
||||
msgType: '2'
|
||||
},
|
||||
{
|
||||
icon: 'https://cdn.cunwuyun.cn/dvcp/announce/ic-web.png',
|
||||
name: '网页',
|
||||
msgType: '5'
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '从本地上传',
|
||||
list: [
|
||||
{
|
||||
icon: 'https://cdn.cunwuyun.cn/dvcp/announce/img.png',
|
||||
icon: 'https://cdn.cunwuyun.cn/dvcp/announce/ic-picture.png',
|
||||
name: '图片',
|
||||
msgType: 'image'
|
||||
},
|
||||
{
|
||||
icon: 'https://cdn.cunwuyun.cn/dvcp/announce/video.png',
|
||||
icon: 'https://cdn.cunwuyun.cn/dvcp/announce/ic-video.png',
|
||||
name: '视频',
|
||||
msgType: 'video'
|
||||
},
|
||||
{
|
||||
icon: 'https://cdn.cunwuyun.cn/dvcp/announce/folder.png',
|
||||
icon: 'https://cdn.cunwuyun.cn/dvcp/announce/ic-document.png',
|
||||
name: '文件',
|
||||
msgType: 'file'
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
],
|
||||
uploadCircle: [
|
||||
{
|
||||
title: '从素材库上传',
|
||||
list: [
|
||||
{
|
||||
icon: 'https://cdn.cunwuyun.cn/dvcp/announce/ic-script.png',
|
||||
name: '话术',
|
||||
msgType: '0'
|
||||
},
|
||||
{
|
||||
icon: 'https://cdn.cunwuyun.cn/dvcp/announce/ic-picture.png',
|
||||
name: '图片',
|
||||
msgType: '1'
|
||||
},
|
||||
{
|
||||
icon: 'https://cdn.cunwuyun.cn/dvcp/announce/ic-video.png',
|
||||
name: '视频',
|
||||
msgType: '4'
|
||||
},
|
||||
{
|
||||
icon: 'https://cdn.cunwuyun.cn/dvcp/announce/ic-web.png',
|
||||
name: '网页',
|
||||
msgType: '5'
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '从本地上传',
|
||||
list: [
|
||||
{
|
||||
icon: 'https://cdn.cunwuyun.cn/dvcp/announce/img.png',
|
||||
icon: 'https://cdn.cunwuyun.cn/dvcp/announce/ic-picture.png',
|
||||
name: '图片',
|
||||
msgType: 'image'
|
||||
},
|
||||
{
|
||||
icon: 'https://cdn.cunwuyun.cn/dvcp/announce/video.png',
|
||||
icon: 'https://cdn.cunwuyun.cn/dvcp/announce/ic-video.png',
|
||||
name: '视频',
|
||||
msgType: 'video'
|
||||
},
|
||||
]
|
||||
}
|
||||
],
|
||||
// upload: [],
|
||||
midiaIds: [],
|
||||
sum: null,
|
||||
// 筛选条件
|
||||
@@ -357,6 +421,8 @@ export default {
|
||||
uni.chooseVideo(params)
|
||||
} else if(type == 'file') {
|
||||
uni.chooseFile(params)
|
||||
} else {
|
||||
uni.navigateTo({url: `./fodderList?type=${this.type}&msgType=${type}`})
|
||||
}
|
||||
} else {
|
||||
this.$u.toast(`不能超过9个`)
|
||||
@@ -864,24 +930,23 @@ export default {
|
||||
}
|
||||
|
||||
.uploadPopup {
|
||||
|
||||
width: 100%;
|
||||
background: #F7F7F7;
|
||||
.upload_card {
|
||||
padding: 32px 32px 0 32px;
|
||||
box-sizing: border-box;
|
||||
overflow-x: scroll;
|
||||
|
||||
.upload_item {
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.upload_list {
|
||||
overflow-x: scroll;
|
||||
display: flex;
|
||||
.list_item {
|
||||
text-align: center;
|
||||
width: 106px;
|
||||
height: 140px;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
.lists_item {
|
||||
margin-right: 48px;
|
||||
img {
|
||||
display: inline-block;
|
||||
|
||||
@@ -1,31 +1,34 @@
|
||||
<template>
|
||||
<div class="fodderList">
|
||||
<AiTopFixed class="search-box">
|
||||
<u-search placeholder="素材名称" v-model="keyword" :clearabled="false" :animation="false"></u-search>
|
||||
<u-search placeholder="素材名称" v-model="title" :clearabled="false" :animation="false"></u-search>
|
||||
</AiTopFixed>
|
||||
<div class="card-box">
|
||||
<div class="card">
|
||||
<div class="card" v-for="(item,index) in list" :key="index">
|
||||
<div class="left">
|
||||
<!-- <div>
|
||||
<div class="title">Q: 中卫汇通客服解决</div>
|
||||
<div class="info">很快就都看不出可不能虚不能会计学女款你辛苦v,nvknkvnxkvnj</div>
|
||||
</div> -->
|
||||
<div class="files">
|
||||
<div v-if="type == 0">
|
||||
<div class="title">{{ item.title }}</div>
|
||||
<div class="info">{{ item.content }}</div>
|
||||
</div>
|
||||
<!-- <div class="files">
|
||||
<div class="pic">
|
||||
<img src="./images/files.png" alt="">
|
||||
</div>
|
||||
<div>
|
||||
<div class="files-r">
|
||||
<div class="title">百度一下你就知道</div>
|
||||
<div class="mar-top info">www.baidu.com</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="right">
|
||||
<!-- <img src="./images/xzh.png" alt=""> -->
|
||||
<img src="./images/xz.png" alt="">
|
||||
<div class="right" @click="item.isChecked = !item.isChecked">
|
||||
<img src="./images/xz.png" v-if="item.isChecked" alt="">
|
||||
<img src="./images/xzh.png" v-else alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="subBtn" @click="submit">
|
||||
<div>确定选择</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -35,21 +38,67 @@ export default {
|
||||
name: "fodderList",
|
||||
data() {
|
||||
return {
|
||||
keyword: '',
|
||||
mstType: null,
|
||||
current: 1,
|
||||
title: '',
|
||||
type: '',
|
||||
list: [],
|
||||
checkedList: [],
|
||||
typeArr: ['话术','图片','小程序','文件','视频','网页']
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
getList() {
|
||||
this.$http.post(`/app/appmaterialinfo/listByMST`,null,{
|
||||
params: {
|
||||
mstType: this.mstType,
|
||||
current: this.current,
|
||||
title: this.title,
|
||||
type: this.type,
|
||||
}
|
||||
}).then(res=> {
|
||||
if(res?.data) {
|
||||
this.list = res.data.records.map(e=> {
|
||||
return {
|
||||
...e,
|
||||
isChecked: this.checkedList.map(i=> i.id==e.id),
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
if (!this.checkedList.length) {
|
||||
return this.$u.toast(`请选择${this.typeArr[this.mstType]}`)
|
||||
}
|
||||
uni.$emit("fodder", [this.selected])
|
||||
uni.setStorageSync('checkedList', this.checkedList)
|
||||
uni.navigateBack()
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
onLoad(o) {
|
||||
if(o.type == 'CircleOfFriends') {
|
||||
this.mstType = 1
|
||||
} else if(o.type == 'Residents') {
|
||||
this.mstType = 2
|
||||
} else if (o.type == 'ResidentsGroup') {
|
||||
this.mstType = 0
|
||||
}
|
||||
this.type = o.msgType
|
||||
this.checkedList = uni.getStorageSync('checkedList') || []
|
||||
this.getList()
|
||||
},
|
||||
|
||||
onReachBottom() {
|
||||
this.current ++
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.fodderList {
|
||||
padding-bottom: 120px;
|
||||
box-sizing: border-box;
|
||||
.card-box {
|
||||
background: #fff;
|
||||
padding: 24px 32px;
|
||||
@@ -101,6 +150,9 @@ export default {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.files-r {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.right {
|
||||
@@ -113,6 +165,26 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.subBtn {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 118px;
|
||||
background: #f4f8fb;
|
||||
|
||||
div {
|
||||
width: 192px;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
text-align: center;
|
||||
background: #1365dd;
|
||||
border-radius: 4px;
|
||||
font-size: 32px;
|
||||
color: #fff;
|
||||
margin: 20px 34px 0 0;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user