@cloudbase/lowcode-builder 0.1.8 → 0.1.11

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.
@@ -23,9 +23,9 @@ export function createPage(
23
23
  const evtHandlers = createEventHandlers(evtListeners, context);
24
24
 
25
25
  function extractLifecyles() {
26
- const result = { };
27
- Object.keys(lifecycle).map(name=>{
28
- result[name] = function() {
26
+ const result = {};
27
+ Object.keys(lifecycle).map(name => {
28
+ result[name] = function () {
29
29
  return lifecycle[name].apply(this.getWeAppInst(), arguments)
30
30
  }
31
31
  })
@@ -73,7 +73,7 @@ export function createPage(
73
73
  onLoad(options) {
74
74
  const $page = this.getWeAppInst()
75
75
  setConfig({ currentPageId: $page.uuid });
76
- app.activePage = $page;
76
+ app.__internal__.activePage = $page;
77
77
  this._pageActive = true;
78
78
 
79
79
  let query = decodePageQuery(options || {});
@@ -100,14 +100,14 @@ export function createPage(
100
100
  async onShow() {
101
101
  const $page = this.getWeAppInst()
102
102
  setConfig({ currentPageId: $page.uuid });
103
- app.activePage = $page;
103
+ app.__internal__.activePage = $page;
104
104
  this._pageActive = true;
105
105
 
106
106
  const hook = lifecycle.onShow || lifecycle.onPageShow;
107
107
  hook && hook.call($page);
108
108
 
109
109
  // 权限检查
110
- if (await checkAuth(app, app.id, app.activePage.id)) {
110
+ if (await checkAuth(app, app.id, $page)) {
111
111
  this.setData({
112
112
  weDaHasLogin: true,
113
113
  });
@@ -11,6 +11,8 @@ export default {
11
11
  appID: '<%= appID %>',
12
12
  /** 云开发环境ID */
13
13
  envID: '<%= envID %>',
14
+ /** 应用端ID */
15
+ tcbClientId: '<%= clientID %>',
14
16
  /** 云开发资源所属的微信app id */
15
17
  resourceAppid: '<%= resourceAppid %>',
16
18
  /** 数据源描述对象数组 */
@@ -1,4 +1,4 @@
1
- import { WEDA_CLOUD_SDK } from '@cloudbase/weda-client'
1
+ import { _WEDA_CLOUD_SDK as WEDA_CLOUD_SDK } from '@cloudbase/weda-client'
2
2
  const {
3
3
  setConfig,
4
4
  initTcb,
@@ -8,7 +8,8 @@ const {
8
8
  generateParamsParser,
9
9
  EXTRA_API,
10
10
  DS_API,
11
- DS_SDK
11
+ DS_SDK,
12
+ getAccessToken,
12
13
  } = WEDA_CLOUD_SDK
13
14
 
14
15
  export {
@@ -19,7 +20,9 @@ export {
19
20
  CLOUD_SDK,
20
21
  DS_API,
21
22
  DS_SDK,
22
- setConfig
23
+ setConfig,
24
+ getAccessToken,
25
+ initTcb,
23
26
  }
24
27
 
25
28
  import config from './config'
@@ -3,7 +3,8 @@
3
3
  "version": "1.0.8",
4
4
  "scripts": {},
5
5
  "dependencies": {
6
- "@cloudbase/weda-client": "stable",
6
+ "@cloudbase/weda-client": "0.2.0",
7
+ "@cloudbase/oauth": "0.1.1-alpha.2",
7
8
  "mobx": "^5.15.4",
8
9
  "lodash.get": "^4.4.2",
9
10
  "lodash.set": "^4.3.2",
@@ -13,4 +14,4 @@
13
14
  })
14
15
  %>
15
16
  }
16
- }
17
+ }
@@ -5,11 +5,11 @@
5
5
  "build-web": "rm -rf ./preivew && webpack --config ./webpack/webpack.web.prod.js"
6
6
  },
7
7
  "dependencies": {
8
- "@cloudbase/js-sdk": "1.5.3-alpha.0",
8
+ "@cloudbase/js-sdk": "2.4.0-beta.0",
9
9
  "@tcwd/weapps-core": "2.2.6",
10
10
  "@tcwd/weapps-sdk": "1.2.9",
11
11
  "@zxing/library": "^0.18.6",
12
- "@cloudbase/weda-client": "stable",
12
+ "@cloudbase/weda-client": "0.2.0",
13
13
  "fastclick": "^1.0.6",
14
14
  "lodash": "^4.17.19",
15
15
  "mobx": "^5.15.4",
@@ -60,4 +60,4 @@
60
60
  "webpack-cli": "^4.2.0",
61
61
  "webpack-dev-server": "^3.11.0"
62
62
  }
63
- }
63
+ }
@@ -7,7 +7,7 @@ import { formatDate } from '../utils/date';
7
7
  import { getter, setter, _isMobile } from '../utils';
8
8
  import actionMap from './material-actions';
9
9
  import { scanCodeApi } from '../utils/scan-code-action';
10
- import { createWebApp, ACTIONS_KEY, ROUTER_KEY } from '@cloudbase/weda-client';
10
+ import { createWebApp, _ACTIONS_KEY as ACTIONS_KEY, _ROUTER_KEY as ROUTER_KEY } from '@cloudbase/weda-client';
11
11
  import { createDataset, EXTRA_API } from '../datasources/index'
12
12
 
13
13
  const mainAppKey = '__weappsMainApp';
@@ -11,6 +11,8 @@ export default {
11
11
  appID: '<%= appID %>',
12
12
  /** 云开发环境ID */
13
13
  envID: '<%= envID %>',
14
+ /** 应用端ID */
15
+ tcbClientId: '<%= clientID %>',
14
16
  /** 数据源描述对象数组 */
15
17
  dataSourceProfiles: dataSourceProfiles,
16
18
  /**
@@ -1,4 +1,4 @@
1
- import { WEDA_CLOUD_SDK } from '@cloudbase/weda-client'
1
+ import { _WEDA_CLOUD_SDK as WEDA_CLOUD_SDK } from '@cloudbase/weda-client'
2
2
  import config from './config';
3
3
 
4
4
  const {
@@ -10,7 +10,8 @@ const {
10
10
  generateParamsParser,
11
11
  EXTRA_API,
12
12
  DS_API,
13
- DS_SDK
13
+ DS_SDK,
14
+ getAccessToken,
14
15
  } = WEDA_CLOUD_SDK
15
16
 
16
17
  export {
@@ -21,7 +22,9 @@ export {
21
22
  CLOUD_SDK,
22
23
  DS_API,
23
24
  DS_SDK,
24
- setConfig
25
+ setConfig,
26
+ initTcb,
27
+ getAccessToken,
25
28
  }
26
29
 
27
30
  setConfig(config);