问星数据小程序

App.vue 1.1KB

123456789101112131415161718192021222324252627
  1. <script>
  2. export default {
  3. onLaunch: function() {
  4. uni.setStorageSync('key', this.$parseQueryString('key')?this.$parseQueryString('key'):(uni.getStorageSync('key')?uni.getStorageSync('key'):''));
  5. console.log(navigator.userAgent.toLowerCase());
  6. // if(!(navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))&&!navigator.userAgent.toLowerCase().match(/micromessenger/i)) {
  7. // window.location.href = "https://www.wenxingshuju.com";
  8. // }
  9. this.$burialPoint({project_name:'小程序版h5',button_name:'进入页面',key_value:uni.getStorageSync('key')?uni.getStorageSync('key'):'',page_name:'进入页面',url_value:window.location.href})
  10. _hmt?_hmt.push(['_trackEvent','小程序版h5', '进入页面', uni.getStorageSync('key'),'']):'';
  11. console.log('App Launch')
  12. },
  13. onShow: function() {
  14. console.log('App Show')
  15. },
  16. onHide: function() {
  17. console.log('App Hide')
  18. },
  19. methods:{
  20. }
  21. }
  22. </script>
  23. <style>
  24. /*每个页面公共css */
  25. </style>