me.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <template>
  2. <app-layout>
  3. <app-head :theme="getTheme"></app-head>
  4. <view class="title dir-left-nowrap cross-center">
  5. <image class="avatar" :src="middleman.avatar"></image>
  6. <view class="user-info dir-top-nowrap main-center">
  7. <view class="user dir-left-nowrap cross-center">
  8. <view class="nickname">{{middleman.nickname}}</view>
  9. <view class="middleman">
  10. <image src="./../image/logo.png"></image>
  11. <text>{{setting.middleman}}</text>
  12. </view>
  13. </view>
  14. <view class="apply">加入时间: {{apply_at}}</view>
  15. </view>
  16. </view>
  17. <view class="money-info">
  18. <view class="menu" style="margin: 0">
  19. <view class="menu-item main-between cross-center">
  20. <view>
  21. 已结算
  22. <view class="sec-title">已结算金额=已提现金额+可提现金额</view>
  23. </view>
  24. <view class="money">{{middleman.total_money}}</view>
  25. </view>
  26. <view class="menu-item main-between cross-center">
  27. <view>可提现</view>
  28. <view class="money">{{middleman.money}}</view>
  29. </view>
  30. </view>
  31. <view @click="toProfit" class="look-money main-center cross-center">
  32. <view>查看利润明细</view>
  33. <image src="/static/image/icon/arrow-right.png"></image>
  34. </view>
  35. </view>
  36. <view class="menu">
  37. <view @click="toCash" class="menu-item main-between cross-center">
  38. <view>利润提现</view>
  39. <image src="/static/image/icon/arrow-right.png"></image>
  40. </view>
  41. <view @click="toClerk" class="menu-item main-between cross-center">
  42. <view>提货核销</view>
  43. <image src="/static/image/icon/arrow-right.png"></image>
  44. </view>
  45. </view>
  46. <view class="menu">
  47. <view @click="toAddress" class="menu-item main-between cross-center">
  48. <view>我的地址</view>
  49. <image src="/static/image/icon/arrow-right.png"></image>
  50. </view>
  51. </view>
  52. <app-menu :theme="getTheme" active="me"></app-menu>
  53. </app-layout>
  54. </template>
  55. <script>
  56. import {mapGetters, mapState} from 'vuex';
  57. import appMenu from '../components/app-menu';
  58. import appHead from '../components/app-head.vue';
  59. export default {
  60. data() {
  61. return {
  62. middleman: {},
  63. setting: {},
  64. apply_at: ''
  65. }
  66. },
  67. components: {
  68. "app-menu": appMenu,
  69. "app-head": appHead
  70. },
  71. computed: {
  72. ...mapGetters('mallConfig', {
  73. getTheme: 'getTheme',
  74. }),
  75. ...mapState({
  76. stock: state => state.mallConfig.__wxapp_img.stock,
  77. bonusImg: state => state.mallConfig.__wxapp_img.bonus,
  78. userInfo: state => state.user.info,
  79. })
  80. },
  81. onShow: function (options) {
  82. this.getStatus();
  83. },
  84. methods: {
  85. toProfit() {
  86. uni.navigateTo({
  87. url: '/plugins/community/profit/profit'
  88. });
  89. },
  90. toCash() {
  91. uni.navigateTo({
  92. url: '/plugins/community/profit-cash/profit-cash'
  93. });
  94. },
  95. toClerk() {
  96. uni.navigateTo({
  97. url: '/plugins/community/clerk/clerk'
  98. });
  99. },
  100. toAddress() {
  101. uni.navigateTo({
  102. url: '/plugins/community/apply/apply?id=' + this.middleman.id
  103. });
  104. },
  105. getStatus() {
  106. let that = this;
  107. that.$request({
  108. url: that.$api.community.index,
  109. }).then(response=>{
  110. if(response.code == 0) {
  111. this.setting = response.data.setting;
  112. if(response.data.middleman.id > 0) {
  113. this.middleman = response.data.middleman;
  114. this.apply_at = this.middleman.apply_at.substring(0,10)
  115. }else {
  116. uni.showToast({
  117. title: '您还不是团长,现在前往申请页面',
  118. icon: 'none',
  119. duration: 1000
  120. });
  121. setTimeout(function(){
  122. uni.redirectTo({
  123. url: '/plugins/community/apply/apply'
  124. });
  125. },1000)
  126. }
  127. }else {
  128. uni.showToast({
  129. title: response.msg,
  130. icon: 'none',
  131. duration: 1000
  132. });
  133. }
  134. }).catch(response => {
  135. that.$hideLoading();
  136. });
  137. },
  138. }
  139. }
  140. </script>
  141. <style scoped lang="scss">
  142. .title {
  143. height: 220rpx;
  144. margin-top: -360rpx;
  145. width: 100%;
  146. padding: 0 45rpx;
  147. .avatar {
  148. width: 130rpx;
  149. height: 130rpx;
  150. margin-right: 25rpx;
  151. display: block;
  152. border-radius: 50%;
  153. }
  154. .user-info {
  155. color: #fff;
  156. height: 130rpx;
  157. .user {
  158. height: 36rpx;
  159. line-height: 36rpx;
  160. .nickname {
  161. font-size: 28rpx;
  162. margin-right: 20rpx;
  163. }
  164. .middleman {
  165. height: 36rpx;
  166. background-color: #353535;
  167. border-radius: 18rpx;
  168. padding: 0 12rpx 0 6rpx;
  169. font-size: 22rpx;
  170. image {
  171. float: left;
  172. margin-top: 2rpx;
  173. width: 32rpx;
  174. height: 32rpx;
  175. display: block;
  176. margin-right: #{6rpx};
  177. }
  178. }
  179. }
  180. .apply {
  181. color: #fff;
  182. font-size: 26rpx;
  183. margin-top: 20rpx;
  184. }
  185. }
  186. }
  187. .money-info {
  188. width: 702rpx;
  189. margin: 0 24rpx;
  190. border-radius: 16rpx;
  191. background-color: #fff;
  192. position: relative;
  193. z-index: 10;
  194. .menu {
  195. border-bottom-left-radius: 0;
  196. border-bottom-right-radius: 0;
  197. .menu-item {
  198. height: 115rpx;
  199. font-size: 26rpx;
  200. .sec-title {
  201. font-size: 20rpx;
  202. margin-top: 8rpx;
  203. color: #999;
  204. }
  205. .money {
  206. font-family: DIN;
  207. font-size: 40rpx;
  208. color: #f39800;
  209. }
  210. }
  211. }
  212. .look-money {
  213. height: 88rpx;
  214. border-top: 2rpx solid #e2e2e2;
  215. font-size: 26rpx;
  216. color: #999999;
  217. image {
  218. width: 12rpx;
  219. height: 22rpx;
  220. margin-left: 15rpx;
  221. display: block;
  222. }
  223. }
  224. }
  225. .menu {
  226. border-radius: 16rpx;
  227. background-color: #fff;
  228. width: 702rpx;
  229. margin: 15rpx 24rpx 0;
  230. .menu-item {
  231. padding: 32rpx;
  232. height: 96rpx;
  233. border-top: 2rpx solid #e2e2e2;
  234. font-size: 26rpx;
  235. color: #353535;
  236. &:first-of-type {
  237. border-top: 0;
  238. }
  239. image {
  240. width: 12rpx;
  241. height: 22rpx;
  242. display: block;
  243. }
  244. }
  245. }
  246. </style>