<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>