<template>
  <u-popup :show="popupShow" bgColor="transparent" :safeAreaInsetBottom="false" @close="close" @open="open">
    <view class="popupBox">
      <view class="popupBox_title">
        <image class="popupBox_title_img13"  src="https://guess-shop.oss-cn-beijing.aliyuncs.com/static/online/img13.png" mode="" />
        <image class="popupBox_title_img12"  src="https://guess-shop.oss-cn-beijing.aliyuncs.com/static/online/img14.png" mode="" />
        <view>
          <view class="popupBox_title_l">订单核销完成
          </view>
        </view>
      </view>
      <view class="popupBox_content">
        <view class="">
          <view class="popupBox_point" v-if="form.giftPoints">恭喜获得{{form.givePointsExpect}}礼包豆</view>
          <!-- <image src="https://guess-shop.oss-cn-beijing.aliyuncs.com/static/online/img15.png" mode="" /> -->
          <image v-if="form.orderType!=1" @click="goPath(`/pages/game/index?orderNumber=${form.orderNumber}`)" src="/static/img47.png" mode="" />
          <image @click="goGiftPackageCenter()" class="mb44" src="/static/img48.png" mode="" />
          <view class="btnBox" @click="goBack()">
            <view>返回</view>
          </view>
        </view>
      </view>
    </view>
  </u-popup>
</template>

<script>
export default {
	props:{
		form:{
			type:Object,
			default:()=>{}
		}
	},
  data () {
    return {
      popupShow: false
    }
  },
  methods: {
    openFun () {
      this.popupShow = true;
    },
    close () {
      this.popupShow = false
    },
    goBack () {
      uni.navigateBack()
    },
	goPath (path) {
	  uni.navigateTo({
	    url: path,
	  })
	},
	goGiftPackageCenter(){
		uni.switchTab({
			url:"/pages/tabBar/giftPackageCenter"
		})
	}
  }
}
</script>

<style lang='scss' scoped>
.popupBox {
  position: relative;
  .popupBox_title {
    width: 100%;
    position: absolute;
    top: -93rpx;
    z-index: 10;
    > .popupBox_title_img13 {
      width: 695rpx;
      height: 194rpx;
    }
    .popupBox_title_img12 {
      width: 235rpx;
      height: 190rpx;
      position: absolute;
      top: -4rpx;
      right: 17rpx;
    }
    > view {
      display: flex;
      align-items: center;
      padding: 65rpx 0 0 30rpx;
      position: absolute;
      top: 0;
      left: 0;
      .popupBox_title_l {
        font-size: 48rpx;
        color: #ffffff;
        font-family: FZCuYuan-M03;
        margin-right: 100rpx;
        text {
          font-size: 32rpx;
          color: #ffffff;
          display: inline-block;
          margin-left: 20rpx;
        }
      }
      .popupBox_title_r {
        .popupBox_title_r_l {
          font-size: 26rpx;
          color: #ffffff;
          text-decoration: line-through;
        }
        .popupBox_title_r_r {
          font-size: 32rpx;
          color: #ffffff;
          font-family: FZCuYuan-M03;
          text-decoration: none;
        }
      }
    }
  }
  .popupBox_content {
    padding: 55rpx 0rpx 0;
    background: linear-gradient(180deg, #c90700 0%, #ffe8e6 58%, #ffffff 32%);
    border-radius: 40rpx 40rpx 0rpx 0rpx;
    background-size: 100% 1900rpx;
    background-position-y: -300rpx;
    > view {
      background: linear-gradient(180deg, #ffedec 0%, #ffffff 39%);
      border-radius: 40rpx 40rpx 0rpx 0rpx;
      padding: 50rpx 0rpx 20rpx;
      position: relative;
      z-index: 11;
      text-align: center;
      .popupBox_point {
        font-size: 34rpx;
        color: #1a1a1a;
        font-family: FZCuYuan-M03;
        margin-bottom: 8rpx;
      }
      image {
        width: 690rpx;
        height: 148rpx;
        // margin-bottom: 90rpx;
        margin-top: 30rpx;
      }
      .mb44 {
        margin-bottom: 44rpx;
      }
      .btnBox {
        width: 100%;
        padding: 35rpx 50rpx;
        box-sizing: border-box;
        border-top: 1rpx solid #e7e7e7;
        background: #ffffff;
        > view {
          height: 80rpx;
          background: #fb0b03;
          border-radius: 40rpx;
          font-size: 32rpx;
          color: #ffffff;
          text-align: center;
          line-height: 80rpx;
        }
      }
    }
  }
}
</style>