Commit b3292252 by 李伟康

修改样式

1 parent 73b5812b

110 KB | W: | H:

118 KB | W: | H:

src/assets/images/order-bg-2.png
src/assets/images/order-bg-2.png
src/assets/images/order-bg-2.png
src/assets/images/order-bg-2.png
  • 2-up
  • Swipe
  • Onion skin

113 KB | W: | H:

115 KB | W: | H:

src/assets/images/order-bg.png
src/assets/images/order-bg.png
src/assets/images/order-bg.png
src/assets/images/order-bg.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
module.exports = { module.exports = {
title: '加载中...', title: '加载中...',
request: { request: {
baseURL: 'http://scrm.test.glsx.com.cn', // 本地测试项目地址, baseURL: 'http://scrm.dev.glsx.com.cn', // 本地测试项目地址,
// 设置超时时间 // 设置超时时间
timeout: 180000, timeout: 180000,
// 携带凭证 // 携带凭证
......
...@@ -45,7 +45,11 @@ export default { ...@@ -45,7 +45,11 @@ export default {
goodsName, goodsName,
createdDate, createdDate,
payPrice, payPrice,
orderStatus orderStatus,
formDescribeFirst,
formContentFirst,
formDescribeSecond,
formContentSecond
} = this.orderInfo } = this.orderInfo
this.ctx = document.getElementById(this.canvasId) this.ctx = document.getElementById(this.canvasId)
let valueX = 95, let valueX = 95,
...@@ -54,7 +58,7 @@ export default { ...@@ -54,7 +58,7 @@ export default {
fontSize = 14, fontSize = 14,
textBaseline = 'top', textBaseline = 'top',
canvasWidth = 337, canvasWidth = 337,
canvasHeight = 422, canvasHeight = 521,
carText = '', carText = '',
labelList = ['姓名:', '手机:'], labelList = ['姓名:', '手机:'],
spacing = 0, spacing = 0,
...@@ -76,19 +80,30 @@ export default { ...@@ -76,19 +80,30 @@ export default {
labelList.push('品牌车型:') labelList.push('品牌车型:')
valueList.push(carText) valueList.push(carText)
} }
labelList = [...labelList, '商品名称:', '支付时间:', '支付定金'] labelList = [...labelList, '商品名称:', '支付时间:']
valueList = [...valueList, goodsName, new Date(createdDate).format('yyyy年M月d日 hh:mm:ss'), `${payPrice}元`] valueList = [...valueList, goodsName, new Date(createdDate).format('yyyy年M月d日 hh:mm:ss')]
if (formContentFirst) {
labelList.push(formDescribeFirst)
valueList.push(formContentFirst)
}
if (formContentSecond) {
labelList.push(formDescribeSecond)
valueList.push(formContentSecond)
}
labelList.push('支付定金')
valueList.push(`${payPrice}元`)
labelList.map((e, index) => { labelList.map((e, index) => {
if (e == '商品名称:' && draw.getTextWidth(carText, fontSize) + valueX > valueEndX) spacing = 24 if (e == '商品名称:' && draw.getTextWidth(carText, fontSize) + valueX > valueEndX) spacing = 24
if (index == labelList.length - 1) textYList.push(352) if (e == formDescribeSecond && draw.getTextWidth(formContentFirst, fontSize) + valueX > valueEndX) spacing += 24
if (index == labelList.length - 1) textYList.push(452)
else textYList.push(index * 32 + 109 + spacing) else textYList.push(index * 32 + 109 + spacing)
}) })
draw.drawImages({ draw.drawImages({
url: require(`@/assets/images/order-bg${orderStatus == 8 ? '-2' : ''}.png`), url: require(`@/assets/images/order-bg${orderStatus == 8 ? '-2' : ''}.png`),
x: 0, x: 0,
y: 0, y: 0,
width: 337, width: canvasWidth,
height: 422, height: canvasHeight,
}, () => { }, () => {
labelList && labelList.length > 0 && (labelList.map((e, index) => { labelList && labelList.length > 0 && (labelList.map((e, index) => {
let y = textYList[index] + 7 let y = textYList[index] + 7
...@@ -109,15 +124,20 @@ export default { ...@@ -109,15 +124,20 @@ export default {
textBaseline, textBaseline,
width: valueEndX width: valueEndX
} }
if (e === '品牌车型:') {
value.lineNum = 2
value.lineHeight = 24
}
if (e === '商品名称:') { if (e === '商品名称:') {
value.color = '#FC5B32' value.color = '#FC5B32'
// value.border = '#FEBAA8' // value.border = '#FEBAA8'
// value.background = '#FFF9F7' // value.background = '#FFF9F7'
} }
if ((formDescribeFirst && e === formDescribeFirst) || (formDescribeSecond && e === formDescribeSecond) || (e === '品牌车型:')) {
value.lineNum = 2
value.lineHeight = 24
if ((formDescribeFirst && e === formDescribeFirst) || (formDescribeSecond && e === formDescribeSecond)) {
label.lineNum = 2
label.lineHeight = 24
label.width = 80
}
}
if (e === '支付定金') { if (e === '支付定金') {
label.color = '#282829' label.color = '#282829'
value.color = orderStatus == 8 ? '#3162E6' : '#F13C3D' value.color = orderStatus == 8 ? '#3162E6' : '#F13C3D'
...@@ -130,9 +150,9 @@ export default { ...@@ -130,9 +150,9 @@ export default {
})) }))
draw.drawLine({ draw.drawLine({
startX: labelX, startX: labelX,
startY: 335, startY: 437,
endX: 320, endX: 320,
endY: 335, endY: 437,
width: 1, width: 1,
color: '#F1F1F1' color: '#F1F1F1'
}) })
......
...@@ -121,7 +121,7 @@ export default { ...@@ -121,7 +121,7 @@ export default {
} }
.content { .content {
position: relative; position: relative;
height: 422px; height: 521px;
.dots { .dots {
bottom: 15px; bottom: 15px;
&-item { &-item {
...@@ -138,13 +138,13 @@ export default { ...@@ -138,13 +138,13 @@ export default {
} }
.img-box { .img-box {
width: 100%; width: 100%;
height: 422px; height: 521px;
/deep/.van-swipe-item { /deep/.van-swipe-item {
width: 347px !important; width: 347px !important;
} }
.img { .img {
width: 337px; width: 337px;
height: 422px; height: 521px;
object-fit: contain; object-fit: contain;
margin-left: 10px; margin-left: 10px;
} }
......
...@@ -88,7 +88,7 @@ export default { ...@@ -88,7 +88,7 @@ export default {
} }
.img { .img {
width: 337px; width: 337px;
height: 422px; height: 521px;
object-fit: contain; object-fit: contain;
} }
.tips { .tips {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!