Commit 9eed216197930cd0b1b77c36e9cfab61e6038065

Authored by monkeyhouyi
1 parent 1c867c77

修改线上消息提示失败

.env.development 0 → 100644
  1 +NODE_ENV='development'
  2 +VUE_APP_TITLE='开发环境地址'
  3 +VUE_APP_BASE_API="http://8.130.38.56:8043"
  4 +VUE_APP_BASE_WSS="ws://8.130.38.56:8043/api/message/websocket"
0 \ No newline at end of file 5 \ No newline at end of file
.env.production 0 → 100644
  1 +
  2 +NODE_ENV='development'
  3 +VUE_APP_TITLE='生产环境'
  4 +VUE_APP_BASE_API="http://8.130.38.56:8043"
  5 +VUE_APP_BASE_WSS="ws://8.130.38.56:8043/api/message/websocket"
0 \ No newline at end of file 6 \ No newline at end of file
package.json
@@ -5,6 +5,8 @@ @@ -5,6 +5,8 @@
5 "scripts": { 5 "scripts": {
6 "serve": "vue-cli-service serve", 6 "serve": "vue-cli-service serve",
7 "build": "vue-cli-service build", 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 "lint": "vue-cli-service lint" 10 "lint": "vue-cli-service lint"
9 }, 11 },
10 "dependencies": { 12 "dependencies": {
src/components/ColumnSettings/index.vue
@@ -39,7 +39,7 @@ export default { @@ -39,7 +39,7 @@ export default {
39 } 39 }
40 } 40 }
41 </script> 41 </script>
42 -<style lang="scss"> 42 +<style lang="scss" scoped>
43 .columnSetting-popover { 43 .columnSetting-popover {
44 padding: 0 !important; 44 padding: 0 !important;
45 } 45 }
src/components/FormDialog/index.vue
@@ -30,7 +30,6 @@ @@ -30,7 +30,6 @@
30 }, 30 },
31 methods: { 31 methods: {
32 openDialog() { 32 openDialog() {
33 - console.log(11);  
34 let row = this.row; 33 let row = this.row;
35 if(this.row.state != '已填写') return; 34 if(this.row.state != '已填写') return;
36 this.btnLoading = true; 35 this.btnLoading = true;
src/main.js
@@ -32,7 +32,7 @@ import components from &#39;./components&#39; @@ -32,7 +32,7 @@ import components from &#39;./components&#39;
32 Vue.use(components) 32 Vue.use(components)
33 // 添加实例属性 33 // 添加实例属性
34 Object.assign(Vue.prototype, { 34 Object.assign(Vue.prototype, {
35 - define: require('./utils/define'), // 常量 35 + define: require('@/utils/define'), // 常量
36 ncc, // 公共方法 36 ncc, // 公共方法
37 formValidate: require('./utils/formValidate').default, // 表单验证 37 formValidate: require('./utils/formValidate').default, // 表单验证
38 $message: message 38 $message: message
src/permission.js
@@ -25,7 +25,6 @@ router.beforeEach((to, from, next) =&gt; { @@ -25,7 +25,6 @@ router.beforeEach((to, from, next) =&gt; {
25 // 判断当前用户是否已拉取完user_info信息 25 // 判断当前用户是否已拉取完user_info信息
26 store.dispatch('GetInfo').then((res) => { 26 store.dispatch('GetInfo').then((res) => {
27 isRelogin.show = false 27 isRelogin.show = false
28 - console.log(res, 'res-user');  
29 store.dispatch('generateRoutes', res).then(accessRoutes => { 28 store.dispatch('generateRoutes', res).then(accessRoutes => {
30 // 根据roles权限生成可访问的路由表 29 // 根据roles权限生成可访问的路由表
31 router.addRoutes(accessRoutes) // 动态添加可访问路由表 30 router.addRoutes(accessRoutes) // 动态添加可访问路由表
src/store/getters.js
@@ -15,6 +15,7 @@ const getters = { @@ -15,6 +15,7 @@ const getters = {
15 topbarRouters:state => state.permission.topbarRouters, 15 topbarRouters:state => state.permission.topbarRouters,
16 defaultRoutes:state => state.permission.defaultRoutes, 16 defaultRoutes:state => state.permission.defaultRoutes,
17 sidebarRouters:state => state.permission.sidebarRouters, 17 sidebarRouters:state => state.permission.sidebarRouters,
  18 + socket:state => state.user.socket,
18 } 19 }
19 export default getters 20 export default getters
20 21
21 \ No newline at end of file 22 \ No newline at end of file
src/utils/define.js
@@ -8,6 +8,7 @@ module.exports = { @@ -8,6 +8,7 @@ module.exports = {
8 timeout: process.env.NODE_ENV === 'development' ? 10000 : 1000000, 8 timeout: process.env.NODE_ENV === 'development' ? 10000 : 1000000,
9 // WebSocketUrl: process.env.NODE_ENV === 'development' ? APIURl.replace('http', 'ws') + '/websocket' : process.env.VUE_APP_BASE_WSS, 9 // WebSocketUrl: process.env.NODE_ENV === 'development' ? APIURl.replace('http', 'ws') + '/websocket' : process.env.VUE_APP_BASE_WSS,
10 WebSocketUrl: process.env.NODE_ENV === 'development' ? APIURl.replace('http', 'ws') + '/api/message/websocket' : process.env.VUE_APP_BASE_WSS, 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 comUploadUrl: process.env.VUE_APP_BASE_API + '/api/file/Uploader', 12 comUploadUrl: process.env.VUE_APP_BASE_API + '/api/file/Uploader',
12 comUrl: process.env.VUE_APP_BASE_API, 13 comUrl: process.env.VUE_APP_BASE_API,
13 // 本地文件预览 14 // 本地文件预览
src/utils/request.js
@@ -11,7 +11,7 @@ axios.defaults.headers[&#39;Content-Type&#39;] = &#39;application/json;charset=utf-8&#39; @@ -11,7 +11,7 @@ axios.defaults.headers[&#39;Content-Type&#39;] = &#39;application/json;charset=utf-8&#39;
11 11
12 const service = axios.create({ 12 const service = axios.create({
13 // axios中请求配置有baseURL选项,表示请求URL公共部分 13 // axios中请求配置有baseURL选项,表示请求URL公共部分
14 - baseURL: '/api', 14 + baseURL: process.env.VUE_APP_BASE_API + '/api',
15 withCredentials: false, 15 withCredentials: false,
16 // 超时 16 // 超时
17 // timeout: define.timeout 17 // timeout: define.timeout
src/views/Login.vue
@@ -71,7 +71,8 @@ export default { @@ -71,7 +71,8 @@ export default {
71 if (!val) this.loading = false; 71 if (!val) this.loading = false;
72 }, 72 },
73 }, 73 },
74 - created() {}, 74 + created() {
  75 + },
75 mounted() {}, 76 mounted() {},
76 methods: { 77 methods: {
77 toHome() { 78 toHome() {
@@ -84,7 +85,6 @@ export default { @@ -84,7 +85,6 @@ export default {
84 this.$store 85 this.$store
85 .dispatch("Login", this.form) 86 .dispatch("Login", this.form)
86 .then(() => { 87 .then(() => {
87 - console.log(222);  
88 this.$router.push({ path: "/homePage" }); 88 this.$router.push({ path: "/homePage" });
89 }) 89 })
90 .catch(() => { 90 .catch(() => {
src/views/baseSpecialAction/Form.vue
@@ -280,7 +280,6 @@ export default { @@ -280,7 +280,6 @@ export default {
280 this.$nextTick(() => { 280 this.$nextTick(() => {
281 this.$refs["elForm"].resetFields(); 281 this.$refs["elForm"].resetFields();
282 if(this.dataForm.id) { 282 if(this.dataForm.id) {
283 - console.log(row, 'row');  
284 this.dataForm.communicationArea = JSON.parse(row.communicationArea); 283 this.dataForm.communicationArea = JSON.parse(row.communicationArea);
285 this.dataForm.communicationOut = JSON.parse(row.communicationOut); 284 this.dataForm.communicationOut = JSON.parse(row.communicationOut);
286 } 285 }
src/views/homePage/components/news/NewsDialog.vue
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <div class="news-title"> 3 <div class="news-title">
4 <div class="left">我的消息</div> 4 <div class="left">我的消息</div>
5 <div class="right"> 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 >标记全部已读</el-button 7 >标记全部已读</el-button
8 > 8 >
9 </div> 9 </div>
src/views/homePage/components/news/index.vue
@@ -47,7 +47,6 @@ export default { @@ -47,7 +47,6 @@ export default {
47 this.messageCount = val; 47 this.messageCount = val;
48 }, 48 },
49 initWebSocket() { 49 initWebSocket() {
50 - console.log("1");  
51 this.socket = this.$store.getters.socket || null; 50 this.socket = this.$store.getters.socket || null;
52 if ("WebSocket" in window) { 51 if ("WebSocket" in window) {
53 if (!this.socket) { 52 if (!this.socket) {
src/views/systemPage/InfoList.vue
@@ -81,7 +81,6 @@ export default { @@ -81,7 +81,6 @@ export default {
81 // this.initList(); 81 // this.initList();
82 }, 82 },
83 mounted() { 83 mounted() {
84 - console.log(this.$route.path, "path");  
85 }, 84 },
86 watch: { 85 watch: {
87 $route: { 86 $route: {