myWallet.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <template>
  2. <view class="container">
  3. <view class="navbar">
  4. <navbar ref="navbar" :config="config" backColor="#999999"></navbar>
  5. </view>
  6. <view class="wallet">
  7. <!-- <image :src="imgUrl+'/my-top-bgImg.png'"></image> -->
  8. <div class="bg"></div>
  9. <view class="position-ab u-FFF">
  10. <view class=" u-plr30">
  11. <view class="u-flex-center-sb">
  12. <view class="u-font30">可使用金额</view>
  13. <view class="u-font24" @click="goTransactionDetail">交易明细 <text class="iconfont u-ml10">&#xe6c7;</text> </view>
  14. </view>
  15. <view class="u-font28 u-mt15"> <text class="">¥</text> <text class="font50">{{dataFrom.balance}}</text> 元 </view>
  16. </view>
  17. </view>
  18. <!-- <view v-if="ispay" class="u-flex-center-sb u-mt30 bg-fff" @click="goCardBag">
  19. <view class="u-font26 u-181818">去购卡</view>
  20. <view class="iconfont u-999">&#xe6c7;</view>
  21. </view> -->
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. let app = getApp()
  27. export default {
  28. data() {
  29. return {
  30. config: {
  31. back: true, //false是tolbar页面 是则不写
  32. title: '我的钱包',
  33. color: '#fff',
  34. //背景颜色;参数一:透明度(0-1);参数二:背景颜色(array则为线性渐变,string为单色背景)
  35. backgroundColor: [0, '#ffffff'],
  36. statusBarFontColor: '#1A1A1A',
  37. },
  38. dataFrom:{},
  39. imgUrl: this.$mConfig.staticUrl,
  40. ispay: app.globalData.openPay
  41. }
  42. },
  43. onLoad() {
  44. //获取用户账户信息
  45. this.$http.get('/account/getAccountInfo',).then(res => {
  46. if(res&&res.code==200){
  47. this.dataFrom = res.data
  48. }
  49. })
  50. },
  51. methods:{
  52. //返回上一页
  53. getback(){
  54. uni.redirectTo({
  55. url:"../../index/my"
  56. })
  57. },
  58. //交易明细
  59. goTransactionDetail(){
  60. uni.navigateTo({
  61. url:"transactionDetail"
  62. })
  63. },
  64. //去购卡
  65. goCardBag(){
  66. uni.navigateTo({
  67. url:"cardBag"
  68. })
  69. }
  70. }
  71. }
  72. </script>
  73. <style lang="scss">
  74. page{
  75. background-color: #F5F5F5;
  76. }
  77. .navbar {
  78. position: absolute;
  79. top: 0;
  80. left: 0;
  81. }
  82. .wallet{
  83. position: relative;
  84. .bg{
  85. width: 100%;
  86. height: 402rpx;
  87. background-color: rgb(64,194,213);
  88. }
  89. .position-ab{
  90. position: absolute;
  91. width: 100%;
  92. top: 186rpx;
  93. .top-title {
  94. height: 50rpx;
  95. line-height: 50rpx;
  96. }
  97. .font50{
  98. font-size: 50rpx;
  99. }
  100. }
  101. .bg-fff{
  102. background-color: #FFFFFF;
  103. padding: 32rpx 30rpx;
  104. }
  105. }
  106. </style>