优化
This commit is contained in:
@@ -129,7 +129,7 @@
|
||||
<!-- 金币 -->
|
||||
<view class="popup-coin">
|
||||
<view class="p-coin">
|
||||
<view class="p-coin-title">最小金币数</view>
|
||||
<view class="p-coin-title">最小金币数(单位为k)</view>
|
||||
<uni-number-box
|
||||
:max="9999999999"
|
||||
background="ffffff"
|
||||
@@ -139,9 +139,10 @@
|
||||
>请填写金币数量</view
|
||||
>
|
||||
</view>
|
||||
<view class="p-dar">K </view>
|
||||
<view class="p-dar">-</view>
|
||||
<view class="p-coin">
|
||||
<view class="p-coin-title">最大金币数</view>
|
||||
<view class="p-coin-title">最大金币数(单位为k)</view>
|
||||
<uni-number-box
|
||||
:max="9999999999"
|
||||
background="#ffffff"
|
||||
@@ -151,6 +152,7 @@
|
||||
>请填写金币数量</view
|
||||
>
|
||||
</view>
|
||||
<view class="p-dar">K</view>
|
||||
</view>
|
||||
<!-- 时间 -->
|
||||
<view class="p-time" v-if="listtype === 2">
|
||||
@@ -193,6 +195,8 @@ import request from "../../components/request.js";
|
||||
import formatDate from "../../components/formatDate.js";
|
||||
import { useCounterStore } from "@/stores/counter";
|
||||
import optionsArray from "../../components/NationalDictionary.js";
|
||||
import { TUILogin } from "@tencentcloud/tui-core";
|
||||
|
||||
const counter = useCounterStore();
|
||||
export default {
|
||||
inject: ["$global"],
|
||||
@@ -247,6 +251,7 @@ export default {
|
||||
// });
|
||||
},
|
||||
onLoad() {
|
||||
this.AutomaticCleaning();
|
||||
uni.getStorage({
|
||||
key: "userinfo",
|
||||
success: (res) => {
|
||||
@@ -272,6 +277,15 @@ export default {
|
||||
// }, 1000);
|
||||
},
|
||||
methods: {
|
||||
//自动清理
|
||||
AutomaticCleaning() {
|
||||
const lastCleanTime = uni.getStorageSync("last_clean_time") || 0;
|
||||
const now = Date.now();
|
||||
if (now - lastCleanTime < 7 * 24 * 3600 * 1000) return; // 7 days
|
||||
uni.clearStorage();
|
||||
TUILogin.logout();
|
||||
uni.setStorageSync("last_clean_time", now);
|
||||
},
|
||||
//关闭弹窗(取消)
|
||||
closePopup() {
|
||||
this.$refs.popup.close();
|
||||
|
||||
Reference in New Issue
Block a user