@jetthai/cuora 1.0.9 → 1.0.10
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 +2 -0
- package/package.json +1 -1
- package/plugin/payment.js +10 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
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.0.10](https://github.com/jetthai/cuora-module/compare/v1.0.9...v1.0.10) (2021-08-13)
|
|
6
|
+
|
|
5
7
|
### [1.0.9](https://github.com/jetthai/cuora-module/compare/v1.0.8...v1.0.9) (2021-08-11)
|
|
6
8
|
|
|
7
9
|
### [1.0.8](https://github.com/jetthai/cuora-module/compare/v1.0.7...v1.0.8) (2021-08-10)
|
package/package.json
CHANGED
package/plugin/payment.js
CHANGED
|
@@ -8,7 +8,11 @@ const api = {
|
|
|
8
8
|
getReward: (data) => ({ url: 'activities/rewards', method: 'post', params: data }),
|
|
9
9
|
getRewardList: ({ count, appSecret }) => ({ url: 'activities/rewards', method: 'get', params: { count, appSecret } }),
|
|
10
10
|
getPaymentInfo: () => ({ url: `payment/paymentInfo`, method: 'get' }),
|
|
11
|
-
updatePaymentInfo: (
|
|
11
|
+
updatePaymentInfo: ({ bankCode, bankAccount, firstNameTh, lastNameTh, firstNameEn, lastNameEn, bonus, paymentProvider }) => ({
|
|
12
|
+
url: 'payment/updatePaymentInfo',
|
|
13
|
+
method: 'post',
|
|
14
|
+
params: { bankCode, bankAccount, firstNameTh, lastNameTh, firstNameEn, lastNameEn, bonus, paymentProvider }
|
|
15
|
+
}),
|
|
12
16
|
getBankList: (paymentMethod) => ({ url: `payment/${paymentMethod}/getBankList`, method: 'get' }),
|
|
13
17
|
makeTransaction: ({ type, payload, paymentMethod }) => ({
|
|
14
18
|
url: `payment/${paymentMethod}/transaction`,
|
|
@@ -151,7 +155,7 @@ function createStore({ $request }) {
|
|
|
151
155
|
}
|
|
152
156
|
},
|
|
153
157
|
async updatePaymentInfo({ dispatch }, payload) {
|
|
154
|
-
const data = $
|
|
158
|
+
const data = $request.sendWithLoading(api.updatePaymentInfo(payload))
|
|
155
159
|
await dispatch('core/fetchUserInfo', null, { root: true })
|
|
156
160
|
return data
|
|
157
161
|
},
|
|
@@ -209,23 +213,23 @@ function createStore({ $request }) {
|
|
|
209
213
|
}
|
|
210
214
|
},
|
|
211
215
|
async collect({ commit, dispatch }, activityNo) {
|
|
212
|
-
const { data } = await $
|
|
216
|
+
const { data } = await $request.sendWithLoading(api.collect({ appSecret: clientSecret }))
|
|
213
217
|
await dispatch('getActivityDetail', activityNo, { root: true })
|
|
214
218
|
},
|
|
215
219
|
async setBonusSetting({ commit, dispatch }, data) {
|
|
216
|
-
return await $
|
|
220
|
+
return await $request.sendWithLoading(api.setBonusSetting({ bonus: data }))
|
|
217
221
|
},
|
|
218
222
|
async getCurrentWithdrawRule({ commit, dispatch }) {
|
|
219
223
|
const currentRule = await $request.send(api.getCurrentWithdrawRule())
|
|
220
224
|
return ruleFormatter(currentRule.rules)
|
|
221
225
|
},
|
|
222
226
|
async convertFreeCredit({ dispatch }, exchangeType) {
|
|
223
|
-
const convertResult = await $
|
|
227
|
+
const convertResult = await $request.sendWithLoading(api.convertFreeCredit({ exchangeType }))
|
|
224
228
|
await dispatch('core/fetchUserInfo', null, { root: true })
|
|
225
229
|
return convertResult
|
|
226
230
|
},
|
|
227
231
|
async mergeWallet({ dispatch }) {
|
|
228
|
-
const convertResult = await $
|
|
232
|
+
const convertResult = await $request.sendWithLoading(api.mergeWallet())
|
|
229
233
|
await dispatch('core/fetchUserInfo', null, { root: true })
|
|
230
234
|
return convertResult
|
|
231
235
|
},
|