narro 5 år sedan
förälder
incheckning
486ece321a
12 ändrade filer med 54 tillägg och 40 borttagningar
  1. 3
    0
      CHANGELOG.md
  2. 1
    1
      README.md
  3. 15
    18
      lib/App.js
  4. 1
    1
      lib/App.js.map
  5. 1
    1
      lib/components/Editor/index.js.map
  6. 3
    0
      lib/constant.js
  7. 1
    1
      lib/constant.js.map
  8. 1
    1
      lib/index.js
  9. 1
    1
      lib/index.js.map
  10. 1
    1
      package.json
  11. 20
    15
      src/App.js
  12. 6
    0
      src/constant.js

+ 3
- 0
CHANGELOG.md Visa fil

@@ -1,5 +1,8 @@
1 1
 # CHANGELOG
2 2
 
3
+## 1.0.3
4
+- [x] 修复语言文件覆盖的问题(将语言文件放到了linksFrontend库)
5
+
3 6
 ## 1.0.2
4 7
 - [x] App增加onCountChange回调
5 8
 

+ 1
- 1
README.md Visa fil

@@ -2,7 +2,7 @@
2 2
 
3 3
 通用评论系统及编辑器
4 4
 
5
-**`version 1.0.2`**
5
+**`version 1.0.3`**
6 6
 
7 7
 ```js
8 8
 import Comment, { Editor, RenderText } from 'comment';

+ 15
- 18
lib/App.js Visa fil

@@ -55,14 +55,6 @@ var _RenderText2 = _interopRequireDefault(_RenderText);
55 55
 
56 56
 var _lang = require("./lang");
57 57
 
58
-var _enUS = require("./lang/en-US.js");
59
-
60
-var _enUS2 = _interopRequireDefault(_enUS);
61
-
62
-var _zhCN = require("./lang/zh-CN.js");
63
-
64
-var _zhCN2 = _interopRequireDefault(_zhCN);
65
-
66 58
 require("./App.css");
67 59
 
68 60
 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -75,11 +67,6 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
75 67
 
76 68
 function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
77 69
 
78
-var LOCALES = {
79
-  "zh-CN": _zhCN2.default,
80
-  "en-US": _enUS2.default
81
-};
82
-
83 70
 var App = function (_Component) {
84 71
   _inherits(App, _Component);
85 72
 
@@ -153,11 +140,21 @@ var App = function (_Component) {
153 140
       currentLocale = _lang.SUPPORT_LOCALES.find(function (item) {
154 141
         return item.value === currentLocale;
155 142
       }) ? currentLocale : "zh-CN";
156
-      _reactIntlUniversal2.default.init({
157
-        currentLocale: currentLocale,
158
-        locales: _defineProperty({}, currentLocale, LOCALES[currentLocale])
159
-      }).then(function () {
160
-        _this2.setState({ initDone: true, locale: currentLocale });
143
+      // 使用绝对路径
144
+      var languageURL = _constant.LANGUAGE_LINK + "/" + currentLocale + ".json";
145
+      return fetch(languageURL).then(function (response) {
146
+        if (response.status >= 400) {
147
+          throw new Error('Bad response from server');
148
+        }
149
+        return response.json();
150
+      }).then(function (data) {
151
+        // console.log('data: ', data);
152
+        _reactIntlUniversal2.default.init({
153
+          currentLocale: currentLocale,
154
+          locales: _defineProperty({}, currentLocale, data)
155
+        }).then(function () {
156
+          _this2.setState({ initDone: true, locale: currentLocale });
157
+        });
161 158
       });
162 159
     }
163 160
   }, {

+ 1
- 1
lib/App.js.map
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 1
- 1
lib/components/Editor/index.js.map
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 3
- 0
lib/constant.js Visa fil

@@ -31,4 +31,7 @@ var COMMENT_TYPE = exports.COMMENT_TYPE = {
31 31
   COMMENT: "comment",
32 32
   REPLY: "reply"
33 33
 };
34
+
35
+// 线上静态库地址
36
+var LANGUAGE_LINK = exports.LANGUAGE_LINK = process.env.NODE_ENV === 'production' ? "//a.links123.cn/lang" : "//a.links123.net/lang";
34 37
 //# sourceMappingURL=constant.js.map

+ 1
- 1
lib/constant.js.map Visa fil

@@ -1 +1 @@
1
-{"version":3,"sources":["../src/constant.js"],"names":["ERROR_DEFAULT","LIMIT","OSS_ENDPOINT","OSS_BUCKET","DRIVER_LICENSE_PATH","OSS_LINK","MAX_UPLOAD_NUMBER","URL_REGEXP","REGEXP","AVATAR","IMAGE_SPLIT","IMAGE_PROCESS","IMAGE_PROCESS_SMALL","IMAGE_PROCESS_LARGE","COMMENT_TYPE","COMMENT","REPLY"],"mappings":";;;;;AAAO,IAAMA,wCAAgB,MAAtB;;AAEA,IAAMC,wBAAQ,EAAd,C,CAAkB;;AAElB,IAAMC,sCAAe,6BAArB;AACA,IAAMC,kCAAa,eAAnB;AACA,IAAMC,oDAAsB,UAA5B;;AAEA,IAAMC,8BAAW,6CAAjB;;AAEA,IAAMC,gDAAoB,CAA1B;;AAEA,IAAMC,kCAAa,oGAAnB;;AAEA,IAAMC,0BAAS,eAAf;;AAEA,IAAMC,0BAAS,EAAf;;AAEA,IAAMC,oCAAc,aAApB;;AAEA,IAAMC,wCAAgB,mCAAtB;AACA,IAAMC,oDAAsB,mCAA5B;AACA,IAAMC,oDAAsB,mCAA5B;;AAEA,IAAMC,sCAAe;AAC1BC,WAAS,SADiB;AAE1BC,SAAO;AAFmB,CAArB","file":"constant.js","sourcesContent":["export const ERROR_DEFAULT = \"出错了!\";\r\n\r\nexport const LIMIT = 10; // 默认 limit\r\n\r\nexport const OSS_ENDPOINT = \"oss-cn-beijing.aliyuncs.com\";\r\nexport const OSS_BUCKET = \"links-comment\";\r\nexport const DRIVER_LICENSE_PATH = \"/comment\";\r\n\r\nexport const OSS_LINK = \"//links-comment.oss-cn-beijing.aliyuncs.com\";\r\n\r\nexport const MAX_UPLOAD_NUMBER = 4;\r\n\r\nexport const URL_REGEXP = /((http(s)?:)?\\/\\/)?(www\\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/g;\r\n\r\nexport const REGEXP = /\\[[^[\\]]+?\\]/g;\r\n\r\nexport const AVATAR = \"\";\r\n\r\nexport const IMAGE_SPLIT = \"IMAGE_SPLIT\";\r\n\r\nexport const IMAGE_PROCESS = \"?x-oss-process=image/resize,h_350\";\r\nexport const IMAGE_PROCESS_SMALL = \"?x-oss-process=image/resize,h_100\";\r\nexport const IMAGE_PROCESS_LARGE = \"?x-oss-process=image/resize,h_500\";\r\n\r\nexport const COMMENT_TYPE = {\r\n  COMMENT: \"comment\",\r\n  REPLY: \"reply\"\r\n};\r\n"]}
1
+{"version":3,"sources":["../src/constant.js"],"names":["ERROR_DEFAULT","LIMIT","OSS_ENDPOINT","OSS_BUCKET","DRIVER_LICENSE_PATH","OSS_LINK","MAX_UPLOAD_NUMBER","URL_REGEXP","REGEXP","AVATAR","IMAGE_SPLIT","IMAGE_PROCESS","IMAGE_PROCESS_SMALL","IMAGE_PROCESS_LARGE","COMMENT_TYPE","COMMENT","REPLY","LANGUAGE_LINK","process","env","NODE_ENV"],"mappings":";;;;;AAAO,IAAMA,wCAAgB,MAAtB;;AAEA,IAAMC,wBAAQ,EAAd,C,CAAkB;;AAElB,IAAMC,sCAAe,6BAArB;AACA,IAAMC,kCAAa,eAAnB;AACA,IAAMC,oDAAsB,UAA5B;;AAEA,IAAMC,8BAAW,6CAAjB;;AAEA,IAAMC,gDAAoB,CAA1B;;AAEA,IAAMC,kCAAa,oGAAnB;;AAEA,IAAMC,0BAAS,eAAf;;AAEA,IAAMC,0BAAS,EAAf;;AAEA,IAAMC,oCAAc,aAApB;;AAEA,IAAMC,wCAAgB,mCAAtB;AACA,IAAMC,oDAAsB,mCAA5B;AACA,IAAMC,oDAAsB,mCAA5B;;AAEA,IAAMC,sCAAe;AAC1BC,WAAS,SADiB;AAE1BC,SAAO;AAFmB,CAArB;;AAKP;AACO,IAAMC,wCAAgBC,QAAQC,GAAR,CAAYC,QAAZ,KAAyB,YAAzB,GAC3B,sBAD2B,GACF,uBADpB","file":"constant.js","sourcesContent":["export const ERROR_DEFAULT = \"出错了!\";\r\n\r\nexport const LIMIT = 10; // 默认 limit\r\n\r\nexport const OSS_ENDPOINT = \"oss-cn-beijing.aliyuncs.com\";\r\nexport const OSS_BUCKET = \"links-comment\";\r\nexport const DRIVER_LICENSE_PATH = \"/comment\";\r\n\r\nexport const OSS_LINK = \"//links-comment.oss-cn-beijing.aliyuncs.com\";\r\n\r\nexport const MAX_UPLOAD_NUMBER = 4;\r\n\r\nexport const URL_REGEXP = /((http(s)?:)?\\/\\/)?(www\\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/g;\r\n\r\nexport const REGEXP = /\\[[^[\\]]+?\\]/g;\r\n\r\nexport const AVATAR = \"\";\r\n\r\nexport const IMAGE_SPLIT = \"IMAGE_SPLIT\";\r\n\r\nexport const IMAGE_PROCESS = \"?x-oss-process=image/resize,h_350\";\r\nexport const IMAGE_PROCESS_SMALL = \"?x-oss-process=image/resize,h_100\";\r\nexport const IMAGE_PROCESS_LARGE = \"?x-oss-process=image/resize,h_500\";\r\n\r\nexport const COMMENT_TYPE = {\r\n  COMMENT: \"comment\",\r\n  REPLY: \"reply\"\r\n};\r\n\r\n// 线上静态库地址\r\nexport const LANGUAGE_LINK = process.env.NODE_ENV === 'production' ?\r\n  \"//a.links123.cn/lang\" : \"//a.links123.net/lang\";\r\n"]}

+ 1
- 1
lib/index.js Visa fil

@@ -58,7 +58,7 @@ function renderComment(config) {
58 58
 
59 59
 window.renderComment = renderComment;
60 60
 
61
-if (process.env.NODE_ENV !== 'production') {
61
+if (process.env.NODE_ENV !== "production") {
62 62
   renderComment({
63 63
     id: "root-comment",
64 64
     type: 1,

+ 1
- 1
lib/index.js.map Visa fil

@@ -1 +1 @@
1
-{"version":3,"sources":["../src/index.js"],"names":["Index","props","editorProps","renderComment","config","id","Error","type","businessId","console","warn","API","ReactDOM","render","document","getElementById","window","process","env","NODE_ENV","businessUserId","userId","onCountChange","log","c"],"mappings":";;;;AAAA;;;;AACA;;;;AACA;;;;;;AACA;;AAEA,IAAMA,QAAQ,SAARA,KAAQ;AAAA,SACZ;AAAC,iBAAD;AAAA,eAAK,sBAAL,EAAsB,oBAAtB,EAAqC,oBAArC,EAAoD,eAApD,IAAkEC,KAAlE;AACE,kCAAC,WAAD,aAAQ,WAAW,CAAnB,EAAsB,eAAtB,IAAoCA,MAAMC,WAA1C;AADF,GADY;AAAA,CAAd;;AAMA;;;;;;;;AAQA,SAASC,aAAT,CAAuBC,MAAvB,EAA+B;AAC7B,MAAI,CAACA,OAAOC,EAAZ,EAAgB;AACd,UAAM,IAAIC,KAAJ,CAAU,gBAAV,CAAN;AACD;AACD,MAAI,CAACF,OAAOG,IAAZ,EAAkB;AAChB,UAAM,IAAID,KAAJ,CAAU,kBAAV,CAAN;AACD;AACD,MAAI,CAACF,OAAOI,UAAZ,EAAwB;AACtB;AACAJ,WAAOI,UAAP,GAAoB,MAApB;AACAC,YAAQC,IAAR,CAAa,+BAAb;AACD;AACD,MAAI,CAACN,OAAOO,GAAZ,EAAiB;AACf;AACAP,WAAOO,GAAP,GAAa,oCAAb;AACAF,YAAQC,IAAR,CACE,sDADF;AAGD;;AAEDE,qBAASC,MAAT,CAAgB,8BAAC,KAAD,EAAWT,MAAX,CAAhB,EAAuCU,SAASC,cAAT,CAAwBX,OAAOC,EAA/B,CAAvC;AACA;AACD;;AAEDW,OAAOb,aAAP,GAAuBA,aAAvB;;AAEA,IAAIc,QAAQC,GAAR,CAAYC,QAAZ,KAAyB,YAA7B,EAA2C;AACzChB,gBAAc;AACZE,QAAI,cADQ;AAEZE,UAAM,CAFM;AAGZC,gBAAY,MAHA;AAIZY,oBAAgB,CAJJ;AAKZC,YAAQ,KALI;AAMZC,mBAAe,0BAAK;AAClBb,cAAQc,GAAR,CAAYC,CAAZ;AACD;AARW,GAAd;AAUD;;AAED;AACA;AACA;AACA;AACA;AACA","file":"index.js","sourcesContent":["import React from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\nimport App, { Editor } from \"./App\";\r\n// import registerServiceWorker from \"./registerServiceWorker\";\r\n\r\nconst Index = props => (\r\n  <App showAlertComment showAlertReply showAlertFavor showError {...props}>\r\n    <Editor maxUpload={9} autoFocus {...props.editorProps} />\r\n  </App>\r\n);\r\n\r\n/**\r\n * 渲染评论组件\r\n * @param {object} config 编辑器配置\r\n *  - {string} id 渲染评论的DOM的 ID\r\n *  - {number} type 评论的 type\r\n *  - {string} businessId 评论的 businessId\r\n *  - {string} API, API 前缀, 默认 http://api.links123.net/comment/v1\r\n */\r\nfunction renderComment(config) {\r\n  if (!config.id) {\r\n    throw new Error(\"id is required\");\r\n  }\r\n  if (!config.type) {\r\n    throw new Error(\"type is required\");\r\n  }\r\n  if (!config.businessId) {\r\n    // throw new Error(\"businessId is required\");\r\n    config.businessId = \"test\";\r\n    console.warn(\"没有传入 businessId 参数,默认使用: test\");\r\n  }\r\n  if (!config.API) {\r\n    // throw new Error(\"API is required\");\r\n    config.API = \"http://api.links123.net/comment/v1\";\r\n    console.warn(\r\n      \"没有传入 API 参数,默认使用: http://api.links123.net/comment/v1\"\r\n    );\r\n  }\r\n\r\n  ReactDOM.render(<Index {...config} />, document.getElementById(config.id));\r\n  // registerServiceWorker();\r\n}\r\n\r\nwindow.renderComment = renderComment;\r\n\r\nif (process.env.NODE_ENV !== 'production') {\r\n  renderComment({\r\n    id: \"root-comment\",\r\n    type: 1,\r\n    businessId: \"test\",\r\n    businessUserId: 4,\r\n    userId: 71299,\r\n    onCountChange: c => {\r\n      console.log(c);\r\n    }\r\n  });\r\n}\r\n\r\n// renderComment({\r\n//   id: \"root-comment\",\r\n//   type: 1,\r\n//   businessId: \"test\",\r\n//   API: 'http://api.links123.net/comment/v1',\r\n// });\r\n"]}
1
+{"version":3,"sources":["../src/index.js"],"names":["Index","props","editorProps","renderComment","config","id","Error","type","businessId","console","warn","API","ReactDOM","render","document","getElementById","window","process","env","NODE_ENV","businessUserId","userId","onCountChange","log","c"],"mappings":";;;;AAAA;;;;AACA;;;;AACA;;;;;;AACA;;AAEA,IAAMA,QAAQ,SAARA,KAAQ;AAAA,SACZ;AAAC,iBAAD;AAAA,eAAK,sBAAL,EAAsB,oBAAtB,EAAqC,oBAArC,EAAoD,eAApD,IAAkEC,KAAlE;AACE,kCAAC,WAAD,aAAQ,WAAW,CAAnB,EAAsB,eAAtB,IAAoCA,MAAMC,WAA1C;AADF,GADY;AAAA,CAAd;;AAMA;;;;;;;;AAQA,SAASC,aAAT,CAAuBC,MAAvB,EAA+B;AAC7B,MAAI,CAACA,OAAOC,EAAZ,EAAgB;AACd,UAAM,IAAIC,KAAJ,CAAU,gBAAV,CAAN;AACD;AACD,MAAI,CAACF,OAAOG,IAAZ,EAAkB;AAChB,UAAM,IAAID,KAAJ,CAAU,kBAAV,CAAN;AACD;AACD,MAAI,CAACF,OAAOI,UAAZ,EAAwB;AACtB;AACAJ,WAAOI,UAAP,GAAoB,MAApB;AACAC,YAAQC,IAAR,CAAa,+BAAb;AACD;AACD,MAAI,CAACN,OAAOO,GAAZ,EAAiB;AACf;AACAP,WAAOO,GAAP,GAAa,oCAAb;AACAF,YAAQC,IAAR,CACE,sDADF;AAGD;;AAEDE,qBAASC,MAAT,CAAgB,8BAAC,KAAD,EAAWT,MAAX,CAAhB,EAAuCU,SAASC,cAAT,CAAwBX,OAAOC,EAA/B,CAAvC;AACA;AACD;;AAEDW,OAAOb,aAAP,GAAuBA,aAAvB;;AAEA,IAAIc,QAAQC,GAAR,CAAYC,QAAZ,KAAyB,YAA7B,EAA2C;AACzChB,gBAAc;AACZE,QAAI,cADQ;AAEZE,UAAM,CAFM;AAGZC,gBAAY,MAHA;AAIZY,oBAAgB,CAJJ;AAKZC,YAAQ,KALI;AAMZC,mBAAe,0BAAK;AAClBb,cAAQc,GAAR,CAAYC,CAAZ;AACD;AARW,GAAd;AAUD;;AAED;AACA;AACA;AACA;AACA;AACA","file":"index.js","sourcesContent":["import React from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\nimport App, { Editor } from \"./App\";\r\n// import registerServiceWorker from \"./registerServiceWorker\";\r\n\r\nconst Index = props => (\r\n  <App showAlertComment showAlertReply showAlertFavor showError {...props}>\r\n    <Editor maxUpload={9} autoFocus {...props.editorProps} />\r\n  </App>\r\n);\r\n\r\n/**\r\n * 渲染评论组件\r\n * @param {object} config 编辑器配置\r\n *  - {string} id 渲染评论的DOM的 ID\r\n *  - {number} type 评论的 type\r\n *  - {string} businessId 评论的 businessId\r\n *  - {string} API, API 前缀, 默认 http://api.links123.net/comment/v1\r\n */\r\nfunction renderComment(config) {\r\n  if (!config.id) {\r\n    throw new Error(\"id is required\");\r\n  }\r\n  if (!config.type) {\r\n    throw new Error(\"type is required\");\r\n  }\r\n  if (!config.businessId) {\r\n    // throw new Error(\"businessId is required\");\r\n    config.businessId = \"test\";\r\n    console.warn(\"没有传入 businessId 参数,默认使用: test\");\r\n  }\r\n  if (!config.API) {\r\n    // throw new Error(\"API is required\");\r\n    config.API = \"http://api.links123.net/comment/v1\";\r\n    console.warn(\r\n      \"没有传入 API 参数,默认使用: http://api.links123.net/comment/v1\"\r\n    );\r\n  }\r\n\r\n  ReactDOM.render(<Index {...config} />, document.getElementById(config.id));\r\n  // registerServiceWorker();\r\n}\r\n\r\nwindow.renderComment = renderComment;\r\n\r\nif (process.env.NODE_ENV !== \"production\") {\r\n  renderComment({\r\n    id: \"root-comment\",\r\n    type: 1,\r\n    businessId: \"test\",\r\n    businessUserId: 4,\r\n    userId: 71299,\r\n    onCountChange: c => {\r\n      console.log(c);\r\n    }\r\n  });\r\n}\r\n\r\n// renderComment({\r\n//   id: \"root-comment\",\r\n//   type: 1,\r\n//   businessId: \"test\",\r\n//   API: 'http://api.links123.net/comment/v1',\r\n// });\r\n"]}

+ 1
- 1
package.json Visa fil

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "name": "comment",
3
-  "version": "1.0.2",
3
+  "version": "1.0.3",
4 4
   "main": "lib/App.js",
5 5
   "description": "通用评论",
6 6
   "keywords": [

+ 20
- 15
src/App.js Visa fil

@@ -3,7 +3,7 @@ import PropTypes from "prop-types";
3 3
 import { message } from "antd";
4 4
 import axios from "axios";
5 5
 import intl from "react-intl-universal";
6
-import { ERROR_DEFAULT, LIMIT, COMMENT_TYPE } from "./constant";
6
+import { ERROR_DEFAULT, LIMIT, COMMENT_TYPE, LANGUAGE_LINK } from "./constant";
7 7
 import { CommentContext } from "./Comment";
8 8
 import { isFunction } from "./helper";
9 9
 import CommentInput from "./components/CommentInput";
@@ -11,15 +11,8 @@ import CommentList from "./components/CommentList";
11 11
 import Editor from "./components/Editor";
12 12
 import RenderText from "./components/RenderText";
13 13
 import { SUPPORT_LOCALES, LOCALES_RESPONSE } from "./lang";
14
-import USdata from "./lang/en-US.js";
15
-import CNdata from "./lang/zh-CN.js";
16 14
 import "./App.css";
17 15
 
18
-const LOCALES = {
19
-  "zh-CN": CNdata,
20
-  "en-US": USdata
21
-};
22
-
23 16
 class App extends Component {
24 17
   constructor(props) {
25 18
     super(props);
@@ -80,15 +73,27 @@ class App extends Component {
80 73
     currentLocale = SUPPORT_LOCALES.find(item => item.value === currentLocale)
81 74
       ? currentLocale
82 75
       : "zh-CN";
83
-    intl
84
-      .init({
85
-        currentLocale,
86
-        locales: {
87
-          [currentLocale]: LOCALES[currentLocale]
76
+    // 使用绝对路径
77
+    const languageURL = `${LANGUAGE_LINK}/${currentLocale}.json`;
78
+    return fetch(languageURL)
79
+      .then(response => {
80
+        if (response.status >= 400) {
81
+          throw new Error("Bad response from server");
88 82
         }
83
+        return response.json();
89 84
       })
90
-      .then(() => {
91
-        this.setState({ initDone: true, locale: currentLocale });
85
+      .then(data => {
86
+        // console.log('data: ', data);
87
+        intl
88
+          .init({
89
+            currentLocale,
90
+            locales: {
91
+              [currentLocale]: data
92
+            }
93
+          })
94
+          .then(() => {
95
+            this.setState({ initDone: true, locale: currentLocale });
96
+          });
92 97
       });
93 98
   }
94 99
 

+ 6
- 0
src/constant.js Visa fil

@@ -26,3 +26,9 @@ export const COMMENT_TYPE = {
26 26
   COMMENT: "comment",
27 27
   REPLY: "reply"
28 28
 };
29
+
30
+// 线上静态库地址
31
+export const LANGUAGE_LINK =
32
+  process.env.NODE_ENV === "production"
33
+    ? "//a.links123.cn/lang"
34
+    : "//a.links123.net/lang";