// 判断门店是否过期或者下线
const isShopValid = (ShopData) => {
	const { businessStatus, expiresStatus, closeStatus } = ShopData || {};
	// 未过期，未闭店
	if (!expiresStatus && businessStatus && !closeStatus) return true;
	else {
		const text = expiresStatus ? '门店已到期，请先续费' : '门店已关闭，无法操作该功能。'
		uni.showToast({
			title: text,
			icon: 'none'
		});
		return false
	}
}
// 门店下线后，如下操作进行提示：门店已关闭，无法操作该功能。
// 门店到期后，如下操作进行提示：门店已到期，请选续费

// 不可操作（功能禁用）
// ●模式管理
// ●开通支付
// ●店铺码
// ●单笔限额
// ●结算设置
// ●结算卡信息→ 可查看但不可改
// ●订单核销（禁止新核销）
// ●积分核销（禁止新核销）
export const pathList = {
	// ----------- 经营管理 ------------
	'BusinessData': {
		label: '经营数据',
		path: '/pages/shop/manage/data',
	},
	"BusinessDetails": {
		label: '经营明细',
		path: "/pages/shop/manage/businessDetails"
	},
	"SettleAccountsDetails": {
		label: '结算明细',
		path: ""
	},
	"Settings": {
		label: '结算设置',
		path: "/pages/shop/manage/Settings",
		fn: isShopValid
	},
	"DebitCard": {
		label: '结算卡信息',
		path: "/pages/shop/manage/DebitCard"
	},
	// -----------店铺设置------------
	"ShopRecord": {
		label: '门店档案',
		path: "/pages/user/merchant/registerAndAudit?type=2"
	},
	"Pattern": {
		label: '模式管理',
		path: "/pages/shop/setting/pattern",
		fn: isShopValid
	},
	// "EnablePayment": {
	"开通支付": {
		label: '开通支付',
		path: "",
		fn: isShopValid
	},
	"店铺码": {
		label: '店铺码',
		path: "",
		fn: isShopValid
	},
	"MultipleShop": {
		label: '连锁店',
		path: "/pages/shop/setting/MultipleShop"
	},
	"Quota": {
		label: '单笔限额',
		path: "/pages/shop/setting/Quota",
		fn: isShopValid
	},
	// ---------------订单管理-------------------
	"MallOrder": {
		label: '商城订单',
		path: "/pages/shop/mallOrder/index"
	},
	"OnlineOrder": {
		label: '在线订单',
		path: "/pages/order/onlineOrder/list"
	},
	"QueuingOrders": {
		label: '排队订单',
		path: "/pages/order/queuingOrders/list"
	},
	"OrderVerification": {
		label: '订单核销',
		path: "/pages/shop/writeOff/list?pageType=1"
	},
	"PointsRedemption": {
		label: '积分核销',
		path: "/pages/shop/writeOff/list?pageType=2"
	},
	"ShopRenew": {
		label: '续费',
		path: "/pages/shop/content/renew",
	},
}