Commit 13f345b88612f8a36df50864cc76603a71e69c91
Merge branch 'dev' into 'test'
Dev See merge request !234
Showing
6 changed files
with
39 additions
and
26 deletions
pages/giftpack/newvipgift/newvipgift.js
| @@ -28,10 +28,14 @@ Page({ | @@ -28,10 +28,14 @@ Page({ | ||
| 28 | integralTitle: "", | 28 | integralTitle: "", |
| 29 | growUpTitle: "", | 29 | growUpTitle: "", |
| 30 | is_sub: 0, //是否重复领取 | 30 | is_sub: 0, //是否重复领取 |
| 31 | + | ||
| 31 | }, | 32 | }, |
| 32 | GetList: function() { | 33 | GetList: function() { |
| 33 | var th = this; | 34 | var th = this; |
| 34 | var url = "/api/weshop/marketing/giftbag/bound/get"; | 35 | var url = "/api/weshop/marketing/giftbag/bound/get"; |
| 36 | + wx.showLoading({ | ||
| 37 | + title: '加载中', | ||
| 38 | + }) | ||
| 35 | getApp().request.promiseGet(url, { | 39 | getApp().request.promiseGet(url, { |
| 36 | data: { | 40 | data: { |
| 37 | "actId": th.data.getActId, //活动id | 41 | "actId": th.data.getActId, //活动id |
| @@ -41,6 +45,7 @@ Page({ | @@ -41,6 +45,7 @@ Page({ | ||
| 41 | "userId": d.user_id //用户ID | 45 | "userId": d.user_id //用户ID |
| 42 | } | 46 | } |
| 43 | }).then(res => { | 47 | }).then(res => { |
| 48 | + wx.hideLoading(); | ||
| 44 | if (res.data.code == 0) { | 49 | if (res.data.code == 0) { |
| 45 | if (res.data.data.lbCoupons != null && res.data.data.lbCoupons.length>0) { | 50 | if (res.data.data.lbCoupons != null && res.data.data.lbCoupons.length>0) { |
| 46 | //礼包内容--礼券 | 51 | //礼包内容--礼券 |
| @@ -100,7 +105,8 @@ Page({ | @@ -100,7 +105,8 @@ Page({ | ||
| 100 | if (res.data.data.actIntro != '') { | 105 | if (res.data.data.actIntro != '') { |
| 101 | th.setData({ | 106 | th.setData({ |
| 102 | textShow: true, | 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 | } else { | 112 | } else { |
| @@ -119,11 +125,7 @@ Page({ | @@ -119,11 +125,7 @@ Page({ | ||
| 119 | th.GetList(); | 125 | th.GetList(); |
| 120 | }, | 126 | }, |
| 121 | onShow: function() { | 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 | GetReceive: function() { | 130 | GetReceive: function() { |
| 129 | var th = this; | 131 | var th = this; |
pages/giftpack/newvipgift/newvipgift.wxml
| @@ -147,7 +147,7 @@ | @@ -147,7 +147,7 @@ | ||
| 147 | <text>活动规则:</text> | 147 | <text>活动规则:</text> |
| 148 | </view> | 148 | </view> |
| 149 | <view class="foot_box_text"> | 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 | </view> | 151 | </view> |
| 152 | </view> | 152 | </view> |
| 153 | </block> | 153 | </block> |
pages/giftpack/newvipgift/newvipgift.wxss
| @@ -346,6 +346,7 @@ | @@ -346,6 +346,7 @@ | ||
| 346 | bottom: 0; | 346 | bottom: 0; |
| 347 | left: 0; | 347 | left: 0; |
| 348 | width: 100%; | 348 | width: 100%; |
| 349 | + z-index: 10; | ||
| 349 | } | 350 | } |
| 350 | 351 | ||
| 351 | .foot_button_buy { | 352 | .foot_button_buy { |
| @@ -379,15 +380,20 @@ button::after { | @@ -379,15 +380,20 @@ button::after { | ||
| 379 | .foot_box_text ._img { | 380 | .foot_box_text ._img { |
| 380 | width: 100%; | 381 | width: 100%; |
| 381 | } | 382 | } |
| 383 | +.foot_box_text .p{ | ||
| 384 | + width: 100%; | ||
| 385 | +} | ||
| 382 | 386 | ||
| 383 | .foot_box_text .img { | 387 | .foot_box_text .img { |
| 384 | line-height: 0; | 388 | line-height: 0; |
| 385 | } | 389 | } |
| 386 | - | ||
| 387 | .image { | 390 | .image { |
| 388 | width: 400rpx; | 391 | width: 400rpx; |
| 389 | height: 200rpx; | 392 | height: 200rpx; |
| 390 | } | 393 | } |
| 394 | +.div_class{ | ||
| 395 | + width: 600rpx; | ||
| 396 | +} | ||
| 391 | 397 | ||
| 392 | .num { | 398 | .num { |
| 393 | color: #fb6451; | 399 | color: #fb6451; |
| @@ -407,4 +413,4 @@ button::after { | @@ -407,4 +413,4 @@ button::after { | ||
| 407 | width: 20rpx; | 413 | width: 20rpx; |
| 408 | height: 90rpx; | 414 | height: 90rpx; |
| 409 | z-index: 5; | 415 | z-index: 5; |
| 410 | -} | 416 | -} |
| 417 | +} | ||
| 411 | \ No newline at end of file | 418 | \ No newline at end of file |
pages/index/index/index.js
| @@ -21,7 +21,7 @@ Page({ | @@ -21,7 +21,7 @@ Page({ | ||
| 21 | swiperimage: [{ | 21 | swiperimage: [{ |
| 22 | image: "/miniapp/images/title.png", | 22 | image: "/miniapp/images/title.png", |
| 23 | nav_url: 0 | 23 | nav_url: 0 |
| 24 | - }], | 24 | + }], |
| 25 | resourceUrl: o.resourceUrl, | 25 | resourceUrl: o.resourceUrl, |
| 26 | logo: o.appLogo, | 26 | logo: o.appLogo, |
| 27 | homeData: null, | 27 | homeData: null, |
| @@ -70,6 +70,7 @@ Page({ | @@ -70,6 +70,7 @@ Page({ | ||
| 70 | is_disgraceful: 0, //是否显示新人广告 | 70 | is_disgraceful: 0, //是否显示新人广告 |
| 71 | new_image: "", //新人有礼弹窗图片 | 71 | new_image: "", //新人有礼弹窗图片 |
| 72 | new_nav: "", //新人页面跳转地址 | 72 | new_nav: "", //新人页面跳转地址 |
| 73 | + | ||
| 73 | }, | 74 | }, |
| 74 | 75 | ||
| 75 | onLoad: function() { | 76 | onLoad: function() { |
| @@ -89,7 +90,6 @@ Page({ | @@ -89,7 +90,6 @@ Page({ | ||
| 89 | }); | 90 | }); |
| 90 | } | 91 | } |
| 91 | }) | 92 | }) |
| 92 | - th.is_new(); | ||
| 93 | // th.is_festival(); | 93 | // th.is_festival(); |
| 94 | 94 | ||
| 95 | }, | 95 | }, |
| @@ -102,6 +102,10 @@ Page({ | @@ -102,6 +102,10 @@ Page({ | ||
| 102 | }, | 102 | }, |
| 103 | async onShow() { | 103 | async onShow() { |
| 104 | var th = this; | 104 | var th = this; |
| 105 | + var new_nav = th.data.new_nav; | ||
| 106 | + if (new_nav == "") { | ||
| 107 | + th.is_new(); | ||
| 108 | + } | ||
| 105 | if (getApp().globalData.user_id) getApp().requestCardNum(); | 109 | if (getApp().globalData.user_id) getApp().requestCardNum(); |
| 106 | await this.init_load(); | 110 | await this.init_load(); |
| 107 | //显示的时候要开启计时器 | 111 | //显示的时候要开启计时器 |
| @@ -660,7 +664,7 @@ Page({ | @@ -660,7 +664,7 @@ Page({ | ||
| 660 | }, | 664 | }, |
| 661 | new_nav: function(e) { | 665 | new_nav: function(e) { |
| 662 | var th = this; | 666 | var th = this; |
| 663 | - var new_nav = e.currentTarget.dataset.url; | 667 | + var new_nav = th.data.new_nav; |
| 664 | getApp().goto(new_nav); | 668 | getApp().goto(new_nav); |
| 665 | }, | 669 | }, |
| 666 | //跳转到权益 | 670 | //跳转到权益 |
pages/user/assistance/friend_assistance.js
| @@ -20,12 +20,12 @@ Page({ | @@ -20,12 +20,12 @@ Page({ | ||
| 20 | */ | 20 | */ |
| 21 | onLoad: function (options) { | 21 | onLoad: function (options) { |
| 22 | var th=this; | 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 | if(this.data.task_id==0 || this.data.task_id==undefined){ | 26 | if(this.data.task_id==0 || this.data.task_id==undefined){ |
| 27 | this.data.task_id= decodeURIComponent(options.scene); | 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 | getApp().request.get("http://172.20.3.102:8022/api/weshop/zl_act_user",{ | 29 | getApp().request.get("http://172.20.3.102:8022/api/weshop/zl_act_user",{ |
| 30 | data:{}, | 30 | data:{}, |
| 31 | success:function(res){ | 31 | success:function(res){ |
| @@ -57,7 +57,8 @@ Page({ | @@ -57,7 +57,8 @@ Page({ | ||
| 57 | cklie_button:function(){ | 57 | cklie_button:function(){ |
| 58 | var th=this; | 58 | var th=this; |
| 59 | var t_user_id=app_d.user_id; | 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 | getApp().request.json_post("/api/weshop/marketing/help/help/task/involve/insert", | 62 | getApp().request.json_post("/api/weshop/marketing/help/help/task/involve/insert", |
| 62 | data, //入参 | 63 | data, //入参 |
| 63 | function(res){ //成功 | 64 | function(res){ //成功 |
pages/user/index/index.js
| @@ -491,17 +491,17 @@ Page({ | @@ -491,17 +491,17 @@ Page({ | ||
| 491 | }, | 491 | }, |
| 492 | // 判断助力活动是不是存在 | 492 | // 判断助力活动是不是存在 |
| 493 | is_assistance:function(){ | 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 |