userCenterRightsRank.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881
  1. <template>
  2. <div class="userCenterRightsRank">
  3. <div class="user">
  4. <div class="info">
  5. <div class="head">
  6. <div class="headPortrait">
  7. <img
  8. v-if="!booleanFlag.headPortraitDefaultImg"
  9. :src="'api/file/pub/' + user.umsUser.userPic"
  10. alt=""
  11. style="width: 100%; height: 100%"
  12. @error="booleanFlag.headPortraitDefaultImg = true"
  13. />
  14. <img
  15. v-if="booleanFlag.headPortraitDefaultImg"
  16. :src="require('@/assets/img/userCenter/user.png')"
  17. alt=""
  18. style="width: 100%; height: 100%"
  19. />
  20. </div>
  21. <!-- 白银用户 -->
  22. <div v-if="userLevel1 == '2'" class="level">
  23. <div v-if="isZh">
  24. <img
  25. v-if="!booleanFlag.levelDefaultImg"
  26. :src="require('@/assets/img/userCenter/白银用户.png')"
  27. alt=""
  28. style="width: 100%; height: 100%"
  29. />
  30. </div>
  31. <div v-else>
  32. <img
  33. v-if="!booleanFlag.levelDefaultImg"
  34. :src="require('@/assets/img/userCenter/@1白银用户.png')"
  35. alt=""
  36. style="width: 100%; height: 100%"
  37. />
  38. </div>
  39. </div>
  40. <!-- 黄金用户 -->
  41. <div v-if="userLevel1 == '3'" class="level">
  42. <div v-if="isZh">
  43. <img
  44. v-if="!booleanFlag.levelDefaultImg"
  45. :src="require('@/assets/img/userCenter/level02.png')"
  46. alt=""
  47. style="width: 100%; height: 100%"
  48. />
  49. </div>
  50. <div v-else>
  51. <img
  52. v-if="!booleanFlag.levelDefaultImg"
  53. :src="require('@/assets/img/userCenter/黄金用户e.png')"
  54. alt=""
  55. style="width: 100%; height: 100%"
  56. />
  57. </div>
  58. </div>
  59. <!-- 铂金用户 -->
  60. <div v-if="userLevel1 == '4'" class="level">
  61. <div v-if="isZh">
  62. <img
  63. v-if="!booleanFlag.levelDefaultImg"
  64. :src="require('@/assets/img/userCenter/白金用户.png')"
  65. alt=""
  66. style="width: 100%; height: 100%"
  67. />
  68. </div>
  69. <div v-else>
  70. <img
  71. v-if="!booleanFlag.levelDefaultImg"
  72. :src="require('@/assets/img/userCenter/白金用户e.png')"
  73. alt=""
  74. style="width: 100%; height: 100%"
  75. />
  76. </div>
  77. </div>
  78. <!-- 钻石用户 -->
  79. <div v-if="userLevel1 == '5'" class="level">
  80. <div v-if="isZh">
  81. <img
  82. v-if="!booleanFlag.levelDefaultImg"
  83. :src="require('@/assets/img/userCenter/白金用户.png')"
  84. alt=""
  85. style="width: 100%; height: 100%"
  86. />
  87. </div>
  88. <div v-else>
  89. <img
  90. v-if="!booleanFlag.levelDefaultImg"
  91. :src="require('@/assets/img/userCenter/白金用户e.png')"
  92. alt=""
  93. style="width: 100%; height: 100%"
  94. />
  95. </div>
  96. </div>
  97. </div>
  98. <div class="content">
  99. <span class="name">{{ realName }}</span>
  100. <span v-if="isGreaterThan" class="growthValue">
  101. {{ $i18n.locale == 'zh' ? '目前成长值:' : 'Current Growth Value'
  102. }}{{ growth }}
  103. </span>
  104. <span
  105. v-if="isGreaterThan"
  106. class="record"
  107. @click="toView('userCenterGrowthRecord')"
  108. >
  109. {{ $i18n.locale == 'zh' ? '我的成长值记录' : 'My Growth Record' }}
  110. </span>
  111. <span v-if="isGreaterThan" class="remark">
  112. <span v-if="userLevel1 === 4">
  113. {{ $i18n.locale == 'zh' ? '距离' : ' Distance '
  114. }}{{ $i18n.locale == 'zh' ? '成为会员还差' : ' VIP Need '
  115. }}{{ byScore }}{{ $i18n.locale == 'zh' ? '分' : ' Point ' }}
  116. </span>
  117. <span v-else>
  118. {{ $i18n.locale == 'zh' ? '距离成为' : ' Distance '
  119. }}{{ userInfoDeTua }}{{ $i18n.locale == 'zh' ? '还差' : ' Need '
  120. }}{{ byScore }}{{ $i18n.locale == 'zh' ? '分' : ' Point ' }}
  121. </span>
  122. </span>
  123. <span v-else class="remark">{{
  124. $i18n.locale == 'zh'
  125. ? '当前为星钻用户'
  126. : 'Currently a Diamonds Member'
  127. }}</span>
  128. </div>
  129. </div>
  130. <div>
  131. <img
  132. v-if="isZh"
  133. src="@/assets/img/userCenter/userRights/userRights_level2.png"
  134. alt=""
  135. style="width: 100%"
  136. />
  137. <img
  138. v-else
  139. src="@/assets/img/userCenter/userRights/levelEn.png"
  140. alt=""
  141. style="width: 100%"
  142. />
  143. </div>
  144. </div>
  145. <div class="task">
  146. <div class="title">
  147. <span
  148. style="
  149. width: 7px;
  150. height: 19px;
  151. background-color: #265186;
  152. margin-left: 4px;
  153. "
  154. ></span>
  155. <span style="margin-left: 8px; color: #265186">{{
  156. $i18n.locale == 'zh' ? '当前等级特权' : 'Current Level Lrivilege'
  157. }}</span>
  158. </div>
  159. <!-- 白银用户 -->
  160. <div v-if="userLevel1 == '2'">
  161. <div v-if="isZh" class="content levelPrivilege">
  162. <div v-for="(item, index) in silver" :key="'task1' + index">
  163. <img :src="item.src" alt="" style="width: 100%" />
  164. </div>
  165. </div>
  166. <div v-else class="content levelPrivilege">
  167. <div v-for="(item, index) in silverEn" :key="'task1' + index">
  168. <img :src="item.src" alt="" style="width: 100%" />
  169. </div>
  170. </div>
  171. </div>
  172. <!-- 黄金用户 -->
  173. <div v-if="userLevel1 == '3'">
  174. <div v-if="isZh" class="content levelPrivilege">
  175. <div v-for="(item, index) in rights" :key="'task1' + index">
  176. <img :src="item.src" alt="" style="width: 100%" />
  177. </div>
  178. </div>
  179. <div v-else class="content levelPrivilege">
  180. <div v-for="(item, index) in rights1" :key="'task1' + index">
  181. <img :src="item.src" alt="" style="width: 100%" />
  182. </div>
  183. </div>
  184. </div>
  185. <!-- 铂金和钻石用户 -->
  186. <div v-if="userLevel1 == '4' || userLevel1 == '5'">
  187. <div v-if="isZh" class="content levelPrivilege">
  188. <div v-for="(item, index) in diamond" :key="'task1' + index">
  189. <img :src="item.src" alt="" style="width: 100%" />
  190. </div>
  191. </div>
  192. <div v-else class="content levelPrivilege">
  193. <div v-for="(item, index) in diamondEn" :key="'task1' + index">
  194. <img :src="item.src" alt="" style="width: 100%" />
  195. </div>
  196. </div>
  197. </div>
  198. </div>
  199. <div class="task">
  200. <div class="title">
  201. <span
  202. style="
  203. width: 7px;
  204. height: 19px;
  205. background-color: #265186;
  206. margin-left: 4px;
  207. "
  208. ></span>
  209. <span style="margin-left: 8px; color: #265186">{{
  210. $i18n.locale == 'zh' ? '用户等级权益表' : 'User Level Benefit Table'
  211. }}</span>
  212. </div>
  213. <div class="content benefitTable">
  214. <el-table
  215. border
  216. :data="userRights"
  217. :cell-class-name="userRightsCellClass"
  218. style="width: 100%; margin: 0 auto"
  219. >
  220. <el-table-column
  221. key="Equity_Class"
  222. :label="$i18n.locale === 'zh' ? '权益/等级' : 'Equity/Class'"
  223. align="center"
  224. class-name="nameLine"
  225. min-width="180"
  226. >
  227. <template slot-scope="scope">
  228. <div
  229. style="
  230. width: 180px;
  231. overflow: hidden;
  232. table-layout: fixed;
  233. word-wrap: break-all;
  234. word-break: normal;
  235. "
  236. >
  237. {{ $i18n.locale == 'zh' ? scope.row.name : scope.row.nameEn }}
  238. </div>
  239. </template>
  240. </el-table-column>
  241. <el-table-column
  242. v-for="(item, index) in userLevel"
  243. :key="item.level + index + Math.random()"
  244. :label="$i18n.locale === 'zh' ? item.name : item.nameEn"
  245. align="center"
  246. label-class-name="nameLine"
  247. min-width="180"
  248. >
  249. <template slot-scope="scope">
  250. <i
  251. v-if="item.rights.includes(scope.row.rights)"
  252. class="el-icon-check"
  253. style="color: #fac223; font-size: 18px; font-weight: 600"
  254. ></i>
  255. </template>
  256. </el-table-column>
  257. </el-table>
  258. </div>
  259. </div>
  260. <div class="task">
  261. <div class="title">
  262. <span
  263. style="
  264. width: 7px;
  265. height: 19px;
  266. background-color: #265186;
  267. margin-left: 4px;
  268. "
  269. ></span>
  270. <span style="margin-left: 8px; color: #265186">{{
  271. $i18n.locale == 'zh'
  272. ? '用户等级规则说明'
  273. : 'User Level Rule Description'
  274. }}</span>
  275. </div>
  276. <div class="content levelRuleDescription">
  277. <div style="width: 282px; padding: 60px 0 20px">
  278. <el-table
  279. border
  280. :data="userLevel"
  281. header-row-class-name="nameLine"
  282. style="width: 100%"
  283. >
  284. <el-table-column
  285. prop="name"
  286. key="column1"
  287. :label="$i18n.locale === 'zh' ? '用户/等级' : 'User/Class'"
  288. align="center"
  289. min-width="140"
  290. >
  291. <template slot-scope="scope">
  292. <div>
  293. {{ $i18n.locale == 'zh' ? scope.row.name : scope.row.nameEn }}
  294. </div>
  295. </template>
  296. </el-table-column>
  297. <el-table-column
  298. key="column2"
  299. :label="$i18n.locale === 'zh' ? '成长值(分)' : 'Growth(Point)'"
  300. align="center"
  301. min-width="140"
  302. >
  303. <template slot-scope="scope">
  304. {{ scope.row.growthValue }}
  305. {{
  306. ['level4'].includes(scope.row.level)
  307. ? $i18n.locale === 'zh'
  308. ? '成为会员'
  309. : 'Become Member'
  310. : ''
  311. }}
  312. </template>
  313. </el-table-column>
  314. </el-table>
  315. </div>
  316. <div v-if="isZh" class="intro" v-html="intro"></div>
  317. <div v-else class="intro" v-html="intro1"></div>
  318. </div>
  319. </div>
  320. </div>
  321. </template>
  322. <script>
  323. import { getUserPointPage } from '@/api/user'
  324. export default {
  325. name: 'userCenterRightsRank',
  326. data() {
  327. return {
  328. userInfoDeTua: '',
  329. booleanFlag: {
  330. headPortraitDefaultImg: false,
  331. levelDefaultImg: false,
  332. },
  333. user: {
  334. umsUser: {},
  335. },
  336. silver: [
  337. {
  338. src: require('@/assets/img/userCenter/userRights/userRights_01.png'),
  339. },
  340. {
  341. src: require('@/assets/img/userCenter/userRights/userRights_02.png'),
  342. },
  343. {
  344. src: require('@/assets/img/userCenter/userRights/userRights_03.png'),
  345. },
  346. {
  347. src: require('@/assets/img/userCenter/userRights/专题活动邀请.png'),
  348. },
  349. {
  350. src: require('@/assets/img/userCenter/userRights/优先定制服务.png'),
  351. },
  352. {
  353. src: require('@/assets/img/userCenter/userRights/资源下载优惠.png'),
  354. },
  355. {
  356. src: require('@/assets/img/userCenter/userRights/userRights_07_disabled.png'),
  357. },
  358. {
  359. src: require('@/assets/img/userCenter/userRights/userRights_08_disabled.png'),
  360. },
  361. {
  362. src: require('@/assets/img/userCenter/userRights/userRights_09_disabled.png'),
  363. },
  364. {
  365. src: require('@/assets/img/userCenter/userRights/userRights_10_disabled.png'),
  366. },
  367. ],
  368. silverEn: [
  369. {
  370. src: require('@/assets/img/userCenter/userRights/right/注册有礼已完成Epng.png'),
  371. },
  372. {
  373. src: require('@/assets/img/userCenter/userRights/right/活动有限报名已完成E.png'),
  374. },
  375. {
  376. src: require('@/assets/img/userCenter/userRights/right/信息咨询服务已完成E.png'),
  377. },
  378. {
  379. src: require('@/assets/img/userCenter/userRights/right/专题活动邀请-未完成.png'),
  380. },
  381. {
  382. src: require('@/assets/img/userCenter/userRights/right/优先定制服务-未完成.png'),
  383. },
  384. {
  385. src: require('@/assets/img/userCenter/userRights/right/资源下载优惠-未完成.png'),
  386. },
  387. {
  388. src: require('@/assets/img/userCenter/userRights/right/调研机构优先参观-未完成.png'),
  389. },
  390. {
  391. src: require('@/assets/img/userCenter/userRights/right/专属客服-未完成.png'),
  392. },
  393. {
  394. src: require('@/assets/img/userCenter/userRights/right/平台广告推广权益-未完成.png'),
  395. },
  396. {
  397. src: require('@/assets/img/userCenter/userRights/right/联合办会-未完成.png'),
  398. },
  399. ],
  400. rights: [
  401. {
  402. src: require('@/assets/img/userCenter/userRights/userRights_01.png'),
  403. },
  404. {
  405. src: require('@/assets/img/userCenter/userRights/userRights_02.png'),
  406. },
  407. {
  408. src: require('@/assets/img/userCenter/userRights/userRights_03.png'),
  409. },
  410. {
  411. src: require('@/assets/img/userCenter/userRights/userRights_04.png'),
  412. },
  413. {
  414. src: require('@/assets/img/userCenter/userRights/userRights_05.png'),
  415. },
  416. {
  417. src: require('@/assets/img/userCenter/userRights/userRights_06.png'),
  418. },
  419. {
  420. src: require('@/assets/img/userCenter/userRights/userRights_07_disabled.png'),
  421. },
  422. {
  423. src: require('@/assets/img/userCenter/userRights/userRights_08_disabled.png'),
  424. },
  425. {
  426. src: require('@/assets/img/userCenter/userRights/userRights_09_disabled.png'),
  427. },
  428. {
  429. src: require('@/assets/img/userCenter/userRights/userRights_10_disabled.png'),
  430. },
  431. ],
  432. rights1: [
  433. {
  434. src: require('@/assets/img/userCenter/userRights/right/注册有礼已完成Epng.png'),
  435. },
  436. {
  437. src: require('@/assets/img/userCenter/userRights/right/活动有限报名已完成E.png'),
  438. },
  439. {
  440. src: require('@/assets/img/userCenter/userRights/right/信息咨询服务已完成E.png'),
  441. },
  442. {
  443. src: require('@/assets/img/userCenter/userRights/right/专题活动邀请已完成E.png'),
  444. },
  445. {
  446. src: require('@/assets/img/userCenter/userRights/right/优先定制服务已完成4.png'),
  447. },
  448. {
  449. src: require('@/assets/img/userCenter/userRights/right/资源下载优惠已完成E.png'),
  450. },
  451. {
  452. src: require('@/assets/img/userCenter/userRights/right/调研机构优先参观-未完成.png'),
  453. },
  454. {
  455. src: require('@/assets/img/userCenter/userRights/right/专属客服-未完成.png'),
  456. },
  457. {
  458. src: require('@/assets/img/userCenter/userRights/right/平台广告推广权益-未完成.png'),
  459. },
  460. {
  461. src: require('@/assets/img/userCenter/userRights/right/联合办会-未完成.png'),
  462. },
  463. ],
  464. diamond: [
  465. {
  466. src: require('@/assets/img/userCenter/userRights/userRights_01.png'),
  467. },
  468. {
  469. src: require('@/assets/img/userCenter/userRights/userRights_02.png'),
  470. },
  471. {
  472. src: require('@/assets/img/userCenter/userRights/userRights_03.png'),
  473. },
  474. {
  475. src: require('@/assets/img/userCenter/userRights/userRights_04.png'),
  476. },
  477. {
  478. src: require('@/assets/img/userCenter/userRights/userRights_05.png'),
  479. },
  480. {
  481. src: require('@/assets/img/userCenter/userRights/userRights_06.png'),
  482. },
  483. {
  484. src: require('@/assets/img/userCenter/userRights/userRights_07.png'),
  485. },
  486. {
  487. src: require('@/assets/img/userCenter/userRights/userRights_08.png'),
  488. },
  489. {
  490. src: require('@/assets/img/userCenter/userRights/userRights_09.png'),
  491. },
  492. {
  493. src: require('@/assets/img/userCenter/userRights/userRights_10.png'),
  494. },
  495. ],
  496. diamondEn: [
  497. {
  498. src: require('@/assets/img/userCenter/userRights/right/注册有礼已完成Epng.png'),
  499. },
  500. {
  501. src: require('@/assets/img/userCenter/userRights/right/活动有限报名已完成E.png'),
  502. },
  503. {
  504. src: require('@/assets/img/userCenter/userRights/right/信息咨询服务已完成E.png'),
  505. },
  506. {
  507. src: require('@/assets/img/userCenter/userRights/right/专题活动邀请已完成E.png'),
  508. },
  509. {
  510. src: require('@/assets/img/userCenter/userRights/right/优先定制服务已完成4.png'),
  511. },
  512. {
  513. src: require('@/assets/img/userCenter/userRights/right/资源下载优惠已完成E.png'),
  514. },
  515. {
  516. src: require('@/assets/img/userCenter/userRights/right/调研机构优先参观已完成E.png'),
  517. },
  518. {
  519. src: require('@/assets/img/userCenter/userRights/right/专属客服已完成E.png'),
  520. },
  521. {
  522. src: require('@/assets/img/userCenter/userRights/right/平台广告推广权益已完成E.png'),
  523. },
  524. {
  525. src: require('@/assets/img/userCenter/userRights/right/联合办会已完成E.png'),
  526. },
  527. ],
  528. userLevel: [
  529. {
  530. name: 'V1白银用户',
  531. nameEn: 'V1 Silver User',
  532. level: 'level1',
  533. growthValue: '0-999',
  534. rights: ['1', '2', '3', '4'],
  535. },
  536. {
  537. name: 'V2黄金用户',
  538. nameEn: 'V2 Gold User',
  539. level: 'level2',
  540. growthValue: '1000-2999',
  541. rights: ['1', '2', '3', '4', '5', '6', '7'],
  542. },
  543. {
  544. name: 'V3铂金用户',
  545. nameEn: 'V3 Platinum User',
  546. level: 'level3',
  547. growthValue: '3000-999999',
  548. rights: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11'],
  549. },
  550. {
  551. name: '星钻用户',
  552. nameEn: 'Star User',
  553. level: 'level4',
  554. growthValue: '',
  555. rights: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11'],
  556. },
  557. ],
  558. userRights: [
  559. {
  560. name: '注册有礼',
  561. nameEn: 'Registration Courtesy',
  562. rights: '1',
  563. },
  564. // {
  565. // name: "积分兑换",
  566. // nameEn: "Credits Exchange",
  567. // rights: "2",
  568. // },
  569. {
  570. name: '活动优先报名',
  571. nameEn: 'Priority Registration',
  572. rights: '3',
  573. },
  574. {
  575. name: '信息咨询服务',
  576. nameEn: 'Information Consulting Services',
  577. rights: '4',
  578. },
  579. {
  580. name: '专题活动邀请',
  581. nameEn: 'Special Event Invitation',
  582. rights: '5',
  583. },
  584. {
  585. name: '优先定制服务',
  586. nameEn: 'Priority Custom Service',
  587. rights: '6',
  588. },
  589. {
  590. name: '资源下载优惠',
  591. nameEn: 'Resource Download Discount',
  592. rights: '7',
  593. },
  594. {
  595. name: '调研机构优先参观',
  596. nameEn: 'Priority Visit To Research Institutions',
  597. rights: '8',
  598. },
  599. {
  600. name: '业务咨询优先服务',
  601. nameEn: 'Business Consulting Priority Service',
  602. rights: '9',
  603. },
  604. {
  605. name: '平台广告推广权益',
  606. nameEn: 'Platform Advertising Rights',
  607. rights: '10',
  608. },
  609. {
  610. name: '联合办会',
  611. nameEn: 'Joint Meeting',
  612. rights: '11',
  613. },
  614. ],
  615. growth: '',
  616. userGrades: '',
  617. userRight: [],
  618. isGreaterThan: true,
  619. language: '',
  620. isZh: true,
  621. demo: null,
  622. membershipGrade: null,
  623. intro:
  624. '<p style="text-align: center;"><span style="font-size: 24px;"><strong>用户等级规则说明</strong></span></p><p><strong><span style="font-size: 16px;">用户等级介绍</span></strong></p><p style="text-indent: 0em;"><span style="font-size: 14px;">用户等级是基于用户一定期限使用能联全球平台业务累积获取的成长值决定,用户达到相应的等级门槛即可升级,用户可以通过做登录、留言和分享做任务来获取成长值,从而提升等级。</span></p><p><span style="font-size: 16px;"><strong>等级有效期</strong></span></p><p><span style="font-size: 14px;">用户等级有效期为一年(365天),若用户升级,新等级有效期从升级当天开始计算。若您没有在当前有效期内升级,新等级有效期会在当前等级有效期到期日的次日</span></p><p><span style="font-size: 14px;">开始重新计算并变更为新的等级;同时,你在当前等级有效期变更前获取的成长值【含奖励的成长值(以成长值到账时间计算)】会自动清零。新等级有效期内获取的成长值,将计算在新的等级有效期内。</span><br/></p><p><span style="font-size: 16px;"><strong>升降级规则</strong></span></p><p><span style="font-size: 14px;">用户在等级有效期内成长值达到升级门槛值,新等级立即生效。等级到期后,用户等级将根据上个有效期内获取的成长值重新计算。若跨等级有效期变更的出现扣值情况,成长值会在新等级有效期的成长值扣除(因为等级有效期前获取的成长值已计入上个等级有效期并影响用户升降级)。若当前等级有效期成长值不足抵扣跨等级有效期的成长值,则有多少扣多少,扣至为零后,后续获取的成长值不会在抵扣</span></p><p><span style="font-size: 16px;"><strong>成长值说明</strong></span></p><p><span style="font-size: 14px;">用来评定用户用户等级的值称为成长值;用户可以通过做登录、留言和分享做任务等方式获取成长值,从而提升会员等级。用户升级</span></p>',
  625. intro1:
  626. '<p style="text-align: center;"><span style="font-size: 24px;"><strong>User Level Rule Description</strong></span></p><p><strong><span style="font-size: 16px;">User Level Introduction</span></strong></p><p style="text-indent: 0em;"><span style="font-size: 14px;">The user level is determined based on the growthvalue accumulated by the user using the global platform business for a certain period of time.The user can be upgraded after reaching the corresponding level threshold. The user can obtainthe growth value by logging in, leaving messages and sharing tasks, so as to improve thelevel.</span></p><p><span style="font-size: 16px;"><strong>Grade Validity</strong></span></p><p><span style="font-size: 14px;">The validity period of the user level is one year (365 days). If the userupgrades, the validity period of the new level starts from the day of upgrading. If you do notupgrade within the current validity period, the validity period of the new level will be thenext day of the expiration date of the current level</span></p><p><span style="font-size: 14px;">Start recalculation and change to a new level; At the same time, the growthvalue you obtained before the validity period of the current level is changed [including thegrowth value of reward (calculated by the arrival time of growth value)] will be automaticallycleared. The growth value obtained within the validity period of the new level will becalculated within the validity period of the new level.</span><br /></p><p><span style="font-size: 16px;"><strong>Promotion And Degradation Rules</strong></span></p><p><span style="font-size: 14px;">If the growth value of the user reaches the upgrade threshold within thevalidity period of the level, the new level will take effect immediately. After the levelexpires, the user level will be recalculated according to the growth value obtained in theprevious validity period. In case of value deduction in the change of cross level validityperiod, the growth value will be deducted from the growth value in the new level validity period(because the growth value obtained before the level validity period has been included in theprevious level validity period and affects the user level rise and fall). If the growth valuein the validity period of the current level is insufficient to deduct the growth value in thecross level validity period, how much will be deducted. After deducting to zero, the subsequentgrowth value will not be deducted</span></p><p><span style="font-size: 16px;"><strong>Growth Value Description</strong></span></p><p><span style="font-size: 14px;">The value used to evaluate the user level is called growth value; Users canget growth value by logging in, leaving messages and sharing tasks, so as to improve the level of members. User upgrade</span></p>',
  627. }
  628. },
  629. mounted() {
  630. let language = window.localStorage.getItem('locale')
  631. if (language == 'zh') {
  632. this.isZh = true
  633. } else {
  634. this.isZh = false
  635. }
  636. this.init()
  637. console.log(this.userLevel1, '等级')
  638. this.membershipGrade = JSON.parse(window.localStorage.getItem('user'))
  639. console.log(this.membershipGrade, '用户')
  640. if (this.userLevel1 == '5') {
  641. this.isGreaterThan = false
  642. }
  643. },
  644. watch: {
  645. '$i18n.locale': {
  646. handler: function () {
  647. if (this.$i18n.locale == 'zh') {
  648. this.isZh = true
  649. } else {
  650. this.isZh = false
  651. }
  652. },
  653. deep: true,
  654. },
  655. },
  656. methods: {
  657. init() {
  658. this.user = JSON.parse(window.localStorage.getItem('user'))
  659. this.userRight = JSON.parse(window.localStorage.getItem('userRight'))
  660. if (this.user.umsUser.userPic == undefined) {
  661. this.user.umsUser.userPic = ''
  662. }
  663. this.growthForValue()
  664. },
  665. // 获取成长值
  666. growthForValue() {
  667. getUserPointPage().then((res) => {
  668. if (res) {
  669. this.growth = res.data.umsUserPoints[0].growthValue
  670. }
  671. })
  672. },
  673. userRightsCellClass({ row, column, rowIndex, columnIndex }) {
  674. if (
  675. columnIndex != 0 &&
  676. this.userLevel[columnIndex - 1].rights.includes(row.rights)
  677. ) {
  678. return 'haveRight'
  679. }
  680. },
  681. toView(route, params) {
  682. this.$router.push({
  683. name: route,
  684. query: params,
  685. })
  686. },
  687. },
  688. computed: {
  689. // 判断有无真名
  690. realName() {
  691. if (this.user.umsUser.userNickName) {
  692. return this.user.umsUser.userNickName
  693. } else {
  694. return this.user.username
  695. }
  696. },
  697. // 判断会员等级
  698. userLevel1() {
  699. if (this.growth >= 0 && this.growth < 1000) {
  700. if (this.$i18n.locale == 'zh') {
  701. this.userInfoDeTua = '黄金用户'
  702. } else {
  703. this.userInfoDeTua = 'Gold User'
  704. }
  705. return 2
  706. } else if (this.growth >= 1000 && this.growth < 3000) {
  707. if (this.$i18n.locale == 'zh') {
  708. this.userInfoDeTua = '铂金用户'
  709. } else {
  710. this.userInfoDeTua = 'Platinum User'
  711. }
  712. return 3
  713. } else if (this.growth >= 3000) {
  714. return 4
  715. }
  716. },
  717. // 判断差多少分
  718. byScore() {
  719. if (this.growth >= 0 && this.growth < 1000) {
  720. return parseInt(1000 - this.growth)
  721. } else if (this.growth >= 1000 && this.growth < 3000) {
  722. return parseInt(3000 - this.growth)
  723. } else if (this.growth >= 3000) {
  724. return parseInt(999999)
  725. }
  726. },
  727. // 判断中英文
  728. // isZh() {
  729. // this.language = window.localStorage.getItem("locale");
  730. // if (this.language == "zh") {
  731. // return true;
  732. // } else {
  733. // return false;
  734. // }
  735. // },
  736. },
  737. }
  738. </script>
  739. <style scoped lang="less">
  740. .userCenterRightsRank {
  741. width: 100%;
  742. background: #fff;
  743. min-height: 700px;
  744. padding: 0;
  745. box-sizing: border-box;
  746. .user {
  747. width: 100%;
  748. background-color: #f9f9f9;
  749. border-radius: 5px;
  750. .info {
  751. display: flex;
  752. height: 190px;
  753. padding-left: 100px;
  754. .head {
  755. width: 140px;
  756. .headPortrait {
  757. width: 82px;
  758. height: 82px;
  759. border-radius: 50%;
  760. margin: 27px auto 0;
  761. }
  762. .level {
  763. width: 108px;
  764. height: 28px;
  765. border-radius: 14px;
  766. margin: 8px auto 0;
  767. }
  768. }
  769. .content {
  770. flex: 1;
  771. margin-top: 117px;
  772. height: 28px;
  773. .name {
  774. font-size: 22px;
  775. font-weight: 600;
  776. color: #000;
  777. margin-left: 17px;
  778. }
  779. .growthValue {
  780. font-size: 16px;
  781. color: #939393;
  782. margin-left: 17px;
  783. }
  784. .record {
  785. font-size: 16px;
  786. color: #588fbb;
  787. text-decoration: underline;
  788. cursor: pointer;
  789. margin-left: 17px;
  790. }
  791. .remark {
  792. font-size: 16px;
  793. color: #939393;
  794. margin-left: 17px;
  795. }
  796. }
  797. }
  798. }
  799. .task {
  800. .title {
  801. width: 100%;
  802. border-bottom: 1px solid #eeeff3;
  803. > span {
  804. display: inline-block;
  805. font-size: 18px;
  806. font-weight: 600;
  807. line-height: 70px;
  808. vertical-align: middle;
  809. }
  810. }
  811. .content {
  812. display: flex;
  813. flex-wrap: wrap;
  814. justify-content: space-between;
  815. &.levelPrivilege > div {
  816. width: 19%;
  817. height: 140px;
  818. margin-top: 18px;
  819. }
  820. &.benefitTable {
  821. display: inherit;
  822. padding: 16px 0;
  823. /deep/ .el-table__body tr {
  824. pointer-events: none;
  825. }
  826. /deep/ .nameLine {
  827. background-color: #f9f9f9;
  828. }
  829. /deep/ .haveRight {
  830. background-color: #feefc4;
  831. }
  832. }
  833. &.levelRuleDescription {
  834. /deep/ .nameLine th {
  835. background-color: #f9f9f9;
  836. }
  837. /deep/ .el-table td,
  838. /deep/ .el-table th {
  839. padding: 30px 0;
  840. }
  841. .intro {
  842. flex: 1;
  843. padding: 0 0 22px 16px;
  844. p {
  845. margin: 0;
  846. }
  847. }
  848. }
  849. }
  850. }
  851. }
  852. </style>