goodsordersize.vue 1.71 KB
Newer Older
huahua committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
<template>
	<view class="detail full-width">
		<!-- <view style="width: 484upx; min-height: 577upx;position: relative; margin:40upx auto 40upx;">
			<image v-if="goods.preview" :src="goods.preview" 
			style="width: 484upx; height: 577upx; margin:auto; display: block;"
			mode="widthFix"></image>
			<image v-if="goods.front_image" :src="goods.front_image"
			 style="width: 484upx; height: 577upx; margin:auto; display: block; position: relative;z-index: 9;"
			 mode="aspectFit"></image>
		</view> -->
		<uParse :content="goods.detail" v-if="goods.detail" />
	</view>
</template>

<script>
	import uParse from '@/components/uParse/src/wxParse.vue'
	import homeservice from '@/service/homeservice.js'
	export default {
		components: {
			uParse
		},
		computed: {

		},
		data() {
			return {
				goods: {},
				queryPage:{}
			};
		},
		methods: {
			loadData() {
				uni.showLoading({title: '正在加载中...'}) 
				homeservice.queryList(this.queryPage).then(result => {
					
					this.goods = result
					wx.setNavigationBarTitle({title: this.goods.name })
					
					
					uni.hideLoading();
					uni.stopPullDownRefresh();
				}).catch(err => {
					uni.hideLoading();
					uni.showToast({ title: err.msg || err.data, icon: 'none' });
				});
			}
		},
		onPullDownRefresh() {
			this.loadData();
		},
		onLoad(options) {
			if(options.surface_id){
				this.queryPage.s = 'Surface.getDetail'
				this.queryPage.surface_id = options.surface_id
				this.loadData();
			}
			if(options.goods_id){
				this.queryPage.s = 'Product.detail'
				this.queryPage.id = options.goods_id
				this.loadData();
			}
		},
		onShow() {

		}
	};
</script>

<style lang="scss">
	page {
		background: #131319 !important;
		color: #fff;
	}
	.detail {
		
	}
</style>