Skip to content

Commit

Permalink
ready to work
Browse files Browse the repository at this point in the history
  • Loading branch information
callmewindow committed Nov 30, 2019
1 parent a4375b9 commit c5c91b1
Show file tree
Hide file tree
Showing 20 changed files with 1,340 additions and 1,348 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
node_modules
/dist
scp_sh.txt

# local env files
.env.local
Expand Down
2,179 changes: 1,141 additions & 1,038 deletions package-lock.json

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,22 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.3.2",
"vue": "^2.6.10"
"axios": "^0.19.0",
"core-js": "^3.4.3",
"element-ui": "^2.13.0",
"vue": "^2.6.10",
"qs": "latest"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.0.0",
"@vue/cli-plugin-eslint": "^4.0.0",
"@vue/cli-service": "^4.0.0",
"@vue/cli-plugin-babel": "^4.1.0",
"@vue/cli-plugin-eslint": "^4.1.0",
"@vue/cli-service": "^4.1.0",
"babel-eslint": "^10.0.3",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"vue-template-compiler": "^2.6.10"
"vue-router": "^3.1.3",
"vue-template-compiler": "^2.6.10",
"vuex": "^3.1.2"
},
"eslintConfig": {
"root": true,
Expand All @@ -34,11 +39,6 @@
"parser": "babel-eslint"
}
},
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"browserslist": [
"> 1%",
"last 2 versions"
Expand Down
4 changes: 2 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>techshare_client</title>
<title>technology share for you</title>
</head>
<body>
<noscript>
<strong>We're sorry but techshare_client doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
<strong>We're sorry but untitled1 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
Expand Down
35 changes: 0 additions & 35 deletions src/APIs/avatar.js

This file was deleted.

51 changes: 0 additions & 51 deletions src/APIs/categories.js

This file was deleted.

108 changes: 0 additions & 108 deletions src/APIs/entity.js

This file was deleted.

55 changes: 55 additions & 0 deletions src/APIs/report.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import axios from 'axios'
import { QS } from './global'

export const uploadReport = (type, content, discussionId) => {
return axios({
method: 'PUT',
url: `/discussionsAudit`,
data: QS({ type, content, discussionId }),
})
}

export const deleteReport = id => {
return axios({
method: 'DELETE',
url: `/discussionAudit/${id}`,
})
}

export const getDiscussionReportList = page => {
return axios({
method: 'GET',
url: `/discussionAudit/index`,
params: { page },
})
}

export const getDiscussionReportByState = state => {
return axios({
method: 'GET',
url: `/discussionAudit/search`,
params: { state },
})
}

export const isCurrentUserAdmin = () => {
return axios({
method: 'GET',
url: `/user/is-admin`,
})
}

export const getDiscussionReportById = id => {
return axios({
method: 'GET',
url: `/discussionAudit/${id}`,
})
}

export const dealDiscussionReport = (id, state, feedBack) => {
return axios({
method: 'POST',
url: `/discussionAudit/${id}`,
data: QS({ state, feedBack }),
})
}
33 changes: 0 additions & 33 deletions src/APIs/snackbar.js

This file was deleted.

7 changes: 7 additions & 0 deletions src/APIs/ui.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import store from '../store'
import { siteTitleInFull } from '../strings'

export function updateTitleTo(value) {
store.dispatch('updateNavTitle', value)
document.title = `${value} ~ ${siteTitleInFull}`
}
18 changes: 13 additions & 5 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
<template>
<div id="app">
<!-- <img alt="Vue logo" src="./assets/logo.png">-->
<HelloWorld msg="Welcome to Your Vue.js App"/>
<!-- 全局展示的组件 -->
<Navigator />
<!-- 初始内容,利用msg可以进行传值操作 -->
<!-- <HelloWorld msg="Welcome to Your Vue.js App"/>-->
<!-- 进行内容的替换,路径代表的组件在router.js中查看 -->
<keep-alive>
<router-view :key="$route.path" />
</keep-alive>
</div>
</template>

<script>
import HelloWorld from './components/HelloWorld.vue'
import Navigator from "@/components/Navigator";
import { siteTitle } from './strings'
export default {
name: 'app',
components: {
HelloWorld
}
Navigator
},
data: () => ({ siteTitle }),
}
</script>

Expand Down
Binary file added src/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/components/HelloWorld.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<div class="hello">
<img alt="Vue logo" src="../assets/logo.png">
<h1>{{ msg }}</h1>
<p>
For a guide and recipes on how to configure / customize this project,<br>
Expand Down
Loading

0 comments on commit c5c91b1

Please sign in to comment.