diff --git a/src/lang/package/en.ts b/src/lang/package/en.ts
index 0fd412a..87c0095 100644
--- a/src/lang/package/en.ts
+++ b/src/lang/package/en.ts
@@ -67,10 +67,11 @@ export default {
saveVideo:'Save Manuscript',
select:'Please Select',
music:'Music',
- Aipicture:'AI-generated pictures',
+ Aipicture:'AI-generated Pictures',
AipictureTip:'Please customize your picture',
chooseMusic:'Choose Music',
- searchMusic:'Search Music'
+ searchMusic:'Search Music',
+ comingSoon:'coming soon',
},
// 我的视频
@@ -115,7 +116,7 @@ export default {
msg1: "Obtain one video production time",
inputCode:'Please enter the invitation code',
submit:'Submit',
- noListOrder: "没有数据哦,快去邀请更多人加入我们吧~",
+ noListOrder: "No data available",
noListInvite: "No data, please invite more people to join us",
},
@@ -130,6 +131,23 @@ export default {
selectPlan: "SELECT PLAN",
WeChatPay: "WeChatPay",
Alipay: "Alipay",
+ score:'score',
+ day:'day',
+ second:'second',
+ yes:'yes',
+ no:'no',
+ InviteGetscore:'Invite users to get score',
+ createVideoPrice:'Create video prices',
+ AIGeneratesPhotoPrices:'AI generates photo unit prices',
+ UnitChargeDuration:'Unit charge duration',
+ Language:'Language',
+ sound:'sound',
+ IndividualVideoDuration:'Individual video duration',
+ AIGeneratedPortrait:'AI generated portrait',
+ PhotoSinging:'Photo singing',
+ AIGeneratedText:'The number of times AI generated text',
+ VideoResolution:'Video resolution',
+ DigitalPersonTemplate:'Digital person template',
},
signSucceed: {
title: "Confirm your email",
diff --git a/src/lang/package/zh-cn.ts b/src/lang/package/zh-cn.ts
index 7d1d272..6cf4668 100644
--- a/src/lang/package/zh-cn.ts
+++ b/src/lang/package/zh-cn.ts
@@ -67,10 +67,11 @@ export default {
saveVideo:'保存草稿',
select:'请选择',
music:'音乐',
- Aipicture:'Ai生成图片',
+ Aipicture:'AI生成图片',
AipictureTip:'请自定义您的图片',
chooseMusic:'选择音乐',
searchMusic:'搜索音乐',
+ comingSoon:'敬请期待',
},
// 我的视频
@@ -115,7 +116,7 @@ export default {
msg1: "获得视频制作次数一次",
inputCode:'请输入邀请码',
submit:'提交',
- noListOrder: "没有数据哦,快去邀请更多人加入我们吧~",
+ noListOrder: "暂无数据",
noListInvite: "没有数据哦,快去邀请更多人加入我们吧~",
},
@@ -130,6 +131,23 @@ export default {
selectPlan: "方案选择",
WeChatPay: "微信支付",
Alipay: "支付宝支付",
+ score:'积分',
+ day:'天',
+ second:'秒',
+ yes:'是',
+ no:'否',
+ InviteGetscore:'邀请用户得到的积分',
+ createVideoPrice:'创建视频单价',
+ AIGeneratesPhotoPrices:'AI生成照片单价',
+ UnitChargeDuration:'单价收费时长',
+ Language:'语言',
+ sound:'声音',
+ IndividualVideoDuration:'单个视频时长',
+ AIGeneratedPortrait:'AI生成人像',
+ PhotoSinging:'照片唱歌',
+ AIGeneratedText:'AI生成脚本次数',
+ VideoResolution:'视频分辨率',
+ DigitalPersonTemplate:'数字人模版',
},
signSucceed: {
title: "确认邮箱",
diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index 3ec51be..7094900 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -16,7 +16,7 @@
-
-
+ -->
+
{{ $t("navbar.account") }}
diff --git a/src/main.ts b/src/main.ts
index 8280add..5a82010 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -33,5 +33,9 @@ import ElementPlus from "element-plus";
app.use(ElementPlus);
app.use(router).use(i18n).mount("#app");
+// 路由加载完成后挂载
+// router.isReady().then(() => {
+// app.use(router).use(i18n).use(store).mount('#app')
+// });
// 注册全局组件
app.component('myLoading',myLoading).component('myLoadingIcon',myLoadingIcon)
\ No newline at end of file
diff --git a/src/store/index.ts b/src/store/index.ts
index e4e5a6b..7aced2c 100644
--- a/src/store/index.ts
+++ b/src/store/index.ts
@@ -6,6 +6,7 @@ const store = createPinia();
store.use(piniaPluginPersistedstate )
+
// 全局注册 store
export function setupStore(app: App) {
app.use(store);
diff --git a/src/store/modules/userInfo.js b/src/store/modules/userInfo.js
index 2ece7d7..6ebf515 100644
--- a/src/store/modules/userInfo.js
+++ b/src/store/modules/userInfo.js
@@ -3,16 +3,16 @@ import { store } from "@/store";
import {
getUserInfoApi,
} from "../../apis/myAccount";
-export const userInfoModules = defineStore("userInfo", () => {
+export const userInfoModules = defineStore("userInfoState", () => {
// state
- const userInfo = ref({
- avatarUrl: null
- })
+ const userInfo = ref({})
// 登录获取用户信息
async function getUserInfo() {
const res = await getUserInfoApi()
+ console.log(res.data);
userInfo.value = res.data
+ console.log(userInfo);
}
// 退出清除用户信息
function loginOut(params) {
diff --git a/src/types/components.d.ts b/src/types/components.d.ts
index 49867c9..939137b 100644
--- a/src/types/components.d.ts
+++ b/src/types/components.d.ts
@@ -58,6 +58,7 @@ declare module '@vue/runtime-core' {
IEpGoods: typeof import('~icons/ep/goods')['default']
IEpHeadset: typeof import('~icons/ep/headset')['default']
IEpLoading: typeof import('~icons/ep/loading')['default']
+ IEpLock: typeof import('~icons/ep/lock')['default']
IEpMenu: typeof import('~icons/ep/menu')['default']
IEpMic: typeof import('~icons/ep/mic')['default']
IEpPlus: typeof import('~icons/ep/plus')['default']
diff --git a/src/views/createVideo/index.vue b/src/views/createVideo/index.vue
index c6d5bc0..87f7a3b 100644
--- a/src/views/createVideo/index.vue
+++ b/src/views/createVideo/index.vue
@@ -145,7 +145,7 @@
{{ $t("createVideo.availableMould") }}
@@ -153,7 +153,7 @@
v-if="AccessToken"
class="pointer"
:class="showFace == 1 ? 'tabAvtive' : ''"
- @click="showFace = 1"
+ @click="chooseMyImg"
>
{{ $t("createVideo.personalWarehouse") }}
@@ -236,7 +236,7 @@
:infinite-scroll-disabled="overLoadUser"
>
- {{ $t("createVideo.AipictureTip") }}
+ {{ $t("createVideo.comingSoon") }}
@@ -429,7 +429,7 @@
{{ $t("createVideo.chooseMusic") }}
-
+
-
+
@@ -697,9 +697,9 @@ const faceItemActive = ref(); //高亮处理和当前选择图片的ID
// 点击aifece
function setImgUrl(url, id) {
faceItemActive.value = id;
+ imgUrl.value = url;
showUploadBtn.value = 1;
submitImgBtn.value = false;
- imgUrl.value = url;
}
// 删除个人相册照片
async function deleteFaceImg(id) {
@@ -750,6 +750,7 @@ async function lookImg(e) {
showUploadBtn.value = 4;
submitImgBtn.value = true;
compressionImgLoad.value = false;
+ await changeFile();
} else {
return;
}
@@ -765,10 +766,10 @@ const imgUrl = ref(""); //图片回显路径
const imgData = ref(""); // 上传图片文件
const showUploadBtn = ref(1); //上传图片+号的显示隐藏
const submitImgBtn = ref(false); //右上角俩按钮显示与隐藏
-// 点击AI头像区的+号
-function clickAddBtn() {
- faceItemActive.value = null;
- showUploadBtn.value = 2;
+// 点击系统仓库tab
+function chooSystemImg(params) {
+ showFace.value = 0;
+ showUploadBtn.value = 1;
}
// 上传图片
async function changeFile() {
@@ -799,16 +800,28 @@ async function changeFile() {
lanChange.value == "zh-cn" ? `上传失败` : `Upload failure`
);
}
+ faceItemActive.value = res2.data.id;
+ imgUrl.value = res2.data.material;
} catch (error) {
ElMessage.error(error);
}
}
+// 点击个人仓库tab
+function chooseMyImg() {
+ showFace.value = 1;
+ showUploadBtn.value = 2;
+}
+// 点击AI头像区的+号
+function clickAddBtn() {
+ faceItemActive.value = null;
+ showUploadBtn.value = 2;
+}
//#endregion ---------------------------
//#region AI生成图片
function chooseAiPic() {
showFace.value = 2;
- showUploadBtn.value = 5;
+ // showUploadBtn.value = 5;
}
//#endregion --------------------------
@@ -1246,7 +1259,8 @@ onMounted(async () => {
diff --git a/src/views/myStore/index.vue b/src/views/myStore/index.vue
index e557cc3..969b98c 100644
--- a/src/views/myStore/index.vue
+++ b/src/views/myStore/index.vue
@@ -1,46 +1,121 @@
-
-
+
+
+
+
+
+
-
- {{ $t(item.title) }}
+ {{ $t(item.typeDesc) }}
- {{ item.price }}元/{{
- item.priceTime
- }}
+ {{
+ lanChange == "zh-cn" ? item.rmb + "¥" : item.dollar + "$"
+ }}/{{ item.validityDuration }}{{ $t("shop.day") }}
- {{ item.time }}分钟/月
+ {{ item.credit }}{{ $t("shop.score") }}
+
+
+ {{ $t("createVideo.comingSoon") }}
-
-
+ {{ $t("shop.InviteGetscore") }}:{{ item.inviteUserCredit
+ }}{{ $t("shop.score") }}
+
+
+ {{ $t("shop.createVideoPrice") }}:{{ item.videoPrice
+ }}{{ $t("shop.score") }}
+
+
+ {{ $t("shop.AIGeneratesPhotoPrices") }}:{{ item.photoPrice
+ }}{{ $t("shop.score") }}
+
+
+ {{ $t("shop.UnitChargeDuration") }}:{{ item.chargeTime
+ }}{{ $t("shop.second") }}
+
+
+
+ {{ $t("shop.Language") }}:{{
+ item.userPackageDetails[0].languageDesc
+ }}
+
+
+ {{ $t("shop.sound") }}:{{
+ item.userPackageDetails[0].soundDesc
+ }}
+
+
+ {{ $t("shop.IndividualVideoDuration") }}:{{
+ item.userPackageDetails[0].videoTime
+ }}{{ $t("shop.second") }}
+
+
+ {{ $t("shop.AIGeneratedPortrait") }}:{{
+ item.userPackageDetails[0].aiPortrait == 0
+ ? $t("shop.yes")
+ : $t("shop.no")
+ }}
+
+
+ {{ $t("shop.PhotoSinging") }}:{{
+ item.userPackageDetails[0].photoSing == 0
+ ? $t("shop.yes")
+ : $t("shop.no")
+ }}
+
+
+ {{ $t("shop.AIGeneratedText") }}:{{
+ item.userPackageDetails[0].aiCreateTime
+ }}
+
+
+ {{ $t("shop.VideoResolution") }}:{{
+ item.userPackageDetails[0].resolutionRatioDesc
+ }}
+
+
+
-
-
+
{{ $t(presentItme.value.title) }}
@@ -182,6 +257,7 @@ const packageList = ref([
async function getPackageList() {
const res = await packageInfoApi();
+ packageList.value = res.data;
}
const showPayDialog = ref(false); //套餐信息dialog显示隐藏
const presentItme = reactive({}); //点击的套餐项
@@ -234,24 +310,26 @@ onMounted(async () => {
border-radius: 25px 0 0;
padding: 20px;
}
+// 方案列表
.commoditylIst {
display: flex;
justify-content: flex-start;
// overflow-x: auto;
- padding: 20px 20px 20px 50px;
- // width: 100%;
+ padding: 20px 20px 20px 150px;
+ width: 100%;
// height: 75%;
- overflow: hidden;
- overflow-x: scroll;
+ // overflow: hidden;
+ // overflow-x: scroll;
// scrollbar-width: none; /* 隐藏滚动条(Chrome、Firefox) */
// -ms-overflow-style: none; /* 隐藏滚动条(IE、Edge) */
// &::-webkit-scrollbar {
// display: none; /* 隐藏滚动条(Safari、Chrome) */
// }
.item {
+ position: relative;
width: 350px;
height: 780px;
- margin-right: 50px;
+ margin-right: 150px;
background-color: #fffefd;
flex-shrink: 0; /* 防止缩小宽度 */
border: 1px solid #c0bfbd;
@@ -259,6 +337,26 @@ onMounted(async () => {
overflow: hidden;
transition: all 0.2s;
cursor: pointer;
+ &:hover {
+ .mask {
+ display: block;
+ }
+ }
+ // 遮罩层
+ .mask {
+ position: absolute;
+ top: 0;
+ left: 0;
+ display: none;
+ width: 100%;
+ height: 100%;
+ line-height: 780px;
+ font-size: 200px;
+ font-weight: 900;
+ text-align: center;
+ background-color: rgba(0, 0, 0, 0.2);
+ cursor: pointer;
+ }
.line {
height: 20px;
background-color: pink;
@@ -268,7 +366,7 @@ onMounted(async () => {
padding: 20px;
cursor: pointer;
.content {
- height: 300px;
+ height: 220px;
padding: 20px;
border-bottom: 1px solid #c0bfbd;
cursor: pointer;
@@ -276,7 +374,7 @@ onMounted(async () => {
font-size: 30px;
font-weight: 700;
line-height: 25px;
- margin-bottom: 30px;
+ margin-bottom: 10px;
cursor: pointer;
.el-icon {
line-height: 30px;
@@ -290,7 +388,7 @@ onMounted(async () => {
}
}
.money {
- margin-bottom: 30px;
+ margin-bottom: 10px;
font-size: 20px;
color: #7c7c7a;
cursor: pointer;
@@ -302,7 +400,7 @@ onMounted(async () => {
}
}
.time {
- margin-bottom: 30px;
+ margin-bottom: 10px;
font-size: 20px;
color: #7c7c7a;
cursor: pointer;
@@ -325,10 +423,12 @@ onMounted(async () => {
}
}
.authority {
- cursor: pointer;
+ margin-top: 10px;
&-item {
cursor: pointer;
- padding: 20px 10px;
+ font-weight: 700;
+ font-size: 18px;
+ padding: 5px 10px;
span {
cursor: pointer;
color: #7c7c7a;
@@ -344,7 +444,7 @@ onMounted(async () => {
}
}
}
-
+// 支付弹窗
.payDialog {
display: flex;
position: relative;
@@ -387,6 +487,7 @@ onMounted(async () => {
}
}
}
+// 二维码弹窗
.orderCodeDialog {
width: 100%;
.codeImg {
diff --git a/tsconfig.json b/tsconfig.json
index b2fbbcf..ca302b1 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -18,7 +18,7 @@
"types": ["vite/client", "element-plus/global", "unplugin-icons/types/vue"],
"skipLibCheck": true /* Skip type checking all .d.ts files. */,
"allowSyntheticDefaultImports": true /* 允许默认导入 */,
- "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */
+ "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
},
"include": ["src/**/*.ts", "src/**/*.vue", "src/types/**/*.d.ts"],
"exclude": ["node_modules", "dist", "**/*.js"],
diff --git a/vite.config.ts b/vite.config.ts
index aee9e1f..7678134 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -22,6 +22,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
resolve: {
alias: {
"@": pathSrc,
+ 'vue-i18n': 'vue-i18n/dist/vue-i18n.cjs.js'
},
},
css: {