Commit d091455b by 王志慧

commit

1 parent dbfde54e
...@@ -33,6 +33,29 @@ const updateChannel = params => { ...@@ -33,6 +33,29 @@ const updateChannel = params => {
returnAll: true returnAll: true
}) })
} }
// 门店频道详情
const getMerchantChannelDetail = params => {
params.method = `scrm.api.shopmall.discover.channel.merchant.detail`
return http({
url,
method: 'post',
data: params,
sign: true,
returnAll: true
})
}
// 新增或编辑门店频道
const updateMerchantChannel = params => {
params.method = `scrm.api.shopmall.discover.channel.merchant.add.or.update`
return http({
url,
method: 'post',
data: params,
sign: true,
returnAll: true
})
}
// 开通订阅 // 开通订阅
const openSubscribe = params => { const openSubscribe = params => {
params.method = `entmicro.api.system.subscribe.open` params.method = `entmicro.api.system.subscribe.open`
...@@ -105,4 +128,4 @@ const subscribeMerchant = params => { ...@@ -105,4 +128,4 @@ const subscribeMerchant = params => {
}) })
} }
export default { subscribeMerchant, generateRescueCode, updateState, getActivityList, getChannelListApi, openSubscribe, selStoreConfig, getChannelDetail, updateChannel, correlateActivity } export default { updateMerchantChannel,getMerchantChannelDetail,subscribeMerchant, generateRescueCode, updateState, getActivityList, getChannelListApi, openSubscribe, selStoreConfig, getChannelDetail, updateChannel, correlateActivity }
...@@ -193,5 +193,16 @@ const getDirectionalGiftListApi = params => { ...@@ -193,5 +193,16 @@ const getDirectionalGiftListApi = params => {
data: params, data: params,
sign: true sign: true
}) })
} }
export default {configCoupons,getDirectionalGiftListApi, deleteChannel, updownshelvesChannel, topshelvesChannel, goodsActivity, crowdfundingActivity, bulgeActivity, getTencentcloudmedialist, addChannelTopic, getTopicDetail, getChannelTopicList, getMerchantListApi, openSubscribe, selStoreConfig, getMerchantShare, configMerchant, getconfigMerchant }
// 获取膜类专区-配置券
const getCouponconfig = params => {
params.method = 'scrm.api.shopmall.discover.channel.topic.getcouponconfig'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
export default { getCouponconfig, configCoupons, getDirectionalGiftListApi, deleteChannel, updownshelvesChannel, topshelvesChannel, goodsActivity, crowdfundingActivity, bulgeActivity, getTencentcloudmedialist, addChannelTopic, getTopicDetail, getChannelTopicList, getMerchantListApi, openSubscribe, selStoreConfig, getMerchantShare, configMerchant, getconfigMerchant }
...@@ -127,4 +127,7 @@ html { ...@@ -127,4 +127,7 @@ html {
.theme-color { .theme-color {
color: #5850ff; color: #5850ff;
} }
.flex-default {
display: flex;
}
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<el-form-item label="频道名称:" prop="channelName"> <el-form-item label="频道名称:" prop="channelName">
<el-input v-model="channelForm.channelName"></el-input> <el-input v-model="channelForm.channelName"></el-input>
</el-form-item> </el-form-item>
<span v-if="id == 1"> <span v-if="channelForm.channelType == 1">
<el-form-item label="频道主题:" prop="channelStyle"> <el-form-item label="频道主题:" prop="channelStyle">
<el-col :span="11" class="theme"></el-col> <el-col :span="11" class="theme"></el-col>
<el-col :span="11" class="theme dark"></el-col> <el-col :span="11" class="theme dark"></el-col>
...@@ -62,6 +62,7 @@ export default { ...@@ -62,6 +62,7 @@ export default {
return { return {
loading: false, loading: false,
id: this.$route.query.id ? this.$route.query.id : '', id: this.$route.query.id ? this.$route.query.id : '',
merchantChannelId: this.$route.query.merchantChannelId ? this.$route.query.merchantChannelId : '',
channelForm: { channelForm: {
posterImgArr: [], posterImgArr: [],
publicityImgImgArr: [], publicityImgImgArr: [],
...@@ -101,13 +102,14 @@ export default { ...@@ -101,13 +102,14 @@ export default {
} }
}, },
created() { created() {
console.log(this.id) if (this.id || this.merchantChannelId) this.getChannelDetail()
this.getChannelDetail()
}, },
methods: { methods: {
getChannelDetail() { getChannelDetail() {
let params = { id: this.id } let apis = this.id ? 'getChannelDetail' : this.merchantChannelId ? 'getMerchantChannelDetail' : ''
this.$apis.channel.getChannelDetail(params).then(res => { let params = {}
this.id ? (params.id = this.id) : this.merchantChannelId ? (params.merchantChannelId = this.merchantChannelId) : ''
this.$apis.channel[apis](params).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.channelForm = { ...res.data, posterImgArr: [], publicityImgImgArr: [], channelImgImgArr: [] } this.channelForm = { ...res.data, posterImgArr: [], publicityImgImgArr: [], channelImgImgArr: [] }
this.channelForm.posterImgArr.push(res.data.posterImg) //海报 this.channelForm.posterImgArr.push(res.data.posterImg) //海报
...@@ -125,19 +127,18 @@ export default { ...@@ -125,19 +127,18 @@ export default {
this.$refs.ruleForm.clearValidate(val.key) this.$refs.ruleForm.clearValidate(val.key)
}, },
handleSave() { handleSave() {
console.log(this.channelForm.channelImg)
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {
if (!this.channelForm.channelImg) { if (!this.channelForm.channelImg) {
this.channelImgFlag = true this.channelImgFlag = true
return return
} }
// if (!this.channelForm.publicityImg) { // if (!this.channelForm.publicityImg) {
// this.publicityImgFlag = true // this.publicityImgFlag = true
// return // return
// } // }
if (valid) { if (valid) {
let params = { let params = {
id: this.id,
channelName: this.channelForm.channelName, channelName: this.channelForm.channelName,
channelType: this.channelForm.channelType, channelType: this.channelForm.channelType,
channelStyle: this.channelForm.channelStyle, channelStyle: this.channelForm.channelStyle,
...@@ -146,9 +147,11 @@ export default { ...@@ -146,9 +147,11 @@ export default {
publicityImg: this.channelForm.publicityImg, publicityImg: this.channelForm.publicityImg,
posterImg: this.channelForm.posterImg posterImg: this.channelForm.posterImg
} }
if (this.id == 1) params.channelStyle = this.channelForm.channelStyle if (this.channelForm.channelType == 1) params.channelStyle = this.channelForm.channelStyle
let apis = this.id ? 'updateChannel' : this.merchantChannelId ? 'updateMerchantChannel' : ''
this.id ? (params.id = this.id) : this.merchantChannelId ? (params.merchantChannelId = this.merchantChannelId) : ''
this.loading = true this.loading = true
this.$apis.channel.updateChannel(params).then(res => { this.$apis.channel[apis](params).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.loading = false this.loading = false
this.$router.go(-1) this.$router.go(-1)
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
</el-form-item> </el-form-item>
<div class="text-tip">建议尺寸:184*230</div> <div class="text-tip">建议尺寸:184*230</div>
<el-form-item label="宣传文案:" :prop="'contentList.' + index + '.promotion'" :rules="rules.promotion"> <el-form-item label="宣传文案:" :prop="'contentList.' + index + '.promotion'" :rules="rules.promotion">
<el-input type="textarea" v-model="item.promotion"></el-input> <el-input type="textarea" v-model="item.promotion" maxlength="100"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="页面路径:" :prop="'contentList.' + index + '.pagePathType'" :rules="rules.pagePathType"> <el-form-item label="页面路径:" :prop="'contentList.' + index + '.pagePathType'" :rules="rules.pagePathType">
<el-button type="default" class="el-icon-plus" @click="handlePath(index)">选择路径</el-button> <el-button type="default" class="el-icon-plus" @click="handlePath(index)">选择路径</el-button>
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
</span> </span>
<el-form-item label="口碑文案:" :key="index" :class="index != 0 ? 'publicPraise-box' : ''" v-for="(text, index) in editForm.contentList[0].publicPraise"> <el-form-item label="口碑文案:" :key="index" :class="index != 0 ? 'publicPraise-box' : ''" v-for="(text, index) in editForm.contentList[0].publicPraise">
<el-input type="text" v-model="text.value"></el-input> <el-input type="text" v-model="text.value" maxlength="20"></el-input>
<div class="dele-publicPraise" @click="handleDelePraise(index)"> <div class="dele-publicPraise" @click="handleDelePraise(index)">
<img class="icon-dele" src="@/assets/channel/dele.png" /> <img class="icon-dele" src="@/assets/channel/dele.png" />
</div> </div>
...@@ -710,6 +710,13 @@ export default { ...@@ -710,6 +710,13 @@ export default {
// this.$refs.ruleForm.clearValidate(val.key) // this.$refs.ruleForm.clearValidate(val.key)
}, },
handleAddItem() { handleAddItem() {
if (this.editForm.contentList.length == 6) {
this.$message({
message: '最多新增6个视频',
type: 'error'
})
return
}
this.editForm.contentList.push({ this.editForm.contentList.push({
mediaType: '', mediaType: '',
mediaUrl: '', mediaUrl: '',
...@@ -722,6 +729,13 @@ export default { ...@@ -722,6 +729,13 @@ export default {
}) })
}, },
handleAddPraise() { handleAddPraise() {
if (this.editForm.contentList[0].publicPraise.length == 10) {
this.$message({
message: '最多新增10条口碑文案',
type: 'error'
})
return
}
this.editForm.contentList[0].publicPraise.push({ this.editForm.contentList[0].publicPraise.push({
value: '' value: ''
}) })
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<el-tab-pane label="兑换券" name="exchange"></el-tab-pane> <el-tab-pane label="兑换券" name="exchange"></el-tab-pane>
</el-tabs> </el-tabs>
<div> <div>
<glsx-combi-form class="p-16" style="padding-bottom: 0px;" ref="showSearch" :formObj="searchForm" :formData="searchFormData"> <glsx-combi-form class="p-16" style="padding-bottom: 0px" ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer"> <span slot="footer">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span> </span>
...@@ -84,6 +84,7 @@ ...@@ -84,6 +84,7 @@
<script> <script>
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { mapState } from 'vuex'
export default { export default {
name: 'selectGiftDialog', name: 'selectGiftDialog',
data() { data() {
...@@ -200,11 +201,16 @@ export default { ...@@ -200,11 +201,16 @@ export default {
this.userInfo = this.$globalState.session this.userInfo = this.$globalState.session
this.getList({}, true, true) this.getList({}, true, true)
}, },
computed: {
...mapState({
merchantId: state => state.channel.merchantId
})
},
methods: { methods: {
getList(page, isResetPage = false, isMount = false) { getList(page, isResetPage = false, isMount = false) {
var params = { var params = {
...this.searchForm, ...this.searchForm,
merchantId: this.merchantId,
discountType: this.selectedGiftList[this.activeName].discountType, discountType: this.selectedGiftList[this.activeName].discountType,
pageNum: isResetPage ? 1 : this.$refs[this.activeName + 'Ref'].page.pageNum, pageNum: isResetPage ? 1 : this.$refs[this.activeName + 'Ref'].page.pageNum,
pageSize: isResetPage ? 10 : this.$refs[this.activeName + 'Ref'].page.pageSize pageSize: isResetPage ? 10 : this.$refs[this.activeName + 'Ref'].page.pageSize
...@@ -355,8 +361,8 @@ export default { ...@@ -355,8 +361,8 @@ export default {
couponName: item.couponName, couponName: item.couponName,
couponAmount: isSelected ? list.find(k => k.id == item.id).couponAmount : '1', couponAmount: isSelected ? list.find(k => k.id == item.id).couponAmount : '1',
couponAnticipatedCost: item.couponAnticipatedCost, couponAnticipatedCost: item.couponAnticipatedCost,
effectiveType:this.toLabelText(item), effectiveType: this.toLabelText(item),
residueAmount:item.residueAmount, residueAmount: item.residueAmount,
status: '2' status: '2'
}) })
} }
......
...@@ -26,7 +26,7 @@ export default { ...@@ -26,7 +26,7 @@ export default {
}, },
data() { data() {
return { return {
merchantChannelId: this.$route.query.channelId ? this.$route.query.channelId : '', //门店频道id merchantChannelId: this.$route.query.merchantChannelId ? this.$route.query.merchantChannelId : '', //门店频道id
topicId: this.$route.query.topicId ? this.$route.query.topicId : '', //频道主题ID topicId: this.$route.query.topicId ? this.$route.query.topicId : '', //频道主题ID
channelType: this.$route.query.channelType ? this.$route.query.channelType : '', //频道类型 channelType: this.$route.query.channelType ? this.$route.query.channelType : '', //频道类型
currentComponent: 'carChannel', currentComponent: 'carChannel',
...@@ -62,15 +62,13 @@ export default { ...@@ -62,15 +62,13 @@ export default {
4: 'activity' 4: 'activity'
} }
this.currentComponent = arr[this.channelType] this.currentComponent = arr[this.channelType]
console.log(this.currentComponent, '77777777')
}, },
handleCancel() { handleCancel() {
this.$router.go(-1) this.$router.go(-1)
}, },
handleSave() { handleSave() {
this.$refs.componentRef.handleSave() this.$refs.componentRef.handleSave()
}, }
handleCheckedChannelChange() {}
} }
} }
</script> </script>
......
...@@ -27,10 +27,11 @@ ...@@ -27,10 +27,11 @@
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" v-if="scope.scope.contentType == 1" @click="handleConfig(scope.scope)">待配置</el-button> <el-button type="text" v-if="scope.scope.contentType == 1" @click="handleConfig(scope.scope)">待配置</el-button>
<template v-else> <template v-else>
<el-button type="text" @click="handleTop(scope.scope)">置顶</el-button> <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> <el-button type="text" @click="handleAddContent(scope.scope)">编辑</el-button>
<el-button type="text" @click="handleOut(scope.scope)">下架</el-button> <el-button type="text" v-if="scope.scope.status == 1" @click="handleOut(scope.scope)">下架</el-button>
<el-button type="text" @click="handleDelect(scope.scope)">删除</el-button> <el-button type="text" v-if="scope.scope.status == 2" @click="handleOut(scope.scope)">上架</el-button>
<el-button type="text" v-if="scope.scope.status == 2" @click="handleDelect(scope.scope)">删除</el-button>
</template> </template>
</div> </div>
</GLTable> </GLTable>
...@@ -49,6 +50,7 @@ export default { ...@@ -49,6 +50,7 @@ export default {
isFlag: false, isFlag: false,
merchantId: this.$route.query.merchantId ? this.$route.query.merchantId : '', merchantId: this.$route.query.merchantId ? this.$route.query.merchantId : '',
activeName: '', activeName: '',
merchantChannelId: '',
tableSearchForm: { tableSearchForm: {
merchantName: '', merchantName: '',
createDate: [] createDate: []
...@@ -166,7 +168,7 @@ export default { ...@@ -166,7 +168,7 @@ export default {
label: '状态', label: '状态',
prop: 'status', prop: 'status',
formatter: cellValue => { formatter: cellValue => {
return cellValue.status == 1 ? '上架' : cellValue.status == 2 ? '下架中' : '--' return cellValue.status == 1 ? '上架' : cellValue.status == 2 ? '下架' : '--'
}, },
filter: '1,2,3,4' filter: '1,2,3,4'
}, },
...@@ -222,7 +224,7 @@ export default { ...@@ -222,7 +224,7 @@ export default {
// params.beginDate = new Date(this.tableSearchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00' // params.beginDate = new Date(this.tableSearchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
// params.endDate = new Date(this.tableSearchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59' // params.endDate = new Date(this.tableSearchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
// } // }
params.merchantChannelId = this.activeName params.merchantChannelId = this.merchantChannelId
return params return params
}, },
...@@ -261,16 +263,16 @@ export default { ...@@ -261,16 +263,16 @@ export default {
//获取频道配置 //获取频道配置
getconfigMerchant() { getconfigMerchant() {
this.$apis.store.getconfigMerchant({ merchantId: this.merchantId }).then(res => { this.$apis.store.getconfigMerchant({ merchantId: this.merchantId }).then(res => {
console.log(res)
res.forEach(item => { res.forEach(item => {
this.tabPaneList.push({ this.tabPaneList.push({
label: item.channelName, label: item.channelName,
name: item.channelType, name: item.channelType,
channelId: item.channelId merchantChannelId: item.id
}) })
}) })
this.SET_MERCHANT_ID({ id: this.merchantId }) this.SET_MERCHANT_ID({ id: this.merchantId })
this.activeName = res[0].channelType this.activeName = res[0].channelType
this.merchantChannelId = res[0].id
this.isFlag = true this.isFlag = true
this.initParams() this.initParams()
}) })
...@@ -278,9 +280,9 @@ export default { ...@@ -278,9 +280,9 @@ export default {
//新增编辑内容 //新增编辑内容
handleAddContent(val) { handleAddContent(val) {
if (val) { if (val) {
this.$router.push(`/store/content?channelId=${this.channelId}&topicId=${val.topicId}&channelType=${this.activeName}`) this.$router.push(`/store/content?merchantChannelId=${this.merchantChannelId}&topicId=${val.topicId}&channelType=${this.activeName}`)
} else { } else {
this.$router.push(`/store/content?channelId=${this.channelId}&channelType=${this.activeName}`) this.$router.push(`/store/content?merchantChannelId=${this.merchantChannelId}&channelType=${this.activeName}`)
} }
}, },
//膜类待配置 //膜类待配置
...@@ -289,13 +291,13 @@ export default { ...@@ -289,13 +291,13 @@ export default {
}, },
handleClick() { handleClick() {
this.tabPaneList.forEach(item => { this.tabPaneList.forEach(item => {
item.name == this.activeName ? (this.channelId = item.channelId) : '' item.name == this.activeName ? (this.merchantChannelId = item.merchantChannelId) : ''
}) })
this.initParams() this.initParams()
this.handleSearch() this.handleSearch()
}, },
handleAdd(scope) { handleAdd(scope) {
this.$router.push(`/channel/add?id=${this.activeName}`) this.$router.push(`/channel/add?merchantChannelId=${this.merchantChannelId}`)
}, },
handleOut(row) { handleOut(row) {
this.secondConfirm('下架', '确定下架此频道主题内容?', 'store', 'updownshelvesChannel', { topicId: row.topicId }) this.secondConfirm('下架', '确定下架此频道主题内容?', 'store', 'updownshelvesChannel', { topicId: row.topicId })
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<el-switch v-model="scope.scope.isOpen" @change="updateState(scope.scope)"></el-switch> <el-switch v-model="scope.scope.isOpen" @change="updateState(scope.scope)"></el-switch>
</template> </template>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handlePreview(scope.scope)">预览</el-button> <!-- <el-button type="text" @click="handlePreview(scope.scope)">预览</el-button> -->
<el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button> <el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button>
<el-button type="text" @click="handleShare(scope.scope)">分享</el-button> <el-button type="text" @click="handleShare(scope.scope)">分享</el-button>
</div> </div>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!