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

186 lines
3.3 KiB

3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
  1. <template>
  2. <view class="login">
  3. <view class="logo">
  4. <!-- 后续改回接口获取 -->
  5. <image src="../static/auth/logo.png" mode=""></image>
  6. <view class="text">
  7. {{ configList.logo_name }}
  8. </view>
  9. </view>
  10. <view class="btn mt"
  11. @click="wxLogin">
  12. <view class="icon">
  13. <image style="width: 36rpx; height: 30rpx; transform: translateY(5rpx);" src="../static/auth/wx.png" mode=""></image>
  14. </view>
  15. <view class="">
  16. 微信登录
  17. </view>
  18. </view>
  19. <view class="config">
  20. <view style="flex: 1;">
  21. <uv-checkbox-group
  22. v-model="checkboxValue"
  23. shape="circle"
  24. >
  25. <view class="content">
  26. <uv-checkbox
  27. size="28rpx"
  28. icon-size="28rpx"
  29. activeColor="#07C261"
  30. :name="1"
  31. ></uv-checkbox>
  32. 已同意
  33. <text @click="openModal">注册协议隐私协议</text>
  34. </view>
  35. </uv-checkbox-group>
  36. </view>
  37. <view class="flex">
  38. <uv-icon name="info-circle" color="#07C261" size="28rpx"></uv-icon>
  39. </view>
  40. </view>
  41. <agreementModal ref="modal" @confirm="onConfirmAggrement"></agreementModal>
  42. <button class="btn-cancel" :plain="true" :hairline="false" @click="onCancel">
  43. 暂不登录
  44. </button>
  45. </view>
  46. </template>
  47. <script>
  48. import agreementModal from './agreementModal.vue'
  49. export default {
  50. name : 'Login',
  51. data() {
  52. return {
  53. checkboxValue : []
  54. }
  55. },
  56. components: {
  57. agreementModal
  58. },
  59. methods: {
  60. getPhoneNumber(e){
  61. console.log(e, e.detail.code);
  62. this.wxLogin(phoneCode)
  63. },
  64. wxLogin(phoneCode){
  65. if(!this.checkboxValue.length){
  66. return uni.showToast({
  67. title: '请先同意隐私协议',
  68. icon:'none'
  69. })
  70. }
  71. this.$store.commit('login', phoneCode)
  72. },
  73. openModal() {
  74. this.$refs.modal.open()
  75. },
  76. onConfirmAggrement(confirm) {
  77. if (confirm) {
  78. this.checkboxValue = [1]
  79. } else {
  80. this.checkboxValue = []
  81. }
  82. },
  83. onCancel() {
  84. uni.reLaunch({
  85. url: '/pages/index/index'
  86. })
  87. },
  88. }
  89. }
  90. </script>
  91. <style scoped lang="scss">
  92. .login{
  93. display: flex;
  94. justify-content: flex-start;
  95. align-items: center;
  96. height: 100vh;
  97. flex-direction: column;
  98. position: relative;
  99. background: $uni-bg-color;
  100. .logo{
  101. margin-top: 334rpx;
  102. width: 320rpx;
  103. image{
  104. height: 150rpx;
  105. width: 320rpx;
  106. }
  107. .text{
  108. margin-top: 90rpx;
  109. font-size: 38rpx;
  110. font-family: PingFang SC, PingFang SC-Bold;
  111. font-weight: 700;
  112. text-align: center;
  113. color: #000000;
  114. }
  115. }
  116. .btn{
  117. all: unset;
  118. width: 80%;
  119. height: 100rpx;
  120. background-color: #B3997E;
  121. color: #fff;
  122. font-size: 15px;
  123. font-family: PingFang SC, PingFang SC-Regular;
  124. font-weight: 400;
  125. display: flex;
  126. justify-content: center;
  127. align-items: center;
  128. border-radius: 50rpx;
  129. border: none;
  130. .icon{
  131. margin-right: 10rpx;
  132. image{
  133. width: 40rpx;
  134. height: 35rpx;
  135. }
  136. }
  137. }
  138. .mt{
  139. margin-top: 200rpx;
  140. }
  141. .config{
  142. width: 80%;
  143. line-height: 40rpx;
  144. margin-top: 27rpx;
  145. color: #C7C7C7;
  146. text-align: left;
  147. display: flex;
  148. .content {
  149. font-size: 22rpx;
  150. display: flex;
  151. align-items: center;
  152. }
  153. text{
  154. color: #07C261;
  155. }
  156. }
  157. .btn-cancel {
  158. border: none;
  159. font-size: 30rpx;
  160. font-family: PingFang SC, PingFang SC-Regular;
  161. font-weight: 400;
  162. text-align: left;
  163. color: #c7c7c7;
  164. margin-top: 432rpx;
  165. }
  166. }
  167. .flex {
  168. display: flex;
  169. align-items: center;
  170. }
  171. </style>