<template>
  <view>
    <u-mask :show="show">
      <view class="w-560rpx mx-auto flex text-white items-center justify-center h-full flex-col ">
        <view @click="close" class="w-full flex items-end justify-end mb-30rpx">
          <image class="w-48rpx h-48rpx " src="/static/images/app/app_update_close.png" mode=""></image>
        </view>
        <view v-if="item.image" :style="[{ backgroundImage: 'url(' + item.image + ')' }]"  @click="jumpByOption(item)" class="bg rounded-25rpx flex items-center justify-end flex-col pb-90rpx">
          <!-- <view class="text-md ">{{money}}配额分润</view>
           <view @click="confirm" class="mt-60rpx">
             <image class="h-60rpx " src="/static/images/app/popup_button.png" mode="heightFix"></image>
           </view> -->
           <!--  -->
        </view>
      </view>
    </u-mask>
  </view>
</template>

<script>
  export default {
    name: "popup-view",
    props: {
      value: {
        type: Boolean,
        default: false,
      },
      item: {
        type: Object,
        default: () => {}
      }
    },
    computed: {
      show: {
        get() {
          return this.value
        },
        set(val) {
          this.$emit('input', val)
        }
      }
    },
    data() {
      return {

      };
    },
    methods: {
      //关闭弹窗
      close() {
        this.show = false
      },
      jumpByOption(e) {
        const whiteRouter = ['/pageA/user_sign/index'];
        if (!!e.jump_link) {
          if (e.jump_type == 1) {
            if (whiteRouter.findIndex((el) => el.includes(e.jump_link)) >= 0) this.$u.routeAuth(e.jump_link);
            else this.$u.route(e.jump_link);
          } else if (e.jump_type == 2) {
            this.$u.route(`/pages/web_view/index?url=${e.jump_link}`);
          }
        }
        this.show=false
      },

    }
  }
</script>

<style lang="scss" scoped>
  .bg {
    height:900rpx;
    width: 100%;
    margin: 0 auto;
    // background-image: url('/static/images/app/popup_bg.png');
    background-size: 100% 100%;
    // background-size:100% ;
  }
</style>
