-
mdi-circle
+
mdi-circle
mdi-check-circle
{{ mission.name }} - {{ mission.reward }}米游币
- Day{{ mission.cycleTimes }}
@@ -42,7 +42,6 @@ import miscReq from "@/web/request/miscReq.js";
import painterReq from "@/web/request/painterReq.js";
import postReq from "@/web/request/postReq.js";
-type TusMissionProps = { account?: TGApp.App.Account.User };
type ParseMission = {
id: number;
key: string;
@@ -54,8 +53,7 @@ type ParseMission = {
cycleTimes?: number;
};
-const { cookie } = storeToRefs(useUserStore());
-const props = defineProps
();
+const { cookie, uid } = storeToRefs(useUserStore());
const loadScript = defineModel();
const todayPoints = ref(0);
const totalPoints = ref(0);
@@ -65,13 +63,10 @@ const parseMissions = shallowRef>([]);
const missionList = shallowRef>([]);
watch(
- () => props.account,
- (val) => {
- console.log(val);
+ () => uid.value,
+ () => {
todayPoints.value = 0;
totalPoints.value = 0;
- loadState.value = false;
- loadMission.value = false;
parseMissions.value = [];
missionList.value = [];
},
diff --git a/src/pages/User/Scripts.vue b/src/pages/User/Scripts.vue
index ab598352..853a2600 100644
--- a/src/pages/User/Scripts.vue
+++ b/src/pages/User/Scripts.vue
@@ -252,11 +252,18 @@ async function tryCkVerify(): Promise {
align-items: center;
justify-content: flex-start;
overflow-y: auto;
- row-gap: 4px;
+ row-gap: 8px;
+ max-height: 100%;
+ padding-right: 8px;
+ box-sizing: border-box;
}
.us-title {
- position: relative;
+ position: sticky;
+ width: 100%;
+ background: var(--app-page-bg);
+ top: 0;
+ z-index: 2;
margin-right: auto;
color: var(--common-text-title);
font-family: var(--font-title);
diff --git a/src/plugins/Sqlite/modules/userAccount.ts b/src/plugins/Sqlite/modules/userAccount.ts
index b755492d..b2bbf029 100644
--- a/src/plugins/Sqlite/modules/userAccount.ts
+++ b/src/plugins/Sqlite/modules/userAccount.ts
@@ -1,7 +1,7 @@
/**
* @file plugins/Sqlite/modules/userAccounts.ts
* @description 用户账户模块
- * @since Beta v0.6.1
+ * @since Beta v0.7.2
*/
import TGSqlite from "@Sqlite/index.js";
@@ -216,15 +216,16 @@ function copyCookie(cookie: TGApp.App.Account.Cookie): string {
/**
* @description 获取指定用户账号
- * @since Beta v0.6.0
+ * @since Beta v0.7.2
* @param {string} uid - 用户UID
* @returns {Promise}
*/
async function getGameAccount(uid: string): Promise {
const db = await TGSqlite.getDB();
- return await db.select("SELECT * FROM GameAccount WHERE uid = ?;", [
- uid,
- ]);
+ return await db.select(
+ "SELECT * FROM GameAccount WHERE uid = ? ORDER BY region, gameUid;",
+ [uid],
+ );
}
/**
@@ -263,7 +264,7 @@ async function getCurGameAccount(uid: string): Promise} accounts - 账户数据
* @return {Promise}
@@ -273,9 +274,7 @@ async function saveGameAccount(
accounts: Array,
): Promise {
const db = await TGSqlite.getDB();
- for (const account of accounts) {
- await db.execute(getInsertGameAccountSql(uid, account));
- }
+ await Promise.all(accounts.map((account) => db.execute(getInsertGameAccountSql(uid, account))));
}
/**