loginContent.nvue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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:true
  34. }
  35. },
  36. watch: {},
  37. onLoad(query) {
  38. //#ifdef APP-NVUE
  39. let that=this
  40. uni.preLogin({
  41. provider: 'univerify',
  42. success(){ //预登录成功
  43. // 显示一键登录选项
  44. that.isPreLogin=true
  45. console.log('----------------aaa')
  46. },
  47. fail(res){ // 预登录失败
  48. // 不显示一键登录选项(或置灰)
  49. // 根据错误信息判断失败原因,如有需要可将错误提交给统计服务器
  50. console.log(res)
  51. console.log(res.errCode)
  52. console.log(res.errMsg)
  53. that.isPreLogin=false
  54. }
  55. })
  56. //#endif
  57. },
  58. mounted() {
  59. },
  60. methods: {
  61. goToLogin(){
  62. if(!this.isCheck){
  63. tools.error('请阅读相关协议')
  64. return false
  65. }
  66. if(this.isPreLogin){
  67. uni.navigateTo({
  68. 'url':'/pages/login/localPhoneLogin'
  69. })
  70. }else {
  71. uni.navigateTo({
  72. 'url':'/pages/login/otherPhoneLogin'
  73. })
  74. }
  75. }
  76. }
  77. }
  78. </script>
  79. <style scoped lang="scss">
  80. .login-content{
  81. z-index: 100;
  82. position: fixed;
  83. left: 0;
  84. top: 0;
  85. right: 0;
  86. bottom: 0;
  87. /*background-color: rgba(0, 0, 0, 0);*/
  88. /*background: #fff;*/
  89. }
  90. .data{
  91. position: absolute;
  92. /*width: 100vw;*/
  93. height: 528rpx;
  94. bottom: 0;
  95. left: 0;
  96. }
  97. .data-img{
  98. /*width: 100vw;*/
  99. height: 124rpx;
  100. }
  101. .img{
  102. /*margin-left: calc((100vw - 124rpx) / 2);*/
  103. height: 124rpx;
  104. width: 124rpx;
  105. border-radius: 24rpx;
  106. }
  107. .data-text{
  108. margin-top: 24rpx;
  109. padding: 0 78rpx;
  110. line-height: 44rpx;
  111. }
  112. .text-content{
  113. //width: calc( 100vw - 156rpx );
  114. font-size: 24rpx;
  115. color: #FFFFFF;
  116. display:flex;
  117. white-space: pre-wrap;
  118. word-wrap: break-word;
  119. }
  120. .data-but{
  121. width: 590rpx;
  122. box-sizing: border-box;
  123. margin:64rpx 78rpx 0 78rpx ;
  124. border-radius: 200rpx;
  125. /*background:#FFFFFF ;*/
  126. /*height: 88rpx;*/
  127. /*line-height: 88rpx;*/
  128. /*color: #000000;*/
  129. /*font-size: 28rpx;*/
  130. /*font-weight: 600;*/
  131. /*text-align: center;*/
  132. /*mix-blend-mode: darken;*/
  133. /*-webkit-background-clip: text;*/
  134. /*-webkit-text-fill-color: transparent;*/
  135. }
  136. .but-img{
  137. width: 590rpx;
  138. height: 88rpx;
  139. border-radius: 200rpx;
  140. /*width: calc(100vw - 156rpx);*/
  141. margin-bottom: 40rpx;
  142. }
  143. .agreement-item{
  144. margin-left:122rpx;
  145. }
  146. </style>