Files
pte/h5/js/page/my.js
2024-09-27 01:31:25 +08:00

30 lines
932 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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()