Commit 44976d49 by 陈玉桐

修复 日期选择器endDate

parent c5e74f79
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
"pages": [ "pages": [
"pages/index/index", "pages/index/index",
"pages/childInfo/childInfo", "pages/childInfo/childInfo",
"pages/eyesight/eyesight",
"pages/setting/setting",
"pages/historyDetail/historyDetail", "pages/historyDetail/historyDetail",
"pages/trainReport/trainReport", "pages/trainReport/trainReport",
"pages/starSort/starSort", "pages/starSort/starSort",
"pages/updatePlan/updatePlan", "pages/updatePlan/updatePlan",
"pages/trainSort/trainSort", "pages/trainSort/trainSort",
"pages/eyesight/eyesight",
"pages/setting/setting",
"pages/user/user", "pages/user/user",
"pages/plan/plan", "pages/plan/plan",
"pages/message/message", "pages/message/message",
......
...@@ -6,9 +6,14 @@ Page({ ...@@ -6,9 +6,14 @@ Page({
sex: '',// 性别 sex: '',// 性别
sexList: [{ id: 1, name: '男孩' }, { id: 2, name: '女孩' }], sexList: [{ id: 1, name: '男孩' }, { id: 2, name: '女孩' }],
isNull: false, isNull: false,
ednDate: ''
}, },
onLoad: function (options) { onLoad: function (options) {
let me = this; let me = this;
let myDate = new Date()
me.setData({
ednDate: myDate.getFullYear()+'-'+(myDate.getMonth()+1)+'-'+myDate.getDate()
})
// 请求前加Loading // 请求前加Loading
wx.showLoading({ wx.showLoading({
title: '加载中', title: '加载中',
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<!-- 生日 --> <!-- 生日 -->
<view class="childInfoListItem"> <view class="childInfoListItem">
<view class="childInfoListItemTitle"><text>* </text>生日</view> <view class="childInfoListItemTitle"><text>* </text>生日</view>
<picker mode="date" value="{{date}}" start="1990-09-01" end="2025-01-01" bindchange="bindDateChange"> <picker mode="date" value="{{date}}" start="1990-09-01" end="{{ednDate}}" bindchange="bindDateChange">
<view class="birthdaypPicker rightInput"> <view class="birthdaypPicker rightInput">
{{date}} {{date}}
</view> </view>
......
...@@ -49,9 +49,15 @@ Page({ ...@@ -49,9 +49,15 @@ Page({
isClass: 0, //是否配镜 isClass: 0, //是否配镜
date: '2012-01-01',// 配镜日期 date: '2012-01-01',// 配镜日期
currentDate: ''
}, },
onLoad: function (options) { onLoad: function (options) {
let me = this; let me = this;
let myDate = new Date()
me.setData({
currentDate: myDate.getFullYear()+'-'+(myDate.getMonth()+1)+'-'+myDate.getDate()
})
}, },
eyesightBack: function() { eyesightBack: function() {
let me = this; let me = this;
......
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
</view> </view>
<view class="eyesightConItem eyesightConItemLast"> <view class="eyesightConItem eyesightConItemLast">
<view class="eyesightConLeft eyesightConLeftTitle">· 配镜日期</view> <view class="eyesightConLeft eyesightConLeftTitle">· 配镜日期</view>
<picker mode="date" value="{{date}}" start="1990-09-01" end="2025-09-01" class="selectorPicker" bindchange="bindDateChange"> <picker mode="date" value="{{date}}" start="1990-09-01" end="{{currentDate}}" class="selectorPicker" bindchange="bindDateChange">
<view class="eyesightConRight"> <view class="eyesightConRight">
{{date}} {{date}}
</view> </view>
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<view class="useSettingTipIcon"> <view class="useSettingTipIcon">
<image src="../../assets/tips.png" /> <image src="../../assets/tips.png" />
<view class='invite' hidden="{{!constraintTipShow}}"> <view class='invite' hidden="{{!constraintTipShow}}">
训练的使用时长达到设定时间后,系统将自动进行护眼训练 训练的使用时长达到设定时间后,系统将自动进行护眼训练
</view> </view>
</view> </view>
</view> </view>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment