@lambo-design/shared 1.0.0-beta.381 → 1.0.0-beta.382

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/utils/platform.js +17 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambo-design/shared",
3
- "version": "1.0.0-beta.381",
3
+ "version": "1.0.0-beta.382",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
package/utils/platform.js CHANGED
@@ -1310,6 +1310,23 @@ export const buildMenuUri = (item,ssoToken,ssoid) => {
1310
1310
  }
1311
1311
  return href
1312
1312
  }
1313
+ export const getOttCode = async () => {
1314
+ let ott = null;
1315
+ let resp = await ajax.post(config.upmsServerContext + "/manage/auth/code");
1316
+ if (resp.data && resp.data.code && resp.data.code == 1) {
1317
+ ott = resp.data.data;
1318
+ }
1319
+ return ott;
1320
+ }
1321
+ export const addOttCode = async (item) => {
1322
+ if (item && item.uri && item.is_yqqh == 1) {
1323
+ let ott = getOttCode();
1324
+ if (ott) {
1325
+ item.ott = ott;
1326
+ }
1327
+ }
1328
+ return item;
1329
+ }
1313
1330
  /**
1314
1331
  * 给query添加时间戳
1315
1332
  */