球星卡微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

638 lines
14 KiB

4 years ago
4 years ago
4 years ago
4 years ago
  1. <template>
  2. <view class="flex-col page">
  3. <lf-header :spreadOut="true" :diy="true" :boderBottom="true" bgColor="#ffffff">
  4. <view class="header-nav">
  5. <image class="searchIcon" src="@/static/icon/search.png" @click="$url('/pages/ratingQuery/ratingQuery')"></image>
  6. <text class="title">评级中心</text>
  7. </view>
  8. </lf-header>
  9. <view class="flex-col items-center group_3">
  10. <image src="@/static/icon/line.png" class="image_6" />
  11. <view class="flex-col section_2">
  12. <view class="flex-col">
  13. <!-- 用户信息 -->
  14. <view class="flex-col section_3" @click="nextToSettings">
  15. <view class="bottom-group flex-col items-center view_3">
  16. <view class="flex-col items-end image-wrapper">
  17. <image class="avatar" :src="user.avatar" mode="aspectFill" v-if="user.avatar"></image>
  18. <image class="avatar" src="@/static/mrtx.png" mode="aspectFill" v-else></image>
  19. <image src="@/static/icon/level.png" class="image_7" />
  20. <view class="flex-col items-center badge" v-if="$isRight(dots.system)">
  21. <text>{{ dots.system > 99 ? '99+' : dots.system }}</text>
  22. </view>
  23. </view>
  24. </view>
  25. <view class="justify-center group_5">
  26. <view class="user-name">{{ user.nick_name || '您未登录,点击登录' }}</view>
  27. <image src="@/static/icon/rightArrow.png" class="image_8" />
  28. </view>
  29. </view>
  30. <!-- 我的订单 -->
  31. <view class="section_4 flex-col">
  32. <view class="justify-between">
  33. <text class="text_4">我的订单</text>
  34. <view class="right-group flex-row" @click="nextToOrder">
  35. <text>全部</text>
  36. <image src="@/static/icon/rightArrow.png" class="image_8" />
  37. </view>
  38. </view>
  39. <view class="justify-between equal-division" >
  40. <view class="equal-division-item flex-col" @click="nextToOrder(1)">
  41. <view class="top-group flex-col items-center">
  42. <image src="@/static/icon/order1.png" class="image_11" />
  43. <view class="flex-col items-center badge_1" v-if="$isRight(dots.unconfirmed)">
  44. <text>{{ dots.unconfirmed }}</text>
  45. </view>
  46. </view>
  47. <text class="text_7">待确认</text>
  48. </view>
  49. <view class="flex-col items-center equal-division-item_1" @click="nextToOrder(2)">
  50. <view class="top-group flex-col items-center">
  51. <image src="@/static/icon/order2.png" class="image_11" />
  52. <view class="flex-col items-center badge_2" v-if="$isRight(dots.rating)">
  53. <text>{{ dots.rating }}</text>
  54. </view>
  55. </view>
  56. <text class="text_7">评级中</text>
  57. </view>
  58. <view class="flex-col items-center equal-division-item_2" @click="nextToOrder(3)">
  59. <view class="top-group flex-col items-center">
  60. <image src="@/static/icon/order3.png" class="image_11" />
  61. <view class="flex-col items-center badge_2" v-if="$isRight(dots.paying)">
  62. <text>{{ dots.paying }}</text>
  63. </view>
  64. </view>
  65. <text class="text_11">待付款</text>
  66. </view>
  67. <view class="equal-division-item flex-col" @click="nextToOrder(4)">
  68. <view class="top-group flex-col items-center">
  69. <image src="@/static/icon/order4.png" class="image_11" />
  70. <view class="flex-col items-center badge_2" v-if="$isRight(dots.shipping)">
  71. <text>{{ dots.shipping }}</text>
  72. </view>
  73. </view>
  74. <text class="text_7">待收货</text>
  75. </view>
  76. </view>
  77. </view>
  78. <!-- 快速评级 -->
  79. <view class="section_4 flex-col">
  80. <view class="justify-between group_9">
  81. <view class="group_10">
  82. <text class="text_14">快速评级</text>
  83. <text class="text_15">7day</text>
  84. </view>
  85. <view class="right-group flex-row" @click="$url('/pages/fastRating/fastRating')">
  86. <text>查看详情</text>
  87. <image src="@/static/icon/rightArrow.png" class="image_8" />
  88. </view>
  89. </view>
  90. <view class="grid">
  91. <view class="flex-col items-center grid-item_1" @click="rateIndex = 0" :class="{'grid-item-active': rateIndex == 0}">
  92. <text class="qxk-iconfont qxk-icon-mulu lf-font-40"></text>
  93. <text class="text_17">全面评级</text>
  94. </view>
  95. <view class="flex-col items-center grid-item_1" @click="rateIndex = 1" :class="{'grid-item-active': rateIndex == 1}">
  96. <text class="qxk-iconfont qxk-icon-xinwen-moren lf-font-40"></text>
  97. <text class="text_9">卡品评级</text>
  98. </view>
  99. <view class="grid-item_2 flex-col items-center" @click="rateIndex = 2" :class="{'grid-item-active': rateIndex == 2}">
  100. <text class="qxk-iconfont qxk-icon-tuwenguanli lf-font-40"></text>
  101. <text class="text_19">签名评级</text>
  102. </view>
  103. <view class="grid-item_2 flex-col items-center" @click="rateIndex = 3" :class="{'grid-item-active': rateIndex == 3}">
  104. <text class="qxk-iconfont qxk-icon-kefujiqirenbeifen lf-font-40"></text>
  105. <text class="text_19">套壳服务</text>
  106. </view>
  107. </view>
  108. <view class="flex-col group_11">
  109. <view class="justify-between group_12">
  110. <view class="flex-row">
  111. <checkbox-group @change="e => isConsentAgreement = !isConsentAgreement">
  112. <checkbox color="#e6a33c" :checked="isConsentAgreement"></checkbox>
  113. </checkbox-group>
  114. <view class="group_14">
  115. <text class="text_22">阅读并同意</text>
  116. <text class="text_23" @click="$url('/packages/article/article?type=grade_agreement')">相关协议</text>
  117. </view>
  118. </view>
  119. <text class="text_24">45/</text>
  120. </view>
  121. <view class="flex-col items-center button" @click="nextToGrading">
  122. <text>下一步</text>
  123. </view>
  124. </view>
  125. </view>
  126. <!-- 已评卡 -->
  127. <view class="flex-col section_8" v-if="$isRight(evaluated_order)">
  128. <view class="justify-between group_15" @click="nextToOrder">
  129. <text>已评卡</text>
  130. <image
  131. src="@/static/icon/rightArrow.png"
  132. class="image_8" />
  133. </view>
  134. <view class="flex-row equal-division_1">
  135. <view class="flex-col items-center equal-division-item_3" @click="$url('/packages/sonpingDetail/sonpingDetail?id='+ item.id)" v-for="(item, index) in evaluated_order" :key="index">
  136. <image :src="item.itemImage" class="image_23" mode="aspectFill" />
  137. <text class="text_27">{{ item.title }}</text>
  138. </view>
  139. </view>
  140. </view>
  141. <!-- 评级标准 -->
  142. <view class="justify-between section_9" @click="$url('/pages/ratingCriteria/ratingCriteria')">
  143. <text>评级标准/卡砖设计</text>
  144. <image
  145. src="@/static/icon/rightArrow.png"
  146. class="image_8" />
  147. </view>
  148. </view>
  149. </view>
  150. </view>
  151. </view>
  152. </template>
  153. <script>
  154. import lfHeader from '@/components/lf-header.vue';
  155. import { my } from '@/service/index.js';
  156. export default {
  157. components: {
  158. lfHeader
  159. },
  160. data() {
  161. return {
  162. isConsentAgreement: false,
  163. rateIndex: 0,
  164. user: {},
  165. dots: {},
  166. evaluated_order: []
  167. };
  168. },
  169. onLoad(){
  170. this.getUserCenterDetail();
  171. },
  172. methods: {
  173. async getUserCenterDetail(){
  174. let res = await my();
  175. this.user = res.data.datas.user;
  176. this.dots = res.data.datas.dots;
  177. let evaluated_order = res.data.datas.evaluated_order;
  178. evaluated_order.forEach(item => item.itemImage = String(item.images).split(',')[0]);
  179. this.evaluated_order = evaluated_order;
  180. },
  181. nextToGrading(){
  182. if(!this.isConsentAgreement) return this.$msg('请先阅读并同意协议');
  183. let rateIndex = this.rateIndex;
  184. if(this.$isRight(this.user)){
  185. this.$url('/pages/write/baseInfo?rate_index='+ rateIndex);
  186. }else{
  187. this.$url('/pages/login/login');
  188. }
  189. },
  190. nextToOrder(current){
  191. if(this.$isRight(this.user)){
  192. let url = '/pages/order/order';
  193. if(this.$valueType(current) === 'number'){
  194. url += '?current='+ current;
  195. }
  196. this.$url(url);
  197. }else{
  198. this.$url('/pages/login/login');
  199. }
  200. },
  201. nextToSettings(){
  202. if(this.$isRight(this.user)){
  203. this.$url('/pages/settings/settings');
  204. }else{
  205. // this.$url('/pages/login/login', {type: 'redirect'})
  206. this.$url('/pages/login/login');
  207. }
  208. }
  209. }
  210. };
  211. </script>
  212. <style scoped lang="scss">
  213. .header-nav{
  214. text-align: center;
  215. position: relative;
  216. width: 720rpx;
  217. display: flex;
  218. justify-content: center;
  219. .searchIcon{
  220. position: absolute;
  221. left: 0;
  222. top: 6rpx;
  223. width: 38rpx;
  224. height: 36rpx;
  225. z-index: 999999;
  226. }
  227. }
  228. .bottom-group {
  229. position: relative;
  230. }
  231. .section_4 {
  232. margin-top: 30rpx;
  233. padding: 40rpx 32rpx;
  234. background-color: rgb(255, 255, 255);
  235. }
  236. .image_8 {
  237. width: 44rpx;
  238. height: 44rpx;
  239. }
  240. .equal-division-item {
  241. width: 84rpx;
  242. }
  243. .grid-item_2 {
  244. color: rgb(51, 51, 51);
  245. font-size: 28rpx;
  246. font-weight: 500;
  247. line-height: 40rpx;
  248. white-space: nowrap;
  249. padding: 28rpx 0 24rpx;
  250. border-radius: 10rpx;
  251. border: solid 2rpx rgb(195, 195, 195);
  252. }
  253. .top-group {
  254. color: rgb(255, 255, 255);
  255. font-size: 24rpx;
  256. font-weight: 500;
  257. line-height: 26rpx;
  258. white-space: nowrap;
  259. padding-top: 2rpx;
  260. position: relative;
  261. }
  262. .image_11 {
  263. width: 60rpx;
  264. height: 60rpx;
  265. }
  266. .image_17 {
  267. width: 50rpx;
  268. height: 50rpx;
  269. }
  270. .image_23 {
  271. border-radius: 10rpx;
  272. width: 200rpx;
  273. height: 240rpx;
  274. }
  275. .right-group {
  276. color: rgb(153, 153, 153);
  277. font-size: 28rpx;
  278. font-weight: 500;
  279. line-height: 40rpx;
  280. white-space: nowrap;
  281. }
  282. .text_7 {
  283. margin-top: 12rpx;
  284. color: rgb(85, 85, 85);
  285. font-size: 28rpx;
  286. font-weight: 500;
  287. line-height: 40rpx;
  288. white-space: nowrap;
  289. }
  290. .text_9 {
  291. margin-top: 14rpx;
  292. }
  293. .text_19 {
  294. margin-top: 14rpx;
  295. }
  296. .page {
  297. background-color: #f6f6f6;
  298. width: 100%;
  299. overflow-y: auto;
  300. height: 100%;
  301. }
  302. .group_3 {
  303. padding-bottom: 2024rpx;
  304. flex: 1 1 auto;
  305. overflow-y: auto;
  306. position: relative;
  307. }
  308. .image_6 {
  309. width: 100vw;
  310. height: 1vw;
  311. }
  312. .section_2 {
  313. padding-bottom: 14rpx;
  314. background-color: rgb(246, 246, 246);
  315. top: 0;
  316. right: 0;
  317. bottom: 0;
  318. left: 0;
  319. position: absolute;
  320. }
  321. .section_3 {
  322. padding: 40rpx 0 38rpx;
  323. background-color: rgb(255, 255, 255);
  324. }
  325. .section_8 {
  326. margin-top: 30rpx;
  327. padding: 40rpx 0;
  328. background-color: rgb(255, 255, 255);
  329. }
  330. .section_9 {
  331. margin-top: 30rpx;
  332. padding: 40rpx 32rpx 30rpx;
  333. color: rgb(51, 51, 51);
  334. font-size: 32rpx;
  335. font-weight: 700;
  336. line-height: 44rpx;
  337. white-space: nowrap;
  338. background-color: rgb(255, 255, 255);
  339. }
  340. .view_3 {
  341. color: rgb(255, 255, 255);
  342. font-size: 24rpx;
  343. font-weight: 500;
  344. line-height: 34rpx;
  345. white-space: nowrap;
  346. }
  347. .group_5 {
  348. margin-top: 20rpx;
  349. color: rgb(51, 51, 51);
  350. font-size: 34rpx;
  351. font-weight: 600;
  352. line-height: 48rpx;
  353. white-space: nowrap;
  354. }
  355. .equal-division {
  356. margin: 36rpx 28rpx 0;
  357. }
  358. .group_9 {
  359. padding-left: 2rpx;
  360. }
  361. .grid {
  362. margin-top: 40rpx;
  363. height: 340rpx;
  364. display: grid;
  365. grid-template-columns: repeat(2, 1fr);
  366. grid-row-gap: 22rpx;
  367. grid-column-gap: 24rpx;
  368. }
  369. .group_11 {
  370. margin-top: 40rpx;
  371. }
  372. .group_15 {
  373. padding: 0 32rpx;
  374. color: rgb(51, 51, 51);
  375. font-size: 32rpx;
  376. font-weight: 700;
  377. line-height: 44rpx;
  378. white-space: nowrap;
  379. }
  380. .equal-division_1 {
  381. margin-top: 40rpx;
  382. padding: 0 32rpx;
  383. color: rgb(51, 51, 51);
  384. font-size: 28rpx;
  385. font-weight: 500;
  386. line-height: 40rpx;
  387. white-space: nowrap;
  388. }
  389. .image-wrapper {
  390. padding-top: 72rpx;
  391. width: 112rpx;
  392. position: relative;
  393. .avatar{
  394. position: absolute;
  395. top: 0;
  396. left: 0;
  397. width: 100%;
  398. height: 100%;
  399. border-radius: 50%;
  400. }
  401. }
  402. .badge {
  403. background-color: rgb(234, 43, 43);
  404. border-radius: 17rpx;
  405. min-width: 34rpx;
  406. position: absolute;
  407. // right: 284rpx;
  408. left: 78rpx;
  409. top: 0;
  410. }
  411. .text_4 {
  412. color: rgb(51, 51, 51);
  413. font-size: 32rpx;
  414. font-weight: 700;
  415. line-height: 44rpx;
  416. white-space: nowrap;
  417. }
  418. .equal-division-item_1 {
  419. color: rgb(85, 85, 85);
  420. font-size: 28rpx;
  421. font-weight: 500;
  422. line-height: 40rpx;
  423. white-space: nowrap;
  424. }
  425. .equal-division-item_2 {
  426. padding-top: 2rpx;
  427. color: rgb(85, 85, 85);
  428. font-size: 28rpx;
  429. font-weight: 500;
  430. line-height: 40rpx;
  431. white-space: nowrap;
  432. }
  433. .group_10 {
  434. white-space: nowrap;
  435. height: 44rpx;
  436. }
  437. .grid-item {
  438. padding: 22rpx 0 30rpx;
  439. color: rgb(231, 162, 63);
  440. font-size: 28rpx;
  441. font-weight: 500;
  442. line-height: 40rpx;
  443. white-space: nowrap;
  444. border-radius: 10rpx;
  445. border: solid 2rpx rgb(231, 162, 63);
  446. }
  447. .grid-item-active{
  448. color: rgb(231, 162, 63) !important;
  449. border: solid 2rpx rgb(231, 162, 63) !important;
  450. }
  451. .grid-item_1 {
  452. padding: 22rpx 0 30rpx;
  453. color: rgb(51, 51, 51);
  454. font-size: 28rpx;
  455. font-weight: 500;
  456. line-height: 40rpx;
  457. white-space: nowrap;
  458. border-radius: 10rpx;
  459. border: solid 2rpx rgb(195, 195, 195);
  460. }
  461. .group_12 {
  462. padding-bottom: 20rpx;
  463. }
  464. .button {
  465. padding: 26rpx 0;
  466. color: rgb(255, 255, 255);
  467. font-size: 32rpx;
  468. font-weight: 600;
  469. line-height: 44rpx;
  470. white-space: nowrap;
  471. background-color: rgb(231, 162, 63);
  472. border-radius: 10rpx;
  473. }
  474. .equal-division-item_3 {
  475. // flex: 1 1 244rpx;
  476. align-items: flex-start;
  477. margin-right: 42rpx;
  478. &:nth-child(3n){
  479. margin-right: 0rpx;
  480. }
  481. }
  482. .equal-division-item_4 {
  483. flex: 1 1 244rpx;
  484. }
  485. .equal-division-item_5 {
  486. flex: 1 1 244rpx;
  487. }
  488. .image_7 {
  489. margin-right: 12rpx;
  490. border-radius: 50%;
  491. width: 40rpx;
  492. height: 40rpx;
  493. position: relative;
  494. z-index: 99;
  495. }
  496. .text_11 {
  497. margin-top: 12rpx;
  498. }
  499. .text_14 {
  500. color: rgb(51, 51, 51);
  501. font-size: 32rpx;
  502. font-weight: 700;
  503. line-height: 44rpx;
  504. }
  505. .text_15 {
  506. color: rgb(119, 119, 119);
  507. font-size: 24rpx;
  508. font-weight: 500;
  509. line-height: 34rpx;
  510. }
  511. .text_17 {
  512. margin-top: 14rpx;
  513. }
  514. .text_24 {
  515. color: rgb(119, 119, 119);
  516. font-size: 28rpx;
  517. line-height: 40rpx;
  518. white-space: nowrap;
  519. }
  520. .text_27 {
  521. margin-top: 10rpx;
  522. }
  523. .text_28 {
  524. margin-top: 10rpx;
  525. }
  526. .text_29 {
  527. margin-top: 10rpx;
  528. }
  529. .badge_1 {
  530. background-color: rgb(234, 43, 43);
  531. border-radius: 13rpx;
  532. min-width: 26rpx;
  533. position: absolute;
  534. right: 6rpx;
  535. top: 0;
  536. }
  537. .badge_2 {
  538. background-color: rgb(234, 43, 43);
  539. border-radius: 13rpx;
  540. width: 26rpx;
  541. position: absolute;
  542. right: 0;
  543. top: 0;
  544. }
  545. .section_7 {
  546. border-radius: 50%;
  547. width: 40rpx;
  548. height: 40rpx;
  549. border: solid 2rpx rgb(195, 195, 195);
  550. }
  551. .group_14 {
  552. margin-left: 14rpx;
  553. white-space: nowrap;
  554. height: 40rpx;
  555. }
  556. .text_22 {
  557. color: rgb(119, 119, 119);
  558. font-size: 28rpx;
  559. line-height: 40rpx;
  560. }
  561. .text_23 {
  562. color: rgb(209, 161, 28);
  563. font-size: 28rpx;
  564. line-height: 40rpx;
  565. }
  566. .user-name{
  567. max-width: 360rpx;
  568. white-space:nowrap;
  569. overflow:hidden;
  570. text-overflow:ellipsis;
  571. }
  572. /deep/checkbox .wx-checkbox-input {
  573. border-radius: 50% !important;
  574. }
  575. </style>