diff --git a/packageB/pages/luckactivity/luckinfo/luckinfo.js b/packageB/pages/luckactivity/luckinfo/luckinfo.js
index e7dec1c..4af9805 100644
--- a/packageB/pages/luckactivity/luckinfo/luckinfo.js
+++ b/packageB/pages/luckactivity/luckinfo/luckinfo.js
@@ -217,7 +217,7 @@ let imgDraw = {
Page({
data: {
- imgDraw: imgDraw,
+ //imgDraw: imgDraw,
start: false,
list: null,
@@ -302,7 +302,7 @@ Page({
if(app.globalData.userInfo) {
if(!this.data.isLogin) {
-
+ imgDraw.views[1].text = app.globalData.userInfo.nickname;
// 下载头像
let path = app.globalData.userInfo.head_pic;
path = path.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn");
@@ -312,9 +312,11 @@ Page({
success (res) {
// 只要服务器有响应数据,就会把响应内容写入文件并进入 success 回调,业务需要自行判断是否下载到了想要的内容
if (res.statusCode === 200) {
- self.setData({
- 'imgDraw.views[0].url': res.tempFilePath,//头像
- });
+ // self.setData({
+ // 'imgDraw.views[0].url': res.tempFilePath,//头像
+ // });
+
+ imgDraw.views[0].url = res.tempFilePath;
}
}
});
@@ -323,8 +325,10 @@ Page({
this.setData({
userInfo: app.globalData.userInfo,
isLogin: true,
- 'imgDraw.views[1].text': app.globalData.userInfo.nickname,//昵称
+ //'imgDraw.views[1].text': app.globalData.userInfo.nickname,//昵称
});
+
+
// console.log('imgDraw.views[1].text+++++++++', imgDraw.views[1], app.globalData.userInfo.nickname);
let user_id = app.globalData.userInfo.user_id;
let store_id = app.globalData.setting.stoid;
@@ -364,11 +368,15 @@ Page({
// console.log('luckInfo', res.data.data);
let luckInfo = res.data.data;
- self.setData({
- 'imgDraw.views[3].text': self.data.luckInfo.act_name,//分享标题
- // 'imgDraw.views[4].text': '快来一起抽奖吧,精美奖品等着你!',//分享内容
- 'imgDraw.views[14].text': util.formar_no_full(luckInfo.begindate) + ' 至 ' + util.formar_no_full(luckInfo.enddate),//活动时间
- });
+ imgDraw.views[3].text = self.data.luckInfo.act_name;//分享标题
+ // 'imgDraw.views[4].text': '快来一起抽奖吧,精美奖品等着你!',//分享内容
+ imgDraw.views[14].text = util.formar_no_full(luckInfo.begindate) + ' 至 ' + util.formar_no_full(luckInfo.enddate);//活动时间
+
+ // self.setData({
+ // 'imgDraw.views[3].text': self.data.luckInfo.act_name,//分享标题
+ // // 'imgDraw.views[4].text': '快来一起抽奖吧,精美奖品等着你!',//分享内容
+ // 'imgDraw.views[14].text': util.formar_no_full(luckInfo.begindate) + ' 至 ' + util.formar_no_full(luckInfo.enddate),//活动时间
+ // });
@@ -387,11 +395,15 @@ Page({
bannerUrl: imghost + template.bannerUrl, //背景图
'blocks[0].imgs[0].src': imghost + ((template&&template.wheelBaseUrl) ? template.wheelBaseUrl:'miniapp/images/luckDraw/weel.png?v=3'),
'buttons[0].imgs[0].src': imghost + ((template&&template.wheelPointerUrl) ? template.wheelPointerUrl:'miniapp/images/luckDraw/pointer.png?v=3'), //指针
- 'imgDraw.views[3].text': template.share_title ? template.share_title:self.data.luckInfo.act_name, //分享标题
- 'imgDraw.views[5].url': imghost + (template&&template.share_image ? template.share_image:self.data.luckInfo.imageurl), //分享图片
+ // 要用
+ //'imgDraw.views[3].text': template.share_title ? template.share_title:self.data.luckInfo.act_name, //分享标题
+ //'imgDraw.views[5].url': imghost + (template&&template.share_image ? template.share_image:self.data.luckInfo.imageurl), //分享图片
});
+ imgDraw.views[3].text = template.share_title ? template.share_title:self.data.luckInfo.act_name; //分享标题
+ imgDraw.views[5].url = imghost + (template&&template.share_image ? template.share_image:self.data.luckInfo.imageurl); //分享图片
+
let color = template&&template.colorCode ? template.colorCode:'#da104b';
luckStyle = `background: ${color} url(${self.data.bannerUrl}) no-repeat;`;
self.setData({
@@ -413,10 +425,13 @@ Page({
luckStyle = `background: #da104b url(${imghost + 'miniapp/images/luckDraw/bg.png?v=2'}) no-repeat;`;
self.setData({
luckStyle,
- 'imgDraw.views[5].url': self.data.luckInfo.imageurl ? (imghost + self.data.luckInfo.imageurl):'/packageB/images/luckDraw/jiang.png', //分享图片
+ //'imgDraw.views[5].url': self.data.luckInfo.imageurl ? (imghost + self.data.luckInfo.imageurl):'/packageB/images/luckDraw/jiang.png', //分享图片
'blocks[0].imgs[0].src': imghost + 'miniapp/images/luckDraw/weel.png?v=3', //转盘
'buttons[0].imgs[0].src': imghost + 'miniapp/images/luckDraw/pointer.png?v=3', //指针
});
+
+ imgDraw.views[5].url = self.data.luckInfo.imageurl ? (imghost + self.data.luckInfo.imageurl):'/packageB/images/luckDraw/jiang.png'; //分享图片
+
// let color = template&&template.colorCode ? template.colorCode:'#da104b';
// self.setData({
@@ -430,8 +445,10 @@ Page({
if(luckInfo && luckInfo.imageurl) {
self.setData({
- 'imgDraw.views[5].url': imghost + self.data.luckInfo.imageurl, //分享图片
+ //'imgDraw.views[5].url': imghost + self.data.luckInfo.imageurl, //分享图片
});
+
+ imgDraw.views[5].url = imghost + self.data.luckInfo.imageurl; //分享图片
};
if(luckInfo && luckInfo.store_bannerUrl) {
@@ -456,6 +473,9 @@ Page({
};
+ self.setData({
+ imgDraw: imgDraw,
+ });
if(self.data.luckInfo.msgInfo) {
wx.showToast({
diff --git a/packageB/pages/luckactivity/luckinfo/luckinfo.wxml b/packageB/pages/luckactivity/luckinfo/luckinfo.wxml
index db3ae10..9289292 100644
--- a/packageB/pages/luckactivity/luckinfo/luckinfo.wxml
+++ b/packageB/pages/luckactivity/luckinfo/luckinfo.wxml
@@ -205,4 +205,4 @@
-
\ No newline at end of file
+
\ No newline at end of file