Account.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <template><page-meta :root-font-size="fontSize+'px'"></page-meta>
  2. <member-base :show="false"><view class="div container">
  3. <view class="div common-header-wrap">
  4. <view :style="'height:'+navHeight+'px'"></view>
  5. <view class="common-header-holder"></view>
  6. <view class="common-header-fixed">
  7. <title-header />
  8. <uni-nav-bar title="我的钱包" class="common-header" left-icon="back" @clickLeft="goBack()">
  9. </uni-nav-bar>
  10. </view>
  11. </view>
  12. <view class="div account_header">
  13. <view class="div predeposit ">
  14. <text class="predeposit_title">可用余额:</text><text class='available_predeposit'>{{ available_predeposit }}</text>
  15. </view>
  16. <view class="div amount-wrapper">
  17. <view class="div amount_item">充值卡余额 {{available_rc_balance}}</view>
  18. <view class="div amount_item">冻结金额 {{freeze_predeposit}}</view>
  19. </view>
  20. </view>
  21. <view class="div card-wrapper">
  22. <view class="div card_item" @click="goNavigate('/pages/member/voucher/VoucherList',{ index: 1 })">
  23. <image mode="aspectFit" class="img" src="../../../static/image/member/icon_daijinquan_nor.png"></image>
  24. <view class="explain">店铺代金券:{{voucher_count}}</view>
  25. </view>
  26. <view class="border"></view>
  27. <view class="div card_item" @click="goNavigate('/pages/member/point/PointList')">
  28. <image mode="aspectFit" class="img" src="../../../static/image/member/icon_jifen_nor.png"></image>
  29. <view class="explain">积分:{{points}}</view>
  30. </view>
  31. </view>
  32. <view class="div predeposit_handle mt-5">
  33. <view class="div item" @click="goNavigate('/pages/member/recharge/RechargeList')"><image mode="aspectFit" class="img" src="../../../static/image/member/icon_chongzhi_pre.png" /><text>充值</text></view>
  34. <view class="div item" @click="goNavigate('/pages/member/withdraw/WithdrawList')"><image mode="aspectFit" class="img" src="../../../static/image/member/icon_tixian_pre.png" /><text>提现</text></view>
  35. </view>
  36. <view class="div account mt-5">
  37. <view class="div menu">
  38. <view class="div" @click="goNavigate('/pages/member/mallvoucher/MallVoucherList',{ index: 1 })"><flex-line class="menu-item" :is-link="true" :show-border="true"><text class="span line-name">平台代金券</text></flex-line></view>
  39. <view class="div" @click="goNavigate('/pages/member/predeposit/PredepositList')"><flex-line class="menu-item" :is-link="true" :show-border="true"><text class="span line-name">资金明细</text></flex-line></view>
  40. <view class="div" @click="goNavigate('/pages/member/pointsorder/OrderList')"><flex-line class="menu-item" :is-link="true" :show-border="true"><text class="span line-name">积分兑换</text></flex-line></view>
  41. <view class="div" @click="goNavigate('/pages/member/bank/BankList')"><flex-line class="menu-item" :is-link="true" :show-border="true"><text class="span line-name">提现账户</text></flex-line></view>
  42. <view class="div" @click="goNavigate('/pages/member/predeposit/RechargeCardList')"><flex-line class="menu-item" :is-link="true" :show-border="true"><text class="span line-name">我的充值卡</text></flex-line></view>
  43. <view class="div" @click="goNavigate('/pages/member/bonusreceive/Bonusreceive')"><flex-line class="menu-item" :is-link="true" :show-border="true"><text class="span line-name">红包领取记录</text></flex-line></view>
  44. </view>
  45. </view>
  46. </view></member-base>
  47. </template>
  48. <script>
  49. import {getFontSize} from '@/util/common'
  50. import TitleHeader from '../../TitleHeader'
  51. import { urlencode } from '@/util/common'
  52. import MemberBase from '../MemberBase'
  53. import { getMemberIndex } from '../../../api/member'
  54. import { mapState } from 'vuex'
  55. import flexLine from '../../flexLine'
  56. export default {
  57. components:{
  58. TitleHeader,
  59. MemberBase,
  60. flexLine
  61. },
  62. data(){
  63. return {
  64. navHeight: 0,
  65. available_predeposit: 0.00,
  66. freeze_predeposit: 0.00,
  67. voucher_count: 0,
  68. points: 0,
  69. available_rc_balance: 0
  70. }
  71. },
  72. created () {
  73. getMemberIndex().then(
  74. response => {
  75. if (response && response.result.member_info) {
  76. this.available_predeposit = response.result.member_info.available_predeposit
  77. this.freeze_predeposit = response.result.member_info.freeze_predeposit
  78. this.voucher_count = response.result.member_info.voucher_count
  79. this.points = response.result.member_info.member_points
  80. this.available_rc_balance = response.result.member_info.available_rc_balance
  81. }
  82. },
  83. error => {}
  84. )
  85. },
  86. computed:{
  87. fontSize(){
  88. return getFontSize()
  89. },
  90. },
  91. mounted(){
  92. // #ifdef MP-WEIXIN
  93. this.navHeight = uni.getMenuButtonBoundingClientRect().top
  94. // #endif
  95. },
  96. methods:{
  97. goNavigate(path,query=false){
  98. uni.navigateTo({url:path+(query?('?'+urlencode(query)):'')})
  99. },
  100. goBack(){uni.navigateBack({delta:1})},
  101. }
  102. }
  103. </script>
  104. <style scoped lang="scss">
  105. .common-header-wrap .common-header{box-shadow: unset}
  106. .account_header{
  107. background: linear-gradient(360deg, #FB2732 0%, #FC5767 100%);
  108. color: #fff;
  109. padding: .7rem;
  110. font-size:$fontSize;
  111. box-sizing: border-box;
  112. .predeposit{
  113. padding: .5rem 0;
  114. margin-top:.8rem;
  115. display: flex;
  116. justify-content: center;
  117. align-items: center;
  118. .predeposit_title{
  119. font-size: 1rem;
  120. }
  121. .available_predeposit{
  122. font-size:1.5rem;
  123. }
  124. }
  125. .amount-wrapper{
  126. margin-top: 1.5rem;
  127. padding-top:.7rem;
  128. border-top:1px dashed rgba(255,255,255,.5);
  129. overflow: hidden;
  130. .amount_item{
  131. float: left;
  132. width: 50%;
  133. }
  134. .amount_item:nth-child(2){
  135. text-align: right;
  136. }
  137. }
  138. }
  139. .card-wrapper{
  140. background-color: #fff;
  141. display: flex;
  142. padding: .5rem 0;
  143. justify-content: center;
  144. align-items: center;
  145. .card_item{
  146. width: 36%;
  147. margin: 0 6%;
  148. background-color: #F5A623;
  149. padding: .8rem 0;
  150. border-radius: .5rem;
  151. text-align: center;
  152. .img{
  153. width: 1.5rem;
  154. height: 1.5rem;
  155. }
  156. .explain{
  157. font-size: $subFontSize;
  158. color: #fff;
  159. }
  160. }
  161. .card_item:nth-child(3){
  162. background-color: #FF862F;
  163. }
  164. .border{
  165. width: 1px;
  166. background-color: #cdcdcd;
  167. height: 2.8rem;
  168. }
  169. }
  170. .predeposit_handle{
  171. height: 4rem;
  172. display: flex;
  173. flex-direction: row;
  174. justify-content: space-between;
  175. align-items: stretch;
  176. background-color: #fff;
  177. .item{
  178. display: flex;
  179. justify-content: center;
  180. align-items: center;
  181. flex: 1;
  182. .img{
  183. width: 3rem;
  184. height: 3rem;
  185. }
  186. text{
  187. font-size: .9rem;
  188. color: #666;
  189. }
  190. }
  191. }
  192. .account{
  193. padding: 0 $pageSpace;
  194. background: #fff;
  195. .menu{
  196. background: #fff;
  197. }
  198. }
  199. </style>