77cbd926 by simon

默认提交

1 parent 0be20de2
......@@ -2,7 +2,7 @@ let ENV_CONFIG = require('./env/index');
const APPID = ''
/** ====每次发布版本记得修改此环境配置==== */
const ENV = 'Prod'; // Dev Prod
const ENV = 'Dev'; // Dev Prod
const NET_CONFIG = ENV_CONFIG[ENV];
const MOCKAPI = ENV_CONFIG.mockApi;
......
......@@ -60,13 +60,24 @@ Page({
// 获取海报数据
getPosterConfig() {
let qrCodeWid = 340;
let avatarWid = 56;
let qrCodeWid = 300;
let avatarSpace = 5;
let avatarWidBlock = 300 * 0.3;
let avatarWid = avatarWidBlock - (avatarSpace * 2);
let qrTop = 360;
// 合成图片需要的数据
let {
userInfo
} = this.data;
let blocks = []
let blocks = [{
x: (690 - avatarWidBlock) * .5,
y: qrTop + (qrCodeWid * .5) - (avatarWidBlock * .5),
width: avatarWidBlock,
height: avatarWidBlock,
backgroundColor: "#ffffff",
borderRadius: 10,
zIndex: 21,
}]
let images = [
// 背景图
{
......@@ -79,7 +90,7 @@ Page({
// 二维码
{
x: (690 - qrCodeWid) * .5,
y: 340,
y: qrTop,
width: qrCodeWid,
height: qrCodeWid,
zIndex: 11,
......@@ -88,28 +99,29 @@ Page({
// 头像
{
x: (690 - avatarWid) * .5,
y: 480,
y: qrTop + (qrCodeWid * .5),
y: qrTop + ((qrCodeWid - avatarWidBlock) * .5) + avatarSpace,
width: avatarWid,
height: avatarWid,
borderRadius: 12,
zIndex: 11,
zIndex: 22,
url: userInfo.avatar,
}
];
let lines = [];
let texts = [{
x: 690 / 2,
y: 686,
width: 690,
fontSize: 24,
color: "#333333",
y: 700,
width: 688,
fontSize: 26,
color: "#000000",
textAlign: "center",
zIndex: 11,
text: userInfo.nickname,
},
{
x: 690 / 2,
y: 720,
y: 732,
width: 690,
fontSize: 18,
color: "#666666",
......