shareDetail.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <template>
  2. <view>
  3. <ms-tabs :type="type" v-model="active" lineAnimated="true" @input='switchTabs'></ms-tabs>
  4. <view class="content">
  5. <view v-show="active===0">
  6. <view class="dayGift-box" v-for="(day,index) in dayGiftList" :key='day.giftTime'>
  7. <view>{{index + 1}}</view>
  8. <view style="margin-left: -35%">{{day.giftTime}}</view>
  9. <view style="color: #1AAD19;">+{{day.giftCounts}}次</view>
  10. </view>
  11. <view class="dayGift-box" style="justify-content: center;" v-if="!dayGiftList.length">暂无明细</view>
  12. </view>
  13. <view v-show="active===1">
  14. <view class="dayGift-box" v-for="(friend,index) in inviteFriendList" :key='friend.giftTime'>
  15. <view>{{index + 1}}</view>
  16. <view style="margin-left: -28%" class="flex-column">
  17. <view class="flex-row">
  18. <image :src="friend.friendHead" mode="aspectFit"></image>
  19. <text>{{friend.friendName}}</text>
  20. </view>
  21. <view class="friend-time">{{friend.giftTime}}</view>
  22. </view>
  23. <view style="color: #1AAD19;">+{{friend.giftCounts}}次</view>
  24. </view>
  25. <view class="dayGift-box" style="justify-content: center;" v-if="!inviteFriendList.length">暂无明细</view>
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. var md5 = require("../../../common/md5.js");
  32. import msTabs from '@/components/ms-tabs/ms-tabs.vue'
  33. export default {
  34. components: {
  35. msTabs
  36. },
  37. data() {
  38. return {
  39. type: [{
  40. title: '每日赠送次数'
  41. }, {
  42. title: '邀好友奖励次数'
  43. }],
  44. active: 0,
  45. dayGiftList:[
  46. // {
  47. // giftTime:'2019.12.03 00:00',
  48. // giftCounts:'3'
  49. // },
  50. // {
  51. // giftTime:'2019.12.04 00:00',
  52. // giftCounts:'3'
  53. // },
  54. // {
  55. // giftTime:'2019.12.05 00:00',
  56. // giftCounts:'3'
  57. // },
  58. ],
  59. inviteFriendList:[
  60. {
  61. friendHead:'/static/userDefault.png',
  62. friendName:'小瓶子',
  63. giftCounts:'10',
  64. giftTime:'2019.12.05 00:00',
  65. },
  66. {
  67. friendHead:'/static/userDefault.png',
  68. friendName:'小瓶子',
  69. giftCounts:'10',
  70. giftTime:'2019.12.06 00:00',
  71. },
  72. {
  73. friendHead:'/static/userDefault.png',
  74. friendName:'小瓶子',
  75. giftCounts:'10',
  76. giftTime:'2019.12.07 00:00',
  77. },
  78. ]
  79. }
  80. },
  81. methods: {
  82. switchTabs(){
  83. console.log(this.active)
  84. },
  85. getDayRequest(){},
  86. getFriendRequest(){},
  87. }
  88. }
  89. </script>
  90. <style lang="scss">
  91. page {
  92. height:100%
  93. }
  94. .content {
  95. height:100%;
  96. background: #fff;
  97. margin-bottom: 20rpx;
  98. .title {
  99. margin-left: 20rpx;
  100. padding: 20rpx 0;
  101. color: #818586;
  102. border-bottom: 1px solid #f6f6f6;
  103. }
  104. .btn {
  105. background: $uni-color-primary;
  106. background: #007aff;
  107. color: #fff;
  108. padding: 20rpx;
  109. display: inline-block;
  110. border-radius: 10rpx;
  111. }
  112. .dayGift-box{
  113. display: flex;
  114. justify-content: space-between;
  115. align-items: center;
  116. font-size: 28rpx;
  117. padding: 20rpx;
  118. border-bottom: 1px solid #ccc;
  119. }
  120. .flex-column {
  121. display: flex;
  122. flex-direction: column;
  123. justify-content: space-between;
  124. align-items: center;
  125. }
  126. .flex-row {
  127. display: flex;
  128. justify-content: flex-start;
  129. align-items: center;
  130. width: 300rpx;
  131. }
  132. .flex-row image {
  133. width: 60upx;
  134. height: 60upx;
  135. border-radius: 50%;
  136. margin-right: 2%;
  137. }
  138. .friend-time {
  139. font-size: 26upx;
  140. color: #999;
  141. margin-left: -15%;
  142. width: 230rpx;
  143. margin-top: 3%;
  144. }
  145. }
  146. </style>