App.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <script>
  2. import {
  3. getGoodsTypeObj,
  4. getUserDetail
  5. } from '@/api/common.js';
  6. // 腾讯地图
  7. // var QQMapWX = require('@/libs/qqmap-wx-jssdk.min.js');
  8. // var qqmapsdk = new QQMapWX({key:'KX5BZ-B64RC-RO62W-AMWAZ-VVTC3-YAFXF'});
  9. export default {
  10. onLaunch: function() {
  11. console.log('App Launch')
  12. },
  13. onShow: function() {
  14. console.log('App Show')
  15. // 获取商品类型字段
  16. // getGoodsTypeObj().then(res => {
  17. // if (res.state == 'Success') {
  18. // uni.setStorageSync('goodsTypeObj',JSON.stringify(res.content))
  19. // }
  20. // })
  21. },
  22. onHide: function() {
  23. console.log('App Hide')
  24. // 解决我的页面多个登录窗堆叠问题
  25. let pages = getCurrentPages()
  26. let currentPage = pages[pages.length - 1]
  27. if(currentPage.route == 'pages/my/index'){
  28. uni.reLaunch({
  29. url:'/pages/index/index'
  30. })
  31. }
  32. },
  33. }
  34. </script>
  35. <style lang="scss">
  36. /*每个页面公共css */
  37. @import "@/uni_modules/uview-ui/index.scss";
  38. .tag1{
  39. display: inline-block;
  40. width: 70rpx;
  41. height: 24rpx;
  42. line-height: 24rpx;
  43. text-align: center;
  44. background: #E4F5FF;
  45. border-radius: 4rpx 4rpx 12rpx 4rpx;
  46. font-size: 16rpx;
  47. color: #222222;
  48. margin-left: 8rpx;
  49. }
  50. .tag2{
  51. display: inline-block;
  52. width: 70rpx;
  53. height: 24rpx;
  54. line-height: 24rpx;
  55. text-align: center;
  56. background: #FAEBFF;
  57. border-radius: 4rpx 4rpx 12rpx 4rpx;
  58. font-size: 16rpx;
  59. color: #222222;
  60. margin-left: 8rpx;
  61. }
  62. .tag3{
  63. display: inline-block;
  64. width: 70rpx;
  65. height: 24rpx;
  66. line-height: 24rpx;
  67. text-align: center;
  68. background: linear-gradient( 180deg, #272624 0%, #FFE1A5 100%);
  69. border-radius: 4rpx 4rpx 12rpx 4rpx;
  70. font-size: 16rpx;
  71. color: #FFE1A5;
  72. margin-left: 8rpx;
  73. }
  74. </style>