This commit is contained in:
yanran200730
2022-05-24 16:31:10 +08:00
parent e7c61c8293
commit 2b8e4dc41d
19 changed files with 255 additions and 72 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div class="WatermarkSetting">
<div class="WatermarkSetting" v-if="pageShow">
<div class="title">
<h2>水印选择</h2>
<span>*选择水印后相册只能上传该水印照片</span>
@@ -22,8 +22,8 @@
<h2>水印库</h2>
</div>
<div class="watermark-list" v-if="currIndex === 1">
<div class="item" @click="checkd(item.type)" v-for="(item, index) in config" :key="index" :class="[checkedList.includes(index) ? 'active' : '']">
<image class="checked" v-if="checkedList.includes(item.type)" src="./images/xuanzhong.png" />
<div class="item" @click="checkd(item.id)" v-for="(item, index) in list" :key="index" :class="[checkedList.includes(item.id) ? 'active' : '']">
<image class="checked" v-if="checkedList.includes(item.id)" src="./images/xuanzhong.png" />
<image class="watermark" :src="item.thum" mode="aspectFill" />
</div>
</div>
@@ -42,7 +42,9 @@
return {
currIndex: 0,
config,
checkedList: []
checkedList: [],
list: [],
pageShow: false
}
},
@@ -51,9 +53,24 @@
this.currIndex = 1
this.checkedList = query.value.split(',')
}
this.getList()
},
methods: {
getList () {
this.$loading()
this.$http.post(`/api/appalbumtemplate/list?size=100&status=1`).then(res => {
if (res.code === 0) {
this.list = res.data.records
}
this.pageShow = true
this.$hideLoading()
})
},
save () {
uni.$emit('change', {
type: 'watermark',