congzc 1 yıl önce
ebeveyn
işleme
3c02f7889b
3 değiştirilmiş dosya ile 220 ekleme ve 209 silme
  1. +8
    -1
      src/layout/index.vue
  2. +2
    -0
      src/types/auto-imports.d.ts
  3. +210
    -208
      src/views/myStore/index.vue

+ 8
- 1
src/layout/index.vue Dosyayı Görüntüle

@@ -23,7 +23,7 @@
</div> </div>
{{ $t("myCreating.title") }} {{ $t("myCreating.title") }}
</div> </div>
<div class="myRouter-item" @click="router.push('/userModel')">
<div class="myRouter-item" @click="toUserModel">
<div class="icon"> <div class="icon">
<el-icon><i-ep-user /></el-icon> <el-icon><i-ep-user /></el-icon>
</div> </div>
@@ -169,6 +169,13 @@ const updateShowTalkUsDialog = (newValue: any) => {
showTalkUsDialog.value = newValue; showTalkUsDialog.value = newValue;
}; };
//#endregion ------------------------------------ //#endregion ------------------------------------

//#region 页面跳转
function toUserModel() {
router.push("/userModel");
showTalkUsDialog.value = true;
}
//#endregion ------------------------------------
</script> </script>


<!-- 新样式 --> <!-- 新样式 -->


+ 2
- 0
src/types/auto-imports.d.ts Dosyayı Görüntüle

@@ -2,6 +2,7 @@
export {} export {}
declare global { declare global {
const EffectScope: typeof import('vue')['EffectScope'] const EffectScope: typeof import('vue')['EffectScope']
const ElForm: typeof import('element-plus/es')['ElForm']
const ElMessage: typeof import('element-plus/es')['ElMessage'] const ElMessage: typeof import('element-plus/es')['ElMessage']
const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] const ElMessageBox: typeof import('element-plus/es')['ElMessageBox']
const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
@@ -270,6 +271,7 @@ import { UnwrapRef } from 'vue'
declare module 'vue' { declare module 'vue' {
interface ComponentCustomProperties { interface ComponentCustomProperties {
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']> readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
readonly ElForm: UnwrapRef<typeof import('element-plus/es')['ElForm']>
readonly ElMessage: UnwrapRef<typeof import('element-plus/es')['ElMessage']> readonly ElMessage: UnwrapRef<typeof import('element-plus/es')['ElMessage']>
readonly ElMessageBox: UnwrapRef<typeof import('element-plus/es')['ElMessageBox']> readonly ElMessageBox: UnwrapRef<typeof import('element-plus/es')['ElMessageBox']>
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']> readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>


+ 210
- 208
src/views/myStore/index.vue Dosyayı Görüntüle

@@ -353,7 +353,7 @@
<script setup> <script setup>
//#region 导入 //#region 导入
import { getCurrentInstance, ref, onMounted } from "vue"; import { getCurrentInstance, ref, onMounted } from "vue";
// import { packageInfoApi } from "@/apis/myStore";
import { packageInfoApi } from "@/apis/myStore";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import talkUs from "@/components/talkUs.vue"; import talkUs from "@/components/talkUs.vue";
import { useRoute, useRouter } from "vue-router"; import { useRoute, useRouter } from "vue-router";
@@ -369,208 +369,209 @@ const AccessToken = localStorage.getItem("AccessToken"); // 判断有没有登
//#endregion ------------------------------------ //#endregion ------------------------------------


//#region 各个套餐的逻辑 //#region 各个套餐的逻辑
const packageList = ref([
{
id: 1,
type: 1,
typeDesc: "基础版",
englishName: "Trial",
dollar: "0.00",
rmb: "0.00",
credit: 100,
validityDuration: 30,
inviteUserCredit: 10,
videoPrice: 10,
photoPrice: 10,
talkPrice: 20,
chargeTime: 60,
createDate: 1686814258000,
updateDate: 1686814258000,
isDel: 0,
color: "#f3af00",
userPackageDetails: [
{
id: 1,
detailType: 1,
detailTypeDesc: "照片说话",
packageId: 1,
watermark: 1,
watermarkDesc: "是",
language: 1,
languageDesc: "50+",
sound: 1,
soundDesc: "400+",
videoTime: 60,
aiPortrait: 0,
aiPortraitDesc: "否",
photoSing: 0,
photoSingDesc: "否",
aiCreateTime: 0,
resolutionRatio: 1,
resolutionRatioDesc: "720p",
createDate: 1686882177000,
updateDate: 1686882177000,
isDel: 0,
},
{
id: 4,
detailType: 2,
detailTypeDesc: "口播",
packageId: 1,
watermark: 1,
watermarkDesc: "是",
language: 1,
languageDesc: "50+",
sound: 1,
soundDesc: "400+",
videoTime: 60,
aiCreateTime: 0,
resolutionRatio: 1,
resolutionRatioDesc: "720p",
humanTemplate: 1,
humanTemplateDesc: "免费",
createDate: 1686882177000,
updateDate: 1686882177000,
isDel: 0,
},
],
},
{
id: 2,
type: 2,
typeDesc: "专业版",
englishName: "Pro",
dollar: "7.99",
rmb: "49.99",
credit: 200,
validityDuration: 30,
inviteUserCredit: 10,
videoPrice: 6,
photoPrice: 6,
talkPrice: 16,
chargeTime: 60,
createDate: 1686814258000,
updateDate: 1686814258000,
isDel: 0,
color: "#c971ff",
userPackageDetails: [
{
id: 2,
detailType: 1,
detailTypeDesc: "照片说话",
packageId: 2,
watermark: 0,
watermarkDesc: "否",
language: 1,
languageDesc: "50+",
sound: 1,
soundDesc: "400+",
videoTime: 300,
aiPortrait: 1,
aiPortraitDesc: "是",
photoSing: 1,
photoSingDesc: "是",
aiCreateTime: 30,
resolutionRatio: 2,
resolutionRatioDesc: "1080p",
createDate: 1686882177000,
updateDate: 1686882177000,
isDel: 0,
},
{
id: 5,
detailType: 2,
detailTypeDesc: "口播",
packageId: 2,
watermark: 0,
watermarkDesc: "否",
language: 1,
languageDesc: "50+",
sound: 1,
soundDesc: "400+",
videoTime: 300,
aiCreateTime: 100,
resolutionRatio: 2,
resolutionRatioDesc: "1080p",
humanTemplate: 2,
humanTemplateDesc: "VIP",
createDate: 1686882177000,
updateDate: 1686882177000,
isDel: 0,
},
],
},
{
id: 3,
type: 3,
typeDesc: "加强版",
englishName: "Advanced",
dollar: "39.99",
rmb: "279.99",
credit: 1200,
validityDuration: 30,
inviteUserCredit: 10,
videoPrice: 5,
photoPrice: 5,
talkPrice: 15,
chargeTime: 60,
createDate: 1686814258000,
updateDate: 1686814258000,
isDel: 0,
color: "#7b61ff",
userPackageDetails: [
{
id: 3,
detailType: 1,
detailTypeDesc: "照片说话",
packageId: 3,
watermark: 0,
watermarkDesc: "否",
language: 1,
languageDesc: "50+",
sound: 1,
soundDesc: "400+",
videoTime: 300,
aiPortrait: 1,
aiPortraitDesc: "是",
photoSing: 1,
photoSingDesc: "是",
aiCreateTime: 200,
resolutionRatio: 2,
resolutionRatioDesc: "1080p",
createDate: 1686882177000,
updateDate: 1686882177000,
isDel: 0,
},
{
id: 6,
detailType: 2,
detailTypeDesc: "口播",
packageId: 3,
watermark: 0,
watermarkDesc: "否",
language: 1,
languageDesc: "50+",
sound: 1,
soundDesc: "400+",
videoTime: 300,
aiCreateTime: 200,
resolutionRatio: 2,
resolutionRatioDesc: "1080p",
humanTemplate: 2,
humanTemplateDesc: "VIP",
createDate: 1686882177000,
updateDate: 1686882177000,
isDel: 0,
},
],
},
]);
// const packageList = ref([
// {
// id: 1,
// type: 1,
// typeDesc: "基础版",
// englishName: "Trial",
// dollar: "0.00",
// rmb: "0.00",
// credit: 100,
// validityDuration: 30,
// inviteUserCredit: 10,
// videoPrice: 10,
// photoPrice: 10,
// talkPrice: 20,
// chargeTime: 60,
// createDate: 1686814258000,
// updateDate: 1686814258000,
// isDel: 0,
// color: "#f3af00",
// userPackageDetails: [
// {
// id: 1,
// detailType: 1,
// detailTypeDesc: "照片说话",
// packageId: 1,
// watermark: 1,
// watermarkDesc: "是",
// language: 1,
// languageDesc: "50+",
// sound: 1,
// soundDesc: "400+",
// videoTime: 60,
// aiPortrait: 0,
// aiPortraitDesc: "否",
// photoSing: 0,
// photoSingDesc: "否",
// aiCreateTime: 0,
// resolutionRatio: 1,
// resolutionRatioDesc: "720p",
// createDate: 1686882177000,
// updateDate: 1686882177000,
// isDel: 0,
// },
// {
// id: 4,
// detailType: 2,
// detailTypeDesc: "口播",
// packageId: 1,
// watermark: 1,
// watermarkDesc: "是",
// language: 1,
// languageDesc: "50+",
// sound: 1,
// soundDesc: "400+",
// videoTime: 60,
// aiCreateTime: 0,
// resolutionRatio: 1,
// resolutionRatioDesc: "720p",
// humanTemplate: 1,
// humanTemplateDesc: "免费",
// createDate: 1686882177000,
// updateDate: 1686882177000,
// isDel: 0,
// },
// ],
// },
// {
// id: 2,
// type: 2,
// typeDesc: "专业版",
// englishName: "Pro",
// dollar: "7.99",
// rmb: "49.99",
// credit: 200,
// validityDuration: 30,
// inviteUserCredit: 10,
// videoPrice: 6,
// photoPrice: 6,
// talkPrice: 16,
// chargeTime: 60,
// createDate: 1686814258000,
// updateDate: 1686814258000,
// isDel: 0,
// color: "#c971ff",
// userPackageDetails: [
// {
// id: 2,
// detailType: 1,
// detailTypeDesc: "照片说话",
// packageId: 2,
// watermark: 0,
// watermarkDesc: "否",
// language: 1,
// languageDesc: "50+",
// sound: 1,
// soundDesc: "400+",
// videoTime: 300,
// aiPortrait: 1,
// aiPortraitDesc: "是",
// photoSing: 1,
// photoSingDesc: "是",
// aiCreateTime: 30,
// resolutionRatio: 2,
// resolutionRatioDesc: "1080p",
// createDate: 1686882177000,
// updateDate: 1686882177000,
// isDel: 0,
// },
// {
// id: 5,
// detailType: 2,
// detailTypeDesc: "口播",
// packageId: 2,
// watermark: 0,
// watermarkDesc: "否",
// language: 1,
// languageDesc: "50+",
// sound: 1,
// soundDesc: "400+",
// videoTime: 300,
// aiCreateTime: 100,
// resolutionRatio: 2,
// resolutionRatioDesc: "1080p",
// humanTemplate: 2,
// humanTemplateDesc: "VIP",
// createDate: 1686882177000,
// updateDate: 1686882177000,
// isDel: 0,
// },
// ],
// },
// {
// id: 3,
// type: 3,
// typeDesc: "加强版",
// englishName: "Advanced",
// dollar: "39.99",
// rmb: "279.99",
// credit: 1200,
// validityDuration: 30,
// inviteUserCredit: 10,
// videoPrice: 5,
// photoPrice: 5,
// talkPrice: 15,
// chargeTime: 60,
// createDate: 1686814258000,
// updateDate: 1686814258000,
// isDel: 0,
// color: "#7b61ff",
// userPackageDetails: [
// {
// id: 3,
// detailType: 1,
// detailTypeDesc: "照片说话",
// packageId: 3,
// watermark: 0,
// watermarkDesc: "否",
// language: 1,
// languageDesc: "50+",
// sound: 1,
// soundDesc: "400+",
// videoTime: 300,
// aiPortrait: 1,
// aiPortraitDesc: "是",
// photoSing: 1,
// photoSingDesc: "是",
// aiCreateTime: 200,
// resolutionRatio: 2,
// resolutionRatioDesc: "1080p",
// createDate: 1686882177000,
// updateDate: 1686882177000,
// isDel: 0,
// },
// {
// id: 6,
// detailType: 2,
// detailTypeDesc: "口播",
// packageId: 3,
// watermark: 0,
// watermarkDesc: "否",
// language: 1,
// languageDesc: "50+",
// sound: 1,
// soundDesc: "400+",
// videoTime: 300,
// aiCreateTime: 200,
// resolutionRatio: 2,
// resolutionRatioDesc: "1080p",
// humanTemplate: 2,
// humanTemplateDesc: "VIP",
// createDate: 1686882177000,
// updateDate: 1686882177000,
// isDel: 0,
// },
// ],
// },
// ]);
const packageList = ref([]);
async function getPackageList() { async function getPackageList() {
const res = await packageInfoApi(); const res = await packageInfoApi();
packageList.value = res.data; packageList.value = res.data;
} }

const showPayDialog = ref(false); //套餐信息dialog显示隐藏 const showPayDialog = ref(false); //套餐信息dialog显示隐藏
const presentItme = reactive({}); //点击的套餐项 const presentItme = reactive({}); //点击的套餐项
// const presentItme = ref({}); //点击的套餐项 // const presentItme = ref({}); //点击的套餐项
@@ -628,7 +629,7 @@ const updateShowTalkUsDialog = (newValue) => {


//#region 页面初始化 //#region 页面初始化
onMounted(async () => { onMounted(async () => {
// getPackageList();
getPackageList();
// createOrderFunc(); // createOrderFunc();
}); });
//#endregion ------------------------------------ //#endregion ------------------------------------
@@ -685,7 +686,7 @@ async function createPayFunc(orderNumber) {
if (res.data.codeUrl) { if (res.data.codeUrl) {
payCodeUrl.value = res.data.codeUrl; payCodeUrl.value = res.data.codeUrl;
} }
// await getStatusOfOrderFunc(orderNumber);
await getStatusOfOrderFunc(orderNumber);
} else { } else {
payErrorHandle(); payErrorHandle();
} }
@@ -713,14 +714,14 @@ async function getStatusOfOrderFunc(orderNumber) {
); );
return; return;
} else { } else {
// setTimeout(() => {
// getStatusOfOrderFunc(orderNumber);
// }, 3000);
setTimeout(() => {
getStatusOfOrderFunc(orderNumber);
}, 3000);
} }
} else { } else {
// setTimeout(() => {
// getStatusOfOrderFunc(orderNumber);
// }, 3000);
setTimeout(() => {
getStatusOfOrderFunc(orderNumber);
}, 3000);
} }
} catch (error) { } catch (error) {
console.log(error, "error"); console.log(error, "error");
@@ -746,7 +747,8 @@ function clearCode() {
function RefreshQR() { function RefreshQR() {
payCodeUrl.value = null; payCodeUrl.value = null;
iframeBody.value = null; iframeBody.value = null;
createOrderFunc();
// createOrderFunc();
createPayFunc(myOrderNumber.value);
} }
//#endregion ------------------------------------ //#endregion ------------------------------------




Yükleniyor…
İptal
Kaydet