index.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <template>
  2. <auth-wrap class="usr-regist-info-container" ref="authWrap">
  3. <template slot="content">
  4. <view class="u-page" v-if="indexList&&indexList.length>0">
  5. <view class="apply-item" v-for="item in indexList" @click="()=>onContentClick(item)">
  6. <view class="apply-item-header">
  7. <view>{{ item.applyTypeName }}</view>
  8. <view :style="{
  9. background: `url(${getImageUrl(REVIEW_STATUS[item.reviewState].icon)}) no-repeat 100% 100%`,
  10. backgroundSize: '100%',
  11. width: '109rpx',
  12. height: '109rpx',
  13. position: 'absolute',
  14. right:0,
  15. top:0
  16. }">
  17. </view>
  18. </view>
  19. <view class="apply-item-title overflow-hidden" style="height: 50px;line-height: 25px" v-if="item.contentTitle">{{ item.contentTitle }}</view>
  20. <view class="apply-item-title overflow-hidden" style="height: 50px;line-height: 25px" v-if="item.themeTitle">
  21. {{ item.themeTitle }}
  22. </view>
  23. <view class="apply-item-footer">
  24. <view>参会人:{{ item.usrName }}</view>
  25. <view>{{ $u.timeFormat(item.createTime, 'yyyy-mm-dd hh:MM') }}</view>
  26. </view>
  27. </view>
  28. </view>
  29. <u-empty
  30. v-else
  31. mode="data"
  32. text="还没有报名,赶紧去报名吧!"
  33. >
  34. </u-empty>
  35. </template>
  36. </auth-wrap>
  37. </template>
  38. <script>
  39. import { getUsrApplyInfo } from '@/common/api';
  40. import { ICON_CFG, REVIEW_STATUS } from '@/common/EnumConst';
  41. import AuthWrap from '@/components/AuthComp/index.vue';
  42. import { getImageUrl } from '@/util';
  43. export default {
  44. computed: {
  45. ICON_CFG() {
  46. return ICON_CFG;
  47. },
  48. REVIEW_STATUS() {
  49. return REVIEW_STATUS;
  50. },
  51. },
  52. components: {
  53. AuthWrap,
  54. },
  55. data() {
  56. return {
  57. keyword: '',
  58. indexList: [],
  59. };
  60. },
  61. onLoad() {
  62. this.$refs.authWrap.reloadPage();
  63. this.loadmore();
  64. },
  65. methods: {
  66. getImageUrl,
  67. onContentClick(item) {
  68. uni.navigateTo({
  69. url: `/pasbrg/pages/regmeeting/index?id=${item.id}`,
  70. });
  71. },
  72. async loadmore() {
  73. const { data } = await getUsrApplyInfo();
  74. if (data) {
  75. this.indexList = data;
  76. }
  77. },
  78. },
  79. onShareAppMessage() {
  80. return {
  81. title: 'First UI组件库',
  82. };
  83. },
  84. };
  85. </script>
  86. <style lang="scss" src="./index.scss" />