|
@@ -1,6 +1,9 @@
|
|
|
|
|
+import showAlert from "@/components/basic/Alert";
|
|
|
import { ColorType } from "@/context/themes/color"
|
|
import { ColorType } from "@/context/themes/color"
|
|
|
import Taro from "@tarojs/taro"
|
|
import Taro from "@tarojs/taro"
|
|
|
|
|
|
|
|
|
|
+let lastJumpTime = 0;
|
|
|
|
|
+
|
|
|
export const getThemeColor = (time: any) => {
|
|
export const getThemeColor = (time: any) => {
|
|
|
if (time.scenario == 'FAST') {
|
|
if (time.scenario == 'FAST') {
|
|
|
return global.fastColor ? global.fastColor : ColorType.fast
|
|
return global.fastColor ? global.fastColor : ColorType.fast
|
|
@@ -17,6 +20,9 @@ export const getThemeColor = (time: any) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
export const jumpPage = (url?: string, pageName?: string, navigation?: any, params?: any) => {
|
|
export const jumpPage = (url?: string, pageName?: string, navigation?: any, params?: any) => {
|
|
|
|
|
+ if (new Date().getTime() - lastJumpTime < 600) {
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
if (process.env.TARO_ENV == 'rn') {
|
|
if (process.env.TARO_ENV == 'rn') {
|
|
|
navigation.push(pageName,params);
|
|
navigation.push(pageName,params);
|
|
|
}
|
|
}
|
|
@@ -25,4 +31,5 @@ export const jumpPage = (url?: string, pageName?: string, navigation?: any, para
|
|
|
url: url ?? ''
|
|
url: url ?? ''
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
+ lastJumpTime = new Date().getTime();
|
|
|
}
|
|
}
|