任务明细页面
This commit is contained in:
8
pages/anniversary/index.js
Normal file
8
pages/anniversary/index.js
Normal file
@@ -0,0 +1,8 @@
|
||||
Page({
|
||||
data: {
|
||||
aIconList: ['check-rectangle','star-filled','notification','circle'],
|
||||
},
|
||||
onLoad: function (options) {
|
||||
|
||||
}
|
||||
});
|
||||
5
pages/anniversary/index.json
Normal file
5
pages/anniversary/index.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"foot-tab": "../foot-tab/foot-tab"
|
||||
}
|
||||
}
|
||||
5
pages/anniversary/index.wxml
Normal file
5
pages/anniversary/index.wxml
Normal file
@@ -0,0 +1,5 @@
|
||||
<!--pages/message/index.wxml-->
|
||||
<text>纪念日</text>
|
||||
<view>
|
||||
<foot-tab iconList="{{aIconList}}"/>
|
||||
</view>
|
||||
0
pages/anniversary/index.wxss
Normal file
0
pages/anniversary/index.wxss
Normal file
@@ -41,7 +41,7 @@ Component({
|
||||
'iconList[1]': 'star-filled'
|
||||
})
|
||||
wx.redirectTo({
|
||||
url: '../task/index'
|
||||
url: '../anniversary/index'
|
||||
})
|
||||
}
|
||||
if (cur == 3){
|
||||
|
||||
@@ -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
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"foot-tab": "../foot-tab/foot-tab"
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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},
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 />
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
.pannel-item {
|
||||
font-size: 32rpx;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
.pannel-item::after {
|
||||
|
||||
Reference in New Issue
Block a user