| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- //系统检查方法
- //商品分类
- const systemMenus = [1, 2, 3]; //好评,折扣,点单必读
- const menuTips = {
- 1: ["systemClassification1", "systemClassification2"],
- 2: ["systemClassification3", "systemClassification4"],
- 3: ["systemClassification5", "systemClassification6"],
- };
- //好评,折扣,点单必读
- export function getClassificationByName(name) {
- if (name == "好评") {
- return 1;
- } else if (name == "折扣") {
- return 2;
- } else if (name == "点单必读") {
- return 3;
- }
- }
- //商品分类
- export class ClassificationUtil {
- constructor(classification) {
- let { name, id, goodsIds, isOpen, type } = classification || {};
- this.name = name || "";
- this.id = id || "";
- this.goodsIds = goodsIds || "";
- this.isOpen = isOpen || false;
- this.allInfo = classification || {};
- this.type = type || "";
- }
- checkSystem() {
- return systemMenus.indexOf(this.type) != -1;
- }
- getMenuTipsList() {
- return menuTips[this.type] || [];
- }
- getType() {
- return this.type;
- }
- }
- //账单类别
- const FinancialTypes = ["BUY", "INCOME", "REFUND", "WITHDRAW"];
- // BUY("购买"),
- // INCOME("收入"),
- // REFUND("退款"),
- // WITHDRAW("提现");
|