Commit fcf3168a by 杨明

fixed

1 parent ae881105
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-16 17:13:33 * @Date: 2023-05-16 17:13:33
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-12 11:25:34 * @LastEditTime: 2023-07-13 15:37:03
* @FilePath: \scrm-micro-home\src\store\modules\marketing.js * @FilePath: \scrm-micro-home\src\store\modules\marketing.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-06-29 21:24:27 * @Date: 2023-06-29 21:24:27
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-13 11:09:28 * @LastEditTime: 2023-07-13 16:29:17
* @FilePath: \scrm-micro-link\src\views\activityLink\components\MarketingContent.vue * @FilePath: \scrm-micro-link\src\views\activityLink\components\MarketingContent.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -209,7 +209,7 @@ export default { ...@@ -209,7 +209,7 @@ export default {
deep: true deep: true
}, },
subscribe(val) { subscribe(val) {
if (val == 5) { if (val == 5 && this.$route.query.addOrEdit == 'add') {
this.editFormData[0].isHide = false this.editFormData[0].isHide = false
} else { } else {
this.editFormData[0].isHide = true this.editFormData[0].isHide = true
...@@ -217,6 +217,7 @@ export default { ...@@ -217,6 +217,7 @@ export default {
}, },
merchantInfo: { merchantInfo: {
handler(val) { handler(val) {
if (this.$route.query.addOrEdit == 'edit') return
if (!this.editForm.merchantname) { if (!this.editForm.merchantname) {
this.editForm.merchantname = val.merchantName this.editForm.merchantname = val.merchantName
} }
...@@ -234,6 +235,7 @@ export default { ...@@ -234,6 +235,7 @@ export default {
}, },
activityInfo: { activityInfo: {
handler(info) { handler(info) {
console.log(Object.keys(info), 9)
if (Object.keys(info).length == 0) { if (Object.keys(info).length == 0) {
return (this.editForm = { return (this.editForm = {
marketingTitle: '', marketingTitle: '',
...@@ -251,7 +253,7 @@ export default { ...@@ -251,7 +253,7 @@ export default {
} else { } else {
this.editRule.detailImage[0].required = false this.editRule.detailImage[0].required = false
} }
if (info.subTitle) { if (info.title) {
this.setDetail(info) this.setDetail(info)
return return
} }
...@@ -283,15 +285,23 @@ export default { ...@@ -283,15 +285,23 @@ export default {
methods: { methods: {
...mapActions('marketing', ['setProcess', 'getTemplateInfo']), ...mapActions('marketing', ['setProcess', 'getTemplateInfo']),
setDetail(info) { setDetail(info) {
const { title, subTitle, startTime, endTime, backgroundImg, captionImg, titleStyle, subTitleStyle, codeId } = this.$common.utils.deepClone(info || {}) this.editForm = {}
this.editForm.codeId = codeId const { title, subTitle, startTime, endTime, backgroundImg, captionImg, titleStyle, subTitleStyle, codeId, detailImage = '', merchantLog = '' } = this.$common.utils.deepClone(info || {})
this.editForm.marketingTitle = title this.$nextTick(() => {
this.editForm.marketingSubtitle = subTitle this.editForm = {
this.editForm.backgroundImage = backgroundImg codeId,
this.editForm.detailImage = captionImg marketingTitle: title,
this.editForm.titleStyle = titleStyle marketingSubtitle: subTitle,
this.editForm.subTitleStyle = subTitleStyle backgroundImage: backgroundImg,
this.editForm.activityTime = [startTime + ' 00:00:00', endTime + ' 00:00:00'] detailImage: captionImg,
titleStyle: titleStyle,
subTitleStyle: subTitleStyle,
activityTime: [startTime + ' 00:00:00', endTime + ' 00:00:00'],
merchantname: this.merchantInfo.merchantName,
merchantAddress: this.merchantInfo.merchantAddress,
merchantLog
}
})
}, },
handleSure(val) { handleSure(val) {
this.modelVisible = false this.modelVisible = false
......
...@@ -95,7 +95,7 @@ export default { ...@@ -95,7 +95,7 @@ export default {
data() { data() {
return { return {
isInit: true, isInit: this.$route.query.addOrEdit == 'add',
giftValue: '', giftValue: '',
editForm: { editForm: {
giftList: 1, giftList: 1,
...@@ -381,7 +381,6 @@ export default { ...@@ -381,7 +381,6 @@ export default {
}, },
//用车权益 //用车权益
async getCarList() { async getCarList() {
console.log(this.selectedCarList)
let equities = {} let equities = {}
if (this.isInit) { if (this.isInit) {
let res = await this.$apis.giftBag.packageDefault({ merchantId: this.merchantId, activitySubscribe: this.subscribe }) let res = await this.$apis.giftBag.packageDefault({ merchantId: this.merchantId, activitySubscribe: this.subscribe })
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-15 15:08:32 * @Date: 2023-05-15 15:08:32
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-13 14:46:57 * @LastEditTime: 2023-07-13 15:03:11
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\MarketingRight.vue * @FilePath: \scrm-micro-home\src\views\home\components\Marketing\MarketingRight.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -298,7 +298,6 @@ export default { ...@@ -298,7 +298,6 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.detail = this.activityInfo this.detail = this.activityInfo
this.detailCoupon = this.detail this.detailCoupon = this.detail
console.log(this.activityInfo, 888, this.detail)
this.isFestival = false this.isFestival = false
this.isRenewal = false this.isRenewal = false
if (!this.detail) return if (!this.detail) return
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!