123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <script>
- import {
- getGoodsTypeObj,
- getUserDetail
- } from '@/api/common.js';
- export default {
- onLaunch: function() {
- console.log('App Launch')
-
-
- },
- onShow: function() {
- console.log('App Show')
- // 获取商品类型字段
- // getGoodsTypeObj().then(res => {
- // if (res.state == 'Success') {
- // uni.setStorageSync('goodsTypeObj',JSON.stringify(res.content))
- // }
- // })
- },
- onHide: function() {
- console.log('App Hide')
- // 解决我的页面多个登录窗堆叠问题
- let pages = getCurrentPages()
- let currentPage = pages[pages.length - 1]
- if(currentPage.route == 'pages/my/index'){
- uni.reLaunch({
- url:'/pages/index/index'
- })
- }
- },
- }
- </script>
- <style lang="scss">
- /*每个页面公共css */
- @import "@/uni_modules/uview-ui/index.scss";
- .tag1{
- display: inline-block;
- width: 70rpx;
- height: 24rpx;
- line-height: 24rpx;
- text-align: center;
- background: #E4F5FF;
- border-radius: 4rpx 4rpx 12rpx 4rpx;
- font-size: 16rpx;
- color: #222222;
- margin-left: 8rpx;
- }
-
- .tag2{
- display: inline-block;
- width: 70rpx;
- height: 24rpx;
- line-height: 24rpx;
- text-align: center;
- background: #FAEBFF;
- border-radius: 4rpx 4rpx 12rpx 4rpx;
- font-size: 16rpx;
- color: #222222;
- margin-left: 8rpx;
- }
-
- .tag3{
- display: inline-block;
- width: 70rpx;
- height: 24rpx;
- line-height: 24rpx;
- text-align: center;
- background: linear-gradient( 180deg, #272624 0%, #FFE1A5 100%);
- border-radius: 4rpx 4rpx 12rpx 4rpx;
- font-size: 16rpx;
- color: #FFE1A5;
- margin-left: 8rpx;
- }
- </style>
|