@titaui/pc 1.16.93-beta.5 → 1.16.93-beta.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,6 +22,11 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
22
22
  var preCls = 'titaui-unchain-okr-modal';
23
23
  var isOkr = (0, _bsGlobal.getBSGlobal)('tenantInfo').tenantType == 0;
24
24
  var isTry = (0, _bsGlobal.getVersion)() == 1;
25
+ var domain = (0, _bsGlobal.getBSGlobal)('domain');
26
+ var ESource;
27
+ (function (ESource) {
28
+ ESource["OkrInvestigate"] = "okrInvestigate";
29
+ })(ESource || (ESource = {}));
25
30
  var UnchainOkrModal = function UnchainOkrModal(props, ref) {
26
31
  var _useState = (0, _react.useState)(false),
27
32
  _useState2 = _slicedToArray(_useState, 2),
@@ -31,6 +36,10 @@ var UnchainOkrModal = function UnchainOkrModal(props, ref) {
31
36
  _useState4 = _slicedToArray(_useState3, 2),
32
37
  okrResearchUrl = _useState4[0],
33
38
  setOkrResearchUrl = _useState4[1];
39
+ var _useState5 = (0, _react.useState)(window.location.host),
40
+ _useState6 = _slicedToArray(_useState5, 2),
41
+ urlHost = _useState6[0],
42
+ setUrlHost = _useState6[1];
34
43
  (0, _react.useImperativeHandle)(ref, function () {
35
44
  return {
36
45
  open: function open() {
@@ -52,7 +61,7 @@ var UnchainOkrModal = function UnchainOkrModal(props, ref) {
52
61
  userIsFirstAccess: userIsFirstAccess,
53
62
  isTry: isTry
54
63
  });
55
- var researchUrl = "https:".concat((0, _bsGlobal.getBSGlobal)('domain'), "/surveyRoute?surveyId=").concat(surveyId);
64
+ var researchUrl = "https:".concat(urlHost, "/survey/answer/pc/#/research/answer?hideNavTop=true&surveyId=").concat(surveyId, "&isExternal=0&source=").concat(ESource.OkrInvestigate);
56
65
  setOkrResearchUrl(researchUrl);
57
66
  if (userIsFirstAccess && isTry) {
58
67
  setTimeout(function () {
@@ -67,8 +76,8 @@ var UnchainOkrModal = function UnchainOkrModal(props, ref) {
67
76
  setVisible(false);
68
77
  };
69
78
  var hanldeOnUnchain = function hanldeOnUnchain() {
70
- setVisible(false);
71
79
  window.open(okrResearchUrl);
80
+ setVisible(false);
72
81
  };
73
82
  var modalRender = function modalRender() {
74
83
  return /*#__PURE__*/_react["default"].createElement("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.16.93-beta.5",
3
+ "version": "1.16.93-beta.7",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",