Commit c79d5930 by 杨明

fixed

1 parent 70100b4d
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-17 10:56:24
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-20 10:55:46
* @LastEditTime: 2023-05-20 16:55:45
* @FilePath: \scrm-micro-home\src\api\modules\activity.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -90,6 +90,15 @@ const findMerchantDetailByMerchantNo = params => {
returnAll: true
})
}
const getChatGPTList = params => {
return http({
url: 'http://192.168.3.226:18080/openai/title',
method: 'POST',
data: params,
sign: false,
returnAll: false
})
}
export default {
findActivityInfo,
createSuperMarketing,
......@@ -98,5 +107,6 @@ export default {
activityDetail,
getCalendarList,
getCalendarDatail,
findMerchantDetailByMerchantNo
findMerchantDetailByMerchantNo,
getChatGPTList
}
......@@ -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-05-19 15:30:28
* @LastEditTime: 2023-05-20 17:13:46
* @FilePath: \scrm-micro-home\src\mixins\gpt.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -18,6 +18,12 @@ export default {
computed: {
...mapState('marketing', ['keywords'])
},
watch: {
keywords() {
this.t1 = 0;
this.t2 = 0
}
},
methods: {
async getGPTitle(type) {
if (!this.gptList) {
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-07-22 18:15:13
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-20 13:45:58
* @LastEditTime: 2023-05-20 14:13:25
* @FilePath: \scrm-micro-home\src\setup\qiankun.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -33,9 +33,9 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
Vue.prototype.$common = common
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: 'scrm-base-03179a98-58c1-47cb-a75b-1816ef2109d1-rop' } })
Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: ElementUI.Message.error, headers: { token: 'scrm-base-03179a98-58c1-47cb-a75b-1816ef2109d1-rop' } })
Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: 'scrm-base-03179a98-58c1-47cb-a75b-1816ef2109d1-rop' } })
Vue.prototype.$scene = scene
const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData)
......
......@@ -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-05-20 10:56:36
* @LastEditTime: 2023-05-20 17:16:30
* @FilePath: \scrm-micro-home\src\store\modules\marketing.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -21,6 +21,7 @@ export default {
calendarDataAll: [],
schemeList: [],
keywords: '',
GPTList: {},
merchantInfo: {}
},
mutations: {
......@@ -59,7 +60,11 @@ export default {
},
['SET_MERCHANT_INFO'](state, payload) {
state.merchantInfo = payload
},
['SET_GPT_LIST'](state, payload) {
state.GPTList = payload
}
},
actions: {
setCustomDetail({ commit }, data) {
......@@ -79,6 +84,9 @@ export default {
},
setKeyWords({ commit }, data) {
commit('SET_KET_WORDs', data)
apis.activity.getChatGPTList({'req.userPrompt':data}).then(res => {
commit('SET_GPT_LIST', data)
})
},
//营销日历列表
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-16 10:23:52
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-20 13:53:41
* @LastEditTime: 2023-05-20 14:56:16
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\GPTAnalysis.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -660,6 +660,10 @@ export default {
}
})
},
getViewParams() {
const prams = this.getCouponInfoParams()
return { ...prams, selectedEquityList: this.selectedEquityList, couponList: this.editForm.superMarketingCouponRelRequestList, selectedGoodsList: this.selectedGoodsList }
},
getCouponInfoParams() {
var param = this.$common.utils.deepClone(this.editForm)
param.activityPrice = (param.activityPrice * 100).toFixed(0) //存的分,需乘100
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-15 15:08:01
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-20 13:44:41
* @LastEditTime: 2023-05-20 16:16:56
* @FilePath: \scrm-micro-home\src\views\home\components\marketing\MarketingLeft.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -21,7 +21,7 @@
<div class="scheme-line scrm-c3 scrm-f14 flex" :class="{ select: item.hovering }" :key="index" @mouseenter="item.hovering = true" @mouseleave="item.hovering = false">
<div class="scheme-text one-line-ellipsis">{{ item.activityName }}</div>
<div class="flex txt-blue" v-show="item.hovering">
<span class="pointer">预览</span>
<span class="pointer" @click="getView(item)">预览</span>
<span class="scrm-ml6 pointer" @click="setActivity(item)">引用</span>
</div>
</div>
......@@ -47,18 +47,24 @@
</template>
</div>
</div>
<el-dialog title="预览" :append-to-body="true" :visible.sync="dialogVisible" width="30%">
<phone-view :activityInfo="activityInfo"></phone-view>
</el-dialog>
</div>
</template>
<script>
import GlsxCalendar from './components/GlsxCalendar'
import PhoneView from './PhoneView'
import { mapState, mapActions } from 'vuex'
export default {
components: {
GlsxCalendar
GlsxCalendar,
PhoneView
},
data() {
return {
schemeListData: [],
dialogVisible: false,
themeList: [
{
text: '5月定保营销种草',
......@@ -92,12 +98,23 @@ export default {
},
mounted() {
this.getSchemeList()
this.setSchemeListData({ merchantId: this.$globalState.session.merchantId, pageSize: 5, currentPage: 1 }) //44211227
this.setSchemeListData({ merchantId: 44211227, pageSize: 5, currentPage: 1 }) //44211227 this.$globalState.session.merchantId
},
methods: {
...mapActions('marketing', ['setActivityInfo', 'setSchemeListData']),
getView(val) {
this.$apis.activity.findActivityInfo({ activityId: val.id }).then(res => {
if (res) {
this.dialogVisible = true
const activityCoupon = res.activityCouponBaseInfoDTOS || [],
selectedGoodsList = activityCoupon.filter(i => i.discountType == 8),
couponList = activityCoupon.filter(i => i.discountType != 8)
this.activityInfo = { ...res, selectedEquityList: res.serviceMerchantPackageConfigDTOList, couponList, selectedGoodsList }
}
})
},
getSchemeList(val) {
if(!val)return
if (!val) return
this.schemeListData = val.map(item => {
return {
hovering: false,
......
......@@ -2,36 +2,38 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-15 15:08:32
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-19 11:50:44
* @LastEditTime: 2023-05-20 15:51:21
* @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
-->
<template>
<div class="review-box">
<div class="review-title">预览营销方案</div>
<div class="review-body">
<img src="@/assets/img/phone.png" alt="" />
</div>
<phone-view :activityInfo="activityInfo"></phone-view>
<div class="review-refresh" @click="renewImg">更新预览图</div>
</div>
</template>
<script>
import PhoneView from './PhoneView'
export default {
data() {
return {}
return {
activityInfo: {}
}
},
components: {
PhoneView
},
methods: {
renewImg() {
const detail = this.getCouponInfoParams()
console.log(detail)
},
handleSave() {
const _this = this
let children = this.$parent.$children
findComponent(children)
function findComponent(children) {
for (let i = 0; i < children.length; i++) {
if (children[i].$options.componentsName == 'analysis') {
children[i].handleConfirm()
_this.activityInfo = children[i].getViewParams()
console.log(_this.activityInfo)
return
}
if (children[i].$children) {
......@@ -53,13 +55,6 @@ export default {
font-size: 16px;
color: #333333;
}
.review-body {
margin: 10px auto;
width: 100%;
img {
width: 100%;
}
}
.review-refresh {
margin: 18px auto 0px;
width: 274px;
......@@ -72,19 +67,5 @@ export default {
border-radius: 4px;
cursor: pointer;
}
.review-save {
cursor: pointer;
margin: 8px auto;
width: 274px;
height: 36px;
background: #ffffff;
line-height: 36px;
text-align: center;
border: 1px solid #c8c8c8;
border-radius: 4px;
font-size: 14px;
color: #666666;
border-radius: 4px;
}
}
</style>
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-15 15:08:32
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-20 16:31:54
* @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
-->
<template>
<div class="review-body">
<img src="@/assets/img/phone.png" class="review-phone" />
<div class="review-title_top">{{ detail.marketingTitle }}</div>
<div class="review-content">
<div class="review-main">
<div class="review-bg-img">
<img :src="detail.backgroundImage" v-if="detail.backgroundImage"/>
</div>
<div class="review-main-img">
<img :src="detail.detailImage" v-if="detail.detailImage" />
</div>
<div class="review-logo-img">
<img :src="detail.merchantLog" v-if="detail.merchantLog"/>
</div>
</div>
<div class="review-package">
<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="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="service-logo"></div>
<div class="service-desc">
<div class="title">{{ item.brandName }}{{ item.goodsName }}</div>
<div class="content">x{{ item.couponAmount }} 抵扣券</div>
</div>
<div class="service-price">
{{ item.couponAnticipatedCost }}
<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="service-time">{{ discount[item.discountType] }}</div>
<div class="service-title">
<span>{{ item.couponName }}</span>
<span>x{{ item.couponAmount }}</span>
</div>
</div>
</div>
<div class="review-address">
<div class="navigation">
<div class="title">
<div class="title-l">活动举办方</div>
<div class="title-r">
<span>官方合作</span>
<span>品牌授权</span>
</div>
</div>
<div class="address">
<div class="info">
<div class="store">
{{ detail.merchantname }}
</div>
<div class="detail">
{{ detail.merchantAddress }}
</div>
</div>
</div>
</div>
</div>
<div class="review-line">
<img src="https://img02.glsx.com.cn/weapp/resource/miniprogram/expandedGold/service.png" />
<span>服务热线</span>
<i class="el-icon-arrow-right"></i>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
detail: {},
discount: {
2: '折扣券',
3: '代金券',
4: '兑换券',
7: '服务券'
}
}
},
props: {
activityInfo: {
type: Object,
default: () => {}
}
},
watch: {
activityInfo: {
handler(val) {
this.detail = val
},
deep: true
}
}
}
</script>
<style lang="scss" scoped>
.review-body {
margin: 10px auto;
width: 305px;
height: 645px;
position: relative;
.review-phone {
width: 100%;
}
.review-title_top {
position: absolute;
top: 32px;
left: 0px;
width: 100%;
text-align: center;
line-height: 40px;
}
.review-content {
position: absolute;
width: calc(100% - 20px);
height: 535px;
overflow-y: auto;
top: 75px;
left: 12px;
.review-main {
position: relative;
.review-logo-img {
position: absolute;
width: 50px;
height: auto;
top: 10px;
right: 10px;
}
}
.review-package {
background: #ddd8c0;
padding: 16px;
.review-equity,
.review-service,
.review-goods {
background: #ffffff;
border-radius: 12px;
padding: 10px;
margin-bottom: 10px;
}
.service-item {
height: 48px;
background-image: linear-gradient(117deg, #ffead3 3%, #f0ca90 92%);
border-radius: 4px;
display: flex;
align-items: center;
padding: 4px;
margin-top: 5px;
&:first-child {
margin-top: 0px;
}
.service-title {
width: 74%;
height: 40px;
background: #ffffff;
border-radius: 6px;
font-size: 14px;
color: #333333;
line-height: 40px;
padding-left: 12px;
}
.service-time {
color: #8e5310;
text-align: center;
flex: 1;
font-size: 12px;
line-height: 48px;
}
}
.coupon-item {
height: 48px;
background: #fff5f3;
border-radius: 4px;
display: flex;
align-items: center;
padding: 4px;
margin-top: 5px;
&:first-child {
margin-top: 0px;
}
.service-title {
width: 64%;
height: 40px;
background: #ffffff;
border-radius: 6px;
font-size: 14px;
color: #333333;
line-height: 40px;
padding: 0px 12px;
display: flex;
justify-content: space-between;
span {
font-size: 14px;
color: #333333;
&:last-child {
font-size: 11px;
color: #9b9b9b;
}
}
}
.service-time {
color: #fc5b32;
text-align: center;
flex: 1;
font-size: 12px;
line-height: 48px;
}
}
.goods-item {
display: flex;
border-bottom: 1px solid #f8f7f2;
padding: 5px;
&:last-child {
border-bottom: none;
}
.service-logo {
width: 32px;
height: 32px;
margin-right: 10px;
}
.service-desc {
width: 55%;
.title {
font-size: 12px;
color: #111111;
}
.content {
font-size: 11px;
color: #9b9b9b;
}
}
.service-price {
margin-left: auto;
color: #fc5b32;
font-size: 14px;
span {
font-size: 12px;
}
}
}
.review-address {
.title {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
height: 32px;
background: rgba(255, 255, 255, 0.8);
border-radius: 8px 8px 0 0;
padding: 0px 10px;
box-sizing: border-box;
}
.title-l {
font-size: 15px;
color: #333333;
}
.title-r {
font-size: 10px;
color: #9b9b9b;
letter-spacing: 2px;
span {
margin-right: 5px;
}
}
.address {
display: flex;
padding: 10px;
background: #ffffff;
.store {
font-weight: 500;
font-size: 14px;
color: #2c2c2c;
line-height: 20px;
}
.detail {
font-weight: 400;
font-size: 12px;
color: #656566;
margin: 2px 0 8px 0;
}
}
}
.review-line {
color: #999999;
font-size: 12px;
font-weight: 400;
background: #ffffff;
border-radius: 4px;
padding: 14px 10px;
margin: 10px 0px;
box-sizing: border-box;
display: flex;
align-items: center;
img {
width: 36px;
margin-right: 10px;
}
i {
margin-left: auto;
color: #fc643e;
}
}
}
}
}
</style>
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-11 18:32:20
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-20 13:43:34
* @LastEditTime: 2023-05-20 14:14:31
* @FilePath: \scrm-micro-home\src\views\home\marketing.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -59,7 +59,7 @@ export default {
mounted() {
this.getCalendarListData({})
this.getCalendarListDataAll()
this.getMerchantInfo({ merchantId: this.$globalState.session.merchantId })
this.getMerchantInfo({ merchantId: '44211227' })//,this.$globalState.session.merchantId
},
methods: {
...mapActions({
......
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-07-22 18:15:13
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2023-05-15 15:41:06
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-20 16:50:33
* @FilePath: \scrm-micro-home\vue.config.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -11,7 +11,7 @@ const packageName = require('./package.json').name
const node_env = process.env.NODE_ENV === 'production'
const publicPath = node_env ? `/child/${packageName}/` : '/'
const resolve = dir => path.join(__dirname, dir)
const CDN_DOMAIN = 'https://img02.glsx.com.cn/'
const CDN_DOMAIN = 'https://img01.glsx.com.cn/'
const cdn = {
css: [`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`],
js: [`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`, `${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`, `${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`, `${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`, `${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`, 'https://webapi.amap.com/loader.js']
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!