Skip to content

Commit

Permalink
Merge pull request #57 from Enraged-Dun-Cookie-Development-Team/re-to…
Browse files Browse the repository at this point in the history
…ollink

Re toollink
  • Loading branch information
phidiaLam authored Sep 28, 2024
2 parents 9e5fbba + 9dfd164 commit e7a946f
Show file tree
Hide file tree
Showing 10 changed files with 348 additions and 107 deletions.
4 changes: 2 additions & 2 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ VUE_APP_BASE_API = '/api/v1'
# 正式服
# TARGET_API = 'https://server.ceobecanteen.top'
# 测试服
TARGET_API = 'https://server-dev.ceobecanteen.top'
# TARGET_API = 'https://kitchen-dev.ceobecanteen.top'
# TARGET_API = 'https://server-dev.ceobecanteen.top'
TARGET_API = 'http://kitchen-dev.ceobecanteen.top'
23 changes: 19 additions & 4 deletions mock/toolLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,26 @@ module.exports = [

platformTable[i] = Mock.mock({
id: i,
nickname: "name"+i,
avatar: "platform"+i,
jump_url: "url"+i,
icon_url: "platform"+i,
links: [],
min_request_interval:minTime,
"has_datasource|1": true
"has_datasource|1": true,
localized_name: {
zh_CN: "name"+i,
en_US: "name"+i
},
localized_description: {
zh_CN: "description"+i,
en_US: "description"+i
},
localized_slogan: {
zh_CN: "slogan"+i,
en_US: "slogan"+i
},
localized_tags: {
zh_CN: ["tags"+i],
en_US: ["tags"+i]
}
});
}
let data = {
Expand Down
16 changes: 15 additions & 1 deletion mock/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ const userpassword = {
},
architect: {
password: 'architect-password'
},
porter: {
password: 'porter-password'
}
};

Expand All @@ -21,6 +24,9 @@ const tokens = {
},
architect: {
token: 'architect-token'
},
porter: {
token: 'porter-token'
}
};

Expand All @@ -36,6 +42,10 @@ const newUser = {
architect: {
username: 'architect1',
password: 'architect1-password'
},
porter: {
username: 'porter1',
password: 'porter1-password'
}
};

Expand All @@ -51,6 +61,10 @@ const users = {
'architect-token': {
roles: ['architect'],
name: 'architect'
},
'porter-token': {
roles: ['porter'],
name: 'porter'
}
};

Expand Down Expand Up @@ -205,7 +219,7 @@ module.exports = [
response: req => {
console.log(req);
const { page, size } = req.query;
let auth = ['chef','cooker','architect'];
let auth = ['chef','cooker','architect', 'porter'];
let userTable = [];
for(let i = 0; i < 28; i++) {
let index = Math.floor(Math.random()*auth.length);
Expand Down
10 changes: 5 additions & 5 deletions src/api/toolLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import request from '@/utils/request';

export function toolLinkList(token, data) {
return request({
url: '/admin/toolLink/list',
url: '/admin/toolLink/pageShow',
method: 'get',
headers: token,
params: data
Expand All @@ -11,7 +11,7 @@ export function toolLinkList(token, data) {

export function createToolLink(token, data) {
return request({
url: '/admin/toolLink/create',
url: '/admin/toolLink/createOne',
method: 'post',
headers: token,
data: data
Expand All @@ -20,7 +20,7 @@ export function createToolLink(token, data) {

export function updateToolLink(token, data) {
return request({
url: '/admin/toolLink/update',
url: '/admin/toolLink/updateOne',
method: 'post',
headers: token,
data: data
Expand All @@ -29,9 +29,9 @@ export function updateToolLink(token, data) {

export function deleteToolLink(token, id) {
return request({
url: '/admin/toolLink/delete',
url: '/admin/toolLink/deleteOne',
method: 'delete',
headers: token,
data: id
params: id
});
}
1 change: 1 addition & 0 deletions src/const/toolLinkConfig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const REGION = [ 'CHINA_MAINLAND', 'EXCEPT_CHINA_MAINLAND' ];
20 changes: 10 additions & 10 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ export const asyncRoutes = [
path: 'changeUsername',
name: '修改用户名',
component: () => import('@/views/user/changeUsername/index'),
meta: { title: '修改用户名', icon: 'el-icon-s-custom', roles: ['chef', 'cooker', 'architect'] }
meta: { title: '修改用户名', icon: 'el-icon-s-custom', roles: ['chef', 'cooker', 'architect', 'porter'] }
},
{
path: 'changePassword',
name: '修改密码',
component: () => import('@/views/user/changePassword/index'),
meta: { title: '修改密码', icon: 'lock', roles: ['chef', 'cooker', 'architect'] }
meta: { title: '修改密码', icon: 'lock', roles: ['chef', 'cooker', 'architect', 'porter'] }
},
{
path: 'userList',
Expand All @@ -95,49 +95,49 @@ export const asyncRoutes = [
name: 'canteen',
component: Layout,
redirect: '/canteen/announcement',
meta: { title: '小刻食堂运营信息', icon: 'form', roles: ['chef', 'cooker'] },
meta: { title: '小刻食堂运营信息', icon: 'form' },
children: [
{
path: 'announcement',
name: '公告内容',
component: () => import('@/views/canteen/announcement/index'),
meta: { title: '公告内容', icon: 'el-icon-message-solid' }
meta: { title: '公告内容', icon: 'el-icon-message-solid', roles: ['chef', 'cooker'] }
},
{
path: 'videolist',
name: '视频链接',
component: () => import('@/views/canteen/videoList/index'),
meta: { title: '视频链接', icon: 'el-icon-video-camera-solid' }
meta: { title: '视频链接', icon: 'el-icon-video-camera-solid', roles: ['chef', 'cooker'] }
},
{
path: 'resource',
name: '资源时间管理',
component: () => import('@/views/canteen/resource/index'),
meta: { title: '资源时间管理', icon: 'el-icon-files' }
meta: { title: '资源时间管理', icon: 'el-icon-files', roles: ['chef', 'cooker'] }
},
{
path: 'pluginVersion',
name: '插件更新',
component: () => import('@/views/canteen/pluginVersion/index'),
meta: { title: '插件更新', icon: 'el-icon-top' }
meta: { title: '插件更新', icon: 'el-icon-top', roles: ['chef', 'cooker'] }
},
{
path: 'phoneVersion',
name: '手机更新',
component: () => import('@/views/canteen/phoneVersion/index'),
meta: { title: '手机更新', icon: 'el-icon-mobile-phone' }
meta: { title: '手机更新', icon: 'el-icon-mobile-phone', roles: ['chef', 'cooker'] }
},
{
path: 'desktopVersion',
name: '桌面更新',
component: () => import('@/views/canteen/desktopVersion/index'),
meta: { title: '桌面更新', icon: 'el-icon-s-platform' }
meta: { title: '桌面更新', icon: 'el-icon-s-platform', roles: ['chef', 'cooker'] }
},
{
path: 'toolLink',
name: '工具链接',
component: () => import('@/views/canteen/toolLink/index'),
meta: { title: '工具链接', icon: 'el-icon-s-platform' }
meta: { title: '工具链接', icon: 'el-icon-s-platform', roles: ['chef', 'cooker', 'porter'] }
}
]
},
Expand Down
Loading

0 comments on commit e7a946f

Please sign in to comment.