|
@@ -9,7 +9,6 @@ import { useRouter } from 'vue-router';
|
|
|
import bridge from 'dsbridge';
|
|
|
import * as axios from 'axios';
|
|
|
// import eruda from "eruda";
|
|
|
-
|
|
|
import { Toast,Popup,Dialog } from 'vant';
|
|
|
import * as $lib from '@/util/lib.js';
|
|
|
import { RaffleRotate } from '@/util/rafflerotating.js';
|
|
@@ -64,7 +63,10 @@ const toastText = ref('');
|
|
|
const toastType = ref('error');
|
|
|
|
|
|
const wheelActive = ref(0);
|
|
|
-
|
|
|
+let coincode2 =bridge.call('getCurrenciesCode ');
|
|
|
+// ZAR,USD,CAD,AUD,GBP,EUR
|
|
|
+// coincode2 = "EUR";
|
|
|
+// console.log('coincode2----',coincode2);
|
|
|
// 单个 ref
|
|
|
watch(showToast, (newX) => {
|
|
|
if(newX) {
|
|
@@ -84,10 +86,10 @@ onMounted(function() {
|
|
|
});
|
|
|
|
|
|
function init() {
|
|
|
- requestProductList().then((res) => {
|
|
|
+ requestProductList(coincode2).then((res) => {
|
|
|
pickedProductList.value = res.data.product;
|
|
|
});
|
|
|
- getPrize().then((res) => {
|
|
|
+ getPrize({code:coincode2}).then((res) => {
|
|
|
console.log('getPrize res-- ', res);
|
|
|
prizeList.value = res.data.prize;
|
|
|
activityId.value = res.data.id;
|
|
@@ -353,17 +355,18 @@ function setTitle(title) {
|
|
|
return bridge.call('provide_title',title);
|
|
|
}
|
|
|
// 获取产品列表
|
|
|
-function requestProductList() {
|
|
|
+function requestProductList(data) {
|
|
|
return getCategoryProduct({
|
|
|
entity_id: 224,
|
|
|
page: 1,
|
|
|
size: 10,
|
|
|
- order: 'position'
|
|
|
+ order: 'position',
|
|
|
+ code:data
|
|
|
});
|
|
|
}
|
|
|
// 获取活动奖品
|
|
|
-function getPrize() {
|
|
|
- return getRaffle();
|
|
|
+function getPrize(data) {
|
|
|
+ return getRaffle(data);
|
|
|
}
|
|
|
// 获取中奖纪录
|
|
|
function getPrizeUserList(id) {
|
|
@@ -407,7 +410,7 @@ function shareRequest(id) {
|
|
|
:data-title="prize.title"
|
|
|
>
|
|
|
<span v-if="prize.title === 'Thanks'" class="lucky-wheel-item-title">{{prize.title}}</span>
|
|
|
- <span v-else-if="prize.price" class="lucky-wheel-item-title">{{prize.price}}</span>
|
|
|
+ <span v-else-if="prize.price" class="lucky-wheel-item-title" :data-country="prize.title=='Points' ? '':coincode2" >{{prize.price}}</span>
|
|
|
<span v-if="prize.title && prize.title !== 'Thanks'" class="lucky-wheel-item-label">{{prize.title}}</span>
|
|
|
<span v-else-if="prize.title === 'Thanks'" class="lucky-wheel-item-title"> </span>
|
|
|
</div>
|
|
@@ -546,11 +549,11 @@ function shareRequest(id) {
|
|
|
</div>
|
|
|
<div class="lucky-wheel-modal-coupon-right">
|
|
|
<div class="lucky-wheel-modal-cinfo">
|
|
|
- <div class="lucky-wheel-modal-cinfo-title">{{raffleResult.prize.price}} OFF</div>
|
|
|
+ <div class="lucky-wheel-modal-cinfo-title" :data-country="coincode2" >{{raffleResult.prize.price}} OFF</div>
|
|
|
<div class="lucky-wheel-modal-cinfo-tips">* Valid 7 Days</div>
|
|
|
</div>
|
|
|
<div class="lucky-wheel-modal-ccode">
|
|
|
- <span>CODE: {{raffleResult.prize.code}}</span>
|
|
|
+ <span>DISCOUNT</span>
|
|
|
</div>
|
|
|
<div class="dot top"></div>
|
|
|
<div class="dot bottom"></div>
|