From 181a93e314260115e95a3cf06f6aae2800fbbc7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=81=E6=9D=B0?= <727475508@qq.com> Date: Fri, 5 Jun 2026 15:27:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E6=AC=A1=E6=8F=90=E4=BA=A4=E8=A2=AB?= =?UTF-8?q?=E9=A9=B3=E5=9B=9E=E9=80=BB=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service-code-input/service-code-input.vue | 386 +++-- pages/jingxuan/skill-detail.vue | 64 +- pages/my/my.vue | 4 +- pages/my/myFavorite.vue | 16 +- pages/order/userorder-list.vue | 1296 ++++++++--------- pages/ruzhu/ruzhu.vue | 52 +- pages/ruzhu/sj-info.vue | 62 + pages/ruzhu/successruzhu.vue | 26 +- 8 files changed, 1018 insertions(+), 888 deletions(-) diff --git a/components/service-code-input/service-code-input.vue b/components/service-code-input/service-code-input.vue index 37cb524..80985ca 100644 --- a/components/service-code-input/service-code-input.vue +++ b/components/service-code-input/service-code-input.vue @@ -1,29 +1,18 @@ \ No newline at end of file diff --git a/pages/jingxuan/skill-detail.vue b/pages/jingxuan/skill-detail.vue index 7e7d5c0..57b2e34 100644 --- a/pages/jingxuan/skill-detail.vue +++ b/pages/jingxuan/skill-detail.vue @@ -32,7 +32,7 @@ - + {{ formatTime(duration) }} @@ -143,7 +143,8 @@ export default { iconFullscreen: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/4286ef33-6849-4851-8866-4230d2523a33.png', article: {}, - recommendList: [] + recommendList: [], + recommendPage: 1 } }, computed: { @@ -301,9 +302,7 @@ export default { this.isFavorite = data.collect_state === 1; request.post("/sj/skill/list", { page: 1, - limit: 10, - link_type: data.link_type, - link_id: data.link_id, + limit: 3, skill_id: data.id }).then((listRes) => { if (listRes.code == 200 && listRes.data && listRes.data.list) { @@ -318,7 +317,7 @@ export default { // 浏览量优先取总浏览量,如果没有则取实际/初始浏览量 views: item.total_browse_num || item.real_browse_num || item.browse_num || 0, // 截取时间并格式化 - time: item.create_time ? item.create_time.substring(0, 10).replace(/-/g, '-') : '' + time: item.create_time ? item.create_time.substring(0, 10).replace(/-/g, '-') : '' }; }); } @@ -376,11 +375,58 @@ export default { if (this.isRefreshing) return; this.isRefreshing = true; uni.showLoading({ title: '加载中' }); - setTimeout(() => { - this.recommendList = this.recommendList.sort(() => Math.random() - 0.5); + + // 页码逻辑:到达10重置为1,否则+1 + if (this.recommendPage >= 10) { + this.recommendPage = 1; + } else { + this.recommendPage++; + } + + request.post("/sj/skill/list", { + page: this.recommendPage, + limit: 3, + skill_id: this.article.id + }).then((res) => { + if (res.code == 200 && res.data && res.data.list && res.data.list.length > 0) { + this.recommendList = res.data.list.map(item => ({ + id: item.id, + title: item.name || '暂无标题', + coverSrc: item.cover_img || '', + type: item.link_name || '平台课程', + views: item.browse_num || 0, + time: item.create_time ? item.create_time.split(' ')[0] : '', + typeIcon: item.link_logo || '', + video: item.video || '' + })); + } else { + // 下一页没有数据,重置为1重新请求 + this.recommendPage = 1; + request.post("/sj/skill/list", { + page: 1, + limit: 3, + skill_id: this.article.id + }).then((res2) => { + if (res2.code == 200 && res2.data && res2.data.list) { + this.recommendList = res2.data.list.map(item => ({ + id: item.id, + title: item.name || '暂无标题', + coverSrc: item.cover_img || '', + type: item.link_name || '平台课程', + views: item.browse_num || 0, + time: item.create_time ? item.create_time.split(' ')[0] : '', + typeIcon: item.link_logo || '', + video: item.video || '' + })); + } + }); + } this.isRefreshing = false; uni.hideLoading(); - }, 600); + }).catch(() => { + this.isRefreshing = false; + uni.hideLoading(); + }); }, injectMockData() { diff --git a/pages/my/my.vue b/pages/my/my.vue index a2043bd..5f20129 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -909,8 +909,8 @@ export default { toruzhu() { const idType = this.userInfo.id_type; const credentialsState = this.userInfo.credentials_state; - - if (idType === 0 && credentialsState === 0) { + console.log(idType, credentialsState) + if (idType <= 0 && credentialsState === 0) { // 从未入驻 uni.navigateTo({ url: '/pages/ruzhu/ruzhu' diff --git a/pages/my/myFavorite.vue b/pages/my/myFavorite.vue index de0102e..10a1417 100644 --- a/pages/my/myFavorite.vue +++ b/pages/my/myFavorite.vue @@ -123,8 +123,9 @@ export default { }, computed: { filterIcon() { - // 这里的图标链接可以统一成一个,配合CSS的旋转动画更好看 - return 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/e00ab2ac-bccf-42d8-820c-65727327e279.png' + return this.filterVisible + ? 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/e00ab2ac-bccf-42d8-820c-65727327e279.png' + : 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/bfe7a104-bef8-4432-9487-42f05e3e9035.png' } }, onLoad() { @@ -466,13 +467,13 @@ export default { } .filter-icon { - width: 16rpx; - height: 10rpx; - transition: transform 0.3s ease; + width: 24rpx; + height: 24rpx; - /* 展开时图标倒转 */ + /* 展开时切换为上下箭头图标,调整大小 */ &.rotate { - transform: rotate(180deg); + width: 18rpx; + height: 12rpx; } } } @@ -574,7 +575,6 @@ export default { justify-content: center; border-radius: 12rpx; - transition: all 0.3s; box-sizing: border-box; /* 防止 padding 会撑大盒子 */ diff --git a/pages/order/userorder-list.vue b/pages/order/userorder-list.vue index ada4742..53ead25 100644 --- a/pages/order/userorder-list.vue +++ b/pages/order/userorder-list.vue @@ -1,16 +1,11 @@ \ No newline at end of file diff --git a/pages/ruzhu/ruzhu.vue b/pages/ruzhu/ruzhu.vue index d898f5c..d9d54e5 100644 --- a/pages/ruzhu/ruzhu.vue +++ b/pages/ruzhu/ruzhu.vue @@ -17,7 +17,7 @@ - + @@ -25,7 +25,7 @@ - + @@ -73,7 +73,7 @@ - + 上一步 @@ -84,7 +84,15 @@ - + + + 重新提交 + + + 进入平台 + + + 进入平台 @@ -110,7 +118,7 @@ export default { }, data() { return { - currentStep: 3, // 当前步骤索引 + currentStep: 0, // 当前步骤索引 isAgree: false, identity: null, textData: {}, @@ -120,6 +128,7 @@ export default { qualificationData: null, // 新增:保存资质信息 storeInfoData: null, // 新增:保存门店信息 successData: {}, //入驻提示 + isRejected: false, // 是否审核失败 // 新增:缓存手艺人数据 artisanDataCache: { personalInfo: null, @@ -138,6 +147,10 @@ export default { }, async onLoad(options) { console.log(options, 'options---'); + if (options.type == 0 && options.step == 3) { + this.currentStep = 3 + this.isRejected = true + } if (options.type == 1) { this.currentStep = 4 } @@ -165,6 +178,16 @@ export default { url: '/pages/home/home' }) }, + onStateChange(state) { + if (state === 3) { + this.isRejected = true; + } + }, + resubmit() { + uni.navigateTo({ + url: '/pages/ruzhu/ruzhu?type=0&step=3' + }); + }, // 获取用户信息(复用不可服务时间页面的方法) async getUserInfoSync() { await request.post('/sj/userSjAuth/details', { @@ -807,6 +830,13 @@ export default { border-radius: 49rpx; } +.showziliao1 { + width: 400rpx; + height: 98rpx; + background: #FF4767; + border-radius: 49rpx; +} + .showziliaotext { height: 40rpx; font-family: PingFangSC, PingFang SC; @@ -818,4 +848,16 @@ export default { margin: 0 0 0 281rpx; align-items: center; } + +.showziliaotext1 { + height: 40rpx; + font-family: PingFangSC, PingFang SC; + font-weight: 500; + font-size: 32rpx; + color: #FFFFFF; + line-height: 96rpx; + font-style: normal; + margin: 0 0 0 140rpx; + align-items: center; +} \ No newline at end of file diff --git a/pages/ruzhu/sj-info.vue b/pages/ruzhu/sj-info.vue index 63aafa5..417ba2e 100644 --- a/pages/ruzhu/sj-info.vue +++ b/pages/ruzhu/sj-info.vue @@ -391,6 +391,7 @@ export default { this.regionCitys = this.ChinaCitys[0].citys; this.regionAreas = this.regionCitys[0].areas; this.setupAddressListener(); + await this.loadDetailsData(); }, beforeDestroy() { this.removeAddressListener(); @@ -405,6 +406,67 @@ export default { }); }, + async loadDetailsData() { + try { + const res = await request.post('/sj/userSjAuth/details', { + type: 1 + }); + if (res.code === 200 && res.data) { + const data = res.data; + this.$set(this.formData, 'uscc_photo', data.uscc_photo || ''); + this.$set(this.formData, 'uscc_type', data.uscc_type || ''); + this.$set(this.formData, 'uscc_num', data.uscc_num || ''); + this.$set(this.formData, 'uscc_name', data.uscc_name || ''); + this.$set(this.formData, 'uscc_dependency', data.uscc_dependency || ''); + this.$set(this.formData, 'uscc_address', data.uscc_address || ''); + this.$set(this.formData, 'uscc_province', data.uscc_province || ''); + this.$set(this.formData, 'uscc_city', data.uscc_city || ''); + this.$set(this.formData, 'uscc_area', data.uscc_area || ''); + this.$set(this.formData, 'longitude', data.longitude || ''); + this.$set(this.formData, 'latitude', data.latitude || ''); + this.$set(this.formData, 'legal_idcard_positive', data.legal_idcard_positive || ''); + this.$set(this.formData, 'legal_idcard_negative', data.legal_idcard_negative || ''); + this.$set(this.formData, 'legal_name', data.legal_name || ''); + this.$set(this.formData, 'legal_phone', data.legal_phone || ''); + this.$set(this.formData, 'legal_idcard_num', data.legal_idcard_num || ''); + // 处理身份证有效期:legal_idcard_expiry 拆分为 type、start、end + if (data.legal_idcard_expiry) { + const expiry = data.legal_idcard_expiry; + if (expiry === '长久' || expiry === '长久有效') { + this.$set(this.formData, 'legal_idcard_expiry_type', '1'); + this.$set(this.formData, 'legal_idcard_expiry_end', '长久有效'); + } else if (expiry.includes('——') || expiry.includes('--') || expiry.includes('-')) { + const separator = expiry.includes('——') ? '——' : (expiry.includes('--') ? '--' : '-'); + const [startStr, endStr] = expiry.split(separator); + const startDate = startStr.trim(); + const endDate = endStr.trim(); + this.$set(this.formData, 'legal_idcard_expiry_start', startDate); + if (endDate === '长久' || !endDate) { + this.$set(this.formData, 'legal_idcard_expiry_type', '1'); + this.$set(this.formData, 'legal_idcard_expiry_end', '长久有效'); + } else { + this.$set(this.formData, 'legal_idcard_expiry_type', '2'); + this.$set(this.formData, 'legal_idcard_expiry_end', endDate); + } + } + } else { + this.$set(this.formData, 'legal_idcard_expiry_type', data.legal_idcard_expiry_type || '1'); + this.$set(this.formData, 'legal_idcard_expiry_start', data.legal_idcard_expiry_start || ''); + this.$set(this.formData, 'legal_idcard_expiry_end', data.legal_idcard_expiry_end || ''); + } + if (data.qualifications_sector) { + this.$set(this.formData, 'qualifications_sector', typeof data.qualifications_sector === 'string' ? JSON.parse(data.qualifications_sector) : data.qualifications_sector); + } + if (data.qualifications_other) { + this.$set(this.formData, 'qualifications_other', typeof data.qualifications_other === 'string' ? JSON.parse(data.qualifications_other) : data.qualifications_other); + } + console.log('sj-info 数据回显完成:', this.formData); + } + } catch (error) { + console.error('获取详情数据失败:', error); + } + }, + chooseImage(type) { uni.chooseImage({ count: 1, diff --git a/pages/ruzhu/successruzhu.vue b/pages/ruzhu/successruzhu.vue index e450ebc..d162d0c 100644 --- a/pages/ruzhu/successruzhu.vue +++ b/pages/ruzhu/successruzhu.vue @@ -1,8 +1,8 @@