uni-events-helper-wx
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.

125 lines
2.9 KiB

3 years ago
3 years ago
3 years ago
3 years ago
  1. <template>
  2. <view class="content">
  3. <view class="login-box flex_col flex_start">
  4. <image class="bg" src="../../static/images/index/index_bg.png" mode="aspectFit"></image>
  5. <view class="login-info flex_col" v-if="login">
  6. <text>{{userInfo.mobile||"-"}}</text>
  7. <text>您好!</text>
  8. </view>
  9. <view class="button-login " v-else @click="jumpPage('login')">前往登录</view>
  10. </view>
  11. <view class="item flex_row flex_start bg-white padding solid-bottom" @click="jumpPage('messageList')">
  12. <image src="../../static/images/index/index_bell.png" mode=""></image>
  13. <view class="text-m text-left">消息中心</view>
  14. <view class="bandage">99</view>
  15. <image src="../../static/images/index/arrow_right.png" mode=""></image>
  16. </view>
  17. <view class="item flex_row flex_start bg-white padding solid-bottom" @click="jumpPage('eventList')">
  18. <image src="../../static/images/index/index_cup.png" mode=""></image>
  19. <view class="text-m text-left">活动赛事</view>
  20. <image src="../../static/images/index/arrow_right.png" mode=""></image>
  21. </view>
  22. <view class="item flex_row flex_start bg-white padding solid-bottom" v-if="login" @click="login=!login">
  23. <image src="../../static/images/index/index_logout.png" mode=""></image>
  24. <view class="text-m text-left" >退出登录</view>
  25. <image src="../../static/images/index/arrow_right.png" mode=""></image>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. import { mapState } from 'vuex'
  31. export default {
  32. data() {
  33. return {
  34. address:"",
  35. login:true
  36. };
  37. },
  38. computed:{
  39. ...mapState(['userInfo']),
  40. getUserInfo(){
  41. return this.$store.state.userInfo.mobile
  42. }
  43. },
  44. onLoad(parms) {
  45. },
  46. onUnload() {
  47. },
  48. methods: {
  49. jumpPage(name){
  50. this.$Router.push({name:name})
  51. // this.$Router.pushTab('/pages/login/login')
  52. },
  53. }
  54. }
  55. </script>
  56. <style lang="less" scoped>
  57. .content{
  58. .login-box{
  59. position: relative;
  60. width: 750rpx;
  61. height: 480rpx;
  62. > image ,.bg{
  63. width: 100%;height: 100%;
  64. position: absolute;
  65. z-index: 1;
  66. }
  67. .button-login{
  68. margin-top: 132rpx;
  69. color: #009874;
  70. z-index: 20;
  71. width: 240rpx;
  72. height: 96rpx;
  73. background: #FFFFFF;
  74. border-radius: 48rpx;
  75. text-align: center;
  76. line-height: 96rpx;
  77. font-weight: 900;
  78. font-size: 36rpx;
  79. letter-spacing: -0.2rpx;
  80. }
  81. .login-info{
  82. margin-top: 132rpx;
  83. z-index: 20;
  84. font-size: 40rpx;
  85. color: #FFFFFF;
  86. font-weight: 900;
  87. }
  88. }
  89. .item{
  90. color: #333333;
  91. position: relative;
  92. > image:first-child{
  93. width: 52rpx;
  94. height: 52rpx;
  95. margin-right: 14rpx;
  96. }
  97. > image:last-child{
  98. width: 30rpx;
  99. height: 30rpx;
  100. position: absolute;
  101. right: 20rpx;
  102. }
  103. .bandage{
  104. width: 34rpx;
  105. height: 34rpx;
  106. position: absolute;
  107. right: 60rpx;
  108. background: #EA5061;
  109. border-radius: 50%;
  110. font-size: 24rpx;
  111. color: white;
  112. text-align: center;
  113. line-height: 34rpx;
  114. }
  115. }
  116. }
  117. </style>