@@ -175,7 +175,10 @@ export function createVideoApi(id) { | |||
return request({ | |||
url: `/api/userVideo/createVideo`, | |||
method: 'post', | |||
data: { id } | |||
data: { | |||
id, | |||
projectType: '2' | |||
} | |||
}) | |||
} | |||
@@ -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' | |||
}) | |||
} | |||
@@ -73,7 +73,7 @@ | |||
</template> | |||
<el-menu-item-group> | |||
<el-menu-item index="2-1" @click="router.push('/myRecharge')">充值订单</el-menu-item> | |||
<el-menu-item index="2-2">扣币订单</el-menu-item> | |||
<el-menu-item index="2-2" @click="router.push('/coindeduc')">扣币订单</el-menu-item> | |||
</el-menu-item-group> | |||
</el-sub-menu> | |||
</el-menu> | |||
@@ -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", | |||
}, | |||
}, | |||
], | |||
}, | |||
{ | |||
@@ -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'] | |||
@@ -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" | |||
? `视频生成中,请稍后!` | |||
@@ -0,0 +1,147 @@ | |||
<template> | |||
<div class="page justify-around"> | |||
<el-alert :title="`当前币值:${currentValue}`" type="success" :closable="false" /> | |||
<el-table :data="tableData" style="width: 100%; height: 90%" size="large" align="center" border> | |||
<el-table-column | |||
prop="title" | |||
label="名称" | |||
align="center" | |||
/> | |||
<el-table-column | |||
prop="address" | |||
label="图片" | |||
align="center" | |||
/> | |||
<el-table-column | |||
prop="createTime" | |||
label="创建时间" | |||
align="center" | |||
> | |||
<template #default="scope"> | |||
{{ getDate(scope.row.createTime) }} | |||
</template> | |||
</el-table-column> | |||
<el-table-column | |||
fixed="right" | |||
:label="$t('keyMangage.operations')" | |||
width="400" | |||
align="center" | |||
> | |||
<template #default="scope"> | |||
<el-button link type="primary" size="small">查看</el-button> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
<div class="pagination"> | |||
<el-pagination | |||
v-model:current-page="pageNum" | |||
v-model:page-size="pageSize" | |||
:page-sizes="[10, 50, 100]" | |||
:small="false" | |||
:disabled="false" | |||
:background="true" | |||
layout="total, sizes, prev, pager, next, jumper" | |||
:total="total" | |||
@size-change="handleSizeChange" | |||
@current-change="handleCurrentChange" | |||
/> | |||
</div> | |||
<el-dialog v-model="dialogVisible" title="查看详情" width="40%" :before-close="handleClose" > | |||
<detail @close="handleClose"></detail> | |||
</el-dialog> | |||
</div> | |||
</template> | |||
<!-- videoType==1为竖,==2为横 --> | |||
<script setup> | |||
//#region 导入 | |||
import { rechargeListApi, getDetailApi, getUserPoinsApi, coindedApi } from '@/apis/my.js' | |||
import dayjs from "dayjs"; | |||
import detail from './detail.vue' | |||
const tableData = ref([]); | |||
const pageNum = ref(1); | |||
const pageSize = ref(10); | |||
const total = ref(0); | |||
const getDate = (val) => { | |||
return dayjs(val).format("YYYY-MM-DD"); | |||
}; | |||
const handleSizeChange = (val) => { | |||
pageSize.value = val; | |||
getListData(pageNum.value, pageSize.value); | |||
}; | |||
const handleCurrentChange = (val) => { | |||
pageNum.value = val; | |||
getListData(pageNum.value, pageSize.value); | |||
}; | |||
const getListData = async (PageNum, PageSize) => { | |||
try { | |||
let data = { | |||
projectType: 1, | |||
pageNum: 1, | |||
pageSize: 10 | |||
} | |||
const res = await rechargeListApi(data); | |||
tableData.value = res.data.list; | |||
total.value = res.data.total * 1; | |||
} catch (error) { | |||
console.log(error, "err"); | |||
} | |||
}; | |||
// 当前币值 | |||
const currentValue = ref('') | |||
function currentValFn() { | |||
getUserPoinsApi().then(res => { | |||
currentValue.value = res.data | |||
}) | |||
} | |||
// 查看详情 | |||
const dialogVisible = ref(false) | |||
onMounted(() => { | |||
getListData(1, 10); | |||
currentValFn() | |||
}); | |||
</script> | |||
<style lang="scss" scoped> | |||
.page { | |||
height: calc(100vh - 80px); | |||
// height: calc(100vh - 80px); | |||
background-color: #ffffff; | |||
border-radius: 30px 0 0 0; | |||
overflow: hidden; | |||
padding: 10vh; | |||
.addbtn { | |||
margin-bottom: 2vh; | |||
} | |||
.formData { | |||
padding: 5vh 3vh; | |||
} | |||
.pagination { | |||
position: fixed; | |||
left: 55%; | |||
bottom: 8vh; | |||
transform: translateX(-50%); | |||
border-radius: 5px; | |||
padding: 10px 20px; | |||
z-index: 99; | |||
transition: all 0.3s; | |||
cursor: pointer; | |||
&:hover { | |||
background-color: #b8b8b873; | |||
} | |||
} | |||
} | |||
</style> |
@@ -0,0 +1,11 @@ | |||
<!-- | |||
* @Autor: Chutingting | |||
* @Date: 2023-11-09 10:24:45 | |||
* @LastEditors: Chutingting | |||
* @LastEditTime: 2023-11-09 15:13:05 | |||
* @Description: | |||
--> | |||
<template> | |||
<div></div> | |||
</template> | |||
<script setup></script> |
@@ -85,7 +85,7 @@ const handleCurrentChange = (val) => { | |||
const getListData = async (PageNum, PageSize) => { | |||
try { | |||
let data = { | |||
projectType: '', | |||
projectType: 1, | |||
pageNum: 1, | |||
pageSize: 10 | |||
} | |||
@@ -3,30 +3,34 @@ | |||
<div class="commoditylIst" ref="scrollContainerRef" @wheel="handleWheel"> | |||
<div class="item" v-for="item in packageList" :key="item.typeDesc"> | |||
<!-- 遮罩层 --> | |||
<div class="mask" v-if="item.type != 1"> | |||
<!-- <div class="mask" v-if="item.type != 1"> | |||
<el-icon><i-ep-Lock /></el-icon> | |||
</div> | |||
<div @click="clickPayDialog(item)" v-if="item.typeDesc"> | |||
</div> --> | |||
<!-- clickPayDialog(item) --> | |||
<div @click="getOrderDetail(item)"> | |||
<div class="line" :style="`background-color:${item.color} ;`"></div> | |||
<div class="info"> | |||
<!-- 商品信息 --> | |||
<div class="content"> | |||
<div class="titleBox"> | |||
<div class="title"> | |||
{{ lanChange == "zh-cn" ? item.typeDesc : item.englishName }} | |||
{{ item.title }} | |||
</div> | |||
</div> | |||
<div class="money"> | |||
<span class="price">{{ | |||
lanChange == "zh-cn" ? item.rmb + "¥" : item.dollar + "$" | |||
}}</span | |||
>/{{ item.validityDuration }}{{ $t("shop.day") }} | |||
item.sellPriceRmb | |||
}} ¥</span | |||
>/ <span style="text-decoration:line-through;">原价{{ item.priceRmb }}</span> | |||
</div> | |||
<div class="time"> | |||
<span>{{ item.credit }}</span | |||
>{{ $t("shop.score") }} | |||
币值<span>{{ item.glod }}</span | |||
> | |||
</div> | |||
<div | |||
<div class="button" :style="`background-color: #f3af00 ;`"> | |||
方案选择 | |||
</div> | |||
<!-- <div | |||
v-if="item.type != 1" | |||
class="button" | |||
:style="`background-color:${item.color} ;`" | |||
@@ -39,11 +43,12 @@ | |||
:style="`background-color:${item.color} ;`" | |||
> | |||
{{ $t("shop.selectPlan") }} | |||
</div> | |||
</div> --> | |||
</div> | |||
<!-- 商品权益 --> | |||
<div class="authority"> | |||
<div class="authority-item"> | |||
<div v-html="item.detail"></div> | |||
<!-- <div class="authority-item"> | |||
{{ $t("shop.InviteGetscore") }}: | |||
<span> | |||
@@ -68,9 +73,9 @@ | |||
><i>{{ item.chargeTime }}</i | |||
>{{ $t("shop.second") }}</span | |||
> | |||
</div> | |||
</div> --> | |||
<div class="authority-item"> | |||
<!-- <div class="authority-item"> | |||
{{ $t("shop.Language") }}:<span | |||
><i>{{ item.userPackageDetails[0].languageDesc }}</i></span | |||
> | |||
@@ -116,7 +121,7 @@ | |||
{{ $t("shop.VideoResolution") }}:<span>{{ | |||
item.userPackageDetails[0].resolutionRatioDesc | |||
}}</span> | |||
</div> | |||
</div> --> | |||
<!-- <div class="authority-item"> | |||
{{ $t("shop.DigitalPersonTemplate") }}:{{ | |||
item.userPackageDetails[0].humanTemplateDesc | |||
@@ -358,6 +363,7 @@ import { useI18n } from "vue-i18n"; | |||
import talkUs from "@/components/talkUs.vue"; | |||
import { useRoute, useRouter } from "vue-router"; | |||
import { createOrderApi, createPayApi, getOrderStatusApi } from "@/apis/pay"; | |||
import { orderDetailApi } from '@/apis/myStore.js' | |||
const route = useRoute(); | |||
const router = useRouter(); | |||
@@ -754,6 +760,13 @@ function RefreshQR() { | |||
//#region | |||
//#endregion ------------------------------------ | |||
// 获取订单详情 | |||
function getOrderDetail(item) { | |||
orderDetailApi(item.id).then(res => { | |||
}) | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||