推广小程序前端代码
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.

155 lines
3.2 KiB

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