|
@@ -0,0 +1,124 @@
|
|
|
+Page({
|
|
|
+ data: {
|
|
|
+ role: "teacher",
|
|
|
+ historyList: [
|
|
|
+ {
|
|
|
+ image: 'https://img1.baidu.com/it/u=2052658756,3021621759&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500',
|
|
|
+ title: '趣味识字卡片',
|
|
|
+ date: '2023-10-15 14:30',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ image: 'https://img1.baidu.com/it/u=2052658756,3021621759&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500',
|
|
|
+ title: '趣味识字卡片',
|
|
|
+ date: '2023-10-15 14:30',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ image: 'https://img1.baidu.com/it/u=2052658756,3021621759&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500',
|
|
|
+ title: '趣味识字卡片',
|
|
|
+ date: '2023-10-15 14:30',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ image: 'https://img1.baidu.com/it/u=2052658756,3021621759&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500',
|
|
|
+ title: '趣味识字卡片',
|
|
|
+ date: '2023-10-15 14:30',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ image: 'https://img1.baidu.com/it/u=2052658756,3021621759&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500',
|
|
|
+ title: '趣味识字卡片',
|
|
|
+ date: '2023-10-15 14:30',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ image: 'https://img1.baidu.com/it/u=2052658756,3021621759&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500',
|
|
|
+ title: '趣味识字卡片',
|
|
|
+ date: '2023-10-15 14:30',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ image: 'https://img1.baidu.com/it/u=2052658756,3021621759&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500',
|
|
|
+ title: '趣味识字卡片',
|
|
|
+ date: '2023-10-15 14:30',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ image: 'https://img1.baidu.com/it/u=2052658756,3021621759&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500',
|
|
|
+ title: '趣味识字卡片',
|
|
|
+ date: '2023-10-15 14:30',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ image: 'https://img1.baidu.com/it/u=2052658756,3021621759&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500',
|
|
|
+ title: '趣味识字卡片',
|
|
|
+ date: '2023-10-15 14:30',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ image: 'https://img1.baidu.com/it/u=2052658756,3021621759&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500',
|
|
|
+ title: '趣味识字卡片',
|
|
|
+ date: '2023-10-15 14:30',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ image: 'https://img1.baidu.com/it/u=2052658756,3021621759&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500',
|
|
|
+ title: '趣味识字卡片',
|
|
|
+ date: '2023-10-15 14:30',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ image: 'https://img1.baidu.com/it/u=2052658756,3021621759&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500',
|
|
|
+ title: '趣味识字卡片',
|
|
|
+ date: '2023-10-15 14:30',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ // 其他列表项...
|
|
|
+ ],
|
|
|
+ isManaging: false
|
|
|
+ },
|
|
|
+
|
|
|
+ onLoad(options) {
|
|
|
+ // 页面加载时的初始化操作
|
|
|
+ },
|
|
|
+
|
|
|
+ onReachBottom() {
|
|
|
+ // 上拉触底事件的处理函数
|
|
|
+ this.loadMore();
|
|
|
+ },
|
|
|
+
|
|
|
+ loadMore() {
|
|
|
+ // 加载更多数据的逻辑
|
|
|
+ console.log('加载更多');
|
|
|
+ },
|
|
|
+
|
|
|
+ toggleManageMode() {
|
|
|
+ const { isManaging, historyList } = this.data;
|
|
|
+ if (isManaging) {
|
|
|
+ if (historyList && historyList.length > 0) {
|
|
|
+ historyList.forEach(item => item.checked = false);
|
|
|
+ }
|
|
|
+ this.setData({ isManaging: false });
|
|
|
+ } else {
|
|
|
+ this.setData({ isManaging: true });
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ selectAll() {
|
|
|
+ const { historyList } = this.data;
|
|
|
+ if (historyList && historyList.length > 0) {
|
|
|
+ const allChecked = historyList.every(item => item.checked);
|
|
|
+ historyList.forEach(item => item.checked = !allChecked);
|
|
|
+ this.setData({ historyList });
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ deleteItems() {
|
|
|
+ const { historyList } = this.data;
|
|
|
+ if (historyList && historyList.length > 0) {
|
|
|
+ const newList = historyList.filter(item => !item.checked);
|
|
|
+ this.setData({ historyList: newList });
|
|
|
+ }
|
|
|
+ }
|
|
|
+});
|