<template>
	<view class="pages">
		<u-navbar
			title="品牌详情"
			:placeholder="true"
			:autoBack="false"
			@leftClick="leftClick"
			 :safeAreaInsetTop="true"
		>
		</u-navbar>
		<u-loading-page :loading="loadingPage" bgColor="#f1f1f1"></u-loading-page>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				staticUrl:this.$commonConfig.staticUrl,
				id:'',
				loadingPage:true,
				details:{}
			}
		},
		onShow() {
		},
		onLoad(page) {
			this.id = page.id;
			this.getDetails(this.id);
		},
		methods: {
			leftClick(e){
				let pages = getCurrentPages();
				if(pages.length==1){
					uni.$u.route('/pages/index/index')
				}else{
					uni.navigateBack()
				};
			},
			getDetails(id){
				this.$u.api.memberGoodDetails({id:id}).then(res=>{
					this.loadingPage = false;
					// console.log('res',res.data);
					this.details = res.data;
				}).catch(err=>{
					console.log('getDetails',err.data);
				})
			},
		}
	}
</script>

<style lang="scss" scoped>

</style>