benefits.vue 11 KB

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