@titaui/pc 1.11.7 → 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.
@@ -72,7 +72,7 @@ function _default(props) {
72
72
  name: "2"
73
73
  }, /*#__PURE__*/_react["default"].createElement("span", {
74
74
  className: (0, _classnames["default"])("".concat(preCls, "__e-task-node-priority-p2 ").concat(preCls, "__e-task-node-select-priority"))
75
- }), (0, _getLocale.getLocale)("OKR_MyO_E_Butt_Highest")), /*#__PURE__*/_react["default"].createElement(_dropSelector["default"].IconItem, {
75
+ }), (0, _getLocale.getLocale)("OKR_MyO_E_Butt_High")), /*#__PURE__*/_react["default"].createElement(_dropSelector["default"].IconItem, {
76
76
  name: "3"
77
77
  }, /*#__PURE__*/_react["default"].createElement("span", {
78
78
  className: (0, _classnames["default"])("".concat(preCls, "__e-task-node-priority-p3 ").concat(preCls, "__e-task-node-select-priority"))
@@ -29,6 +29,8 @@ var _tools = require("../../utils/tools");
29
29
 
30
30
  require("./index.css");
31
31
 
32
+ var _window$BSGlobal, _window$BSGlobal$tena, _window$BSGlobal2, _window$BSGlobal2$ten;
33
+
32
34
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
33
35
 
34
36
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -53,6 +55,7 @@ var preCls = 'tita-survey-model';
53
55
  var Rect = _button["default"].Rect;
54
56
  var loginUserInfo = window.BSGlobal.loginUserInfo;
55
57
  var Role = new _auth.MyRole();
58
+ var Version = ((_window$BSGlobal = window.BSGlobal) === null || _window$BSGlobal === void 0 ? void 0 : (_window$BSGlobal$tena = _window$BSGlobal.tenantAuthentication) === null || _window$BSGlobal$tena === void 0 ? void 0 : _window$BSGlobal$tena.version) || ((_window$BSGlobal2 = window.BSGlobal) === null || _window$BSGlobal2 === void 0 ? void 0 : (_window$BSGlobal2$ten = _window$BSGlobal2.tenantAuthentication) === null || _window$BSGlobal2$ten === void 0 ? void 0 : _window$BSGlobal2$ten.Version) || 1;
56
59
 
57
60
  var SurveyModel = function SurveyModel(_ref) {
58
61
  var activityName = _ref.activityName,
@@ -100,6 +103,7 @@ var SurveyModel = function SurveyModel(_ref) {
100
103
  };
101
104
 
102
105
  (0, _react.useEffect)(function () {
106
+ if (Version === 1) return;
103
107
  if (!!window.location.hostname.match(/.work/)) return;
104
108
  var newDate = (0, _dayjs["default"])();
105
109
  var oldDate = localStorage.getItem("survey_model_date__".concat(loginUserInfo.Id));
@@ -125,7 +129,7 @@ var SurveyModel = function SurveyModel(_ref) {
125
129
  if (!(res !== null && res !== void 0 && (_res$data = res.data) !== null && _res$data !== void 0 && (_res$data$list = _res$data.list) !== null && _res$data$list !== void 0 && _res$data$list.length)) {
126
130
  setTimeout(function () {
127
131
  setDialogVisible(true);
128
- }, 1000 * 60);
132
+ }, 15000);
129
133
  } else {
130
134
  setDialogVisible(false);
131
135
  }
@@ -156,12 +160,9 @@ var SurveyModel = function SurveyModel(_ref) {
156
160
  };
157
161
 
158
162
  var handleSubmit = function handleSubmit(contact) {
159
- var _window$BSGlobal, _window$BSGlobal$tena, _window$BSGlobal2, _window$BSGlobal2$ten;
160
-
161
163
  var tenantInfo = window.BSGlobal.tenantInfo;
162
164
  var npsStartTime = (0, _dayjs["default"])(startTime).unix();
163
165
  var npsEndTime = (0, _dayjs["default"])(endTime).unix();
164
- var Version = ((_window$BSGlobal = window.BSGlobal) === null || _window$BSGlobal === void 0 ? void 0 : (_window$BSGlobal$tena = _window$BSGlobal.tenantAuthentication) === null || _window$BSGlobal$tena === void 0 ? void 0 : _window$BSGlobal$tena.version) || ((_window$BSGlobal2 = window.BSGlobal) === null || _window$BSGlobal2 === void 0 ? void 0 : (_window$BSGlobal2$ten = _window$BSGlobal2.tenantAuthentication) === null || _window$BSGlobal2$ten === void 0 ? void 0 : _window$BSGlobal2$ten.Version) || 1;
165
166
  var result = {
166
167
  fields: {
167
168
  nps_activity_name: activityName,
@@ -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,
@@ -127,7 +128,7 @@ var WeChatBtn = function WeChatBtn(props) {
127
128
  if (isWx) {
128
129
  //有群了,判断没在群就先进群再打开群
129
130
  if (chatId !== null && chatId !== 'chatId') {
130
- window.WeixinJSBridge.invoke('openExistedChatWithMsg', {
131
+ wx.invoke('openExistedChatWithMsg', {
131
132
  chatId: chatId
132
133
  }, function (res) {
133
134
  if (res.err_msg === 'openExistedChatWithMsg:ok') {
@@ -136,14 +137,14 @@ var WeChatBtn = function WeChatBtn(props) {
136
137
  if (isMac) {
137
138
  setMacWarnModalVisible(true);
138
139
  } else {
139
- window.WeixinJSBridge.invoke('updateEnterpriseChat', {
140
+ wx.invoke('updateEnterpriseChat', {
140
141
  chatId: chatId,
141
142
  userIdsToAdd: loginUserOpenId
142
143
  }, function (res) {
143
144
  console.log(chatId);
144
145
 
145
146
  if (res.err_msg == 'updateEnterpriseChat:ok') {
146
- window.WeixinJSBridge.invoke('openExistedChatWithMsg', {
147
+ wx.invoke('openExistedChatWithMsg', {
147
148
  chatId: chatId
148
149
  }, function (res) {
149
150
  if (res.err_msg == 'openExistedChatWithMsg:ok') {
@@ -173,7 +174,7 @@ var WeChatBtn = function WeChatBtn(props) {
173
174
 
174
175
 
175
176
  var handleCreateGroupChat = function handleCreateGroupChat() {
176
- window.WeixinJSBridge.invoke('createChatWithMsg', {
177
+ wx.invoke('createChatWithMsg', {
177
178
  selectedOpenUserIds: weChatGroupMember,
178
179
  chatName: "\u300C".concat(apply, "\u7FA4\u300D").concat(name),
179
180
  msg: {
@@ -193,7 +194,7 @@ var WeChatBtn = function WeChatBtn(props) {
193
194
  objType: objType,
194
195
  chatId: res.chatId
195
196
  });
196
- window.WeixinJSBridge.invoke('openExistedChatWithMsg', {
197
+ wx.invoke('openExistedChatWithMsg', {
197
198
  chatId: res.chatId
198
199
  });
199
200
  }
@@ -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.7",
3
+ "version": "1.11.10",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",