benefits.vue 12 KB

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