diff --git a/pages/home/home.vue b/pages/home/home.vue
index be27469..db38740 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -1,94 +1,72 @@
+
-
+
{{infoList.store['name'] || storeinfo[0].store['name'] || info.name || ''}}
-
+
{{infoList.store['position'] || storeinfo[0].store.position || info.position || ''}}
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
-
+
+
+
-
-
-
+
+
+
+ 到店挂号
+ 预约专家 不排队
-
-
- 到店挂号
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ 预约购药
+ 在线选药 极速达
-
- 预约购药
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
+
+
+ 预约购药
+ 正品保障 · 种类齐全 · 快速配送
-
- 预约购药
+
+
+
+
+
医生列表
@@ -96,92 +74,103 @@
-
-
-
-
-
-
-
-
-
-
- {{item.name}}
- {{item.title}}
+
+
+
+
+
+
+
+
-
-
-
- {{item.depart}} | {{item.store}}
+
+
+
+
+ {{item.name}}
+ {{item.title}}
+
+
+
+
+ {{item.depart}}
+ |
+ {{item.store}}
+
+
+
+
+ 擅长:
+ {{item.good_at}}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.inquiry_num}}
+ 问诊量
+
+
+ {{item.accept_percent}}
+ 好评率
+
-
-
- 擅长:
- {{item.good_at}}
-
-
-
-
-
- {{item.inquiry_num}}
- 问诊量
-
-
- {{item.accept_percent}}
- 接诊率
-
-
-
- 咨询
-
+
+
+
+ 立即咨询
-
+
+
+
+
- 药品列表
+ 热销药品
更多
-
-
-
-
-
-
-
-
-
- {{item.drug.drug_name}}
- {{item.drug.is_otc ? 'OTC' : '处方药'}}
-
-
-
-
-
- {{item.drug.category}}
-
-
-
-
- 价格:
- {{item.price}}
-
-
-
-
-
- {{item.sales}}
- 销量
+
+
+
+
+
+
+
+ {{item.drug.drug_name}}
+ {{item.drug.is_otc ? 'OTC' : 'Rx'}}
-
-
+ {{item.drug.specification}}
+
+ {{item.drug.category}}
+
+
+
+
+ ¥
+ {{item.price}}
+
+
购买
@@ -189,8 +178,7 @@
-
-
+
@@ -220,86 +208,47 @@ export default {
show: true,
showed: false,
shopList: {},
- flag: false, //防止多次点击
- headerTitle: "", // 标题
- infoList: "", // 扫码 门店
- list: [
- // '/static/home/banner.png',
- // '/static/home/banner.png',
- // '/static/home/banner.png'
- ],
+ flag: false,
+ headerTitle: "",
+ infoList: "",
+ list: [],
info: [],
bgShow: false,
isShow_envVersion: true
}
},
onLoad() {
-
const token = uni.getStorageSync('token')
const userInfo = uni.getStorageSync('userinfo')
if (!token || !userInfo) {
- // 跳转到登录页,不要返回的
uni.navigateTo({
url: '/pages/home/index'
})
}
this.isShow_envVersion = uni.getStorageSync('isShow_envVersion')
if (this.isShow_envVersion === false) {
-
this.getList();
- // if (this.doctorList.length === 0) {
- // this.getList();
- // }
}
},
- created() {
- const token = uni.getStorageSync('token')
- const userInfo = uni.getStorageSync('userinfo')
- if (!token || !userInfo) {
- // 跳转到登录页,不要返回的
- uni.navigateTo({
- url: '/pages/home/index'
- })
- }
-
- },
onReady() {
- console.log(uni.getStorageSync('store_id'), '3')
if (uni.getStorageSync('store_id')) {
this.getStore();
} else {
this.goNewlist()
}
uni.setNavigationBarTitle({
- title: this.headerTitle,
- success() {
- }
+ title: this.headerTitle
});
uni.setNavigationBarColor({
- frontColor: '#000000', //前景颜色值,包括按钮、标题、状态栏的颜色,仅支持 #ffffff 和 #000000
+ frontColor: '#000000',
})
},
methods: {
goYard(type) {
- //订阅消息
-
uni.navigateTo({
url: '/pages/Inquiries/Inquiries?type=' + type
})
- // uni.requestSubscribeMessage({
- // tmplIds: ['JdSs08cMSiL17xwwHZ8fZ5UBUqeY0eKAuvyW7n4Fl20',
- // 'OERMugiahk-aKRVH9GHmdJCRBE3yldzEKTzbMCJhY6U',
- // 'p-Ix0uIuwPKxm-_yKDlI8mkI-niUgPtaMUZyAaa5vvA'
- // ],
- // complete: (res) => {
- // // console.log(res, 'xxxxxxxxxxxx');
- // uni.navigateTo({
- // url: '/pages/Inquiries/Inquiries?type=' + 1
- // })
- // }
- // })
},
- // 线上复诊
golist(type) {
if (type === 3) {
return uni.navigateTo({
@@ -307,122 +256,10 @@ export default {
})
}
uni.navigateTo({
- // url: '/subPackages/product/product'
url: '/pages/Inquiries/Inquiries?type=' + type
})
- // // 提醒用户正在开发
- // uni.showToast({
- // title: '正在开发中',
- // icon: 'none',
- // duration: 2000
- // })
- // return;
- // // this.bgShow = true
- // let that = this
- // if (!this.flag) {
- // this.getH5()
- // this.flag = true
- // uni.showLoading({
- // title: "加载中"
- // });
- //
- // setTimeout(() => {
- // uni.hideLoading();
- // if (uni.getStorageSync('token_platform_id')) {
- // uni.navigateTo({
- // url: '/subPackages/my/my_online',
- // success: () => {
- // setTimeout(() => {
- // that.flag = false;
- // }, 200)
- // uni.hideLoading();
- // },
- // fail: () => {
- // setTimeout(() => {
- // that.flag = false;
- // }, 200)
- // uni.hideLoading();
- // }
- // })
- // }
- // }, 600)
- // }
},
- getH5() {
- // 进入token
- getToken({
- method: "post",
- data: {
- user_id: uni.getStorageSync('user_id'),
- avatarurl: uni.getStorageSync('userinfo')['avatarurl'],
- mobile: uni.getStorageSync('userinfo')['mobile'],
- nickname: uni.getStorageSync('userinfo')['nickname'],
- openid: uni.getStorageSync('userinfo')['openid'],
- session_key: uni.getStorageSync('userinfo')['session_key'],
- store_id: uni.getStorageSync('store_id') || '11001',
- },
- }).then((res) => {
- if (res.data.errcode == 0) {
- // uni.setStorageSync('platform_id', res.data.data.platform_id)
- uni.setStorageSync('token_platform_id', res.data.data.token)
- } else {
- this.$refs.uToast.show({
- title: res.data.msg,
- type: 'default',
- icon: false
- })
- }
- })
- },
- tosearch() {
- uni.navigateTo({
- url: '/subPackages/shop/search-home'
- })
- },
- toStore() {
- uni.navigateTo({
- url: '/subPackages/my/mystore'
- })
- },
- goLookDoctor(id, sts_id) {
- if (!sts_id) {
- let sts_id = uni.getStorageSync('store_id')
- }
-
- setTimeout(() => {
- //订阅消息
- uni.requestSubscribeMessage({
- tmplIds: ['JdSs08cMSiL17xwwHZ8fZ5UBUqeY0eKAuvyW7n4Fl20',
- 'OERMugiahk-aKRVH9GHmdJCRBE3yldzEKTzbMCJhY6U',
- 'p-Ix0uIuwPKxm-_yKDlI8mkI-niUgPtaMUZyAaa5vvA'
- ],
- complete: (res) => {
- // console.log(res, 'xxxxxxxxxxxx');
- uni.navigateTo({
- url: '/subPackages/doctor/doctor-detail?store_id=' + sts_id +
- '&id=' + id
- })
- }
- })
- }, 200)
- },
-
- // 扫码
- toSee() {
- uni.scanCode({
- success: function(res) {
- // console.log('条码类型:' + res.scanType);
- // console.log('条码内容:' + res.result);
- uni.showToast({
- title: '扫码成功',
- duration: 2000,
- icon: "success"
- });
- },
- });
- },
-
- // 门店
+ // 获取门店信息
getStore() {
if (uni.getStorageSync('store_id')) {
this.show = false
@@ -432,35 +269,20 @@ export default {
store_id: uni.getStorageSync('store_id') || '11001',
}
}).then((res) => {
- // console.log(res, 'info');
if (res.data.errcode == 0) {
this.storeType = res.data.data.store['type']
this.infoList = res.data.data
this.headerTitle = res.data.data.store['name']
uni.setNavigationBarTitle({
- title: this.headerTitle,
- success() {
- },
- fail() {
- this.getStore()
- }
+ title: this.headerTitle
});
- uni.setNavigationBarColor({
- frontColor: '#000000', //前景颜色值,包括按钮、标题、状态栏的颜色,仅支持 #ffffff 和 #000000
- })
- // this.getList();
this.getBannered();
}
})
} else {
- console.log(uni.getStorageSync('store_id'))
this.goNewlist()
}
},
-
- /**
- * 获取绑定的用户诊所,选择最后登录的
- */
goNewlist() {
storeList({
method: "post",
@@ -468,7 +290,6 @@ export default {
store_id: uni.getStorageSync('store_id') || '11001',
}
}).then((res) => {
- // console.log(res, 'list');
if (res.data.errcode == 0) {
this.show = res.data.data.open_issue
this.showed = this.show
@@ -477,45 +298,17 @@ export default {
this.getBannered();
} else {
this.storeinfo = res.data.data.list.filter((item) => item.is_online == 1)
- console.log(this.storeinfo, 'storeinfo')
uni.setStorageSync('store_id', this.storeinfo[0].store.id)
this.headerTitle = this.storeinfo[0].store['name']
- // this.storeType = this.storeinfo[0].store['type']
uni.setNavigationBarTitle({
- title: this.headerTitle,
- success() {
- }
+ title: this.headerTitle
});
- uni.setNavigationBarColor({
- frontColor: '#000000', //前景颜色值,包括按钮、标题、状态栏的颜色,仅支持 #ffffff 和 #000000
- })
- // this.getList();
this.getBannered();
}
-
- } else {
- // uni.removeStorageSync('token')
- if (this.isShow_envVersion) {
- uni.navigateTo({
- url: '/pages/home/index'
- })
- } else {
- uni.navigateTo({
- url: '/pages/home/index'
- })
- }
}
})
-
},
-
- goList(id) {
- uni.navigateTo({
- url: '/pages/home/index-list?type=' + 1 + '&id?=' + id
- })
- },
-
- // 医生列表
+ // 获取医生列表
getList() {
this.doctorList = [];
doctorList({
@@ -529,29 +322,18 @@ export default {
}
})
},
-
- // 切换门店
toChang(e) {
- // console.log(e, 'id');
storeChange({
method: "post",
- data: {
- store_id: e
- }
+ data: { store_id: e }
}).then((res) => {
if (res.data.errcode == 0) {
this.getStore()
this.getList();
- // uni.showToast({
- // title: '切换成功',
- // duration: 2000,
- // icon: "success"
- // });
}
})
},
-
- // 门店详情--轮播图
+ // 获取Banner
getBannered() {
getBanner({
method: "post",
@@ -559,12 +341,10 @@ export default {
store_id: uni.getStorageSync('store_id') || '11001',
}
}).then((res) => {
- console.log(res, 'info');
if (res.data.errcode == 0) {
this.info = res.data.data
this.urlInfo = res.data.data.nav
this.storeType = res.data.data.type
- console.log(this.storeType)
this.list = (res.data.data.nav).map((item) => {
return item.pic
})
@@ -572,69 +352,52 @@ export default {
})
},
toBanner(e) {
- if (!this.urlInfo[e].external_link) {
- return
- }
+ if (!this.urlInfo[e].external_link) return
if (this.urlInfo[e].link_type == 1 && this.isShow_envVersion == false) {
- // 内部
uni.navigateTo({
- url: this.urlInfo[e].external_link,
- success() {
- // console.log(this.urlInfo[e].external_link, 'aaaaaaaaaa');
- }
+ url: this.urlInfo[e].external_link
})
} else {
- // link_type==2 外部
uni.navigateTo({
- url: '/pages/home/home-banner?id=' + this.urlInfo[e].external_link,
- success() {
- // console.log(this.urlInfo[e].external_link, 'aaaaaaaaaa');
- }
+ url: '/pages/home/home-banner?id=' + this.urlInfo[e].external_link
})
}
},
-
+ // 获取药品列表
getProductList() {
getStoreDrugListBySalespersonApi({
store_id: uni.getStorageSync('store_id') || '11001',
page: 1,
- limit: 5 // 首页只展示5个产品
+ limit: 3 // 只展示3个商品
}).then((res) => {
if (res.data.code == 0) {
this.productList = res.data.result.records;
}
})
},
-
goProductDetail(item) {
uni.navigateTo({
url: `/subPackages/product/symptoms?id=${item.drug.id}&drug_name=${item.drug.drug_name}&is_otc=${item.drug.is_otc}&image=${item.drug.image}&price=${item.price}`
});
},
-
buyProduct(item) {
uni.navigateTo({
url: `/subPackages/product/product?doctor_id=39®ister_type=3`
});
- }
- },
- mounted() {
-
- console.log('加载js')
- const token = uni.getStorageSync('token')
- const id = uni.getStorageSync('store_id')
- const d_id = uni.getStorageSync('doctors_id')
- const d_store = uni.getStorageSync('st_id')
- if (token && id) {
- console.log(id, 'ssssss')
- this.toChang(id)
- }
- if (d_id && token && d_store) {
- this.goLookDoctor(d_id, d_store)
+ },
+ goLookDoctor(id, sts_id) {
+ let currentStsId = sts_id || uni.getStorageSync('store_id');
+ uni.navigateTo({
+ url: '/subPackages/doctor/doctor-detail?store_id=' + currentStsId + '&id=' + id
+ })
+ },
+ toStore() {
+ uni.navigateTo({
+ url: '/subPackages/my/mystore'
+ })
}
},
onShow() {
- console.log('显示')
this.storeId = uni.getStorageSync('store_id');
this.infoList = ""
this.getStore();
@@ -648,7 +411,6 @@ export default {
.content {
background-color: #fff;
width: 750rpx;
- max-height: 100%;
min-height: 100vh;
padding-bottom: env(safe-area-inset-bottom);
position: relative;
@@ -661,41 +423,25 @@ export default {
position: absolute;
left: 0;
top: 0;
-
- image {
- width: 510rpx;
- height: 621rpx;
- vertical-align: middle;
- margin: 200rpx auto 0;
- }
+ image { width: 510rpx; height: 621rpx; vertical-align: middle; margin: 200rpx auto 0; }
}
+ /* 头部区域样式 */
.head {
width: 750rpx;
height: 390rpx;
padding: 20rpx;
background: linear-gradient(180deg, #298DFF 0%, #9ECBFF 70%, #FFFFFF 100%);
- .search {
- width: 710rpx;
- margin: 20rpx auto 0;
- }
-
.store {
width: 700rpx;
height: 78rpx;
line-height: 78rpx;
font-size: 28rpx;
- font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #FFFFFF;
- margin: 0rpx auto 0rpx;
-
- .iconfont {
- font-size: 27rpx;
- color: #fff;
- margin-left: 16rpx;
- }
+ margin: 0 auto;
+ .iconfont { font-size: 27rpx; color: #fff; margin-left: 16rpx; }
}
.area {
@@ -704,34 +450,23 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
- margin: 0rpx auto;
-
+ margin: 0 auto;
.place {
font-size: 26rpx;
- font-family: PingFang SC-Regular, PingFang SC;
- font-weight: 500;
color: #FFFFFF;
-
- .iconfont {
- font-size: 25rpx;
- color: #FFFFFF;
- margin-right: 10rpx;
- }
+ .iconfont { font-size: 25rpx; color: #FFFFFF; margin-right: 10rpx; }
}
}
}
+ /* 轮播图区域 */
.section {
width: 710rpx;
margin: -180rpx auto 30rpx;
height: 300rpx;
-
- .banner {
- width: 100%;
- height: 100%;
- }
}
+ /* 导航栏样式:左文右图布局 + 背景图片 */
.nav {
width: 710rpx;
background: #FFFFFF;
@@ -746,323 +481,252 @@ export default {
height: 178rpx;
display: flex;
align-items: center;
- justify-content: space-around;
- background: url('/static/home/bg01.png') no-repeat;
- background-size: 100% 100%;
+ justify-content: space-between;
+ padding: 20rpx 30rpx;
+ box-sizing: border-box;
border-radius: 24rpx;
+ background-size: 100% 100%;
+ background-repeat: no-repeat;
+ position: relative;
- .nav_service_img {
- width: 116rpx;
- height: 116rpx;
- vertical-align: middle;
-
- image {
- width: 100%;
- height: 100%;
+ .nav_content {
+ z-index: 2;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ .nav_title {
+ font-size: 38rpx;
+ font-weight: 800;
+ color: #FFFFFF;
+ margin-bottom: 8rpx;
+ text-shadow: 0 2rpx 4rpx rgba(0,0,0,0.1);
+ }
+ .nav_desc {
+ font-size: 22rpx;
+ color: rgba(255,255,255,0.9);
+ font-weight: 500;
}
}
- .nav_service_title {
- font-size: 40rpx;
- font-family: PingFang SC-Heavy, PingFang SC;
- font-weight: 800;
- color: #FFFFFF;
+ .nav_img_wrapper {
+ width: 100rpx;
+ height: 100rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ .nav_img {
+ width: 80rpx;
+ height: 80rpx;
+ opacity: 0.9;
+ }
}
}
- .nav_service:last-child {
- background: url('/static/home/bg02.png') no-repeat;
- background-size: 100% 100%;
- }
+ /* 背景图资源引用 */
+ .bg-clinic { background-image: url('/static/home/bg01.png'); }
+ .bg-pharmacy { background-image: url('/static/home/bg02.png'); }
}
+ /* 标题栏通用样式 */
.doctor_list {
width: 710rpx;
font-size: 36rpx;
- font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #232323;
margin: 44rpx auto 24rpx;
display: flex;
justify-content: space-between;
align-items: center;
-
.info {
font-size: 28rpx;
- font-weight: 500;
color: #666666;
}
}
- /* 医生卡片样式 */
- .doctor-card {
- background: #FFFFFF;
- border-radius: 16rpx;
- box-shadow: 0 4rpx 12rpx rgba(65, 117, 238, 0.08);
- margin-bottom: 24rpx;
- overflow: hidden;
- transition: all 0.25s ease;
-
- &:active {
- transform: translateY(2rpx);
- box-shadow: 0 2rpx 6rpx rgba(65, 117, 238, 0.1);
- }
- }
-
- .card-content {
- display: flex;
- padding: 24rpx;
- }
-
- .doctor-avatar {
- width: 100rpx;
- height: 100rpx;
- border-radius: 50%;
- border: 2rpx solid #f0f5ff;
- flex-shrink: 0;
- margin-right: 20rpx;
- }
-
- .doctor-info {
- flex: 1;
- min-width: 0;
- }
-
- .name-section {
- display: flex;
- align-items: center;
- margin-bottom: 12rpx;
- }
-
- .doctor-name {
- font-size: 32rpx;
- font-weight: bold;
- color: #232323;
- margin-right: 16rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
-
- .title-badge {
- font-size: 22rpx;
- color: #4175EE;
- background: #eef4ff;
- border-radius: 8rpx;
- padding: 4rpx 12rpx;
- flex-shrink: 0;
- }
-
- .department-section {
- display: flex;
- align-items: center;
- margin-bottom: 16rpx;
-
- .iconfont {
- font-size: 24rpx;
- color: #888;
- margin-right: 6rpx;
- }
-
- .department {
- font-size: 24rpx;
- color: #666;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- }
-
- .expertise {
- display: flex;
- font-size: 26rpx;
- color: #444;
- line-height: 1.4;
- margin-bottom: 16rpx;
-
- .expertise-label {
- color: #666;
- flex-shrink: 0;
- }
-
- .expertise-content {
- flex: 1;
- min-width: 0;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- }
-
- .stats {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding-top: 12rpx;
- border-top: 1rpx dashed #e0e7ff;
- }
-
- .stat-item {
- flex: 1;
- text-align: center;
- }
-
- .stat-value {
- font-size: 32rpx;
- font-weight: bold;
- color: #4175EE;
- display: block;
- line-height: 1.2;
- }
-
- .stat-label {
- font-size: 24rpx;
- color: #888;
- display: block;
- }
-
- .consult-btn {
- background: #4175EE;
- color: white;
- border-radius: 40rpx;
- padding: 10rpx 24rpx;
- font-size: 26rpx;
- display: flex;
- align-items: center;
-
- .iconfont {
- font-size: 24rpx;
- margin-right: 6rpx;
- }
-
- &:active {
- background: #3366d1;
- }
- }
-
-
- .lists {
+ /* ============ 优化后的医生卡片样式 (start) ============ */
+ .doctor-card-optimized {
width: 710rpx;
- background: linear-gradient(180deg, #E2F1FF 0%, #FBFDFF 54%, #FFFFFF 100%);
+ margin: 0 auto 24rpx;
+ background: #FFFFFF;
border-radius: 24rpx;
- padding: 30rpx;
- margin: 32rpx auto 52rpx;
- box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.08);
+ /* 更柔和的阴影,提升高级感 */
+ box-shadow: 0 8rpx 24rpx rgba(65, 117, 238, 0.08);
+ transition: all 0.3s ease;
- .list_left {
+ &:active {
+ transform: scale(0.99);
+ }
+
+ .card-inner {
+ padding: 30rpx;
+ }
+
+ /* 顶部布局:头像+信息 */
+ .card-top {
display: flex;
- justify-content: space-around;
- margin-bottom: 22rpx;
+ margin-bottom: 24rpx;
- image {
- width: 200rpx;
- height: 200rpx;
- margin-right: 20rpx;
+ .avatar-box {
+ margin-right: 24rpx;
+ .avatar-img {
+ width: 120rpx;
+ height: 120rpx;
+ border-radius: 50%;
+ border: 4rpx solid #F0F6FF; /* 增加浅蓝色边框 */
+ }
}
- .it {
- width: 450rpx;
- font-family: PingFang SC-Regular, PingFang SC;
+ .info-box {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
- .it_name {
- height: 80rpx;
- font-size: 28rpx;
- font-weight: bold;
- color: #232323;
- }
-
- .it_info {
- display: -webkit-box;
- -webkit-line-clamp: 1;
- -webkit-box-orient: vertical;
- text-overflow: ellipsis;
- overflow: hidden;
-
- font-size: 24rpx;
- font-weight: 400;
- color: #999999;
- margin: 12rpx 0 34rpx 0;
- }
-
- .it_price {
+ /* 第一行:姓名 */
+ .name-row {
display: flex;
align-items: center;
-
- .picture {
- width: 140rpx;
- height: 60rpx;
- line-height: 58rpx;
- text-align: center;
- border-radius: 4rpx 4rpx 4rpx 4rpx;
- border: 2rpx solid #4175EE;
- font-size: 24rpx;
- font-family: PingFang SC-Bold, PingFang SC;
+ margin-bottom: 8rpx;
+ .name-txt {
+ font-size: 34rpx;
font-weight: bold;
+ color: #333;
+ margin-right: 16rpx;
+ }
+ .title-tag {
+ font-size: 22rpx;
color: #4175EE;
- margin: 0 30rpx 0 0;
+ background: rgba(65, 117, 238, 0.1);
+ padding: 4rpx 12rpx;
+ border-radius: 8rpx;
+ }
+ }
+
+ /* 第二行:科室 */
+ .dept-row {
+ display: flex;
+ align-items: center;
+ font-size: 26rpx;
+ color: #666;
+ margin-bottom: 8rpx;
+ .divider { margin: 0 10rpx; color: #ddd; }
+ }
+
+ /* 第三行:擅长 */
+ .skill-row {
+ display: flex;
+ font-size: 24rpx;
+ color: #999;
+ line-height: 1.4;
+ .label { flex-shrink: 0; }
+ .content {
+ display: -webkit-box;
+ -webkit-line-clamp: 1;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
}
}
}
}
- .card {
+ /* 分割线 */
+ .card-line {
+ height: 1px;
+ background: #F5F7FA;
+ margin-bottom: 24rpx;
+ }
- .list_nums {
- height: 34rpx;
- font-size: 28rpx;
- font-family: PingFang SC-Regular, PingFang SC;
- font-weight: 500;
- color: #666666;
- margin: 18rpx 0 24rpx;
+ /* 底部数据与按钮 */
+ .card-bottom {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+
+ .data-area {
display: flex;
- align-items: center;
-
- .txt {
- margin-right: 30rpx;
-
- text {
- font-size: 28rpx;
- color: #FEA54C;
- margin: 0 10rpx;
+ gap: 40rpx;
+ .data-item {
+ text-align: center;
+ .num {
+ display: block;
+ font-size: 32rpx;
+ font-weight: bold;
+ color: #333;
+ margin-bottom: 4rpx;
+ }
+ .lbl {
+ font-size: 22rpx;
+ color: #999;
}
}
}
- .list_going {
- font-size: 24rpx;
- font-family: PingFang SC-Regular, PingFang SC;
- font-weight: 400;
- color: #232323;
- line-height: 44rpx;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- text-overflow: ellipsis;
- overflow: hidden;
- margin: 16rpx auto;
- }
-
- .list_price {
+ /* 修复后的咨询按钮样式 */
+ .action-btn {
+ width: 170rpx;
+ height: 64rpx;
+ /* 使用flex布局确保内容居中 */
display: flex;
align-items: center;
+ justify-content: center;
+ background: linear-gradient(135deg, #4A90E2 0%, #5B8FF9 100%);
+ color: #fff;
+ font-size: 26rpx;
+ border-radius: 32rpx;
+ font-weight: 500;
+ box-shadow: 0 6rpx 16rpx rgba(74, 144, 226, 0.3);
- .picture {
- width: 140rpx;
- height: 60rpx;
- line-height: 58rpx;
- text-align: center;
- border-radius: 4rpx 4rpx 4rpx 4rpx;
- border: 2rpx solid #4175EE;
- font-size: 24rpx;
- font-family: PingFang SC-Bold, PingFang SC;
- font-weight: bold;
- color: #4175EE;
- margin: 0 30rpx 0 0;
+ .iconfont {
+ font-size: 28rpx;
+ margin-right: 6rpx;
}
}
}
}
+ /* ============ 优化后的医生卡片样式 (end) ============ */
+
+ /* 药店模式 - 药品列表容器 */
+ .product-list-container {
+ padding: 0 20rpx;
+ }
+
+ /* 药品卡片样式 */
+ .product-card-simple {
+ background: #fff;
+ border-radius: 16rpx;
+ margin-bottom: 20rpx;
+ padding: 24rpx;
+ display: flex;
+ align-items: center;
+ box-shadow: 0 4rpx 12rpx rgba(65, 117, 238, 0.08);
+
+ .product-img { width: 160rpx; height: 160rpx; border-radius: 12rpx; margin-right: 24rpx; background: #f8f8f8; }
+
+ .product-info-simple {
+ flex: 1;
+ height: 160rpx;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+
+ .product-main {
+ .product-name-row {
+ display: flex; align-items: center; margin-bottom: 8rpx;
+ .product-name { font-size: 30rpx; font-weight: bold; color: #333; margin-right: 12rpx; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+ .otc-tag { font-size: 20rpx; padding: 2rpx 8rpx; border-radius: 4rpx; font-weight: bold; border: 1px solid; }
+ .otc-green { color: #00B578; border-color: #00B578; }
+ .otc-red { color: #FF4D4F; border-color: #FF4D4F; }
+ }
+ .product-spec { font-size: 24rpx; color: #999; display: block; margin-bottom: 8rpx; }
+ .product-tags { display: flex; .tag { font-size: 20rpx; color: #666; background: #f5f5f5; padding: 2rpx 10rpx; border-radius: 4rpx; } }
+ }
+
+ .product-bottom {
+ display: flex; justify-content: space-between; align-items: flex-end;
+ .price-box { color: #FF4D4F; font-weight: bold; .currency { font-size: 24rpx; margin-right: 2rpx; } .price { font-size: 36rpx; } }
+ .buy-btn { background: #4175EE; color: #fff; font-size: 26rpx; padding: 10rpx 30rpx; border-radius: 30rpx; font-weight: 500; }
+ }
+ }
+ }
}
diff --git a/subPackages/doctor/doctor-detail.vue b/subPackages/doctor/doctor-detail.vue
index 1bb9a41..4891e1b 100644
--- a/subPackages/doctor/doctor-detail.vue
+++ b/subPackages/doctor/doctor-detail.vue
@@ -284,11 +284,11 @@
}
}).then((res) => {
if (res.data.errcode == 0) {
- uni.showToast({
- title: '切换成功',
- duration: 2000,
- icon: "success"
- });
+ // uni.showToast({
+ // title: '切换成功',
+ // duration: 2000,
+ // icon: "success"
+ // });
}
})
},
@@ -646,4 +646,4 @@
}
}
-
\ No newline at end of file
+
diff --git a/subPackages/product/product.vue b/subPackages/product/product.vue
index f0b0881..ea320cf 100644
--- a/subPackages/product/product.vue
+++ b/subPackages/product/product.vue
@@ -1,63 +1,93 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
+
-
+
+
+
+
+
+
+
+
- {{ item.drug.drug_name }}
-
- 功效
- {{ item.drug.function }}
-
-
- 规格
- {{ item.drug.specification }}
-
-
-
- ¥{{ item.price }}
- 库存充足
+
+
+
+ {{ item.drug.drug_name }}
+
+
+
+
+ {{item.drug.is_otc ? 'OTC' : 'Rx'}}
+
+ {{ item.drug.specification }}
-
-
+
+
+
+ 主治:{{ item.drug.function }}
+
+
+
+
+
+
+
+ ¥
+ {{ item.price }}
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
+
+ {{ cartCount > 99 ? '99+' : cartCount }}
+
-
+
@@ -117,34 +144,31 @@
diff --git a/subPackages/product/symptoms.vue b/subPackages/product/symptoms.vue
index 976a0f8..1e56e5b 100644
--- a/subPackages/product/symptoms.vue
+++ b/subPackages/product/symptoms.vue
@@ -8,7 +8,7 @@
autoplay
circular
indicator-color="rgba(255,255,255,0.6)"
- indicator-active-color="#536DFE"
+ indicator-active-color="#4175EE"
>
-
-
-
-
@@ -36,11 +28,9 @@
¥{{ productDetail.daijian_price }}
-
- 处方药
-
-
- 非处方药
+
+
+ {{ productDetail.is_otc === 0 ? '处方药' : 'OTC 非处方药' }}
@@ -49,7 +39,7 @@
-
+
规格:{{ productDetail.specification || '暂无' }}
@@ -93,7 +83,7 @@
@click="previewInstruction"
/>
-
+
暂无说明书,详见产品内部的说明书
@@ -103,11 +93,11 @@
-