Commit 8b47ae89 by 前端

Merge branch 'v3.16.0' into 'master'

V3.16.0

See merge request !15
2 parents 72623d22 e12ac8fb
...@@ -20,12 +20,6 @@ Vue.prototype.size = 'small' ...@@ -20,12 +20,6 @@ Vue.prototype.size = 'small'
Vue.prototype.defaultLabelWidth = '154px' Vue.prototype.defaultLabelWidth = '154px'
Vue.prototype.staticImgUrl = 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/' 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' 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
} catch (e) {
console.log(e)
}
start() start()
export { bootstrap, mount, unmount } from '@/setup' export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params) export const http = params => Vue.prototype.$http(params)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-19 13:46:20 * @Date: 2023-05-19 13:46:20
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-20 17:40:13 * @LastEditTime: 2023-08-30 18:11:11
* @FilePath: \scrm-micro-home\src\mixins\gpt.js * @FilePath: \scrm-micro-home\src\mixins\gpt.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
*/ */
...@@ -119,8 +119,8 @@ export default { ...@@ -119,8 +119,8 @@ export default {
imageList.push({ ...info.logoInfo, url: info.merchantLogo }) imageList.push({ ...info.logoInfo, url: info.merchantLogo })
} }
const textList = [ const textList = [
{ x: style1.x, y: style1.y, fontSize: style1.size, width: style1.width, text: style1.content, color: style1.color, font: style1.font }, { x: style1.x, y: style1.y, fontSize: style1.size, width: style1.width, text: style1.content, color: style1.color, font: style1.font, shadow: style1.shadow },
{ x: style2.x, y: style2.y, fontSize: style2.size, width: style2.width, text: style2.content, color: style2.color, font: style2.font } { x: style2.x, y: style2.y, fontSize: style2.size, width: style2.width, text: style2.content, color: style2.color, font: style2.font, shadow: style2.shadow }
] ]
console.log(imageList, textList) console.log(imageList, textList)
const canvasBase64 = await drawfun.begin({ const canvasBase64 = await drawfun.begin({
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-12-13 09:23:57 * @Date: 2022-12-13 09:23:57
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-19 17:32:17 * @LastEditTime: 2023-08-24 10:20:34
* @FilePath: \scrm-micro-link\src\setup\qiankun.js * @FilePath: \scrm-micro-link\src\setup\qiankun.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
*/ */
...@@ -24,6 +24,12 @@ export async function bootstrap({ history, common, messenger, globalState }) { ...@@ -24,6 +24,12 @@ export async function bootstrap({ history, common, messenger, globalState }) {
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
try {
Vue.prototype.loginpath = globalState.session.loginList[0].products[0].productName.includes('运营版')
} catch (error) {
console.log(error)
}
Vue.prototype.$common = common Vue.prototype.$common = common
Vue.prototype.$message = message Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox Vue.prototype.$messageBox = messageBox
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-17 16:07:55 * @Date: 2023-05-17 16:07:55
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-16 15:11:28 * @LastEditTime: 2023-08-30 18:18:33
* @FilePath: \scrm-micro-home\src\utils\drawing.js * @FilePath: \scrm-micro-home\src\utils\drawing.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
*/ */
...@@ -43,10 +43,17 @@ class Drawing { ...@@ -43,10 +43,17 @@ class Drawing {
return this.pixelRatio * val return this.pixelRatio * val
} }
drawText(textParams) { drawText(textParams) {
let { fontSize, color, text, x, y, bold, font } = textParams let { fontSize, color, text, x, y, bold, font, shadow } = textParams
fontSize = this.toRpx(fontSize) fontSize = this.toRpx(fontSize)
x = this.toRpx(x) x = this.toRpx(x)
y = this.toRpx(y) y = this.toRpx(y)
if (shadow) {
const arr = shadow.split(' ').filter(item => item)
this.ctx.shadowOffsetX = this.toRpx(arr[0].match(/\d+/)[0]) //在X轴偏移值
this.ctx.shadowOffsetY = this.toRpx(arr[1].match(/\d+/)[0]) //在Y轴偏移值
this.ctx.shadowBlur = this.toRpx(arr[2].match(/\d+/)[0]) //阴影模糊程度
this.ctx.shadowColor = arr[3] //必填
}
this.ctx.font = `${bold ? 'bold ' : ''}${fontSize}px ${font}` this.ctx.font = `${bold ? 'bold ' : ''}${fontSize}px ${font}`
this.ctx.fillStyle = color this.ctx.fillStyle = color
this.ctx.textAlign = 'center' this.ctx.textAlign = 'center'
......
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
<el-radio :label="item.id" v-for="item in giftList" :key="item.id">{{ item.name }}(成本:{{ item.totalEquityPrice || 0 }})</el-radio> <el-radio :label="item.id" v-for="item in giftList" :key="item.id">{{ item.name }}(成本:{{ item.totalEquityPrice || 0 }})</el-radio>
</el-radio-group> </el-radio-group>
<div class="choseRow"> <div class="choseRow">
<div class="choseItem" :class="{ active: currentIndex == index + 1 }" v-for="(item, index) in tabList" :key="index" @click="tabClick(index + 1)">{{ item.label }}</div> <div class="choseItem" :class="{ active: currentIndex == index + 1 }" v-for="(item, index) in tabList" :key="index" @click="tabClick(index + 1)">
{{ item.label }}
</div>
</div> </div>
<div class="gift-table"> <div class="gift-table">
<div class="goods-panel"> <div class="goods-panel">
...@@ -26,10 +28,12 @@ ...@@ -26,10 +28,12 @@
</div> </div>
<div v-show="currentIndex == 2"> <div v-show="currentIndex == 2">
<div class="select-tab"> <div class="select-tab">
<div class="tab-item" :class="{ active: goodsIndex == item.type }" v-for="(item, index) in goodsTabList" :key="index" @click="goodsIndex = item.type">{{ item.label }}</div> <div class="tab-item" :class="{ active: goodsIndex == item.type }" v-for="(item, index) in goodsTabList" :key="index" @click="goodsIndex = item.type">
{{ item.label }}
</div>
<div class="tab-border" :style="{ left: (goodsIndex - 1) * 61 + 2 + 'px' }"></div> <div class="tab-border" :style="{ left: (goodsIndex - 1) * 61 + 2 + 'px' }"></div>
</div> </div>
<glsx-combi-form :isEdit="false" labelWidth="70px" class="p-16" style="padding-bottom: 0px;" ref="showSearch" :formObj="searchForm[goodsIndex - 1]" :formData="searchFormData"> <glsx-combi-form :isEdit="false" labelWidth="70px" class="p-16" style="padding-bottom: 0px" ref="showSearch" :formObj="searchForm[goodsIndex - 1]" :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>
<el-button :size="size" @click="handleReset">重置</el-button> <el-button :size="size" @click="handleReset">重置</el-button>
...@@ -41,8 +45,15 @@ ...@@ -41,8 +45,15 @@
</div> </div>
<div v-show="currentIndex == 3"> <div v-show="currentIndex == 3">
<div class="service-tab"> <div class="service-tab">
<div class="tab-item" :class="{ active: serviceIndex == item.type }" v-for="(item, index) in serviceTabList" :key="index" @click="serviceIndex = item.type">{{ item.label }}</div> <div class="tab-item" :class="{ active: serviceIndex == item.type }" v-for="(item, index) in serviceTabList" :key="index" @click="serviceIndex = item.type">
<div class="tab-border" :style="{ left: (serviceIndex == 7 ? 0 : serviceIndex - 1) * 88 + 2 + 'px' }"></div> {{ item.label }}
</div>
<div
class="tab-border"
:style="{
left: (serviceIndex == 7 ? 0 : serviceIndex - 1) * 88 + 2 + 'px'
}"
></div>
<div class="service-tip">(仅支持引用无限库存券)</div> <div class="service-tip">(仅支持引用无限库存券)</div>
<div class="tab-right"> <div class="tab-right">
<div class="refresh-btn" @click="getList"> <div class="refresh-btn" @click="getList">
...@@ -319,13 +330,22 @@ export default { ...@@ -319,13 +330,22 @@ export default {
for (let i = 0; i < selectedCarList.length; i++) { for (let i = 0; i < selectedCarList.length; i++) {
this.totalPrice = this.totalPrice + parseFloat(selectedCarList[i].packageAmount || 0) this.totalPrice = this.totalPrice + parseFloat(selectedCarList[i].packageAmount || 0)
} }
this.setPackage(Object.assign({}, { selectedServiceList: this.$common.utils.deepClone(this.selectedServiceList), selectedCarList: this.$common.utils.deepClone(selectedCarList), selectedGoodsList: this.$common.utils.deepClone(this.selectedGoodsList) })) this.setPackage(
Object.assign(
{},
{
selectedServiceList: this.$common.utils.deepClone(this.selectedServiceList),
selectedCarList: this.$common.utils.deepClone(selectedCarList),
selectedGoodsList: this.$common.utils.deepClone(this.selectedGoodsList)
}
)
)
const selectedGoodsList = [...this.selectedGoodsList, ...this.selectedServiceList].map(item => { const selectedGoodsList = [...this.selectedGoodsList, ...this.selectedServiceList].map(item => {
console.log(item) console.log(item)
return { return {
couponId: item.id, couponId: item.id,
couponAmount: 1, couponAmount: 1,
couponAnticipatedCost: item.denomination couponAnticipatedCost: item.denomination || item.anticipatedCost
} }
}) })
const serviceMerchantPackageConfigDTOS = selectedCarList.map(i => { const serviceMerchantPackageConfigDTOS = selectedCarList.map(i => {
...@@ -528,7 +548,10 @@ export default { ...@@ -528,7 +548,10 @@ export default {
async getCarList() { async getCarList() {
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
})
equities = JSON.parse(res.equities) equities = JSON.parse(res.equities)
} }
var params = { var params = {
......
...@@ -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-08-09 15:34:15 * @LastEditTime: 2023-08-31 11:00:31
* @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
--> -->
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
:style="{ :style="{
'font-size': item.size + 'px', 'font-size': item.size + 'px',
'font-family': item.font, 'font-family': item.font,
'text-shadow': item.shadow,
color: item.color color: item.color
}" }"
class="img_cl" class="img_cl"
...@@ -464,27 +465,38 @@ export default { ...@@ -464,27 +465,38 @@ export default {
for (const style of styles) { for (const style of styles) {
style.x = parseInt(style.x * RATIO) style.x = parseInt(style.x * RATIO)
style.y = parseInt(style.y * RATIO) style.y = parseInt(style.y * RATIO)
style.size = parseInt(style.size * RATIO) style.size = +(style.size * RATIO.toFixed(2))
style.width = parseInt(style.width * RATIO) style.width = parseInt(style.width * RATIO)
} }
Object.assign(this.draggableList[0], { content: this.detail.marketingTitle, ...style1, width: this.detail.marketingTitle.length * (style1.size + 0.5), color: style1.style.color, font: style1.font, height: 'auto' }) const fontObj = {
Object.assign(this.draggableList[1], { content: this.detail.marketingSubtitle, ...style2, width: this.detail.marketingSubtitle.length * (style2.size + 0.5), color: style2.style.color, font: style2.font, height: 'auto' }) jingnanyuanmoti: 1.1,
YouSheBiaoTiYuan: 1.4
}
Object.assign(this.draggableList[0], { content: this.detail.marketingTitle, ...style1, width: this.detail.marketingTitle.length * (style1.size * fontObj[style1.font]), color: style1.style.color, font: style1.font, height: 'auto', shadow: style1.style['text-shadow'] })
Object.assign(this.draggableList[1], { content: this.detail.marketingSubtitle, ...style2, width: this.detail.marketingSubtitle.length * (style2.size * fontObj[style2.font]), color: style2.style.color, font: style2.font, height: 'auto', shadow: style2.style['text-shadow'] })
setTimeout(() => { setTimeout(() => {
const textDom = document.querySelectorAll('.img_cl') const textDom = document.querySelectorAll('.img_cl')
textDom.forEach(item => { textDom.forEach(async item => {
let fontSize = this.getPropSize(item, 'font-size') const reduceSize = () => {
let height = this.getPropSize(item, 'height') let fontSize = this.getPropSize(item, 'font-size')
let content = item.textContent.trim() let height = this.getPropSize(item, 'height')
let len = parseInt(content.length) let content = item.textContent.trim()
if (height > fontSize + 5) { if (height > fontSize + 5) {
fontSize -= len fontSize -= 3
} }
if (content == this.detail.marketingTitle) { if (content == this.detail.marketingTitle) {
Object.assign(this.draggableList[0], { size: fontSize, height: 'auto', width: content.length * (fontSize + 0.5) }) Object.assign(this.draggableList[0], { size: fontSize, height: 'auto', width: content.length * (fontSize * fontObj[this.draggableList[0].font]) })
} }
if (content == this.detail.marketingSubtitle) { if (content == this.detail.marketingSubtitle) {
Object.assign(this.draggableList[1], { size: fontSize, height: 'auto', width: content.length * (fontSize + 0.5) }) Object.assign(this.draggableList[1], { size: fontSize, height: 'auto', width: content.length * (fontSize * fontObj[this.draggableList[1].font]) })
}
setTimeout(() => {
if (this.getPropSize(item, 'height') > this.getPropSize(item, 'font-size') + 5) {
reduceSize()
}
}, 300)
} }
reduceSize()
}) })
}, 300) }, 300)
} }
......
...@@ -150,7 +150,7 @@ export default { ...@@ -150,7 +150,7 @@ export default {
for (const style of styles) { for (const style of styles) {
style.x = parseInt(style.x * RATIO) style.x = parseInt(style.x * RATIO)
style.y = parseInt(style.y * RATIO) style.y = parseInt(style.y * RATIO)
style.size = parseInt(style.size * RATIO) style.size = +(style.size * RATIO.toFixed(2))
style.width = parseInt(style.width * RATIO) style.width = parseInt(style.width * RATIO)
} }
params.titleStyle = JSON.stringify(Object.assign(titleStyle, { x: style1.x, y: style1.y, size: style1.size, width: style1.width })) params.titleStyle = JSON.stringify(Object.assign(titleStyle, { x: style1.x, y: style1.y, size: style1.size, width: style1.width }))
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<div class="service-panel-box"> <div class="service-panel-box">
<div class="service-item" v-for="(item, index) in serviceList" :key="index"> <div class="service-item" v-for="(item, index) in serviceList" :key="index">
<div class="service-time"> <div class="service-time">
1 {{ item.packageAmount }}
<span>元</span> <span>元</span>
</div> </div>
<div class="service-title">{{ item.packageName || item.serviceName }}</div> <div class="service-title">{{ item.packageName || item.serviceName }}</div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-07-08 09:40:45 * @Date: 2023-07-08 09:40:45
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-08-09 15:26:22 * @LastEditTime: 2023-08-30 16:51:19
* @FilePath: \scrm-micro-link\src\views\activityLink\components\model\model_4\equity\index.vue * @FilePath: \scrm-micro-link\src\views\activityLink\components\model\model_4\equity\index.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
--> -->
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<img class="header-panel" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/expandedGold/model_8/rob.png" /> <img class="header-panel" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/expandedGold/model_8/rob.png" />
<div class="service-item" v-for="(item, index) in serviceList" :key="index"> <div class="service-item" v-for="(item, index) in serviceList" :key="index">
<div class="service-time"> <div class="service-time">
1 {{ item.packageAmount }}
<sapn>元</sapn> <sapn>元</sapn>
</div> </div>
<div class="service-title">{{ item.packageName || item.serviceName }}</div> <div class="service-title">{{ item.packageName || item.serviceName }}</div>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!