<template>
   <!-- <van-popup closeable round :show="showPopup" @close="handleClosePopup"  custom-style="width:90%;padding:20px;height:80%">
     <rich-text :nodes="nodeHtml"></rich-text>
   </van-popup> -->
   <uni-popup ref="popup" type="center" :mask-click="false">
    <view class="content">
      <view class="text">
        <rich-text :nodes="nodeHtml"></rich-text>
      </view>
      <button @tap="close">我已确认</button>
    </view>
   </uni-popup>
</template>

<script>
import htmlParser from "@/utils/htmlParser";

export default {
  data() {
    return {
      nodeHtml:'',
      showPopup:false,
    };
  },
  onLoad(options){
   console.log(options)
  
  },
  methods: {
    open({content}) {
      console.log('程序进来了吗',content)
      this.showPopup=true;
      this.$refs.popup.open();
      //接受富文本字符串
      if(content){
        // #ifdef MP-WEIXIN
        this.nodeHtml = content;
        // #endif
        // #ifdef MP-ALIPAY
        this.nodeHtml = htmlParser(content);
        // #endif
      }
       
    },
    handleClosePopup(){
      this.showPopup=false;
    },
    confirm() {},
    close() {
      this.$refs.popup.close();
    },
    handleCheckChange() {
      console.log(this.disable);
    },
    handleService(){

    },
    handlePrivate(){

    }
  },
};
</script>
<style lang="scss" scoped>
.van-popup {
  width: 80%;
  padding: 20rpx;
}
.content {
  width: 80vw;
  height: 70vh;
  padding: 15px;
  border-radius: 10px;
  background-color: #fff;
  .text {
    height: calc(70vh - 55px);
    overflow: auto;
  }
  button {
    width: 80vw;
    background-color: #1676fe;
    position: absolute;
    bottom: 10px;
  }
}

</style>
