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

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,32 @@ 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
140
- }, 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
- }
151
- }
125
+ if (isMac) {
126
+ setMacWarnModalVisible(true);
127
+ } else {
128
+ wx.invoke('updateEnterpriseChat', {
129
+ chatId: chatId,
130
+ userIdsToAdd: loginUserOpenId
131
+ }, function (res) {
132
+ if (res.err_msg == 'updateEnterpriseChat:ok') {
133
+ wx.invoke('openExistedChatWithMsg', {
134
+ chatId: chatId
152
135
  });
136
+ } else {
137
+ if (loginUserOpenId === principalUser.userId) {
138
+ setPrincipalUserModalVisible(true);
139
+ } else {
140
+ setMemberVisible(true);
141
+ }
153
142
  }
154
- }
155
- });
143
+ });
144
+ }
156
145
  }
157
146
  });
158
147
  } else {
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.11",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",