index.vue 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <view class="advance">
  3. <view class="mainbox">
  4. <!-- <image src="../../static/images/back_1.png" mode="" class="main_back"></image> -->
  5. <image src="../../static/images/back_1.png" mode="" class="main_back"></image>
  6. <view class="list">
  7. 患者姓名:{{user_name}}
  8. </view>
  9. <view class="list">
  10. 可用余额(元)
  11. </view>
  12. <view class="list_pay">
  13. {{balance}}
  14. </view>
  15. <!-- <VanButton>明细详情</VanButton> -->
  16. <van-button class="de_btn" @click="to_details">明细详情</van-button>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. // import VanButton from '@/wxcomponents/vant/button/index'
  22. import { getgetbalance } from '@/api/api.js';
  23. export default {
  24. comments: {
  25. // VanButton
  26. },
  27. data() {
  28. return {
  29. user_name: "",
  30. balance: "",
  31. patient_id: 15652,
  32. org_id:10265,
  33. }
  34. },
  35. onLoad() {
  36. this.getmoney()
  37. },
  38. methods: {
  39. to_details() {
  40. uni.navigateTo({
  41. // url: '/pages/advancePay/details'
  42. url:'/subpackages/pages/advancePay/details'
  43. })
  44. },
  45. async getmoney(){
  46. let params = {
  47. patient_id:15652,
  48. org_id:10265
  49. }
  50. console.log('22222',params);
  51. let res = await getgetbalance(params)
  52. this.user_name = res.data.data.patient.name
  53. this.balance = res.data.data.balance
  54. console.log(res,'resres')
  55. }
  56. }
  57. }
  58. </script>
  59. <style>
  60. @import url(../advancePay/advance.css);
  61. .mainBox {}
  62. .main_back {
  63. position: absolute;
  64. width: 100%;
  65. top: 0;
  66. }
  67. </style>
  68. <style lang="scss" scoped>
  69. /deep/ .de_btn {
  70. margin-left: 60rpx;
  71. padding-left: 0px;
  72. button {
  73. border-radius: 50rpx;
  74. width: 260rpx;
  75. .van-button__text {
  76. padding-left: 0rpx;
  77. color: #00c4b3;
  78. }
  79. }
  80. }
  81. </style>