个人中心图标替换,收藏页面筛选按钮条件显示,入住第二步弹窗按钮颜色

This commit is contained in:
丁杰 2026-06-08 11:12:16 +08:00
parent a28cc75da8
commit e96c468c38
3 changed files with 253 additions and 252 deletions

View File

@ -317,7 +317,7 @@ export default {
title: "购买工时",
path: "/pages/shop/manHour/saleList",
go_id_type: 1,
url: "https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/72520b2a-804c-4987-84ca-25e5247e65a2.png",
url: "https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/742bd9c9-0f38-4c10-b0fb-9b1ecebfc18c.png",
},
],
},

View File

@ -16,7 +16,8 @@
收藏的课程
</view>
</view>
<view class="filter-area" @tap="toggleFilterPanel">
<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 File

@ -1,202 +1,200 @@
<template>
<view class="qualification-page">
<view class="section">
<view class="section-title">
<view class="title-bar"></view>
<text class="title-text">门店信息</text>
</view>
<view class="qualification-page">
<view class="section">
<view class="section-title">
<view class="title-bar"></view>
<text class="title-text">门店信息</text>
</view>
<view class="form-item-one box-cont">
<view class="label-wrapper">
<text class="label required">店铺名称</text>
<image class="label-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/25bd7f38-1a3e-4282-84ea-190d7f820108"
mode="aspectFit" @click="showTipPopup('name')"></image>
</view>
<input type="text" v-model="formData.name" placeholder="请输入营业执照的店铺名称" placeholder-class="placeholder"
class="input" @input="saveFormDataToLocalDebounce" />
</view>
<view class="form-item-two box-cont" @click="showLocationPopup">
<text class="label required">门店所在地</text>
<view class="picker-content">
<text :class="formData.dependency ? 'picker-value' : 'placeholder'">
{{ formData.dependency || '请选择' }}
</text>
<image
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/dccc4513-377c-4bfa-9fd2-a5cfdb9798f3"
class="arrow-right" mode="aspectFit"></image>
</view>
</view>
<view class="form-item-two box-cont" @click="getAddressInfo">
<text class="label required">门店详细地址</text>
<view class="picker-content">
<text :class="formData.address ? 'picker-value' : 'placeholder'">
{{ formData.address || '请选择' }}
</text>
<image
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/dccc4513-377c-4bfa-9fd2-a5cfdb9798f3"
class="arrow-right" mode="aspectFit"></image>
</view>
</view>
</view>
<view class="form-item-one box-cont">
<view class="label-wrapper">
<text class="label required">店铺名称</text>
<image class="label-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/25bd7f38-1a3e-4282-84ea-190d7f820108"
mode="aspectFit" @click="showTipPopup('name')"></image>
</view>
<input type="text" v-model="formData.name" placeholder="请输入营业执照的店铺名称" placeholder-class="placeholder"
class="input" @input="saveFormDataToLocalDebounce" />
</view>
<view class="form-item-two box-cont" @click="showLocationPopup">
<text class="label required">门店所在地</text>
<view class="picker-content">
<text :class="formData.dependency ? 'picker-value' : 'placeholder'">
{{ formData.dependency || '请选择' }}
</text>
<image
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/dccc4513-377c-4bfa-9fd2-a5cfdb9798f3"
class="arrow-right" mode="aspectFit"></image>
</view>
</view>
<view class="form-item-two box-cont" @click="getAddressInfo">
<text class="label required">门店详细地址</text>
<view class="picker-content">
<text :class="formData.address ? 'picker-value' : 'placeholder'">
{{ formData.address || '请选择' }}
</text>
<image
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/dccc4513-377c-4bfa-9fd2-a5cfdb9798f3"
class="arrow-right" mode="aspectFit"></image>
</view>
</view>
</view>
<view class="section">
<view class="section-title">
<view class="title-bar"></view>
<text class="title-text">联系人信息</text>
</view>
<view class="section">
<view class="section-title">
<view class="title-bar"></view>
<text class="title-text">联系人信息</text>
</view>
<view class="form-item box-cont">
<text class="label required">您的身份</text>
<view class="radio-group">
<view class="radio-item" @click="setContactType('1')">
<view class="radio" :class="{ checked: formData.contact_type === '1' }">
<image v-if="formData.contact_type === '1'"
src="/static/images/agree_y.png"
class="radio-icon-image" mode="aspectFit"></image>
</view>
<text class="radio-label">法人</text>
</view>
<view class="radio-item" @click="setContactType('2')">
<view class="radio" :class="{ checked: formData.contact_type === '2' }">
<image v-if="formData.contact_type === '2'"
src="/static/images/agree_y.png"
class="radio-icon-image" mode="aspectFit"></image>
</view>
<text class="radio-label">其他</text>
</view>
</view>
</view>
<view class="form-item box-cont">
<text class="label required">您的身份</text>
<view class="radio-group">
<view class="radio-item" @click="setContactType('1')">
<view class="radio" :class="{ checked: formData.contact_type === '1' }">
<image v-if="formData.contact_type === '1'" src="/static/images/agree_y.png"
class="radio-icon-image" mode="aspectFit"></image>
</view>
<text class="radio-label">法人</text>
</view>
<view class="radio-item" @click="setContactType('2')">
<view class="radio" :class="{ checked: formData.contact_type === '2' }">
<image v-if="formData.contact_type === '2'" src="/static/images/agree_y.png"
class="radio-icon-image" mode="aspectFit"></image>
</view>
<text class="radio-label">其他</text>
</view>
</view>
</view>
<view class="form-item-one box-cont">
<text class="label required">联系人</text>
<input type="text" v-model="formData.contact_name" placeholder="请输入" placeholder-class="placeholder"
class="input" @input="saveFormDataToLocalDebounce" />
</view>
<view class="form-item-one box-cont">
<text class="label required">联系人</text>
<input type="text" v-model="formData.contact_name" placeholder="请输入" placeholder-class="placeholder"
class="input" @input="saveFormDataToLocalDebounce" />
</view>
<view class="form-item-one box-cont">
<text class="label required">联系人电话</text>
<input type="number" v-model="formData.contact_phone" placeholder="请输入联系电话"
placeholder-class="placeholder" class="input" @input="saveFormDataToLocalDebounce" />
</view>
<view class="form-item-one box-cont">
<text class="label required">联系人电话</text>
<input type="number" v-model="formData.contact_phone" placeholder="请输入联系电话"
placeholder-class="placeholder" class="input" @input="saveFormDataToLocalDebounce" />
</view>
<view class="form-item-one box-cont">
<text class="label">备用联系人电话</text>
<input type="number" v-model="formData.backup_phone" placeholder="请输入备用联系电话"
placeholder-class="placeholder" class="input" @input="saveFormDataToLocalDebounce" />
</view>
</view>
<view class="form-item-one box-cont">
<text class="label">备用联系人电话</text>
<input type="number" v-model="formData.backup_phone" placeholder="请输入备用联系电话"
placeholder-class="placeholder" class="input" @input="saveFormDataToLocalDebounce" />
</view>
</view>
<view class="form-item-one-yqr box-cont invite-code-container">
<view class="invite-code-top">
<view class="label-wrapper">
<text class="label required">邀请码</text>
</view>
<input type="text" v-model="formData.invite_code_other" placeholder="请输入邀请码"
placeholder-class="placeholder" class="input" @input="handleInviteCodeInput" />
</view>
<view class="form-item-one-yqr box-cont invite-code-container">
<view class="invite-code-top">
<view class="label-wrapper">
<text class="label required">邀请码</text>
</view>
<input type="text" v-model="formData.invite_code_other" placeholder="请输入邀请码"
placeholder-class="placeholder" class="input" @input="handleInviteCodeInput" />
</view>
<!-- 分割线 -->
<view class="divider"></view>
<!-- 分割线 -->
<view class="divider"></view>
<!-- 邀请人信息 -->
<view class="invite-info-container">
<!-- 默认提示 -->
<text v-if="!formData.invite_code_other" class="invite-tip">
请填写邀请人的邀请码若没有邀请人请填写13131313
</text>
<!-- 邀请人信息 -->
<view class="invite-info-container">
<!-- 默认提示 -->
<text v-if="!formData.invite_code_other" class="invite-tip">
请填写邀请人的邀请码若没有邀请人请填写13131313
</text>
<!-- 验证中 -->
<view v-else-if="inviteCodeValidating" class="invite-validating">
<text>验证中...</text>
</view>
<!-- 验证中 -->
<view v-else-if="inviteCodeValidating" class="invite-validating">
<text>验证中...</text>
</view>
<!-- 验证失败 -->
<view v-else-if="inviteCodeError" class="invite-error" :class="{ 'shake-animation': shakeInviteError }">
<text>邀请码无效</text>
</view>
<!-- 验证失败 -->
<view v-else-if="inviteCodeError" class="invite-error" :class="{ 'shake-animation': shakeInviteError }">
<text>邀请码无效</text>
</view>
<!-- 特殊邀请码13131313 -->
<view v-else-if="formData.invite_code_other === '13131313' && !inviterInfo" class="invite-tip">
请填写邀请人的邀请码若没有邀请人请填写13131313
</view>
<!-- 特殊邀请码13131313 -->
<view v-else-if="formData.invite_code_other === '13131313' && !inviterInfo" class="invite-tip">
请填写邀请人的邀请码若没有邀请人请填写13131313
</view>
<!-- 显示邀请人信息 -->
<view v-else-if="inviterInfo" class="inviter-info">
<text class="inviter-label">邀请人</text>
<text class="inviter-name">{{ inviterInfo.name || inviterInfo.nick_name }}</text>
<text class="inviter-divider">/</text>
<text class="inviter-phone">{{ inviterInfo.account }}</text>
</view>
<!-- 显示邀请人信息 -->
<view v-else-if="inviterInfo" class="inviter-info">
<text class="inviter-label">邀请人</text>
<text class="inviter-name">{{ inviterInfo.name || inviterInfo.nick_name }}</text>
<text class="inviter-divider">/</text>
<text class="inviter-phone">{{ inviterInfo.account }}</text>
</view>
<!-- 其他情况接口返回成功但没有认证铁军的邀请码 -->
<view v-else class="invite-error" :class="{ 'shake-animation': shakeInviteError }">
<text>邀请码无效</text>
</view>
</view>
</view>
<!-- 其他情况接口返回成功但没有认证铁军的邀请码 -->
<view v-else class="invite-error" :class="{ 'shake-animation': shakeInviteError }">
<text>邀请码无效</text>
</view>
</view>
</view>
<view class="popup" :class="{ show: showLocationPopupFlag }">
<view class="popup-mask" @click="hideLocationPopup"></view>
<view class="popup-content">
<view class="popup-header">
<text class="popup-title">选择所在地</text>
<text class="popup-close" @click="hideLocationPopup">×</text>
</view>
<view class="region-body">
<picker-view @change="bindChangeLocation" class="picker-scroll" :indicator-style="indicatorStyle"
:value="locationValue">
<picker-view-column>
<view class="picker-item" v-for="(item, index) in ChinaCitys" :key="index">
{{ item.province }}
</view>
</picker-view-column>
<picker-view-column>
<view class="picker-item" v-for="(item, index) in locatinCitys" :key="index">
{{ item.city }}
</view>
</picker-view-column>
<picker-view-column>
<view class="picker-item" v-for="(item, index) in locationAreas" :key="index">
{{ item.area }}
</view>
</picker-view-column>
</picker-view>
</view>
<view class="popup-footer">
<view class="popup-btn cancel" @click="hideLocationPopup">
<text class="btn-text">取消</text>
</view>
<view class="popup-btn confirm" @click="confirmLocationSelect">
<text class="btn-text">确定</text>
</view>
</view>
</view>
</view>
<view class="popup" :class="{ show: showLocationPopupFlag }">
<view class="popup-mask" @click="hideLocationPopup"></view>
<view class="popup-content">
<view class="popup-header">
<text class="popup-title">选择所在地</text>
<text class="popup-close" @click="hideLocationPopup">×</text>
</view>
<view class="region-body">
<picker-view @change="bindChangeLocation" class="picker-scroll" :indicator-style="indicatorStyle"
:value="locationValue">
<picker-view-column>
<view class="picker-item" v-for="(item, index) in ChinaCitys" :key="index">
{{ item.province }}
</view>
</picker-view-column>
<picker-view-column>
<view class="picker-item" v-for="(item, index) in locatinCitys" :key="index">
{{ item.city }}
</view>
</picker-view-column>
<picker-view-column>
<view class="picker-item" v-for="(item, index) in locationAreas" :key="index">
{{ item.area }}
</view>
</picker-view-column>
</picker-view>
</view>
<view class="popup-footer">
<view class="popup-btn confirm" @click="hideLocationPopup">
<text class="btn-text">取消</text>
</view>
<view class="popup-btn confirm" @click="confirmLocationSelect">
<text class="btn-text">确定</text>
</view>
</view>
</view>
</view>
<view class="tip-popup" :class="{ show: showTipPopupFlag }">
<view class="tip-popup-mask" @click="hideTipPopup"></view>
<view class="tip-popup-content">
<image class="tip-popup-bg"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/ab410a5d-5819-47f2-a0fc-3fd6b90d6770"
mode="aspectFit"></image>
<view class="tip-popup" :class="{ show: showTipPopupFlag }">
<view class="tip-popup-mask" @click="hideTipPopup"></view>
<view class="tip-popup-content">
<image class="tip-popup-bg"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/ab410a5d-5819-47f2-a0fc-3fd6b90d6770"
mode="aspectFit"></image>
<view class="tip-popup-body">
<view class="tip-title">{{ tipTitle }}</view>
<view class="tip-image-container">
<image class="tip-image" :class="currentTipType" :src="tipImage" mode="widthFix"></image>
</view>
<view class="tip-buttons">
<view class="tip-btn cancel" @click="hideTipPopup">
<text class="btn-text">取消</text>
</view>
<view class="tip-btn confirm" @click="hideTipPopup">
<text class="btn-text">我已了解</text>
</view>
</view>
</view>
</view>
</view>
<view class="tip-popup-body">
<view class="tip-title">{{ tipTitle }}</view>
<view class="tip-image-container">
<image class="tip-image" :class="currentTipType" :src="tipImage" mode="widthFix"></image>
</view>
<view class="tip-buttons">
<view class="tip-btn cancel" @click="hideTipPopup">
<text class="btn-text">取消</text>
</view>
<view class="tip-btn confirm" @click="hideTipPopup">
<text class="btn-text">我已了解</text>
</view>
</view>
</view>
</view>
</view>
<uni-popup ref="existingInvitePopup" type="center" :mask-click="false">
<view class="invite-popup-content">
@ -206,11 +204,13 @@
<view class="invite-popup-body">
<view class="invite-item">
<text class="invite-label">邀请码</text>
<text class="invite-value">{{ existingInviterInfo && (existingInviterInfo.invite_code || existingInviterInfo.invite_code_other) }}</text>
<text class="invite-value">{{ existingInviterInfo && (existingInviterInfo.invite_code ||
existingInviterInfo.invite_code_other) }}</text>
</view>
<view class="invite-item">
<text class="invite-label">邀请人</text>
<text class="invite-value">{{ (existingInviterInfo && (existingInviterInfo.name || existingInviterInfo.nick_name)) || '' }}</text>
<text class="invite-value">{{ (existingInviterInfo && (existingInviterInfo.name ||
existingInviterInfo.nick_name)) || '' }}</text>
</view>
</view>
<view class="invite-popup-footer">
@ -274,7 +274,7 @@ export default {
inviterInfo: null,
currentValidatingCode: '',
inviteValidationTimer: null,
//
existingInviterInfo: null,
hasExistingInviter: false,
@ -378,7 +378,7 @@ export default {
// 使
async forceUseExistingInviter() {
if (this.hasAutoReplacedInvite) return false;
//
if (!this.userMobile) {
await this.getUserInfo();
@ -387,28 +387,28 @@ export default {
console.log('用户手机号未获取,跳过强制替换');
return false;
}
try {
// 1.
const res = await request.post('/sj/User/getBInviteCode', {
account: this.userMobile,
type: 2 //
});
if (res && (res.code === 200 || res.state === 1) && res.data) {
const oldInviteCode = res.data.invite_code || res.data.invite_code_other;
if (oldInviteCode) {
console.log('检测到已绑定邀请码:', oldInviteCode);
// 2.
const inviteRes = await request.post('/sj/user/getInvite', {
invite_code: oldInviteCode
});
if (inviteRes && (inviteRes.code === 200 || inviteRes.state === 1) && inviteRes.data && inviteRes.data.account) {
const fullInviterInfo = inviteRes.data;
//
this.formData.invite_code_other = oldInviteCode;
this.hasExistingInviter = true;
@ -417,11 +417,11 @@ export default {
this.inviterInfo = fullInviterInfo;
this.currentValidatingCode = oldInviteCode;
this.existingInviterInfo = fullInviterInfo;
//
this.saveInviteStateToLocal();
this.saveFormDataToLocal();
return true;
}
}
@ -475,7 +475,7 @@ export default {
this.saveFormDataToLocal();
}
this.hideExistingInviteTipPopup();
// Promise
if (this.confirmResolve) {
this.confirmResolve(true);
@ -614,7 +614,7 @@ export default {
this.formData.invite_code_other = this.inviterInfo ? (this.inviterInfo.invite_code || this.inviterInfo.invite_code_other) : '';
return;
}
const code = e.detail ? e.detail.value : this.formData.invite_code_other;
console.log('邀请码输入:', code);
@ -944,7 +944,7 @@ export default {
});
return resolve(false);
}
//
if (this.inviteCodeValidating) {
uni.showToast({ title: '邀请码验证中,请稍候', icon: 'none' });
@ -1659,93 +1659,93 @@ export default {
/* 邀请码和禁用样式 */
/* 输入框禁用样式 */
.input:disabled {
color: #999999;
background-color: #F5F5F5;
color: #999999;
background-color: #F5F5F5;
}
/* 邀请码确认弹窗样式 */
.invite-popup-content {
width: 571rpx;
height: 535rpx;
background-image: url('https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/6f130301-f3df-467c-8a1c-dc49f85e5295.png');
background-size: cover;
background-position: center;
border-radius: 30rpx;
display: flex;
flex-direction: column;
align-items: center;
padding: 40rpx;
box-sizing: border-box;
width: 571rpx;
height: 535rpx;
background-image: url('https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/6f130301-f3df-467c-8a1c-dc49f85e5295.png');
background-size: cover;
background-position: center;
border-radius: 30rpx;
display: flex;
flex-direction: column;
align-items: center;
padding: 40rpx;
box-sizing: border-box;
}
.invite-popup-header {
width: 100%;
text-align: center;
margin-bottom: 40rpx;
width: 100%;
text-align: center;
margin-bottom: 40rpx;
}
.invite-popup-title {
font-size: 36rpx;
font-weight: 500;
color: #333333;
font-size: 36rpx;
font-weight: 500;
color: #333333;
}
.invite-popup-body {
flex: 1;
width: 100%;
display: flex;
flex-direction: column;
gap: 24rpx;
margin-top: 20rpx;
flex: 1;
width: 100%;
display: flex;
flex-direction: column;
gap: 24rpx;
margin-top: 20rpx;
}
.invite-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx;
background-color: rgba(255, 255, 255, 0.9);
border-radius: 16rpx;
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx;
background-color: rgba(255, 255, 255, 0.9);
border-radius: 16rpx;
}
.invite-label {
font-size: 28rpx;
color: #666666;
font-size: 28rpx;
color: #666666;
}
.invite-value {
font-size: 28rpx;
color: #333333;
font-weight: 500;
font-size: 28rpx;
color: #333333;
font-weight: 500;
}
.invite-popup-footer {
width: 100%;
display: flex;
gap: 20rpx;
margin-top: 40rpx;
width: 100%;
display: flex;
gap: 20rpx;
margin-top: 40rpx;
}
.invite-btn {
flex: 1;
height: 88rpx;
border-radius: 44rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
font-weight: 500;
margin: 0 5rpx;
flex: 1;
height: 88rpx;
border-radius: 44rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
font-weight: 500;
margin: 0 5rpx;
}
.invite-btn.cancel {
background-color: #FFFFFF;
color: #FC437C;
border: 2rpx solid #FC437C;
background-color: #FFFFFF;
color: #FC437C;
border: 2rpx solid #FC437C;
}
.invite-btn.confirm {
background: linear-gradient(90deg, #FC437C 0%, #FF618F 100%);
color: #FFFFFF;
background: linear-gradient(90deg, #FC437C 0%, #FF618F 100%);
color: #FFFFFF;
}
</style>