payStore.ts 387 B

1234567891011121314151617181920
  1. export const usePayStore = defineStore('ie-pay', {
  2. state: () => ({
  3. price: 468000,
  4. orderId: null as number | null
  5. }),
  6. actions: {
  7. setPrice(price: number) {
  8. this.price = price;
  9. },
  10. setOrderId(id: number | null) {
  11. this.orderId = id;
  12. }
  13. },
  14. persist: {
  15. storage: {
  16. getItem: uni.getStorageSync,
  17. setItem: uni.setStorageSync,
  18. }
  19. }
  20. })