diff --git a/.env.development b/.env.development index c92ea84..e3f7ce1 100644 --- a/.env.development +++ b/.env.development @@ -3,9 +3,9 @@ ENV = development # 本地环境接口地址 # VITE_API_URL = https://4155gf93ll13.vicp.fun/admin -# VITE_API_URL = http://localhost:13579/admin +VITE_API_URL = http://localhost:13579/admin # VITE_API_URL = https://cankao.cs.com.cn/admin -VITE_API_URL = http://123.60.153.169:8040/admin +# VITE_API_URL = http://123.60.153.169:8040/admin # VITE_API_URL = /api diff --git a/.env.production b/.env.production index 4fb8e9d..45f54ad 100644 --- a/.env.production +++ b/.env.production @@ -2,9 +2,9 @@ ENV = production # 线上环境接口地址 -VITE_API_URL = https://cankao.cs.com.cn/admin -# VITE_API_URL = http://123.60.153.169:8040/admin +# VITE_API_URL = https://cankao.cs.com.cn/admin +VITE_API_URL = http://123.60.153.169:8040/admin #H5的域名,目前是给列表里的复制用 -VITE_API_URL_H5 = https://cankao.cs.com.cn -# VITE_API_URL_H5 = http://123.60.153.169:8040 +# VITE_API_URL_H5 = https://cankao.cs.com.cn +VITE_API_URL_H5 = http://123.60.153.169:8040 diff --git a/src/api/api.ts b/src/api/api.ts index 601e1b4..cfa1f7e 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -333,3 +333,20 @@ export const doNewLog = (params?: any) => { }); }; +// 复审 +export const doNewCheck = (params?: any) => { + return request({ + url: '/news/check', + method: 'post', + params + }); +}; + +// 退改 +export const doNewReturn = (params?: any) => { + return request({ + url: '/news/return', + method: 'post', + params + }); +}; diff --git a/src/router/route.ts b/src/router/route.ts index 03335c8..3b8034c 100644 --- a/src/router/route.ts +++ b/src/router/route.ts @@ -1,5 +1,5 @@ import { RouteRecordRaw } from 'vue-router'; - +import { Session } from '/@/utils/storage'; /** * 建议:路由 path 路径与文件夹名称相同,找文件可浏览器地址找,方便定位文件位置 * @@ -58,7 +58,7 @@ export const dynamicRoutes: Array = [ isKeepAlive: true, isAffix: true, isIframe: false, - roles: ['admin', 'common'], + roles: ['admin', 'common', 'secondCommon'], icon: 'iconfont ele-Edit', }, }, @@ -73,7 +73,7 @@ export const dynamicRoutes: Array = [ isKeepAlive: true, isAffix: true, isIframe: false, - roles: ['admin', 'common'], + roles: ['admin', 'common', 'secondCommon'], icon: 'iconfont ele-Edit', }, }, @@ -88,7 +88,7 @@ export const dynamicRoutes: Array = [ isKeepAlive: true, isAffix: true, isIframe: false, - roles: ['admin', 'common'], + roles: ['admin', 'common', 'secondCommon'], // icon: 'iconfont icon-diannao1', icon: 'ele-Edit', }, @@ -112,7 +112,22 @@ export const dynamicRoutes: Array = [ name: 'richedit', component: () => import('/@/views/pages/richedit/index.vue'), meta: { - title: '资讯审核', + title: '资讯二审', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: true, + isIframe: false, + roles: ['secondCommon'], + }, + }, + + { + path: '/richedit', + name: 'richedit', + component: () => import('/@/views/pages/richedit/index.vue'), + meta: { + title: Session.get('userInfoLocal')?.userType == '02' ? '资讯二审' : '资讯审核', isLink: '', isHide: false, isKeepAlive: true, @@ -132,7 +147,7 @@ export const dynamicRoutes: Array = [ isKeepAlive: true, isAffix: true, isIframe: false, - roles: ['admin'], + roles: ['admin', 'secondCommon'], }, }, { @@ -174,7 +189,7 @@ export const dynamicRoutes: Array = [ isKeepAlive: true, isAffix: true, isIframe: false, - roles: ['admin', 'common'], + roles: ['admin', 'common', 'secondCommon'], }, }, // { @@ -263,7 +278,7 @@ export const dynamicRoutes: Array = [ isKeepAlive: true, isAffix: true, isIframe: false, - roles: ['common'], + roles: ['common', 'secondCommon'], icon: 'ele-Document', }, children: [ @@ -278,7 +293,7 @@ export const dynamicRoutes: Array = [ isKeepAlive: true, isAffix: true, isIframe: false, - roles: ['admin', 'common'], + roles: ['admin', 'common', 'secondCommon'], }, }, { @@ -292,7 +307,7 @@ export const dynamicRoutes: Array = [ isKeepAlive: true, isAffix: true, isIframe: false, - roles: ['admin', 'common'], + roles: ['admin', 'common', 'secondCommon'], }, }, { @@ -306,7 +321,7 @@ export const dynamicRoutes: Array = [ isKeepAlive: true, isAffix: true, isIframe: false, - roles: ['admin', 'common'], + roles: ['admin', 'common', 'secondCommon'], }, }, ], diff --git a/src/stores/userInfo.ts b/src/stores/userInfo.ts index 46712c6..1b65df8 100644 --- a/src/stores/userInfo.ts +++ b/src/stores/userInfo.ts @@ -32,10 +32,16 @@ export const useUserInfo = defineStore('userInfo', { async getApiUserInfo() { return new Promise((resolve) => { setTimeout(() => { + let rolesLocal = '' if (Local.get('userInfoLocal').userType == '00') { Cookies.set('userName', 'common') + rolesLocal = 'common' + } else if (Local.get('userInfoLocal').userType == '02') { + Cookies.set('userName', 'secondCommon') + rolesLocal = 'secondCommon' } else { Cookies.set('userName', 'admin') + rolesLocal = 'admin' } // 模拟数据,请求接口时,记得删除多余代码及对应依赖的引入 @@ -49,16 +55,21 @@ export const useUserInfo = defineStore('userInfo', { let adminAuthBtnList: Array = ['btn.add', 'btn.del', 'btn.edit', 'btn.link']; // test 页面权限标识,对应路由 meta.roles,用于控制路由的显示/隐藏 let testRoles: Array = ['common']; + let secondCommonRoles: Array = ['secondCommon']; // test 按钮权限标识 let testAuthBtnList: Array = ['btn.add', 'btn.link']; // 不同用户模拟不同的用户权限 if (userName === 'admin') { defaultRoles = adminRoles; defaultAuthBtnList = adminAuthBtnList; + } else if (rolesLocal == 'secondCommon') { + defaultRoles = secondCommonRoles; + defaultAuthBtnList = testAuthBtnList; } else { defaultRoles = testRoles; defaultAuthBtnList = testAuthBtnList; } + console.log("🚀 ~ getApiUserInfo ~ rolesLocal:", rolesLocal) // 用户信息模拟数据 @@ -70,6 +81,7 @@ export const useUserInfo = defineStore('userInfo', { : 'https://img2.baidu.com/it/u=2370931438,70387529&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500', time: new Date().getTime(), roles: defaultRoles, + // roles: [rolesLocal], authBtnList: defaultAuthBtnList, }; Session.set('userInfo', userInfos); diff --git a/src/views/pages/richedit/all.vue b/src/views/pages/richedit/all.vue index 3972ae3..f859119 100644 --- a/src/views/pages/richedit/all.vue +++ b/src/views/pages/richedit/all.vue @@ -8,8 +8,13 @@
- + @@ -17,15 +22,32 @@
行业分类: - +
- + @@ -33,26 +55,53 @@
- + - + - +
评分范围: - + - - + @@ -65,8 +114,15 @@
- +