From 922fa2211bac9d26e2d377e0d513fafff3d217b4 Mon Sep 17 00:00:00 2001 From: cheng.xu Date: Thu, 7 Nov 2019 18:20:02 +0800 Subject: [PATCH] 分享 及购买卡的修改 --- pages/user/Detailed/Detailed.js | 19 +++++++++++++------ pages/user/cardinfo/cardinfo.js | 23 +++++++++++++++-------- pages/user/cardinfo/cardinfo.wxml | 2 +- pages/user/plus/plus.wxml | 15 +++++++-------- pages/user/plus/plus.wxss | 11 ++++------- 5 files changed, 40 insertions(+), 30 deletions(-) diff --git a/pages/user/Detailed/Detailed.js b/pages/user/Detailed/Detailed.js index 45e9fc3..62013dd 100644 --- a/pages/user/Detailed/Detailed.js +++ b/pages/user/Detailed/Detailed.js @@ -186,6 +186,13 @@ Page({ var user=app.globalData.userInfo; var unit = th.data.screenWidth / 750 * 1.35; var scene = getApp().globalData.user_id; + var nickname = user.nickname; + + if (nickname.length>3){ + nickname=nickname.substr(0, 3); + + nickname = nickname+"..." + } //---二微码--- var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + @@ -203,13 +210,13 @@ Page({ ctx.drawImage("../../../images/share/mackground.png", 0, 0, 554 * unit, 930 * unit); ctx.setFontSize(26 * unit); ctx.setFillStyle("rgb(0,0,0)"); - ctx.fillText(user.nickname, 155 * unit, 75 * unit, 200 * unit); + ctx.fillText(nickname, 155 * unit, 75 * unit, 200 * unit); var tj_path = "../../../images/share/q_tj.png"; - ctx.drawImage(tj_path, 385 * unit, 45 * unit, 90 * unit, 30 * unit); + ctx.drawImage(tj_path, 255 * unit, 50 * unit, 90 * unit, 30 * unit); ctx.setFontSize(18 * unit); ctx.setFillStyle("rgb(255,255,255)"); - ctx.fillText("强烈推荐", 394 * unit, 65 * unit); + ctx.fillText("强烈推荐", 265 * unit, 72 * unit); ctx.setStrokeStyle("rgb(255,255,255)"); ctx.setLineDash([5 * unit, 5 * unit], 5 * unit); @@ -232,13 +239,13 @@ Page({ ctx.fillText(big_card.CardName, 80 * unit, 215 * unit); ctx.setFontSize(18 * unit); ctx.setFillStyle('rgb(218,194,169)'); - ctx.fillText("开通会员年卡仅" + big_card.CardFee+"元", 80 * unit, 240 * unit); + ctx.fillText("开通plus会员仅" + big_card.CardFee+"元", 80 * unit, 240 * unit); - ctx.drawImage(privilege_o, 80 * unit, 343 * unit, 20 * unit, 20 * unit); + //zz ctx.drawImage(privilege_o, 80 * unit, 343 * unit, 20 * unit, 20 * unit); ctx.setFontSize(14 * unit); ctx.setFillStyle('rgb(218,194,169)'); - ctx.fillText("根据大家购买数据,您成为超级会员预计可省¥3031元", 105 * unit, 360 * unit); + ctx.fillText("按去年用户消费计算,开卡后一年预计省¥3031", 85 * unit, 360 * unit); ctx.rect(70 * unit, 425 * unit, 182 * unit, 1 * unit); ctx.setFillStyle('rgb(218,194,169)'); diff --git a/pages/user/cardinfo/cardinfo.js b/pages/user/cardinfo/cardinfo.js index 32e15d4..99ae452 100644 --- a/pages/user/cardinfo/cardinfo.js +++ b/pages/user/cardinfo/cardinfo.js @@ -1,7 +1,7 @@ var t = getApp(), a = t.request, o = t.globalData.setting, - os = o, + os = o, i = require("../../../utils/util.js"), ut = i, s = require("../../../utils/common.js"),t_pay = require("../../../utils/pay2.js"), @@ -294,6 +294,13 @@ Page({ var img_Identification = th.data.img_Identification;//会员标识 var privilege_o = th.data.privilege_o;//勋章图片 var img_square=th.data.img_square; + var nickname = user.nickname; + + if (nickname.length > 3) { + nickname = nickname.substr(0, 3); + + nickname = nickname + "..." + } var app = getApp(); var unit = th.data.screenWidth / 750 * 1.35; @@ -319,13 +326,13 @@ Page({ ctx.drawImage("../../../images/share/mackground.png", 0, 0, 554 * unit, 930 * unit); ctx.setFontSize(26 * unit); ctx.setFillStyle("rgb(0,0,0)"); - ctx.fillText(user.nickname, 155 * unit, 75 * unit, 200 * unit); + ctx.fillText(nickname, 155 * unit, 75 * unit, 200 * unit); var tj_path = "../../../images/share/q_tj.png"; - ctx.drawImage(tj_path, 385 * unit, 45 * unit, 90 * unit, 30 * unit); + ctx.drawImage(tj_path, 255 * unit, 50 * unit, 90 * unit, 30 * unit); ctx.setFontSize(18 * unit); ctx.setFillStyle("rgb(255,255,255)"); - ctx.fillText("强烈推荐", 394 * unit, 65 * unit); + ctx.fillText("强烈推荐", 265 * unit, 72 * unit); ctx.setStrokeStyle("rgb(255,255,255)"); ctx.setLineDash([5 * unit, 5 * unit], 5 * unit); @@ -387,19 +394,19 @@ Page({ ctx.fillText(big_card.CardName, 80 * unit, 215 * unit); ctx.setFontSize(18 * unit); ctx.setFillStyle('rgb(218,194,169)'); - ctx.fillText("开通会员年卡仅" + big_card.CardFee+"元", 80 * unit, 240 * unit); + ctx.fillText("开通plus会员仅" + big_card.CardFee+"元", 80 * unit, 240 * unit); - ctx.drawImage(privilege_o, 80 * unit, 343 * unit, 20 * unit, 20 * unit); + // zzctx.drawImage(privilege_o, 80 * unit, 343 * unit, 20 * unit, 20 * unit); ctx.setFontSize(14 * unit); ctx.setFillStyle('rgb(218,194,169)'); - ctx.fillText("根据大家购买数据,您成为超级会员预计可省¥3031元", 105 * unit, 360 * unit); + ctx.fillText("按去年用户消费计算,开卡后一年预计省¥3031",85 * unit, 360 * unit); ctx.rect(70 * unit, 425 * unit, 182 * unit, 1 * unit); ctx.setFillStyle('rgb(218,194,169)'); ctx.fill(); - ctx.drawImage(img_square, 267 * unit, 420 * unit, 13 * unit, 13 * unit); + ctx.drawImage(img_square, 267 * unit, 420 * unit, 13 * unit, 13 * unit); ctx.beginPath(); ctx.rect(295 * unit, 425 * unit, 182 * unit, 1 * unit); diff --git a/pages/user/cardinfo/cardinfo.wxml b/pages/user/cardinfo/cardinfo.wxml index de4d709..b4c66d5 100644 --- a/pages/user/cardinfo/cardinfo.wxml +++ b/pages/user/cardinfo/cardinfo.wxml @@ -27,7 +27,7 @@ 享受更低价格,请续费哦 - 邀请新朋友 + 邀请新朋友 diff --git a/pages/user/plus/plus.wxml b/pages/user/plus/plus.wxml index 2cd02a9..2f7ad35 100644 --- a/pages/user/plus/plus.wxml +++ b/pages/user/plus/plus.wxml @@ -20,15 +20,15 @@ {{item.CardName}} 开通会员年卡仅{{item.CardFee}}元 - 立即开通 + 立即购买 - + - + 按去年用户消费计算,开卡后一年预计省¥{{item.free}}元 @@ -48,17 +48,16 @@ - 开通PLUSI会员尊享礼遇 + 开通PLUSI会员尊享礼遇 - PLUS会员尊享礼遇 + - PLUS会员可享以下特权 - - 解锁新权益 精彩享不停 + + PLUS会员可享受以下特权 diff --git a/pages/user/plus/plus.wxss b/pages/user/plus/plus.wxss index 324a4f5..f169837 100644 --- a/pages/user/plus/plus.wxss +++ b/pages/user/plus/plus.wxss @@ -163,19 +163,16 @@ swiper { height: 30rpx; margin-right: 5rpx; background-size: 100% 100%; - background-blend-mode: lighten; transform: translateX(-130%); - vertical-align: top; - } .Membership .Opening { width: 160rpx; - height: 45rpx; - border-radius: 20rpx; + height: 50rpx; + line-height: 50rpx; + border-radius: 30rpx; background-color: rgb(237, 189, 150); - line-height: 45rpx; text-align: center; margin-top: 2rpx; color: #666 @@ -212,7 +209,7 @@ swiper { } .consumption { - margin-top: 95rpx; + margin-top: 88rpx; font-size: 18rpx; } -- libgit2 0.21.4