first commit
This commit is contained in:
30
h5/js/page/my.js
Normal file
30
h5/js/page/my.js
Normal file
@@ -0,0 +1,30 @@
|
||||
class My {
|
||||
constructor() {
|
||||
this.bindClick()
|
||||
}
|
||||
|
||||
bindClick() {
|
||||
document.querySelector(".updateApp").onclick = function () {
|
||||
Tips.loading()
|
||||
setTimeout(()=>{
|
||||
Tips.close();
|
||||
Tips.toast("当前已是最新版本",2000)
|
||||
},2000)
|
||||
}
|
||||
document.querySelector(".clearData").onclick = function () {
|
||||
Tips.dialog({
|
||||
title: '清除缓存',
|
||||
message: '是否清除App所有的缓存,将会删除收藏的数据,首页的自定义分类等,慎重选择!!',
|
||||
cancelText: '取消',
|
||||
confirmText: '确定',
|
||||
confirm: ()=> {
|
||||
localStorage.clear()
|
||||
setTimeout(()=>{
|
||||
Tips.toast("缓存清除成功")
|
||||
},1000)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
new My()
|
||||
Reference in New Issue
Block a user