支付接口调整
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
</div>
|
||||
</div> -->
|
||||
<div v-show="stepNum == 0" class="UpgradePlan_payList">
|
||||
<div v-show="planNum == 0" class="UpgradePlan_payList0">
|
||||
<!-- <div v-show="planNum == 0" class="UpgradePlan_payList0">
|
||||
<div class="UpgradePlan_payList-item" v-for="item in productList">
|
||||
<div class="UpgradePlan_payList-item-price">$99/month</div>
|
||||
<div class="UpgradePlan_payList-item-plan">Pro Plus Plan</div>
|
||||
@@ -53,14 +53,15 @@
|
||||
<div class="UpgradePlan_payList-item-upgrade subitOkPreviewBtn" @click="upgrade(item.id)">UPGRADE NOW</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div v-show="planNum == 2" class="UpgradePlan_payList2">
|
||||
<div class="UpgradePlan_payList-item">
|
||||
<div class="UpgradePlan_payList-item" v-for="item in productList">
|
||||
<div class="UpgradePlan_payList2_img">
|
||||
<img src="https://code-create.com.hk/wp-content/uploads/2022/11/aida_premium_thumb-300x300.jpg" alt="">
|
||||
</div>
|
||||
<div class="UpgradePlan_payList2_name">{{ price.credits * price.num }} {{ $t('upgradePlan.credits') }}</div>
|
||||
<div class="UpgradePlan_payList2_unitPrice">${{ price.price * price.num }} <span @click="setUnit">HKD</span></div>
|
||||
<div class="UpgradePlan_payList2_name">{{ item.credits * price.num }} {{ $t('upgradePlan.credits') }}</div>
|
||||
<div class="UpgradePlan_payList2_unitPrice">${{ item.price * price.num }} <span @click="setUnit">HKD</span></div>
|
||||
<div class="UpgradePlan_payList2_input">
|
||||
<div class="UpgradePlan_payList2_input_remo" @click="removePriceNum">-</div>
|
||||
<input type="number" v-model="price.num">
|
||||
@@ -99,7 +100,7 @@
|
||||
</div>
|
||||
<div class="UpgradePlan_payList_item_upgrade_btn">
|
||||
<div class="UpgradePlan_payList_item_upgrade1 subitOkPreviewBtn" @click="cancel">{{ $t('upgradePlan.Cancel') }}</div>
|
||||
<!-- <div class="UpgradePlan_payList_item_upgrade2 subitOkPreviewBtn" @click="payment">{{ $t('upgradePlan.Payment') }}</div> -->
|
||||
<div class="UpgradePlan_payList_item_upgrade2 subitOkPreviewBtn" @click="payment">{{ $t('upgradePlan.Payment') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mark_loading bgFFF" v-show="isShowMark">
|
||||
@@ -142,7 +143,7 @@ export default defineComponent({
|
||||
})
|
||||
let modeOfPayment = ref('paypal')
|
||||
let clause = ref(false)//同意条款
|
||||
let productList = ref([])
|
||||
let productList:any = ref([])
|
||||
let payIndex = ref(0)
|
||||
let isShowMark = ref(false)
|
||||
let newWindow:any = ref()
|
||||
|
||||
@@ -32,7 +32,7 @@ export default {
|
||||
Expend:'Expend',
|
||||
},
|
||||
payOrder:{
|
||||
|
||||
|
||||
OrderInformation:'Order Information',
|
||||
CreditsInformation:'Credits Information',
|
||||
},
|
||||
@@ -60,7 +60,7 @@ export default {
|
||||
|
||||
},
|
||||
upgradePlan:{
|
||||
BuyCredlts:'Buy credlts',
|
||||
BuyCredlts:'Buy credits',
|
||||
credits:'credits',
|
||||
organization:'All credits are shared within the name organization',
|
||||
Continue:'Continue',
|
||||
|
||||
@@ -23,9 +23,19 @@ function WriteCookie(name) {
|
||||
document.cookie = "expires=" + now.toUTCString() + ";Path=/";
|
||||
// document.write("Setting Cookies : " + "name=" + cookievalue );
|
||||
}
|
||||
|
||||
function clonAllCookie(){
|
||||
var cookies = document.cookie.split(";");
|
||||
|
||||
for (var i = 0; i < cookies.length; i++) {
|
||||
var cookie = cookies[i];
|
||||
var eqPos = cookie.indexOf("=");
|
||||
var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
|
||||
document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
|
||||
}
|
||||
}
|
||||
export {
|
||||
setCookie,
|
||||
getCookie,
|
||||
WriteCookie
|
||||
WriteCookie,
|
||||
clonAllCookie
|
||||
}
|
||||
@@ -2,7 +2,7 @@ import axios from 'axios'
|
||||
// import qs from 'qs'
|
||||
// import message from '@/components/public/message/src'
|
||||
import router from '@/router/index'
|
||||
import {getCookie} from '@/tool/cookie'
|
||||
import {getCookie,clonAllCookie} from '@/tool/cookie'
|
||||
// import cookie from '@/tools/cookie.js'
|
||||
|
||||
axios.defaults.timeout = 60000; //响应时间
|
||||
@@ -87,6 +87,7 @@ axios.interceptors.response.use((res) =>{
|
||||
}, function(error) {
|
||||
if(error?.response?.status === 401 && router.currentRoute._value.name != 'setIdentification'){//如果是记录浏览器页面就不跳转login
|
||||
router.replace('/login')
|
||||
clonAllCookie()
|
||||
return Promise.reject()
|
||||
}
|
||||
let data_new = error?.response?.data
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
<script >
|
||||
import { defineComponent, createVNode, ref, computed } from "vue";
|
||||
import { isEmail } from "@/tool/util";
|
||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||
import { setCookie, getCookie, WriteCookie,clonAllCookie } from "@/tool/cookie";
|
||||
import payOrder from "@/component/Pay/payOrder.vue";
|
||||
import VerificationCodeInput from "@/component/LoginPage/verificationCodeInput.vue";
|
||||
import Habit from "@/component/Detail/habit.vue";
|
||||
@@ -280,7 +280,7 @@ export default defineComponent({
|
||||
});
|
||||
this.$router.replace("/login");
|
||||
}
|
||||
WriteCookie("token");
|
||||
// WriteCookie("token");
|
||||
// window.location.reload()
|
||||
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user