Browse Source

'修改bug'

master
Lj 4 weeks ago
parent
commit
c2541c2ec4
17 changed files with 458 additions and 472 deletions
  1. +2
    -1
      App.vue
  2. +15
    -0
      api/model/index.js
  3. +0
    -3
      config.js
  4. +0
    -17
      pages.json
  5. +1
    -9
      pages/baoyou-city/baoyou-city.vue
  6. +8
    -18
      pages/component/home.vue
  7. +3
    -3
      pages/component/my.vue
  8. +1
    -1
      pages/component/recycle copy.vue
  9. +7
    -45
      pages/component/recycle.vue
  10. +357
    -346
      pages/index/index.vue
  11. +45
    -17
      pages/manager/inspect-result.vue
  12. +3
    -2
      pages/manager/inspect.vue
  13. +2
    -2
      pages/manager/order-detail.vue
  14. +1
    -1
      pages/manager/order.vue
  15. +1
    -1
      pages/subcomponent/about.vue
  16. +11
    -5
      pages/subcomponent/detail.vue
  17. +1
    -1
      pages/subcomponent/pickup.vue

+ 2
- 1
App.vue View File

@ -61,8 +61,9 @@
this.getBannerList(),
this.getPricePreviewList(),
this.getConfigData(),
this.getQrCode()
]
this.getQrCode()
await Promise.all(promises)
// 100%


+ 15
- 0
api/model/index.js View File

@ -212,6 +212,21 @@ const api = {
method: 'GET',
auth : true,
},
getcheckoutReasons: {
url: '/recycle-admin/applet/order/getcheckoutReasons',
method: 'GET',
auth: true,
},
submitQualityInfo: {
url: '/recycle-admin/applet/info_team_order/submitQualityInfo',
method: 'POST',
auth: true,
},
cancelOrder: {
url: '/recycle-admin/applet/order/cancelOrder',
method: 'POST',
auth: true,
},
}
export default api

+ 0
- 3
config.js View File

@ -2,9 +2,6 @@
const type = 'dev'
const config = {
local: {
baseUrl: 'http://127.0.0.1',
},
dev: {
baseUrl: 'http://h5.xzaiyp.top',
},


+ 0
- 17
pages.json View File

@ -31,23 +31,6 @@
}
],
"subPackages": [
{
"root": "pages/mine",
"pages": [
{
"path": "recyclingDestination",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "questionDetail",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "pages/subcomponent",
"pages": [


+ 1
- 9
pages/baoyou-city/baoyou-city.vue View File

@ -9,9 +9,7 @@
</view>
<!-- 蓝色banner卡片 -->
<view class="byc-banner">
<image class="byc-banner-img"
:src="city_banner"
mode="widthFix" />
<image class="byc-banner-img" src="https://oss.budingxiaoshuo.com/upload/已开通包邮服务的城市-banner_1748252607736.png" mode="widthFix" />
</view>
<!-- 主内容卡片 -->
<view class="byc-main-card">
@ -67,12 +65,6 @@ export default {
}
});
},
computed: {
city_banner() {
const item = getApp().globalData.configData.find(i => i.keyName === 'city_banner')
return item ? item.keyContent : ''
}
},
methods: {
goBack() {
uni.navigateBack()


+ 8
- 18
pages/component/home.vue View File

@ -8,7 +8,7 @@
:interval="3000"
:duration="500"
circular
style="width: 100%; height: 320rpx;"
style="width: 100%; height: 380rpx;"
>
<swiper-item v-for="(item, index) in bannerList" :key="item.id || index">
<video
@ -137,14 +137,11 @@
<text class="title">回收去向</text>
</view>
<view class="destination-grid">
<view class="destination-item "
@click="$utils.navigateTo('/pages/mine/recyclingDestination?id=' + item.id)"
:class="`destination-item${index + 1}`"
v-for="(item, index) in destinations" :key="index">
<view class="destination-item " :class="`destination-item${index + 1}`" v-for="(item, index) in destinations" :key="index">
<image :src="item.icon" mode="aspectFit" class="dest-icon"></image>
<view class="dest-info">
<text class="dest-title">{{item.title}}</text>
<text class="dest-desc">{{item.description}}</text>
<text class="dest-desc">{{item.desc}}</text>
</view>
</view>
</view>
@ -200,22 +197,22 @@ export default {
{
icon: '/static/home/爱心援乡.png',
title: '爱心援乡',
description: '精准帮扶贫困群体'
desc: '精准帮扶贫困群体'
},
{
icon: '/static/home/回塑新源.png',
title: '回塑新源',
description: '塑料的第二次成型'
desc: '塑料的第二次成型'
},
{
icon: '/static/home/织物出海.png',
title: '织物出海',
description: '分拣出最高价值'
desc: '分拣出最高价值'
},
{
icon: '/static/home/碳循再生.png',
title: '碳循再生',
description: '减碳从出发生系统'
desc: '减碳从出发生系统'
}
],
bannerList: [],
@ -339,12 +336,6 @@ export default {
}
})
},
getRecyclingDestination() {
this.$api('getRecyclingDestination')
.then(res => {
this.destinations = res.result
})
},
goToInspectionReport(item) {
uni.navigateTo({
url: `/pages/subcomponent/inspection-report?id=${item.id}`
@ -424,7 +415,6 @@ export default {
//
uni.$on('configDataUpdated', this.updateCionData);
this.getPricePreview();
this.getRecyclingDestination()
},
}
</script>
@ -445,7 +435,7 @@ export default {
.banner {
width: 100%;
height: 330rpx;
height: 390rpx;
position: relative;
overflow: hidden;
border-radius: 0 0 30rpx 30rpx;


+ 3
- 3
pages/component/my.vue View File

@ -393,8 +393,8 @@ export default {
return getApp().globalData.bannerList || []
},
myBannerImage() {
const item = getApp().globalData.configData.find(i => i.keyName === 'user_banner')
return item ? item.keyContent : ''
const banner = (getApp().globalData.bannerList || []).find(item => item.title === '我的-轮播图');
return banner ? banner.image : '';
},
userTypeText() {
// 0 , 1 广, 2 广使
@ -452,7 +452,7 @@ export default {
}
.banner {
height: 320rpx;
height: 400rpx;
background: #ff6b35;
position: relative;
overflow: hidden;


+ 1
- 1
pages/component/recycle copy.vue View File

@ -249,7 +249,7 @@
<view class="rule-popup">
<view class="rule-popup-title">回收规则</view>
<scroll-view class="rule-popup-content" scroll-y>
<uv-parse :nodes="ruleHtml" />
<rich-text :nodes="ruleHtml" />
</scroll-view>
<button class="rule-popup-btn" @click="closeRulePopup">我知道了</button>
<!-- <view class="rule-popup-close" @tap="closeRulePopup">


+ 7
- 45
pages/component/recycle.vue View File

@ -2,15 +2,15 @@
<view class="container">
<!-- 顶部banner -->
<view class="banner">
<!-- <swiper
<swiper
:indicator-dots="false"
:autoplay="true"
:interval="3000"
:duration="500"
circular
style="width: 100%; height: 320rpx;"
> -->
<!-- <swiper-item v-for="(item, index) in bannerList" :key="item.id || index">
style="width: 100%; height: 400rpx;"
>
<swiper-item v-for="(item, index) in bannerList" :key="item.id || index">
<video
v-if="item.type == 1"
:src="item.voUrl"
@ -25,11 +25,8 @@
></video>
<image v-else :src="item.image" mode="aspectFill" style="width: 100%; height: 100%;" />
</swiper-item>
</swiper> -->
<image v-if="recycle_banner" :src="recycle_banner" mode="aspectFill" style="width: 100%; height: 100%;" />
</swiper>
</view>
<!-- 商品列表 -->
<view class="goods-list">
@ -253,7 +250,7 @@
<view class="rule-popup">
<view class="rule-popup-title">回收规则</view>
<scroll-view class="rule-popup-content" scroll-y>
<uv-parse :content="ruleHtml"></uv-parse>
<rich-text :nodes="ruleHtml" />
</scroll-view>
<button class="rule-popup-btn" @click="closeRulePopup">我知道了</button>
<!-- <view class="rule-popup-close" @tap="closeRulePopup">
@ -355,15 +352,9 @@ export default {
reduceBrandList: [], //
viewedRuleItems: new Set(), // ID
loadOptions: null, // options
userInfo: null, //
isUserBlacklisted: false, //
}
},
computed: {
recycle_banner() {
const item = getApp().globalData.configData.find(i => i.keyName === 'recycle_banner')
return item ? item.keyContent : ''
},
//
recycleList() {
const currentCategoryId = this.categories[this.currentCategory]?.id
@ -634,17 +625,6 @@ export default {
})
},
submitOrder() {
//
if (this.isUserBlacklisted) {
uni.showModal({
title: '提示',
content: '您的账户已被限制使用回收服务,如有疑问请联系客服。',
showCancel: false,
confirmText: '我知道了'
})
return
}
if (this.totalCount < 3) {
uni.showToast({
title: '各品类混合需要满3件才能回收哦',
@ -760,21 +740,6 @@ export default {
toggleDetailPanel() {
this.showDetailPanel = !this.showDetailPanel
},
fetchUserInfo() {
if(uni.getStorageSync('token')){
this.login_status = getApp().globalData.login_status;
this.$api("getUserByToken",{},(res)=>{
if(res.code == 200){
this.userInfo = res.result
//
this.isUserBlacklisted = res.result.isBlack === 'Y'
// isTuiType 0,1广,2广使
}
})
} else {
this.login_status = false;
}
},
updateQuantityByProduct(item, delta) {
//
if (item.brandId) {
@ -1019,9 +984,6 @@ export default {
uni.$off('clearRecycleOrderData')
},
onShow() {
//
this.fetchUserInfo()
const id = getApp().globalData.targetRecycleCategoryId
if (id) {
const trySwitch = () => {
@ -1121,7 +1083,7 @@ export default {
// flex: 1;
display: flex;
position: relative;
height: calc(100vh - 320rpx - 120rpx - env(safe-area-inset-bottom)); /* 减去banner和底部栏的高度 */
height: calc(100vh - 400rpx - 120rpx - env(safe-area-inset-bottom)); /* 减去banner和底部栏的高度 */
margin-top: -10rpx;
z-index: 2;
border-radius: 20rpx 20rpx 0 0;


+ 357
- 346
pages/index/index.vue View File

@ -1,369 +1,380 @@
<template>
<view class="login-container">
<!-- 应用标题和副标题 -->
<view class="app-header">
<image :src="logoImage" mode="widthFix"
style="width: 170rpx; height: 170rpx; display: block; margin: 0 auto;" />
<view class="app-title">{{ logoName }}</view>
<!-- <view class="app-subtitle">旧物很有用·回收很简单</view> -->
</view>
<!-- 登录操作区域 -->
<view class="login-actions">
<button class="login-btn" @click="handleLogin">登录</button>
<button class="cancel-btn" @click="handleCancel">取消登录</button>
<view class="agreement">
<checkbox-group @change="handleAgreementChange" class="radio-group">
<label class="radio-label">
<checkbox :checked="agreed" color="#fdbd3e" class="custom-radio" />
<text class="agreement-text">我已阅读并同意</text>
<text class="protocol-link" @click.stop="openProtocol('service')">服务协议</text>
<text class="agreement-text"></text>
<text class="protocol-link" @click.stop="openProtocol('privacy')">隐私政策</text>
</label>
</checkbox-group>
</view>
</view>
<!-- <uv-divider :dashed = "true"></uv-divider> -->
<!-- <view class="admin-login" @click="goToAdminLogin">管理员登录</view> -->
<PrivacyPopup ref="privacyPopup" :needPhone="needPhone" @agree="handleAgreePrivacy"
@reject="handleRejectPrivacy" @open-protocol="openProtocol" />
<ProtocolDialog ref="protocolDialog" :show="showProtocolDialog" :title="protocolDialogTitle"
:content="protocolDialogContent" @close="showProtocolDialog = false" @agree="handleProtocolAgree"
@reject="handleProtocolReject" />
</view>
<view class="login-container">
<!-- 应用标题和副标题 -->
<view class="app-header">
<image :src="logoImage" alt="logo" style="width: 120rpx; height: 120rpx; display: block; margin: 0 auto;" />
<view class="app-title">{{ logoName }}</view>
<!-- <view class="app-subtitle">旧物很有用·回收很简单</view> -->
</view>
<!-- 登录操作区域 -->
<view class="login-actions">
<button class="login-btn" @click="handleLogin">登录</button>
<button class="cancel-btn" @click="handleCancel">取消登录</button>
<view class="agreement">
<checkbox-group @change="handleAgreementChange" class="radio-group">
<label class="radio-label">
<checkbox :checked="agreed" color="#fdbd3e" class="custom-radio"/>
<text class="agreement-text">我已阅读并同意</text>
<text class="protocol-link" @click.stop="openProtocol('service')">服务协议</text>
<text class="agreement-text"></text>
<text class="protocol-link" @click.stop="openProtocol('privacy')">隐私政策</text>
</label>
</checkbox-group>
</view>
</view>
<!-- <uv-divider :dashed = "true"></uv-divider> -->
<!-- <view class="admin-login" @click="goToAdminLogin">管理员登录</view> -->
<PrivacyPopup
ref="privacyPopup"
:needPhone="needPhone"
@agree="handleAgreePrivacy"
@reject="handleRejectPrivacy"
@open-protocol="openProtocol"
/>
<ProtocolDialog
ref="protocolDialog"
:show="showProtocolDialog"
:title="protocolDialogTitle"
:content="protocolDialogContent"
@close="showProtocolDialog = false"
@agree="handleProtocolAgree"
@reject="handleProtocolReject"
/>
</view>
</template>
<script>
import PrivacyPopup from '@/wxcomponents/privacy-popup/privacy-popup.vue'
import ProtocolDialog from '@/wxcomponents/protocol-dialog/protocol-dialog.vue'
// import {banner} from '@/api.uts'
export default {
components: {
PrivacyPopup,
ProtocolDialog
},
data() {
return {
agreed: false,
showProtocolDialog: false,
protocolDialogTitle: '',
protocolDialogContent: '',
configData: [], // getConfig result
needPhone: false //
}
},
computed: {
logoImage() {
const item = this.configData.find(i => i.keyName === 'logo_image')
return item ? item.keyContent : ''
},
logoName() {
const item = this.configData.find(i => i.keyName === 'logo_name')
return item ? item.keyContent : ''
}
},
onLoad() {
this.getConfigData()
},
methods: {
getConfigData() {
this.$api('getConfig', {}, res => {
// console.log('Config data response:', JSON.parse(JSON.stringify(res)) )
if (res && res.success && Array.isArray(res.result)) {
this.configData = res.result
// console.log('Config data set:', JSON.parse(JSON.stringify(this.configData)) )
}
})
},
getConfigByKey(key) {
const item = this.configData.find(i => i.keyName === key)
return item ? item.keyContent : ''
},
handleLogin() {
if (!this.agreed) {
uni.showToast({
title: '请阅读并勾选服务协议和隐私声明',
icon: 'none'
});
return;
}
this.$refs.privacyPopup.open()
// uni.showLoading({
// title: '...'
// });
// setTimeout(() => {
// uni.hideLoading();
// uni.showToast({
// title: ''
// });
// uni.reLaunch({
// url: '/pages/index/index'
// });
// }, 1500);
},
handleCancel() {
uni.reLaunch({
url: '/pages/component/home'
});
},
handleAgreementChange(e) {
// console.log(this.agreed);
// this.agreed = e.detail.value.length > 0;
if (this.agreed) {
this.agreed = false;
} else {
this.agreed = true;
}
},
openProtocol(type) {
console.log('Opening protocol:', type)
console.log('Current configData:', this.configData)
let protocol = null
if (type === 'privacy') {
protocol = this.configData.find(i => i.keyName === 'user_ys')
} else if (type === 'service') {
protocol = this.configData.find(i => i.keyName === 'user_xy')
}
console.log('Found protocol:', protocol)
this.protocolDialogTitle = protocol ? protocol.keyValue : (type === 'privacy' ? '隐私政策' : '服务协议')
this.protocolDialogContent = protocol && protocol.keyContent ? protocol.keyContent :
(type === 'privacy' ?
'<div style="padding: 20rpx;">暂无隐私政策内容</div>' :
'<div style="padding: 20rpx;">暂无服务协议内容</div>')
this.showProtocolDialog = true
console.log('Dialog state:', {
title: this.protocolDialogTitle,
content: this.protocolDialogContent,
show: this.showProtocolDialog
})
},
goToAdminLogin() {
uni.navigateTo({
url: '/pages/component/admin_login'
});
},
//
handleAgreePrivacy() {
uni.showLoading({
title: '登录中...'
})
// ...
let self = this
wx.login({
success(res) {
// console.log(res.code,'code')
if (res.code) {
self.$api('wxLogin', {
code: res.code
}, res => {
console.log(res, 'login')
if (res.code == 200) {
uni.hideLoading();
// console.log(res)
uni.setStorageSync('token', res.result.token);
uni.setStorageSync('openid', res.result.userInfo && res.result.userInfo
.appletOpenid);
getApp().globalData.login_status = true;
if (res.result.userInfo) {
const userInfo = res.result.userInfo;
console.log(userInfo, 'userInfo')
if (!userInfo.headImage || !userInfo.nickName) {
uni.navigateTo({
url: '/pages/wxUserInfo'
});
} else {
uni.reLaunch({
url: '/pages/component/home'
});
}
} else {
import PrivacyPopup from '@/wxcomponents/privacy-popup/privacy-popup.vue'
import ProtocolDialog from '@/wxcomponents/protocol-dialog/protocol-dialog.vue'
// import {banner} from '@/api.uts'
export default {
components: {
PrivacyPopup,
ProtocolDialog
},
data() {
return {
agreed: false,
showProtocolDialog: false,
protocolDialogTitle: '',
protocolDialogContent: '',
configData: [], // getConfig result
needPhone: false //
}
},
computed: {
logoImage() {
const item = this.configData.find(i => i.keyName === 'logo_image')
return item ? item.keyContent : ''
},
logoName() {
const item = this.configData.find(i => i.keyName === 'logo_name')
return item ? item.keyContent : ''
}
},
onLoad() {
this.getConfigData()
},
methods: {
getConfigData() {
this.$api('getConfig', {}, res => {
// console.log('Config data response:', JSON.parse(JSON.stringify(res)) )
if (res && res.success && Array.isArray(res.result)) {
this.configData = res.result
// console.log('Config data set:', JSON.parse(JSON.stringify(this.configData)) )
}
})
},
getConfigByKey(key) {
const item = this.configData.find(i => i.keyName === key)
return item ? item.keyContent : ''
},
handleLogin() {
if (!this.agreed) {
uni.showToast({
title: '请阅读并勾选服务协议和隐私声明',
icon: 'none'
});
return;
}
this.$refs.privacyPopup.open()
// uni.showLoading({
// title: '...'
// });
// setTimeout(() => {
// uni.hideLoading();
// uni.showToast({
// title: ''
// });
// uni.reLaunch({
// url: '/pages/index/index'
// });
// }, 1500);
},
handleCancel() {
uni.navigateBack();
},
handleAgreementChange(e) {
// console.log(this.agreed);
// this.agreed = e.detail.value.length > 0;
if(this.agreed){
this.agreed = false;
}else{
this.agreed = true;
}
},
openProtocol(type) {
console.log('Opening protocol:', type)
console.log('Current configData:', this.configData)
let protocol = null
if (type === 'privacy') {
protocol = this.configData.find(i => i.keyName === 'user_ys')
} else if (type === 'service') {
protocol = this.configData.find(i => i.keyName === 'user_xy')
}
console.log('Found protocol:', protocol)
this.protocolDialogTitle = protocol ? protocol.keyValue : (type === 'privacy' ? '隐私政策' : '服务协议')
this.protocolDialogContent = protocol && protocol.keyContent ? protocol.keyContent :
(type === 'privacy' ?
'<div style="padding: 20rpx;">暂无隐私政策内容</div>' :
'<div style="padding: 20rpx;">暂无服务协议内容</div>')
this.showProtocolDialog = true
console.log('Dialog state:', {
title: this.protocolDialogTitle,
content: this.protocolDialogContent,
show: this.showProtocolDialog
})
},
goToAdminLogin() {
uni.navigateTo({
url: '/pages/component/admin_login'
});
},
//
handleAgreePrivacy() {
uni.showLoading({
title: '登录中...'
})
// ...
let self = this
wx.login({
success (res) {
// console.log(res.code,'code')
if (res.code) {
self.$api('wxLogin', {code : res.code}, res => {
console.log(res,'login')
if (res.code == 200) {
uni.hideLoading();
// console.log(res)
uni.setStorageSync('token',res.result.token);
uni.setStorageSync('openid',res.result.userInfo && res.result.userInfo.appletOpenid);
getApp().globalData.login_status = true;
if (res.result.userInfo) {
const userInfo = res.result.userInfo;
console.log(userInfo,'userInfo')
if (!userInfo.headImage || !userInfo.nickName) {
uni.navigateTo({
url: '/pages/wxUserInfo'
});
} else {
uni.reLaunch({
url: '/pages/component/home'
});
}
} else {
uni.navigateTo({
url: '/pages/wxUserInfo'
});
}
})
} else {
uni.hideLoading();
console.log('登录失败!' + res.errMsg)
}
}
})
},
//
handleRejectPrivacy() {
uni.reLaunch({
url: '/pages/component/home'
});
},
//
openProtocolPage(type) {
this.openProtocol(type)
},
handleProtocolAgree() {
this.showProtocolDialog = false
this.agreed = true
//
},
handleProtocolReject() {
this.showProtocolDialog = false
if (this.agreed) {
this.agreed = false
}
//
}
}
}
}
})
} else {
uni.hideLoading();
console.log('登录失败!' + res.errMsg)
}
}
})
},
//
handleRejectPrivacy() {
uni.reLaunch({ url: '/pages/component/home' });
},
//
openProtocolPage(type) {
this.openProtocol(type)
},
handleProtocolAgree() {
this.showProtocolDialog = false
this.agreed = true
//
},
handleProtocolReject() {
this.showProtocolDialog = false
if (this.agreed) {
this.agreed = false
}
//
}
}
}
</script>
<style scoped scss>
view {
padding-bottom: 0 !important;
}
.login-container {
display: flex;
flex-direction: column;
height: 100vh;
background-color: #f9ece5;
padding: 0 40rpx;
padding-bottom: env(safe-area-inset-bottom);
}
.app-header {
margin-top: 320rpx;
margin-bottom: 180rpx;
text-align: center;
}
.app-title {
display: flex;
justify-content: center;
align-items: center;
font-family: Alimama ShuHeiTi;
font-weight: 700;
font-size: 28px;
/* background-color: rgba(254, 208, 116, 0.8); */
/* text-shadow: 1px 2px #f7b737; */
margin-top: 50rpx;
}
.app-subtitle {
font-size: 28rpx;
color: #fef6e3;
margin-top: 1rem;
letter-spacing: 0.11em;
}
.login-actions {
/* height: 30%; */
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: #f9ece5;
border-radius: 30rpx;
}
.login-btn,
.cancel-btn {
width: 82%;
height: 90rpx;
line-height: 90rpx;
border-radius: 45rpx;
font-size: 32rpx;
margin-bottom: 20rpx;
border: none;
}
.login-btn {
background-color: #f79400;
color: white;
}
.cancel-btn {
background-color: rgba(255, 253, 249);
color: #f7990c;
border: 1px solid rgba(249, 178, 71);
}
.agreement {
/* margin-top: 40rpx; */
font-size: 24rpx;
color: #333;
display: flex;
justify-content: center;
}
view {
padding-bottom: 0 !important;
}
.radio-group {
display: flex;
align-items: center;
}
/* 自定义圆形checkbox样式 */
.custom-radio {
/* border-radius: 50%; */
width: 32rpx;
height: 32rpx;
transform: scale(0.7);
margin-right: 8rpx;
}
/* 覆盖uniapp默认checkbox样式 */
.custom-radio .wx-checkbox-input,
.custom-radio .uni-checkbox-input {
border-radius: 50% !important;
width: 32rpx !important;
height: 32rpx !important;
}
.custom-radio .wx-checkbox-input.wx-checkbox-input-checked,
.custom-radio .uni-checkbox-input.uni-checkbox-input-checked {
background-color: #07C160 !important;
border-color: #07C160 !important;
color: #ffffff !important;
}
.login-container {
display: flex;
flex-direction: column;
height: 100vh;
background-color: #f9ece5;
padding: 0 40rpx;
padding-bottom: env(safe-area-inset-bottom);
}
.app-header {
margin-top: 220rpx;
margin-bottom: 180rpx;
text-align: center;
height: 30%;
}
image{
width: 50%;
height: 50%;
}
.app-title {
display: flex;
justify-content: center;
align-items: center;
font-family: Alimama ShuHeiTi;
font-weight: 700;
font-size: 28px;
line-height: 140%;
letter-spacing: 0%;
/* background-color: rgba(254, 208, 116, 0.8); */
border-radius: 3em;
letter-spacing: 0.2em;
/* text-shadow: 1px 2px #f7b737; */
}
.app-subtitle {
font-size: 28rpx;
color: #fef6e3;
margin-top: 1rem;
letter-spacing: 0.11em;
}
.login-actions {
/* height: 30%; */
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: #f9ece5;
border-radius: 30rpx;
}
.login-btn, .cancel-btn {
width: 82%;
height: 90rpx;
line-height: 90rpx;
border-radius: 45rpx;
font-size: 32rpx;
margin-bottom: 20rpx;
border: none;
}
.login-btn {
background-color: #f79400;
color: white;
}
.cancel-btn {
background-color: rgba(255, 253, 249);
color: #f7990c;
border: 1px solid rgba(249, 178, 71);
}
.agreement {
/* margin-top: 40rpx; */
font-size: 24rpx;
color: #333;
display: flex;
justify-content: center;
}
/* .radio-label {
.radio-group {
display: flex;
align-items: center;
}
/* 自定义圆形checkbox样式 */
.custom-radio {
/* border-radius: 50%; */
width: 32rpx;
height: 32rpx;
transform: scale(0.7);
margin-right: 8rpx;
}
/* 覆盖uniapp默认checkbox样式 */
.custom-radio .wx-checkbox-input,
.custom-radio .uni-checkbox-input {
border-radius: 50% !important;
width: 32rpx !important;
height: 32rpx !important;
}
.custom-radio .wx-checkbox-input.wx-checkbox-input-checked,
.custom-radio .uni-checkbox-input.uni-checkbox-input-checked {
background-color: #07C160 !important;
border-color: #07C160 !important;
color: #ffffff !important;
}
/* .radio-label {
display: flex;
align-items: center;
} */
.agreement-text {
margin: 0 4rpx;
}
.agreement-text {
margin: 0 4rpx;
}
.protocol-link {
color: #fabe65;
}
.protocol-link {
color: #fabe65;
}
.admin-login {
text-align: center;
color: #fffffe;
font-size: 28rpx;
letter-spacing: 0.15em;
}
.admin-login {
text-align: center;
color: #fffffe;
font-size: 28rpx;
letter-spacing: 0.15em;
}
</style>

+ 45
- 17
pages/manager/inspect-result.vue View File

@ -125,9 +125,9 @@
</view>
<view class="popup-section">
<text class="section-label">选择理由</text>
<view v-for="(item, idx) in reasonOptions" :key="item" class="reason-row" @tap="toggleReason(idx)">
<view :class="['checkbox', {checked: reasonChecked[idx]}]" />
<text class="reason-text">{{ item }}</text>
<view v-for="(item, index) in reasonOptions" :key="item.id" class="reason-row" @tap="toggleReason(index)">
<view :class="['checkbox', {checked: reasonChecked[index]}]" />
<text class="reason-text">{{ item.reason }}</text>
</view>
</view>
</scroll-view>
@ -153,8 +153,8 @@ export default {
reasonPopupVisible: false,
currentReasonTitle: '',
reasonImages: [],
reasonOptions: ['大面积破损', '不可回收', '顽固污渍', '污渍无法清除', '异味严重', '带有危险物品'],
reasonChecked: [false, true, false, true, false, false],
reasonOptions: [],
reasonChecked: [],
currentReasonItem: null,
isPopupOpen: false //
}
@ -224,6 +224,7 @@ export default {
let unqualifiedCount = 0
let unrecyclableCount = 0
console.log('item', item)
item.commonOrderList.forEach(commonItem => {
if (commonItem.testingStatus === 0) {
qualifiedCount++
@ -244,7 +245,7 @@ export default {
this.qualifiedList.push({
id: item.id,
name: displayName,
shopClass: item.shopClass,
shopClass: this.getShopClass(item.id),
shopId: item.shopId,
price: itemPrice,
count: qualifiedCount,
@ -268,7 +269,7 @@ export default {
unqualifiedItems.push({
id: commonItem.id,
name: `${itemNames}${index}`,
shopClass: item.shopClass,
shopClass: this.getShopClass(item.id),
shopId: item.shopId,
reason: '',
images: savedImages,
@ -282,7 +283,7 @@ export default {
this.unqualifiedGroups.push({
id: item.id,
name: displayName,
shopClass: item.shopClass,
shopClass: this.getShopClass(item.id),
shopId: item.shopId,
price: itemPrice,
total: 0, // 0
@ -327,23 +328,37 @@ export default {
},
finishInspect() {
// inspectData
console.log('最终的质检数据:', JSON.stringify(this.inspectData, null, 2))
this.inspectData["list"]=JSON.stringify(this.inspectData["list"], null, 2)
console.log('最终的质检数据:', this.inspectData);
// API
// this.$api('submitInspectResult', { inspectData: this.inspectData }, res => {
// if (res && res.code === 200) {
// uni.showToast({ title: '', icon: 'success' })
// uni.navigateBack()
// }
// })
this.$api('submitQualityInfo', this.inspectData , res => {
if (res && res.code === 200) {
uni.showToast({ title: '质检完成', icon: 'success' })
uni.navigateBack()
}
})
uni.showToast({ title: '完成质检', icon: 'success' })
},
selectReasonForUnqualified(item,type) {
this.$api('getcheckoutReasons', {
classId: item.shopClass,
type: type
}, res => {
console.log('res', res)
if(res.code == 200){
this.reasonOptions = res.result;
}
})
},
selectReason(item) {
console.log('item', item)
this.currentReasonItem = item
this.currentReasonTitle = item.name
this.reasonImages = item.images || []
this.reasonChecked = item.reasons || Array(this.reasonOptions.length).fill(false)
this.selectReasonForUnqualified(item,0)
this.lockScroll()
this.$refs.reasonPopup.open()
},
@ -352,14 +367,17 @@ export default {
this.currentReasonTitle = this.getItemName(item.id)
this.reasonImages = item.images || []
this.reasonChecked = item.reasons || Array(this.reasonOptions.length).fill(false)
this.selectReasonForUnqualified(item,1)
this.lockScroll()
this.$refs.reasonPopup.open()
},
selectReasonForUnrecyclable(item) {
console.log('item', item)
this.currentReasonItem = item
this.currentReasonTitle = this.getItemName(item.id)
this.reasonImages = item.images || []
this.reasonChecked = item.reasons || Array(this.reasonOptions.length).fill(false)
this.selectReasonForUnqualified(item,2)
this.lockScroll()
this.$refs.reasonPopup.open()
},
@ -436,6 +454,7 @@ export default {
this.reasonImages.splice(idx, 1)
},
toggleReason(idx) {
console.log
this.$set(this.reasonChecked, idx, !this.reasonChecked[idx])
},
saveReason() {
@ -443,7 +462,7 @@ export default {
if (this.currentReasonItem) {
this.currentReasonItem.images = [...this.reasonImages]
this.currentReasonItem.reasons = [...this.reasonChecked]
// console.log('this.currentReasonItem', this.currentReasonItem)
// inspectData
this.updateInspectData()
}
@ -456,7 +475,7 @@ export default {
const selectedReasonIds = []
this.reasonChecked.forEach((checked, index) => {
if (checked) {
selectedReasonIds.push(index.toString())
selectedReasonIds.push(this.reasonOptions[index].id.toString())
}
})
@ -552,6 +571,15 @@ export default {
}
return '未知商品'
},
getShopClass(id) {
if (this.order && this.order.commonOrderList) {
// console.log('this.order', ShopClass)
const ShopClass = this.order.commonOrderList.find(item => item.id == id)
// console.log('ShopClass', ShopClass)
return ShopClass ? ShopClass.shopClass: ''
}
return ''
},
getItemBrand(id) {
if (this.order && this.order.commonOrderList) {
const orderItem = this.order.commonOrderList.find(item => item.id == id)


+ 3
- 2
pages/manager/inspect.vue View File

@ -143,11 +143,12 @@ export default {
commonOrderList: []
}
}
console.log('groupedGoods', groupedGoods)
//
for (let i = 0; i < (item.num || 0); i++) {
// console.log('groupedGoods[item.id]', groupedGoods[item.id])
groupedGoods[item.id].commonOrderList.push({
id: `${item.id}-${i}`, // ID
id: `${item.commonOrderList[i].id}`, // ID
testingInstructions: '',
testingImages: '',
testingStatus: '' //


+ 2
- 2
pages/manager/order-detail.vue View File

@ -177,7 +177,7 @@
</view>
<!-- 底部操作按钮 -->
<view v-if="order.status === 1||order.status === 0" class="footer-btns">
<view v-if="order.status === 0" class="footer-btns">
<button class="btn-outline" @tap="rejectOrderAction">驳回</button>
<button class="btn-main" @tap="passOrderAction">通过</button>
</view>
@ -225,7 +225,7 @@ export default {
//
this.baseInfo = [
{ label: '订单编号', value: data.ordeNo, copy: true },
...(data.status === 2 ? [{ label: '快递单号', value: data.wliuNo, copy: true }] : []),
...(data.wliuNo ? [{ label: '快递单号', value: data.wliuNo, copy: true }] : []),
{ label: '用户名', value: data.name, arrow: true },
{ label: '取件地址', value: data.address + (data.addressDetail || '') },
{ label: '预约时间', value: data.goTime }


+ 1
- 1
pages/manager/order.vue View File

@ -294,7 +294,7 @@ export default {
// if (state === 3) {
// return { label: '', class: 'gray' }
// }
if (status === 1 && state != 3) {
if ((status === 1||status === 0) && state != 3) {
return { label: '已预约', class: 'green' }
} else if (state === 1) {
return { label: '待质检', class: 'orange' }


+ 1
- 1
pages/subcomponent/about.vue View File

@ -10,7 +10,7 @@
<!-- 主卡片 -->
<view class="main-card" :style="{marginTop: (statusBarHeight + 88) + 'rpx'}">
<!-- 富文本内容 -->
<uv-parse :nodes="memberTextContent" class="rich-text-content"></uv-parse>
<rich-text :nodes="memberTextContent" class="rich-text-content"></rich-text>
</view>
</view>
</template>


+ 11
- 5
pages/subcomponent/detail.vue View File

@ -327,11 +327,17 @@ export default {
this.showCancelModal = false;
//
this.currentStep = 0;
this.currentStatus = {
text: '已取消',
time: this.getNowTime(),
icon: '/static/【待取件】快递员正在赶来.png'
};
// this.currentStatus = {
// text: '',
// time: this.getNowTime(),
// icon: '/static/.png'
// };
this.$api('cancelOrder', { orderId: this.orderId }, res => {
if (res && res.code === 200) {
console.log('res', res)
uni.showToast({ title: '订单已取消', icon: 'none' });
}
})
// uni.showToast({ title: '', icon: 'none' });
},
getNowTime() {


+ 1
- 1
pages/subcomponent/pickup.vue View File

@ -64,7 +64,7 @@
<text class="name">{{ item.name }}</text>
<text v-if="item.brandName" class="brand-tag">{{ item.brandName }}</text>
</view>
<view class="desc">{{ item.desc }}</view>
<!-- <view class="desc">{{ item.desc }}</view> -->
<view class="price-row">
<text class="price">{{ item.unitPrice }}/</text>
<text class="count">x{{ item.quantity }}</text>


Loading…
Cancel
Save