diff --git a/pages.json b/pages.json index b593539..8c2ca8b 100644 --- a/pages.json +++ b/pages.json @@ -74,6 +74,12 @@ } // "needLogin": true }, + { + "path": "pages/index/platform-info", + "style": { + "navigationBarTitleText": "平台信息" + } + }, { "path": "pages/index/order-info", "style": { diff --git a/pages/cate/cate.vue b/pages/cate/cate.vue index 9dcd042..a9936b8 100644 --- a/pages/cate/cate.vue +++ b/pages/cate/cate.vue @@ -39,7 +39,7 @@ {{item.is_otc=='0'?'处方药':'非处方药'}} - + {{item.drug_name}} @@ -475,6 +475,12 @@ width: 100%; height: 100%; border-radius: 8rpx; + + // 处方药图片模糊处理 + &.prescription-blur { + filter: blur(10px); + -webkit-filter: blur(10px); + } } } diff --git a/pages/home/home.vue b/pages/home/home.vue index e50abc1..4df0295 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -145,7 +145,7 @@ 处方药 - + @@ -198,7 +198,7 @@ - + @@ -233,6 +233,20 @@ + + + + 平台资质 + 更多 > + + + + + {{ item.name }} + + + + @@ -251,6 +265,7 @@ import { storeInfo, storeList } from '../../request/api/api' +import { getPlatformQualificationsApi } from '../../request/api/platform' import { getStoreDrugListBySalespersonApi, getHomeTopProductsApi } from "@/request/api/product"; export default { @@ -266,6 +281,7 @@ export default { prescription: [], health_food: [] }, // 首页热销商品 + qualifications: [], // 资质证明列表 show: true, showed: false, shopList: {}, @@ -538,6 +554,25 @@ export default { } }) }, + // 获取平台资质证明 + getPlatformQualifications() { + getPlatformQualificationsApi({ + store_id: uni.getStorageSync('store_id') || '11001', + }).then((res) => { + if (res.data.code == 0 || res.data.errcode == 0) { + this.qualifications = res.data.data || res.data.result || []; + } + }).catch(() => { + // 如果接口不存在,使用默认数据 + this.qualifications = [ + { name: '药品经营许可证', image: '', type: 1 }, + { name: '营业执照', image: '', type: 2 }, + { name: '医疗器械经营许可证', image: '', type: 3 }, + { name: '食品经营许可证', image: '', type: 4 }, + { name: '药师资格证', image: '', type: 5 } + ]; + }) + }, // 跳转药品详情 goProductDetail(item) { uni.navigateTo({ @@ -549,6 +584,21 @@ export default { uni.navigateTo({ url: `/subPackages/product/product?doctor_id=39®ister_type=3` }); + }, + // 预览资质证明 + previewQualification(item) { + if (item.image) { + uni.previewImage({ + urls: [item.image], + current: item.image + }); + } + }, + // 跳转平台信息页面 + goPlatformInfo() { + uni.navigateTo({ + url: '/pages/index/platform-info' + }); } }, mounted() { @@ -570,6 +620,7 @@ export default { this.getList(); this.getProductList(); // 每次显示页面刷新商品列表 this.getHomeTopProducts(); // 获取首页热销商品 + this.getPlatformQualifications(); // 获取平台资质证明 }, } @@ -801,6 +852,12 @@ export default { border-radius: 12rpx; margin-right: 24rpx; background: #f8f8f8; + + // 处方药图片模糊处理 + &.prescription-blur { + filter: blur(10px); + -webkit-filter: blur(10px); + } } // 右侧信息区域布局 @@ -886,5 +943,59 @@ export default { } } } + + // 资质公示区域 + .qualifications-section { + padding: 40rpx 20rpx; + margin-top: 40rpx; + background: #fff; + + .qualifications-title { + font-size: 32rpx; + font-weight: bold; + color: #232323; + margin-bottom: 24rpx; + padding: 0 20rpx; + display: flex; + justify-content: space-between; + align-items: center; + + .more-link { + font-size: 24rpx; + color: #4175EE; + font-weight: normal; + } + } + + .qualifications-grid { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 20rpx; + padding: 0 20rpx; + + .qualification-item { + display: flex; + flex-direction: column; + align-items: center; + padding: 20rpx; + background: #F7F8FA; + border-radius: 12rpx; + + .qualification-img { + width: 120rpx; + height: 120rpx; + margin-bottom: 12rpx; + border-radius: 8rpx; + } + + .qualification-name { + font-size: 24rpx; + color: #666; + text-align: center; + line-height: 1.4; + } + } + } + } } diff --git a/pages/index/platform-info.vue b/pages/index/platform-info.vue new file mode 100644 index 0000000..c2b346e --- /dev/null +++ b/pages/index/platform-info.vue @@ -0,0 +1,250 @@ + + + + + diff --git a/request/api/api.js b/request/api/api.js index fd1c6ce..f3fa664 100644 --- a/request/api/api.js +++ b/request/api/api.js @@ -446,6 +446,7 @@ export async function getOrdDetail(params) { } + // 申请退款原因 https://app.xiaokang88.com/member/v1/product-order/refund-reason export async function getRefundReson(params) { let data = await http('/oldApi/v1/product-order/refund-reason', params) @@ -492,3 +493,4 @@ export async function getVersion(params) { return data } + diff --git a/request/api/platform.js b/request/api/platform.js new file mode 100644 index 0000000..035c4a4 --- /dev/null +++ b/request/api/platform.js @@ -0,0 +1,19 @@ +import {get} from './http' + +/** + * 获取平台资质证明列表 + * @param params + * @returns {Promise<*>} + */ +export async function getPlatformQualificationsApi(params) { + return await get('/platform/qualifications', params, 3) +} + +/** + * 获取平台信息(联系方式、投诉举报方式等) + * @param params + * @returns {Promise<*>} + */ +export async function getPlatformInfoApi(params) { + return await get('/platform/info', params, 3) +} diff --git a/subPackages/my/my-drug/drug-info.vue b/subPackages/my/my-drug/drug-info.vue index 7c296c2..7a1328c 100644 --- a/subPackages/my/my-drug/drug-info.vue +++ b/subPackages/my/my-drug/drug-info.vue @@ -78,6 +78,10 @@ {{item.drug.usage}} + + + 查看说明书 + ¥{{item.price}} @@ -172,6 +176,8 @@ import { // 导入 getOrderTextApi 接口方法 import { getOrderTextApi } from '../../../request/api/product' +// 导入订单相关接口 +import { getPrescriptionStatusApi } from '../../../request/api/order' export default { data() { @@ -235,6 +241,8 @@ export default { fontWeight: '540', fontSize: '33rpx' }, + // 处方状态 + prescriptionStatus: null, } }, onLoad(e) { @@ -375,6 +383,9 @@ export default { this.isshowed = false this.isshow = true } + + // 查询处方状态 + this.getPrescriptionStatus() } }) }, @@ -521,6 +532,34 @@ export default { }) } + }, + // 查询处方状态 + getPrescriptionStatus() { + if (!this.order_id) { + return; + } + getPrescriptionStatusApi({ + order_id: this.order_id + }).then((res) => { + if (res.data && (res.data.code == 0 || res.data.errcode == 0)) { + const data = res.data.data || res.data.result || {}; + // 假设 status = 2 表示审核通过 + this.prescriptionStatus = data.status === true || data.status === 2 || data.status == 2; + } else { + this.prescriptionStatus = false; + } + }).catch(() => { + this.prescriptionStatus = false; + }); + }, + // 预览说明书 + previewInstruction(instructionImage) { + if (instructionImage) { + uni.previewImage({ + urls: [instructionImage], + current: instructionImage + }); + } } }, mounted() { @@ -538,6 +577,8 @@ export default { onShow() { this.getInfo() this.getList() + // 查询处方状态 + this.getPrescriptionStatus() }, onUnload() { uni.removeStorageSync('userWay_order_id') @@ -791,6 +832,26 @@ export default { margin-bottom: 20rpx; } + .instruction-btn { + margin-top: 16rpx; + margin-bottom: 16rpx; + padding: 12rpx 24rpx; + background: #ECF5FF; + border-radius: 8rpx; + display: inline-flex; + align-items: center; + justify-content: center; + + text { + font-size: 26rpx; + color: #2B85E4; + } + + &:active { + opacity: 0.7; + } + } + .it_price { display: flex; align-items: center; diff --git a/subPackages/product/product.vue b/subPackages/product/product.vue index ebf1a59..1a01661 100644 --- a/subPackages/product/product.vue +++ b/subPackages/product/product.vue @@ -68,6 +68,7 @@ + + + + {{ complianceTip }} + + {{ productDetail.drug_name }} {{ productDetail.drug_alias }} @@ -63,6 +69,7 @@ {{ orderText }} + @@ -75,7 +82,8 @@ - + + 用法用量 @@ -85,8 +93,8 @@ - - + + 说明书 @@ -119,7 +127,6 @@ :src="img" mode="widthFix" lazy-load - @click="previewIntroductionImage(idx)" /> @@ -315,7 +322,8 @@ export default { guozi_no: '', bar_code: '', indications: '', - indications_array: [] + indications_array: [], + compliance_tip: '' // 合规提示文案,由后端返回 }, formData: { id: '', @@ -356,6 +364,10 @@ export default { return parseFloat(this.productDetail.drug_store_drug.price); } return parseFloat(this.productDetail.price || 0); + }, + // 合规提示文案 - 从后端返回的 compliance_tip 字段获取 + complianceTip() { + return this.productDetail.compliance_tip || ''; } }, onLoad(options) { @@ -690,6 +702,23 @@ export default { } } +/* 合规提示卡片 - 与物流提示UI一致 */ +.compliance-tip-card { + background: #FFF1F0; + padding: 24rpx 30rpx; + margin: 0 -30rpx 20rpx -30rpx; + display: flex; + align-items: center; + font-size: 26rpx; + color: #FF4D4F; + + .tip-text { + font-weight: 600; + line-height: 1.6; + flex: 1; + } +} + /* 5. 详情图区域 */ .detail-images-wrapper { background: #fff; @@ -723,7 +752,10 @@ export default { } /* 6. 底部操作栏 */ -.footer-placeholder { height: 120rpx; } +.footer-placeholder { + height: calc(110rpx + env(safe-area-inset-bottom)); + min-height: 140rpx; /* 确保最小高度,避免在小屏设备上被遮挡 */ +} .footer-bar { position: fixed;