shoukuan.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <view>
  3. <view style="padding: 30rpx;">
  4. <view v-for="(item, index) in goodlist" :key="index" style="margin-bottom:20rpx;" >
  5. <view class="b1" style="border-radius: 10rpx 10rpx 0 0;font-size: 30rpx;">
  6. <text style="float: left;color:#f1a325;">{{item.type}}</text>
  7. <text style="color: #fff;padding: 3rpx 6rpx;background: #ea644a;float: right;font-size: 28rpx;" @click="del(item.id)">删除</text>
  8. </view>
  9. <view style="background: #fff;padding: 20rpx;font-size: 30rpx;line-height: 200%;">
  10. <view v-if="item.type=='银行卡支付'">开户行:{{item.khh}}</view>
  11. <view>账户名称:{{item.zhmc}}</view>
  12. <view v-if="item.type=='USDT支付'">手机账号:{{item.sjh}}</view>
  13. <view v-if="item.type=='银行卡支付' || item.type=='支付宝支付' || item.type=='拍拍宝'">账号:{{item.skzh}}</view>
  14. <view v-if="item.type=='银行卡支付'">开户行地址:{{item.fhh}}</view>
  15. <view v-if="item.type=='微信支付'">收款码:
  16. <view>
  17. <image :src="item.skm" style="width: 150rpx;height: 150rpx;" @click="skm(item.skm)">
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. <view style="color: #fff;border-bottom: #333 solid 1px;padding-bottom: 15rpx;" @click="add">
  23. <text style="font-weight: bold;">+</text>添加收款方式
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. data() {
  31. return {
  32. list:[],
  33. userinfo:[],
  34. goodlist:[]
  35. }
  36. },
  37. methods: {
  38. sklist(){
  39. var data = new Object();
  40. data.uid = this.userinfo.id;
  41. this.$api
  42. .MhGetModel(data, 'user/sklist')
  43. .then(res => {
  44. this.goodlist = res.data.data;
  45. })
  46. .catch(err => {
  47. // console.log('request fail', JSON.stringify(err));
  48. });
  49. },
  50. add(){
  51. uni.navigateTo({
  52. url: '/pages/shoukuan/add'
  53. });
  54. },
  55. skm(skm){
  56. uni.navigateTo({
  57. url: '/pages/shoukuan/cktp?src='+skm
  58. });
  59. },
  60. del(id){
  61. //// console.log(id)
  62. var that=this
  63. uni.showModal({
  64. title: '提示',
  65. content: '是否确认删除',
  66. success: function (res) {
  67. if (res.confirm) {
  68. var data = new Object();
  69. data.uid = that.userinfo.id;
  70. data.id=id;
  71. that.$api
  72. .MhGetModel(data, 'user/skdel')
  73. .then(res => {
  74. that.sklist();
  75. })
  76. .catch(err => {
  77. // console.log('request fail', JSON.stringify(err));
  78. });
  79. } else if (res.cancel) {
  80. // console.log('用户点击取消');
  81. }
  82. }
  83. });
  84. }
  85. },
  86. onShow() {
  87. var user = this.$api.getUserinfo();
  88. this.userinfo = user;
  89. this.sklist()
  90. }
  91. }
  92. </script>
  93. <style>
  94. page{padding: 15rpx;background: #98a737;background-attachment: fixed !important;
  95. background-repeat: no-repeat !important;}
  96. .b1 {
  97. overflow: hidden;
  98. padding: 10rpx 15rpx;
  99. color: #f1a325;
  100. background: #fff0d5;
  101. border: 1rpx solid #ffdcbc;
  102. }
  103. </style>