Commit 13f345b88612f8a36df50864cc76603a71e69c91

Authored by 后端研发-苏明海
2 parents 23f25005 c44c0f07

Merge branch 'dev' into 'test'

Dev

See merge request !234
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
  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,11 +125,7 @@ Page({
119 125 th.GetList();
120 126 },
121 127 onShow: function() {
122   - var th = this;
123   - var textTitle = th.data.textTitle.replace(/<img/gi, '<img style="max-width:100%;height:auto;float:left;display:block" ');
124   - th.setData({
125   - textTitle: textTitle
126   - })
  128 +
127 129 },
128 130 GetReceive: function() {
129 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" style="word-break:break-all;word-wrap:break-word"></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,6 @@ Page({
89 90 });
90 91 }
91 92 })
92   - th.is_new();
93 93 // th.is_festival();
94 94  
95 95 },
... ... @@ -102,6 +102,10 @@ Page({
102 102 },
103 103 async onShow() {
104 104 var th = this;
  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 //显示的时候要开启计时器
... ... @@ -660,7 +664,7 @@ Page({
660 664 },
661 665 new_nav: function(e) {
662 666 var th = this;
663   - var new_nav = e.currentTarget.dataset.url;
  667 + var new_nav = th.data.new_nav;
664 668 getApp().goto(new_nav);
665 669 },
666 670 //跳转到权益
... ...
pages/user/assistance/friend_assistance.js
... ... @@ -20,12 +20,12 @@ Page({
20 20 */
21 21 onLoad: function (options) {
22 22 var th=this;
23   - this.data.task_id=options.options;
24   - this.data.userId=options.userId;
  23 + if(options.task_id) this.data.task_id=options.task_id;
  24 + if(options.userId) this.data.userId=options.userId;
25 25 //任务是不是为空
26 26 if(this.data.task_id==0 || this.data.task_id==undefined){
27 27 this.data.task_id= decodeURIComponent(options.scene);
28   - if(this.data.task_id){
  28 + if(this.data.task_id!=null && this.data.task_id!='undefined' && this.data.task_id!="" && this.data.task_id!=0){
29 29 getApp().request.get("http://172.20.3.102:8022/api/weshop/zl_act_user",{
30 30 data:{},
31 31 success:function(res){
... ... @@ -57,7 +57,8 @@ Page({
57 57 cklie_button:function(){
58 58 var th=this;
59 59 var t_user_id=app_d.user_id;
60   - var data={id:this.data.task_id,storeId:os.store_id,userId:this.data.user_id, zlUserId:t_user_id};
  60 + var data={id:this.data.task_id,storeId:os.stoid,userId:this.data.user_id, zlUserId:t_user_id};
  61 + console.log(data);
61 62 getApp().request.json_post("/api/weshop/marketing/help/help/task/involve/insert",
62 63 data, //入参
63 64 function(res){ //成功
... ...
pages/user/index/index.js
... ... @@ -491,17 +491,17 @@ Page({
491 491 },
492 492 // 判断助力活动是不是存在
493 493 is_assistance:function(){
494   - // var th = this;
495   - // rq.get("/api/weshop/marketing/help/act/judge", {
496   - // data: { storeId: os.stoid, userId: app_d.user_id },
497   - // success: function (res) {
498   - // var code = res.data.code;
499   - // if (code == 0) {
500   - // th.setData({ is_assistance:1});
501   - // }
  494 + var th = this;
  495 + rq.get("/api/weshop/marketing/help/act/judge", {
  496 + data: { storeId: os.stoid, userId: app_d.user_id },
  497 + success: function (res) {
  498 + var code = res.data.code;
  499 + if (code == 0) {
  500 + th.setData({ is_assistance:1});
  501 + }
502 502  
503   - // }
504   - // })
  503 + }
  504 + })
505 505  
506 506 }
507 507  
... ...