user_promotion.vue 8.7 KB

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