|
|
@@ -105,17 +105,20 @@ export function GetPCMenus(): Promise<string> {
|
|
|
const first = res.find((e) => e.code === 'market');
|
|
|
const second = first?.children.find((e) => e.code === 'spot_trade');
|
|
|
|
|
|
- second?.children.push({
|
|
|
- code: 'spot_trade_advertisement',
|
|
|
- isshow: true,
|
|
|
- rulekey: 'spot_trade_advertisement',
|
|
|
- sort: 0,
|
|
|
- title: '融资融货',
|
|
|
- type: 1,
|
|
|
- url: '',
|
|
|
- remark: '',
|
|
|
- children: []
|
|
|
- })
|
|
|
+ if (second) {
|
|
|
+ const lastIndex = second.children.length - 1;
|
|
|
+ second.children.splice(lastIndex, 0, {
|
|
|
+ code: 'spot_trade_advertisement',
|
|
|
+ isshow: true,
|
|
|
+ rulekey: 'spot_trade_advertisement',
|
|
|
+ sort: 0,
|
|
|
+ title: '融资融货',
|
|
|
+ type: 1,
|
|
|
+ url: '',
|
|
|
+ remark: '',
|
|
|
+ children: []
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
APP.set('menus', res);
|
|
|
console.log('交易端菜单', res);
|