加了清除历史记录和清除收藏的函数,方便后面写个性化的同学可以直接调用,总感觉有种安排后事的。。。。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": "高风险" };
|
return { "color": "tomato", "content": "高风险" };
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//..
|
||||||
id2resultAndDate(id: number) {
|
id2resultAndDate(id: number) {
|
||||||
for (var i in this.data.data_history) {
|
for (var i in this.data.data_history) {
|
||||||
for (var n of this.data.data_history[i])
|
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() {
|
bindViewTap() {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
|
|||||||
@@ -242,10 +242,10 @@
|
|||||||
<!-- 收藏的时候设置备注的输入框 -->
|
<!-- 收藏的时候设置备注的输入框 -->
|
||||||
<view id="star_setRemark">
|
<view id="star_setRemark">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<view>{{"输入备注,至多八字"}}</view>
|
<view>{{"输入备注,至多七字"}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="input">
|
<view class="input">
|
||||||
<input id="input_setRemark" bindinput='getInputRemark' placeholder="___________________" maxlength="8"/>
|
<input id="input_setRemark" bindinput='getInputRemark' placeholder="___________________" maxlength="7"/>
|
||||||
</view>
|
</view>
|
||||||
<view class="verify" bind:tap="add_collection">确认</view>
|
<view class="verify" bind:tap="add_collection">确认</view>
|
||||||
<view class="cancel" bind:tap="exit_setRemark">取消</view>
|
<view class="cancel" bind:tap="exit_setRemark">取消</view>
|
||||||
@@ -253,10 +253,10 @@
|
|||||||
|
|
||||||
<view id="editRemark">
|
<view id="editRemark">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<view>{{"修改备注,至多八字"}}</view>
|
<view>{{"修改备注,至多七字"}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="input">
|
<view class="input">
|
||||||
<input bindinput='getInputRemark' placeholder="___________________" maxlength="8"/>
|
<input bindinput='getInputRemark' placeholder="___________________" maxlength="7"/>
|
||||||
</view>
|
</view>
|
||||||
<view class="verify" bind:tap="editRemark">确认</view>
|
<view class="verify" bind:tap="editRemark">确认</view>
|
||||||
<view class="cancel" bind:tap="exit_editRemark">取消</view>
|
<view class="cancel" bind:tap="exit_editRemark">取消</view>
|
||||||
|
|||||||
Reference in new issue
Block a user