商城类、订单类uniapp模板,多角色
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
2.7 KiB

7 months ago
1 month ago
7 months ago
4 months ago
7 months ago
4 months ago
7 months ago
1 month ago
7 months ago
4 months ago
7 months ago
6 months ago
7 months ago
4 months ago
7 months ago
  1. <template>
  2. <view class="login">
  3. <view class="logo">
  4. <!-- <image src="/static/image/login/logo.png" mode=""></image> -->
  5. </view>
  6. <view class="title">
  7. 欢迎使用酒店桌布租赁平台
  8. </view>
  9. <view class="btn mt"
  10. @click="wxLogin">
  11. <view class="icon">
  12. <image src="../static/auth/wx.png" mode=""></image>
  13. </view>
  14. <view class="">
  15. 微信授权登录
  16. </view>
  17. </view>
  18. <!-- <view class="btn b2">
  19. 使用短信验证登录
  20. </view> -->
  21. <view class="btn b2"
  22. @click="qux">
  23. 取消登录
  24. </view>
  25. <view class="config">
  26. <uv-checkbox-group
  27. v-model="checkboxValue"
  28. shape="circle">
  29. <view class="content">
  30. <view
  31. style="display: flex;">
  32. <uv-checkbox
  33. size="40rpx"
  34. icon-size="30rpx"
  35. activeColor="#FD5100"
  36. :name="1"
  37. ></uv-checkbox>
  38. 阅读并同意我们的<text @click="$refs.popup.open('getPrivacyPolicy')">服务协议与隐私条款</text>
  39. </view>
  40. <view class="">
  41. 以及<text @click="$refs.popup.open('getUserAgreement')">个人信息保护指引</text>
  42. </view>
  43. </view>
  44. </uv-checkbox-group>
  45. </view>
  46. <configPopup ref="popup"></configPopup>
  47. </view>
  48. </template>
  49. <script>
  50. export default {
  51. name : 'Login',
  52. data() {
  53. return {
  54. checkboxValue : []
  55. }
  56. },
  57. methods: {
  58. wxLogin(){
  59. if(!this.checkboxValue.length){
  60. return uni.showToast({
  61. title: '请先同意隐私协议',
  62. icon:'none'
  63. })
  64. }
  65. this.$store.commit('login')
  66. },
  67. qux(){
  68. uni.reLaunch({
  69. url: '/pages/index/index'
  70. })
  71. },
  72. }
  73. }
  74. </script>
  75. <style scoped lang="scss">
  76. .login{
  77. display: flex;
  78. justify-content: center;
  79. align-items: center;
  80. height: 80vh;
  81. flex-direction: column;
  82. position: relative;
  83. .logo{
  84. height: 140rpx;
  85. width: 140rpx;
  86. background-color: #ddd;
  87. border-radius: 30rpx;
  88. image{
  89. height: 140rpx;
  90. width: 140rpx;
  91. border-radius: 30rpx;
  92. }
  93. margin-bottom: 20rpx;
  94. }
  95. .title{
  96. position: relative;
  97. font-weight: 900;
  98. font-size: 45rpx;
  99. &::after{
  100. content: '';
  101. position: absolute;
  102. left: 0;
  103. top: 100%;
  104. display: block;
  105. height: 8rpx;
  106. width: 210rpx;
  107. background: linear-gradient(to right,$uni-color, #fff);
  108. }
  109. }
  110. .btn{
  111. width: 80%;
  112. height: 100rpx;
  113. background-color: $uni-color;
  114. color: #fff;
  115. display: flex;
  116. justify-content: center;
  117. align-items: center;
  118. margin: 20rpx 0;
  119. border-radius: 20rpx;
  120. .icon{
  121. margin-right: 10rpx;
  122. image{
  123. width: 40rpx;
  124. height: 35rpx;
  125. }
  126. }
  127. }
  128. .b2{
  129. background-color: rgba($uni-color, 0.2);
  130. color: $uni-color;
  131. }
  132. .mt{
  133. margin-top: 200rpx;
  134. }
  135. .config{
  136. position: absolute;
  137. bottom: 0;
  138. font-size: 24rpx;
  139. text-align: center;
  140. line-height: 40rpx;
  141. text{
  142. color: $uni-color;
  143. }
  144. }
  145. }
  146. </style>