index.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. <template>
  2. <view :data-theme="theme">
  3. <view class='my-promotion'>
  4. <view class="header">
  5. <image class="head_img"
  6. src="https://image.beta.java.crmeb.net/crmebimage/maintain/2021/07/13/48e81e3e2e374d48820b7a9a56905365k2qa9yj8n5.png">
  7. </image>
  8. <navigator
  9. :url="'/pages/users/user_spread_money/index?type=1&extractCount='+promotionInfo.settledCommissionPrice"
  10. hover-class="none" class='record'>结算记录<text class='iconfont icon-xiangyou'></text></navigator>
  11. <view class="head_box">
  12. <view class='name acea-row row-center-wrapper'>
  13. <view>当前佣金</view>
  14. </view>
  15. <view class='num'>{{promotionInfo.brokeragePrice}}</view>
  16. <view class='profit acea-row row-between-wrapper'>
  17. <view class='item'>
  18. <view>冻结佣金</view>
  19. <view class='money'>
  20. {{promotionInfo.freezePrice ? Number(promotionInfo.freezePrice).toFixed(2) : 0}}
  21. </view>
  22. </view>
  23. <view class='item'>
  24. <view>累积已提</view>
  25. <view class='money'>
  26. {{promotionInfo.settledCommissionPrice ? Number(promotionInfo.settledCommissionPrice).toFixed(2) : 0}}
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="btnBox acea-row">
  33. <view @click="openSubscribe('/pages/users/user_transferOut/index')" url="/pages/users/user_transferOut/index" hover-class="none" class='bnt bg_color left'>
  34. <text>提现</text>
  35. </view>
  36. <view @click="openSubscribe('/pages/users/user_spread_brokerage_out/index?brokeragePrice='+ promotionInfo.brokeragePrice)" hover-class="none"
  37. class='bnt bg_color right'>
  38. <text>转入</text>
  39. </view>
  40. </view>
  41. <view class='list acea-row row-between-wrapper'>
  42. <navigator url='/pages/users/user_spread_code/index' hover-class="none"
  43. class='item acea-row row-center-wrapper row-column'>
  44. <text class='iconfont icon-erweima'></text>
  45. <view>推广名片</view>
  46. </navigator>
  47. <navigator url='/pages/users/promoter-list/index' hover-class="none"
  48. class='item acea-row row-center-wrapper row-column'>
  49. <text class='iconfont icon-tongji'></text>
  50. <view>推广人统计</view>
  51. </navigator>
  52. <navigator
  53. :url="'/pages/users/user_spread_money/index?type=2&commissionCount='+ promotionInfo.brokeragePrice"
  54. hover-class="none" class='item acea-row row-center-wrapper row-column'>
  55. <text class='iconfont icon-qiandai'></text>
  56. <view>佣金记录</view>
  57. </navigator>
  58. <navigator url='/pages/users/promoter-order/index' hover-class="none"
  59. class='item acea-row row-center-wrapper row-column'>
  60. <text class='iconfont icon-dingdan'></text>
  61. <view>推广人订单</view>
  62. </navigator>
  63. <navigator url='/pages/users/promoter_rank/index' hover-class="none"
  64. class='item acea-row row-center-wrapper row-column'>
  65. <text class='iconfont icon-paihang1'></text>
  66. <view>推广人排行</view>
  67. </navigator>
  68. <navigator url='/pages/users/commission_rank/index' hover-class="none"
  69. class='item acea-row row-center-wrapper row-column'>
  70. <text class='iconfont icon-paihang'></text>
  71. <view>佣金排行</view>
  72. </navigator>
  73. </view>
  74. </view>
  75. </view>
  76. </template>
  77. <script>
  78. // +----------------------------------------------------------------------
  79. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  80. // +----------------------------------------------------------------------
  81. // | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
  82. // +----------------------------------------------------------------------
  83. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  84. // +----------------------------------------------------------------------
  85. // | Author: CRMEB Team <admin@crmeb.com>
  86. // +----------------------------------------------------------------------
  87. import {
  88. myPromotion
  89. } from '@/api/user.js';
  90. import {
  91. openExtrctSubscribe
  92. } from '@/utils/SubscribeMessage.js';
  93. import {
  94. toLogin
  95. } from '@/libs/login.js';
  96. import {
  97. mapGetters
  98. } from "vuex";
  99. import {
  100. setThemeColor
  101. } from '@/utils/setTheme.js'
  102. const app = getApp();
  103. export default {
  104. data() {
  105. return {
  106. promotionInfo: {},
  107. theme: app.globalData.theme,
  108. bgColor: '#e93323'
  109. };
  110. },
  111. computed: mapGetters(['isLogin']),
  112. watch: {
  113. isLogin: {
  114. handler: function(newV, oldV) {
  115. if (newV) {
  116. this.getMyPromotion();
  117. }
  118. },
  119. deep: true
  120. }
  121. },
  122. onShow() {
  123. let that = this;
  124. that.bgColor = setThemeColor();
  125. uni.setNavigationBarColor({
  126. frontColor: '#ffffff',
  127. backgroundColor: that.bgColor,
  128. });
  129. if (this.isLogin) {
  130. this.getMyPromotion();
  131. } else {
  132. toLogin();
  133. }
  134. },
  135. methods: {
  136. openSubscribe: function(page) {
  137. uni.navigateTo({
  138. url: page,
  139. });
  140. },
  141. /**
  142. * 获取个人用户信息
  143. */
  144. getMyPromotion: function() {
  145. let that = this;
  146. myPromotion().then(res => {
  147. that.$set(that, 'promotionInfo', res.data);
  148. });
  149. }
  150. }
  151. }
  152. </script>
  153. <style scoped lang="scss">
  154. .my-promotion .header {
  155. width: 100%;
  156. height: 375rpx;
  157. position: relative;
  158. }
  159. .head_img {
  160. width: 100%;
  161. height: 375rpx;
  162. position: absolute;
  163. top: 0;
  164. z-index: 2;
  165. }
  166. .head_box {
  167. width: 100%;
  168. height: 375rpx;
  169. position: absolute;
  170. top: 0;
  171. z-index: 0;
  172. @include main_bg_color(theme);
  173. }
  174. .my-promotion .header .name {
  175. font-size: 30rpx;
  176. color: #fff;
  177. padding-top: 57rpx;
  178. position: relative;
  179. }
  180. .my-promotion .header .record {
  181. font-size: 26rpx;
  182. color: rgba(255, 255, 255, 0.8);
  183. position: absolute;
  184. right: 20rpx;
  185. top: 60rpx;
  186. z-index: 10;
  187. }
  188. .my-promotion .header .record .iconfont {
  189. font-size: 25rpx;
  190. margin-left: 10rpx;
  191. vertical-align: 2rpx;
  192. }
  193. .my-promotion .header .num {
  194. text-align: center;
  195. color: #fff;
  196. margin-top: 28rpx;
  197. font-size: 90rpx;
  198. font-family: 'Guildford Pro';
  199. }
  200. .my-promotion .header .profit {
  201. padding: 0 20rpx;
  202. margin-top: 35rpx;
  203. font-size: 24rpx;
  204. color: rgba(255, 255, 255, 0.8);
  205. }
  206. .my-promotion .header .profit .item {
  207. min-width: 200rpx;
  208. text-align: center;
  209. }
  210. .my-promotion .header .profit .item .money {
  211. font-size: 34rpx;
  212. color: #fff;
  213. margin-top: 5rpx;
  214. }
  215. .btnBox {
  216. position: absolute;
  217. width: 312rpx;
  218. background-color: #F5F5F5;
  219. border-radius: 200rpx;
  220. height: 84rpx;
  221. top: 334rpx;
  222. left: 218rpx;
  223. z-index: 3;
  224. padding-top: 6rpx;
  225. }
  226. .my-promotion {
  227. .bnt {
  228. font-size: 28rpx;
  229. color: #fff;
  230. height: 68rpx;
  231. box-sizing: border-box;
  232. border-radius: 50rpx;
  233. text-align: center;
  234. line-height: 68rpx;
  235. box-sizing: border-box;
  236. overflow: hidden;
  237. }
  238. .left {
  239. width: 148rpx;
  240. margin-left: 8rpx;
  241. border-radius: 200rpx 0px 0px 200rpx;
  242. }
  243. .right {
  244. width: 148rpx;
  245. border-radius: 0px 200rpx 200rpx 0px;
  246. text{
  247. width: 148rpx;
  248. height: 68rpx;
  249. display: inline-block;
  250. background-color: rgba(0, 0, 0, .3)
  251. }
  252. }
  253. }
  254. .bg_color {
  255. @include main_bg_color(theme);
  256. }
  257. .my-promotion .list {
  258. padding: 0 30rpx 50rpx 30rpx;
  259. margin-top: 60rpx;
  260. }
  261. .my-promotion .list .item {
  262. width: 335rpx;
  263. height: 240rpx;
  264. border-radius: 14rpx;
  265. background-color: #fff;
  266. margin-top: 20rpx;
  267. font-size: 30rpx;
  268. color: #666;
  269. }
  270. .my-promotion .list .item .iconfont {
  271. font-size: 70rpx;
  272. // background: linear-gradient(to right, #fc4d3d 0%, #e93323 100%);
  273. @include main_bg_color(theme);
  274. -webkit-background-clip: text;
  275. -webkit-text-fill-color: transparent;
  276. margin-bottom: 20rpx;
  277. }
  278. </style>