已支付订单列表:where.payStatus = 1;
This commit is contained in:
+78
@@ -0,0 +1,78 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const useCarStore = common_vendor.defineStore({
|
||||
id: "car",
|
||||
state: () => ({
|
||||
// 场馆ID
|
||||
merchantId: null,
|
||||
// 场馆名称
|
||||
merchantName: null,
|
||||
// 场馆编号
|
||||
merchantCode: null,
|
||||
// 场馆信息
|
||||
merchant: null,
|
||||
// 订单信息
|
||||
order: null,
|
||||
// 场地信息
|
||||
orderInfo: [],
|
||||
// 预定时段
|
||||
period: null,
|
||||
// 订单总金额
|
||||
totalPrice: null,
|
||||
// 实付金额
|
||||
payPrice: null,
|
||||
// 儿童票价
|
||||
childrenPrice: null,
|
||||
// 购物车数量
|
||||
carNum: null,
|
||||
// 儿童票数量
|
||||
carNum2: null,
|
||||
// 1全场 2半场
|
||||
type: null,
|
||||
// 下单日期
|
||||
dateTime: null,
|
||||
// 商品信息
|
||||
goodsList: [],
|
||||
// 用户收货地址
|
||||
address: null
|
||||
}),
|
||||
getters: {},
|
||||
actions: {
|
||||
/**
|
||||
* 添加购物车
|
||||
*/
|
||||
AddCar(value) {
|
||||
var _a;
|
||||
(_a = this.orderInfo) == null ? void 0 : _a.push(value);
|
||||
},
|
||||
/**
|
||||
* 移除购物车
|
||||
*/
|
||||
DelCard(value) {
|
||||
var _a, _b;
|
||||
const index = (_a = this.orderInfo) == null ? void 0 : _a.findIndex((d) => d.fid == value.fid);
|
||||
if (index) {
|
||||
(_b = this.orderInfo) == null ? void 0 : _b.splice(index, 1);
|
||||
}
|
||||
},
|
||||
setOrder(value) {
|
||||
this.order = value;
|
||||
},
|
||||
setMerchant(value) {
|
||||
this.merchant = value;
|
||||
},
|
||||
setGoodsList(value) {
|
||||
this.goodsList = value;
|
||||
},
|
||||
setOrderInfo(value) {
|
||||
this.orderInfo = value;
|
||||
},
|
||||
setAddress(value) {
|
||||
this.address = value;
|
||||
},
|
||||
setPeriod(value) {
|
||||
this.period = value;
|
||||
}
|
||||
}
|
||||
});
|
||||
exports.useCarStore = useCarStore;
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_layout_index = require("../../api/layout/index.js");
|
||||
const useTenantStore = common_vendor.defineStore({
|
||||
id: "tenant",
|
||||
state: () => ({
|
||||
// 租户信息
|
||||
tenant: null,
|
||||
// 企业信息
|
||||
company: null,
|
||||
// 参数配置
|
||||
params: {}
|
||||
}),
|
||||
getters: {},
|
||||
actions: {
|
||||
/**
|
||||
* 请求用户信息、权限、角色、菜单
|
||||
*/
|
||||
async fetchTenantInfo() {
|
||||
const company = await api_layout_index.getSiteInfo().catch(() => void 0);
|
||||
if (!company) {
|
||||
return {};
|
||||
}
|
||||
this.company = company;
|
||||
if (company) {
|
||||
this.company = company;
|
||||
}
|
||||
return company;
|
||||
},
|
||||
/**
|
||||
* 更新租户信息
|
||||
*/
|
||||
setInfo(value) {
|
||||
this.tenant = value;
|
||||
}
|
||||
}
|
||||
});
|
||||
exports.useTenantStore = useTenantStore;
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const uni_modules_wsCommon_api_layout_index = require("../../uni_modules/ws-common/api/layout/index.js");
|
||||
const useUserStore = common_vendor.defineStore({
|
||||
id: "user",
|
||||
state: () => ({
|
||||
// 当前登录用户的信息
|
||||
info: null,
|
||||
// 当前登录用户的菜单
|
||||
menus: null,
|
||||
// 当前登录用户的权限
|
||||
authorities: [],
|
||||
// 当前登录用户的角色
|
||||
roles: []
|
||||
}),
|
||||
getters: {},
|
||||
actions: {
|
||||
/**
|
||||
* 请求用户信息、权限、角色、菜单
|
||||
*/
|
||||
async fetchUserInfo() {
|
||||
var _a, _b, _c;
|
||||
const result = await uni_modules_wsCommon_api_layout_index.getUserInfo().catch(() => {
|
||||
});
|
||||
if (!result) {
|
||||
return {};
|
||||
}
|
||||
this.info = result;
|
||||
this.authorities = ((_b = (_a = result.authorities) == null ? void 0 : _a.filter((d) => !!d.authority)) == null ? void 0 : _b.map((d) => d.authority)) ?? [];
|
||||
this.roles = ((_c = result.roles) == null ? void 0 : _c.map((d) => d.roleCode)) ?? [];
|
||||
this.menus = [];
|
||||
return result;
|
||||
},
|
||||
/**
|
||||
* 更新用户信息
|
||||
*/
|
||||
setInfo(value) {
|
||||
this.info = value;
|
||||
}
|
||||
}
|
||||
});
|
||||
exports.useUserStore = useUserStore;
|
||||
Reference in New Issue
Block a user