app.ux 864 B

123456789101112131415161718192021222324252627282930313233343536
  1. <!--
  2. * @Author: ZhengXiaowei
  3. * @Date: 2019-10-15 12:02:18
  4. * @LastEditors: ZhengXiaowei
  5. * @LastEditTime: 2019-10-15 14:02:07
  6. * @Description: 主入口
  7. -->
  8. <script>
  9. /**
  10. * 应用级别的配置,供所有页面公用
  11. */
  12. import "./helper/regenerator.js";
  13. import it from "./helper/interface.js";
  14. export default {
  15. async onCreate() {
  16. // 一进入程序就判断是否添加过主屏幕
  17. it.shortcut.systemPromptEnabled = false;
  18. await it.shortcut.hasInstalled({
  19. success: (ret) => {
  20. console.log("is installed:", ret);
  21. if (!ret) this.$def.data.backClickCount = 0;
  22. else this.$def.data.backClickCount = 1;
  23. }
  24. })
  25. },
  26. showMenu: it.showMenu,
  27. getDeviceInfo: it.getDeviceInfo,
  28. createShortcut: it.hasCreateShortCut,
  29. data: {
  30. backClickCount: 0,
  31. cutomerQrcode: "",
  32. weChat: "wxlxf1099"
  33. }
  34. };
  35. </script>