// An highlighted block
<template>
  <view class="content" style="position: relative;">
    <cu-custom bgColor="bg-gray" :isBack="false">
      <block slot="content">
        登录
      </block>
    </cu-custom>
    <view class="avatorWrapper">
      <view class="avator">
        <image class="img" style="margin-top: 80px;" src="../../static/login/youxianxin.png" mode="widthFix"></image>
      </view>
    </view>
    <view class="loginBtn" style="bottom:350px" @click="login(1)">
      <text class="btnValue">微信授权登录</text>
    </view>
    <view class="loginBtn" style="bottom:290px;border:0.5px #DBDBDB solid;background: white;" @click="login(2)">
      <text class="btnValue" style="color:#111111;">手机号验证登录</text>
    </view>


    <view style="position: absolute;bottom: 30px;left: 20px;">
      <view>
        <u-checkbox-group>
          <u-checkbox active-color="#FC6035" shape="circle" v-model="isChecked" name="checked">
            <view class="text-sm text-gray">我已阅读并同意
              <a @click="goYs('1')" style="color:#FC6035">《隐私政策》</a>
            </view>
          </u-checkbox>
        </u-checkbox-group>
      </view>
    </view>
  </view>
</template>

<script>
import {redirect_uri} from '../../common/http.interceptor'

export default {

  data() {
    return {
      title: 'Hello',
      isChecked: true,
      code: '',
    }
  },
  onLoad() {
  },
  methods: {
    goYs(flag){
      uni.redirectTo({
        url: './treaty?type='+flag
      });
    },
    login(flag) {
      if (this.isChecked) {
        if (flag == 2) {
          uni.redirectTo({
            url: './index'
          });
        }else if (flag == 1){
          window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxb8aac61262a027d6&redirect_uri="+ redirect_uri +"&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect";
        }
      } else {
        this.$u.toast('请先阅读并同意隐私政策');
        return;
      }
    },
  }
}
</script>

<style>

.uni-checkbox .uni-checkbox-input {
  border-color: #CCCCCC !important;
  border-radius: 20px !important;
  color: #FC6035 !important;
  width: 20px !important;
  height: 20px !important;
  margin-right: 5px !important;
}

.lia {
  width: 690 rpx;
  height: 105 rpx;
  margin: 0 auto;
  border-bottom: 1 rpx solid #f1f1f1;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
}

.shuruqian {
  height: 50 rpx;
  width: 60%;
  font-size: 32 rpx;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
}

.shuruhou {
  height: 50 rpx;
  width: 60%;
  font-size: 36 rpx;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: #333333;
}

.huoqu {
  font-size: 32 rpx;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: #2d8bff;
}

.huoquzhong {
  width: 110px;
  font-size: 13px;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: #FC6035;
}

.icon_close {
  float: right;
  display: block;
  margin-top: -45px;
  margin-right: 0px;
}

.content {
  background: white;
  width: 100vw;
  height: 100vh;
}

.avatorWrapper {
  height: 30vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.avator {
  width: 150px;
  height: 200px;
  overflow: hidden;
}

.avator .img {
  width: 100%
}

.form {
  padding: 0 100 upx;
  margin-top: 50px;
}

.inputWrapper {
  width: 100%;
  height: 45px;
  background: #EEEEEE;
  border-radius: 25px;
  box-sizing: border-box;
  padding: 0 20px;
  margin-top: 25px;
}

.inputWrapper .input {
  width: 100%;
  height: 100%;
  text-align: left;
  font-size: 15px;
}

.loginBtn {
  position: absolute;
  width: 75%;
  height: 43px;
  background: #FC6035;
  border-radius: 27px;
  margin-top: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 200px 54px 0px 54px;
  bottom: 20px;
}

.loginBtn .btnValue {
  color: white;
}

.forgotBtn {
  text-align: center;
  color: #EAF6F9;
  font-size: 15px;
  margin-top: 20px;
}
a:link{text-decoration:none;   /* 指正常的未被访问过的链接*/

}
a:visited{text-decoration:none; /*指已经访问过的链接*/

 }
a:hover{text-decoration:none;/*指鼠标在链接*/}a:active{text-decoration:none;}
</style>
