|
@@ -59,7 +59,9 @@ Page({
|
|
end: '#fff',
|
|
end: '#fff',
|
|
icon: '../../img/process_1.png'
|
|
icon: '../../img/process_1.png'
|
|
}
|
|
}
|
|
- ]
|
|
|
|
|
|
+ ],
|
|
|
|
+ // 期限按钮
|
|
|
|
+ buttons: [{ id: 1, name: "一天" }, { id: 2, name: "两天" }, { id: 3, name:"三天" }]
|
|
|
|
|
|
},
|
|
},
|
|
//进度条的状态
|
|
//进度条的状态
|
|
@@ -90,6 +92,7 @@ Page({
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
|
|
onUnload(){
|
|
onUnload(){
|
|
let page = getCurrentPages();
|
|
let page = getCurrentPages();
|
|
@@ -98,4 +101,51 @@ Page({
|
|
isRefresh :this.data.isRefreshUP,
|
|
isRefresh :this.data.isRefreshUP,
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+=======
|
|
|
|
+ // 期限按钮
|
|
|
|
+ onLoad: function (options) {
|
|
|
|
+ this.data.buttons[0].checked = true;
|
|
|
|
+ this.setData({
|
|
|
|
+ buttons: this.data.buttons,
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ radioButtonTap: function (e) {
|
|
|
|
+ console.log(e)
|
|
|
|
+ let id = e.currentTarget.dataset.id
|
|
|
|
+ console.log(id)
|
|
|
|
+ for (let i = 0; i < this.data.buttons.length; i++) {
|
|
|
|
+ if (this.data.buttons[i].id == id) {
|
|
|
|
+ //当前点击的位置为true即选中
|
|
|
|
+ this.data.buttons[i].checked = true;
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ //其他的位置为false
|
|
|
|
+ this.data.buttons[i].checked = false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.setData({
|
|
|
|
+ buttons: this.data.buttons,
|
|
|
|
+ msg: "id:"+id
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ checkButtonTap:function(e){
|
|
|
|
+ console.log(e)
|
|
|
|
+ let id = e.currentTarget.dataset.id
|
|
|
|
+ console.log(id)
|
|
|
|
+ for (let i = 0; i < this.data.buttons.length; i++) {
|
|
|
|
+ if (this.data.buttons[i].id == id) {
|
|
|
|
+ if (this.data.buttons[i].checked == true) {
|
|
|
|
+ this.data.buttons[i].checked = false;
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ this.data.buttons[i].checked = true;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+>>>>>>> 57f7980a209c37c9f7735fbe7e3a57926d779ed2
|
|
})
|
|
})
|