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

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