<template>
    <view class="ht-box">
        <view class="ht-details">
            <view class="d-title">{{ getdata.title }}</view>
            <view class="d-content">{{ getdata.content }}</view>
            <view class="d-pic">
                <view class="pic-list" v-for="(item, index) in getdata.picUrl" :key="index">
                    <image alt="" class="img" mode="widthFix" :src="item.url" srcset=""></image>

                    <view class="pic_title">{{ item.pic_title }}</view>
                </view>
            </view>
        </view>
    </view>
</template>

<script>
export default {
    data() {
        return {
            getdata: {
                title: '',
                content: '',
                picUrl: []
            },

            show: false
        };
    },
    onLoad: function (t) {
        this.getData(t.id);
    },
    onShareAppMessage: function () {},
    methods: {
        getData: function (t) {
            uni.showLoading({
                title: '加载中'
            });
            var that = this;
            uni.request({
                url: 'https://v.juhe.cn/todayOnhistory/queryDetail.php?key=8525e2cd6ff71f07f54d3c7432f71685&e_id=' + t,
                data: {},
                header: {
                    'content-type': 'application/json'
                },
                success: function (t) {
                    uni.hideLoading();
                    if ('success' == t.data.reason) {
                        that.show=true;
                        that.getdata=t.data.result[0];
						
						
                    } else {
                        uni.showModal({
                            title: '提示',
                            content: '查询失败',
                            success: function (t) {
								that.show=false;
                            }
                        });
                    }
                }
            });
        }
    }
};
</script>
<style>
@import './details.css';
</style>
