Commit 7ced9fad by 前端

等待联调

1 parent f056dbd8
...@@ -1888,6 +1888,51 @@ ...@@ -1888,6 +1888,51 @@
"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
"dev": true "dev": true
}, },
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"ssri": { "ssri": {
"version": "8.0.1", "version": "8.0.1",
"resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz",
...@@ -1896,6 +1941,28 @@ ...@@ -1896,6 +1941,28 @@
"requires": { "requires": {
"minipass": "^3.1.1" "minipass": "^3.1.1"
} }
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
} }
} }
}, },
...@@ -13220,75 +13287,6 @@ ...@@ -13220,75 +13287,6 @@
} }
} }
}, },
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-style-loader": { "vue-style-loader": {
"version": "4.1.3", "version": "4.1.3",
"resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.3.tgz", "resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.3.tgz",
......
<template>
<div class="activity-img-box">
<template v-if="imageUrlArr && imageUrlArr.length > 0">
<div v-for="(item, index) in imageUrlArr" :key="index">
<div class="pic-box" :style="{ width: picOptions.width, height: picOptions.height }">
<img class="photo-activity" :src="item" alt="" />
<div class="mask" :style="{ width: picOptions.width, height: picOptions.height }">
<div class="pic-pane-close" @click="handleEnlarge(item)">
<img src="../../assets/images/view.png" alt="" />
</div>
<template v-if="picOptions.isClose">
<div class="pic-pane-close" @click="close('img', index)">
<img src="../../assets/images/dele.png" alt="" />
</div>
</template>
</div>
</div>
</div>
</template>
<template v-if="(imageUrlArr && imageUrlArr.length < 9 && limit > 1) || (imageUrlArr&&imageUrlArr.length == 0 && limit == 1)">
<div class="upload-img">
<i class="el-icon-plus avatar-uploader-desc-icon"></i>
<div class="avatar-uploader-desc-word">上传照片</div>
<input type="file" ref="uploadImg" class="upload-img" style="opacity: 0" accept=".jpg, .jpeg, .png" @change="e => handleImgChange(e)" />
</div>
</template>
<el-dialog class="image-dialog" :visible.sync="dialogVisibleImg" width="50%">
<img :src="dialogSrc" width="100%" v-if="dialogType == 'img'" />
<!-- <video width="100%" autoplay controls :src="dialogSrc" v-else></video> -->
</el-dialog>
</div>
</template>
<script>
export default {
props: {
picOptions: {
type: Object,
default: () => {
return {
width: '104px',
height: '104px',
isClose: true
}
}
},
imageUrlArr: {
type: Array,
default: () => []
},
limit: {
type: String,
default: '1'
},
index: {
type: Number,
default: -1
}
},
data() {
return {
dialogVisibleImg: false
}
},
methods: {
// 上传图片
handleImgChange(e) {
this.$notify({
title: '提示',
message: '图片上传中,请稍后'
})
var file = e.srcElement.files[0]
var reader = new FileReader()
// 默认1MB
const limitSize = 10
const isLt = file.size / 1024 / 1024 < limitSize
if (!isLt) {
this.$message.error('上传图片大小不能超过' + limitSize + 'MB!')
return true
}
if (this.imageUrlArr.length > 9) {
this.$message.error('最多上传9张图片')
return
}
reader.readAsDataURL(file)
reader.onload = e => {
const imgFile = e.target.result
const arrBase64 = imgFile.split(',')
const splitStr = file.name.split('.')
const fileUrl = splitStr[splitStr.length - 1] + '@' + arrBase64[1]
this.$apis.common.pictureUpload({ file: fileUrl, compress: this.picOptions.compress || 0 }).then(res => {
if (res) {
this.$notify({
title: '提示',
message: '图片上传成功',
type: 'success'
})
this.imageUrlArr.push(res)
this.$emit('change', { arr: this.imageUrlArr, key: this.picOptions.key, index: this.index })
}
e.target.value = ''
this.$refs.uploadImg.value = ''
})
}
},
// 预览图文
handleEnlarge(src, type) {
this.dialogVisibleImg = true
this.dialogSrc = src
this.dialogType = type ? type : 'img'
},
// 删除图片/视频
close(type, index) {
switch (type) {
case 'radio':
this.videoUrl = ''
this.videoImage = ''
break
case 'img':
this.imageUrlArr.splice(index, 1)
this.$emit('change', { arr: this.imageUrlArr, key: this.picOptions.key, id: 1, index: this.index })
break
default:
this.videoUrl = ''
}
}
}
}
</script>
<style scoped lang="scss">
.activity-img-box {
display: flex;
flex-wrap: wrap;
max-width: 600px;
.pic-box {
position: relative;
width: 104px;
height: 104px;
border-radius: 4px;
margin-right: 8px;
margin-bottom: 5px;
&:hover .mask {
opacity: 1;
}
.pic {
position: absolute;
object-fit: fill;
}
.photo-activity {
position: absolute;
width: 100%;
height: 100%;
}
.mask {
display: flex;
align-items: center;
justify-content: center;
position: absolute;
background: rgba(0, 0, 0, 0.5);
color: #ffffff;
opacity: 0;
top: 0;
right: 0;
width: 104px;
height: 104px;
z-index: 999;
.pic-pane-close {
width: 16px;
height: 16px;
cursor: pointer;
margin-left: 24px;
&:first-child{
margin-left: 0;
}
img{
width:100%;
display: block;
}
}
}
}
.upload-img {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 104px;
height: 104px;
background: rgba(0, 0, 0, 0.04);
border: 1px dashed rgba(0, 0, 0, 0.15);
border-radius: 4px;
input {
position: absolute;
// top: 0;
// left: 0;
width: 104px;
height: 104px;
}
}
.avatar-uploader-desc-word {
font-weight: 400;
font-size: 28rpx;
color: #666666;
}
.image-dialog {
/deep/ {
.el-dialog__header {
border-bottom: 0px;
padding: 0px;
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -13,6 +13,14 @@ ...@@ -13,6 +13,14 @@
</p> </p>
<el-button type="text" @click="handleImgDown(editForm[scope.scope.name])">下载图片</el-button> <el-button type="text" @click="handleImgDown(editForm[scope.scope.name])">下载图片</el-button>
</div> </div>
<div slot="coverSlot">
<glsx-preview :picOptions="item.editFormData.posterOptions" :imageUrlArr="editForm.coverArr"
@change="changeChannelImg"></glsx-preview>
</div>
<div slot="coverSlot1">
<glsx-preview :picOptions="item.editFormData.posterOptions1" :imageUrlArr="editForm.coverArr1"
@change="changeChannelImg"></glsx-preview>
</div>
<template slot="bannerList" slot-scope="scope"> <template slot="bannerList" slot-scope="scope">
<div class="banner-box"> <div class="banner-box">
<el-button type="primary" plain class="add-banner-btn" :size="size" @click="handleBannerAdd">新增banner</el-button> <el-button type="primary" plain class="add-banner-btn" :size="size" @click="handleBannerAdd">新增banner</el-button>
...@@ -237,8 +245,13 @@ ...@@ -237,8 +245,13 @@
</div> </div>
</template> </template>
<script> <script>
import preview from '@/components/preview'
export default { export default {
name: 'homeSet', name: 'homeSet',
components: {
glsxPreview: preview,
},
data() { data() {
return { return {
showGh: false, showGh: false,
...@@ -320,7 +333,12 @@ export default { ...@@ -320,7 +333,12 @@ export default {
bannerMerchantList: [], bannerMerchantList: [],
noticeMerchantList: [], noticeMerchantList: [],
customerServerType: '', customerServerType: '',
customerServerUrl: '' customerServerUrl: '',
posterOptions:'',
coverArr: [],
posterOptions1:'',
coverArr1: [],
}, },
bannerItem: { bannerItem: {
bannerImg: '', bannerImg: '',
...@@ -352,7 +370,17 @@ export default { ...@@ -352,7 +370,17 @@ export default {
// label: '', // label: '',
name: 'merchantQrcode', name: 'merchantQrcode',
addHtml: 'merchantQrcode' addHtml: 'merchantQrcode'
} },
{
label: '福利群群码',
name: 'strategyImg',
addHtml: 'coverSlot'
},
{
label: '福利官二维码',
name: 'strategyImg1',
addHtml: 'coverSlot1'
},
] ]
}, },
{ {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!