加了清除历史记录和清除收藏的函数,方便后面写个性化的同学可以直接调用,总感觉有种安排后事的。。。。XD
This commit is contained in:
1 parent
a3d512a681
commit
1f09e88de3
2 files changed
+23
-4
No files matched your search
@@ -935,6 +935,7 @@ Page({
|
||||
return { "color": "tomato", "content": "高风险" };
|
||||
},
|
||||
|
||||
//..
|
||||
id2resultAndDate(id: number) {
|
||||
for (var i in this.data.data_history) {
|
||||
for (var n of this.data.data_history[i])
|
||||
@@ -974,6 +975,24 @@ Page({
|
||||
|
||||
},
|
||||
|
||||
// 清空收藏,可以放在个性化里面,最好加个确认的选项
|
||||
clearCollection(){
|
||||
this.data.data_collect=[]
|
||||
this.setData({
|
||||
data_collect:this.data.data_collect,
|
||||
})
|
||||
this.save2storage()
|
||||
},
|
||||
|
||||
//清空历史记录,可以放在个性化里面,最好加个确认的选项
|
||||
clearHistory(){
|
||||
this.data.data_history=[]
|
||||
this.setData({
|
||||
data_history:this.data.data_history,
|
||||
})
|
||||
this.save2storage()
|
||||
},
|
||||
|
||||
// 事件处理函数
|
||||
bindViewTap() {
|
||||
wx.navigateTo({
|
||||
|
||||
Reference in new issue
Block a user