benefits.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473
  1. <template>
  2. <view class="page">
  3. <view class="header dis a-end j-s mb-2">
  4. <view class="dis a-c ">
  5. <image :src="backLogo" mode=""></image>
  6. <view class="dis a-c title ml-3">
  7. <!-- <text>我的佣金比例</text> -->
  8. <text>{{gradeText}}</text>
  9. </view>
  10. </view>
  11. <!-- <view class="ratio dis a-end " @click="ratiodetail">
  12. <text class="mr-1">{{info.totalRate}}%</text>
  13. <u-icon name="arrow-right" color="#999" size="28"></u-icon>
  14. </view> -->
  15. </view>
  16. <view class="wrap ">
  17. <view class="tabs dis a-end">
  18. <view v-for="(item, index) in tabList" :key="index" class="tab dis a-c j-c" :class="{
  19. active: activeTab === index,
  20. tab1: activeTab !== index,
  21. left: activeTab === 0,
  22. right: activeTab === 1
  23. }" @click="handleTab(index)">
  24. <view class="tabtitle">
  25. <image v-if="activeTab==index" src="/static/image/Vector 22.png" mode=""></image>
  26. <view class="">
  27. {{ item.label }}
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="content-container">
  33. <view class="content-wrap contentwrap1 dis f-c a-c" v-show="activeTab === 0">
  34. <text class="title">- 成为{{gradeText}}已解锁的权益 -</text>
  35. <template v-if="this.userInfo.sysUser.grade==1">
  36. <view class="benefits dis f-c ">
  37. <text>发展管理人</text>
  38. <text>邀请管理人加入,获得管理人车险订单0.1%的收益</text>
  39. </view>
  40. <view class="benefits dis f-c ">
  41. <text>成为管理人</text>
  42. <text>邀请合伙人,获得合伙人0.1-0.5的收益</text>
  43. </view>
  44. <view class="benefits dis f-c ">
  45. <text>成为合伙人</text>
  46. <text>邀请工作室,获得下辖团队出单业务的0.1-0.5的收益</text>
  47. </view>
  48. <view class="benefits dis f-c ">
  49. <text>成为工作室</text>
  50. <text>邀请团队,获得下辖团队出单业务的0.1-0.5的收益</text>
  51. </view>
  52. </template>
  53. <template v-if="this.userInfo.sysUser.grade==2">
  54. <view class="benefits dis f-c ">
  55. <text>发展合伙人</text>
  56. <text>邀请合伙人加入,获得合伙人车险订单0.1-0.5%%的收益</text>
  57. </view>
  58. <view class="benefits dis f-c ">
  59. <text>成为合伙人</text>
  60. <text>邀请工作室,获得下辖团队出单业务的0.1-0.5的收益</text>
  61. </view>
  62. <view class="benefits dis f-c ">
  63. <text>成为工作室</text>
  64. <text>邀请团队,获得下辖团队出单业务的0.1-0.5的收益</text>
  65. </view>
  66. <view class="benefits dis f-c ">
  67. <text>升级成为创始人</text>
  68. <text>邀请团队,获得下辖团队出单业务的0.1-0.5的收益</text>
  69. </view>
  70. </template>
  71. <template v-if="this.userInfo.sysUser.grade==3">
  72. <view class="benefits dis f-c ">
  73. <text>发展工作室</text>
  74. <text>邀请工作室加入,获得合伙人车险订单0.1-0.5%%的收益</text>
  75. </view>
  76. <view class="benefits dis f-c ">
  77. <text>成为工作室</text>
  78. <text>邀请团队,获得下辖团队出单业务的0.1-0.5的收益</text>
  79. </view>
  80. <view class="benefits dis f-c ">
  81. <text>升级成为管理人</text>
  82. <text>邀请团队,获得下辖团队出单业务的0.1-0.5的收益</text>
  83. </view>
  84. </template>
  85. <template v-if="this.userInfo.sysUser.grade==4">
  86. <view class="benefits dis f-c ">
  87. <text>发展出单团队</text>
  88. <text>邀请出单团队加入,获得出单员车险订单0.1-0.5%%的收益</text>
  89. </view>
  90. <view class="benefits dis f-c ">
  91. <text>成为出单团队</text>
  92. <text>成为出单团队,获取车险订单的三级分销佣金</text>
  93. </view>
  94. <view class="benefits dis f-c ">
  95. <text>升级成为合伙人</text>
  96. <text>满足考核条件升级成为管理人,解锁更多权益</text>
  97. </view>
  98. </template>
  99. </view>
  100. <view class="content-wrap contentwrap2 dis f-c a-c" v-show="activeTab === 1">
  101. <text class="title">- 各类身份的佣金权益 -</text>
  102. <view class="ratio-benefits dis f-c ">
  103. <view class=" dis a-c j-s mb-5">
  104. <view class="item dis f-c a-c" v-for="(item,index) in ratioList"
  105. :class="{active:index==ratioindex}" :key="index" @click="itemclick(item,index)">
  106. <image :src="index==ratioindex?item.activeImg:item.img" mode=""></image>
  107. <text>{{item.title}}</text>
  108. </view>
  109. </view>
  110. <text class="content">{{content}}</text>
  111. </view>
  112. </view>
  113. </view>
  114. </view>
  115. <!-- <uni-permission-view position="fixed" :genericText="`完成任务,解锁“合伙人”`" sum='250' days="25"
  116. padding="40rpx 40rpx 70rpx" :backimage="true" :imageStyle="{width:'102rpx',height:'100rpx'}">
  117. </uni-permission-view> -->
  118. <u-popup v-model="ratiodetailshow" mode="bottom" border-radius="20" :closeable="true">
  119. <view class=" dis a-c j-c " style="border-bottom: 1rpx solid #eee;padding: 24rpx;box-sizing: border-box;">
  120. <text class="font-weight" style="font-size: 36rpx;color: #333;">我的佣金比例</text>
  121. </view>
  122. <view class="p-3">
  123. <view class="ratioitem dis a-c j-s" v-for="(item,index) in info.data" :key="index">
  124. <text>{{item.gradeName}}</text>
  125. <text>{{item.commissionRate}}%</text>
  126. </view>
  127. </view>
  128. </u-popup>
  129. </view>
  130. </template>
  131. <script>
  132. import {
  133. mapState,
  134. mapMutations
  135. } from "vuex"
  136. export default {
  137. data() {
  138. return {
  139. info: {},
  140. ratiodetailshow: false, //佣金比例弹窗
  141. ratioindex: 0, //佣金权益选中下标
  142. content: "创始人身份可享受邀请的所有管理人发展的团队成员车险订单的0.1% \n例如:创始人邀请了管理人A,管理人A邀请了合伙人B,合伙人B邀请了工作室C,工作室C邀请了团队D,团队D内的成员出单保费1000元(除车船税),管理人即可获得1000*0.1% = 1元",
  143. activeTab: 0,
  144. backLogo: '', //等级标志
  145. tabList: [{
  146. label: "身份权益"
  147. },
  148. {
  149. label: "佣金权益"
  150. }
  151. ],
  152. ratioList: [{
  153. title: "创始人",
  154. img: "/static/image/my/benefits/1.png",
  155. activeImg: "/static/image/my/benefits/active1.png",
  156. Text: "创始人身份可享受邀请的所有管理人发展的团队成员车险订单的0.1% \n例如:创始人邀请了管理人A,管理人A邀请了合伙人B,合伙人B邀请了工作室C,工作室C邀请了团队D,团队D内的成员出单保费1000元(除车船税),管理人即可获得1000*0.1% = 1元"
  157. },
  158. {
  159. title: "管理人",
  160. img: "/static/image/my/benefits/2.png",
  161. activeImg: "/static/image/my/benefits/active2.png",
  162. Text: "管理人身份可享受邀请的所有合伙人发展的团队成员车险订单的0.15-0.5%;\n 邀请合伙人1-3人,为0.1%,\n 邀请合伙人4-6人,为0.3,\n 邀请合伙人7人以上,为0.5\n 例如:管理人邀请了合伙人A,B,C,达成了0.1%的奖励;合伙人A邀请了工作室B,工作室B邀请了团队C,团队C内的成员出单保费1000元(除车船税),管理人即可获得1000*0.1% = 1元"
  163. },
  164. {
  165. title: "合伙人",
  166. img: "/static/image/my/benefits/3.png",
  167. activeImg: "/static/image/my/benefits/active3.png",
  168. Text: "合伙人身份可享受邀请的所有工作室发展的团队成员车险订单的0.15-0.5%;\n 邀请工作室1-3人,为0.1%,\n 邀请工作室4-6人,为0.3,\n 邀请工作室7人以上,为0.5 \n例如:合伙人邀请了工作室A,B,C,达成了0.1%的奖励;合伙人A邀请了工作室B,工作室B邀请了团队C,团队C内的成员出单保费1000元(除车船税),管理人即可获得1000*0.1% = 1元"
  169. }, {
  170. title: "工作室",
  171. img: "/static/image/my/benefits/4.png",
  172. activeImg: "/static/image/my/benefits/active4.png",
  173. Text: "工作室身份可享受邀请的所有发展的团队成员 车险订单的0.15-0.5%;\n 邀请团队1-3人,为0.1%,\n 邀请团队4-6人,为0.3,\n 邀请团队7人以上,为0.5 \n例如:工作室请了团队A,B,C,达成了0.1%的奖励;工作室邀请了团队A,团队A内的成员出单保费1000元(除车船税),管理人即可获得1000*0.1% = 1元"
  174. }
  175. ],
  176. //角色权益等级匹配列表
  177. backLogoList: [{
  178. grade: 1,
  179. url: "/static/image/my/benefits/active1.png"
  180. },
  181. {
  182. grade: 2,
  183. url: "/static/image/my/benefits/active2.png"
  184. },
  185. {
  186. grade: 3,
  187. url: "/static/image/my/benefits/active3.png"
  188. },
  189. {
  190. grade: 4,
  191. url: "/static/image/my/benefits/active4.png"
  192. }
  193. ],
  194. }
  195. },
  196. computed: {
  197. ...mapState(['userInfo', "userCheckInfo"]),
  198. //匹配等级title
  199. gradeText() {
  200. const gradeMap = {
  201. 1: '创始人',
  202. 2: '管理人',
  203. 3: '合伙人',
  204. 4: '工作室'
  205. }
  206. return gradeMap[this.userInfo.sysUser.grade] || ''
  207. }
  208. },
  209. async onShow() {
  210. this.backLogo = this.backLogoList.find(val => val.grade == this.userInfo.sysUser.grade).url; //获取对等身份logo标志
  211. this.ratioindex = this.userInfo.sysUser.grade - 1; //默认高亮显示对应等级
  212. let res = await this.$http.get('/partner/myCommissionRate');
  213. if (res.code == '200') {
  214. this.info = res.data;
  215. }
  216. },
  217. onLoad() {
  218. },
  219. methods: {
  220. //切换事件
  221. itemclick(item, index) {
  222. this.ratioindex = index;
  223. this.content = item.Text;
  224. },
  225. handleTab(index) {
  226. this.activeTab = index
  227. },
  228. //比例弹窗
  229. ratiodetail() {
  230. this.ratiodetailshow = true;
  231. },
  232. }
  233. }
  234. </script>
  235. <style lang="scss" scoped>
  236. .page {
  237. background-color: #F7F7F7;
  238. padding: 20rpx 30rpx;
  239. box-sizing: border-box;
  240. }
  241. .header {
  242. height: 170rpx;
  243. background: #fff;
  244. border-radius: 10rpx 10rpx 10rpx 10rpx;
  245. padding: 30rpx 40rpx;
  246. box-sizing: border-box;
  247. background-image: url('/static/image/my/benefits/benefits-back1.png');
  248. background-size: 100% 100%;
  249. image {
  250. width: 96rpx;
  251. height: 110rpx;
  252. }
  253. .title {
  254. text:first-child {
  255. font-size: 36rpx;
  256. color: #333;
  257. font-weight: bold;
  258. }
  259. // text:last-child {
  260. // font-size: 28rpx;
  261. // color: #666;
  262. // }
  263. }
  264. .ratio {
  265. text {
  266. font-size: 50rpx;
  267. color: #333;
  268. font-weight: bold;
  269. line-height: 0.8;
  270. }
  271. }
  272. }
  273. .wrap {
  274. position: relative;
  275. width: 100%;
  276. margin: 0 auto;
  277. box-sizing: border-box;
  278. border-radius: 0px 10rpx 10rpx 10rpx;
  279. }
  280. .tabs {
  281. display: flex;
  282. position: relative;
  283. overflow: hidden;
  284. border-radius: 10rpx 10rpx 0 0;
  285. }
  286. .tab {
  287. flex: 1;
  288. height: 90rpx;
  289. color: #999;
  290. font-size: 30rpx;
  291. position: relative;
  292. border-top-right-radius: 10rpx;
  293. border-top-left-radius: 10rpx;
  294. &.active {
  295. background: #fff;
  296. color: #333;
  297. font-size: 30rpx;
  298. font-weight: bold;
  299. border-top-right-radius: 10rpx;
  300. border-top-left-radius: 10rpx;
  301. }
  302. &.left.active {
  303. border-top-right-radius: 0;
  304. &::after {
  305. content: "";
  306. position: absolute;
  307. top: 0;
  308. right: -50px;
  309. height: 100%;
  310. width: 50px;
  311. z-index: 2;
  312. background-color: #fff;
  313. clip-path: path("M0 0 C12.5 0 13.5 25 25 45 L0 50 Z");
  314. }
  315. }
  316. // 右侧标签的曲线
  317. &.right.active {
  318. border-top-left-radius: 0;
  319. &::before {
  320. content: "";
  321. position: absolute;
  322. top: 0;
  323. left: -49px;
  324. height: 100%;
  325. width: 50px;
  326. z-index: 2;
  327. background-color: #fff;
  328. clip-path: path("M50 0 C37.5 0 37.5 25 25 45 L50 50 Z");
  329. }
  330. }
  331. }
  332. .tab1 {
  333. flex: 1;
  334. height: 90rpx;
  335. position: relative;
  336. border-top-right-radius: 10rpx;
  337. border-top-left-radius: 10rpx;
  338. background-color: #FAFAFA;
  339. }
  340. .tabtext {
  341. margin-left: 50rpx;
  342. }
  343. .tabtext1 {
  344. margin-right: 50rpx;
  345. }
  346. .content-container {
  347. position: relative;
  348. height: auto;
  349. background: #fff;
  350. ;
  351. border-radius: 10rpx 10rpx 10rpx 10rpx;
  352. }
  353. .content-wrap {
  354. height: 100%;
  355. box-sizing: border-box;
  356. border: 4rpx solid #FFFFFF;
  357. border-top: none;
  358. .title {
  359. font-size: 26rpx;
  360. color: #333;
  361. margin-bottom: 30rpx;
  362. }
  363. .benefits {
  364. width: 100%;
  365. padding: 30rpx;
  366. box-sizing: border-box;
  367. border-radius: 10rpx;
  368. background-image: url('/static/image/my/benefits/benefits-back2.png');
  369. background-size: 100% 100%;
  370. margin-bottom: 30rpx;
  371. text:first-child {
  372. font-size: 30rpx;
  373. color: #333;
  374. }
  375. text:last-child {
  376. font-size: 22rpx;
  377. color: #666;
  378. }
  379. }
  380. .ratio-benefits {
  381. width: 100%;
  382. .item {
  383. font-size: 30rpx;
  384. color: #999;
  385. image {
  386. width: 72rpx;
  387. height: 82rpx;
  388. }
  389. }
  390. .active {
  391. font-size: 30rpx;
  392. color: #333;
  393. font-weight: bold;
  394. }
  395. }
  396. }
  397. .contentwrap1 {
  398. border-radius: 10rpx 10rpx 10rpx 10rpx;
  399. padding: 30rpx 35rpx;
  400. box-sizing: border-box;
  401. }
  402. .contentwrap2 {
  403. border-radius: 10rpx 10rpx 10rpx 10rpx;
  404. padding: 30rpx 35rpx;
  405. box-sizing: border-box;
  406. }
  407. .tabtitle {
  408. position: relative;
  409. z-index: 1; // 父级降低层级
  410. // 文字部分
  411. &__text {
  412. position: relative; // 必须定位元素才能生效z-index
  413. z-index: 3; // 高于装饰图片
  414. display: inline-block;
  415. }
  416. // 装饰图片
  417. image {
  418. position: absolute;
  419. bottom: -14rpx; // 根据实际图片高度调整
  420. left: 50%;
  421. transform: translateX(-50%);
  422. z-index: 2; // 介于父级和文字之间
  423. width: 100%;
  424. height: 20rpx;
  425. }
  426. }
  427. .ratioitem {
  428. font-size: 30rpx;
  429. color: #333;
  430. margin-bottom: 52rpx;
  431. }
  432. </style>