|
|
<template> <view class="flex-col page"> <lf-header :spreadOut="true" :diy="true" :boderBottom="true" bgColor="#ffffff"> <view class="header-nav"> <image class="searchIcon" src="@/static/icon/search.png" @click="$url('/pages/ratingQuery/ratingQuery')"></image> <text class="title">评级中心</text> </view> </lf-header> <view class="flex-col items-center group_3"> <image src="@/static/icon/line.png" class="image_6" /> <view class="flex-col section_2"> <view class="flex-col"> <!-- 用户信息 --> <view class="flex-col section_3" @click="nextToSettings"> <view class="bottom-group flex-col items-center view_3"> <view class="flex-col items-end image-wrapper"> <image class="avatar" :src="user.avatar" mode="aspectFill" v-if="user.avatar"></image> <image class="avatar" src="@/static/mrtx.png" mode="aspectFill" v-else></image> <image src="@/static/icon/level.png" class="image_7" /> <view class="flex-col items-center badge" v-if="$isRight(dots.system)"> <text>{{ dots.system > 99 ? '99+' : dots.system }}</text> </view> </view> </view> <view class="justify-center group_5"> <view class="user-name">{{ user.nick_name || '您未登录,点击登录' }}</view> <image src="@/static/icon/rightArrow.png" class="image_8" /> </view> </view> <!-- 我的订单 --> <view class="section_4 flex-col"> <view class="justify-between"> <text class="text_4">我的订单</text> <view class="right-group flex-row" @click="nextToOrder"> <text>全部</text> <image src="@/static/icon/rightArrow.png" class="image_8" /> </view> </view> <view class="justify-between equal-division" > <view class="equal-division-item flex-col" @click="nextToOrder(1)"> <view class="top-group flex-col items-center"> <image src="@/static/icon/order1.png" class="image_11" /> <view class="flex-col items-center badge_1" v-if="$isRight(dots.unconfirmed)"> <text>{{ dots.unconfirmed }}</text> </view> </view> <text class="text_7">待确认</text> </view> <view class="flex-col items-center equal-division-item_1" @click="nextToOrder(2)"> <view class="top-group flex-col items-center"> <image src="@/static/icon/order2.png" class="image_11" /> <view class="flex-col items-center badge_2" v-if="$isRight(dots.rating)"> <text>{{ dots.rating }}</text> </view> </view> <text class="text_7">评级中</text> </view> <view class="flex-col items-center equal-division-item_2" @click="nextToOrder(3)"> <view class="top-group flex-col items-center"> <image src="@/static/icon/order3.png" class="image_11" /> <view class="flex-col items-center badge_2" v-if="$isRight(dots.paying)"> <text>{{ dots.paying }}</text> </view> </view> <text class="text_11">待付款</text> </view> <view class="equal-division-item flex-col" @click="nextToOrder(4)"> <view class="top-group flex-col items-center"> <image src="@/static/icon/order4.png" class="image_11" /> <view class="flex-col items-center badge_2" v-if="$isRight(dots.shipping)"> <text>{{ dots.shipping }}</text> </view> </view> <text class="text_7">待收货</text> </view> </view> </view> <view class="tips_panel" v-if="tips.length > 0"> <u-notice-bar :text="tips" direction="column" speed="250" @click="tipsDetail"></u-notice-bar> </view> <!-- 快速评级 --> <view class="section_4 flex-col"> <view class="justify-between group_9"> <view class="group_10"> <text class="text_14">开始评级</text> </view> <view class="right-group flex-row" @click="$url('/packages/article/article?type=service_standard')"> <text>服务及收费标准</text> <image src="@/static/icon/rightArrow.png" class="image_8" /> </view> </view> <view class="grid"> <view class="flex-col items-center grid-item_1" @click="rateIndex = 0" :class="{'grid-item-active': rateIndex == 0}"> <view class="qxk-title"> <text class="qxk-iconfont qxk-icon-mulu lf-font-40"></text> <text class="text_17">全面评级</text> </view> <text class="qxk-subtitle">针对卡片品相及签字品相进行评级鉴定</text> </view> <view class="flex-col items-center grid-item_1" @click="rateIndex = 1" :class="{'grid-item-active': rateIndex == 1}"> <view class="qxk-title"> <text class="qxk-iconfont qxk-icon-xinwen-moren lf-font-40"></text> <text class="text_9">卡品评级</text> </view> <text class="qxk-subtitle">仅针对卡片品相评级鉴定(带签字卡片也可选择此项)</text> </view> <view class="grid-item_2 flex-col items-center" @click="rateIndex = 2" :class="{'grid-item-active': rateIndex == 2}"> <view class="qxk-title"> <text class="qxk-iconfont qxk-icon-tuwenguanli lf-font-40"></text> <text class="text_19">签名评级</text> </view> <text class="qxk-subtitle">仅针对卡片签字评级鉴定</text> </view> <view class="grid-item_2 flex-col items-center" @click="rateIndex = 3" :class="{'grid-item-active': rateIndex == 3}"> <view class="qxk-title"> <text class="qxk-iconfont qxk-icon-kefujiqirenbeifen lf-font-40"></text> <text class="text_19">套壳服务</text> </view> <text class="qxk-subtitle">仅针对卡片进行鉴定真伪并套壳封固,不评级卡片品相</text> </view> </view> <view class="flex-col group_11"> <view class="justify-between group_12"> <view class="flex-row"> <checkbox-group @change="onAgreementCheck()"> <checkbox color="#e6a33c" :checked="isConsentAgreement"></checkbox> </checkbox-group> <view class="group_14"> <text class="text_22">阅读并同意</text> <text class="text_23" @click="$url('/packages/article/article?type=grade_agreement')">《服务协议》</text> </view> </view> <!-- <text class="text_24">45元/张</text> --> </view> <view class="flex-col items-center button" @click="nextToGrading"> <text>下一步</text> </view> </view> </view> <!-- 已评卡 --> <view class="flex-col section_8" v-if="$isRight(evaluated_order)"> <view class="justify-between group_15" @click="nextToSuOrderList"> <text>已评卡</text> <image src="@/static/icon/rightArrow.png" class="image_8" /> </view> <view class="flex-row equal-division_1"> <view class="flex-col items-center equal-division-item_3" @click="toSubOrder(item.id)" v-for="(item, index) in evaluated_order" :key="index"> <image :src="item.itemImage" class="image_23" mode="aspectFill" /> <text class="text_27">{{ item.title }}</text> </view> </view> </view> <!-- 评级标准 --> <view class="justify-between section_9" @click="$url('/pages/ratingCriteria/ratingCriteria')"> <text>评级标准</text> <image src="@/static/icon/rightArrow.png" class="image_8" /> </view> </view> </view> </view> </view></template>
<script> import lfHeader from '@/components/lf-header.vue'; import { my ,sysInfo } from '@/service/index.js'; import { ratingSearch } from '@/service/grading.js'; export default { components: { lfHeader }, data() { return { isConsentAgreement: false, rateIndex: 0, user: {}, dots: {}, evaluated_order: [], showCount: 0, tipsDatas:[], tips:[], }; }, onShow(){ this.showCount++; if(this.showCount > 1){ this.getUserCenterDetail(); } }, async onLoad(query){ //如果看过协议,默认协议勾选住
if(uni.getStorageSync('AgreementChecked')){ this.isConsentAgreement = true } this.getSysInfo(); if(query && query.q){ const q = decodeURIComponent(query.q); console.log("query",q); let sid = q.split('s=')[1]; console.log("sid",sid) if(sid){ let res = await ratingSearch(sid); let datas = res.data.datas; if(this.$isRight(datas.sub_order)){ // 查询到订单,默认取第一条
let base_data = encodeURIComponent(JSON.stringify(datas)); this.$url('/packages/ratingQueryDetail/ratingQueryDetail?data='+ base_data); }else{ uni.showModal({ title: '提示', content: '该评级编号暂无订单,换个编号试试?', showCancel: false }) } } }else{ this.getUserCenterDetail(); } }, methods: { onAgreementCheck(e){ this.isConsentAgreement = !this.isConsentAgreement }, tipsDetail(index){ console.log("tipsDetail",index) console.log("tipsDetail id",this.tipsDatas[index].id) if(this.tipsDatas[index].jump){ uni.navigateTo({ url:'/packages/article/article?type=tips&id='+this.tipsDatas[index].id }) } }, async getSysInfo(){ let res = await sysInfo(); //console.log("getSysInfo res",res)
let sysInfoDatas = res.data.datas; uni.setStorageSync('qxk_sysinfo',sysInfoDatas); let datas = res.data.datas.tips; this.tipsDatas = datas; this.tips = datas.map((item)=>{ return item.title }) }, async toSubOrder(value){ let res = await ratingSearch(value); let datas = res.data.datas; let base_data = encodeURIComponent(JSON.stringify(datas)); this.$url('/packages/ratingQueryDetail/ratingQueryDetail?data='+ base_data); }, async getUserCenterDetail(){ let res = await my(); if(this.$isRight(res)){ uni.setStorageSync('userInfo', res.data.datas.user); this.user = res.data.datas.user; this.dots = res.data.datas.dots; let evaluated_order = res.data.datas.evaluated_order; evaluated_order.forEach(item => item.itemImage = String(item.itemImage).split(',')[0]); this.evaluated_order = evaluated_order; } }, nextToGrading(){ if(!this.isConsentAgreement) return this.$msg('请先阅读并同意协议'); let rateIndex = this.rateIndex; if(this.$isRight(this.user)){ this.$url('/pages/write/baseInfo?rate_index='+ rateIndex); }else{ this.$url('/pages/login/login'); } }, nextToOrder(current){ if(this.$isRight(this.user)){ let url = '/pages/order/order'; if(this.$valueType(current) === 'number'){ url += '?current='+ current; } this.$url(url); }else{ this.$url('/pages/login/login'); } }, nextToSuOrderList(){ this.$url('/packages/subOrderList/subOrderList') }, nextToSettings(){ if(this.$isRight(this.user)){ this.$url('/pages/settings/settings'); }else{ // this.$url('/pages/login/login', {type: 'redirect'})
this.$url('/pages/login/login'); } } } };</script>
<style scoped lang="scss"> .tips_panel{ background-color: white; } .header-nav{ text-align: center; position: relative; width: 720rpx; display: flex; justify-content: center; .searchIcon{ position: absolute; left: 10rpx; top: 5rpx; width: 40rpx; height: 40rpx; z-index: 999999; } } .bottom-group { position: relative; }
.section_4 { border-top:solid 1px #F1F1F1; padding: 40rpx 32rpx; background-color: rgb(255, 255, 255); }
.image_8 { width: 44rpx; height: 44rpx; }
.equal-division-item { width: 84rpx; }
.grid-item_2 { color: rgb(51, 51, 51); font-size: 28rpx; font-weight: 500; line-height: 40rpx; white-space: nowrap; padding: 28rpx 0 24rpx; border-radius: 10rpx; border: solid 2rpx rgb(195, 195, 195); }
.top-group { color: rgb(255, 255, 255); font-size: 24rpx; font-weight: 500; line-height: 26rpx; white-space: nowrap; padding-top: 2rpx; position: relative; }
.image_11 { width: 60rpx; height: 60rpx; }
.image_17 { width: 50rpx; height: 50rpx; }
.image_23 { border-radius: 10rpx; width: 200rpx; height: 240rpx; }
.right-group { color: rgb(153, 153, 153); font-size: 28rpx; font-weight: 500; line-height: 40rpx; white-space: nowrap; }
.text_7 { margin-top: 12rpx; color: rgb(85, 85, 85); font-size: 28rpx; font-weight: 500; line-height: 40rpx; white-space: nowrap; }
.text_9 { margin-top: 14rpx; }
.text_19 { margin-top: 14rpx; }
.page { background-color: #f6f6f6; width: 100%; overflow-y: auto; height: 100%; }
.group_3 { padding-bottom: 2024rpx; flex: 1 1 auto; overflow-y: auto; position: relative; }
.image_6 { width: 100vw; height: 1vw; }
.section_2 { padding-bottom: 14rpx; background-color: rgb(246, 246, 246); top: 0; right: 0; bottom: 0; left: 0; position: absolute; }
.section_3 { padding: 40rpx 0 38rpx; background-color: rgb(255, 255, 255); }
.section_8 { margin-top: 30rpx; padding: 40rpx 0; background-color: rgb(255, 255, 255); }
.section_9 { margin-top: 30rpx; padding: 40rpx 32rpx 30rpx; color: rgb(51, 51, 51); font-size: 32rpx; font-weight: 700; line-height: 44rpx; white-space: nowrap; background-color: rgb(255, 255, 255); }
.view_3 { color: rgb(255, 255, 255); font-size: 24rpx; font-weight: 500; line-height: 34rpx; white-space: nowrap; }
.group_5 { margin-top: 20rpx; color: rgb(51, 51, 51); font-size: 34rpx; font-weight: 600; line-height: 48rpx; white-space: nowrap; }
.equal-division { margin: 36rpx 28rpx 0; }
.group_9 { padding-left: 2rpx; } .qxk-title{ font-size:38rpx; margin-top:10px; } .qxk-title .qxk-iconfont{margin-right:10px;} .qxk-subtitle{ margin-top:10px; white-space:normal; width:128px; } .grid { margin-top: 40rpx; height: 520rpx; display: grid; grid-template-columns: repeat(2, 1fr); grid-row-gap: 22rpx; grid-column-gap: 24rpx; }
.group_11 { margin-top: 40rpx; }
.group_15 { padding: 0 32rpx; color: rgb(51, 51, 51); font-size: 32rpx; font-weight: 700; line-height: 44rpx; white-space: nowrap; }
.equal-division_1 { margin-top: 40rpx; padding: 0 32rpx; color: rgb(51, 51, 51); font-size: 28rpx; font-weight: 500; line-height: 40rpx; white-space: nowrap; }
.image-wrapper { padding-top: 72rpx; width: 112rpx; position: relative; .avatar{ position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 50%; } }
.badge { background-color: rgb(234, 43, 43); border-radius: 17rpx; min-width: 34rpx; position: absolute; // right: 284rpx;
left: 78rpx; top: 0; }
.text_4 { color: rgb(51, 51, 51); font-size: 32rpx; font-weight: 700; line-height: 44rpx; white-space: nowrap; }
.equal-division-item_1 { color: rgb(85, 85, 85); font-size: 28rpx; font-weight: 500; line-height: 40rpx; white-space: nowrap; }
.equal-division-item_2 { padding-top: 2rpx; color: rgb(85, 85, 85); font-size: 28rpx; font-weight: 500; line-height: 40rpx; white-space: nowrap; }
.group_10 { white-space: nowrap; height: 44rpx; }
.grid-item { padding: 22rpx 0 30rpx; color: rgb(231, 162, 63); font-size: 28rpx; font-weight: 500; line-height: 40rpx; white-space: nowrap; border-radius: 10rpx; border: solid 2rpx rgb(231, 162, 63); } .grid-item-active{ color: rgb(231, 162, 63) !important; border: solid 2rpx rgb(231, 162, 63) !important; }
.grid-item_1 { padding: 22rpx 0 30rpx; color: rgb(51, 51, 51); font-size: 28rpx; font-weight: 500; line-height: 40rpx; white-space: nowrap; border-radius: 10rpx; border: solid 2rpx rgb(195, 195, 195); }
.group_12 { padding-bottom: 20rpx; }
.button { padding: 26rpx 0; color: rgb(255, 255, 255); font-size: 32rpx; font-weight: 600; line-height: 44rpx; white-space: nowrap; background-color: rgb(231, 162, 63); border-radius: 10rpx; }
.equal-division-item_3 { // flex: 1 1 244rpx;
align-items: flex-start; margin-right: 42rpx; &:nth-child(3n){ margin-right: 0rpx; } }
.equal-division-item_4 { flex: 1 1 244rpx; }
.equal-division-item_5 { flex: 1 1 244rpx; }
.image_7 { margin-right: 12rpx; border-radius: 50%; width: 40rpx; height: 40rpx; position: relative; z-index: 99; }
.text_11 { margin-top: 12rpx; }
.text_14 { color: rgb(51, 51, 51); font-size: 32rpx; font-weight: 700; line-height: 44rpx; }
.text_15 { color: rgb(119, 119, 119); font-size: 24rpx; font-weight: 500; line-height: 34rpx; }
.text_17 { margin-top: 14rpx; }
.text_24 { color: rgb(119, 119, 119); font-size: 28rpx; line-height: 40rpx; white-space: nowrap; }
.text_27 { margin-top: 10rpx; }
.text_28 { margin-top: 10rpx; }
.text_29 { margin-top: 10rpx; }
.badge_1 { background-color: rgb(234, 43, 43); border-radius: 13rpx; min-width: 26rpx; position: absolute; right: 6rpx; top: 0; }
.badge_2 { background-color: rgb(234, 43, 43); border-radius: 13rpx; width: 26rpx; position: absolute; right: 0; top: 0; }
.section_7 { border-radius: 50%; width: 40rpx; height: 40rpx; border: solid 2rpx rgb(195, 195, 195); }
.group_14 { margin-left: 14rpx; white-space: nowrap; height: 40rpx; }
.text_22 { color: rgb(119, 119, 119); font-size: 28rpx; line-height: 40rpx; }
.text_23 { color: rgb(209, 161, 28); font-size: 28rpx; line-height: 40rpx; } .user-name{ max-width: 360rpx; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } /deep/checkbox .wx-checkbox-input { border-radius: 50% !important; }</style>
|