Commit 7b7d30e0 by 王志慧

bug修复

1 parent fa61491b
......@@ -108,7 +108,7 @@ const getTencentcloudmedialist = params => {
}
//膨胀金活动
const bulgeActivity = params => {
params.method = 'scrm.api.shopmall.select.bulge.activity.page'
params.method = 'scrm.api.shopmall.bulge.activity.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
......
......@@ -48,8 +48,12 @@ html {
font-size: 14px;
color: #999999;
margin-left: 154px;
margin-bottom: 35px;
margin-top: -15px;
margin-bottom: 10px;
}
.text-tip-line {
font-weight: 400;
font-size: 14px;
color: #999999;
}
.img-36 {
width: 36px;
......@@ -93,7 +97,7 @@ html {
}
}
.goodss-box {
width: 248px!important;
width: 248px !important;
padding: 16px;
box-sizing: border-box;
background: #f9f9f9;
......@@ -101,7 +105,6 @@ html {
display: flex;
align-items: center;
margin-top: 10px;
}
.theme-color {
color: #5850ff;
......@@ -131,3 +134,9 @@ html {
line-height: 17px;
margin-top: 4px;
}
.table-popover-img {
width: 120px;
}
.mrb20{
margin-bottom :20px !important;;
}
......@@ -74,7 +74,7 @@
<div class="goods-title">{{ item.goodsName }}</div>
<div class="goods-price">
价格/元:
<span class="theme-color">99.00</span>
<span class="theme-color">{{item.originalPrice}}</span>
</div>
</div>
</template>
......@@ -107,6 +107,7 @@
</template>
<script>
import { mapState } from 'vuex'
const openUrl = function (url) {
const link = document.createElement('a')
link.href = url
......@@ -139,6 +140,9 @@ export default {
}
},
computed: {
...mapState({
merchantId: state => state.channel.merchantId
}),
selectType() {
return this.activityList.length ? this.activityList.find(act => act.itemValue == this.activeName).itemType : ''
}
......@@ -163,8 +167,8 @@ export default {
this.dialogVisible = false
const marketingId = this.selectItem.id ? this.selectItem.id : this.selectItem.equityClassId
const marketingName = this.selectType == 'card' ? this.selectItem.equityName : this.selectType == 'package' ? this.selectItem.packageName : this.selectType == 'activity' || this.selectType == 'crowdfunding' ? this.selectItem.activityName : this.selectType == 'coupon' ? this.selectItem.couponName : this.selectItem.equityName
const { activityPrice, goodsImage, crowdFundingPrice,originalPrice,goodsName, retailPrice, equityName, packageName, couponName, activityName, effectivedDay, effectiveType, endTime, startTime, residueAmount, packagePrice, freeDay } = this.selectItem
const otherContent = { goodsImage,crowdFundingPrice,originalPrice,retailPrice, goodsName, equityName, packageName, couponName, activityName, effectivedDay, effectiveType, endTime, startTime, residueAmount, packagePrice, freeDay }
const { activityPrice, goodsImage, crowdFundingPrice, originalPrice, goodsName, retailPrice, equityName, packageName, couponName, activityName, effectivedDay, effectiveType, endTime, startTime, residueAmount, packagePrice, freeDay } = this.selectItem
const otherContent = { goodsImage, crowdFundingPrice, originalPrice, retailPrice, goodsName, equityName, packageName, couponName, activityName, effectivedDay, effectiveType, endTime, startTime, residueAmount, packagePrice, freeDay }
const marketingContent = { ...otherContent, selectType: this.selectType }
const params = {}
if (this.selectType == 'crowdfunding') {
......@@ -204,7 +208,8 @@ export default {
this.loading = true
let params = {
pageSize: this.pageSize,
pageNum: this.pageNum
pageNum: this.pageNum,
merchantId:this.merchantId
}
const activityChecked = this.activityList.find(act => act.itemValue == this.activeName)
if (activityChecked && activityChecked.params && activityChecked.params.currentPage) {
......
......@@ -89,7 +89,7 @@ export default {
const arrBase64 = imgFile.split(',')
const splitStr = file.name.split('.')
const fileUrl = splitStr[splitStr.length - 1] + '@' + arrBase64[1]
this.$apis.common.uploadImgApi({ file: fileUrl }).then(res => {
this.$apis.common.uploadImgApi({ file: fileUrl, compress: this.picOptions.compress || 0 }).then(res => {
if (res) {
this.$notify({
title: '提示',
......@@ -97,7 +97,7 @@ export default {
type: 'success'
})
this.imageUrlArr.push(res)
this.$emit('change', { arr: this.imageUrlArr, key: this.picOptions.key,index:this.index })
this.$emit('change', { arr: this.imageUrlArr, key: this.picOptions.key, index: this.index })
}
})
}
......@@ -119,7 +119,7 @@ export default {
case 'img':
this.imageUrlArr.splice(index, 1)
console.log(this.imageUrlArr)
// this.$emit('change', { arr: this.imageUrlArr, key: this.picOptions.key, id: 1 })
this.$emit('change', { arr: this.imageUrlArr, key: this.picOptions.key, id: 1 })
break
default:
this.videoUrl = ''
......
......@@ -5,7 +5,7 @@
<div class="channel-content gl-form-page">
<el-form ref="ruleForm" :model="channelForm" label-width="154px" :rules="rules">
<el-form-item label="频道名称:" prop="channelName">
<el-input v-model="channelForm.channelName"></el-input>
<el-input v-model="channelForm.channelName" :disabled="true"></el-input>
</el-form-item>
<span v-if="channelForm.channelType == 1">
<el-form-item label="频道主题:" prop="channelStyle">
......@@ -41,7 +41,7 @@
</el-form-item>
<div class="text-tip">建议尺寸:520*416</div>
<el-form-item label="频道分享文案:" prop="promotion">
<el-input type="textarea" v-model="channelForm.promotion"></el-input>
<el-input type="textarea" v-model="channelForm.promotion" maxlength="100" show-word-limit></el-input>
</el-form-item>
<el-form-item label="频道海报:">
<glsx-preview :picOptions="posterOptions" :imageUrlArr="channelForm.posterImgArr" @change="changeChannelImg"></glsx-preview>
......@@ -91,8 +91,7 @@ export default {
},
rules: {
channelName: [
{ required: true, message: '请输入频道名称', trigger: 'blur' },
{ min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
{ required: true, message: '请输入频道名称', trigger: 'blur' }
],
channelStyle: [{ required: true, message: '请选择频道主题', trigger: 'change' }],
publicityImg: [{ required: true, message: '请上传频道分享预览图', trigger: 'change' }],
......@@ -237,7 +236,7 @@ export default {
color: #999999;
margin-left: 154px;
margin-bottom: 35px;
margin-top: -15px;
margin-top: 15px;
}
}
</style>
\ No newline at end of file
......@@ -49,7 +49,16 @@ export default {
label: '创建时间',
name: 'createDate',
type: 'datePicker',
isClear: true
isClear: true,
customPickerOptions: {
disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate()))
if (date > yesterday) {
return true
}
return false
}
}
}
],
getListApi: this.$apis.channel.getChannelListApi,
......
......@@ -68,17 +68,19 @@ export default {
return {
activityForm: {
pagePathType: '',
mediaUrl: '',
activityDetails: '',
backgroundImgArr: ['http://qcimg01.glsx.com.cn:7060/group1/M00/04/1B/wKgD3mO4EbyAQ05bAAAfjdq6I2Q468.png'],
backgroundImgArr: ['https://img02.glsx.com.cn/weapp/resource/miniprogram/glsx/discover/item_bg_icon_3.png'],
mediaUrlArr: [],
backgroundType: 1,
backgroundImg: 'http://qcimg01.glsx.com.cn:7060/group1/M00/04/1B/wKgD3mO4EbyAQ05bAAAfjdq6I2Q468.png'
backgroundImg: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/glsx/discover/item_bg_icon_3.png'
},
bgOptions: {
width: '233px',
height: '138px',
isClose: true,
key: 'backgroundImg'
key: 'backgroundImg',
compress: 1 //不压缩
},
productOptions: {
width: ' 104px',
......@@ -93,7 +95,7 @@ export default {
],
backgroundImg: [{ required: true, message: '请选择卡片背景图', trigger: 'change' }],
pagePathContent: [{ required: true, message: '请选择页面路径', trigger: 'change' }],
subscribe: [{ required: true, message: '请选择页面路径', trigger: 'change' }]
mediaUrl: [{ required: true, message: '请上传产品主图', trigger: 'change' }]
},
activityList: [
{
......@@ -216,6 +218,7 @@ export default {
this.activityForm.activityDetails.contentName = this.activityForm.activityDetails.goodsName
this.activityForm.activityDetails.contentImage = this.activityForm.activityDetails.goodsImage
this.activityForm.activityDetails.contentPrice = this.activityForm.activityDetails.originalPrice
this.$refs.ruleForm.clearValidate('pagePathContent')
},
//生成路径
handlePath() {
......
......@@ -22,12 +22,12 @@
<div class="text-tip">建议尺寸:184*230</div>
</template>
<template v-if="membraneForm.mediaType == 2">
<el-form-item label="图片:" prop="mediaUrl">
<el-form-item label="图片:" prop="picUrl">
<glsx-preview limit="9" :picOptions="picOptions" :imageUrlArr="membraneForm.mediaUrlArr" @change="changeChannelImg"></glsx-preview>
</el-form-item>
</template>
<el-form-item label="宣传文案:" prop="promotion">
<el-input type="textarea" v-model="membraneForm.promotion"></el-input>
<el-input type="textarea" v-model="membraneForm.promotion" maxlength="100" show-word-limit></el-input>
</el-form-item>
</el-form>
<el-dialog class="image-dialog" :visible.sync="dialogVisibleImg" width="30%">
......@@ -49,7 +49,8 @@ export default {
mediaUrlArr: [],
mediaUrl: '',
mediaCover: '',
promotion: ''
promotion: '',
picUrl: ''
},
mediaCoverOptions: {
width: '92px',
......@@ -60,13 +61,14 @@ export default {
picOptions: {
width: '104px',
height: '104px',
key: 'mediaUrl',
key: 'picUrl',
isClose: true
},
rules: {
mediaType: [{ required: true, message: '请选择上传类型', trigger: 'change' }],
mediaUrl: [{ required: true, message: '请选择选择视频', trigger: 'change' }],
mediaCover: [{ required: true, message: '请选择视频封面图', trigger: 'change' }],
mediaCover: [{ required: true, message: '请上传视频封面图', trigger: 'change' }],
picUrl: [{ required: true, message: '请上传图片', trigger: 'change' }],
promotion: { required: true, message: '请输入宣传文案', trigger: 'blur' }
}
}
......@@ -90,6 +92,7 @@ export default {
data.contentList[0].mediaList.forEach(item => {
this.membraneForm.mediaUrlArr.push(item.mediaUrl)
})
this.membraneForm.picUrl = this.membraneForm.mediaUrlArr[0]
},
immediate: true,
deep: true
......@@ -146,6 +149,8 @@ export default {
this.membraneForm.mediaUrl = data[0].mediaUrl
this.membraneForm.mediaCoverArr.push(data[0].coverUrl)
this.membraneForm.promotion = data[0].introduction
this.$refs.ruleForm.clearValidate('mediaCover')
this.$refs.ruleForm.clearValidate('promotion')
},
handleCancel() {
this.$router.go(-1)
......@@ -218,7 +223,7 @@ export default {
min-height: 79px !important;
}
.el-form-item__error {
margin-top: 25px;
// margin-top: 25px;
margin-bottom: 10px;
}
.preview {
......
......@@ -4,11 +4,11 @@
<div class="container mgt16">
<GLCombiForm ref="showSearch" v-if="searchFormData.length" :rowNumber="1" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset">
<div slot="createdDate">
<el-date-picker v-model="tableSearchForm.createdDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
<el-date-picker v-model="tableSearchForm.createdDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" :picker-options="pickerOptions"></el-date-picker>
</div>
</GLCombiForm>
<div class="store-head">
<div class="info">膜类专区列表</div>
<div class="info">{{ tabPaneText }}列表</div>
<div>
<el-button type="primary" size="small" @click="handleAdd">编辑频道</el-button>
<el-button type="primary" plain size="small" @click="handleAddContent()">新增内容</el-button>
......@@ -25,7 +25,7 @@
<el-switch v-model="scope.scope.isOpen" @change="updateState(scope.scope)"></el-switch>
</template>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" v-if="scope.scope.contentType == 1" @click="handleConfig(scope.scope)">{{scope.scope.status==0?'待配置':'编辑'}}</el-button>
<el-button type="text" v-if="scope.scope.contentType == 1" @click="handleConfig(scope.scope)">{{ scope.scope.status == 0 ? '待配置' : '编辑' }}</el-button>
<template v-else>
<el-button type="text" v-if="scope.scope.status == 1" @click="handleTop(scope.scope)">置顶</el-button>
<el-button type="text" @click="handleAddContent(scope.scope)">编辑</el-button>
......@@ -51,6 +51,7 @@ export default {
merchantId: this.$route.query.merchantId ? this.$route.query.merchantId : '',
activeName: '',
merchantChannelId: '',
tabPaneText: '',
tableSearchForm: {
merchantName: '',
createDate: []
......@@ -112,7 +113,8 @@ export default {
width: 150,
filter: '1',
formatter: cellValue => {
return this.baseData.styleList.filter(item => item.confId == cellValue.topicStyle)[0].confName
const data = this.baseData.styleList.filter(item => item.confId == cellValue.topicStyle)
return data.length > 0 ? data[0].confName : '--'
}
},
......@@ -207,6 +209,11 @@ export default {
{ confId: '3', confName: '主题推荐' }
]
},
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now()
}
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'data.total' }
}
},
......@@ -273,6 +280,7 @@ export default {
this.SET_MERCHANT_ID({ id: this.merchantId })
this.activeName = res[0].channelType
this.merchantChannelId = res[0].id
this.tabPaneText = res[0].channelName
this.isFlag = true
this.initParams()
})
......@@ -291,7 +299,7 @@ export default {
},
handleClick() {
this.tabPaneList.forEach(item => {
item.name == this.activeName ? (this.merchantChannelId = item.merchantChannelId) : ''
item.name == this.activeName ? ((this.merchantChannelId = item.merchantChannelId), (this.tabPaneText = item.label)) : ''
})
this.initParams()
this.handleSearch()
......
......@@ -6,7 +6,7 @@
<div class="info">门店管理列表</div>
<el-button type="primary" plain size="small" @click="handleAdd">新建</el-button>
</div>
<GLTable ref="storeRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun">
<GLTable ref="storeRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun">
<div slot="activityImg" class="table-image" slot-scope="scope">
<el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
<img class="table-popover-img" :src="scope.scope.activityImg" />
......@@ -94,7 +94,7 @@
</div>
<div class="share-footer">
<div class="share-title">小程序页面路径</div>
<div class="share-path">{{shareData.urlLink}}</div>
<div class="share-path">{{ shareData.urlLink }}</div>
</div>
</GLDialog>
</div>
......@@ -117,7 +117,7 @@ export default {
hasFooter: false,
previewVisible: false, //预览
shareVisible: false, //分享
shareData:{},
shareData: {},
searchFormData: [
{
label: '门店名称',
......@@ -128,7 +128,16 @@ export default {
label: '创建日期',
name: 'createDate',
type: 'datePicker',
isClear: true
isClear: true,
customPickerOptions: {
disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate()))
if (date > yesterday) {
return true
}
return false
}
}
}
],
getListApi: this.$apis.store.getMerchantListApi,
......@@ -213,9 +222,8 @@ export default {
},
//分享
handleShare(val) {
this.$apis.store.getMerchantShare({merchantId:val.merchantId}).then(res=>{
this.shareData = res
this.$apis.store.getMerchantShare({ merchantId: val.merchantId }).then(res => {
this.shareData = res
})
this.shareVisible = true
},
......@@ -231,12 +239,11 @@ export default {
this.$refs.storeRef.refreshTable()
},
handleReset() {
this.tableSearchForm = {
this.tableSearchForm = {
merchantName: '',
createDate: []
}
this.searchForm = {
}
this.searchForm = {}
this.handleSearch()
},
setTableFinishFun() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!