| @@ -174,7 +174,7 @@ Page({ | |||||
| if (options && options.merchantId) { | if (options && options.merchantId) { | ||||
| //店铺名 | //店铺名 | ||||
| this.drawNormalText(ctx, "商户名称:" + this.data.data.merchantName, 30 * scale, 295 * scale, 20 * scale, "#000", "left", "middle", scale); | this.drawNormalText(ctx, "商户名称:" + this.data.data.merchantName, 30 * scale, 295 * scale, 20 * scale, "#000", "left", "middle", scale); | ||||
| this.drawNormalText(ctx, "商户位置:" + this.data.data.shopVoList[0].buildingName + this.data.data.shopVoList[0].floorName + "--" + this.data.data.shopVoList[0].shopNumber, 30 * scale, 320 * scale, 15 * scale, "#F4AA91", "left", "middle", scale); | |||||
| // this.drawNormalText(ctx, "商户位置:" + this.data.data.shopVoList[0].buildingName + this.data.data.shopVoList[0].floorName + "--" + this.data.data.shopVoList[0].shopNumber, 30 * scale, 320 * scale, 15 * scale, "#F4AA91", "left", "middle", scale); | |||||
| this.drawNormalText(ctx, "商户电话:" + this.data.data.merchantLinkPhone, 30 * scale, 348 * scale, 16 * scale, "#000", "left", "middle", scale); | this.drawNormalText(ctx, "商户电话:" + this.data.data.merchantLinkPhone, 30 * scale, 348 * scale, 16 * scale, "#000", "left", "middle", scale); | ||||
| this.drawNormalText(ctx, "长按识别,进店去看看", 155 * scale, 470 * scale, 16 * scale, "#000", "left", "middle", scale); | this.drawNormalText(ctx, "长按识别,进店去看看", 155 * scale, 470 * scale, 16 * scale, "#000", "left", "middle", scale); | ||||
| @@ -189,12 +189,17 @@ Page({ | |||||
| let metrics; | let metrics; | ||||
| if(i==0){ | if(i==0){ | ||||
| metrics = 35; | metrics = 35; | ||||
| that.drawNormalText(ctx, that.data.data.merchantVoList[i].merchantName, metrics, 375 * scale, 14 * scale, "#000", "left", "middle", scale); | |||||
| }else{ | |||||
| that.drawNormalText(ctx, that.data.data.merchantVoList[i].merchantName+"、", metrics, 375 * scale, 14 * scale, "#000", "left", "middle", scale); | |||||
| }else if(i<=2){ | |||||
| let word = that.data.data.merchantVoList[i - 1].merchantName; | let word = that.data.data.merchantVoList[i - 1].merchantName; | ||||
| let metrics = (ctx.measureText(word).width) * scale; | let metrics = (ctx.measureText(word).width) * scale; | ||||
| metrics += metrics; | metrics += metrics; | ||||
| that.drawNormalText(ctx,''+that.data.data.merchantVoList[i].merchantName, metrics, 375 * scale, 14 * scale, "#000", "left", "middle", scale); | |||||
| if(i==2){ | |||||
| that.drawNormalText(ctx,''+that.data.data.merchantVoList[i].merchantName+"..", metrics, 375 * scale, 14 * scale, "#000", "left", "middle", scale); | |||||
| }else{ | |||||
| that.drawNormalText(ctx,''+that.data.data.merchantVoList[i].merchantName+"、", metrics, 375 * scale, 14 * scale, "#000", "left", "middle", scale); | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| ctx.draw(true); | ctx.draw(true); | ||||