commit
75eed2ba19
|
|
@ -8,8 +8,7 @@ import user from './user';
|
||||||
import sys from './sys';
|
import sys from './sys';
|
||||||
import { baseUrl, h5Url } from '@/sheep/config';
|
import { baseUrl, h5Url } from '@/sheep/config';
|
||||||
|
|
||||||
const app = defineStore({
|
const app = defineStore('app', {
|
||||||
id: 'app',
|
|
||||||
state: () => ({
|
state: () => ({
|
||||||
paramsForTabbar: {}, // 为全局tabbar跳转传参用。原因是 tabbar 无法传参,只能通过全局状态传递
|
paramsForTabbar: {}, // 为全局tabbar跳转传参用。原因是 tabbar 无法传参,只能通过全局状态传递
|
||||||
info: {
|
info: {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import CartApi from '@/sheep/api/trade/cart';
|
import CartApi from '@/sheep/api/trade/cart';
|
||||||
|
|
||||||
const cart = defineStore({
|
const cart = defineStore('cart', {
|
||||||
id: 'cart',
|
|
||||||
state: () => ({
|
state: () => ({
|
||||||
list: [], // 购物车列表(invalidList + validList)
|
list: [], // 购物车列表(invalidList + validList)
|
||||||
selectedIds: [], // 已选列表
|
selectedIds: [], // 已选列表
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
|
|
||||||
const modal = defineStore({
|
const modal = defineStore('modal', {
|
||||||
id: 'modal',
|
|
||||||
state: () => ({
|
state: () => ({
|
||||||
auth: '', // 授权弹框 accountLogin|smsLogin|resetPassword|changeMobile|changePassword|changeUsername
|
auth: '', // 授权弹框 accountLogin|smsLogin|resetPassword|changeMobile|changePassword|changeUsername
|
||||||
share: false, // 分享弹框
|
share: false, // 分享弹框
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import app from './app';
|
import app from './app';
|
||||||
|
|
||||||
const sys = defineStore({
|
const sys = defineStore('sys', {
|
||||||
id: 'sys',
|
|
||||||
state: () => ({
|
state: () => ({
|
||||||
theme: '', // 主题,
|
theme: '', // 主题,
|
||||||
mode: 'light', // 明亮模式、暗黑模式(暂未支持)
|
mode: 'light', // 明亮模式、暗黑模式(暂未支持)
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,7 @@ const defaultNumData = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const user = defineStore({
|
const user = defineStore('user', {
|
||||||
id: 'user',
|
|
||||||
state: () => ({
|
state: () => ({
|
||||||
userInfo: clone(defaultUserInfo), // 用户信息
|
userInfo: clone(defaultUserInfo), // 用户信息
|
||||||
userWallet: clone(defaultUserWallet), // 用户钱包信息
|
userWallet: clone(defaultUserWallet), // 用户钱包信息
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue