浏览代码

商城地址

Xiao_123 4 月之前
父节点
当前提交
6fd8498018
共有 1 个文件被更改,包括 8 次插入16 次删除
  1. 8 16
      src/layout/personal/navBar.vue

+ 8 - 16
src/layout/personal/navBar.vue

@@ -168,27 +168,19 @@ const paths = [ // 有选中样式-路由列表
   '/recruit/personal/personalCenter/wallet', // 6
 ]
 
-const navList = [
-  // {
-  //   title: '招聘',
-  //   children: [
-  //     {
-  //       title: '门墩儿招聘',
-  //       appList: [
-  //         [{ title: '职位', path: paths[1] }, { title: '公司', path: paths[2] }]
-  //       ]
-  //     }
-  //   ]
-  // },
+const navList = ref([
   { title: '门墩儿招聘', path: '/recruit/personal/recommend' },
   { title: '门墩儿猎头', path: '/headhunting' },
   // { title: '门墩儿商城', path: '/pointsExchange' },
-  { title: '门墩儿商城', path: '/mall' },
+  { title: '门墩儿商城', path: '/pointsExchange', isEdit: true },
   { title: '火苗儿校企' },
-  // { title: '产业联合会' },
-  // { title: '数据' },
   { title: '了解门墩儿', path: '/about' }
-]
+])
+
+const mode = import.meta.env.VITE_NODE_ENV
+const mall = navList.value.find(item => item.isEdit)
+// 区分生产环境展示地址
+mall.path = mode === 'production' ? '/pointsExchange' : '/mall'
 
 const handleClick = (e, status) => {
   if (!e.path) return