App.vue 967 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <style lang="scss">
  2. /* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
  3. @import "@/uni_modules/uview-ui/index.scss";
  4. </style>
  5. <script>
  6. import * as API from '@/apis/weixin.js'
  7. import './config/.env.js'
  8. export default {
  9. onLaunch: function() {
  10. console.log('App Launch')
  11. var getOpenId =this.carhelp.getOpenId()
  12. if(getOpenId){
  13. API.saveLoginRecord({
  14. openId:getOpenId
  15. }).then((res) => {
  16. console.log('App Launch 记录用户登陆')
  17. }).catch(error => {
  18. console.log('App Launch 记录用户登陆 失败')
  19. })
  20. }
  21. },
  22. onShow: function() {
  23. console.log('App Show')
  24. },
  25. onHide: function() {
  26. console.log('App Hide')
  27. }
  28. }
  29. </script>
  30. <style>
  31. /*每个页面公共css */
  32. html,body{
  33. margin: 0;
  34. padding: 0;
  35. font-family: 'PingFang Regular';
  36. }
  37. /* 导航栏返回文字 */
  38. /deep/.u-back-text{
  39. font-size: 36rpx !important;
  40. margin-left: 16rpx;
  41. }
  42. </style>