From 39f9567d79ca06aa82edf95f3954c4322bf1fb20 Mon Sep 17 00:00:00 2001 From: chutingting Date: Thu, 9 Nov 2023 18:31:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=BA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/createVideo.js | 5 +- src/apis/myStore.js | 42 ++++++++- src/layout/index.vue | 2 +- src/router/index.ts | 11 +++ src/types/components.d.ts | 1 + src/views/createVideo/index.vue | 5 ++ src/views/my/coindeduc.vue | 147 ++++++++++++++++++++++++++++++++ src/views/my/detail.vue | 11 +++ src/views/my/recharge.vue | 2 +- src/views/myStore/index.vue | 43 ++++++---- 10 files changed, 250 insertions(+), 19 deletions(-) create mode 100644 src/views/my/coindeduc.vue diff --git a/src/apis/createVideo.js b/src/apis/createVideo.js index 7b807e0..d4ed101 100644 --- a/src/apis/createVideo.js +++ b/src/apis/createVideo.js @@ -175,7 +175,10 @@ export function createVideoApi(id) { return request({ url: `/api/userVideo/createVideo`, method: 'post', - data: { id } + data: { + id, + projectType: '2' + } }) } diff --git a/src/apis/myStore.js b/src/apis/myStore.js index 8fc2988..becad14 100644 --- a/src/apis/myStore.js +++ b/src/apis/myStore.js @@ -8,9 +8,49 @@ import request from "@/utils/request.js"; */ export function packageInfoApi() { return request({ - url: `/api/user/getPackageInfo`, + url: `/api/product/list_v1?type=2&projectType=2`, // /api/user/getPackageInfo method: 'get' }) } +/** + * @description 订单详情 + * @params + * @returns + */ +export function orderDetailApi(id) { + return request({ + url: `/api/productOrder/findByNumber?id=${id}`, + method: 'get' + }) +} + + + +/** + * @description 创建支付 + * @params + * @returns + */ +export function createPayApi(data) { + return request({ + url: `/api/productOrder/createPay`, + method: 'post', + data + }) +} + + +/** + * @description 创建支付 + * @params + * @returns + */ +export function findStatusApi(data) { + return request({ + url: `/api/productOrder/findStatus?orderNumber=${data.orderNumber}&payVendor=${data.payVendor}`, + method: 'get' + }) +} + diff --git a/src/layout/index.vue b/src/layout/index.vue index 4444507..f32c38e 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -73,7 +73,7 @@ 充值订单 - 扣币订单 + 扣币订单 diff --git a/src/router/index.ts b/src/router/index.ts index 8620b50..c1d1214 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -141,6 +141,17 @@ export const constantRoutes: RouteRecordRaw[] = [ name: "my.title", }, }, + { + path: "/coindeduc", + component: () => import("@/views/my/coindeduc.vue"), + name: "coindeduc", + meta: { + title: "coindeduc", + icon: "homepage", + affix: true, + name: "my.title", + }, + }, ], }, { diff --git a/src/types/components.d.ts b/src/types/components.d.ts index 612d2d7..c5f876f 100644 --- a/src/types/components.d.ts +++ b/src/types/components.d.ts @@ -34,6 +34,7 @@ declare module '@vue/runtime-core' { ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] + ElText: typeof import('element-plus/es')['ElText'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] ElUpload: typeof import('element-plus/es')['ElUpload'] GithubCorner: typeof import('./../components/GithubCorner/index.vue')['default'] diff --git a/src/views/createVideo/index.vue b/src/views/createVideo/index.vue index c008af7..ec15c44 100644 --- a/src/views/createVideo/index.vue +++ b/src/views/createVideo/index.vue @@ -1635,6 +1635,11 @@ async function createVideo() { ); await saveOrUpdate("isCreate"); const res2 = await createVideoApi(workId.value); + // 去充值 + if (res2.code === '64001') { + router.push("/myStore"); + return + } ElMessage.success( lanChange.value == "zh-cn" ? `视频生成中,请稍后!` diff --git a/src/views/my/coindeduc.vue b/src/views/my/coindeduc.vue new file mode 100644 index 0000000..4e49d0e --- /dev/null +++ b/src/views/my/coindeduc.vue @@ -0,0 +1,147 @@ + + + + + + diff --git a/src/views/my/detail.vue b/src/views/my/detail.vue index e69de29..52c90c2 100644 --- a/src/views/my/detail.vue +++ b/src/views/my/detail.vue @@ -0,0 +1,11 @@ + + + diff --git a/src/views/my/recharge.vue b/src/views/my/recharge.vue index 6c577ca..4e49d0e 100644 --- a/src/views/my/recharge.vue +++ b/src/views/my/recharge.vue @@ -85,7 +85,7 @@ const handleCurrentChange = (val) => { const getListData = async (PageNum, PageSize) => { try { let data = { - projectType: '', + projectType: 1, pageNum: 1, pageSize: 10 } diff --git a/src/views/myStore/index.vue b/src/views/myStore/index.vue index 712f9ea..a3ca55f 100644 --- a/src/views/myStore/index.vue +++ b/src/views/myStore/index.vue @@ -3,30 +3,34 @@
-
+ + +
- {{ lanChange == "zh-cn" ? item.typeDesc : item.englishName }} + {{ item.title }}
{{ - lanChange == "zh-cn" ? item.rmb + "¥" : item.dollar + "$" - }}/{{ item.validityDuration }}{{ $t("shop.day") }} + item.sellPriceRmb + }} ¥/ 原价{{ item.priceRmb }}
- {{ item.credit }}{{ $t("shop.score") }} + 币值{{ item.glod }}
-
+ 方案选择 +
+
-
+
+ -
+