@titaui/pc 1.16.84 → 1.16.86
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30"><defs><linearGradient id="a" x1="20.986%" x2="84.575%" y1="90.458%" y2="10.809%"><stop offset="0%" stop-color="#4CA6FF"/><stop offset="100%" stop-color="#0089FE"/></linearGradient></defs><g fill="none"><rect width="30" height="30" fill="#000" opacity="0"/><path fill="url(#a)" d="M14.9414062,0 C6.68554688,0 0,6.68554688 0,14.9414062 C0,23.1972656 6.68554688,29.8828125 14.9414062,29.8828125 C23.1972656,29.8828125 29.8828125,23.1972656 29.8828125,14.9414062 C29.8828125,6.68554688 23.1826172,0 14.9414062,0 Z M21.8525391,12.9492188 C21.8232422,13.0839844 21.7470703,13.265625 21.6416016,13.5087891 L21.6269531,13.5234375 C20.9941406,14.8652344 19.3623047,17.4931641 19.3623047,17.4931641 L19.3476562,17.4785156 L18.8642578,18.3076172 L21.1728516,18.3076172 L16.7666016,24.1640625 L17.7626953,20.1796875 L15.9521484,20.1796875 L16.5849609,17.5371094 C16.0722656,17.6572266 15.46875,17.8242187 14.7597656,18.0644531 C14.7597656,18.0644531 13.7929688,18.6240234 11.9824219,16.9775391 C11.9824219,16.9775391 10.7607422,15.890625 11.4697266,15.6357422 C11.7714844,15.515625 12.9345703,15.3779297 13.8544922,15.2578125 C15.0908203,15.0908203 15.8613281,15 15.8613281,15 C15.8613281,15 12.0439453,15.0615234 11.1386719,14.9091797 C10.2333984,14.7744141 9.08496094,13.2480469 8.84472656,11.9208984 C8.84472656,11.9208984 8.46679688,11.1972656 9.65917969,11.5429688 C10.8369141,11.8886719 15.7880859,12.8847656 15.7880859,12.8847656 C15.7880859,12.8847656 9.35742187,10.9277344 8.93554688,10.4443359 C8.51367188,9.9609375 7.68164062,7.81933594 7.78710938,6.50390625 C7.78710938,6.50390625 7.83105469,6.17285156 8.16503906,6.26367188 C8.16503906,6.26367188 12.9052734,8.4375 16.1484375,9.61523438 C19.4091797,10.8222656 22.2304687,11.4257812 21.8525391,12.9492188 Z"/></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30"><g fill="none"><rect width="30" height="30" fill="#000" opacity="0"/><path fill="#CDDAED" d="M15,0.05859375 C6.74414062,0.05859375 0.05859375,6.74414062 0.05859375,15 C0.05859375,23.2558594 6.74414062,29.9414062 15,29.9414062 C23.2558594,29.9414062 29.9414062,23.2558594 29.9414062,15 C29.9414062,6.74414063 23.2412109,0.05859375 15,0.05859375 Z M21.9111328,13.0078125 C21.8818359,13.1425781 21.8056641,13.3242188 21.7001953,13.5673828 L21.6855469,13.5820312 C21.0527344,14.9238281 19.4208984,17.5517578 19.4208984,17.5517578 L19.40625,17.5371094 L18.9228516,18.3662109 L21.2314453,18.3662109 L16.8251953,24.2226562 L17.8212891,20.2382812 L16.0107422,20.2382812 L16.6435547,17.5957031 C16.1308594,17.7158203 15.5273437,17.8828125 14.8183594,18.1230469 C14.8183594,18.1230469 13.8515625,18.6826172 12.0410156,17.0361328 C12.0410156,17.0361328 10.8193359,15.9492187 11.5283203,15.6943359 C11.8300781,15.5742187 12.9931641,15.4365234 13.9130859,15.3164062 C15.1494141,15.1494141 15.9199219,15.0585938 15.9199219,15.0585938 C15.9199219,15.0585938 12.1025391,15.1201172 11.1972656,14.9677734 C10.2919922,14.8330078 9.14355469,13.3066406 8.90332031,11.9794922 C8.90332031,11.9794922 8.52539062,11.2558594 9.71777344,11.6015625 C10.8955078,11.9472656 15.8466797,12.9433594 15.8466797,12.9433594 C15.8466797,12.9433594 9.41601562,10.9863281 8.99414062,10.5029297 C8.57226562,10.0195312 7.74023437,7.87792969 7.84570312,6.5625 C7.84570312,6.5625 7.88964844,6.23144531 8.22363281,6.32226562 C8.22363281,6.32226562 12.9638672,8.49609375 16.2070312,9.67382812 C19.4677734,10.8808594 22.2890625,11.484375 21.9111328,13.0078125 Z"/></g></svg>
|
|
@@ -3,10 +3,13 @@
|
|
|
3
3
|
font-size: 18px;
|
|
4
4
|
color: #a4acb9;
|
|
5
5
|
cursor: pointer;
|
|
6
|
+
width: 20px;
|
|
7
|
+
height: 20px;
|
|
6
8
|
}
|
|
7
9
|
|
|
8
10
|
.titaui-dingding-btn:hover {
|
|
9
|
-
|
|
11
|
+
background-size: contain;
|
|
12
|
+
background-image: url("./img/dingding-active.svg");
|
|
10
13
|
}
|
|
11
14
|
|
|
12
15
|
.titaui-dingding-btn:not(:empty) {
|
|
@@ -14,5 +17,19 @@
|
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
.titaui-dingding-btn__chat {
|
|
17
|
-
|
|
20
|
+
width: 20px;
|
|
21
|
+
height: 20px;
|
|
22
|
+
background-size: contain;
|
|
23
|
+
background-image: url("./img/dingding-active.svg");
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.titaui-dingding-btn__img {
|
|
27
|
+
width: 20px;
|
|
28
|
+
height: 20px;
|
|
29
|
+
background-image: url("./img/dingding.svg");
|
|
30
|
+
background-size: contain;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.titaui-dingding-btn__img:hover {
|
|
34
|
+
background-image: url("./img/dingding-active.svg");
|
|
18
35
|
}
|
|
@@ -136,48 +136,34 @@ var DingdingBtn = function DingdingBtn(props) {
|
|
|
136
136
|
var isWx = navigator.userAgent.match(/wxwork/);
|
|
137
137
|
var isMac = navigator.userAgent.match(/Mac/);
|
|
138
138
|
var appId = (0, _helpers.getTenantInfo)().suiteAppId;
|
|
139
|
-
(0, _react.useEffect)(function () {
|
|
140
|
-
console.log(id, objType, name, principalUser);
|
|
141
|
-
}, []);
|
|
142
139
|
|
|
143
140
|
var handleClickWechatBtn = function handleClickWechatBtn() {
|
|
144
141
|
if (isDingDing) {
|
|
145
142
|
//有群了,判断没在群就先进群再打开群
|
|
146
|
-
if (chatId !== null && chatId !== 'chatId') {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
if (res.errorCode === '0') {
|
|
171
|
-
console.log("添加成功res" + JSON.stringify(res));
|
|
172
|
-
} else {// if (userId === principalUser.userId) {
|
|
173
|
-
// setPrincipalUserModalVisible(true)
|
|
174
|
-
// } else {
|
|
175
|
-
// setMemberVisible(true)
|
|
176
|
-
// }
|
|
177
|
-
}
|
|
178
|
-
})["catch"](function (e) {
|
|
179
|
-
console.log('添加失败' + JSON.stringify(e));
|
|
180
|
-
});
|
|
143
|
+
if (chatId !== null && chatId !== 'chatId') {// addMembers({
|
|
144
|
+
// context: {
|
|
145
|
+
// coolAppCode: coolAppCode, //酷应用的编码
|
|
146
|
+
// clientId: suiteKey, // 应用标识
|
|
147
|
+
// corpId: corpId, // 根据对应场景获取 corpId
|
|
148
|
+
// },
|
|
149
|
+
// openConversationList: [chatId], //要添加成员的的群ID
|
|
150
|
+
// userIds: dingChatGroupMember, //需要入群的成员userId。
|
|
151
|
+
// })
|
|
152
|
+
// .then((res) => {
|
|
153
|
+
// console.log(res, 'addMembers')
|
|
154
|
+
// if (res.errorCode === '0') {
|
|
155
|
+
// console.log("添加成功res"+ JSON.stringify(res))
|
|
156
|
+
// } else {
|
|
157
|
+
// // if (userId === principalUser.userId) {
|
|
158
|
+
// // setPrincipalUserModalVisible(true)
|
|
159
|
+
// // } else {
|
|
160
|
+
// // setMemberVisible(true)
|
|
161
|
+
// // }
|
|
162
|
+
// }
|
|
163
|
+
// })
|
|
164
|
+
// .catch((e) => {
|
|
165
|
+
// console.log('添加失败' + JSON.stringify(e))
|
|
166
|
+
// })
|
|
181
167
|
} else {
|
|
182
168
|
setCreateDingchatVisible(true);
|
|
183
169
|
}
|
|
@@ -200,13 +186,10 @@ var DingdingBtn = function DingdingBtn(props) {
|
|
|
200
186
|
title: "\u300C".concat(apply, "\u7FA4\u300D").concat(name),
|
|
201
187
|
memberUserIds: dingChatGroupMember
|
|
202
188
|
}).then(function (res) {
|
|
203
|
-
console.log(res, 'createGroup');
|
|
204
|
-
|
|
205
189
|
if (res.errorCode === '0') {
|
|
206
190
|
// 建群成功
|
|
207
191
|
if (res.detail.openConversationId) {
|
|
208
|
-
|
|
209
|
-
|
|
192
|
+
// 创建的群id
|
|
210
193
|
(0, _request.rpost)('v1')('chat/add', {
|
|
211
194
|
objId: id,
|
|
212
195
|
objType: objType,
|
|
@@ -216,8 +199,7 @@ var DingdingBtn = function DingdingBtn(props) {
|
|
|
216
199
|
setChatId(res.detail.openConversationId);
|
|
217
200
|
}
|
|
218
201
|
}
|
|
219
|
-
})["catch"](function (e) {
|
|
220
|
-
console.log(e, 'catch'); // 用户主动退出安装
|
|
202
|
+
})["catch"](function (e) {// 用户主动退出安装
|
|
221
203
|
});
|
|
222
204
|
setCreateDingchatVisible(false);
|
|
223
205
|
setPrincipalUserModalVisible(false);
|
|
@@ -238,7 +220,6 @@ var DingdingBtn = function DingdingBtn(props) {
|
|
|
238
220
|
|
|
239
221
|
(0, _react.useEffect)(function () {
|
|
240
222
|
if (!isDingDing) {
|
|
241
|
-
console.log('不是钉钉');
|
|
242
223
|
return;
|
|
243
224
|
} else {
|
|
244
225
|
(0, _request.rpost)('v1')('chat/info', {
|
|
@@ -246,8 +227,6 @@ var DingdingBtn = function DingdingBtn(props) {
|
|
|
246
227
|
objType: objType,
|
|
247
228
|
SourceTye: dingdingSource
|
|
248
229
|
}).then(function (res) {
|
|
249
|
-
console.log(res, 'chat/info');
|
|
250
|
-
|
|
251
230
|
if (res.Message === '没有权限') {
|
|
252
231
|
setIsShowDingChat(false);
|
|
253
232
|
return;
|
|
@@ -259,14 +238,12 @@ var DingdingBtn = function DingdingBtn(props) {
|
|
|
259
238
|
}
|
|
260
239
|
|
|
261
240
|
if (isDingDing) {
|
|
262
|
-
console.log(res.Data.obj, 'res.Data.obj');
|
|
263
241
|
setChatId(res.Data.obj);
|
|
264
242
|
(0, _request.rpost)('v1')('chat/users', {
|
|
265
243
|
objId: id,
|
|
266
244
|
objType: objType,
|
|
267
245
|
SourceTye: dingdingSource
|
|
268
246
|
}).then(function (res) {
|
|
269
|
-
console.log(res, 'chat/users');
|
|
270
247
|
var _res$Data = res.Data,
|
|
271
248
|
CoolAppCode = _res$Data.CoolAppCode,
|
|
272
249
|
SuiteKey = _res$Data.SuiteKey,
|
|
@@ -296,7 +273,7 @@ var DingdingBtn = function DingdingBtn(props) {
|
|
|
296
273
|
if (isShowDingChat && chatId === null) {
|
|
297
274
|
setTooltip('点击一键发起钉钉群聊');
|
|
298
275
|
} else if (isShowDingChat && chatId !== null && chatId !== 'chatId') {
|
|
299
|
-
setTooltip("\
|
|
276
|
+
setTooltip("\u9489\u9489\u7FA4\u804A\u540D\u79F0:\u300C".concat(apply, "\u7FA4\u300D").concat(name));
|
|
300
277
|
} else if (isShowDingChat && chatId === 'chatId') {
|
|
301
278
|
setTooltip('浏览器不支持此功能,请到钉钉工作台中使用');
|
|
302
279
|
}
|
|
@@ -312,7 +289,7 @@ var DingdingBtn = function DingdingBtn(props) {
|
|
|
312
289
|
overlay: tooltip,
|
|
313
290
|
placement: "bottom"
|
|
314
291
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
315
|
-
className: (0, _classnames["default"])(preCls, _defineProperty({}, "".concat(preCls, "__chat"), isHasGroup), _defineProperty({},
|
|
292
|
+
className: (0, _classnames["default"])(preCls, _defineProperty({}, "".concat(preCls, "__chat"), isHasGroup), _defineProperty({}, "".concat(preCls, "__img"), isShowDingChat)),
|
|
316
293
|
onMouseDown: handleClickWechatBtn
|
|
317
294
|
})), /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"], {
|
|
318
295
|
zIndex: 1200,
|