mirror of https://github.com/certd/certd
chore:
parent
dcc8c56969
commit
92f42154d5
|
@ -6,6 +6,6 @@ export async function Notify(type: string, query: any) {
|
||||||
url: apiPrefix + `/notify/${type}`,
|
url: apiPrefix + `/notify/${type}`,
|
||||||
method: "post",
|
method: "post",
|
||||||
data: query,
|
data: query,
|
||||||
unpack: false
|
unpack: false,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ check();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
function goHome() {
|
function goHome() {
|
||||||
router.push({
|
router.push({
|
||||||
path: "/"
|
path: "/",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -61,7 +61,7 @@ const paymentsDictRef = dict({
|
||||||
if (dict.data.length > 0) {
|
if (dict.data.length > 0) {
|
||||||
formRef.value.payType = dict.data[0].value;
|
formRef.value.payType = dict.data[0].value;
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
@ -73,10 +73,10 @@ async function orderCreate() {
|
||||||
productId: formRef.value.productId,
|
productId: formRef.value.productId,
|
||||||
duration: formRef.value.duration,
|
duration: formRef.value.duration,
|
||||||
num: formRef.value.num ?? 1,
|
num: formRef.value.num ?? 1,
|
||||||
payType: "free"
|
payType: "free",
|
||||||
});
|
});
|
||||||
notification.success({
|
notification.success({
|
||||||
message: "套餐购买成功"
|
message: "套餐购买成功",
|
||||||
});
|
});
|
||||||
openRef.value = false;
|
openRef.value = false;
|
||||||
return;
|
return;
|
||||||
|
@ -84,7 +84,7 @@ async function orderCreate() {
|
||||||
|
|
||||||
if (!formRef.value.payType) {
|
if (!formRef.value.payType) {
|
||||||
notification.error({
|
notification.error({
|
||||||
message: "请选择支付方式"
|
message: "请选择支付方式",
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -92,13 +92,13 @@ async function orderCreate() {
|
||||||
productId: formRef.value.productId,
|
productId: formRef.value.productId,
|
||||||
duration: formRef.value.duration,
|
duration: formRef.value.duration,
|
||||||
num: formRef.value.num ?? 1,
|
num: formRef.value.num ?? 1,
|
||||||
payType: formRef.value.payType
|
payType: formRef.value.payType,
|
||||||
});
|
});
|
||||||
|
|
||||||
async function onPaid() {
|
async function onPaid() {
|
||||||
openRef.value = false;
|
openRef.value = false;
|
||||||
router.push({
|
router.push({
|
||||||
path: "/"
|
path: "/",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ async function orderCreate() {
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
notification.error({
|
notification.error({
|
||||||
message: "暂不支持该支付方式"
|
message: "暂不支持该支付方式",
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -128,7 +128,7 @@ async function orderCreate() {
|
||||||
onPaid();
|
onPaid();
|
||||||
},
|
},
|
||||||
cancelText: "取消支付",
|
cancelText: "取消支付",
|
||||||
okText: "已完成支付"
|
okText: "已完成支付",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ async function doWxpay(qrcodeText: string, onPaid: () => Promise<void>) {
|
||||||
},
|
},
|
||||||
async onOk() {
|
async onOk() {
|
||||||
await onPaid();
|
await onPaid();
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ function doYizhifu(paymentReq: any) {
|
||||||
|
|
||||||
const body = paymentReq.body;
|
const body = paymentReq.body;
|
||||||
const keys = Object.keys(body);
|
const keys = Object.keys(body);
|
||||||
keys.forEach((key) => {
|
keys.forEach(key => {
|
||||||
createInput(key, body[key]);
|
createInput(key, body[key]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ function doYizhifu(paymentReq: any) {
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
open
|
open,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
|
|
Loading…
Reference in New Issue