li.shaoyi 3 月之前
父节点
当前提交
d8b435030b

+ 6 - 6
src/business/bank/index.ts

@@ -68,7 +68,7 @@ export function useDoWithdraw() {
         return t2bBankWithdraw({
             data: {
                 ...formData,
-                ExtOperatorID: new Date().getTime()
+                ExtOperatorID: Date.now()
             }
         }).finally(() => {
             loading.value = false
@@ -121,7 +121,7 @@ export function useDoDeposit(userid?: number) {
         return t2bBankDeposit({
             data: {
                 ...formData,
-                ExtOperatorID: new Date().getTime(),
+                ExtOperatorID: Date.now(),
             }
         }).finally(() => {
             loading.value = false
@@ -295,7 +295,7 @@ export function useDoBankSign() {
 
         return t2bSMSVerificationCode({
             data: {
-                ExtOperatorID: new Date().getTime(),
+                ExtOperatorID: Date.now(),
                 ...swsFormData,
             }
         }).finally(() => {
@@ -314,7 +314,7 @@ export function useDoBankSign() {
             data: {
                 ...formData,
                 OperateType: signstatus === SignStatus.Unsigned ? 1 : 2,
-                ExtOperatorID: new Date().getTime(),
+                ExtOperatorID: Date.now(),
                 extendInfo: JSON.stringify(extendInfo.value)
             }
         }).finally(() => {
@@ -372,7 +372,7 @@ export function useDoCancelBankSign() {
         return t2bBankCancelSign({
             data: {
                 ...formData,
-                ExtOperatorID: new Date().getTime(),
+                ExtOperatorID: Date.now(),
             }
         }).finally(() => {
             loading.value = false
@@ -399,7 +399,7 @@ export function useAccountFundInfo() {
     accountFundInfoReq({
         data: {
             QueryBitMask: 2,
-            OrderId: new Date().getTime(),
+            OrderId: Date.now(),
             AccountId: accountStore.currentAccountId,
         }
     }).then((res) => {

+ 1 - 1
src/business/trade/index.ts

@@ -292,7 +292,7 @@ export function useWrOutInApply(holdlb: Model.HoldLBRsp) {
         WRStandardID: holdlb.wrstandardid,
         WarehouseID: holdlb.warehouseid,
         AppointmentModel: 1,
-        ClientSerialID: new Date().getTime(),    // 客户端流水号
+        ClientSerialID: Date.now(),    // 客户端流水号
         AppointmentDate: formatDate(new Date().toISOString(), 'YYYY-MM-DD'),
     })
 

+ 3 - 3
src/components/base/slider-verify/index.vue

@@ -336,7 +336,7 @@ class Vfcs {
         this.setXY(ev)
         //按下滑块
         this.isDown = true
-        this.startTime = new Date().getTime()
+        this.startTime = Date.now()
         // 若按下滑块
         const isPath = this.ctx.isPointInPath(this.startX, this.startY)
         this.dwonIsPath = isPath
@@ -353,7 +353,7 @@ class Vfcs {
 
         const x = Number(this.moveX.toFixed(2))
         const y = Number(this.moveY.toFixed(2))
-        const moveTime = new Date().getTime()
+        const moveTime = Date.now()
 
         this.guiji.push({ x, y, moveTime })
 
@@ -371,7 +371,7 @@ class Vfcs {
     up() {
         if (this.vfcStatu.statu === 'testing' || this.vfcStatu.statu === 'servertest' || this.offX === 0 || this.dwonIsPath === false || this.moveX <= 0) return
 
-        this.endTime = new Date().getTime()
+        this.endTime = Date.now()
         this.vfcres.startX = this.startX//鼠标/手指按下位置
         this.vfcres.endX = this.dropX + this.dropWidth + this.minX//鼠标/手指抬起位置 
         this.vfcres.timed = this.endTime - this.startTime//耗时

+ 1 - 1
src/packages/mobile/components/modules/register-code/index.vue

@@ -50,7 +50,7 @@ const onCopy = (status: boolean) => {
 
 // 保存二维码
 const onConfirm = () => {
-    plus.saveImage(base64Data.value, 'thj_' + (props.text ?? new Date().getTime()))
+    plus.saveImage(base64Data.value, 'thj_' + (props.text ?? Date.now()))
 }
 
 plus.onPlusReady(() => {

+ 3 - 2
src/packages/tss/views/boot/Index.vue

@@ -47,15 +47,16 @@ const shouldShowSplash = () => {
         state.showSplash = true
       }
     } else if (displayfrequency === 2) {
+      localStorage.removeItem('splash_timestamp')
       state.showSplash = true
     } else if (displayfrequency === 3) {
       const storageTimestamp = Number(localStorage.getItem('splash_timestamp'))
       const currentTimestamp = Date.now()
       const intervalMillisecond = intervaldays * 86400000 // 将天数转换为毫秒
 
-      if ((currentTimestamp - storageTimestamp) > intervalMillisecond) {
-        state.showSplash = true
+      if (!storageTimestamp || (currentTimestamp - storageTimestamp) > intervalMillisecond) {
         localStorage.setItem('splash_timestamp', currentTimestamp.toString())
+        state.showSplash = true
       }
     }
   }

+ 1 - 1
src/stores/modules/global.ts

@@ -61,7 +61,7 @@ export const useGlobalStore = defineStore(() => {
 
     // 获取当前服务器时间戳
     const getTimestamp = () => {
-        const ts = new Date().getTime()
+        const ts = Date.now()
         return ts - state.dateDiff
     }
 

+ 1 - 1
src/utils/h5plus/index.ts

@@ -315,7 +315,7 @@ export default new (class {
     saveImage(base64Data: string, fileName?: string) {
         this.onPlusReady((plus) => {
             const bitmap = new plus.nativeObj.Bitmap()
-            const filename = fileName ?? new Date().getTime()
+            const filename = fileName ?? Date.now()
             bitmap.loadBase64Data(base64Data)
             bitmap.save(`_doc/${filename}.jpg`, { overwrite: true, quality: 100, }, (e: Event) => {
                 //保存到系统相册