<!--pages/home/xyc/wdyw/wdyw.wxml-->
<!--返回图标-->
<view class="top-header">
  <view class="header-reback" bindtap="go2Reback"></view>
  <view class="header-title">我的愿望</view>
</view>

<!-- 愿望内容 -->
<view class="body">
  <!-- 背景 -->
  <view class="ywbjt1"><view class="xycbg2"></view></view>
  <!-- 列表 -->
  <view class="wishbox">
      <view wx:for="{{wishes}}" wx:key="index">
          <view class="boxitem" bindtap="go2WishDetail" data-wish="{{item}}">
              <!-- 许愿图片 -->
              <t-image src="{{item.img}}" class="boximg"></t-image>
              <!-- 许愿内容 -->
              <view class="wishbox-text">
                <view class="boxtitle">{{item.content}}</view>
                <view class="qwsjbox">期望时间：{{item.deadline}}</view>
              </view>
              <!-- 图标 -->
              <view class="xy-icon" wx:if="{{item.status=='processing'}}">
                <t-image class="icon" src="https://oss.wish.ydxxkj.top/xy/jt.gif"></t-image>
                <view class="text">进行中</view>
              </view>

              <view class="xy-icon" wx:if="{{item.status=='completed'}}">
                <t-image class="icon" src="https://wish-assets.windymuse.com.cn/xy/ywc.png"></t-image>
                <view class="text">已完成</view>
              </view>

              <view class="xy-icon" wx:if="{{item.status=='expired'}}">
                <t-image class="icon" src="https://wish-assets.windymuse.com.cn/xy/ygq.png"></t-image>
                <view class="text">已过期</view>
              </view>
          </view>
      </view>
  </view>
</view>




<!--愿望详情-->
<t-popup visible="{{visible}}" show-overlay="{{false}}" bind:visible-change="onVisibleChange" placement="top" class="myCanvas-popup">

<view class="box-canvas">
  <canvas canvas-id="myCanvas" class="myCanvas" wx:if="{{showCanvas}}"></canvas>
  <view id="my-canvas" class="my_canvas" bindtap="changeVisible">
    <image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/ywc.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/ywc.png" wx:if="{{detail.status=='completed'}}"></image>
    <image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/jxzdt.gif" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/jxzdt.gif" wx:if="{{detail.status=='processing'}}"></image>
    <image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/ygq.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/ygq.png" wx:if="{{detail.status=='expired'}}"></image>
    <image class="popbox my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/detailbkg.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/detailbkg.png"/>
    <image class="yximg my_draw_canvas" src="{{detail.img}}" data-type="image" data-url="{{detail.img}}"/>
    <text class="ywwz my_draw_canvas" data-type="text" data-text="愿望">愿望</text>
    <view class="ywxq my_draw_canvas" data-type="text" data-text="{{detail.content}}">{{detail.content}}</view>
    <view class="qwsj my_draw_canvas" data-type="text" data-text="期望时间">期望时间</view>
    <view class="qwsjtxt my_draw_canvas" data-type="text" data-text="{{detail.deadline}}">{{detail.deadline}}</view>
  </view>
</view>


  <view class="ywcczk" wx:if="{{detail.status=='processing'}}"><!--进行中按钮展示-->
    <view class="anwz1">
        <view class="yqq" bindtap="go2DelDialog"></view>
        <view class="anwztxt1">删除</view>
        <t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lsc.png"></t-image>
    </view>
    <view class="anwz1">
        <view class="yqq"></view>
        <view class="anwztxt1">修改</view>
        <t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lxg.png"></t-image>
    </view>
    <view class="anwz1">
        <view class="yqq" bindtap="doFinishWish"></view>
        <view class="anwztxt1" >已达成</view>
        <t-image bindtap="doFinishWish" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lydc.png"></t-image>
    </view>
    <view class="anwz1" bindtap="showShare">
        <view class="yqq"></view>
        <view class="anwztxt1">分享</view>
        <t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lfc.png"></t-image>
    </view>
  </view>
  <view class="ywcczk" wx:if="{{detail.status=='completed'}}"><!--已完成按钮展示-->
    <view class="anwz1">
        <view class="yqq" bindtap="go2DelDialog"></view>
        <view class="anwztxt1">删除</view>
        <t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lsc.png"></t-image>
    </view>
    <view class="anwz1" bindtap="showShare">
        <view class="yqq"></view>
        <view class="anwztxt1">分享</view>
        <t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lfc.png"></t-image>
    </view>
  </view>
  <view class="ywcczk" wx:if="{{detail.status=='expired'}}">
    <view class="anwz1">
        <view class="yqq" bindtap="go2DelDialog"></view>
        <view class="anwztxt1">删除</view>
        <t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lsc.png"></t-image>
    </view>
    <view class="anwz1">
        <view class="yqq"></view>
        <view class="anwztxt1">修改</view>
        <t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lxg.png"></t-image>
    </view>
  </view><!--已过期按钮展示-->

  
</t-popup>

<!--确定删除对话框-->
<t-dialog
data-del="{{detail.id}}"
  visible="{{showDelDialog}}"
  content="确定要删除愿望吗？"
  confirm-btn="{{ confirmBtn }}"
  cancel-btn="取消"
  confirm-btn="确定"
  bind:confirm="confirmDelDialog"
  bind:cancel="closeDelDialog"
/>

<!-- 分享 -->
<t-popup visible="{{shareVisible}}" placement="bottom">
  <view class="popup-main">
    <view class="main-top">
      <view></view>
      <view class="text">分享到</view>
       <t-icon name="close" size="32" bindtap="showShare"/>
    </view>
    <view class="main-box">
      <view class="box-item">
          <button open-type="share" class="item-icon" bindtap="shareWx">
            <t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-wx.png"></t-image>
          </button>
          <view class="item-text">微信</view>
      </view>
      <view class="box-item">
          <view class="item-icon cyan">
            <t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-pyq.png"></t-image>
          </view>
          <view class="item-text">朋友圈</view>
      </view>
      <view class="box-item">
          <view class="item-icon orange">
            <t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-wb.png"></t-image>
          </view>
          <view class="item-text">微博</view>
      </view>
      <view class="box-item">
          <view class="item-icon blue">
            <t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-qq.png"></t-image>
          </view>
          <view class="item-text">QQ</view>
      </view>
      <view class="box-item">
          <view class="item-icon yellow">
            <t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-qqkj.png"></t-image>
          </view>
          <view class="item-text">QQ空间</view>
      </view>
      <view class="box-item">
          <view class="item-icon orange" bindtap="getImg">
            <t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-tp.png"></t-image>
          </view>
          <view class="item-text">生成图片</view>
      </view>
    </view>
  </view>
</t-popup>
