app.js 453 B

123456789101112131415161718
  1. import updateManager from './common/updateManager';
  2. import { init } from '@cloudbase/wx-cloud-client-sdk';
  3. wx.cloud.init({
  4. env: 'cloudbase-1gtdgr1nba7424b9', // 指定云开发环境 ID
  5. });
  6. const client = init(wx.cloud);
  7. const models = client.models;
  8. globalThis.dataModel = models;
  9. // 接下来就可以调用 models 上的数据模型增删改查等方法了
  10. App({
  11. onLaunch: function () {},
  12. onShow: function () {
  13. updateManager();
  14. },
  15. });