<template>
  <!-- #ifdef APP-PLUS -->
  <view class="protocol-entry" :style="entryStyle" @click="toProtocol">
    查看《用户协议》和《隐私协议》
  </view>
  <!-- #endif -->
</template>

<script>
export default {
  name: 'yt-protocol-entry',
  props: {
    // 字体主题 ,黑白两色
    color: {
      type: String,
      default: '' // 'black' 
    },
    customStyle: {
      type: String,
      default: '' // 'black' 
    },
    protocol: {
      type: String,
      default: '/pages/protocol' // 'black' 
    },
  },
  computed: {
    entryStyle() {
      let style = ''
      if(this.color){
        style = `color:${this.color};`
      }
      return style + this.customStyle
    }
  },
  methods: { 
    toProtocol(){
      uni.$yt.route(this.protocol)
    }
  }
 }
</script>

<style lang="scss" scoped>
.protocol-entry{
  color: #ffffff;
  font-size: 28rpx;
  width: 100%;
  margin-top:20rpx;
  text-align: center;
  line-height: 36rpx;
  position: relative;
  display: none;
}
</style>
