@jetthai/cuora 1.1.329 → 1.1.330-dev-2
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.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.1.330-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.330-1...v1.1.330-dev-2) (2024-12-18)
|
|
6
|
+
|
|
7
|
+
### [1.1.330-1](https://github.com/jetthai/cuora-module/compare/v1.1.330...v1.1.330-1) (2024-12-18)
|
|
8
|
+
|
|
9
|
+
### [1.1.330](https://github.com/jetthai/cuora-module/compare/v1.1.329...v1.1.330) (2024-12-11)
|
|
10
|
+
|
|
5
11
|
### [1.1.329](https://github.com/jetthai/cuora-module/compare/v1.1.328...v1.1.329) (2024-12-10)
|
|
6
12
|
|
|
7
13
|
### [1.1.328](https://github.com/jetthai/cuora-module/compare/v1.1.327...v1.1.328) (2024-12-09)
|
package/package.json
CHANGED
package/src/api/activity.js
CHANGED
|
@@ -102,4 +102,9 @@ export default {
|
|
|
102
102
|
getInstantRebateCollectTime: () => ({ url: 'activities/rebate/collectTime', method: 'get' }),
|
|
103
103
|
instantRebateEstimate: () => ({ url: 'activities/rebate/estimate', method: 'get' }),
|
|
104
104
|
instantRebateCollect: () => ({ url: 'activities/rebate/collect', method: 'get' }),
|
|
105
|
+
instantRebateHistory: ({ startDate, endDate, appSecret }) => ({
|
|
106
|
+
url: 'activities/rebate/history',
|
|
107
|
+
method: 'post',
|
|
108
|
+
params: { startDate, endDate, appSecret },
|
|
109
|
+
}),
|
|
105
110
|
}
|
|
@@ -6,6 +6,7 @@ export default function (request) {
|
|
|
6
6
|
{
|
|
7
7
|
id: 'instant_rebate_activity',
|
|
8
8
|
context: {
|
|
9
|
+
rebateCycle: null,
|
|
9
10
|
showColletButton: false,
|
|
10
11
|
estimateStartTime: null,
|
|
11
12
|
estimateEndTime: null,
|
|
@@ -13,7 +14,9 @@ export default function (request) {
|
|
|
13
14
|
lastEstimateTime: null,
|
|
14
15
|
collectAvailable: false,
|
|
15
16
|
cumulativeValidTurnover: null,
|
|
17
|
+
weekCumulativeValidTurnover: null,
|
|
16
18
|
cumulativeRebateAmount: null,
|
|
19
|
+
weekCumulativeRebateAmount: null,
|
|
17
20
|
actualRebateAmount: null,
|
|
18
21
|
rewardType: null,
|
|
19
22
|
singleMinimumAmountReceive: null,
|
|
@@ -111,32 +114,40 @@ export default function (request) {
|
|
|
111
114
|
}),
|
|
112
115
|
setEstimateResult: assign((context, event) => {
|
|
113
116
|
const {
|
|
117
|
+
rebateCycle = null,
|
|
114
118
|
showColletButton = false,
|
|
115
119
|
estimateStartTime = 0,
|
|
116
120
|
estimateEndTime = 0,
|
|
117
121
|
lastCollectTime = 0,
|
|
118
122
|
collectAvailable = false,
|
|
119
123
|
cumulativeValidTurnover = '0',
|
|
124
|
+
weekCumulativeValidTurnover = '0',
|
|
120
125
|
cumulativeRebateAmount = '0',
|
|
126
|
+
weekCumulativeRebateAmount = '0',
|
|
121
127
|
actualRebateAmount = '0',
|
|
122
128
|
rewardType = null,
|
|
123
129
|
singleMinimumAmountReceive = 0,
|
|
130
|
+
dailyMaximumAmountReceive = 0,
|
|
124
131
|
remainingCount = 0,
|
|
125
132
|
dailyRedemptionLimit = 0,
|
|
126
133
|
reachedAmountLimit = false,
|
|
127
134
|
} = event.data
|
|
128
135
|
|
|
129
136
|
return {
|
|
137
|
+
rebateCycle,
|
|
130
138
|
showColletButton,
|
|
131
139
|
estimateStartTime,
|
|
132
140
|
estimateEndTime,
|
|
133
141
|
lastCollectTime,
|
|
134
142
|
collectAvailable,
|
|
135
143
|
cumulativeValidTurnover,
|
|
144
|
+
weekCumulativeValidTurnover,
|
|
136
145
|
cumulativeRebateAmount,
|
|
146
|
+
weekCumulativeRebateAmount,
|
|
137
147
|
actualRebateAmount,
|
|
138
148
|
rewardType,
|
|
139
149
|
singleMinimumAmountReceive,
|
|
150
|
+
dailyMaximumAmountReceive,
|
|
140
151
|
remainingCount,
|
|
141
152
|
dailyRedemptionLimit,
|
|
142
153
|
reachedAmountLimit,
|
|
@@ -102,8 +102,16 @@ export default function (request, context) {
|
|
|
102
102
|
context.callback(event.data.type)
|
|
103
103
|
},
|
|
104
104
|
setDuration: assign((context, event) => {
|
|
105
|
+
let endTime = 0
|
|
106
|
+
if (context?.activityDetail?.taskTimer) {
|
|
107
|
+
const taskTimer = context?.activityDetail?.taskTimer * 60 * 60 * 1000
|
|
108
|
+
const registerTime = context?.activityDetail?.registerTime
|
|
109
|
+
endTime = (taskTimer + registerTime) / 1000
|
|
110
|
+
} else {
|
|
111
|
+
endTime = context?.activityDetail?.activityEndTime
|
|
112
|
+
}
|
|
105
113
|
return {
|
|
106
|
-
duration: Math.max(
|
|
114
|
+
duration: Math.max(endTime - new Date().getTime() / 1000, 0),
|
|
107
115
|
}
|
|
108
116
|
}),
|
|
109
117
|
},
|