<import src='../../wxParse/wxParse.wxml' />
<view class="page">
  <view class="page__bd">
    <view class='header_swiper'>
      <swiper class="header_swiper_2" indicator-dots="{{false}}" autoplay="{{true}}" circular="{{true}}" bindchange="swiperChange">
        <block wx:for="{{header.imgCover}}" wx:key="index">
          <swiper-item>
            <view wx:if="{{item.Url===''}}" class="header_swiper_2_text">暂无图片</view>
            <view class='video_play_btn' wx:if="{{videoStr && index === 0}}">
              <image bindtap='setVideoShow' class='_btn' src='../../../images/product/play.png' mode='aspectFit'></image>
            </view>
            <image class="header_swiper_2_image" src="{{item.Url}}?x-oss-process=image/resize,m_fill,w_650,h_500" />
          </swiper-item>
        </block>
      </swiper>
      <view class='header_swiper_view'>
        <text class='header_swiper_view_text1'>跟团游</text>
        <text class='header_swiper_view_text3'>{{header.imgCoverIndex}}/{{header.imgCover.length}}</text>
      </view>
    </view>
    <view wx:if="{{videoStr && videoShow}}" class='video_box' bindtap='setVideoShow'>
      <video
        catchtap
        id="myVideo"
        src="{{videoStr}}"
        controls
      ></video>
    </view>
    <!-- hidden='{{account===""}}' -->
    <view class='header_info1' >
      <text class='{{header.priceList.length>0 ? "header_title_style": ""}}'>{{header.priceList.length>0 ? header.priceList[0].myDateTitle :''}}</text>
      <text class='header_info1_title'>{{header.title}}</text>
      <view class='header_info1_price'>
        <view wx:if='{{account!=="" && header.b2BPrice!=-1}}' class='header_info1_price_son'>
          <view>
            <text class='info1_price_1'>统一售价：<text class='info1_price_1_text'>{{header.priceList[header.priceNum].b2BPrice}}</text> / 人起 </text>            
          </view>
          <!-- hidden='{{account === ""}}' -->
          <view bindtap='priceViewShow' hidden='{{account === ""}}'>
            <image class='arrowo_up {{priceView === true ? "arrowo_down" : ""}} ' src='/images/product/arrow_up.png'></image>
          </view>
        </view>
        <view wx:elif='{{account==="" && header.b2CPrice!=-1}}' class='header_info1_price_son'>
          <view>
            <text class='info1_price_2' >统一售价：<text class='info1_price_2_text'>{{header.priceList[header.priceNum].b2CPrice}}</text> / 人起</text>            
          </view>
          <!--  -->
          <view bindtap='priceViewShow' hidden='{{account === ""}}'>
            <image class='arrowo_up {{priceView === true ? "arrowo_down" : ""}}' src='/images/product/arrow_up.png'></image>
          </view>
        </view>
        <view wx:else class='header_info1_price_son'>
          <text class='info1_price_3'>当前团期已失效</text>
        </view>
      </view>
      <view hidden='{{!priceView}}'>
        <view class='header_priceDetail'>
          <view class='header_priceDetail_type'>成人</view>
          <view class='header_priceDetail_son'>
            <view>
              <view >单价 <text>{{account=='' ? header.priceList[header.priceNum].b2CPrice :(isMember===1?header.priceList[header.priceNum].b2BMemberPrice:header.priceList[header.priceNum].b2BPrice)}}</text></view>
            </view>
            <view> <text></text></view>
          </view>
        </view>
        <view class='header_priceDetail'>
          <view class='header_priceDetail_type'>小孩</view>
          <view class='header_priceDetail_son'>
            <view>不占床 <text>{{account=='' ? header.priceList[header.priceNum].b2CPrice - header.priceList[header.priceNum].childNoNeedPrice :(isMember===1?header.priceList[header.priceNum].b2BMemberPrice - header.priceList[header.priceNum].childNoNeedPrice : header.priceList[header.priceNum].b2BPrice - header.priceList[header.priceNum].childNoNeedPrice)}}</text></view>
            <view>占床 <text>{{account=='' ? header.priceList[header.priceNum].b2CPrice + header.priceList[header.priceNum].childNeedPrice :(isMember===1?header.priceList[header.priceNum].b2BMemberPrice + header.priceList[header.priceNum].childNeedPrice : header.priceList[header.priceNum].b2BPrice + header.priceList[header.priceNum].childNeedPrice)}}</text></view>
          </view>
          <view class='header_priceDetail_son'>
            <view>婴儿 <text>{{header.priceList[header.priceNum].babyPrice}}</text></view>
            <view>单地接价格 <text>{{header.priceList[header.priceNum].singleDMCPrice}}</text></view>
          </view>
        </view>
        <view class='header_priceDetail'>
          <view class='header_priceDetail_type'>其他</view>
          <view class='header_priceDetail_son'>
            <view>老人附加费 <text>{{header.priceList[header.priceNum].oldManChargePrice}}</text></view>
            <view>儿童附加费 <text>{{header.priceList[header.priceNum].babyChargePrice}}</text></view>
          </view>
          <view class='header_priceDetail_son'>
            <view>单房差价 <text>{{header.priceList[header.priceNum].singleRoomPrice}}</text></view>
            <view>杂费 <text>{{header.priceList[header.priceNum].otherPrice}}</text></view>
          </view>
        </view>
        <view class='header_priceDetail' wx:if="account!==''">
          <view class='header_priceDetail_type header_priceDetail_type2'>优惠</view>
          <view class='header_priceDetail_son'>
            <view>同行返佣 <text>{{header.priceList[header.priceNum].rebatePrice ? header.priceList[header.priceNum].rebatePrice : 0}}</text></view>
            <view>早鸟优惠 <text>{{header.priceList[header.priceNum].discountPrice ? header.priceList[header.priceNum].discountPrice : 0}}</text></view>
          </view>
        </view>
      </view>
    </view>
    <view class='header_info2'>
      <view class='header_info2_line1'>
        <image class='header_info2_line_image' src='../../../images/product/ico_trip_date.png'></image>
        <text class='header_info2_line_text1'>行程天数</text>
        <text class='header_info2_line_text2'>{{header.dayNum}}天{{header.nightNum}}晚跟团游</text>
      </view>
      <view class='header_info2_line2'>
        <image class='header_info2_line_image' src='../../../images/product/ico_trip_city.png'></image>
        <text class='header_info2_line_text1'>出发城市</text>
        <text class='header_info2_line_text2'>{{header.startCityName}}</text>
      </view>
      <view class='header_info2_line3' hidden='{{account===""}}'>
        <block wx:for="{{header.priceList}}" wx:for-item="item" wx:key="index">
          <view class='info2_line3_view {{index===header.priceNum?"price_now":""}}' wx:if="{{(!(index>6) || header.priceMore === true) && (tcid ? item.tcid === tcid : true)}}" data-num="{{index}}" bindtap="priceOn">
            <text class='info2_line3_view_1'>{{item.myDate}}</text>
            <text class='info2_line3_view_2'>¥{{account=='' ? item.b2CPrice :(isMember===1?item.b2BMemberPrice:item.b2BPrice)}}</text>
          </view>
        </block>
        <view class='info2_line3_view_more' bindtap='priceMore' wx:if="{{header.priceList.length>7}}">{{header.priceMore===false?'更多团期':'收起'}}</view>
      </view>
    </view>
    <view class='{{header.flightShow===true?"header_info3_on":"header_info3_off"}}'>
      <view class='info3_header'>
        <view class='info3_header_left'>航班信息</view>
        <view class='info3_header_right' bindtap='flightOn'>
          <image class='info3_header_right_image {{header.flightShow===true?"arrow_up":"arrow_down"}}' src='../../../images/product/arrow_up.png'></image>
        </view>
      </view>
      <view class='info3_content' hidden='{{!header.flightShow}}'>
        <block wx:if="{{header.priceList[header.priceNum].priceFlight.length>0}}" wx:for="{{header.priceList[header.priceNum].priceFlight}}" wx:for-item="item" wx:key="index">
          <view class='info3_item'>
            <view class='info3_item_left'>
              <view class='info3_item_1'>{{item.startDate}}</view>
              <view class='info3_item_2'>{{item.departureTime}}</view>
              <view class='info3_item_3'>{{item.departureAirPortName}}</view>
            </view>
            <view class='info3_item_center'>
              <view class='info3_item_center_text'>{{item.timeDifference}}</view>
              <image class='info3_item_center_image' src='../../../images/product/arrow.png'></image>
            </view>
            <view class='info3_item_right'>
              <view class='info3_item_1'>{{item.alName}}{{item.flightNumber}}</view>
              <view class='info3_item_2'>{{item.arrivalTime}}</view>
              <view class='info3_item_3'>{{item.arrivalAirPortName}}</view>
            </view>
          </view>
        </block>
        <view wx:if="{{header.priceList[header.priceNum].priceFlight.length===0}}" class='info3_content_noInfo'>暂无航班信息</view>
      </view>
    </view>
    <view class='scroll_box' style="{{account!==''?'':'padding-bottom:0px'}}">
      <view class='scroll_menu'>
        <view class='scroll_menu_item {{menuIndex===0?"scroll_menu_click":""}}' data-view='scroll_view_1' data-num='0' bindtap='menuChange'>行程特色</view>
        <view class='scroll_menu_item {{menuIndex===1?"scroll_menu_click":""}}' data-view='scroll_view_2' data-num='1' bindtap='menuChange'>{{header.dayNum}}日行程</view>
        <view class='scroll_menu_item {{menuIndex===2?"scroll_menu_click":""}}' data-view='scroll_view_3' data-num='2' bindtap='menuChange'>费用说明</view>
        <view class='scroll_menu_item {{menuIndex===3?"scroll_menu_click":""}}' data-view='scroll_view_4' data-num='3' bindtap='menuChange'>预定须知</view>
      </view>
      <scroll-view class='scroll_view' id='scroll_view' scroll-y upper-threshold="1" lower-threshold="1" scroll-into-view="{{toView}}" scroll-with-animation="{{true}}" bindscroll="scroll">
        <!-- 行程特色 -->
        <view class='scroll_view_node scroll_view_1' id='scroll_view_1'>
          <view class='scroll_view_title'>
            <text class='scroll_view_title_text'>行程特色</text>
          </view>
          <view class='scroll_view_special'>
            <!-- <image wx:if="{{tripSpecial!==null&&tripSpecial!==''}}" class='scroll_view_special_image' src='{{tripSpecial}}' mode="widthFix" bindload="getHeight"></image> -->
            <template wx:if="{{featureType<4}}" is="wxParse" data="{{wxParseData:article.nodes}}"/>
          </view>
        </view>
        <!-- 6日行程 -->
        <view class='scroll_view_node scroll_view_2' id='scroll_view_2'>
          <view class='scroll_view_title'>
            <text class='scroll_view_title_text'>{{header.dayNum}}日行程</text>
          </view>
          <view>
            <block wx:for="{{tripDays}}" wx:for-item="item" wx:key="index">
              <view>
                <view class='view_2_day'>第{{item.dayNum<10? '0'+item.dayNum:item.dayNum}}天</view>
                <!-- 行程路线标题 -->
                <view class='view_2_title'>
                  <block wx:for="{{item.dayArray}}" wx:for-item="item2" wx:for-index="index2" wx:key="index2">
                    <text class='view_2_title_text' wx:if="item2.type === 7">{{item2.childItem.title}}</text>
                  </block>
                </view>
                <!-- 每日详情 -->
                <view class='view_2_detail'>
                  <block wx:for="{{item.details}}" wx:for-item="item2" wx:for-index="index2" wx:key="index2">
                    <view class='view_2_detail_box'>
                      <!-- 图 -->
                      <image wx:if="{{(item2.img===''&&index===0)||(item2.img===''&&index===tripDays.length-1)}}" class='view_2_detail_image' src='http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190625044641552.jpg'></image>
                      <image wx:elif="{{item2.img===''&&index!==0&&index!==tripDays.length-1}}" class='view_2_detail_image' src='../../../images/product/tripPlaceholder.jpg'></image>
                      <image wx:else class='view_2_detail_image' src='{{item2.img}}?x-oss-process=image/resize,m_fill,w_640,h_390'></image>
                      <!-- 标题 -->
                      <view class='view_2_detail_title' wx:if="{{item2.title!==null&&item2.title!==''}}">{{item2.title}}</view>
                      <!-- 时间 -->
                      <view class='view_2_detail_date' wx:if="{{item2.playTimeHour!==null&&item2.playTimeMinutes!==null}}">游玩时间：约{{item2.playTimeHour===null?0:item2.playTimeHour}}小时{{item2.playTimeMinutes===null?0:item2.playTimeMinutes}}分钟</view>
                      <!-- 门票 -->
                      <view class='view_2_detail_ticket' wx:if="{{item2.ticketName!==null&&item2.ticketName!==''}}">门票：{{item2.ticketName}}</view>
                      <!-- 说明 -->
                      <view class='view_2_detail_content' wx:if="{{item2.content!==null&&item2.content!==''}}">
                        <rich-text nodes="{{item2.content}}"></rich-text>
                      </view>
                    </view>
                  </block>
                </view>
                <!-- 温馨提示 -->
                <view class='view_2_tips' wx:if="{{item.tips.length!==0}}">
                  <view class='view_2_tips_title'>温馨提示</view>
                  <view class='view_2_tips_content'>
                    <rich-text nodes="{{item.tips[0].content}}"></rich-text>
                  </view>
                </view>
                <!-- 餐饮 -->
                <view class='view_2_diet'>
                  <view class='view_2_diet_line'>
                    <image class='view_2_diet_line_image' src='../../../images/product/ico_breakfast.png'></image>
                    <text class='view_2_diet_line_title'>早餐</text>
                    <text class='view_2_diet_line_content'>{{item.can.breakfirst}}</text>
                  </view>
                  <view class='view_2_diet_line'>
                    <image class='view_2_diet_line_image' src='../../../images/product/ico_lunch.png'></image>
                    <text class='view_2_diet_line_title'>午餐</text>
                    <text class='view_2_diet_line_content'>{{item.can.lanuch}}</text>
                  </view>
                  <view class='view_2_diet_line'>
                    <image class='view_2_diet_line_image' src='../../../images/product/ico_dinner.png'></image>
                    <text class='view_2_diet_line_title'>晚餐</text>
                    <text class='view_2_diet_line_content'>{{item.can.dinner}}</text>
                  </view>
                  <view class='view_2_diet_line'>
                    <image class='view_2_diet_line_image' src='../../../images/product/ico_sleep.png'></image>
                    <text class='view_2_diet_line_title'>酒店</text>
                    <text class='view_2_diet_line_content'>{{item.jiu2}}</text>
                  </view>
                </view>

              </view>
            </block>
          </view>
        </view>
        <!-- 费用说明 -->
        <view class='scroll_view_node scroll_view_3' id='scroll_view_3'>
          <view class='scroll_view_title'>
            <text class='scroll_view_title_text'>费用说明</text>
          </view>
          <view class='view_3_include'>
            <view class='view_3_title'>费用包含</view>
            <rich-text class='scroll_view_text' nodes="{{tripCost.feeInclude}}"></rich-text>
          </view>
          <view class='view_3_noinclude'>
            <view class='view_3_title'>费用不含</view>
            <rich-text class='scroll_view_text' nodes="{{tripCost.feeNonInclude}}"></rich-text>
          </view>
        </view>
        <!-- 预定须知 -->
        <view class='scroll_view_node scroll_view_4' id='scroll_view_4'>
          <view class='scroll_view_title'>
            <text class='scroll_view_title_text'>预定须知</text>
          </view>
          <view>
            <view class='view_4_title'>重要提示</view>
            <rich-text class='scroll_view_text' nodes="{{tripReserve.importantTip}}"></rich-text>
          </view>
          <view>
            <view class='view_4_title'>温馨提示</view>
            <rich-text class='scroll_view_text' nodes="{{tripReserve.warmTip}}"></rich-text>
          </view>
          <view>
            <view class='view_4_title'>同行备注</view>
            <rich-text class='scroll_view_text' nodes="{{tripReserve.b2BRemark}}"></rich-text>
          </view>
          <view>
            <view class='view_4_title'>购物店</view>
            <rich-text class='scroll_view_text' nodes="{{tripReserve.shopRemark}}"></rich-text>
          </view>
          <view>
            <view class='view_4_title'>签证说明</view>
            <rich-text class='scroll_view_text' nodes="{{tripReserve.visaRemark}}"></rich-text>
          </view>
        </view>
      </scroll-view>
    </view>
    <view>
      <view class='footer_btnBox' >
        <view class='footer_btnBox_btn' bindtap='goUrlOrder'>立即预定</view>
        <view class='footer_btnBox_btn footer_btnBox_btn_share' bindtap='OpenShareBox'>分享设置</view>
      </view>
    </view>
    <view class='footer_info' wx:if='{{shareSource.c && shareSource.pe && shareSource.ph}}'>
      <view class='footer_info_content'>
        <view class='footer_content1'>{{shareSource.c}}</view>
        <view class='footer_content2' bindtap='callPhone' data-reply-phone="{{shareSource.ph}}">
          <image class='footer_content2_image' src='../../../images/mine/phone.png'></image>
          <text class='footer_content2_text'>{{shareSource.pe}} {{shareSource.ph}}</text>
        </view>
      </view>
    </view>
  </view>
  <view class='zezao' wx:if='{{isOpenShare}}' catchtap='closeShareBox'>
    <view class='shareInfo' catchtap>
      <view class='title'>同行分享设置</view>
      <view class='tips'>印象之旅为保障同行权益</view>
      <view class='tips tips_t'> 接收用户将看到的是直客价，敬请安心转发</view>
      <view class='line-box'>
        <text class='label'>公司名称</text>
        <input class='ipt' type='text' value="{{shareInfo.companyName}}" placeholder-class="ipt_holder" placeholder="请输入公司名称" bindinput="bindCPNameInput"></input>
      </view>
      <view class='line-box'>
        <text class='label'>联系人名称</text>
        <input class='ipt' type='text' value="{{shareInfo.peopleName}}" placeholder-class="ipt_holder" placeholder="请输入联系人名称" bindinput="bindAccountInput"></input>
      </view>
      <view class='line-box'>
        <text class='label'>联系电话</text>
        <input class='ipt' type='text' value="{{shareInfo.phone}}" placeholder-class="ipt_holder" placeholder="请输入联系电话" bindinput="bindPhoneInput"></input>
      </view>
      <view class='line-box'>
        <button class='btn' bindtap='setShare'>保存信息</button>
      </view>
    </view>
  </view>
</view>