球星卡微信小程序
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.

650 lines
15 KiB

4 years ago
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="toSubOrder(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. import { ratingSearch } from '@/service/grading.js';
  157. export default {
  158. components: {
  159. lfHeader
  160. },
  161. data() {
  162. return {
  163. isConsentAgreement: false,
  164. rateIndex: 0,
  165. user: {},
  166. dots: {},
  167. evaluated_order: []
  168. };
  169. },
  170. onLoad(){
  171. this.getUserCenterDetail();
  172. },
  173. methods: {
  174. async toSubOrder(value){
  175. let res = await ratingSearch(value);
  176. let datas = res.data.datas;
  177. let base_data = encodeURIComponent(JSON.stringify(datas));
  178. this.$url('/packages/ratingQueryDetail/ratingQueryDetail?data='+ base_data);
  179. },
  180. async getUserCenterDetail(){
  181. let res = await my();
  182. uni.setStorageSync('userInfo', res.data.datas.user);
  183. this.user = res.data.datas.user;
  184. this.dots = res.data.datas.dots;
  185. let evaluated_order = res.data.datas.evaluated_order;
  186. evaluated_order.forEach(item => item.itemImage = String(item.images).split(',')[0]);
  187. this.evaluated_order = evaluated_order;
  188. },
  189. nextToGrading(){
  190. if(!this.isConsentAgreement) return this.$msg('请先阅读并同意协议');
  191. let rateIndex = this.rateIndex;
  192. if(this.$isRight(this.user)){
  193. this.$url('/pages/write/baseInfo?rate_index='+ rateIndex);
  194. }else{
  195. this.$url('/pages/login/login');
  196. }
  197. },
  198. nextToOrder(current){
  199. if(this.$isRight(this.user)){
  200. let url = '/pages/order/order';
  201. if(this.$valueType(current) === 'number'){
  202. url += '?current='+ current;
  203. }
  204. this.$url(url);
  205. }else{
  206. this.$url('/pages/login/login');
  207. }
  208. },
  209. nextToSettings(){
  210. if(this.$isRight(this.user)){
  211. this.$url('/pages/settings/settings');
  212. }else{
  213. // this.$url('/pages/login/login', {type: 'redirect'})
  214. this.$url('/pages/login/login');
  215. }
  216. }
  217. }
  218. };
  219. </script>
  220. <style scoped lang="scss">
  221. .header-nav{
  222. text-align: center;
  223. position: relative;
  224. width: 720rpx;
  225. display: flex;
  226. justify-content: center;
  227. .searchIcon{
  228. position: absolute;
  229. left: 0;
  230. top: 6rpx;
  231. width: 38rpx;
  232. height: 36rpx;
  233. z-index: 999999;
  234. }
  235. }
  236. .bottom-group {
  237. position: relative;
  238. }
  239. .section_4 {
  240. margin-top: 30rpx;
  241. padding: 40rpx 32rpx;
  242. background-color: rgb(255, 255, 255);
  243. }
  244. .image_8 {
  245. width: 44rpx;
  246. height: 44rpx;
  247. }
  248. .equal-division-item {
  249. width: 84rpx;
  250. }
  251. .grid-item_2 {
  252. color: rgb(51, 51, 51);
  253. font-size: 28rpx;
  254. font-weight: 500;
  255. line-height: 40rpx;
  256. white-space: nowrap;
  257. padding: 28rpx 0 24rpx;
  258. border-radius: 10rpx;
  259. border: solid 2rpx rgb(195, 195, 195);
  260. }
  261. .top-group {
  262. color: rgb(255, 255, 255);
  263. font-size: 24rpx;
  264. font-weight: 500;
  265. line-height: 26rpx;
  266. white-space: nowrap;
  267. padding-top: 2rpx;
  268. position: relative;
  269. }
  270. .image_11 {
  271. width: 60rpx;
  272. height: 60rpx;
  273. }
  274. .image_17 {
  275. width: 50rpx;
  276. height: 50rpx;
  277. }
  278. .image_23 {
  279. border-radius: 10rpx;
  280. width: 200rpx;
  281. height: 240rpx;
  282. }
  283. .right-group {
  284. color: rgb(153, 153, 153);
  285. font-size: 28rpx;
  286. font-weight: 500;
  287. line-height: 40rpx;
  288. white-space: nowrap;
  289. }
  290. .text_7 {
  291. margin-top: 12rpx;
  292. color: rgb(85, 85, 85);
  293. font-size: 28rpx;
  294. font-weight: 500;
  295. line-height: 40rpx;
  296. white-space: nowrap;
  297. }
  298. .text_9 {
  299. margin-top: 14rpx;
  300. }
  301. .text_19 {
  302. margin-top: 14rpx;
  303. }
  304. .page {
  305. background-color: #f6f6f6;
  306. width: 100%;
  307. overflow-y: auto;
  308. height: 100%;
  309. }
  310. .group_3 {
  311. padding-bottom: 2024rpx;
  312. flex: 1 1 auto;
  313. overflow-y: auto;
  314. position: relative;
  315. }
  316. .image_6 {
  317. width: 100vw;
  318. height: 1vw;
  319. }
  320. .section_2 {
  321. padding-bottom: 14rpx;
  322. background-color: rgb(246, 246, 246);
  323. top: 0;
  324. right: 0;
  325. bottom: 0;
  326. left: 0;
  327. position: absolute;
  328. }
  329. .section_3 {
  330. padding: 40rpx 0 38rpx;
  331. background-color: rgb(255, 255, 255);
  332. }
  333. .section_8 {
  334. margin-top: 30rpx;
  335. padding: 40rpx 0;
  336. background-color: rgb(255, 255, 255);
  337. }
  338. .section_9 {
  339. margin-top: 30rpx;
  340. padding: 40rpx 32rpx 30rpx;
  341. color: rgb(51, 51, 51);
  342. font-size: 32rpx;
  343. font-weight: 700;
  344. line-height: 44rpx;
  345. white-space: nowrap;
  346. background-color: rgb(255, 255, 255);
  347. }
  348. .view_3 {
  349. color: rgb(255, 255, 255);
  350. font-size: 24rpx;
  351. font-weight: 500;
  352. line-height: 34rpx;
  353. white-space: nowrap;
  354. }
  355. .group_5 {
  356. margin-top: 20rpx;
  357. color: rgb(51, 51, 51);
  358. font-size: 34rpx;
  359. font-weight: 600;
  360. line-height: 48rpx;
  361. white-space: nowrap;
  362. }
  363. .equal-division {
  364. margin: 36rpx 28rpx 0;
  365. }
  366. .group_9 {
  367. padding-left: 2rpx;
  368. }
  369. .grid {
  370. margin-top: 40rpx;
  371. height: 340rpx;
  372. display: grid;
  373. grid-template-columns: repeat(2, 1fr);
  374. grid-row-gap: 22rpx;
  375. grid-column-gap: 24rpx;
  376. }
  377. .group_11 {
  378. margin-top: 40rpx;
  379. }
  380. .group_15 {
  381. padding: 0 32rpx;
  382. color: rgb(51, 51, 51);
  383. font-size: 32rpx;
  384. font-weight: 700;
  385. line-height: 44rpx;
  386. white-space: nowrap;
  387. }
  388. .equal-division_1 {
  389. margin-top: 40rpx;
  390. padding: 0 32rpx;
  391. color: rgb(51, 51, 51);
  392. font-size: 28rpx;
  393. font-weight: 500;
  394. line-height: 40rpx;
  395. white-space: nowrap;
  396. }
  397. .image-wrapper {
  398. padding-top: 72rpx;
  399. width: 112rpx;
  400. position: relative;
  401. .avatar{
  402. position: absolute;
  403. top: 0;
  404. left: 0;
  405. width: 100%;
  406. height: 100%;
  407. border-radius: 50%;
  408. }
  409. }
  410. .badge {
  411. background-color: rgb(234, 43, 43);
  412. border-radius: 17rpx;
  413. min-width: 34rpx;
  414. position: absolute;
  415. // right: 284rpx;
  416. left: 78rpx;
  417. top: 0;
  418. }
  419. .text_4 {
  420. color: rgb(51, 51, 51);
  421. font-size: 32rpx;
  422. font-weight: 700;
  423. line-height: 44rpx;
  424. white-space: nowrap;
  425. }
  426. .equal-division-item_1 {
  427. color: rgb(85, 85, 85);
  428. font-size: 28rpx;
  429. font-weight: 500;
  430. line-height: 40rpx;
  431. white-space: nowrap;
  432. }
  433. .equal-division-item_2 {
  434. padding-top: 2rpx;
  435. color: rgb(85, 85, 85);
  436. font-size: 28rpx;
  437. font-weight: 500;
  438. line-height: 40rpx;
  439. white-space: nowrap;
  440. }
  441. .group_10 {
  442. white-space: nowrap;
  443. height: 44rpx;
  444. }
  445. .grid-item {
  446. padding: 22rpx 0 30rpx;
  447. color: rgb(231, 162, 63);
  448. font-size: 28rpx;
  449. font-weight: 500;
  450. line-height: 40rpx;
  451. white-space: nowrap;
  452. border-radius: 10rpx;
  453. border: solid 2rpx rgb(231, 162, 63);
  454. }
  455. .grid-item-active{
  456. color: rgb(231, 162, 63) !important;
  457. border: solid 2rpx rgb(231, 162, 63) !important;
  458. }
  459. .grid-item_1 {
  460. padding: 22rpx 0 30rpx;
  461. color: rgb(51, 51, 51);
  462. font-size: 28rpx;
  463. font-weight: 500;
  464. line-height: 40rpx;
  465. white-space: nowrap;
  466. border-radius: 10rpx;
  467. border: solid 2rpx rgb(195, 195, 195);
  468. }
  469. .group_12 {
  470. padding-bottom: 20rpx;
  471. }
  472. .button {
  473. padding: 26rpx 0;
  474. color: rgb(255, 255, 255);
  475. font-size: 32rpx;
  476. font-weight: 600;
  477. line-height: 44rpx;
  478. white-space: nowrap;
  479. background-color: rgb(231, 162, 63);
  480. border-radius: 10rpx;
  481. }
  482. .equal-division-item_3 {
  483. // flex: 1 1 244rpx;
  484. align-items: flex-start;
  485. margin-right: 42rpx;
  486. &:nth-child(3n){
  487. margin-right: 0rpx;
  488. }
  489. }
  490. .equal-division-item_4 {
  491. flex: 1 1 244rpx;
  492. }
  493. .equal-division-item_5 {
  494. flex: 1 1 244rpx;
  495. }
  496. .image_7 {
  497. margin-right: 12rpx;
  498. border-radius: 50%;
  499. width: 40rpx;
  500. height: 40rpx;
  501. position: relative;
  502. z-index: 99;
  503. }
  504. .text_11 {
  505. margin-top: 12rpx;
  506. }
  507. .text_14 {
  508. color: rgb(51, 51, 51);
  509. font-size: 32rpx;
  510. font-weight: 700;
  511. line-height: 44rpx;
  512. }
  513. .text_15 {
  514. color: rgb(119, 119, 119);
  515. font-size: 24rpx;
  516. font-weight: 500;
  517. line-height: 34rpx;
  518. }
  519. .text_17 {
  520. margin-top: 14rpx;
  521. }
  522. .text_24 {
  523. color: rgb(119, 119, 119);
  524. font-size: 28rpx;
  525. line-height: 40rpx;
  526. white-space: nowrap;
  527. }
  528. .text_27 {
  529. margin-top: 10rpx;
  530. }
  531. .text_28 {
  532. margin-top: 10rpx;
  533. }
  534. .text_29 {
  535. margin-top: 10rpx;
  536. }
  537. .badge_1 {
  538. background-color: rgb(234, 43, 43);
  539. border-radius: 13rpx;
  540. min-width: 26rpx;
  541. position: absolute;
  542. right: 6rpx;
  543. top: 0;
  544. }
  545. .badge_2 {
  546. background-color: rgb(234, 43, 43);
  547. border-radius: 13rpx;
  548. width: 26rpx;
  549. position: absolute;
  550. right: 0;
  551. top: 0;
  552. }
  553. .section_7 {
  554. border-radius: 50%;
  555. width: 40rpx;
  556. height: 40rpx;
  557. border: solid 2rpx rgb(195, 195, 195);
  558. }
  559. .group_14 {
  560. margin-left: 14rpx;
  561. white-space: nowrap;
  562. height: 40rpx;
  563. }
  564. .text_22 {
  565. color: rgb(119, 119, 119);
  566. font-size: 28rpx;
  567. line-height: 40rpx;
  568. }
  569. .text_23 {
  570. color: rgb(209, 161, 28);
  571. font-size: 28rpx;
  572. line-height: 40rpx;
  573. }
  574. .user-name{
  575. max-width: 360rpx;
  576. white-space:nowrap;
  577. overflow:hidden;
  578. text-overflow:ellipsis;
  579. }
  580. /deep/checkbox .wx-checkbox-input {
  581. border-radius: 50% !important;
  582. }
  583. </style>