loginContent.nvue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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. 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. }
  54. })
  55. //#endif
  56. },
  57. mounted() {
  58. },
  59. methods: {
  60. goToLogin(){
  61. if(!this.isCheck){
  62. tools.error('请阅读相关协议')
  63. return false
  64. }
  65. if(this.isPreLogin){
  66. uni.navigateTo({
  67. 'url':'/pages/login/localPhoneLogin'
  68. })
  69. }else {
  70. uni.navigateTo({
  71. 'url':'/pages/login/otherPhoneLogin'
  72. })
  73. }
  74. }
  75. }
  76. }
  77. </script>
  78. <style scoped lang="scss">
  79. .login-content{
  80. z-index: 100;
  81. position: fixed;
  82. left: 0;
  83. top: 0;
  84. right: 0;
  85. bottom: 0;
  86. /*background-color: rgba(0, 0, 0, 0);*/
  87. /*background: #fff;*/
  88. }
  89. .data{
  90. position: absolute;
  91. /*width: 100vw;*/
  92. height: 528rpx;
  93. bottom: 0;
  94. left: 0;
  95. }
  96. .data-img{
  97. /*width: 100vw;*/
  98. height: 124rpx;
  99. }
  100. .img{
  101. /*margin-left: calc((100vw - 124rpx) / 2);*/
  102. height: 124rpx;
  103. width: 124rpx;
  104. border-radius: 24rpx;
  105. }
  106. .data-text{
  107. margin-top: 24rpx;
  108. padding: 0 78rpx;
  109. line-height: 44rpx;
  110. }
  111. .text-content{
  112. //width: calc( 100vw - 156rpx );
  113. font-size: 24rpx;
  114. color: #FFFFFF;
  115. display:flex;
  116. white-space: pre-wrap;
  117. word-wrap: break-word;
  118. }
  119. .data-but{
  120. width: 590rpx;
  121. box-sizing: border-box;
  122. margin:64rpx 78rpx 0 78rpx ;
  123. border-radius: 200rpx;
  124. /*background:#FFFFFF ;*/
  125. /*height: 88rpx;*/
  126. /*line-height: 88rpx;*/
  127. /*color: #000000;*/
  128. /*font-size: 28rpx;*/
  129. /*font-weight: 600;*/
  130. /*text-align: center;*/
  131. /*mix-blend-mode: darken;*/
  132. /*-webkit-background-clip: text;*/
  133. /*-webkit-text-fill-color: transparent;*/
  134. }
  135. .but-img{
  136. width: 590rpx;
  137. height: 88rpx;
  138. border-radius: 200rpx;
  139. /*width: calc(100vw - 156rpx);*/
  140. margin-bottom: 40rpx;
  141. }
  142. .agreement-item{
  143. margin-left:122rpx;
  144. }
  145. </style>