@titaui/pc 1.11.9 → 1.11.10

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.
@@ -45,6 +45,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
45
45
 
46
46
  var preCls = 'titaui-wechat-btn';
47
47
  var userId = (0, _bsGlobal.getUserInfo)().Id;
48
+ var isDingDing = (0, _bsGlobal.getSource)() === 861;
48
49
 
49
50
  var WeChatBtn = function WeChatBtn(props) {
50
51
  var id = props.id,
@@ -217,42 +218,46 @@ var WeChatBtn = function WeChatBtn(props) {
217
218
 
218
219
 
219
220
  (0, _react.useEffect)(function () {
220
- (0, _request.rpost)('v1')('chat/info', {
221
- objId: id,
222
- objType: objType
223
- }).then(function (res) {
224
- if (res.Message === '没有权限') {
225
- setIsShowWeChat(false);
226
- return;
227
- } else {
228
- setIsShowWeChat(true);
229
-
230
- if (res.Data.obj) {
231
- setIsHasGroup(true);
232
- }
233
-
234
- if (isWx) {
235
- console.log(res.Data.obj);
236
- setChatId(res.Data.obj);
237
- (0, _request.rpost)('v1')('chat/users', {
238
- objId: id,
239
- objType: objType
240
- }).then(function (res) {
241
- setWeChatGroupMember(res.Data.openUserIds);
242
- setUrl(res.Data.link);
243
- });
244
- (0, _request.rpost)('v1')('chat/user', {
245
- objId: id,
246
- objType: objType
247
- }).then(function (res) {
248
- setLoginUserOpenId(res.Data.obj);
249
- });
221
+ if (isDingDing) {
222
+ return;
223
+ } else {
224
+ (0, _request.rpost)('v1')('chat/info', {
225
+ objId: id,
226
+ objType: objType
227
+ }).then(function (res) {
228
+ if (res.Message === '没有权限') {
229
+ setIsShowWeChat(false);
230
+ return;
250
231
  } else {
251
232
  setIsShowWeChat(true);
252
- return;
233
+
234
+ if (res.Data.obj) {
235
+ setIsHasGroup(true);
236
+ }
237
+
238
+ if (isWx) {
239
+ console.log(res.Data.obj);
240
+ setChatId(res.Data.obj);
241
+ (0, _request.rpost)('v1')('chat/users', {
242
+ objId: id,
243
+ objType: objType
244
+ }).then(function (res) {
245
+ setWeChatGroupMember(res.Data.openUserIds);
246
+ setUrl(res.Data.link);
247
+ });
248
+ (0, _request.rpost)('v1')('chat/user', {
249
+ objId: id,
250
+ objType: objType
251
+ }).then(function (res) {
252
+ setLoginUserOpenId(res.Data.obj);
253
+ });
254
+ } else {
255
+ setIsShowWeChat(true);
256
+ return;
257
+ }
253
258
  }
254
- }
255
- });
259
+ });
260
+ }
256
261
  }, [chatId]);
257
262
  (0, _react.useEffect)(function () {
258
263
  if (isShowWeChat && chatId === null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.11.9",
3
+ "version": "1.11.10",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",