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

723 lines
17 KiB

3 years ago
4 years ago
3 years ago
3 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="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. margin-top: 30rpx;
  281. background-color: white;
  282. }
  283. .header-nav{
  284. text-align: center;
  285. position: relative;
  286. width: 720rpx;
  287. display: flex;
  288. justify-content: center;
  289. .searchIcon{
  290. position: absolute;
  291. left: 0;
  292. top: 6rpx;
  293. width: 38rpx;
  294. height: 36rpx;
  295. z-index: 999999;
  296. }
  297. }
  298. .bottom-group {
  299. position: relative;
  300. }
  301. .section_4 {
  302. margin-top: 30rpx;
  303. padding: 40rpx 32rpx;
  304. background-color: rgb(255, 255, 255);
  305. }
  306. .image_8 {
  307. width: 44rpx;
  308. height: 44rpx;
  309. }
  310. .equal-division-item {
  311. width: 84rpx;
  312. }
  313. .grid-item_2 {
  314. color: rgb(51, 51, 51);
  315. font-size: 28rpx;
  316. font-weight: 500;
  317. line-height: 40rpx;
  318. white-space: nowrap;
  319. padding: 28rpx 0 24rpx;
  320. border-radius: 10rpx;
  321. border: solid 2rpx rgb(195, 195, 195);
  322. }
  323. .top-group {
  324. color: rgb(255, 255, 255);
  325. font-size: 24rpx;
  326. font-weight: 500;
  327. line-height: 26rpx;
  328. white-space: nowrap;
  329. padding-top: 2rpx;
  330. position: relative;
  331. }
  332. .image_11 {
  333. width: 60rpx;
  334. height: 60rpx;
  335. }
  336. .image_17 {
  337. width: 50rpx;
  338. height: 50rpx;
  339. }
  340. .image_23 {
  341. border-radius: 10rpx;
  342. width: 200rpx;
  343. height: 240rpx;
  344. }
  345. .right-group {
  346. color: rgb(153, 153, 153);
  347. font-size: 28rpx;
  348. font-weight: 500;
  349. line-height: 40rpx;
  350. white-space: nowrap;
  351. }
  352. .text_7 {
  353. margin-top: 12rpx;
  354. color: rgb(85, 85, 85);
  355. font-size: 28rpx;
  356. font-weight: 500;
  357. line-height: 40rpx;
  358. white-space: nowrap;
  359. }
  360. .text_9 {
  361. margin-top: 14rpx;
  362. }
  363. .text_19 {
  364. margin-top: 14rpx;
  365. }
  366. .page {
  367. background-color: #f6f6f6;
  368. width: 100%;
  369. overflow-y: auto;
  370. height: 100%;
  371. }
  372. .group_3 {
  373. padding-bottom: 2024rpx;
  374. flex: 1 1 auto;
  375. overflow-y: auto;
  376. position: relative;
  377. }
  378. .image_6 {
  379. width: 100vw;
  380. height: 1vw;
  381. }
  382. .section_2 {
  383. padding-bottom: 14rpx;
  384. background-color: rgb(246, 246, 246);
  385. top: 0;
  386. right: 0;
  387. bottom: 0;
  388. left: 0;
  389. position: absolute;
  390. }
  391. .section_3 {
  392. padding: 40rpx 0 38rpx;
  393. background-color: rgb(255, 255, 255);
  394. }
  395. .section_8 {
  396. margin-top: 30rpx;
  397. padding: 40rpx 0;
  398. background-color: rgb(255, 255, 255);
  399. }
  400. .section_9 {
  401. margin-top: 30rpx;
  402. padding: 40rpx 32rpx 30rpx;
  403. color: rgb(51, 51, 51);
  404. font-size: 32rpx;
  405. font-weight: 700;
  406. line-height: 44rpx;
  407. white-space: nowrap;
  408. background-color: rgb(255, 255, 255);
  409. }
  410. .view_3 {
  411. color: rgb(255, 255, 255);
  412. font-size: 24rpx;
  413. font-weight: 500;
  414. line-height: 34rpx;
  415. white-space: nowrap;
  416. }
  417. .group_5 {
  418. margin-top: 20rpx;
  419. color: rgb(51, 51, 51);
  420. font-size: 34rpx;
  421. font-weight: 600;
  422. line-height: 48rpx;
  423. white-space: nowrap;
  424. }
  425. .equal-division {
  426. margin: 36rpx 28rpx 0;
  427. }
  428. .group_9 {
  429. padding-left: 2rpx;
  430. }
  431. .grid {
  432. margin-top: 40rpx;
  433. height: 340rpx;
  434. display: grid;
  435. grid-template-columns: repeat(2, 1fr);
  436. grid-row-gap: 22rpx;
  437. grid-column-gap: 24rpx;
  438. }
  439. .group_11 {
  440. margin-top: 40rpx;
  441. }
  442. .group_15 {
  443. padding: 0 32rpx;
  444. color: rgb(51, 51, 51);
  445. font-size: 32rpx;
  446. font-weight: 700;
  447. line-height: 44rpx;
  448. white-space: nowrap;
  449. }
  450. .equal-division_1 {
  451. margin-top: 40rpx;
  452. padding: 0 32rpx;
  453. color: rgb(51, 51, 51);
  454. font-size: 28rpx;
  455. font-weight: 500;
  456. line-height: 40rpx;
  457. white-space: nowrap;
  458. }
  459. .image-wrapper {
  460. padding-top: 72rpx;
  461. width: 112rpx;
  462. position: relative;
  463. .avatar{
  464. position: absolute;
  465. top: 0;
  466. left: 0;
  467. width: 100%;
  468. height: 100%;
  469. border-radius: 50%;
  470. }
  471. }
  472. .badge {
  473. background-color: rgb(234, 43, 43);
  474. border-radius: 17rpx;
  475. min-width: 34rpx;
  476. position: absolute;
  477. // right: 284rpx;
  478. left: 78rpx;
  479. top: 0;
  480. }
  481. .text_4 {
  482. color: rgb(51, 51, 51);
  483. font-size: 32rpx;
  484. font-weight: 700;
  485. line-height: 44rpx;
  486. white-space: nowrap;
  487. }
  488. .equal-division-item_1 {
  489. color: rgb(85, 85, 85);
  490. font-size: 28rpx;
  491. font-weight: 500;
  492. line-height: 40rpx;
  493. white-space: nowrap;
  494. }
  495. .equal-division-item_2 {
  496. padding-top: 2rpx;
  497. color: rgb(85, 85, 85);
  498. font-size: 28rpx;
  499. font-weight: 500;
  500. line-height: 40rpx;
  501. white-space: nowrap;
  502. }
  503. .group_10 {
  504. white-space: nowrap;
  505. height: 44rpx;
  506. }
  507. .grid-item {
  508. padding: 22rpx 0 30rpx;
  509. color: rgb(231, 162, 63);
  510. font-size: 28rpx;
  511. font-weight: 500;
  512. line-height: 40rpx;
  513. white-space: nowrap;
  514. border-radius: 10rpx;
  515. border: solid 2rpx rgb(231, 162, 63);
  516. }
  517. .grid-item-active{
  518. color: rgb(231, 162, 63) !important;
  519. border: solid 2rpx rgb(231, 162, 63) !important;
  520. }
  521. .grid-item_1 {
  522. padding: 22rpx 0 30rpx;
  523. color: rgb(51, 51, 51);
  524. font-size: 28rpx;
  525. font-weight: 500;
  526. line-height: 40rpx;
  527. white-space: nowrap;
  528. border-radius: 10rpx;
  529. border: solid 2rpx rgb(195, 195, 195);
  530. }
  531. .group_12 {
  532. padding-bottom: 20rpx;
  533. }
  534. .button {
  535. padding: 26rpx 0;
  536. color: rgb(255, 255, 255);
  537. font-size: 32rpx;
  538. font-weight: 600;
  539. line-height: 44rpx;
  540. white-space: nowrap;
  541. background-color: rgb(231, 162, 63);
  542. border-radius: 10rpx;
  543. }
  544. .equal-division-item_3 {
  545. // flex: 1 1 244rpx;
  546. align-items: flex-start;
  547. margin-right: 42rpx;
  548. &:nth-child(3n){
  549. margin-right: 0rpx;
  550. }
  551. }
  552. .equal-division-item_4 {
  553. flex: 1 1 244rpx;
  554. }
  555. .equal-division-item_5 {
  556. flex: 1 1 244rpx;
  557. }
  558. .image_7 {
  559. margin-right: 12rpx;
  560. border-radius: 50%;
  561. width: 40rpx;
  562. height: 40rpx;
  563. position: relative;
  564. z-index: 99;
  565. }
  566. .text_11 {
  567. margin-top: 12rpx;
  568. }
  569. .text_14 {
  570. color: rgb(51, 51, 51);
  571. font-size: 32rpx;
  572. font-weight: 700;
  573. line-height: 44rpx;
  574. }
  575. .text_15 {
  576. color: rgb(119, 119, 119);
  577. font-size: 24rpx;
  578. font-weight: 500;
  579. line-height: 34rpx;
  580. }
  581. .text_17 {
  582. margin-top: 14rpx;
  583. }
  584. .text_24 {
  585. color: rgb(119, 119, 119);
  586. font-size: 28rpx;
  587. line-height: 40rpx;
  588. white-space: nowrap;
  589. }
  590. .text_27 {
  591. margin-top: 10rpx;
  592. }
  593. .text_28 {
  594. margin-top: 10rpx;
  595. }
  596. .text_29 {
  597. margin-top: 10rpx;
  598. }
  599. .badge_1 {
  600. background-color: rgb(234, 43, 43);
  601. border-radius: 13rpx;
  602. min-width: 26rpx;
  603. position: absolute;
  604. right: 6rpx;
  605. top: 0;
  606. }
  607. .badge_2 {
  608. background-color: rgb(234, 43, 43);
  609. border-radius: 13rpx;
  610. width: 26rpx;
  611. position: absolute;
  612. right: 0;
  613. top: 0;
  614. }
  615. .section_7 {
  616. border-radius: 50%;
  617. width: 40rpx;
  618. height: 40rpx;
  619. border: solid 2rpx rgb(195, 195, 195);
  620. }
  621. .group_14 {
  622. margin-left: 14rpx;
  623. white-space: nowrap;
  624. height: 40rpx;
  625. }
  626. .text_22 {
  627. color: rgb(119, 119, 119);
  628. font-size: 28rpx;
  629. line-height: 40rpx;
  630. }
  631. .text_23 {
  632. color: rgb(209, 161, 28);
  633. font-size: 28rpx;
  634. line-height: 40rpx;
  635. }
  636. .user-name{
  637. max-width: 360rpx;
  638. white-space:nowrap;
  639. overflow:hidden;
  640. text-overflow:ellipsis;
  641. }
  642. /deep/checkbox .wx-checkbox-input {
  643. border-radius: 50% !important;
  644. }
  645. </style>