修复若干bug
This commit is contained in:
parent
f72f164fd8
commit
2fcfba42ea
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -89,8 +89,12 @@
|
|||
"path": "pages/order/userorder-list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
"navigationBarBackgroundColor": "#FFFFFF",
|
||||
"app-plus": {
|
||||
"softinputNavBar": "none"
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
"path": "pages/order/userorder-detail",
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1,40 +1,24 @@
|
|||
<template>
|
||||
<view>
|
||||
<custom-navbar
|
||||
title="精选品牌"
|
||||
:leftImg="'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/60ae3383-6ff6-4f42-818b-d9b09a9bd0e0.png'"
|
||||
<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"
|
||||
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"
|
||||
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>
|
||||
|
|
@ -48,7 +32,7 @@
|
|||
<image class="arrow-icon" :src="orderType === 2 ? iconPinkDown : iconGreyDown"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="sort-item" @tap="toggleSort('view')">
|
||||
<text class="sort-text" :class="{ active: orderType === 3 || orderType === 4 }">浏览量</text>
|
||||
<view class="arrows">
|
||||
|
|
@ -61,16 +45,10 @@
|
|||
|
||||
<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)"
|
||||
/>
|
||||
</view>
|
||||
<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)" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -98,19 +76,19 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
statusBarHeight: 0,
|
||||
navHeight: 0,
|
||||
|
||||
navHeight: 0,
|
||||
|
||||
// 当前选中的一级/二级分类ID(页面顶部点击用)
|
||||
activeId: "",
|
||||
currentSecondClass: "",
|
||||
tabs: [],
|
||||
iconTabs: [],
|
||||
|
||||
activeId: "",
|
||||
currentSecondClass: "",
|
||||
tabs: [],
|
||||
iconTabs: [],
|
||||
|
||||
selectedSecondIds: [], // 抽屉里选中的分类ID
|
||||
|
||||
|
||||
// 额外筛选参数
|
||||
orderType: 0,
|
||||
|
||||
orderType: 0,
|
||||
|
||||
// 排序图标资源
|
||||
iconGreyUp: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/e00ab2ac-bccf-42d8-820c-65727327e279.png',
|
||||
iconGreyDown: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/dfffb601-6877-4608-a3eb-88695b05c6c2.png',
|
||||
|
|
@ -121,13 +99,13 @@ export default {
|
|||
onLoad(options) {
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
this.statusBarHeight = systemInfo.statusBarHeight;
|
||||
this.navHeight = this.statusBarHeight + 44;
|
||||
this.navHeight = this.statusBarHeight + 44;
|
||||
|
||||
if (options.id) {
|
||||
this.activeId = options.id;
|
||||
}
|
||||
this.getFirstClass();
|
||||
|
||||
|
||||
// 初始化时一并获取抽屉内的级联字典数据
|
||||
this.loadFilterCategories();
|
||||
},
|
||||
|
|
@ -142,11 +120,11 @@ export default {
|
|||
// 加载一级分类并自动组装其对应的二级分类,兼容 state === 1
|
||||
async loadFilterCategories() {
|
||||
try {
|
||||
const syrId = uni.getStorageSync('syrId') || 1;
|
||||
const syrId = uni.getStorageSync('syrId') || 1;
|
||||
const res = await request.post('/sj/firstclass', { id: syrId })
|
||||
if ((res.code === 200 || res.state === 1) && res.data) {
|
||||
const firstClasses = res.data;
|
||||
|
||||
|
||||
// 并发请求所有的二级分类
|
||||
const promises = firstClasses.map(async (first) => {
|
||||
try {
|
||||
|
|
@ -156,11 +134,11 @@ export default {
|
|||
title: first.title,
|
||||
children: ((subRes.code === 200 || subRes.state === 1) && subRes.data) ? subRes.data : []
|
||||
}
|
||||
} catch(e) {
|
||||
} catch (e) {
|
||||
return { id: first.id, title: first.title, children: [] }
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
const filterData = await Promise.all(promises);
|
||||
// 过滤掉没有子分类的项,避免面板出现光秃秃的标题
|
||||
this.brandFilterData = filterData.filter(group => group.children.length > 0);
|
||||
|
|
@ -171,7 +149,7 @@ export default {
|
|||
console.error('获取分类字典失败', error)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// ============ 排序逻辑 ============
|
||||
toggleSort(type) {
|
||||
if (type === 'time') {
|
||||
|
|
@ -202,29 +180,29 @@ export default {
|
|||
},
|
||||
|
||||
selectSecondClass(id) {
|
||||
if(this.currentSecondClass === id){
|
||||
if (this.currentSecondClass === id) {
|
||||
this.currentSecondClass = "";
|
||||
} else {
|
||||
this.currentSecondClass = id;
|
||||
}
|
||||
// 页面上点击了圆形图标,则清空抽屉里的选择
|
||||
this.selectedSecondIds = [];
|
||||
this.selectedSecondIds = [];
|
||||
this.refreshBrandList();
|
||||
},
|
||||
|
||||
tabClick(id) {
|
||||
if (this.activeId === id) return;
|
||||
this.activeId = id;
|
||||
this.currentSecondClass = "";
|
||||
this.getSecondClassList();
|
||||
this.currentSecondClass = "";
|
||||
this.getSecondClassList();
|
||||
this.refreshBrandList();
|
||||
},
|
||||
|
||||
// ============ 刷新列表核心 ============
|
||||
refreshBrandList() {
|
||||
// 如果抽屉里选了分类,优先传抽屉的参数;否则传圆形图标选中的分类
|
||||
const targetSecondClass = this.selectedSecondIds.length > 0
|
||||
? this.selectedSecondIds.join(',')
|
||||
const targetSecondClass = this.selectedSecondIds.length > 0
|
||||
? this.selectedSecondIds.join(',')
|
||||
: this.currentSecondClass;
|
||||
|
||||
const params = {
|
||||
|
|
@ -238,7 +216,7 @@ export default {
|
|||
if (params[key] === undefined) delete params[key];
|
||||
});
|
||||
|
||||
if(this.$refs.brandListRef) {
|
||||
if (this.$refs.brandListRef) {
|
||||
this.$refs.brandListRef.manualRefresh(params);
|
||||
}
|
||||
},
|
||||
|
|
@ -250,7 +228,7 @@ export default {
|
|||
if (brand.franchise_state === 1) tagKeys.push('franchise');
|
||||
if (brand.student_state === 1) tagKeys.push('recruit');
|
||||
if (tagKeys.length === 0) tagKeys.push('more');
|
||||
|
||||
|
||||
return {
|
||||
...brand,
|
||||
name: brand.name,
|
||||
|
|
@ -289,41 +267,54 @@ export default {
|
|||
z-index: 101;
|
||||
}
|
||||
|
||||
::v-deep .service-first-tab{
|
||||
box-shadow: none !important;
|
||||
::v-deep .service-first-tab {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
/* ================= 抽屉下拉样式 ================= */
|
||||
.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;
|
||||
background: rgba(0,0,0,0.4);
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
|
||||
.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;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-shadow: 0 10rpx 20rpx rgba(0,0,0,0.05);
|
||||
box-shadow: 0 10rpx 20rpx rgba(0, 0, 0, 0.05);
|
||||
transform: translateY(-100%);
|
||||
transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
|
||||
}
|
||||
|
|
@ -332,6 +323,7 @@ export default {
|
|||
.filter-scroll {
|
||||
max-height: 50vh;
|
||||
}
|
||||
|
||||
.filter-group {
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
|
|
@ -346,30 +338,33 @@ 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;
|
||||
|
||||
|
||||
/* flex 居中文字 */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
|
||||
border-radius: 12rpx;
|
||||
transition: all 0.3s;
|
||||
box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
white-space: nowrap;
|
||||
|
||||
|
||||
&.active {
|
||||
background: #FFF0F2;
|
||||
color: #FF4767;
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/* ================= 其他页面样式 ================= */
|
||||
|
|
@ -402,7 +407,7 @@ export default {
|
|||
column-gap: 36rpx;
|
||||
row-gap: 30rpx;
|
||||
background: transparent;
|
||||
padding: 0 0 0 30rpx;
|
||||
padding: 0 0 0 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
|
|
@ -416,7 +421,7 @@ export default {
|
|||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
border: 2rpx solid transparent;
|
||||
border: 2rpx solid transparent;
|
||||
}
|
||||
|
||||
.icon-text {
|
||||
|
|
@ -444,30 +449,30 @@ export default {
|
|||
padding: 0 30rpx;
|
||||
margin-bottom: 24rpx;
|
||||
gap: 100rpx;
|
||||
|
||||
|
||||
.sort-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
|
||||
.sort-text {
|
||||
font-weight: 400;
|
||||
font-size: 26rpx;
|
||||
color: #666666;
|
||||
line-height: 37rpx;
|
||||
margin-right: 6rpx;
|
||||
|
||||
|
||||
&.active {
|
||||
color: #FF4767;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.arrows {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
|
||||
.arrow-icon {
|
||||
width: 13rpx;
|
||||
height: 8rpx;
|
||||
|
|
@ -479,10 +484,11 @@ export default {
|
|||
|
||||
// 品牌卡片网格
|
||||
.zhanwei {
|
||||
background-color: #f5f5f5;
|
||||
padding: 20rpx 0 0 0 ;
|
||||
border-radius: 20rpx 20rpx 0rpx 0rpx;
|
||||
background-color: #f5f5f5;
|
||||
padding: 20rpx 0 0 0;
|
||||
border-radius: 20rpx 20rpx 0rpx 0rpx;
|
||||
}
|
||||
|
||||
.brand-grid {
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
|
|
@ -491,9 +497,9 @@ export default {
|
|||
padding: 20rpx 24rpx;
|
||||
row-gap: 24rpx;
|
||||
border-radius: 20rpx 20rpx 0rpx 0rpx;
|
||||
|
||||
|
||||
.brand-card-wrap {
|
||||
width: 48.5%;
|
||||
width: 48.5%;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -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>
|
||||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
<template>
|
||||
<view class="service-time-page">
|
||||
<custom-navbar title="营业设置" :showBack="true"></custom-navbar>
|
||||
|
||||
|
||||
<view class="content">
|
||||
|
||||
|
||||
<view class="setting-row">
|
||||
<text class="setting-label">当前接单状态</text>
|
||||
<view class="custom-switch" :class="{ 'is-on': isOpenStore }" @click="toggleStatus">
|
||||
|
|
@ -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>
|
||||
|
|
@ -31,29 +26,45 @@
|
|||
<text class="t-label">结束时间</text>
|
||||
</view>
|
||||
</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>
|
||||
</view>
|
||||
|
||||
<view class="modal-body">
|
||||
<text class="modal-subtitle">发布服务请完善以下资料:</text>
|
||||
|
||||
|
||||
<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,29 +120,27 @@
|
|||
<text class="confirm-text" @click="confirmTime">确定</text>
|
||||
</view>
|
||||
<view class="time-range">
|
||||
<view class="time-block" :class="{ active: timeType === 'start' }"
|
||||
@click="switchTimeType('start')">
|
||||
<text class="time-value-picker">{{formatTime(startTime)}}</text>
|
||||
<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')">
|
||||
<text class="time-value-picker">{{formatTime(endTime)}}</text>
|
||||
<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>
|
||||
</view>
|
||||
<view class="region-body">
|
||||
<picker-view :value="pickerValue" @change="handleTimeChange" class="picker-scroll"
|
||||
:indicator-style="indicatorStyle">
|
||||
:indicator-style="indicatorStyle">
|
||||
<picker-view-column>
|
||||
<view class="picker-item" v-for="(hour, index) in hours" :key="index">
|
||||
{{hour}}
|
||||
{{ hour }}
|
||||
</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view class="picker-item" v-for="(minute, index) in minutes" :key="index">
|
||||
{{minute}}
|
||||
{{ minute }}
|
||||
</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
|
|
@ -133,12 +148,12 @@
|
|||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view class="picker-item" v-for="(hour, index) in hours" :key="index">
|
||||
{{hour}}
|
||||
{{ hour }}
|
||||
</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view class="picker-item" v-for="(minute, index) in minutes" :key="index">
|
||||
{{minute}}
|
||||
{{ minute }}
|
||||
</view>
|
||||
</picker-view-column>
|
||||
</picker-view>
|
||||
|
|
@ -167,14 +182,14 @@ export default {
|
|||
tempTime: '', // 临时存储选择的时间
|
||||
showTimePickerFlag: false,
|
||||
showBottomActions: false, // 控制底部按钮显示
|
||||
|
||||
|
||||
// 五列选择器相关数据
|
||||
pickerValue: [8, 0, 0, 18, 0],
|
||||
hours: Array.from({ length: 24 }, (_, i) => i < 10 ? `0${i}` : `${i}`),
|
||||
minutes: Array.from({ length: 60 }, (_, i) => i < 10 ? `0${i}` : `${i}`),
|
||||
timeType: 'start',
|
||||
indicatorStyle: 'height: 68rpx;',
|
||||
|
||||
|
||||
startTime: {
|
||||
hour: '09',
|
||||
minute: '00'
|
||||
|
|
@ -189,7 +204,7 @@ export default {
|
|||
authDetails: null,
|
||||
sjId: null,
|
||||
showSetupModal: false,
|
||||
isExpandTime: false, // 控制服务时间卡片的折叠(false)与展开(true)
|
||||
isExpandTime: true, // 默认展开服务时间
|
||||
isLogin: true // 默认已登录
|
||||
}
|
||||
},
|
||||
|
|
@ -198,9 +213,9 @@ export default {
|
|||
isUnderReview() {
|
||||
if (!this.isLogin) return false;
|
||||
if (this.authDetails && Object.keys(this.authDetails).length > 0) {
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return false;
|
||||
},
|
||||
// 判断是否具备接单的大前提条件
|
||||
canOpenStore() {
|
||||
|
|
@ -215,13 +230,13 @@ export default {
|
|||
// 当前开关状态显示
|
||||
isOpenStore() {
|
||||
if (!this.canOpenStore) {
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
return this.userInfo.order_taking == 1;
|
||||
return this.userInfo.order_taking == 1;
|
||||
},
|
||||
isSettled() {
|
||||
if (!this.isLogin || typeof this.userInfo.id_type === 'undefined') return false;
|
||||
return this.userInfo.id_type !== 0;
|
||||
return this.userInfo.id_type !== 0;
|
||||
},
|
||||
isCertified() {
|
||||
if (!this.isLogin || typeof this.userInfo.id_type === 'undefined') return false;
|
||||
|
|
@ -249,7 +264,7 @@ export default {
|
|||
// 同步给页面 userInfo 对象,以驱动计算属性与弹窗开关
|
||||
this.userInfo = res.data;
|
||||
this.sjId = res.data.id;
|
||||
|
||||
|
||||
// 检查营业时间字段
|
||||
if (res.data.business_time) {
|
||||
this.currentTime = res.data.business_time
|
||||
|
|
@ -277,7 +292,7 @@ export default {
|
|||
this.currentTime = '09:00-21:00'
|
||||
this.originalTime = '09:00-21:00'
|
||||
this.parseTimeString('09:00-21:00')
|
||||
|
||||
|
||||
// uni.showToast({
|
||||
// title: '加载营业时间失败,使用默认时间',
|
||||
// icon: 'none'
|
||||
|
|
@ -288,8 +303,8 @@ export default {
|
|||
// 弹窗路由:获取入驻详情
|
||||
fetchAuthDetails() {
|
||||
request.post("/sj/userSjAuth/details", {
|
||||
type: 1,
|
||||
id_type: '1'
|
||||
type: 1,
|
||||
id_type: '1'
|
||||
}).then(res => {
|
||||
if (res.code == 200 && res.data) {
|
||||
this.authDetails = res.data;
|
||||
|
|
@ -334,20 +349,20 @@ export default {
|
|||
const currentStatus = this.userInfo.order_taking;
|
||||
const isCurrentlyResting = currentStatus != 1; // 当前不是营业中即为休息中
|
||||
|
||||
// 强力拦截:在休息中且三大件没配全,想要接单时直接拦截弹窗
|
||||
if (isCurrentlyResting && !this.canOpenStore) {
|
||||
this.showSetupModal = true;
|
||||
// 准备切换的新状态
|
||||
let newStatus = currentStatus == 1 ? 2 : 1;
|
||||
|
||||
// 想要开始接单时,检查是否配置了营业时间
|
||||
if (newStatus === 1 && !this.hasBusinessTime) {
|
||||
uni.showToast({ title: '请配置营业时间', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
// 准备切换的新状态
|
||||
let newStatus = currentStatus == 1 ? 2 : 1;
|
||||
|
||||
uni.showLoading({ title: '切换中...', mask: true });
|
||||
|
||||
request.post("/sj/sjordertaking", {
|
||||
order_taking: newStatus,
|
||||
sjid: this.sjId
|
||||
sjid: this.sjId
|
||||
}).then((res) => {
|
||||
uni.hideLoading();
|
||||
this.userInfo.order_taking = newStatus; // 本地状态切换
|
||||
|
|
@ -365,7 +380,7 @@ export default {
|
|||
if (times.length === 2) {
|
||||
const startParts = times[0].split(':')
|
||||
const endParts = times[1].split(':')
|
||||
|
||||
|
||||
if (startParts.length === 2) {
|
||||
this.startTime.hour = startParts[0]
|
||||
this.startTime.minute = startParts[1]
|
||||
|
|
@ -374,7 +389,7 @@ export default {
|
|||
this.endTime.hour = endParts[0]
|
||||
this.endTime.minute = endParts[1]
|
||||
}
|
||||
|
||||
|
||||
this.updatePickerValue()
|
||||
}
|
||||
},
|
||||
|
|
@ -385,7 +400,7 @@ export default {
|
|||
const startMinuteIndex = this.minutes.indexOf(this.startTime.minute)
|
||||
const endHourIndex = this.hours.indexOf(this.endTime.hour)
|
||||
const endMinuteIndex = this.minutes.indexOf(this.endTime.minute)
|
||||
|
||||
|
||||
this.pickerValue = [
|
||||
startHourIndex >= 0 ? startHourIndex : 8,
|
||||
startMinuteIndex >= 0 ? startMinuteIndex : 0,
|
||||
|
|
@ -416,11 +431,11 @@ export default {
|
|||
handleTimeChange(e) {
|
||||
const values = e.detail.value;
|
||||
this.pickerValue = values;
|
||||
|
||||
|
||||
// 更新开始时间
|
||||
this.startTime.hour = this.hours[values[0]]
|
||||
this.startTime.minute = this.minutes[values[1]]
|
||||
|
||||
|
||||
// 更新结束时间
|
||||
this.endTime.hour = this.hours[values[3]]
|
||||
this.endTime.minute = this.minutes[values[4]]
|
||||
|
|
@ -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({
|
||||
|
|
@ -445,14 +458,11 @@ export default {
|
|||
})
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
this.tempTime = newTime
|
||||
this.showBottomActions = true
|
||||
this.hideTimePicker()
|
||||
|
||||
// 立即更新页面显示
|
||||
this.currentTime = newTime
|
||||
console.log('临时存储的时间:', this.tempTime) // 调试日志
|
||||
this.hideTimePicker()
|
||||
this.submitChange()
|
||||
},
|
||||
|
||||
// 取消变更
|
||||
|
|
@ -473,7 +483,7 @@ export default {
|
|||
})
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
// uni.showLoading({
|
||||
// title: '提交中...'
|
||||
|
|
@ -487,24 +497,20 @@ export default {
|
|||
console.log('请求URL:', '/sj/userSjAuth/apply')
|
||||
|
||||
const res = await request.post('/sj/userSjAuth/apply', params)
|
||||
|
||||
|
||||
uni.hideLoading()
|
||||
console.log('提交接口响应:', res)
|
||||
|
||||
|
||||
// 根据接口文档,使用 code 判断成功
|
||||
if (res.code === 200) {
|
||||
this.showBottomActions = false
|
||||
this.tempTime = ''
|
||||
this.originalTime = this.currentTime // 更新原始时间
|
||||
|
||||
|
||||
uni.showToast({
|
||||
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;
|
||||
|
|
@ -566,11 +574,11 @@ export default {
|
|||
align-items: center;
|
||||
transition: background-color 0.3s;
|
||||
box-sizing: border-box;
|
||||
|
||||
|
||||
&.is-on {
|
||||
background-color: #FF4767;
|
||||
}
|
||||
|
||||
|
||||
.switch-text {
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
|
|
@ -578,17 +586,25 @@ 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;
|
||||
height: 48rpx;
|
||||
|
|
@ -597,8 +613,9 @@ export default {
|
|||
position: absolute;
|
||||
left: 4rpx;
|
||||
transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
|
||||
box-shadow: 0 2rpx 6rpx rgba(0,0,0,0.15);
|
||||
box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
&.is-on .switch-dot {
|
||||
transform: translateX(84rpx);
|
||||
}
|
||||
|
|
@ -610,62 +627,81 @@ 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;
|
||||
background: #F5F5F5 ;
|
||||
background: #F5F5F5;
|
||||
border-radius: 16rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
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,13 +731,16 @@ 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;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
|
||||
.setup-modal-content {
|
||||
width: 630rpx;
|
||||
height: 775rpx;
|
||||
|
|
@ -698,15 +749,16 @@ export default {
|
|||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
|
||||
.modal-bg {
|
||||
position: absolute;
|
||||
top: 0; left: 0;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 630rpx;
|
||||
height: 265rpx;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
|
||||
.modal-header {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
|
|
@ -715,7 +767,7 @@ export default {
|
|||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
|
||||
text {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
|
|
@ -723,34 +775,34 @@ export default {
|
|||
letter-spacing: 2rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.modal-body {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
flex: 1;
|
||||
padding: 24rpx 40rpx;
|
||||
|
||||
|
||||
.modal-subtitle {
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
margin-bottom: 40rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
.missing-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 46rpx;
|
||||
|
||||
|
||||
.missing-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
|
||||
.item-left {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
|
||||
|
||||
.item-icon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
|
|
@ -758,47 +810,55 @@ export default {
|
|||
flex-shrink: 0;
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
|
||||
|
||||
.item-texts {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
|
||||
.item-title {
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
font-weight: 500;
|
||||
margin-bottom: 8rpx;
|
||||
|
||||
|
||||
&.blue-text {
|
||||
color: #2b85e4;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.item-desc {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.item-right {
|
||||
font-size: 26rpx;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.modal-footer {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
padding: 0 50rpx 50rpx;
|
||||
|
||||
|
||||
.btn-know {
|
||||
width: 100%;
|
||||
height: 88rpx;
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Reference in New Issue