修复若干bug

This commit is contained in:
丁杰 2026-06-08 17:53:00 +08:00
parent f72f164fd8
commit 2fcfba42ea
12 changed files with 1175 additions and 1057 deletions

View File

@ -13,7 +13,7 @@
<input :adjust-position="false" class="real-input" type="number" :maxlength="codeLength"
v-model="inputValue" :focus="true" @input="onInput" @focus="onFocus"
@keyboardheightchange="onkeyboardheightchange" @blur="onBlur" cursor-spacing="100"
ref="realInput" />
cursor-color="transparent" ref="realInput" />
</view>
<button class="confirm-btn" :disabled="code.length < codeLength" @click="onConfirm">确定</button>
<view class="close-btn" @click="close">×</view>
@ -187,6 +187,7 @@ export default {
height: 100%;
opacity: 0;
z-index: 2;
caret-color: transparent;
}
}

View File

@ -89,8 +89,12 @@
"path": "pages/order/userorder-list",
"style": {
"navigationBarTitleText": "订单",
"navigationBarBackgroundColor": "#FFFFFF"
"navigationBarBackgroundColor": "#FFFFFF",
"app-plus": {
"softinputNavBar": "none"
}
}
},
{
"path": "pages/order/userorder-detail",

View File

@ -679,7 +679,8 @@ export default {
fetchBrandList() {
request.post('/sj/brand/list', {
page: 1,
limit: 4
limit: 4,
poster_recommend: 1
}).then(res => {
if (res.code == 200 && res.data && res.data.list) {
this.brands = res.data.list.map(item => {
@ -706,7 +707,8 @@ export default {
fetchSkillList() {
request.post('/sj/skill/list', {
page: 1,
limit: 4
limit: 4,
poster_recommend: 1
}).then(res => {
if (res.code == 200 && res.data && res.data.list) {
this.skills = res.data.list.map(item => {
@ -1093,7 +1095,7 @@ page {
.name {
height: 42rpx;
font-family: PingFangTC, PingFangTC;
font-weight: bold;
font-weight: 500;
font-size: 34rpx;
color: #333333;
line-height: 42rpx;

View File

@ -1,40 +1,24 @@
<template>
<view>
<custom-navbar
title="精选品牌"
<custom-navbar title="精选品牌"
:leftImg="'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/60ae3383-6ff6-4f42-818b-d9b09a9bd0e0.png'"
:showUser="true"
backgroundColor="url('https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/ce2e62e1-c26a-45c8-a49d-7ed00b2ce02c.png') center 20%/cover no-repeat"
titleColor="#333"
borderBottom="none"
:show-headle="true"
titleColor="#333" borderBottom="none" :show-headle="true"
headleSrc="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/51ebca5d-95c5-4fb8-8aa3-560a79100d25.png"
@onHeadleClick="goToSearch">
@onHeadleClick="goToSearch" class="nav-img-size">
</custom-navbar>
<serviecFirstTab
:tabs="tabs"
:activeId="activeId"
activeColor="#FF4767"
@tab-click="tabClick"
bgColor="#fff">
<serviecFirstTab :tabs="tabs" :activeId="activeId" activeColor="#FF4767" @tab-click="tabClick" bgColor="#fff">
</serviecFirstTab>
<CommonList
ref="brandListRef"
:apiUrl="'/sj/brand/list'"
:initialQuery="{}"
:listScrollHeight="`calc(100vh - ${statusBarHeight * 2 + 250}rpx)`"
@data-loaded="handleDataLoaded">
<CommonList ref="brandListRef" :apiUrl="'/sj/brand/list'" :initialQuery="{}"
:listScrollHeight="`calc(100vh - ${statusBarHeight * 2 + 250}rpx)`" @data-loaded="handleDataLoaded">
<template #headerScroll>
<view class="icon-tabs">
<view
v-for="item in iconTabs"
:key="item.id"
class="icon-tab"
:class="{active: currentSecondClass == item.id}"
@click="selectSecondClass(item.id)">
<view v-for="item in iconTabs" :key="item.id" class="icon-tab"
:class="{ active: currentSecondClass == item.id }" @click="selectSecondClass(item.id)">
<image :src="item.photo" class="icon-img" mode="aspectFill"></image>
<text class="icon-text">{{ item.title }}</text>
</view>
@ -62,14 +46,8 @@
<template #listData="{ list }">
<view class="zhanwei">
<view class="brand-grid">
<brand-card
class="brand-card-wrap"
v-for="(brand, idx) in enrichedBrandList(list)"
:key="brand.id || idx"
:item="brand"
:tagKeys="brand._tagKeys"
@click="handleBrandClick(brand)"
/>
<brand-card class="brand-card-wrap" v-for="(brand, idx) in enrichedBrandList(list)" :key="brand.id || idx"
:item="brand" :tagKeys="brand._tagKeys" @click="handleBrandClick(brand)" />
</view>
</view>
</template>
@ -296,20 +274,31 @@ export default {
/* ================= 抽屉下拉样式 ================= */
.filter-panel {
position: fixed;
left: 0; right: 0; bottom: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 100;
pointer-events: none;
overflow: hidden;
&.show {
pointer-events: auto;
.filter-mask { opacity: 1; }
.filter-container { transform: translateY(0); }
.filter-mask {
opacity: 1;
}
.filter-container {
transform: translateY(0);
}
}
.filter-mask {
position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.4);
opacity: 0;
transition: opacity 0.3s ease-in-out;
@ -317,7 +306,9 @@ export default {
.filter-container {
position: absolute;
top: 0; left: 0; right: 0;
top: 0;
left: 0;
right: 0;
background: #fff;
border-radius: 0 0 30rpx 30rpx;
padding: 140rpx 30rpx 40rpx;
@ -332,6 +323,7 @@ export default {
.filter-scroll {
max-height: 50vh;
}
.filter-group {
margin-bottom: 30rpx;
@ -346,17 +338,20 @@ export default {
.pill-list {
display: flex;
flex-wrap: wrap;
gap: 20rpx 10rpx; /* 控制行间距和列间距 */
gap: 20rpx 10rpx;
/* 控制行间距和列间距 */
}
}
/* 通用胶囊按钮 (一行四个) */
.pill-item {
width: calc(25% - 8rpx); /* 精确计算一行四个 */
width: calc(25% - 8rpx);
/* 精确计算一行四个 */
height: 58rpx;
background: #F5F5F5;
font-weight: 400;
font-size: 24rpx; /* 字号略小以防溢出 */
font-size: 24rpx;
/* 字号略小以防溢出 */
color: #333333;
line-height: 37rpx;
@ -381,15 +376,25 @@ export default {
display: flex;
justify-content: space-between;
margin-top: 40rpx;
.reset-btn, .confirm-btn {
.reset-btn,
.confirm-btn {
width: 47%;
text-align: center;
padding: 22rpx 0;
border-radius: 40rpx;
font-size: 28rpx;
}
.reset-btn { background: #F5F5F5; color: #666; }
.confirm-btn { background: #FF4767; color: #fff; }
.reset-btn {
background: #F5F5F5;
color: #666;
}
.confirm-btn {
background: #FF4767;
color: #fff;
}
}
/* ================= 其他页面样式 ================= */
@ -483,6 +488,7 @@ export default {
padding: 20rpx 0 0 0;
border-radius: 20rpx 20rpx 0rpx 0rpx;
}
.brand-grid {
background-color: #ffffff;
display: flex;
@ -501,6 +507,7 @@ export default {
::v-deep .list-container {
padding: 0;
}
::v-deep .list-scroll {
margin-top: 0rpx;
}
@ -510,4 +517,9 @@ export default {
background-color: #f5f5f5;
border-radius: 20rpx 20rpx 0 0;
}
.nav-img-size::v-deep .icon-headle {
width: 36rpx !important;
height: 36rpx !important;
}
</style>

View File

@ -909,8 +909,12 @@ export default {
toruzhu() {
const idType = this.userInfo.id_type;
const credentialsState = this.userInfo.credentials_state;
console.log(idType, credentialsState)
if (idType <= 0 && credentialsState === 0) {
if (idType < 0 && credentialsState <= 1) {
//
uni.navigateTo({
url: '/pages/ruzhu/ruzhu?type=1'
});
} else if (idType <= 0 && credentialsState === 0) {
//
uni.navigateTo({
url: '/pages/ruzhu/ruzhu'

View File

@ -2,8 +2,8 @@
<view class="collection-page">
<custom-navbar title="我的收藏" :showBack="true" backgroundColor="#FFFFFF" :show-headle="true" borderBottom="none"
headleSrc="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/51ebca5d-95c5-4fb8-8aa3-560a79100d25.png"
@onHeadleClick="goToSearch">
headleSrc="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/b18bac2f-3e4c-4586-9d45-0f088629c9d1.png"
@onHeadleClick="goToSearch" class="serch-tap">
</custom-navbar>
<view class="tab-bar-wrap" :style="{ top: navHeight + 'px' }">
@ -16,11 +16,7 @@
收藏的课程
</view>
</view>
<view class="filter-area" @tap="toggleFilterPanel"
v-if="currentTab === 'brand' ? rawBrandList.length > 0 : rawCourseList.length > 0">
<text class="filter-text">筛选</text>
<image class="filter-icon" :src="filterIcon" mode="aspectFit" :class="{ 'rotate': filterVisible }"></image>
</view>
</view>
</view>
@ -449,7 +445,7 @@ export default {
&.active {
color: #FF4767;
background: #FFECEF;
border: 1rpx solid #FFB0BD;
border: 2rpx solid #FFB0BD;
border-radius: 29rpx;
}
}
@ -633,8 +629,9 @@ export default {
/* 内容区缩进补充 */
.collection-content {
padding: 0 24rpx;
padding: 0 24rpx 24rpx;
margin-top: 20rpx;
overflow: hidden;
}
.brand-grid {
@ -667,7 +664,7 @@ export default {
}
::v-deep .icon-headle {
width: 32rpx !important;
height: 32rpx !important;
width: 36rpx !important;
height: 36rpx !important;
}
</style>

View File

@ -21,10 +21,10 @@
</view>
</scroll-view>
</view>
<CommonList ref="groupRef" :isLogin="isLogin" :apiUrl="apiUrl"
:listScrollHeight="`calc(100vh - 280rpx - 100rpx)`" @load-success="loadSuccess">
<template #listData="{ list }">
<view style="background-color: #f5f5f5; height: 20rpx"></view>
<CommonList nList ref="groupRef" :isLogin="isLogin" :apiUrl="apiUrl"
:listScrollHeight="`calc(100vh - 280rpx - 20rpx)`" @load-success="loadSuccess" class="nodatamit">
<template #listData="{ list }" class="commit">
<view class="order-item-wrap" v-for="item in popList" :key="item.id">
<OrderCard v-if="activeFirstId != 3" :haveButton="haveButton" :dataItem="item"
:typeId="activeFirstId" @cancel="cancelOrder($event, item)" @start="startOrder($event, item)"
@ -582,13 +582,13 @@ export default {
/* #endif */
left: 0;
right: 0;
background: #fff;
background: #fafafa;
z-index: 99;
}
.status-tabs {
height: 94rpx;
background-color: #ffffff;
background-color: #fafafa;
white-space: nowrap;
}
@ -624,7 +624,7 @@ export default {
.status-tabs2 {
height: 56rpx;
background-color: #ffffff;
background-color: #fafafa;
white-space: nowrap;
padding-bottom: 30rpx;
padding-top: 10rpx;
@ -654,8 +654,7 @@ export default {
/* 数据列表及卡片外框样式 */
.order-item-wrap {
background-color: #fff;
border-radius: 12px;
background-color: #f5f5f5;
overflow: hidden;
}
@ -704,4 +703,8 @@ export default {
box-sizing: border-box;
/* padding-top: 24rpx; */
}
.nodatamit {
background-color: #f5f5f5;
}
</style>

View File

@ -13,13 +13,8 @@
</view>
</view>
<view class="service-time-card">
<view class="card-header-flex" @click="isExpandTime = !isExpandTime">
<text class="header-title">{{ isExpandTime ? '服务时间' : '设置服务时间' }}</text>
<image class="arrow-icon" :class="{ 'rotated': isExpandTime }" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/6cfe4592-e9c6-45b6-ac45-625bc361aded.png"></image>
</view>
<view class="time-content" v-if="isExpandTime">
<view class="service-time-card" v-if="hasBusinessTime">
<view class="time-content">
<view class="time-blocks-container">
<view class="t-block">
<text class="t-time">{{ formatTime(startTime) }}</text>
@ -33,15 +28,29 @@
</view>
<view class="modify-btn-outline" @click="showTimePicker" v-if="!showBottomActions && !showTimePickerFlag">
<image class="edit-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/d67adcda-d334-440f-87d4-d709983b0101.png"></image>
<image class="edit-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/d67adcda-d334-440f-87d4-d709983b0101.png">
</image>
<text>修改服务时间</text>
</view>
</view>
</view>
<view class="service-time-card1" v-if="!hasBusinessTime">
<view class="modify-btn-outline1" @click="showTimePicker">
<image class="edit-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/176a8b35-14bd-4cd1-a187-4165d07c0dcb.png">
</image>
<text>设置服务时间</text>
</view>
</view>
<view class="setup-modal-mask" v-if="showSetupModal" catchtouchmove="true">
<view class="setup-modal-content">
<image class="modal-bg" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/ac2cb4aa-a7c5-4776-98f4-b77e9c0cfa85.png"></image>
<image class="modal-bg"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/ac2cb4aa-a7c5-4776-98f4-b77e9c0cfa85.png">
</image>
<view class="modal-header">
<text>温馨提示</text>
@ -53,7 +62,9 @@
<view class="missing-list">
<view class="missing-item" v-if="!hasBusinessTime">
<view class="item-left">
<image class="item-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/21b26b44-5e36-4291-8900-705a3d5bfa90.png"></image>
<image class="item-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/21b26b44-5e36-4291-8900-705a3d5bfa90.png">
</image>
<view class="item-texts">
<text class="item-title">营业时间未配置</text>
<text class="item-desc">请完善店铺的营业时间</text>
@ -64,7 +75,9 @@
<view class="missing-item" v-if="!hasServiceSkill">
<view class="item-left">
<image class="item-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/21b26b44-5e36-4291-8900-705a3d5bfa90.png"></image>
<image class="item-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/21b26b44-5e36-4291-8900-705a3d5bfa90.png">
</image>
<view class="item-texts">
<text class="item-title">服务技能未配置</text>
<text class="item-desc">请完善服务技能</text>
@ -75,9 +88,13 @@
<view class="missing-item" v-if="!isCertified">
<view class="item-left">
<image class="item-icon" :src="isUnderReview ? 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/25c444be-a66e-45d6-b50d-922149ff059f.png' : 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/21b26b44-5e36-4291-8900-705a3d5bfa90.png'"></image>
<image class="item-icon"
:src="isUnderReview ? 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/25c444be-a66e-45d6-b50d-922149ff059f.png' : 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/21b26b44-5e36-4291-8900-705a3d5bfa90.png'">
</image>
<view class="item-texts">
<text class="item-title" :class="{'blue-text': isUnderReview}">{{ isUnderReview ? '资质认证中' : '资质未认证' }}</text>
<text class="item-title" :class="{ 'blue-text': isUnderReview }">{{ isUnderReview ? '资质认证中' :
'资质未认证'
}}</text>
<text class="item-desc">请完成资质认证</text>
</view>
</view>
@ -103,14 +120,12 @@
<text class="confirm-text" @click="confirmTime">确定</text>
</view>
<view class="time-range">
<view class="time-block" :class="{ active: timeType === 'start' }"
@click="switchTimeType('start')">
<view class="time-block" :class="{ active: timeType === 'start' }" @click="switchTimeType('start')">
<text class="time-value-picker">{{ formatTime(startTime) }}</text>
<text class="time-label">开始时间</text>
</view>
<text class="time-separator"></text>
<view class="time-block" :class="{ active: timeType === 'end' }"
@click="switchTimeType('end')">
<view class="time-block" :class="{ active: timeType === 'end' }" @click="switchTimeType('end')">
<text class="time-value-picker">{{ formatTime(endTime) }}</text>
<text class="time-label">结束时间</text>
</view>
@ -189,7 +204,7 @@ export default {
authDetails: null,
sjId: null,
showSetupModal: false,
isExpandTime: false, // falsetrue
isExpandTime: true, //
isLogin: true //
}
},
@ -334,15 +349,15 @@ export default {
const currentStatus = this.userInfo.order_taking;
const isCurrentlyResting = currentStatus != 1; //
//
if (isCurrentlyResting && !this.canOpenStore) {
this.showSetupModal = true;
return;
}
//
let newStatus = currentStatus == 1 ? 2 : 1;
//
if (newStatus === 1 && !this.hasBusinessTime) {
uni.showToast({ title: '请配置营业时间', icon: 'none' });
return;
}
uni.showLoading({ title: '切换中...', mask: true });
request.post("/sj/sjordertaking", {
@ -431,12 +446,10 @@ export default {
return `${time.hour}:${time.minute}`
},
//
// -
confirmTime() {
const newTime = `${this.formatTime(this.startTime)}-${this.formatTime(this.endTime)}`
console.log('选择的时间:', newTime) //
//
if (!this.validateTime(this.startTime, this.endTime)) {
uni.showToast({
@ -447,12 +460,9 @@ export default {
}
this.tempTime = newTime
this.showBottomActions = true
this.hideTimePicker()
//
this.currentTime = newTime
console.log('临时存储的时间:', this.tempTime) //
this.hideTimePicker()
this.submitChange()
},
//
@ -501,10 +511,6 @@ export default {
title: '营业时间更新成功',
icon: 'none'
})
setTimeout(() => {
uni.navigateBack()
}, 1500)
} else {
uni.showToast({
title: res.msg || '提交失败',
@ -551,11 +557,13 @@ export default {
padding: 18rpx 24rpx;
margin-bottom: 34rpx;
}
.setting-label {
font-size: 30rpx;
color: #333;
font-weight: 500;
}
.custom-switch {
width: 140rpx;
height: 56rpx;
@ -578,16 +586,24 @@ export default {
transition: opacity 0.3s;
font-weight: 500;
}
.text-on {
left: 12rpx;
opacity: 0;
}
.text-off {
right: 12rpx;
opacity: 1;
}
&.is-on .text-on { opacity: 1; }
&.is-on .text-off { opacity: 0; }
&.is-on .text-on {
opacity: 1;
}
&.is-on .text-off {
opacity: 0;
}
.switch-dot {
width: 48rpx;
@ -599,6 +615,7 @@ export default {
transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.15);
}
&.is-on .switch-dot {
transform: translateX(84rpx);
}
@ -610,32 +627,47 @@ export default {
border-radius: 20rpx;
padding: 24rpx 24rpx;
}
.service-time-card1 {
width: 710rpx;
height: 80rpx;
background: #FFFFFF;
border-radius: 20rpx;
}
.card-header-flex {
display: flex;
justify-content: space-between;
align-items: center;
}
.header-title {
font-size: 30rpx;
color: #333;
font-weight: 500;
transition: all 0.3s ease-in-out;
}
.arrow-icon {
width: 16rpx;
height: 9rpx;
transition: transform 0.3s;
transform: rotate(-360deg); /* 默认朝下 */
transform: rotate(-360deg);
/* 默认朝下 */
}
.arrow-icon.rotated {
transform: rotate(180deg); /* 展开朝上 */
transform: rotate(180deg);
/* 展开朝上 */
}
.time-blocks-container {
margin-top: 40rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.t-block {
width: 280rpx;
height: 150rpx;
@ -646,26 +678,30 @@ export default {
justify-content: center;
align-items: center;
}
.t-time {
font-size: 42rpx;
color: #333;
font-weight: 500;
}
.t-label {
font-size: 24rpx;
color: #999;
margin-top: 12rpx;
}
.t-separator {
font-weight: 400;
font-size: 28rpx;
color: #999999;
line-height: 40rpx;
}
.modify-btn-outline {
margin-top: 50rpx;
height: 78rpx;
border-radius: 43rpx;
border-radius: 50rpx;
border: 1rpx solid #FF4767;
display: flex;
align-items: center;
@ -674,6 +710,18 @@ export default {
font-size: 28rpx;
margin-bottom: 10rpx;
}
.modify-btn-outline1 {
margin-top: 50rpx;
height: 78rpx;
border-radius: 50rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
margin-bottom: 10rpx;
}
.edit-icon {
width: 30rpx;
height: 30rpx;
@ -683,7 +731,10 @@ export default {
/* ============ 提示弹窗样式 (完全一致) ============ */
.setup-modal-mask {
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 9999;
display: flex;
@ -701,7 +752,8 @@ export default {
.modal-bg {
position: absolute;
top: 0; left: 0;
top: 0;
left: 0;
width: 630rpx;
height: 265rpx;
z-index: 0;
@ -786,9 +838,17 @@ export default {
font-weight: 400;
margin-top: -45rpx;
&.orange { color: #FF7B00; }
&.grey { color: #999999; }
&.light-green { color: #18b566; }
&.orange {
color: #FF7B00;
}
&.grey {
color: #999999;
}
&.light-green {
color: #18b566;
}
}
}
}
@ -957,7 +1017,8 @@ export default {
gap: 50rpx;
}
.btn-cancel-large, .btn-confirm-large {
.btn-cancel-large,
.btn-confirm-large {
font-size: 34rpx;
flex: 1;
font-weight: 400;

View File

@ -167,6 +167,10 @@
async onLoad() {
this.sjInformation = await request.post('/sj/user/getUser');
await this.initPage();
//
if (this.currentSkills.length === 0 && !this.originalMajor) {
this.startChange();
}
},
onReady() {
// padding
@ -177,7 +181,7 @@
async initPage() {
this.isLoading = true;
try {
this.originalMajor = this.sjInformation?.data?.major || null;
this.originalMajor = this.sjInformation?.data?.major ? Number(this.sjInformation.data.major) : null;
this.displayMajor = this.originalMajor;
//

View File

@ -14,7 +14,7 @@
<input class="hidden-input" type="text" maxlength="6" :value="code" :focus="inputFocus"
:selection-start="cursorPos" :selection-end="cursorPos" @input="onInput" @blur="onBlur" confirm-type="done" />
<button class="confirm-btn" :class="{ active: code.length === 6 }" @tap="submitCode">
<button class="confirm-btn" :class="{ active: code.length === 6 }" :disabled="code.length < 6" @tap="submitCode">
确认
</button>
</view>
@ -146,6 +146,12 @@ export default {
&.active {
background: #FF4767;
}
&[disabled] {
opacity: 1;
background: #ff476685;
color: #fff;
}
}
.hidden-input {

View File

@ -9,7 +9,7 @@
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/be13b4f4-c0db-4f39-b9fc-0e69c13b72ee.png"
mode="aspectFit"></image>
<view class="header-text-box">
<view class="header-title">工时订单</view>
<view class="header-title">{{ orderTypeText }}</view>
<view class="header-sub">请确认核销订单信息</view>
</view>
</view>
@ -70,6 +70,19 @@
import request from "@/utils/request";
export default {
computed: {
orderTypeText() {
const map = {
1: '用户订单',
2: '商家订单',
3: '工时订单',
4: '工位订单',
5: '铁军线上缴费订单',
6: '自营订单'
};
return map[this.orderData.orderType] || '工时订单';
}
},
data() {
return {
statusBarHeight: 44,
@ -101,6 +114,7 @@ export default {
try {
const parsedData = JSON.parse(decodeURIComponent(options.data));
this.mapOrderData(parsedData);
console.log(parsedData, '-==-=-=-=-=-=parsedData=-=-=-=-=parsedData')
} catch (e) {
console.error('解析订单数据失败', e);
uni.showToast({ title: '订单数据异常', icon: 'none' });
@ -157,6 +171,7 @@ export default {
doVerify() {
this.isVerifying = true;
uni.showLoading({ title: '核销中...', mask: true });
console.log(this.orderData, '------------------parsedData')
//
request.post('/sj/poster/useOrderServerCode', {
@ -167,9 +182,19 @@ export default {
uni.hideLoading();
if (res.code === 200) {
uni.showToast({ title: '核销成功', icon: 'success' });
uni.navigateTo({
url:'/pages/order/userorder-detail?order_id='+this.orderData.orderId
})
const orderId = this.orderData.orderId;
const orderType = this.orderData.orderType;
let url = '';
if (orderType == 3) {
url = `/pages/shop/SellerDetail?order_id=${orderId}`;
} else if (orderType == 2 || orderType == 5) {
url = `/pages/shop/userorder-detail?order_id=${orderId}&serviceType=2`;
} else {
url = `/pages/shop/userorder-detail?order_id=${orderId}`;
}
setTimeout(() => {
uni.navigateTo({ url });
}, 1500);
} else {
uni.showToast({ title: res.msg || '核销失败,请重试', icon: 'none' });
this.isVerifying = false;

View File

@ -87,7 +87,6 @@ export default {
console.log(result,'resultresultresultresult0.0.0.0.0.0')
uni.hideLoading();
if (result.code == 200) {
result.data.server_code = code;
uni.showToast({ title: '扫码成功!', icon: 'none' });
const orderDataStr = encodeURIComponent(JSON.stringify(result.data));
uni.navigateTo({