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 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 6 \ No newline at end of file
... ...
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
... ... @@ -39,7 +39,7 @@ export default {
39 39 }
40 40 }
41 41 </script>
42   -<style lang="scss">
  42 +<style lang="scss" scoped>
43 43 .columnSetting-popover {
44 44 padding: 0 !important;
45 45 }
... ...
src/components/FormDialog/index.vue
... ... @@ -30,7 +30,6 @@
30 30 },
31 31 methods: {
32 32 openDialog() {
33   - console.log(11);
34 33 let row = this.row;
35 34 if(this.row.state != '已填写') return;
36 35 this.btnLoading = true;
... ...
src/main.js
... ... @@ -32,7 +32,7 @@ import components from &#39;./components&#39;
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) =&gt; {
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[&#39;Content-Type&#39;] = &#39;application/json;charset=utf-8&#39;
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
... ... @@ -47,7 +47,6 @@ export default {
47 47 this.messageCount = val;
48 48 },
49 49 initWebSocket() {
50   - console.log("1");
51 50 this.socket = this.$store.getters.socket || null;
52 51 if ("WebSocket" in window) {
53 52 if (!this.socket) {
... ...
src/views/systemPage/InfoList.vue
... ... @@ -81,7 +81,6 @@ export default {
81 81 // this.initList();
82 82 },
83 83 mounted() {
84   - console.log(this.$route.path, "path");
85 84 },
86 85 watch: {
87 86 $route: {
... ...