xiaoe_mp_npm 1.0.45-test01 → 1.0.45-test02

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -489,28 +489,28 @@ Component({
489
489
  // 新版商户提现按钮文案
490
490
  withdrawBtnText(taskItem) {
491
491
  const { reward_value } = taskItem
492
+ let unableBtn = true,
493
+ ButtonText = '超时未提现'
492
494
  switch (reward_value.pay_state) {
493
495
  case 0:
494
496
  case 2:
495
497
  case 11:
496
- this.setData({
497
- unableBtn: false,
498
- })
499
- return '立即提现'
498
+ ButtonText = '立即提现'
499
+ unableBtn = false
500
+ break
500
501
  case 5:
501
- this.setData({
502
- unableBtn: true,
503
- })
504
- return '已提现'
502
+ ButtonText = '已提现'
503
+ break
505
504
  case 10:
506
- this.setData({
507
- unableBtn: true,
508
- })
509
- return '超时未提现'
505
+ ButtonText = '超时未提现'
506
+ break
510
507
  default:
511
508
  break
512
509
  }
513
- return '超时未提现'
510
+ this.setData({
511
+ unableBtn,
512
+ })
513
+ return ButtonText
514
514
  },
515
515
  // 打开答题任务答案解析
516
516
  handleAnswerAnalysis() {
@@ -22,6 +22,18 @@ Component({
22
22
  rewardData: {
23
23
  type: Object,
24
24
  value: {},
25
+ observer(val) {
26
+ const { reward_value = {}, reward_pay_type, team_pay_config } = val.live_task || {}
27
+ let red_packet_id = reward_value.red_packet_id || 0
28
+ // 如果是门店红包的话,需要遍历获取team_id获取对应红包id
29
+ if (+reward_pay_type === 10) {
30
+ const teamList = JSON.parse(team_pay_config)
31
+ red_packet_id = teamList.find((item) => item.team_id === this.data.teamId).red_packet_id
32
+ }
33
+ this.setData({
34
+ red_packet_id,
35
+ })
36
+ },
25
37
  },
26
38
  teamId: {
27
39
  type: String,
@@ -41,7 +53,9 @@ Component({
41
53
  /**
42
54
  * 组件的初始数据
43
55
  */
44
- data: {},
56
+ data: {
57
+ red_packet_id: 0,
58
+ },
45
59
  computed: {
46
60
  awardImg(data) {
47
61
  let { reward_type } = data.rewardData.live_task
@@ -15,7 +15,7 @@
15
15
  alive_id="{{ roomInfo.alive_id }}"
16
16
  user_id="{{roomInfo.user_id}}"
17
17
  alive_room_url="{{roomInfo.alive_room_url}}"
18
- red_packet_id="{{rewardData.live_task.reward_value.red_packet_id}}"
18
+ red_packet_id="{{red_packet_id}}"
19
19
  bind:success="closePopup"
20
20
  ></instant-withdraw>
21
21
  <view class="receive-container__btn" catchtap="closePopup" wx:else>开心收下</view>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xiaoe_mp_npm",
3
- "version": "1.0.45-test01",
3
+ "version": "1.0.45-test02",
4
4
  "description": "",
5
5
  "main": "miniprogram_dist/index.js",
6
6
  "scripts": {
@@ -75,4 +75,4 @@
75
75
  "miniprogram-computed": "4.2.1",
76
76
  "mp-plugins-info-collection": "1.1.4"
77
77
  }
78
- }
78
+ }
@@ -1,130 +1,130 @@
1
- .taskIcon {
2
- z-index: 9;
3
- box-sizing: border-box;
4
- width: 9.6vmin;
5
- height: 9.6vmin;
6
- text-align: center;
7
- padding: 0;
8
- position: relative;
9
- display: flex;
10
- flex-direction: column;
11
- align-items: center;
12
- font-size: 2.13333vmin;
13
- height: 100%;
14
- border-radius: 2.13333vmin;
15
- margin: 0 4.26667vmin 3.2vmin 0;
16
- pointer-events: auto;
17
- }
18
- .taskIcon .task-icon {
19
- flex-shrink: 0;
20
- display: block;
21
- width: 8.53333vmin;
22
- height: 8.53333vmin;
23
- background-image: url("https://commonresource-1252524126.cdn.xiaoeknow.com/image/lopok62p0l77.png");
24
- background-size: 100% 100%;
25
- }
26
- .taskIcon .task-text {
27
- width: 9.33333vmin;
28
- height: 3.2vmin;
29
- line-height: 3.2vmin;
30
- border-radius: 1.6vmin;
31
- font-size: 2.13333vmin;
32
- background: rgba(0, 0, 0, 0.4);
33
- color: #fff;
34
- }
35
- .taskIcon.verticalStyle {
36
- margin: 0;
37
- background: rgba(0, 0, 0, 0.2);
38
- }
39
- .taskIcon.verticalStyle .task-text {
40
- position: absolute;
41
- bottom: -0.26667vmin;
42
- }
43
- @media screen and (min-width: 768px) and (orientation: portrait) {
44
- .taskIcon {
45
- z-index: 9;
46
- box-sizing: border-box;
47
- width: 4.6875vmin;
48
- height: 4.6875vmin;
49
- text-align: center;
50
- padding: 0;
51
- position: relative;
52
- display: flex;
53
- flex-direction: column;
54
- align-items: center;
55
- font-size: 1.04167vmin;
56
- height: 100%;
57
- border-radius: 1.04167vmin;
58
- margin: 0 2.08333vmin 1.5625vmin 0;
59
- pointer-events: auto;
60
- }
61
- .taskIcon .task-icon {
62
- flex-shrink: 0;
63
- display: block;
64
- width: 4.16667vmin;
65
- height: 4.16667vmin;
66
- background-image: url("https://commonresource-1252524126.cdn.xiaoeknow.com/image/lopok62p0l77.png");
67
- background-size: 100% 100%;
68
- }
69
- .taskIcon .task-text {
70
- width: 4.55729vmin;
71
- height: 1.5625vmin;
72
- line-height: 1.5625vmin;
73
- border-radius: 0.78125vmin;
74
- font-size: 1.04167vmin;
75
- background: rgba(0, 0, 0, 0.4);
76
- color: #fff;
77
- }
78
- .taskIcon.verticalStyle {
79
- margin: 0;
80
- background: rgba(0, 0, 0, 0.2);
81
- }
82
- .taskIcon.verticalStyle .task-text {
83
- position: absolute;
84
- bottom: -0.13021vmin;
85
- }
86
- }
87
- @media screen and (min-height: 768px) and (orientation: landscape) {
88
- .taskIcon {
89
- z-index: 9;
90
- box-sizing: border-box;
91
- width: 4.6875vmin;
92
- height: 4.6875vmin;
93
- text-align: center;
94
- padding: 0;
95
- position: relative;
96
- display: flex;
97
- flex-direction: column;
98
- align-items: center;
99
- font-size: 1.04167vmin;
100
- height: 100%;
101
- border-radius: 1.04167vmin;
102
- margin: 0 2.08333vmin 1.5625vmin 0;
103
- pointer-events: auto;
104
- }
105
- .taskIcon .task-icon {
106
- flex-shrink: 0;
107
- display: block;
108
- width: 4.16667vmin;
109
- height: 4.16667vmin;
110
- background-image: url("https://commonresource-1252524126.cdn.xiaoeknow.com/image/lopok62p0l77.png");
111
- background-size: 100% 100%;
112
- }
113
- .taskIcon .task-text {
114
- width: 4.55729vmin;
115
- height: 1.5625vmin;
116
- line-height: 1.5625vmin;
117
- border-radius: 0.78125vmin;
118
- font-size: 1.04167vmin;
119
- background: rgba(0, 0, 0, 0.4);
120
- color: #fff;
121
- }
122
- .taskIcon.verticalStyle {
123
- margin: 0;
124
- background: rgba(0, 0, 0, 0.2);
125
- }
126
- .taskIcon.verticalStyle .task-text {
127
- position: absolute;
128
- bottom: -0.13021vmin;
129
- }
130
- }
1
+ .taskIcon {
2
+ z-index: 9;
3
+ box-sizing: border-box;
4
+ width: 9.6vmin;
5
+ height: 9.6vmin;
6
+ text-align: center;
7
+ padding: 0;
8
+ position: relative;
9
+ display: flex;
10
+ flex-direction: column;
11
+ align-items: center;
12
+ font-size: 2.13333vmin;
13
+ height: 100%;
14
+ border-radius: 2.13333vmin;
15
+ margin: 0 4.26667vmin 3.2vmin 0;
16
+ pointer-events: auto;
17
+ }
18
+ .taskIcon .task-icon {
19
+ flex-shrink: 0;
20
+ display: block;
21
+ width: 8.53333vmin;
22
+ height: 8.53333vmin;
23
+ background-image: url("https://commonresource-1252524126.cdn.xiaoeknow.com/image/lopok62p0l77.png");
24
+ background-size: 100% 100%;
25
+ }
26
+ .taskIcon .task-text {
27
+ width: 9.33333vmin;
28
+ height: 3.2vmin;
29
+ line-height: 3.2vmin;
30
+ border-radius: 1.6vmin;
31
+ font-size: 2.13333vmin;
32
+ background: rgba(0, 0, 0, 0.4);
33
+ color: #fff;
34
+ }
35
+ .taskIcon.verticalStyle {
36
+ margin: 0;
37
+ background: rgba(0, 0, 0, 0.2);
38
+ }
39
+ .taskIcon.verticalStyle .task-text {
40
+ position: absolute;
41
+ bottom: -0.26667vmin;
42
+ }
43
+ @media screen and (min-width: 768px) and (orientation: portrait) {
44
+ .taskIcon {
45
+ z-index: 9;
46
+ box-sizing: border-box;
47
+ width: 4.6875vmin;
48
+ height: 4.6875vmin;
49
+ text-align: center;
50
+ padding: 0;
51
+ position: relative;
52
+ display: flex;
53
+ flex-direction: column;
54
+ align-items: center;
55
+ font-size: 1.04167vmin;
56
+ height: 100%;
57
+ border-radius: 1.04167vmin;
58
+ margin: 0 2.08333vmin 1.5625vmin 0;
59
+ pointer-events: auto;
60
+ }
61
+ .taskIcon .task-icon {
62
+ flex-shrink: 0;
63
+ display: block;
64
+ width: 4.16667vmin;
65
+ height: 4.16667vmin;
66
+ background-image: url("https://commonresource-1252524126.cdn.xiaoeknow.com/image/lopok62p0l77.png");
67
+ background-size: 100% 100%;
68
+ }
69
+ .taskIcon .task-text {
70
+ width: 4.55729vmin;
71
+ height: 1.5625vmin;
72
+ line-height: 1.5625vmin;
73
+ border-radius: 0.78125vmin;
74
+ font-size: 1.04167vmin;
75
+ background: rgba(0, 0, 0, 0.4);
76
+ color: #fff;
77
+ }
78
+ .taskIcon.verticalStyle {
79
+ margin: 0;
80
+ background: rgba(0, 0, 0, 0.2);
81
+ }
82
+ .taskIcon.verticalStyle .task-text {
83
+ position: absolute;
84
+ bottom: -0.13021vmin;
85
+ }
86
+ }
87
+ @media screen and (min-height: 768px) and (orientation: landscape) {
88
+ .taskIcon {
89
+ z-index: 9;
90
+ box-sizing: border-box;
91
+ width: 4.6875vmin;
92
+ height: 4.6875vmin;
93
+ text-align: center;
94
+ padding: 0;
95
+ position: relative;
96
+ display: flex;
97
+ flex-direction: column;
98
+ align-items: center;
99
+ font-size: 1.04167vmin;
100
+ height: 100%;
101
+ border-radius: 1.04167vmin;
102
+ margin: 0 2.08333vmin 1.5625vmin 0;
103
+ pointer-events: auto;
104
+ }
105
+ .taskIcon .task-icon {
106
+ flex-shrink: 0;
107
+ display: block;
108
+ width: 4.16667vmin;
109
+ height: 4.16667vmin;
110
+ background-image: url("https://commonresource-1252524126.cdn.xiaoeknow.com/image/lopok62p0l77.png");
111
+ background-size: 100% 100%;
112
+ }
113
+ .taskIcon .task-text {
114
+ width: 4.55729vmin;
115
+ height: 1.5625vmin;
116
+ line-height: 1.5625vmin;
117
+ border-radius: 0.78125vmin;
118
+ font-size: 1.04167vmin;
119
+ background: rgba(0, 0, 0, 0.4);
120
+ color: #fff;
121
+ }
122
+ .taskIcon.verticalStyle {
123
+ margin: 0;
124
+ background: rgba(0, 0, 0, 0.2);
125
+ }
126
+ .taskIcon.verticalStyle .task-text {
127
+ position: absolute;
128
+ bottom: -0.13021vmin;
129
+ }
130
+ }
@@ -489,28 +489,28 @@ Component({
489
489
  // 新版商户提现按钮文案
490
490
  withdrawBtnText(taskItem) {
491
491
  const { reward_value } = taskItem
492
+ let unableBtn = true,
493
+ ButtonText = '超时未提现'
492
494
  switch (reward_value.pay_state) {
493
495
  case 0:
494
496
  case 2:
495
497
  case 11:
496
- this.setData({
497
- unableBtn: false,
498
- })
499
- return '立即提现'
498
+ ButtonText = '立即提现'
499
+ unableBtn = false
500
+ break
500
501
  case 5:
501
- this.setData({
502
- unableBtn: true,
503
- })
504
- return '已提现'
502
+ ButtonText = '已提现'
503
+ break
505
504
  case 10:
506
- this.setData({
507
- unableBtn: true,
508
- })
509
- return '超时未提现'
505
+ ButtonText = '超时未提现'
506
+ break
510
507
  default:
511
508
  break
512
509
  }
513
- return '超时未提现'
510
+ this.setData({
511
+ unableBtn,
512
+ })
513
+ return ButtonText
514
514
  },
515
515
  // 打开答题任务答案解析
516
516
  handleAnswerAnalysis() {