Commit bc57a2f0be8afe49a6fd9700aa16032d67217b0d
1 parent
c7b61248
首页新人有礼弹窗和新人有礼领取各用一个接口
Showing
1 changed file
with
17 additions
and
3 deletions
pages/index/index/index.js
| ... | ... | @@ -616,8 +616,22 @@ Page({ |
| 616 | 616 | //判断该用户是否是新会员 |
| 617 | 617 | is_new: function () { |
| 618 | 618 | var th = this; |
| 619 | - var url = "/api/weshop/marketing/newpeople/get"; | |
| 620 | - getApp().request.promiseGet(url, { | |
| 619 | + getApp().request.promiseGet("/api/weshop/marketing/newpeople/act/judge", { | |
| 620 | + data: { | |
| 621 | + storeId: o.stoid, | |
| 622 | + userId: d.user_id | |
| 623 | + } | |
| 624 | + }).then(res => { | |
| 625 | + var swiperimage = th.data.swiperimage; | |
| 626 | + swiperimage.push("/api/weshop/marketing/newpeople/act/bound/judge"); | |
| 627 | + if (res.data.code == 0) { | |
| 628 | + th.setData({ | |
| 629 | + is_disgraceful:1 | |
| 630 | + }) | |
| 631 | + } | |
| 632 | + }) | |
| 633 | + | |
| 634 | + getApp().request.promiseGet("/api/weshop/marketing/newpeople/act/judge", { | |
| 621 | 635 | data: { |
| 622 | 636 | storeId: o.stoid, |
| 623 | 637 | userId: d.user_id |
| ... | ... | @@ -627,11 +641,11 @@ Page({ |
| 627 | 641 | swiperimage.push("/miniapp/images/newpeople/newpeople.png"); |
| 628 | 642 | if (res.data.code == 0) { |
| 629 | 643 | th.setData({ |
| 630 | - is_disgraceful:1, | |
| 631 | 644 | swiperimage: swiperimage |
| 632 | 645 | }) |
| 633 | 646 | } |
| 634 | 647 | }) |
| 648 | + | |
| 635 | 649 | } |
| 636 | 650 | |
| 637 | 651 | }); |
| 638 | 652 | \ No newline at end of file | ... | ... |