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