loginContent.nvue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <template>
  2. <view class="login-content" @touchmove.stop.prevent>
  3. <view class="data" >
  4. <view class="data-img">
  5. <image :style="{'margin-left':((windowWidth-124)/2)+'rpx'}" class="img" src="/static/img/common/logo.png" mode="aspectFill"></image>
  6. </view>
  7. <view class="data-text">
  8. <text class="text-content" :style="{'width':(windowWidth-156)+'rpx'}">
  9. ICOCO是为了人们摆脱自己单身的生活 而去结交 认识他人的过程一个网络交友平台
  10. </text>
  11. </view>
  12. <view class="data-but" @click.stop="goToLogin" >
  13. <!-- 开始ICOCO-->
  14. <image class="but-img" src="/static/img/login/login-but.png" mode="aspectFill"></image>
  15. </view>
  16. <view class="agreement-item">
  17. <login-agreement v-model="isCheck"></login-agreement>
  18. </view>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. import LoginAgreement from "@/pages/login/model/loginAgreement";
  24. import tools from "@/service/tools";
  25. export default {
  26. name: "loginContent",
  27. components: {LoginAgreement},
  28. props: {},
  29. data() {
  30. return {
  31. windowWidth:750,
  32. isCheck:false,
  33. isPreLogin:false
  34. }
  35. },
  36. watch: {},
  37. onLoad(query) {
  38. //#ifdef APP-NVUE
  39. // uni.preLogin({
  40. // provider: 'univerify',
  41. // success(){ //预登录成功
  42. // // 显示一键登录选项
  43. // this.isPreLogin=true
  44. // },
  45. // fail(res){ // 预登录失败
  46. // // 不显示一键登录选项(或置灰)
  47. // // 根据错误信息判断失败原因,如有需要可将错误提交给统计服务器
  48. // console.log(res)
  49. // console.log(res.errCode)
  50. // console.log(res.errMsg)
  51. // }
  52. // })
  53. //#endif
  54. },
  55. mounted() {
  56. },
  57. methods: {
  58. goToLogin(){
  59. if(!this.isCheck){
  60. tools.error('请阅读并同意协议')
  61. return false
  62. }
  63. if(this.isPreLogin){
  64. uni.navigateTo({
  65. 'url':'/pages/login/localPhoneLogin'
  66. })
  67. }else {
  68. uni.navigateTo({
  69. 'url':'/pages/login/otherPhoneLogin'
  70. })
  71. }
  72. }
  73. }
  74. }
  75. </script>
  76. <style scoped lang="scss">
  77. .login-content{
  78. z-index: 100;
  79. position: fixed;
  80. left: 0;
  81. top: 0;
  82. right: 0;
  83. bottom: 0;
  84. /*background-color: rgba(0, 0, 0, 0);*/
  85. /*background: #fff;*/
  86. }
  87. .data{
  88. position: absolute;
  89. /*width: 100vw;*/
  90. height: 528rpx;
  91. bottom: 0;
  92. left: 0;
  93. }
  94. .data-img{
  95. /*width: 100vw;*/
  96. height: 124rpx;
  97. }
  98. .img{
  99. /*margin-left: calc((100vw - 124rpx) / 2);*/
  100. height: 124rpx;
  101. width: 124rpx;
  102. border-radius: 24rpx;
  103. }
  104. .data-text{
  105. margin-top: 24rpx;
  106. padding: 0 78rpx;
  107. line-height: 44rpx;
  108. }
  109. .text-content{
  110. //width: calc( 100vw - 156rpx );
  111. font-size: 24rpx;
  112. color: #FFFFFF;
  113. display:flex;
  114. white-space: pre-wrap;
  115. word-wrap: break-word;
  116. }
  117. .data-but{
  118. width: 590rpx;
  119. box-sizing: border-box;
  120. margin:64rpx 78rpx 0 78rpx ;
  121. border-radius: 200rpx;
  122. /*background:#FFFFFF ;*/
  123. /*height: 88rpx;*/
  124. /*line-height: 88rpx;*/
  125. /*color: #000000;*/
  126. /*font-size: 28rpx;*/
  127. /*font-weight: 600;*/
  128. /*text-align: center;*/
  129. /*mix-blend-mode: darken;*/
  130. /*-webkit-background-clip: text;*/
  131. /*-webkit-text-fill-color: transparent;*/
  132. }
  133. .but-img{
  134. width: 590rpx;
  135. height: 88rpx;
  136. border-radius: 200rpx;
  137. /*width: calc(100vw - 156rpx);*/
  138. margin-bottom: 40rpx;
  139. }
  140. .agreement-item{
  141. margin-left:122rpx;
  142. }
  143. </style>