This repository has been archived by the owner on Mar 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
2,247 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
node: true | ||
}, | ||
'extends': [ | ||
'plugin:vue/essential', | ||
'@vue/standard' | ||
], | ||
rules: { | ||
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' | ||
}, | ||
parserOptions: { | ||
parser: 'babel-eslint' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
.DS_Store | ||
node_modules | ||
/dist | ||
|
||
# local env files | ||
.env.local | ||
.env.*.local | ||
|
||
# Log files | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Editor directories and files | ||
.idea | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw* | ||
|
||
# lock | ||
package-lock.json | ||
yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
plugins: { | ||
'autoprefixer': {}, | ||
'postcss-pxtorem': { | ||
'rootValue': 100, | ||
'propWhiteList': [] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# tlgc | ||
|
||
## Project setup | ||
``` | ||
yarn install | ||
``` | ||
|
||
### Compiles and hot-reloads for development | ||
``` | ||
yarn run serve | ||
``` | ||
|
||
### Compiles and minifies for production | ||
``` | ||
yarn run build | ||
``` | ||
|
||
### Run your tests | ||
``` | ||
yarn run test | ||
``` | ||
|
||
### Lints and fixes files | ||
``` | ||
yarn run lint | ||
``` | ||
|
||
### 使用相关库 | ||
|
||
- "vue": "^2.6.6", | ||
- "vue-router": "^3.0.1", | ||
- "vuex": "^3.0.1", | ||
- "axios": "^0.18.0", | ||
- "echarts": "^4.1.0", | ||
- "element-ui": "^2.5.4", | ||
- "normalize.css": "^8.0.1", | ||
- "nprogress": "^0.2.0", | ||
- "sortablejs": "^1.8.3", | ||
- "v-charts": "^1.19.0", | ||
- "vm-markdown": "^0.2.8", | ||
- "zstorage": "^1.0.4" | ||
|
||
### 注意: | ||
1. api全部封装在`src\api`中, 每个页面一个`*.api.js` | ||
2. 后端地址配在`public\index.html` | ||
3. 登录态维护使用`localStorage` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
presets: [ | ||
'@vue/app' | ||
], | ||
plugins: [ | ||
[ | ||
'import', | ||
{ | ||
libraryName: 'mand-mobile', | ||
libraryDirectory: 'lib' | ||
} | ||
] | ||
] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"name": "tlgc", | ||
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
"serve": "vue-cli-service serve", | ||
"build": "vue-cli-service build" | ||
}, | ||
"dependencies": { | ||
"axios": "^0.18.0", | ||
"echarts": "^4.1.0", | ||
"element-ui": "^2.5.4", | ||
"lz-string": "^1.4.4", | ||
"normalize.css": "^8.0.1", | ||
"nprogress": "^0.2.0", | ||
"sortablejs": "^1.8.3", | ||
"v-charts": "^1.19.0", | ||
"vm-markdown": "^0.2.8", | ||
"vue": "^2.6.6", | ||
"vue-router": "^3.0.1", | ||
"vuex": "^3.0.1", | ||
"zstorage": "^1.0.4" | ||
}, | ||
"devDependencies": { | ||
"@vue/cli-plugin-babel": "^3.0.5", | ||
"@vue/cli-service": "^3.0.5", | ||
"node-sass": "^4.9.0", | ||
"sass-loader": "^7.1.0", | ||
"vue-template-compiler": "^2.5.21" | ||
}, | ||
"postcss": { | ||
"plugins": { | ||
"autoprefixer": {} | ||
} | ||
}, | ||
"browserslist": [ | ||
"> 1%", | ||
"last 2 versions", | ||
"not ie <= 8" | ||
] | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0"> | ||
<meta name="full-screen" content="yes"> | ||
<meta name="browsermode" content="application"> | ||
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> | ||
<link rel="stylesheet" href="//at.alicdn.com/t/font_1364019_pr44xxo5sb.css"> | ||
<title>治电管理后台</title> | ||
</head> | ||
<body> | ||
<noscript> | ||
<strong>We're sorry but vue-cli3-example doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> | ||
</noscript> | ||
<div id="app"></div> | ||
<!-- built files will be auto injected --> | ||
<script> | ||
/* 后台地址 */ | ||
var apiServer = 'http://118.24.195.108:7001/api/v1' | ||
// var apiServer = 'http://localhost:7001/api/v1' | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<template> | ||
<div id="app"> | ||
<transition name="md-slide-left"> | ||
<router-view></router-view> | ||
</transition> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'app' | ||
} | ||
</script> | ||
|
||
<style lang="stylus"> | ||
#app | ||
font-family 'Avenir', Helvetica, Arial, sans-serif | ||
-webkit-font-smoothing antialiased | ||
-moz-osx-font-smoothing grayscale | ||
color #2c3e50 | ||
.the-list | ||
padding 20px | ||
background rgb(249, 250, 251) | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import request from './request' | ||
|
||
export function getArticle (queryString) { | ||
return request.get(`/article?${queryString}`) | ||
} | ||
|
||
export function getArticleById (id) { | ||
return request.get(`/article?id=${id}`) | ||
} | ||
|
||
export function updateArticleStatus (id, status) { | ||
return request.patch('/article', { | ||
id: id, | ||
status: status | ||
}) | ||
} | ||
|
||
export function updateArticle (id, title, content) { | ||
return request.put('/article', { | ||
id: id, | ||
title: title, | ||
content: content | ||
}) | ||
} | ||
|
||
export function publishArticle (title, content) { | ||
return request.post('/article', { | ||
title: title, | ||
content: content | ||
}) | ||
} | ||
|
||
export function deleteArticle (id) { | ||
return request({ | ||
method: 'DELETE', | ||
url: '/article', | ||
data: { | ||
id: id | ||
} | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import request from './request' | ||
|
||
export function getHomeSum () { | ||
return request.get('/homeSum') | ||
} | ||
|
||
export function getWxSum () { | ||
return request.get('/wechatUser') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import request from './request' | ||
|
||
export function getHot () { | ||
return request({ | ||
url: `/hot`, | ||
method: 'GET' | ||
}) | ||
} | ||
|
||
export function updateSort (hot) { | ||
return request.put('/hot', { | ||
list: hot | ||
}) | ||
} | ||
|
||
export function deleteHot (id) { | ||
return request({ | ||
url: '/hot', | ||
method: 'DELETE', | ||
data: { | ||
id: id | ||
} | ||
}) | ||
} | ||
|
||
export function createHot (hotForm) { | ||
return request({ | ||
url: '/hot', | ||
method: 'post', | ||
data: hotForm | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import request from './request' | ||
|
||
export function getIron (queryString) { | ||
return request({ | ||
url: `/iron?${queryString}`, | ||
method: 'GET' | ||
}) | ||
} | ||
|
||
export function getAllIron () { | ||
return request.get('/iron/all') | ||
} | ||
|
||
export function updateIron (iron) { | ||
return request({ | ||
method: 'PATCH', | ||
url: '/iron', | ||
data: iron | ||
}) | ||
} | ||
|
||
export function createIron (ironForm) { | ||
return request({ | ||
url: '/iron', | ||
method: 'post', | ||
data: ironForm | ||
}) | ||
} | ||
|
||
export function addNewPrice (id, value) { | ||
return request({ | ||
url: `/iron/price`, | ||
method: 'POST', | ||
data: { | ||
id: id, | ||
price: parseFloat(value) | ||
} | ||
}) | ||
} | ||
|
||
export function deleteIron (id) { | ||
return request({ | ||
url: '/iron', | ||
method: 'DELETE', | ||
data: { | ||
id: id | ||
} | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import request from './request' | ||
|
||
export function getLog (queryString) { | ||
return request({ | ||
url: `/log?${queryString}`, | ||
method: 'GET' | ||
}) | ||
} |
Oops, something went wrong.