unbindFamilyCard.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <view class="page">
  3. <!-- 钱包 -->
  4. <view class="recharge-me ">
  5. <view class="wallet-content">
  6. <view class="h-balance-wrap">
  7. <view class="h-balance">
  8. <view class="recharge-balance">
  9. <view class="name">已用额度</view>
  10. <view class="Number" style="font-size: 48rpx">{{ data.amount || 0 }}</view>
  11. </view>
  12. <text style="position: absolute;top:32rpx;right: 32rpx;color:#FFAF36" @click="untieCard">解绑</text>
  13. </view>
  14. <view style="display: flex;justify-content: space-between;margin: 8rpx 0rpx">
  15. <text>赠送会员编号:</text>
  16. <text>{{ data.userNo }}</text>
  17. </view>
  18. <view style="display: flex;justify-content: space-between;margin: 8rpx 0rpx">
  19. <text>收到时间::</text>
  20. <text>{{ data.createTime }}</text>
  21. </view>
  22. </view>
  23. <text style="margin:24rpx 0;overflow: hidden">使用记录</text>
  24. <view>
  25. <mescroll-item ref="MescrollItem" :i="0" :index="0" :cardId="data.id" :height="scrollViewHeight">
  26. </mescroll-item>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. import MescrollItem from "./module/mescrollUni-item.vue";
  34. export default {
  35. components: {
  36. MescrollItem
  37. },
  38. data() {
  39. return {
  40. data: {},
  41. scrollViewHeight:'',
  42. };
  43. },
  44. onLoad(option) {
  45. this.data = JSON.parse(option.data)
  46. console.log(this.data)
  47. let sysInfo = uni.getSystemInfoSync()
  48. this.scrollViewHeight =sysInfo.windowHeight -(sysInfo.windowWidth/750)*500 +'px'
  49. console.log(' this.scrollViewHeight', this.scrollViewHeight)
  50. },
  51. onShow() {
  52. },
  53. methods: {
  54. //解除绑定
  55. untieCard() {
  56. this.$api.untieCard({
  57. cardId:this.data.id
  58. }).then((res)=>{
  59. uni.showToast({
  60. icon: 'success',
  61. duration: 2000,
  62. title:'解绑成功'
  63. });
  64. setTimeout(()=>{
  65. uni.navigateBack({
  66. delta: 1
  67. })
  68. },2000)
  69. })
  70. },
  71. },
  72. };
  73. </script>
  74. <style scoped lang="scss">
  75. @import '../../../common/css/common.css';
  76. @import './familyCard.scss';
  77. </style>