Pre Merge pull request !178 from 爱宇阳/master

pull/178/MERGE
爱宇阳 2026-05-09 07:41:16 +00:00 committed by Gitee
commit 4eb82e7a90
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 5 additions and 10 deletions

View File

@ -8,8 +8,7 @@ import user from './user';
import sys from './sys';
import { baseUrl, h5Url } from '@/sheep/config';
const app = defineStore({
id: 'app',
const app = defineStore('app', {
state: () => ({
paramsForTabbar: {}, // 为全局tabbar跳转传参用。原因是 tabbar 无法传参,只能通过全局状态传递
info: {

View File

@ -1,8 +1,7 @@
import { defineStore } from 'pinia';
import CartApi from '@/sheep/api/trade/cart';
const cart = defineStore({
id: 'cart',
const cart = defineStore('cart', {
state: () => ({
list: [], // 购物车列表invalidList + validList
selectedIds: [], // 已选列表

View File

@ -1,7 +1,6 @@
import { defineStore } from 'pinia';
const modal = defineStore({
id: 'modal',
const modal = defineStore('modal', {
state: () => ({
auth: '', // 授权弹框 accountLogin|smsLogin|resetPassword|changeMobile|changePassword|changeUsername
share: false, // 分享弹框

View File

@ -1,8 +1,7 @@
import { defineStore } from 'pinia';
import app from './app';
const sys = defineStore({
id: 'sys',
const sys = defineStore('sys', {
state: () => ({
theme: '', // 主题,
mode: 'light', // 明亮模式、暗黑模式(暂未支持)

View File

@ -36,8 +36,7 @@ const defaultNumData = {
},
};
const user = defineStore({
id: 'user',
const user = defineStore('user', {
state: () => ({
userInfo: clone(defaultUserInfo), // 用户信息
userWallet: clone(defaultUserWallet), // 用户钱包信息