1229 10:50修改

This commit is contained in:
阿怪 2023-12-29 10:51:00 +08:00
parent 6dcbf07b54
commit 2fa219cfe0
3 changed files with 10 additions and 6 deletions

View File

@ -11,6 +11,7 @@
import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
import ccNewsTabs from '@/uni_modules/cc-newsTabs/components/cc-newsTabs/cc-newsTabs.vue'
const store = useStore()
import emptyCard from "@/components/emptyCard.vue"
//
onLoad((e) => {
if(uni.getStorageSync('userInfo')) {
@ -89,6 +90,7 @@
uni.showLoading({
mask:true
})
list_box.value[c_index.value].queryParams.userId = user_info.value?.userId || 0
const res = await api.getTodoist(list_box.value[c_index.value].queryParams,user_info.value?.userId || 0)
uni.hideLoading();
if(res.code === 0) {
@ -172,7 +174,7 @@
<swiper :current="c_index" @change="scroll_func" :style="{'--size':swiper_h+'px'}" class="swiper" circular :indicator-dots="false" :autoplay="false" >
<swiper-item v-for="(item1,i1) in list_box">
<view class="todoBox">
<view v-for="(item,i) in item1.list" @tap="handle_func(item,i)" class="td-item swiper-item uni-bg-green">
<view v-for="(item,i) in item1.list" v-if="item1.list.length>0" @tap="handle_func(item,i)" class="td-item swiper-item uni-bg-green">
<view class="td-content text-ellipsis-2">
{{item.content}}
</view>
@ -180,6 +182,7 @@
{{util.timestampToDate(item.CreatedAt)}}
</view>
</view>
<emptyCard v-else></emptyCard>
</view>
</swiper-item>
</swiper>

View File

@ -190,7 +190,7 @@
<swiper :current="c_index" @change="scroll_func" :style="{'--size':swiper_h+'px'}" class="swiper" circular :indicator-dots="false" :autoplay="false" >
<swiper-item v-for="(item1,i1) in list_box">
<view class="todoBox">
<view v-for="(item,i) in item1.list" @tap="handle_func(item,i)" class="td-item swiper-item uni-bg-green">
<view v-for="(item,i) in item1.list" v-if="item1.list.length>0" @tap="handle_func(item,i)" class="td-item swiper-item uni-bg-green">
<view class="td-content text-ellipsis-2">
{{item.content}}
</view>
@ -198,6 +198,7 @@
{{util.timestampToDate(item.CreatedAt)}}
</view>
</view>
<emptyCard v-else></emptyCard>
</view>
</swiper-item>
</swiper>

View File

@ -71,9 +71,9 @@
}
function toDetail(item) {
let info = encodeURIComponent(JSON.stringify(item))
// console.log(info)
console.log(item)
uni.navigateTo({
url:"/pages/wikipedia/detail?info="+info+"&id="+item.id
url:"/pages/wikipedia/detail?info="+info+"&id="+item.ID
})
}
</script>
@ -82,11 +82,11 @@
<view class="list-box">
<view class="lb-card" v-if="list.length > 0" v-for="(item,i) in list" @tap="toDetail(item)">
<view class="lb-left">
<image :src="item.cover_img" mode="aspectFill"></image>
<image :src="item.cover" mode="aspectFill"></image>
</view>
<view class="lb-right">
<view class="lb-title">{{item.title}}</view>
<view class="lb-content text-ellipsis-1 small-text">{{item.content}}</view>
<view class="lb-content text-ellipsis-1 small-text">{{item.introduction}}</view>
</view>
</view>
<emptyCard v-else></emptyCard>