index.vue 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <view class="page" :style="{'height':windowHeight}">
  3. <view class="flex-col" v-if="equityList.length === 0">
  4. <view class="flex-row justify-center">
  5. <image class="empty" src="/static/imageIcon/empty.png" mode="widthFix"></image>
  6. </view>
  7. <view class="emptyText flex-row justify-center">
  8. <text>暂无内容</text>
  9. </view>
  10. </view>
  11. <scroll-view v-else scroll-y :style="{'height':windowHeight}">
  12. <view class="row-list flex-row justify-start" v-for="(item,index) in equityList" :key="index">
  13. <view class="h-text flex-col justify-center ">
  14. <view class="money">
  15. <text>¥{{item.faceValue}}</text>
  16. </view>
  17. <!-- <view class="desc">-->
  18. <!-- <text>{{item.title}}</text>-->
  19. <!-- </view>-->
  20. </view>
  21. <view class="h-center-content flex-col justify-around">
  22. <view class="h-value">
  23. <text>{{item.description}}</text>
  24. </view>
  25. <view class="title">
  26. 使用项目:{{item.serviceProjectName || ''}}
  27. </view>
  28. <view class="title">
  29. 绑定对象:{{item.serviceObjectName}}
  30. </view>
  31. <view class="title">
  32. 结束期限:{{item.effectiveEndTime.substring(0,10)}}
  33. </view>
  34. </view>
  35. <!-- <view class="h-right-content flex-col justify-center ">-->
  36. <!-- <view class="btn" @click="payRights(item)">-->
  37. <!-- <text>购买</text>-->
  38. <!-- </view>-->
  39. <!-- </view>-->
  40. </view>
  41. </scroll-view>
  42. </view>
  43. </template>
  44. <script>
  45. export default {
  46. data() {
  47. return {
  48. windowHeight:'',
  49. userInfo:{},
  50. equityList:[],
  51. };
  52. },
  53. onLoad(option) {
  54. let sysInfo = uni.getSystemInfoSync()
  55. this.windowHeight =sysInfo.windowHeight - 44 +'px'//除标题栏栏外的屏幕可用高度
  56. this.userInfo = uni.getStorageSync('userInfo')
  57. this.myEquityCardList()
  58. },
  59. methods: {
  60. myEquityCardList(){
  61. this.$api.myEquityCardList().then(res=>{
  62. console.log(res)
  63. this.equityList = res.data.data
  64. })
  65. },
  66. },
  67. };
  68. </script>
  69. <style lang="scss" scoped>
  70. @import '/common/css/common.css';
  71. @import './index.rpx.scss';
  72. </style>