appLogin.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <template>
  2. <view>
  3. <view class="top_text">
  4. <view>您好,</view>
  5. <view>欢迎来到云联商城!</view>
  6. </view>
  7. <view class="numberbtn">
  8. <button @click="phoneLogin()" class="log-bnt log-a" :disabled="loading">
  9. {{ loading ? '登录中...' : '本机号码一键登录' }}</button>
  10. <view @click="otherLogin()" class="log-bnt log-b">其他方式登录</view>
  11. </view>
  12. <view class="tips">
  13. <checkbox :checked="isAgreement" @click="handleAgreement()" color='#fff'
  14. activeBackgroundColor='#018C39 ' borderColor='#EDEEEF' activeBorderColor='#EDEEEF'/>
  15. <view @click="handleAgreement()">您同意并接受</view>
  16. <view class="btn" @click="openH5('/h5/userAgreement')">《用户协议》</view>
  17. <view class="btn" @click="openH5('/h5/privacyPolicy')">《隐私保护》</view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. data() {
  24. return {
  25. isAgreement:false,
  26. loading: false, // 防止重复点击
  27. loginType:3,//1账号密码 2:微信登录 3:手机号一键登录
  28. providerList: [], // 支持的登录服务列表
  29. univerifyStyle: { // 一键登录弹窗样式配置(可选)
  30. fullScreen: true,
  31. backgroundColor: '#ffffff'
  32. }
  33. }
  34. },
  35. methods: {
  36. handleAgreement(){
  37. this.isAgreement=!this.isAgreement;
  38. },
  39. openH5(url){
  40. var requestPath = uni.getStorageSync('requestPath');
  41. uni.setStorageSync('url',requestPath+url);
  42. uni.navigateTo({
  43. url: '../home/h5'
  44. })
  45. },
  46. phoneLogin(){
  47. if(!this.isAgreement){
  48. uni.showToast({
  49. icon:'none',
  50. title: "请先同意协议后再登录",
  51. });
  52. return false;
  53. }
  54. this.$showLoginPage()
  55. },
  56. otherLogin(){
  57. uni.navigateTo({
  58. url:'/pages/auth/passwordLogin'
  59. })
  60. }
  61. }
  62. }
  63. </script>
  64. <style scoped lang="scss">
  65. .top_text{
  66. padding-top: 240rpx;
  67. font-size: 52rpx;
  68. font-weight: bold;
  69. margin-left: 60rpx;
  70. }
  71. .numberbtn{
  72. display: flex;
  73. flex-direction: column;
  74. align-items: center;
  75. padding-top: 200rpx !important;
  76. padding: 0 80rpx;
  77. }
  78. .log-bnt{
  79. padding: 20rpx 0;
  80. width: 100%;
  81. text-align: center;
  82. }
  83. .log-a{
  84. background: linear-gradient(135deg, #38e663 0%, #018C39 100%);
  85. border-radius: 80rpx;
  86. color: #fff;
  87. }
  88. .log-b{
  89. border-radius: 80rpx;
  90. border: 2rpx solid #999999;
  91. margin-top: 40rpx;
  92. }
  93. .tips{
  94. margin-top: 30rpx;
  95. display: flex;
  96. justify-content: center;
  97. align-items: center;
  98. font-size: 28rpx;
  99. color: #000;
  100. .btn{
  101. color: #018C39;
  102. }
  103. }
  104. /deep/ .uni-checkbox-input {
  105. border-radius: 50% !important;
  106. }
  107. </style>