project init

This commit is contained in:
limqhz
2022-11-17 17:05:46 +08:00
parent 597b107cf7
commit eec0e5575f
108 changed files with 4483 additions and 36 deletions

View File

@@ -1,5 +1,6 @@
// pages/today/index.js
const app = getApp();
import ActionSheet, { ActionSheetTheme } from '../../components/action-sheet/index';
let pageStart = 1;
Page({
@@ -10,20 +11,20 @@ Page({
aIconList: ['check-rectangle', 'star-filled', 'notification', 'info-circle'],
taskList: [{'taskId':'1','title':'标题德外旗舰店1','note':'2022-11-11'},{'taskId':'2','title':'标题德外旗舰店2','note':'2022-11-11'}],
todayList: [{'taskId':'1','title':'标题德外旗舰店1','note':'2022-11-11'},{'taskId':'2','title':'标题德外旗舰店2','note':'2022-11-11'}],
delayList: [{'taskId':'1','title':'si哦大家艾吉奥是我','note':'2022-11-11'},
{'taskId':'2','title':'si哦大家艾吉奥是2321','note':'2022-11-11'},
{'taskId':'3','title':'打SD卡我怕','note':'2022-11-11'},
{'taskId':'4','title':'标无间道i文件舰店1','note':'2022-11-11'},
{'taskId':'5','title':'标题大家啊我i家1','note':'2022-11-11'},
{'taskId':'6','title':'标题德外而我却','note':'2022-11-11'},
{'taskId':'7','title':'标题德外旗额我去问1','note':'2022-11-11'},
{'taskId':'8','title':'千而万请问确定德外旗舰店1','note':'2022-11-11'},
{'taskId':'9','title':'标请问请问破千万1','note':'2022-11-11'},
{'taskId':'10','title':'标而且我请问请问1','note':'2022-11-11'},
{'taskId':'11','title':'代欧王大炮物品代码','note':'2022-11-11'},
{'taskId':'12','title':'到ID我们','note':'2022-11-11'},
{'taskId':'13','title':'我去哦额陪娃欧美大片请我们','note':'2022-11-11'},
{'taskId':'14','title':'请问哦气雾剂群殴','note':'2022-11-11'}
delayList: [{'taskId':'1','title':'si哦大家艾吉奥是我','note':'2022-11-11','complete':true},
{'taskId':'2','title':'si哦大家艾吉奥是2321','note':'2022-11-11','complete':true},
{'taskId':'3','title':'打SD卡我怕','note':'2022-11-11','complete':true},
{'taskId':'4','title':'标无间道i文件舰店1','note':'2022-11-11','complete':true},
{'taskId':'5','title':'标题大家啊我i家1','note':'2022-11-11','complete':false},
{'taskId':'6','title':'标题德外而我却','note':'2022-11-11','complete':true},
{'taskId':'7','title':'标题德外旗额我去问1','note':'2022-11-11','complete':false},
{'taskId':'8','title':'千而万请问确京东卡来接我i的骄傲问你我就是准备看看最棒的是的多长定德外旗舰店1','note':'2022-11-11','complete':true},
{'taskId':'9','title':'标请问请问破千万1','note':'2022-11-11','complete':true},
{'taskId':'10','title':'标而且我请问请问1','note':'2022-11-11','complete':true},
{'taskId':'11','title':'代欧王大炮物品代码','note':'2022-11-11','complete':true},
{'taskId':'12','title':'到ID我们','note':'2022-11-11','complete':true},
{'taskId':'13','title':'我去哦额陪娃欧美大片请我们','note':'2022-11-11','complete':true},
{'taskId':'14','title':'请问哦气雾剂群殴','note':'2022-11-11','complete':true}
],
duration: 300, // swiper-item 切换过渡时间
categoryCur: 0, // 当前数据列索引
@@ -108,17 +109,49 @@ Page({
more() {
this.getList('more', this.getCurrentData(this.data.categoryCur).page);
},
showArticle(e) {
console.log(e.detail)
// wx.setClipboardData({
// data: e.currentTarget.dataset.link,
// success(res) {
// wx.showToast({
// icon: "none",
// title: "链接已复制到剪切板"
// })
// }
// })
changeCheck(e){
let currentCur = this.data.categoryCur;
let categoryData = this.getCurrentData();
let currentCheck = categoryData.listData;
currentCheck.forEach(x => {
if (x.taskId == e.target.dataset.id){
x.complete = e.detail.checked;
//TODO 请求,将完成状态更新
}
});
this.setCurrentData(currentCur,categoryData);
},
handleAction(e) {
console.log('testade');
console.log(e.detail);
try{
ActionSheet.show({
theme: ActionSheetTheme.List,
selector: '#t-action-sheet',
context: this,
items: [
{
label: '默认选项',
},
{
label: '自定义选项',
color: '#0052D9',
},
{
label: '失效选项',
disabled: true,
},
{
label: '警告选项',
color: '#e34d59',
},
],
});}catch (e){
console.log(e);
}
},
handleSelected(e) {
console.log(e.detail);
},
onLoad() {
let categoryData = [];

View File

@@ -2,6 +2,7 @@
"usingComponents": {
"foot-tab": "../foot-tab/foot-tab",
"tab": "../../components/tab/index",
"scroll": "../../components/scroll/index"
"scroll": "../../components/scroll/index",
"t-action-sheet": "../../components/action-sheet/action-sheet"
}
}

View File

@@ -23,17 +23,24 @@
wx:for="{{item.listData}}"
wx:key="index"
data-link="{{item.link}}"
bind:longpress="showArticle">
bind:longpress="handleAction">
<view class="name">
<checkbox value="{{item.taskId}}" checked="{{item.complete}}"></checkbox>
<rich-text nodes="{{item.title}}"></rich-text>
<t-checkbox wx:if="{{item.complete}}" borderless data-id="{{item.taskId}}" class="checkedBox" label="{{item.title}}" checked bind:change="changeCheck"/>
<t-checkbox wx:else borderless data-id="{{item.taskId}}" label="{{item.title}}" bind:change="changeCheck"/>
</view>
<view class="remark">
<!--截止时间-->
<!--提醒时间-->
<!--重复-->
<!--任务备注-->
<t-icon name="app"></t-icon><text class="note">{{item.note}}</text>
</view>
<view class="date">{{item.note}}</view>
</view>
</view>
</scroll>
</swiper-item>
</swiper>
<t-action-sheet id="t-action-sheet" bind:selected="handleSelected" />
<view>
<foot-tab iconList="{{aIconList}}"/>
</view>

View File

@@ -27,13 +27,27 @@ swiper {
}
.cell .name {
display: flex;
overflow: hidden; /* 超出部分不显示 */
height: 50rpx;
font-size: 35rpx;
margin-bottom: 12rpx;
}
.cell .date {
color: #999999;
font-size: 24rpx;
checkbox {
width: 50rpx;
height: 50rpx;
box-sizing: border-box;
}
.cell .remark {
display: flex;
color: #999999;
}
.checkedBox .t-checkbox__content {
text-decoration:line-through;
}
.note {
font-size: 28rpx;
}