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

721 lines
17 KiB

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