mySignup.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <view style="width:100%;height: 100%">
  3. <uni-nav-bar status-bar=true fixed=true left-icon="arrowthinleft" background-color="#03b6b3" color="#ffffff"
  4. @clickRight="goHome"
  5. @clickLeft="navigateBack">
  6. <text slot="default" style="text-align: center; flex: 1; font-size: 18px; font-weight: bold;">{{$i18n.locale=='en'?'Application History':'我的报名'}}</text>
  7. <button slot="right" size="mini" style="height: 30px; border-radius: 15px; background-color: #1e9694; ">
  8. <uni-icons type="home-filled" size="22" color="#ffffff"></uni-icons>
  9. </button>
  10. </uni-nav-bar>
  11. <view class="state-filter-list" :style="{top: filterTop}">
  12. <view @click="stateFilter(i)" :class="{active: stateIndex == i}" v-for="(item, i) in stateFilterList" :key="i">
  13. <text>{{$i18n.locale=='en'?item.titleEn:item.title}}</text>
  14. </view>
  15. </view>
  16. <scroll-view scroll-y="true" :style="{'margin-top': scorollConTop}" style="position:relative;margin-top: 100upx;height: calc(100% - 100upx)">
  17. <myOfflineSignup v-if="stateIndex==0"></myOfflineSignup>
  18. <myOnlineSignup v-if="stateIndex==3"></myOnlineSignup>
  19. <other v-if="stateIndex==1"></other>
  20. <myActivityRegistration v-if="stateIndex==2" :fatherData="current"></myActivityRegistration>
  21. </scroll-view>
  22. </view>
  23. </template>
  24. <script>
  25. var statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  26. import myOfflineSignup from './myOfflineSignup.vue';
  27. import myOnlineSignup from './myOnlineSignup.vue';
  28. import myActivityRegistration from './myActivityRegistration.vue';
  29. import other from './other.vue';
  30. export default {
  31. components: {myOfflineSignup, myOnlineSignup, other, myActivityRegistration },
  32. data() {
  33. return {
  34. current:0,
  35. stateFilterList: [
  36. {title: '会议报名', titleEn: 'Events'},
  37. {title: '会展报名', titleEn: 'ExhibitionApply'},
  38. {title: '活动报名', titleEn: 'ActivityApply'},
  39. {title: '网络会议', titleEn: 'Online Meeting'}
  40. ],
  41. stateIndex: 3,
  42. filterTop: (statusBarHeight+44)+'px',
  43. scorollConTop: statusBarHeight+'px'
  44. }
  45. },
  46. onReachBottom() { //页面拉到底部加载
  47. this.current++
  48. },
  49. methods: {
  50. goHome(){
  51. this.$mRouter.reLaunch({ route: '/pages/index/index' });
  52. },
  53. navigateBack(){
  54. uni.navigateBack()
  55. },
  56. stateFilter(i){
  57. this.stateIndex = i;
  58. console.log(this.stateIndex)
  59. switch(i){
  60. case 0:
  61. this.condition = ""
  62. break;
  63. case 1:
  64. this.condition = 2
  65. break;
  66. case 2:
  67. this.condition = 0
  68. break;
  69. case 3:
  70. this.condition = 1
  71. break;
  72. };
  73. // this.getGuestsByCondition(this.condition);
  74. },
  75. }
  76. }
  77. </script>
  78. <style scoped>
  79. uni-button:after{
  80. border: none;
  81. }
  82. .uni-icons{
  83. line-height: 30px;
  84. }
  85. .state-filter-list{
  86. width: 100%;
  87. padding: 10px 15px;
  88. display: flex;
  89. justify-content: space-between;
  90. text-align: center;
  91. background: #FFFFFF;
  92. color: #555555;
  93. position: fixed;
  94. left: 0;
  95. z-index: 9;
  96. }
  97. .state-filter-list .active{
  98. color: #3ac6c3;
  99. }
  100. .state-filter-list view{
  101. position: relative;
  102. }
  103. .state-filter-list view .uni-icons{
  104. display: block;
  105. padding-bottom: 4rpx;
  106. line-height: 1;
  107. }
  108. </style>