diff --git a/pages/canvas/index.js b/pages/canvas/index.js index e85d884..92952ad 100644 --- a/pages/canvas/index.js +++ b/pages/canvas/index.js @@ -164,9 +164,13 @@ Page({ // 商户海报绘制 drawOtherContent(ctx, scale, options) { let that = this; + console.log(ctx.measureText(this.data.nickName).width); + //昵称 - this.drawNormalText(ctx, this.data.nickName, 43 * scale, 24 * scale, 16 * scale, "#000", "left", "middle", scale); - this.drawNormalText(ctx, " 向您推荐", 120 * scale, 25 * scale, 16 * scale, "#848484", "left", "middle", scale); + this.drawNormalText(ctx, this.data.nickName, 48 * scale, 24 * scale, 16 * scale, "#000", "left", "middle", scale); + + this.drawNormalText(ctx, " 向您推荐", (ctx.measureText(this.data.nickName).width+60) * scale, 25 * scale, 16 * scale, "#848484", "left", "middle", scale); + this.drawNormalText(ctx, "---" + this.data.mallname + "---", 175 * scale, 500 * scale, 16 * scale, "#000", "left", "middle", scale); if (options && options.merchantId) { //店铺名 @@ -203,7 +207,7 @@ Page({ let word = that.data.data.merchantVoList[i - 1].merchantName; let metrics = (ctx.measureText(word).width) * scale; metrics += metrics; - that.drawNormalText(ctx,'、'+that.data.data.merchantVoList[i].merchantName, metrics, 375 * scale, 14 * scale, "#000", "left", "middle", scale); + that.drawNormalText(ctx,''+that.data.data.merchantVoList[i].merchantName, metrics, 375 * scale, 14 * scale, "#000", "left", "middle", scale); } } ctx.draw(true); diff --git a/pages/canvas/index.wxml b/pages/canvas/index.wxml index 2196350..b808a35 100644 --- a/pages/canvas/index.wxml +++ b/pages/canvas/index.wxml @@ -1,7 +1,9 @@ - - - - - - + + + + + + + + \ No newline at end of file diff --git a/pages/coupon/detail/index.wxss b/pages/coupon/detail/index.wxss index b99e7f5..ba4a5fd 100644 --- a/pages/coupon/detail/index.wxss +++ b/pages/coupon/detail/index.wxss @@ -800,12 +800,10 @@ checkbox-group, radio-group { color: #000; display: block; font-size: 30rpx; - height: 80rpx; - line-height: 80rpx; } .modal-content view>image { - margin-top: 30rpx; + margin-top: 40rpx; width: 90rpx; height: 90rpx; } \ No newline at end of file