mirror of
https://gitee.com/h_mo/uniapp-vue3-vite-ts-template
synced 2025-08-08 07:29:46 +08:00
style: 格式化代码
This commit is contained in:
parent
1a9643e970
commit
d33a9aad0f
@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { useUserStore } from '@/stores/modules/user';
|
||||
import { onHide, onLaunch, onShow } from '@dcloudio/uni-app';
|
||||
import { useUserStore } from '@/stores/modules/user';
|
||||
|
||||
onLaunch(() => {
|
||||
console.log('App Launch');
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { mockGroupV1 } from '@/mock/v1';
|
||||
import { uniappMockResponse, uniappRequestAdapter } from '@alova/adapter-uniapp';
|
||||
import { createAlovaMockAdapter } from '@alova/mock';
|
||||
import { mockGroupV1 } from '@/mock/v1';
|
||||
|
||||
/**
|
||||
* 模拟数据请求适配器
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { ResultEnum } from '@/enums/httpEnum';
|
||||
import { createMock } from '@/mock/utils';
|
||||
import { getRandomChsString } from '@/utils/character';
|
||||
import { defineMock } from '@alova/mock';
|
||||
import multiavatar from '@multiavatar/multiavatar';
|
||||
import { join, random, sampleSize } from 'lodash-es';
|
||||
import { ResultEnum } from '@/enums/httpEnum';
|
||||
import { createMock } from '@/mock/utils';
|
||||
import { getRandomChsString } from '@/utils/character';
|
||||
|
||||
function createRandomToken(len = 36 * 6) {
|
||||
const token = join(sampleSize('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._-', len), '');
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { omit } from 'lodash-es';
|
||||
import { useUserStore } from '@/stores/modules/user';
|
||||
import { Toast } from '@/utils/uniapi/prompt';
|
||||
import { omit } from 'lodash-es';
|
||||
|
||||
const pageQuery = ref<Record<string, any> | undefined>(undefined);
|
||||
onLoad((query) => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import BasicButton from '@/components/BasicButton/index.vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import BasicButton from '@/components/BasicButton/index.vue';
|
||||
|
||||
const go = ref<string>('');
|
||||
const router = useRouter();
|
||||
|
@ -1,10 +1,10 @@
|
||||
import type { UserInfoModel } from '@/services/model/userModel';
|
||||
import { defineStore } from 'pinia';
|
||||
import { TOKEN_KEY } from '@/enums/cacheEnum';
|
||||
import { login as loginApi } from '@/services/api/auth';
|
||||
import { getUserInfoApi } from '@/services/api/user';
|
||||
import { getToken, isLogin, setToken } from '@/utils/auth';
|
||||
import { removeCache } from '@/utils/cache';
|
||||
import { defineStore } from 'pinia';
|
||||
|
||||
export const useUserStore = defineStore('UserStore', () => {
|
||||
const token = ref<string | null>(null);
|
||||
|
@ -1,11 +1,11 @@
|
||||
import type { API } from '@/services/model/baseModel';
|
||||
import AdapterUniapp from '@alova/adapter-uniapp';
|
||||
import { createAlova } from 'alova';
|
||||
import { assign } from 'lodash-es';
|
||||
import { ContentTypeEnum, ResultEnum } from '@/enums/httpEnum';
|
||||
import { mockAdapter } from '@/mock';
|
||||
import { getAuthorization } from '@/utils/auth';
|
||||
import { getBaseUrl, isUseMock } from '@/utils/env';
|
||||
import AdapterUniapp from '@alova/adapter-uniapp';
|
||||
import { createAlova } from 'alova';
|
||||
import { assign } from 'lodash-es';
|
||||
import { handleHttpStatus, handleLogicError } from './faultTolerance';
|
||||
|
||||
const BASE_URL = getBaseUrl();
|
||||
|
Loading…
x
Reference in New Issue
Block a user