|
|
@@ -190,15 +190,16 @@ Page({ |
|
|
|
this.drawNormalText(ctx, "适用门店:", 30 * scale, 348 * scale, 16 * scale, "#000", "left", "middle", scale); |
|
|
|
|
|
|
|
//适用门店字体的排列 |
|
|
|
for (let i = 0; i < that.data.data.merchantVoList.length;i++){ |
|
|
|
let width0=ctx.measureText(that.data.data.merchantVoList[0].merchantName).width |
|
|
|
let width1=ctx.measureText(that.data.data.merchantVoList[1].merchantName).width |
|
|
|
for (let i = 0; i < that.data.data.merchantVoList.length;i++){ |
|
|
|
if(i==0){ |
|
|
|
that.drawNormalText(ctx, that.data.data.merchantVoList[i].merchantName+"、", 30, 375 * scale, 14 * scale, "#000", "left", "middle", scale); |
|
|
|
that.drawNormalText(ctx, that.data.data.merchantVoList[i].merchantName, 30, 375 * scale, 14 * scale, "#000", "left", "middle", scale); |
|
|
|
}else if(i==1){ |
|
|
|
that.drawNormalText(ctx, that.data.data.merchantVoList[i].merchantName+"、", (width0+35)*scale, 375 * scale, 14 * scale, "#000", "left", "middle", scale); |
|
|
|
let width0=ctx.measureText(that.data.data.merchantVoList[0].merchantName).width |
|
|
|
that.drawNormalText(ctx, that.data.data.merchantVoList[i].merchantName, (width0+40)*scale, 375 * scale, 14 * scale, "#000", "left", "middle", scale); |
|
|
|
}else if(i==2){ |
|
|
|
that.drawNormalText(ctx, that.data.data.merchantVoList[i].merchantName+"..", (width1+width0+40)*scale, 375 * scale, 14 * scale, "#000", "left", "middle", scale); |
|
|
|
let width0=ctx.measureText(that.data.data.merchantVoList[0].merchantName).width |
|
|
|
let width1=ctx.measureText(that.data.data.merchantVoList[1].merchantName).width |
|
|
|
that.drawNormalText(ctx, that.data.data.merchantVoList[i].merchantName+"...", (width1+width0+45)*scale, 375 * scale, 14 * scale, "#000", "left", "middle", scale); |
|
|
|
} |
|
|
|
} |
|
|
|
ctx.draw(true); |
|
|
|