diff --git a/.env b/.env index 228da808c..f53bd29e3 100644 --- a/.env +++ b/.env @@ -1,16 +1,16 @@ -APP_BASE_URL= -APP_WEBSOCKET= -APP_COMPANY_ID= -APP_PLATFORM= -APP_CUSTOM_SERVER= -APP_HOME_PAGE= -APP_TRACK= -APP_YOUSHU_TOKEN= -APP_ID= -APP_MAP_KEY= -APP_MAP_NAME= -APP_IMAGE_CDN= -APP_DIANWU_URL= +APP_BASE_URL=https://demo-ecshopx.ishopex.cn/api/h5app/wxapp +APP_WEBSOCKET=wss://demo-ecshopx.ishopex.cn/ws +APP_COMPANY_ID=38 +APP_PLATFORM=standard +APP_CUSTOM_SERVER=https://ecshopx-h5.ex-sandbox.com/ +APP_HOME_PAGE=/pages/index +APP_TRACK=youshu +APP_YOUSHU_TOKEN=bi281e87ab2424481a +APP_ID=wx1e25e45145b70faa +APP_MAP_KEY=PSPBZ-KQ5CW-CSGRF-ON2S4-K2HQJ-XEBQG +APP_MAP_NAME=oneX新零售门店定位 +APP_IMAGE_CDN=https://b-img-cdn.yuanyuanke.cn/ecshopx-vshop +APP_DIANWU_URL=https://demo-ecshopx-dianwu.shopex123.com APP_MERCHANT_URL= APP_ADAPAY= diff --git a/src/components/sp-page/index.js b/src/components/sp-page/index.js index d39615ad7..5de2a9454 100644 --- a/src/components/sp-page/index.js +++ b/src/components/sp-page/index.js @@ -206,7 +206,7 @@ const SpPage = memo( useDidShow(() => { const { page, router } = getCurrentInstance() - const fidx = Object.values(TABBAR_PATH).findIndex((v) => v == router?.path.split('?')[0]) + const fidx = Object.values(TABBAR_PATH()).findIndex((v) => v == router?.path.split('?')[0]) const isTabBarPage = fidx > -1 setState((draft) => { draft.showLeftContainer = !['/subpages/guide/index', '/pages/index'].includes( diff --git a/src/components/sp-tabbar/index copy.js b/src/components/sp-tabbar/index copy.js index 2158bb380..1b30b847f 100755 --- a/src/components/sp-tabbar/index copy.js +++ b/src/components/sp-tabbar/index copy.js @@ -24,8 +24,8 @@ function SpTabbar(props) { return { title: item.text, name: item.name, - iconType: item.iconPath ? '' : TABBAR_ICON[item.name], - selectedIconType: item.selectedIconPath ? '' : `${TABBAR_ICON[item.name]}-fill`, + iconType: item.iconPath ? '' : TABBAR_ICON()[item.name], + selectedIconType: item.selectedIconPath ? '' : `${TABBAR_ICON()[item.name]}-fill`, iconPrefixClass: 'iconfont icon', image: item.iconPath, selectedImage: item.selectedIconPath, @@ -49,13 +49,13 @@ function SpTabbar(props) { if (currentPage == '/pages/custom/custom-page') { return tab.customPageId && customPageId == tab.customPageId } else { - if (routerIntercept.routes?.[process.env.APP_PLATFORM]?.[TABBAR_PATH[tab.name]]) { + if (routerIntercept.routes?.[process.env.APP_PLATFORM]?.[TABBAR_PATH()[tab.name]]) { return ( - routerIntercept.routes?.[process.env.APP_PLATFORM]?.[TABBAR_PATH[tab.name]] == + routerIntercept.routes?.[process.env.APP_PLATFORM]?.[TABBAR_PATH()[tab.name]] == currentPage ) } else { - return TABBAR_PATH[tab.name] == currentPage + return TABBAR_PATH()[tab.name] == currentPage } } }) @@ -70,20 +70,20 @@ function SpTabbar(props) { // 如果是跳转自定义页面则判断id是否一致 let otherCustomPage = path == '/pages/custom/custom-page' && - path == TABBAR_PATH[tabItem.name] && + path == TABBAR_PATH()[tabItem.name] && tabItem.customPageId != customPageId - if (path != TABBAR_PATH[tabItem.name] || otherCustomPage) { + if (path != TABBAR_PATH()[tabItem.name] || otherCustomPage) { if (tabItem.name == 'purchase') { dispatch(updateCurDistributorId(null)) } - if (TABBAR_PATH[tabItem.name] !== navipage) { + if (TABBAR_PATH()[tabItem.name] !== navipage) { let url = tabItem.name == 'customPage' - ? `${TABBAR_PATH[tabItem.name]}?isTabBar=true&id=${tabItem.customPageId}` - : TABBAR_PATH[tabItem.name] + ? `${TABBAR_PATH()[tabItem.name]}?isTabBar=true&id=${tabItem.customPageId}` + : TABBAR_PATH()[tabItem.name] Taro.redirectTo({ url }) } else { - Taro.navigateTo({ url: TABBAR_PATH[tabItem.name] }) + Taro.navigateTo({ url: TABBAR_PATH()[tabItem.name] }) } } } diff --git a/src/components/sp-tabbar/index.js b/src/components/sp-tabbar/index.js index 854cac1f0..13d2c63a2 100755 --- a/src/components/sp-tabbar/index.js +++ b/src/components/sp-tabbar/index.js @@ -34,13 +34,13 @@ function SpTabbar() { console.log('customPageId', customPageId, tab.customPageId) return tab.customPageId && customPageId == tab.customPageId } else { - if (routerIntercept.routes?.[process.env.APP_PLATFORM]?.[TABBAR_PATH[tab.name]]) { + if (routerIntercept.routes?.[process.env.APP_PLATFORM]?.[TABBAR_PATH()[tab.name]]) { return ( - routerIntercept.routes?.[process.env.APP_PLATFORM]?.[TABBAR_PATH[tab.name]] == + routerIntercept.routes?.[process.env.APP_PLATFORM]?.[TABBAR_PATH()[tab.name]] == currentPage ) } else { - return TABBAR_PATH[tab.name] == currentPage + return TABBAR_PATH()[tab.name] == currentPage } } }) @@ -67,19 +67,19 @@ function SpTabbar() { // 如果是跳转自定义页面则判断id是否一致 let otherCustomPage = path == '/pages/custom/custom-page' && - path == TABBAR_PATH[tabItem.name] && + path == TABBAR_PATH()[tabItem.name] && tabItem.customPageId != customPageId - if (path != TABBAR_PATH[tabItem.name] || otherCustomPage) { - if (TABBAR_PATH[tabItem.name] !== navipage) { + if (path != TABBAR_PATH()[tabItem.name] || otherCustomPage) { + if (TABBAR_PATH()[tabItem.name] !== navipage) { let url = tabItem.name == 'customPage' - ? `${TABBAR_PATH[tabItem.name]}?isTabBar=true&id=${ + ? `${TABBAR_PATH()[tabItem.name]}?isTabBar=true&id=${ tabItem.customPageId || tabItem.customPage.id }` - : TABBAR_PATH[tabItem.name] + : TABBAR_PATH()[tabItem.name] Taro.redirectTo({ url }) } else { - Taro.navigateTo({ url: TABBAR_PATH[tabItem.name] }) + Taro.navigateTo({ url: TABBAR_PATH()[tabItem.name] }) } } } @@ -116,8 +116,8 @@ function SpTabbar() { )} diff --git a/src/consts/index.js b/src/consts/index.js index b2817689b..11e8452de 100644 --- a/src/consts/index.js +++ b/src/consts/index.js @@ -2,14 +2,14 @@ * Copyright © ShopeX (http://www.shopex.cn). All rights reserved. * See LICENSE file for license details. */ -export const STATUS_TYPES_MAP = { +export const STATUS_TYPES_MAP = () => ({ NOTPAY: 'WAIT_BUYER_PAY', PAYED: 'WAIT_SELLER_SEND_GOODS', WAIT_BUYER_CONFIRM: 'WAIT_BUYER_CONFIRM_GOODS', DONE: 'TRADE_SUCCESS', CANCEL: 'TRADE_CLOSED', PART_PAYMENT: 'WAIT_BUYER_PAY' -} +}) export const ORDER_STATUS_INFO = () => ({ NOTPAY: { @@ -157,17 +157,17 @@ export const ACTIVITY_STATUS = () => ({ export const DEFAULT_POINT_NAME = () => '积分' -export const DEFAULT_THEME = { +export const DEFAULT_THEME = () => ({ colorPrimary: '#d42f29', colorMarketing: '#fba629', colorAccent: '#2e3030' -} +}) -export const WGTS_NAV_MAP = { +export const WGTS_NAV_MAP = () => ({ luckdraw: '/pages/member/point-draw' -} +}) -export const TABBAR_PATH = { +export const TABBAR_PATH = () => ({ home: '/pages/index', category: '/pages/category/index', cart: '/pages/cart/espier-index', @@ -178,9 +178,9 @@ export const TABBAR_PATH = { ugc: '/subpages/mdugc/index', customPage: '/pages/custom/custom-page', purchase: '/subpages/purchase/select-identity?is_redirt=1' -} +}) -export const TABBAR_ICON = { +export const TABBAR_ICON = () => ({ home: 'shouye', category: 'fenlei', cart: 'gwche', @@ -189,21 +189,21 @@ export const TABBAR_ICON = { liveroom: 'zhibo', allGoods: 'quanbushangpin', ugc: 'shequ' -} +}) -export const PURCHASE_TABBAR_PATH = { +export const PURCHASE_TABBAR_PATH = () => ({ home: '/subpages/purchase/index', category: '/subpages/purchase/category', cart: '/subpages/purchase/espier-index', member: '/subpages/purchase/member' -} +}) -export const PURCHASE_TABBAR_ICON = { +export const PURCHASE_TABBAR_ICON = () => ({ home: 'shouye', category: 'fenlei', cart: 'gwche', member: 'huiyuan' -} +}) export const BUY_TOOL_BTNS = () => ({ NOTICE: { title: '到货通知', key: 'notice', btnStatus: 'active' }, @@ -250,13 +250,13 @@ export const COUPON_TYPE = () => ({ } }) -export const PAYTYPE = { +export const PAYTYPE = () => ({ /** h5环境下 */ WXH5: 'wxpayh5', ALIH5: 'alipayh5', /** 微信H5环境下 */ WXH5JS: 'wxpayjs' -} +}) export const PAYMENT_TYPE = () => ({ wxpay: '微信支付', @@ -281,7 +281,7 @@ export const PAYMENT_TYPE = () => ({ offline_pay: '线下转账' }) -export const TRANSFORM_PAYTYPE = { +export const TRANSFORM_PAYTYPE = () => ({ 'wxpayh5': 'wxpayh5', 'alipayh5': 'alipay', 'wxpayjs': 'wxpayjs', @@ -290,7 +290,7 @@ export const TRANSFORM_PAYTYPE = { 'alipayapp': 'alipay', 'adapay': 'adapay', 'point': 'point' -} +}) export const POINT_TYPE = () => ({ 1: '注册送积分', @@ -307,7 +307,7 @@ export const POINT_TYPE = () => ({ 12: '管理员手动调整积分' }) -export const FORM_COMP = { +export const FORM_COMP = () => ({ INPUT: 1, NUMBER: 2, DATE: 3, @@ -315,13 +315,13 @@ export const FORM_COMP = { CHECKBOX: 5, MOBILE: 6, IMAGE: 7 -} +}) -export const CHIEF_APPLY_STATUS = { +export const CHIEF_APPLY_STATUS = () => ({ WAITE: 0, RESLOVE: 1, REJECT: 2 -} +}) export const GOODS_TYPE = () => ({ 'normal': '普通商品', @@ -354,13 +354,13 @@ export const enumdays = () => ({ 2: '后天' }) -export const infotype = { +export const infotype = () => ({ SYSTEM: 'system', REPLY: 'reply', LIKE: 'like', FAVORITEPOST: 'favoritePost', FOLLOWERUSER: 'followerUser' -} +}) export const DELIVERY_PERSONNEL_INFORMATION = () => [ { diff --git a/src/hooks/usePayment.js b/src/hooks/usePayment.js index b9fc74968..5354368f2 100644 --- a/src/hooks/usePayment.js +++ b/src/hooks/usePayment.js @@ -266,7 +266,7 @@ export default (props = {}) => { const { config: appPayConfig } = await api.cashier.getPayment(query) try { await Taro.SAPPPay.payment({ - id: TRANSFORM_PAYTYPE[pay_type], + id: TRANSFORM_PAYTYPE()[pay_type], order_params: appPayConfig }) Taro.redirectTo({ url: `${cashierResultUrl}?order_id=${order_id}` }) diff --git a/src/store/slices/sys.js b/src/store/slices/sys.js index b20f46303..3b67daef8 100755 --- a/src/store/slices/sys.js +++ b/src/store/slices/sys.js @@ -8,10 +8,10 @@ import { hex2rgb } from '@/utils' //没有则获取正确的颜色 function getColor(field, value) { - return value ? value : DEFAULT_THEME[field] + return value ? value : DEFAULT_THEME()[field] } -const { colorPrimary, colorMarketing, colorAccent } = DEFAULT_THEME +const { colorPrimary, colorMarketing, colorAccent } = DEFAULT_THEME() const initialState = { initState: false, diff --git a/src/subpage/pages/cashier/index.js b/src/subpage/pages/cashier/index.js index 8d2428682..cbce9ee74 100644 --- a/src/subpage/pages/cashier/index.js +++ b/src/subpage/pages/cashier/index.js @@ -28,7 +28,7 @@ export default class Cashier extends Component { info: null, env: '', isHasAlipay: true, - payType: PAYTYPE.WXH5 + payType: PAYTYPE().WXH5 } componentDidShow() { @@ -50,7 +50,7 @@ export default class Cashier extends Component { } async fetch() { - const { order_id, pay_type = PAYTYPE.WXH5, id } = this.$instance.router.params + const { order_id, pay_type = PAYTYPE().WXH5, id } = this.$instance.router.params let env = '' if (browser.weixin) { @@ -120,10 +120,10 @@ export default class Cashier extends Component { {!env ? ( - {isHasAlipay && payType === PAYTYPE.ALIH5 && ( + {isHasAlipay && payType === PAYTYPE().ALIH5 && ( )} - {payType === PAYTYPE.WXH5 && } + {payType === PAYTYPE().WXH5 && } ) : ( diff --git a/src/subpages/community/apply-chief.js b/src/subpages/community/apply-chief.js index 1f6af679a..0ae71b6b0 100644 --- a/src/subpages/community/apply-chief.js +++ b/src/subpages/community/apply-chief.js @@ -75,16 +75,16 @@ function ApplyChief(props) { _defaultMsg = '', _defaultImg = '' // 待审核 - if (approve_status == CHIEF_APPLY_STATUS.WAITE) { + if (approve_status == CHIEF_APPLY_STATUS().WAITE) { _isDefault = true _defaultMsg = '申请审核中,请耐心等待~' _defaultImg = 'apply_loading.png' - } else if (approve_status == CHIEF_APPLY_STATUS.RESLOVE) { + } else if (approve_status == CHIEF_APPLY_STATUS().RESLOVE) { // 审核通过 _isDefault = true _defaultMsg = '恭喜您审核通过!' _defaultImg = 'apply_success.png' - } else if (approve_status == CHIEF_APPLY_STATUS.REJECT) { + } else if (approve_status == CHIEF_APPLY_STATUS().REJECT) { // 审核拒绝 _isDefault = true _defaultMsg = '很抱歉!您的审核未通过' @@ -117,7 +117,7 @@ function ApplyChief(props) { if (item.is_required) { rules[item.key].push({ required: item.is_required, message: item.required_message }) } - if (item.field_type == FORM_COMP.MOBILE) { + if (item.field_type == FORM_COMP().MOBILE) { rules[item.key].push({ validate: 'mobile', message: '请输入正确的手机号码' }) } }) @@ -163,7 +163,7 @@ function ApplyChief(props) { const renderFormComp = ({ field_type, required_message, is_edit, key }) => { let formComp = null switch (field_type) { - case FORM_COMP.INPUT: + case FORM_COMP().INPUT: formComp = ( ) break - case FORM_COMP.NUMBER: - case FORM_COMP.MOBILE: + case FORM_COMP().NUMBER: + case FORM_COMP().MOBILE: formComp = ( ) break - case FORM_COMP.DATE: + case FORM_COMP().DATE: formComp = ( ) break - case FORM_COMP.IMAGE: + case FORM_COMP().IMAGE: formComp = ( { - if (approveStatus == CHIEF_APPLY_STATUS.RESLOVE) { + if (approveStatus == CHIEF_APPLY_STATUS().RESLOVE) { Taro.redirectTo({ url: '/subpages/community/index' }) - } else if (approveStatus == CHIEF_APPLY_STATUS.REJECT) { + } else if (approveStatus == CHIEF_APPLY_STATUS().REJECT) { setState((draft) => { draft.isDefault = false }) @@ -271,15 +271,15 @@ function ApplyChief(props) { renderDefault={ - {approveStatus == CHIEF_APPLY_STATUS.REJECT && ( + {approveStatus == CHIEF_APPLY_STATUS().REJECT && ( {refuseReason} )} - {(approveStatus == CHIEF_APPLY_STATUS.RESLOVE || - approveStatus == CHIEF_APPLY_STATUS.REJECT) && ( + {(approveStatus == CHIEF_APPLY_STATUS().RESLOVE || + approveStatus == CHIEF_APPLY_STATUS().REJECT) && ( { { diff --git a/src/subpages/mdugc/info-notify.js b/src/subpages/mdugc/info-notify.js index 5f6b46380..e69d57511 100644 --- a/src/subpages/mdugc/info-notify.js +++ b/src/subpages/mdugc/info-notify.js @@ -17,14 +17,14 @@ const initialState = { infoList: [], type: '', filterList: [ - { tag_id: 1, tag_name: '系统', tag_type: infotype.SYSTEM, icon: 'icon-logo', num: 0 }, - { tag_id: 2, tag_name: '回复', tag_type: infotype.REPLY, icon: 'icon-sixin', num: 0 }, - { tag_id: 3, tag_name: '赞', tag_type: infotype.LIKE, icon: 'icon-aixin', num: 0 }, - { tag_id: 4, tag_name: '收藏', tag_type: infotype.FAVORITEPOST, icon: 'icon-redu', num: 0 }, + { tag_id: 1, tag_name: '系统', tag_type: infotype().SYSTEM, icon: 'icon-logo', num: 0 }, + { tag_id: 2, tag_name: '回复', tag_type: infotype().REPLY, icon: 'icon-sixin', num: 0 }, + { tag_id: 3, tag_name: '赞', tag_type: infotype().LIKE, icon: 'icon-aixin', num: 0 }, + { tag_id: 4, tag_name: '收藏', tag_type: infotype().FAVORITEPOST, icon: 'icon-redu', num: 0 }, { tag_id: 5, tag_name: '关注', - tag_type: infotype.FOLLOWERUSER, + tag_type: infotype().FOLLOWERUSER, icon: 'icon-gerenzhongxin', num: 0 } @@ -102,9 +102,9 @@ function UgcFollowFans() { const goToPage = (item) => { console.log(item) const { type, sub_type, postInfo, from_user_id } = item - if (type === infotype.SYSTEM && sub_type === 'refusePost') { + if (type === infotype().SYSTEM && sub_type === 'refusePost') { Taro.navigateTo({ url: `/subpages/mdugc/note?post_id=${postInfo.post_id}` }) - } else if (type === infotype.FOLLOWERUSER) { + } else if (type === infotype().FOLLOWERUSER) { Taro.navigateTo({ url: `/subpages/mdugc/my?user_id=${from_user_id}` }) } else { Taro.navigateTo({ url: `/subpages/mdugc/note-detail?post_id=${postInfo.post_id}` }) diff --git a/src/subpages/purchase/comps/comp-tabbar.js b/src/subpages/purchase/comps/comp-tabbar.js index 3ff548fd2..c215684f1 100644 --- a/src/subpages/purchase/comps/comp-tabbar.js +++ b/src/subpages/purchase/comps/comp-tabbar.js @@ -44,12 +44,12 @@ function CompTabbar(props) { return { title: item.text, name: item.name, - iconType: item.iconPath ? '' : PURCHASE_TABBAR_ICON[item.name], - selectedIconType: item.selectedIconPath ? '' : `${PURCHASE_TABBAR_ICON[item.name]}-fill`, + iconType: item.iconPath ? '' : PURCHASE_TABBAR_ICON()[item.name], + selectedIconType: item.selectedIconPath ? '' : `${PURCHASE_TABBAR_ICON()[item.name]}-fill`, iconPrefixClass: 'iconfont icon', image: item.iconPath, selectedImage: item.selectedIconPath, - url: PURCHASE_TABBAR_PATH[item.name], + url: PURCHASE_TABBAR_PATH()[item.name], urlRedirect: true, text: item.text.indexOf('购物车') > -1 && cartCount > 0 ? cartCount : null, max: item.max @@ -61,13 +61,13 @@ function CompTabbar(props) { if (pages.length > 0) { const currentPage = pages[pages.length - 1].route currentIndex = tabList?.findIndex((tab) => { - if (routerIntercept.routes?.[process.env.APP_PLATFORM]?.[PURCHASE_TABBAR_PATH[tab.name]]) { + if (routerIntercept.routes?.[process.env.APP_PLATFORM]?.[PURCHASE_TABBAR_PATH()[tab.name]]) { return ( - routerIntercept.routes?.[process.env.APP_PLATFORM]?.[PURCHASE_TABBAR_PATH[tab.name]] == + routerIntercept.routes?.[process.env.APP_PLATFORM]?.[PURCHASE_TABBAR_PATH()[tab.name]] == `/${currentPage}` ) } else { - return PURCHASE_TABBAR_PATH[tab.name] == `/${currentPage}` + return PURCHASE_TABBAR_PATH()[tab.name] == `/${currentPage}` } }) } diff --git a/src/subpages/purchase/espier-checkout.js b/src/subpages/purchase/espier-checkout.js index 73c28b562..5e7382f85 100644 --- a/src/subpages/purchase/espier-checkout.js +++ b/src/subpages/purchase/espier-checkout.js @@ -272,7 +272,7 @@ function PurchaseCheckout(props) { try { const h5ResInfo = await api.trade.h5create({ ...params, - pay_type: isAPP() ? payType : TRANSFORM_PAYTYPE[payType] + pay_type: isAPP() ? payType : TRANSFORM_PAYTYPE()[payType] }) orderInfo = h5ResInfo orderId = h5ResInfo.order_id diff --git a/src/subpages/salesman/comps/comp-tradecancel.js b/src/subpages/salesman/comps/comp-tradecancel.js index 25de18513..fdbac53b7 100644 --- a/src/subpages/salesman/comps/comp-tradecancel.js +++ b/src/subpages/salesman/comps/comp-tradecancel.js @@ -58,6 +58,7 @@ function CompTradeCancel(props) { className={classNames('reason-item', { 'active': index === reasonIndex })} + key={`reason-item-${index}`} onClick={() => { setState((draft) => { draft.reasonIndex = index diff --git a/src/subpages/trade/detail.js b/src/subpages/trade/detail.js index 8551876cb..937b9e310 100644 --- a/src/subpages/trade/detail.js +++ b/src/subpages/trade/detail.js @@ -309,7 +309,7 @@ function TradeDetail(props) { const getTradeStatusIcon = () => { if (info.receiptType == 'dada') { // 达达同城配,订单状态单独处理 - return `${ORDER_DADA_STATUS[info.dada?.dadaStatus]?.icon}.png` || '' + return `${ORDER_DADA_STATUS()[info.dada?.dadaStatus]?.icon}.png` || '' } if (squareRoot) { @@ -323,13 +323,13 @@ function TradeDetail(props) { if (info.cancelStatus == 'WAIT_PROCESS') { return 'order_dengdai.png' } - return `${ORDER_STATUS_INFO[info.orderStatus]?.icon}.png` + return `${ORDER_STATUS_INFO()[info.orderStatus]?.icon}.png` } const getTradeStatusDesc = () => { if (info.receiptType == 'dada') { // 达达同城配,订单状态单独处理 - return ORDER_DADA_STATUS[info.dada?.dadaStatus]?.msg + return ORDER_DADA_STATUS()[info.dada?.dadaStatus]?.msg } else if (squareRoot) { return '待医生开方' } else if (supplement) { @@ -348,7 +348,7 @@ function TradeDetail(props) { //展示线下审核的一些状态 0 待处理;1 已审核;2 已拒绝;9 已取消 return '待商家确认' } else { - return ORDER_STATUS_INFO[info.orderStatus]?.msg + return ORDER_STATUS_INFO()[info.orderStatus]?.msg } } diff --git a/src/utils/index.js b/src/utils/index.js index 250a661f1..27319c17a 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -313,10 +313,10 @@ export function calcTimer(totalSec) { export function resolveOrderStatus(status, isBackwards) { if (isBackwards) { - return _findKey(STATUS_TYPES_MAP, (o) => o === status) + return _findKey(STATUS_TYPES_MAP(), (o) => o === status) } - return STATUS_TYPES_MAP[status] + return STATUS_TYPES_MAP()[status] } export function goToPage(page) {