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

750 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
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
3 years ago
3 years ago
3 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. .qxk-title{
  447. margin-top:5px;
  448. font-size:36rpx;
  449. }
  450. .qxk-title .qxk-iconfont{
  451. margin-right:5px;
  452. font-size:30rpx !important;
  453. }
  454. .qxk-subtitle{
  455. margin-top:5px;
  456. white-space:normal;
  457. width:126px;
  458. opacity: 0.6;
  459. font-size:24rpx
  460. }
  461. .grid {
  462. margin-top: 40rpx;
  463. height: 420rpx;
  464. display: grid;
  465. grid-template-columns: repeat(2, 1fr);
  466. grid-row-gap: 20rpx;
  467. grid-column-gap: 20rpx;
  468. }
  469. .group_11 {
  470. margin-top: 40rpx;
  471. }
  472. .group_15 {
  473. padding: 0 32rpx;
  474. color: rgb(51, 51, 51);
  475. font-size: 32rpx;
  476. font-weight: 700;
  477. line-height: 44rpx;
  478. white-space: nowrap;
  479. }
  480. .equal-division_1 {
  481. margin-top: 40rpx;
  482. padding: 0 32rpx;
  483. color: rgb(51, 51, 51);
  484. font-size: 28rpx;
  485. font-weight: 500;
  486. line-height: 40rpx;
  487. white-space: nowrap;
  488. }
  489. .image-wrapper {
  490. padding-top: 72rpx;
  491. width: 112rpx;
  492. position: relative;
  493. .avatar{
  494. position: absolute;
  495. top: 0;
  496. left: 0;
  497. width: 100%;
  498. height: 100%;
  499. border-radius: 50%;
  500. }
  501. }
  502. .badge {
  503. background-color: rgb(234, 43, 43);
  504. border-radius: 17rpx;
  505. min-width: 34rpx;
  506. position: absolute;
  507. // right: 284rpx;
  508. left: 78rpx;
  509. top: 0;
  510. }
  511. .text_4 {
  512. color: rgb(51, 51, 51);
  513. font-size: 32rpx;
  514. font-weight: 700;
  515. line-height: 44rpx;
  516. white-space: nowrap;
  517. }
  518. .equal-division-item_1 {
  519. color: rgb(85, 85, 85);
  520. font-size: 28rpx;
  521. font-weight: 500;
  522. line-height: 40rpx;
  523. white-space: nowrap;
  524. }
  525. .equal-division-item_2 {
  526. padding-top: 2rpx;
  527. color: rgb(85, 85, 85);
  528. font-size: 28rpx;
  529. font-weight: 500;
  530. line-height: 40rpx;
  531. white-space: nowrap;
  532. }
  533. .group_10 {
  534. white-space: nowrap;
  535. height: 44rpx;
  536. }
  537. .grid-item {
  538. padding: 22rpx 0 30rpx;
  539. color: rgb(231, 162, 63);
  540. font-size: 28rpx;
  541. font-weight: 500;
  542. line-height: 40rpx;
  543. white-space: nowrap;
  544. border-radius: 10rpx;
  545. border: solid 2rpx rgb(231, 162, 63);
  546. }
  547. .grid-item-active{
  548. color: rgb(231, 162, 63) !important;
  549. border: solid 2rpx rgb(231, 162, 63) !important;
  550. }
  551. .grid-item_1 {
  552. padding: 22rpx 0 30rpx;
  553. color: rgb(51, 51, 51);
  554. font-size: 28rpx;
  555. font-weight: 500;
  556. line-height: 40rpx;
  557. white-space: nowrap;
  558. border-radius: 10rpx;
  559. border: solid 2rpx rgb(195, 195, 195);
  560. }
  561. .group_12 {
  562. padding-bottom: 20rpx;
  563. }
  564. .button {
  565. padding: 26rpx 0;
  566. color: rgb(255, 255, 255);
  567. font-size: 32rpx;
  568. font-weight: 600;
  569. line-height: 44rpx;
  570. white-space: nowrap;
  571. background-color: rgb(231, 162, 63);
  572. border-radius: 10rpx;
  573. }
  574. .equal-division-item_3 {
  575. // flex: 1 1 244rpx;
  576. align-items: flex-start;
  577. margin-right: 42rpx;
  578. &:nth-child(3n){
  579. margin-right: 0rpx;
  580. }
  581. }
  582. .equal-division-item_4 {
  583. flex: 1 1 244rpx;
  584. }
  585. .equal-division-item_5 {
  586. flex: 1 1 244rpx;
  587. }
  588. .image_7 {
  589. margin-right: 12rpx;
  590. border-radius: 50%;
  591. width: 40rpx;
  592. height: 40rpx;
  593. position: relative;
  594. z-index: 99;
  595. }
  596. .text_11 {
  597. margin-top: 12rpx;
  598. }
  599. .text_14 {
  600. color: rgb(51, 51, 51);
  601. font-size: 32rpx;
  602. font-weight: 700;
  603. line-height: 44rpx;
  604. }
  605. .text_15 {
  606. color: rgb(119, 119, 119);
  607. font-size: 24rpx;
  608. font-weight: 500;
  609. line-height: 34rpx;
  610. }
  611. .text_17 {
  612. margin-top: 14rpx;
  613. }
  614. .text_24 {
  615. color: rgb(119, 119, 119);
  616. font-size: 28rpx;
  617. line-height: 40rpx;
  618. white-space: nowrap;
  619. }
  620. .text_27 {
  621. margin-top: 10rpx;
  622. }
  623. .text_28 {
  624. margin-top: 10rpx;
  625. }
  626. .text_29 {
  627. margin-top: 10rpx;
  628. }
  629. .badge_1 {
  630. background-color: rgb(234, 43, 43);
  631. border-radius: 13rpx;
  632. min-width: 26rpx;
  633. position: absolute;
  634. right: 6rpx;
  635. top: 0;
  636. }
  637. .badge_2 {
  638. background-color: rgb(234, 43, 43);
  639. border-radius: 13rpx;
  640. width: 26rpx;
  641. position: absolute;
  642. right: 0;
  643. top: 0;
  644. }
  645. .section_7 {
  646. border-radius: 50%;
  647. width: 40rpx;
  648. height: 40rpx;
  649. border: solid 2rpx rgb(195, 195, 195);
  650. }
  651. .group_14 {
  652. margin-left: 14rpx;
  653. white-space: nowrap;
  654. height: 40rpx;
  655. }
  656. .text_22 {
  657. color: rgb(119, 119, 119);
  658. font-size: 28rpx;
  659. line-height: 40rpx;
  660. }
  661. .text_23 {
  662. color: rgb(209, 161, 28);
  663. font-size: 28rpx;
  664. line-height: 40rpx;
  665. }
  666. .user-name{
  667. max-width: 360rpx;
  668. white-space:nowrap;
  669. overflow:hidden;
  670. text-overflow:ellipsis;
  671. }
  672. /deep/checkbox .wx-checkbox-input {
  673. border-radius: 50% !important;
  674. }
  675. </style>