mine_income.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. <template>
  2. <view class="container">
  3. <view class="topView">
  4. <view class="moneyLabel">
  5. <text>总金额 (元)</text>
  6. </view>
  7. <view class="moneyNum">
  8. <text>{{data.total?data.total:'0.00'}}</text>
  9. </view>
  10. <view class="allMoney">
  11. <text>累计收益:{{data.settled?data.settled:'0.00'}}元</text>
  12. </view>
  13. <view class="redLabel1">
  14. <text>每月1日系统自动结算收益金额</text>
  15. </view>
  16. <view class="detailView">
  17. <view>
  18. <text class="label1">账户余额</text>
  19. <text class="label2">{{data.balance?data.balance:'0.00'}}</text>
  20. </view>
  21. <view>
  22. <text class="label1">待结算金额</text>
  23. <text class="label2">{{data.frozen?data.frozen:'0.00'}}</text>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="item_list">
  28. <view class="item" v-for="(item, index) in inComeItemList" :key="index" @tap="tapToMenu(index)">
  29. <view class="item_content">
  30. <image :src="item.itemIcon"></image>
  31. <text>{{ item.itemName }}</text>
  32. </view>
  33. <image src="http://139.9.103.171:1888/img/image/arrow.png"></image>
  34. </view>
  35. </view>
  36. <view v-if="!isPromoter" class="btnView">
  37. <view class="btn" @tap="tapToMenu(3)">
  38. <Text>团长申请</text>
  39. </view>
  40. <view class="btn1" @tap="tapToMenu(4)">
  41. <Text>残忍拒绝</text>
  42. </view>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. export default {
  48. components: {
  49. },
  50. data() {
  51. return {
  52. data:null,
  53. memberId: 0,
  54. isPromoter:false,
  55. inComeItemList: [
  56. {
  57. itemName: '结算记录',
  58. itemIcon: 'http://139.9.103.171:1888/img/image/settlementRecordsIcon.png'
  59. },
  60. {
  61. itemName: '收益记录',
  62. itemIcon: 'http://139.9.103.171:1888/img/image/incomeRecord_icon.png'
  63. },
  64. // {
  65. // itemName: '我邀请的人',
  66. // itemIcon: 'http://139.9.103.171:1888/img/image/inViteRecordIcon.png'
  67. // }
  68. ],
  69. }
  70. },
  71. methods: {
  72. tapToMenu(idx) {
  73. if(idx==0||idx==1||idx==2){
  74. if(!this.$auth.isPromoter())return;
  75. }
  76. switch (idx) {
  77. case 0: // 结算记录
  78. uni.navigateTo({
  79. url: '/pagesM/pages/balance_records'
  80. });
  81. break;
  82. case 1: // 收益记录
  83. uni.navigateTo({
  84. url: '/pagesM/pages/earn_records'
  85. });
  86. break;
  87. case 2: // 我邀请的人
  88. uni.navigateTo({
  89. url: '/pagesM/pages/my_invite'
  90. });
  91. break;
  92. case 3: // 申请推广
  93. uni.navigateTo({
  94. url: '/pagesM/pages/applyToPromotion'
  95. });
  96. break;
  97. case 4: // 拒绝
  98. uni.navigateBack({
  99. delta:1
  100. })
  101. break;
  102. default:
  103. break;
  104. }
  105. },
  106. onLoadPage() {
  107. this.memberId = this.$auth.getMemberId();
  108. if(this.$auth.isPromoter()){
  109. this.isPromoter = true;
  110. }
  111. this.getData();
  112. },
  113. async getData(){
  114. let resp = await this.$api.distributionCommission({
  115. _isShowLoading: true
  116. })
  117. this.data = resp
  118. }
  119. }
  120. }
  121. </script>
  122. <style lang="scss" scoped>
  123. .container {
  124. padding-top: 20rpx;
  125. background-color: #F6F4F5;
  126. width: 100vw;
  127. height: 100vh;
  128. font-family: 'PingFang-SC-Bold';
  129. }
  130. .topView{
  131. margin-left: 20rpx;
  132. border-radius: 20rpx;
  133. width: 710rpx;
  134. height:540rpx;
  135. background-color: #ffffff;
  136. }
  137. .moneyLabel{
  138. padding-top: 99rpx;
  139. width: 710rpx;
  140. justify-content: center;
  141. display: flex;
  142. flex-direction: row;
  143. align-items: center;
  144. justify-content: center;
  145. text{
  146. color: #333333;
  147. font-size: 30rpx;
  148. }
  149. }
  150. .moneyNum{
  151. padding-top: 10rpx;
  152. width: 710rpx;
  153. display: flex;
  154. flex-direction: row;
  155. align-items: center;
  156. justify-content: center;
  157. text{
  158. color: $dt-color-primary;
  159. font-size: 72rpx;
  160. }
  161. }
  162. .allMoney{
  163. padding-top: -30rpx;
  164. width: 710rpx;
  165. display: flex;
  166. flex-direction: row;
  167. align-items: center;
  168. justify-content: center;
  169. text{
  170. color: #333333;
  171. font-size: 24rpx;
  172. }
  173. }
  174. .redLabel1{
  175. padding-top: 15rpx;
  176. width: 710rpx;
  177. display: flex;
  178. flex-direction: row;
  179. align-items: center;
  180. justify-content: center;
  181. text{
  182. color: #EA7A7A;
  183. font-size: 24rpx;
  184. background-color:#EEEEEE ;
  185. padding-left: 6rpx;
  186. padding-right: 6rpx;
  187. border-radius: 15rpx;
  188. }
  189. }
  190. .detailView{
  191. padding-top: 50rpx;
  192. width: 710rpx;
  193. display: flex;
  194. flex-direction: row;
  195. align-items: center;
  196. justify-content: space-around;
  197. view{
  198. display: flex;
  199. flex-direction: column;
  200. justify-content: center;
  201. align-items: center;
  202. text{
  203. color: #EA7A7A;
  204. font-size: 24rpx;
  205. }
  206. .label1{
  207. color: #999999;
  208. font-size: 24rpx;
  209. }
  210. .label2{
  211. margin-top: 10rpx;
  212. color:#333333;
  213. font-size: 36rpx;
  214. }
  215. }
  216. }
  217. .item_list {
  218. display: flex;
  219. flex-direction: column;
  220. background: #fff;
  221. margin-top: 20upx;
  222. margin-left: 20rpx;
  223. margin-right: 20rpx;
  224. border-radius: 20rpx;
  225. .item {
  226. display: flex;
  227. flex-direction: row;
  228. align-items: center;
  229. justify-content: space-between;
  230. padding: 0 30upx;
  231. height: 90upx;
  232. border-bottom: 1upx solid #e5e5e5;
  233. .item_content {
  234. display: flex;
  235. flex-direction: row;
  236. align-items: center;
  237. image {
  238. width: 38upx;
  239. height: 38upx;
  240. }
  241. text {
  242. font-size: 28upx;
  243. color: #333333;
  244. margin-left: 20upx;
  245. }
  246. }
  247. image {
  248. width: 10upx;
  249. height: 18upx;
  250. }
  251. }
  252. .item:last-child {
  253. border: none;
  254. }
  255. }
  256. .btnView{
  257. margin-top: 119rpx;
  258. width: 100vw;
  259. display: flex;
  260. flex-direction: row;
  261. align-items: center;
  262. .btn{
  263. width: 247rpx;
  264. height:88rpx;
  265. background-color: $dt-color-primary;
  266. border-radius: 15rpx;
  267. padding-top: 5rpx;
  268. margin-left: 79rpx;
  269. text-align: center;
  270. text{
  271. line-height:88rpx ;
  272. color:#ffffff;
  273. font-size: 30rpx;
  274. }
  275. }
  276. .btn1{
  277. margin-left: 104rpx;
  278. width: 247rpx;
  279. height:88rpx;
  280. background-color: #ffffff;
  281. border-radius: 15rpx;
  282. padding-top: 5rpx;
  283. text-align: center;
  284. text{
  285. line-height:88rpx ;
  286. color:#999999;
  287. font-size: 30rpx;
  288. }
  289. }
  290. }
  291. </style>