loginV2.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <template>
  2. <view class="container">
  3. <view class="main-container">
  4. <view class="logo"></view>
  5. <view class="main-img"></view>
  6. <view class="phone-number">13588888888</view>
  7. <view class="agreement">
  8. <view class="check-box" @click="checked = !checked">
  9. <image src="@/static/images/jobApplicant/check.svg" v-if="checked" mode="scaleToFill" />
  10. <image src="@/static/images/jobApplicant/border.svg" v-else mode="scaleToFill" />
  11. </view>
  12. <view class="content">
  13. 已阅读并同意<navigator url="/my/setting/xieyi">《亿职赞用户协议》</navigator>
  14. 和<navigator url="/my/setting/mimi">《隐私协议》</navigator>,允许亿职赞统一管理本人账号信息
  15. </view>
  16. </view>
  17. <u-button class="login-btn" shape="circle" :hairline="false" @click="login">一键登录</u-button>
  18. <view class="other-login">
  19. <view class="other-type">
  20. <view class="icon"></view>
  21. <view class="text">微信登录</view>
  22. </view>
  23. <view class="other-type">
  24. <view class="icon"></view>
  25. <view class="text">其他手机登录</view>
  26. </view>
  27. </view>
  28. </view>
  29. <view class="footer">
  30. <view class="link">企业套餐咨询</view>
  31. <view class="link">投诉举报</view>
  32. <view class="link">资质信息</view>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. export default {
  38. data() {
  39. return {
  40. checked: false
  41. }
  42. },
  43. onLoad() {
  44. // this.handleLogin()
  45. // uni.getPhoneNumber({
  46. // provider: 'univerify',
  47. // success: (res) => {
  48. // console.log('fail----------------')
  49. // console.log(JSON.parse(JSON.stringify(err)))
  50. // },
  51. // fail: (err) => {
  52. // console.log('fail----------------')
  53. // console.log(JSON.parse(JSON.stringify(err)))
  54. // }
  55. // })
  56. },
  57. methods: {
  58. login() {
  59. if (!this.checked) {
  60. uni.showToast({
  61. title: '请阅读并同意协议',
  62. icon: 'none'
  63. })
  64. return
  65. }
  66. this.handleLogin()
  67. console.log('点击登录')
  68. },
  69. handleLogin() {
  70. uni.login({
  71. provider: 'univerify',
  72. univerifyStyle: {
  73. fullScreen: true,
  74. icon: {
  75. path: 'static/images/logo.jpg',
  76. },
  77. authButton: {
  78. normalColor: '#016BF6'
  79. // "normalColor": "#3479f5", // 授权按钮正常状态背景颜色 默认值:#3479f5
  80. // "highlightColor": "#2861c5", // 授权按钮按下状态背景颜色 默认值:#2861c5(仅ios支持)
  81. // "disabledColor": "#73aaf5", // 授权按钮不可点击时背景颜色 默认值:#73aaf5(仅ios支持)
  82. },
  83. otherLoginButton: {
  84. visible: false,
  85. },
  86. privacyTerms: {
  87. defaultCheckBoxState: false,
  88. uncheckedImage: 'static/images/onKeyLogin/unchecked.png',
  89. checkedImage: 'static/images/onKeyLogin/checked.png',
  90. privacyItems: [
  91. {
  92. "url": "https://h5.bosszan.com/my/setting/xieyi", // 点击跳转的协议详情页面
  93. "title": "亿职赞用户协议" // 协议名称
  94. },
  95. {
  96. "url": "https://h5.bosszan.com/my/setting/mimi", // 点击跳转的协议详情页面
  97. "title": "隐私协议" // 协议名称
  98. },
  99. ]
  100. },
  101. buttons: {
  102. iconWidth: '45px',
  103. list: [
  104. {
  105. provider: 'weixin',
  106. iconPath: 'static/images/onKeyLogin/wechat.png'
  107. },
  108. {
  109. provider: 'phone',
  110. iconPath: 'static/images/onKeyLogin/phone.png'
  111. }
  112. ]
  113. }
  114. },
  115. success: (res) => {
  116. console.log(JSON.parse(JSON.stringify(res)))
  117. },
  118. fail: (err) => {
  119. console.log(JSON.parse(JSON.stringify(err)))
  120. }
  121. })
  122. }
  123. }
  124. }
  125. </script>
  126. <style lang="scss" scoped>
  127. .container {
  128. height: 100vh;
  129. display: flex;
  130. flex-direction: column;
  131. justify-content: space-between;
  132. padding: 0 70rpx;
  133. .logo {
  134. width: 204rpx;
  135. height: 56rpx;
  136. background-color: gray;
  137. margin: 72rpx auto 92rpx;
  138. }
  139. .main-img {
  140. width: 400rpx;
  141. height: 400rpx;
  142. background-color: gray;
  143. margin: 0 auto 34rpx;
  144. }
  145. .phone-number {
  146. font-size: 56rpx;
  147. font-weight: bold;
  148. line-height: 68rpx;
  149. text-align: center;
  150. }
  151. .agreement {
  152. display: flex;
  153. align-items: flex-start;
  154. font-size: 24rpx;
  155. color: #605d67;
  156. margin: 40rpx auto 68rpx;
  157. .check-box {
  158. display: flex;
  159. justify-content: center;
  160. align-items: center;
  161. margin-right: 16rpx;
  162. image {
  163. width: 24rpx;
  164. height: 24rpx;
  165. margin-top: 6rpx;
  166. }
  167. }
  168. .content {
  169. display: flex;
  170. flex-wrap: wrap;
  171. word-wrap: break-word;
  172. flex: 1;
  173. }
  174. navigator {
  175. color: #016bf6;
  176. }
  177. }
  178. .login-btn {
  179. width: 600rpx;
  180. height: 88rpx;
  181. border-radius: 100px;
  182. background: var(--线性渐变, linear-gradient(90.00deg, rgba(13, 39, 247, 1),rgba(19, 193, 234, 1) 100%));
  183. text-align: center;
  184. line-height: 88rpx;
  185. color: #fff;
  186. font-size: 32rpx;
  187. font-weight: bold;
  188. }
  189. .other-login {
  190. display: flex;
  191. justify-content: center;
  192. margin-top: 80rpx;
  193. .other-type {
  194. margin: 0 24rpx;
  195. }
  196. .icon {
  197. width: 60rpx;
  198. height: 60rpx;
  199. background-color: gray;
  200. margin: 0 auto 8rpx;
  201. }
  202. .text {
  203. text-align: center;
  204. font-size: 24rpx;
  205. line-height: 32rpx;
  206. color: rgb(153, 153, 153);
  207. }
  208. }
  209. .footer {
  210. display: flex;
  211. justify-content: center;
  212. margin-bottom: 40rpx;
  213. .link {
  214. font-size: 28rpx;
  215. color: #999999;
  216. margin: 0 14rpx;
  217. }
  218. }
  219. }
  220. </style>