<template>
  <!-- #ifdef H5 -->
  <zj-page-layout
    :hasFooter="true"
    :refresherTriggered="refresherTriggered">

	<view class="list-container">
		<view class="" v-html="html"></view>
	</view>
    <template slot="footer">
      <view class="footer-btn-group">
        <u-button type="primary" plain text="我的延保" @click="toOrderList"></u-button>
        <u-button type="primary" text="查看服务网点" @click="toWebsiteList"></u-button>
      </view>
    </template>
  </zj-page-layout>
  <!-- #endif -->

  <!-- #ifndef H5 -->
  <web-view :src="webViewHref(`/packageHome/pages/addvalue/explainDetail`, pam, crossPagePam)" @message="crossPage.$listener"></web-view>
  <!-- #endif -->
</template>

<script>
  // #ifdef H5
  export default {
    data() {
      return {
        refresherTriggered: false,
				html: ''
      }
    },

    onLoad({id}) {
		this.getDetail(id);
    },

    methods: {
      getDetail(id) {
        this.$api.post('/increConfig/detail', {
          id
        }).then(res => {
			this.html = res.data.reason
        })
      },
      
      toOrderList() {
        this.$navToPage({
          url: `/packageHome/pages/addvalue/orderList`
        })
      },
      
      toWebsiteList() {
        this.$navToPage({
          url: `/packageHome/pages/addvalue/websiteList`
        })
      },
      
    },
  }

  // #endif
  // #ifndef H5
  export default {
    data() {
      return {
        pam: {},
      }
    },
    onLoad(pam) {
      this.pam = pam;
    }
  }
  // #endif
</script>

<style lang="scss" scoped>
.list-container{
	padding: 30rpx;
}
</style>
