<template>
  <div class="wrapper">
    <div class="imgage" v-if="type=='about'">
      <div>便捷生活畅玩无终街</div>
      <!-- <div class="title">{{ loginTitleWay[current].title }}</div>
				<div :class="current == 1 ? 'desc-light' : 'desc'">
					{{ loginTitleWay[current].desc
          }}<span v-if="current == 1">{{ mobile | secrecyMobile }}</span>
				</div> -->
    </div>
    <u-parse v-html="res.content"></u-parse>
  </div>
</template>
<script>
import { getArticleDetail } from "@/api/article";
export default {
  data() {
    return {
      res: "",
      type:"",
      way: {
        user: {
          title: "用户协议",
          type: "USER_AGREEMENT",
        },
        privacy: {
          title: "隐私政策",
          type: "PRIVACY_POLICY",
        },
        message: {
          title: "证照信息",
          type: "LICENSE_INFORMATION",
        },
        about: {
          title: "公司介绍",
          type: "ABOUT",
        },
      },
    };
  },
  mounted() {},
  onLoad(option) {
    uni.setNavigationBarTitle({
      title: this.way[option.type].title,
    });
    this.type = option.type;
    this.init(option);
  },

  methods: {
    init(option) {
      getArticleDetail(this.way[option.type].type).then((res) => {
        if (res.data.success) {
          this.res = res.data.result;
        }
      });
    },
  },
};
</script>
<style lang="scss" scoped>
.wrapper {
  padding: 16rpx;
}
.imgage {
  width: 100%;
  height: 37.5vh;
  background: url("@/static/logn.png");
  background-size: 100% 100%;
  & > div {
    width: 100%;
    height: 80%;
    display: flex;
    justify-content: center;
    align-items: end;
    color: #fff;
    font-size: 14px;
  }
}
</style>
