App.vue 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <script>
  2. import plv from "./pages3/static/polyv-sdk/index";
  3. // #ifdef H5
  4. import vconsole from 'vconsole';
  5. // #endif
  6. export default {
  7. onLaunch: function (option) {
  8. let inviteCode = option.inviteCode;
  9. if (inviteCode && inviteCode != "") {
  10. console.log(inviteCode);
  11. uni.setStorageSync("inviteCode", inviteCode);
  12. }
  13. console.log(plv);
  14. plv.setApp({
  15. apiId: "ezl5uy4zei",
  16. apiSecret: "2bf5bb3c31d34531943df10284edd50b",
  17. });
  18. },
  19. methods: {},
  20. onShow: function (option) {
  21. this.$store.commit('setScene', option.scene || 0)
  22. // #ifdef H5
  23. if (process.env.NODE_ENV === 'development') {
  24. console.log('开发环境')
  25. const consoleObj = new vconsole()
  26. } else {
  27. // console.log('生产环境')
  28. // const consoleObj = new vconsole()
  29. }
  30. // #endif
  31. },
  32. onHide: function () {
  33. uni.$emit("playPause");
  34. },
  35. };
  36. </script>
  37. <style lang="scss">
  38. /*每个页面公共css */
  39. @import "/iconfont/iconfont.css";
  40. @import "uview-ui/index.scss";
  41. button {
  42. background: none;
  43. overflow: auto;
  44. }
  45. </style>