Commit c7616ea1f58ce51501059bab6458f3722ad7855f

Authored by 后端开发-许程
2 parents bd323f13 e8fffa46

Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev

pages/user/assistance/friend_assistance.js
... ... @@ -32,54 +32,53 @@ Page({
32 32 if (options.userId) this.data.userId = options.userId;
33 33 //任务是不是为空
34 34 if (this.data.tasking == 0 || this.data.tasking == undefined) {
35   - //this.data.task_id = decodeURIComponent(options.scene);
36   - this.data.tasking =1;
37   - if (this.data.tasking != null && this.data.tasking != 'undefined' && this.data.tasking != "" && this.data.tasking !=
38   - 0) {
39   - getApp().request.promiseGet("/api/weshop/marketing/help/help/tasking/get", {
40   - data: {
41   - id: th.data.tasking,
42   - storeId: os.stoid
43   - }
44   - }).then(res => {
45   - if (res.data.code == 0) {
46   - th.data.userId = res.data.data.userId;
47   - th.data.taskId = res.data.data.taskId;
48   - //获取活动的时间
49   - return getApp().request.promiseGet("/api/weshop/marketing/help/help/act/get", {
50   - data: {
51   - helpId: res.data.data.helpFormId,
52   - storeId: os.stoid
53   - }
54   - })
55   - }
56   - return ut.null_promise();
57   - }).then(res => {
58   - if (res.data.code == 0) {
59   - th.setData({
60   - zl_act: res.data.data
61   - })
62   - //获取活动的参与的人数
63   - return getApp().request.promiseGet("/api/weshop/marketing/help/involve/help/act/people/count", {
64   - data: {
65   - helpId: res.data.data.id,
66   - storeId: os.stoid
67   - }
68   - })
69   - }
70   - return ut.null_promise();
71   - }).then(res => {
72   - if (res.data.code == 0) {
73   - th.setData({
74   - s_num: res.data.data.countAll
75   - });
76   - }
77   - })
78   -
79   - }
  35 + this.data.tasking = decodeURIComponent(options.scene);
80 36 }
81   - },
82 37  
  38 + if (this.data.tasking != null && this.data.tasking != 'undefined' && this.data.tasking != "" && this.data.tasking !=
  39 + 0) {
  40 + getApp().request.promiseGet("/api/weshop/marketing/help/help/tasking/get", {
  41 + data: {
  42 + id: th.data.tasking,
  43 + storeId: os.stoid
  44 + }
  45 + }).then(res => {
  46 + if (res.data.code == 0) {
  47 + th.data.userId = res.data.data.userId;
  48 + th.data.taskId = res.data.data.taskId;
  49 + //获取活动的时间
  50 + return getApp().request.promiseGet("/api/weshop/marketing/help/help/act/get", {
  51 + data: {
  52 + helpId: res.data.data.helpFormId,
  53 + storeId: os.stoid
  54 + }
  55 + })
  56 + }
  57 + return ut.null_promise();
  58 + }).then(res => {
  59 + if (res.data.code == 0) {
  60 + th.setData({
  61 + zl_act: res.data.data
  62 + })
  63 + //获取活动的参与的人数
  64 + return getApp().request.promiseGet("/api/weshop/marketing/help/involve/help/act/people/count", {
  65 + data: {
  66 + helpId: res.data.data.id,
  67 + storeId: os.stoid
  68 + }
  69 + })
  70 + }
  71 + return ut.null_promise();
  72 + }).then(res => {
  73 + if (res.data.code == 0) {
  74 + th.setData({
  75 + s_num: res.data.data.countAll
  76 + });
  77 + }
  78 + })
  79 +
  80 + }
  81 + },
83 82  
84 83 // 跳转到助力成功页
85 84 participate_activity: function() {
... ...