You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1021 B
47 lines
1021 B
const _get = require('lodash/get'); |
|
|
|
const Titles = { |
|
index: '焰火网', |
|
price: '行情', |
|
balances: '资产管理', |
|
my: { |
|
info: '基本资料-个人中心', // example |
|
}, |
|
entrust: '委托管理', |
|
trade: '交易中心', |
|
personal: '个人中心', |
|
historydetail: '历史委托交易明细', |
|
currentdetail: '当前委托交易明细', |
|
news: '最新新闻', |
|
balancesRecord: { |
|
record: '财务记录', |
|
}, |
|
exchange: '法币交易', |
|
echangeGoods: { |
|
goods: '购买订单', |
|
goodsSell: '出售订单', |
|
}, |
|
order: '法币管理', |
|
announce: '发布广告', |
|
footer: { |
|
privacy: '隐私协议', |
|
service: '服务协议', |
|
about: '关于我们', |
|
help: '帮助中心', |
|
}, |
|
}; |
|
|
|
/** |
|
* 根据页面路径获取页面 Title |
|
* @param {string} pagePath - eg: my/info |
|
* @returns {string} |
|
*/ |
|
function getPageTitleByPath(pagePath = '') { |
|
pagePath = pagePath.replace(/\//g, '.'); |
|
return _get(Titles, pagePath, ''); |
|
} |
|
|
|
module.exports = { |
|
Titles, |
|
getPageTitleByPath, |
|
};
|
|
|