|
@@ -3,12 +3,13 @@
|
|
<!-- <tn-nav-bar :isBack="false" backgroundColor="#fff" :bottomShadow="false">数字人</tn-nav-bar> -->
|
|
<!-- <tn-nav-bar :isBack="false" backgroundColor="#fff" :bottomShadow="false">数字人</tn-nav-bar> -->
|
|
<!-- <view class="pos">
|
|
<!-- <view class="pos">
|
|
</view> -->
|
|
</view> -->
|
|
- <view class="context">
|
|
|
|
|
|
+
|
|
|
|
+ <view class="addPd">
|
|
<view class="createPro" @click="handleCreatePro">
|
|
<view class="createPro" @click="handleCreatePro">
|
|
<view class="centerAdd">
|
|
<view class="centerAdd">
|
|
<view class="addIcon">
|
|
<view class="addIcon">
|
|
- <!-- <image src="/static/images/buy.png" mode=""></image> -->
|
|
|
|
- <text class="iconfont icon-chuangjian" style="color: white;"></text>
|
|
|
|
|
|
+ <image src="/static/add_icon.png" mode=""></image>
|
|
|
|
+ <!-- <text class="iconfont icon-chuangjian" style="color: white;"></text> -->
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view class="addTxt">
|
|
<view class="addTxt">
|
|
@@ -16,71 +17,85 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="draft" v-if="isLogin">
|
|
|
|
- <view class="draftLabel">
|
|
|
|
- 草稿
|
|
|
|
- </view>
|
|
|
|
- <empty v-if="draftList.length==0" tipTxt="暂无草稿"></empty>
|
|
|
|
- <view class="draftList" v-else>
|
|
|
|
- <view class="itemBox" v-for="(item,index) in draftList" @click="toCreateDetail(item)">
|
|
|
|
- <view class="top"
|
|
|
|
- style="display: flex;justify-content: center;align-items: center;aspect-ratio: 4/3;">
|
|
|
|
- <text class="iconfont icon-caogao" style="color: white;font-size: 46rpx;"></text>
|
|
|
|
- </view>
|
|
|
|
- <view class="bottom">
|
|
|
|
- <view class="left" :style="{fontSize:isPc?'64rpx':'32rpx'}">
|
|
|
|
- {{item.name}}
|
|
|
|
- </view>
|
|
|
|
- <view class="delIcon" @click.stop="delDraft(item,index)">
|
|
|
|
- <!-- <image src="/static/images/head.jpg" mode=""></image> -->
|
|
|
|
- <text class="iconfont icon-shanchu" :style="{fontSize:isPc?'64rpx':'32rpx'}"></text>
|
|
|
|
- </view>
|
|
|
|
|
|
+ </view>
|
|
|
|
+
|
|
|
|
+ <view class="context">
|
|
|
|
+ <view class="" style="padding-left: 30rpx;padding-right: 30rpx;">
|
|
|
|
+ <view class="swiperBox" v-if="isLogin">
|
|
|
|
+ <view class="draftLabel">
|
|
|
|
+ <image src="/static/caogao_icon.png" mode="" class="labelIcon"></image>
|
|
|
|
+ 草稿
|
|
|
|
+ </view>
|
|
|
|
+ <empty v-if="draftList.length==0" tipTxt="暂无草稿" style="margin-top: -50rpx;"></empty>
|
|
|
|
+ <view class="swiperCard" v-else>
|
|
|
|
+ <view class="itemBox" :style="{backgroundImage:`url(${item.backs.url})`}"
|
|
|
|
+ v-for="(item,index) in draftList" @click="toCreateDetail(item)">
|
|
|
|
+ <image class="role" :src="item.roles.url" mode=""></image>
|
|
|
|
+ <div class="barBox">
|
|
|
|
+ <div class="name">
|
|
|
|
+ {{item.name}}
|
|
|
|
+ </div>
|
|
|
|
+ <text @click.stop="delDraft(item,index)" style="color:white;font-size: 28rpx;"
|
|
|
|
+ class="iconfont icon-shanchu"></text>
|
|
|
|
+ </div>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+
|
|
|
|
+ <div class="dotBox" v-if="draftList.length!==0">
|
|
|
|
+ <div class="i1"></div>
|
|
|
|
+ <div class="i2"></div>
|
|
|
|
+ <div class="i3"></div>
|
|
|
|
+ <div class="i4"></div>
|
|
|
|
+ <div class="i5"></div>
|
|
|
|
+ </div>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view class="draft">
|
|
<view class="draft">
|
|
- <view class="draftLabel">
|
|
|
|
|
|
+ <view class="draftLabel" style="padding-left: 30rpx;padding-right: 30rpx;">
|
|
|
|
+ <image style="width: 34rpx;height: 34rpx;" src="/static/zuopin_icon.png" mode="" class="labelIcon">
|
|
|
|
+ </image>
|
|
{{isLogin?'数字人作品':'精选案例'}}
|
|
{{isLogin?'数字人作品':'精选案例'}}
|
|
</view>
|
|
</view>
|
|
- <empty v-if="workList.length==0" :tipTxt="isLogin?'暂无作品':'暂无案例'"></empty>
|
|
|
|
- <view class="draftList" v-else>
|
|
|
|
- <view class="itemBox" v-for="(item,index) in workList" @click="goWorkDetail(item)">
|
|
|
|
- <view class="top" :style="{minHeight:isPc?'rpx':'470rpx'}">
|
|
|
|
- <image :src="item.cover" mode="aspectFit" v-if="item.state">
|
|
|
|
- </image>
|
|
|
|
-
|
|
|
|
- <view class="tipBox" v-else>
|
|
|
|
- <view class="preloader_1" style="">
|
|
|
|
- <view></view>
|
|
|
|
- <view></view>
|
|
|
|
- <view></view>
|
|
|
|
- <view></view>
|
|
|
|
- <view></view>
|
|
|
|
|
|
+ <view style="padding-left: 15rpx;padding-right: 15rpx;">
|
|
|
|
+ <empty v-if="workList.length==0" :tipTxt="isLogin?'暂无作品':'暂无案例'"></empty>
|
|
|
|
+ <view class="draftList" v-else>
|
|
|
|
+ <view class="itemBox" v-for="(item,index) in workList" @click="goWorkDetail(item)">
|
|
|
|
+ <!-- <view class="top" :style="{minHeight:isPc?'184rpx':'184rpx'}"> -->
|
|
|
|
+ <view class="top">
|
|
|
|
+ <image :src="item.cover" mode="aspectFit" v-if="item.state">
|
|
|
|
+ </image>
|
|
|
|
+
|
|
|
|
+ <view class="tipBox" v-else>
|
|
|
|
+ <view class="preloader_1 loadingBox" style="">
|
|
|
|
+ <view></view>
|
|
|
|
+ <view></view>
|
|
|
|
+ <view></view>
|
|
|
|
+ <view></view>
|
|
|
|
+ <view></view>
|
|
|
|
+ </view>
|
|
|
|
+ <!-- <view class="progress">
|
|
|
|
+ <u-line-progress :percentage="'percentage'+item.id" :showText="true"
|
|
|
|
+ activeColor="#9b59b6" height="12"></u-line-progress>
|
|
|
|
+ </view> -->
|
|
|
|
+ <view class="tip" style="color:#237FED">
|
|
|
|
+ 生成中...
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- <!-- <view class="progress">
|
|
|
|
- <u-line-progress :percentage="'percentage'+item.id" :showText="true"
|
|
|
|
- activeColor="#9b59b6" height="12"></u-line-progress>
|
|
|
|
- </view> -->
|
|
|
|
- <view class="tip" style="color:#26b3a0">
|
|
|
|
- 生成中...
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
|
|
|
|
- </view>
|
|
|
|
- <view class="bottom" v-if="isLogin">
|
|
|
|
- <view class="left" :style="{fontSize:isPc?'64rpx':'32rpx'}">
|
|
|
|
- {{item.name}}
|
|
|
|
</view>
|
|
</view>
|
|
- <!-- <view class="left">
|
|
|
|
- {{item.state==1?"已生成":'生成中'}}
|
|
|
|
- </view> -->
|
|
|
|
- <view class="delIcon" @click.stop="handleShowMoreMenu(item,index)">
|
|
|
|
- <!-- <image src="/static/images/head.jpg" mode=""></image> -->
|
|
|
|
- <text class="iconfont icon-gengduo-shuxiang"
|
|
|
|
- :style="{fontSize:isPc?'64rpx':'32rpx'}"></text>
|
|
|
|
|
|
+ <view class="bottom" v-if="isLogin">
|
|
|
|
+ <view class="left">
|
|
|
|
+ {{item.name}}
|
|
|
|
+ </view>
|
|
|
|
+ <!-- <view class="left">
|
|
|
|
+ {{item.state==1?"已生成":'生成中'}}
|
|
|
|
+ </view> -->
|
|
|
|
+ <view class="delIcon" @click.stop="handleShowMoreMenu(item,index)">
|
|
|
|
+ <!-- <image src="/static/images/head.jpg" mode=""></image> -->
|
|
|
|
+ <text class="iconfont icon-gengduo-shuxiang" style="font-size:32rpx;"></text>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -99,7 +114,7 @@
|
|
<view
|
|
<view
|
|
style="background: rgba(0, 0, 0, 0);width: 300rpx;height: 300rpx;display: flex;align-items: center;flex-direction: column;justify-content: center;color:#26b3a0;">
|
|
style="background: rgba(0, 0, 0, 0);width: 300rpx;height: 300rpx;display: flex;align-items: center;flex-direction: column;justify-content: center;color:#26b3a0;">
|
|
<l-circularProgress :isBgShow="true" :lineWidth="10" boxWidth="100" boxHeight="100"
|
|
<l-circularProgress :isBgShow="true" :lineWidth="10" boxWidth="100" boxHeight="100"
|
|
- progressColor="#26b3a0" fontColor="#26b3a0" gradualColor="#26b3a0"
|
|
|
|
|
|
+ progressColor="##237FED" fontColor="##237FED" gradualColor="##237FED"
|
|
:percent="progress"></l-circularProgress>
|
|
:percent="progress"></l-circularProgress>
|
|
<view class="">
|
|
<view class="">
|
|
视频下载中...
|
|
视频下载中...
|
|
@@ -190,54 +205,26 @@
|
|
// }
|
|
// }
|
|
// });
|
|
// });
|
|
},
|
|
},
|
|
|
|
+ beforeDestroy() {
|
|
|
|
+ console.log('beforeDestroy()---------------------');
|
|
|
|
+ clearInterval(this.timer)
|
|
|
|
+ },
|
|
onHide() {
|
|
onHide() {
|
|
|
|
+ console.log('onHide()---------------------');
|
|
// 清除定时器
|
|
// 清除定时器
|
|
- // clearInterval(this.timer)
|
|
|
|
|
|
+ clearInterval(this.timer)
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
- // console.log('当前时间戳:', Date.now() + 180000);
|
|
|
|
- let _this = this
|
|
|
|
- if (getApp().from == 'create') {
|
|
|
|
- _this.timer = setInterval(async () => {
|
|
|
|
- let res = await _this.$http('digitalMen.workList', {})
|
|
|
|
- if (res.code == 0) {
|
|
|
|
- // _this.reqTimes += 1
|
|
|
|
- _this.workList = res.data
|
|
|
|
- // res.data.forEach((item, index) => {
|
|
|
|
- // console.log('每一个percentage', _this['percentage' + item.id]);
|
|
|
|
- // if (_this.reqTimes <= 5) {
|
|
|
|
- // _this['percentage' + item.id] += 10
|
|
|
|
- // } else {
|
|
|
|
- // _this['percentage' + item.id] += 1
|
|
|
|
- // }
|
|
|
|
- // if (item.state == 1) {
|
|
|
|
- // console.log('已完成的那一项', item);
|
|
|
|
- // _this['percentage' + item.id] = 100
|
|
|
|
- // }
|
|
|
|
- // })
|
|
|
|
-
|
|
|
|
- let allSuc = res.data.every((item, index) => {
|
|
|
|
- return item.state == 1
|
|
|
|
- })
|
|
|
|
- if (allSuc) {
|
|
|
|
- clearInterval(_this.timer)
|
|
|
|
- // _this.percentage = 100
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- console.log('定时器--数字人作品列表返回值:', res);
|
|
|
|
- } else {
|
|
|
|
- uni.showToast({
|
|
|
|
- title: res.msg,
|
|
|
|
- icon: 'none'
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- }, 10000)
|
|
|
|
- console.log('timer-------------', _this.timer);
|
|
|
|
- // clearInterval(_this.timer)
|
|
|
|
- uni.setStorageSync('timer', _this.timer)
|
|
|
|
|
|
+ if (this.timer) {
|
|
|
|
+ this.timer = null
|
|
}
|
|
}
|
|
- getApp().from = ''
|
|
|
|
|
|
|
|
|
|
+ // console.log('当前时间戳:', Date.now() + 180000);
|
|
|
|
+ let _this = this
|
|
|
|
+ // if (getApp().from == 'create') {
|
|
|
|
+ // }
|
|
|
|
+ this.getWorkList()
|
|
|
|
+ this.getIndexData()
|
|
const userAgent = navigator.userAgent.toLowerCase();
|
|
const userAgent = navigator.userAgent.toLowerCase();
|
|
if (/ipad|iphone|midp|rv:1.2.3.4|ucweb|android|windows ce|windows mobile/.test(userAgent)) {
|
|
if (/ipad|iphone|midp|rv:1.2.3.4|ucweb|android|windows ce|windows mobile/.test(userAgent)) {
|
|
// 移动端
|
|
// 移动端
|
|
@@ -249,16 +236,15 @@
|
|
console.log('PC端')
|
|
console.log('PC端')
|
|
}
|
|
}
|
|
// console.log('1213', download);
|
|
// console.log('1213', download);
|
|
- this.getIndexData()
|
|
|
|
this.is_wx = this.is_weixin()
|
|
this.is_wx = this.is_weixin()
|
|
console.log('this.is_wx', this.is_wx);
|
|
console.log('this.is_wx', this.is_wx);
|
|
},
|
|
},
|
|
onShareAppMessage: function(res) {
|
|
onShareAppMessage: function(res) {
|
|
|
|
|
|
},
|
|
},
|
|
- async onPullDownRefresh() {
|
|
|
|
- this.getIndexData()
|
|
|
|
- },
|
|
|
|
|
|
+ // async onPullDownRefresh() {
|
|
|
|
+ // this.getIndexData()
|
|
|
|
+ // },
|
|
methods: {
|
|
methods: {
|
|
open() {
|
|
open() {
|
|
// console.log('open');
|
|
// console.log('open');
|
|
@@ -366,17 +352,32 @@
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- async getIndexData() {
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ async getWorkList() {
|
|
|
|
+ let _this = this
|
|
let res = await this.$http('digitalMen.workList', {})
|
|
let res = await this.$http('digitalMen.workList', {})
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
// uni.stopPullDownRefresh()
|
|
// uni.stopPullDownRefresh()
|
|
this.workList = res.data
|
|
this.workList = res.data
|
|
- // let parm = {}
|
|
|
|
- // res.data.forEach((item, index) => {
|
|
|
|
- // parm['percentage' + item.id] = 0
|
|
|
|
- // })
|
|
|
|
- // this.$data = Object.assign(this.$data, parm);
|
|
|
|
- // console.log('百分比批量赋值后:', this.$data);
|
|
|
|
|
|
+
|
|
|
|
+ let allSuc = res.data.every((item, index) => {
|
|
|
|
+ return item.state == 1
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ if (allSuc || res.data.length == 0) {
|
|
|
|
+ clearInterval(_this.timer)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ console.log('onshow------------------_this.timer', _this.timer);
|
|
|
|
+ if (_this.timer) {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ _this.timer = setInterval(() => {
|
|
|
|
+ _this.getWorkList()
|
|
|
|
+ }, 5000)
|
|
|
|
+
|
|
console.log('数字人作品列表返回值:', res);
|
|
console.log('数字人作品列表返回值:', res);
|
|
} else {
|
|
} else {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
@@ -384,8 +385,8 @@
|
|
icon: 'none'
|
|
icon: 'none'
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ },
|
|
|
|
+ async getIndexData() {
|
|
if (!uni.getStorageSync('token')) {
|
|
if (!uni.getStorageSync('token')) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
@@ -472,6 +473,10 @@
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
_this.workList.splice(this.delIndex, 1)
|
|
_this.workList.splice(this.delIndex, 1)
|
|
|
|
|
|
|
|
+ if (_this.workList.length == 0) {
|
|
|
|
+ clearInterval(_this.timer)
|
|
|
|
+ }
|
|
|
|
+
|
|
console.log('删除数字人返回值:', res);
|
|
console.log('删除数字人返回值:', res);
|
|
uni.showToast({
|
|
uni.showToast({
|
|
title: '数字人:' + _this.delItem.name + '删除成功!',
|
|
title: '数字人:' + _this.delItem.name + '删除成功!',
|