assets.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <template>
  2. <view class="assets">
  3. <view class="header">
  4. <view class="img"><image :src="userInfo.avatar" mode=""></image></view>
  5. {{ userInfo.nickname }}
  6. </view>
  7. <!-- <view class="numerical">
  8. <view class="value">
  9. <text>8555</text>
  10. <br />
  11. 贡献值
  12. </view>
  13. <view class="l"></view>
  14. <view class="value">
  15. <text>788</text>
  16. <br />
  17. 诚信值
  18. </view>
  19. </view> -->
  20. <view class="main">
  21. <view class="btn" @click="nav('/pages/money/wallet')">
  22. <image src="../../static/icon/assent1.png"></image>
  23. <text>{{ userInfo.brokerage_price * 1 }}</text>
  24. 佣金
  25. </view>
  26. <!-- <view class="btn" @click="nav('/pages/money/award')">
  27. <image src="../../static/icon/assent2.png"></image>
  28. <text>{{ candy || 0 }}</text>
  29. 糖果
  30. </view> -->
  31. <view class="btn" @click="nav('/pages/money/integralShopping')">
  32. <image src="../../static/icon/assent3.png"></image>
  33. <text>{{ userInfo.now_money * 1 }}</text>
  34. 货款
  35. </view>
  36. <view class="btn" @click="nav('/pages/money/mallPoints')">
  37. <image src="../../static/icon/assent4.png"></image>
  38. <text>{{ scjf || 0 }}</text>
  39. 商城积分
  40. </view>
  41. <!-- <view class="btn" @click="nav('/pages/money/integralP')">
  42. <image src="../../static/icon/assent5.png"></image>
  43. <text>{{ jf || 0 }}</text>
  44. 拼团积分
  45. </view> -->
  46. <!-- <view class="btn" @click="nav('/pages/money/frozen')">
  47. <image src="../../static/icon/assent6.png"></image>
  48. <text>{{ ptdjjf || 0 }}</text>
  49. 拼团冻结积分
  50. </view> -->
  51. <view class="btn" @click="nav('/pages/money/publicWelfare')">
  52. <image src="../../static/icon/assent7.png"></image>
  53. <text>{{ gyjf || 0 }}</text>
  54. 福利积分
  55. </view>
  56. <!-- <view class="btn" @click="nav('/pages/money/publicPing')">
  57. <image src="../../static/icon/assent8.png"></image>
  58. <text>{{ ptb || 0 }}</text>
  59. 拼团币
  60. </view> -->
  61. <view class="btn" @click="nav('/pages/money/publicW')">
  62. <image src="../../static/icon/assent9.png"></image>
  63. <text>{{ wjb || 0 }}</text>
  64. 系统文件
  65. </view>
  66. </view>
  67. </view>
  68. </template>
  69. <script>
  70. import { wallet } from '@/api/finance.js';
  71. import { mapState, mapMutations } from 'vuex';
  72. export default {
  73. data() {
  74. return {
  75. candy: '',
  76. jf: '',
  77. ptdjjf: '',
  78. scjf: '',
  79. gyjf: '',
  80. ptb:'',
  81. wjb:''
  82. };
  83. },
  84. onLoad() {
  85. this.getWallet();
  86. },
  87. methods: {
  88. getWallet() {
  89. uni.showLoading({
  90. title: '加载中'
  91. });
  92. wallet({}).then(({ data }) => {
  93. console.log(data);
  94. const obj = this;
  95. const arr = Object.keys(data.back);
  96. console.log(arr);
  97. let ar = [];
  98. arr.forEach(e => {
  99. console.log(e, '11111');
  100. if (e == 'LALA') {
  101. obj.candy = (data.back[e].money.money * 1).toFixed(0);
  102. }
  103. if (e == 'USDC') {
  104. obj.jf = data.back[e].money.money * 1;
  105. }
  106. if (e == 'USDL') {
  107. obj.ptdjjf = data.back[e].money.money * 1;
  108. }
  109. if (e == 'SCJF') {
  110. obj.scjf = data.back[e].money.money * 1;
  111. }
  112. if (e == 'FLJF') {
  113. console.log(e,'123456')
  114. obj.gyjf = data.back[e].money.money * 1;
  115. }
  116. if (e == 'USDT') {
  117. obj.ptb = data.back[e].money.money * 1;
  118. }
  119. if (e == 'FIL') {
  120. obj.wjb = data.back[e].money.money * 1;
  121. }
  122. });
  123. uni.hideLoading();
  124. });
  125. },
  126. nav(url) {
  127. uni.navigateTo({
  128. url: url,
  129. fail() {
  130. uni.switchTab({
  131. url: url
  132. });
  133. }
  134. });
  135. }
  136. },
  137. computed: {
  138. ...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
  139. }
  140. };
  141. </script>
  142. <style lang="scss" scoped>
  143. .assets {
  144. .header {
  145. height: 400rpx;
  146. background: linear-gradient(180deg, #32c6ff 0%, #2e58ff 100%);
  147. color: #fff;
  148. font-size: 35rpx;
  149. text-align: center;
  150. font-family: PingFang-SC-Medium;
  151. padding-top: 100rpx;
  152. .img {
  153. margin-bottom:10rpx;
  154. image {
  155. border-radius: 50%;
  156. width: 150rpx;
  157. height: 150rpx;
  158. border: solid 6rpx #fff;
  159. }
  160. }
  161. }
  162. .numerical {
  163. box-shadow: 0 5rpx 10rpx 1rpx #e6e6e6;
  164. margin: 30rpx;
  165. color: #666666;
  166. display: flex;
  167. text-align: center;
  168. background-color: #fff;
  169. padding: 30rpx;
  170. border-radius: 20rpx;
  171. position: relative;
  172. top: -120rpx;
  173. .l {
  174. background-color: #f8f8f8;
  175. width: 5rpx;
  176. height: 70rpx;
  177. margin: auto 0;
  178. }
  179. .value {
  180. flex: 1;
  181. }
  182. text {
  183. font-size: 40rpx;
  184. color: #333333;
  185. }
  186. }
  187. .main {
  188. position: relative;
  189. display: flex;
  190. flex-wrap: wrap;
  191. text-align: center;
  192. margin: 20rpx;
  193. .btn {
  194. padding: 40rpx;
  195. box-shadow: 0 5rpx 10rpx 1rpx #e6e6e6;
  196. border-radius: 20rpx;
  197. width: calc(50% - 20rpx);
  198. height: 240rpx;
  199. background-color: #fff;
  200. margin: 10rpx;
  201. display: grid;
  202. align-content: space-around;
  203. color: #666666;
  204. font-family: PingFang-SC-Medium;
  205. image {
  206. margin: 10rpx auto;
  207. width: 80rpx;
  208. height: 80rpx;
  209. }
  210. text {
  211. color: #333333;
  212. font-size: 35rpx;
  213. }
  214. }
  215. }
  216. }
  217. </style>