Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xaoyaoo committed Aug 16, 2024
1 parent 8b21e5a commit 5a28970
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const is_local_data = ref(true);
onMounted(() => {
// localStorage.setItem('isDbInit', "t");
is_local_data.value = is_use_local_data();
is_local_data.value = localStorage.getItem('isUseLocalData') === 't';
console.log("is_local_data", is_local_data.value);
if(!is_local_data.value) {
is_db_init();
Expand Down
7 changes: 5 additions & 2 deletions src/api/base.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import http from "@/utils/axios.js";
import {is_use_local_data} from "@/utils/common_utils";
const is_local_data = is_use_local_data();


// const is_local_data = false;
const is_local_data = localStorage.getItem('isUseLocalData') === 't';

export const apiVersion = () => {
return http.get('/api/rs/version').then((res: any) => {
// console.log(res);
Expand Down
3 changes: 1 addition & 2 deletions src/api/chat.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import http from "@/utils/axios.js";
import {ElNotification} from "element-plus";
import {is_use_local_data} from "@/utils/common_utils";

const is_local_data = is_use_local_data();
const is_local_data = localStorage.getItem('isUseLocalData') === 't';
const l_msg_count = local_msg_count
const l_user_list = local_user_list
const l_msg_list = local_msg_list
Expand Down
5 changes: 2 additions & 3 deletions src/api/stat.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import http from "@/utils/axios.js";
import {ElNotification} from "element-plus";
import {is_use_local_data} from "@/utils/common_utils";
const is_local_data = is_use_local_data();

const is_local_data = localStorage.getItem('isUseLocalData') === 't';
// user list 部分
export const apiDateCount = (wxid: string = '', start_time: number = 0, end_time: number = 0) => {
return http.post('/api/rs/date_count', {
Expand Down

0 comments on commit 5a28970

Please sign in to comment.