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