|
|
@@ -131,7 +131,7 @@ export default {
|
|
|
// 选中的管理端模板 id(未使用管理端模板时为 null)
|
|
|
activeTemplateId: null,
|
|
|
// 可选的背景色(渐变模板下展示)
|
|
|
- bgColors: [BrandColors.body, BrandColors.wisdom, BrandColors.wealth, BrandColors.success, BrandColors.mind, '#1E293B', BrandColors.white]
|
|
|
+ bgColors: [BrandColors.body, BrandColors.wisdom, BrandColors.wealth, BrandColors.success, BrandColors.mind, BrandColors.slate800, BrandColors.white]
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -187,10 +187,10 @@ export default {
|
|
|
}
|
|
|
var map = {
|
|
|
body: { main: BrandColors.body, dark: BrandColors.orangeDeep, light: BrandColors.primaryPale },
|
|
|
- mind: { main: BrandColors.mind, dark: '#DB2777', light: '#FDF2F8' },
|
|
|
- wisdom: { main: BrandColors.wisdom, dark: '#4F46E5', light: '#EEF2FF' },
|
|
|
- action: { main: BrandColors.success, dark: '#059669', light: '#ECFDF5' },
|
|
|
- wealth: { main: BrandColors.wealth, dark: '#D97706', light: '#FFFBEB' }
|
|
|
+ mind: { main: BrandColors.mind, dark: BrandColors.pink600, light: BrandColors.pink50 },
|
|
|
+ wisdom: { main: BrandColors.wisdom, dark: BrandColors.indigo600, light: BrandColors.indigo50 },
|
|
|
+ action: { main: BrandColors.success, dark: '#059669', light: BrandColors.emerald50 },
|
|
|
+ wealth: { main: BrandColors.wealth, dark: '#D97706', light: BrandColors.amber50 }
|
|
|
}
|
|
|
return map[this.dimensionCode] || { main: BrandColors.primary, dark: BrandColors.orangeDeep, light: BrandColors.primaryPale }
|
|
|
},
|
|
|
@@ -206,7 +206,7 @@ export default {
|
|
|
// 极简模板:深色背景+白色卡片(管理端模板的 darkColor 作为默认底色)
|
|
|
if (template === 'minimal') {
|
|
|
var tpl = this.getActiveTemplate()
|
|
|
- var dark = tpl ? (bgColor || colors.dark) : (bgColor || '#1E293B')
|
|
|
+ var dark = tpl ? (bgColor || colors.dark) : (bgColor || BrandColors.slate800)
|
|
|
return { template: 'minimal', bgColor: dark, main: colors.main, dark: colors.dark, light: colors.light }
|
|
|
}
|
|
|
// 卡片模板:浅色背景+彩色顶栏
|
|
|
@@ -408,7 +408,7 @@ export default {
|
|
|
ctx.fill()
|
|
|
|
|
|
// 顶部:左侧标题,右侧综合分
|
|
|
- ctx.setFillStyle('#78716C')
|
|
|
+ ctx.setFillStyle(BrandColors.stone500)
|
|
|
ctx.setFontSize(this._fs(13))
|
|
|
ctx.setTextAlign('left')
|
|
|
ctx.setTextBaseline('top')
|
|
|
@@ -420,12 +420,12 @@ export default {
|
|
|
ctx.setFontSize(this._fs(30))
|
|
|
ctx.setTextAlign('right')
|
|
|
ctx.fillText(String(data.overall), x + w - 28, y + 8)
|
|
|
- ctx.setFillStyle('#78716C')
|
|
|
+ ctx.setFillStyle(BrandColors.stone500)
|
|
|
ctx.setFontSize(this._fs(13))
|
|
|
ctx.fillText('分', x + w - 16, y + 28)
|
|
|
}
|
|
|
|
|
|
- ctx.setStrokeStyle('#F5F5F4')
|
|
|
+ ctx.setStrokeStyle(BrandColors.stone100)
|
|
|
ctx.setLineWidth(1)
|
|
|
ctx.beginPath()
|
|
|
ctx.moveTo(x + 16, y + 54)
|
|
|
@@ -453,7 +453,7 @@ export default {
|
|
|
ctx.setTextBaseline('middle')
|
|
|
ctx.fillText(d.label || '', cx, y + 95)
|
|
|
|
|
|
- ctx.setFillStyle('#1C1917')
|
|
|
+ ctx.setFillStyle(BrandColors.stone900)
|
|
|
ctx.setFontSize(this._fs(18))
|
|
|
ctx.setTextBaseline('top')
|
|
|
ctx.fillText(String(score), cx, y + 120)
|
|
|
@@ -462,7 +462,7 @@ export default {
|
|
|
var barH = 4
|
|
|
var barX = cx - barW / 2
|
|
|
var barY = y + 148
|
|
|
- ctx.setFillStyle('#F5F5F4')
|
|
|
+ ctx.setFillStyle(BrandColors.stone100)
|
|
|
this._roundRect(ctx, barX, barY, barW, barH, 2)
|
|
|
ctx.fill()
|
|
|
if (score > 0) {
|
|
|
@@ -472,7 +472,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- ctx.setFillStyle('#A8A29E')
|
|
|
+ ctx.setFillStyle(BrandColors.stone400)
|
|
|
ctx.setFontSize(this._fs(11))
|
|
|
ctx.setTextAlign('center')
|
|
|
ctx.setTextBaseline('top')
|
|
|
@@ -524,7 +524,7 @@ export default {
|
|
|
|
|
|
// 标题(2行截断)
|
|
|
var titleY = labelY + 22
|
|
|
- ctx.setFillStyle('#1C1917')
|
|
|
+ ctx.setFillStyle(BrandColors.stone900)
|
|
|
ctx.setFontSize(this._fs(18))
|
|
|
ctx.setTextAlign('left')
|
|
|
ctx.setTextBaseline('top')
|
|
|
@@ -543,7 +543,7 @@ export default {
|
|
|
// 简介(1-2行灰字;空则跳过)
|
|
|
var summaryY = (this.priceText ? priceY + 34 : priceY)
|
|
|
if (this.summary) {
|
|
|
- ctx.setFillStyle('#78716C')
|
|
|
+ ctx.setFillStyle(BrandColors.stone500)
|
|
|
ctx.setFontSize(this._fs(13))
|
|
|
ctx.setTextAlign('left')
|
|
|
ctx.setTextBaseline('top')
|
|
|
@@ -552,7 +552,7 @@ export default {
|
|
|
|
|
|
// 邀请语(二维码上方)
|
|
|
var inviteY = (this.summary ? summaryY + 48 : summaryY)
|
|
|
- ctx.setFillStyle('#A8A29E')
|
|
|
+ ctx.setFillStyle(BrandColors.stone400)
|
|
|
ctx.setFontSize(this._fs(13))
|
|
|
ctx.setTextAlign('center')
|
|
|
ctx.setTextBaseline('top')
|
|
|
@@ -584,7 +584,7 @@ export default {
|
|
|
self._roundRect(ctx, qrX - 10, qrY - 10, qrSize + 20, qrSize + 20, 8)
|
|
|
ctx.fill()
|
|
|
|
|
|
- ctx.setStrokeStyle('#E7E5E4')
|
|
|
+ ctx.setStrokeStyle(BrandColors.stone200)
|
|
|
ctx.setLineWidth(0.5)
|
|
|
self._roundRect(ctx, qrX - 10, qrY - 10, qrSize + 20, qrSize + 20, 8)
|
|
|
ctx.stroke()
|
|
|
@@ -642,12 +642,12 @@ export default {
|
|
|
this._roundRect(ctx, x - 10, y - 10, size + 20, size + 20, 8)
|
|
|
ctx.fill()
|
|
|
|
|
|
- ctx.setStrokeStyle('#E7E5E4')
|
|
|
+ ctx.setStrokeStyle(BrandColors.stone200)
|
|
|
ctx.setLineWidth(0.5)
|
|
|
this._roundRect(ctx, x - 10, y - 10, size + 20, size + 20, 8)
|
|
|
ctx.stroke()
|
|
|
|
|
|
- ctx.setFillStyle('#A8A29E')
|
|
|
+ ctx.setFillStyle(BrandColors.stone400)
|
|
|
ctx.setFontSize(this._fs(16))
|
|
|
ctx.setTextAlign('center')
|
|
|
ctx.setTextBaseline('middle')
|