changeCard.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <template>
  2. <view class="content">
  3. <view class="content1">
  4. <span>邀请</span>
  5. <span>黑名单</span>
  6. </view>
  7. <view class="content2 ">
  8. <view class="row" v-for="(item,index) in cardList" :key="index">
  9. <view class="flex">
  10. <view class="left">
  11. <view class="top flex-row-center">
  12. <image :src="item.cardManagementInfo.headSculpture" mode="widthFix" class="img"></image>
  13. </view>
  14. </view>
  15. <view class="right">
  16. <view class="row1 flex">
  17. <text>{{item.cardManagementInfo.name}}</text>
  18. <text class="line"></text>
  19. <text>{{item.cardManagementInfo.post}}</text>
  20. </view>
  21. <view class="row2">
  22. {{item.cardManagementInfo.companyName}}
  23. </view>
  24. <view class="row3" @click="toMap">
  25. <uni-icons type="redo" size="20"></uni-icons>
  26. <text>{{item.cardManagementInfo.detailedAddress}}</text>
  27. </view>
  28. <view class="row3">
  29. <uni-icons type="redo" size="20"></uni-icons>
  30. <text>{{item.cardManagementInfo.phone}}</text>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="" v-if="item.status==0">
  35. <span @click='cardExchangeInfoEdit(1,item)'> 拉黑</span>
  36. <span @click='cardExchangeInfoEdit(2,item)'>拒绝</span>
  37. <span @click='cardExchangeInfoEdit(3,item)'>接受</span>
  38. <span @click='cardExchangeInfoEdit(4,item)'>移除</span>
  39. </view>
  40. <view class="" v-else>
  41. <span v-if="item.status==1">已接受</span>
  42. <span v-if="item.status==3">已拒绝</span>
  43. <span v-if="item.status==5">已过期</span>
  44. <span v-if="item.status==7">已拉黑</span>
  45. </view>
  46. <view class="flex flex-between">
  47. <span>来至 {{item.circleName}}</span>
  48. <span> {{parseTime(item.gmtCreate)}}</span>
  49. </view>
  50. </view>
  51. </view>
  52. <u-toast ref="uToast"></u-toast>
  53. </view>
  54. </template>
  55. <script>
  56. export default {
  57. data() {
  58. return {
  59. userInfo:{},
  60. status:1,
  61. cardList:[],
  62. };
  63. },
  64. onLoad() {
  65. this.userInfo = uni.getStorageSync("userInfo")
  66. this.getList()
  67. },
  68. methods:{
  69. getList(){
  70. uni.showLoading({
  71. title: '数据加载中'
  72. })
  73. this.$request.baseRequest('admin.unimall.cardExchangeInfo', 'list', {
  74. receiveId:this.userInfo.id,
  75. status:this.status
  76. }, failres => {
  77. console.log('res+++++', failres.errmsg)
  78. this.$refs.uToast.show({
  79. type: 'error',
  80. message: failres.errmsg,
  81. })
  82. uni.hideLoading()
  83. }).then(res => {
  84. uni.hideLoading()
  85. this.cardList = res.data.items
  86. })
  87. },
  88. cardExchangeInfoEdit(type,val){
  89. uni.showLoading({
  90. title: '数据加载中'
  91. })
  92. this.$request.baseRequest('admin.unimall.cardExchangeInfo', 'update', {
  93. cardExchangeInfo:JSON.stringify(val),
  94. updateFlag:type
  95. }, failres => {
  96. console.log('res+++++', failres.errmsg)
  97. this.$refs.uToast.show({
  98. type: 'error',
  99. message: failres.errmsg,
  100. })
  101. uni.hideLoading()
  102. }).then(res => {
  103. uni.hideLoading()
  104. this.$refs.uToast.show({
  105. type: 'success',
  106. message: "操作成功!",
  107. })
  108. })
  109. }
  110. }
  111. }
  112. </script>
  113. <style lang="scss" scoped>
  114. .content2 {
  115. border: 1px solid #ccc;
  116. border-radius: 30rpx;
  117. padding: 40rpx;
  118. box-sizing: border-box;
  119. .left {
  120. width: 30%;
  121. .top {
  122. margin-bottom: 20rpx;
  123. }
  124. .img {
  125. width: 80%;
  126. }
  127. .bottom {
  128. }
  129. }
  130. .right {
  131. .row1 {
  132. .line {
  133. width: 1px;
  134. height: 20px;
  135. margin: 0 20rpx;
  136. background: black;
  137. }
  138. }
  139. }
  140. }
  141. </style>