XSLu08042 преди 2 седмици
родител
ревизия
4f4c2e5350

+ 4 - 0
api/index.js

@@ -50,4 +50,8 @@ let request = new Request().http
  
  export function getProducts(data) {
  	 return request('/store/app/product/getProducts',data,'GET');
+ }
+ 
+ export function getCartCount(data) {
+ 	 return request('/store/app/product/getCartCount',data,'GET');
  }

+ 5 - 3
api/prescribe.js

@@ -3,10 +3,12 @@ let request = new Request().http
 
 
 export function getPrescribeList(data) {
- 	return request('/app/prescribe/getPrescribeList',data,'GET');
+ 	// return request('/app/prescribe/getPrescribeList',data,'GET');
+	return request('/hospital580/app/prescriptionList',data,'POST','application/json;charset=UTF-8');
 }
-export function getPrescribeById(data) {
- 	return request('/app/prescribe/getPrescribeById',data,'GET');
+export function getPrescribeById(preId) {
+ 	// return request('/app/prescribe/getPrescribeById',data,'GET');
+	return request('/hospital580/app/prescriptionDetail/'+preId,null,'POST','application/json;charset=UTF-8');
 }
  
 

+ 2 - 2
common/request.js

@@ -6,8 +6,8 @@ export default class Request {
 		// var path=uni.getStorageSync('requestPath')
 		// var path = 'https://userapp.his.cdwjyyh.com';
 		// var path = 'https://app.rtys.cdwjyyh.com';
-		// var path = "https://userapp.bjyjbao.com/prod-api"
-		var path = "http://ub86b489.natappfree.cc"
+		var path = "https://userapp.bjyjbao.com/prod-api"
+		// var path = "http://f5778469.natappfree.cc"
 		// var path = "http://192.168.10.126:8113"
 		let token="";
 		let type = 0

+ 29 - 8
components/medicineItem.vue

@@ -1,8 +1,8 @@
 <template>
-	<view class="medicine-item" @click="showProduct">
+	<view :class="type=='store'?'medicine-storeitem':'medicine-item'" @click="showProduct">
 		<view class="x-bc" style="margin-bottom: 16rpx;">
 			<view class="pro-name ellipsis" style="white-space: normal;">{{ item.productName || '' }}</view>
-			<view class="otctxt" v-show="item.productType">{{$getDictLabelName("storeProductType",item.productType)}}</view>
+			<view class="myotctxt" v-show="item.productType" :style="{background:_background(item.productType)}">{{$getDictLabelName("storeProductType",item.productType)}}</view>
 		</view>
 		<view class="x-f">
 			<view class="medicine">
@@ -12,10 +12,10 @@
 				<!-- <image class="otc" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/index/blue_lable_otc.svg" mode="aspectFill"></image> -->
 			</view>
 			<view class="medicine-r">
-				<view class="desc ellipsis">包装规格:{{ item.unitName || '--' }}</view>
+				<view class="desc ellipsis">包装规格:{{ item.prescribeSpec || '--' }}</view>
 				<view class="desc ellipsis">批准文号:{{ item.batchNumber || '--' }}</view>
 				<view class="desc ellipsis">生产厂家:{{ item.mah || '--' }}</view>
-				<!-- <view class="desc"><text style="color: #2583EB;margin: 0 10rpx;">{{item.storecount||0}}</text> 商家销售 </view> -->
+				<!-- <view class="desc"><text style="color: #2583EB;margin: 0 10rpx;">{{item.storeCount||0}}</text> 商家销售 </view> -->
 				<view class="price-box x-bc">
 					<view>
 						<text class="price-box-unit">¥</text>
@@ -24,7 +24,7 @@
 						<!-- <text class="price-box-text">/日</text> -->
 						<!-- <text class="old" v-show="item.price!=item.otPrice&&item.otPrice!==null&&item.otPrice!==undefined">¥{{item.otPrice.toFixed(2)}}</text> -->
 					</view>
-					<view class="desc"><text style="color: #2583EB;margin: 0 10rpx;">{{item.storecount||0}}</text> 商家销售 </view>
+					<view class="desc" v-if="type!='store'"><text style="color: #2583EB;margin: 0 10rpx;">{{item.storeCount||0}}</text> 商家销售 </view>
 				</view>
 			</view>
 		</view>
@@ -33,12 +33,26 @@
 
 <script>
 	export default {
-		props: ['item'],
+		props: ['item','type'],
 		data() {
 			return {
 				
 			}
 		},
+		computed: {
+			_background() {
+				//productType: 1:OTC,2:Rx,3:非药品,4:器械
+				return (productType)=> {
+					switch (productType) {
+						case 1: return '#37E2EA' // OTC
+						case 2: return 'red'     // Rx
+						case 3: return '#2583EB' // 非药品
+						case 4: return '#999'    // 器械
+						default: return '#ccc'
+					}
+				}
+			}
+		},
 		methods: {
 			splitPrice(num) {
 			  const [intPart = '0', decPart = '00'] = String(num||0).split('.');
@@ -54,8 +68,8 @@
 </script>
 
 <style scoped lang="scss">
-	.otctxt {
-		background-color: #2BC7B9;
+	.myotctxt {
+		background-color: #37E2EA;
 		font-family: PingFang SC, PingFang SC;
 		font-weight: 500;
 		font-size: 24rpx;
@@ -140,6 +154,13 @@
 			align-items: flex-start !important;
 			padding: 20rpx 0;
 		}
+		&-storeitem {
+			align-items: flex-start !important;
+			background: #FFF;
+			padding: 20rpx;
+			border-radius: 16upx;
+			margin-bottom: 20upx;
+		}
 	}
 	
 	.desc {

+ 29 - 0
components/medicineVerticalItem.vue

@@ -2,6 +2,7 @@
 	<view class="item" @click="showProduct()">
 		<view class="img-box">
 			<image :src="item.image" mode="aspectFill"></image>
+			<view class="otctxt" v-show="item.productType" :style="{background:_background(item.productType)}">{{$getDictLabelName("storeProductType",item.productType)}}</view>
 		</view>
 		<view class="info-box">
 			<view class="title ellipsis2">{{item.productName}}</view>
@@ -26,6 +27,20 @@
 				
 			}
 		},
+		computed: {
+			_background() {
+				//productType: 1:OTC,2:Rx,3:非药品,4:器械
+				return (productType)=> {
+					switch (productType) {
+						case 1: return '#37E2EA' // OTC
+						case 2: return 'red'     // Rx
+						case 3: return '#2583EB' // 非药品
+						case 4: return '#999'    // 器械
+						default: return '#ccc'
+					}
+				}
+			}
+		},
 		methods: {
 			splitPrice(num) {
 			  const [intPart = '0', decPart = '00'] = String(num||0).split('.');
@@ -41,6 +56,18 @@
 </script>
 
 <style scoped lang="scss">
+	.otctxt {
+		position: absolute;
+		top: 0;
+		left: 0;
+		background-color: #37E2EA;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 500;
+		font-size: 20rpx;
+		color: #FFFFFF;
+		padding: 4rpx 14rpx;
+		border-radius: 16rpx 0 16rpx 0;
+	}
 	.price-box {
 		font-family: Roboto, Roboto;
 		font-weight: bold;
@@ -77,6 +104,7 @@
 		.img-box{
 			width: 100%;
 			height: 235rpx;
+			position: relative;
 			image{
 				width: 100%;
 				height: 100%;
@@ -95,6 +123,7 @@
 				font-weight: 500;
 				color: #111111;
 				line-height: 40rpx;
+				height: 80rpx;
 			}
 			.price-box{
 				display: flex;

+ 15 - 2
pages/index/index.vue

@@ -75,7 +75,7 @@
 							</view>
 							<view class="pharmacy">
 								<image :src="store.logoUrl" mode="aspectFill" v-for="(store,i) in storeIndexList" :key="i" 
-								@click="navTo('/pages_store/storeIndex?storeId='+store.id)"></image>
+								@click="navTo('/pages_store/storeIndex?storeId='+store.storeId)"></image>
 							</view>
 						</view>
 						<!-- <view class="depts" v-if="it.id==2&&it.isShow">
@@ -286,7 +286,7 @@
 	import {getAdvList} from '@/api/adv.js'
 	import {getDepartmentList} from '@/api/department.js'
 	import {getDictByKey} from '@/api/common.js'
-	import {validList}from '@/api/index.js'
+	import {validList,getCartCount}from '@/api/index.js'
 	export default {
 		components: {
 			tuiProduct
@@ -360,6 +360,7 @@
 			this.getDoctorList();
 			this.getArticleList();
 			this.getAdvList();
+			this.getCartCount();
 			// this.getDepartmentList();
 			// this.getDoctorArticleList();
 			// this.getPackageList();
@@ -422,6 +423,18 @@
 					}
 				})
 			},
+			getCartCount(){
+				let data = {};
+				getCartCount(data).then(
+					cartRes => {
+						if(cartRes.code==200){
+							 this.cartCount=cartRes.data;
+						}
+					},
+					rej => {}
+				);
+				
+			},
 			getConfigByKey(key){
 				var that=this;
 				var data={key:key}

+ 9 - 4
pages/index/webview.vue

@@ -22,10 +22,15 @@ export default {
   },
   onLoad(options) {
     if (options.url) {
-      this.schemeUrl = decodeURIComponent(options.url);
-      console.log('Scheme 数据:', this.schemeUrl); // 输出:rtlive://course?courseId=1
-      // 尝试直接跳转(可能被微信拦截)
-      this.tryOpenScheme();
+		if(options.type = 'prescribe') {
+			// 开方
+			this.url = decodeURIComponent(options.url);
+		} else{
+			this.schemeUrl = decodeURIComponent(options.url);
+			console.log('Scheme 数据:', this.schemeUrl); // 输出:rtlive://course?courseId=1
+			// 尝试直接跳转(可能被微信拦截)
+			this.tryOpenScheme();
+		}
     }
   },
   methods: {

+ 5 - 5
pages/shopping/index.vue

@@ -53,7 +53,7 @@
 							</view>
 						</view>
 				</view> -->
-				<mescroll-body top="190rpx" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+				<mescroll-body ref="mescrollRef" :height="mescrollHeight+'px'" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
 				<view style="display: flex;flex-wrap: wrap;">
 					<medicineVerticalItem v-for="(item, index) in dataList" :key="index" :item="item"></medicineVerticalItem>
 				</view>
@@ -117,6 +117,7 @@
 					cateId:'',
 					pid:''
 				},
+				mescrollHeight: 200
 			};
 		},
 		onLoad() {
@@ -132,9 +133,8 @@
 			setTimeout(function(){
 				let info = uni.createSelectorQuery().select(".top-content");
 		     info.boundingClientRect(function(data) { //data - 各种参数
-		       	console.log(data.height)  // 获取元素宽度
-					// console.log(uni.upx2px(10)) 
-					that.divHeight="calc(100% - "+data.height+"px)"
+					that.divHeight="calc(100vh - "+data.height+"px)"
+					that.mescrollHeight = uni.getSystemInfoSync().screenHeight - data.height
 		      }).exec()
 			},500);
 			this.getAdv();
@@ -199,7 +199,6 @@
 								this.form.cateId = this.cates[0].cateId;
 								// this.form.pid = this.cates[0].pid;
 								this.mescroll.resetUpScroll()
-								console.log("this.mescroll",this.mescroll)
 							}
 						}else{
 							uni.showToast({
@@ -254,6 +253,7 @@
 				mescroll.resetUpScroll()
 			},
 			upCallback(page) {
+				console.log("==upCallback==")
 				//联网加载数据
 				var that = this;
 				this.form.page=page.num;

+ 1 - 1
pages_company/storeOrderDetail.vue

@@ -203,7 +203,7 @@
 		methods: {
 			showPrescribe(){
 				var data={prescribeId:this.order.prescribeId}
-				getPrescribeById(data).then(
+				getPrescribeById(this.order.prescribeId).then(
 					res => {
 						if(res.code==200){
 							if(res.data.prescribe.prescribeImgUrl!=null){

+ 35 - 23
pages_order/prescribeDetails.vue

@@ -2,29 +2,29 @@
 	<view class="content">
 		<view class="cont" v-if="prescribe!=null">
 			<view class="other-info"  >
-				<view class="title">医健宝医药处方笺</view>
+				<view class="title">处方笺</view>
 				<view class="item">
 					<view class="left">
 						<text class="label">医生姓名:</text>
-						<text class="text">{{doctor.doctorName}} </text>
+						<text class="text">{{prescribe.doctorName}} </text>
 					</view>
 				</view>
 				<view class="item">
 					<view class="left">
 						<text class="label">患者姓名:</text>
-						<text class="text">{{prescribe.patientName}} </text>
+						<text class="text">{{prescribe.userFamilyName}} </text>
 					</view>
 				</view>
 				<view class="item">
 					<view class="left">
 						<text class="label">患者年龄:</text>
-						<text class="text">{{prescribe.patientAge}}岁 </text>
+						<text class="text">{{prescribe.userFamilyAge}}岁 </text>
 					</view>
 				</view>
 				<view class="item">
 					<view class="left">
 						<text class="label">患者性别:</text>
-						<text class="text">{{prescribe.patientGender==1?"男":"女"}} </text>
+						<text class="text">{{prescribe.userFamilyGender==1?"男":"女"}} </text>
 					</view>
 				</view>
 				 
@@ -33,25 +33,25 @@
 				<view class="item">
 					<view class="left">
 						<text class="label">处方单号:</text>
-						<text class="text">{{prescribe.prescribeCode}}</text>
+						<text class="text">{{prescribe.pid}}</text>
 					</view>
 				</view>
 				<view class="item">
 					<view class="left">
 						<text class="label">开方时间:</text>
-						<text class="text">{{prescribe.createTime}}</text>
+						<text class="text">{{prescribe.createdTime}}</text>
 					</view>
 				</view>
 				<view class="item">
 					<view class="left">
 						<text class="label">医生诊断:</text>
-						<view class="text">{{prescribe.diagnose}}</view>
+						<view class="text">{{prescribe.tags}}</view>
 					</view>
 				</view>
-				<view class="item">
+				<view class="item" v-if="prescribe.status==2">
 					<view class="left">
 						<text class="label">审核意见:</text>
-						<text class="text" v-if="prescribe.status==2">{{prescribe.auditReason}}</text>
+						<text class="text">{{prescribe.reason}}</text>
 					</view>
 				</view>
 			</view>
@@ -60,33 +60,34 @@
 				<view class="drug-item" v-for="(item) in drugs">
 					<view class="drug">
 						<view class="left">
-							<image :src="item.drugImgUrl==''?'https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/drug.svg':item.drugImgUrl"  ></image>
+							<image :src="item.image==''?'https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/drug.svg':item.image"  ></image>
 							<view class="name-cont">
 								<view class="name-box">
 									<!-- <view class="tag" v-if="item.drugType==1">西药</view>
 									<view class="tag" v-if="item.drugType==2">中药</view> -->
 									<view class="name">{{item.drugName}}</view>
 								</view>
-								<view class="spec">{{item.drugSpec}}</view>
+								<view class="spec">{{item.spec}}</view>
 								<view class="price">
 									<view class="left">
 										<!-- {{item.drugPrice}}元 -->
 									</view>
-									<view class="num" v-if="item.drugType==1">X{{item.drugNum}}</view>
+									<view class="num" v-if="item.drugType==1">X{{item.amount}}</view>
 								</view>
 							</view>
 						</view>
 					</view>
-					<view class="drug-use" v-if="item.drugType==1">
-						<view class="name">用药频率:{{item.usageFrequencyUnit}}</view>
-						<view class="name">单次用量:{{item.usagePerUseCount}}</view>
-						<view class="name">用药方法:{{item.usageMethod}}</view>
-						<view class="name">备注:{{item.remark}} </view>
+					<!-- v-if="item.drugType==1" -->
+					<view class="drug-use">
+						<!-- <view class="name">用药频率:{{item.usageFrequencyUnit}}</view>
+						<view class="name">单次用量:{{item.usagePerUseCount}}</view> -->
+						<view class="name">使用说明:{{item.instructions}}</view>
+						<!-- <view class="name">备注:{{item.remark}} </view> -->
 					</view>
 					
 				</view>
 			</view>
-			<view class="other-info" v-if="prescribe.prescribeType==2" >
+			<!-- <view class="other-info" v-if="prescribe.prescribeType==2" >
 				<view class="title left">用药说明</view>
 				<view class="item">
 					<view class="left">
@@ -133,6 +134,10 @@
 					药师签名
 					<image :src="prescribe.drugDoctorSignUrl"></image>
 				</view>
+			</view> -->
+			<view class="drug-cont" v-if="prescribe.dstFilePath">
+				<view class="title">处方单</view>
+				<image style="width: 100%;" :src="prescribe.dstFilePath" mode="widthFix" @click="showImg"></image>
 			</view>
 			<view class="btn-box">
 				<view class="btn pay" v-if="prescribe.storeOrderId!=null&&prescribe.storeOrderId>0&&prescribe.status==1"  @click="navTo('/pages_order/storeOrderDetail?orderId='+prescribe.storeOrderId)">药品订单</view>
@@ -170,6 +175,13 @@
 			this.getPrescribeById();
 		},
 		methods: {
+			showImg(item) {
+				 //预览图片
+				 uni.previewImage({
+				 	urls: [this.prescribe.dstFilePath],
+				 	current: 0
+				 });
+			},
 			navTo(url){
 				uni.navigateTo({
 					url: url
@@ -188,12 +200,12 @@
 			},
 			getPrescribeById(){
 				var data={prescribeId:this.prescribeId}
-				getPrescribeById(data).then(
+				getPrescribeById(this.prescribeId).then(
 					res => {
 						if(res.code==200){
-							this.prescribe=res.data.prescribe;
-							this.drugs=res.data.drugs;
-							this.doctor=res.data.doctor;
+							this.prescribe=res.data;
+							this.drugs=res.data.drugRspList;
+							// this.doctor=res.data.doctor;
 							this.usage=JSON.parse(this.prescribe.usageJson)
 							
 						}

+ 11 - 11
pages_order/prescribeList.vue

@@ -10,17 +10,17 @@
 		</view>
 		<mescroll-body top="88rpx" bottom="0" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
 		<view class="prescribe-list">
-			<view v-for="(item,index) in dataList" :key="index" class="item" @click="navTo('/pages_order/prescribeDetails?prescribeId='+item.prescribeId)">
+			<view v-for="(item,index) in dataList" :key="index" class="item" @click="navTo('/pages_order/prescribeDetails?prescribeId='+item.preId)">
 					<view class="ordersn-box">
-						<view class="num">处方单号:{{item.prescribeCode}}</view>
+						<view class="num">处方单号:{{item.pid||''}}</view>
 						<view class="status-box">
 							<text   class="text info" v-if="item.status==0">待开方</text>
 							<text   class="text success" v-if="item.status==1">已开方</text>
 							<text   class="text black" v-if="item.status==2">已拒绝</text>
 						</view>
 					</view>
-					<view class="ask-text"  >诊断结果:{{item.diagnose}}</view>
-					<view class="drug-list" >
+					<view class="ask-text"  >诊断结果:{{item.tags||''}}</view>
+				<!-- 	<view class="drug-list" >
 						<view  class="drug-item" v-for="(subItme,index) in item.drugs" >
 							<view class="drug-info"  >
 								<view class="name-box ellipsis">
@@ -28,11 +28,11 @@
 								</view>
 							</view>
 						</view>
-					</view>
-					<view class="ask-text">审核结果:{{item.auditReason}}</view>
-					<view class="patient-text">患者:{{item.patientName}} {{item.patientAge}}岁 {{item.patientGender==1?'男':'女'}} </view>
+					</view> -->
+					<!-- <view class="ask-text">审核结果:{{item.auditReason||''}}</view> -->
+					<view class="patient-text">患者:{{item.userFamilyName}} {{item.userFamilyAge}}岁 {{item.userFamilyGender==1?'男':'女'}} </view>
 					<view class="ask-time" v-if="item.createTime!=null">提交时间:{{item.createTime}}</view>
-					<view class="ask-time" v-if="item.auditTime!=null">审核时间:{{item.auditTime}}</view>
+					<view class="ask-time" v-if="item.createdTime!=null">开方时间:{{item.createdTime}}</view>
 				</view>
 		</view>
 		</mescroll-body>
@@ -115,11 +115,11 @@
 					if(res.code==200){
 						//设置列表数据
 						if (page.num == 1) {
-							that.dataList = res.data.list; 
+							that.dataList = res.datas; 
 						} else {
-							that.dataList = that.dataList.concat(res.data.list);
+							that.dataList = that.dataList.concat(res.datas);
 						}
-						that.mescroll.endBySize(res.data.list.length, res.data.total);
+						that.mescroll.endBySize(res.datas.length, res.total);
 						
 					}else{
 						uni.showToast({

+ 1 - 1
pages_order/storeOrderDetail.vue

@@ -231,7 +231,7 @@
 		methods: {
 			showPrescribe(){
 				var data={prescribeId:this.order.prescribeId}
-				getPrescribeById(data).then(
+				getPrescribeById(this.order.prescribeId).then(
 					res => {
 						if(res.code==200){
 							if(res.data.prescribe.prescribeImgUrl!=null){

+ 3 - 6
pages_shopping/api/prescribe.js

@@ -8,12 +8,9 @@ let request = new Request().http
  export function getMyPrescribeList(data) {
  	 return request('/store/app/prescribe/getMyPrescribeList',data,'GET');
  }
- 
- 
- 
- 
- 
-
+ export function diseaseQueryList(data) {
+	 return request('/hospital580/app/diseaseQueryList',data,'POST','application/json;charset=UTF-8');
+ }
  
  
  

+ 0 - 3
pages_shopping/api/product.js

@@ -28,9 +28,6 @@ let request = new Request().http
  export function cartNum(data) {
  	 return request('/store/app/product/cartNum',data,'POST','application/json;charset=UTF-8');
  }
- export function getCartCount(data) {
- 	 return request('/store/app/product/getCartCount',data,'GET');
- }
  export function getGoodsProduct() {
  	 return request('/store/app/product/getGoodsProduct',null,'GET');
  }

+ 16 - 1
pages_shopping/cart.vue

@@ -10,7 +10,7 @@
 				<view class="info-box">
 					<view>
 						<view class="title-box">
-							<view class="tag">{{$getDictLabelName("storeProductType",item.productType)}}</view>
+							<view class="tag" :style="{background:_background(item.productType)}">{{$getDictLabelName("storeProductType",item.productType)}}</view>
 							<view class="title ellipsis">{{ item.productName }}</view>
 						</view>
 						<view class="intro ellipsis">{{item.productAttrName}}</view>
@@ -90,6 +90,20 @@
 		onReachBottom() {
 			// this.$refs.product.getGoodsProducts();
 		},
+		computed: {
+			_background() {
+				//productType: 1:OTC,2:Rx,3:非药品,4:器械
+				return (productType)=> {
+					switch (productType) {
+						case 1: return '#37E2EA' // OTC
+						case 2: return 'red'     // Rx
+						case 3: return '#2583EB' // 非药品
+						case 4: return '#999'    // 器械
+						default: return '#ccc'
+					}
+				}
+			}
+		},
 		methods: {
 			delCart(){
 				var selectCarts=this.carts.filter(ele => ele.checked==true).map(ele => {
@@ -316,6 +330,7 @@
 						}
 					}
 					.intro{
+						display: block;
 						font-size: 24upx;
 						font-family: PingFang SC;
 						font-weight: 500;

+ 15 - 1
pages_shopping/confirmCreateOrder.vue

@@ -36,7 +36,7 @@
 					<view class="info-box">
 						<view>
 							<view class="name-box ellipsis2">
-								<view class="tag">{{$getDictLabelName("storeProductType",item.productType)}}</view>{{item.productName}}
+								<view class="tag" :style="{background:_background(item.productType)}">{{$getDictLabelName("storeProductType",item.productType)}}</view>{{item.productName}}
 							</view>
 							<view class="spec ellipsis2">{{item.productAttrName}}</view>
 						</view>
@@ -189,6 +189,20 @@
 				}
 			}
 		},
+		computed: {
+			_background() {
+				//productType: 1:OTC,2:Rx,3:非药品,4:器械
+				return (productType)=> {
+					switch (productType) {
+						case 1: return '#37E2EA' // OTC
+						case 2: return 'red'     // Rx
+						case 3: return '#2583EB' // 非药品
+						case 4: return '#999'    // 器械
+						default: return '#ccc'
+					}
+				}
+			}
+		},
 		onLoad(option) {
 			this.form.createOrderKey=option.createOrderKey;
 			this.form.companyId=option.companyId;

+ 15 - 1
pages_shopping/confirmOrder.vue

@@ -36,7 +36,7 @@
 					<view class="info-box">
 						<view>
 							<view class="name-box ellipsis2">
-								<view class="tag">{{$getDictLabelName("storeProductType",item.productType)}}</view>{{item.productName}}
+								<view class="tag" :style="{background:_background(item.productType)}">{{$getDictLabelName("storeProductType",item.productType)}}</view>{{item.productName}}
 							</view>
 							<view class="spec ellipsis2">{{item.productAttrName}}</view>
 						</view>
@@ -190,6 +190,20 @@
 				
 			}
 		},
+		computed: {
+			_background() {
+				//productType: 1:OTC,2:Rx,3:非药品,4:器械
+				return (productType)=> {
+					switch (productType) {
+						case 1: return '#37E2EA' // OTC
+						case 2: return 'red'     // Rx
+						case 3: return '#2583EB' // 非药品
+						case 4: return '#999'    // 器械
+						default: return '#ccc'
+					}
+				}
+			}
+		},
 		onLoad(option) {
 			this.form.companyId=option.companyId;
 			this.form.companyUserId=option.companyUserId;

+ 51 - 6
pages_shopping/home/productList.vue

@@ -44,10 +44,14 @@
 	 
 		<!-- 数据列表 -->
 		<mescroll-body top="190rpx" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
-			<view class="medic-list" v-if="showType==1">
+			<view class="medic-itemlist" v-if="showType==1">
+				<medicineItem v-for="(item, index) in dataList" :key="index" :item="item"></medicineItem>
+			</view>
+			<!-- <view class="medic-list" v-if="showType==1">
 				<view v-for="(item,index) in dataList" :key="index" class="item" @click="showDetail(item)">
 					<view class="img-box">
 						<image :src="item.image" mode="aspectFit"></image>
+						<view class="otctxt" :style="{background:_background(item.productType)}" v-show="item.productType">{{$getDictLabelName("storeProductType",item.productType)}}</view>
 					</view>
 					<view class="info-box">
 						<view class="title ellipsis2">{{item.productName}}</view>
@@ -63,11 +67,12 @@
 						</view>
 					</view>
 				</view>
-			</view>
+			</view> -->
 			<view class="goods-list" v-if="showType==2">
 				<view class="item" v-for="(item,index) in dataList" :key="index" @click="showDetail(item)">
 					<view class="img-box">
 						<image :src="item.image" mode="aspectFill"></image>
+						<view class="otctxt" :style="{background:_background(item.productType)}" v-show="item.productType">{{$getDictLabelName("storeProductType",item.productType)}}</view>
 					</view>
 					<view class="info-box">
 						<view class="title ellipsis2">{{item.productName}}</view>
@@ -86,10 +91,14 @@
 </template>
 
 <script>
+	import medicineItem from '@/components/medicineItem.vue'
 	import {getProducts} from '../api/product.js'
 	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
 	export default {
 		mixins: [MescrollMixin], 
+		components:{
+			medicineItem
+		},
 		data() {
 			return {
 				showType:1,
@@ -122,6 +131,20 @@
 				storeId: ""
 			};
 		},
+		computed: {
+			_background() {
+				//productType: 1:OTC,2:Rx,3:非药品,4:器械
+				return (productType)=> {
+					switch (productType) {
+						case 1: return '#37E2EA' // OTC
+						case 2: return 'red'     // Rx
+						case 3: return '#2583EB' // 非药品
+						case 4: return '#999'    // 器械
+						default: return '#ccc'
+					}
+				}
+			}
+		},
 		onLoad(option) {
 			if(option.key!=undefined){
 				this.form.productName = option.key
@@ -335,6 +358,27 @@
 			}
 		}
 	}
+	.otctxt {
+		position: absolute;
+		top: 0;
+		left: 0;
+		background-color: #37E2EA;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 500;
+		font-size: 20rpx;
+		color: #FFFFFF;
+		padding: 4rpx 14rpx;
+		border-radius: 16rpx 0 16rpx 0;
+	}
+	.medic-itemlist {
+		padding: 20upx;
+		.medicine-item {
+			background: #FFF;
+			padding: 20rpx !important;
+			border-radius: 16upx;
+			margin-bottom: 20upx;
+		}
+	}
 	.medic-list{
 		padding: 20upx;
 		.item{
@@ -352,6 +396,7 @@
 				border-radius: 16rpx 16rpx 16rpx 16rpx;
 				overflow: hidden;
 				margin-right: 30upx;
+				position: relative;
 				image{
 					width: 100%;
 					height: 100%;
@@ -359,14 +404,12 @@
 			}
 			.info-box{
 				flex: 1;
-				
+				overflow: hidden;
 				.title{
 					font-size: 32upx;
 					font-family: PingFang SC;
 					font-weight: 500;
 					color: #111111;
-					line-height: 40rpx;
-					height: 80rpx;
 				}
 				.intro{
 					font-size: 26upx;
@@ -375,6 +418,7 @@
 					color: #999999;
 					line-height: 1;
 					margin-top: 26upx;
+					display: block;
 				}
 			 
 				.prce-num{
@@ -431,6 +475,7 @@
 			.img-box{
 				width: 100%;
 				height: 334upx;
+				position: relative;
 				image{
 					width: 100%;
 					height: 100%;
@@ -444,7 +489,7 @@
 				flex-direction: column;
 				justify-content: space-between;
 				.title{
-					font-size: 26upx;
+					font-size: 32upx;
 					font-family: PingFang SC;
 					font-weight: 500;
 					color: #111111;

+ 320 - 106
pages_shopping/prescribe.vue

@@ -51,7 +51,7 @@
 						</view>
 					</view>
 				</view>
-				<view class="text-content">
+				<!-- <view class="text-content">
 					<view class="title">
 						<text class="black">主诉</text>
 						<text class="gray">(选填)</text>
@@ -66,7 +66,7 @@
 					</view>
 					<textarea class="textArea" maxlength="200" @input="historyIllnessInput" placeholder="请填写既往病史内容"></textarea>
 					 
-				</view>
+				</view> -->
 				<view class="img-content">
 					<view class="title">
 						<text class="black">复诊凭证</text>
@@ -87,67 +87,50 @@
 					 
 				</view>
 				<!-- 疾病选择 -->
-				<!-- <view class="disease-select">
-					<view class="title">
-						<text class="black">本次用药的确诊疾病</text>
-						<text class="gray">(可多选)</text>
+				<view class="disease-select">
+					<view class="x-bc" @click="show=true">
+						<view class="title">
+							<text class="black">本次用药的确诊疾病</text>
+							<text class="gray">(可多选)</text>
+						</view>
+						<u-icon name="arrow-right" color="#222" size="18" ></u-icon>
 					</view>
 					<view class="dise-list">
 						<view 
-							v-for="(item,index) in diseaseList" 
+							v-for="(item,index) in activeDise" 
 							:key="index" 
-							:class="activeDise == index?'item active':'item'"
-							@click="choseDise(index)"
+							class="item active x-bc"
 						>
 							{{ item }}
+							<u-icon name="close" color="#fff" size="16" @click="choseDise(item,1)" style="margin-left: 10rpx;"></u-icon>
 						</view>
 					</view>
-				</view> -->
-				<!-- 是否使用过此药 -->
-				<view class="check-box">
-					<view class="left">
-						<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/yao.png" mode=""></image>
-						<text class="text">是否有过敏史</text>
-					</view>
-					<radio-group style="display: flex;align-items: center;">
-						<label style="margin-right: 50upx;">
-							<radio value="1" :checked="isAllergic==true" style="margin-right: 16upx;" />
-							<text class="my-radio-text">是</text>
-						</label>
-						<label>
-							<radio value="0" :checked="isAllergic==false" style="margin-right: 16upx;" />
-							<text class="my-radio-text">否</text>
-						</label>
-					</radio-group>
 				</view>
-				<view class="check-box">
+				<!-- 是否使用过此药 -->
+				<view class="check-box" v-for="(que,index) in quesList" :key="index">
 					<view class="left">
 						<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/yao.png" mode=""></image>
-						<text class="text">肝功能是否异常</text>
+						<text class="text">{{que.title}}</text>
 					</view>
-					<radio-group style="display: flex;align-items: center;">
-						<label style="margin-right: 50upx;">
-							<radio value="1" :checked="isLiver==true" style="margin-right: 16upx;" />
-							<text class="my-radio-text">是</text>
-						</label>
-						<label>
-							<radio value="0" :checked="isLiver==false" style="margin-right: 16upx;" />
-							<text class="my-radio-text">否</text>
+					<radio-group style="display: flex;align-items: center;" @change="changeRadio($event,index,1)">
+						<label class="label" v-for="(option,index) in que.options" :key="index">
+							<radio :value="option" :checked="option==que.answer" style="margin-right: 16upx;" />
+							<text class="my-radio-text">{{option}}</text>
 						</label>
 					</radio-group>
 				</view>
 				<view class="check-box">
 					<view class="left">
 						<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/yao.png" mode=""></image>
-						<text class="text">肾功能是否异常</text>
+						<text class="text">是否是备孕/怀孕</text>
 					</view>
-					<radio-group style="display: flex;align-items: center;">
+					<radio-group style="display: flex;align-items: center;" @change="changeRadio($event,'isLactation',0)">
 						<label style="margin-right: 50upx;">
-							<radio value="1" :checked="isRenal==true" style="margin-right: 16upx;" />
+							<radio value="1" :checked="isLactation==1" style="margin-right: 16upx;" />
 							<text class="my-radio-text">是</text>
 						</label>
 						<label>
-							<radio value="0" :checked="isRenal==false" style="margin-right: 16upx;" />
+							<radio value="0" :checked="isLactation==0" style="margin-right: 16upx;" />
 							<text class="my-radio-text">否</text>
 						</label>
 					</radio-group>
@@ -155,31 +138,61 @@
 				<view class="check-box">
 					<view class="left">
 						<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/yao.png" mode=""></image>
-						<text class="text">是否是备孕/怀孕/哺乳期</text>
+						<text class="text">是否是哺乳期</text>
 					</view>
-					<radio-group style="display: flex;align-items: center;">
+					<radio-group style="display: flex;align-items: center;" @change="changeRadio($event,'isPregnantWoman',0)">
 						<label style="margin-right: 50upx;">
-							<radio value="1" :checked="isLactation==true" style="margin-right: 16upx;" />
+							<radio value="1" :checked="isPregnantWoman==1" style="margin-right: 16upx;" />
 							<text class="my-radio-text">是</text>
 						</label>
 						<label>
-							<radio value="0" :checked="isLactation==false" style="margin-right: 16upx;" />
+							<radio value="0" :checked="isPregnantWoman==0" style="margin-right: 16upx;" />
 							<text class="my-radio-text">否</text>
 						</label>
 					</radio-group>
 				</view>
 			</view>
 		</view>
+		<view class="agreement">
+			<label>
+				<checkbox :checked="isAgreement" color="#2583EB" style="transform:scale(0.7)" @click="handleAgreement()" />我确认已确诊此疾病并使用过该药,且无过敏史、无相关禁忌症和不良反应
+			</label>
+		</view>
 		<view class="btn-box">
 			<view class="btn" @click="submit()">去开处方</view>
 		</view>
+		<u-popup :show="show" :round="10" mode="bottom" closeable :closeOnClickOverlay="false" @close="close">
+			<view class="popbox-title">
+				<view>选择本次用药的确诊疾病</view>
+			</view>
+			<view class="search-cont">
+				<view class="inner" style="margin-top:0">
+					<image class="icon-search" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/icon_search.png" mode=""></image>
+					<input type="text" v-model="diagnosisName" placeholder="输入疾病搜索" confirm-type="search" @confirm="doSearchUser" placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
+				</view>
+			</view>
+			<scroll-view :scroll-y="true" class="popbox" style="height: 60vh;" @scrolltolower="scrolltolower">
+				<view v-for="(item, i) in diseaseList" :key="i" @click="choseDise(item.diagnosisName)">
+					<view class="popbox-item x-bc">
+						<view class="name">{{item.diagnosisName}}</view>
+						<view v-show="activeDise.includes(item.diagnosisName)">
+							<u-icon name="checkmark" color="#2979ff" size="22"></u-icon>
+						</view>
+					</view>
+				</view>
+				<view class="empty" v-if="diseaseList&&diseaseList.length==0">
+					<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/global_search_empty.png" mode="widthFix"></image>
+					<view>{{msg}}</view>
+				</view>
+			</scroll-view>
+		</u-popup>
 	</view>
 </template>
 
 <script>
 	import {getStoreOrderById} from './api/storeOrder.js'
 	import {getWeixinPrescribeTemps} from '@/api/common'
-	import {doPrescribe} from './api/prescribe'
+	import {doPrescribe,diseaseQueryList} from './api/prescribe'
 	import {getPatientList,delPatient} from '@/api/patient'
 	export default {
 		data() {
@@ -191,17 +204,42 @@
 				orderId:null,
 				patient:[],
 				patientId:null,
+				patientInfo: {},
 				// 疾病列表
-				// diseaseList: ['消化不良','心血管','呼吸系统','感染病','皮肤病','口腔','妇科','耳鼻喉'],
+				diseaseList: [],
 				// 选中的疾病
-				// activeDise: 0,
-				isAllergic: false,
-				isLiver: false,
-				isRenal: false,
-				isLactation: false,
+				activeDise: [],
+				isLactation: 0,
+				isPregnantWoman: 0,
 				chiefComplaint:null,
 				historyIllness:null,
-				
+				diagnosisName: '',
+				pageNum: 1,
+				pageSize: 10,
+				quesList:[
+					// {
+					// 	answer: "是",
+					// 	subjectId: 3,
+					// 	title: "是否使用过此类药物",
+					// 	options: ['是','否']
+					// },
+					{
+						answer: "否",
+						subjectId: 4,
+						title: "是否有药物过敏史",
+						options: ['是','否']
+					},
+					{
+						answer: "否",
+						subjectId: 5,
+						title: "肝肾功能是否有异常",
+						options: ['是','否']
+					}
+				],
+				show: false,
+				msg: '暂无数据',
+				isAgreement: false,
+				hasMore: true
 			}
 		},
 		onLoad(option) {
@@ -212,19 +250,90 @@
 			})
 			this.getWeixinPrescribeTemps();
 			this.getStoreOrderById();
+			this.diseaseQueryList()
 		},
 		onShow() {
 			this.getPatientList();
 		},
 		
 		methods: {
+			handleAgreement() {
+				this.isAgreement = !this.isAgreement;
+			},
 			back(){
-			  uni.showToast({
-			  	icon:'none',
-			  	title: "请填写资料提交处方,否则将无法发货"
+			  // uni.showToast({
+			  // 	icon:'none',
+			  // 	title: "请填写资料提交处方,否则将无法发货"
+			  // });
+			  uni.showModal({
+			  	title: '提示',
+			  	content: '请填写资料提交处方,否则将无法发货,确定要返回吗?',
+				cancelColor: '#2583EB',
+				confirmColor: '#000000',
+			  	success: function (res) {
+			  		if (res.confirm) {
+			  			uni.navigateBack()
+			  		} else if (res.cancel) {
+			  			console.log('用户点击取消');
+			  		}
+			  	}
 			  });
 			},
-			getStoreOrderById:function(){
+			close() {
+				this.show = false
+			},
+			diseaseQueryList(){
+				var that = this;
+				const param = {
+					orderId: this.orderId,
+					diagnosisName: this.diagnosisName,
+					pageNum: this.pageNum,
+					pageSize: this.pageSize,
+				}
+				diseaseQueryList(param).then(
+					res => {
+						if(res.code==200){
+							if (that.pageNum == 1) {
+								that.diseaseList = res.datas; 
+								
+							} else {
+								that.diseaseList = that.diseaseList.concat(res.datas);
+								 
+							}
+							if(that.diseaseList.length>=res.total) {
+								that.hasMore = false
+							} else {
+								that.hasMore = true
+							}
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+							that.diseaseList = [];
+						}
+					},
+					rej => {}
+				);
+			},
+			scrolltolower() {
+				if(!this.hasMore) return
+				this.pageNum++;
+				this.diseaseQueryList()
+			},
+			doSearchUser() {
+				this.hasMore = true
+				this.pageNum = 1;
+				this.diseaseQueryList()
+			},
+			changeRadio(e,name,type) {
+				if(type==1) {
+					this.quesList[name].answer = e.detail.value
+				} else {
+					this[name] = e.detail.value
+				}
+			},
+			getStoreOrderById(){
 				var data={orderId:this.orderId}
 				getStoreOrderById(data).then(
 					res => {
@@ -237,7 +346,7 @@
 					rej => {}
 				);
 			},
-			getWeixinPrescribeTemps:function(){
+			getWeixinPrescribeTemps(){
 				getWeixinPrescribeTemps().then(
 					res => {
 						if(res.code==200){
@@ -297,6 +406,18 @@
 				})
 			},
 			submit(){
+				// let url = 'https://ehospital-m-test.sq580.com/#/preDemand?id=5459&thirdPlatform=0'
+				// uni.navigateTo({
+				// 	url: '/pages/index/webview?url='+encodeURIComponent(url)
+				// })
+				// return
+				if (!this.isAgreement) {
+					uni.showToast({
+						icon: 'none',
+						title: '请先勾选确认'
+					});
+					return false;
+				}
 				var that=this;
 				if(this.patientId==null){
 					uni.showToast({
@@ -309,61 +430,98 @@
 				uni.showLoading({
 					title:"正在处理中"
 				})
-				var data={
+				// var data={
+				// 	patientId:this.patientId,
+				// 	orderId:this.orderId,
+				// 	isAllergic:this.isAllergic,
+				// 	isLiver:this.isLiver,
+				// 	isRenal:this.isRenal,
+				// 	isLactation:this.isLactation,
+				// 	chiefComplaint:this.chiefComplaint,
+				// 	historyIllness:this.historyIllness,
+				// 	recordPic:this.imgList.toString()
+				// }
+				if(this.activeDise.length==0) {
+					uni.showToast({
+						icon:'none',
+						title: "请选择本次用药的确诊疾病"
+					});
+					return
+				}
+				const beforeAiDataList = [
+				  { answer: this.activeDise.join(','), subjectId: 1, title: '症状' },
+				  {
+				    answerMedicine: JSON.stringify([{ medicineId: '92', number: 1 }]),
+				    subjectId: 2,
+				    title: '居民用药信息选择'
+				  },
+				  {
+				  	answer: "是",
+				  	subjectId: 3,
+				  	title: "是否使用过此类药物"
+				  },
+				  ...this.quesList.map(({ answer, subjectId, title }) => ({ answer, subjectId, title }))
+				];
+				const relationMap = { '本人': 1, '父母': 2,'配偶': 3, '子女': 4 };
+				const relationship = relationMap[this.patientInfo.relation] ?? 5;
+				const data={
+					souceFrom: 0,//0-微信小程序,1-APP,2-H5,3-支付宝小程序
+					storeOrderId: this.orderId,
+					imgList:this.imgList.toString(),
+					isLactation: this.isLactation,
+					isPregnantWoman: this.isPregnantWoman,
 					patientId:this.patientId,
-					orderId:this.orderId,
-					isAllergic:this.isAllergic,
-					isLiver:this.isLiver,
-					isRenal:this.isRenal,
-					isLactation:this.isLactation,
-					chiefComplaint:this.chiefComplaint,
-					historyIllness:this.historyIllness,
-					recordPic:this.imgList.toString()
+					userId: uni.getStorageSync('userId'),
+					relationship, // 1-本人,2-父母,3-配偶,4-子女,5-其他
+					beforeAiDataList
 				}
 				 doPrescribe(data).then(
 				 	res => {
+						uni.hideLoading()
 				 		if(res.code==200){
-							 uni.hideLoading()
-				 			 uni.showToast({
-				 			 	icon:'success',
-				 			 	title:res.msg,
-				 			 });
-							 var order =res.order;
-							 uni.requestSubscribeMessage({
-							 	tmplIds: this.temps,
-							 	success(res) {
-									setTimeout(function(){
-										if(order.paid!=1){
-											uni.redirectTo({
-												url: './paymentOrder?orderId='+that.order.id
-											})
-										}
-										else{
-											uni.navigateBack({  
-												delta: 1
-											});
+							uni.redirectTo({
+								url: '/pages/index/webview?url='+encodeURIComponent(res.data)
+							})
+				 			//  uni.showToast({
+				 			//  	icon:'success',
+				 			//  	title:res.msg,
+				 			//  });
+							 // var order =res.order;
+							 // uni.requestSubscribeMessage({
+							 // 	tmplIds: this.temps,
+							 // 	success(res) {
+								// 	setTimeout(function(){
+								// 		if(order.paid!=1){
+								// 			uni.redirectTo({
+								// 				url: './paymentOrder?orderId='+that.order.id
+								// 			})
+								// 		}
+								// 		else{
+								// 			uni.navigateBack({  
+								// 				delta: 1
+								// 			});
 											
-										}
+								// 		}
 										
-									},500);
-							 	},
-							 	fail(res) {
-							 		setTimeout(function(){
-										if(order.paid!=1){
-											uni.redirectTo({
-												url: './paymentOrder?orderId='+that.order.id
-											})
-										}
-										else{
-											uni.navigateBack({  
-												delta: 1
-											});
+								// 	},500);
+							 // 	},
+							 // 	fail(res) {
+							 // 		setTimeout(function(){
+								// 		if(order.paid!=1){
+								// 			uni.redirectTo({
+								// 				url: './paymentOrder?orderId='+that.order.id
+								// 			})
+								// 		}
+								// 		else{
+								// 			uni.navigateBack({  
+								// 				delta: 1
+								// 			});
 											
-										}
+								// 		}
 							 			 
-							 		},500);
-							 	}
-							 })
+							 // 		},500);
+							 // 	}
+							 // })
 							 
 				 			
 				 		}else{
@@ -398,6 +556,7 @@
 			},
 			// 选中问诊人
 			chosePatient(item) {
+				this.patientInfo = item
 				this.patientId = item.patientId
 			},
 			// 添加问诊人
@@ -407,14 +566,68 @@
 				})
 			},
 			// 疾病选择
-			choseDise(index) {
-				this.activeDise = index
+			choseDise(item) {
+				this.activeDise.includes(item) ? this.activeDise.splice(this.activeDise.indexOf(item), 1) : this.activeDise.push(item);         // 不在就加上
 			}
 		}
 	}
 </script>
 
-<style lang="scss">
+<style lang="scss" scoped>
+	.label {
+		margin-right: 50upx;
+		&:last-child {
+			margin-right: 0;
+		}
+	}
+	.popbox-item {
+		padding: 24rpx;
+		border-bottom: 1rpx solid #eee;
+	}
+	.agreement {
+		padding: 40rpx 30rpx 0 30rpx;
+		font-size: 28rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #666666;
+	}
+	.popbox {
+		background-color: #fff;
+		&-title {
+			width: 100%;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			padding: 24rpx;
+			background-color: #fff;
+			border-bottom: 1rpx solid #EDEEEF;
+			box-sizing: border-box;
+		}
+	}
+	.search-cont{
+		padding: 16upx 30upx;
+		background-color: #FFFFFF;
+		.inner{
+			box-sizing: border-box;
+			width: 100%;
+			height: 72upx;
+			background: #F7F7F7;
+			border-radius: 36upx;
+			display: flex;
+			align-items: center;
+			padding: 0 30upx;
+			.icon-search{
+				width: 28upx;
+				height: 28upx;
+				margin-right: 20upx;
+			}
+			input{
+				height: 60upx;
+				line-height: 60upx;
+				flex: 1;
+			}
+		}
+	}
 	.content{
 		height: 100%;
 		display: flex;
@@ -599,6 +812,7 @@
 					border-radius: 16upx;
 					padding: 40upx 30upx 22upx;
 					margin-top: 20upx;
+					margin-bottom: 20upx;
 					.title{
 						display: flex;
 						align-items: center;

+ 59 - 11
pages_shopping/productDetails.vue

@@ -39,7 +39,7 @@
 				</view>
 			</view>
 			<view class="name-box">
-				<view class="tag">{{$getDictLabelName("storeProductType",product.productType)}}</view>{{product.productName}}
+				<view class="tag" :style="{background:_background(product.productType)}">{{$getDictLabelName("storeProductType",product.productType)}}</view>{{product.productName}}
 			</view>
 			<view class="intro" v-if="product.productInfo!=null" v-html="product.productInfo.replace(/\n/g,'<br>')">
 			</view>
@@ -57,6 +57,10 @@
 				<view class="label">生产厂家</view>
 				<view class="text">{{product.mah||'--'}}</view>
 			</view>
+			<view class="other-box-item" v-if="product.sales">
+				<view class="label">已售</view>
+				<view class="text">{{$formatSalesNum(product.sales)}}</view>
+			</view>
 			<view class="other-box-item">
 				<view class="label" style="width: 4em;">服务</view>
 				<view class="safe-box">
@@ -74,7 +78,7 @@
 				<image class="logo" :src="chooseStore.logoUrl" mode="aspectFill"></image>
 				<view class="storebox-r" @click="goStoreDetail(chooseStore)">
 					<view class="storename ellipsis2">{{chooseStore.storeName||''}}</view>
-					<view class="storedesc">24小时营业 销售{{$formatSalesNum(chooseStore.salesCount) }}</view>
+					<!-- <view class="storedesc">24小时营业 销售{{$formatSalesNum(chooseStore.salesCount) }}</view> -->
 				</view>
 			</view>
 			<view class="storebox-btn" @click="goStoreDetail(chooseStore)">进店</view>
@@ -110,6 +114,28 @@
 			<view class="inner">
 				<view  v-html="product.description" style="font-size:0"></view>
 			</view>
+			<view class="other-box" style="margin: 0;padding: 24rpx 0;">
+				<view class="other-box-item" v-if="product.indications">
+					<view class="label" style="margin-right: 16rpx;">【功能主治】</view>
+					<view class="text">{{product.indications}}</view>
+				</view>
+				<view class="other-box-item" v-if="product.dosage">
+					<view class="label" style="margin-right: 16rpx;">【用法用量】</view>
+					<view class="text">{{product.dosage}}</view>
+				</view>
+				<view class="other-box-item" v-if="product.adverseReactions">
+					<view class="label" style="margin-right: 16rpx;">【不良反应】</view>
+					<view class="text">{{product.adverseReactions}}</view>
+				</view>
+				<view class="other-box-item" v-if="product.contraindications">
+					<view class="label" style="margin-right: 16rpx;">【禁忌】</view>
+					<view class="text">{{product.contraindications}}</view>
+				</view>
+				<view class="other-box-item" v-if="product.precautions">
+					<view class="label" style="margin-right: 16rpx;">【注意事项】</view>
+					<view class="text">{{product.precautions}}</view>
+				</view>
+			</view>
 		</view>
 		<!-- 底部按钮 -->
 		<view class="btn-foot">
@@ -118,11 +144,11 @@
 					<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/back_home.png" mode=""></image>
 					<text class="label">首页</text>
 				</view>
-				<view class="item" style="position: relative;">
+				<!-- <view class="item" style="position: relative;">
 					<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/consult_small.png" mode=""></image>
 					<text class="label">咨询</text>
 					<button class="contact-btn" open-type="contact"></button>
-				</view>
+				</view> -->
 				<view class="item" @click="navgetTo('./cart')">
 					<view class="img-item">
 						<u-badge type="error" max="99" :value="cartCount" :offset="[-10,-10]" :absolute="true"></u-badge>
@@ -196,8 +222,9 @@
 </template>
 
 <script>
+	import {getCartCount} from '@/api/index.js'
 	import {getDicts} from '@/api/common.js'
-	import {getProductDetails,getCartCount,addCart} from './api/product.js'
+	import {getProductDetails,addCart} from './api/product.js'
 	import popupBottom from './components/px-popup-bottom.vue'
 	export default {
 		components: {
@@ -234,6 +261,20 @@
 				storeId: ''
 			};
 		},
+		computed: {
+			_background() {
+				//productType: 1:OTC,2:Rx,3:非药品,4:器械
+				return (productType)=> {
+					switch (productType) {
+						case 1: return '#37E2EA' // OTC
+						case 2: return 'red'     // Rx
+						case 3: return '#2583EB' // 非药品
+						case 4: return '#999'    // 器械
+						default: return '#ccc'
+					}
+				}
+			}
+		},
 		onLoad(options) {
 			if(options.userId!=null){
 				uni.setStorageSync('tuiUserId',options.userId);
@@ -415,7 +456,7 @@
 				);
 			},
 			getCartCount(){
-				let data = {productId:this.productId};
+				let data = {};
 				getCartCount(data).then(
 					cartRes => {
 						if(cartRes.code==200){
@@ -555,15 +596,19 @@
 		margin: 24rpx;
 		&-item {
 			display: flex;
-			align-items: center;
+			align-items: flex-start;
 			padding: 10rpx 0;
 		}
 		.label {
+			flex-shrink: 0;
 			color: #999999;
 			font-size: 28rpx;
 			font-family: PingFang SC;
 			line-height: 1.3;
 			margin-right: 40rpx;
+			min-width: 4em;
+			text-align: justify;      /* 两端对齐 */
+			text-align-last: justify; /* 最后一行也撑满 */
 		}
 		.safe-box{
 			display: flex;
@@ -729,12 +774,13 @@
 			}
 		}
 		.intro{
+			display: block;
 			font-size: 26upx;
 			font-family: PingFang SC;
 			font-weight: 500;
 			color: #999999;
 			line-height: 36upx;
-			padding: 18upx 0 23upx;
+			padding-top: 18upx;
 		}
 	}
 	.inventor{
@@ -814,7 +860,7 @@
 		}
 	}
 	.det-box{
-		padding: 40upx 30upx 0 30upx;
+		padding: 30upx 30upx 0 30upx;
 		background-color: #FFFFFF;
 		margin: 24rpx 24rpx 0 24rpx;
 		border-radius: 16rpx;
@@ -824,9 +870,11 @@
 			font-weight: bold;
 			color: #333333;
 			line-height: 1;
-			margin-bottom: 25upx;
+			margin: 24rpx 0;
+		}
+		.label, .text {
+			font-size: 30upx !important;
 		}
-		
 	}
 	
 	.btn-foot{

+ 1 - 0
pages_shopping/productList.vue

@@ -280,6 +280,7 @@
 					height: 80rpx;
 				}
 				.intro{
+					display: block;
 					font-size: 26upx;
 					font-family: PingFang SC;
 					font-weight: 500;

+ 10 - 10
pages_shopping/registerMerchant.vue

@@ -60,18 +60,18 @@
 								:maxCount="1"
 							></u-upload>
 						</u-form-item>
-						<!-- <u-form-item required labelWidth="auto"  borderBottom label="营业执照是否长期有效" prop="longTime">
-							<u-radio-group placement="row" v-model="form.longTime" >
+						<u-form-item required labelWidth="auto"  borderBottom label="营业执照是否长期有效" prop="isBusinessLicensePermanent">
+							<u-radio-group placement="row" v-model="form.isBusinessLicensePermanent" >
 								<u-radio activeColor="#2583EB" :customStyle="{marginRight: '8px'}" key="1" label="是" :name="1" > </u-radio>
-								<u-radio activeColor="#2583EB" :customStyle="{marginRight: '8px'}" key="2" label="否" :name="2" > </u-radio>
+								<u-radio activeColor="#2583EB" :customStyle="{marginRight: '8px'}" key="0" label="否" :name="0" > </u-radio>
 							 </u-radio-group>
-						</u-form-item> -->
-						<template v-if="form.longTime==2">
+						</u-form-item>
+						<template v-if="form.isBusinessLicensePermanent==0">
 							<!-- <u-form-item required labelWidth="auto"  borderBottom label="营业执照有效期" prop="businessLicenseExpireStart" @click="openCalendar(1)">
 								<u-input disabled disabledColor="#ffffff" border="none" placeholder="请选择营业执照有效期" v-model="businessLicenseExpire" />
 								<template #right> <u-icon name="arrow-right"></u-icon> </template>
 							</u-form-item> -->
-							<u-form-item :required="form.longTime==2" labelWidth="auto" borderBottom label="营业执照有效期开始时间" prop="businessLicenseExpireStart">
+							<u-form-item :required="form.isBusinessLicensePermanent==0" labelWidth="auto" borderBottom label="营业执照有效期开始时间" prop="businessLicenseExpireStart">
 								<picker :value="form.businessLicenseExpireStart" mode="date" fields="day" @change="pickerChange($event,'businessLicenseExpireStart')">
 									<view class="x-f" style="justify-content: space-between;">
 										<u-input disabled disabledColor="#ffffff" border="none" placeholder="请选择开始时间" v-model="form.businessLicenseExpireStart" />
@@ -79,7 +79,7 @@
 									</view>
 								</picker>
 							</u-form-item>
-							<u-form-item :required="form.longTime==2" labelWidth="auto" borderBottom label="营业执照有效期结束时间" prop="businessLicenseExpireEnd">
+							<u-form-item :required="form.isBusinessLicensePermanent==0" labelWidth="auto" borderBottom label="营业执照有效期结束时间" prop="businessLicenseExpireEnd">
 								<picker :value="form.businessLicenseExpireEnd" mode="date" fields="day" @change="pickerChange($event,'businessLicenseExpireEnd')">
 									<view class="x-f" style="justify-content: space-between;">
 										<u-input disabled disabledColor="#ffffff" border="none" placeholder="请选择结束时间" v-model="form.businessLicenseExpireEnd" />
@@ -315,7 +315,7 @@ export default {
 			fileList8:[],
 			checked:0,
 			form:{
-				longTime: 2,
+				isBusinessLicensePermanent: 1,
 				storeName:'',
 				fullName:'',
 				phone:'',
@@ -380,7 +380,7 @@ export default {
 				brokerageType: [{required: true, message: '请选择佣金类型'}],
 				account: [{required: true, message: '请输入登录帐号'}],
 				shippingType: [{required: true, message: '请选择配送方式'}],
-				longTime: [{required: true, message: '请选择营业执照是否长期有效'}],
+				isBusinessLicensePermanent: [{required: true, message: '请选择营业执照是否长期有效'}],
 			},
 			calendarType: 0,
 			businessLicenseExpire:'',
@@ -668,7 +668,7 @@ export default {
 				this.form.medicalLicense=this.fileList8[0].url
 			}
 			console.log(this.form)
-			const requiredFlag = this.form.longTime == 2
+			const requiredFlag = this.form.isBusinessLicensePermanent == 0
 			if(requiredFlag==2&&!this.form.businessLicenseExpireStart) {
 				uni.showToast({
 					title: '请选择营业执照有效期开始时间',

+ 4 - 5
pages_shopping/store/index.vue

@@ -24,11 +24,10 @@
 					</view>
 					<view class="store-head-name">{{storeInfo.storeName || ''}}</view>
 				</view>
-				<view class="store-head-desc">
-					<view>销售{{$formatSalesNum(storeInfo.salesCount) }}</view>
+				<!-- <view class="store-head-desc">
 					<view>24小时营业</view>
-					<view>支持预订</view>
-				</view>
+					<view>销售{{$formatSalesNum(storeInfo.salesCount) }}</view>
+				</view> -->
 			</view>
 			<view class="storebox">
 				<u-sticky bgColor="#fff" :offset-top="statusBarHeight + 44">
@@ -515,7 +514,7 @@
 			box-sizing: border-box;
 			width: calc(100% - 200upx);
 			height: 100%;
-			padding: 0 30upx;
+			margin: 0 24upx;
 			.banner-box{
 				margin-top: 30rpx;
 				width: 100%;

+ 185 - 0
pages_store/components/storeDetail.vue

@@ -0,0 +1,185 @@
+<template>
+	<view class="container-body">
+		<view class="box mb20">
+			<view class="storeInfo title">基础信息</view>
+			<view class="storeInfo-item x-start">
+				<view class="label" style="width: 4rem;">公司全称</view>
+				<view class="val">{{storeInfo.fullName|| ''}}</view>
+			</view>
+			<view class="storeInfo-item x-start">
+				<view class="label" style="width: 4rem;">联系电话</view>
+				<view class="val">{{storeInfo.sendPhone|| ''}}</view>
+			</view>
+			<view class="storeInfo-item x-start">
+				<view class="label" style="width: 4rem;">详细地址</view>
+				<view class="val">{{storeInfo.address|| ''}}{{storeInfo.enterpriseAddress||''}}</view>
+			</view>
+			<view class="storeInfo-item x-start">
+				<view class="label" style="width: 4rem;">经营范围</view>
+				<view class="val">{{storeInfo.businessScope|| ''}}</view>
+			</view>
+		</view>
+		<view class="box mb20">
+			<view class="storeInfo title">资质信息</view>
+			<view class="storeInfo-item mb20">
+				<view class="label mb20">营业执照</view>
+				<view class="val x-f">
+					<u-image
+						v-if="storeInfo.businessLicense"
+						shape="square" 
+						lazyLoad 
+						:src="storeInfo.businessLicense" 
+						width="600rpx"
+						height="auto"
+						mode="widthFix" 
+						radius="6"
+						@click="previewImage('businessLicense')"
+					></u-image>
+					<view v-else>暂未上传</view>
+				</view>
+			</view>
+			<view class="storeInfo-item mb20" v-if="storeInfo.medicalDevice2">
+				<view class="label" mb20>2类器械生产备案</view>
+				<view class="val x-f">
+					<u-image
+						v-if="storeInfo.medicalDevice2"
+						shape="square" 
+						lazyLoad 
+						:src="storeInfo.medicalDevice2" 
+						width="600rpx"
+						height="auto"
+						mode="widthFix" 
+						radius="6"
+						@click="previewImage('medicalDevice2')"
+					></u-image>
+					<view v-else>暂未上传</view>
+				</view>
+			</view>
+			<view class="storeInfo-item mb20" v-if="storeInfo.medicalDevice1">
+				<view class="label mb20">1类医疗器械备案</view>
+				<view class="val x-start">
+					<u-image
+						v-if="storeInfo.medicalDevice1"
+						shape="square" 
+						lazyLoad 
+						:src="storeInfo.medicalDevice1" 
+						width="600rpx"
+						height="auto"
+						mode="widthFix" 
+						radius="6"
+						@click="previewImage('medicalDevice1')"
+					></u-image>
+					<view v-else>暂未上传</view>
+				</view>
+			</view>
+			<view class="storeInfo-item mb20" v-if="storeInfo.medicalDevice3">
+				<view class="label mb20">3类器械经营许可证</view>
+				<view class="val x-f">
+					<u-image
+						v-if="storeInfo.medicalDevice3"
+						shape="square" 
+						lazyLoad 
+						:src="storeInfo.medicalDevice3" 
+						width="600rpx"
+						height="auto"
+						mode="widthFix" 
+						radius="6"
+						@click="previewImage('medicalDevice3')"
+					></u-image>
+					<view v-else>暂未上传</view>
+				</view>
+			</view>
+			<view class="storeInfo-item mb20" v-if="storeInfo.foodLicense">
+				<view class="label mb20">食品经营许可证</view>
+				<view class="val x-f">
+					<u-image
+						v-if="storeInfo.foodLicense"
+						shape="square" 
+						lazyLoad 
+						:src="storeInfo.foodLicense" 
+						width="600rpx"
+						height="auto"
+						mode="widthFix" 
+						radius="6"
+						@click="previewImage('foodLicense')"
+					></u-image>
+					<view v-else>暂未上传</view>
+				</view>
+			</view>
+			<view class="storeInfo-item mb20" v-if="storeInfo.medicalLicense">
+				<view class="label mb20">医疗机构执业许可证</view>
+				<view class="val x-f">
+					<u-image
+						v-if="storeInfo.medicalLicense"
+						shape="square" 
+						lazyLoad 
+						:src="storeInfo.medicalLicense" 
+						width="600rpx"
+						height="auto"
+						mode="widthFix" 
+						radius="6"
+						@click="previewImage('medicalLicense')"
+					></u-image>
+					<view v-else>暂未上传</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props:['storeInfo'],
+		data() {
+			return {}
+		},
+		methods: {
+			previewImage(type) {
+				uni.previewImage({
+					current: 0,
+					urls: [this.storeInfo[type]]
+				});
+			},
+		}
+	}
+</script>
+
+
+<style scoped lang="scss">
+	.mb20 {
+		margin-bottom: 20rpx;
+	}
+	.box {
+		padding: 0 32rpx 26rpx 32rpx;
+		background-color: #fff;
+	}
+	.container-body {
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 400;
+		font-size: 28rpx;
+		color: #939599;
+	}
+	.businessLicense {
+		height: 80rpx;
+		width: 80rpx;
+		border-radius: 8rpx;
+	}
+	.storeInfo {
+		&-item {
+			padding: 6rpx 0;
+			.label {
+				flex-shrink: 0;
+			}
+			.val {
+				color: #222;
+			}
+		}
+	}
+	.title {
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 600;
+		font-size: 30rpx;
+		color: #222222;
+		padding: 24rpx 0;
+	}
+</style>

+ 57 - 5
pages_store/components/tuiStoreProduct.vue

@@ -1,11 +1,16 @@
 <template>
 	<view>
 		<!-- 数据列表 -->
-		<mescroll-body top="0" :height="scrollHeight" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
-			<view class="goods-list">
+		<mescroll-body top="0" :height="scrollHeight+'px'" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+			<view class="medic-itemlist">
+				<medicineItem :type="'store'" v-for="(item, index) in dataList" :key="index" :item="item"></medicineItem>
+				<view class="morebtn" v-if="dataList&&dataList.length>0" @click="navTo('/pages_shopping/home/productList?storeId='+storeId)">查看更多</view>
+			</view>
+			<!-- <view class="goods-list">
 				<view class="item" v-for="(item,index) in dataList" :key="index" @click="showDetail(item)">
 					<view class="img-box">
 						<image :src="item.image" mode="aspectFill"></image>
+						<view class="otctxt" :style="{background:_background(item.productType)}" v-show="item.productType">{{$getDictLabelName("storeProductType",item.productType)}}</view>
 					</view>
 					<view class="info-box">
 						<view class="title ellipsis2">{{item.productName}}</view>
@@ -18,16 +23,20 @@
 						</view>
 					</view>
 				</view>
-			</view>
+			</view> -->
 		</mescroll-body>
 	</view>
 </template>
 
 <script>
+	import medicineItem from '@/components/medicineItem.vue'
 	import {getProducts} from '@/pages_shopping/api/product.js'
 	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
 	export default {
 		mixins: [MescrollMixin],
+		components:{
+			medicineItem
+		},
 		 props: {
 			 storeId:'',
 			 scrollHeight: 0
@@ -62,6 +71,20 @@
 				dataList: [],
 			};
 		},
+		computed: {
+			_background() {
+				//productType: 1:OTC,2:Rx,3:非药品,4:器械
+				return (productType)=> {
+					switch (productType) {
+						case 1: return '#37E2EA' // OTC
+						case 2: return 'red'     // Rx
+						case 3: return '#2583EB' // 非药品
+						case 4: return '#999'    // 器械
+						default: return '#ccc'
+					}
+				}
+			}
+		},
 		watch: {
 		  storeId: {
 		    immediate: true,           // 第一次也触发
@@ -75,6 +98,11 @@
 		  }
 		},
 		methods:{
+			navTo(url) {
+				uni.navigateTo({
+					url: url
+				})
+			},
 			mescrollInit(mescroll) {
 				this.mescroll = mescroll;
 			},
@@ -90,7 +118,6 @@
 					pageSize: page.size,
 					storeId: this.storeId
 				}
-				console.log("==============",'getProducts')
 				getProducts(param).then(res => {
 					if(res.code==200){
 						//设置列表数据
@@ -124,6 +151,18 @@
 </script>
 
 <style lang="scss" scoped>
+	.morebtn{
+		padding: 20rpx;
+		box-sizing: border-box;
+		text-align: center;
+		font-weight: 500;
+		font-size: 32rpx;
+		color: #999;
+	}
+	.medic-itemlist {
+		padding: 20upx;
+		box-sizing: border-box;
+	}
 	.desc {
 		margin-top: 12rpx;
 		font-family: PingFang SC, PingFang SC;
@@ -131,6 +170,18 @@
 		font-size: 24rpx;
 		color: #939599;
 	}
+	.otctxt {
+		position: absolute;
+		top: 0;
+		left: 0;
+		background-color: #37E2EA;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 500;
+		font-size: 20rpx;
+		color: #FFFFFF;
+		padding: 4rpx 14rpx;
+		border-radius: 16rpx 0 16rpx 0;
+	}
 	.goods-list{
 		padding: 20upx;
 		display: flex;
@@ -149,6 +200,7 @@
 			.img-box{
 				width: 100%;
 				height: 334upx;
+				position: relative;
 				image{
 					width: 100%;
 					height: 100%;
@@ -162,7 +214,7 @@
 				flex-direction: column;
 				justify-content: space-between;
 				.title{
-					font-size: 26upx;
+					font-size: 32upx;
 					font-family: PingFang SC;
 					font-weight: 500;
 					color: #111111;

+ 1 - 1
pages_store/index.vue

@@ -7,7 +7,7 @@
 					<view class="x-bc" style="flex: 1;min-height: 104rpx;">
 						<view class="" @click="goStoreDetail">
 							<view class="storename ellipsis">{{item.store.storeName || ''}}</view>
-							<view class="storedesc">24小时营业  月售{{item.store.salesCount|| 0}}</view>
+							<!-- <view class="storedesc">24小时营业  销售{{item.store.salesCount|| 0}}</view> -->
 						</view>
 						<view class="storebox-btn" @click="navTo(item)">进店</u-icon></view>
 					</view>

+ 2 - 3
pages_store/storeDetail.vue

@@ -1,11 +1,11 @@
 <template>
 	<view class="container-body">
 		<view class="box storebox x-bc mb20">
-			<view class="x-f" style="align-items: flex-start;">
+			<view class="x-f">
 				<image class="logo" :src="storeInfo.logoUrl" mode="aspectFill"></image>
 				<view class="storebox-r" @click="goStoreDetail">
 					<view class="storename ellipsis2">{{storeInfo.storeName}}</view>
-					<view class="storedesc">24小时营业  月售{{storeInfo.salesCount|| 0}}</view>
+					<!-- <view class="storedesc">24小时营业  销售{{storeInfo.salesCount|| 0}}</view> -->
 				</view>
 			</view>
 		</view>
@@ -213,7 +213,6 @@
 		.logo {
 			width: 150rpx;
 			height: 150rpx;
-			background: #222;
 			border-radius: 16rpx 16rpx 16rpx 16rpx;
 			margin-right: 26rpx;
 		}

+ 21 - 9
pages_store/storeIndex.vue

@@ -17,10 +17,10 @@
 					<image class="logo" :src="storeInfo.logoUrl" mode="aspectFill"></image>
 					<view class="storebox-r" @click="goStoreDetail">
 						<view class="storename ellipsis2">{{storeInfo.storeName}}</view>
-						<view class="storedesc">24小时营业  月售{{storeInfo.salesCount|| 0}}</view>
+						<!-- <view class="storedesc">24小时营业  销售{{storeInfo.salesCount|| 0}}</view> -->
 					</view>
 				</view>
-				<view class="storebox-btn" @click="goStoreDetail">详情</view>
+				<!-- <view class="storebox-btn" @click="goStoreDetail">详情</view> -->
 			</view>
 			<view class="top-fixed x-ac" style="background-color: #fff;">
 				 <view style="width: 50%;">
@@ -34,9 +34,9 @@
 				 </view>
 			</view>
 		</view>
-		<view  :style="{height: divHeight}">
+		<view  :style="{height: divHeight,background:' #f5f5f5',overflow:'auto'}">
 			<view v-show="current==0" style="width: 100%;">
-				<tuiStoreProduct ref="tuiStoreProduct" :scrollHeight="divHeight" :storeId="storeId"></tuiStoreProduct>
+				<tuiStoreProduct ref="tuiStoreProduct" :scrollHeight="mescrollHeight" :storeId="storeId"></tuiStoreProduct>
 			</view>
 			<view v-if="current==1" style="height: 100%" class="medic-box">
 				<view class="cate-list">
@@ -48,7 +48,7 @@
 					>{{item.cateName }}</view>
 				</view>
 				<view class="medic">
-					<mescroll-body :style="{height: divHeight}" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+					<mescroll-body :height="mescrollHeight+'px'" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
 					<view style="display: flex;flex-wrap: wrap;">
 						<medicineVerticalItem v-for="(item, index) in dataList" :key="index" :item="item" :storeId="storeId"></medicineVerticalItem>
 					</view>
@@ -86,6 +86,9 @@
 					</view> -->
 				</view>
 			</view>
+			<template v-if="current==2">
+				<detail ref="getStoreInfo" :storeInfo="storeInfo"></detail>
+			</template>
 		</view>
 	</view>
 </template>
@@ -96,13 +99,15 @@
 	import qualifications from './components/qualifications.vue'
 	import {getProductCate,storeDetail,getProducts} from '@/api/index.js'
 	import medicineVerticalItem from "@/components/medicineVerticalItem";
+	import detail from './components/storeDetail.vue'
 	// import {getAdv} from '@/api/adv'
 	export default {
 		mixins: [MescrollMixin], // 使用mixin
 		components: {
 			tuiStoreProduct,
 			qualifications,
-			medicineVerticalItem
+			medicineVerticalItem,
+			detail
 		},
 		data() {
 			return {
@@ -124,6 +129,10 @@
 					{
 						id:2,
 						name:'分类'
+					},
+					{
+						id:3,
+						name:'详情'
 					}
 				],
 				current:0,
@@ -162,6 +171,7 @@
 					pid:'',
 					storeId: ''
 				},
+				mescrollHeight: 200
 			};
 		},
 		onLoad(option) {
@@ -183,6 +193,7 @@
 		       	console.log(data.height)  // 获取元素宽度
 					// console.log(uni.upx2px(10)) 
 					that.divHeight="calc(100% - "+data.height+"px)"
+					that.mescrollHeight = uni.getSystemInfoSync().screenHeight - data.height
 		      }).exec()
 			},500);
 			// this.getAdv();
@@ -244,7 +255,7 @@
 			},
 			getProductCate(){
 				let data = {
-					storeId: this.storeId
+					// storeId: this.storeId
 				};
 				getProductCate(data).then(
 					res => {
@@ -257,7 +268,7 @@
 								this.cateSelect=this.cates[0].cateId;
 								this.form.cateId = this.cates[0].cateId;
 								// this.form.pid = this.cates[0].pid;
-								this.mescroll.resetUpScroll()
+								this.mescroll&&this.mescroll.resetUpScroll()
 							}
 						}else{
 							uni.showToast({
@@ -432,6 +443,7 @@
 		}
 		.medic-box{
 			display: flex;
+			background: #fff;
 			.cate-list{
 				box-sizing: border-box;
 				width: 200upx;
@@ -467,7 +479,7 @@
 				box-sizing: border-box;
 				width: calc(100% - 200upx);
 				height: 100%;
-				padding: 0 30upx;
+				margin: 0 24upx;
 				.banner-box{
 					margin-top: 30rpx;
 					width: 100%;