@titaui/pc 1.16.96 → 1.16.97

Sign up to get free protection for your applications and to get access to all the features.
@@ -51,26 +51,29 @@ var UnchainOkrModal = function UnchainOkrModal(props, ref) {
51
51
  };
52
52
  });
53
53
  (0, _react.useEffect)(function () {
54
- (0, _requestApi.OkrNewTenantInitialized)().then(function (res) {
55
- console.log(urlHost, 'urlHost');
56
- if (res.code == 1) {
57
- var _res$data = res.data,
58
- surveyId = _res$data.surveyId,
59
- userIsFirstAccess = _res$data.userIsFirstAccess,
60
- userIsFirstAccessDate = _res$data.userIsFirstAccessDate;
61
- console.table({
62
- userIsFirstAccess: userIsFirstAccess,
63
- isTry: isTry
64
- });
65
- var researchUrl = "https://".concat(urlHost, "/survey/answer/pc/#/research/answer?hideNavTop=true&surveyId=").concat(surveyId, "&isExternal=0&source=").concat(ESource.OkrInvestigate);
66
- setOkrResearchUrl(researchUrl);
67
- if (userIsFirstAccess && isTry && isOkr && (0, _bsGlobal.isWx)()) {
68
- setTimeout(function () {
69
- setVisible(true);
70
- }, 30 * 1000);
54
+ if (isTry && isOkr && (0, _bsGlobal.isWx)()) {
55
+ (0, _requestApi.OkrNewTenantInitialized)().then(function (res) {
56
+ console.log(urlHost, 'urlHost');
57
+ if (res.code == 1) {
58
+ var _res$data = res.data,
59
+ surveyId = _res$data.surveyId,
60
+ userIsFirstAccess = _res$data.userIsFirstAccess,
61
+ userIsFirstAccessDate = _res$data.userIsFirstAccessDate;
62
+ console.table({
63
+ userIsFirstAccess: userIsFirstAccess,
64
+ isTry: isTry
65
+ });
66
+ var researchUrl = "https://".concat(urlHost, "/survey/answer/pc/#/research/answer?hideNavTop=true&surveyId=").concat(surveyId, "&isExternal=0&source=").concat(ESource.OkrInvestigate);
67
+ console.log(researchUrl, 'researchUrl');
68
+ setOkrResearchUrl(researchUrl);
69
+ if (userIsFirstAccess) {
70
+ setTimeout(function () {
71
+ setVisible(true);
72
+ }, 30 * 1000);
73
+ }
71
74
  }
72
- }
73
- });
75
+ });
76
+ }
74
77
  }, []);
75
78
  var onClose = function onClose(e) {
76
79
  e.stopPropagation();
@@ -78,7 +81,7 @@ var UnchainOkrModal = function UnchainOkrModal(props, ref) {
78
81
  };
79
82
  var hanldeOnUnchain = function hanldeOnUnchain() {
80
83
  console.log(okrResearchUrl);
81
- window.open(okrResearchUrl);
84
+ window.open(okrResearchUrl, '_blank');
82
85
  setVisible(false);
83
86
  };
84
87
  var modalRender = function modalRender() {
@@ -99,7 +102,7 @@ var UnchainOkrModal = function UnchainOkrModal(props, ref) {
99
102
  return /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
100
103
  destroyOnClose: true,
101
104
  modalRender: modalRender,
102
- visible: 1,
105
+ visible: visible,
103
106
  width: 294
104
107
  });
105
108
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.16.96",
3
+ "version": "1.16.97",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",