@@ -108,6 +108,9 @@
} else {
return {enName: this.user.data.userName + '(个人账户)'}
}
+ },
+ tab () {
+ return this.$store.state.chat.tab.tab.data
},
mounted () {
@@ -185,7 +188,11 @@
let iTop = (window.screen.availHeight - 30 - 780) / 2
// 获得窗口的水平位置
let iLeft = (window.screen.availWidth - 10 - 1030) / 2
+ if (this.tab.close) {
+ this.tab.close()
+ }
let newTab = window.open('', '即时对话框', 'height=750, width=1000, top=' + iTop + ', left=' + iLeft + ', toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no')
+ this.$store.dispatch('chat/setChatTab', {tab: newTab})
this.$http.get('/basic/enterprise/' + this.enterprise.uu + '/info')
.then(response => {
let obj = {}
@@ -91,6 +91,9 @@ export default {
isFocus () {
return this.$store.state.shop.storeInfo.focusList.data
methods: {
@@ -125,7 +128,11 @@ export default {
this.$http.get('/basic/enterprise/' + this.storeInfo.enUU + '/info')
@@ -0,0 +1,6 @@
+export const actions = {
+ setChatTab ({ commit }, params = {}) {
+ console.log(params)
+ commit('tab/GET_TABLE_SUCCESS', params.tab)
+}
@@ -0,0 +1,13 @@
+export const state = () => ({
+ tab: {
+ fetching: false,
+ data: []
+})
+
+export const mutations = {
+ GET_TABLE_SUCCESS (state, result) {
+ state.tab.fetching = false
+ state.tab.data = result