@titaui/pc 1.10.82-beta.10 → 1.10.82-beta.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -116,43 +116,38 @@ var WeChatBtn = function WeChatBtn(props) {
116
116
  if (isWx) {
117
117
  //有群了,判断没在群就先进群再打开群
118
118
  if (chatId !== null && chatId !== 'chatId') {
119
- wx.invoke('updateEnterpriseChat', {
120
- chatId: chatId,
121
- userIdsToAdd: loginUserOpenId
119
+ wx.invoke('openExistedChatWithMsg', {
120
+ chatId: chatId
122
121
  }, function (res) {
123
- if (res.err_msg == 'updateEnterpriseChat:ok') {
124
- wx.invoke('openExistedChatWithMsg', {
125
- chatId: chatId
126
- });
122
+ if (res.err_msg === 'openExistedChatWithMsg:ok') {
123
+ console.log('打开群成功');
127
124
  } else {
128
- wx.invoke('openExistedChatWithMsg', {
129
- chatId: chatId
130
- }, function (res) {
131
- if (res.err_msg === 'openExistedChatWithMsg:ok') {
132
- console.log('打开群成功');
133
- } else {
134
- if (isMac) {
135
- setMacWarnModalVisible(true);
136
- } else {
137
- wx.invoke('updateEnterpriseChat', {
138
- chatId: chatId,
139
- userIdsToAdd: loginUserOpenId
125
+ if (isMac) {
126
+ setMacWarnModalVisible(true);
127
+ } else {
128
+ wx.invoke('updateEnterpriseChat', {
129
+ chatId: chatId,
130
+ userIdsToAdd: loginUserOpenId
131
+ }, function (res) {
132
+ console.log(chatId);
133
+
134
+ if (res.err_msg == 'updateEnterpriseChat:ok') {
135
+ wx.invoke('openExistedChatWithMsg', {
136
+ chatId: chatId
140
137
  }, function (res) {
141
- if (res.err_msg == 'updateEnterpriseChat:ok') {
142
- wx.invoke('openExistedChatWithMsg', {
143
- chatId: chatId
144
- });
145
- } else {
146
- if (loginUserOpenId !== principalUser.userId) {
147
- setPrincipalUserModalVisible(true);
148
- } else {
149
- setMemberVisible(true);
150
- }
138
+ if (res.err_msg == 'openExistedChatWithMsg:ok') {
139
+ console.log('打开群成功');
151
140
  }
152
141
  });
142
+ } else {
143
+ if (loginUserOpenId === principalUser.userId) {
144
+ setPrincipalUserModalVisible(true);
145
+ } else {
146
+ setMemberVisible(true);
147
+ }
153
148
  }
154
- }
155
- });
149
+ });
150
+ }
156
151
  }
157
152
  });
158
153
  } else {
@@ -226,6 +221,7 @@ var WeChatBtn = function WeChatBtn(props) {
226
221
  }
227
222
 
228
223
  if (isWx) {
224
+ console.log(res.Data.obj);
229
225
  setChatId(res.Data.obj);
230
226
  (0, _request.rpost)('v1')('chat/users', {
231
227
  objId: id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.10.82-beta.10",
3
+ "version": "1.10.82-beta.14",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",