| | |
| | | }, |
| | | SET_Id: (state, Id) => { |
| | | state.Id = Id |
| | | console.log(state.Id,'user2'); |
| | | |
| | | }, |
| | | SET_AVATAR: (state, avatar) => { |
| | | state.avatar = avatar |
| | |
| | | GetInfo({ commit, state }) { |
| | | return new Promise((resolve, reject) => { |
| | | getInfo().then(res => { |
| | | console.log(res.user,'user'); |
| | | |
| | | const user = res.user |
| | | const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar; |
| | |
| | | commit('SET_ROLES', ['ROLE_DEFAULT']) |
| | | } |
| | | commit('SET_NAME', user.userName) |
| | | console.log(user.userId,'user1'); |
| | | commit('SET_Id', user.userId) |
| | | commit('SET_leavehospitaldistrictcodes', user.belongWards) |
| | | commit('SET_leaveldeptcodes', user.belongDepts) |
| | |
| | | created() { |
| | | this.TemplateName = this.$route.query.name; |
| | | this.userid = store.getters.Id; |
| | | console.log(store.getters.Id,'11'); |
| | | |
| | | this.requstWs(); //进入页面创建连接 |
| | | }, |
| | | mounted() { |
| | |
| | | }; |
| | | // 发起ws请求 |
| | | sendWebsocket( |
| | | "ws://192.168.2.10:8095/chat?userId="+this.userId, |
| | | "ws://192.168.2.13:8095/chat?userId="+this.userid, |
| | | obj, |
| | | this.wsMessage, |
| | | this.wsError |
| | |
| | | // 消息发送 |
| | | const obj = { |
| | | type: "text", |
| | | userId: this.userId, |
| | | userId: this.userid, |
| | | templateId: "", |
| | | questionMessage: { content: this.answer }, |
| | | }; |
| | | console.log(obj, "入参"); |
| | | // 发起ws请求 |
| | | sendWebsocket( |
| | | "ws://192.168.2.10:8095/chat?userId="+this.userId, |
| | | "ws://192.168.2.13:8095/chat?userId="+this.userids, |
| | | obj, |
| | | this.wsMessage, |
| | | this.wsError |
| | |
| | | overflow: auto; |
| | | .leftside { |
| | | margin-bottom: 30px; |
| | | width: 600px; |
| | | max-width: 566px; |
| | | margin-left: 20px; |
| | | padding: 10px; |
| | | color: #fff; |
| | |
| | | // detail: https://cli.vuejs.org/config/#devserver-proxy |
| | | [process.env.VUE_APP_BASE_API]: { |
| | | // target: `http://192.168.168.60:8095`, |
| | | target: `http://192.168.2.10:8095`, |
| | | target: `http://192.168.2.13:8095`, |
| | | // target:`http://localhost:8095`, |
| | | // target: `http://192.168.101.135:8095`, |
| | | // target: `http://192.168.101.166:8093`, |