diff --git a/src/assets/img/BG@2x.png b/src/assets/img/BG@2x.png
new file mode 100644
index 0000000..da89367
Binary files /dev/null and b/src/assets/img/BG@2x.png differ
diff --git a/src/assets/img/loading.png b/src/assets/img/loading.png
new file mode 100644
index 0000000..607cac2
Binary files /dev/null and b/src/assets/img/loading.png differ
diff --git a/src/assets/img/play.png b/src/assets/img/play.png
new file mode 100644
index 0000000..8bdcc9d
Binary files /dev/null and b/src/assets/img/play.png differ
diff --git a/src/components/home/home.vue b/src/components/home/home.vue
index 9faa9e6..e0c00af 100644
--- a/src/components/home/home.vue
+++ b/src/components/home/home.vue
@@ -621,6 +621,7 @@ export default {
if (res.data.code == 1052) {
this.$router.push("/login");
Toast.fail("登录过期,请重新登录!");
+ return;
} else {
this.$router.push("/myPage");
}
diff --git a/src/main.js b/src/main.js
index a9f511a..e43c7d0 100644
--- a/src/main.js
+++ b/src/main.js
@@ -3,6 +3,7 @@ import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'
+import Vant from 'vant';
import 'vant/lib/index.css'
// 引入lib-flexible做rem适配
import 'lib-flexible'
@@ -11,6 +12,7 @@ import ElementUI from 'element-ui'; //引入js
import 'element-ui/lib/theme-chalk/index.css';//引入css
Vue.use(ElementUI);
+Vue.use(Vant);
diff --git a/src/router/index.js b/src/router/index.js
index b0d1600..e592dd2 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -19,57 +19,61 @@ const routes = [
{
path: '/aboutUe',
name: 'aboutUe',
- // component: Home
component: () => import("../components/aboutUe/aboutUe"),
},
{
path: '/styleAdd',
name: 'styleAdd',
- // component: Home
component: () => import("../components/styleAdd/styleAdd"),
},
// 登录
{
path: '/login',
name: 'login',
- // component: Home
component: () => import("../views/login/login"),
},
// 创作中心首页
{
path: '/myPage',
name: 'myPage',
- // component: Home
component: () => import("../views/myPage/myPage"),
},
// 选择模板
{
path: '/chooseModel',
name: 'chooseModel',
- // component: Home
component: () => import("../views/model/chooseModel"),
},
// 模板详情
{
path: '/modelDetail',
name: 'modelDetail',
- // component: Home
component: () => import("../views/model/modelDetail"),
},
// 选择语音
{
path: '/selectSound',
name: 'selectSound',
- // component: Home
component: () => import("../views/model/selectSound"),
},
// 录入文案
{
path: '/getPaper',
name: 'getPaper',
- // component: Home
component: () => import("../views/model/getPaper"),
},
+ // 合成视频
+ {
+ path: '/generateVideo',
+ name: 'generateVideo',
+ component: () => import("../views/model/generateVideo"),
+ },
+ // 下载视频
+ {
+ path: '/downloadVideo',
+ name: 'downloadVideo',
+ component: () => import("../views/model/downloadVideo"),
+ },
]
const router = new VueRouter({
diff --git a/src/utils/timestampToTime.js b/src/utils/timestampToTime.js
new file mode 100644
index 0000000..f26ae46
--- /dev/null
+++ b/src/utils/timestampToTime.js
@@ -0,0 +1,47 @@
+/**
+* @description 根据时间戳获取时间
+* @param {*} timestamp 必传,number类型,时间戳数据(10位及以下,10位至13位)
+* @param {*} format 选传,string类型,提供以下时间格式:YYYY-MM-DD hh:mm:ss、YYYY/MM/DD hh:mm:ss、YYYY.MM.DD hh:mm:ss、YYYY MM DD hh:mm:ss、YYYY年MM月DD日 hh:mm:ss、YYYY-MM-DD、YYYY/MM/DD、YYYY.MM.DD、YYYY MM DD、YYYY年MM月DD日;若不传,则默认为:YYYY-MM-DD
+* @returns 根据要求的时间格式
+* @version V 1.0, Created by YWQ, 2022.10.20
+*/
+const timestampToTime = (timestamp, format) => {
+ //时间戳为10位需*1000,时间戳为13位不需乘1000
+ const length = timestamp.length
+ if (length <= 10) {
+ var date = new Date(timestamp * 1000)
+ } else {
+ var date = new Date(timestamp)
+ }
+ let Y = String(date.getFullYear())
+ let M = String(date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1)
+ let D = String(date.getDate() + 1 < 10 ? '0' + (date.getDate()) : date.getDate())
+ let h = String(date.getHours() + 1 < 10 ? '0' + (date.getHours()) : date.getHours())
+ let m = String(date.getMinutes() + 1 < 10 ? '0' + (date.getMinutes()) : date.getMinutes())
+ let s = String(date.getSeconds() + 1 < 10 ? '0' + (date.getSeconds()) : date.getSeconds())
+ // return Y + M + D + h + m + s
+ if (format == "YYYY-MM-DD hh:mm:ss") {
+ return Y + "-" + M + "-" + D + " " + h + ":" + m + ":" + s
+ } else if (format == "YYYY/MM/DD hh:mm:ss") {
+ return Y + "/" + M + "/" + D + " " + h + ":" + m + ":" + s
+ } else if (format == "YYYY.MM.DD hh:mm:ss") {
+ return Y + "." + M + "." + D + " " + h + ":" + m + ":" + s
+ } else if (format == "YYYY MM DD hh:mm:ss") {
+ return Y + " " + M + " " + D + " " + h + ":" + m + ":" + s
+ } else if (format == "YYYY年MM月DD日 hh:mm:ss") {
+ return Y + "年" + M + "月" + D + "日" + " " + h + ":" + m + ":" + s
+ } else if (format == "YYYY-MM-DD") {
+ return Y + "-" + M + "-" + D
+ } else if (format == "YYYY/MM/DD") {
+ return Y + "/" + M + "/" + D
+ } else if (format == "YYYY.MM.DD") {
+ return Y + "." + M + "." + D
+ } else if (format == "YYYY MM DD") {
+ return Y + " " + M + " " + D
+ } else if (format == "YYYY年MM月DD日") {
+ return Y + "年" + M + "月" + D + "日"
+ } else {
+ return Y + "-" + M + "-" + D
+ }
+}
+export default timestampToTime
\ No newline at end of file
diff --git a/src/views/model/chooseModel.vue b/src/views/model/chooseModel.vue
index e4710d0..c4d0c04 100644
--- a/src/views/model/chooseModel.vue
+++ b/src/views/model/chooseModel.vue
@@ -94,6 +94,7 @@ export default {
if (res.data.code == 1052) {
this.$router.push("/login");
Toast.fail("登录过期,请重新登录!");
+ return;
}
this.modeList = res.data.data.list;
})
diff --git a/src/views/model/downloadVideo.vue b/src/views/model/downloadVideo.vue
new file mode 100644
index 0000000..058ae04
--- /dev/null
+++ b/src/views/model/downloadVideo.vue
@@ -0,0 +1,112 @@
+
+
+
+
+