promotion.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. <template>
  2. <view class="my-promotion">
  3. <!-- 头部背景 -->
  4. <view class="header">
  5. <view class="name acea-row row-center-wrapper">
  6. <view>当前佣金</view>
  7. <view class="record" @click="goCashRecord()">
  8. 提现记录
  9. <text class="iconfont icon-xiangyou"></text>
  10. </view>
  11. </view>
  12. <view class="num">{{ Info.commissionCount }}</view>
  13. <view class="profit acea-row row-between-wrapper">
  14. <view class="item">
  15. <view>昨日收益</view>
  16. <view class="money">{{ Info.lastDayCount }}</view>
  17. </view>
  18. <view class="item">
  19. <view>累积已提</view>
  20. <view class="money">{{ Info.extractCount }}</view>
  21. </view>
  22. </view>
  23. </view>
  24. <!-- 功能入口列表 -->
  25. <view class="list acea-row row-between-wrapper flex-wrap">
  26. <view class="item acea-row row-center-wrapper row-column" @click="goPoster()">
  27. <text class="iconfont icon-erweima"></text>
  28. <view>推广名片</view>
  29. </view>
  30. <view class="item acea-row row-center-wrapper row-column" @click="goPromoterList()">
  31. <text class="iconfont icon-tongji"></text>
  32. <view>推广人统计</view>
  33. </view>
  34. <view class="item acea-row row-center-wrapper row-column" @click="goCommissionDetails()">
  35. <text class="iconfont icon-qiandai"></text>
  36. <view>佣金明细</view>
  37. </view>
  38. <view class="item acea-row row-center-wrapper row-column" @click="goPromoterOrder()">
  39. <text class="iconfont icon-dingdan"></text>
  40. <view>推广人订单</view>
  41. </view>
  42. <view class="item acea-row row-center-wrapper row-column" @click="toCash()">
  43. <text class="iconfont icon-chongzhi"></text>
  44. <view>立即提现</view>
  45. </view>
  46. </view>
  47. </view>
  48. </template>
  49. <script>
  50. export default {
  51. name: "UserPromotion",
  52. data() {
  53. return {
  54. Info: {
  55. lastDayCount: 0,
  56. extractCount: 0,
  57. commissionCount: 0
  58. }
  59. };
  60. },
  61. mounted() {
  62. this.getInfo();
  63. },
  64. methods: {
  65. goPoster() {
  66. uni.navigateTo({
  67. url: `/pages/user/promotion/Poster`
  68. })
  69. },
  70. goCashRecord() {
  71. uni.navigateTo({
  72. url: `/pages/user/promotion/CashRecord`
  73. })
  74. },
  75. goPromoterList() {
  76. uni.navigateTo({
  77. url: `/pages/user/promotion/PromoterList`
  78. })
  79. },
  80. goCommissionDetails() {
  81. uni.navigateTo({
  82. url: `/pages/user/promotion/CommissionDetails`
  83. })
  84. },
  85. goPromoterOrder() {
  86. uni.navigateTo({
  87. url: `/pages/user/promotion/PromoterOrder`
  88. })
  89. },
  90. getInfo() {
  91. let that = this;
  92. this.$api.request('get', 'user/app/getSpreadInfo').then(res => {
  93. that.Info = res.data;
  94. },
  95. function (err) {
  96. uni.showToast({
  97. title: err.msg || err.response.data.msg || err.response.data.message,
  98. icon: 'none',
  99. duration: 2000
  100. });
  101. }
  102. );
  103. },
  104. toCash() {
  105. uni.navigateTo({
  106. url: `/pages/user/promotion/UserCash`
  107. })
  108. }
  109. }
  110. };
  111. </script>
  112. <style lang="less">
  113. /* layout */
  114. .acea-row {
  115. display: flex;
  116. flex-wrap: wrap;
  117. /* 辅助类 */
  118. }
  119. .my-promotion {
  120. .header {
  121. background-image: url('https://kxmalls.oss-cn-hangzhou.aliyuncs.com/bg/bg.png');
  122. background-repeat: no-repeat;
  123. background-size: 100% 100%;
  124. width: 100%;
  125. height: 375rpx;
  126. padding: 0 30rpx;
  127. box-sizing: border-box;
  128. .name {
  129. font-size: 30rpx;
  130. color: #fff;
  131. padding-top: 57rpx;
  132. position: relative;
  133. .record {
  134. font-size: 26rpx;
  135. color: rgba(255, 255, 255, 0.8);
  136. position: absolute;
  137. right: 20rpx;
  138. .iconfont {
  139. font-size: 25rpx;
  140. margin-left: 10rpx;
  141. }
  142. }
  143. }
  144. .num {
  145. text-align: center;
  146. color: #fff;
  147. font-size: 90rpx;
  148. font-family: 'GuildfordProBook 5';
  149. margin-top: 25rpx;
  150. }
  151. .profit {
  152. padding: 0 20rpx;
  153. font-size: 24rpx;
  154. color: rgba(255, 255, 255, 0.8);
  155. .item {
  156. min-width: 200rpx;
  157. text-align: center;
  158. width: 50%;
  159. .money {
  160. font-size: 34rpx;
  161. color: #fff;
  162. }
  163. }
  164. }
  165. }
  166. .list {
  167. padding: 0 20rpx;
  168. margin-top: 10rpx;
  169. display: flex;
  170. flex-wrap: wrap;
  171. justify-content: space-between;
  172. .item {
  173. width: 345rpx;
  174. height: 240rpx;
  175. border-radius: 20rpx;
  176. background-color: #fff;
  177. margin-top: 20rpx;
  178. font-size: 30rpx;
  179. color: #666;
  180. display: flex;
  181. flex-direction: column;
  182. justify-content: center;
  183. align-items: center;
  184. .iconfont {
  185. font-size: 70rpx;
  186. color: #eb3729;
  187. margin-bottom: 20rpx;
  188. }
  189. }
  190. }
  191. }
  192. </style>