@jetthai/cuora 1.1.132 → 1.1.134
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,10 @@
|
|
|
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.134](https://github.com/jetthai/cuora-module/compare/v1.1.133...v1.1.134) (2023-07-12)
|
|
6
|
+
|
|
7
|
+
### [1.1.133](https://github.com/jetthai/cuora-module/compare/v1.1.132...v1.1.133) (2023-07-06)
|
|
8
|
+
|
|
5
9
|
### [1.1.132](https://github.com/jetthai/cuora-module/compare/v1.1.131...v1.1.132) (2023-07-05)
|
|
6
10
|
|
|
7
11
|
### [1.1.131](https://github.com/jetthai/cuora-module/compare/v1.1.130...v1.1.131) (2023-07-05)
|
package/package.json
CHANGED
|
@@ -77,6 +77,14 @@ export default function (request) {
|
|
|
77
77
|
entry: 'setProgressStatus',
|
|
78
78
|
},
|
|
79
79
|
},
|
|
80
|
+
on: {
|
|
81
|
+
START: {
|
|
82
|
+
target: '.loading',
|
|
83
|
+
},
|
|
84
|
+
STOP: {
|
|
85
|
+
target: '.idle',
|
|
86
|
+
},
|
|
87
|
+
},
|
|
80
88
|
},
|
|
81
89
|
{
|
|
82
90
|
actions: {
|
|
@@ -86,16 +94,17 @@ export default function (request) {
|
|
|
86
94
|
}
|
|
87
95
|
}),
|
|
88
96
|
setActivityDetail: assign((context, event) => {
|
|
97
|
+
const { receiveNo, receiveStatus, achieve, awards, target, turnover, dayOfTheWeek, policy } = event.data
|
|
89
98
|
return {
|
|
90
99
|
activityDetail: event.data,
|
|
91
|
-
receiveNo
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
100
|
+
receiveNo,
|
|
101
|
+
receiveStatus,
|
|
102
|
+
achieve,
|
|
103
|
+
awards,
|
|
104
|
+
target,
|
|
105
|
+
turnover,
|
|
106
|
+
dayOfTheWeek,
|
|
107
|
+
rewardType: policy,
|
|
99
108
|
}
|
|
100
109
|
}),
|
|
101
110
|
setProgressStatus: assign((context, event) => {
|
|
@@ -122,9 +131,6 @@ export default function (request) {
|
|
|
122
131
|
},
|
|
123
132
|
},
|
|
124
133
|
guards: {
|
|
125
|
-
hasActivityNo: (context, event) => {
|
|
126
|
-
return context.activityNo
|
|
127
|
-
},
|
|
128
134
|
isReceived: (context, event) => {
|
|
129
135
|
return context.receiveStatus === 1
|
|
130
136
|
},
|
package/src/machine/common.js
CHANGED
|
@@ -42,6 +42,7 @@ export default function (request) {
|
|
|
42
42
|
channel: null,
|
|
43
43
|
subchannel: null,
|
|
44
44
|
affiliateCode: null,
|
|
45
|
+
friendCode: null,
|
|
45
46
|
},
|
|
46
47
|
states: {
|
|
47
48
|
config: {
|
|
@@ -171,6 +172,7 @@ export default function (request) {
|
|
|
171
172
|
const channel = urlParams.get('channel') || storage.get('channel') || defaultChannel || 'official'
|
|
172
173
|
const subchannel = urlParams.get('subchannel') || storage.get('subchannel') || defaultSubchannel || 'pwa'
|
|
173
174
|
const affiliateCode = urlParams.get('ac') || urlParams.get('referralCode') || storage.get('ac') || storage.get('referralCode')
|
|
175
|
+
const friendCode = urlParams.get('fc') || urlParams.get('affiliate') || storage.get('fc') || storage.get('affiliate')
|
|
174
176
|
|
|
175
177
|
storage.set('channel', channel, {
|
|
176
178
|
path: '/',
|
|
@@ -184,11 +186,16 @@ export default function (request) {
|
|
|
184
186
|
path: '/',
|
|
185
187
|
maxAge: 60 * 60 * 24 * 7,
|
|
186
188
|
})
|
|
189
|
+
storage.set('fc', friendCode, {
|
|
190
|
+
path: '/',
|
|
191
|
+
maxAge: 60 * 60 * 24 * 7,
|
|
192
|
+
})
|
|
187
193
|
|
|
188
194
|
return {
|
|
189
195
|
channel,
|
|
190
196
|
subchannel,
|
|
191
197
|
affiliateCode,
|
|
198
|
+
friendCode,
|
|
192
199
|
}
|
|
193
200
|
}
|
|
194
201
|
}),
|