partner.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428
  1. <template>
  2. <view class="container">
  3. <view class="partner-bg">
  4. <image src="https://mmz.liuniu946.com/statics/img/img12.png"></image>
  5. </view>
  6. <swiper
  7. class="swiper-block"
  8. @change="swiperChange"
  9. previous-margin="20rpx"
  10. next-margin="48rpx"
  11. current="0"
  12. circular>
  13. <block>
  14. <swiper-item>
  15. <view class="slide-image box">
  16. <view class="partner-header">
  17. <view class="header-title">升级会员会员即可享受以下权利</view>
  18. <view class="header-info">立即升级开始转钱</view>
  19. </view>
  20. <view class="partner-content">
  21. <view class="partner-content-item" >
  22. <view class="img">
  23. <image src="https://mmz.liuniu946.com/statics/img/img09.png"></image>
  24. </view>
  25. <view class="detils">会员</view>
  26. </view>
  27. <view class="partner-content-item" >
  28. <view class="img">
  29. <image src="https://mmz.liuniu946.com/statics/img/img10.png"></image>
  30. </view>
  31. <view class="detils">
  32. <view>商品差价</view>
  33. </view>
  34. </view>
  35. <view class="partner-content-item" >
  36. <view class="img">
  37. <image src="https://mmz.liuniu946.com/statics/img/img11.png"></image>
  38. </view>
  39. <view class="detils">会员身份</view>
  40. </view>
  41. </view>
  42. </view>
  43. </swiper-item>
  44. <swiper-item>
  45. <view class="slide-image box" >
  46. <view class="partner-header">
  47. <view class="header-title">升级合伙人即可享受以下权利</view>
  48. <view class="header-info">立即升级开始转钱</view>
  49. </view>
  50. <view class="partner-content">
  51. <view class="partner-content-item" >
  52. <view class="img">
  53. <image src="https://mmz.liuniu946.com/statics/img/img09.png"></image>
  54. </view>
  55. <view class="detils">合伙人价格</view>
  56. </view>
  57. <view class="partner-content-item" >
  58. <view class="img">
  59. <image src="https://mmz.liuniu946.com/statics/img/img10.png"></image>
  60. </view>
  61. <view class="detils">
  62. <view>商品差价</view>
  63. <view>699礼包分销佣金</view>
  64. </view>
  65. </view>
  66. <view class="partner-content-item" >
  67. <view class="img">
  68. <image src="https://mmz.liuniu946.com/statics/img/img11.png"></image>
  69. </view>
  70. <view class="detils">合伙人身份</view>
  71. </view>
  72. </view>
  73. </view>
  74. </swiper-item>
  75. <swiper-item>
  76. <view class="slide-image box">
  77. <view class="partner-header">
  78. <view class="header-title">升级超级合伙人即可享受以下权利</view>
  79. <view class="header-info">立即升级开始转钱</view>
  80. </view>
  81. <view class="partner-content">
  82. <view class="partner-content-item" >
  83. <view class="img">
  84. <image src="https://mmz.liuniu946.com/statics/img/img09.png"></image>
  85. </view>
  86. <view class="detils">合伙人价格</view>
  87. </view>
  88. <view class="partner-content-item" >
  89. <view class="img">
  90. <image src="https://mmz.liuniu946.com/statics/img/img10.png"></image>
  91. </view>
  92. <view class="detils">
  93. <view>商品差价</view>
  94. <view>699礼包分销佣金</view>
  95. <view>合伙人平级奖励</view>
  96. </view>
  97. </view>
  98. <view class="partner-content-item" >
  99. <view class="img">
  100. <image src="https://mmz.liuniu946.com/statics/img/img11.png"></image>
  101. </view>
  102. <view class="detils">超级合伙人身份</view>
  103. </view>
  104. </view>
  105. </view>
  106. </swiper-item>
  107. </block>
  108. </swiper>
  109. <view class="card-box" v-if="task.length">
  110. <view class="mode" v-for="(item,index) in task" :key="index" >
  111. <text class="mode-1">晋升方式</text>
  112. <view class="mode-2">{{ item.name }}</view>
  113. <view class="progressbar flex1">
  114. <view class="progressbar-1">
  115. <view class='progressbar-2' :style="'width:'+ item.speed +'%;'"></view>
  116. </view>
  117. <text class="text" v-if="item.task_type != 'BuySomeProduct'" >{{ item.new_number }}/{{item.number}}</text>
  118. <view class="sumit" v-if="item.task_type != 'BuySomeProduct'" @click="navTos('/pages/index/index')">去购买</view>
  119. <text class="text" v-if="item.task_type == 'BuySomeProduct'" >{{ item.finish }}/1</text>
  120. <view class="sumit" v-if="item.task_type == 'BuySomeProduct'" @click="navTo(item)">去购买</view>
  121. </view>
  122. </view>
  123. </view>
  124. <!-- #ifndef MP -->
  125. <view class="partner-box">
  126. <view class="back" @click="navBack">
  127. <image src="../../static/img/img03.png" mode=""></image>
  128. </view>
  129. </view>
  130. <!-- #endif -->
  131. </view>
  132. </template>
  133. <script>
  134. import {
  135. userLevelGrade,
  136. userLevelTask
  137. } from '@/api/user.js';
  138. export default{
  139. data(){
  140. return {
  141. currentIndex: 0,
  142. task: [], //任务列表
  143. currentId:0,
  144. reach_count:0,
  145. carouselList:[
  146. { id: 0,
  147. title:'升级会员即可享受以下权利',
  148. info:'立即升级,开始赚钱',
  149. piclist:[
  150. { id: 0, detail:'会员价', pic: 'https://mmz.liuniu946.com/statics/img/img09.png' },
  151. { id: 1, detail:'商品差价', pic: 'https://mmz.liuniu946.com/statics/img/img10.png' },
  152. { id: 2, detail:'会员省份', pic: 'https://mmz.liuniu946.com/statics/img/img11.png' },
  153. ],
  154. },
  155. { id: 1,
  156. title:'升级合伙人即可享受以下权利',
  157. info:'立即升级,开始赚钱',
  158. piclist:[
  159. { detail:'合伙人价格', pic: 'https://mmz.liuniu946.com/statics/img/img09.png' },
  160. { detail:'商品差价', pic: 'https://mmz.liuniu946.com/statics/img/img10.png' },
  161. { detail:'合伙人身份', pic: 'https://mmz.liuniu946.com/statics/img/img11.png' },
  162. ],
  163. },
  164. { id: 0,
  165. title:'升级超级合伙人即可享受以下权利',
  166. info:'立即升级,开始赚钱',
  167. piclist:[
  168. { detail:'超级价格', pic: 'https://mmz.liuniu946.com/statics/img/img09.png' },
  169. { detail:'商品差价', pic: 'https://mmz.liuniu946.com/statics/img/img10.png' },
  170. { detail:'超级合伙人身份', pic: 'https://mmz.liuniu946.com/statics/img/img11.png' },
  171. ],
  172. },
  173. ]
  174. }
  175. },
  176. onLoad() {
  177. this.getVipList();
  178. },
  179. methods:{
  180. /**
  181. * 获取会员等级
  182. *
  183. */
  184. getVipList: function() {
  185. let that = this;
  186. userLevelGrade().then(res => {
  187. console.log(111,res)
  188. console.log(1112,res.data.task)
  189. // that.$set(that, 'VipList', res.data.list);
  190. that.task = res.data.task.task;
  191. that.reach_count = res.data.task.reach_count;
  192. // that.currentIndex = res.data.list[0] ? res.data.list[0].id : 0;
  193. // let arr = [];
  194. // res.data.list.forEach(function(item, index) {
  195. // if (item.is_clear == false) {
  196. // arr.push(item.grade);
  197. // }
  198. // })
  199. // that.grade = arr[0] || 0;
  200. // that.grade = res.data.list[0].grade
  201. });
  202. },
  203. /**
  204. * 获取任务要求
  205. */
  206. getTask: function() {
  207. let that = this;
  208. userLevelTask(that.currentId).then(res => {
  209. console.log(res)
  210. that.task = [];
  211. that.task = res.data.task;
  212. that.reach_count = res.data.reach_count;
  213. });
  214. },
  215. swiperChange: function (e) {
  216. this.currentIndex = e.detail.current
  217. this.currentId = e.detail.current + 1
  218. console.log(998,this.currentId)
  219. console.log(999,this.currentIndex)
  220. this.getTask();
  221. },
  222. // 后退
  223. navBack() {
  224. uni.navigateBack();
  225. },
  226. navTo(item){
  227. uni.navigateTo({
  228. url: '/pages/product/product?id=' + item.number
  229. });
  230. },
  231. navTos(url){
  232. uni.switchTab({
  233. url
  234. });
  235. }
  236. }
  237. }
  238. </script>
  239. <style lang="scss">
  240. body .container{
  241. background-color:transparent;
  242. }
  243. .container{
  244. margin-left: -1rpx;
  245. position: relative;
  246. }
  247. .partner-box{
  248. position: absolute;
  249. left:0;
  250. top:0;
  251. // width: 100%;
  252. // height: 451rpx;
  253. // border-bottom: 1px dashed #333333;
  254. .back{
  255. width: 20rpx;
  256. height: 35rpx;
  257. margin-left: 25rpx;
  258. margin-top: 25rpx;
  259. image{
  260. width: 21rpx;
  261. height: 36rpx;
  262. }
  263. }
  264. }
  265. .partner-bg{
  266. width: 100%;
  267. height: 451rpx;
  268. image{
  269. width: 100%;
  270. height: 451rpx;
  271. }
  272. }
  273. .swiper-block {
  274. height: 438rpx;
  275. width: 100%;
  276. background-color:transparent;
  277. position: absolute;
  278. left: 0;
  279. top: 258rpx;
  280. // padding-bottom: 20rpx;
  281. }
  282. swiper-item {
  283. display: flex;
  284. flex-direction: column;
  285. justify-content: center;
  286. align-items: flex-start;
  287. overflow: unset;
  288. .box{
  289. width: 96%;
  290. height: 438rpx;
  291. background-color: #fff;
  292. .partner-header{
  293. padding: 0;
  294. height: 152rpx;
  295. width: 100%;
  296. // border-bottom: 1px dashed #ccc;
  297. display: flex;
  298. flex-direction: column;
  299. // justify-content: center;
  300. text-align: center;
  301. .header-title{
  302. margin-top: 41rpx;
  303. color: #474747;
  304. font-size: 32rpx;
  305. }
  306. .header-info{
  307. color: #999;
  308. font-size: 24rpx;
  309. margin-top: 12rpx;
  310. }
  311. }
  312. .partner-content{
  313. // height: 208rpx;
  314. width: 100%;
  315. background-color: #fff;
  316. display: flex;
  317. .partner-content-item{
  318. // height: 208rpx;
  319. width: 33.33%;
  320. text-align: center;
  321. color: #444444;
  322. font-size: 28rpx;
  323. padding-bottom: 14rpx;
  324. .img{
  325. width: 100%;
  326. height: 130rpx;
  327. display: flex;
  328. align-items: center;
  329. justify-content: center;
  330. image{
  331. width: 81rpx;
  332. height: 84rpx;
  333. }
  334. }
  335. .detils{
  336. text-align: center;
  337. color: #444444;
  338. font-size: 28rpx;
  339. }
  340. }
  341. }
  342. }
  343. }
  344. .slide-image {
  345. height: 320rpx;
  346. width: 520rpx;
  347. border-radius: 9rpx;
  348. box-shadow: 0px 0px 30rpx rgba(0, 0, 0, 0.2);
  349. margin: 0rpx 30rpx;
  350. z-index: 1;
  351. }
  352. .active {
  353. transform: scale(1.14);
  354. transition: all .2s ease-in 0s;
  355. z-index: 20;
  356. // display: none;
  357. }
  358. .card-box{
  359. height: 225rpx;
  360. width: 94%;
  361. background-color: #fff;
  362. position: absolute;
  363. top:689rpx;
  364. left:0;
  365. margin: 30rpx 24rpx;
  366. border-radius: 10rpx;
  367. .mode{
  368. // margin: 30rpx 25rpx 0 25rpx;
  369. padding: 35rpx 25rpx 45rpx 25rpx;
  370. background:rgba(255,255,255,1);
  371. border-radius:10rpx;
  372. margin-bottom: 10rpx;
  373. .mode-1{
  374. font-size:30rpx;
  375. font-weight:600;
  376. color:rgba(51,51,51,1);
  377. }
  378. .mode-2{
  379. font-size:28rpx;
  380. color:rgba(51,51,51,1);
  381. margin-top: 32rpx;
  382. }
  383. .progressbar{
  384. height: 50rpx;
  385. .progressbar-1{
  386. float: left;
  387. margin-top: 20rpx;
  388. width:360rpx;
  389. height:12rpx;
  390. background:rgba(248,246,246,1);
  391. border-radius:6rpx;
  392. .progressbar-2{
  393. height:12rpx;
  394. background:#FFCC5E;
  395. border-radius:6rpx;
  396. }
  397. }
  398. .text{
  399. margin-left: 20rpx;
  400. float: left;
  401. flex:1;
  402. font-size:24rpx;
  403. font-weight:400;
  404. color:rgba(102,102,102,1);
  405. }
  406. .sumit{
  407. float: right;
  408. padding: 15rpx 25rpx;
  409. background:rgba(255,204,94,1);
  410. border-radius:25rpx;
  411. font-size:24rpx;
  412. font-weight:400;
  413. color:rgba(34,34,34,1);
  414. }
  415. }
  416. }
  417. }
  418. </style>