feat: 会员管理、在线复诊优化、新增配送仓库

This commit is contained in:
李琦
2026-07-30 07:37:37 +08:00
parent cf3fbf5a4c
commit effaee6229
4 changed files with 127 additions and 37 deletions

View File

@@ -1,4 +1,5 @@
<template>
<!-- 药师我的主页审方 Tab 壳下的个人中心对齐 my-pharmacist 能力 -->
<view class="safe-area-inset-bottom">
<u-navbar title="我的" :is-back="false" title-size="34" title-color="#fff" :background="{
background:'linear-gradient(90deg, #00BFA6 0%, #6ACDBB 93%)'}">
@@ -17,12 +18,15 @@
职业机构
</view>
<view class="store">
{{list.store.name || ' '}}
{{(list.store && list.store.name) || ' '}}
</view>
</view>
<!-- 菜单卡绑定微信 / 个人资料 / 设置 / 切换账号对齐医生与 my-pharmacist -->
<view class="card">
<view class="wx-bind-wrap">
<wx-bind-entry ref="wxBindEntry" />
</view>
<view class="setup" @click="toInfo">
个人资料
<u-icon name="arrow-right" color="#A7ABB0"></u-icon>
@@ -31,8 +35,17 @@
设置
<u-icon name="arrow-right" color="#A7ABB0"></u-icon>
</view>
<view class="account-switch-wrap">
<account-switch-entry />
</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>
<u-tabbar v-model="current" :list="listed" active-color="#6ACDBB" @change="changed"></u-tabbar>
<d-loading-page :loading="loading"></d-loading-page>
@@ -40,10 +53,15 @@
</template>
<script>
import {
my
} from "@/api/all.js";
/**
* 药师端「我的」页(审方 Tab 实际入口)
* 补齐绑定微信 / 切换账号 / 退出登录,与 pages/my/my-pharmacist.vue 能力对齐
*/
import { my, logout } from '@/api/all.js'
import WxBindEntry from '@/components/wx-bind-entry/wx-bind-entry.vue'
import AccountSwitchEntry from '@/components/account-switch/account-switch-entry.vue'
export default {
components: { WxBindEntry, AccountSwitchEntry },
data() {
return {
keyword: "",
@@ -54,36 +72,28 @@
statusBarHeight: this.$statusBarHeight,
loading: true,
userInfo: uni.getStorageSync("userInfo") || {},
list: [],
list: {},
waitList: [],
is_req: false,
current: 1,
listed: '',
};
},
computed: {
},
created() {
},
onShow() {
// 从设置/资料返回或切换账号后,刷新微信绑定展示状态
this.refreshWxBind()
},
onLoad() {
this.listed = [{
iconPath: require("../../static/image/w-sf.png"),
selectedIconPath: require("../../static/image/sf.png"),
text: '审方',
// pagePath: '/pages/pharmacist/index',
current: 0
},
{
iconPath: require("../../static/image/w-wd.png"),
selectedIconPath: require("../../static/image/wd.png"),
text: '我的',
// pagePath: '/pages/pharmacist/pharmacist-my',
current: 1
}
]
@@ -91,23 +101,20 @@
methods: {
changed(index) {
this.current = index;
// console.log(this.current);
if (this.current == 0) {
uni.switchTab({
url: '/pages/pharmacist/index',
})
}
},
/** 拉取药师资料(头像、姓名、执业机构) */
async getList() {
let res = {};
res = await my({
store_id: uni.getStorageSync('store_id') || '11001',
})
this.list = [];
this.list = {};
if (res.errcode == 0) {
// console.log(res, 'wd');
this.list = res.data;
this.$nextTick(() => {
this.loading = false;
@@ -117,16 +124,34 @@
this.loading = false;
}
},
/** 刷新绑定微信入口状态(组件内部按手机号/账号判断) */
refreshWxBind() {
if (this.$refs.wxBindEntry) {
this.$refs.wxBindEntry.refresh()
}
},
/** 退出登录:清本地会话并回登录页 */
logout() {
logout({ store_id: uni.getStorageSync('store_id') || 11001 }).then((res) => {
if (res.errcode != -1) {
uni.clearStorage()
uni.clearStorageSync()
this.$go('/pages/login/index', 2)
} else {
this.$toast(res.msg);
}
})
},
toInfo() {
this.$go('../../subPackages/sub_pharmacist/pharmacist_info')
},
toSetup() {
this.$go('../../subPackages/sub_pharmacist/pharmacist_setInfo')
}
},
mounted() {
this.getList()
this.refreshWxBind()
}
};
</script>
@@ -136,19 +161,6 @@
}
</style>
<style lang="scss" scoped>
.bg {
position: fixed;
width: 750rpx;
height: 400rpx;
// background: linear-gradient(
// 180deg,
// #00BFA6 0%,
// #6ACDBB 0%,
// rgba(41, 121, 255, 0) 100%
// );
z-index: 981;
}
.head {
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
@@ -188,7 +200,6 @@
.card {
width: 710rpx;
height: 176rpx;
background: #FFFFFF;
margin: 30rpx auto;
font-family: PingFang SC-Bold, PingFang SC;
@@ -202,6 +213,21 @@
align-items: center;
justify-content: space-between;
padding: 0 30rpx;
border-bottom: 1rpx solid #f0f0f0;
}
}
.wx-bind-wrap {
border-bottom: 1rpx solid #f0f0f0;
padding: 0 30rpx;
}
.account-switch-wrap {
padding: 8rpx 30rpx 16rpx;
}
.logout-wrap {
width: 710rpx;
margin: 0 auto 32rpx;
}
</style>