user_promotion.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. <template>
  2. <view>
  3. <view class='my-promotion'>
  4. <view class="header">
  5. <view class='name acea-row row-center-wrapper'>
  6. <!-- 当前佣金 -->
  7. <view>
  8. <view class="user-msg">
  9. <view class="nickname">我的佣金</view>
  10. </view>
  11. </view>
  12. </view>
  13. <view class='num'>{{userInfo.brokerage_price}}</view>
  14. <view class='profit item-top acea-row row-between-wrapper'>
  15. <view class='item'>
  16. <view>会员商品佣金</view>
  17. <view class='money'>{{userInfo.mson}}</view>
  18. </view>
  19. <view class='item'>
  20. <view>普通商品佣金<text class='iconfont icon-xiangyou'></text></view>
  21. <view class='money'>{{userInfo.pson}}</view>
  22. </view>
  23. </view>
  24. <view class='profit acea-row row-between-wrapper'>
  25. <view class='item'>
  26. <view>昨日投资分红</view>
  27. <view class='money'>{{userInfo.fh1}}</view>
  28. </view>
  29. <view class='item'>
  30. <view>昨日推广分红<text class='iconfont icon-xiangyou'></text></view>
  31. <view class='money'>{{userInfo.fh2}}</view>
  32. </view>
  33. </view>
  34. </view>
  35. <!-- #ifdef APP-PLUS || H5 -->
  36. <view @click="navToo('/pages/user/withdrawal')" hover-class="none" class='bnt bg-color'>立即提现</view>
  37. <!-- #endif -->
  38. <!-- #ifdef MP -->
  39. <view @click="navToo('/pages/user/withdrawal')" class='bnt bg-color'>立即提现</view>
  40. <!-- #endif -->
  41. <view class='list acea-row row-between-wrapper'>
  42. <view @click="navToo('/pages/user/shareQrCode')" hover-class="none"
  43. class='item row-center-wrapper row-column'>
  44. <image class='iconfonts'src="../../static/img/9.png" mode=""></image>
  45. <view>推广名片</view>
  46. </view>
  47. <view @click="navToo('/pages/user/promoter_order?type=1')" hover-class="none"
  48. class='item row-center-wrapper row-column'>
  49. <image class='iconfonts'src="../../static/img/5.png" mode=""></image>
  50. <view>未发放订单</view>
  51. </view>
  52. <view @click="navToo('/pages/user/user_spread_money')" hover-class="none"
  53. class='item row-center-wrapper row-column'>
  54. <image class='iconfonts'src="../../static/img/8.png" mode=""></image>
  55. <view>佣金明细</view>
  56. </view>
  57. <view @click="navToo('/pages/user/promoter_order?type=0')" hover-class="none"
  58. class='item row-center-wrapper row-column'>
  59. <image class='iconfonts'src="../../static/img/10.png" mode=""></image>
  60. <view>已发放订单</view>
  61. </view>
  62. <view @click="navToo('/pages/user/rank')" hover-class="none"
  63. class='item row-center-wrapper row-column'>
  64. <image class='iconfonts'src="../../static/img/6.png" mode=""></image>
  65. <view>推广排行榜</view>
  66. </view>
  67. <view @click="navToo('/pages/user/promoter_rank')" hover-class="none"
  68. class='item row-center-wrapper row-column'>
  69. <image class='iconfonts'src="../../static/img/7.png" mode=""></image>
  70. <view>佣金排行榜</view>
  71. </view>
  72. </view>
  73. </view>
  74. <!-- #ifdef MP -->
  75. <!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
  76. <!-- #endif -->
  77. <!-- #ifndef MP -->
  78. <home></home>
  79. <!-- #endif -->
  80. </view>
  81. </template>
  82. <script>
  83. import {
  84. myuser
  85. } from '@/api/user.js';
  86. import {
  87. openExtrctSubscribe
  88. } from '@/utils/SubscribeMessage.js';
  89. import {
  90. toLogin
  91. } from '@/libs/login.js';
  92. import {
  93. mapGetters
  94. } from "vuex";
  95. // #ifdef MP
  96. import authorize from '@/components/Authorize';
  97. // #endif
  98. import home from '@/components/home';
  99. // import colors from '@/mixins/color.js'
  100. export default {
  101. components: {
  102. // #ifdef MP
  103. authorize,
  104. // #endif
  105. home
  106. },
  107. data() {
  108. return {
  109. userInfo: {},
  110. yesterdayPrice: 0.00,
  111. isAuto: false, //没有授权的不会自动授权
  112. isShowAuth: false //是否隐藏授权
  113. };
  114. },
  115. onLoad() {
  116. myuser({})
  117. .then(({ data }) => {
  118. this.userInfo=data
  119. })
  120. .catch(e => {
  121. console.log(e);
  122. });
  123. },
  124. methods: {
  125. onLoadFun: function() {
  126. this.getUserInfo();
  127. },
  128. navToo(url){
  129. console.log("0000")
  130. uni.navigateTo({
  131. url:url
  132. });
  133. },
  134. //跳转
  135. jumbPath(type) {
  136. if (type == 1) {
  137. uni.navigateTo({
  138. // 提现记录
  139. url: '/pages/users/user_spread_money/index?type=1'
  140. })
  141. } else {
  142. uni.navigateTo({
  143. // 分佣等级
  144. url: '/pages/users/user_distribution_level/index'
  145. })
  146. }
  147. },
  148. // 授权关闭
  149. authColse: function(e) {
  150. this.isShowAuth = e
  151. },
  152. openSubscribe: function(page) {
  153. uni.showLoading({
  154. title: '正在加载',
  155. })
  156. openExtrctSubscribe().then(res => {
  157. uni.hideLoading();
  158. uni.navigateTo({
  159. url: page,
  160. });
  161. }).catch(() => {
  162. uni.hideLoading();
  163. });
  164. },
  165. /**
  166. * 获取个人用户信息
  167. */
  168. getUserInfo: function() {
  169. let that = this;
  170. getUserInfo().then(res => {
  171. that.$set(that, 'userInfo', res.data);
  172. if (!res.data.spread_status) {
  173. that.$util.Tips({
  174. title: "您目前暂无推广权限"
  175. }, {
  176. tab: 2,
  177. url: '/pages/index/index'
  178. });
  179. }
  180. });
  181. }
  182. }
  183. }
  184. </script>
  185. <style scoped lang="scss">
  186. .row-column{
  187. text-align: center;
  188. }
  189. .row-column image{
  190. margin-bottom: 10rpx;
  191. margin-top: 18%;
  192. margin-left: 39%;
  193. }
  194. .iconfonts{
  195. display: block;
  196. width: 80rpx;
  197. height: 80rpx;
  198. }
  199. .bg-color{
  200. background-color: #303030;
  201. }
  202. .my-promotion .header {
  203. background-image: url(../../static/img/promotion.png);
  204. background-repeat: no-repeat;
  205. background-size: 100% 100%;
  206. width: 100%;
  207. height: 400rpx;
  208. background-color: var(--view-theme);
  209. }
  210. .my-promotion .header .name {
  211. font-size: 60rpx;
  212. color: #fff;
  213. padding-top: 57rpx;
  214. position: relative;
  215. .distribution {
  216. height: 52rpx;
  217. background-color: #ccc;
  218. font-size: 24rpx;
  219. color: #fff;
  220. position: absolute;
  221. right: 0;
  222. border-radius: 30rpx 0 0 30rpx;
  223. padding: 0 5rpx 0 10rpx;
  224. &.on {
  225. background-color: #FFF9E3;
  226. color: #D16739;
  227. }
  228. .iconfont {
  229. font-size: 18rpx;
  230. }
  231. .icon-dengjitubiao {
  232. font-size: 32rpx;
  233. margin-right: 10rpx;
  234. }
  235. }
  236. .user-msg {
  237. display: flex;
  238. align-items: center;
  239. .nickname {
  240. font-size: 28rpx;
  241. }
  242. .level {
  243. border: 1px solid #fff;
  244. font-size: 32rpx;
  245. padding: 2rpx 8rpx;
  246. border-radius: 6rpx;
  247. transform: scale(0.6);
  248. display: flex;
  249. align-items: center;
  250. .icon-xiangyou {
  251. font-size: 28rpx;
  252. }
  253. }
  254. image {
  255. width: 46rpx;
  256. height: 46rpx;
  257. border-radius: 50%;
  258. margin-right: 10rpx;
  259. }
  260. }
  261. }
  262. .my-promotion .header .name .record {
  263. font-size: 26rpx;
  264. color: rgba(255, 255, 255, 0.8);
  265. position: absolute;
  266. right: 20rpx;
  267. }
  268. .my-promotion .header .name .record .iconfont {
  269. font-size: 25rpx;
  270. margin-left: 10rpx;
  271. vertical-align: 2rpx;
  272. }
  273. .my-promotion .header .num {
  274. text-align: center;
  275. color: #fff;
  276. margin-top: 28rpx;
  277. font-size: 60rpx;
  278. font-family: 'Guildford Pro';
  279. }
  280. .my-promotion .header .profit {
  281. padding: 0 20rpx;
  282. font-size: 24rpx;
  283. color: rgba(255, 255, 255, 0.8);
  284. }
  285. .my-promotion .header .profit .item {
  286. min-width: 200rpx;
  287. text-align: center;
  288. }
  289. .my-promotion .header .profit .item .iconfont {
  290. font-size: 18rpx;
  291. color: #fff;
  292. margin-top: 5rpx;
  293. }
  294. .my-promotion .header .profit .item .money {
  295. font-size: 34rpx;
  296. color: #fff;
  297. margin-top: 5rpx;
  298. }
  299. .my-promotion .bnt {
  300. font-size: 28rpx;
  301. color: #fff;
  302. width: 258rpx;
  303. border-radius: 50rpx;
  304. text-align: center;
  305. line-height: 68rpx;
  306. margin: -32rpx auto 0 auto;
  307. border: 16rpx solid #f5f5f5;
  308. }
  309. .my-promotion .list {
  310. padding: 0 20rpx 50rpx 20rpx;
  311. margin-top: 10rpx;
  312. }
  313. .my-promotion .list .item {
  314. width: 345rpx;
  315. height: 240rpx;
  316. border-radius: 20rpx;
  317. background-color: #fff;
  318. margin-top: 20rpx;
  319. font-size: 30rpx;
  320. color: #666;
  321. }
  322. .my-promotion .list .item .iconfont {
  323. font-size: 70rpx;
  324. // background-image: linear-gradient(to right, #fc4d3d 0%, #e93323 100%);
  325. background-color: var(--view-theme);
  326. -webkit-background-clip: text;
  327. -webkit-text-fill-color: transparent;
  328. margin-bottom: 20rpx;
  329. }
  330. .apply {
  331. top: 52rpx;
  332. right: 0;
  333. position: absolute;
  334. width: max-content;
  335. height: 56rpx;
  336. padding: 0 14rpx;
  337. background-color: #fff1db;
  338. color: #a56a15;
  339. font-size: 22rpx;
  340. border-radius: 30rpx 0 0 30rpx;
  341. display: flex;
  342. align-items: center;
  343. justify-content: center;
  344. }
  345. </style>