推广小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

147 lines
2.9 KiB

1 year ago
11 months ago
1 year ago
11 months ago
1 year ago
11 months ago
1 year ago
11 months ago
11 months ago
1 year ago
11 months ago
11 months ago
1 year ago
11 months ago
1 year ago
  1. <template>
  2. <div class="login">
  3. <!-- logo -->
  4. <div class="logo">
  5. <image :src="configList.logo_image" mode=""></image>
  6. </div>
  7. <!-- 标题 -->
  8. <view class="login-title">{{ configList.logo_name }}</view>
  9. <!-- 登录按钮 -->
  10. <view @click="login" class="login-btn">
  11. <uni-icons type="weixin" size="30" color="#fff"></uni-icons>
  12. <text class="wx">微信登录</text>
  13. </view>
  14. <view @click="toHome"
  15. class="uni-uncolor-btn">
  16. <text class="wx">取消登录</text>
  17. </view>
  18. <!-- 隐私政策 -->
  19. <view class="privacy">
  20. <uv-radio-group>
  21. <uv-checkbox-group v-model="consent">
  22. <uv-checkbox :size="30" shape="circle" active-color="#05C160" :name="privacy"></uv-checkbox>
  23. </uv-checkbox-group>
  24. 已同意<text class="privacy-title" @click="jump(1)">隐私政策</text>
  25. <text class="privacy-title" @click="jump(2)">用户协议</text>
  26. </uv-radio-group>
  27. </view>
  28. <!-- 隐私政策弹框 -->
  29. <PrivacyAgreementPoup></PrivacyAgreementPoup>
  30. </div>
  31. </template>
  32. <script>
  33. import PrivacyAgreementPoup from '@/components/PrivacyAgreementPoup/PrivacyAgreementPoup.vue'
  34. export default {
  35. name : "wxLogin",
  36. components : { PrivacyAgreementPoup },
  37. data() {
  38. return {
  39. consent : []
  40. }
  41. },
  42. methods: {
  43. login() {
  44. if(this.consent.length <= 0){
  45. return uni.showToast({
  46. icon: "none",
  47. title: "请勾选隐私协议"
  48. })
  49. }
  50. this.$store.commit('login')
  51. },
  52. jump(type) {//1 隐私协议 2服务条款
  53. if(type == 1) {
  54. uni.navigateTo({
  55. url:'/pages_login/yinsixieyi'
  56. })
  57. }else {
  58. uni.navigateTo({
  59. url:'/pages_login/fuwutiaokuan'
  60. })
  61. }
  62. },
  63. toHome(){
  64. uni.switchTab({
  65. url: '/pages/index/index'
  66. })
  67. }
  68. }
  69. }
  70. </script>
  71. <style lang="scss" scoped>
  72. .login {
  73. display: flex;
  74. flex-direction: column;
  75. justify-content: center;
  76. align-items: center;
  77. min-height: 100vh;
  78. background: white;
  79. // logo
  80. .logo {
  81. display: flex;
  82. align-items: center;
  83. justify-content: center;
  84. image {
  85. width: 200rpx;
  86. height: 200rpx;
  87. border-radius: 20rpx;
  88. }
  89. }
  90. // 标题
  91. .login-title {
  92. font-size: 40rpx;
  93. font-weight: bold;
  94. margin: 20rpx 0rpx;
  95. }
  96. //登录按钮
  97. .login-btn {
  98. display: flex;
  99. justify-content: center;
  100. align-items: center;
  101. width: 70%;
  102. background: #05C160;
  103. height: 90rpx;
  104. border-radius: 45rpx;
  105. color: white;
  106. margin-top: 200rpx;
  107. .wx {
  108. margin-left: 10rpx;
  109. }
  110. }
  111. .uni-uncolor-btn{
  112. display: flex;
  113. justify-content: center;
  114. align-items: center;
  115. width: 70%;
  116. height: 90rpx;
  117. padding: 0;
  118. }
  119. //隐私政策
  120. .privacy {
  121. display: flex;
  122. align-items: center;
  123. margin-top: 20rpx;
  124. &::v-deep .uv-checkbox-group {
  125. align-items: center !important;
  126. justify-content: center !important;
  127. flex-wrap : nowrap !important;
  128. }
  129. .privacy-title {
  130. color: #05C160;
  131. }
  132. }
  133. }
  134. </style>