fix(login): 密码登录补充密码非空前端校验
- doctor-login submitLogin 增加「请输入密码」前置校验, 与 getCode 一致,避免空密码误触发登录请求 - 配合后端 service_user 空密码回退 PC 医生/药师密码校验
This commit is contained in:
@@ -93,6 +93,7 @@ export default {
|
||||
{ key: 'doctor-form', label: '医生录入', desc: '新增合作医生', path: '/subPackages/sub_salesperson/doctor-input/form', inputType: 'doctor', isForm: true, icon: 'plus-circle-fill', theme: this.themes.doctor },
|
||||
]},
|
||||
{ key: 'list', title: '档案管理', items: [
|
||||
{ key: 'my-store', label: '我的诊所', desc: '查看所属正式诊所', path: '/subPackages/sub_platform_admin/store/index', icon: 'home', theme: this.themes.store },
|
||||
{ key: 'store-list', label: '门店列表', desc: '查看已录门店', path: '/subPackages/sub_salesperson/store-input/index', icon: 'home-fill', theme: this.themes.store },
|
||||
{ key: 'doctor-list', label: '医生列表', desc: '查看已录医生', path: '/subPackages/sub_salesperson/doctor-input/index', icon: 'account-fill', theme: this.themes.doctor },
|
||||
]}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<business-page-layout title="我的" :show-tabbar="true" :tab-index="1">
|
||||
<view class="mine-container">
|
||||
<view class="profile-panel">
|
||||
<view class="avatar-squircle"><text>{{ avatarText }}</text></view>
|
||||
<view class="avatar-circle"><text>{{ avatarText }}</text></view>
|
||||
<view class="user-info">
|
||||
<text class="user-name">{{ displayName }}</text>
|
||||
<view class="role-badge"><text class="role-text">{{ roleText }}</text></view>
|
||||
@@ -11,13 +11,23 @@
|
||||
<view class="setting-panel">
|
||||
<wx-bind-entry ref="wxBindEntry" />
|
||||
<account-switch-entry />
|
||||
<view class="setting-item" @click="logout"><text class="danger-text">退出登录</text></view>
|
||||
</view>
|
||||
<view class="logout-wrap">
|
||||
<u-button
|
||||
:throttle-time="0"
|
||||
shape="circle"
|
||||
:custom-style="{ backgroundColor: '#6ACDBB', color: '#fff', height: '96rpx' }"
|
||||
@click="logout"
|
||||
>退出登录</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</business-page-layout>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* 业务员「我的」:对齐医生(菜单卡 + 绿色退出),保留绑定微信
|
||||
*/
|
||||
import BusinessPageLayout from '@/subPackages/sub_salesperson/components/business-page-layout.vue'
|
||||
import AccountSwitchEntry from '@/components/account-switch/account-switch-entry.vue'
|
||||
import WxBindEntry from '@/components/wx-bind-entry/wx-bind-entry.vue'
|
||||
@@ -38,7 +48,7 @@ export default {
|
||||
methods: {
|
||||
logout() {
|
||||
uni.showModal({
|
||||
title: '提示', content: '确定退出登录?',
|
||||
title: '提示', content: '确定退出登录?', confirmColor: '#6ACDBB',
|
||||
success: (res) => {
|
||||
if (!res.confirm) return
|
||||
clearLoginStorage()
|
||||
@@ -51,12 +61,17 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.mine-container { min-height: 100vh; background: #F5F7F8; }
|
||||
.mine-container { min-height: 100vh; background: #F5F7F8; padding-bottom: 60rpx; }
|
||||
.profile-panel { display: flex; align-items: center; background: #fff; padding: 60rpx 40rpx; margin-bottom: 24rpx; }
|
||||
.avatar-squircle { width: 128rpx; height: 128rpx; border-radius: 40rpx; background: linear-gradient(135deg, #6acdbb, #4db6a8); color: #fff; font-size: 52rpx; display: flex; align-items: center; justify-content: center; }
|
||||
.avatar-circle {
|
||||
width: 128rpx; height: 128rpx; border-radius: 50%;
|
||||
background: linear-gradient(135deg, #6acdbb, #4db6a8); color: #fff; font-size: 52rpx;
|
||||
display: flex; align-items: center; justify-content: center; flex-shrink: 0;
|
||||
}
|
||||
.user-info { margin-left: 32rpx; }
|
||||
.user-name { font-size: 40rpx; font-weight: 700; display: block; margin-bottom: 12rpx; }
|
||||
.role-badge { display: inline-block; background: rgba(106,205,187,.1); padding: 4rpx 16rpx; border-radius: 8rpx; }
|
||||
.role-text { font-size: 22rpx; color: #4db6a8; }
|
||||
.setting-panel { background: #fff; padding: 36rpx 40rpx; }
|
||||
.danger-text { color: #F53F3F; }
|
||||
.setting-panel { background: #fff; padding: 8rpx 40rpx 16rpx; margin-bottom: 24rpx; }
|
||||
.logout-wrap { padding: 0 40rpx 32rpx; }
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user