version.js 476 B

123456789101112131415161718192021
  1. import Config from "../../model/config";
  2. import Api from "../../model/api";
  3. Page({
  4. data: {
  5. info: {},
  6. miniProgram: {},
  7. version: 0,
  8. },
  9. async onLoad(options) {
  10. const res = await Api.getHelpInfo(Config.APP_ID, true)
  11. const accountInfo = wx.getAccountInfoSync();
  12. this.setData({
  13. info: res.data,
  14. miniProgram: accountInfo.miniProgram,
  15. version: Config.VERSION_CODE,
  16. })
  17. },
  18. })