重置密码
这个提交包含在:
父节点
6d3e87a5ed
当前提交
d60fdcc816
@ -110,7 +110,10 @@ export class HttpHelper {
|
||||
if (data.responseCode === 200) {
|
||||
resolve((typeof data.result === 'string' ? JSON.parse(data.result) : data.result) as T)
|
||||
} else {
|
||||
reject('服务异常')
|
||||
const err: Error = new Error()
|
||||
err.name = data.responseCode.toString()
|
||||
err.message = '服务异常'
|
||||
reject(err)
|
||||
}
|
||||
}).catch((err: Error) => {
|
||||
if (this.httpHandlerList.hasKey(apiNo ?? params.url)) {
|
||||
@ -179,7 +182,10 @@ export class HttpHelper {
|
||||
if (data.responseCode === 200) {
|
||||
resolve((typeof data.result === 'string' ? JSON.parse(data.result) : data.result) as T)
|
||||
} else {
|
||||
reject('服务异常')
|
||||
const err: Error = new Error()
|
||||
err.name = data.responseCode.toString()
|
||||
err.message = '服务异常'
|
||||
reject(err)
|
||||
}
|
||||
}).catch((err: Error) => {
|
||||
if (this.httpHandlerList.hasKey(apiNo ?? params.url)) {
|
||||
@ -245,7 +251,10 @@ export class HttpHelper {
|
||||
if (data.responseCode === 200) {
|
||||
resolve((typeof data.result === 'string' ? JSON.parse(data.result) : data.result) as T)
|
||||
} else {
|
||||
reject('服务异常')
|
||||
const err: Error = new Error()
|
||||
err.name = data.responseCode.toString()
|
||||
err.message = '服务异常'
|
||||
reject(err)
|
||||
}
|
||||
}).catch((err: Error) => {
|
||||
if (this.httpHandlerList.hasKey(apiNo ?? params.url)) {
|
||||
|
||||
@ -2,6 +2,7 @@ import promptAction from '@ohos.promptAction';
|
||||
import { BusinessError, deviceInfo } from '@kit.BasicServicesKit';
|
||||
import { HashMap } from '@kit.ArkTS';
|
||||
import { DeviceInfo } from '../bean/DeviceInfo';
|
||||
import { common } from '@kit.AbilityKit';
|
||||
|
||||
export interface Btn {
|
||||
text?: string | Resource;
|
||||
@ -112,6 +113,26 @@ export class ToolsHelper {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private static oTime: number = 0
|
||||
/**
|
||||
* 双击退出
|
||||
* @param msg
|
||||
*/
|
||||
static doubleAndExit() {
|
||||
const cTime = new Date().getTime()
|
||||
console.log('=====>', cTime)
|
||||
console.log('=====>', cTime - ToolsHelper.oTime)
|
||||
if (cTime - ToolsHelper.oTime > 800) {
|
||||
ToolsHelper.oTime = cTime
|
||||
ToolsHelper.showMessage('双击退出')
|
||||
} else {
|
||||
// getContext().getApplicationContext().killAllProcesses();
|
||||
(getContext() as common.UIAbilityContext).terminateSelf()
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
/**kio9
|
||||
* 弹出Alert弹窗
|
||||
* @param options
|
||||
|
||||
正在加载...
在新工单中引用
屏蔽一个用户