|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="overlay" v-if="visible">
|
|
|
<div class="content"
|
|
|
- :style="{height: showPreview ? previewDialogHeight + 'px' : dialogHeight +'px' }">
|
|
|
+ :style="{height: dialogHeight +'px' }">
|
|
|
<div class="head">
|
|
|
<div class="left">
|
|
|
<div class="close-btn" @click="close">
|
|
@@ -157,7 +157,6 @@ let visible = ref(false);
|
|
|
let showPreview = ref(false);
|
|
|
let openAntiBot = ref(false);
|
|
|
let dialogHeight = ref(680);
|
|
|
-let previewDialogHeight = ref(680);
|
|
|
let submitIng = ref(false);
|
|
|
let atUserList = ref([]);
|
|
|
let iptErrMsgTxt = ref('');
|
|
@@ -228,14 +227,14 @@ const close = () => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-// const setPreviewDialogHeight = () => {
|
|
|
-// let clientHeight = document.documentElement.clientHeight;
|
|
|
-// let gapSafe = 40;
|
|
|
+const setDialogHeight = () => {
|
|
|
+ let clientHeight = document.documentElement.clientHeight;
|
|
|
+ let gapSafe = 40;
|
|
|
|
|
|
-// if(previewDialogHeight.value > clientHeight - gapSafe) {
|
|
|
-// previewDialogHeight.value = clientHeight - gapSafe;
|
|
|
-// }
|
|
|
-// };
|
|
|
+ if(dialogHeight.value > clientHeight - gapSafe) {
|
|
|
+ dialogHeight.value = clientHeight - gapSafe;
|
|
|
+ }
|
|
|
+};
|
|
|
|
|
|
const getPayAmount = (amountValue, cb) => {
|
|
|
payCalcFee({
|
|
@@ -361,15 +360,33 @@ const payPalFinsh = (params) => {
|
|
|
loadingInstance.close();
|
|
|
if(res.code == 0) {
|
|
|
//支付状态 0:未支付,1:支付成功,2:支付失败,3:已关闭,4:已退款
|
|
|
- if(res.data && res.data.payStatus == 1) {
|
|
|
- emits("payPalFinsh", {publishRes});
|
|
|
- showPreview.value = false;
|
|
|
- initParams();
|
|
|
- } else {
|
|
|
- ElMessage({
|
|
|
- message: 'pay error',
|
|
|
- type: 'warning',
|
|
|
- })
|
|
|
+ if(res.data) {
|
|
|
+ let payStatus = res.data.payStatus;
|
|
|
+ switch (payStatus) {
|
|
|
+ case 1:
|
|
|
+ emits("payPalFinsh", {publishRes});
|
|
|
+ showPreview.value = false;
|
|
|
+ initParams();
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ ElMessage({
|
|
|
+ message: 'Pay Fail',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ ElMessage({
|
|
|
+ message: 'Pay Exceptions',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ ElMessage({
|
|
|
+ message: 'Pay Exceptions',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}).catch(() => {
|
|
@@ -466,8 +483,8 @@ const setFrontConfig = () => {
|
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
|
- // setPreviewDialogHeight();
|
|
|
setFrontConfig();
|
|
|
+ setDialogHeight();
|
|
|
setPayConfig();
|
|
|
document.onkeydown = function(e){
|
|
|
var keyNum=window.event ? e.keyCode :e.which;
|