@wikala/spmkt 2.20.4 → 2.21.1
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.
|
@@ -162,7 +162,7 @@ export default {
|
|
|
162
162
|
},
|
|
163
163
|
|
|
164
164
|
methods: {
|
|
165
|
-
...mapMutations(['setActiveStep', 'setCreditCard', 'setCardToken', 'setBillingAddress', 'setRecaptchaToken', 'setIdempotencyKey', 'setPaymentMethod']),
|
|
165
|
+
...mapMutations(['setActiveStep', 'setCreditCard', 'setCardToken', 'setBillingAddress', 'setRecaptchaToken', 'setIdempotencyKey', 'setPaymentMethod', 'setAffiliate']),
|
|
166
166
|
|
|
167
167
|
...mapActions(['getAddresses']),
|
|
168
168
|
|
|
@@ -215,10 +215,19 @@ export default {
|
|
|
215
215
|
//return true
|
|
216
216
|
},
|
|
217
217
|
|
|
218
|
+
setAffiliateData() {
|
|
219
|
+
let affiliateData = null
|
|
220
|
+
try {
|
|
221
|
+
affiliateData = JSON.parse(localStorage.getItem('__ref__'))
|
|
222
|
+
this.setAffiliate(affiliateData)
|
|
223
|
+
} catch(e) {}
|
|
224
|
+
},
|
|
225
|
+
|
|
218
226
|
async submitPayment() {
|
|
219
227
|
this.isLoading = true
|
|
220
228
|
const cqLoading = this.$buefy.loading.open()
|
|
221
229
|
|
|
230
|
+
this.setAffiliateData()
|
|
222
231
|
await this.paymentGetRecaptchaToken()
|
|
223
232
|
if(!this.recaptchaToken) {
|
|
224
233
|
this.$buefy.dialog.alert({
|
|
@@ -161,6 +161,10 @@ export default {
|
|
|
161
161
|
|
|
162
162
|
setDeliveryMethodId(state, deliveryMethodId) {
|
|
163
163
|
state.checkoutRequestData.delivery_method_id = deliveryMethodId
|
|
164
|
+
},
|
|
165
|
+
|
|
166
|
+
setAffiliate(state, affiliateData) {
|
|
167
|
+
state.checkoutRequestData.affiliate = affiliateData
|
|
164
168
|
}
|
|
165
169
|
|
|
166
170
|
}
|