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

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