爱简收旧衣按件回收前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

90 lines
1.9 KiB

<script>
import routerInterception from '@/utils/router-interception.js'
export default {
globalData: {
flag: 1,
login_status:true,
phone:null,
bannerList: [],
pricePreviewList: []
},
onLaunch: function() {
routerInterception()
this.getBannerList()
this.getPricePreviewList()
// console.log(this.$utils)
console.log('App Launch')
},
onLoad: function() {
this.getBannerList()
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
},
methods: {
getBannerList() {
// 假设 this.$api 可用
this.$api && this.$api('getBanner', {}, res => {
if (res && res.code === 200 && Array.isArray(res.result)) {
getApp().globalData.bannerList = res.result
console.log(getApp().globalData.bannerList,'bannerList')
uni.$emit('bannerListUpdated')
}
})
},
getPricePreviewList() {
this.$api && this.$api('getPricePreviewClassList', {}, res => {
if (res && res.success && Array.isArray(res.result)) {
getApp().globalData.pricePreviewList = res.result
uni.$emit('pricePreviewListUpdated')
}
})
}
}
}
</script>
<style >
/* // @import "./uni_modules/vk-uview-ui/index.scss"; */
/*每个页面公共css */
.uni-tabbar-bottom{
display: none;
}
.icon {
width: 50rpx;
height: 50rpx;
}
.nav-bar{
/* margin-top: calc(70rpx + env(safe-area-inset-top)); */
height: 30%;
display: flex;
justify-content: center;
}
/* 每个页面公共css */
/* 解决小程序和app滚动条的问题 */
::-webkit-scrollbar {
display: none;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
background: transparent;
color: transparent;
}
/* 解决H5的问题 */
uni-scroll-view .uni-scroll-view::-webkit-scrollbar {
display: none;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
background: transparent;
color: transparent;
}
</style>