fix: 提交重启应用代码
This commit is contained in:
parent
198fa634fe
commit
46c3825c59
@ -427,12 +427,14 @@ struct Index {
|
|||||||
const isRestart = await PreferenceUtils.getOtherModel("isRestart")
|
const isRestart = await PreferenceUtils.getOtherModel("isRestart")
|
||||||
if (isRestart === "1") {
|
if (isRestart === "1") {
|
||||||
PreferenceUtils.writeOtherData("0", "isRestart")
|
PreferenceUtils.writeOtherData("0", "isRestart")
|
||||||
|
setTimeout(() => {
|
||||||
router.pushUrl({
|
router.pushUrl({
|
||||||
url: 'pages/UserInfo',
|
url: 'pages/UserInfo',
|
||||||
params: {
|
params: {
|
||||||
type: 1
|
type: 1
|
||||||
}
|
}
|
||||||
}, router.RouterMode.Single);
|
}, router.RouterMode.Single);
|
||||||
|
}, 2000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -200,7 +200,7 @@ struct UserInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async onPageShow() {
|
async onPageShow() {
|
||||||
if (this.examCount > 2) {
|
if (this.examCount > 5) {
|
||||||
PreferenceUtils.writeOtherData("1", "isRestart")
|
PreferenceUtils.writeOtherData("1", "isRestart")
|
||||||
this.cozyDialog.open()
|
this.cozyDialog.open()
|
||||||
// 延迟关闭
|
// 延迟关闭
|
||||||
@ -1343,6 +1343,21 @@ struct UserInfo {
|
|||||||
} else {
|
} else {
|
||||||
// Image($r('app.media.ksks_btn'))
|
// Image($r('app.media.ksks_btn'))
|
||||||
// .commStyle()
|
// .commStyle()
|
||||||
|
// Button(){
|
||||||
|
// Text("add")
|
||||||
|
// }.width(100).height(30).onClick(()=>{
|
||||||
|
// this.examCount++
|
||||||
|
// if (this.examCount > 2) {
|
||||||
|
// PreferenceUtils.writeOtherData("1", "isRestart")
|
||||||
|
// this.cozyDialog.open()
|
||||||
|
// // 延迟关闭
|
||||||
|
// setTimeout(() => {
|
||||||
|
// this.cozyDialog.close()
|
||||||
|
// appRecovery.restartApp()
|
||||||
|
// }, 3000)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// })
|
||||||
imageBtn({ btnWidth: 220 * this.ratio, btnHeight: 69 * this.ratio, imgSrc: $r('app.media.ksks_btn') })
|
imageBtn({ btnWidth: 220 * this.ratio, btnHeight: 69 * this.ratio, imgSrc: $r('app.media.ksks_btn') })
|
||||||
.margin({ bottom: 12 * this.ratio })
|
.margin({ bottom: 12 * this.ratio })
|
||||||
.onClick(async () => {
|
.onClick(async () => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user