@titaui/pc 1.11.7 → 1.11.8

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.
@@ -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,
@@ -127,7 +127,7 @@ var WeChatBtn = function WeChatBtn(props) {
127
127
  if (isWx) {
128
128
  //有群了,判断没在群就先进群再打开群
129
129
  if (chatId !== null && chatId !== 'chatId') {
130
- window.WeixinJSBridge.invoke('openExistedChatWithMsg', {
130
+ wx.invoke('openExistedChatWithMsg', {
131
131
  chatId: chatId
132
132
  }, function (res) {
133
133
  if (res.err_msg === 'openExistedChatWithMsg:ok') {
@@ -136,14 +136,14 @@ var WeChatBtn = function WeChatBtn(props) {
136
136
  if (isMac) {
137
137
  setMacWarnModalVisible(true);
138
138
  } else {
139
- window.WeixinJSBridge.invoke('updateEnterpriseChat', {
139
+ wx.invoke('updateEnterpriseChat', {
140
140
  chatId: chatId,
141
141
  userIdsToAdd: loginUserOpenId
142
142
  }, function (res) {
143
143
  console.log(chatId);
144
144
 
145
145
  if (res.err_msg == 'updateEnterpriseChat:ok') {
146
- window.WeixinJSBridge.invoke('openExistedChatWithMsg', {
146
+ wx.invoke('openExistedChatWithMsg', {
147
147
  chatId: chatId
148
148
  }, function (res) {
149
149
  if (res.err_msg == 'openExistedChatWithMsg:ok') {
@@ -173,7 +173,7 @@ var WeChatBtn = function WeChatBtn(props) {
173
173
 
174
174
 
175
175
  var handleCreateGroupChat = function handleCreateGroupChat() {
176
- window.WeixinJSBridge.invoke('createChatWithMsg', {
176
+ wx.invoke('createChatWithMsg', {
177
177
  selectedOpenUserIds: weChatGroupMember,
178
178
  chatName: "\u300C".concat(apply, "\u7FA4\u300D").concat(name),
179
179
  msg: {
@@ -193,7 +193,7 @@ var WeChatBtn = function WeChatBtn(props) {
193
193
  objType: objType,
194
194
  chatId: res.chatId
195
195
  });
196
- window.WeixinJSBridge.invoke('openExistedChatWithMsg', {
196
+ wx.invoke('openExistedChatWithMsg', {
197
197
  chatId: res.chatId
198
198
  });
199
199
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.11.7",
3
+ "version": "1.11.8",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",