管理员可以修改项目所属人

This commit is contained in:
sdaduanbilei 2025-12-01 17:32:26 +08:00
parent e1d5caf192
commit 8eb2c136b9
4 changed files with 27 additions and 22 deletions

View File

@ -37,7 +37,7 @@
<image class="pic" mode="aspectFill" wx:else src="https://res.catter.cn/pub/2025/09/30/20250930143920286.png"></image>
<view style="margin-left:16rpx;" class="full-width">
<view class="flex flex-center flex-justify-between full-width">
<view class="font-16 bold">{{item.plant.name}}</view>
<view class="font-16 bold">{{item.name}}</view>
<t-tag wx:if="{{item.todayCare.status === 1}}" shape="round" theme="primary">立即完成</t-tag>
<t-tag wx:if="{{item.todayCare.status === 2}}" shape="round">已完成</t-tag>
<t-tag wx:if="{{item.todayCare.status === 3}}" shape="round" theme="primary">跳过</t-tag>

View File

@ -16,6 +16,7 @@ Page({
rightList: [],
leftHeight: 0,
rightHeight: 0,
hotList:[]
},
/**
@ -48,6 +49,10 @@ Page({
if (res.data === null) {
return
}
if (res.data.list.length === 0) {
this.fetchHotList()
return
}
this.setData({leftList:[],rightList:[]})
const tmps = res.data.list.map(e => {
e.pic = e.imgList[0].url
@ -64,6 +69,18 @@ Page({
})
},
fetchHotList(){
api('/library/list','POST',{isHot:0,current:0,pageSize:6},'json').then(res => {
if (res.code === 200){
const data = res.data.list.map(e => {
e.pic = e.imgList[0].url
return e
})
this.setData({hotList:data})
}
})
},
addItems(newItems) {
let h1 = 0;
let h2 = 0;

View File

@ -64,14 +64,14 @@
</view>
</view>
<view class="info font-12">
<view wx:if="{{item.todayCares}}" class="flex flex-center flex-justify-start">
<view wx:if="{{item.needCare === 1}}" class="flex flex-center flex-justify-start">
<t-icon name="saturation" style="color: #4B84EE;"></t-icon>
<view class="ml-5 small">
今日需养护
</view>
</view>
<view wx:else>
<t-icon name="saturation" style="color: #4B84EE;"></t-icon>
<view wx:else class="flex flex-center flex-justify-start">
<t-icon name="saturation" style="color: #4FAB5F;"></t-icon>
<view class="ml-5 small">
今日无需养护
</view>
@ -97,14 +97,14 @@
<view class="mt-32 white-bg padding row">
<view class="flex flex-center font-12 grey">您还可以从以下热门植物中,免费领取</view>
<view class="grid mt-32">
<view wx:for="{{6}}">
<image src="https://www.xnbl.net/file/upload/202311/09/094651507814.jpg.middle.jpg" style="width:40vw;height: 40vw; border-top-left-radius: 12rpx;border-top-right-radius: 12rpx;" mode="widthFix"></image>
<view wx:for="{{hotList}}">
<image src="{{item.pic}}" style="width:40vw;height: 40vw; border-top-left-radius: 12rpx;border-top-right-radius: 12rpx;" mode="widthFix"></image>
<view>
<view class="flex flex-center flex-justify-start">
<view class="font-16 bold">绿萝</view>
<t-tag theme="primary" class="ml-16" size="small">超好养</t-tag>
<view class="font-16 bold">{{item.name}}</view>
<t-tag theme="primary" class="ml-16" size="small">{{item.genus}}</t-tag>
</view>
<view class="font-12 grey">日照充足、超级好养</view>
<view class="font-12 grey">{{item.lifeCycle}} {{item.lightIntensity}}</view>
</view>
</view>
</view>

View File

@ -20,17 +20,5 @@
"bigPackageSizeSupport": false
},
"libVersion": "3.10.1",
"condition": {
"miniprogram": {
"list": [
{
"name": "pages/community/add",
"pathName": "pages/community/add",
"query": "",
"scene": null,
"launchMode": "default"
}
]
}
}
"condition": {}
}