mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-11 09:08:14 +08:00
🎨 代码格式化
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
import { onMounted, ref } from "vue";
|
||||
// store
|
||||
import { useUserStore } from "../../store/modules/user";
|
||||
// request
|
||||
// utils
|
||||
import TGRequest from "../../web/request/TGRequest";
|
||||
import TGSqlite from "../../utils/TGSqlite";
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
// vue
|
||||
import { computed, onMounted, ref } from "vue";
|
||||
import { onMounted, ref } from "vue";
|
||||
// store
|
||||
import { useUserStore } from "../../store/modules/user";
|
||||
// utils
|
||||
@@ -21,10 +21,6 @@ import TGSqlite from "../../utils/TGSqlite";
|
||||
const userStore = useUserStore();
|
||||
|
||||
// data
|
||||
const cookie_token = computed(() => userStore.getCookieItem("cookie_token"));
|
||||
const account_id = computed(() => userStore.getCookieItem("account_id"));
|
||||
const ltoken = computed(() => userStore.getCookieItem("ltoken"));
|
||||
const ltuid = computed(() => userStore.getCookieItem("ltuid"));
|
||||
const user = ref({} as TGApp.Sqlite.Account.Game);
|
||||
|
||||
onMounted(async () => {
|
||||
@@ -36,23 +32,13 @@ onMounted(async () => {
|
||||
});
|
||||
|
||||
async function getInfo1 () {
|
||||
const ck = {
|
||||
cookie_token: cookie_token.value,
|
||||
account_id: account_id.value,
|
||||
};
|
||||
console.log(ck);
|
||||
const ck = userStore.getCookieGroup2() as Record<string, string>;
|
||||
const res = await TGRequest.User.getRecord(ck, user.value);
|
||||
console.log(res);
|
||||
}
|
||||
|
||||
async function getInfo2 () {
|
||||
const ck = {
|
||||
ltoken: ltoken.value,
|
||||
ltuid: ltuid.value,
|
||||
};
|
||||
console.log(ck);
|
||||
const ck = userStore.getCookieGroup3() as Record<string, string>;
|
||||
const res = await TGRequest.User.getRecord(ck, user.value);
|
||||
console.log(res);
|
||||
}
|
||||
</script>
|
||||
<style lang="css" scoped>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="lottery-json" v-if="showJson">
|
||||
<div v-if="showJson" class="lottery-json">
|
||||
<JsonViewer :value="jsonData" copyable boxed />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -18,12 +18,12 @@ import TGUtils from "../utils/TGUtils";
|
||||
* @param {TGApp.Sqlite.Account.Game} account 游戏账号
|
||||
* @returns {Promise<TGApp.Game.Character.ListItem[]|TGApp.BBS.Response.Base>} 用户角色列表
|
||||
*/
|
||||
export async function getGameRoleListByLToken(cookie: TGApp.BBS.Constant.CookieGroup4, account: TGApp.Sqlite.Account.Game): Promise<TGApp.Game.Character.ListItem[] | TGApp.BBS.Response.Base> {
|
||||
export async function getGameRoleListByLToken (cookie: TGApp.BBS.Constant.CookieGroup4, account: TGApp.Sqlite.Account.Game): Promise<TGApp.Game.Character.ListItem[] | TGApp.BBS.Response.Base> {
|
||||
const url = TGApi.GameData.byCookie.getCharacter;
|
||||
const uid = account.gameUid;
|
||||
// eslint-disable-next-line camelcase
|
||||
const data = { role_id: uid, server: TGUtils.Tools.getServerByUid(uid) };
|
||||
const header = TGUtils.User.getHeader(cookie as unknown as Record<string,string>, "POST", JSON.stringify(data), "common");
|
||||
const header = TGUtils.User.getHeader(cookie as unknown as Record<string, string>, "POST", JSON.stringify(data), "common");
|
||||
return await http.fetch<TGApp.Game.Character.ListResponse>(url, {
|
||||
method: "POST",
|
||||
headers: header,
|
||||
|
||||
Reference in New Issue
Block a user