| xqd
@@ -16,7 +16,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="draft">
|
|
|
+ <view class="draft" v-if="isLogin">
|
|
|
<view class="draftLabel">
|
|
|
草稿
|
|
|
</view>
|
| xqd
@@ -43,9 +43,9 @@
|
|
|
|
|
|
<view class="draft">
|
|
|
<view class="draftLabel">
|
|
|
- 数字人作品
|
|
|
+ {{isLogin?'数字人作品':'精选案例'}}
|
|
|
</view>
|
|
|
- <empty v-if="workList.length==0" tipTxt="暂无作品"></empty>
|
|
|
+ <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'}">
|
| xqd
@@ -70,7 +70,7 @@
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
- <view class="bottom">
|
|
|
+ <view class="bottom" v-if="isLogin">
|
|
|
<view class="left" :style="{fontSize:isPc?'64rpx':'32rpx'}">
|
|
|
{{item.name}}
|
|
|
</view>
|
| xqd
@@ -113,6 +113,7 @@
|
|
|
<script>
|
|
|
import empty from '@/components/empty/empty.vue'
|
|
|
import {
|
|
|
+ demoList,
|
|
|
workList,
|
|
|
delWork,
|
|
|
draftList
|
| xqd
@@ -123,6 +124,8 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ demoList: [],
|
|
|
+
|
|
|
show: false,
|
|
|
|
|
|
|
| xqd
@@ -148,7 +151,13 @@
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
-
|
|
|
+ isLogin() {
|
|
|
+ if (uni.getStorageSync('token')) {
|
|
|
+ return true
|
|
|
+ } else {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
onReady() {
|
| xqd
@@ -348,6 +357,8 @@
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
let res1 = await draftList({})
|
|
|
if (res1.code == 0) {
|
|
|
// uni.stopPullDownRefresh()
|
| xqd
@@ -378,9 +389,23 @@
|
|
|
})
|
|
|
},
|
|
|
handleCreatePro() {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/robot/generate/index?type=create'
|
|
|
- })
|
|
|
+ if (!uni.getStorageSync('token')) {
|
|
|
+
|
|
|
+ uni.showToast({
|
|
|
+ title: '请登录后创建项目',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ // setTimeout(() => {
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: '/pages/user/signin'
|
|
|
+ // })
|
|
|
+ // }, 1500)
|
|
|
+ return
|
|
|
+ } else {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/robot/generate/index?type=create'
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
handleShowMoreMenu(item, index) {
|
|
|
this.$refs.picker.setIndexs([0])
|