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

749 lines
18 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
3 years ago
3 years ago
3 years ago
3 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. <view class="tips_panel" v-if="tips.length > 0">
  79. <u-notice-bar :text="tips" direction="column" speed="250" @click="tipsDetail"></u-notice-bar>
  80. </view>
  81. <!-- 快速评级 -->
  82. <view class="section_4 flex-col">
  83. <view class="justify-between group_9">
  84. <view class="group_10">
  85. <text class="text_14">开始评级</text>
  86. </view>
  87. <view class="right-group flex-row" @click="$url('/packages/article/article?type=service_standard')">
  88. <text>服务及收费标准</text>
  89. <image src="@/static/icon/rightArrow.png" class="image_8" />
  90. </view>
  91. </view>
  92. <view class="grid">
  93. <view class="flex-col items-center grid-item_1" @click="rateIndex = 0" :class="{'grid-item-active': rateIndex == 0}">
  94. <view class="qxk-title">
  95. <text class="qxk-iconfont qxk-icon-mulu lf-font-40"></text>
  96. <text class="text_17">全面评级</text>
  97. </view>
  98. <text class="qxk-subtitle">针对卡片品相及签字品相进行评级鉴定</text>
  99. </view>
  100. <view class="flex-col items-center grid-item_1" @click="rateIndex = 1" :class="{'grid-item-active': rateIndex == 1}">
  101. <view class="qxk-title">
  102. <text class="qxk-iconfont qxk-icon-xinwen-moren lf-font-40"></text>
  103. <text class="text_9">卡品评级</text>
  104. </view>
  105. <text class="qxk-subtitle">仅针对卡片品相评级鉴定带签字卡片也可选择此项</text>
  106. </view>
  107. <view class="grid-item_2 flex-col items-center" @click="rateIndex = 2" :class="{'grid-item-active': rateIndex == 2}">
  108. <view class="qxk-title">
  109. <text class="qxk-iconfont qxk-icon-tuwenguanli lf-font-40"></text>
  110. <text class="text_19">签名评级</text>
  111. </view>
  112. <text class="qxk-subtitle">仅针对卡片签字评级鉴定</text>
  113. </view>
  114. <view class="grid-item_2 flex-col items-center" @click="rateIndex = 3" :class="{'grid-item-active': rateIndex == 3}">
  115. <view class="qxk-title">
  116. <text class="qxk-iconfont qxk-icon-kefujiqirenbeifen lf-font-40"></text>
  117. <text class="text_19">套壳服务</text>
  118. </view>
  119. <text class="qxk-subtitle">仅针对卡片进行鉴定真伪并套壳封固不评级卡片品相</text>
  120. </view>
  121. </view>
  122. <view class="flex-col group_11">
  123. <view class="justify-between group_12">
  124. <view class="flex-row">
  125. <checkbox-group @change="onAgreementCheck()">
  126. <checkbox color="#e6a33c" :checked="isConsentAgreement"></checkbox>
  127. </checkbox-group>
  128. <view class="group_14">
  129. <text class="text_22">阅读并同意</text>
  130. <text class="text_23" @click="$url('/packages/article/article?type=grade_agreement')">服务协议</text>
  131. </view>
  132. </view>
  133. <!-- <text class="text_24">45/</text> -->
  134. </view>
  135. <view class="flex-col items-center button" @click="nextToGrading">
  136. <text>下一步</text>
  137. </view>
  138. </view>
  139. </view>
  140. <!-- 已评卡 -->
  141. <view class="flex-col section_8" v-if="$isRight(evaluated_order)">
  142. <view class="justify-between group_15" @click="nextToSuOrderList">
  143. <text>已评卡</text>
  144. <image
  145. src="@/static/icon/rightArrow.png"
  146. class="image_8" />
  147. </view>
  148. <view class="flex-row equal-division_1">
  149. <view class="flex-col items-center equal-division-item_3" @click="toSubOrder(item.id)" v-for="(item, index) in evaluated_order" :key="index">
  150. <image :src="item.itemImage" class="image_23" mode="aspectFill" />
  151. <text class="text_27">{{ item.title }}</text>
  152. </view>
  153. </view>
  154. </view>
  155. <!-- 评级标准 -->
  156. <view class="justify-between section_9" @click="$url('/pages/ratingCriteria/ratingCriteria')">
  157. <text>评级标准</text>
  158. <image
  159. src="@/static/icon/rightArrow.png"
  160. class="image_8" />
  161. </view>
  162. </view>
  163. </view>
  164. </view>
  165. </view>
  166. </template>
  167. <script>
  168. import lfHeader from '@/components/lf-header.vue';
  169. import { my ,sysInfo } from '@/service/index.js';
  170. import { ratingSearch } from '@/service/grading.js';
  171. export default {
  172. components: {
  173. lfHeader
  174. },
  175. data() {
  176. return {
  177. isConsentAgreement: false,
  178. rateIndex: 0,
  179. user: {},
  180. dots: {},
  181. evaluated_order: [],
  182. showCount: 0,
  183. tipsDatas:[],
  184. tips:[],
  185. };
  186. },
  187. onShow(){
  188. this.showCount++;
  189. if(this.showCount > 1){
  190. this.getUserCenterDetail();
  191. }
  192. },
  193. async onLoad(query){
  194. //如果看过协议,默认协议勾选住
  195. if(uni.getStorageSync('AgreementChecked')){
  196. this.isConsentAgreement = true
  197. }
  198. this.getSysInfo();
  199. if(query && query.q){
  200. const q = decodeURIComponent(query.q);
  201. console.log("query",q);
  202. let sid = q.split('s=')[1];
  203. console.log("sid",sid)
  204. if(sid){
  205. let res = await ratingSearch(sid);
  206. let datas = res.data.datas;
  207. if(this.$isRight(datas.sub_order)){ // 查询到订单,默认取第一条
  208. let base_data = encodeURIComponent(JSON.stringify(datas));
  209. this.$url('/packages/ratingQueryDetail/ratingQueryDetail?data='+ base_data);
  210. }else{
  211. uni.showModal({
  212. title: '提示',
  213. content: '该评级编号暂无订单,换个编号试试?',
  214. showCancel: false
  215. })
  216. }
  217. }
  218. }else{
  219. this.getUserCenterDetail();
  220. }
  221. },
  222. methods: {
  223. onAgreementCheck(e){
  224. this.isConsentAgreement = !this.isConsentAgreement
  225. },
  226. tipsDetail(index){
  227. console.log("tipsDetail",index)
  228. console.log("tipsDetail id",this.tipsDatas[index].id)
  229. if(this.tipsDatas[index].jump){
  230. uni.navigateTo({
  231. url:'/packages/article/article?type=tips&id='+this.tipsDatas[index].id
  232. })
  233. }
  234. },
  235. async getSysInfo(){
  236. let res = await sysInfo();
  237. //console.log("getSysInfo res",res)
  238. let sysInfoDatas = res.data.datas;
  239. uni.setStorageSync('qxk_sysinfo',sysInfoDatas);
  240. let datas = res.data.datas.tips;
  241. this.tipsDatas = datas;
  242. this.tips = datas.map((item)=>{
  243. return item.title
  244. })
  245. },
  246. async toSubOrder(value){
  247. let res = await ratingSearch(value);
  248. let datas = res.data.datas;
  249. let base_data = encodeURIComponent(JSON.stringify(datas));
  250. this.$url('/packages/ratingQueryDetail/ratingQueryDetail?data='+ base_data);
  251. },
  252. async getUserCenterDetail(){
  253. let res = await my();
  254. if(this.$isRight(res)){
  255. uni.setStorageSync('userInfo', res.data.datas.user);
  256. this.user = res.data.datas.user;
  257. this.dots = res.data.datas.dots;
  258. let evaluated_order = res.data.datas.evaluated_order;
  259. evaluated_order.forEach(item => item.itemImage = String(item.itemImage).split(',')[0]);
  260. this.evaluated_order = evaluated_order;
  261. }
  262. },
  263. nextToGrading(){
  264. if(!this.isConsentAgreement) return this.$msg('请先阅读并同意协议');
  265. let rateIndex = this.rateIndex;
  266. if(this.$isRight(this.user)){
  267. this.$url('/pages/write/baseInfo?rate_index='+ rateIndex);
  268. }else{
  269. this.$url('/pages/login/login');
  270. }
  271. },
  272. nextToOrder(current){
  273. if(this.$isRight(this.user)){
  274. let url = '/pages/order/order';
  275. if(this.$valueType(current) === 'number'){
  276. url += '?current='+ current;
  277. }
  278. this.$url(url);
  279. }else{
  280. this.$url('/pages/login/login');
  281. }
  282. },
  283. nextToSuOrderList(){
  284. this.$url('/packages/subOrderList/subOrderList')
  285. },
  286. nextToSettings(){
  287. if(this.$isRight(this.user)){
  288. this.$url('/pages/settings/settings');
  289. }else{
  290. // this.$url('/pages/login/login', {type: 'redirect'})
  291. this.$url('/pages/login/login');
  292. }
  293. }
  294. }
  295. };
  296. </script>
  297. <style scoped lang="scss">
  298. .tips_panel{
  299. background-color: white;
  300. }
  301. .header-nav{
  302. text-align: center;
  303. position: relative;
  304. width: 720rpx;
  305. display: flex;
  306. justify-content: center;
  307. .searchIcon{
  308. position: absolute;
  309. left: 10rpx;
  310. top: 5rpx;
  311. width: 40rpx;
  312. height: 40rpx;
  313. z-index: 999999;
  314. }
  315. }
  316. .bottom-group {
  317. position: relative;
  318. }
  319. .section_4 {
  320. border-top:solid 1px #F1F1F1;
  321. padding: 40rpx 32rpx;
  322. background-color: rgb(255, 255, 255);
  323. }
  324. .image_8 {
  325. width: 44rpx;
  326. height: 44rpx;
  327. }
  328. .equal-division-item {
  329. width: 84rpx;
  330. }
  331. .grid-item_2 {
  332. color: rgb(51, 51, 51);
  333. font-size: 28rpx;
  334. font-weight: 500;
  335. line-height: 40rpx;
  336. white-space: nowrap;
  337. padding: 28rpx 0 24rpx;
  338. border-radius: 10rpx;
  339. border: solid 2rpx rgb(195, 195, 195);
  340. }
  341. .top-group {
  342. color: rgb(255, 255, 255);
  343. font-size: 24rpx;
  344. font-weight: 500;
  345. line-height: 26rpx;
  346. white-space: nowrap;
  347. padding-top: 2rpx;
  348. position: relative;
  349. }
  350. .image_11 {
  351. width: 60rpx;
  352. height: 60rpx;
  353. }
  354. .image_17 {
  355. width: 50rpx;
  356. height: 50rpx;
  357. }
  358. .image_23 {
  359. border-radius: 10rpx;
  360. width: 200rpx;
  361. height: 240rpx;
  362. }
  363. .right-group {
  364. color: rgb(153, 153, 153);
  365. font-size: 28rpx;
  366. font-weight: 500;
  367. line-height: 40rpx;
  368. white-space: nowrap;
  369. }
  370. .text_7 {
  371. margin-top: 12rpx;
  372. color: rgb(85, 85, 85);
  373. font-size: 28rpx;
  374. font-weight: 500;
  375. line-height: 40rpx;
  376. white-space: nowrap;
  377. }
  378. .text_9 {
  379. margin-top: 14rpx;
  380. }
  381. .text_19 {
  382. margin-top: 14rpx;
  383. }
  384. .page {
  385. background-color: #f6f6f6;
  386. width: 100%;
  387. overflow-y: auto;
  388. height: 100%;
  389. }
  390. .group_3 {
  391. padding-bottom: 2024rpx;
  392. flex: 1 1 auto;
  393. overflow-y: auto;
  394. position: relative;
  395. }
  396. .image_6 {
  397. width: 100vw;
  398. height: 1vw;
  399. }
  400. .section_2 {
  401. padding-bottom: 14rpx;
  402. background-color: rgb(246, 246, 246);
  403. top: 0;
  404. right: 0;
  405. bottom: 0;
  406. left: 0;
  407. position: absolute;
  408. }
  409. .section_3 {
  410. padding: 40rpx 0 38rpx;
  411. background-color: rgb(255, 255, 255);
  412. }
  413. .section_8 {
  414. margin-top: 30rpx;
  415. padding: 40rpx 0;
  416. background-color: rgb(255, 255, 255);
  417. }
  418. .section_9 {
  419. margin-top: 30rpx;
  420. padding: 40rpx 32rpx 30rpx;
  421. color: rgb(51, 51, 51);
  422. font-size: 32rpx;
  423. font-weight: 700;
  424. line-height: 44rpx;
  425. white-space: nowrap;
  426. background-color: rgb(255, 255, 255);
  427. }
  428. .view_3 {
  429. color: rgb(255, 255, 255);
  430. font-size: 24rpx;
  431. font-weight: 500;
  432. line-height: 34rpx;
  433. white-space: nowrap;
  434. }
  435. .group_5 {
  436. margin-top: 20rpx;
  437. color: rgb(51, 51, 51);
  438. font-size: 34rpx;
  439. font-weight: 600;
  440. line-height: 48rpx;
  441. white-space: nowrap;
  442. }
  443. .equal-division {
  444. margin: 36rpx 28rpx 0;
  445. }
  446. .group_9 {
  447. padding-left: 2rpx;
  448. }
  449. .qxk-title{
  450. font-size:38rpx;
  451. margin-top:10px;
  452. }
  453. .qxk-title .qxk-iconfont{margin-right:10px;}
  454. .qxk-subtitle{
  455. margin-top:10px;
  456. white-space:normal;
  457. width:128px;
  458. }
  459. .grid {
  460. margin-top: 40rpx;
  461. height: 520rpx;
  462. display: grid;
  463. grid-template-columns: repeat(2, 1fr);
  464. grid-row-gap: 22rpx;
  465. grid-column-gap: 24rpx;
  466. }
  467. .group_11 {
  468. margin-top: 40rpx;
  469. }
  470. .group_15 {
  471. padding: 0 32rpx;
  472. color: rgb(51, 51, 51);
  473. font-size: 32rpx;
  474. font-weight: 700;
  475. line-height: 44rpx;
  476. white-space: nowrap;
  477. }
  478. .equal-division_1 {
  479. margin-top: 40rpx;
  480. padding: 0 32rpx;
  481. color: rgb(51, 51, 51);
  482. font-size: 28rpx;
  483. font-weight: 500;
  484. line-height: 40rpx;
  485. white-space: nowrap;
  486. }
  487. .image-wrapper {
  488. padding-top: 72rpx;
  489. width: 112rpx;
  490. position: relative;
  491. .avatar{
  492. position: absolute;
  493. top: 0;
  494. left: 0;
  495. width: 100%;
  496. height: 100%;
  497. border-radius: 50%;
  498. }
  499. }
  500. .badge {
  501. background-color: rgb(234, 43, 43);
  502. border-radius: 17rpx;
  503. min-width: 34rpx;
  504. position: absolute;
  505. // right: 284rpx;
  506. left: 78rpx;
  507. top: 0;
  508. }
  509. .text_4 {
  510. color: rgb(51, 51, 51);
  511. font-size: 32rpx;
  512. font-weight: 700;
  513. line-height: 44rpx;
  514. white-space: nowrap;
  515. }
  516. .equal-division-item_1 {
  517. color: rgb(85, 85, 85);
  518. font-size: 28rpx;
  519. font-weight: 500;
  520. line-height: 40rpx;
  521. white-space: nowrap;
  522. }
  523. .equal-division-item_2 {
  524. padding-top: 2rpx;
  525. color: rgb(85, 85, 85);
  526. font-size: 28rpx;
  527. font-weight: 500;
  528. line-height: 40rpx;
  529. white-space: nowrap;
  530. }
  531. .group_10 {
  532. white-space: nowrap;
  533. height: 44rpx;
  534. }
  535. .grid-item {
  536. padding: 22rpx 0 30rpx;
  537. color: rgb(231, 162, 63);
  538. font-size: 28rpx;
  539. font-weight: 500;
  540. line-height: 40rpx;
  541. white-space: nowrap;
  542. border-radius: 10rpx;
  543. border: solid 2rpx rgb(231, 162, 63);
  544. }
  545. .grid-item-active{
  546. color: rgb(231, 162, 63) !important;
  547. border: solid 2rpx rgb(231, 162, 63) !important;
  548. }
  549. .grid-item_1 {
  550. padding: 22rpx 0 30rpx;
  551. color: rgb(51, 51, 51);
  552. font-size: 28rpx;
  553. font-weight: 500;
  554. line-height: 40rpx;
  555. white-space: nowrap;
  556. border-radius: 10rpx;
  557. border: solid 2rpx rgb(195, 195, 195);
  558. }
  559. .group_12 {
  560. padding-bottom: 20rpx;
  561. }
  562. .button {
  563. padding: 26rpx 0;
  564. color: rgb(255, 255, 255);
  565. font-size: 32rpx;
  566. font-weight: 600;
  567. line-height: 44rpx;
  568. white-space: nowrap;
  569. background-color: rgb(231, 162, 63);
  570. border-radius: 10rpx;
  571. }
  572. .equal-division-item_3 {
  573. // flex: 1 1 244rpx;
  574. align-items: flex-start;
  575. margin-right: 42rpx;
  576. &:nth-child(3n){
  577. margin-right: 0rpx;
  578. }
  579. }
  580. .equal-division-item_4 {
  581. flex: 1 1 244rpx;
  582. }
  583. .equal-division-item_5 {
  584. flex: 1 1 244rpx;
  585. }
  586. .image_7 {
  587. margin-right: 12rpx;
  588. border-radius: 50%;
  589. width: 40rpx;
  590. height: 40rpx;
  591. position: relative;
  592. z-index: 99;
  593. }
  594. .text_11 {
  595. margin-top: 12rpx;
  596. }
  597. .text_14 {
  598. color: rgb(51, 51, 51);
  599. font-size: 32rpx;
  600. font-weight: 700;
  601. line-height: 44rpx;
  602. }
  603. .text_15 {
  604. color: rgb(119, 119, 119);
  605. font-size: 24rpx;
  606. font-weight: 500;
  607. line-height: 34rpx;
  608. }
  609. .text_17 {
  610. margin-top: 14rpx;
  611. }
  612. .text_24 {
  613. color: rgb(119, 119, 119);
  614. font-size: 28rpx;
  615. line-height: 40rpx;
  616. white-space: nowrap;
  617. }
  618. .text_27 {
  619. margin-top: 10rpx;
  620. }
  621. .text_28 {
  622. margin-top: 10rpx;
  623. }
  624. .text_29 {
  625. margin-top: 10rpx;
  626. }
  627. .badge_1 {
  628. background-color: rgb(234, 43, 43);
  629. border-radius: 13rpx;
  630. min-width: 26rpx;
  631. position: absolute;
  632. right: 6rpx;
  633. top: 0;
  634. }
  635. .badge_2 {
  636. background-color: rgb(234, 43, 43);
  637. border-radius: 13rpx;
  638. width: 26rpx;
  639. position: absolute;
  640. right: 0;
  641. top: 0;
  642. }
  643. .section_7 {
  644. border-radius: 50%;
  645. width: 40rpx;
  646. height: 40rpx;
  647. border: solid 2rpx rgb(195, 195, 195);
  648. }
  649. .group_14 {
  650. margin-left: 14rpx;
  651. white-space: nowrap;
  652. height: 40rpx;
  653. }
  654. .text_22 {
  655. color: rgb(119, 119, 119);
  656. font-size: 28rpx;
  657. line-height: 40rpx;
  658. }
  659. .text_23 {
  660. color: rgb(209, 161, 28);
  661. font-size: 28rpx;
  662. line-height: 40rpx;
  663. }
  664. .user-name{
  665. max-width: 360rpx;
  666. white-space:nowrap;
  667. overflow:hidden;
  668. text-overflow:ellipsis;
  669. }
  670. /deep/checkbox .wx-checkbox-input {
  671. border-radius: 50% !important;
  672. }
  673. </style>