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

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