<template>
  <HeaderNav title="订单详情" :is-back="true"></HeaderNav>
  <view class="body-background">
    <u-image :src="staticImage.orderDetailBackground" width="100%" height="100vh"></u-image>
  </view>
	<view class="app-wallpaper">

    <view class="feed-top">
      <view class="feed-container">
        <view class="feed-content">
<!--          <view class="top-img">-->
<!--            <u-image @click=showBigImage(item.url class="img" mode="aspectFill" width="100%" height="600" :src="detail.pet_avatar || staticImage.banner"></u-image>-->
<!--          </view>-->
          <view class="top-content row">
            <view class="order-list-item">
              <view class="order-card-container row">

                <view class="order-card-container-background-main row" @click="navTo('/pages/OrderDetail/index?id='+item.id)">

                  <view class="order-card-col row">
                    <view class="order-card-container-background col-12">
<!--                      <view class="order-card-container-background-inside col-12">-->

<!--                      </view>-->
                    </view>
                    <view class="order-card-left col-12">
<!--                      <swiper style="height:100%;">-->
<!--                        <swiper-item v-for="item in detail.avatar_array">-->
                          <u-image :fade="false" width="100%" height="auto" :src="detail.avatar_array[0]" radius="26" custom-style="border:3rpx solid #262626" mode="widthFix"></u-image>
<!--                        </swiper-item>-->
<!--                      </swiper>-->
<!--                      <u-swiper :list="detail.avatar_array" height="350" radius="26" custom-style="border:3rpx solid #262626" img-mode="aspectFill"></u-swiper>-->
<!--                      <u-image @click="showBigImage(detail.pet_avatar)" class="img" mode="aspectFill" width="100%" height="350"  :src="detail.pet_avatar" radius="26" custom-style="border:3rpx solid #262626"></u-image>-->
                    </view>
                    <view class="order-card-right col-12">
                      <view class="order-card-title" style="">
                        <u-text
                            :text="detail.addr"
                            color="#131313"
                            size="40"
                            line-height="60"
                        ></u-text>
                      </view>
                      <view class="order-card-tag-container row">
                        <view class="order-card-tag" v-for="(server, i) in detail.services" wx:key="i">{{ server }}</view>
                      </view>
                      <view class="order-card-day"><text class="card-label">上门时间：</text>{{detail.do_date}} {{ detail.do_time }}
                      </view>
                      <view class="order-card-pay-time"><text class="card-label">下单时间：</text>{{detail.create_time}}
                      </view>
                    </view>
                    <!--              <view class="" style="padding:20rpx 0;">-->
                    <!--                <u-text :text="'订单编号: '+item.no"-->
                    <!--                        color="#131313" size="28"-->
                    <!--                        custom-style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;"></u-text>-->
                    <!--              </view>-->
                    <view class="order-card-bottom col-12 row">
                      <view class="card-button" @click="navTo(`/pages/ChatDetail/index?id=${detail.id}`)">
                        <MzButton
                            title="立即沟通"
                            font-color="#3E3221"
                            button-color="#F7E1C3"
                            button-width="255rpx"></MzButton>
                      </view>

                    </view>
                  </view>
                </view>
              </view>
            </view>
          </view>
        </view>
        <view class="feed-background">
          <view class="feed-background-content">

          </view>
        </view>
      </view>
    </view>
    <view class="pet-detail-bottom-container" v-for="row in detail.pet_list">
      <view class="pet-detail-container">
        <view class="pet-detail-gun col">
          <image class="img" mode="heightFix" :src="staticImage.petGun"/>
        </view>
        <view class="pet-detail-content">

          <view class="content-item row">
            <view class="item-icon">
              <image class="img" mode="widthFix" :src="staticImage.petName"/>
            </view>
            <view class="item-title">
              宠托师：
            </view>
            <view class="item-content">
              {{detail.worker_name}}
            </view>
          </view>
          <view class="content-item row">
            <view class="item-icon">
              <image class="img" mode="widthFix" :src="staticImage.petName"/>
            </view>
            <view class="item-title">
              订单编号：
            </view>
            <view class="item-content">
              {{detail.no}}
            </view>
          </view>
          <view class="content-item row" v-if="detail.lock_type_name">
            <view class="item-icon">
              <image class="img" mode="widthFix" :src="staticImage.petName"/>
            </view>
            <view class="item-title">
              锁类型：
            </view>
            <view class="item-content">
              {{detail.lock_type_name}}
            </view>
          </view>
          <view class="content-item row" v-if="detail.open_info">
            <view class="item-icon">
              <image class="img" mode="widthFix" :src="staticImage.petName"/>
            </view>
            <view class="item-title">
              开锁方式：
            </view>
            <view class="item-content">
              {{detail.open_info}}
            </view>
          </view>
          <view class="content-item row">
            <view class="item-icon">
              <image class="img" mode="widthFix" :src="staticImage.petName"/>
            </view>
            <view class="item-title">
              增值服务：
            </view>
            <view class="item-content">
              {{detail.services?.join(',')}}
            </view>
          </view>
          <view class="content-item row">
            <view class="item-icon">
              <image class="img" mode="widthFix" :src="staticImage.petName"/>
            </view>
            <view class="item-title">
              萌宠信息：
            </view>
            <view class="item-content col-12">
              <view class="order-card-tag-container row">
                <view class="order-card-tag">{{ row.name }}</view>
                <view class="order-card-tag">{{ row.pet_age }}岁</view>
                <view class="order-card-tag">{{ row.weight }}kg</view>
                <view class="order-card-tag">{{ row.pet_sex }}</view>
              </view>
            </view>
          </view>

          <view class="pet-bottom-video-remark row" style="position: relative;">
<!--            <view class="content-item pet-detail-video-group" style="width:100%;">-->

<!--              <view class="video-content">-->
<!--                <view class="video-content-container">-->
<!--                  <video class="img" mode="aspectFill" :src="row.video" style="width:100%;height:100%;border-radius: 16rpx;border:2rpx solid #262626;"></video>-->
<!--                </view>-->
<!--                <view class="video-content-background"></view>-->
<!--              </view>-->
<!--            </view>-->
<!--            <view class="row col" style="padding:15rpx 30rpx 15rpx 0rpx;">-->
<!--              <view class="content-container col" style="position: relative;height:100%;width:100%;">-->
<!--                <view class="content" style="box-sizing:border-box;padding:25rpx;position:absolute;height:100%;width:100%;left:0;top:0;z-index: 2;border:2rpx solid #262626;border-radius: 16rpx;background-color:#F6F6F6;">-->
<!--                  <u-text :text="row.remarks" color="#263233" size="28"></u-text>-->
<!--                </view>-->
<!--                <view class="content-background" style="position:absolute;top:10rpx;left:10rpx;z-index:1;border:2rpx solid #262626;border-radius: 16rpx;width:100%;height:100%;">-->

<!--                </view>-->
<!--              </view>-->
<!--            </view>-->
          </view>

          <view class="card-button" @click="navTo('/pages/FeedLog/index?pet_id=' + row.id)" style="justify-content: center;display:flex;padding:30rpx 0;">
            <MzButton
                title="喂养档案"
                font-color="#FFFFFF"
                button-color="#4DC3B8"
                button-width="255rpx"></MzButton>
          </view>
        </view>

        <view class="pet-detail-background"></view>
      </view>
    </view>
    <view v-if="service?.startservice && service.startservice.id > 0 " class="pet-detail-bottom-container">

      <view class="pet-detail-container">
        <view class="pet-detail-gun col">
          <image class="img" mode="heightFix" :src="staticImage.petGun"/>
        </view>
        <view class="pet-detail-content">
          <view class="content-item"><view>开始订单</view></view>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" :data="service.startservice.arrival_time" name="到达时间" type="text"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" :data="service.startservice.worker_confirm" name="宠物师确认" type="media"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" :data="service.startservice.hand_disinfect" name="手部消毒" type="media"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" :data="service.startservice.body_disinfect" name="全身消毒" type="media"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" :data="service.startservice.key" name="钥匙开启/收取" type="media"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" :data="service.startservice.key_info" name="钥匙描述" type="text"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" :data="service.startservice.service_tools" name="服务工具" type="text"></FomItem>
        </view>

<!--        <view class="pet-detail-background"></view>-->
      </view>
    </view>
    <view v-if="service.endservice && service.endservice.id > 0" class="pet-detail-bottom-container">
      <view class="pet-detail-container">
        <view class="pet-detail-gun col">
          <image class="img" mode="heightFix" :src="staticImage.petGun"/>
        </view>
        <view class="pet-detail-content">
          <view class="content-item"><view>完成订单</view></view>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.appliance" name="水电等情况"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.before_status" name="入户前萌宠家居情况"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.pet_status" name="萌宠生活区情况"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.food_status" name="萌宠粮剩余情况">
            <template v-slot:option="{data}">
              <view style="margin-bottom:30rpx;">
                萌宠粮：{{data.food_option}}
              </view>
              <view>
                萌宠水：{{data.water_option}}
              </view>
            </template>
          </FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.sick" name="是否有萌宠呕吐物"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.excrement" name="萌宠排泄物情况"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.other" name="其他情况反馈"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.food_bowl" name="食盆清洗并擦干水渍" option-name="value"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.basin" name="水盆清理" option-name="value"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.staple_food" name="萌宠主食"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.water" name="萌宠饮用水"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.snacks" name="零食、药品及其他"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.wowo" name="窝窝整理"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.cage" name="笼笼清理"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.hair" name="周边毛发"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.pet_sick" name="屋内排泄物清理"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.pet_excrement" name="屋内呕吐物清理"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.cat_litter" name="猫砂盆整理及猫砂更换"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.other_info" name="其他需求反馈"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.foundation" name="基础检查"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="text" :data="service.endservice.health" name="健康情况"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.health_other" name="其他"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.pet_clean" name="萌宠清洁"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.before_facial" name="洗护前原始状态"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.pet_facial" name="使用产品"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.end_facial" name="洗护后状态"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.home_play" name="在家互动"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.out_play" name="外出遛弯">
            <template #option>
              <view v-if="service.endservice?.out_play.number_option.length>0">
                <view class="">
                  <u-text text="排便情况" color="#999" size="28"></u-text>
                </view>
                <view class="">{{getString(service.endservice.out_play.number_option)}}</view>
              </view>
              <view v-if="service.endservice.out_play.feces_option.length>0">
                <view class="">
                  <u-text text="便便情况" color="#999" size="28"></u-text>
                </view>
                <view class="">{{getString(service.endservice.out_play.feces_option)}}</view>
              </view>
              <view v-if="service.endservice.out_play.in_home_option.length>0">
                <view class="">
                  <u-text text="入门前清洁" color="#999" size="28"></u-text>
                </view>
                <view class="">{{getString(service.endservice.out_play.in_home_option)}}</view>
              </view>
            </template>
          </FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.trash" name="垃圾携带"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.appliance_info" name="门窗、灯、空调、水电等情况"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.pet_secure" name="离开时萌宠安全确认"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.close" name="普通锁"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.close_mima" name="密码锁"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="default" :data="service.endservice.key" name="房门钥匙"></FomItem>
          <FomItem @showBigImage="showBigImage" @showBigVideo="showBigVideo" type="text" :data="service.endservice.leave" name="离开时间"></FomItem>
        </view>

<!--        <view class="pet-detail-background"></view>-->
      </view>
    </view>
	</view>
  <u-overlay :show="imageShow" @click="imageShow = false">
    <view class="" style="display:flex;align-items: center;justify-content:center;width:100%;height:100vh;">
      <u-image mode="widthFix" :src="imageUrl" height="auto" width="100vw"></u-image>
    </view>
  </u-overlay>
  <u-overlay :show="videoShow" @click="videoShow = false">
    <view class="" style="display:flex;align-items: center;justify-content:center;width:100%;height:100vh;">
      <video :show-fullscreen-btn="false" :autoplay="true" mode="widthFix" :src="videoUrl" height="auto" width="100vw"></video>
    </view>
  </u-overlay>
</template>

<script>
	import {
		imghost
	} from '@/config/host.js'
	import HeaderNav from '@/components/HeaderNav/Index.vue';
	import FooterNav from '@/components/FooterNav/Index.vue';
	import RightNav from '@/components/RightNav/Index.vue';
	import MzButton from '@/components/MzButton/Index.vue';
	import api from '@/utils/functions.js';
  import {delPet, getDetail} from "@/api/pet";
  import log from "@/utils/log";
  import functions from "@/utils/functions.js";
  import {orderDetail, orderServiceInfo} from "@/api/order";
  import FomItem from "./components/fomItem.vue";
	export default {
		components: {
      FomItem,
			HeaderNav,
			FooterNav,
			RightNav,
			MzButton,
		},
		data() {
			return {
        imageShow:false,
        imageUrl:'',
        videoUrl: '',
        videoShow: false,
				title: 'Hello',
				loading: true,
				staticImage: {
					screenActiveImg: imghost + '/order-screen-active.png',
					orderCardBackground: imghost + '/order-card-background.png',
					wallpaperBgImage:imghost +'/background.png',
          petGun:imghost +'/pet_gun.png',
          petName:imghost +'/pet-detail-name.png',
          petType:imghost +'/pet-detail-type.png',
          petBirth:imghost +'/pet-detail-birthday.png',
          petSex:imghost +'/pet-detail-sex.png',
          petYm:imghost +'/pet-detail-ym.png',
          petQc:imghost +'/pet-detail-qc.png',
          petHome:imghost +'/pet-detail-home.png',
          petBs:imghost +'/pet-detail-bs.png',
          petVideoTitle:imghost +'/pet-detail-video-title.png',
          petPhotoTitle:imghost +'/pet-detail-photo-title.png',
          orderDetailBackground:imghost+'/order-detail-background.png',
          orderDetailShare:imghost+'/order-detail-share.png',
				},
				indexBanner: [{
					image: imghost + '/banner.png',
					url: '',
				}],
				user: {
					avatar: imghost + '/banner.png',
					nickname: '清晨的风',
					coupons: 221,
					id: 88685
				},
				isTop: false,

				petImage: imghost + '/pet_avatar1.jpeg',
				orderCardList:[
					{
						title:'成都市武侯区丰德国际4栋...',
						tags:['刷毛','上门洗护'],
						do_time:'2023/05/03 15—17时',
						create_time:'2023/03/03 15:23:22',
					},
					{
						title:'成都市武侯区丰德国际4栋...',
						tags:['刷毛','上门洗护'],
						do_time:'2023/05/03 15—17时',
						create_time:'2023/03/03 15:23:22',
					},
				],
        detail:{},
        service:{
          startservice:{
            id:'',
            needTime:'',
            arrival_time :'',
            worker_confirm:[],
            hand_disinfect:[],
            body_disinfect:[],
            key:[],
            key_info :'',
            service_tools:'',
          },
          endservice:{
            id: '',
            appliance: {option: '', remark: '', upload: []},
            before_status: {option: '', remark: '', upload: []},
            pet_status: {option: '', remark: '', upload: []},
            food_status: {food_option: '', water_option: '', remark: '', upload: []},
            sick: {option: '', remark: '', upload: []},
            excrement: {option: '', remark: '', upload: []},
            other: {option: '', remark: '', upload: []},
            food_bowl: {value: 0, remark: '', upload: []},
            basin: {value: 0, remark: '', upload: []},
            staple_food: {option: '', type_option: '', remark: '', upload: []},
            water: {option: '', remark: '', upload: []},
            snacks: {option: '', remark: '', upload: []},
            wowo: {option: '', remark: '', upload: []},
            cage: {option: '', remark: '', upload: []},
            hair: {option: '', remark: '', upload: []},
            pet_sick: {option: '', remark: '', upload: []},
            pet_excrement: {option: '', remark: '', upload: []},
            cat_litter: {option: '', remark: '', upload: []},
            other_info: {option: '', remark: '', upload: []},
            foundation: {option: '', remark: '', upload: []},
            health: '',
            health_other: {option: '', remark: '', upload: []},
            pet_clean: {option: '', remark: '', upload: []},
            before_facial: {option: '', remark: '', upload: []},
            pet_facial: {option: '', remark: '', upload: []},
            end_facial: {option: '', remark: '', upload: []},
            home_play: {option: '', remark: '', upload: []},
            out_play: {option: '', number_option: '', feces_option: '', in_home_option: '', remark: '', upload: []},
            trash: {option: '', remark: '', upload: []},
            appliance_info: {option: '', remark: '', upload: []},
            pet_secure: {option: '', remark: '', upload: []},
            close: {option: '', remark: '', upload: []},
            close_mima: {option: '', remark: '', upload: []},
            key: {option: '', remark: '', upload: []},
            leave: '',
            goOutTime: ''
          }
        },
        id:0,
			}
		},
		onLoad(option) {
        log(option);
        this.id = option.id;
        this.getDetail(option.id);
		},
    onShareAppMessage() {
      return {
        title:'订单详情',
        path:'/pages/OrderDetail/index?id='+this.id,
        imageUrl:this.staticImage.orderDetailShare
      }
    },
		methods: {
      showBigImage(imgUrl){
        this.imageUrl = imgUrl;
        this.imageShow = true;
      },
      showBigVideo(videoUrl) {
        this.videoUrl = videoUrl;
        this.videoShow = true;
        this.$emit('showBigVideo',videoUrl)
      },
      getString(value) {
        let typeStr = typeof value;
        if (typeStr === 'string') {
          return value;
        } else if (typeStr === 'object' || typeStr === 'array') {
          return value.join(',');
        }
      },
      delPet(){
        functions.confirm("确认删除该宠物吗？").then(() => {
          delPet(this.id).then((res) => {
            functions.success('删除成功').then(() => uni.navigateBack())
          })
        })
      },
      navTo(url){
        uni.navigateTo({
          url:url
        })
      },
      getDetail(id){
        orderDetail(id).then(data => {
            this.detail = data.data;
            if(this.detail.status>0){
              this.getOrderServiceInfo(id);
            }
        })
      },
    getOrderServiceInfo(id){
        orderServiceInfo(id).then(res => {
          // this.service =res.data;
          // this.service.startservice = res.data.startservice;
          // this.service.startservice = res.data.endservice;
          this.service.startservice.id = res.data.startservice.id;
          this.service.startservice.needTime = res.data.startservice.needTime;
          this.service.startservice.arrival_time = res.data.startservice.arrival_time;
          this.service.startservice.worker_confirm = res.data.startservice.worker_confirm;
          this.service.startservice.hand_disinfect = res.data.startservice.hand_disinfect;
          this.service.startservice.body_disinfect = res.data.startservice.body_disinfect;
          this.service.startservice.key = res.data.startservice.key;
          this.service.startservice.key_info = res.data.startservice.key_info;
          this.service.startservice.service_tools = res.data.startservice.service_tools;

          this.service.endservice.id = res.data.endservice.id;
          this.service.endservice.appliance = res.data.endservice.appliance;
          this.service.endservice.before_status = res.data.endservice.before_status;
          this.service.endservice.pet_status = res.data.endservice.pet_status;
          this.service.endservice.food_status = res.data.endservice.food_status;
          this.service.endservice.sick = res.data.endservice.sick;
          this.service.endservice.excrement = res.data.endservice.excrement;
          this.service.endservice.other = res.data.endservice.other;
          this.service.endservice.food_bowl = res.data.endservice.food_bowl;
          this.service.endservice.basin = res.data.endservice.basin;

          this.service.endservice.staple_food = res.data.endservice.staple_food;
          this.service.endservice.water = res.data.endservice.water;
          this.service.endservice.snacks = res.data.endservice.snacks;
          this.service.endservice.wowo = res.data.endservice.wowo;
          this.service.endservice.cage = res.data.endservice.cage;
          this.service.endservice.hair = res.data.endservice.hair;
          this.service.endservice.pet_sick = res.data.endservice.pet_sick;
          this.service.endservice.pet_excrement = res.data.endservice.pet_excrement;
          this.service.endservice.cat_litter = res.data.endservice.cat_litter;
          this.service.endservice.other_info = res.data.endservice.other_info;

          this.service.endservice.foundation = res.data.endservice.foundation;
          this.service.endservice.health = res.data.endservice.health;
          this.service.endservice.health_other = res.data.endservice.health_other;
          this.service.endservice.pet_clean = res.data.endservice.pet_clean;
          this.service.endservice.before_facial = res.data.endservice.before_facial;
          this.service.endservice.pet_facial = res.data.endservice.pet_facial;
          this.service.endservice.end_facial = res.data.endservice.end_facial;
          this.service.endservice.home_play = res.data.endservice.home_play;
          this.service.endservice.out_play = res.data.endservice.out_play;
          this.service.endservice.trash = res.data.endservice.trash;

          this.service.endservice.appliance_info = res.data.endservice.appliance_info;
          this.service.endservice.pet_secure = res.data.endservice.pet_secure;
          this.service.endservice.close = res.data.endservice.close;
          this.service.endservice.close_mima = res.data.endservice.close_mima;
          this.service.endservice.key = res.data.endservice.key;

          this.service.endservice.leave = res.data.endservice.leave;
          this.service.endservice.goOutTime = res.data.endservice.goOutTime;



        })
      }
		},
		onPageScroll(res) {
			if(res.scrollTop <= 20){
				uni.$emit('isTop', true);
			}else{
				uni.$emit('isTop', false);
			}
		},
		created() {
			this.pagePadding = (api.navHeight().navPaddingTop +
				api.navHeight().navHeight + (api.navHeight().headerPadding * 2))
		},
    computed:{
      // service :{
      //   get(){
      //     return this.services;
      //   },
      //   set(newValue){
      //     this.services = newValue;
      //   },
      // }
    },
	}
</script>

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