App.vue 996 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <script>
  2. export default {
  3. globalData:{
  4. commonHttp:'http://192.168.1.151:8080/',
  5. commonImage:'http://192.168.1.151:8080'
  6. },
  7. onLaunch: function() {
  8. let _this = this
  9. // uni.login({
  10. // provider: 'weixin', //使用微信登录
  11. // success: function (loginRes) {
  12. // _this.$http.post('appraisal/WeiXin/getOpenId',{code:loginRes.code}).then(res=>{
  13. // uni.setStorageSync('token',res.data.token);
  14. // uni.setStorageSync('openId',res.data.user.openId);
  15. // uni.setStorageSync('phonenumber',res.data.user.phonenumber);
  16. // uni.setStorageSync('userName',res.data.user.userName);
  17. // uni.setStorageSync('userId',res.data.user.userId);
  18. // }).catch(err=>{
  19. // })
  20. // }
  21. // });
  22. console.log('App Launch')
  23. },
  24. onShow: function() {
  25. console.log('App Show')
  26. },
  27. onHide: function() {
  28. console.log('App Hide')
  29. }
  30. }
  31. </script>
  32. <style lang="scss">
  33. /*每个页面公共css */
  34. @import "@/uni_modules/uview-ui/index.scss";
  35. </style>