Commit 5e6e5e82ecc9e49c9b71959a693e25df3cdaa397

Authored by 前端研发-钱巧玲
1 parent 12d5602b

首页新人礼bug修改和新人有礼bug修改

pages/giftpack/newvipgift/newvipgift.js
... ... @@ -28,10 +28,14 @@ Page({
28 28 integralTitle: "",
29 29 growUpTitle: "",
30 30 is_sub: 0, //是否重复领取
  31 + }]
31 32 },
32 33 GetList: function() {
33 34 var th = this;
34 35 var url = "/api/weshop/marketing/giftbag/bound/get";
  36 + wx.showLoading({
  37 + title: '加载中',
  38 + })
35 39 getApp().request.promiseGet(url, {
36 40 data: {
37 41 "actId": th.data.getActId, //活动id
... ... @@ -41,6 +45,7 @@ Page({
41 45 "userId": d.user_id //用户ID
42 46 }
43 47 }).then(res => {
  48 + wx.hideLoading();
44 49 if (res.data.code == 0) {
45 50 if (res.data.data.lbCoupons != null && res.data.data.lbCoupons.length>0) {
46 51 //礼包内容--礼券
... ... @@ -100,7 +105,8 @@ Page({
100 105 if (res.data.data.actIntro != '') {
101 106 th.setData({
102 107 textShow: true,
103   - textTitle: res.data.data.actIntro.replace(/\<img/gi, '<img style="max-width:100%;height:auto"')
  108 + textTitle: res.data.data.actIntro.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"').replace(/<section/g, '<div')
  109 + .replace(/\/section>/g, '\div>')
104 110 })
105 111 }
106 112 } else {
... ... @@ -119,7 +125,7 @@ Page({
119 125 th.GetList();
120 126 },
121 127 onShow: function() {
122   -
  128 +
123 129 },
124 130 GetReceive: function() {
125 131 var th = this;
... ...
pages/giftpack/newvipgift/newvipgift.wxml
... ... @@ -147,7 +147,7 @@
147 147 <text>活动规则:</text>
148 148 </view>
149 149 <view class="foot_box_text">
150   - <rich-text nodes="{{textTitle}}"></rich-text>
  150 + <rich-text nodes="{{textTitle}}" name="div"></rich-text>
151 151 </view>
152 152 </view>
153 153 </block>
... ...
pages/giftpack/newvipgift/newvipgift.wxss
... ... @@ -346,6 +346,7 @@
346 346 bottom: 0;
347 347 left: 0;
348 348 width: 100%;
  349 + z-index: 10;
349 350 }
350 351  
351 352 .foot_button_buy {
... ... @@ -379,15 +380,20 @@ button::after {
379 380 .foot_box_text ._img {
380 381 width: 100%;
381 382 }
  383 +.foot_box_text .p{
  384 + width: 100%;
  385 +}
382 386  
383 387 .foot_box_text .img {
384 388 line-height: 0;
385 389 }
386   -
387 390 .image {
388 391 width: 400rpx;
389 392 height: 200rpx;
390 393 }
  394 +.div_class{
  395 + width: 600rpx;
  396 +}
391 397  
392 398 .num {
393 399 color: #fb6451;
... ... @@ -407,4 +413,4 @@ button::after {
407 413 width: 20rpx;
408 414 height: 90rpx;
409 415 z-index: 5;
410 416 -}
  417 +}
411 418 \ No newline at end of file
... ...
pages/index/index/index.js
... ... @@ -21,7 +21,7 @@ Page({
21 21 swiperimage: [{
22 22 image: "/miniapp/images/title.png",
23 23 nav_url: 0
24   - }],
  24 + }],
25 25 resourceUrl: o.resourceUrl,
26 26 logo: o.appLogo,
27 27 homeData: null,
... ... @@ -70,6 +70,7 @@ Page({
70 70 is_disgraceful: 0, //是否显示新人广告
71 71 new_image: "", //新人有礼弹窗图片
72 72 new_nav: "", //新人页面跳转地址
  73 +
73 74 },
74 75  
75 76 onLoad: function() {
... ... @@ -89,7 +90,7 @@ Page({
89 90 });
90 91 }
91 92 })
92   - // th.is_festival();
  93 + // th.is_festival();
93 94  
94 95 },
95 96 //关闭新用户领取广告
... ... @@ -101,7 +102,10 @@ Page({
101 102 },
102 103 async onShow() {
103 104 var th = this;
104   - th.is_new();
  105 + var new_nav = th.data.new_nav;
  106 + if (new_nav == "") {
  107 + th.is_new();
  108 + }
105 109 if (getApp().globalData.user_id) getApp().requestCardNum();
106 110 await this.init_load();
107 111 //显示的时候要开启计时器
... ...