Commit e6bc6b47 by 王志慧

第一轮bug修复

1 parent 1ed5406d
......@@ -104,7 +104,6 @@ export default {
},
// 预览图文
handleEnlarge(src, type) {
console.log(src)
this.dialogVisibleImg = true
this.dialogSrc = src
this.dialogType = type ? type : 'img'
......@@ -119,7 +118,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, index: this.index })
break
default:
this.videoUrl = ''
......
......@@ -5,7 +5,8 @@ export default {
videoList: [],
topicDetail: {},
merchantId: '',
channelStyle: 1
channelStyle: 1,
channelType: ''
},
mutations: {
// 设置视频
......@@ -22,8 +23,13 @@ export default {
},
// 设置频道主题
['SET_CHANNEL_STYLE'](state, payload) {
console.log(payload)
state.channelStyle = payload.channelStyle
},
['SET_CHANNEL_TYPE'](state, payload) {
// console.log(payload)
// localStorage.setItem('channelType', payload.channelType)
// console.log(localStorage.getItem('channelType'))
state.channelType = payload.channelType
}
},
actions: {
......
......@@ -5,7 +5,7 @@
<el-input v-model="activityForm.topicTitle" maxlength="6"></el-input>
</el-form-item>
<template v-if="channelType == 3">
<el-form-item label="卡片背景图:" prop="backgroundType">
<el-form-item label="卡片背景图:" prop="backgroundImg">
<el-radio-group v-model="activityForm.backgroundType" @input="changeBackgroundType">
<el-radio :label="1">单个</el-radio>
<el-radio :label="2">套餐</el-radio>
......@@ -127,15 +127,15 @@ export default {
subscribe: 2
}
},
{
itemName: '商品',
itemValue: 5,
itemType: 'goods',
getInterfaceApi: this.$apis.store.goodsActivity,
params: {
currentPage: 1
}
}
// {
// itemName: '商品',
// itemValue: 5,
// itemType: 'goods',
// getInterfaceApi: this.$apis.store.goodsActivity,
// params: {
// currentPage: 1
// }
// }
]
}
},
......@@ -212,11 +212,12 @@ export default {
},
selectActivity(data) {
this.activityForm.activityDetails = {
data,
...data,
...data.marketingContent,
contentName: data.marketingName
}
this.activityForm.pagePathContent = data.marketingId
console.log( this.activityForm.activityDetails)
if (this.activityForm.activityDetails.selectType == 'goods') {
this.activityForm.pagePathType = 2
this.activityForm.productPrice = this.activityForm.activityDetails.originalPrice
......@@ -226,8 +227,8 @@ export default {
this.activityForm.activityDetails.contentPrice = this.activityForm.activityDetails.originalPrice
} else {
this.activityForm.pagePathType = 1
this.activityForm.productPrice = this.activityForm.activityDetails.crowdFundingPrice
this.activityForm.activityPrice = this.activityForm.activityDetails.activityPrice
this.activityForm.productPrice = Number(this.activityForm.activityDetails.crowdFundingPrice)/100
this.activityForm.activityPrice = Number(this.activityForm.activityDetails.activityPrice)/100
this.activityForm.activityDetails.contentName = this.activityForm.activityDetails.activityName
}
......
......@@ -341,12 +341,14 @@ export default {
label: '产品价值/元',
name: 'productPrice',
type: 'input',
isDisabled: true,
filter: '3'
},
{
label: '活动价/元',
name: 'activityPrice',
type: 'input',
isDisabled: true,
filter: '3'
},
......@@ -456,7 +458,7 @@ export default {
activityDetails: item.pageContentItem,
...item,
...item.mediaList[0],
mediaCoverArr: [item.mediaList[0].mediaCover],
mediaCoverArr:item.mediaList[0].mediaCover&& [item.mediaList[0].mediaCover],
publicPraise: publicPraiseArr
})
})
......@@ -648,7 +650,7 @@ export default {
selectActivity(data) {
if (this.currentPath == -1) {
this.editForm.activityDetails = {
data,
...data,
...data.marketingContent,
contentName: data.marketingName,
pagePathType: data.marketingContent.selectType == 'goods' ? 2 : 1
......@@ -665,8 +667,8 @@ export default {
this.editForm.activityDetails.contentPrice = this.editForm.activityDetails.originalPrice
} else {
this.editForm.pagePathType = 1
this.editForm.productPrice = this.editForm.activityDetails.crowdFundingPrice
this.editForm.activityPrice = this.editForm.activityDetails.activityPrice
this.editForm.productPrice = Number(this.editForm.activityDetails.crowdFundingPrice) / 100
this.editForm.activityPrice = Number(this.editForm.activityDetails.activityPrice) / 100
this.editForm.activityDetails.pagePathType = 1
this.editForm.activityDetails.contentName = this.editForm.activityDetails.activityName
}
......@@ -740,17 +742,19 @@ export default {
]
if (this.editForm.topicStyle != 3) {
this.editForm.mediaType = 1
this.editForm.mediaUrlArr = []
this.editForm.mediaName = ''
this.editForm.mediaCover = ''
this.editForm.mediaUrl = ''
this.editForm.promotion = ''
this.editForm.activityDetails = ''
this.editForm.activityPrice = ''
this.editForm.pagePathContent = ''
} else {
this.editForm.mediaUrl = ''
this.editForm.mediaType = 2
}
this.editForm.productUrl = ''
this.editForm.mediaUrlArr = []
this.editForm.mediaName = ''
this.editForm.mediaCover = ''
this.editForm.mediaUrl = ''
this.editForm.promotion = ''
this.editForm.activityDetails = ''
this.editForm.activityPrice = ''
this.editForm.pagePathContent = ''
this.initParams()
},
......@@ -763,10 +767,12 @@ export default {
})
},
changeChannelImg(val) {
console.log(val)
if (val.index != -1) {
this.editForm.contentList[val.index][val.key] = val.arr[0]
} else {
this.editForm[val.key] = val.arr[0]
console.log( this.editForm[val.key],'9999999')
}
if (this.editForm.topicStyle == 3 || val.index == -1) {
this.$refs.editFormRef.$refs[this.editChildRef].clearValidate(val.key)
......
......@@ -198,7 +198,8 @@ export default {
})
let params = {
topicId: this.topicId,
couponIds
couponIds,
couponNames: this.tableData[0].couponName
}
console.log(this.tableData)
this.$apis.store.configCoupons(params).then(res => {
......
......@@ -27,7 +27,7 @@
<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>
<template v-else>
<el-button type="text" v-if="scope.scope.status == 1" @click="handleTop(scope.scope)">置顶</el-button>
<el-button type="text" v-if="scope.scope.topStatus == 0" @click="handleTop(scope.scope)">置顶</el-button>
<el-button type="text" @click="handleAddContent(scope.scope)">编辑</el-button>
<el-button type="text" v-if="scope.scope.status == 1" @click="handleOut(scope.scope, '下架')">下架</el-button>
<el-button type="text" v-if="scope.scope.status == 2" @click="handleOut(scope.scope, '上架')">上架</el-button>
......@@ -194,7 +194,7 @@ export default {
{
label: '操作',
addHtml: 'auth-button',
width: 200,
width: 220,
fixed: 'right'
}
],
......@@ -221,10 +221,16 @@ export default {
this.getconfigMerchant()
},
mounted() {},
computed: {
...mapState({
channelType: state => state.channel.channelType
})
},
methods: {
...mapMutations({
SET_MERCHANT_ID: 'channel/SET_MERCHANT_ID',
SET_CHANNEL_STYLE: 'channel/SET_CHANNEL_STYLE'
SET_CHANNEL_STYLE: 'channel/SET_CHANNEL_STYLE',
SET_CHANNEL_TYPE: 'channel/SET_CHANNEL_TYPE'
}),
getParams() {
var params = JSON.parse(JSON.stringify(this.tableSearchForm))
......@@ -278,14 +284,17 @@ export default {
merchantChannelId: item.id
})
})
console.log(res)
this.SET_MERCHANT_ID({ id: this.merchantId })
this.SET_CHANNEL_STYLE({ channelStyle: res[0].channelStyle })
!this.channelType && this.SET_CHANNEL_TYPE({ channelType: res[0].channelType })
this.activeName = res[0].channelType
this.merchantChannelId = res[0].id
this.tabPaneText = res[0].channelName
this.isFlag = true
this.initParams()
if (this.channelType) {
this.activeName = this.channelType
this.handleClick()
}
})
},
//新增编辑内容
......@@ -301,11 +310,14 @@ export default {
this.$router.push(`/store/content?topicId=${val.topicId}&channelType=-1`)
},
handleClick() {
this.SET_CHANNEL_TYPE({ channelType: this.activeName })
this.tabPaneList.forEach(item => {
item.name == this.activeName ? ((this.merchantChannelId = item.merchantChannelId), (this.tabPaneText = item.label)) : ''
})
this.initParams()
this.handleSearch()
this.$nextTick(() => {
this.handleSearch()
})
},
handleAdd(scope) {
this.$router.push(`/channel/add?merchantChannelId=${this.merchantChannelId}`)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!