Commit 9eed216197930cd0b1b77c36e9cfab61e6038065
1 parent
1c867c77
修改线上消息提示失败
Showing
15 changed files
with
19 additions
and
11 deletions
.env.development
0 → 100644
.env.production
0 → 100644
package.json
| ... | ... | @@ -5,6 +5,8 @@ |
| 5 | 5 | "scripts": { |
| 6 | 6 | "serve": "vue-cli-service serve", |
| 7 | 7 | "build": "vue-cli-service build", |
| 8 | + "build:stage": "vue-cli-service build --mode development", | |
| 9 | + "build:prod": "vue-cli-service build --mode production", | |
| 8 | 10 | "lint": "vue-cli-service lint" |
| 9 | 11 | }, |
| 10 | 12 | "dependencies": { | ... | ... |
src/components/ColumnSettings/index.vue
src/components/FormDialog/index.vue
src/main.js
| ... | ... | @@ -32,7 +32,7 @@ import components from './components' |
| 32 | 32 | Vue.use(components) |
| 33 | 33 | // 添加实例属性 |
| 34 | 34 | Object.assign(Vue.prototype, { |
| 35 | - define: require('./utils/define'), // 常量 | |
| 35 | + define: require('@/utils/define'), // 常量 | |
| 36 | 36 | ncc, // 公共方法 |
| 37 | 37 | formValidate: require('./utils/formValidate').default, // 表单验证 |
| 38 | 38 | $message: message | ... | ... |
src/permission.js
| ... | ... | @@ -25,7 +25,6 @@ router.beforeEach((to, from, next) => { |
| 25 | 25 | // 判断当前用户是否已拉取完user_info信息 |
| 26 | 26 | store.dispatch('GetInfo').then((res) => { |
| 27 | 27 | isRelogin.show = false |
| 28 | - console.log(res, 'res-user'); | |
| 29 | 28 | store.dispatch('generateRoutes', res).then(accessRoutes => { |
| 30 | 29 | // 根据roles权限生成可访问的路由表 |
| 31 | 30 | router.addRoutes(accessRoutes) // 动态添加可访问路由表 | ... | ... |
src/store/getters.js
| ... | ... | @@ -15,6 +15,7 @@ const getters = { |
| 15 | 15 | topbarRouters:state => state.permission.topbarRouters, |
| 16 | 16 | defaultRoutes:state => state.permission.defaultRoutes, |
| 17 | 17 | sidebarRouters:state => state.permission.sidebarRouters, |
| 18 | + socket:state => state.user.socket, | |
| 18 | 19 | } |
| 19 | 20 | export default getters |
| 20 | 21 | |
| 21 | 22 | \ No newline at end of file | ... | ... |
src/utils/define.js
| ... | ... | @@ -8,6 +8,7 @@ module.exports = { |
| 8 | 8 | timeout: process.env.NODE_ENV === 'development' ? 10000 : 1000000, |
| 9 | 9 | // WebSocketUrl: process.env.NODE_ENV === 'development' ? APIURl.replace('http', 'ws') + '/websocket' : process.env.VUE_APP_BASE_WSS, |
| 10 | 10 | WebSocketUrl: process.env.NODE_ENV === 'development' ? APIURl.replace('http', 'ws') + '/api/message/websocket' : process.env.VUE_APP_BASE_WSS, |
| 11 | + // WebSocketUrl: APIURl.replace('http', 'ws') + '/api/message/websocket', | |
| 11 | 12 | comUploadUrl: process.env.VUE_APP_BASE_API + '/api/file/Uploader', |
| 12 | 13 | comUrl: process.env.VUE_APP_BASE_API, |
| 13 | 14 | // 本地文件预览 | ... | ... |
src/utils/request.js
| ... | ... | @@ -11,7 +11,7 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' |
| 11 | 11 | |
| 12 | 12 | const service = axios.create({ |
| 13 | 13 | // axios中请求配置有baseURL选项,表示请求URL公共部分 |
| 14 | - baseURL: '/api', | |
| 14 | + baseURL: process.env.VUE_APP_BASE_API + '/api', | |
| 15 | 15 | withCredentials: false, |
| 16 | 16 | // 超时 |
| 17 | 17 | // timeout: define.timeout | ... | ... |
src/views/Login.vue
| ... | ... | @@ -71,7 +71,8 @@ export default { |
| 71 | 71 | if (!val) this.loading = false; |
| 72 | 72 | }, |
| 73 | 73 | }, |
| 74 | - created() {}, | |
| 74 | + created() { | |
| 75 | + }, | |
| 75 | 76 | mounted() {}, |
| 76 | 77 | methods: { |
| 77 | 78 | toHome() { |
| ... | ... | @@ -84,7 +85,6 @@ export default { |
| 84 | 85 | this.$store |
| 85 | 86 | .dispatch("Login", this.form) |
| 86 | 87 | .then(() => { |
| 87 | - console.log(222); | |
| 88 | 88 | this.$router.push({ path: "/homePage" }); |
| 89 | 89 | }) |
| 90 | 90 | .catch(() => { | ... | ... |
src/views/baseSpecialAction/Form.vue
| ... | ... | @@ -280,7 +280,6 @@ export default { |
| 280 | 280 | this.$nextTick(() => { |
| 281 | 281 | this.$refs["elForm"].resetFields(); |
| 282 | 282 | if(this.dataForm.id) { |
| 283 | - console.log(row, 'row'); | |
| 284 | 283 | this.dataForm.communicationArea = JSON.parse(row.communicationArea); |
| 285 | 284 | this.dataForm.communicationOut = JSON.parse(row.communicationOut); |
| 286 | 285 | } | ... | ... |
src/views/homePage/components/news/NewsDialog.vue
| ... | ... | @@ -3,7 +3,7 @@ |
| 3 | 3 | <div class="news-title"> |
| 4 | 4 | <div class="left">我的消息</div> |
| 5 | 5 | <div class="right"> |
| 6 | - <el-button type="primary" size="small" @click="toReadAll" | |
| 6 | + <el-button type="text" size="small" :disabled="!messageList.length" @click="toReadAll" | |
| 7 | 7 | >标记全部已读</el-button |
| 8 | 8 | > |
| 9 | 9 | </div> | ... | ... |
src/views/homePage/components/news/index.vue