<template>
	<view class="goods_con">
		<navigation>
			Product
		</navigation>
	<view class="detail_top">
		<u-swiper :list="list" height="750" mode="dot"></u-swiper>
	<view class="text_con">
		<view class="text">
			{{goods_Detail.goodsName}}
		</view>
		<view class="price">
				₹ {{goods_Detail.goodsPrice}}
		</view>
		<u-button class="custom-style">Sold Out</u-button>
	</view>
	</view>
	<view class="detail_bottom">
		<view class="title">
			Product Specifications
		</view>
		<view class="goodsProperty" v-for="item,index in table" :key="index">
			 <text class="text text1">{{item.goodsPropertyKey}}</text>
			 <text class="text text2">{{item.goodsPropertyValue}}</text>
		</view>
	</view>
	</view>
</template>

<script>
	import api from '@/utils/api'
	import utils from '@/utils'
	import md5 from 'js-md5'
	import store from '@/store'
	export default {
		data() {
			return {
				// 表格
				table:[],
				goods_Detail:[],
				list:[],
			}
		},

		onLoad(i) {
         const post = api.goodsDetail({
			 goodsId:i.id
		 })
         .then(res =>{
			 if(res.success){
				 this.goods_Detail=res.data;
				 this.list=res.data.goodsImgMainUrl.split(',');
				for(var i=0;i<this.list.length;i++){
					 this.list[i]='https://apitest.luck-work.com'+this.list[i]
				}
				this.table=JSON.parse(this.goods_Detail.goodsProperty)
				console.log(this.goods_Detail.goodsProperty,4444444)
				console.log(this.table,5555555)
				 }
      
         }).catch(err =>{
         	console.log(err)
         })
		},
		
			onReady() {
			
			},
		methods: {
		
			},
	
		}
	
</script>

<style>
	@import './index.css';
</style>
