Commit 7c8b39ba by 杨明

fixed

1 parent fcf3168a
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-06-29 16:16:03
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-12 10:17:48
* @LastEditTime: 2023-07-13 20:52:04
* @FilePath: \scrm-micro-link\src\api\modules\marketing.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -126,9 +126,9 @@ const findMerchantDetailByMerchantNo = params => {
})
}
const registerSso = params => {
params.method = 'scrm.api.busassistant.merchantCustomer.inviteCode'
params.method = 'scrm.api.shopmall.staff.bulge.register'
return http({
url: 'rop-scrm-busassistant/router',
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
......
......@@ -307,4 +307,6 @@ function isShowBtn(value) {
}
return isShowStatus
}
export { equityLevel, isShowBtn, subscribe, giftPackage, limitPrice, getExplorer, exportFn, aToExport, downloadIamge, businessType, orderStatus, orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, statusList, serviceStatusList, memberTypeList, stateList, orderTypesList, orderStatusList, setMinHeight }
const RENEWAL = [1, 2, 3, 4, 5, 6, 7, 8]
const FESTIVAL = [9, 10]
export { RENEWAL, FESTIVAL, equityLevel, isShowBtn, subscribe, giftPackage, limitPrice, getExplorer, exportFn, aToExport, downloadIamge, businessType, orderStatus, orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, statusList, serviceStatusList, memberTypeList, stateList, orderTypesList, orderStatusList, setMinHeight }
......@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-08-13 14:12:11
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-10 16:13:58
* @LastEditTime: 2023-07-13 17:50:52
* @FilePath: \scrm\scrm-sub-blog\src\main.js
*/
import Vue from 'vue'
......@@ -19,6 +19,7 @@ Vue.prototype.$apis = apis
Vue.prototype.size = 'small'
Vue.prototype.defaultLabelWidth = '154px'
Vue.prototype.staticImgUrl = 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/'
Vue.prototype.$vip = 'https://img01.glsx.com.cn/weapp/resource/miniprogram/expandedGold/vip.png'
try {
const loginpath = JSON.parse(sessionStorage.getItem('SCRM_BASE_SESSION'))?.loginpath
if (loginpath === '/oss') Vue.prototype.loginpath = true
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-19 13:46:20
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-10 20:44:37
* @LastEditTime: 2023-07-13 20:14:15
* @FilePath: \scrm-micro-home\src\mixins\gpt.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -29,7 +29,7 @@ export default {
})
},
//主图、内容图、logo合并图片
async createBig(info, logoInfo) {
async createBig(info, logoInfo, titleStyle, subTitleStyle) {
console.log(info)
this.loading = true
const { backgroundImage, detailImage, merchantLog, marketingTitle, marketingSubtitle } = info
......@@ -61,18 +61,8 @@ export default {
].filter(item => item.url)
let textList = [],
title = {
titleStyle: {
x: 82,
y: 224,
fontSize: 52,
color: '#AD604C'
},
subTitleStyle: {
x: 66,
y: 300,
fontSize: 24,
color: '#AD604C'
}
titleStyle,
subTitleStyle
}
if (title) {
marketingTitle.split(' ').forEach((item, index) => {
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-16 17:13:33
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-13 15:37:03
* @LastEditTime: 2023-07-13 19:33:38
* @FilePath: \scrm-micro-home\src\store\modules\marketing.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -91,23 +91,12 @@ export default {
},
getTemplateInfo({ state }, data) {
apis.marketing.calendarDetail({ id: data }).then(res => {
const { title, subTitle, startTime, endTime, backgroundImg, captionImg, codeId, couponItemList = [] } = res || {}
const { title, subTitle, startTime, endTime, backgroundImg, captionImg, codeId, couponItemList = [], subTitleStyle, titleStyle } = res || {}
if (couponItemList && couponItemList.length)
couponItemList.forEach(item => {
item.id = item.couponId
})
state.activityInfo = Object.assign(
{},
{
codeId,
marketingTitle: title,
marketingSubtitle: subTitle,
backgroundImage: backgroundImg,
detailImage: captionImg,
couponItemList,
activityTime: [startTime + ' 00:00:00', endTime + ' 00:00:00']
}
)
state.activityInfo = Object.assign({}, { titleStyle, subTitleStyle, codeId, marketingTitle: title, marketingSubtitle: subTitle, backgroundImage: backgroundImg, detailImage: captionImg, couponItemList, activityTime: [startTime + ' 00:00:00', endTime + ' 00:00:00'] })
})
},
//活动模板详情
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-06-29 21:24:27
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-13 16:29:17
* @LastEditTime: 2023-07-13 20:49:42
* @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
-->
......@@ -39,6 +39,7 @@
import selectInsure from './SelectInsure.vue'
import getUploadImgColor from '@/utils/color'
import { mapState, mapActions } from 'vuex'
import { RENEWAL, FESTIVAL } from '@/common/constant'
export default {
components: {
selectInsure
......@@ -229,13 +230,24 @@ export default {
},
'editForm.backgroundImage'(val) {
getUploadImgColor(val, color => {
this.editForm.mainColor = color
})
if (this.editForm.codeId && RENEWAL.includes(this.editForm.codeId))
getUploadImgColor(val, color => {
this.editForm.mainColor = color
})
},
'editForm.detailImage': {
handler(val) {
console.log(this.editForm.codeId, FESTIVAL.includes(this.editForm.codeId))
if (this.editForm.codeId && FESTIVAL.includes(this.editForm.codeId))
getUploadImgColor(val, color => {
this.editForm.mainColor = color
})
},
immediate: true
},
activityInfo: {
handler(info) {
console.log(Object.keys(info), 9)
handler(val) {
const info = this.$common.utils.deepClone(val)
if (Object.keys(info).length == 0) {
return (this.editForm = {
marketingTitle: '',
......@@ -253,12 +265,12 @@ export default {
} else {
this.editRule.detailImage[0].required = false
}
if (info.title) {
if (info.codeId) {
this.setDetail(info)
return
}
this.editForm = Object.assign({ merchantLog: '' }, this.$common.utils.deepClone(info))
this.editForm = Object.assign({ merchantLog: '' }, info)
if (info.activityName) {
this.$set(this.editForm, 'marketingTitle', info.activityName)
}
......@@ -285,23 +297,21 @@ export default {
methods: {
...mapActions('marketing', ['setProcess', 'getTemplateInfo']),
setDetail(info) {
this.editForm = {}
const { title, subTitle, startTime, endTime, backgroundImg, captionImg, titleStyle, subTitleStyle, codeId, detailImage = '', merchantLog = '' } = this.$common.utils.deepClone(info || {})
this.$nextTick(() => {
this.editForm = {
codeId,
marketingTitle: title,
marketingSubtitle: subTitle,
backgroundImage: backgroundImg,
detailImage: captionImg,
titleStyle: titleStyle,
subTitleStyle: subTitleStyle,
activityTime: [startTime + ' 00:00:00', endTime + ' 00:00:00'],
merchantname: this.merchantInfo.merchantName,
merchantAddress: this.merchantInfo.merchantAddress,
merchantLog
}
})
const { title, subTitle, startTime, endTime, backgroundImg, captionImg, titleStyle, subTitleStyle, codeId } = info
this.editForm = {
codeId,
marketingTitle: title,
marketingSubtitle: subTitle,
backgroundImage: backgroundImg,
detailImage: captionImg,
titleStyle: titleStyle,
subTitleStyle: subTitleStyle,
activityTime: [startTime + ' 00:00:00', endTime + ' 00:00:00'],
merchantname: this.merchantInfo.merchantName,
merchantAddress: this.merchantInfo.merchantAddress,
merchantLog: '',
mainColor: ''
}
},
handleSure(val) {
this.modelVisible = false
......@@ -309,6 +319,7 @@ export default {
},
getCouponInfoParams() {
var param = this.$common.utils.deepClone(this.editForm)
console.log(param)
const d = param.activityTime
if (d && d.length > 0) {
param.starttime = d[0]
......
......@@ -261,7 +261,7 @@ export default {
//邀请人员注册
showRegister() {
this.isQrcodeVisible = true
this.$apis.marketing.registerSso({ staffLabel: 1, merchantId: this.$globalState.session.merchantId }).then(res => {
this.$apis.marketing.registerSso({ merchantId: this.$globalState.session.merchantId }).then(res => {
this.invite = res
})
},
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-15 15:08:32
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-13 15:03:11
* @LastEditTime: 2023-07-13 20:11:55
* @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
-->
......@@ -126,27 +126,27 @@
</div>
</template>
</div>
<div class="review-package" :style="{ background: activityInfo.mainColor }">
<div class="review-equity" v-if="detail.selectedEquityList && detail.selectedEquityList.length">
<div class="service-item" v-for="(item, index) in detail.selectedEquityList" :key="index">
<div class="review-package" :style="{ background: detail.mainColor }">
<div class="review-equity" v-if="detailCoupon.selectedCarList && detailCoupon.selectedCarList.length">
<div class="service-item" v-for="(item, index) in detailCoupon.selectedCarList" :key="index">
<div class="service-time">1年</div>
<div class="service-title">{{ item.packageName }}</div>
</div>
</div>
<div class="review-goods" v-if="detail.selectedGoodsList && detail.selectedGoodsList.length">
<div class="goods-item" v-for="(item, index) in detail.selectedGoodsList" :key="index">
<div class="review-goods" v-if="detailCoupon.selectedGoodsList && detailCoupon.selectedGoodsList.length">
<div class="goods-item" v-for="(item, index) in detailCoupon.selectedGoodsList" :key="index">
<div class="service-desc">
<div class="title">{{ item.brandName }}{{ item.goodsName }}</div>
<div class="content">x1 抵扣券</div>
</div>
<div class="service-price">
{{ item.couponAnticipatedCost || item.denomination }}
{{ formatPrice(item.couponAnticipatedCost || item.denomination) }}
<span>元</span>
</div>
</div>
</div>
<div class="review-service" v-if="detail.couponList && detail.couponList.length">
<div class="coupon-item" v-for="(item, index) in detail.couponList" :key="index">
<div class="review-service" v-if="detailCoupon.selectedServiceList && detailCoupon.selectedServiceList.length">
<div class="coupon-item" v-for="(item, index) in detailCoupon.selectedServiceList" :key="index">
<div class="service-time">{{ discount[item.discountType] }}</div>
<div class="service-title">
<span>{{ item.couponName }}</span>
......@@ -257,6 +257,7 @@ export default {
},
logoInfo: {},
textList: [],
detailCoupon: {},
discount: {
2: '折扣券',
3: '代金券',
......@@ -296,6 +297,7 @@ export default {
},
mounted() {
this.$nextTick(() => {
if (!this.activityInfo.id) return
this.detail = this.activityInfo
this.detailCoupon = this.detail
this.isFestival = false
......@@ -323,6 +325,7 @@ export default {
handler(val) {
this.detail = { ...this.detail, ...val[2] }
this.detailCoupon = this.$common.utils.deepClone(this.packageList)
console.log(this.detailCoupon)
this.$nextTick(async () => {
this.isFestival = false
this.isRenewal = false
......@@ -335,12 +338,27 @@ export default {
const style1 = JSON.parse(this.detail.titleStyle)
const style2 = JSON.parse(this.detail.subTitleStyle)
Object.assign(this.draggableList[0], { content: this.detail.marketingTitle, ...style1, color: style1.style.color, font: style1.font })
Object.assign(this.draggableList[1], { content: this.detail.marketingSubtitle, ...style1, color: style2.style.color, font: style2.font })
Object.assign(this.draggableList[1], { content: this.detail.marketingSubtitle, ...style2, color: style2.style.color, font: style2.font })
} catch (e) {
console.log(e)
}
}
if (FESTIVAL.includes(this.detail.codeId)) {
const style1 = JSON.parse(this.detail.titleStyle)
const style2 = JSON.parse(this.detail.subTitleStyle)
this.textList = []
this.detail.marketingTitle.split(' ').forEach((item, index) => {
this.textList.push({
...style1,
text: item
})
})
new Array(this.detail.marketingSubtitle).forEach((item, index) => {
this.textList.push({
...style2,
text: item
})
})
this.isFestival = true
this.logoInfo = await this.getImgWH(this.detail.merchantLog)
}
......@@ -351,6 +369,9 @@ export default {
}
},
methods: {
formatPrice(val) {
return (val / 100).toFixed(2).replace(/\.[0]+$/, '')
},
//获取图片宽度高度
getImgH(src) {
return new Promise(resolve => {
......
......@@ -69,7 +69,7 @@ export default {
this.loading = true
const {
backgroundHeight,
detail: { backgroundImage },
detail: { backgroundImage, titleStyle, subTitleStyle },
draggableList
} = this.$refs.viewForm
let url = backgroundImage
......@@ -77,7 +77,7 @@ export default {
url = await this.createMain(backgroundHeight, backgroundImage, draggableList)
}
if (FESTIVAL.includes(params.codeId)) {
url = await this.createBig(this.$refs.viewForm.detail, this.logoInfo, draggableList)
url = await this.createBig(this.$refs.viewForm.detail, this.logoInfo, JSON.parse(titleStyle), JSON.parse(subTitleStyle))
}
let origin = 'createSuperMarketing'
if (params.id) {
......
......@@ -53,7 +53,7 @@ import { mapActions, mapMutations, mapState } from 'vuex'
export default {
data() {
return {
routeInfo: {},
addOrEdit: this.$route.query.addOrEdit,
qrCode: '',
tabList: [
{ label: '保险', type: 5 },
......@@ -65,6 +65,7 @@ export default {
selectItem: {},
festivalList: [],
currentIndex: 5,
isInit: true,
sceneList: [
{
title: '运营陪跑',
......@@ -94,22 +95,31 @@ export default {
}
},
mounted() {
const routeInfo = this.$route.query
this.calendarPage()
this.EntWechatQrCode()
if (this.$route.query.addOrEdit == 'edit') {
this.getActivityInfo(this.$route.query.id)
if (routeInfo.addOrEdit == 'edit') {
this.getActivityInfo(routeInfo.id)
this.sceneList[1].content = '编辑无法再次导入客群'
} else {
this.setSubscribe(this.routeInfo.subscribe ? this.routeInfo.subscribe : this.currentIndex)
this.setSubscribe(routeInfo.subscribe)
this.tabList.splice(3, 1)
}
},
computed: {
...mapState('marketing', ['subscribe', 'addOrEdit'])
...mapState('marketing', ['subscribe', 'activityInfo'])
},
watch: {
subscribe(val) {
this.currentIndex = val
},
activityInfo: {
handler(info) {
if (Object.keys(info).length == 0) {
this.selectItem = {}
}
},
deep: true
}
},
methods: {
......@@ -117,6 +127,8 @@ export default {
...mapMutations('marketing', ['SET_INIT', 'SET_STEP', 'SET_ACTIVITY_INFO']),
selectFes(item) {
this.selectItem = item
this.getTemplateInfo(this.selectItem.id)
this.setSubscribe({ subscribe: 6, keywords: this.selectItem.keywords })
},
handleStep(index) {
if (this.addOrEdit == 'edit' && index == 1) return
......@@ -133,6 +145,7 @@ export default {
this.setSubscribe(index)
this.SET_ACTIVITY_INFO({})
} else {
this.selectItem = this.festivalList[0]
this.getTemplateInfo(this.selectItem.id)
this.setSubscribe({ subscribe: 6, keywords: this.selectItem.keywords })
}
......@@ -145,7 +158,6 @@ export default {
calendarPage() {
this.$apis.marketing.calendarPage({ pageSize: 100, pageNum: 1 }).then(res => {
this.festivalList = (res.data || []).filter(item => item.marketingType == 6)
this.selectItem = this.festivalList[0]
})
}
}
......
......@@ -7,7 +7,9 @@
<img class="xing " src="https://img02.glsx.com.cn/weapp/resource/miniprogram/expandedGold/xing_2.png?v=1.0.2" />
</div>
<div class="service-item" v-for="(item, index) in serviceList" :key="index">
<div class="service-logo"></div>
<div class="service-logo">
<img :src="item.goodsImage || $vip" alt="" />
</div>
<div class="service-desc">
<div class="service-title">{{ item.brandName }}{{ item.goodsName }}</div>
<div class="service-content">x1 抵扣券</div>
......@@ -112,6 +114,10 @@ export default {
width: 24px;
height: 24px;
margin-right: 10px;
img {
width: 24px;
height: 24px;
}
}
.service-desc {
......
......@@ -3,7 +3,9 @@
<div class="container-panel">
<img class="header-panel" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/expandedGold/model_4/delivery.png" />
<div class="service-item" v-for="(item, index) in serviceList" :key="index">
<div class="service-logo"></div>
<div class="service-logo">
<img :src="item.goodsImage || $vip" alt="" />
</div>
<div class="service-desc">
<div class="service-title">{{ item.brandName }}{{ item.goodsName }}</div>
<div class="service-content">x1 抵扣券</div>
......@@ -88,6 +90,10 @@ export default {
width: 28px;
height: 28px;
margin-right: 8px;
img {
width: 28px;
height: 28px;
}
}
.service-desc {
......
......@@ -7,7 +7,9 @@
<div class="service-panel-bg"></div>
<div class="service-panel-box">
<div class="service-item" v-for="(item, index) in serviceList" :key="index">
<div class="service-logo"></div>
<div class="service-logo">
<img :src="item.goodsImage || $vip" alt="" />
</div>
<div class="service-desc">
<div class="service-title">{{ item.brandName }}{{ item.goodsName }}</div>
<div class="service-content">x1 抵扣券</div>
......@@ -82,11 +84,11 @@ export default {
}
.header-panel {
position: absolute;
width: 249px;
height: 121px;
top: -58px;
left: -6px;
z-index: -4;
width: 249px;
height: 121px;
top: -58px;
left: -6px;
z-index: -4;
}
&-bg {
position: absolute;
......@@ -123,6 +125,10 @@ export default {
width: 25px;
height: 25px;
margin-right: 6px;
img {
width: 25px;
height: 25px;
}
}
.service-desc {
......
......@@ -3,7 +3,9 @@
<div class="container-panel">
<img class="header-panel" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/expandedGold/model_8/deliver.png" />
<div class="service-item" v-for="(item, index) in serviceList" :key="index">
<div class="service-logo"></div>
<div class="service-logo">
<img :src="item.goodsImage || $vip" alt="" />
</div>
<div class="service-desc">
<div class="service-title ellipsis-1">{{ item.brandName }}{{ item.goodsName }}</div>
<div class="service-content">x1 抵扣券</div>
......@@ -69,7 +71,7 @@ export default {
left: 50%;
transform: translateX(-50%);
width: 160px;
height: 36px;
height: 36px;
}
.service-item {
......@@ -88,6 +90,10 @@ export default {
width: 20px;
height: 20px;
margin-right: 8px;
img {
width: 20px;
height: 20px;
}
}
.service-desc {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!