Skip to content

Commit

Permalink
🎨 代码格式化
Browse files Browse the repository at this point in the history
  • Loading branch information
BTMuli committed May 28, 2023
1 parent ad2d5ca commit 01962ff
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/pages/User/Abyss.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
20 changes: 3 additions & 17 deletions src/pages/User/Record.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 () => {
Expand All @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion src/views/t-lottery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions src/web/request/getRoleList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 01962ff

Please sign in to comment.