@titaui/pc 1.10.82-beta.7 → 1.10.83-beta.1
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.
|
@@ -371,7 +371,8 @@ function OkrDetailHeader(_ref) {
|
|
|
371
371
|
actionComponent: /*#__PURE__*/_react["default"].createElement(_wechatBtn["default"], {
|
|
372
372
|
id: detailInfo.workId,
|
|
373
373
|
objType: 62,
|
|
374
|
-
name: detailInfo.workName
|
|
374
|
+
name: detailInfo.workName,
|
|
375
|
+
principalUser: detailInfo.principalUser
|
|
375
376
|
}),
|
|
376
377
|
content: parent ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
377
378
|
className: "okr-detail-head-parent"
|
|
@@ -47,7 +47,7 @@ var WeChatBtn = function WeChatBtn(props) {
|
|
|
47
47
|
var id = props.id,
|
|
48
48
|
objType = props.objType,
|
|
49
49
|
name = props.name,
|
|
50
|
-
|
|
50
|
+
principalUser = props.principalUser;
|
|
51
51
|
|
|
52
52
|
var _useState = (0, _react.useState)(false),
|
|
53
53
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -116,29 +116,45 @@ var WeChatBtn = function WeChatBtn(props) {
|
|
|
116
116
|
if (isWx) {
|
|
117
117
|
//有群了,判断没在群就先进群再打开群
|
|
118
118
|
if (chatId !== null && chatId !== 'chatId') {
|
|
119
|
-
wx.invoke('
|
|
120
|
-
chatId: chatId
|
|
119
|
+
wx.invoke('updateEnterpriseChat', {
|
|
120
|
+
chatId: chatId,
|
|
121
|
+
userIdsToAdd: loginUserOpenId
|
|
121
122
|
}, function (res) {
|
|
122
|
-
if (res.err_msg === '
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
123
|
+
console.log("1.\u4EBA\u5728\u7FA4\uFF0C\u8C03\u7528\u52A0\u4EBA\u63A5\u53E3\u8FD4\u56DE\u4FE1\u606F\uFF1B2.\u4EBA\u4E0D\u5728\u7FA4\uFF0C\u8C03\u7528\u52A0\u4EBA\u63A5\u53E3\u8FD4\u56DE\u4FE1\u606F\uFF1B 3.\u7FA4\u89E3\u6563\u4E86\uFF0C\u8C03\u7528\u52A0\u4EBA\u63A5\u53E3\u8FD4\u56DE\u4FE1\u606F 4.mac\u8C03\u7528\u52A0\u4EBA\u63A5\u53E3\u8FD4\u56DE\u4FE1\u606F ".concat(res.err_msg)); // if (res.err_msg === 'updateEnterpriseChat:ok') {
|
|
124
|
+
// wx.invoke(
|
|
125
|
+
// 'openExistedChatWithMsg',
|
|
126
|
+
// {
|
|
127
|
+
// chatId: chatId,
|
|
128
|
+
// },
|
|
129
|
+
// function (res) {
|
|
130
|
+
// if (res.err_msg === 'openExistedChatWithMsg:ok') {
|
|
131
|
+
// console.log('打开群成功')
|
|
132
|
+
// }
|
|
133
|
+
// },
|
|
134
|
+
// )
|
|
135
|
+
// } else if(res.err_msg !== 'updateEnterpriseChat:permission denied') {
|
|
136
|
+
// wx.invoke(
|
|
137
|
+
// 'openExistedChatWithMsg',
|
|
138
|
+
// {
|
|
139
|
+
// chatId: chatId,
|
|
140
|
+
// },
|
|
141
|
+
// function (res) {
|
|
142
|
+
// if (res.err_msg === 'openExistedChatWithMsg:ok') {
|
|
143
|
+
// console.log('打开群成功')
|
|
144
|
+
// } else {
|
|
145
|
+
// if (loginUserOpenId === principalUser.userId) {
|
|
146
|
+
// setPrincipalUserModalVisible(true)
|
|
147
|
+
// } else {
|
|
148
|
+
// setMemberVisible(true)
|
|
149
|
+
// }
|
|
150
|
+
// }
|
|
151
|
+
// },
|
|
152
|
+
// )
|
|
153
|
+
// } else {
|
|
154
|
+
// if (isMac) {
|
|
155
|
+
// setMacWarnModalVisible(true)
|
|
156
|
+
// }
|
|
157
|
+
// }
|
|
142
158
|
});
|
|
143
159
|
} else {
|
|
144
160
|
setCreateWechatVisible(true);
|
|
@@ -179,6 +195,7 @@ var WeChatBtn = function WeChatBtn(props) {
|
|
|
179
195
|
}
|
|
180
196
|
});
|
|
181
197
|
setCreateWechatVisible(false);
|
|
198
|
+
setPrincipalUserModalVisible(false);
|
|
182
199
|
};
|
|
183
200
|
|
|
184
201
|
var handleKnowMacWarn = function handleKnowMacWarn() {
|
|
@@ -210,6 +227,7 @@ var WeChatBtn = function WeChatBtn(props) {
|
|
|
210
227
|
}
|
|
211
228
|
|
|
212
229
|
if (isWx) {
|
|
230
|
+
console.log(res.Data.obj);
|
|
213
231
|
setChatId(res.Data.obj);
|
|
214
232
|
(0, _request.rpost)('v1')('chat/users', {
|
|
215
233
|
objId: id,
|