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

729 lines
17 KiB

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