|
@@ -13,7 +13,7 @@ import { GetRequest } from '@/utils/index'
|
|
import { getCurrentInstance } from 'vue'
|
|
import { getCurrentInstance } from 'vue'
|
|
|
|
|
|
//得到i18n的locale token, info,
|
|
//得到i18n的locale token, info,
|
|
-const { locale: language, t } = useI18n()
|
|
|
|
|
|
+const { locale: language, t } = useI18n()
|
|
let t1 = null
|
|
let t1 = null
|
|
const route = useRoute()
|
|
const route = useRoute()
|
|
const { isEur, info } = useUserStore()
|
|
const { isEur, info } = useUserStore()
|
|
@@ -24,7 +24,7 @@ let PAYSID = {
|
|
alipay: 1,
|
|
alipay: 1,
|
|
paypal: 2
|
|
paypal: 2
|
|
}
|
|
}
|
|
-const selectedPayType = ref(isEur?'paypal':'alipay')
|
|
|
|
|
|
+const selectedPayType = ref(isEur ? 'paypal' : 'alipay')
|
|
watch(selectedPayType, () => {
|
|
watch(selectedPayType, () => {
|
|
getCode()
|
|
getCode()
|
|
})
|
|
})
|
|
@@ -57,7 +57,11 @@ async function handleQueryOrderStatus() {
|
|
t1 = null
|
|
t1 = null
|
|
t1 && clearInterval(t1)
|
|
t1 && clearInterval(t1)
|
|
showConfirm({
|
|
showConfirm({
|
|
- text: response.autoPay? t('payInfo.autoPayTips') : response.payStatus === 2 ? t('payInfo.payfail') : t('mall.paySuccessTip'),
|
|
|
|
|
|
+ text: response.autoPay
|
|
|
|
+ ? t('payInfo.autoPayTips')
|
|
|
|
+ : response.payStatus === 2
|
|
|
|
+ ? t('payInfo.payfail')
|
|
|
|
+ : t('mall.paySuccessTip'),
|
|
type: response.payStatus === 2 ? 'err' : 'success',
|
|
type: response.payStatus === 2 ? 'err' : 'success',
|
|
callback: () => {
|
|
callback: () => {
|
|
if (response.payStatus === 2) {
|
|
if (response.payStatus === 2) {
|
|
@@ -90,7 +94,7 @@ async function getCode() {
|
|
payType: paysidtype[selectedPayType.value],
|
|
payType: paysidtype[selectedPayType.value],
|
|
openId: ''
|
|
openId: ''
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
- qrCodeUrl.value = res.qrCodeUrl ||res.redirect
|
|
|
|
|
|
+ qrCodeUrl.value = res.qrCodeUrl || res.redirect
|
|
inverRequest()
|
|
inverRequest()
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -112,22 +116,53 @@ async function getCode() {
|
|
</div>
|
|
</div>
|
|
<div class="account">
|
|
<div class="account">
|
|
<span class="label"
|
|
<span class="label"
|
|
- >{{ $t(`mall.${orderDetal.orderType == 'incrementOrder'?'vip':orderDetal.orderType == 'downOrder'?'downdesc':'goqy'}`) }}:
|
|
|
|
- <span v-for="(item,index) in orderDetal.goodsInfo" :key="index" style="margin-right:10px">
|
|
|
|
|
|
+ >{{
|
|
|
|
+ $t(
|
|
|
|
+ `mall.${
|
|
|
|
+ orderDetal.orderType == 'incrementOrder'
|
|
|
|
+ ? 'vip'
|
|
|
|
+ : orderDetal.orderType == 'downOrder'
|
|
|
|
+ ? 'downdesc'
|
|
|
|
+ : 'goqy'
|
|
|
|
+ }`
|
|
|
|
+ )
|
|
|
|
+ }}:
|
|
|
|
+ <span
|
|
|
|
+ v-for="(item, index) in orderDetal.goodsInfo"
|
|
|
|
+ :key="index"
|
|
|
|
+ style="margin-right: 10px"
|
|
|
|
+ >
|
|
<span v-if="item">
|
|
<span v-if="item">
|
|
<span v-if="index != 0">、</span>
|
|
<span v-if="index != 0">、</span>
|
|
- <span style="margin-right:5px" v-if="orderDetal.orderType != 'incrementOrder'">
|
|
|
|
- {{ orderDetal.orderType == 'downOrder'?`${item.name} (${item.sceneNum})`:language === 'zh' ?item.name:item.nameEn }}
|
|
|
|
|
|
+ <span style="margin-right: 5px" v-if="orderDetal.orderType != 'incrementOrder'">
|
|
|
|
+ {{
|
|
|
|
+ orderDetal.orderType == 'downOrder'
|
|
|
|
+ ? `${item.name} (${item.sceneNum})`
|
|
|
|
+ : language === 'zh'
|
|
|
|
+ ? item.name
|
|
|
|
+ : item.nameEn
|
|
|
|
+ }}
|
|
</span>
|
|
</span>
|
|
- <span style="margin-right:5px" v-else>
|
|
|
|
- {{ item.type==1?$t('payInfo.gjhy'):isEur?$t('payInfo.zyhys'):$t('payInfo.zyhy') }}
|
|
|
|
|
|
+ <span style="margin-right: 5px" v-else>
|
|
|
|
+ {{
|
|
|
|
+ item.type == 1
|
|
|
|
+ ? $t('payInfo.gjhy')
|
|
|
|
+ : isEur
|
|
|
|
+ ? $t('payInfo.zyhys')
|
|
|
|
+ : $t('payInfo.zyhy')
|
|
|
|
+ }}
|
|
</span>
|
|
</span>
|
|
- <span v-if="orderDetal.orderType != 'downOrder'">× {{item.count}}</span>
|
|
|
|
- </span>
|
|
|
|
|
|
+ <span v-if="orderDetal.orderType != 'downOrder'">× {{ item.count }}</span>
|
|
|
|
+ </span>
|
|
<!-- <span v-else>1</span> -->
|
|
<!-- <span v-else>1</span> -->
|
|
- <span v-if="orderDetal.orderType == 'incrementOrder'">,{{ item.type==1?$t(`payInfo.expirationmon`,{num:item.monthQy || 1}):$t(`payInfo.expiration`,{num:1}) }}</span>
|
|
|
|
- </span
|
|
|
|
- ></span
|
|
|
|
|
|
+ <span v-if="orderDetal.orderType == 'incrementOrder'"
|
|
|
|
+ >,{{
|
|
|
|
+ item.type == 1
|
|
|
|
+ ? $t(`payInfo.expirationmon`, { num: item.monthQy || 1 })
|
|
|
|
+ : $t(`payInfo.expiration`, { num: 1 })
|
|
|
|
+ }}</span
|
|
|
|
+ >
|
|
|
|
+ </span></span
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
<div class="pay-types">
|
|
<div class="pay-types">
|
|
@@ -160,7 +195,12 @@ async function getCode() {
|
|
@click="selectedPayType = 'paypal'"
|
|
@click="selectedPayType = 'paypal'"
|
|
:class="{ 'is-active': selectedPayType === 'paypal' }"
|
|
:class="{ 'is-active': selectedPayType === 'paypal' }"
|
|
>
|
|
>
|
|
- <img style="height:26px;width:100px" src="@/assets/images/paypal.png" class="t-icon" alt />
|
|
|
|
|
|
+ <img
|
|
|
|
+ style="height: 26px; width: 100px"
|
|
|
|
+ src="@/assets/images/paypal.png"
|
|
|
|
+ class="t-icon"
|
|
|
|
+ alt
|
|
|
|
+ />
|
|
<h-icon type="vip_true" class="select-icon"></h-icon>
|
|
<h-icon type="vip_true" class="select-icon"></h-icon>
|
|
<img src="@/assets/images/vip_true.svg" class="t-click" alt />
|
|
<img src="@/assets/images/vip_true.svg" class="t-click" alt />
|
|
<!-- paypal -->
|
|
<!-- paypal -->
|
|
@@ -168,7 +208,7 @@ async function getCode() {
|
|
</div>
|
|
</div>
|
|
<div class="pay-info">
|
|
<div class="pay-info">
|
|
<p class="label">{{ $t('mall.payNum') }}:</p>
|
|
<p class="label">{{ $t('mall.payNum') }}:</p>
|
|
- <p class="price">{{isEur?'$':'¥'}}{{ orderDetal.orderMoney }}</p>
|
|
|
|
|
|
+ <p class="price">{{ isEur ? '$' : '¥' }}{{ orderDetal.orderMoney }}</p>
|
|
<div class="pay-qrcode" style="min-height: 220px" v-if="!isEur">
|
|
<div class="pay-qrcode" style="min-height: 220px" v-if="!isEur">
|
|
<QrcodeVue
|
|
<QrcodeVue
|
|
v-if="qrCodeUrl"
|
|
v-if="qrCodeUrl"
|
|
@@ -184,7 +224,9 @@ async function getCode() {
|
|
}}
|
|
}}
|
|
</p>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
- <div v-else v-show="qrCodeUrl" class="payment" @click="handlePay">{{ orderDetal.autoPay == 1?$t('payInfo.autoRenew'):$t('payInfo.payOrder') }}</div>
|
|
|
|
|
|
+ <div v-else v-show="qrCodeUrl" class="payment" @click="handlePay">
|
|
|
|
+ {{ orderDetal.autoPay == 1 ? $t('payInfo.autoRenew') : $t('payInfo.payOrder') }}
|
|
|
|
+ </div>
|
|
<div v-show="!isEur" :class="`pay-scan-tip ${language === 'zh' ? '' : 'isEn'}`"></div>
|
|
<div v-show="!isEur" :class="`pay-scan-tip ${language === 'zh' ? '' : 'isEn'}`"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -334,11 +376,11 @@ async function getCode() {
|
|
display: block;
|
|
display: block;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .payment{
|
|
|
|
|
|
+ .payment {
|
|
width: 216px;
|
|
width: 216px;
|
|
height: 55px;
|
|
height: 55px;
|
|
line-height: 55px;
|
|
line-height: 55px;
|
|
- background: #29B2FF;
|
|
|
|
|
|
+ background: #29b2ff;
|
|
margin: 60px auto 0 auto;
|
|
margin: 60px auto 0 auto;
|
|
border-radius: 4px 4px 4px 4px;
|
|
border-radius: 4px 4px 4px 4px;
|
|
opacity: 1;
|
|
opacity: 1;
|
|
@@ -346,7 +388,7 @@ async function getCode() {
|
|
font-size: 16px;
|
|
font-size: 16px;
|
|
font-family: PingFang SC-Regular, PingFang SC;
|
|
font-family: PingFang SC-Regular, PingFang SC;
|
|
font-weight: 400;
|
|
font-weight: 400;
|
|
- color: #FFFFFF;
|
|
|
|
|
|
+ color: #ffffff;
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
.pay-scan-tip {
|
|
.pay-scan-tip {
|