任务明细页面

This commit is contained in:
limqhz
2022-11-25 16:54:11 +08:00
parent 0becbacd2d
commit d92a31a38e
26 changed files with 417 additions and 112 deletions

View File

@@ -0,0 +1,8 @@
Page({
data: {
aIconList: ['check-rectangle','star-filled','notification','circle'],
},
onLoad: function (options) {
}
});

View File

@@ -0,0 +1,5 @@
{
"usingComponents": {
"foot-tab": "../foot-tab/foot-tab"
}
}

View File

@@ -0,0 +1,5 @@
<!--pages/message/index.wxml-->
<text>纪念日</text>
<view>
<foot-tab iconList="{{aIconList}}"/>
</view>

View File

View File

@@ -41,7 +41,7 @@ Component({
'iconList[1]': 'star-filled'
})
wx.redirectTo({
url: '../task/index'
url: '../anniversary/index'
})
}
if (cur == 3){

View File

@@ -1,48 +0,0 @@
// index.js
// 获取应用实例
const app = getApp()
Page({
data: {
aIconList: ['check-rectangle-filled','star','notification','circle'],
motto: 'Hello World',
userInfo: {},
hasUserInfo: false,
canIUse: wx.canIUse('button.open-type.getUserInfo'),
canIUseGetUserProfile: false,
canIUseOpenData: wx.canIUse('open-data.type.userAvatarUrl') && wx.canIUse('open-data.type.userNickName') // 如需尝试获取用户信息可改为false
},
// 事件处理函数
bindViewTap() {
wx.navigateTo({
url: '../logs/logs'
})
},
onLoad() {
if (wx.getUserProfile) {
this.setData({
canIUseGetUserProfile: true
})
}
},
getUserProfile(e) {
// 推荐使用wx.getUserProfile获取用户信息开发者每次通过该接口获取用户个人信息均需用户确认开发者妥善保管用户快速填写的头像昵称避免重复弹窗
wx.getUserProfile({
desc: '展示用户信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (res) => {
console.log(res)
this.setData({
userInfo: res.userInfo,
hasUserInfo: true
})
}
})
},
getUserInfo(e) {
// 不推荐使用getUserInfo获取用户信息预计自2021年4月13日起getUserInfo将不再弹出弹窗并直接返回匿名的用户个人信息
console.log(e)
this.setData({
userInfo: e.detail.userInfo,
hasUserInfo: true
})
}
})

View File

@@ -1,5 +0,0 @@
{
"usingComponents": {
"foot-tab": "../foot-tab/foot-tab"
}
}

View File

@@ -1,26 +0,0 @@
<!--index.wxml-->
<view class="container">
<view class="userinfo">
<block wx:if="{{canIUseOpenData}}">
<view class="userinfo-avatar" bindtap="bindViewTap">
<open-data type="userAvatarUrl"></open-data>
</view>
<open-data type="userNickName"></open-data>
</block>
<block wx:elif="{{!hasUserInfo}}">
<button wx:if="{{canIUseGetUserProfile}}" bindtap="getUserProfile"> 获取头像昵称 </button>
<button wx:elif="{{canIUse}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo"> 获取头像昵称 </button>
<view wx:else> 请使用1.4.4及以上版本基础库 </view>
</block>
<block wx:else>
<image bindtap="bindViewTap" class="userinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image>
<text class="userinfo-nickname">{{userInfo.nickName}}</text>
</block>
</view>
<view class="usermotto">
<text class="user-motto">{{motto}}</text>
</view>
<view>
<foot-tab iconList="{{aIconList}}"/>
</view>
</view>

View File

@@ -1,19 +0,0 @@
/**index.wxss**/
.userinfo {
display: flex;
flex-direction: column;
align-items: center;
color: #aaa;
}
.userinfo-avatar {
overflow: hidden;
width: 128rpx;
height: 128rpx;
margin: 20rpx;
border-radius: 50%;
}
.usermotto {
margin-top: 200px;
}

View File

@@ -10,7 +10,7 @@ Page({
data: {
tapCheckHandle: undefined,
dateVisible: true,
aIconList: ['check-rectangle', 'star-filled', 'notification', 'info-circle'],
aIconList: ['check-rectangle-filled', 'star', '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','complete':true,'notification':false},

View File

@@ -2,9 +2,11 @@ let taskId = '';
Page({
data: {
mode: '',
dateVisible: false,
alertVisible: false,
completeVisible: false,
date: new Date('2021-12-23').getTime(), // 支持时间戳传入
dateText: '',
alertText: '',
completeText: '',
// 指定选择区间起始值
start: '2008-01-01 00:00:00',
end: '2040-12-31 23:59:59',

View File

@@ -1,5 +1,8 @@
{
"usingComponents": {
"t-date-time-picker": "../../components/date-time-picker/date-time-picker"
"t-date-time-picker": "../../components/date-time-picker/date-time-picker",
"t-picker": "../../components/picker/picker",
"t-picker-item": "../../components/picker/picker-item",
"t-switch": "../../components/switch/switch"
}
}

View File

@@ -2,17 +2,51 @@
<t-cell
title="完成日期"
hover
note="{{dateText || '年 月 日'}}"
note="{{completeText || '年 月 日'}}"
arrow
data-mode="date"
data-mode="complete"
bindtap="showPicker"
class="test"
t-class="pannel-item"
t-class-note="{{dateText ? 'sub-text' : 'empty'}}"
t-class-note="{{completeText ? 'sub-text' : 'empty'}}"
/>
<t-cell
title="提醒日期"
hover
note="{{alertText || '年 月 日'}}"
arrow
data-mode="alert"
bindtap="showPicker"
t-class="pannel-item"
t-class-note="{{alertText ? 'sub-text' : 'empty'}}"
/>
<t-picker
visible="{{cityVisible}}"
value="{{cityValue}}"
data-key="city"
title="{{pickerTitle}}"
cancelBtn="取消"
confirmBtn="确认"
bindchange="onPickerChange"
bindpick="onColumnChange"
bindcancel="onPickerCancel"
>
<t-picker-item options="{{citys}}"></t-picker-item>
</t-picker>
<t-date-time-picker
title="选择日期"
visible="{{dateVisible}}"
title="选择日期1"
visible="{{completeVisible}}"
mode="date"
defaultValue="{{date}}"
format="YYYY-MM-DD"
bindchange="onConfirm"
bindpick="onColumnChange"
bindcancel="hidePicker"
start="{{start}}"
end="{{end}}"
></t-date-time-picker>
<t-date-time-picker
title="选择日期2"
visible="{{alertVisible}}"
mode="date"
defaultValue="{{date}}"
format="YYYY-MM-DD"
@@ -22,4 +56,3 @@
start="{{start}}"
end="{{end}}"
></t-date-time-picker>
<t-input placeholder="最大输入10个字符" maxlength="{{10}}" clearable />

View File

@@ -1,6 +1,5 @@
.pannel-item {
font-size: 32rpx;
margin-bottom: 32rpx;
}
.pannel-item::after {