index.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. <template>
  2. <view class="page">
  3. <view class="content">
  4. <view class="wallet-card">
  5. <view class="">
  6. <text class="white f12">账户余额</text>
  7. </view>
  8. <view class="">
  9. <text class="f30 white fw">{{my_data.money?my_data.money:0.00}}</text><text
  10. class="white f12">元</text>
  11. </view>
  12. <view class="wallet-btn-group">
  13. <button @tap="goPath('charge')">
  14. <text>充值</text>
  15. </button>
  16. <button @tap="goPath('withdraw')">
  17. <text>提现</text>
  18. </button>
  19. </view>
  20. </view>
  21. <view class="more-card">
  22. <view class="more-item" @click="goPath('capital2')">
  23. <image src="/static/theme/default/wallet/1.png" mode="heightFix"></image>
  24. <text>账单明细</text>
  25. </view>
  26. <view class="more-item" @click="goPath('capital?type=hongbao')">
  27. <image src="/static/theme/default/wallet/2.png" mode=""></image>
  28. <text>红包明细</text>
  29. </view>
  30. <view class="more-item" @click="goPath('alipay_set')">
  31. <image src="/static/theme/default/wallet/3.png" mode=""></image>
  32. <text>提现设置</text>
  33. </view>
  34. <view class="more-item" @click="goPath('trade_password')">
  35. <image src="/static/theme/default/wallet/4.png" mode=""></image>
  36. <text>密码设置</text>
  37. </view>
  38. <view class="more-item" @click="goPath('/pages/my/pay/pay')">
  39. <image src="/static/theme/default/wallet/5.png" mode=""></image>
  40. <text>收付款</text>
  41. </view>
  42. </view>
  43. </view>
  44. <view class="wallet-tips">
  45. <text @tap="goPath('/pages/article/article')">帮助中心</text>
  46. <view class="">
  47. 《 用户服务协议》《 隐私政策》
  48. </view>
  49. <!--<text class="gray f12">本服务由首信易支付提供</text>-->
  50. </view>
  51. </view>
  52. </template>
  53. <style lang="scss">
  54. .wallet-tips {
  55. display: flex;
  56. flex-direction: column;
  57. margin-top: 80rpx;
  58. align-items: center;
  59. .tips {
  60. font-size: 30rpx;
  61. }
  62. .f12 {
  63. font-size: 24rpx;
  64. }
  65. .gray {
  66. color: gray;
  67. }
  68. }
  69. .more-card {
  70. width: 94vw;
  71. margin: 20rpx auto;
  72. border-radius: 40rpx;
  73. box-sizing: border-box;
  74. background: #ffff;
  75. box-shadow: 0 0 10rpx 2rpx rgba(0, 0, 0, 0.05);
  76. display: flex;
  77. flex-wrap: wrap;
  78. .more-item {
  79. width: 33.33%;
  80. height: 160rpx;
  81. display: flex;
  82. flex-direction: column;
  83. justify-content: center;
  84. align-items: center;
  85. image {
  86. width: 50rpx;
  87. height: 50rpx;
  88. }
  89. text {
  90. margin-top: 20rpx;
  91. font-size: 24rpx;
  92. color: #000;
  93. }
  94. }
  95. }
  96. .wallet-card {
  97. width: 94vw;
  98. margin: 20rpx auto;
  99. border-radius: 40rpx;
  100. box-sizing: border-box;
  101. padding: 20rpx 40rpx;
  102. height: 300rpx;
  103. background: linear-gradient(to right, #2da2fd, #2da2fd);
  104. .white {
  105. color: #fff;
  106. }
  107. .fw {
  108. font-weight: bold;
  109. }
  110. .f30 {
  111. font-size: 60rpx;
  112. }
  113. .f12 {
  114. font-size: 24rpx;
  115. }
  116. .wallet-btn-group {
  117. display: flex;
  118. align-items: center;
  119. height: 100rpx;
  120. justify-content: flex-start;
  121. button {
  122. height: 80rpx;
  123. border-radius: 80rpx;
  124. width: 180rpx;
  125. color: #2da2fd;
  126. display: flex;
  127. justify-content: center;
  128. align-items: center;
  129. font-size: 30rpx;
  130. background: #fff;
  131. margin-right: 40rpx;
  132. margin-left: 0;
  133. }
  134. }
  135. }
  136. .content {
  137. display: flex;
  138. flex-direction: column;
  139. }
  140. .img {
  141. display: flex;
  142. ;
  143. height: 440upx;
  144. flex-direction: column;
  145. justify-content: center;
  146. align-items: center;
  147. background-color: #5693ee;
  148. width: 100%;
  149. }
  150. .img image {
  151. width: 140upx;
  152. height: 150upx;
  153. }
  154. .img text {
  155. color: white;
  156. font-size: 20px;
  157. }
  158. .content .withdraw {
  159. width: 95%;
  160. background-color: #5693ee;
  161. color: white;
  162. margin-top: 10upx;
  163. height: 80upx;
  164. line-height: 80upx !important;
  165. font-size: 36upx;
  166. cursor: pointer;
  167. }
  168. .content .charge {
  169. background-color: white;
  170. color: #5693ee;
  171. border: 1px solid #5693ee;
  172. }
  173. .content .list {
  174. margin-top: 20upx;
  175. }
  176. .uni-page-head {
  177. box-sizing: content-box !important;
  178. }
  179. </style>
  180. <script>
  181. import uniList from '../../../components/uni-ui/uni-list/uni-list.vue';
  182. import uniListItem from '../../../components/uni-ui/uni-list-item/uni-list-item.vue';
  183. import _hook from '../../../common/_hook';
  184. import _data from '../../../common/_data';
  185. import _get from '../../../common/_get';
  186. export default {
  187. components: {
  188. uniList,
  189. uniListItem,
  190. },
  191. data() {
  192. return {
  193. my_data: {},
  194. }
  195. },
  196. onShow() {
  197. _hook.routeTabBarHook();
  198. let _this = this;
  199. /** 监听新的个人数据 */
  200. _get.getUserInfo({});
  201. uni.$on('data_user_info', function(data) {
  202. _this.my_data = data;
  203. console.log('更新用户数据....')
  204. _data.data('user_info', data)
  205. });
  206. _this.my_data = _data.data('user_info');
  207. console.log(_this.my_data)
  208. },
  209. onLoad() {
  210. },
  211. onUnload() {},
  212. computed: {},
  213. methods: {
  214. goPath(path) {
  215. if (path) {
  216. uni.navigateTo({
  217. url: path,
  218. });
  219. }
  220. },
  221. },
  222. watch: {
  223. },
  224. }
  225. </script>