猫妈狗爸伴宠师小程序前端代码
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.

96 lines
2.4 KiB

1 month ago
4 weeks ago
1 month ago
4 weeks ago
1 month ago
4 weeks ago
1 month ago
4 weeks ago
1 month ago
4 weeks ago
1 month ago
4 weeks ago
1 month ago
4 weeks ago
1 month ago
4 weeks ago
1 month ago
1 month ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
1 month ago
  1. <template>
  2. <view class="have-order">
  3. <view class="have-order-list mt20" v-for="(item,index) in listData" :key="item.id">
  4. <view class="have-order-up">
  5. <view class="have-order-image flex-rowl">
  6. <up-image width="80rpx" height="80rpx" :src="item.userImage" shape="circle"></up-image>
  7. <text class="ml20">{{ item.name }}</text>
  8. </view>
  9. <view class="have-order-image flex-rowr" @click="()=>arrowClick(index)">
  10. <text class="mr10 size-22 color-999">{{ item.isShow == true ? '收起' : '展开' }}</text>
  11. <up-icon :name="item.isShow == true ? 'arrow-up-fill' : 'arrow-down-fill'" color="#707070"
  12. size="10"></up-icon>
  13. </view>
  14. </view>
  15. <up-line color="#C7C7C7"></up-line>
  16. <view class="have-order-time flex-b size-26 color-999">
  17. <view class="">
  18. 注册时间
  19. </view>
  20. <view class="">
  21. {{ item.createTime }}
  22. </view>
  23. </view>
  24. <view class="have-order-time flex-b size-26 color-999" v-show="item.isShow">
  25. <view class="">
  26. 最近一次下单
  27. </view>
  28. <view class="">
  29. {{ item.recentlyPayTime }}
  30. </view>
  31. </view>
  32. <view class="have-order-time flex-b size-26 color-999" v-show="item.isShow">
  33. <view class="">
  34. 累计消费金额
  35. </view>
  36. <view class="">
  37. {{ item.reward_money }}
  38. </view>
  39. </view>
  40. <view class="have-order-time flex-b size-26 color-999" v-show="item.isShow">
  41. <view class="">
  42. 累计消报酬
  43. </view>
  44. <view class="">
  45. {{ item.accumulate_money }}
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. <!-- <view class="mt60" :style="{color:'#A55822',fontSize:'22rpx',backgroundColor:'#FFF4E6',borderRadius:'16rpx'}">
  51. *累计报酬:当该用户订单完成时才会纳入报酬计算
  52. </view> -->
  53. </template>
  54. <script>
  55. export default {
  56. props: {
  57. list: {
  58. type: Array,
  59. default: () => []
  60. }
  61. },
  62. data() {
  63. return {
  64. listData: []
  65. }
  66. },
  67. watch: {
  68. list(val) {
  69. if (val && val.length > 0) {
  70. val.forEach(item => {
  71. item.isShow = false
  72. })
  73. this.listData = val
  74. }
  75. }
  76. },
  77. methods: {
  78. // 每次只展开一个
  79. arrowClick(ind) {
  80. this.listData.forEach((i, index) => {
  81. if (index === ind) {
  82. i.isShow = !i.isShow
  83. } else {
  84. i.isShow = false
  85. }
  86. })
  87. console.log(this.listData)
  88. this.listData = [...this.listData]
  89. }
  90. }
  91. }
  92. </script>
  93. <style scoped lang="scss">
  94. @import "../index";
  95. </style>