diff --git a/pages/artisan/profile.vue b/pages/artisan/profile.vue
index ba700bb..8e4e9f4 100644
--- a/pages/artisan/profile.vue
+++ b/pages/artisan/profile.vue
@@ -158,17 +158,16 @@
资质信息
-
-
-
- {{ userInfo.credentials_state === 0 ? '待完善' : userInfo.credentials_state === 1 ? '审核中' :
- '已认证' }}
-
+
+
+
+ {{ qualificationStatusText() }}
+
@@ -199,12 +198,15 @@ import request from "../../utils/request";
export default {
data() {
return {
- identity: '',
- currentUserId: '', // 当前用户ID
- userInfo: {}, // 用户信息
- sharing: false // 添加分享状态标记
- }
- },
+ identity: '',
+ currentUserId: '', // 当前用户ID
+ userInfo: {}, // 用户信息
+ authDetails: null,
+ qualificationAuditStatus: null,
+ isQualificationAuditLoaded: false,
+ sharing: false // 添加分享状态标记
+ }
+ },
onLoad() {
// 页面显示时重新加载身份信息,确保数据最新
this.loadIdentity()
@@ -492,12 +494,18 @@ export default {
type
})
- if (result.data && result.data.id) {
- this.userInfo = result.data
- this.currentUserId = result.data.id
-
- // 存储到本地,避免重复调用
- uni.setStorageSync('userInfo', result.data)
+ if (result.data && result.data.id) {
+ this.userInfo = result.data
+ this.currentUserId = result.data.id
+ this.fetchQualificationApplyDetails()
+ if (this.isSettled()) {
+ this.fetchAuthDetails()
+ } else {
+ this.authDetails = null
+ }
+
+ // 存储到本地,避免重复调用
+ uni.setStorageSync('userInfo', result.data)
console.log('从接口获取用户信息成功:', this.userInfo)
} else {
console.log('接口返回数据异常:', result)
@@ -512,8 +520,8 @@ export default {
},
// 备用方案:从其他位置获取用户信息
- tryAlternativeUserInfo() {
- try {
+ tryAlternativeUserInfo() {
+ try {
const app = getApp()
// 方法1: 从全局数据获取用户ID
@@ -544,10 +552,60 @@ export default {
console.log('所有获取用户信息的方法都失败了')
} catch (e) {
console.log('备用方案获取用户信息失败:', e)
- }
- },
-
- loadIdentity() {
+ }
+ },
+
+ fetchAuthDetails() {
+ return request.post("/sj/userSjAuth/details", {
+ type: 1,
+ id_type: '1'
+ }).then(res => {
+ if (res.code == 200 && res.data) {
+ this.authDetails = res.data;
+ }
+ return res;
+ });
+ },
+
+ fetchQualificationApplyDetails() {
+ this.isQualificationAuditLoaded = false;
+ return request.post('/sj/userSjAuth/details', {
+ apply_type: 4
+ }).then(res => {
+ if ((res.code == 200 || res.state == 1) && res.data) {
+ this.qualificationAuditStatus = Number(res.data.apply_state);
+ } else {
+ this.qualificationAuditStatus = null;
+ }
+ this.isQualificationAuditLoaded = true;
+ return res;
+ }).catch(error => {
+ console.log('获取资质信息申请详情失败:', error);
+ this.qualificationAuditStatus = null;
+ this.isQualificationAuditLoaded = true;
+ });
+ },
+
+ isSettled() {
+ return typeof this.userInfo.id_type !== 'undefined' && this.userInfo.id_type !== 0;
+ },
+
+ isCertified() {
+ return typeof this.userInfo.id_type !== 'undefined' && this.userInfo.id_type > 0;
+ },
+
+ isUnderReview() {
+ return this.authDetails && Object.keys(this.authDetails).length > 0;
+ },
+
+ async ensureAuthDetails() {
+ if (this.identity != '2' || !this.isSettled() || this.isUnderReview()) {
+ return;
+ }
+ await this.fetchAuthDetails();
+ },
+
+ loadIdentity() {
// 从全局数据获取身份
const app = getApp()
const globalIdentity = app.globalData.artisanType
@@ -630,50 +688,50 @@ export default {
})
},
- navigateToQualification() {
- const idType = this.userInfo.id_type;
- const credentialsState = this.userInfo.credentials_state;
-
- if (idType < 0 && credentialsState === 0) {
- // 驳回 + 仅填写基础信息 → 去完成资质认证
- uni.navigateTo({
- url: '/pages/ruzhu/ruzhu?type=2'
- });
- } else 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'
- });
- } else if (idType > 0 && credentialsState === 0) {
- // 已入驻 + 待完善
- uni.navigateTo({
- url: '/pages/shop/qualification_sj_change'
- });
- } else if (idType > 0 && credentialsState === 1) {
- // 已入驻 + 申请中
- uni.navigateTo({
- url: '/pages/shop/qualification_sj_change'
- });
- } else if (idType > 0 && credentialsState === 2) {
- // 已入驻 + 已完善
- uni.navigateTo({
- url: '/pages/shop/qualification_sj_change'
- });
- }
- },
-
- navigateToBelongShop() { // 手艺人:所属门店
- uni.navigateTo({
- url: '/pages/artisan/belong_shop'
- })
- }
- }
-}
+ async navigateToQualification() {
+ if (this.identity != '2' || this.isCertified()) {
+ uni.navigateTo({
+ url: '/pages/shop/qualification_sj_change'
+ });
+ return;
+ }
+
+ await this.ensureAuthDetails();
+ if (!this.isSettled()) {
+ uni.navigateTo({
+ url: '/pages/ruzhu/ruzhu'
+ });
+ } else if (this.isUnderReview()) {
+ uni.navigateTo({
+ url: '/pages/ruzhu/ruzhu?type=1'
+ });
+ } else {
+ uni.navigateTo({
+ url: '/pages/ruzhu/ruzhu?step=3'
+ });
+ }
+ },
+ navigateToBelongShop() { // 手艺人:所属门店
+ uni.navigateTo({
+ url: '/pages/artisan/belong_shop'
+ })
+ },
+ qualificationStatusText() {
+ if (this.qualificationAuditStatus == 3) return '审核未通过';
+ if (this.userInfo.id_type < 0) return '审核未通过';
+ if (this.qualificationAuditStatus == 1) return '审核中';
+ if (!this.isQualificationAuditLoaded) return '';
+ if (this.userInfo.credentials_state === 0) return '待完善';
+ if (this.userInfo.credentials_state === 1) return '审核中';
+ return '已认证';
+ },
+ qualificationStatusColor() {
+ if (this.qualificationAuditStatus == 3 || this.userInfo.id_type < 0 || this.userInfo.credentials_state === 0) return '#ec5d57';
+ if (this.qualificationAuditStatus == 1 || this.userInfo.credentials_state === 1) return '#e59e45';
+ return '#389930';
+ }
+ }
+}
\ No newline at end of file
+
diff --git a/pages/home/components/brand-card.vue b/pages/home/components/brand-card.vue
index 067acab..0a73cfd 100644
--- a/pages/home/components/brand-card.vue
+++ b/pages/home/components/brand-card.vue
@@ -187,7 +187,7 @@ export default {
}
.brand-name {
- font-size: 26rpx;
+ font-size: 28rpx;
font-weight: 500;
color: #333333;
line-height: 34rpx;
diff --git a/pages/home/components/skill-card.vue b/pages/home/components/skill-card.vue
index 2ec1994..fce4095 100644
--- a/pages/home/components/skill-card.vue
+++ b/pages/home/components/skill-card.vue
@@ -88,7 +88,7 @@ export default {
\ No newline at end of file
+
diff --git a/pages/jingxuan/selected-brands.vue b/pages/jingxuan/selected-brands.vue
index fc1f677..3a2d46c 100644
--- a/pages/jingxuan/selected-brands.vue
+++ b/pages/jingxuan/selected-brands.vue
@@ -28,16 +28,16 @@
发布时间
-
-
+
+
浏览量
-
-
+
+
@@ -153,9 +153,21 @@ export default {
// ============ 排序逻辑 ============
toggleSort(type) {
if (type === 'time') {
- this.orderType = this.orderType === 1 ? 2 : 1;
+ if (this.orderType === 1) {
+ this.orderType = 2;
+ } else if (this.orderType === 2) {
+ this.orderType = 0;
+ } else {
+ this.orderType = 1;
+ }
} else if (type === 'view') {
- this.orderType = this.orderType === 3 ? 4 : 3;
+ if (this.orderType === 3) {
+ this.orderType = 4;
+ } else if (this.orderType === 4) {
+ this.orderType = 0;
+ } else {
+ this.orderType = 3;
+ }
}
this.refreshBrandList();
},
@@ -522,4 +534,4 @@ export default {
width: 36rpx !important;
height: 36rpx !important;
}
-
\ No newline at end of file
+
diff --git a/pages/jingxuan/selected-skills.vue b/pages/jingxuan/selected-skills.vue
index 798e80f..444aa73 100644
--- a/pages/jingxuan/selected-skills.vue
+++ b/pages/jingxuan/selected-skills.vue
@@ -28,16 +28,16 @@
发布时间
-
-
+
+
浏览量
-
-
+
+
@@ -176,9 +176,11 @@ export default {
toggleSort(type) {
if (type === 'time') {
if (this.orderType === 1) this.orderType = 2
+ else if (this.orderType === 2) this.orderType = 0
else this.orderType = 1
} else if (type === 'view') {
if (this.orderType === 3) this.orderType = 4
+ else if (this.orderType === 4) this.orderType = 0
else this.orderType = 3
}
this.fetchData(true)
@@ -574,4 +576,4 @@ export default {
width: 36rpx !important;
height: 36rpx !important;
}
-
\ No newline at end of file
+
diff --git a/pages/my/my.vue b/pages/my/my.vue
index 8cf6a29..d3cceaf 100644
--- a/pages/my/my.vue
+++ b/pages/my/my.vue
@@ -781,17 +781,55 @@ export default {
});
this.getInviteList();
},
- // 获取入驻详情
- fetchAuthDetails() {
- request.post("/sj/userSjAuth/details", {
- type: 1,
- id_type: '1'
- }).then(res => {
- if (res.code == 200 && res.data) {
- this.authDetails = res.data;
- }
- });
- },
+ // 获取入驻详情
+ fetchAuthDetails() {
+ return request.post("/sj/userSjAuth/details", {
+ type: 1,
+ id_type: '1'
+ }).then(res => {
+ if (res.code == 200 && res.data) {
+ this.authDetails = res.data;
+ }
+ return res;
+ });
+ },
+ async ensureAuthDetails() {
+ if (!this.isSettled || (this.authDetails && Object.keys(this.authDetails).length > 0)) {
+ return;
+ }
+ await this.fetchAuthDetails();
+ },
+ navigateToCertificationForm() {
+ if (this.isSettled) {
+ uni.navigateTo({
+ url: '/pages/ruzhu/ruzhu?step=3'
+ });
+ } else {
+ uni.navigateTo({
+ url: '/pages/ruzhu/ruzhu'
+ });
+ }
+ },
+ async navigateToCertificationProcess() {
+ if (this.isCertified) {
+ uni.navigateTo({
+ url: '/pages/shop/qualification_sj_change'
+ });
+ return;
+ }
+ await this.ensureAuthDetails();
+ if (!this.isSettled) {
+ uni.navigateTo({
+ url: '/pages/ruzhu/ruzhu'
+ });
+ } else if (this.isUnderReview) {
+ uni.navigateTo({
+ url: '/pages/ruzhu/ruzhu?type=1'
+ });
+ } else {
+ this.navigateToCertificationForm();
+ }
+ },
async goLogin() {
// 添加访问检查
if (this.isAccountDisabled) {
@@ -841,11 +879,17 @@ export default {
return;
}
- // 2. 未登录 → 提示
- if (!this.isLogin) {
- uni.showToast({
- title: `您暂未登录,无法使用${item.title || item.text || ''}!`,
- icon: "none",
+ // 2. 未登录 → 提示
+ if (!this.isLogin) {
+ if (item.path == "/pages/ruzhu/ruzhu") {
+ uni.navigateTo({
+ url: "/pages/blogPopup/blogPopup",
+ });
+ return;
+ }
+ uni.showToast({
+ title: `您暂未登录,无法使用${item.title || item.text || ''}!`,
+ icon: "none",
});
return;
}
@@ -920,41 +964,9 @@ export default {
url: "/pages/artisan/profile",
});
},
- toruzhu() {
- const idType = this.userInfo.id_type;
- const credentialsState = this.userInfo.credentials_state;
- if (idType < 0 && credentialsState === 0) {
- // 驳回 + 仅填写基础信息 → 去完成资质认证
- uni.navigateTo({
- url: '/pages/ruzhu/ruzhu?type=2'
- });
- } else 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'
- });
- } else if (idType > 0 && credentialsState === 0) {
- // 已入驻 + 待完善
- uni.navigateTo({
- url: '/pages/shop/qualification_sj_change'
- });
- } else if (idType > 0 && credentialsState === 1) {
- // 已入驻 + 申请中
- uni.navigateTo({
- url: '/pages/shop/qualification_sj_change'
- });
- } else if (idType > 0 && credentialsState === 2) {
- // 已入驻 + 已完善
- uni.navigateTo({
- url: '/pages/shop/qualification_sj_change'
- });
- }
- },
+ toruzhu() {
+ this.navigateToCertificationProcess();
+ },
closeSetupModal() {
this.showSetupModal = false;
},
@@ -970,24 +982,10 @@ export default {
url: '/pages/shop/service-skills'
});
},
- goToAuth() {
- this.showSetupModal = false;
- if (this.isUnderReview) {
- uni.navigateTo({
- url: '/pages/ruzhu/ruzhu?type=1'
- });
- } else {
- if (this.isSettled) {
- uni.navigateTo({
- url: '/pages/ruzhu/ruzhu?step=3'
- });
- } else {
- uni.navigateTo({
- url: '/pages/ruzhu/ruzhu'
- });
- }
- }
- },
+ goToAuth() {
+ this.showSetupModal = false;
+ this.navigateToCertificationProcess();
+ },
goToInviteList() {
// 添加访问检查
if (this.isAccountDisabled) {
@@ -1705,7 +1703,7 @@ button::after {
gap: 12rpx;
margin-top: 10rpx;
width: auto;
- height: 36rpx;
+ height: 46rpx;
padding: 0 8rpx 0 8rpx;
background-image: url('https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/378a6936-a543-4ff5-9aa0-cfcb4d4e14b3.png');
background-size: 100% 100%;
@@ -1891,4 +1889,4 @@ button::after {
}
}
}
-
\ No newline at end of file
+
diff --git a/pages/order/userorder-list.vue b/pages/order/userorder-list.vue
index 1e70faa..53f36d7 100644
--- a/pages/order/userorder-list.vue
+++ b/pages/order/userorder-list.vue
@@ -1,5 +1,5 @@
-
+
@@ -21,7 +21,7 @@
-
+
@@ -41,10 +41,12 @@
-
-
- 前去登录
-
+
@@ -570,6 +572,7 @@ export default {
min-height: 100vh;
display: flex;
flex-direction: column;
+ background-color: #FAFAFA;
}
/* 状态标签栏 (移植自用户端示例) */
@@ -654,7 +657,7 @@ export default {
/* 数据列表及卡片外框样式 */
.order-item-wrap {
- background-color: #f5f5f5;
+ background-color: #FAFAFA;
overflow: hidden;
}
@@ -669,33 +672,15 @@ export default {
/* 未登录状态的样式 */
.nologin_part {
display: flex;
- flex-flow: column nowrap;
justify-content: center;
align-items: center;
+ width: 100%;
+ height: 100%;
}
.nologin_icon {
- width: 360rpx;
- height: 360rpx;
- margin-top: 100rpx;
- margin-bottom: 40rpx;
-}
-
-.btn-login {
- width: 200rpx;
- height: 68rpx;
- background-color: #ff4767;
- border-radius: 34rpx;
- display: flex;
- flex-flow: row nowrap;
- justify-content: center;
- align-items: center;
- box-shadow: 0 4rpx 10rpx rgba(255, 71, 103, 0.3);
-}
-
-.login-text {
- font-size: 30rpx;
- color: #fff;
+ width: 422rpx;
+ height: 378rpx;
}
::v-deep .list-scroll {
@@ -705,6 +690,11 @@ export default {
}
.nodatamit {
- background-color: #f5f5f5;
+ background-color: #FAFAFA;
}
-
\ No newline at end of file
+
+.status-gap {
+ background-color: #FAFAFA;
+ height: 20rpx;
+}
+
diff --git a/pages/ruzhu/successruzhu.vue b/pages/ruzhu/successruzhu.vue
index d162d0c..901b8f6 100644
--- a/pages/ruzhu/successruzhu.vue
+++ b/pages/ruzhu/successruzhu.vue
@@ -42,7 +42,7 @@ export default {
} else {
this.infoData = {
top: '审核结果',
- title: '审核失败',
+ title: '审核未通过',
photo: res.data.photo
};
this.$emit('stateChange', 3);
@@ -114,6 +114,7 @@ export default {
line-height: 67rpx;
text-align: center;
font-style: normal;
+ margin-top: -40rpx;
}
.title-content {
diff --git a/pages/search_common/search.vue b/pages/search_common/search.vue
index 28ab06c..d4e3393 100644
--- a/pages/search_common/search.vue
+++ b/pages/search_common/search.vue
@@ -21,16 +21,16 @@
发布时间
-
-
+
+
浏览量
-
-
+
+
@@ -150,9 +150,21 @@ export default {
// 切换排序
toggleSort(type) {
if (type === 'time') {
- this.orderType = this.orderType === 1 ? 2 : 1;
+ if (this.orderType === 1) {
+ this.orderType = 2;
+ } else if (this.orderType === 2) {
+ this.orderType = 0;
+ } else {
+ this.orderType = 1;
+ }
} else if (type === 'view') {
- this.orderType = this.orderType === 3 ? 4 : 3;
+ if (this.orderType === 3) {
+ this.orderType = 4;
+ } else if (this.orderType === 4) {
+ this.orderType = 0;
+ } else {
+ this.orderType = 3;
+ }
}
// 切换排序直接重新加载当前结果
@@ -439,4 +451,4 @@ export default {
font-size: 24rpx;
color: #999;
}
-
\ No newline at end of file
+
diff --git a/pages/shop/business-time.vue b/pages/shop/business-time.vue
index b21e396..a70c4c2 100644
--- a/pages/shop/business-time.vue
+++ b/pages/shop/business-time.vue
@@ -308,6 +308,11 @@ export default {
}).then(res => {
if (res.code == 200 && res.data) {
this.authDetails = res.data;
+ if (!this.userInfo.business_time && res.data.business_time) {
+ this.currentTime = res.data.business_time;
+ this.originalTime = res.data.business_time;
+ this.parseTimeString(res.data.business_time);
+ }
}
});
},
@@ -352,9 +357,9 @@ export default {
// 准备切换的新状态
let newStatus = currentStatus == 1 ? 2 : 1;
- // 想要开始接单时,检查是否配置了营业时间
- if (newStatus === 1 && !this.hasBusinessTime) {
- uni.showToast({ title: '请配置营业时间', icon: 'none' });
+ // 想要开始接单时,检查资料是否完善
+ if (newStatus === 1 && !this.canOpenStore) {
+ uni.showToast({ title: '当前资料不完善,无法开启接单', icon: 'none' });
return;
}
@@ -503,9 +508,21 @@ export default {
// 根据接口文档,使用 code 判断成功
if (res.code === 200) {
+ const savedTime = this.currentTime;
this.showBottomActions = false
this.tempTime = ''
- this.originalTime = this.currentTime // 更新原始时间
+ this.originalTime = savedTime // 更新原始时间
+ this.userInfo = {
+ ...(this.userInfo || {}),
+ business_time: savedTime
+ }
+ if (this.authDetails) {
+ this.authDetails = {
+ ...this.authDetails,
+ business_time: savedTime
+ }
+ }
+ this.parseTimeString(savedTime)
uni.showToast({
title: '营业时间更新成功',
@@ -1051,4 +1068,4 @@ export default {
background: linear-gradient(135deg, #FF4767, #FF6B8A);
color: white;
}
-
\ No newline at end of file
+
diff --git a/pages/shop/service-skills.vue b/pages/shop/service-skills.vue
index a035d38..833a182 100644
--- a/pages/shop/service-skills.vue
+++ b/pages/shop/service-skills.vue
@@ -162,13 +162,17 @@ export default {
if (!this.lastApplyTime) return false;
// 如果最后申请时间在驳回时间之后,说明有新的申请
return true;
+ },
+ // 处于服务技能变更审核中时,不自动进入添加/编辑步骤
+ isChangeUnderReview() {
+ return this.auditStatus === 1 || this.showAuditTip || this.buttonType === 'view';
}
},
async onLoad() {
this.sjInformation = await request.post('/sj/user/getUser');
await this.initPage();
// 如果没有技能和经验信息,直接进入编辑模式
- if (this.currentSkills.length === 0 && !this.originalMajor) {
+ if (this.currentSkills.length === 0 && !this.originalMajor && !this.isChangeUnderReview) {
this.startChange();
}
},
@@ -960,4 +964,4 @@ export default {
width: 33.333%;
}
} */
-
\ No newline at end of file
+
diff --git a/pages/shop/staff/addStaff.vue b/pages/shop/staff/addStaff.vue
index 6e97247..140607d 100644
--- a/pages/shop/staff/addStaff.vue
+++ b/pages/shop/staff/addStaff.vue
@@ -19,7 +19,7 @@
- {{ sryDetail.name }}
+ {{ sryDisplayName }}
进入详情
@@ -117,6 +117,9 @@ export default {
}
},
computed: {
+ sryDisplayName() {
+ return this.sryDetail.nick_name || this.sryDetail.name || "";
+ },
mergeServiceList() {
// 1. 提取原始对象的所有子数组
let allSubArrays = Object.values(this.$store.state.sjServiceList);
@@ -487,4 +490,4 @@ export default {
::v-deep .navbar-content .title {
margin-left: 20rpx !important;
}
-
\ No newline at end of file
+