Blame view

美国版/Food Labeling Management App UniApp/src/utils/stores.ts 744 Bytes
940fb6ea   “wangming”   又改了一个版本,这泰额太纠结了,一...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  export interface StoreInfo {
    id: string
    nameKey: string
    address: string
    city: string
  }
  
  export const storeList: StoreInfo[] = [
    { id: '1', nameKey: 'login.store1', address: '123 Main St', city: 'New York, NY 10001' },
    { id: '2', nameKey: 'login.store2', address: '456 Oak Ave', city: 'Brooklyn, NY 11201' },
    { id: '3', nameKey: 'login.store3', address: '789 Pine Rd', city: 'Queens, NY 11354' },
    { id: '4', nameKey: 'login.store4', address: '321 Elm St', city: 'Manhattan, NY 10002' },
  ]
  
  export function getCurrentStoreId(): string {
    return uni.getStorageSync('storeId') || '1'
  }
  
  export function switchStore(id: string, storeName: string) {
    uni.setStorageSync('storeId', id)
    uni.setStorageSync('storeName', storeName)
  }