<template>
	<view class="page">
		<navBar :backType="navBarTitle" :title="navBarTitle?navBarTitle:'定制我家的全屋WIFI'" :back="true" color="black"
			background="white" />
		<image class="topImg" :src="picBase + topPic" mode=""></image>

		<view class="cen">
			<image class="water" src="/static/index/water.png" mode=""></image>
			<image class="halfC" src="/static/index/halfCircle_275.png" mode=""></image>
			定制我家的全屋WIFI
		</view>

		<view class="parmasBox">
			<view class="con">
				<view class="top">
					<view class="item">
						<view class="name">
							户型
						</view>
						<view class="des">
							{{selHx.value}}
						</view>
					</view>
				</view>
			</view>
		</view>

		<view class="parmasBox" v-if="shareCon.name||shareCon.phone||shareCon.address||shareCon.remark">
			<view class="con">
				<view class="top">
					<view class="item" v-if="shareCon.name">
						<view class="name">
							收货人
						</view>
						<view class="des">
							{{shareCon.name}}
						</view>
					</view>
					<view class="item" v-if="shareCon.phone">
						<view class="name">
							电话
						</view>
						<view class="des">
							{{shareCon.phone}}
						</view>
					</view>
					<view class="item" v-if="shareCon.address">
						<view class="name">
							收货地址
						</view>
						<view class="des">
							{{shareCon.address}}
						</view>
					</view>
					<view class="item" v-if="shareCon.remark">
						<view class="name">
							备注
						</view>
						<view class="des">
							{{shareCon.remark}}
						</view>
					</view>
				</view>
			</view>
		</view>


		<!-- <image  @click="back" src="/static/index/backBtnImg.png" mode="" class="rule_img"></image> -->

		<!-- <u-modal :show="showShare" title="分享链接" :content='content'></u-modal> -->
	</view>
	</view>
</template>

<script>
	import {
		postOrderReq,

		getOrderDetailReq
	} from '@/api/test/index.js'

	import {
		getBannerDataReq,
	} from '@/api/index/index.js'
	export default {
		components: {

		},
		data() {
			return {
				// showShare: true,

				picUrl: this.$picUrl,
				picBase: this.$picBase,
				topPic: '',
				selHx: null,
				orderId: '',
				shareCon: null,

				options: null,
				options1: null,
				query: null,

				orderSuc: false,

				navBarTitle: ''
			}
		},
		async onLoad(o) {
			let res11 = await getBannerDataReq()
			if (res11.code == 0) {
				console.log('5-----图片配置数据', res11);

				this.topPic = res11.data.find((item, index) => {
					return item.title == '网络规划-全屋WiFi'
				}).head_image
				console.log('5-----this.topPic', this.topPic);
			} else {
				this.$toast(res11.message)
			}
			// o.orderId = '439d87d0ac2803807a2c6d00b5155f4f'
			if (o.orderId) {
				this.orderId = o.orderId
				this.navBarTitle = '首页'
				console.log('o.orderId', o.orderId);

				let res = await getOrderDetailReq({
					orderId: o.orderId
				})
				if (res.code == 0) {
					console.log('邀请订单详情返回值-无主灯: ', res);

					this.shareCon = res.data

					this.selHx = res.data.config.house_type_data
				} else {
					uni.showToast({
						title: res.message,
						icon: 'none'
					})
				}
			}
		},
		methods: {
			back() {
				uni.navigateBack()
			},
		}
	}
</script>

<style lang="scss" scoped>
	@import "./index.scss";
</style>