调整任务提交无法打开问题

wyd_branch
Your Name 2 years ago
parent f41fd9dc5e
commit 69dd1db0b7

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

@ -0,0 +1,24 @@
// index.ts
// 获取应用实例
const app = getApp<IAppOption>()
Page({
data: {
taskList: [],
motto: 'Hello World',
},
onShow() {
// let list = [
// { id: 1, title: "任务一", startTime: "2022-10-01", endTime: "1020-20-22", end: "40" },
// { id: 2, title: "任务二", startTime: "2022-10-01", endTime: "1020-20-22", end: "40" },
// { id: 3, title: "任务三", startTime: "2022-10-01", endTime: "1020-20-22", end: "40" }
// ]
this.setData({
taskList: wx.getStorageSync("taskList") || []
});
},
onLoad() {
this.setData({
taskList: wx.getStorageSync("taskList") || []
});
},
})

@ -0,0 +1,33 @@
<view class="wrip-view">
<!-- 轮播区域 -->
<view>
<view class="swip">
<text class="swip-text">公告栏</text>
<swiper indicator-dots="{{true}}" autoplay="{{true}}" interval="{{2000}}">
<block wx:for="{{3}}" wx:key="*this">
<swiper-item>
<view class="swiper-item">
<image src="/static/index/spwr01.jpg"></image>
</view>
</swiper-item>
</block>
</swiper>
</view>
</view>
<!-- 任务列表 -->
<view class="task" wx:if="{{taskList.length!=0}}">
<block wx:for="{{taskList}}" wx:key="id">
<view class="task-item">
<view class="task-item-title"> {{item.title}}: </view>
<view class="task-item-text">
<text> 开始时间:{{item.startTime}} </text>
<text> 截止时间:{{item.endTime}} </text>
</view>
</view>
</block>
</view>
<view class="error" wx:else>
暂无数据
</view>
</view>

@ -0,0 +1,43 @@
.wrip-view {
height: 100%;
}
.swip {
background: rgb(243, 243, 243);
position: relative;
}
.swip-text {
position: absolute;
width: 100%;
z-index: 100;
text-align: center;
font-size: 20px;
color: rgb(95, 95, 95);
}
.task {
padding: 8px;
}
.task-item {
padding: 8px 4px 10px 4px;
margin: 10px 0;
border-radius: 10px;
background-color: #fff;
}
.task-item-title {
font-family: "楷体";
font-size: 18px;
margin-bottom: 6px;
}
.task-item-text {
font-size: 10px;
color: rgb(146, 146, 146);
}
.error{
text-align: center;
padding: 20px;
}
Loading…
Cancel
Save