<template>
  <view class="container selectedBulletin-container" v-if="isUserBindingPhoneNumber">
    <web-view :src="linkurl" v-if="linkurl">
      <cover-view class="search-view">
        <cover-view class="search-view-box" @click="lookBulletinMessage">
          <cover-view>点此提交您的专题需求</cover-view>
        </cover-view>
      </cover-view>
    </web-view>
  </view>
  <not-have-login v-else />
</template>

<script>
import { Report, User, Reports, FreeButton } from "@/config/api.js";
import notHaveLogin from "@/components/notHaveLogin.vue";
export default {
  components: { notHaveLogin },
  data() {
    return {
      linkurl: "",
    };
  },
  methods: {
    /* 获取详情 */
    async getDetail() {
      const res = await Reports.getCollectionDetail();
      if (res.Ret === 200) {
        this.linkurl = res.Data.HttpUrl;
      }
    },
    // 精选看板留言
    lookBulletinMessage() {
      uni.navigateTo({
        url: "/reportPages/bulletinMessage/bulletinMessage",
      });
    },
  },
  onLoad() {
    this.getDetail();
  },
  onShow() {},
};
</script>

<style lang="scss" scoped>
.selectedBulletin-container {
  background-color: #fff;
  padding-bottom: 200rpx;
  padding-bottom: calc(200rpx + constant(safe-area-inset-bottom));
  padding-bottom: calc(200rpx + env(safe-area-inset-bottom));
  .search-view {
    position: fixed;
    width: 100%;
    height: 126rpx;
    background: #fff;
    z-index: 99999;
    font-size: 32rpx;
    box-sizing: border-box;
    .search-view-box {
      display: flex;
      align-items: center;
      justify-content: center;
      background: #3385ff;
      color: #fff;
      height: 126rpx;
      z-index: 99999;
    }
    .search-icon {
      width: 147rpx;
      height: 40rpx;
      margin: 0 15rpx;
      z-index: 99999;
    }
  }
}
</style>
