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

681 lines
16 KiB

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