yzx 3 ماه پیش
والد
کامیت
50d47c3b0b
100فایلهای تغییر یافته به همراه27067 افزوده شده و 0 حذف شده
  1. 24 0
      .hbuilderx/launch.json
  2. 153 0
      App.vue
  3. 24 0
      api/activity.js
  4. 37 0
      api/address.js
  5. 6 0
      api/adv.js
  6. 26 0
      api/article.js
  7. 27 0
      api/common.js
  8. 29 0
      api/companyOrder.js
  9. 22 0
      api/companyUser.js
  10. 32 0
      api/coupon.js
  11. 45 0
      api/doc.js
  12. 47 0
      api/doctorOrder.js
  13. 39 0
      api/index.js
  14. 22 0
      api/patient.js
  15. 11 0
      api/payment.js
  16. 21 0
      api/prescribe.js
  17. 65 0
      api/product.js
  18. 29 0
      api/storeAfterSales.js
  19. 79 0
      api/storeOrder.js
  20. 15 0
      api/storeProductPackage.js
  21. 76 0
      api/user.js
  22. 16 0
      api/userSign.js
  23. 262 0
      assets/css/common.less
  24. 2 0
      assets/iconfont/iconfont.css
  25. BIN
      assets/iconfont/iconfont.ttf
  26. 78 0
      common/request.js
  27. 21 0
      components/Loading.vue
  28. 147 0
      components/Menu.vue
  29. 166 0
      components/chengpeng-audio/free-audio.vue
  30. 42 0
      components/chengpeng-audio/redme.md
  31. BIN
      components/chengpeng-audio/static/play.png
  32. BIN
      components/chengpeng-audio/static/stop.png
  33. 143 0
      components/evan-switch/evan-switch.vue
  34. 181 0
      components/likeProduct.vue
  35. 315 0
      components/px-popup-bottom/px-popup-bottom.vue
  36. 181 0
      components/tuiProduct.vue
  37. 325 0
      components/z-modal/z-modal.vue
  38. 22 0
      main.js
  39. 94 0
      manifest.json
  40. 42 0
      package-lock.json
  41. 12 0
      package.json
  42. 978 0
      pages.json
  43. 524 0
      pages/auth/login.vue
  44. 107 0
      pages/auth/wxLogin.vue
  45. 87 0
      pages/common/launch.vue
  46. 93 0
      pages/doctor/doctorQr.vue
  47. 261 0
      pages/healthy/detail.vue
  48. 351 0
      pages/healthy/index.vue
  49. 121 0
      pages/healthy/readUsers.vue
  50. 72 0
      pages/home/cert.vue
  51. 80 0
      pages/home/companyInfo.vue
  52. 279 0
      pages/home/components/HotProduct.vue
  53. 280 0
      pages/home/components/NewProduct.vue
  54. 79 0
      pages/home/content.vue
  55. 377 0
      pages/home/doctorCase.vue
  56. 40 0
      pages/home/h5.vue
  57. 1984 0
      pages/home/index.vue
  58. 473 0
      pages/home/productList.vue
  59. 132 0
      pages/home/productSearch.vue
  60. 461 0
      pages/shopping/cart.vue
  61. 780 0
      pages/shopping/confirmCreateOrder.vue
  62. 780 0
      pages/shopping/confirmOrder.vue
  63. 718 0
      pages/shopping/confirmPackageOrder.vue
  64. 355 0
      pages/shopping/index.vue
  65. 342 0
      pages/shopping/payOrder.vue
  66. 587 0
      pages/shopping/paymentOrder.vue
  67. 813 0
      pages/shopping/prescribe.vue
  68. 1026 0
      pages/shopping/productDetails.vue
  69. 434 0
      pages/shopping/productList.vue
  70. 191 0
      pages/shopping/success.vue
  71. 555 0
      pages/user/index.vue
  72. 9 0
      pages/user/test.vue
  73. 103 0
      pages_company/alipayImg.vue
  74. 145 0
      pages_company/auth/login.vue
  75. 106 0
      pages_company/card.vue
  76. 379 0
      pages_company/coupon.vue
  77. 390 0
      pages_company/couponDetails.vue
  78. 301 0
      pages_company/index.vue
  79. 453 0
      pages_company/order/cart.vue
  80. 430 0
      pages_company/order/confirmCompanyOrder.vue
  81. 558 0
      pages_company/order/confirmOrder.vue
  82. 364 0
      pages_company/order/coupon.vue
  83. 926 0
      pages_company/order/productDetails.vue
  84. 480 0
      pages_company/order/productList.vue
  85. 443 0
      pages_company/order/productShowDetails.vue
  86. 438 0
      pages_company/storeOrder.vue
  87. 843 0
      pages_company/storeOrderDetail.vue
  88. 495 0
      pages_company/storeProductPackage.vue
  89. 911 0
      pages_company/storeProductPackageDetails.vue
  90. 188 0
      pages_shopping/components/specialBanner.vue
  91. 302 0
      pages_shopping/shopping/activityDetails.vue
  92. 337 0
      pages_shopping/shopping/coupon.vue
  93. 150 0
      pages_shopping/shopping/myCoupon.vue
  94. 351 0
      pages_shopping/shopping/productSalesList.vue
  95. 407 0
      pages_user/user/addAddress.vue
  96. 281 0
      pages_user/user/addDoc.vue
  97. 285 0
      pages_user/user/addDocRecord.vue
  98. 248 0
      pages_user/user/addPatient.vue
  99. 269 0
      pages_user/user/address.vue
  100. 237 0
      pages_user/user/doc.vue

+ 24 - 0
.hbuilderx/launch.json

@@ -0,0 +1,24 @@
+{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
+  // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
+    "version": "0.0",
+    "configurations": [{
+     	"app-plus" : 
+     	{
+     		"launchtype" : "local"
+     	},
+     	"default" : 
+     	{
+     		"launchtype" : "local"
+     	},
+     	"h5" : 
+     	{
+     		"launchtype" : "local"
+     	},
+     	"mp-weixin" : 
+     	{
+     		"launchtype" : "local"
+     	},
+     	"type" : "uniCloud"
+     }
+    ]
+}

+ 153 - 0
App.vue

@@ -0,0 +1,153 @@
+<script>
+	import Vue from 'vue'
+	// import TIM from 'tim-wx-sdk';
+	// import COS from 'cos-wx-sdk-v5';
+	export default {
+		onLaunch: function() {
+			// uni.$TUIKit = TIM.create({
+			// 	SDKAppID: 1400693126
+			// });
+			// uni.$TUIKit.registerPlugin({
+			// 	'cos-wx-sdk': COS
+			// });
+			// uni.$TUIKitTIM = TIM;
+			// uni.$TUIKitEvent = TIM.EVENT;
+			// uni.$TUIKitVersion = TIM.VERSION;
+			// uni.$TUIKitTypes = TIM.TYPES; // 监听系统级事件
+			// uni.$resetLoginData = this.resetLoginData();
+			// uni.$TUIKit.on(uni.$TUIKitEvent.SDK_READY, this.onSDKReady);
+			// uni.$TUIKit.on(uni.$TUIKitEvent.SDK_NOT_READY, this.onSdkNotReady);
+			// uni.$TUIKit.on(uni.$TUIKitEvent.KICKED_OUT, this.onKickedOut);
+			// uni.$TUIKit.on(uni.$TUIKitEvent.ERROR, this.onTIMError);
+			// uni.$TUIKit.on(uni.$TUIKitEvent.NET_STATE_CHANGE, this.onNetStateChange);
+			// uni.$TUIKit.on(uni.$TUIKitEvent.SDK_RELOAD, this.onSDKReload);
+			
+			console.log('IM')
+		},
+		onShow: function () {
+		    console.log('App Show')
+		    uni.getSystemInfo({
+				success: (result) => {
+					// 获取手机系统的状态栏高度(不同手机的状态栏高度不同)
+					// console.log('当前手机的状态栏高度',result.statusBarHeight)
+					let statusBarHeight = result.statusBarHeight + 'px'
+					
+					// 获取右侧胶囊的信息 单位px
+					//#ifndef H5 || APP-PLUS
+					const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
+					
+					//bottom: 胶囊底部距离屏幕顶部的距离
+					//height: 胶囊高度
+					//left:   胶囊左侧距离屏幕左侧的距离
+					//right:  胶囊右侧距离屏幕左侧的距离
+					//top:    胶囊顶部距离屏幕顶部的距离
+					//width:  胶囊宽度
+					// console.log(menuButtonInfo.width, menuButtonInfo.height, menuButtonInfo.top)
+					// console.log('计算胶囊右侧距离屏幕右边距离', result.screenWidth - menuButtonInfo.right)
+					let menuWidth = menuButtonInfo.width + 'px'
+					let menuHeight = menuButtonInfo.height + 'px'
+					let menuBorderRadius = menuButtonInfo.height / 2 + 'px'
+					let menuRight = result.screenWidth - menuButtonInfo.right + 'px'
+					let menuTop = menuButtonInfo.top + 'px'
+					let contentTop = result.statusBarHeight + 44 + 'px'
+			
+					let menuInfo = {
+						statusBarHeight: statusBarHeight,//状态栏高度----用来给自定义导航条页面的顶部导航条设计padding-top使用:目的留出系统的状态栏区域
+						menuWidth: menuWidth,//右侧的胶囊宽度--用来给自定义导航条页面的左侧胶囊设置使用
+						menuHeight: menuHeight,//右侧的胶囊高度--用来给自定义导航条页面的左侧胶囊设置使用
+						menuBorderRadius: menuBorderRadius,//一半的圆角--用来给自定义导航条页面的左侧胶囊设置使用
+						menuRight: menuRight,//右侧的胶囊距离右侧屏幕距离--用来给自定义导航条页面的左侧胶囊设置使用
+						menuTop: menuTop,//右侧的胶囊顶部距离屏幕顶部的距离--用来给自定义导航条页面的左侧胶囊设置使用
+						contentTop: contentTop,//内容区距离页面最上方的高度--用来给自定义导航条页面的内容区定位距离使用
+					}
+					uni.setStorageSync('menuInfo', menuInfo)
+					//#endif
+				},
+				fail: (error) => {
+					console.log(error)
+				}
+		    })
+		},
+		onHide: function() {
+			console.log('App Hide')
+		},
+		 
+		methods: {
+			// TODO:
+			resetLoginData() {
+				// this.globalData.expiresIn = '';
+				// this.globalData.sessionID = '';
+				// this.globalData.userInfo = {
+				// 	userID: '',
+				// 	userSig: '',
+				// 	token: '',
+				// 	phone: ''
+				// };
+				// this.globalData.userProfile = null;
+				// logger.log(`| app |  resetLoginData | globalData: ${this.globalData}`);
+			},
+			onTIMError() {},
+			onSDKReady({name}) {
+				 console.log("im注册:"+name)
+				  const isSDKReady = name === uni.$TUIKitEvent.SDK_READY ? true : false
+				  console.log("im注册:"+isSDKReady)
+					uni.$emit('isSDKReady', {
+						isSDKReady: true
+					});
+			},
+			onNetStateChange() {},
+			onSDKReload() {},
+			onSdkNotReady() {},
+			onKickedOut() {
+				uni.showToast({
+					title: '您被踢下线',
+					icon: 'error'
+				});
+				
+			}
+		}
+	}
+</script>
+ 
+<style lang="less">
+/*每个页面公共css */
+	// @import 'animate.css';
+	@import './assets/iconfont/iconfont.css';
+	@import './assets/css/common.less';
+	page{
+		background-color: #f6f6f6;
+	}
+	::-webkit-scrollbar{
+	    width: 0 !important;
+	    height: 0 !important;
+	    
+	}
+</style>
+<style>
+	/*每个页面公共css */
+	/* 解决小程序和app滚动条的问题 */
+	/* #ifdef MP-WEIXIN || APP-PLUS */
+		/deep/ ::-webkit-scrollbar {
+		    display: none !important;
+		    width: 0 !important;
+		    height: 0 !important;
+		    -webkit-appearance: none;
+		    background: transparent;
+		    color: transparent;
+		}
+	/* #endif */
+	
+	/* 解决H5 的问题 */
+	/* #ifdef H5 */
+	    uni-scroll-view .uni-scroll-view::-webkit-scrollbar {
+	    	/* 隐藏滚动条,但依旧具备可以滚动的功能 */
+			display: none;
+		    width: 0 !important;
+		    height: 0 !important;
+		    -webkit-appearance: none;
+		    background: transparent;
+		    color: transparent;
+	    }
+	/* #endif */
+</style>
+ 

+ 24 - 0
api/activity.js

@@ -0,0 +1,24 @@
+import Request from '../common/request.js';
+let request = new Request().http
+ 
+ 
+ 
+ export function getStoreActivity(data) {
+ 	 return request('/app/activity/getStoreActivity',data,'GET');
+ }
+ export function getStoreActivityDetails(data) {
+ 	 return request('/app/activity/getStoreActivityDetails',data,'GET');
+ }
+ export function share(activityId) {
+ 	 return request('/app/activity/share?activityId='+activityId,null,'POST');
+ }
+  
+ 
+ 
+
+ 
+ 
+ 
+ 
+ 
+ 

+ 37 - 0
api/address.js

@@ -0,0 +1,37 @@
+import Request from '../common/request.js';
+let request = new Request().http
+
+ export function getCity() {
+ 	 return request('/app/address/getCity',null,'GET');
+ }
+ export function getCitys() {
+ 	 return request('/app/address/getCitys',null,'GET');
+ }
+ export function getAddressList() {
+ 	 return request('/app/address/getAddressList',null,'GET');
+ }
+
+ export function getAddressById(data) {
+ 	 return request('/app/address/getAddressById',data,'GET');
+ } 
+ 
+ export function addAddress(data) {
+ 	return request('/app/address/addAddress',data,'POST','application/json;charset=UTF-8');
+ }
+
+ export function editAddress(data) {
+ 	return request('/app/address/editAddress',data,'POST','application/json;charset=UTF-8');
+ }
+ export function delAddress(data) {
+ 	return request('/app/address/delAddress',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function parseAddress(data) {
+ 	return request('/app/address/parseAddress',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function delAllAddress(data) {
+ 	return request('/app/address/delAllAddress',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ 

+ 6 - 0
api/adv.js

@@ -0,0 +1,6 @@
+import Request from '../common/request.js';
+let request = new Request().http
+ export function getAdv(data) {
+ 	 return request('/app/adv/getAdv',data,'GET');
+ }
+ 

+ 26 - 0
api/article.js

@@ -0,0 +1,26 @@
+import Request from '../common/request.js';
+let request = new Request().http
+
+ 
+ export function getArticleCate() {
+ 	 return request('/app/article/getArticleCate',null,'GET');
+ }
+ export function getArticleList(data) {
+ 	 return request('/app/article/getArticleList',data,'GET');
+ }
+
+ export function getArticleByArticleId(data) {
+ 	 return request('/app/article/getArticleByArticleId',data,'GET');
+ } 
+ 
+ export function updateView(articleId) {
+ 	 return request('/app/article/updateView?articleId='+articleId,null,'POST');
+ } 
+ 
+ export function getArticleViewList(data) {
+ 	 return request('/app/article/getArticleViewList',data,'GET');
+ } 
+ 
+ 
+ 
+  

+ 27 - 0
api/common.js

@@ -0,0 +1,27 @@
+import Request from '../common/request.js';
+let request = new Request().http
+
+
+ export function uploadOSS(data) {
+ 	 return request('/app/common/uploadOSS',data,'POST');
+ }
+ export function getTlsSig(data) {
+ 	 return request('/app/common/getTlsSig',data,'GET');
+ }
+ 
+ export function getStoreConfig() {
+  	 return request('/app/common/getStoreConfig',null,'GET');
+ } 
+ 
+ export function getWeixinTemps() {
+ 	 return request('/app/common/getWeixinTemps',null,'GET');
+ }
+ export function getWeixinOrderTemps() {
+ 	 return request('/app/common/getWeixinOrderTemps',null,'GET');
+ }
+ export function getWeixinPrescribeTemps() {
+ 	 return request('/app/common/getWeixinPrescribeTemps',null,'GET');
+ }
+ 
+ 
+ 

+ 29 - 0
api/companyOrder.js

@@ -0,0 +1,29 @@
+import Request from '../common/request.js';
+let request = new Request().http
+ 
+ export function getSalesProducts(data) {
+ 	 return request('/app/companyOrder/getSalesProducts',data,'GET');
+ }
+ 
+ export function createSalesOrder(data) {
+ 	 return request('/app/companyOrder/createSalesOrder',data,'GET' );
+ }
+ export function updateSalseOrderMoney(data) {
+ 	 return request('/app/companyOrder/updateSalseOrderMoney',data,'GET' );
+ }
+ 
+ 
+ export function getSalesOrder(data) {
+ 	 return request('/app/companyOrder/getSalesOrder',data,'GET' );
+ }
+ export function addUserCart(data) {
+ 	 return request('/app/companyOrder/addUserCart',data,'GET' );
+ }
+ 
+ export function editOrderMoney(data) {
+ 	 return request('/app/companyOrder/editOrderMoney',data,'GET' );
+ }
+ 
+  
+ 
+ 

+ 22 - 0
api/companyUser.js

@@ -0,0 +1,22 @@
+import Request from '../common/request.js';
+let request = new Request().http
+ 
+ export function login(data) {
+ 	 return request('/app/companyUser/login',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function getUserInfo(data) {
+ 	 return request('/app/companyUser/getUserInfo',data,'GET','application/json;charset=UTF-8');
+ }
+ export function getQrImg(data) {
+ 	 return request('/app/companyUser/getQrImg',data,'GET','application/json;charset=UTF-8');
+ }
+ 
+ export function getCompanyUserCard(data) {
+ 	 return request('/app/companyUser/getCompanyUserCard',data,'GET','application/json;charset=UTF-8');
+ }
+ 
+ 
+  
+ 
+ 

+ 32 - 0
api/coupon.js

@@ -0,0 +1,32 @@
+import Request from '../common/request.js';
+let request = new Request().http
+
+ export function getCouponIssueList(data) {
+ 	 return request('/app/coupon/getCouponIssueList',data,'GET');
+ }
+ export function getCompanyCouponIssueList(data) {
+ 	 return request('/app/coupon/getCompanyCouponIssueList',data,'GET');
+ }
+ export function getCouponIssueById(data) {
+ 	 return request('/app/coupon/getCouponIssueById',data,'GET');
+ }
+ 
+ 
+ 
+ export function receive(data) {
+ 	return request('/app/coupon/receive',data,'POST','application/json;charset=UTF-8');
+ }
+ export function companyReceive(data) {
+ 	return request('/app/coupon/companyReceive',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function getMyCouponList(data) {
+ 	 return request('/app/coupon/getMyCouponList',data,'GET');
+ }
+ export function getMyEnableCouponList(data) {
+ 	 return request('/app/coupon/getMyEnableCouponList',data,'GET');
+ }
+ 
+ 
+
+ 

+ 45 - 0
api/doc.js

@@ -0,0 +1,45 @@
+import Request from '../common/request.js';
+let request = new Request().http
+
+ 
+ export function getMyDocList(data) {
+ 	 return request('/app/doc/getMyDocList',data,'GET');
+ }
+ 
+ export function getDocDetails(data) {
+ 	 return request('/app/doc/getDocDetails',data,'GET');
+ }
+ 
+ export function addDoc(data) {
+ 	return request('/app/doc/addDoc',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function editDoc(data) {
+ 	return request('/app/doc/editDoc',data,'POST','application/json;charset=UTF-8');
+ }
+ export function delDoc(data) {
+ 	return request('/app/doc/delDoc',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function getMyDocRecordList(data) {
+ 	 return request('/app/doc/getMyDocRecordList',data,'GET');
+ }
+ 
+ export function getDocRecordReplyList(data) {
+ 	 return request('/app/doc/getDocRecordReplyList',data,'GET');
+ }
+ 
+ 
+ export function addDocRecord(data) {
+ 	return request('/app/doc/addDocRecord',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function getMyDocOrderList() {
+ 	 return request('/app/doc/getMyDocOrderList',null,'GET');
+ }
+ 
+ export function addDocOrder(data) {
+ 	return request('/app/doc/addDocOrder',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ 

+ 47 - 0
api/doctorOrder.js

@@ -0,0 +1,47 @@
+import Request from '../common/request.js';
+let request = new Request().http
+
+ 
+ 
+ 
+ export function getDepartmentList(data) {
+ 	 return request('/app/doctorOrder/getDepartmentList',data,'GET');
+ } 
+ 
+ export function getDoctorList(data) {
+ 	 return request('/app/doctorOrder/getDoctorList',data,'GET');
+ } 
+ 
+ export function getDoctorCase(data) {
+ 	 return request('/app/doctorOrder/getDoctorCase',data,'GET');
+ } 
+ 
+ 
+ export function getMyDoctorOrderList(data) {
+ 	 return request('/app/doctorOrder/getMyDoctorOrderList',data,'GET');
+ } 
+ 
+ export function getDoctorDetail(data) {
+ 	 return request('/app/doctorOrder/getDoctorDetail',data,'GET');
+ } 
+ 
+ export function getDoctorOrderDetail(data) {
+ 	 return request('/app/doctorOrder/getDoctorOrderDetail',data,'GET');
+ } 
+ export function create(data) {
+ 	 return request('/app/doctorOrder/create',data,'POST','application/json;charset=UTF-8');
+ }
+ export function pay(data) {
+ 	 return request('/app/doctorOrder/pay',data,'POST','application/json;charset=UTF-8');
+ }
+ export function cancelOrder(data) {
+ 	 return request('/app/doctorOrder/cancelOrder',data,'POST','application/json;charset=UTF-8');
+ }
+ export function pingOrder(data) {
+ 	 return request('/app/doctorOrder/pingOrder',data,'POST','application/json;charset=UTF-8');
+ }
+ export function getImOrderDetail(data) {
+ 	 return request('/app/doctorOrder/getImOrderDetail',data,'GET');
+ } 
+ 
+ 

+ 39 - 0
api/index.js

@@ -0,0 +1,39 @@
+import Request from '../common/request.js';
+let request = new Request().http
+
+export function getDicts(data) {
+ 	 return request('/app/common/getDicts',data,'GET');
+} 
+
+
+export function getCanvas() {
+ 	 return request('/app/index/getCanvas',null,'GET');
+} 
+
+export function getMenu() {
+ 	 return request('/app/index/getMenu',null,'GET');
+} 
+
+export function getIndexData(data) {
+ 	 return request('/app/index/getIndexData',data,'GET');
+} 
+export function getTuiArticle(data) {
+ 	 return request('/app/index/getTuiArticle',data,'GET');
+} 
+export function getTuiDoctor(data) {
+ 	 return request('/app/index/getTuiDoctor',data,'GET');
+} 
+
+
+
+export function getTuiDoctorOrder(data) {
+ 	 return request('/app/index/getTuiDoctorOrder',data,'GET');
+} 
+
+export function getCartCount() {
+ 	 return request('/app/index/getCartCount',null,'GET');
+} 
+
+
+ 
+ 

+ 22 - 0
api/patient.js

@@ -0,0 +1,22 @@
+import Request from '../common/request.js';
+let request = new Request().http
+
+ 
+ export function getPatientList() {
+ 	 return request('/app/patient/getPatientList',null,'GET');
+ }
+
+ export function getPatientById(data) {
+ 	 return request('/app/patient/getPatientById',data,'GET');
+ } 
+ 
+ export function addPatient(data) {
+ 	return request('/app/patient/addPatient',data,'POST','application/json;charset=UTF-8');
+ }
+
+ export function editPatient(data) {
+ 	return request('/app/patient/editPatient',data,'POST','application/json;charset=UTF-8');
+ }
+ export function delPatient(data) {
+ 	return request('/app/patient/delPatient',data,'POST','application/json;charset=UTF-8');
+ }

+ 11 - 0
api/payment.js

@@ -0,0 +1,11 @@
+import Request from '../common/request.js';
+let request = new Request().http
+
+  
+ export function payment(data) {
+ 	 return request('/app/payment/payment',data,'POST','application/json;charset=UTF-8');
+ }
+  
+ 
+ 
+ 

+ 21 - 0
api/prescribe.js

@@ -0,0 +1,21 @@
+import Request from '../common/request.js';
+let request = new Request().http
+ 
+ export function doPrescribe(data) {
+ 	 return request('/app/prescribe/doPrescribe',data,'POST','application/json;charset=UTF-8');
+ }
+ export function getMyPrescribeList(data) {
+ 	 return request('/app/prescribe/getMyPrescribeList',data,'GET');
+ }
+ 
+ 
+ 
+ 
+ 
+
+ 
+ 
+ 
+ 
+ 
+ 

+ 65 - 0
api/product.js

@@ -0,0 +1,65 @@
+import Request from '../common/request.js';
+let request = new Request().http
+ 
+
+ export function getProductCate(data) {
+ 	 return request('/app/product/getProductCate',data,'GET');
+ }
+ 
+ export function getProductCateByPid(data) {
+ 	 return request('/app/product/getProductCateByPid',data,'GET');
+ }
+ 
+ export function getProducts(data) {
+ 	 return request('/app/product/getProducts',data,'GET');
+ }
+ export function getProductDetails(data) {
+ 	 return request('/app/product/getProductDetails',data,'GET');
+ }
+ export function getCarts(data) {
+ 	 return request('/app/product/getCarts',data,'GET');
+ }
+ export function addCart(data) {
+ 	 return request('/app/product/addCart',data,'POST','application/json;charset=UTF-8');
+ }
+ export function delCart(data) {
+ 	 return request('/app/product/delCart',data,'POST','application/json;charset=UTF-8');
+ }
+ export function cartNum(data) {
+ 	 return request('/app/product/cartNum',data,'POST','application/json;charset=UTF-8');
+ }
+ export function getCartCount(data) {
+ 	 return request('/app/product/getCartCount',data,'GET');
+ }
+ export function getGoodsProduct() {
+ 	 return request('/app/product/getGoodsProduct',null,'GET');
+ }
+ export function getGoodsProducts(data) {
+ 	 return request('/app/product/getGoodsProducts',data,'GET');
+ }
+ export function getTuiProducts(data) {
+ 	 return request('/app/product/getTuiProducts',data,'GET');
+ }
+ export function getStoreProductAttrValueList(data) {
+ 	 return request('/app/product/getStoreProductAttrValueList',data,'GET');
+ }
+ 
+ 
+ 
+ 
+
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+
+ 
+ 
+ 
+ 
+ 
+ 

+ 29 - 0
api/storeAfterSales.js

@@ -0,0 +1,29 @@
+import Request from '../common/request.js';
+let request = new Request().http
+ 
+ export function getMyStoreOrderItemByOrderId(data) {
+ 	 return request('/app/storeAfterSales/getMyStoreOrderItemByOrderId',data,'GET');
+ } 
+ export function applyAfterSales(data) {
+ 	 return request('/app/storeAfterSales/applyAfterSales',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function getAfterSalesList(data) {
+ 	 return request('/app/storeAfterSales/getAfterSalesList',data,'GET');
+ } 
+ 
+ export function getAfterSalesDetails(data) {
+ 	 return request('/app/storeAfterSales/getAfterSalesDetails',data,'GET');
+ } 
+ export function revoke(data) {
+ 	 return request('/app/storeAfterSales/revoke',data,'POST','application/json;charset=UTF-8');
+ }
+ export function addDelivery(data) {
+ 	 return request('/app/storeAfterSales/addDelivery',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ 
+ 
+ 
+ 
+ 

+ 79 - 0
api/storeOrder.js

@@ -0,0 +1,79 @@
+import Request from '../common/request.js';
+let request = new Request().http
+
+ 
+ export function getMyStoreOrderList(data) {
+ 	 return request('/app/storeOrder/getMyStoreOrderList',data,'GET');
+ } 
+ export function getCompanyStoreOrderList(data) {
+ 	 return request('/app/storeOrder/getCompanyStoreOrderList',data,'GET');
+ } 
+ export function getMyStoreOrderById(data) {
+ 	 return request('/app/storeOrder/getMyStoreOrderById',data,'GET');
+ } 
+ 
+ 
+ export function getStoreOrderById(data) {
+ 	 return request('/app/storeOrder/getStoreOrderById',data,'GET');
+ } 
+ 
+ 
+ export function confirm(data) {
+ 	 return request('/app/storeOrder/confirm',data,'POST','application/json;charset=UTF-8');
+ }
+ export function computed(data) {
+ 	 return request('/app/storeOrder/computed',data,'POST','application/json;charset=UTF-8');
+ }
+ export function create(data) {
+ 	 return request('/app/storeOrder/create',data,'POST','application/json;charset=UTF-8');
+ }
+ export function pay(data) {
+ 	 return request('/app/storeOrder/pay',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function editPayType(data) {
+ 	 return request('/app/storeOrder/editPayType',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function payRemain(data) {
+ 	 return request('/app/storeOrder/payRemain',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function otherPayment(data) {
+ 	 return request('/app/storeOrder/otherPayment',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function otherPaymentRemain(data) {
+ 	 return request('/app/storeOrder/otherPaymentRemain',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ 
+ export function cancelOrder(data) {
+ 	 return request('/app/storeOrder/cancelOrder',data,'POST','application/json;charset=UTF-8');
+ }
+ export function finishOrder(data) {
+ 	 return request('/app/storeOrder/finishOrder',data,'POST','application/json;charset=UTF-8');
+ }
+ export function getExpress(data) {
+ 	 return request('/app/storeOrder/getExpress',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ 
+ export function confirmPackageOrder(data) {
+ 	 return request('/app/storeOrder/confirmPackageOrder',data,'POST','application/json;charset=UTF-8');
+ }
+ export function computedPackageOrder(data) {
+ 	 return request('/app/storeOrder/computedPackageOrder',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function createPackageOrder(data) {
+ 	 return request('/app/storeOrder/createPackageOrder',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function getOrderCount() {
+ 	 return request('/app/storeOrder/getOrderCount',null,'GET');
+ } 
+ 
+ 
+ 
+ 

+ 15 - 0
api/storeProductPackage.js

@@ -0,0 +1,15 @@
+import Request from '../common/request.js';
+let request = new Request().http
+
+ export function getStoreProductPackage(data) {
+ 	 return request('/app/storeProductPackage/getStoreProductPackage',data,'GET');
+ } 
+ 
+ export function getStoreProductPackageDetails(data) {
+ 	 return request('/app/storeProductPackage/getStoreProductPackageDetails',data,'GET');
+ } 
+ 
+  
+ 
+ 
+ 

+ 76 - 0
api/user.js

@@ -0,0 +1,76 @@
+import Request from '../common/request.js';
+let request = new Request().http
+ 
+ export function loginByMiniApp(data) {
+ 	 return request('/app/wx/loginByMiniApp',data,'POST','application/json;charset=UTF-8');
+ }
+ export function loginByMp(data) {
+ 	 return request('/app/wx/loginByMp',data,'POST','application/json;charset=UTF-8');
+ }
+ export function getUserInfo() {
+ 	 return request('/app/user/getUserInfo',null,'GET');
+ }
+ 
+ export function editUser(data) {
+ 	return request('/app/user/editUser',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function getWeixinInfo(data) {
+ 	return request('/app/wx/getWeixinInfo',data,'POST','application/json;charset=UTF-8');
+ }
+ export function checkLogin() {
+ 	 return request('/app/user/checkLogin',null,'GET');
+ }
+ export function getTuiImg() {
+ 	 return request('/app/user/getTuiImg',null,'GET');
+ }
+ export function getMyTuiOrderList(data) {
+ 	 return request('/app/user/getMyTuiOrderList',data,'GET');
+ }
+ export function getTuiMoney() {
+ 	 return request('/app/user/getTuiMoney',null,'GET');
+ }
+ export function getMyTuiList(data) {
+ 	 return request('/app/user/getMyTuiList',data,'GET');
+ }
+ export function getTuiMoneyLogs(data) {
+ 	 return request('/app/user/getTuiMoneyLogs',data,'GET');
+ }
+ 
+ export function getProductFoots(data) {
+ 	 return request('/app/user/getProductFoots',data,'GET');
+ }
+ export function delProductFoots(data) {
+ 	 return request('/app/user/delProductFoots',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function doExtract(data) {
+ 	 return request('/app/user/doExtract',data,'POST','application/json;charset=UTF-8');
+ }
+ export function getExtractList(data) {
+ 	 return request('/app/user/getExtractList',data,'GET');
+ }
+ export function applyPromoter(data) {
+ 	 return request('/app/user/applyPromoter',data,'POST','application/json;charset=UTF-8');
+ }
+ export function bindPromoter(data) {
+ 	 return request('/app/user/bindPromoter',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function getUserShareList(data) {
+ 	 return request('/app/user/getUserShareList',data,'GET');
+ }
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 

+ 16 - 0
api/userSign.js

@@ -0,0 +1,16 @@
+import Request from '../common/request.js';
+let request = new Request().http
+ 
+ 
+ export function getUserSign() {
+ 	 return request('/app/sign/getUserSign',null,'GET');
+ }
+ 
+ export function getIntegral(data) {
+ 	 return request('/app/sign/getIntegral',data,'GET');
+ }
+ export function doSign(data) {
+ 	 return request('/app/sign/sign',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ 

+ 262 - 0
assets/css/common.less

@@ -0,0 +1,262 @@
+ 
+page {
+  background: #f5f5f5;
+  height: 100%;
+}
+.container{
+  height: 100%;
+}
+rich-text {
+  width: 100%;
+  display: block;
+  img,
+  image {
+    display: block;
+    width: 100%;
+  }
+}
+
+/*单行文本溢出省略号*/
+.one-t {
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  transition: all linear 0.2s;
+}
+
+/*多行文本溢出省略号*/
+.more-t {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-line-clamp: 2;
+  -webkit-box-orient: vertical;
+  transition: all linear 0.2s;
+}
+
+/* ==================
+          flex布局(colorui里面也有相关基础样式)
+ ==================== */
+/* x水平排列*/
+.x-f {
+  display: flex;
+  align-items: center;
+}
+
+/*x两端且水平居中*/
+.x-bc {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+/*x平分且水平居中*/
+.x-ac {
+  display: flex;
+  justify-content: space-around;
+  align-items: center;
+}
+
+/*x水平靠上对齐*/
+.x-start {
+  display: flex;
+  align-items: flex-start;
+}
+
+/*x水平靠下对齐*/
+.x-end {
+  display: flex;
+  align-items: flex-end;
+}
+
+/*上下左右居中*/
+.x-c {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+
+/*y竖直靠左*/
+.y-start {
+  display: flex;
+  flex-direction: column;
+  align-items: flex-start;
+}
+
+/*y竖直靠右*/
+.y-end {
+  display: flex;
+  flex-direction: column;
+  align-items: flex-end;
+}
+
+/*y竖直居中*/
+.y-f {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+
+// y竖直两端
+.y-b {
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+}
+
+/*y竖直两端居中*/
+.y-bc {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: space-between;
+}
+/* layout */
+.acea-row {
+  display: flex;
+  flex-wrap: wrap;
+  /* 辅助类 */
+}
+.acea-row.row-middle {
+  align-items: center;
+}
+.acea-row.row-top {
+  align-items: flex-start;
+}
+.acea-row.row-bottom {
+  align-items: flex-end;
+}
+.acea-row.row-center {
+  justify-content: center;
+}
+.acea-row.row-right {
+  justify-content: flex-end;
+}
+.acea-row.row-left {
+  justify-content: flex-start;
+}
+.acea-row.row-between {
+  justify-content: space-between;
+}
+.acea-row.row-around {
+  justify-content: space-around;
+}
+.acea-row.row-column-around {
+  flex-direction: column;
+  justify-content: space-around;
+}
+.acea-row.row-column {
+  flex-direction: column;
+}
+.acea-row.row-column-between {
+  flex-direction: column;
+  justify-content: space-between;
+}
+/* 上下左右垂直居中 */
+.acea-row.row-center-wrapper {
+  align-items: center;
+  justify-content: center;
+}
+/* 上下两边居中对齐 */
+.acea-row.row-between-wrapper {
+  align-items: center;
+  justify-content: space-between;
+}
+
+/*每个页面公共css */
+.ellipsis{
+	overflow: hidden;
+	text-overflow: ellipsis;
+	white-space: nowrap;
+}
+.ellipsis2{
+	overflow:hidden; 
+	text-overflow:ellipsis;
+	display:-webkit-box; 
+	-webkit-box-orient:vertical;
+	-webkit-line-clamp:2; 
+}
+radio .wx-radio-input{
+  width: 36rpx;
+  height: 36rpx;
+  border: 1px solid #CCCCCC;
+}
+/* 选中后的 背景样式  */
+radio .wx-radio-input.wx-radio-input-checked{
+	background: linear-gradient(135deg, #2BC7B9 0%, #60CDC3 100%);
+	border: 1px solid #2BC7B9;
+}
+/* 选中后的 对勾样式 (白色对勾) */
+radio .wx-radio-input.wx-radio-input-checked::before{
+	color: #ffffff;
+}
+checkbox .wx-checkbox-input{
+	width: 36rpx;
+	height: 36rpx;
+	border: 1px solid #CCCCCC;
+	border-radius: 50%;
+}
+checkbox .wx-checkbox-input.wx-checkbox-input-checked {
+	background: linear-gradient(135deg, #2BC7B9 0%, #60CDC3 100%);
+	border: 1px solid #2BC7B9;
+	border-radius: 50%;
+}
+checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
+	color: #ffffff;
+}
+::-webkit-scrollbar {
+   width: 0;
+   height: 0;
+   color: transparent;
+ }
+ /* 暂无数据 */
+.no-data-box{
+	padding: 100upx 50upx;
+	text-align: center;
+	image{
+		width: 372rpx;
+		height: 240rpx;
+	}
+	.empty-title{
+		margin-top: 20rpx;
+		font-size: 32rpx;
+		color: #bbbbbb;
+		 
+	}
+}
+.Loads {
+  height: 0.8*100rpx;
+  font-size: 0.25*100rpx;
+  color: #000;
+}
+.Loads .iconfont {
+  font-size: 0.3*100rpx;
+  margin-right: 0.1*100rpx;
+  height: 0.32*100rpx;
+  line-height: 0.32*100rpx;
+}
+/*加载动画*/
+@keyframes load {
+  from {
+    transform: rotate(0deg);
+  }
+  to {
+    transform: rotate(360deg);
+  }
+}
+.loadingpic {
+  animation: load 3s linear 1s infinite;
+}
+.loading {
+  animation: load linear 1s infinite;
+}
+
+ .back-box{
+	position: relative;
+	.title{
+		position: absolute;
+		left: 50%;
+		top: 50%;
+		transform: translate(-50%,-50%);
+	}
+}

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 2 - 0
assets/iconfont/iconfont.css


BIN
assets/iconfont/iconfont.ttf


+ 78 - 0
common/request.js

@@ -0,0 +1,78 @@
+// uni-app请求封装
+export default class Request {
+	http(router, data = {}, method,contentType) {
+		let that = this;
+		// let path = 'http://localhost:7014';
+		let path = 'https://api.yjf.runtzh.com'; 
+		uni.setStorageSync('requestPath',path)
+		// uni.showLoading({
+		// 	title: '加载中'
+		// });
+		return new Promise((resolve, reject) => {
+			let token = uni.getStorageSync('AppToken');
+			var httpContentType='application/x-www-form-urlencoded';
+			if(contentType!=undefined){
+				//application/json;charset=UTF-8
+				httpContentType=contentType;
+			}
+			var routers=router;
+			// 请求
+			uni.request({
+				header: {
+					// 'Content-Type': 'application/x-www-form-urlencoded',
+					'Content-Type': httpContentType,
+					'AppToken': token
+				},
+				url: `${path}${router}`,
+				data: data,
+				method: method,
+				success: (res) => {
+					//收到开发者服务器成功返回的回调函数
+					if(res.data.code==401){//没有权限直接退出到登录界面
+						let pages = getCurrentPages();
+						pages.forEach(function(element) {
+						  if(element!=undefined&&element.route=="pages/auth/login"){
+						  	resolve(res.data)
+						  	return;
+						  }
+						});
+						// let url = pages[ pages.length - 1]; //当前页页面实例
+						// //如果登录界面已打开,自动关闭
+						// if(url!=undefined&&url.route=="pages/auth/login"){
+						//  	resolve(res.data)
+						// 	return;
+						// }
+						uni.navigateTo({
+							url:'/pages/auth/login',
+							success: () => {
+								uni.hideLoading();
+								
+							},
+							fail: () => {
+								uni.hideLoading();
+							}
+						})
+						return;
+					}
+					if (res.data.token) {
+						uni.setStorageSync('AppToken',res.data.token)
+					}
+					resolve(res.data)
+				},
+				fail:(res) =>{
+					//接口调用失败的回调函数
+				},
+				complete:(res) =>{
+					//接口调用结束的回调函数(调用成功、失败都会执行)
+					if (res.data.code == 401) {
+						return false
+					}
+					uni.hideLoading();
+				}
+				
+			})
+		})
+		 
+	}
+	
+}

+ 21 - 0
components/Loading.vue

@@ -0,0 +1,21 @@
+<template>
+  <view class="Loads acea-row row-center-wrapper" v-if="loading || !loaded" style="margin-top: 20rpx;">
+    <template v-if="loading">
+      <view class="iconfont icon-jiazai loading acea-row row-center-wrapper"></view>
+      正在加载中
+    </template>
+    <template v-if="!loading">
+      上拉加载更多
+    </template>
+  </view>
+</template>
+
+<script>
+  export default {
+    name: "Loading",
+    props: {
+      loaded: Boolean,
+      loading: Boolean
+    }
+  };
+</script>

+ 147 - 0
components/Menu.vue

@@ -0,0 +1,147 @@
+<template>
+	<view class="menu-list-box" v-if="carousel" :style="list.length <= menu ? `height:160rpx` : `height:320rpx`">
+		<swiper
+			class="menu-swiper-box"
+			:style="list.length <= menu ? `height:160rpx` : `height:320rpx`"
+			@change="onSwiper"
+			circular
+			:autoplay="false"
+			:interval="3000"
+			:duration="1000"
+		>
+			<swiper-item class="menu-swiper-item" v-for="(itemList, index) in carousel" :key="index" :style="list.length <= menu ? `height:200rpx` : `height:340rpx`">
+				<view class="menu-tab-box">
+					<view class="tab-list"  v-for="item in itemList" :key="item.menuName" @tap="routerTo(item)">
+						<image class="tab-img Shop-selector-circular" :style="{ width: imgW + 'rpx', height: imgW + 'rpx' }" :src="item.icon"></image>
+						<text class="Shop-selector-rect">{{ item.menuName }}</text>
+					</view>
+				</view>
+			</swiper-item>
+		</swiper>
+		<view class="menu-dots" v-if="carousel.length > 1">
+			<text :class="menuCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in carousel.length" :key="index"></text>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	components: {},
+	data() {
+		return {
+			menuCurrent: 0 //轮播下标
+		};
+	},
+	props: {
+		list: {
+			type: Array,
+			default: []
+		},
+		menu: {
+			default: 4
+		},
+		imgW: {
+			type: Number,
+			default: 88
+		}
+	},
+	computed: {
+		carousel() {
+			if (this.list) {
+				let data = this.sortData(this.list, this.menu * 2);
+				return data;
+			}
+		}
+	},
+	created() {},
+	methods: {
+		// 数据分层
+		sortData(oArr, length) {
+			let arr = [];
+			let minArr = [];
+			oArr.forEach(c => {
+				if (minArr.length === length) {
+					minArr = [];
+				}
+				if (minArr.length === 0) {
+					arr.push(minArr);
+				}
+				minArr.push(c);
+			});
+		 
+			return arr;
+		},
+		// 轮播
+		onSwiper(e) {
+			this.menuCurrent = e.detail.current;
+		},
+		routerTo(item) {
+			 this.$emit('menuClick',item);
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.menu-list-box {
+	padding: 0rpx;
+	background: #fff;
+	box-sizing: border-box;
+	
+}
+.menu-list-box,
+.menu-swiper-box {
+	position: relative;
+	background: #fff;
+	.menu-swiper-item {
+		background: #fff;
+		height: 100%;
+		width: 100%;
+	}
+	.menu-tab-box {
+		display: flex;
+		flex-wrap: wrap;
+		.tab-list {
+			width: 25%;
+			display: -webkit-box;
+			display: -webkit-flex;
+			display: flex;
+			-webkit-box-orient: vertical;
+			-webkit-box-direction: normal;
+			-webkit-flex-direction: column;
+			flex-direction: column;
+			-webkit-box-align: center;
+			-webkit-align-items: center;
+			align-items: center;
+			font-size: 22rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: rgba(51, 51, 51, 1);
+			padding-bottom: 30rpx;
+			.tab-img {
+				border-radius: 25rpx;
+				margin-bottom: 10rpx;
+			}
+		}
+	}
+	.menu-dots {
+		display: flex;
+		position: absolute;
+		left: 50%;
+		transform: translateX(-50%);
+		.dot {
+			width: 40rpx;
+			height: 3rpx;
+			background: #eeeeee;
+			margin-right: 10rpx;
+		}
+
+		.dot-active {
+			width: 40rpx;
+			height: 3rpx;
+			background: #2BC7B9;
+			margin-right: 10rpx;
+		}
+	}
+}
+</style>

+ 166 - 0
components/chengpeng-audio/free-audio.vue

@@ -0,0 +1,166 @@
+<template>
+	<!-- 音频播放器组件 -->
+	<view v-if='url' class='flex justify-between align-center audio' >
+		<view class='mr-3'  @click='start(audioId)'>
+			<image :src='startPic' class='icon' v-show='!status'></image>
+			<image :src='endPic' class='icon' v-show='status'></image>
+		</view>
+		<view class='flex-1'>
+			<slider 
+				@change='changeAudio' 
+				:activeColor='activeColor' 
+				:min='0' 
+				:max='duration.toFixed(0)' 
+				:value='currentTime.toFixed(0)' 
+				:step='0.1'
+				backgroundColor="#E9F0F0"
+				:block-size='14'
+				block-color='#2BC7B9'>
+			</slider>
+		</view>
+		<view class='ml-3'>{{getTime(Math.round(currentTime))}}</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				context: null,
+				currentTime: 0,
+				duration: 100,
+				status: false
+			}
+		},
+		props: {
+			url: String,
+			activeColor: {
+				type: String,
+				default: '#0E7EFC'
+			},
+			startPic: String,
+			endPic: String,
+			audioId: [String,Number]
+		},
+		created() {
+			this.context = uni.createInnerAudioContext();
+			this.context.src = this.url;
+			this.onTimeUpdate();
+			this.onCanplay();
+			this.onEnded();
+			uni.$on('stop',(id)=> {
+				if(id && id != this.audioId) {
+					this.context.stop();
+					this.status = false;
+				} else if(!id){
+					this.context.stop();
+					this.status = false;
+				}
+			})
+		},
+		methods: {
+			start(id) { //点击播放
+				let audioId = id;
+				if(this.status) {
+					this.context.pause();
+					this.status = !this.status;
+				}else {
+					uni.$emit('stop',id)
+					this.context.play()
+					this.status = !this.status;
+				}
+			},
+			onCanplay() { //进入可播放状态
+				this.context.onCanplay(() => {
+					this.context.duration;
+					setTimeout(()=>{
+						this.duration = this.context.duration;
+					},1000)
+				})
+			},
+			onTimeUpdate() { //音频播放进度
+				 this.context.onTimeUpdate(() => {
+					 if (!Number.isFinite( this.context.duration)) {
+						this.context.currentTime = Number.MAX_SAFE_INTEGER;
+						this.context.currentTime = 0;
+					 } else {
+						 this.duration = this.context.duration;
+						 this.currentTime = this.context.currentTime;
+					 }
+				 })
+			},
+			onEnded() { //播放结束
+				this.context.onEnded(()=> {
+					this.status = false;
+					this.currentTime = 0;
+				})
+			},
+			changeAudio(e) {
+				let paused = this.context.paused;
+				this.context.pause();
+				this.context.seek(e.detail.value)
+				if(!paused) {
+					this.context.play();
+				} 
+			},
+			getTime(time) {
+				let m = parseInt(time / 60);
+				let s = time % 60;
+				return this.towNum(m) + ':' + this.towNum(s);
+			},
+			towNum(num) {
+				if(num >= 10) {
+					return num;
+				}else {
+					return '0' + num;
+				}
+			}
+		}
+	}
+</script>
+
+<style>
+	.audio {
+		background: #F5F7F7;
+		padding: 30upx 20upx;
+	}
+	
+	.icon {
+		width: 54upx;
+		height: 54upx;
+	}
+	slider{
+		margin: 0;
+	}
+	.flex {
+		display: flex;
+		flex-direction: row;
+	}
+	
+	.justify-between {
+		justify-content: between;
+	}
+	
+	.align-center {
+		align-items: center;
+	}
+	
+	.flex-1 {
+		flex: 1;
+	}
+	
+	.ml-3 {
+		margin-left: 20upx;
+		font-size: 24upx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #666666;
+	}
+	
+	.mr-3 {
+		margin-right: 30upx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+</style>

+ 42 - 0
components/chengpeng-audio/redme.md

@@ -0,0 +1,42 @@
+## 参数
+
+| url      | activeColor | startPic       | endPic         | 组件id                                                |
+| -------- | ----------- | -------------- | -------------- | ----------------------------------------------------- |
+| 音频链接 | 进度条颜色  | 开始播放的图片 | 暂停播放的图片 | audioId(必填,且id不可为数字0,建议格式 ‘audio’+数字) |
+
+## 使用方法
+
+```javascript
+//html
+<template>
+  <free-audio startPic='/static/images/icon/play.png' endPic='/static/images/icon/stop.png' :audioId='audio1' :url='path'></free-audio>
+</template>
+
+//js
+
+import freeAudio from '@/components/free-audio.vue'
+export default {
+    components: {freeAudio},
+    data() {
+        return{
+            path: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-hello-uniapp/2cc220e0-c27a-11ea-9dfb-6da8e309e0d8.mp3'
+        }
+    },
+    methods: {
+
+    },
+} 
+
+//暂停所有音频(一般用于页面切换时停止正在播放的音频)
+onUnload() { //普通页面在 onUnload 生命周期中执行
+  uni.$emit('stop')
+},
+onHide() { //tabBar页面在onHide生命周期中执行
+  uni.$emit('stop')
+}
+
+
+
+
+```
+

BIN
components/chengpeng-audio/static/play.png


BIN
components/chengpeng-audio/static/stop.png


+ 143 - 0
components/evan-switch/evan-switch.vue

@@ -0,0 +1,143 @@
+<template>
+	<!-- <view @click="toggle" class="evan-switch" :class="{'evan-switch--disabled':disabled}" :style="{width:2*size+'px',height:switchHeight,borderRadius:size+'px',backgroundColor:currentValue===activeValue?activeColor:inactiveColor}">
+		<view class="evan-switch__circle" :style="{width:size+'px',height:size+'px',transform:currentValue===activeValue?`translateX(${size}px)`:`translateX(0)`}"></view>
+	</view> -->
+	<view @click="toggle" class="evan-switch" :class="{'evan-switch--disabled':disabled}" :style="{backgroundColor:currentValue===activeValue?activeColor:inactiveColor}">
+		<view class="evan-switch__circle" :style="{transform:currentValue===activeValue?`translateX(${29}px)`:`translateX(0)`}"></view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: 'EvanSwitch',
+		props: {
+			value: {
+				type: [String, Number, Boolean],
+				default: false
+			},
+			activeColor: {
+				type: String,
+				default: '#108ee9'
+			},
+			inactiveColor: {
+				type: String,
+				default: '#fff'
+			},
+			size: {
+				type: Number,
+				default: 30
+			},
+			disabled: {
+				type: Boolean,
+				default: false
+			},
+			activeValue: {
+				type: [String, Number, Boolean],
+				default: true
+			},
+			inactiveValue: {
+				type: [String, Number, Boolean],
+				default: false
+			},
+			beforeChange: {
+				type: Function,
+				default: null
+			},
+			extraData: null,
+			contextLevel: {
+				type: Number,
+				default: 1
+			}
+		},
+		computed: {
+			switchHeight() {
+				// #ifdef APP-NVUE
+				return this.size + 2 + 'px'
+				// #endif
+				// #ifndef APP-NVUE
+				return this.size + 'px'
+				// #endif
+			}
+		},
+		watch: {
+			value: {
+				immediate: true,
+				handler(value) {
+					this.currentValue = value
+				}
+			}
+		},
+		data() {
+			return {
+				currentValue: false
+			}
+		},
+		methods: {
+			toggle() {
+				if (!this.disabled) {
+					if (this.beforeChange && typeof this.beforeChange === 'function') {
+						let context = this
+						for (let i = 0; i < this.contextLevel; i++) {
+							context = context.$options.parent
+						}
+						const result = this.beforeChange(this.currentValue === this.activeValue ? this.inactiveValue : this.activeValue,
+							this.extraData, context)
+						if (typeof result === 'object') {
+							result.then(() => {
+								this.toggleValue()
+							}).catch(() => {})
+						} else if (typeof result === 'boolean' && result) {
+							this.toggleValue()
+						}
+					} else {
+						this.toggleValue()
+					}
+				}
+			},
+			toggleValue() {
+				this.currentValue = this.currentValue === this.activeValue ? this.inactiveValue : this.activeValue
+				this.$emit('input', this.currentValue)
+				this.$emit('change', this.currentValue)
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.evan-switch {
+		position: relative;
+		border-width: 1px;
+		border-color: rgba(0, 0, 0, 0.1);
+		border-style: solid;
+		transition: background-color 0.3s;
+		width: 100upx;
+		height: 36upx;
+		background: #2BC7B9;
+		border-radius: 18upx;
+		/* #ifndef APP-NVUE */
+		box-sizing: content-box;
+		/* #endif */
+	}
+
+	.evan-switch--disabled {
+		opacity: 0.3;
+	}
+
+	.evan-switch__circle {
+		position: absolute;
+		left: -4upx;
+		top: -8upx;
+		width: 50upx;
+		height: 50upx;
+		background: #FFFFFF;
+		box-shadow: 0px 2px 10px 0px rgba(166, 217, 212, 0.49);
+		border-radius: 50%;
+		/* #ifndef APP-NVUE */
+		box-shadow: 0 3px 1px 0 rgba(0, 0, 0, 0.05), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 3px 3px 0 rgba(0, 0, 0, 0.05);
+		/* #endif */
+		/* #ifdef APP-NVUE */
+		box-shadow: 1px 0 0px 0 rgba(0, 0, 0, 0.05);
+		/* #endif */
+		transition: transform 0.3s;
+	}
+</style>

+ 181 - 0
components/likeProduct.vue

@@ -0,0 +1,181 @@
+<template>
+   <view>
+		<view class="like-title">
+			<image src="/static/images/like.png" mode=""></image>
+			<text class="text">猜你喜欢</text>
+		</view>
+		<view class="like-list">
+			<view class="item" v-for="(item,index) in list" :key="index" @click="showProduct(item)">
+				<view class="img-box">
+					<image :src="item.image" mode=""></image>
+				</view>
+				<view class="info-box">
+					<view class="title ellipsis2">{{ item.productName }}</view>
+					<view class="price-box">
+						<view class="now">
+							<text class="unit">¥</text>
+							<text class="num">{{item.price.toFixed(2)}}</text>
+						</view>
+						<view class="old">¥{{item.otPrice.toFixed(2)}}</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<Loading :loaded="loaded" :loading="loading"></Loading>
+   </view>
+</template>
+
+<script>
+  import {getGoodsProducts} from '@/api/product'
+  import Loading from "@/components/Loading";
+  export default {
+	components: {Loading },
+    name: "likeProduct",
+	data() {
+		return {
+			page:{
+				page: 1,
+				pageSize: 10
+			},
+			total:0,
+			list:[],
+			loaded: false,
+			loading: false
+		};
+	},
+	created() {
+	},
+	mounted() {
+		this.getGoodsProducts();
+	},
+	
+	methods: {
+		getGoodsProducts(){
+			console.log(1)
+			var that=this;
+			if (that.loaded == true || that.loading == true) return;
+			that.loading = true;
+			uni.showLoading({
+				title:"加载中..."
+			})
+			getGoodsProducts(that.page).then(
+				res => {
+					if(res.code==200){
+						that.total=res.data.total;
+						that.list.push.apply(that.list, res.data.list);
+						that.loading = false;
+						that.loaded = that.list.length<that.total?false:true;
+						that.page.page = that.page.page + 1;
+						uni.hideLoading()
+					}
+				},
+				err => {
+					uni.hideLoading()
+					uni.showToast({
+						title: err.msg ,
+						icon: 'none',
+						duration: 2000
+					});
+				}
+			);
+		},
+		showProduct(item){
+			uni.navigateTo({
+				url: '/pages/shopping/productDetails?productId='+item.productId
+			})
+		},
+	}
+ 
+  };
+</script>
+<style lang="scss">
+	.like-title{
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		padding: 30upx 0;
+		image{
+			width: 37upx;
+			height: 37upx;
+			margin-right: 20upx;
+		}
+		.text{
+			font-size: 36upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #111111;
+			line-height: 1;
+		}
+	}
+	.like-list{
+		display: flex;
+		flex-wrap: wrap;
+		.item{
+			margin-right: 20rpx;
+			margin-bottom: 20rpx;
+			width: 345rpx;
+			background: #FFFFFF;
+			box-shadow: 0px 0px 10rpx 4rpx rgba(199, 199, 199, 0.22);
+			border-radius: 20rpx;
+			overflow: hidden;
+			&:nth-child(2n) {
+				margin-right: 0;
+			}
+			.img-box{
+				width: 100%;
+				height: 334upx;
+				image{
+					width: 100%;
+					height: 100%;
+				}
+			}
+			.info-box{
+				box-sizing: border-box;
+				height: 182upx;
+				padding: 20upx 20upx 30upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				.title{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					line-height: 40upx;
+				}
+				.price-box{
+					display: flex;
+					align-items: flex-end;
+					.now{
+						display: flex;
+						align-items: flex-end;
+						margin-right: 20upx;
+						.unit{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #FF6633;
+							line-height: 1.2;
+							margin-right: 4upx;
+						}
+						.num{
+							font-size: 36upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FF6633;
+							line-height: 1;
+						}
+					}
+					.old{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						text-decoration: line-through;
+						color: #BBBBBB;
+						line-height: 1.1;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 315 - 0
components/px-popup-bottom/px-popup-bottom.vue

@@ -0,0 +1,315 @@
+<template>
+	<view :class="['popup',{'popup-show':show}]" @mousewheel.prevent.stop @touchmove.stop.prevent
+		:style="{'z-index':zindex}">
+		<view class="mask" :style="{'z-index':maskZindex,bottom:bottom+'rpx'}" v-show="show" @click.stop="onClose"
+			@touchmove.prevent.stop></view>
+		<view :class="['content',{show}]" @click.stop @touchmove.prevent.stop :style="{'background-color':bgColor,height:`${height}px`,maxHeight:show ? cotMaxHeight:0,'border-top-right-radius':cotRadius,
+			'border-top-left-radius':cotRadius,transition: `all ${animaTime}s ease-in`,bottom:bottom+'rpx','z-index':zindex}">
+			<view id="title-bar" class="title-bar" v-show="title">
+				<view class="title" :style="{fontWeight:fontweight}">{{title}}</view>
+				<view class="close-wrap" @click.stop="onClose">
+					<image class="close-icon" :src="closeIcon" mode="widthFix"></image>
+				</view>
+			</view>
+			<view class="scroll-wrap">
+				<scroll-view :class="{'scroll-view':isAnimaStart}" scroll-y="true" style="height:100%;"
+					@scrolltolower="onScrollToLower">
+					<view id="popup_content" class="popup_content">
+						<slot></slot>
+					</view>
+				</scroll-view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import iconClose from '@/static/images/close40.png'
+	export default {
+		props: {
+			title: { //标题
+				type: String,
+				default: ''
+			},
+			fontweight: {
+				type: [String, Number],
+				default: 'normal'
+			},
+			visible: { //隐藏显示标识
+				type: Boolean,
+				default: false
+			},
+			maxHeight: { //内容区域最大高度
+				type: [String, Number],
+				default: '75%'
+			},
+			radius: { //顶部圆角
+				type: [String, Number],
+				default: '0'
+			},
+			animaTime: { //弹窗动画时间
+				type: Number,
+				default: 0.2
+			},
+			bottom: { //离底部距离
+				type: [String, Number],
+				default: 0
+			},
+			bgColor: {
+				type: [String],
+				default: '#ffffff'
+			},
+			zindex: {
+				type: [String, Number],
+				default: 1000
+			},
+			maskZindex: {
+				type: [String, Number],
+				default: 999
+			},
+			always: { //是否每次打开都重新计算内容高度
+				type: Boolean,
+				default: false
+			},
+
+		},
+		data() {
+			return {
+				show: false,
+				height: 0,
+				PopHeight: 0,
+				cotMaxHeight: '',
+				isAnimaStart: false,
+				rpxRate: "",
+				cotRadius: 0,
+				closeIcon: iconClose
+			}
+		},
+		watch: {
+			visible(newval) {
+				this.isAnimaStart = true;
+				setTimeout(() => {
+					this.isAnimaStart = false;
+				}, this.animaTime * 1000)
+
+				if (newval && this.height === 0) {
+					if (this.PopHeight === 0 || this.always) {
+						this.setContViewHeight();
+
+					} else {
+						this.height = this.PopHeight
+					}
+
+					// #ifdef H5 
+					this.setBodyOverFlow('hidden') //阻止滚动穿透
+					//#endif
+					this.$emit('open')
+
+				} else {
+					this.height = 0;
+					// #ifdef H5 
+					this.setBodyOverFlow('visible')
+					//#endif
+
+				}
+
+				this.show = newval
+
+			},
+			maxHeight: {
+				handler(newval) {
+					this.cotMaxHeight = this.unitCheck(newval);
+
+				},
+				immediate: true
+			},
+			radius: {
+				handler(newval) {
+					this.cotRadius = this.unitCheck(newval);
+
+				},
+				immediate: true
+			}
+		},
+		created() {
+			this.rpxRate = this.getRpxRate()
+		},
+		mounted() {
+			this.$nextTick(() => {
+				// #ifdef H5
+				this.preventTouch(document.querySelector(
+					'.scroll-wrap .uni-scroll-view .uni-scroll-view')); //防止浏览器报错
+				//#endif
+			})
+		},
+		methods: {
+			onClose() {
+				this.$emit("update:visible", false);
+				this.$emit('close')
+			},
+			//触底
+			onScrollToLower(e) {
+				this.$emit("reachBottom");
+			},
+			getRpxRate() {
+				let res = uni.getSystemInfoSync();
+				let width = res.windowWidth;
+				let rate = 750.00 / width;
+				return rate
+			},
+			unitCheck(value) {
+				const val = String(value);
+				if (!val.includes('px') && !val.includes('%')) {
+					return `${val}rpx`;
+				}
+				return val;
+
+			},
+			preventTouch(el) {
+				el.addEventListener('touchmove', function(e) {
+					e.stopPropagation();
+
+				}, {
+					passive: false
+				});
+			},
+			setBodyOverFlow(val) {
+				document.body.style.overflow = val
+			},
+
+			//设置内容区域高度
+			async setContViewHeight() {
+				let data = await this.computeHeight();
+				this.height = data.height + (this.title ? 100 / parseFloat(this.rpxRate) : 0);
+				this.PopHeight = this.height;
+			},
+			//计算内容区域高度
+			computeHeight() {
+				return new Promise(resolve => {
+					this.$nextTick(() => {
+						const query = uni.createSelectorQuery().in(this);
+						query.select('#popup_content').boundingClientRect(data => {
+							resolve(data)
+						}).exec();
+					})
+				})
+			}
+
+		}
+
+
+	}
+</script>
+
+<style lang="scss" scoped>
+	.popup {
+
+		&.popup-show {
+			position: fixed;
+			top: 0;
+			right: 0;
+			left: 0;
+			bottom: 0;
+			overflow: hidden;
+			z-index: 999;
+		}
+
+		.mask {
+			position: fixed;
+			top: 0;
+			right: 0;
+			bottom: 0;
+			left: 0;
+			background-color: rgba($color: #000000, $alpha: 0.5);
+			z-index: 999;
+		}
+
+		.content {
+			position: fixed;
+			bottom: 0;
+			left: 0;
+			right: 0;
+			height: 0;
+			height: auto;
+			background-color: #ffffff;
+			transition: all 0.2s ease-in;
+			z-index: 1000;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			overflow: hidden;
+
+			.title-bar {
+				width: 100%;
+				flex-shrink: 0;
+				text-align: center;
+				position: relative;
+				padding: 10rpx 70rpx 0;
+				box-sizing: border-box;
+				height: 80rpx;
+
+				.title {
+					font-size: 34upx;
+					font-family: PingFang SC;
+					font-weight: bold !important;
+					color: #111111;
+					width: 100%;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					white-space: nowrap;
+				}
+
+				.close-wrap {
+					position: absolute;
+					top: 20rpx;
+					right: 10rpx;
+					padding: 10rpx 20rpx;
+					box-sizing: border-box;
+				}
+
+				.close-icon {
+					width: 40rpx;
+					height: 40rpx;
+				}
+			}
+
+			.scroll-wrap {
+				flex: 1;
+				height: 0;
+				width: 100%;
+			}
+
+			&.visible {
+				max-height: 75%;
+				overflow-y: hidden;
+				height: auto;
+
+			}
+		}
+	}
+
+	.scroll-view ::-webkit-scrollbar {
+		display: none !important;
+		width: 0 !important;
+		height: 0 !important;
+		-webkit-appearance: none;
+		background: transparent;
+
+	}
+
+	.popup_content {
+		width: 100%;
+		padding: 0rpx 30rpx;
+		box-sizing: border-box;
+
+		&::after {
+			display: block;
+			width: 100%;
+			content: "\00A0";
+			overflow: hidden;
+			opacity: 0;
+			height: 1rpx;
+		}
+
+	}
+</style>

+ 181 - 0
components/tuiProduct.vue

@@ -0,0 +1,181 @@
+<template>
+   <view>
+		<view class="like-title">
+			<image src="/static/images/tui.png" mode=""></image>
+			<text class="text">精选药品</text>
+		</view>
+		<view class="like-list">
+			<view class="item" v-for="(item,index) in list" :key="index" @click="showProduct(item)">
+				<view class="img-box">
+					<image :src="item.image" mode=""></image>
+				</view>
+				<view class="info-box">
+					<view class="title ellipsis2">{{ item.productName }}</view>
+					<view class="price-box">
+						<view class="now">
+							<text class="unit">¥</text>
+							<text class="num">{{item.price.toFixed(2)}}</text>
+						</view>
+						<view class="old">¥{{item.otPrice.toFixed(2)}}</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<Loading :loaded="loaded" :loading="loading"></Loading>
+   </view>
+</template>
+
+<script>
+  import {getTuiProducts} from '@/api/product'
+  import Loading from "@/components/Loading";
+  export default {
+	components: {Loading },
+    name: "likeProduct",
+	data() {
+		return {
+			page:{
+				page: 1,
+				pageSize: 10
+			},
+			total:0,
+			list:[],
+			loaded: false,
+			loading: false
+		};
+	},
+	created() {
+	},
+	mounted() {
+		this.getTuiProducts();
+	},
+	
+	methods: {
+		getTuiProducts(){
+			console.log(1)
+			var that=this;
+			if (that.loaded == true || that.loading == true) return;
+			that.loading = true;
+			uni.showLoading({
+				title:"加载中..."
+			})
+			getTuiProducts(that.page).then(
+				res => {
+					if(res.code==200){
+						that.total=res.data.total;
+						that.list.push.apply(that.list, res.data.list);
+						that.loading = false;
+						that.loaded = that.list.length<that.total?false:true;
+						that.page.page = that.page.page + 1;
+						uni.hideLoading()
+					}
+				},
+				err => {
+					uni.hideLoading()
+					uni.showToast({
+						title: err.msg ,
+						icon: 'none',
+						duration: 2000
+					});
+				}
+			);
+		},
+		showProduct(item){
+			uni.navigateTo({
+				url: '/pages/shopping/productDetails?productId='+item.productId
+			})
+		},
+	}
+ 
+  };
+</script>
+<style lang="scss">
+	.like-title{
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		padding: 15upx 0rpx 30upx 0rpx;
+		image{
+			width: 37upx;
+			height: 37upx;
+			margin-right: 20upx;
+		}
+		.text{
+			font-size: 36upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #111111;
+			line-height: 1;
+		}
+	}
+	.like-list{
+		display: flex;
+		flex-wrap: wrap;
+		.item{
+			margin-right: 20rpx;
+			margin-bottom: 20rpx;
+			width: 345rpx;
+			background: #FFFFFF;
+			box-shadow: 0px 0px 10rpx 4rpx rgba(199, 199, 199, 0.22);
+			border-radius: 20rpx;
+			overflow: hidden;
+			&:nth-child(2n) {
+				margin-right: 0;
+			}
+			.img-box{
+				width: 100%;
+				height: 334upx;
+				image{
+					width: 100%;
+					height: 100%;
+				}
+			}
+			.info-box{
+				box-sizing: border-box;
+				height: 182upx;
+				padding: 20upx 20upx 30upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				.title{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					line-height: 40upx;
+				}
+				.price-box{
+					display: flex;
+					align-items: flex-end;
+					.now{
+						display: flex;
+						align-items: flex-end;
+						margin-right: 20upx;
+						.unit{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #FF6633;
+							line-height: 1.2;
+							margin-right: 4upx;
+						}
+						.num{
+							font-size: 36upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FF6633;
+							line-height: 1;
+						}
+					}
+					.old{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						text-decoration: line-through;
+						color: #BBBBBB;
+						line-height: 1.1;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 325 - 0
components/z-modal/z-modal.vue

@@ -0,0 +1,325 @@
+<template>
+	<view>
+		<view class="mask" :style="{'opacity':show?'1':'0','visibility':show?'visible':'hidden'}"></view>
+		<view class="modal-box" :style="{'display':show?'block':'none','width':modalWidth}">
+			<view class="modal-title" :style="{'padding':titlePadding,'fontSize':titleSize,'color':titleColor}">
+				{{titleText}}
+			</view>
+			<view class="modal-content" v-if="contentType==1" :style="{'fontSize':contentSize,'padding':contentPadding,'color':contentColor}">
+				{{contentText}}
+			</view>
+			<view class="modal-content" v-if="contentType==2" :style="{'padding':contentPadding}">
+				<input :placeholder="placeholderText" v-model="inputText" :maxlength="maxLength" :placeholder-style="placeholderStyleString" :style="{'borderColor':inputBorderColor,'fontSize':contentSize,'color':contentColor}" class="input-area"/>
+			</view>
+			<view class="modal-content" v-if="contentType==3" :style="{'padding':contentPadding}">
+				<textarea :placeholder="placeholderText" v-model="textareaText" :maxlength="maxLength" :placeholder-style="placeholderStyleString" :style="{'borderColor':inputBorderColor,'fontSize':contentSize,'color':contentColor}"/>
+			</view>
+			<view class="model-bottom" :style="{'padding':bottomPadding,'justify-content':btnLength>1?'space-between':'center'}">
+				<block v-for="(item,index) in btnGroup" :key='index'>
+					<view class="modal-btn" :style="{'width':item.width,'height':item.height,'color':item.color,'background-color':item.bgColor,'font-size':bottomFontSize,'border-radius':shapeObj[item.shape]}" @tap="btnClick(index)">
+						{{item.text}}
+					</view>
+				</block>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "z-modal",
+		props: {
+			// **************** 使用配置项 ****************
+			// 文本校验?
+			check:{
+				type:Boolean,
+				default:false
+			},
+			checkItem:{
+				// isRequired-是否必填/ isNumber-是否为纯数字 isChinese-是否为纯中文 isEnglish-是否为纯英文 isEmail-是否为邮箱格式 isIdNum-是否为身份证格式
+				type:Array,
+				default:()=>{
+					return []
+				}
+			},
+			/*
+			支持自定义校验,格式为{
+				key:正则
+			}
+			例如{
+				'isNumber':/^\+?[0-9][0-9]*$/
+			}
+			*/
+			selfCheckItem:{
+				type:Object,
+				default:()=>{
+					return {}
+				}
+			},
+			// 控制modal的显示隐藏
+			show:{
+				type:Boolean,
+				default:false
+			},
+			// 底部按钮组
+			btnGroup: {
+				type: Array,
+				default: () => {
+					return [{
+						text: '取消',
+						color: '#FFFFFF',
+						bgColor: '#999999',
+						width: '220rpx',
+						height: '80rpx',
+						shape: 'circle',
+						eventName: 'cancle'
+					}, {
+						text: '确定',
+						color: '#FFFFFF',
+						bgColor: '#007AFF',
+						width: '220rpx',
+						height: '80rpx',
+						shape: 'circle',
+						eventName: 'sure'
+					}]
+				}
+			},
+			// 文本类型 1-展示文字 2-input 3-textarea
+			contentType:{
+				type:[Number,String],
+				default:1
+			},
+			// contentType为2或3时的字数限制
+			maxLength:{
+				type:Number,
+				default:20
+			},
+			// **************** 尺寸&大小 ****************
+			// modal整体宽度 rpx
+			modalWidth:{
+				type:String,
+				default:'580rpx'
+			},
+			// title区域文字大小
+			titleSize:{
+				type:String,
+				default:'32rpx'
+			},
+			// content区域文字大小
+			contentSize:{
+				type:String,
+				default:'28rpx'
+			},
+			// 底部(按钮)区域的字号
+			bottomFontSize:{
+				type:String,
+				default:'28rpx'
+			},
+			// title(标题) 区域的padding
+			titlePadding:{
+				type:String,
+				default:'20rpx 0'
+			},
+			// content(内容) 区域的padding
+			contentPadding:{
+				type:String,
+				default:'10rpx 40rpx'
+			},
+			// 底部(按钮)区域的padding
+			bottomPadding:{
+				type:String,
+				default:'30rpx 40rpx'
+			},
+			// **************** 颜色 ****************
+			// 标题文字颜色
+			titleColor:{
+				type:String,
+				default:'#333333'
+			},
+			// 内容文字颜色
+			contentColor:{
+				type:String,
+				default:'#333333'
+			},
+			// placeholderColor-提示文字的颜色
+			placeholderColor:{
+				type:String,
+				default:'#999'
+			},
+			inputBorderColor:{
+				type:String,
+				default:'#999'
+			},
+			// **************** 内容 ****************
+			// 标题内容
+			titleText:{
+				type:String,
+				default:'titleText'
+			},
+			// 文本内容
+			contentText:{
+				type:String,
+				default:'Please type in your text'
+			},
+			// input或textarea的placeholder
+			placeholderText:{
+				type:String,
+				default:'请输入你的内容'
+			}
+		},
+		computed:{
+			btnLength(){
+				return this.btnGroup.length
+			},
+			placeholderStyleString(){
+				return `color:${this.placeholderColor};font-size:${this.contentSize}`
+			}
+		},
+		data() {
+			return {
+				// 底部按钮shape对应值
+				shapeObj:{
+					'circle':'1000rpx',
+					'straight':'0',
+					'fillet':'12rpx'
+				},
+				inputText:'',
+				textareaText:'',
+				// ***校验项,是否通过,true-通过,false不通过
+				checkCollection: {
+					isRequired :function(val){
+						return !(val === null || val === '' || val === undefined)
+					},
+					isNumber :function(val){
+						let reg = /^\+?[0-9][0-9]*$/
+						return reg.test(val)
+					},
+					isChinese :function(val){
+						let reg = /^[\u4e00-\u9fa5]+$/
+						return reg.test(val)
+					},
+					isEnglish :function(val){
+						let reg = /^[a-zA-Z]+$/
+						return reg.test(val)
+					},
+					isEmail :function(val){
+						let reg = /^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/
+						return reg.test(val)
+					},
+					isIdNum :function(val){
+						let reg = /^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i
+						return reg.test(val)
+					}
+				}
+			};
+		},
+		methods:{
+			btnClick(index){
+				let val = this.contentType==2?this.inputText:this.textareaText
+				if(this.check && this.checkItem.length && this.contentType!=1){
+					let err = false
+					// 进入校验,如果不通过直接返回,通过则吐出按钮事件
+					for(let item of this.checkItem){
+						if(!this.checkCollection[item](val)){
+							this.$emit('error',item)
+							err = true
+							break
+						}
+					}
+					if(err) return
+				}
+				let selfCheckArr = Object.entries(this.selfCheckItem)
+				if(this.check && selfCheckArr.length && this.contentType!=1){
+					let err = false
+					for(let item of selfCheckArr){
+						let reg = new RegExp(item[1])
+						if(!reg.test(val)){
+							this.$emit('error',item[0])
+							err = true
+							break
+						}
+					}
+					if(err) return
+				}
+				this.$emit(this.btnGroup[index]['eventName'],{
+					inputText:this.inputText || '',
+					textareaText:this.textareaText || ''
+				})
+				this.inputText = ''
+				this.textareaText = ''
+			}
+		}
+	}
+</script>
+
+<style>
+	.mask {
+		position: fixed;
+		z-index: 98;
+		background-color: rgba(0, 0, 0, .7);
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		visibility: hidden;
+		opacity: 0;
+		transition: all .3s;
+	}
+
+	.modal-box {
+		background-color: #FFFFFF;
+		position: fixed;
+		z-index: 99;
+		border-radius: 12rpx;
+		left: 50%;
+		top: 50%;
+		transform: translate(-50%, -50%);
+	}
+
+	.modal-title {
+		box-sizing: border-box;
+		color: #333333;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.modal-content {
+		box-sizing: border-box;
+		color: #333333;
+		word-break: break-all;
+		display: flex;
+		justify-content: center;
+	}
+
+	.model-bottom {
+		display: flex;
+		align-items: center;
+	}
+
+	.modal-btn {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+	
+	.input-area{
+		border: 1rpx solid #999;
+		width: 100%;
+		padding:0 16rpx;
+		box-sizing: border-box;
+		height: 60rpx;
+		border-radius: 6rpx;
+		outline: none;
+	}
+	
+	textarea{
+		border: 1rpx solid #999;
+		width: 92%;
+		padding:16rpx;
+		box-sizing: border-box;
+		border-radius: 6rpx;
+		height: 200rpx;
+	}
+
+</style>

+ 22 - 0
main.js

@@ -0,0 +1,22 @@
+import Vue from 'vue'
+import App from './App'
+
+ 
+Vue.config.productionTip = false
+  
+import utils from './utils/common.js'
+Vue.prototype.utils = utils;
+ 
+import {setData} from './utils/common.js'
+Vue.prototype.setData = setData;
+ 
+ 
+App.mpType = 'app'
+const app = new Vue({
+    ...App
+})
+app.$mount()
+
+
+ 
+ 

+ 94 - 0
manifest.json

@@ -0,0 +1,94 @@
+{
+    "name" : "互联网医院",
+    "appid" : "__UNI__DBD2079",
+    "description" : "",
+    "versionName" : "1.0.0",
+    "versionCode" : "100",
+    "transformPx" : false,
+    /* 5+App特有相关 */
+    "app-plus" : {
+        "usingComponents" : true,
+        "nvueStyleCompiler" : "uni-app",
+        "compilerVersion" : 3,
+        "splashscreen" : {
+            "alwaysShowBeforeRender" : true,
+            "waiting" : true,
+            "autoclose" : true,
+            "delay" : 0
+        },
+        /* 模块配置 */
+        "modules" : {},
+        /* 应用发布信息 */
+        "distribute" : {
+            /* android打包配置 */
+            "android" : {
+                "permissions" : [
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                ]
+            },
+            /* ios打包配置 */
+            "ios" : {},
+            /* SDK配置 */
+            "sdkConfigs" : {}
+        }
+    },
+    /* 快应用特有相关 */
+    "quickapp" : {},
+    /* 小程序特有相关 */
+    "mp-weixin" : {
+        "appid" : "wx45cf09091aead547",
+        "setting" : {
+            "urlCheck" : false,
+            "minified" : true,
+            "postcss" : false,
+            "es6" : false
+        },
+        "optimization" : {
+            "subPackages" : true
+        },
+        "usingComponents" : true,
+        "permission" : {
+            "scope.userLocation" : {
+                "desc" : "获取位置用于给您推送相关信息"
+            }
+        }
+    },
+    "mp-alipay" : {
+        "usingComponents" : true
+    },
+    "mp-baidu" : {
+        "usingComponents" : true
+    },
+    "mp-toutiao" : {
+        "usingComponents" : true
+    },
+    "uniStatistics" : {
+        "enable" : false
+    },
+    "vueVersion" : "2",
+    "h5" : {
+        "title" : "御君方",
+        "devServer" : {
+            "https" : false
+        },
+        "optimization" : {
+            "treeShaking" : {
+                "enable" : true
+            }
+        }
+    }
+}

+ 42 - 0
package-lock.json

@@ -0,0 +1,42 @@
+{
+    "name": "shop",
+    "version": "1.0.0",
+    "lockfileVersion": 1,
+    "requires": true,
+    "dependencies": {
+        "animate.css": {
+            "version": "3.7.2",
+            "resolved": "https://registry.npmmirror.com/animate.css/-/animate.css-3.7.2.tgz",
+            "integrity": "sha512-0bE8zYo7C0KvgOYrSVfrzkbYk6IOTVPNqkiHg2cbyF4Pq/PXzilz4BRWA3hwEUBoMp5VBgrC29lQIZyhRWdBTw=="
+        },
+        "cos-wx-sdk-v5": {
+            "version": "1.1.5",
+            "resolved": "https://registry.npmmirror.com/cos-wx-sdk-v5/-/cos-wx-sdk-v5-1.1.5.tgz",
+            "integrity": "sha512-++O7HD6Hz6UDlhgKMchJOap85bQtY+DKzPg2r5uCdyRb45AWC+Xj9qetXohPpA2G/inNVSqxw/EtjGPe2OIhyg==",
+            "requires": {
+                "mime": "^2.4.6",
+                "xmldom": "^0.1.31"
+            }
+        },
+        "dayjs": {
+            "version": "1.11.7",
+            "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.7.tgz",
+            "integrity": "sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ=="
+        },
+        "mime": {
+            "version": "2.6.0",
+            "resolved": "https://registry.npmmirror.com/mime/-/mime-2.6.0.tgz",
+            "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg=="
+        },
+        "tim-wx-sdk": {
+            "version": "2.18.0",
+            "resolved": "https://registry.npmmirror.com/tim-wx-sdk/-/tim-wx-sdk-2.18.0.tgz",
+            "integrity": "sha512-Dz6aHpaCdk1ST/ZzltliSFHBsB5CdFU+q2NpFZc9PV8br0a5F2GyYgrdLn1Yqt8YntEwMReaud3LUY638zNJug=="
+        },
+        "xmldom": {
+            "version": "0.1.31",
+            "resolved": "https://registry.npmmirror.com/xmldom/-/xmldom-0.1.31.tgz",
+            "integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ=="
+        }
+    }
+}

+ 12 - 0
package.json

@@ -0,0 +1,12 @@
+{
+    "name": "shop",
+    "version": "1.0.0",
+    "description": "",
+    "keywords": [],
+    "dependencies": {
+        "animate.css": "^3.7.2",
+        "cos-wx-sdk-v5": "^1.0.10",
+        "dayjs": "^1.11.7",
+        "tim-wx-sdk": "^2.17.0"
+    }
+}

+ 978 - 0
pages.json

@@ -0,0 +1,978 @@
+{
+	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
+		{
+			"path": "pages/common/launch",
+			"navigationStyle": "custom"
+			
+		},
+		{
+			"path": "pages/auth/login",
+			"style": {
+				"navigationBarTitleText": "授权登录",
+				"navigationStyle": "custom"
+			}
+			
+		},
+		{
+			"path": "pages/auth/wxLogin",
+			"style": {
+				"navigationBarTitleText": "公众号授权",
+				"navigationStyle": "custom"
+			}
+			
+		},
+		{
+			"path": "pages/home/index",
+			"style": {
+				"navigationBarTitleText": "御君方",
+                "enablePullDownRefresh": false,
+                "navigationStyle": "custom",
+				"app-plus": {
+					"titleNView": false
+				}
+			}
+		},
+		{
+		    "path" : "pages/user/test",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "test",
+				"app-plus": {
+					"titleNView": false
+				}
+		    }
+		    
+		},
+		// {
+  //           "path" : "pages/home/doctorCase",
+  //           "style" :                                                                                    
+  //           {
+  //               "navigationBarTitleText": "问诊案例",
+		// 		"app-plus": {
+		// 			"titleNView": false
+		// 		}
+  //           }
+            
+  //       },
+		{
+		    "path" : "pages/doctor/doctorQr",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "用药咨询",
+				"app-plus": {
+					"titleNView": false
+				}
+		    }
+		    
+		},
+		{
+            "path" : "pages/home/productSearch",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "商品搜索",
+				"app-plus": {
+					"titleNView": false
+				}
+            }
+            
+        },
+		{
+            "path" : "pages/home/productList",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "商品列表",
+				"app-plus": {
+					"titleNView": false
+				}
+            }
+            
+        },
+		{
+            "path" : "pages/healthy/index",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "健康知识",
+                "enablePullDownRefresh": false,
+                "navigationStyle": "custom",
+				"app-plus": {
+					"titleNView": false
+				}
+            }
+            
+        },
+		{
+            "path" : "pages/healthy/detail",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false,
+				"app-plus": {
+					"titleNView": false
+				}
+            }
+            
+        },
+		{
+            "path" : "pages/healthy/readUsers",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "阅读用户",
+                "enablePullDownRefresh": false,
+				"app-plus": {
+					"titleNView": false
+				}
+            }
+            
+        },
+		// {
+  //           "path" : "pages/doctor/index",
+  //           "style" :                                                                                    
+  //           {
+  //               "navigationBarTitleText": "问诊",
+  //               "navigationStyle": "custom",
+  //               "enablePullDownRefresh": false
+  //           }
+            
+  //       },
+		// {
+  //           "path" : "pages/doctor/doctorList",
+  //           "style" :                                                                                    
+  //           {
+  //               "navigationBarTitleText": "医生列表",
+  //               "enablePullDownRefresh": false
+  //           }
+            
+  //       },
+		// {
+  //           "path" : "pages/doctor/doctorDetail",
+  //           "style" :                                                                                    
+  //           {
+  //               "navigationBarTitleText": "医生详情",
+  //               "navigationStyle": "custom",
+  //               "enablePullDownRefresh": false
+  //           }
+            
+  //       },
+		// {
+  //           "path" : "pages/doctor/submitOrder",
+  //           "style" :                                                                                    
+  //           {
+  //               "navigationBarTitleText": "发布问诊",
+  //               "enablePullDownRefresh": false
+  //           }
+            
+  //       },
+		{
+            "path" : "pages/shopping/index",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "商城",
+                "navigationStyle": "custom",
+                "enablePullDownRefresh": false
+            }
+            
+        },
+		{
+			"path": "pages/user/index",
+			"style": {
+				"navigationBarTitleText": "我的",
+                "navigationStyle": "custom",
+				"app-plus": {
+					"titleNView": false
+				}
+			}
+		}
+        ,{
+            "path" : "pages/shopping/productDetails",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "商品详情",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+		,{
+		    "path" : "pages/home/companyInfo",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "企业理念",
+		        "enablePullDownRefresh": false
+				
+		    }
+		    
+		}
+        ,{
+            "path" : "pages/shopping/cart",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "购物车",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/shopping/productList",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "药品列表",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/shopping/confirmOrder",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "确认订单",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/shopping/paymentOrder",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "支付订单",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+		,{
+		    "path" : "pages/shopping/payOrder",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "推荐订单支付",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
+        ,{
+            "path" : "pages/shopping/prescribe",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "填写处方信息",
+				"navigationStyle": "custom",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+		
+        // ,{
+        //     "path" : "pages/doctor/doctorIm",
+        //     "style" :                                                                                    
+        //     {
+        //         "navigationBarTitleText": "问诊会话",
+        //         "enablePullDownRefresh": false
+        //     }
+            
+        // }
+		,{
+		    "path" : "pages/shopping/success",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "支付成功",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
+		// ,{
+		//     "path" : "pages/doctor/paymentOrder",
+		//     "style" :                                                                                    
+		//     {
+		//         "navigationBarTitleText": "支付订单",
+		//         "enablePullDownRefresh": false
+		//     }
+		    
+		// }
+		// ,{
+		//     "path" : "pages/doctor/doctorOrderIM",
+		//     "style" :                                                                                    
+		//     {
+		//         "navigationBarTitleText": "问诊会话",
+		//         "enablePullDownRefresh": false
+		//     }
+		    
+		// }
+		,{
+		    "path" : "pages/home/content",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "详情",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
+		,{
+		    "path" : "pages/home/h5",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "详情",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
+		,{
+		    "path" : "pages/home/cert",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "资质证明",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
+		,{
+		    "path" : "pages/shopping/confirmPackageOrder",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "确认支付",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
+		,{
+		    "path" : "pages/shopping/confirmCreateOrder",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "确认订单",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
+		
+		
+    ],
+	"subPackages": [
+		{
+			"root": "pages_user",
+			"pages": [
+				{
+					"path": "user/addPatient",
+					"style": {
+						"navigationBarTitleText": "创建就诊人",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				}
+				,{
+					"path" : "user/message",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "消息",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/msgDetail",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "系统消息",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/storeOrder",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "我的订单",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/storeOrderDetail",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "订单详情",
+						"navigationStyle": "custom",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/doctorOrder",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "问诊列表",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/patient",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "病人列表",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/addAddress",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "新建收货地址",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/address",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "收货地址",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/integral",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "我的积分",
+						"navigationStyle": "custom",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/refundOrderList",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "售后订单",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/refundOrderDetail",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "处理进度",
+						"navigationStyle": "custom",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/refundOrderLogs",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "退款详情",
+						"navigationStyle": "custom",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/storeOrderDelivery",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "物流信息",
+						"navigationStyle": "custom",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/refundOrder",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "申请售后",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/prescribeOrder",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "处方单",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/pay",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "收款",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/success",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "支付结果",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/refundOrderProduct",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "订单售后",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/refundOrderDelivery",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "物流信息",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/userTui",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "我的推广",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/userTuiProduct",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "推广商品",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/userTuiImg",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "推广海报",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/userTuiList",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "我的推荐人",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/userTuiMoneyList",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "佣金记录",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/userTuiOrderList",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "订单记录",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/storeProductRelation",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "我的足迹",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/personInfo",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "个人信息",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/userTuiMoney",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "提现管理",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/userTuiExtractLog",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "提现记录",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/doc",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "健康档案",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/addDoc",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "创建健康档案",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/docDetail",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "健康档案",
+						"navigationBarBackgroundColor": "#dff9f5",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/docRecord",
+					"style":                                                                                  
+					{
+						"navigationBarTitleText": "健康记录",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/addDocRecord",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "添加健康记录",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/userTuiAdd",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "申请推广员",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+				    "path" : "user/paymentOrderRemain",
+				    "style" :                                                                                    
+				    {
+				        "navigationBarTitleText": "支付尾款",
+				        "enablePullDownRefresh": false
+				    }
+				    
+				}
+				,{
+					"path" : "user/otherPaymentOrder",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "亲友代付",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/otherPaySuccess",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "支付成功",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/otherPaymentOrderRemain",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "亲友代付尾款",
+						"enablePullDownRefresh": false
+					}
+					
+				}
+				,{
+					"path" : "user/userShareList",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "分享榜",
+						"enablePullDownRefresh": false,
+						"navigationStyle": "custom"
+						
+					}
+					
+				}
+				
+			]
+		},
+		{
+			"root": "pages_company",
+			"pages": [
+				{
+					"path": "auth/login",
+					"style": {
+						"navigationBarTitleText": "销售员登录",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "index",
+					"style": {
+						"navigationBarTitleText": "销售管理首页",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "storeOrder",
+					"style": {
+						"navigationBarTitleText": "订单管理",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				}
+				,{
+					"path" : "storeOrderDetail",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "订单详情",
+						"navigationStyle": "custom",
+						"enablePullDownRefresh": false
+					}
+					
+				},
+				{
+					"path": "storeProductPackage",
+					"style": {
+						"navigationBarTitleText": "商品套餐",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "storeProductPackageDetails",
+					"style": {
+						"navigationBarTitleText": "套餐详情",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "coupon",
+					"style": {
+						"navigationBarTitleText": "优惠券",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "couponDetails",
+					"style": {
+						"navigationBarTitleText": "优惠券详情",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "order/productList",
+					"style": {
+						"navigationBarTitleText": "商品列表",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "order/productDetails",
+					"style": {
+						"navigationBarTitleText": "商品详情",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "order/cart",
+					"style": {
+						"navigationBarTitleText": "购物车",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "order/confirmOrder",
+					"style": {
+						"navigationBarTitleText": "推荐订单信息",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "order/confirmCompanyOrder",
+					"style": {
+						"navigationBarTitleText": "推荐订单",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "order/coupon",
+					"style": {
+						"navigationBarTitleText": "制单优惠券",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "order/productShowDetails",
+					"style": {
+						"navigationBarTitleText": "商品详情",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "alipayImg",
+					"style": {
+						"navigationBarTitleText": "支付宝收款",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "card",
+					"style": {
+						"navigationBarTitleText": "销售名片",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				}
+			]
+		},
+		{
+			"root": "pages_shopping",
+			"pages": [
+				 {
+				 	"path" : "shopping/coupon",
+				 	"style" :                                                                                    
+				 	{
+				 		"navigationBarTitleText": "优惠券",
+				 		"enablePullDownRefresh": false
+				 	}
+				 	
+				 }
+				 ,{
+				 	"path" : "shopping/myCoupon",
+				 	"style" :                                                                                    
+				 	{
+				 		"navigationBarTitleText": "我的优惠券",
+				 		"enablePullDownRefresh": false
+				 	}
+				 	
+				 }
+				 ,{
+				 	"path" : "shopping/activityDetails",
+				 	"style" :                                                                                    
+				 	{
+				 		"navigationBarTitleText": "活动",
+				 		"enablePullDownRefresh": false
+				 	}
+				 	
+				 }
+				 ,{
+				 	"path" : "shopping/productSalesList",
+				 	"style" :                                                                                    
+				 	{
+				 		"navigationBarTitleText": "药品排行榜",
+				 		"enablePullDownRefresh": false
+				 	}
+				 	
+				 }
+				 
+				 
+			]
+		}
+	],
+	"globalStyle": {
+		"navigationBarTextStyle": "black",
+		"navigationBarTitleText": "御君方",
+		"navigationBarBackgroundColor": "#FFFFFF",
+		"backgroundColor": "#FFFFFF"
+	},
+	"tabBar": {
+		"color": "#666666",
+		"selectedColor": "#2BC7B9",
+		"borderStyle": "white",
+		"backgroundColor": "#ffffff",
+		"height": "64px",
+		"fontSize":"12px",
+		"iconWidth":"18px",
+		"spacing": "4px",
+		"list": [{
+				"pagePath": "pages/home/index",
+				"iconPath": "/static/images/home.png",
+				"selectedIconPath": "/static/images/home_sel.png",
+				"text": "首页"
+			},
+			{
+				"pagePath": "pages/home/companyInfo",
+				"iconPath": "/static/images/health.png",
+				"selectedIconPath": "/static/images/health_sel.png",
+				"text": "企业理念"
+			},
+			// {
+			// 	"pagePath": "pages/doctor/index",
+			// 	"iconPath": "/static/images/see_doctor.png",
+			// 	"selectedIconPath": "/static/images/see_doctor_sel.png",
+			// 	"text": "问诊"
+			// },
+			{
+				"pagePath": "pages/shopping/index",
+				"iconPath": "/static/images/shop_mall.png",
+				"selectedIconPath": "/static/images/shop_mall_sel.png",
+				"text": "健康商城"
+			},
+			{
+				"pagePath": "pages/user/index",
+				"iconPath": "/static/images/my.png",
+				"selectedIconPath": "/static/images/my_sel.png",
+				"text": "会员中心"
+			}
+		]
+	}
+}

+ 524 - 0
pages/auth/login.vue

@@ -0,0 +1,524 @@
+<template>
+  <view class="container">
+    <!-- #ifdef MP-WEIXIN -->
+    <view  class="force-login-wrap">
+      <view class="force-login__content y-f">
+        <view class="logo">
+        	<view class="logo-img">
+        		<image  src="../../static/logo.png"></image>
+        	</view>
+        	<view class="title">御君方</view>
+        </view>
+        <view class="login-notice">为了提供更优质的服务,请先登录</view>
+		<!-- <button
+			class="author-btn"
+			@click="wxLogin()"  >微信授权登录</button> -->
+		<view class="btns">
+			<button
+				class="author-btn"
+				open-type="getPhoneNumber"
+				@getphonenumber="phoneLogin"  >一键授权手机号登录</button>
+			<button class="author-btn" v-if="isAgreement==false" @click="handleAgree()">一键授权手机号登录</button>
+			
+		</view>
+		<!-- <button
+			class="author-btn"
+			open-type="getPhoneNumber"
+			@getphonenumber="phoneLogin"  >微信授权登录</button> -->
+		<button class="close-btn" @tap="back">暂不登录</button>
+			
+		<view class="tips">
+			<checkbox  :checked="isAgreement" @click="handleAgreement()" />
+			<view  @click="handleAgreement()">您同意并接受</view>
+		 	<view class="btn"  @click="openH5('/h5/userAgreement')">《用户协议》</view>
+		 	<view class="btn" @click="openH5('/h5/privacyPolicy')">《隐私保护》</view>
+		</view>
+      </view>
+    </view>
+    <!-- #endif -->
+	 
+    
+  </view>
+</template>
+
+<script>
+import { loginByMiniApp,getUserInfo,loginByMp } from '@/api/user'
+export default {
+	data() {
+		return {
+			code:null,
+			isAgreement:false,
+		}
+	},
+	computed: {
+	},
+	onLoad(option) 
+	{
+		// #ifdef MP-WEIXIN
+		uni.$on('refreshLogin', () => {
+			uni.navigateBack({
+				delta:1
+			})
+		})
+		//选获取CODE,防止后请求的时候腾讯服务端未同步报错
+		this.getCode();
+		// #endif
+		
+		// #ifdef H5
+		if (this.checkWeixin()) {
+			this.getWxCode()
+		} else {
+			uni.showToast({
+				icon:'none',
+				title: "请在微信中打开",
+			});
+			//跳转到手机号密码登录
+		}
+		// #endif
+	 
+	},
+	onUnload() {
+	},
+	mounted() {
+    
+	},
+	methods: {
+		handleAgree(){
+			if(!this.isAgreement){
+			  	uni.showToast({
+			  		icon:'none',
+			  		title: "请先同意协议后再登录",
+			  	});
+			}
+		},
+		 
+		checkWeixin(){
+			var ua = window.navigator.userAgent.toLowerCase();
+			if (ua.match(/micromessenger/i) == 'micromessenger') {
+				return true;
+			} else {
+				return false;
+			}
+		},
+		//URL地址是否存在CODE
+		getUrlCode(name) {
+			return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ''])[1]
+				.replace(/\+/g, '%20')) || null
+		},
+		//获取微信CODE
+		getWxCode() {
+			//在微信公众号请求用户网页授权之前,开发者需要先到公众平台官网中的“开发 - 接口权限 - 网页服务 - 网页帐号 - 网页授权获取用户基本信息”的配置选项中,修改授权回调域名。请注意,这里填写的是域名(是一个字符串),而不是URL,因此请勿加 http:// 等协议头; 
+			//http://shequ.natapp1.cc/#/pages/index/index?deviceId=8
+			var appId="wx40593595e62f61ad";
+			var url="http://h5.yjf.runtzh.com";
+			window.location.href ='https://open.weixin.qq.com/connect/oauth2/authorize?appid='+appId+'&redirect_uri=' +encodeURIComponent(url+"/#/pages/auth/wxLogin") +'&response_type=code&scope=snsapi_userinfo&state=JeffreySu-954&connect_redirect=1#wechat_redirect';
+			//console.log('https://open.weixin.qq.com/connect/oauth2/authorize?appid='+appId+'&redirect_uri=' +encodeURIComponent("http://shequ.natapp1.cc/#/pages/index/index?deviceId="+this.deviceId) +'&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect')
+			// redirect_uri是授权成功后,跳转的url地址,微信会帮我们跳转到该链接,并且通过?的形式拼接code
+		},
+		handleAgreement(){
+			this.isAgreement=!this.isAgreement;
+		},
+		openH5(url){
+			var requestPath = uni.getStorageSync('requestPath');
+			uni.setStorageSync('url',requestPath+url);
+			uni.navigateTo({
+				url: '../home/h5'
+			})
+		},
+		getCode(){
+			var that=this;
+			this.utils.getProvider()
+			.then(provider => {
+				console.log('当前的环境商',provider)
+				if (!provider) {
+				  reject()
+				}
+				// uni登录
+				uni.login({
+					provider: provider,
+					success: async loginRes => {
+						that.code = loginRes.code
+					}
+				})
+			})
+			.catch(err => {
+				
+			})
+		},
+		wxLogin() {
+			var that=this;
+			if(!this.isAgreement){
+				uni.showToast({
+					icon:'none',
+					title: "请先同意协议后再登录",
+				});
+				return false;
+			}
+			uni.showLoading({
+				title:"处理中..."
+			})
+			this.utils.getProvider()
+			.then(provider => {
+				console.log('当前的环境商',provider)
+				if (!provider) {
+				  reject()
+				}
+				// uni登录
+				uni.login({
+					provider: provider,
+					success: async loginRes => {
+						console.log(loginRes)
+						let code = loginRes.code // 获取开发code
+						var userCode=uni.getStorageSync('userCode');
+						loginByMiniApp({
+						   // encryptedData: e.mp.detail.encryptedData,
+						   // iv: e.mp.detail.iv,
+						   code: code,
+						   userCode:userCode
+						})
+						.then( res => {
+							if(res.code==200){
+								uni.hideLoading();
+								uni.showToast({
+									icon:'none',
+									title: "登录成功",
+								});
+								uni.setStorageSync('AppToken',res.token);
+								uni.setStorageSync('userInfo',JSON.stringify(res.user));
+								uni.hideLoading()
+								//that.getUserInfo()
+								uni.$emit('refreshLogin');
+								uni.navigateBack({
+									delta:1
+								})
+							}
+							else{
+								uni.hideLoading();
+								uni.showToast({
+									icon:'none',
+									title: "授权登录失败,请重新登录",
+								});
+							}
+						   
+						 })
+						 .catch(error => {
+							console.log(error)
+							uni.hideLoading();
+							uni.showToast({
+								icon:'none',
+								title: "登录接口调用失败",
+							});
+						 })
+						 
+					}
+				})
+			})
+			.catch(err => {
+				uni.showToast({
+					icon:'none',
+					title: err,
+				});
+			})
+		},
+		// 微信用户手机号登录
+		phoneLogin(e) {
+			var that=this;
+			if(!this.isAgreement){
+				uni.showToast({
+					icon:'none',
+					title: "请先同意协议后再登录",
+				});
+				return false;
+			}
+			uni.showLoading({
+				title:"处理中..."
+			})
+			if (e.mp.detail.errMsg == 'getPhoneNumber:ok') {
+				this.utils.getProvider()
+				.then(provider => {
+					console.log('当前的环境商',provider)
+					if (!provider) {
+					  reject()
+					}
+					// uni登录
+					uni.login({
+						provider: provider,
+						success: async loginRes => {
+							console.log(loginRes)
+							let code = loginRes.code // 获取开发code
+							var userCode=uni.getStorageSync('userCode');
+							loginByMiniApp({
+							   encryptedData: e.mp.detail.encryptedData,
+							   iv: e.mp.detail.iv,
+							   code: code,
+							   userCode:userCode
+							})
+							.then( res => {
+								if(res.code==200){
+									uni.hideLoading();
+									uni.showToast({
+										icon:'none',
+										title: "登录成功",
+									});
+									uni.setStorageSync('AppToken',res.token);
+									uni.setStorageSync('userInfo',JSON.stringify(res.user));
+									uni.hideLoading()
+									//that.getUserInfo()
+									uni.$emit('refreshLogin');
+									uni.navigateBack({
+										delta:1
+									})
+								}
+								else{
+									uni.hideLoading();
+									uni.showToast({
+										icon:'none',
+										title: "授权登录失败,请重新登录",
+									});
+								}
+							   
+							 })
+							 .catch(error => {
+								console.log(error)
+								uni.hideLoading();
+								uni.showToast({
+									icon:'none',
+									title: "登录接口调用失败",
+								});
+							 })
+							 
+						}
+					})
+				})
+				.catch(err => {
+					uni.showToast({
+						icon:'none',
+						title: err,
+					});
+				})
+				 
+			} else {
+				uni.showToast({
+					title: '已拒绝授权',
+					icon: 'none',
+					duration: 2000,
+				})
+			}
+		},
+		back() {
+			uni.navigateBack()
+		}
+	}
+}
+</script>
+
+<style lang="scss">
+.container {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+  justify-content: flex-start;
+  position: relative;
+}
+
+.force-login-wrap {
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+  z-index: 11111;
+  top: 0;
+
+  .force-login__content {
+    position: absolute;
+    left: 50%;
+    top: 40%;
+    transform: translate(-50%, -50%);
+
+    .logo{
+    	display: flex;
+    	flex-direction: column;
+    	justify-content: center;
+    	align-items: center;
+    	.logo-img{
+    		border: 4upx solid #FFFFFF;
+    		box-shadow: 0px 5px 15px 2px rgba(0,0,0,0.1);
+    		border-radius: 50%;
+    		width: 80px;
+    		height: 80px;
+    		image{
+    			border-radius: 50%;
+    			width: 100%;
+    			height: 100%;
+    			overflow: hidden;
+    		}
+    	}
+    	
+    	.title{
+    		margin-top: 20rpx;
+    		font-size: 35rpx;
+    		font-family: PingFang SC;
+    		font-weight: bold;
+    		color: #000;
+    		margin-bottom: 30rpx;
+    	}
+    }
+
+    .login-notice {
+      font-size: 28rpx;
+      font-family: PingFang SC;
+      font-weight: 400;
+      color: #000;
+      line-height: 44rpx;
+      width: 500rpx;
+      text-align: center;
+      margin-bottom: 80rpx;
+    }
+	.btns{
+		position: relative;
+		width: 630rpx;
+		height: 80rpx;
+		.author-btn{				
+			z-index:100;
+			position: absolute;
+			width: 630rpx;
+			height: 80rpx;
+			background: linear-gradient(to right, #2BC7B9 0%, #2aa7B9 100%);
+			background: -moz-linear-gradient(to right, #2BC7B9 0%, #2aa7B9 100%);
+			// box-shadow: 0px 7rpx 6rpx 0px rgba(229, 138, 0, 0.22);
+			border-radius: 40rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: rgba(255, 255, 255, 1);
+		}
+	}
+	.author-btn{
+		z-index:100;
+		// position: absolute;
+		width: 630rpx;
+		height: 80rpx;
+		background: linear-gradient(to right, #2BC7B9 0%, #2aa7B9 100%);
+		background: -moz-linear-gradient(to right, #2BC7B9 0%, #2aa7B9 100%);
+		// box-shadow: 0px 7rpx 6rpx 0px rgba(229, 138, 0, 0.22);
+		border-radius: 40rpx;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: rgba(255, 255, 255, 1);
+	}
+    .author-btn {
+      width: 630rpx;
+      height: 80rpx;
+      background: linear-gradient(to right, #2BC7B9 0%, #2aa7B9 100%);
+      background: -moz-linear-gradient(to right, #2BC7B9 0%, #2aa7B9 100%);
+      // box-shadow: 0px 7rpx 6rpx 0px rgba(229, 138, 0, 0.22);
+      border-radius: 40rpx;
+      font-size: 30rpx;
+      font-family: PingFang SC;
+      font-weight: 500;
+      color: rgba(255, 255, 255, 1);
+    }
+
+    .close-btn {
+      width: 630rpx;
+      height: 80rpx;
+      margin-top: 30rpx;
+      border-radius: 40rpx;
+      border: 2rpx solid #2BC7B9;
+      background: none;
+      font-size: 30rpx;
+      font-family: PingFang SC;
+      font-weight: 500;
+      color: #2BC7B9;
+    }
+  }
+}
+.tips{
+	margin-top: 30rpx;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	font-size: 28rpx;
+	color: #000;
+	checkbox{
+	}
+	.btn{
+		color: #2BC7B9;
+	}
+}
+
+
+.wx-login{
+	background: rgba(0,0,0,0.7);
+	z-index: 99999;
+	position: fixed;
+	top: 0;
+	left: 0;
+	height: 100%;
+	width: 100%;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	.form{
+		border-radius: 20rpx;
+		padding: 60rpx 30rpx;
+		width: 500upx;
+		height: 300upx;
+		background-color: #fff;
+		.title{
+			font-size: 32upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			
+		}
+		.desc{
+			font-size: 28upx;
+			margin: 60upx 0upx 60upx 0upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+		}
+		.btn-box{
+			margin-top: 30rpx;
+			width: 100%;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			
+			.btn{
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				margin-left: 10upx;
+				width: 50%;
+				height: 80rpx;
+				border-radius: 5rpx;
+				background-color: #2BC7B9;
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #fff;
+				position: relative;
+			}
+			.btn-close{
+				margin-right: 10upx;
+				width: 50%;
+				height: 80rpx;
+				border-radius: 5rpx;
+				border: 2rpx solid #2BC7B9;
+				background: none;
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #2BC7B9;
+			}
+		}
+	}
+}
+.auth_btn{
+	width: 100%;
+	height: 100%;
+	top:0upx;
+	position: absolute;
+	opacity:0.0;
+}
+</style>

+ 107 - 0
pages/auth/wxLogin.vue

@@ -0,0 +1,107 @@
+<template>
+  <view class="container">
+    
+  </view>
+</template>
+
+<script>
+import { loginByMp } from '@/api/user'
+export default {
+	data() {
+		return {
+			code:null,
+		}
+	},
+	computed: {
+	},
+	onLoad(option) 
+	{
+		// #ifdef H5
+		if (this.checkWeixin()) {
+			let code = this.getUrlCode('code')
+			if (code==null||code==undefined) {
+				uni.showToast({
+					icon:'none',
+					title: "code不存在",
+				});
+			} else {
+				this.code = code
+				this.loginByMp();
+			}
+		} else {
+			uni.showToast({
+				icon:'none',
+				title: "请在微信中打开",
+			});
+			//跳转到手机号密码登录
+		}
+		// #endif
+	},
+	onUnload() {
+	},
+	mounted() {
+    
+	},
+	methods: {
+		loginByMp(){
+			let code = this.code // 获取开发code
+			var tuiUserId=uni.getStorageSync('tuiUserId');
+			uni.showLoading({
+				title:"处理中..."
+			})
+			loginByMp({
+			   code: code,
+			   tuiUserId:tuiUserId
+			})
+			.then( res => {
+				if(res.code==200||res.code==40163){
+					uni.hideLoading();
+					uni.showToast({
+						icon:'none',
+						title: "登录成功",
+					});
+					uni.setStorageSync('AppToken',res.token);
+					uni.setStorageSync('userInfo',JSON.stringify(res.user));
+					//that.getUserInfo()
+					uni.$emit('refreshLogin');
+					uni.reLaunch({
+						url:"/pages/home/index"
+					})
+				}
+				else{
+					uni.hideLoading();
+					uni.showToast({
+						icon:'none',
+						title: res.msg,
+					});
+				}
+			   
+			 })
+			 .catch(error => {
+				console.log(error)
+				uni.hideLoading();
+				uni.showToast({
+					icon:'none',
+					title: "登录接口调用失败",
+				});
+			 })
+		},
+		checkWeixin(){
+			var ua = window.navigator.userAgent.toLowerCase();
+			if (ua.match(/micromessenger/i) == 'micromessenger') {
+				return true;
+			} else {
+				return false;
+			}
+		},
+		//URL地址是否存在CODE
+		getUrlCode(name) {
+			return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ''])[1]
+				.replace(/\+/g, '%20')) || null
+		}
+	}
+}
+</script>
+
+<style lang="scss">
+</style>

+ 87 - 0
pages/common/launch.vue

@@ -0,0 +1,87 @@
+<template>
+	<view class="content">
+		<view class="loadding" v-if="loadding==true">
+			<image src="/static/images/logo.jpg"></image>
+			<text class="text">御君方</text>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {getDicts} from '@/api/index'
+	export default {
+		data() {
+			return {
+				loadding:true,
+			};
+		},
+		methods: {
+			
+			getDicts:function(){
+				getDicts().then(
+					res => {
+						if(res.code==200){
+							console.log(res)
+							uni.setStorageSync('dicts',JSON.stringify(res));
+							
+						}else{
+							 
+						}
+						this.loadding=false;
+						this.navigatHandler();
+					},
+					rej => {}
+				);
+			},
+			navigatHandler: function() {
+				uni.reLaunch({
+					url: '../home/index',
+					animationType: 'pop-in',
+					animationDuration: 100
+				})
+			},
+			
+		},
+		onLoad() {
+			
+			this.getDicts()
+			
+			
+		}
+	};
+ 
+</script>
+
+.
+<style lang="scss">
+	content {
+		height: 100%;
+		width: 100%;
+		position: relative;
+		padding-top: 0;
+		
+	}
+	.loadding{
+		background-color: #fff;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		z-index: 9999;
+		image{
+			border-radius: 50%;
+			animation: load linear 1s infinite;
+			width: 120rpx;
+			height:120rpx;
+		}
+		.text{
+			font-size: 28rpx;
+			margin-top: 20rpx;
+		}
+	}
+</style>

+ 93 - 0
pages/doctor/doctorQr.vue

@@ -0,0 +1,93 @@
+<template>
+	<view class="content">
+		<view class="item">
+			<image mode="aspectFit" :show-menu-by-longpress="true" :src="urls[0]"  ></image>
+			<!-- <view class="btn" @click="savePhoto()">
+				保存本地
+			</view> -->
+		</view>
+		 
+	</view>
+</template>
+
+<script>
+	
+	export default {
+		data() {
+			return {
+				urls:['https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20221119/61b277f036444bdebf6be3e9626b272c.jpg']
+			};
+		},
+		onLoad(option) {
+			 
+			
+		},
+		onShow() {
+		},
+		methods: {
+			savePhoto(){
+				var that=this;
+				uni.downloadFile({ //下载文件资源到本地,返回文件的本地临时路径
+						url: that.urls[0], //网络图片路径
+						success:(res)=>{
+								  var imageUrl=res.tempFilePath;//临时文件路径
+								  uni.saveImageToPhotosAlbum({ //保存图片到系统相册
+									   filePath: imageUrl,
+									   success: (res) => {
+										  console.log('图片保存成功');
+									   },
+									   fail: (err) => {
+										   console.log('图片保存失败');
+									   }
+								  })
+						}
+				}) 
+			},
+			showImg() {
+			 	//预览图片
+			 	uni.previewImage({
+					urls: this.urls,
+			 	 	current: this.urls[0],
+					// 长按图片显示操作菜单,如不填默认为保存相册
+					longPressActions:{
+						itemList:[]
+					}
+			 	});
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content{
+		height: 100%;
+		width: 100%;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		.item{
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			justify-content: center;
+			width: 100vw;
+			height: 100vh;
+			image{
+				width: 100%;
+				height:100%;
+			}
+			.btn{
+				margin-top: 30rpx;
+				background-image: linear-gradient(#ff4545,red);
+				padding: 30rpx 60rpx;
+				border-radius: 60rpx;
+				background-color: red;
+				color: #fff;
+				font-size: 30rpx;
+				font-family: 'PingFangTC-Regular';
+				font-weight: 600;
+			}
+		}
+		
+	}
+</style>

+ 261 - 0
pages/healthy/detail.vue

@@ -0,0 +1,261 @@
+<template>
+	<view class="content">
+		<view class="detail-cont">
+			<view class="title">{{item.title}}</view>
+			<view class="info">
+				<view class="reads">阅读数:{{item.views}}</view>
+				<view class="time">{{item.publishTime}}</view>
+			</view>
+			<!-- 正文 -->
+			<view class="full-text">
+				<view v-html="item.contents"></view>
+			</view>
+		</view>
+		<!-- 最近阅读 -->
+		<view class="recent-reads">
+			<view class="left">
+				<text class="label">最近阅读</text>
+				<view class="peop-box" @click="showUsers">
+					<view class="head-box">
+						<view class="head" v-for="(subitem,j) in views" :key="j">
+							<image :src="subitem.avatar==null?'../../static/images/detault_head.jpg':subitem.avatar" mode=""></image>
+						</view>
+					</view>
+					<image class="arrow" src="../../static/images/arrow_gray.png" mode=""></image>
+				</view>
+			</view>
+			<view class="share-btn">
+				<image src="../../static/images/share.png" mode=""></image>
+				<text>分享</text>
+				<button  class="share" data-name="shareBtn" open-type="share">分享</button>
+			</view>
+		</view>
+		<!-- 咨询按钮 -->
+		<view class="inquiry">
+			<view class="content">
+				<image src="../../static/images/consult.png" mode=""></image>
+				<text class="text">咨询</text>
+				<button class="contact-btn" open-type="contact"></button>
+			</view>
+			
+		</view>
+	</view> 
+</template>
+
+<script>
+	import {getArticleByArticleId,updateView} from '@/api/article'
+	export default {
+		data() {
+			return {
+				articleId:null,
+				item:{},
+				views:[],
+			};
+		},
+		onLoad(option) {
+			this.articleId=option.articleId;
+			this.utils.isLogin().then(res => {
+				if(res){
+					this.updateView();
+				}
+			})
+		},
+		onShow() {
+			this.getArticleByArticleId();
+		},
+		methods:{
+			updateView(){
+				updateView(this.articleId).then(
+					res => {
+					},
+					rej => {}
+				);
+			},
+			getArticleByArticleId(){
+				let data = {articleId:this.articleId};
+				getArticleByArticleId(data).then(
+					res => {
+						if(res.code==200){
+							this.item=res.data;
+							this.views=res.views;
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			// 查看阅读用户
+			showUsers() {
+				uni.navigateTo({
+					url: './readUsers?articleId='+this.articleId
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		height: 100%;
+	}
+	.content{
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+	}
+	.detail-cont{
+		flex: 1;
+		padding: 40upx;
+		overflow-y: auto;
+		.title{
+			font-size: 40upx;
+			font-family: PingFang SC;
+			// font-weight: bold;
+			color: #222222;
+			line-height: 70upx;
+		}
+		.info{
+			display: flex;
+			align-items: center;
+			font-size: 24upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+			line-height: 48upx;
+			margin: 23upx 0;
+			.reads{
+				margin-right: 30upx;
+			}
+		}
+		.full-text{
+			font-size: 36upx;
+			font-family: PingFang SC;
+			// font-weight: 500;
+			color: #222222;
+			line-height: 60upx;
+		}
+	}
+	.recent-reads{
+		flex-shrink: 0;
+		box-sizing: border-box;
+		height: 121upx;
+		background: #FFFFFF;
+		border-top: 1px solid #F0F0F0;
+		padding: 0 40upx 0 37upx;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		.left{
+			display: flex;
+			align-items: center;
+			.label{
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #666666;
+				line-height: 1;
+				margin-right: 20upx;
+			}
+			.peop-box{
+				display: flex;
+				align-items: center;
+				.head-box{
+					margin-right: 28upx;
+					display: flex;
+					align-items: center;
+					.head{
+						width: 48upx;
+						height: 48upx;
+						border-radius: 50%;
+						overflow: hidden;
+						box-shadow: 0 0 0 1px #fff;
+						margin-right: -10upx;
+						image{
+							width: 100%;
+							height: 100%;
+						}
+					}
+				}
+				.arrow{
+					width: 13upx;
+					height: 23upx;
+				}
+			}
+		}
+		.share-btn{
+			position: relative;
+			width: 240upx;
+			height: 80upx;
+			line-height: 80upx;
+			font-size: 30upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #FFFFFF;
+			background: #2BC7B9;
+			border-radius: 40upx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			image{
+				width: 32upx;
+				height: 32upx;
+				margin-right: 15upx;
+			}
+			.share{
+				position: absolute;
+				width: 100%;
+				height: 100%;
+				opacity: 0;
+			}
+		}
+	}
+	.inquiry{
+		width: 131upx;
+		height: 131upx;
+		position: fixed;
+		right: 22upx;
+		bottom: 193upx;
+		z-index: 99;
+		
+		.content{
+			position: relative;
+			image{
+				width: 100%;
+				height: 100%;
+				position: absolute;
+				top: 0;
+				left: 0;
+				z-index: 9;
+			}
+			.text{
+				position: absolute;
+				top: 70upx;
+				left: 50%;
+				transform: translateX(-50%);
+				z-index: 10;
+				font-size: 22upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #2BC7B9;
+				line-height: 1;
+			}
+			 
+		}
+		
+		
+	}
+	.contact-btn{
+		display: inline-block;
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		opacity: 0;
+		z-index: 9999;
+	}
+</style>

+ 351 - 0
pages/healthy/index.vue

@@ -0,0 +1,351 @@
+<template>
+	<view>
+		<view class="top-content">
+			<!-- 这里是状态栏 -->
+			<view class="status_bar" :style="{height: statusBarHeight}"></view>
+			<view class="top-title">健康百科</view>
+			<!-- 搜索框 -->
+			<view class="search-cont">
+				<view class="inner">
+					<image class="icon-search" src="../../static/images/search.png" mode=""></image>
+					<input type="text" v-model="searchValue" placeholder="输入关键字搜索" confirm-type="search" @confirm="doSearch" placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
+				</view>
+			</view>
+			<view class="keyword-list">
+			<!-- 关键字列表 -->
+			<scroll-view   scroll-x="true" >
+				<view class="inner">
+					<view v-for="(item,index) in cates" :key="index" :class="choseCateId == item.cateId?'item active':'item'" @click="choseCate(item)">
+						{{ item.cateName }}
+					</view>
+				</view>
+			</scroll-view>
+			</view>
+		</view>
+		<!-- 知识列表 -->
+		<mescroll-body  :top="top"  ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+			<view class="know-list">
+				<view class="item" v-for="(item,index) in dataList" :key="index" @click="showDetail(item)">
+					<view class="left">
+						<view class="title ellipsis2">{{ item.title }}</view>
+						<view class="info-box">
+							<view class="readers">
+								<view class="head-box" v-if="item.viewsList!=null&&item.viewsList.length>0">
+									<view class="head" v-for="(subitem,j) in item.viewsList" :key="j">
+										<image v-if="subitem!=null" :src="subitem.avatar==null?'../../static/images/detault_head.jpg':subitem.avatar" mode=""></image>
+									</view>
+								</view>
+								<view class="readings">
+									<image class="eye" src="../../static/images/eye.png" ></image>
+									<text class="num">{{item.views}}</text>
+								</view>
+							</view>
+							<view class="time">{{item.publishTime}}</view>
+						</view>
+					</view>
+					<view class="right">
+						<image :src="item.imageUrl" mode="aspectFill"></image>
+					</view>
+				</view>
+			</view>
+		</mescroll-body>
+		
+	</view>
+</template>
+
+<script>
+	import {getArticleCate,getArticleList} from '@/api/article'
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	export default {
+		mixins: [MescrollMixin], 
+		data() {
+			return {
+				top:'0px',
+				cates:[],
+				choseCateId:0,
+				// 状态栏的高度
+				statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
+				searchValue: '',
+				mescroll:null,
+				// 上拉加载的配置
+				downOption:{
+					
+				},
+				upOption: {
+					onScroll:true,
+					use: true, // 是否启用上拉加载; 默认true
+					page: {
+						num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
+						size: 10 // 每页数据的数量,默认10
+					},
+					noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
+					empty: {
+						icon:'/static/images/no_data.png',
+						tip: '暂无数据'
+					},
+					textNoMore:'已经到底了'
+				},
+				// 列表数据
+				dataList: [],
+			};
+		},
+		onShow() {
+			this.getArticleCate();
+			var that=this;
+			setTimeout(function(){
+				let query = uni.createSelectorQuery().select(".top-content");
+		      query.boundingClientRect(function(data) { //data - 各种参数
+		       	console.log(data.height)  // 获取元素宽度
+					that.top=data.height+"px";
+		      }).exec()
+			},500);
+			
+	// 		let info1 = uni.createSelectorQuery().select(".keyword-list");
+	//      info1.boundingClientRect(function(data) { //data - 各种参数
+	//        	console.log(data.height)  // 获取元素宽度
+				 
+	//       }).exec()
+			
+		},
+		methods:{
+			doSearch(){
+				console.log(this.searchValue)
+				this.mescroll.resetUpScroll()
+			},
+			getArticleCate(){
+				var that=this;
+				let data = {};
+				getArticleCate(data).then(
+					res => {
+						if(res.code==200){
+							this.cates=res.data;
+						 
+							
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
+			},
+			/*下拉刷新的回调 */
+			downCallback(mescroll) {
+				mescroll.resetUpScroll()
+			},
+			upCallback(page) {
+				//联网加载数据
+				var that = this;
+				var data = {
+					keyword:this.searchValue,
+					cateId:this.choseCateId,
+					page: page.num,
+					pageSize: page.size
+				};
+				getArticleList(data).then(res => {
+					if(res.code==200){
+						//设置列表数据
+						if (page.num == 1) {
+							that.dataList = res.data.list; 
+							
+						} else {
+							that.dataList = that.dataList.concat(res.data.list);
+							 
+						}
+						that.mescroll.endBySize(res.data.list.length, res.data.total);
+						
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: "请求失败",
+						});
+						that.dataList = null;
+						that.mescroll.endErr();
+					}
+				});
+			},
+			// 关键词选择
+			choseCate(item) {
+				this.choseCateId = item.cateId;
+				this.mescroll.resetUpScroll()
+			},
+			// 查看详情
+			showDetail(item) {
+				uni.navigateTo({
+					url: './detail?articleId=' + item.articleId
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.status_bar {
+		width: 100%;
+		background-color: #FFFFFF;
+	}
+	.top-content{
+		width: 100%;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 10;
+	}
+	.top-title{
+		height: 88upx;
+		line-height: 88upx;
+		font-size: 42upx;
+		font-family: Source Han Sans CN;
+		font-weight: bold;
+		color: #222222;
+		padding-left: 41upx;
+		background-color: #FFFFFF;
+	}
+	.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;
+			}
+		}
+	}
+	.keyword-list{
+		box-sizing: border-box;
+		background: #fff;
+		padding: 10upx 27upx;
+		height: 100upx;
+		.inner{
+			display: flex;
+		}
+		.item{
+			flex-shrink: 0;
+			padding: 0 24upx;
+			height: 64upx;
+			line-height: 64upx;
+			font-size: 28upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #2BC7B9;
+			background: #F5FFFE;
+			border: 1px solid #8AD5CE;
+			border-radius: 32upx;
+			margin: 0 20upx 20upx 0;
+			&.active{
+				color: #FFFFFF;
+				background: #2BC7B9;
+				border: 1px solid #2BC7B9;
+			}
+		}
+	}
+	.know-list{
+		margin-top: 20upx;
+		padding: 0 10upx;
+		.item{
+			box-sizing: border-box;
+			height: 271upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			padding: 40upx 30upx;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			margin-bottom: 20upx;
+			.left{
+				flex: 1;
+				padding-right: 40upx;
+				height: 190upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				.title{
+					font-size: 32upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					line-height: 48upx;
+				}
+				.info-box{
+					width: 100%;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					.readers{
+						display: flex;
+						align-items: center;
+						.head-box{
+							margin-right: 27upx;
+							display: flex;
+							align-items: center;
+							.head{
+								width: 48upx;
+								height: 48upx;
+								border-radius: 50%;
+								overflow: hidden;
+								box-shadow: 0 0 0 1px #fff;
+								margin-right: -10upx;
+								image{
+									width: 100%;
+									height: 100%;
+								}
+							}
+						}
+						.readings{
+							display: flex;
+							align-items: center;
+							.eye{
+								width: 26upx;
+								height: 20upx;
+								margin-right: 9upx;
+							}
+							.num{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #999999;
+								line-height: 1;
+							}
+						}
+					}
+					.time{
+						font-size: 24upx;
+						line-height: 1;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+					}
+				}
+			}
+			.right{
+				width: 250upx;
+				height: 190upx;
+				border-radius: 8upx;
+				overflow: hidden;
+				image{
+					width: 100%;
+					height: 100%;
+				}
+			}
+		}
+	}
+</style>

+ 121 - 0
pages/healthy/readUsers.vue

@@ -0,0 +1,121 @@
+<template>
+	<view>
+		<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+		<view class="user-list">
+			<view class="item" v-for="(item,index) in dataList" :key="index">
+				<view class="img-box">
+					<image :src="item.avatar==null?'../../static/images/detault_head.jpg':item.avatar" mode=""></image>
+				</view>
+				<text class="name">{{item.nickname}}</text>
+			</view>
+		</view>
+		</mescroll-body>
+	</view>
+</template>
+
+<script>
+	import {getArticleViewList} from '@/api/article';
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	export default {
+		mixins: [MescrollMixin], 
+		data() {
+			return {
+				articleId:null,
+				mescroll:null,
+				// 上拉加载的配置
+				upOption: {
+					onScroll:true,
+					use: true, // 是否启用上拉加载; 默认true
+					page: {
+						num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
+						size: 10 // 每页数据的数量,默认10
+					},
+					noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
+					empty: {
+						icon:'/static/images/no_data.png',
+						tip: '暂无数据'
+					}
+				},
+				// 列表数据
+				dataList: [],
+				
+			};
+		},
+		onLoad(option) {
+			this.articleId=option.articleId;
+		},
+		methods:{
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
+			},
+			/*下拉刷新的回调 */
+			downCallback(mescroll) {
+				mescroll.resetUpScroll()
+			},
+			upCallback(page) {
+				//联网加载数据
+				var that = this;
+				var data = {
+					articleId:this.articleId,
+					page: page.num,
+					pageSize: page.size
+				};
+				getArticleViewList(data).then(res => {
+					if(res.code==200){
+						//设置列表数据
+						if (page.num == 1) {
+							that.dataList = res.data.list; 
+							
+						} else {
+							that.dataList = that.dataList.concat(res.data.list);
+							 
+						}
+						that.mescroll.endBySize(res.data.list.length, res.data.total);
+						
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: "请求失败",
+						});
+						that.dataList = null;
+						that.mescroll.endErr();
+					}
+				});
+			},
+			 
+		}
+	}
+</script>
+
+<style lang="scss">
+	.user-list{
+		background: #FFFFFF;
+		padding: 40upx 30upx;
+		margin-top: 20upx;
+		.item{
+			margin-bottom: 40upx;
+			display: flex;
+			align-items: center;
+			&:last-child{
+				margin-bottom: 0;
+			}
+			.img-box{
+				width: 80upx;
+				height: 80upx;
+				border-radius: 50%;
+				overflow: hidden;
+				margin-right: 30upx;
+				image{
+					width: 100%;
+					height: 100%;
+				}
+			}
+			.name{
+				font-size: 34upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #333333;
+			}
+		}
+	}
+</style>

+ 72 - 0
pages/home/cert.vue

@@ -0,0 +1,72 @@
+<template>
+	<view class="my-content">
+		<view class="item" v-for="item in certs">
+			<image @click="showImg(item)" :src="item"></image>
+		</view>
+		
+	</view>
+</template>
+
+<script>
+ 
+ export default {
+ 	data() {
+ 		return {
+			 certs:[
+			 ]
+ 		}
+ 	},
+	onLoad(val) {
+		 var config=JSON.parse(uni.getStorageSync('config'));
+		 this.certs=config.certs.split(",");
+		 console.log(this.certs)
+	},
+	methods: {
+		showImg(item) {
+			 //预览图片
+			 var urls=[];
+			 urls.push(item)
+			 console.log(urls)
+			 console.log(item)
+			 uni.previewImage({
+			 	urls: urls,
+			 	current: 0
+			 });
+		},
+	}
+	
+	
+ 	 
+ }
+ 
+ 
+</script>
+
+
+<style scoped lang="scss">
+page{
+	height: 100%;
+}
+.my-content{
+	width: 100%;
+	display: flex;
+	flex-direction: column;
+	justify-content: center;
+	align-items: center;
+	.item{
+		display: flex;
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
+		margin: 30rpx;
+		width: 100%;
+		image{
+			
+			
+		}
+	}
+	
+}
+ 
+
+</style>

+ 80 - 0
pages/home/companyInfo.vue

@@ -0,0 +1,80 @@
+<template>
+	<view class="content">
+		<view class="bg">
+			<image  src="https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20240715/93fc6ee39e034d24916fe54e195a0c6e.jpg"></image>
+		</view>
+		<view class="video-cont">
+			<video
+			autoplay
+			v-if="config!=null"
+			:src="config.videoUrl"
+			style="width: 95%;"
+			controls
+			></video> 
+		</view>
+		
+	</view>
+</template>
+
+<script>
+ import {getStoreConfig} from '@/api/common'
+ export default {
+ 	data() {
+ 		return {
+ 			config:null,
+ 		}
+ 	},
+ 	onLoad(option) {
+ 		
+ 	},
+	onShow() {
+		this.getStoreConfig();
+	},
+ 	methods: {
+ 		getStoreConfig(){
+ 			getStoreConfig().then(
+ 				res => {
+ 					if(res.code==200){
+ 						this.config=res.data
+ 						console.log(this.config);
+ 					}
+ 				},
+ 				rej => {}
+ 			);
+ 			
+ 		}
+ 	}
+ }
+ 
+</script>
+
+
+<style scoped lang="scss">
+page{
+}
+.content{
+	width: 100%;
+	height:100%;
+	position: relative;
+	.bg{
+		width: 100%;
+		height:100%;
+		position: absolute;
+		image{
+			width:100%;
+			height:3500px;
+		}
+	}
+	.video-cont{
+		padding-top: 390px;
+		width: 100%;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		
+	}
+	
+}
+ 
+
+</style>

+ 279 - 0
pages/home/components/HotProduct.vue

@@ -0,0 +1,279 @@
+<template>
+    <view class="group-goods" v-if="detail.length>0">
+        <view class="title-box x-bc"  >
+            <text class="title">热门榜单</text>
+            <view class="group-people x-f" @tap="navTo('/pages/home/productList')">
+                <text class="tip">更多</text>
+                <text class="cuIcon-right"></text>
+            </view>
+        </view>
+        <view class="goods-box swiper-box x-f">
+            <swiper class="carousel" circular @change="swiperChange" :autoplay="true" interval="10000" duration="2000">
+                <swiper-item v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
+                    <view class="goods-list-box x-f">
+                        <block v-for="mgoods in goods" :key="mgoods.productId" >
+                            <view class="min-goods"  @tap="showProduct(mgoods)"  >
+                                <view class="img-box">
+                                    <view class="tag">hot</view>
+                                    <image class="img" :src="mgoods.image" mode="widthFix"></image>
+                                </view>
+                                <view class="price-box">
+                                    <view class="y-f">
+                                        <text class="seckill-current">¥{{  mgoods.price  }}</text>
+                                        <text class="original">销量{{ mgoods.sales }}{{mgoods.unitName}}</text>
+                                    </view>
+                                </view>
+                                <view class="title">
+                                    <slot name="titleText"></slot>
+                                </view>
+                            </view>
+                        </block>
+                    </view>
+                </swiper-item>
+            </swiper>
+            <view class="swiper-dots" v-if="goodsList.length > 1">
+                <text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length"
+                    :key="index"></text>
+            </view>
+        </view>
+    </view>
+</template>
+
+<script>
+    export default {
+        name: "HotProduct",
+         
+        data() {
+            return {
+                goodsList: [],
+                swiperCurrent: 0
+            };
+        },
+        props: {
+            detail: Array
+        },
+        computed: {},
+        created() {},
+        watch: {
+            detail(next) {
+                this.goodsList = this.sortData(next, 4);
+            }
+        },
+        methods: {
+            swiperChange(e) {
+                this.swiperCurrent = e.detail.current;
+            },
+            // 数据分层
+            sortData(oArr, length) {
+                let arr = [];
+                let minArr = [];
+                oArr.forEach(c => {
+                    if (minArr.length === length) {
+                        minArr = [];
+                    }
+                    if (minArr.length === 0) {
+                        arr.push(minArr);
+                    }
+                    minArr.push(c);
+                });
+
+                return arr;
+            },
+			navTo(url){
+				uni.navigateTo({
+					url: url
+				})
+			},
+			showProduct(item){
+				uni.navigateTo({
+					url: '/pages/shopping/productDetails?productId='+item.productId
+				})
+			},
+            
+        }
+    }
+</script>
+
+
+<style lang="scss" scoped>
+    .group-goods {
+        position: relative;
+        z-index: 1;
+		background: #FFFFFF;
+		border-radius: 16upx;
+		margin-bottom: 20upx;
+		margin-top: 20upx;
+		padding: 20upx;
+    }
+
+    .swiper-box,
+    .carousel {
+        width: 700rpx;
+        height: 240upx;
+        position: relative;
+        border-radius: 20rpx;
+
+        .carousel-item {
+            width: 100%;
+            height: 100%;
+            // padding: 0 28upx;
+            overflow: hidden;
+        }
+
+        .swiper-image {
+            width: 100%;
+            height: 100%;
+            // border-radius: 10upx;
+            background: #ccc;
+        }
+    }
+
+    .swiper-dots {
+        display: flex;
+        position: absolute;
+        left: 50%;
+        transform: translateX(-50%);
+        bottom: 0rpx;
+        z-index: 66;
+
+        .dot {
+            width: 45rpx;
+            height: 3rpx;
+            background: #eee;
+            border-radius: 50%;
+            margin-right: 10rpx;
+        }
+
+        .dot-active {
+            width: 45rpx;
+            height: 3rpx;
+            background: #a8700d;
+            border-radius: 50%;
+            margin-right: 10rpx;
+        }
+    }
+
+    // 今日必拼+限时抢购
+    .group-goods {
+        background: #fff;
+        border-radius: 20rpx;
+        overflow: hidden;
+
+        .title-box {
+            padding-bottom: 20rpx;
+
+            .title {
+                font-size: 32rpx;
+                font-weight: bold;
+            }
+
+            .group-people {
+                .time-box {
+                    font-size: 26rpx;
+                    color: #edbf62;
+
+                    .count-text-box {
+                        width: 30rpx;
+                        height: 34rpx;
+                        background: #edbf62;
+                        text-align: center;
+                        line-height: 34rpx;
+                        font-size: 24rpx;
+                        border-radius: 6rpx;
+                        color: rgba(#fff, 0.9);
+                        margin: 0 8rpx;
+                    }
+                }
+
+                .head-box {
+                    .head-img {
+                        width: 40rpx;
+                        height: 40rpx;
+                        border-radius: 50%;
+                        background: #ccc;
+                    }
+                }
+
+                .tip {
+                    font-size: 24rpx;
+                    padding-left: 30rpx;
+                    color: #999999;
+                }
+
+                .cuIcon-right {
+                    font-size: 30rpx;
+                    line-height: 28rpx;
+                    color: #666;
+                }
+            }
+        }
+
+        .goods-box {
+            .goods-item {
+                margin-right: 22rpx;
+
+                &:nth-child(4n) {
+                    margin-right: 0;
+                }
+            }
+        }
+        .min-goods{
+            margin-right: 22rpx;
+
+        }
+    }
+	.min-goods {
+	  width: 152rpx;
+	  background: #fff;
+	  .img-box {
+	    width: 152rpx;
+	    height: 152rpx;
+	    overflow: hidden;
+	    position: relative;
+	
+	    .tag {
+	      position: absolute;
+	      left: 0;
+	      bottom: 0rpx;
+	      z-index: 2;
+	      line-height: 35rpx;
+	      background: linear-gradient(132deg, rgba(243, 223, 177, 1), rgba(243, 223, 177, 1), rgba(236, 190, 96, 1));
+	      border-radius: 0px 18rpx 18rpx 0px;
+	      padding: 0 10rpx;
+	      font-size: 24rpx;
+	      font-family: PingFang SC;
+	      font-weight: bold;
+	      color: rgba(120, 79, 6, 1);
+	    }
+	
+	    .img {
+	      width: 100%;
+	      background-color: #ccc;
+	    }
+	  }
+	
+	  .price-box {
+	    width: 100%;
+	    margin-top: 10rpx;
+	
+	    .seckill-current {
+	      font-size: 30rpx;
+	      font-weight: 500;
+	      color: rgba(225, 33, 43, 1);
+	    }
+	
+	    .original {
+	      font-size: 20rpx;
+	      font-weight: 400;
+	      // text-decoration: line-through;
+	      color: rgba(153, 153, 153, 1);
+	      margin-left: 14rpx;
+	    }
+	  }
+	
+	  .title {
+	    font-size: 26rpx;
+	  }
+	}
+	
+</style>

+ 280 - 0
pages/home/components/NewProduct.vue

@@ -0,0 +1,280 @@
+<template>
+    <view class="group-goods" v-if="detail.length>0">
+        <view class="title-box x-bc"  >
+            <text class="title">新品首发</text>
+            <view class="group-people x-f" @tap="navTo('/pages/home/productList')">
+                <text class="tip">更多</text>
+                <text class="cuIcon-right"></text>
+            </view>
+        </view>
+        <view class="goods-box swiper-box x-f">
+            <swiper class="carousel" circular @change="swiperChange" :autoplay="true" interval="10000" duration="2000">
+                <swiper-item v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
+                    <view class="goods-list-box x-f">
+                        <block v-for="mgoods in goods" :key="mgoods.productId"  >
+                            <view class="min-goods" @tap="showProduct(mgoods)"  >
+                                <view class="img-box">
+                                    <view class="tag">new</view>
+                                    <image class="img" :src="mgoods.image" mode="widthFix"></image>
+                                </view>
+                                <view class="price-box">
+                                    <view class="y-f">
+                                        <text class="seckill-current">¥{{  mgoods.price  }}</text>
+                                        <text class="original">销量{{ mgoods.sales }}{{mgoods.unitName}}</text>
+                                    </view>
+                                </view>
+                                <view class="title">
+                                    <slot name="titleText"></slot>
+                                </view>
+                            </view>
+                        </block>
+                    </view>
+                </swiper-item>
+            </swiper>
+            <view class="swiper-dots" v-if="goodsList.length > 1">
+                <text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length"
+                    :key="index"></text>
+            </view>
+        </view>
+    </view>
+</template>
+
+<script>
+    export default {
+        name: "NewProduct",
+         
+        data() {
+            return {
+                goodsList: [],
+                swiperCurrent: 0
+            };
+        },
+        props: {
+            detail: Array
+        },
+        computed: {},
+        created() {},
+        watch: {
+            detail(next) {
+                this.goodsList = this.sortData(next, 4);
+            }
+        },
+        methods: {
+            swiperChange(e) {
+                this.swiperCurrent = e.detail.current;
+            },
+            // 数据分层
+            sortData(oArr, length) {
+                let arr = [];
+                let minArr = [];
+                oArr.forEach(c => {
+                    if (minArr.length === length) {
+                        minArr = [];
+                    }
+                    if (minArr.length === 0) {
+                        arr.push(minArr);
+                    }
+                    minArr.push(c);
+                });
+
+                return arr;
+            },
+			navTo(url){
+				uni.navigateTo({
+					url: url
+				})
+			},
+			showProduct(item){
+				uni.navigateTo({
+					url: '/pages/shopping/productDetails?productId='+item.productId
+				})
+			},
+			
+            
+        }
+    }
+</script>
+
+
+<style lang="scss" scoped>
+    .group-goods {
+        position: relative;
+        z-index: 1;
+		background: #FFFFFF;
+		border-radius: 16upx;
+		margin-bottom: 20upx;
+		margin-top: 20upx;
+		padding: 20upx;
+    }
+
+    .swiper-box,
+    .carousel {
+        width: 700rpx;
+        height: 240upx;
+        position: relative;
+        border-radius: 20rpx;
+
+        .carousel-item {
+            width: 100%;
+            height: 100%;
+            // padding: 0 28upx;
+            overflow: hidden;
+        }
+
+        .swiper-image {
+            width: 100%;
+            height: 100%;
+            // border-radius: 10upx;
+            background: #ccc;
+        }
+    }
+
+    .swiper-dots {
+        display: flex;
+        position: absolute;
+        left: 50%;
+        transform: translateX(-50%);
+        bottom: 0rpx;
+        z-index: 66;
+
+        .dot {
+            width: 45rpx;
+            height: 3rpx;
+            background: #eee;
+            border-radius: 50%;
+            margin-right: 10rpx;
+        }
+
+        .dot-active {
+            width: 45rpx;
+            height: 3rpx;
+            background: #a8700d;
+            border-radius: 50%;
+            margin-right: 10rpx;
+        }
+    }
+
+    // 今日必拼+限时抢购
+    .group-goods {
+        background: #fff;
+        border-radius: 20rpx;
+        overflow: hidden;
+
+        .title-box {
+            padding-bottom: 20rpx;
+
+            .title {
+                font-size: 32rpx;
+                font-weight: bold;
+            }
+
+            .group-people {
+                .time-box {
+                    font-size: 26rpx;
+                    color: #edbf62;
+
+                    .count-text-box {
+                        width: 30rpx;
+                        height: 34rpx;
+                        background: #edbf62;
+                        text-align: center;
+                        line-height: 34rpx;
+                        font-size: 24rpx;
+                        border-radius: 6rpx;
+                        color: rgba(#fff, 0.9);
+                        margin: 0 8rpx;
+                    }
+                }
+
+                .head-box {
+                    .head-img {
+                        width: 40rpx;
+                        height: 40rpx;
+                        border-radius: 50%;
+                        background: #ccc;
+                    }
+                }
+
+                .tip {
+                    font-size: 24rpx;
+                    padding-left: 30rpx;
+                    color: #999999;
+                }
+
+                .cuIcon-right {
+                    font-size: 30rpx;
+                    line-height: 28rpx;
+                    color: #666;
+                }
+            }
+        }
+
+        .goods-box {
+            .goods-item {
+                margin-right: 22rpx;
+
+                &:nth-child(4n) {
+                    margin-right: 0;
+                }
+            }
+        }
+        .min-goods{
+            margin-right: 22rpx;
+
+        }
+    }
+	.min-goods {
+	  width: 152rpx;
+	  background: #fff;
+	  .img-box {
+	    width: 152rpx;
+	    height: 152rpx;
+	    overflow: hidden;
+	    position: relative;
+	
+	    .tag {
+	      position: absolute;
+	      left: 0;
+	      bottom: 0rpx;
+	      z-index: 2;
+	      line-height: 35rpx;
+	      background: linear-gradient(132deg, rgba(243, 223, 177, 1), rgba(243, 223, 177, 1), rgba(236, 190, 96, 1));
+	      border-radius: 0px 18rpx 18rpx 0px;
+	      padding: 0 10rpx;
+	      font-size: 24rpx;
+	      font-family: PingFang SC;
+	      font-weight: bold;
+	      color: rgba(120, 79, 6, 1);
+	    }
+	
+	    .img {
+	      width: 100%;
+	      background-color: #ccc;
+	    }
+	  }
+	
+	  .price-box {
+	    width: 100%;
+	    margin-top: 10rpx;
+	
+	    .seckill-current {
+	      font-size: 30rpx;
+	      font-weight: 500;
+	      color: rgba(225, 33, 43, 1);
+	    }
+	
+	    .original {
+	      font-size: 20rpx;
+	      font-weight: 400;
+	      // text-decoration: line-through;
+	      color: rgba(153, 153, 153, 1);
+	      margin-left: 14rpx;
+	    }
+	  }
+	
+	  .title {
+	    font-size: 26rpx;
+	  }
+	}
+	
+</style>

+ 79 - 0
pages/home/content.vue

@@ -0,0 +1,79 @@
+<template>
+	<view class="content">
+		 <view   v-html="content"></view>
+	</view>
+</template>
+
+<script>
+ export default {
+ 	data() {
+ 		return {
+			content:"",
+ 		}
+ 	},
+	onLoad(val) {
+		this.content=uni.getStorageSync('content');
+		console.log(this.content)
+	}
+ 	 
+ }
+ 
+ 
+</script>
+
+
+<style scoped lang="scss">
+page{
+	height: 100%;
+}
+.content{
+	height: 100%;
+}
+.logo{
+	padding-top: 15%;
+	text-align: center;
+	image{
+		width: 80px;
+		height: 80px;
+	}
+	p{
+		margin: 10px 0px;
+		font-size: 14px;
+	}
+}
+.set-box{
+	margin-top: 30upx;
+	background: #fff;
+	padding: 0 40upx;
+	.item{
+		
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding: 25upx 0;
+		.left{
+			display: flex;
+			align-items: center;
+			.text{
+				font-size: 30upx;
+				color: #666;
+			}
+		}
+		.right{
+			width: 10upx;
+			height: 20upx;
+		}
+		.right-text{
+			 
+		}
+	}
+}
+.contact-btn {
+  display: inline-block;
+  position: absolute;
+  width: 100%;
+  background: salmon;
+   opacity: 0;
+}
+
+</style>

+ 377 - 0
pages/home/doctorCase.vue

@@ -0,0 +1,377 @@
+<template>
+	<view>
+		<view class="top-fixed">
+			<!-- 搜索框 -->
+			<view class="search-cont">
+				<view class="inner">
+					<image class="icon-search" src="../../static/images/search.png" mode=""></image>
+					<input type="text"  v-model="searchVal" placeholder="输入关键字搜索"  confirm-type="搜索" @confirm="goSearch" placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
+				</view>
+			</view>
+			<!-- tab切换 -->
+			<view class="pub-tab-box">
+				<view class="tab-inner">
+					<view 
+						v-for="(item,index) in depts" 
+						:key="index"
+						:class="deptId == item.departmentId?'item active':'item'"
+						@click="changeDept(item)"
+					>
+						<view class="text">
+							{{ item.departmentName }}
+							<image v-show="deptId == item.departmentId" class="tab-bg" src="../../static/images/tab_bg.png" mode=""></image>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 数据列表 -->
+		<mescroll-body ref="mescroll"  top="190rpx" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+			<view class="cases-list">
+				<view class="item" v-for="(item,index) in dataList" :key="index">
+					<!-- 文字 -->
+					<view class="dec-text ellipsis2">{{item.title}}</view>
+					<!-- 有图 -->
+					<view class="images-box"  v-if="item.imgs!=null"  >
+						<view class="img-item" v-for="(subitem,j) in utils.photosToArr(item.imgs)" @click="showImg(item.imgs)" :key="j">
+							<image :src="subitem" mode="aspectFill" ></image>
+						</view>
+					</view>
+					<!-- 医生信息 -->
+					<view class="doc-info">
+						<view class="head">
+							<image :src="item.doctorHeadImg" mode="aspectFill"></image>
+						</view>
+						<view class="name">{{item.doctorName}}</view>
+						<view class="line"></view>
+						<view class="posit">
+							{{utils.getDictLabelName("doctorPosition",item.doctorPosition)}}
+						</view>
+						<view class="line"></view>
+						<view class="address">{{item.hospitalName}}</view>
+					</view>
+					<view class="answer-box">
+						<!-- 文字回答 -->
+						<text class="text-inner" v-if="item.orderType == '1' ">{{item.replyContent}}</text>
+						<!-- 语音回答 -->
+						<view class="voice-inner" v-if="item.orderType == '2'">
+							<free-audio 
+								startPic='/static/images/play.png' 
+								endPic='/static/images/pause.png'
+								activeColor="#2BC7B9"
+								:audioId="'audio'+index"
+								:url='item.replyAudioUrl'
+							></free-audio>
+						</view>
+					</view>
+					<view class="read-box">
+						<image src="../../static/images/eye.png" mode=""></image>
+						<text class="text">{{item.views}}人看过</text>
+					</view>
+				</view>
+			</view>
+		</mescroll-body>
+	</view>
+</template>
+
+<script>
+	import {getDepartmentList,getDoctorCase} from '@/api/doctorOrder.js'
+	import freeAudio from '@/components/chengpeng-audio/free-audio.vue'
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	
+	export default {
+		components: { freeAudio},
+		mixins: [MescrollMixin], 
+		data() {
+			return {
+				depts:[],
+				deptId:0,
+				searchVal:"",
+				// tab切换
+				casesCateChose: 1,
+				// 上拉加载的配置
+				mescroll:null,
+				// 上拉加载的配置
+				upOption: {
+					onScroll:true,
+					use: true, // 是否启用上拉加载; 默认true
+					page: {
+						num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
+						size: 10 // 每页数据的数量,默认10
+					},
+					noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
+					empty: {
+						icon:'/static/images/no_data.png',
+						tip: '暂无数据'
+					}
+				},
+				// 列表数据
+				dataList: []
+			};
+		},
+		onLoad() {
+			this.getDepartmentList()
+		},
+		methods: {
+			changeDept(item) {
+				this.deptId = item.departmentId;
+				this.mescroll.resetUpScroll()
+				
+			},
+			getDepartmentList(){
+				getDepartmentList().then(res => {
+					if(res.code==200){
+						var allDept={departmentId:0,departmentName:"全部"}
+						this.depts.push(allDept);
+						this.depts=this.depts.concat(res.data);
+						console.log(this.depts)
+						
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: "请求失败",
+						});
+					}
+				});
+			},
+			goSearch(){
+				this.mescroll.resetUpScroll()
+			},
+			showImg(urls) {
+				 var imgArr =urls.split(',');
+				 //预览图片
+				 uni.previewImage({
+				 	urls: imgArr,
+				 	current: imgArr[0]
+				 });
+			},
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
+			},
+			/*下拉刷新的回调 */
+			downCallback(mescroll) {
+				mescroll.resetUpScroll()
+			},
+			upCallback(page) {
+				//联网加载数据
+				var that = this;
+				var data = {
+					departmentId:this.deptId,
+					title:this.searchVal,
+					page: page.num,
+					pageSize: page.size
+				};
+				getDoctorCase(data).then(res => {
+					if(res.code==200){
+						//设置列表数据
+						if (page.num == 1) {
+							that.dataList = res.data.list; 
+							
+						} else {
+							that.dataList = that.dataList.concat(res.data.list);
+							 
+						}
+						that.mescroll.endBySize(res.data.list.length, res.data.total);
+						
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: "请求失败",
+						});
+						that.dataList = null;
+						that.mescroll.endErr();
+					}
+				});
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.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;
+			}
+		}
+	}
+	.pub-tab-box{
+		padding: 0 33upx;
+		background-color: #FFFFFF;
+		.tab-inner{
+			height: 88upx;
+			line-height: 88upx;
+			display: flex;
+			overflow-x: auto;
+		}
+		.item{
+			font-size: 28upx;
+			white-space: nowrap;
+			line-height: 1;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #666666;
+			margin-right: 60upx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			&:last-child{
+				margin-right: 0;
+			}
+			&.active{
+				font-weight: bold;
+				color: #333333;
+			}
+			.text{
+				position: relative;
+				z-index: 1;
+			}
+			.tab-bg{
+				width: 72upx;
+				height: 28upx;
+				position: absolute;
+				top: 17upx;
+				left: 50%;
+				transform: translateX(-36upx);
+				z-index: -1;
+			}
+		}
+	}
+	.top-fixed{
+		width: 100%;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 10;
+	}
+	.top-seat{
+		width: 100%;
+		height: 212upx;
+	}
+	// 问诊案例
+	.cases-list{
+		padding: 20upx;
+		.item{
+			padding: 30upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			margin-bottom: 20upx;
+			.dec-text{
+				font-size: 32upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #111111;
+				line-height: 48upx;
+			}
+			.images-box{
+				margin-top: 10upx;
+				display: flex;
+				flex-wrap: wrap;
+				.img-item{
+					width: 155upx;
+					height: 155upx;
+					background: #F5F5F5;
+					border-radius: 8upx;
+					margin: 0 10upx 10upx 0;
+					overflow: hidden;
+					image{
+						width: 100%;
+						height: 100%;
+					}
+					&:nth-child(4n){
+						margin-right: 0;
+					}
+				}
+			}
+			.doc-info{
+				display: flex;
+				align-items: center;
+				margin: 30upx 0 20upx;
+				.head{
+					width: 60upx;
+					height: 60upx;
+					background: #F2F5F9;
+					border-radius: 50%;
+					margin-right: 20upx;
+					overflow: hidden;
+					image{
+						width: 100%;
+						height: 100%;
+					}
+				}
+				.name{
+					font-size: 28upx;
+					line-height: 1;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+				}
+				.line{
+					width: 1px;
+					height: 22upx;
+					background: #DDDDDD;
+					margin: 0 16upx;
+				}
+				.posit,
+				.address{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+				}
+			}
+			.answer-box{
+				width: 100%;
+				// height: 117upx;
+				background: #F5F7F7;
+				border-radius: 10upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: center;
+				.text-inner{
+					// height: 84upx;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					line-height: 42upx;
+					padding: 15upx;
+				}
+			}
+			.read-box{
+				margin-top: 30upx;
+				display: flex;
+				align-items: center;
+				justify-content: flex-end;
+				image{
+					width: 24upx;
+					height: 19upx;
+					margin-right: 10upx;
+				}
+				.text{
+					font-size: 24upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+				}
+			}
+		}
+	}
+</style>

+ 40 - 0
pages/home/h5.vue

@@ -0,0 +1,40 @@
+<template>
+	<view class="content">
+		 <web-view :src="url"></web-view>
+	</view>
+</template>
+
+<script>
+ 
+ export default {
+ 	data() {
+ 		return {
+			url:"",
+ 		}
+ 	},
+	onLoad(val) {
+		this.url=uni.getStorageSync('url');
+		console.log(this.url)
+	}
+ 	 
+ }
+ 
+ 
+</script>
+
+
+<style scoped lang="scss">
+page{
+	height: 100%;
+}
+.content{
+	width: 100%;
+	height: 100%;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	
+}
+ 
+
+</style>

+ 1984 - 0
pages/home/index.vue

@@ -0,0 +1,1984 @@
+<template>
+	<view class="content">
+		<!-- 背景图片 -->
+		<image class="bg" src="../../static/images/hp_top_bg.png" mode=""></image>
+		<view >
+			<view class="top-inner" >
+				<view class="fixed-top-box" :style="{ background: bg }">
+					<!-- 这里是状态栏 -->
+					<view class="status_bar" :style="{height: statusBarHeight}"></view>
+					<view class="top-title">
+						<image class="name" src="../../static/images/name.png"></image>
+						<!-- <view class="name">御君方</view> -->
+						<!-- <view class="dot">•</view><view class="sub-name">七彩互联网医院</view> -->
+					</view>
+					<!-- 搜索框、购物车、客服 -->
+					<view class="func-cont" >
+						<view class="search-cont">
+							<image class="icon-search" src="../../static/images/search.png" mode=""></image>
+							<input type="text" disabled value="" placeholder="搜索商品、症状、功能主治" placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" @click="toSearch" />
+						</view>
+						<!-- 购物车 -->
+						<!-- <uni-badge size="small" :text="cartCount" absolute="rightTop" type="error">
+							<view class="img-item" @click="goAuthUrl('../shopping/cart')">
+								<image src="../../static/images/cart_wihte.png" mode=""></image>
+							</view>
+						</uni-badge> -->
+						<view class="img-item" style="position: relative;">
+							<image src="../../static/images/customer.png" mode=""></image>
+							<button class="contact-btn" open-type="contact"></button>
+						</view>
+					</view>
+					<!-- <view class="tips">
+						
+						<view class="left"></view>
+						<view class="right"  @click="navTo('./cert')">资质证明</view>
+					</view> -->
+				</view>
+			</view>
+			<!-- 头部间距 -->
+			<view style="padding-bottom:220rpx" >
+				<view class="status_bar" :style="{height: statusBarHeight}"></view>
+			</view>
+			<!-- 轮播图 -->
+			<view class="banner-box" >
+				<view class="inner">
+					<swiper 
+						class="swiper" 
+						:indicator-dots="true" 
+						:circular="true" 
+						:autoplay="true" 
+						:interval="3000" 
+						:duration="1000"
+						indicator-color="rgba(255, 255, 255, 0.6)"
+						indicator-active-color="#ffffff"
+					>
+						<swiper-item class="swiper-item" v-for="(item,index) in advList" :key="index" @click="handleAdvClick(item)">
+							<image :src="item.imageUrl" mode=""></image>
+						</swiper-item>
+					</swiper>
+				</view>
+			</view>
+			
+			<!-- 菜单 -->
+			<view class="menu-content" >
+				<view class="menu-box">
+					 <Menu :list="menus" @menuClick="menuClick" v-if="menus.length>0" style="width:100%;"></Menu>
+				</view>
+			</view>
+			
+		</view>
+		 
+		<!-- 在线问诊、处方查询 -->
+		<view class="online-inquiry">
+			<view class="item" @click="navTo('/pages_shopping/shopping/productSalesList')" >
+				<image  class="bg-img" src="../../static/images/banner1.png" mode=""></image>
+				<!-- <view class="inner">
+					<text class="title">用药榜</text>
+					<text class="sub-title"></text>
+					<image src="../../static/images/doctor.png" mode=""></image>
+				</view> -->
+			</view>
+			<view class="item"  @click="navTo('/pages_user/user/userShareList')">
+				<image class="bg-img" src="../../static/images/banner2.png" mode=""></image>
+				<!-- <view class="inner">
+					<text class="title">分享榜</text>
+					<text class="sub-title"></text>
+					<image src="../../static/images/cu_search.png" mode=""></image>
+				</view> -->
+			</view>
+		</view>
+		<view class="index-cont">
+			<!-- 医生团队 -->
+			<!-- <view class="pub-item">
+				<view class="pub-title-box">
+					<text class="left">医生团队</text>
+					<view class="right" @click="navTo('../doctor/doctorList')">
+						<text class="text">全部医生</text>
+						<image src="../../static/images/arrow_gray.png" mode=""></image>
+					</view>
+				</view>
+				<view class="doc-cont">
+					<view class="inner">
+						<view class="item" v-for="(item,index) in doctorList" :key="index" @click="shopDoctor(item)">
+							<view class="head-box">
+								<image :src="item.headImg" mode="aspectFill"></image>
+							</view>
+							<text class="name ellipsis">{{ item.doctorName }}</text>
+							<text class="position ellipsis">
+								{{utils.getDictLabelName("doctorPosition",item.position)}}
+							</text>
+						</view>
+					</view>
+				</view>
+			</view> -->
+			<!-- <view class="pub-item">
+				<view class="tabs">
+					<view class="tab" @click="docTabChange(1)">
+						<image v-if="docTab==1" class="img" src="../../static/images/tab1.png" mode=""></image>
+						<view class="inner">
+							<text :class="docTab == 1?'title active':'title'" >推荐医生</text>
+						</view>
+					</view>
+					<view class="tab" @click="docTabChange(2)">
+						<image v-if="docTab==2" class="img" src="../../static/images/tab2.png" mode=""></image>
+						<view class="inner">
+							<text :class="docTab == 2?'title active':'title'" >推荐药师</text>
+						</view>
+					</view>
+					<view class="tab" @click="docTabChange(3)">
+						<image v-if="docTab==3" class="img" src="../../static/images/tab3.png" mode=""></image>
+						<view class="inner">
+							<text  :class="docTab == 3?'title active':'title'" >推荐营养师</text>
+						</view>
+					</view>
+				</view>
+				<view class="doc-tab-box">
+					<view class="tab-inner" >
+						<view 
+							v-for="(item,index) in depts" 
+							:key="index"
+							:class="item.departmentId == deptId?'item active':'item'"
+							@click="deptChange(item)"
+						>
+							<view class="text">
+								{{ item.departmentName }}
+								<image v-show="item.departmentId == deptId" class="tab-bg" src="../../static/images/tab_bg.png" mode=""></image>
+							</view>
+						</view>
+					</view>
+					<image class="right-mask" src="../../static/images/mask.png" mode=""></image>
+				</view>
+				<view class="doc-list">
+					<view class="item" v-for="(item,index) in doctorList" :key="index" @click="shopDoctor(item)"> -->
+						<!-- 头像 -->
+					<!-- 	<view class="head-box">
+							<image :src="item.headImg" mode="aspectFill"></image>
+						</view> -->
+						<!-- 详细信息 -->
+				<!-- 		<view class="info"> -->
+							<!-- 姓名等 -->
+					<!-- 		<view class="top">
+								<text class="name">{{ item.doctorName }}</text>
+								<view class="line"></view>
+								<text class="other">{{utils.getDictLabelName("doctorPosition",item.position)}}</text>
+								<view class="line"></view>
+								<text class="other">{{ item.departmentName }}</text>
+							</view> -->
+							<!-- 单位 -->
+							<!-- <view class="unit-box"> -->
+							<!-- 	<view class="level">三甲</view> -->
+					<!-- 			<view class="name">{{ item.hospitalName }}</view>
+							</view> -->
+							<!-- 擅长 -->
+						<!-- 	<view class="expertise ellipsis2">
+								擅长:{{ item.doctorDesc }}
+							</view> -->
+							<!-- 评分 -->
+							<!-- <view class="rate-box">
+								<view class="star">
+									<image src="../../static/images/star.png" mode=""></image>
+									<text>{{ item.pings }}</text>
+								</view>
+								<view class="line"></view>
+								<view class="num-box">
+									<text class="label">接诊数</text>
+									<text class="num">{{ item.orders }}</text>
+								</view>
+								<view class="line"></view>
+								<view class="num-box">
+									<text class="label">响应速度</text>
+									<text class="num">{{ item.speed }}分钟</text>
+								</view>
+							</view> -->
+							<!-- 价格 -->
+						<!-- 	<view class="price-box">
+								<view class="btn-item" v-for="(subitme) in item.price">
+									<text class="label" >{{subitme.priceType==1?'图文':'语音'}}</text>
+									<text class="num">¥{{subitme.price.toFixed(2)}}</text>
+								</view>
+							</view>
+						</view>
+					</view>
+					<view class="bottom-title" @click="navTo('../doctor/doctorList?doctorType='+docTab)">
+						<text >{{allDoctorTitle}}</text>
+						<image src="../../static/images/arrow3.png" mode=""></image>
+					</view>
+					 
+				</view>
+				 -->
+				<!-- <view class="doc-cont">
+					<view class="inner">
+						<view class="item" v-for="(item,index) in doctorList" :key="index" @click="shopDoctor(item)">
+							<view class="head-box">
+								<image :src="item.headImg" mode="aspectFill"></image>
+							</view>
+							<text class="name ellipsis">{{ item.doctorName }}</text>
+							<text class="position ellipsis">
+								{{utils.getDictLabelName("doctorPosition",item.position)}}
+							</text>
+						</view>
+					</view>
+				</view> -->
+	<!-- 		</view> -->
+			<!-- 问诊案例 -->
+			<!-- <view class="pub-item">
+				<view class="pub-title-box">
+					<text class="left">问诊案例</text>
+					<view class="right" @click="viewAll('doctorCase')">
+						<text class="text">全部案例</text>
+						<image src="../../static/images/arrow_gray.png" mode=""></image>
+					</view>
+				</view>
+				<view class="inner">
+					<view class="pub-tab-box">
+						<view class="tab-inner">
+							<view 
+								v-for="(item,index) in orderTypes" 
+								:key="index"
+								:class="item.id == orderType?'item cases active':'item cases'"
+								@click="orderTypeChange(item)"
+							>
+								<view class="text">
+									{{ item.name }}
+									<image v-show="item.id == orderType" class="tab-bg" src="../../static/images/tab_bg.png" mode=""></image>
+								</view>
+							</view>
+						</view>
+						<image class="right-mask" src="../../static/images/mask.png" mode=""></image>
+					</view>
+					<view class="cases-list">
+						<view class="item" v-for="(item,index) in doctorOrderList" :key="index">
+							<view class="dec-text ellipsis2">{{item.title}}</view>
+							<view class="images-box"  v-if="item.imgs!=null"  >
+								<view class="img-item" v-for="(subitem,j) in utils.photosToArr(item.imgs)" @click="showImg(item.imgs)" :key="j">
+									<image :src="subitem" mode="aspectFill" ></image>
+								</view>
+							</view>
+							<view class="doc-info">
+								<view class="head">
+									<image :src="item.doctorHeadImg" mode="aspectFill"></image>
+								</view>
+								<view class="name">{{item.doctorName}}</view>
+								<view class="line"></view>
+								<view class="posit">
+									{{utils.getDictLabelName("doctorPosition",item.doctorPosition)}}
+								</view>
+								<view class="line"></view>
+								<view class="address">{{item.hospitalName}}</view>
+							</view>
+							<view class="answer-box">
+								<text class="text-inner" v-if="item.orderType == '1' ">{{item.replyContent}}</text>
+								<view class="voice-inner" v-if="item.orderType == '2'">
+									<free-audio 
+										startPic='/static/images/play.png' 
+										endPic='/static/images/pause.png'
+										activeColor="#2BC7B9"
+										:audioId="'audio'+index"
+										:url='item.replyAudioUrl'
+									></free-audio>
+								</view>
+							</view>
+							<view class="read-box">
+								<image src="../../static/images/eye.png" mode=""></image>
+								<text class="text">{{item.views}}人看过</text>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view> -->
+			<!-- 热门榜单 -->
+			<!-- <NewProduct :detail="newProductList" /> -->
+			<HotProduct :detail="hotProductList" />
+			<!-- 健康百科 -->
+			<!-- <view class="pub-item" style="margin-top: 20rpx;">
+				<view class="pub-title-box">
+					<text class="left">健康百科</text>
+					<view class="right" @click="switchTo('../healthy/index')">
+						<text class="text">更多</text>
+						<image src="../../static/images/arrow_gray.png" mode=""></image>
+					</view>
+				</view>
+				<view class="inner">
+					 
+					<view class="pub-tab-box">
+						<view class="tab-inner">
+							<view 
+								v-for="(item,index) in articleCateList" 
+								:key="index"
+								:class="item.cateId == cateId?'item active':'item'"
+								@click="articleCateChange(item)"
+							>
+								<view class="text">
+									{{ item.cateName }}
+									<image v-show="item.cateId == cateId" class="tab-bg" src="../../static/images/tab_bg.png" mode=""></image>
+								</view>
+							</view>
+						</view>
+						<image class="right-mask" src="../../static/images/mask.png" mode=""></image>
+					</view>
+					 
+					<view class="know-list">
+						<view class="item" v-for="(item,index) in articleList" :key="index" @click="showArticle(item)">
+							<view class="left">
+								<view class="title ellipsis2">{{ item.title }}</view>
+								<view class="info-box">
+									<view class="readers">
+										<view class="head-box" v-if="item.viewsList!=null&&item.viewsList.length>0">
+											<view class="head" v-for="(subitem,j) in item.viewsList" :key="j">
+												<image v-if="subitem!=null" :src="subitem.avatar==null?'/static/images/detault_head.jpg':subitem.avatar" mode=""></image>
+											</view>
+										</view>
+										<view class="readings">
+											<image class="eye" src="../../static/images/eye.png" mode=""></image>
+											<text class="num">{{item.views}}</text>
+										</view>
+									</view>
+									<view class="time">{{item.publishTime}}</view>
+								</view>
+							</view>
+							<view class="right">
+								<image :src="item.imageUrl"  mode="aspectFill"></image>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view> -->
+			<!-- 精选药品 -->
+			<TuiProduct ref="tuiProduct" />
+			<!-- <view class="feat-title">
+				<image src="../../static/images/tui.png" mode=""></image>
+				<text>精选药品</text>
+			</view>
+			<view class="drug-list">
+				<view class="item" v-for="(item,index) in tuiProductList" :key="index" @click="showProduct(item)">
+					<view class="img-box">
+						<image :src="item.image" mode="aspectFit"></image>
+					</view>
+					<view class="info-box">
+						<view class="title ellipsis2">{{ item.productName }}</view>
+						<view class="price-box">
+							<view class="now">
+								<text class="unit">¥</text>
+								<text class="num">{{item.price.toFixed(2)}}</text>
+							</view>
+							<view class="old">¥{{item.otPrice.toFixed(2)}}</view>
+						</view>
+					</view>
+				</view>
+			</view> -->
+			
+			
+			
+		</view>
+		
+		
+		<!-- 限时消息 -->
+		<!-- <view class="message-box" >
+			<view class="left">
+				<image src="../../static/images/close24.png" mode="" @click="closeMsg"></image>
+				<view class="text ellipsis">关注公众号了解更新</view>
+			</view>
+			<view class="btn">查看</view>
+			
+		</view> -->
+		 <!-- #ifdef MP-WEIXIN -->
+		<view class="official-account" >
+		    <official-account @load="bindload" @error="binderror"></official-account>
+		</view>
+		<!-- #endif -->
+		<view class="popup-box" v-if="activityShow">
+		  <view class="info-mask"  @tap="closeActivity()" ></view>
+		  <view class="info-form"   >
+				<image  :src="activity.logoUrl" @tap="showActivity()" />
+		  </view>
+		</view>
+		<z-modal :show="tuiModalControl" placeholderText="请输入邀请码" :btnGroup="btnGroup" :contentType="2"  titleText="填写邀请码" @cancle="cancleTui" @sure="submitTui"   ></z-modal>
+	</view>
+</template>
+
+<script>
+	import zModal from '@/components/z-modal/z-modal.vue'
+	import {getStoreActivity} from '@/api/activity.js'
+	import {getDepartmentList} from '@/api/doctorOrder.js'
+	import {getMenu,getCanvas,getIndexData,getTuiDoctor,getTuiArticle,getTuiDoctorOrder,getCartCount} from '@/api/index'
+	import {getStoreConfig} from '@/api/common'
+	import tabBg from "@/static/images/tab_bg.png"
+	import freeAudio from '@/components/chengpeng-audio/free-audio.vue'
+	import Menu from '@/components/Menu.vue'
+	import HotProduct from './components/HotProduct.vue'
+	import NewProduct from './components/NewProduct.vue'
+	import TuiProduct from '@/components/tuiProduct.vue'
+	import {getUserInfo,bindPromoter} from '@/api/user'
+	export default {
+		components: {zModal,freeAudio,Menu,HotProduct,NewProduct,TuiProduct},
+		data() {
+			return { 
+				btnGroup: [{
+                    text: '取消',
+                    color: '#FFFFFF',
+					bgColor: '#999999',
+                    width: '150rpx',
+                    height: '80rpx',
+                    shape: 'fillet',
+                    eventName: 'cancle'
+                },{
+                    text: '确定',
+                    color: '#FFFFFF',
+                    bgColor: '#2BC7B9',
+                    width: '150rpx',
+                    height: '80rpx',
+                    shape: 'fillet',
+                    eventName: 'sure'
+                }],
+				tuiModalControl:false,
+				activity:null,
+				activityShow:false,
+				newProductList: [],
+				hotProductList: [],
+				tuiProductList:[],
+				menus:[],
+				canvas:[],
+				allDoctorTitle:"全部医生",
+				topLen:0,
+				deptId:0,
+				depts:[],
+				docTab:1,
+				top:0,
+				cartCount:0,
+				doctorOrderList:[],
+				orderType:0,
+				cateId:null,
+				articleList:[],
+				advList:[],
+				doctorList:[],
+				articleCateList:[],
+				
+				// 状态栏的高度
+				statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
+				tabBg: tabBg, // tab切换背景
+				// 问诊案例类型
+				orderTypes: [{name:'全部',id:0,},{name:'图文',id:1,},{name:'语音',id:2,}],
+				// 限时消息是否显示
+				messageShow: true,
+			}
+			this.getStoreActivity();
+		},
+		onLoad(option) {
+			if(option.userCode!=null){
+				uni.setStorageSync('userCode',option.userCode);
+				if(this.utils.checkLoginState()){
+					this.getUserInfo();
+				}
+			}
+			if (option.hasOwnProperty('q') && option.q) {
+				// 通过下面这步解码,可以拿到url的值
+				const url = decodeURIComponent(option.q)
+				this.url=url;
+				// // 对url中携带的参数提取处理
+				const obj = this.utils.urlToObj(url)
+				uni.setStorageSync('userCode',obj.userCode);
+				if(this.utils.checkLoginState()){
+					this.getUserInfo();
+				}
+			}
+			this.getStoreActivity()
+		},
+		// 暂停所有音频(一般用于页面切换时停止正在播放的音频)
+		onUnload() { //普通页面在 onUnload 生命周期中执行
+		  uni.$emit('stop')
+		},
+		onHide() { //tabBar页面在onHide生命周期中执行
+		  uni.$emit('stop')
+		},
+		onPageScroll(e) {
+			//console.log(e)
+			this.top=e.scrollTop;
+		},
+		mounted() {
+			//this.getDepartmentList();
+		},
+		onShareAppMessage(res) {
+			return {
+				title: '零利润药房',
+				path: `/pages/common/launch`,
+				imageUrl: 'https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+			}
+		},
+		onReachBottom() {
+			console.log("onReachBottom")
+			this.$refs.tuiProduct.getTuiProducts();
+		},
+		//分享到朋友圈
+		onShareTimeline(res) {
+			return {
+				title: '御君方-七彩互联网医院',
+				query:'',//页面参数
+				imageUrl: 'https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+			}
+		},
+		computed: {
+			
+			// 计算属性的 getter
+			bg: function() {
+				var top=this.top/30;
+				console.log(top)
+				return 'rgba(43,199,185, ' + top + ')';
+			},
+		},
+		onShow() {
+			this.getMenu();
+			this.getIndexData()
+			//this.getTuiDoctorOrder();
+			// console.log(uni.getStorageSync('isLocation'))
+			// if(uni.getStorageSync('isLocation')==""){
+			// 	this.getLocation();
+			// }
+			if(this.utils.checkLoginState()){
+				this.getCartCount();
+			}
+			this.getStoreConfig();
+			//this.getTuiDoctor()
+			this.getCanvas();
+		},
+		methods: {
+			navToMiniProgram(){
+				uni.navigateToMiniProgram({
+					// appid  写你要跳转的小程序的 appid
+					appId: 'wxc3f0a952b7bc2b94',
+					// 路径写  src下的路径,假如你跳转的是pages下的页面,就可以写pages/index
+					path: '/pages/common/launch',
+					extraData: {
+						// 'type': 'out'
+					},
+					// 这个不写的话会显示开发环境,不能正常跳转,写上就能正常跳转了
+					envVersion: 'develop',
+					success(res) {
+						// 打开成功
+						// uni.showToast({
+						// 	title: '跳转成功'
+						// })
+					},
+					fail(err) {
+						// 打开失败/取消
+						// uni.showToast({
+						// 	title: '跳转不成功'
+						// })
+					}
+				})
+			},
+			getUserInfo(){
+				getUserInfo().then(
+					res => {
+						if(res.code==200){
+							if(res.user!=null){
+								if(res.user.isPromoter==null||res.user.isPromoter==0){
+									this.tuiModalControl=true
+								}
+							}
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			cancleTui(e){
+				this.tuiModalControl=false
+			},
+			submitTui(e){
+				console.log(e)
+				if(e.inputText==null||e.inputText==""){
+					uni.showToast({
+						icon:'none',
+						title: "请输入邀请码",
+					});
+					return;
+				}
+				var data={userCode:e.inputText};
+				bindPromoter(data).then(
+					res => {
+						if(res.code==200){
+							 uni.showToast({
+							 	icon:'none',
+							 	title: res.msg,
+							 });
+							 this.tuiModalControl=false
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+				
+			},
+			bindload:function(detail){
+			},
+			binderror:function(detail){
+			},
+			closeActivity(){
+				this.activityShow=false;
+				// uni.setStorageSync(this.activity.activityId,null);
+			},
+			getStoreActivity() {
+			  let data = { }
+			  getStoreActivity(data).then(res => {
+					this.activity=res.activity;
+					if(this.activity!=null){
+						// if(uni.getStorageSync(this.activity.activityId)!=null)
+						// {
+						// 	uni.setStorageSync(this.activity.activityId,1);
+						// 	this.activityShow=true;
+						// }
+						// else{
+						// 	this.activityShow=false;
+						// }
+						this.activityShow=true;
+						
+						
+					}
+					else{
+						this.activityShow=false;
+					}
+			  })
+			},
+			showActivity(){
+				this.activityShow=false;
+				uni.navigateTo({
+					url: '/pages_shopping/shopping/activityDetails?activityId='+this.activity.activityId
+				})
+			},
+			menuClick(item){
+				if(item.linkType==1){
+					if(item.linkUrl=="/pages/shopping/index"){
+						uni.switchTab({
+							url: item.linkUrl
+						})
+					}
+					else if(item.linkUrl=="/pages/healthy/index"){
+						uni.switchTab({
+							url: item.linkUrl
+						})
+					}
+					else{
+						uni.navigateTo({
+							url: item.linkUrl
+						})
+					}
+					
+				}
+				else if(item.linkType==0){
+					// this.navToMiniProgram();
+					 uni.showToast({
+					 	icon:'none',
+					 	title: "开发中...",
+					 });
+				}
+			},
+			goDev(){
+				uni.showToast({
+					icon:'none',
+					title: "开发中...",
+				});
+			},
+			handleAdvClick(item){
+				console.log(item);
+				if(item.showType==1){
+					uni.setStorageSync('url',item.advUrl);
+					uni.navigateTo({
+						url:"h5"
+					})
+				}
+				else if(item.showType==2){
+					 uni.navigateTo({
+					 	url:item.advUrl
+					 })
+				}
+				else if(item.showType==3){
+					 uni.setStorageSync('content',item.content);
+					 uni.navigateTo({
+					 	url:"content"
+					 })
+				}
+				
+			},
+			deptChange(item){
+				this.deptId=item.departmentId;
+				this.getTuiDoctor();
+			},
+			getMenu(){
+				getMenu().then(res => {
+					console.log(res)
+					if(res.code==200){
+						 this.menus= res.data
+					}else{
+						 
+					}
+				});
+			},
+			getCanvas(){
+				getCanvas().then(res => {
+					if(res.code==200){
+						 console.log(res.data)
+						 this.canvas= JSON.parse(res.data.json)
+					}else{
+						 
+					}
+				});
+			},
+			getDepartmentList(){
+				this.depts=[];
+				getDepartmentList().then(res => {
+					if(res.code==200){
+						var allDept={departmentId:0,departmentName:"全部"}
+						this.depts.push(allDept);
+						this.depts=this.depts.concat(res.data);
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: "请求失败",
+						});
+					}
+				});
+			},
+			getTuiDoctor(){
+				let data = {departmentId:this.deptId,doctorType:this.docTab};
+				getTuiDoctor(data).then(
+					res => {
+						if(res.code==200){
+							 this.doctorList=res.data;
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			docTabChange(val){
+				if(val==1){
+					this.allDoctorTitle="全部医师"
+				}
+				if(val==2){
+					this.allDoctorTitle="全部药师"
+				}
+				if(val==3){
+					this.allDoctorTitle="全部营养师"
+				}
+				this.docTab=val;
+				this.getTuiDoctor();
+			},
+			showImg(urls) {
+				 var imgArr =urls.split(',');
+				 //预览图片
+				 uni.previewImage({
+				 	urls: imgArr,
+				 	current: imgArr[0]
+				 });
+			},
+			getStoreConfig(){
+				getStoreConfig().then(
+					res => {
+						if(res.code==200){
+							uni.setStorageSync('config',JSON.stringify(res.data));
+						}
+					},
+					rej => {}
+				);
+				
+			},
+			goAuthUrl(url){
+				this.utils.isLogin().then(res => {
+					if(res){
+						uni.navigateTo({
+							url:url
+						})
+					}
+				})
+			},
+			switchTo(url){
+				uni.switchTab({
+					url: url
+				})
+				return
+			},
+			// 跳转页面
+			navTo(url){
+				uni.navigateTo({
+					url: url
+				})
+			}, 
+			getLocation(){
+				var that=this;
+				uni.authorize({
+					scope:'scope.userLocation',
+					success() {
+						uni.getLocation({
+							type: 'gcj02',//腾讯地图使用gcj02获取位置坐标
+							success: function (res) {
+								uni.setStorageSync('isLocation',1);
+								uni.setStorageSync('lng',res.longitude);
+								uni.setStorageSync('lat',res.latitude);
+							},
+						})
+					},
+					fail(err){
+						 console.log(err)
+					}
+				})
+			},
+			getIndexData(){
+				
+				let data = {};
+				getIndexData(data).then(
+					res => {
+						if(res.code==200){
+							 this.advList=res.data.advList;
+							 this.articleCateList=res.data.articleCateList;
+							 if(this.articleCateList!=null&&this.articleCateList.length>0){
+								 this.cateId=this.articleCateList[0].cateId;
+								 this.getTuiArticle()
+							 }
+							 this.tuiProductList=res.data.tuiProductList
+							 this.newProductList = res.data.newProductList
+							 this.hotProductList = res.data.hotProductList
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			getCartCount(){
+				this.utils.isLogin().then(res => {
+					if(res){
+						 getCartCount().then(
+						 	cartRes => {
+						 		if(cartRes.code==200){
+						 			 this.cartCount=cartRes.data;
+						 		}
+						 	},
+						 	rej => {}
+						 );
+					}
+				})
+				
+			},
+			getTuiArticle(){
+				let data = {cateId:this.cateId};
+				getTuiArticle(data).then(
+					res => {
+						if(res.code==200){
+							 this.articleList=res.data;
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			getTuiDoctorOrder(){
+				let data = {orderType:this.orderType};
+				getTuiDoctorOrder(data).then(
+					res => {
+						if(res.code==200){
+							 this.doctorOrderList=res.data;
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			showArticle(item){
+				uni.navigateTo({
+					url: '../healthy/detail?articleId='+item.articleId
+				})
+			},
+			showProduct(item){
+				uni.navigateTo({
+					url: '../shopping/productDetails?productId='+item.productId
+				})
+			},
+			// 顶部搜索
+			toSearch() {
+				uni.navigateTo({
+					url: './productSearch'
+				})
+			},
+			// 健康知识选中
+			articleCateChange(item) {
+				this.cateId = item.cateId;
+				this.getTuiArticle();
+			},
+			// 问诊案例选中
+			orderTypeChange(item) {
+				this.orderType = item.id;
+				console.log(this.orderType)
+				this.getTuiDoctorOrder();
+			},
+			// 关闭限时消息
+			closeMsg() {
+				this.messageShow = false
+			},
+			// 查看全部
+			viewAll(url) {
+				uni.navigateTo({
+					url: '/pages/home/' + url,
+				});
+			},
+			shopDoctor(item){
+				console.log(item);
+				uni.navigateTo({
+					url: "../doctor/doctorDetail?doctorId="+item.doctorId
+				})
+			},
+			// 跳转页面
+			navgetTo(url) {
+				uni.navigateTo({
+					url: url
+				})
+			},
+			switchTo(url){
+				uni.switchTab({
+					url: url
+				})
+				return
+			},
+			// 在线问诊
+			openIm() {
+				uni.navigateTo({
+					url: '../doctor/doctorOrderIM?orderId=10'
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+
+	.fixed-top-box{
+		width: 100%;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 1000;
+		transition: all 0.5s;
+		background-color: #2bc7b9;
+		&.show-back{
+			// background: linear-gradient(135deg, #2BC7B9 0%, #60CDC3 100%);
+		}
+		.status_bar {
+			
+			width: 100%;
+		}
+	}
+	.content{
+		width: 100%;
+		position: relative;
+		.bg{
+			width: 100%;
+			height: 380rpx;
+			position: absolute;
+			top: 0;
+			left: 0;
+		}
+		.top-inner{
+			width: 100%;
+			position: absolute;
+			top: 0;
+			left: 0;
+			z-index: 5;
+			.top-title{
+				height: 88upx;
+				line-height: 88upx;
+				display: flex;
+				align-items: center;
+				justify-content: flex-start;
+				.name{
+					margin-left: 15rpx;
+					width: 183rpx;
+					height: 75rpx;
+					image{
+						width:100%;
+						height:100%;
+					}
+				}
+				// .name{
+				// 	font-size: 42upx;
+				// 	font-family: Source Han Sans CN;
+				// 	font-weight: bold;
+				// 	color: #FFFFFF;
+				// 	padding-left: 41upx;
+				// }
+				.dot{
+					margin: 0upx 10upx;
+					font-size: 28upx;
+					color: #FFFFFF;
+					opacity: 0.5;
+				}
+				.sub-name{
+					font-size: 30upx;
+					font-family: Source Han Sans CN;
+					color: #FFFFFF;
+				}
+				
+				 
+			}
+			.func-cont{
+				box-sizing: border-box;
+				display: flex;
+				align-items: center;
+				padding: 30upx 20upx 30upx 20upx;
+				.search-cont{
+					box-sizing: border-box;
+					display: flex;
+					align-items: center;
+					flex: 1;
+					height: 72upx;
+					background: #FFFFFF;
+					border-radius: 36upx;
+					padding: 0 30upx;
+					.icon-search{
+						width: 28upx;
+						height: 28upx;
+						margin-right: 20upx;
+					}
+					input{
+						height: 60upx;
+						line-height: 60upx;
+						flex: 1;
+					}
+				}
+				/deep/.uni-badge{
+					border: none;
+					background-color: #FF3636;
+					font-family: Roboto;
+				}
+				.img-item{
+					width: 44upx;
+					height: 44upx;
+					margin-left: 30upx;
+					image{
+						width: 100%;
+						height: 100%;
+					}
+				}
+			}
+			.tips{
+				margin: 0upx 20rpx 30rpx ;
+				height: 40upx;
+				line-height: 40upx;
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				.left{
+					font-size: 30upx;
+					color: #FFFFFF;
+				}
+				.right{
+					padding: 5upx 20rpx;
+					font-size: 24upx;
+					color: #FFFFFF;
+					background-color: #2bc7b9;
+					border-radius: 50rpx;
+				}
+			}
+		}
+		.banner-box{
+			padding: 0 20upx;
+			.inner{
+				width: 100%;
+				height: 236upx;
+				border-radius: 10upx;
+				overflow: hidden;
+				.swiper,
+				.swiper-item,
+				.swiper-item image{
+					width: 100%;
+					height: 100%;
+				}
+				
+			}
+		}
+		.menu-content{
+			// width: 100%;
+			background-color: #fff;
+			overflow: hidden;
+			padding: 20upx 20upx 0;
+		}
+		.menu-box{
+			display: flex;
+			align-items: center;
+			background-color: #FFFFFF;
+		}
+		.online-inquiry{
+			box-sizing: border-box;
+			width: 100%;
+			height: 170upx;
+			padding: 0 20upx;
+			background: linear-gradient(180deg, rgba(255, 255, 255, 0.38) 62%, rgba(255, 255, 255, 0) 100%);
+			display: flex;
+			justify-content: space-between;
+			.item{
+				// width: 46.13%;
+				
+				width: 346upx;
+				height: 150upx;
+				position: relative;
+				.bg-img,
+				.inner{
+					border-radius: 15rpx;
+					width: 100%;
+					height: 100%;
+					position: absolute;
+					top: 0;
+					left: 0;
+					z-index: 1;
+				}
+				.inner{
+					box-sizing: border-box;
+					z-index: 2;
+					display: flex;
+					flex-direction: column;
+					justify-content: center;
+					padding-left: 32upx;
+					.title{
+						font-size: 30upx;
+						line-height: 1;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #111111;
+						margin-bottom: 20upx;
+					}
+					.sub-title{
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+					}
+					image{
+						width: 80upx;
+						height: 90upx;
+						position: absolute;
+						right: 7upx;
+						bottom: 7upx;
+					}
+				}
+			}
+		}
+		.index-cont{
+			box-sizing: border-box;
+			padding: 0 20upx 120rpx;
+			.pub-item{
+				background: #FFFFFF;
+				border-radius: 16upx;
+				margin-bottom: 20upx;
+				.tabs{
+					width: 100%;
+					display: flex;
+					align-items: center;
+					justify-content: flex-start;
+					height: 110rpx;
+					background-color: #F0F3F4;
+					.tab{
+						height: 110rpx;
+						display: flex;
+						align-items: center;
+						justify-content: center;
+						position: relative;
+						flex: 1;
+						.img{
+							z-index: 1;
+							position: absolute;
+							top:0rpx;
+							left:0rpx;
+							width: 100%;
+							height: 100%;
+						}
+						.inner{
+							z-index: 2;
+							.title{
+								font-size: 32upx;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #666666;
+							}
+							.active{
+								color: #2BC7B9;
+							}
+						}
+						
+					}
+					
+					
+				}
+				.pub-title-box{
+					box-sizing: border-box;
+					padding: 36upx 30upx;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					.left{
+						font-size: 32upx;
+						line-height: 1;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #111111;
+					}
+					.right{
+						display: flex;
+						align-items: center;
+						justify-content: center;
+						.text{
+							font-size: 24rpx;
+							line-height: 1;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							margin-right: 10upx;
+						}
+						image{
+							width: 14upx;
+							height: 24upx;
+						}
+					}
+					
+				}
+				.doc-tab-box{
+					padding: 14rpx 30rpx 0rpx 30rpx;
+					position: relative;
+					.tab-inner{
+						padding: 14upx 0 30upx;
+						display: flex;
+						overflow-x: auto;
+					}
+					.item{
+						font-size: 28upx;
+						white-space: nowrap;
+						line-height: 1;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+						margin-right: 40upx;
+						position: relative;
+						&:last-child{
+							margin-right: 0;
+						}
+						&.active{
+							font-weight: bold;
+							color: #333333;
+						}
+						&.cases{
+							margin-right: 60upx;
+						}
+						.text{
+							position: relative;
+							z-index: 1;
+						}
+						.tab-bg{
+							width: 72upx;
+							height: 28upx;
+							position: absolute;
+							top: 17upx;
+							left: 50%;
+							transform: translateX(-36upx);
+							z-index: -1;
+						}
+					}
+					.right-mask{
+						width: 56upx;
+						height: 34upx;
+						position: absolute;
+						top: 25upx;
+						right: 0upx;
+						z-index: 1;
+					}
+				}
+				.doc-list{
+					padding: 20upx;
+					.item{
+						box-sizing: border-box;
+						background: #FFFFFF;
+						// border-radius: 16upx;
+						display: flex;
+						border-bottom: 1px solid #F0F0F0;
+						margin-bottom: 30rpx;
+						.head-box{
+							width: 120upx;
+							height: 120upx;
+							background: #EDF1F4;
+							border-radius: 50%;
+							overflow: hidden;
+							margin-right: 30upx;
+							image{
+								width: 100%;
+								height: 100%;
+							}
+						}
+						.info{
+							width: calc(100% - 150upx);
+							.top{
+								display: flex;
+								align-items: center;
+								font-family: PingFang SC;
+								line-height: 1;
+								.name{
+									font-size: 34upx;
+									font-weight: bold;
+									color: #111111;
+								}
+								.line{
+									width: 1px;
+									height: 26upx;
+									background: #DDDDDD;
+									margin: 0 20upx;
+								}
+								.other{
+									font-size: 28upx;
+									font-weight: 500;
+									color: #333333;
+								}
+							}
+							.unit-box{
+								display: flex;
+								margin-top: 24upx;
+								.level{
+									padding: 0 10upx;
+									height: 30upx;
+									line-height: 30upx;
+									font-size: 22upx;
+									font-family: PingFang SC;
+									font-weight: 500;
+									color: #FFFFFF;
+									background: #2BC7B9;
+									border-radius: 10upx 4upx 10upx 4upx;
+									margin-right: 12upx;
+								}
+								.name{
+									font-size: 28upx;
+									font-family: PingFang SC;
+									font-weight: 500;
+									color: #333333;
+									line-height: 30upx;
+								}
+							}
+							.expertise{
+								font-size: 26upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #666666;
+								line-height: 42upx;
+								margin: 22upx 0 26upx;
+							}
+							.rate-box{
+								display: flex;
+								align-items: center;
+								.star{
+									display: flex;
+									align-items: center;
+									image{
+										width: 22upx;
+										height: 22upx;
+										margin-right: 10upx;
+									}
+									text{
+										font-size: 26upx;
+										font-family: PingFang SC;
+										font-weight: bold;
+										color: #CEA764;
+										line-height: 1;
+									}
+								}
+								.line{
+									width: 1px;
+									height: 20upx;
+									background: #DDDDDD;
+									margin: 0 20upx;
+								}
+								.num-box{
+									display: flex;
+									align-items: center;
+									font-family: PingFang SC;
+									.label{
+										font-size: 24upx;
+										font-weight: 500;
+										color: #999999;
+										line-height: 1;
+										margin-right: 7px;
+									}
+									.num{
+										font-size: 26upx;
+										font-weight: bold;
+										color: #CEA764;
+										line-height: 1;
+									}
+								}
+							}
+							.price-box{
+								display: flex;
+								align-items: center;
+								margin-top: 38upx;
+								.btn-item{
+									display: flex;
+									align-items: center;
+									justify-content: center;
+									width: 164upx;
+									height: 56upx;
+									line-height: 56upx;
+									border: 1px solid rgba(43, 199, 185, 0.5);
+									border-radius: 28upx;
+									font-family: PingFang SC;
+									margin-right: 30upx;
+									&:last-child{
+										margin-right: 0;
+									}
+									.label{
+										font-size: 26upx;
+										font-weight: 500;
+										color: #2BC7B9;
+										margin-right: 5upx;
+									}
+									.num{
+										font-size: 28upx;
+										font-weight: bold;
+										color: #2BC7B9;
+									}
+								}
+							}
+						}
+					}
+					.item:last-child{
+						border-bottom: none;
+						margin-bottom: 0rpx;
+					}
+					.bottom-title{
+						height: 50rpx;
+						display: flex;
+						align-items: center;
+						justify-content: center;
+						font-size: 26rpx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #2BC7B9;
+						image{
+							margin-left: 8rpx;
+							width: 14rpx;
+							height: 24rpx;
+						}
+					}
+				}
+				// 医师团队
+				.doc-cont{
+					box-sizing: border-box;
+					padding: 0 30upx;
+					.inner{
+						padding: 4upx 0 40upx;
+						display: flex;
+						overflow-x: auto;
+					}
+					.item{
+						display: flex;
+						align-items: center;
+						flex-direction: column;
+						margin-right: 40upx;
+						&:last-child{
+							margin-right: 0;
+						}
+						.head-box{
+							width: 120upx;
+							height: 120upx;
+							background: #F2F5F9;
+							border-radius: 50%;
+							margin-bottom: 20upx;
+							overflow: hidden;
+							image{
+								width: 100%;
+								height: 100%;
+							}
+						}
+						.name{
+							max-width: 120upx;
+							font-size: 28upx;
+							line-height: 1;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #111111;
+							margin-bottom: 16upx;
+							text-align: center;
+						}
+						.position{
+							max-width: 120upx;
+							font-size: 24upx;
+							line-height: 1;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							text-align: center;
+						}
+					}
+				}
+				.inner{
+					padding: 0 30upx;
+				}
+				// 健康知识
+				.pub-tab-box{
+					position: relative;
+					.tab-inner{
+						padding: 14upx 0 30upx;
+						display: flex;
+						overflow-x: auto;
+					}
+					.item{
+						font-size: 28upx;
+						white-space: nowrap;
+						line-height: 1;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+						margin-right: 40upx;
+						position: relative;
+						&:last-child{
+							margin-right: 0;
+						}
+						&.active{
+							font-weight: bold;
+							color: #333333;
+						}
+						&.cases{
+							margin-right: 60upx;
+						}
+						.text{
+							position: relative;
+							z-index: 1;
+						}
+						.tab-bg{
+							width: 72upx;
+							height: 28upx;
+							position: absolute;
+							top: 17upx;
+							left: 50%;
+							transform: translateX(-36upx);
+							z-index: -1;
+						}
+					}
+					.right-mask{
+						width: 56upx;
+						height: 34upx;
+						position: absolute;
+						top: 14upx;
+						right: -30upx;
+						z-index: 1;
+					}
+				}
+				.know-list{
+					padding-right: 10upx;
+					.item{
+						padding: 30upx 0;
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						border-bottom: 1px solid #F0F0F0;
+						&:last-child{
+							border-bottom: none;
+						}
+						.left{
+							flex: 1;
+							padding-right: 40upx;
+							height: 190upx;
+							display: flex;
+							flex-direction: column;
+							justify-content: space-between;
+							.title{
+								font-size: 32upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 48upx;
+							}
+							.info-box{
+								width: 100%;
+								display: flex;
+								align-items: center;
+								justify-content: space-between;
+								.readers{
+									display: flex;
+									align-items: center;
+									.head-box{
+										margin-right: 27upx;
+										display: flex;
+										align-items: center;
+										.head{
+											width: 48upx;
+											height: 48upx;
+											border-radius: 50%;
+											overflow: hidden;
+											box-shadow: 0 0 0 1px #fff;
+											margin-right: -10upx;
+											image{
+												width: 100%;
+												height: 100%;
+											}
+										}
+									}
+									.readings{
+										display: flex;
+										align-items: center;
+										.eye{
+											width: 26upx;
+											height: 20upx;
+											margin-right: 9upx;
+										}
+										.num{
+											font-size: 24upx;
+											font-family: PingFang SC;
+											font-weight: 500;
+											color: #999999;
+											line-height: 1;
+										}
+									}
+								}
+								.time{
+									font-size: 24upx;
+									line-height: 1;
+									font-family: PingFang SC;
+									font-weight: 500;
+									color: #999999;
+								}
+							}
+						}
+						.right{
+							width: 250upx;
+							height: 190upx;
+							border-radius: 8upx;
+							overflow: hidden;
+							image{
+								width: 100%;
+								height: 100%;
+							}
+						}
+					}
+				}
+				// 问诊案例
+				.cases-list{
+					padding-bottom: 10upx;
+					.item{
+						padding: 30upx 0;
+						border-bottom: 1px solid #F0F0F0;
+						&:last-child{
+							border-bottom: none;
+						}
+						.dec-text{
+							font-size: 32upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #111111;
+							line-height: 48upx;
+						}
+						.images-box{
+							margin-top: 10upx;
+							display: flex;
+							flex-wrap: wrap;
+							.img-item{
+								width: 155upx;
+								height: 155upx;
+								background: #F5F5F5;
+								border-radius: 8upx;
+								margin: 0 10upx 10upx 0;
+								overflow: hidden;
+								image{
+									width: 100%;
+									height: 100%;
+								}
+								&:nth-child(4n){
+									margin-right: 0;
+								}
+							}
+						}
+						.doc-info{
+							display: flex;
+							align-items: center;
+							margin: 30upx 0 20upx;
+							.head{
+								width: 60upx;
+								height: 60upx;
+								background: #F2F5F9;
+								border-radius: 50%;
+								margin-right: 20upx;
+								overflow: hidden;
+								image{
+									width: 100%;
+									height: 100%;
+								}
+							}
+							.name{
+								font-size: 28upx;
+								line-height: 1;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+							}
+							.line{
+								width: 1px;
+								height: 22upx;
+								background: #DDDDDD;
+								margin: 0 16upx;
+							}
+							.posit,
+							.address{
+								font-size: 26upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #999999;
+							}
+						}
+						.answer-box{
+							width: 100%;
+							// height: 117upx;
+							background: #F5F7F7;
+							border-radius: 10upx;
+							display: flex;
+							flex-direction: column;
+							justify-content: center;
+							.text-inner{
+								// height: 84upx;
+								font-size: 28upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #666666;
+								line-height: 42upx;
+								padding: 15upx;
+							}
+						}
+						.read-box{
+							margin-top: 30upx;
+							display: flex;
+							align-items: center;
+							justify-content: flex-end;
+							image{
+								width: 24upx;
+								height: 19upx;
+								margin-right: 10upx;
+							}
+							.text{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #999999;
+							}
+						}
+					}
+				}
+			}
+			// 精选药品
+			.feat-title{
+				margin-top: 30upx;
+				padding: 10upx 0 33upx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				image{
+					width: 37upx;
+					height: 37upx;
+					margin: 0upx 20upx;
+				}
+				text{
+					font-size: 36upx;
+					line-height: 1;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #111111;
+				}
+			}
+			.drug-list{
+				display: flex;
+				flex-wrap: wrap;
+				// margin-bottom: 20upx;
+				.item{
+					margin-right: 20rpx;
+					margin-bottom: 20rpx;
+					width: 345rpx;
+					background: #FFFFFF;
+					box-shadow: 0px 0px 10rpx 4rpx rgba(199, 199, 199, 0.22);
+					border-radius: 20rpx;
+					overflow: hidden;
+					&:nth-child(2n){
+						margin-right: 0;
+					}
+					.img-box{
+						width: 100%;
+						height: 334upx;
+						image{
+							width: 100%;
+							height: 100%;
+						}
+					}
+					.info-box{
+						box-sizing: border-box;
+						height: 182upx;
+						padding: 20upx;
+						.title{
+							height: 80upx;
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #111111;
+							line-height: 40upx;
+						}
+						.price-box{
+							display: flex;
+							align-items: center;
+							margin-top: 20upx;
+							.now{
+								color: #FF6633;
+								display: flex;
+								align-items: flex-end;
+								margin-right: 20upx;
+								font-family: PingFang SC;
+								.unit{
+									font-size: 24upx;
+									line-height: 1.4;
+									margin-right: 4upx;
+								}
+								.num{
+									font-size: 36upx;
+									font-weight: bold;
+									line-height: 1;
+								}
+							}
+							.old{
+								font-size: 26upx;
+								font-family: PingFang SC;
+								text-decoration: line-through;
+								color: #BBBBBB;
+								line-height: 1;
+							}
+						}
+					}
+				}
+			}
+		}
+		
+	}
+	.official-account{
+		box-sizing: border-box;
+		width: 100%;
+		height: 100upx;
+		position: fixed;
+		bottom: 30upx;
+		z-index: 99;
+		padding: 0 20upx 180rpx 20upx;
+	}
+	// 消息
+	.message-box{
+		box-sizing: border-box;
+		width: 100%;
+		height: 84upx;
+		background: #F3FFFD;
+		border: 1px solid #C7E9E5;
+		box-shadow: 0px 4upx 12upx 0px rgba(90, 203, 138, 0.16);
+		border-radius: 16upx;
+		position: fixed;
+		left: 50%;
+		transform: translateX(-50%);
+		bottom: 30upx;
+		z-index: 99;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding: 0 20upx 0 30upx;
+		.left{
+			flex:1;
+			display: flex;
+			align-items: center;
+			image{
+				width: 24upx;
+				height: 24upx;
+				margin-right: 18upx;
+			}
+			.text{
+				width: 90%;
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #2BC7B9;
+			}
+		}
+		.btn{
+			width: 100upx;
+			height: 48upx;
+			line-height: 48upx;
+			text-align: center;
+			font-size: 24upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #FFFFFF;
+			border: 1px solid #D2E6FF;
+			background: linear-gradient(135deg, #2BC7B9 0%, #60CDC3 100%);
+			border-radius: 24upx;
+			margin-left: 30upx;
+		}
+		
+	}
+ 
+	.contact-btn{
+		display: inline-block;
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		opacity: 0;
+	}
+		.popup-box{
+			position: fixed;
+			top: 0;
+			right: 0;
+			left: 0;
+			bottom: 0;
+			z-index: 999;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			.info-mask {
+				position: fixed;
+				top: 0;
+				right: 0;
+				bottom: 0;
+				left: 0;
+				background-color: rgba($color: #000000, $alpha: 0.5);
+				z-index: 999;
+			}
+			.info-form {
+				z-index: 1000;
+				width: 450rpx;
+				display: flex;
+				flex-direction: column;
+				justify-content: center;
+				align-items: center;
+				position: relative;
+				image{
+					width::100%;
+				}
+			}
+		}
+
+</style>
+ 

+ 473 - 0
pages/home/productList.vue

@@ -0,0 +1,473 @@
+<template>
+	<view class="content">
+		<view class="top-fixed">
+			<!-- 搜索框 -->
+			<view class="search-cont">
+				<view class="inner">
+					<image class="icon-search" src="../../static/images/search.png" mode=""></image>
+					<input type="text" @confirm="goSearch"   :value="form.productName" placeholder="输入药品名称" placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
+				</view>
+				<view class="icon-search">
+					<image @click="showChange(2)" v-if="showType==1"  src="../../static/images/search1.png" mode=""></image>
+					<image @click="showChange(1)" v-if="showType==2"  src="../../static/images/search2.png" mode=""></image>
+				</view>
+			</view>
+			<!-- 排序框 -->
+			<view class="sort-box">
+				<view class="item" :class="form.defaultOrder=='desc'?'active':''" @click="searchChange('1')">
+					<text class="label">默认</text>
+				</view>
+				<view class="item" @click="searchChange('2')">
+					<text class="label">价格</text>
+					<view class="sort-img">
+						<image v-if="form.priceOrder==null||form.priceOrder=='desc'" src="../../static/images/price_arrow_up.png" mode="" @click="priceUp(true)"></image>
+						<image v-if="form.priceOrder=='asc'" src="../../static/images/price_arrow_up2.png" mode="" @click="priceUp(false)"></image>
+						<image v-if="form.priceOrder==null||form.priceOrder=='asc'" src="../../static/images/price_arrow_down.png" mode="" @click="priceDown(true)"></image>
+						<image v-if="form.priceOrder=='desc'" src="../../static/images/price_arrow_down2.png" mode="" @click="priceDown(false)"></image>
+					</view>
+				</view>
+				<view class="item" @click="searchChange('3')">
+					<text class="label">销量</text>
+					<view class="sort-img">
+						<image v-if="form.salesOrder==null||form.salesOrder=='desc'" src="../../static/images/price_arrow_up.png" mode="" @click="saleUp(true)"></image>
+						<image v-if="form.salesOrder=='asc'" src="../../static/images/price_arrow_up2.png" mode="" @click="saleUp(false)"></image>
+						<image v-if="form.salesOrder==null||form.salesOrder=='asc'" src="../../static/images/price_arrow_down.png" mode="" @click="saleDown(true)"></image>
+						<image v-if="form.salesOrder=='desc'" src="../../static/images/price_arrow_down2.png" mode="" @click="saleDown(false)"></image>
+					</view>
+				</view>
+				<view class="item" :class="form.newOrder=='desc'?'active':''" @click="searchChange('4')">
+					<text class="label">新品</text>
+				</view>
+			</view>
+		</view>
+	 
+		<!-- 数据列表 -->
+		<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 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>
+					<view class="info-box">
+						<view class="title ellipsis2">{{item.productName}}</view>
+						<view class="intro ellipsis">{{item.productInfo}}</view>
+						<view class="prce-num">
+							<view class="price">
+								<text class="unit">¥</text>
+								<text class="num">{{item.price.toFixed(2)}} </text>
+							</view>
+							<view class="cart-img" @click="navgetTo('../shopping/cart')">
+								<view class="sale">已售 {{item.sales}} {{item.unitName}}</view>
+							</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>
+					<view class="info-box">
+						<view class="title ellipsis2">{{item.productName}}</view>
+						<view class="price-box">
+							<view class="now">
+								<text class="unit">¥</text>
+								<text class="num">{{item.price.toFixed(2)}}</text>
+							</view>
+							<view class="old">¥{{item.otPrice.toFixed(2)}}</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</mescroll-body>
+	</view>
+</template>
+
+<script>
+	import {getProducts} from '@/api/product'
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	export default {
+		mixins: [MescrollMixin], 
+		data() {
+			return {
+				showType:1,
+				form:{
+					defaultOrder:'desc',
+					newOrder:null,
+					priceOrder:null,
+					salesOrder:null,
+					productName:"",
+				},
+				mescroll:null,
+				// 上拉加载的配置
+				upOption: {
+					onScroll:true,
+					use: true, // 是否启用上拉加载; 默认true
+					page: {
+						num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
+						size: 10 // 每页数据的数量,默认10
+					},
+					noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
+					empty: {
+						icon:'/static/images/no_data.png',
+						tip: '暂无数据'
+					},
+					textNoMore:"已经到底了",
+				},
+				// 列表数据
+				dataList: [],
+			};
+		},
+		onLoad(option) {
+			if(option.key!=undefined){
+				this.form.productName = option.key
+			}
+		},
+		methods:{
+			goSearch(e) {
+				this.form.productName=e.detail.value;
+				this.mescroll.resetUpScroll();
+			},
+			searchChange(type){
+				if(type==1){
+					this.form.defaultOrder="desc";
+					this.form.priceOrder=null;
+					this.form.salesOrder=null;
+					this.form.newOrder=null;
+					
+				}
+				else if(type==2){
+					this.form.defaultOrder=null;
+					if(this.form.priceOrder==null){
+						this.form.priceOrder="asc"
+					}
+					else if(this.form.priceOrder=="asc"){
+						this.form.priceOrder="desc"
+					}
+					else if(this.form.priceOrder=="desc"){
+						this.form.priceOrder=null;
+					}
+					this.form.salesOrder=null;
+					this.form.newOrder=null;
+				}
+				else if(type==3){
+					this.form.defaultOrder=null;
+					this.form.priceOrder=null;
+					if(this.form.salesOrder==null){
+						this.form.salesOrder="asc"
+					}
+					else if(this.form.salesOrder=="asc"){
+						this.form.salesOrder="desc"
+					}
+					else if(this.form.salesOrder=="desc"){
+						this.form.salesOrder=null;
+					}
+					this.form.newOrder=null;
+					
+				}
+				else if(type==4){
+					this.form.newOrder="desc";
+					this.form.defaultOrder=null;
+					this.form.priceOrder=null;
+					this.form.salesOrder=null;
+					
+					
+				}
+				this.mescroll.resetUpScroll();
+			},
+			showChange(type){
+				this.showType=type;
+			},
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
+			},
+			/*下拉刷新的回调 */
+			downCallback(mescroll) {
+				mescroll.resetUpScroll()
+			},
+			upCallback(page) {
+				//联网加载数据
+				var that = this;
+				this.form.page=page.num;
+				this.form.pageSize=page.size;
+				getProducts(this.form).then(res => {
+					if(res.code==200){
+						//设置列表数据
+						if (page.num == 1) {
+							that.dataList = res.data.list; 
+							
+						} else {
+							that.dataList = that.dataList.concat(res.data.list);
+							 
+						}
+						that.mescroll.endBySize(res.data.list.length, res.data.total);
+						
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: "请求失败",
+						});
+						that.dataList = null;
+						that.mescroll.endErr();
+					}
+				});
+			},
+			// 价格升序是否选中
+			priceUp(value) {
+				this.priceIsUp = value
+				this.priceIsDown = false
+			},
+			// 价格降序是否选中
+			priceDown(value) {
+				this.priceIsDown = value
+				this.priceIsUp = false
+			},
+			// 销量升序是否选中
+			saleUp(value) {
+				this.saleIsUp = value
+				this.saleIsDown = false
+			},
+			// 销量降序是否选中
+			saleDown(value) {
+				this.saleIsDown = value
+				this.saleIsUp = false
+			},
+			// 查看详情
+			showDetail(item) {
+				uni.navigateTo({
+					url: '../shopping/productDetails?productId='+item.productId
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.top-fixed{
+		width: 100%;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 10;
+	}
+	.search-cont{
+		padding: 16upx 30upx;
+		background-color: #FFFFFF;
+		display:flex;
+		align-items: center;
+		justify-content: space-between;
+		.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;
+			}
+			
+		}
+		.icon-search{
+			margin-left: 10upx;
+			width: 40upx;
+			height: 40upx;
+			image{
+				width: 40upx;
+				height: 40upx;
+			}
+			
+		}
+	}
+	.sort-box{
+		height: 88upx;
+		background: #FFFFFF;
+		padding: 0 100upx;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		.item{
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			&.active .label{
+				color: #2BC7B9;
+			}
+			.label{
+				font-size: 26upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #666666;
+				line-height: 1;
+			}
+			.sort-img{
+				height: 20upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				margin: 3upx 0 0 10upx;
+				image{
+					width: 12upx;
+					height: 8upx;
+				}
+			}
+		}
+	}
+	.medic-list{
+		padding: 20upx;
+		.item{
+			box-sizing: border-box;
+			min-height: 285upx;
+			background: #FFFFFF;
+			border: 4upx solid #FFFFFF;
+			border-radius: 16upx;
+			margin-bottom: 20upx;
+			padding: 40upx 30upx;
+			display: flex;
+			.img-box{
+				width: 200upx;
+				height: 200upx;
+				margin-right: 30upx;
+				image{
+					width: 100%;
+					height: 100%;
+				}
+			}
+			.info-box{
+				width: calc(100% - 210upx);
+				.title{
+					font-size: 32upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					line-height: 40rpx;
+					height: 80rpx;
+				}
+				.intro{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1;
+					margin-top: 26upx;
+				}
+			 
+				.prce-num{
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					margin-top: 30upx;
+					.price{
+						display: flex;
+						align-items: flex-end;
+						.unit{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #FF6633;
+							line-height: 1.2;
+							margin-right: 4upx;
+						}
+						.num{
+							font-size: 36upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FF6633;
+							line-height: 1;
+						}
+					}
+					.cart-img{
+						.sale{
+							font-size: 20upx;
+							font-family: PingFang SC;
+							color: #999999;
+						}
+						 
+					}
+				}
+			}
+		}
+	}
+	.goods-list{
+		padding: 20upx;
+		display: flex;
+		flex-wrap: wrap;
+		.item{
+			margin-right: 20rpx;
+			margin-bottom: 20rpx;
+			width: 345rpx;
+			background: #FFFFFF;
+			box-shadow: 0px 0px 10rpx 4rpx rgba(199, 199, 199, 0.22);
+			border-radius: 20rpx;
+			overflow: hidden;
+			&:nth-child(2n) {
+				margin-right: 0;
+			}
+			.img-box{
+				width: 100%;
+				height: 334upx;
+				image{
+					width: 100%;
+					height: 100%;
+				}
+			}
+			.info-box{
+				box-sizing: border-box;
+				height: 182upx;
+				padding: 20upx 20upx 30upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				.title{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					line-height: 40upx;
+				}
+				.price-box{
+					display: flex;
+					align-items: flex-end;
+					.now{
+						display: flex;
+						align-items: flex-end;
+						margin-right: 20upx;
+						.unit{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #FF6633;
+							line-height: 1.2;
+							margin-right: 4upx;
+						}
+						.num{
+							font-size: 36upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FF6633;
+							line-height: 1;
+						}
+					}
+					.old{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						text-decoration: line-through;
+						color: #BBBBBB;
+						line-height: 1.1;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 132 - 0
pages/home/productSearch.vue

@@ -0,0 +1,132 @@
+<template>
+	<view class="content">
+		<!-- 搜索框 -->
+		<view class="search-cont">
+			<view class="inner">
+				<image class="icon-search" src="../../static/images/search.png" mode=""></image>
+				<input type="text" value="" placeholder="输入药品名称" confirm-type="搜索" @confirm="goSearch" :focus='setFocus' placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
+			</view>
+		</view>
+		<!-- 搜索历史 -->
+		<view class="title-box">
+			<text class="title">历史搜索</text>
+			<image src="../../static/images/del.png" mode="" @click="clearHistory"></image>
+		</view>
+		<view class="data-list">
+			<view class="item" v-for="(item,index) in searchHistory" :key="index" @click="doSearch(item)">
+				{{ item }}
+			</view>
+		</view>
+		<!-- 推荐搜索 -->
+		<view class="title-box">
+			<text class="title">推荐搜索</text>
+		</view>
+		<view class="data-list">
+			<view class="item" v-for="(item,index) in topSearch" :key="index" @click="doSearch(item)">
+				{{ item }}
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				setFocus: false,
+				// 历史搜索
+				searchHistory: [],
+				// 推荐搜索
+				topSearch: []
+			};
+		},
+		onShow() {
+			this.setFocus = true
+			this.searchHistory=this.utils.getHisSearch();
+			var config=uni.getStorageSync('config');
+			if(config!=null&&config!=undefined&&config!=""){
+				this.topSearch=JSON.parse(config).hotSearch.split(',');
+			}
+		},
+		methods:{
+			// 清空历史搜索数据
+			clearHistory() {
+				this.utils.clearHisSearch();
+				this.searchHistory=this.utils.getHisSearch();
+			},
+			doSearch(item){
+				uni.navigateTo({
					url: './productList?key=' + item
				})
+			},
+			goSearch(e) {
+				if(e.detail.value!=null&&e.detail.value!=""){
+					this.utils.addHisSearch(e.detail.value);
+				}
+				uni.navigateTo({
+					url: './productList?key=' + e.detail.value
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content{
+		.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;
+				}
+			}
+		}
+		.title-box{
+			padding: 30upx;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			.title{
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #111111;
+			}
+			image{
+				width: 30upx;
+				height: 30upx;
+			}
+		}
+		.data-list{
+			padding: 0upx 10upx 30upx;
+			display: flex;
+			flex-wrap: wrap;
+			.item{
+				padding: 0 30upx;
+				height: 56upx;
+				line-height: 56upx;
+				font-size: 26upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #333333;
+				background: #F5F5F5;
+				border-radius: 28upx;
+				margin: 0 20upx 20upx 0;
+			}
+		}
+	}
+</style>

+ 461 - 0
pages/shopping/cart.vue

@@ -0,0 +1,461 @@
+<template>
+	<view class="content">
+		<!-- 商品列表 -->
+		<view class="goods-list">
+			<view class="item" v-for="(item,index) in carts" :key="index">
+				<label style="margin-right: 30upx;">
+					<checkbox :value="item.checked"  :checked="item.checked" @click="checkChange(item)" />
+				</label>
+				<image class="goods-img" :src="item.productAttrImage==null||item.productAttrImage==''?item.productImage:item.productAttrImage" mode="aspectFit"></image>
+				<view class="info-box">
+					<view>
+						<view class="title-box">
+							<view class="tag">{{utils.getDictLabelName("storeProductType",item.productType)}}</view>
+							<view class="title ellipsis">{{ item.productName }}</view>
+						</view>
+						<view class="intro ellipsis">{{item.productAttrName}}</view>
+					</view>
+					<view class="price-num">
+						<view class="price">
+							<text class="unit">¥</text>
+							<text class="text">{{item.price}}</text>
+						</view>
+						<view class="num-box">
+							<view class="img-box" @click="delNum(item)">
+								<image v-if="item.cartNum <= 1" src="../../static/images/jian.png" mode=""></image>
+								<image v-else src="../../static/images/jian2.png" mode=""></image>
+							</view>
+							<input  type="number" @change="changeNum($event,item)" :value="item.cartNum"   />
+							<view class="img-box" @click="addNum(item)">
+								<image src="../../static/images/add.png" mode=""></image>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	 
+		<view v-if="carts.length == 0" class="no-data-box">
+			<image src="../../static/images/no_data.png" mode="aspectFit"></image>
+			<view class="empty-title">暂无数据</view>
+		</view>
+		<!-- 猜你喜欢 -->
+		 
+		<view class="like-product">
+			<likeProduct  ref="product" />
+		</view>
+		<!-- 底部按钮 -->
+		<view class="btn-foot">
+			<view class="left">
+				<label>
+					<checkbox  :checked="checkAll" @click="handleCheckAll()" />
+				</label>
+				<text class="text">全选</text>
+				<text class="text" @click="delCart()">删除</text>
+			</view>
+			<view class="right">
+				<view class="total">
+					<text class="label">合计:</text>
+					<view class="price">
+						<text class="unit">¥</text>
+						<text class="num">{{totalMoney.toFixed(2)}}</text>
+					</view>
+				</view>
+				<view class="btn" @click="submit">结算</view>
+			</view>
+		</view>
+		
+	</view>
+</template>
+
+<script>
+	import {getCarts,cartNum,delCart} from '@/api/product'
+	import likeProduct from '@/components/likeProduct.vue'
+	export default {
+		components: {
+			likeProduct
+		},	
+		data() {
+			return {
+				 
+				totalMoney:0.00,
+				carts:[],
+				checkAll:false,
+			}	
+		},
+		onLoad() {
+			this.getCarts();
+ 
+		},
+		onReachBottom() {
+			this.$refs.product.getGoodsProducts();
+		},
+		methods: {
+			delCart(){
+				var selectCarts=this.carts.filter(ele => ele.checked==true).map(ele => {
+				  return ele.id
+				});
+				if(selectCarts.length==0){
+					uni.showToast({
+						icon:'none',
+						title: "请选择商品删除",
+					});
+					return;
+				}
+				let data = {ids:selectCarts};
+				delCart(data).then(
+					res => {
+						if(res.code==200){
+							uni.showToast({
+								icon:'success',
+								title: "操作成功",
+							});
+							this.getCarts()
+						}else{
+							
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+				console.log(selectCarts)
+			},
+			computedMoney(){
+				var money=0;
+				var that=this;
+				this.carts.forEach((item,index,arr)=>{
+					 if(item.checked){
+						 money+=item.price*item.cartNum;
+					 }
+				})
+				console.log(money);
+				this.totalMoney=money;
+			},
+			handleCheckAll(){
+				this.checkAll=!this.checkAll;
+				var that=this;
+				this.carts.forEach((item,index,arr)=>{
+				     item.checked=that.checkAll;
+				})
+				this.computedMoney();
+			},
+			checkChange(item){
+				item.checked=!item.checked;
+				this.computedMoney();
+			},
+			changeNum(e,item) {
+				item.cartNum = e.detail.value.replace(/\D/g, '')
+				if (item.cartNum <= 1) {
+				  uni.showToast({
+				    title: "已经是底线啦!",
+				    icon: "none",
+				    duration: 2000
+				  });
+				  return;
+				}
+				if(item.cartNum < 1) {
+					item.cartNum = 1
+				}
+				if(item.cartNum>=item.stock){
+					item.cartNum=item.stock;
+				}
+				this.changeCartNum(item)
+			},
+			changeCartNum(item){
+				let data = {number:item.cartNum,id:item.id};
+				cartNum(data).then(
+					res => {
+						if(res.code==200){
+							uni.showToast({
+								icon:'none',
+								title: "操作成功",
+							});
+							this.computedMoney();
+							
+						}else{
+							
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			getCarts(){
+				getCarts().then(
+					res => {
+						if(res.code==200){
+							 this.carts=res.carts;
+							 this.carts.forEach((item,index,arr)=>{
+							      item.checked=false;
+							 })
+							 this.computedMoney();
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			// 购物车减法
+			delNum(item) {
+				if (item.cartNum <= 1) {
+				  uni.showToast({
+				    title: "已经是底线啦!",
+				    icon: "none",
+				    duration: 2000
+				  });
+				  return;
+				}
+				item.cartNum --
+				if(item.cartNum < 1) {
+					item.cartNum = 1
+				}
+				 
+				this.changeCartNum(item)
+			},
+			// 购物车加法
+			addNum(item) {
+				console.log(item)
+				item.cartNum++
+				if(item.cartNum>=item.stock){
+					item.cartNum=item.stock;
+				}
+				this.changeCartNum(item)
+			},
+			// 结算
+			submit() {
+				var selectCarts=this.carts.filter(ele => ele.checked==true).map(ele => {
+				  return ele.id
+				});
+				if(selectCarts.length==0){
+					uni.showToast({
+						icon:'none',
+						title: "请选择商品",
+					});
+					return;
+				}
+				uni.navigateTo({
+					url: './confirmOrder?type=cart&cartIds='+selectCarts.toString()
+				})
+			},
+			showProduct(item){
+				uni.navigateTo({
+					url: '../shopping/productDetails?productId='+item.productId
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+	}
+	.content{
+		height: 100%;
+		padding: 20upx;
+		.goods-list{
+			.item{
+				box-sizing: border-box;
+				height: 221upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				margin-bottom: 20upx;
+				padding: 30upx;
+				display: flex;
+				align-items: center;
+				&:last-child{
+					margin-bottom: 0;
+				}
+				.goods-img{
+					width: 160upx;
+					height: 160upx;
+					background: #FFFFFF;
+					margin-right: 30upx;
+					flex-shrink: 0;
+				}
+				.info-box{
+					height: 160upx;
+					display: flex;
+					flex-direction: column;
+					justify-content: space-between;
+					width: calc(100% - 255upx);
+					.title-box{
+						width: 100%;
+						display: flex;
+						align-items: center;
+						.tag{
+							padding: 0 6upx;
+							height: 30upx;
+							line-height: 30upx;
+							font-size: 22upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FFFFFF;
+							background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
+							border-radius: 4upx;
+							margin-right: 10upx;
+							flex-shrink: 0;
+						}
+						.title{
+							flex: 1;
+							font-size: 28upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #111111;
+							line-height: 1;
+						}
+					}
+					.intro{
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						margin-top: 22upx;
+						line-height: 1;
+					}
+					.price-num{
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						.price{
+							display: flex;
+							align-items: flex-end;
+							.unit{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #FF6633;
+								line-height: 1.2;
+								margin-right: 4upx;
+							}
+							.text{
+								font-size: 32upx;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #FF6633;
+								line-height: 1;
+							}
+						}
+						.num-box{
+							display: flex;
+							align-items: center;
+							.img-box{
+								width: 60upx;
+								height: 60upx;
+								// border-radius: 4upx;
+								border: 1px solid #dddddd;
+								display: flex;
+								align-items: center;
+								justify-content: center;
+								image{
+									width: 25rpx;
+									height: 25rpx;
+								}
+							}
+							input{
+								width: 60upx;
+								height: 60upx;
+								line-height: 60upx;
+								font-size: 28upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								// border-radius: 4upx;
+								border-top: 1px solid #dddddd;
+								border-bottom: 1px solid #dddddd;
+								text-align: center;
+								// margin: 0 16upx;
+							}
+						}
+					}
+				}
+			}
+		}
+		.like-product{
+			padding-bottom: 120upx;
+		}
+		.btn-foot{
+			box-sizing: border-box;
+			width: 100%;
+			height: 121upx;
+			background: #FFFFFF;
+			padding: 16upx 30upx 16upx 60upx;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			position: fixed;
+			left: 0;
+			bottom: 0;
+			z-index: 99;
+			.left{
+				display: flex;
+				align-items: center;
+				.text{
+					margin-left: 14upx;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					line-height: 1;
+				}
+			}
+			.right{
+				display: flex;
+				align-items: center;
+				.total{
+					display: flex;
+					align-items: flex-end;
+					margin-right: 36upx;
+					.label{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						line-height: 1.5;
+					}
+					.price{
+						display: flex;
+						align-items: flex-end;
+						.unit{
+							font-size: 32upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FF6633;
+							line-height: 1.2;
+							margin-right: 10upx;
+						}
+						.num{
+							font-size: 30upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FF6633;
+							line-height: 1;
+						}
+					}
+				}
+				.btn{
+					width: 200upx;
+					height: 88upx;
+					line-height: 88upx;
+					text-align: center;
+					font-size: 30upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FFFFFF;
+					background: #2BC7B9;
+					border-radius: 44upx;
+				}
+			}
+		}
+	}
+</style>

+ 780 - 0
pages/shopping/confirmCreateOrder.vue

@@ -0,0 +1,780 @@
+<template>
+	<view>
+		<view class="inner-box">
+			<!-- 收货人 -->
+			<view class="address-box" v-if="address==null" @click="openAddress()">
+				<view class="left">
+					<view class="name-box">
+						<text class="text name">添加收货地址</text>
+					</view>
+					</vie>
+				</view>
+				<view class="arrow-box">
+					<image src="../../static/images/arrow_gray.png" mode=""></image>
+				</view>
+			</view>
+			<view class="address-box" v-if="address!=null" @click="openAddress()">
+				<view class="left">
+					<view class="name-box">
+						<text class="text name">{{address.realName}}</text>
+						<text class="text" v-if="address.phone!=null">{{utils.parsePhone(address.phone)}}</text>
+					</view>
+					<view class="address">
+						{{address.province}}{{address.city}}{{address.district}}{{address.detail}}
+					</view>
+				</view>
+				<view class="arrow-box">
+					<image src="../../static/images/arrow_gray.png" mode=""></image>
+				</view>
+			</view>
+			<!-- 药品列表 -->
+			<view class="goods-list">
+				<view v-for="(item,index) in carts" :key="index" class="item">
+					<view class="img-box">
+						<image :src="item.productAttrImage!=null?item.productAttrImage:item.productImage" mode="aspectFill"></image>
+					</view>
+					<view class="info-box">
+						<view>
+							<view class="name-box ellipsis2">
+								<view class="tag">{{utils.getDictLabelName("storeProductType",item.productType)}}</view>{{item.productName}}
+							</view>
+							<view class="spec ellipsis2">{{item.productAttrName}}</view>
+						</view>
+						<view class="price-num">
+							<view class="price">
+								<text class="unit">¥</text>
+								<text class="num">{{item.price.toFixed(2)}}</text>
+							</view>
+							<view class="num">x{{item.cartNum}}</view>
+						</view>
+					</view>
+				</view>
+				<!-- 小计 -->
+				<view class="sub-total">
+					<text class="label">小计:</text>
+					<view class="price">
+						<text class="unit">¥</text>
+						<text class="num">{{price.totalPrice.toFixed(2)}}</text>
+					</view>
+				</view>
+			</view>
+			<!-- 积分 -->
+			<view class="points">
+				<view class="left">
+					<image src="../../static/images/points.png" mode=""></image>
+					<text class="text">可用积分</text>
+				</view>
+				<view class="right">
+					<text class="text">{{price.usedIntegral}}积分</text>
+					<evan-switch @change="integralChange" v-model="checked" activeColor="#2BC7B9" inactiveColor="rgba(0, 0, 0, 0.1)"></evan-switch>
+				</view>
+			</view>
+			<view class="points" @click="openCoupon()">
+				<view class="left">
+					<text class="text">优惠券</text>
+				</view>
+				<view class="right">
+					<text class="text">{{couponText}}</text>
+					<image src="/static/images/arrow4.png" mode=""></image>
+				</view>
+			</view>
+			<view class="points">
+				<view class="left">
+					<text class="text">运费</text>
+				</view>
+				<view class="right">
+					<text class="text" v-if="address!=null">{{price.payPostage==null||price.payPostage==0?'免运费':price.payPostage.toFixed(2)}}</text>
+					<text class="text" v-if="address==null">--</text>
+				</view>
+			</view>
+			<view class="points">
+				<view class="left">
+					<text class="text">服务费</text>
+				</view>
+				<view class="right">
+					<text class="text">{{price.serviceFee.toFixed(2)}}</text>
+				</view>
+			</view>
+			<!-- 备注 -->
+			<view class="remarks">
+				<input type="text" v-model="form.mark" placeholder="备注留言(选填)" placeholder-class="input" />
+			</view>
+		</view>
+		<!-- 底部按钮 -->
+		<view class="btn-foot">
+			<view class="right">
+				<view class="total">
+					<text class="label">合计:</text>
+					<view class="price">
+						<text class="unit">¥</text>
+						<text class="num">{{price.payPrice.toFixed(2)}}</text>
+					</view>
+				</view>
+				<view class="btn" @click="submitOrder">提交订单</view>
+			</view>
+		</view>
+		<popupBottom ref="popup" :visible.sync="couponVisible" title=" " bgColor="#f5f5f5" radius="30"    maxHeight="60%">
+		     <view class="coupon" style="height:650rpx;">
+				 <div class="coupon-list" v-if="couponsList.length > 0">
+				   <div class="item acea-row row-center-wrapper"  v-for="(item, index) in couponsList" :key="index">
+				     <div class="money" >
+				       <image v-if="item.status==0" class="img" src="../../static/images/coupon1.png" mode="widthFix"></image>
+				 	  <image v-if="item.status!=0" class="img" src="../../static/images/coupon2.png" mode="widthFix"></image>
+				 	  <div style="z-index: 999;">
+				         ¥<span class="num">{{ item.couponPrice }}</span>
+				       </div>
+				       <div class="pic-num"  >满{{ item.useMinPrice }}元可用</div>
+				     </div>
+				     <div class="text">
+				       <div class="condition line1">
+				         {{ item.couponTitle }}
+				       </div>
+				       <div class="data acea-row row-between-wrapper">
+							<div >{{ item.limitTime }}到期</div>
+							<div class="bnt bg-color-red" @click="couponSelect(item)"  >选择</div>
+				       </div>
+				     </div>
+				   </div>
+				 </div>
+				 <view v-if="couponsList.length == 0" class="no-data-box" >
+				 	<image src="/static/images/no_data.png" mode="aspectFit"></image>
+				 	<view class="empty-title">暂无数据</view>
+				 </view>
+			 </view>
+			 
+		</popupBottom>
+	</view>
+</template>
+
+<script>
+	import {getWeixinOrderTemps} from '@/api/common'
+	
+	import {confirm,computed,create} from '@/api/storeOrder'
+	import { getMyEnableCouponList } from '@/api/coupon'
+	 
+	import EvanSwitch from '@/components/evan-switch/evan-switch.vue'
+	import popupBottom from '@/components/px-popup-bottom/px-popup-bottom.vue'
+	
+	export default {
+		components: {
+			EvanSwitch,
+			popupBottom
+		},
+		data() {
+			return {
+				temps:[],
+				couponUserId:null,
+				couponText:"请选择",
+				couponsList:[],
+				couponVisible:false,
+				price:{
+					payPrice:0,
+					totalPostage:0,
+					usedIntegral:0,
+					totalPrice:0.00,
+				},
+				address:null,
+				carts:[],
+				checked: false,
+				type:null,
+				cartIds:null,
+				form:{
+					useIntegral:0,
+					orderKey:null,
+					addressId:null,
+					mark:null,
+					companyId:null,
+					companyUserId:null,
+					createOrderKey:null,
+				}
+			}
+		},
+		onLoad(option) {
+			this.form.createOrderKey=option.createOrderKey;
+			this.form.companyId=option.companyId;
+			this.form.companyUserId=option.companyUserId;
+			this.cartIds=option.cartIds;
+			this.type=option.type;
+			this.confirm();
+			uni.$on('updateAddress', (e) => {
+				this.address=e;
+				this.form.addressId=e.id;
+			})
+			this.getWeixinOrderTemps();
+		},
+		methods: {
+			getWeixinOrderTemps:function(){
+				getWeixinOrderTemps().then(
+					res => {
+						if(res.code==200){
+							this.temps=res.temp
+							console.log(this.temps)
+						}else{
+							 
+						}
+					},
+					rej => {}
+				);
+			},
+			couponSelect(item){
+				this.couponText="-¥"+item.couponPrice.toFixed(2);
+				this.couponUserId=item.id;
+				this.couponVisible=false;
+				this.computed();
+			},
+			openCoupon(){
+				let that = this;
+				var data={couponType:2,useMinPrice:this.price.payPrice};
+				getMyEnableCouponList(data).then(res => {
+				  this.couponVisible=true;
+				  that.couponsList = res.data
+				})
+			},
+			integralChange(e){
+				console.log(e)
+				this.form.useIntegral=e?1:0
+				this.computed()
+			},
+			confirm(item){
+				let data = {type:this.type,cartIds:this.cartIds};
+				confirm(data).then(
+					res => {
+						if(res.code==200){
+							 
+							 this.carts=res.carts;
+							 this.form.orderKey=res.orderKey;
+							 if(res.address!=null){
+								 this.form.addressId=res.address.id;
+								 this.address=res.address;
+								 console.log(this.form.addreddId)
+							 }
+							 this.computed()
+						}else{
+							
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			computed(item){
+				let data = {companyUserId:this.form.companyUserId,createOrderKey:this.form.createOrderKey,couponUserId:this.couponUserId,orderKey:this.form.orderKey,addressId:this.form.addressId,useIntegral:this.form.useIntegral};
+				computed(data).then(
+					res => {
+						if(res.code==200){
+							 console.log(res)
+							 this.price=res.data
+							 
+						}else{
+							if(res.code==501){
+								uni.showToast({
+									icon:'none',
+									title: res.msg,
+								});
+								setTimeout(function(){
+									uni.navigateBack({
+										delta:1
+									})
+								},500);
+								return;
+							}
+							else{
+								uni.showToast({
+									icon:'none',
+									title: res.msg,
+								});
+							}
+							
+						}
+					},
+					rej => {}
+				);
+			},
+			// 提交订单
+			submitOrder() {
+				var that=this;
+				if(this.form.orderKey==null){
+					uni.showToast({
+						icon:'none',
+						title: '订单KEY不存在',
+					});
+					return;
+				}
+				if(this.form.addressId==null){
+					uni.showToast({
+						icon:'none',
+						title: '收货地址不能为空',
+					});
+					return;
+				}
+				
+				uni.requestSubscribeMessage({
+					tmplIds: this.temps,
+					success(res) {
+						 that.createOrder();
+					},
+					fail(res) {
+						that.createOrder();
+					}
+				})
+				
+			},
+			createOrder(){
+				var that=this;
+				var data=null;
+				var tuiUserId=uni.getStorageSync('tuiUserId');
+				uni.showLoading({
+					title: '正在处理中...'
+				});
+				if(tuiUserId!=null&&tuiUserId!=undefined&&tuiUserId>0){
+					data = {createOrderKey:this.form.createOrderKey,orderCreateType:3,tuiUserId:tuiUserId,companyId:this.form.companyId,companyUserId:this.form.companyUserId,couponUserId:this.couponUserId,mark:this.form.mark,orderKey:this.form.orderKey,addressId:this.form.addressId,useIntegral:this.form.useIntegral,payType:1};
+				}
+				else{
+					data = {createOrderKey:this.form.createOrderKey,orderCreateType:3,companyId:this.form.companyId,companyUserId:this.form.companyUserId,couponUserId:this.couponUserId,mark:this.form.mark,orderKey:this.form.orderKey,addressId:this.form.addressId,useIntegral:this.form.useIntegral,payType:1};
+				}
+				create(data).then(
+					res => {
+						uni.hideLoading()
+						if(res.code==200){
+							uni.hideLoading()
+							if(res.order.isPrescribe==1){
+								setTimeout(function(){
+									uni.redirectTo({
+										url:"prescribe?orderId="+res.order.id
+									})
+								},200);
+							}
+							else{
+								setTimeout(function(){
+									uni.redirectTo({
+										url: './paymentOrder?orderId='+res.order.id
+									})
+								},200);
+							}
+							
+							return;
+						}
+						else{
+							if(res.code==501){
+								uni.showToast({
+									icon:'none',
+									title: res.msg,
+								});
+								setTimeout(function(){
+									uni.navigateBack({
+										delta:1
+									})
+								},200);
+								return;
+							}
+							else{
+								uni.showToast({
+									icon:'none',
+									title: res.msg,
+								});
+							}
+						}
+					},
+					rej => {}
+				);
+			},
+			openAddress(){
+				uni.navigateTo({
+					url: '/pages_user/user/address'
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.inner-box{
+		padding: 20upx 20upx 140upx;
+		.address-box{
+			box-sizing: border-box;
+			min-height: 171upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			background-image: url(../../static/images/address_bg.png);
+			background-repeat: no-repeat;
+			background-size: 100% 30upx;
+			background-position: left bottom;
+			padding: 38upx 30upx 36upx;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			.left{
+				width: 92%;
+				.name-box{
+					display: flex;
+					align-items: center;
+					.text{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #111111;
+						line-height: 1;
+						&.name{
+							margin-right: 30upx;
+						}
+					}
+				}
+				.address{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					line-height: 42upx;
+					text-align:left;
+					margin-top: 23upx;
+				}
+			}
+			.arrow-box{
+				width: 12upx;
+				height: 23upx;
+				display: flex;
+				align-items: cenetr;
+				justify-content: cenetr;
+				image{
+					width: 100%;
+					height: 100%;
+				}
+			}
+		}
+		.goods-list{
+			margin-top: 20upx;
+			padding: 0 30upx;
+			background-color: #FFFFFF;
+			border-radius: 16upx;
+			.item{
+				padding: 30upx 0;
+				border-bottom: 1px solid #EDEEEF;
+				display: flex;
+				align-items: center;
+				.img-box{
+					width: 160upx;
+					height: 160upx;
+					margin-right: 30upx;
+					image{
+						width: 100%;
+						height: 100%;
+					}
+				}
+				.info-box{
+					width: calc(100% - 190upx);
+					height: 160upx;
+					display: flex;
+					flex-direction: column;
+					justify-content: space-between;
+					.name-box{
+						font-size: 28upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #111111;
+						line-height: 40upx;
+						.tag{
+							display: inline-block;
+							padding: 0 6upx;
+							height: 30upx;
+							background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
+							border-radius: 4upx;
+							margin-right: 10upx;
+							font-size: 22upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FFFFFF;
+							line-height: 30upx;
+							float: left;
+							margin-top: 7upx;
+						}
+					}
+					.spec{
+						margin-top: 10upx;
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						line-height: 1;
+					}
+					.price-num{
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						.price{
+							display: flex;
+							align-items: flex-end;
+							.unit{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1.2;
+								margin-right: 4upx;
+							}
+							.num{
+								font-size: 32upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1;
+							}
+						}
+						.num{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1;
+						}
+					}
+				}
+			}
+			.sub-total{
+				height: 88upx;
+				display: flex;
+				align-items: center;
+				justify-content: flex-end;
+				.label{
+					font-size: 24upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+				}
+				.price{
+					display: flex;
+					align-items: flex-end;
+					.unit{
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #FF6633;
+						line-height: 1.2;
+						margin-right: 4upx;
+					}
+					.num{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+			}
+		}
+		.points{
+			height: 88upx;
+			padding: 0 30upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			 
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			.left{
+				display: flex;
+				align-items: center;
+				image{
+					width: 28upx;
+					height: 28upx;
+					margin-right: 20upx;
+				}
+				.text{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+				}
+			}
+			.right{
+				display: flex;
+				align-items: center;
+				.text{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					 
+				}
+				image{
+					margin-left: 15upx;
+					width: 14upx;
+					height: 24upx;
+				}
+			}
+		}
+		.remarks{
+			height: 88upx;
+			padding: 0 30upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			margin-top: 20upx;
+			display: flex;
+			align-items: center;
+			input{
+				width: 100%;
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #000000;
+			}
+			.input{
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+			}
+		}
+	}
+	
+	
+	.btn-foot{
+		box-sizing: border-box;
+		width: 100%;
+		height: 121upx;
+		background: #FFFFFF;
+		padding: 16upx 30upx 16upx 60upx;
+		display: flex;
+		align-items: center;
+		justify-content: flex-end;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		z-index: 99;
+		.right{
+			display: flex;
+			align-items: center;
+			.total{
+				display: flex;
+				align-items: flex-end;
+				margin-right: 36upx;
+				.label{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1.5;
+				}
+				.price{
+					display: flex;
+					align-items: flex-end;
+					.unit{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1.2;
+						margin-right: 10upx;
+					}
+					.num{
+						font-size: 50upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+			}
+			.btn{
+				width: 200upx;
+				height: 88upx;
+				line-height: 88upx;
+				text-align: center;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				background: #2BC7B9;
+				border-radius: 44upx;
+			}
+		}
+	}
+</style>
+<style lang="less" scoped>
+	.coupon {
+	  height: 100%;
+	}
+	/*优惠券列表公共*/
+	.coupon-list {
+	}
+	.coupon-list .item {
+	  display: flex;
+	  flex-direction: column;
+	  justify-content: center;
+	  align-items: center;
+	  width: 100%;
+	  height: 1.7 * 100rpx;
+	  margin-bottom: 0.16 * 100rpx;
+	}
+	
+	.coupon-list .item .money {
+	  background-size: 100% 100%;
+	  width: 2.4 * 100rpx;
+	  height: 100%;
+	  color: #fff;
+	  font-size: 0.36 * 100rpx;
+	  font-weight: bold;
+	  text-align: center;
+	  display: flex;
+	  flex-direction: column;
+	  align-items: center;
+	  justify-content: center;
+	  position: relative;
+	  
+	}
+	.coupon-list .item .money .img{
+	  position: absolute;
+	  width: 2.4 * 100rpx;
+	  height: 100%;
+	  color: #fff;
+	  
+	}
+	
+	.coupon-list .item .money .num {
+	  font-size: 0.6 * 100rpx;
+	}
+	.coupon-list .item .money .pic-num {
+	  font-size: 20rpx;
+	  z-index: 99;
+	}
+
+	
+	.coupon-list .item .text {
+	  width: 4.5 * 100rpx;
+	  padding: 0 0.17 * 100rpx 0 0.24 * 100rpx;
+	  background-color: #fff;
+	  box-sizing: border-box;
+	}
+	
+	.coupon-list .item .text .condition {
+	  font-size: 0.3 * 100rpx;
+	  color: #282828;
+	  height: 0.93 * 100rpx;
+	  line-height: 0.93 * 100rpx;
+	  border-bottom: 1px solid #f0f0f0;
+	}
+	
+	.coupon-list .item .text .data {
+	  font-size: 0.2 * 100rpx;
+	  color: #999;
+	  height: 0.76 * 100rpx;
+	}
+	
+	.coupon-list .item .text .data .bnt {
+	  width: 1.36 * 100rpx;
+	  height: 0.44 * 100rpx;
+	  border-radius: 0.22 * 100rpx;
+	  font-size: 0.22 * 100rpx;
+	  color: #fff;
+	  text-align: center;
+	  line-height: 0.44 * 100rpx;
+	  background-color: red;
+	}
+	
+	.coupon-list .item .text .data .bnt.gray {
+	  background-color: #ccc;
+	}
+</style>
+

+ 780 - 0
pages/shopping/confirmOrder.vue

@@ -0,0 +1,780 @@
+<template>
+	<view>
+		<view class="inner-box">
+			<!-- 收货人 -->
+			<view class="address-box" v-if="address==null" @click="openAddress()">
+				<view class="left">
+					<view class="name-box">
+						<text class="text name">添加收货地址</text>
+					</view>
+					</vie>
+				</view>
+				<view class="arrow-box">
+					<image src="../../static/images/arrow_gray.png" mode=""></image>
+				</view>
+			</view>
+			<view class="address-box" v-if="address!=null" @click="openAddress()">
+				<view class="left">
+					<view class="name-box">
+						<text class="text name">{{address.realName}}</text>
+						<text class="text" v-if="address.phone!=null">{{utils.parsePhone(address.phone)}}</text>
+					</view>
+					<view class="address">
+						{{address.province}}{{address.city}}{{address.district}}{{address.detail}}
+					</view>
+				</view>
+				<view class="arrow-box">
+					<image src="../../static/images/arrow_gray.png" mode=""></image>
+				</view>
+			</view>
+			<!-- 药品列表 -->
+			<view class="goods-list">
+				<view v-for="(item,index) in carts" :key="index" class="item">
+					<view class="img-box">
+						<image :src="item.productAttrImage!=null?item.productAttrImage:item.productImage" mode="aspectFill"></image>
+					</view>
+					<view class="info-box">
+						<view>
+							<view class="name-box ellipsis2">
+								<view class="tag">{{utils.getDictLabelName("storeProductType",item.productType)}}</view>{{item.productName}}
+							</view>
+							<view class="spec ellipsis2">{{item.productAttrName}}</view>
+						</view>
+						<view class="price-num">
+							<view class="price">
+								<text class="unit">¥</text>
+								<text class="num">{{item.price.toFixed(2)}}</text>
+							</view>
+							<view class="num">x{{item.cartNum}}</view>
+						</view>
+					</view>
+				</view>
+				<!-- 小计 -->
+				<view class="sub-total">
+					<text class="label">小计:</text>
+					<view class="price">
+						<text class="unit">¥</text>
+						<text class="num">{{price.totalPrice.toFixed(2)}}</text>
+					</view>
+				</view>
+			</view>
+			<!-- 积分 -->
+			<view class="points">
+				<view class="left">
+					<image src="../../static/images/points.png" mode=""></image>
+					<text class="text">可用积分</text>
+				</view>
+				<view class="right">
+					<text class="text">{{price.usedIntegral}}积分</text>
+					<evan-switch @change="integralChange" v-model="checked" activeColor="#2BC7B9" inactiveColor="rgba(0, 0, 0, 0.1)"></evan-switch>
+				</view>
+			</view>
+			<view class="points" @click="openCoupon()">
+				<view class="left">
+					<text class="text">优惠券</text>
+				</view>
+				<view class="right">
+					<text class="text">{{couponText}}</text>
+					<image src="/static/images/arrow4.png" mode=""></image>
+				</view>
+			</view>
+			<view class="points">
+				<view class="left">
+					<text class="text">运费</text>
+				</view>
+				<view class="right">
+					<text class="text" v-if="address!=null">{{price.payPostage==null||price.payPostage==0?'免运费':price.payPostage.toFixed(2)}}</text>
+					<text class="text" v-if="address==null">--</text>
+					
+				</view>
+			</view>
+			<view class="points">
+				<view class="left">
+					<text class="text">服务费</text>
+				</view>
+				<view class="right">
+					<text class="text">{{price.serviceFee.toFixed(2)}}</text>
+				</view>
+			</view>
+			<!-- 备注 -->
+			<view class="remarks">
+				<input type="text" v-model="form.mark" placeholder="备注留言(选填)" placeholder-class="input" />
+			</view>
+		</view>
+		<!-- 底部按钮 -->
+		<view class="btn-foot">
+			<view class="right">
+				<view class="total">
+					<text class="label">合计:</text>
+					<view class="price">
+						<text class="unit">¥</text>
+						<text class="num">{{price.payPrice.toFixed(2)}}</text>
+					</view>
+				</view>
+				<view class="btn" @click="submitOrder">提交订单</view>
+			</view>
+		</view>
+		<popupBottom ref="popup" :visible.sync="couponVisible" title=" " bgColor="#f5f5f5" radius="30"    maxHeight="60%">
+		     <view class="coupon" style="height:650rpx;">
+				 <div class="coupon-list" v-if="couponsList.length > 0">
+				   <div class="item acea-row row-center-wrapper"  v-for="(item, index) in couponsList" :key="index">
+				     <div class="money" >
+				       <image v-if="item.status==0" class="img" src="../../static/images/coupon1.png" mode="widthFix"></image>
+				 	  <image v-if="item.status!=0" class="img" src="../../static/images/coupon2.png" mode="widthFix"></image>
+				 	  <div style="z-index: 999;">
+				         ¥<span class="num">{{ item.couponPrice }}</span>
+				       </div>
+				       <div class="pic-num"  >满{{ item.useMinPrice }}元可用</div>
+				     </div>
+				     <div class="text">
+				       <div class="condition line1">
+				         {{ item.couponTitle }}
+				       </div>
+				       <div class="data acea-row row-between-wrapper">
+							<div >{{ item.limitTime }}到期</div>
+							<div class="bnt bg-color-red" @click="couponSelect(item)"  >选择</div>
+				       </div>
+				     </div>
+				   </div>
+				 </div>
+				 <view v-if="couponsList.length == 0" class="no-data-box" >
+				 	<image src="/static/images/no_data.png" mode="aspectFit"></image>
+				 	<view class="empty-title">暂无数据</view>
+				 </view>
+			 </view>
+			 
+		</popupBottom>
+	</view>
+</template>
+
+<script>
+	import {getWeixinOrderTemps} from '@/api/common'
+	
+	import {confirm,computed,create} from '@/api/storeOrder'
+	import { getMyEnableCouponList } from '@/api/coupon'
+	 
+	import EvanSwitch from '@/components/evan-switch/evan-switch.vue'
+	import popupBottom from '@/components/px-popup-bottom/px-popup-bottom.vue'
+	
+	export default {
+		components: {
+			EvanSwitch,
+			popupBottom
+		},
+		data() {
+			return {
+				temps:[],
+				couponUserId:null,
+				couponText:"请选择",
+				couponsList:[],
+				couponVisible:false,
+				price:{
+					payPrice:0,
+					totalPostage:0,
+					usedIntegral:0,
+					totalPrice:0.00,
+				},
+				address:null,
+				carts:[],
+				checked: false,
+				type:null,
+				cartIds:null,
+				form:{
+					useIntegral:0,
+					orderKey:null,
+					addressId:null,
+					mark:null,
+					companyId:null,
+					companyUserId:null
+				}
+				
+			}
+		},
+		onLoad(option) {
+			this.form.companyId=option.companyId;
+			this.form.companyUserId=option.companyUserId;
+			this.cartIds=option.cartIds;
+			this.type=option.type;
+			this.confirm();
+			uni.$on('updateAddress', (e) => {
+				this.address=e;
+				this.form.addressId=e.id;
+				this.computed()
+			})
+			this.getWeixinOrderTemps();
+		},
+		methods: {
+			getWeixinOrderTemps:function(){
+				getWeixinOrderTemps().then(
+					res => {
+						if(res.code==200){
+							this.temps=res.temp
+							console.log(this.temps)
+						}else{
+							 
+						}
+					},
+					rej => {}
+				);
+			},
+			couponSelect(item){
+				this.couponText="-¥"+item.couponPrice.toFixed(2);
+				this.couponUserId=item.id;
+				this.couponVisible=false;
+				this.computed();
+			},
+			openCoupon(){
+				let that = this;
+				var data={couponType:0,useMinPrice:this.price.payPrice};
+				getMyEnableCouponList(data).then(res => {
+				  this.couponVisible=true;
+				  that.couponsList = res.data
+				})
+			},
+			integralChange(e){
+				console.log(e)
+				this.form.useIntegral=e?1:0
+				this.computed()
+			},
+			confirm(item){
+				let data = {type:this.type,cartIds:this.cartIds};
+				confirm(data).then(
+					res => {
+						if(res.code==200){
+							 
+							 this.carts=res.carts;
+							 this.form.orderKey=res.orderKey;
+							 if(res.address!=null){
+								 this.form.addressId=res.address.id;
+								 this.address=res.address;
+								 console.log(this.form.addreddId)
+							 }
+							 this.computed()
+						}else{
+							
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			computed(){
+				let data = {companyId:this.form.companyId,couponUserId:this.couponUserId,orderKey:this.form.orderKey,addressId:this.form.addressId,useIntegral:this.form.useIntegral};
+				computed(data).then(
+					res => {
+						if(res.code==200){
+							 console.log(res)
+							 this.price=res.data
+							 
+						}else{
+							if(res.code==501){
+								uni.showToast({
+									icon:'none',
+									title: res.msg,
+								});
+								setTimeout(function(){
+									uni.navigateBack({
+										delta:1
+									})
+								},500);
+								return;
+							}
+							else{
+								uni.showToast({
+									icon:'none',
+									title: res.msg,
+								});
+							}
+							
+						}
+					},
+					rej => {}
+				);
+			},
+			// 提交订单
+			submitOrder() {
+				var that=this;
+				if(this.form.orderKey==null){
+					uni.showToast({
+						icon:'none',
+						title: '订单KEY不存在',
+					});
+					return;
+				}
+				if(this.form.addressId==null){
+					uni.showToast({
+						icon:'none',
+						title: '收货地址不能为空',
+					});
+					return;
+				}
+				
+				uni.requestSubscribeMessage({
+					tmplIds: this.temps,
+					success(res) {
+						 that.createOrder();
+					},
+					fail(res) {
+						that.createOrder();
+					}
+				})
+				
+			},
+			createOrder(){
+				var that=this;
+				var data=null;
+				var tuiUserId=uni.getStorageSync('tuiUserId');
+				uni.showLoading({
+					title: '正在处理中...'
+				});
+				if(tuiUserId!=null&&tuiUserId!=undefined&&tuiUserId>0){
+					data = {orderCreateType:1,tuiUserId:tuiUserId,companyId:this.form.companyId,companyUserId:this.form.companyUserId,couponUserId:this.couponUserId,mark:this.form.mark,orderKey:this.form.orderKey,addressId:this.form.addressId,useIntegral:this.form.useIntegral,payType:1};
+				}
+				else{
+					data = {orderCreateType:1,companyId:this.form.companyId,companyUserId:this.form.companyUserId,couponUserId:this.couponUserId,mark:this.form.mark,orderKey:this.form.orderKey,addressId:this.form.addressId,useIntegral:this.form.useIntegral,payType:1};
+				}
+				create(data).then(
+					res => {
+						uni.hideLoading()
+						if(res.code==200){
+							uni.hideLoading()
+							if(res.order.isPrescribe==1){
+								setTimeout(function(){
+									uni.redirectTo({
+										url:"prescribe?orderId="+res.order.id
+									})
+								},200);
+							}
+							else{
+								setTimeout(function(){
+									uni.redirectTo({
+										url: './paymentOrder?orderId='+res.order.id
+									})
+								},200);
+							}
+							return;
+						}
+						else{
+							if(res.code==501){
+								uni.showToast({
+									icon:'none',
+									title: res.msg,
+								});
+								setTimeout(function(){
+									uni.navigateBack({
+										delta:1
+									})
+								},200);
+								return;
+							}
+							else{
+								uni.showToast({
+									icon:'none',
+									title: res.msg,
+								});
+							}
+						}
+					},
+					rej => {}
+				);
+			},
+			openAddress(){
+				uni.navigateTo({
+					url: '/pages_user/user/address'
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.inner-box{
+		padding: 20upx 20upx 140upx;
+		.address-box{
+			box-sizing: border-box;
+			min-height: 171upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			background-image: url(../../static/images/address_bg.png);
+			background-repeat: no-repeat;
+			background-size: 100% 30upx;
+			background-position: left bottom;
+			padding: 38upx 30upx 36upx;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			.left{
+				width: 92%;
+				.name-box{
+					display: flex;
+					align-items: center;
+					.text{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #111111;
+						line-height: 1;
+						&.name{
+							margin-right: 30upx;
+						}
+					}
+				}
+				.address{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					line-height: 42upx;
+					text-align:left;
+					margin-top: 23upx;
+				}
+			}
+			.arrow-box{
+				width: 12upx;
+				height: 23upx;
+				display: flex;
+				align-items: cenetr;
+				justify-content: cenetr;
+				image{
+					width: 100%;
+					height: 100%;
+				}
+			}
+		}
+		.goods-list{
+			margin-top: 20upx;
+			padding: 0 30upx;
+			background-color: #FFFFFF;
+			border-radius: 16upx;
+			.item{
+				padding: 30upx 0;
+				border-bottom: 1px solid #EDEEEF;
+				display: flex;
+				align-items: center;
+				.img-box{
+					width: 160upx;
+					height: 160upx;
+					margin-right: 30upx;
+					image{
+						width: 100%;
+						height: 100%;
+					}
+				}
+				.info-box{
+					width: calc(100% - 190upx);
+					height: 160upx;
+					display: flex;
+					flex-direction: column;
+					justify-content: space-between;
+					.name-box{
+						font-size: 28upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #111111;
+						line-height: 40upx;
+						.tag{
+							display: inline-block;
+							padding: 0 6upx;
+							height: 30upx;
+							background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
+							border-radius: 4upx;
+							margin-right: 10upx;
+							font-size: 22upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FFFFFF;
+							line-height: 30upx;
+							float: left;
+							margin-top: 7upx;
+						}
+					}
+					.spec{
+						margin-top: 10upx;
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						line-height: 1;
+					}
+					.price-num{
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						.price{
+							display: flex;
+							align-items: flex-end;
+							.unit{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1.2;
+								margin-right: 4upx;
+							}
+							.num{
+								font-size: 32upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1;
+							}
+						}
+						.num{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1;
+						}
+					}
+				}
+			}
+			.sub-total{
+				height: 88upx;
+				display: flex;
+				align-items: center;
+				justify-content: flex-end;
+				.label{
+					font-size: 24upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+				}
+				.price{
+					display: flex;
+					align-items: flex-end;
+					.unit{
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #FF6633;
+						line-height: 1.2;
+						margin-right: 4upx;
+					}
+					.num{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+			}
+		}
+		.points{
+			height: 88upx;
+			padding: 0 30upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			 
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			.left{
+				display: flex;
+				align-items: center;
+				image{
+					width: 28upx;
+					height: 28upx;
+					margin-right: 20upx;
+				}
+				.text{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+				}
+			}
+			.right{
+				display: flex;
+				align-items: center;
+				.text{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					 
+				}
+				image{
+					margin-left: 15upx;
+					width: 14upx;
+					height: 24upx;
+				}
+			}
+		}
+		.remarks{
+			height: 88upx;
+			padding: 0 30upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			margin-top: 20upx;
+			display: flex;
+			align-items: center;
+			input{
+				width: 100%;
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #000000;
+			}
+			.input{
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+			}
+		}
+	}
+	
+	
+	.btn-foot{
+		box-sizing: border-box;
+		width: 100%;
+		height: 121upx;
+		background: #FFFFFF;
+		padding: 16upx 30upx 16upx 60upx;
+		display: flex;
+		align-items: center;
+		justify-content: flex-end;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		z-index: 99;
+		.right{
+			display: flex;
+			align-items: center;
+			.total{
+				display: flex;
+				align-items: flex-end;
+				margin-right: 36upx;
+				.label{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1.5;
+				}
+				.price{
+					display: flex;
+					align-items: flex-end;
+					.unit{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1.2;
+						margin-right: 10upx;
+					}
+					.num{
+						font-size: 50upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+			}
+			.btn{
+				width: 200upx;
+				height: 88upx;
+				line-height: 88upx;
+				text-align: center;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				background: #2BC7B9;
+				border-radius: 44upx;
+			}
+		}
+	}
+</style>
+<style lang="less" scoped>
+	.coupon {
+	  height: 100%;
+	}
+	/*优惠券列表公共*/
+	.coupon-list {
+	}
+	.coupon-list .item {
+	  display: flex;
+	  flex-direction: column;
+	  justify-content: center;
+	  align-items: center;
+	  width: 100%;
+	  height: 1.7 * 100rpx;
+	  margin-bottom: 0.16 * 100rpx;
+	}
+	
+	.coupon-list .item .money {
+	  background-size: 100% 100%;
+	  width: 2.4 * 100rpx;
+	  height: 100%;
+	  color: #fff;
+	  font-size: 0.36 * 100rpx;
+	  font-weight: bold;
+	  text-align: center;
+	  display: flex;
+	  flex-direction: column;
+	  align-items: center;
+	  justify-content: center;
+	  position: relative;
+	  
+	}
+	.coupon-list .item .money .img{
+	  position: absolute;
+	  width: 2.4 * 100rpx;
+	  height: 100%;
+	  color: #fff;
+	  
+	}
+	
+	.coupon-list .item .money .num {
+	  font-size: 0.6 * 100rpx;
+	}
+	.coupon-list .item .money .pic-num {
+	  font-size: 20rpx;
+	  z-index: 99;
+	}
+
+	
+	.coupon-list .item .text {
+	  width: 4.5 * 100rpx;
+	  padding: 0 0.17 * 100rpx 0 0.24 * 100rpx;
+	  background-color: #fff;
+	  box-sizing: border-box;
+	}
+	
+	.coupon-list .item .text .condition {
+	  font-size: 0.3 * 100rpx;
+	  color: #282828;
+	  height: 0.93 * 100rpx;
+	  line-height: 0.93 * 100rpx;
+	  border-bottom: 1px solid #f0f0f0;
+	}
+	
+	.coupon-list .item .text .data {
+	  font-size: 0.2 * 100rpx;
+	  color: #999;
+	  height: 0.76 * 100rpx;
+	}
+	
+	.coupon-list .item .text .data .bnt {
+	  width: 1.36 * 100rpx;
+	  height: 0.44 * 100rpx;
+	  border-radius: 0.22 * 100rpx;
+	  font-size: 0.22 * 100rpx;
+	  color: #fff;
+	  text-align: center;
+	  line-height: 0.44 * 100rpx;
+	  background-color: red;
+	}
+	
+	.coupon-list .item .text .data .bnt.gray {
+	  background-color: #ccc;
+	}
+</style>
+

+ 718 - 0
pages/shopping/confirmPackageOrder.vue

@@ -0,0 +1,718 @@
+<template>
+	<view>
+		<view class="inner-box">
+			<!-- 收货人 -->
+			<view class="address-box" v-if="address==null" @click="openAddress()">
+				<view class="left">
+					<view class="name-box">
+						<text class="text name">添加收货地址</text>
+					</view>
+					</vie>
+				</view>
+				<view class="arrow-box">
+					<image src="../../static/images/arrow_gray.png" mode=""></image>
+				</view>
+			</view>
+			<view class="address-box" v-if="address!=null" @click="openAddress()">
+				<view class="left">
+					<view class="name-box">
+						<text class="text name">{{address.realName}}</text>
+						<text class="text" v-if="address.phone!=null">{{utils.parsePhone(address.phone)}}</text>
+					</view>
+					<view class="address">
+						{{address.province}}{{address.city}}{{address.district}}{{address.detail}}
+					</view>
+				</view>
+				<view class="arrow-box">
+					<image src="../../static/images/arrow_gray.png" mode=""></image>
+				</view>
+			</view>
+			<!-- 药品列表 -->
+			<view class="goods-list">
+				<view  class="item">
+					<view class="img-box">
+						<image :src="package.imgUrl" mode="aspectFill"></image>
+					</view>
+					<view class="info-box">
+						<view>
+							<view class="name-box ellipsis2">
+								{{package.title}}
+							</view>
+							<view class="spec ellipsis2">{{package.descs}}</view>
+						</view>
+						
+						<view class="price-num">
+							<view class="price">
+								<text class="unit">¥</text>
+								<text class="num" v-if="package.payMoney!=null">{{package.payMoney.toFixed(2)}}</text>
+							</view>
+						</view>
+					</view>
+				</view>
+				<!-- 小计 -->
+				<view class="sub-total">
+					<text class="label">合计:</text>
+					<view class="price">
+						<text class="unit">¥</text>
+						<text class="num" v-if="package.payMoney!=null">{{package.payMoney.toFixed(2)}}</text>
+					</view>
+				</view>
+			</view>
+			 
+			<view class="points" @click="openCoupon()">
+				<view class="left">
+					<text class="text">优惠券</text>
+				</view>
+				<view class="right">
+					<text class="text">{{couponText}}</text>
+					<image src="/static/images/arrow4.png" mode=""></image>
+				</view>
+			</view>
+			<!-- 备注 -->
+			<view class="remarks">
+				<input type="text" v-model="form.mark" placeholder="备注留言(选填)" placeholder-class="input" />
+			</view>
+		</view>
+		<!-- 底部按钮 -->
+		<view class="btn-foot">
+			<view class="right">
+				<view class="total">
+					<text class="label">应付金额:</text>
+					<view class="price">
+						<text class="unit">¥</text>
+						<text class="num" v-if="totalMoney!=null">{{totalMoney.toFixed(2)}}</text>
+					</view>
+				</view>
+				<view class="btn" @click="submitOrder">提交订单</view>
+			</view>
+		</view>
+		<popupBottom ref="popup" :visible.sync="couponVisible" title=" " bgColor="#f5f5f5"  radius="30"    maxHeight="60%">
+		     <view class="coupon" style="height:650rpx;">
+				 <div class="coupon-list" v-if="couponsList.length > 0">
+				   <div class="item acea-row row-center-wrapper"  v-for="(item, index) in couponsList" :key="index">
+				     <div class="money" >
+				       <image v-if="item.status==0" class="img" src="../../static/images/coupon1.png" mode="widthFix"></image>
+				 	  <image v-if="item.status!=0" class="img" src="../../static/images/coupon2.png" mode="widthFix"></image>
+				 	  <div style="z-index: 999;">
+				         ¥<span class="num">{{ item.couponPrice }}</span>
+				       </div>
+				       <div class="pic-num"  >满{{ item.useMinPrice }}元可用</div>
+				     </div>
+				     <div class="text">
+				       <div class="condition line1">
+				         {{ item.couponTitle }}
+				       </div>
+				       <div class="data acea-row row-between-wrapper">
+							<div >{{ item.limitTime }}到期</div>
+							<div class="bnt bg-color-red" @click="couponSelect(item)"  >选择</div>
+				       </div>
+				     </div>
+				   </div>
+				 </div>
+				 <view v-if="couponsList.length == 0" class="no-data-box" >
+				 	<image src="/static/images/no_data.png" mode="aspectFit"></image>
+				 	<view class="empty-title">暂无数据</view>
+				 </view>
+			 </view>
+			 
+		</popupBottom>
+	</view>
+</template>
+
+<script>
+	import {getWeixinTemps} from '@/api/common'
+	import {confirmPackageOrder,computedPackageOrder,createPackageOrder} from '@/api/storeOrder'
+	import { getMyEnableCouponList } from '@/api/coupon'
+	 
+	import EvanSwitch from '@/components/evan-switch/evan-switch.vue'
+	import popupBottom from '@/components/px-popup-bottom/px-popup-bottom.vue'
+	export default {
+		components: {
+			EvanSwitch,
+			popupBottom
+		},
+		data() {
+			return {
+				temps:[],
+				totalMoney:0,
+				couponUserId:null,
+				couponText:"请选择",
+				couponsList:[],
+				couponVisible:false,
+				companyUserId:null,
+				packageId:null,
+				address:null,
+				package:{},
+				// checked: false,
+				// type:null,
+				// cartIds:null,
+				form:{
+					// useIntegral:0,
+					orderKey:null,
+					addressId:null,
+					mark:null,
+				}
+				
+			}
+		},
+		onLoad(option) {
+			this.packageId=option.packageId;
+			this.companyUserId=option.companyUserId;
+			this.confirmPackageOrder();
+			uni.$on('updateAddress', (e) => {
+				this.address=e;
+				this.form.addressId=e.id;
+			})
+			this.getWeixinTemps();
+		},
+		onShow() {
+			
+		},
+		methods: {
+			getWeixinTemps:function(){
+				getWeixinTemps().then(
+					res => {
+						if(res.code==200){
+							this.temps=res.temp
+						}else{
+							 
+						}
+					},
+					rej => {}
+				);
+			},
+			couponSelect(item){
+				console.log(item)
+				this.couponText="-¥"+item.couponPrice.toFixed(2);
+				this.couponUserId=item.id;
+				this.couponVisible=false;
+				this.computedPackageOrder();
+			},
+			openCoupon(){
+				let that = this;
+				var data={packageCateId:this.package.cateId,couponType:1,useMinPrice:this.totalMoney};
+				getMyEnableCouponList(data).then(res => {
+				  this.couponVisible=true;
+				  that.couponsList = res.data
+				})
+			},
+			confirmPackageOrder(){
+				let data = {packageId:this.packageId,couponUserId:this.couponUserId};
+				confirmPackageOrder(data).then(
+					res => {
+						if(res.code==200){
+							 this.form.orderKey=res.orderKey;
+							 this.address=res.address;
+							 this.package=res.package;
+							 if(res.address!=null){
+								 this.form.addressId=res.address.id;
+							 }
+							 this.totalMoney=res.totalMoney;
+							 
+						}else{
+							
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			computedPackageOrder(){
+				let data = {packageId:this.packageId,couponUserId:this.couponUserId};
+				computedPackageOrder(data).then(
+					res => {
+						if(res.code==200){
+							 this.totalMoney=res.totalMoney;
+							 
+						}else{
+							
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+		 
+			// 提交订单
+			submitOrder() {
+				var that=this;
+				if(this.form.orderKey==null){
+					uni.showToast({
+						icon:'none',
+						title: '订单KEY不存在',
+					});
+					return;
+				}
+				if(this.form.addressId==null){
+					uni.showToast({
+						icon:'none',
+						title: '收货地址不能为空',
+					});
+					return;
+				}
+				
+				uni.requestSubscribeMessage({
+					tmplIds: this.temps,
+					success(res) {
+						 that.createPackageOrder();
+					},
+					fail(res) {
+						that.createPackageOrder();
+					}
+				})
+				
+				
+			},
+			createPackageOrder(){
+				var that=this;
+				uni.showLoading({
+					title: '正在处理中...'
+				});
+				let data = {couponUserId:this.couponUserId,mark:this.form.mark,orderKey:this.form.orderKey,addressId:this.form.addressId,packageId:this.packageId,companyUserId:this.companyUserId};
+				createPackageOrder(data).then(
+					res => {
+						uni.hideLoading()
+						if(res.code==200){
+							if(res.order.isPrescribe==1){
+								setTimeout(function(){
+									uni.redirectTo({
+										url:"prescribe?orderId="+res.order.id
+									})
+								},200);
+							}
+							else{
+								setTimeout(function(){
+									uni.redirectTo({
+										url: './paymentOrder?orderId='+res.order.id
+									})
+								},200);
+							}
+							return;
+						}
+						else{
+							if(res.code==501){
+								uni.showToast({
+									icon:'none',
+									title: res.msg,
+								});
+								setTimeout(function(){
+									uni.navigateBack({
+										delta:1
+									})
+								},200);
+								return;
+							}
+							else{
+								uni.showToast({
+									icon:'none',
+									title: res.msg,
+								});
+							}
+						}
+					},
+					rej => {}
+				);
+			},
+			openAddress(){
+				uni.navigateTo({
+					url: '/pages_user/user/address'
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.inner-box{
+		padding: 20upx 20upx 140upx;
+		.address-box{
+			box-sizing: border-box;
+			min-height: 171upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			background-image: url(../../static/images/address_bg.png);
+			background-repeat: no-repeat;
+			background-size: 100% 30upx;
+			background-position: left bottom;
+			padding: 38upx 30upx 36upx;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			.left{
+				width: 92%;
+				.name-box{
+					display: flex;
+					align-items: center;
+					.text{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #111111;
+						line-height: 1;
+						&.name{
+							margin-right: 30upx;
+						}
+					}
+				}
+				.address{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					line-height: 42upx;
+					text-align:left;
+					margin-top: 23upx;
+				}
+			}
+			.arrow-box{
+				width: 12upx;
+				height: 23upx;
+				display: flex;
+				align-items: cenetr;
+				justify-content: cenetr;
+				image{
+					width: 100%;
+					height: 100%;
+				}
+			}
+		}
+		.goods-list{
+			margin-top: 20upx;
+			padding: 0 30upx;
+			background-color: #FFFFFF;
+			border-radius: 16upx;
+			.item{
+				padding: 30upx 0;
+				border-bottom: 1px solid #EDEEEF;
+				display: flex;
+				align-items: center;
+				.img-box{
+					width: 160upx;
+					height: 160upx;
+					margin-right: 30upx;
+					image{
+						width: 100%;
+						height: 100%;
+					}
+				}
+				.info-box{
+					width: calc(100% - 190upx);
+					height: 160upx;
+					display: flex;
+					flex-direction: column;
+					justify-content: space-between;
+					.name-box{
+						font-size: 28upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #111111;
+						line-height: 40upx;
+						.tag{
+							display: inline-block;
+							padding: 0 6upx;
+							height: 30upx;
+							background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
+							border-radius: 4upx;
+							margin-right: 10upx;
+							font-size: 22upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FFFFFF;
+							line-height: 30upx;
+							float: left;
+							margin-top: 7upx;
+						}
+					}
+					.spec{
+						margin-top: 10upx;
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						line-height: 1;
+					}
+					.price-num{
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						.price{
+							display: flex;
+							align-items: flex-end;
+							.unit{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1.2;
+								margin-right: 4upx;
+							}
+							.num{
+								font-size: 32upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1;
+							}
+						}
+						.num{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1;
+						}
+					}
+				}
+			}
+			.sub-total{
+				height: 88upx;
+				display: flex;
+				align-items: center;
+				justify-content: flex-end;
+				.label{
+					font-size: 24upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+				}
+				.price{
+					display: flex;
+					align-items: flex-end;
+					.unit{
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #FF6633;
+						line-height: 1.2;
+						margin-right: 4upx;
+					}
+					.num{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+			}
+		}
+		.points{
+			height: 88upx;
+			padding: 0 30upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			margin-top: 20upx;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			.left{
+				display: flex;
+				align-items: center;
+				image{
+					width: 28upx;
+					height: 28upx;
+					margin-right: 20upx;
+				}
+				.text{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+				}
+			}
+			.right{
+				display: flex;
+				align-items: center;
+				.text{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					 
+				}
+				image{
+					margin-left: 15upx;
+					width: 14upx;
+					height: 24upx;
+				}
+			}
+		}
+		.remarks{
+			height: 88upx;
+			padding: 0 30upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			margin-top: 20upx;
+			display: flex;
+			align-items: center;
+			input{
+				width: 100%;
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #000000;
+			}
+			.input{
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+			}
+		}
+	}
+	
+	
+	.btn-foot{
+		box-sizing: border-box;
+		width: 100%;
+		height: 121upx;
+		background: #FFFFFF;
+		padding: 16upx 30upx 16upx 60upx;
+		display: flex;
+		align-items: center;
+		justify-content: flex-end;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		z-index: 99;
+		.right{
+			display: flex;
+			align-items: center;
+			.total{
+				display: flex;
+				align-items: flex-end;
+				margin-right: 36upx;
+				.label{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1.5;
+				}
+				.price{
+					display: flex;
+					align-items: flex-end;
+					.unit{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1.2;
+						margin-right: 10upx;
+					}
+					.num{
+						font-size: 50upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+			}
+			.btn{
+				width: 200upx;
+				height: 88upx;
+				line-height: 88upx;
+				text-align: center;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				background: #2BC7B9;
+				border-radius: 44upx;
+			}
+		}
+	}
+	 
+</style>
+<style lang="less" scoped>
+	.coupon {
+	  height: 100%;
+	}
+	/*优惠券列表公共*/
+	.coupon-list {
+	}
+	.coupon-list .item {
+	  display: flex;
+	  flex-direction: column;
+	  justify-content: center;
+	  align-items: center;
+	  width: 100%;
+	  height: 1.7 * 100rpx;
+	  margin-bottom: 0.16 * 100rpx;
+	}
+	
+	.coupon-list .item .money {
+	  background-size: 100% 100%;
+	  width: 2.4 * 100rpx;
+	  height: 100%;
+	  color: #fff;
+	  font-size: 0.36 * 100rpx;
+	  font-weight: bold;
+	  text-align: center;
+	  display: flex;
+	  flex-direction: column;
+	  align-items: center;
+	  justify-content: center;
+	  position: relative;
+	  
+	}
+	.coupon-list .item .money .img{
+	  position: absolute;
+	  width: 2.4 * 100rpx;
+	  height: 100%;
+	  color: #fff;
+	  
+	}
+	
+	.coupon-list .item .money .num {
+	  font-size: 0.6 * 100rpx;
+	}
+	.coupon-list .item .money .pic-num {
+	  font-size: 20rpx;
+	  z-index: 99;
+	}
+
+	
+	.coupon-list .item .text {
+	  width: 4.5 * 100rpx;
+	  padding: 0 0.17 * 100rpx 0 0.24 * 100rpx;
+	  background-color: #fff;
+	  box-sizing: border-box;
+	}
+	
+	.coupon-list .item .text .condition {
+	  font-size: 0.3 * 100rpx;
+	  color: #282828;
+	  height: 0.93 * 100rpx;
+	  line-height: 0.93 * 100rpx;
+	  border-bottom: 1px solid #f0f0f0;
+	}
+	
+	.coupon-list .item .text .data {
+	  font-size: 0.2 * 100rpx;
+	  color: #999;
+	  height: 0.76 * 100rpx;
+	}
+	
+	.coupon-list .item .text .data .bnt {
+	  width: 1.36 * 100rpx;
+	  height: 0.44 * 100rpx;
+	  border-radius: 0.22 * 100rpx;
+	  font-size: 0.22 * 100rpx;
+	  color: #fff;
+	  text-align: center;
+	  line-height: 0.44 * 100rpx;
+	  background-color: red;
+	}
+	
+	.coupon-list .item .text .data .bnt.gray {
+	  background-color: #ccc;
+	}
+</style>

+ 355 - 0
pages/shopping/index.vue

@@ -0,0 +1,355 @@
+<template>
+	<view class="content">
+		<view class="top-content">
+			<view class="status_bar" :style="{height: statusBarHeight}"></view>
+			<!-- 这里是状态栏 -->
+			<view class="top-title">健康商城</view>
+			<!-- 搜索框 -->
+			<view class="search-cont">
+				<view class="inner">
+					<image class="icon-search" src="../../static/images/search.png" mode=""></image>
+					<input type="text" disabled   confirm-type="搜索" @click="toSearch" placeholder="输入药品名称" placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
+				</view>
+			</view>
+		</view>
+		<view  :style="{height: divHeight}"   class="medic-box">
+			<view class="cate-list">
+				<view 
+					v-for="(item,index) in cates" 
+					:key="index" 
+					:class="cateSelect == item.cateId?'item active':'item'" 
+					@click="choseCate(item)"
+				>{{item.cateName }}</view>
+			</view>
+			<view class="medic">
+				<!-- 轮播图 -->
+				<view class="banner-box">
+					<swiper
+						class="swiper" 
+						:indicator-dots="true" 
+						:circular="true" 
+						:autoplay="true" 
+						:interval="3000" 
+						:duration="1000"
+						indicator-color="rgba(255, 255, 255, 0.6)"
+						indicator-active-color="#ffffff"
+					>
+						<swiper-item class="swiper-item" v-for="(item,index) in advs" :key="index" @click="handleAdvClick(item)">
+							<image :src="item.imageUrl" mode=""></image>
+						</swiper-item>
+					</swiper>
+				</view>
+				<!-- 药品列表 -->
+				<view class="medic-list">
+						<!-- <view class="item" v-for="(item,index) in subCates" :key="index">
+							<view class="title">{{item.cateName}}</view> -->
+							<view class="inner-list">
+								<view class="definite"v-for="(subItem,index) in subCates"   @click="showProductList(subItem)">
+									<view class="img-box">
+										<image :src="subItem.pic" mode="aspectFit"></image>
+									</view>
+									<view class="name ellipsis">{{subItem.cateName}}</view>
+								</view>
+							</view>
+					<!-- 	</view> -->
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {getProductCate} from '@/api/product'
+	import {getAdv} from '@/api/adv'
+	export default {
+		data() {
+			return {
+				divHeight:'0px',
+				allCates:[],
+				cates:[],
+				subCates:[],
+				// 状态栏的高度
+				statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
+				// 选中药品分类
+				cateSelect: 0,
+				// 轮播图
+				advs: [],
+			};
+		},
+		onLoad() {
+			uni.showShareMenu({
+				withShareTicket:true,
+				//小程序的原生菜单中显示分享按钮,才能够让发送给朋友与分享到朋友圈两个按钮可以点击
+				menus:["shareAppMessage","shareTimeline"] //不设置默认发送给朋友
+			})
+			this.getProductCate();
+		},
+		onShow() {
+			var that=this;
+			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)"
+		      }).exec()
+			},500);
+			this.getAdv();
+		},
+		methods:{
+			divHeight(){
+			   return 'height:calc(100% - ${this.top}px);'
+			},
+			toSearch() {
+				uni.navigateTo({
+					url: '../home/productSearch'
+				})
+			},
+			handleAdvClick(item){
+				console.log(item);
+				if(item.showType==1){
+					uni.setStorageSync('url',item.advUrl);
+					uni.navigateTo({
+						url:"../home/h5"
+					})
+				}
+				else if(item.showType==2){
+					 uni.navigateTo({
+					 	url:item.advUrl
+					 })
+				}
+				else if(item.showType==3){
+					 uni.setStorageSync('content',item.content);
+					 uni.navigateTo({
+					 	url:"../home/content"
+					 })
+				}
+				
+			},
+			getAdv(){
+				let data = {advType:2};
+				getAdv(data).then(
+					res => {
+						if(res.code==200){
+							this.advs=res.data;
+						}
+					},
+					rej => {}
+				);
+			},
+			getProductCate(){
+				let data = {};
+				getProductCate(data).then(
+					res => {
+						if(res.code==200){
+							this.allCates=res.data;
+							this.cates = this.allCates.filter(function (item) {
+							     return item.pid==0
+							});
+							if(this.cates!=null&&this.cates.length>0){
+								this.cateSelect=this.cates[0].cateId;
+								this.getSubCate()
+							}
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			// 药品分类选择
+			choseCate(item) {
+				this.cateSelect = item.cateId;
+				this.getSubCate()
+				
+			},
+			getSubCate(){
+				var that=this;
+				this.subCates = this.allCates.filter(function (item) {
+					// let subList = that.allCates.filter(child => {
+					// 	//返回每一项的子级数组
+					// 	return child.pid === item.cateId
+					// });
+					// subList.length > 0 ? item.children = subList : [];
+				    return item.pid==that.cateSelect
+				});
+				 
+				console.log(this.subCates);
+			},
+			// 查看药品详情
+			showProductList(item) {
+				uni.navigateTo({
+					url: './productList?cateId='+item.cateId+"&pid="+item.pid
+				})
+			},
+			goSearch(e) {
+				if(e.detail.value!=null&&e.detail.value!=""){
+					this.utils.addHisSearch(e.detail.value);
+				}
+				uni.navigateTo({
+					url: '../home/productList?searchValue=' + e.detail.value
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		height: 100%;
+		background-color: #fff;
+	}
+	
+	.content{
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		.top-content{
+			width: 100%;
+			z-index: 10;
+			.top-title{
+				height: 88upx;
+				line-height: 88upx;
+				font-size: 42upx;
+				font-family: Source Han Sans CN;
+				font-weight: bold;
+				color: #222222;
+				padding-left: 41upx;
+				background-color: #FFFFFF;
+			}
+			.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;
+					}
+				}
+			}
+		}
+		.medic-box{
+			display: flex;
+			.cate-list{
+				box-sizing: border-box;
+				width: 200upx;
+				background: #F2F5F9;
+				display: flex;
+				flex-direction: column;
+				padding: 20upx 0;
+				overflow-y: scroll;
+				.item{
+					height: 100upx;
+					line-height: 100upx;
+					padding-left: 30upx;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #333333;
+					position: relative;
+					&.active{
+						color: #2BC7B9;
+						&::after{
+							content: "";
+							width: 8upx;
+							height: 50upx;
+							background: #2BC7B9;
+							position: absolute;
+							top: 25upx;
+							left: 0;
+						}
+					}
+				}
+			}
+			.medic{
+				box-sizing: border-box;
+				width: calc(100% - 200upx);
+				height: 100%;
+				padding: 0 30upx;
+				.banner-box{
+					margin-top: 30rpx;
+					width: 100%;
+					height: 160upx;
+					border-radius: 10upx;
+					overflow: hidden;
+					.swiper,
+					.swiper-item,
+					.swiper-item image{
+						width: 100%;
+						height: 100%;
+					}
+				}
+				.medic-list{
+					box-sizing: border-box;
+					padding: 30upx 0;
+					overflow-y: auto;
+					height: calc(100% - 220upx);
+					position: relative;
+					// .item{
+					// 	.title{
+					// 		font-size: 28upx;
+					// 		font-family: PingFang SC;
+					// 		font-weight: bold;
+					// 		color: #333333;
+					// 		padding-top: 20upx;
+					// 		margin-bottom: 30upx;
+					// 	}
+						
+					// }
+					.inner-list{
+						display: flex;
+						flex-wrap: wrap;
+						.definite{
+							width: calc(33% - 20upx);
+							margin-right: 30upx;
+							margin-bottom: 30upx;
+							.img-box{
+								width: 100%;
+								height: 144upx;
+								background: #F5F5F5;
+								border-radius: 8upx;
+								overflow: hidden;
+								display: flex;
+								align-items: center;
+								image{	
+									max-width: 100%;
+								}
+							}
+							.name{
+								width: 100%;
+								margin-top: 20upx;
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #666666;
+								text-align: center;
+							}
+							&:nth-child(3n) {
+								margin-right: 0;
+							}
+						}
+					}
+				}
+			}
+		}
+		
+	}
+	
+</style>

+ 342 - 0
pages/shopping/payOrder.vue

@@ -0,0 +1,342 @@
+<template>
+	<view class="content">
+		<view class="inner">
+			<!-- 时间、价格 -->
+			<view class="time-price">
+				<text class="time">请在{{payLimitTime}}前完成支付</text>
+				<view class="price-box">
+					<text class="unit">¥</text>
+					<text class="num">{{order.payPrice}}</text>
+				</view>
+			</view>
+			<!-- 支付方式 -->
+			<view class="pay-type">
+				<view class="title">支付方式</view>
+				<view class="item">
+					<view class="left">
+						<image src="../../static/images/wecha_pay.png" mode=""></image>
+						<text class="text">微信支付</text>
+					</view>
+					<label>
+						<checkbox disabled value="" :checked="wxPay" />
+					</label>
+				</view>
+			</view>
+			<!-- 订单详情查看 -->
+			<view class="order-info">
+				<view class="title">订单信息</view>
+				<view class="item">
+					<text class="label">订单编号</text>
+					<view class="sn-box">
+						<text class="text">{{order.orderCode}}</text>
+						<view class="copy-btn" @click="copyOrderSn(order.orderCode)">复制</view>
+					</view>
+				</view>
+				<view class="item">
+					<text class="label">下单时间</text>
+					<text class="text">{{order.createTime}}</text>
+				</view>
+				<view class="item">
+					<text class="label">支付方式</text>
+					<text class="text">微信支付</text>
+				</view>
+				 
+			</view>
+			
+		</view>
+		<view class="btn-box">
+			<view class="btn" @click="payOrder()">去支付</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {pay,getStoreOrderById} from '@/api/storeOrder'
+	export default {
+		data() {
+			return {
+				payLimitTime:null,
+				order:null,
+				// 默认选中微信支付
+				wxPay: true,
+			}
+		},
+		onLoad: function(options) {
+		    if (options.hasOwnProperty('q') && options.q) {
+				// 通过下面这步解码,可以拿到url的值
+				const url = decodeURIComponent(options.q)
+				this.url=url;
+				// // 对url中携带的参数提取处理
+				const obj = this.utils.urlToObj(url)
+				this.orderId=obj.orderId;
+		    }
+			else if(options!=null&&options.orderId!=null){
+				this.orderId=options.orderId;
+			}
+		},
+		onShow() {
+			this.getStoreOrderById();
+		},
+		methods: {
+			copyOrderSn(text) {
+				// 复制方法
+				uni.setClipboardData({
+					data:text,
+					success:()=>{
+						uni.showToast({
+							title:'内容已成功复制到剪切板',
+							icon:'none'
+						})
+					}
+				});
+			},
+			getStoreOrderById(){
+				var data = {orderId:this.orderId};
+				var that=this;
+				uni.showLoading();
+				getStoreOrderById(data).then(
+					res => {
+						if(res.code==200){
+							 console.log(res);
+							  uni.hideLoading();
+							  that.order=res.order;
+							  that.payLimitTime=res.payLimitTime;
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+				
+			},
+			payOrder(){
+				var data = {orderId:this.order.id};
+				var that=this;
+				uni.showLoading();
+				pay(data).then(
+					res => {
+						if(res.code==200){
+							 console.log(res);
+							 uni.requestPayment({
+							 	provider: 'wxpay',
+							 	timeStamp: res.result.timeStamp,
+							 	nonceStr: res.result.nonceStr,
+							 	package: res.result.packageValue,
+							 	signType: res.result.signType,
+							 	paySign: res.result.paySign,
+							 	success: function(res) {
+							 		 uni.hideLoading();
+									 if(that.order.isPrescribe){
+										 //如果是处方订单开处方
+										uni.redirectTo({
+										 	url:"prescribe?orderId="+that.order.id
+										})
+									 }
+									 else{
+										//如果是普通订单
+										uni.redirectTo({
+											url:"success?order="+JSON.stringify(that.order)
+										}) 
+									 }
+							 	},
+							 	fail: function(err) {
+							 		console.log('fail:' + JSON.stringify(err));
+							 		uni.hideLoading();
+							 	}
+							 });
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+				
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		height: 100%;
+		background-color: #F2F5F9;
+	}
+	.content{
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;
+		.inner{
+			padding: 20upx;
+			.time-price{
+				box-sizing: border-box;
+				height: 200upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				padding-top: 50upx;
+				.time{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1;
+					text-align: center;
+				}
+				.price-box{
+					display: flex;
+					align-items: flex-end;
+					margin-top: 28upx;
+					.unit{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1.3;
+						margin-right: 10upx;
+					}
+					.num{
+						font-size: 56upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+			}
+			.pay-type{
+				box-sizing: border-box;
+				height: 192upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				margin-top: 20upx;
+				padding: 40upx 30upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				.title{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1;
+				}
+				.item{
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					.left{
+						display: flex;
+						align-items: center;
+						image{
+							width: 44upx;
+							height: 44upx;
+							margin-right: 20upx;
+						}
+						.text{
+							font-size: 30upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #222222;
+							line-height: 1;
+						}
+					}
+				}
+			}
+			.order-info{
+				margin-top: 20upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				padding: 40upx 30upx;
+				.title{
+					font-size: 30upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #222222;
+					line-height: 1;
+				}
+				.item{
+					margin-top: 40upx;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					.label{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+						line-height: 1;
+					}
+					.text{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #222222;
+						line-height: 32upx;
+					}
+					.cont-text{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+						.bold{
+							color: #111111;
+						}
+					}
+					.sn-box{
+						display: flex;
+						align-items: center;
+						.copy-btn{
+							width: 58upx;
+							height: 32upx;
+							line-height: 32upx;
+							text-align: center;
+							font-size: 22upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #222222;
+							background: #F5F5F5;
+							border-radius: 4upx;
+							margin-left: 24upx;
+						}
+					}
+					 
+				}
+				.line{
+					width: 100%;
+					height: 1px;
+					background: #F0F0F0;
+					margin-top: 30upx;
+				}
+			}
+		}
+		.btn-box{
+			height: 121upx;
+			background: #FFFFFF;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			.btn{
+				width: 91.73%;
+				height: 88upx;
+				line-height: 88upx;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				text-align: center;
+				background: #2BC7B9;
+				border-radius: 44upx;
+			}
+		}
+	}
+	
+</style>

+ 587 - 0
pages/shopping/paymentOrder.vue

@@ -0,0 +1,587 @@
+<template>
+	<view class="content">
+		<view class="inner">
+			<!-- 时间、价格 -->
+			<view class="time-price">
+				<text class="time">请在{{payLimitTime}}前完成支付</text>
+				<view class="price-box">
+					<text class="unit">¥</text>
+					<text class="num" >{{payMoney.toFixed(2)}}</text>
+				</view>
+				<text class="desc" v-if="payType==2">代收金额{{payDelivery.toFixed(2)}},请您在收到快递后支付尾款给快递人员。</text>
+				<text class="desc" v-if="payType==3">货到付款金额{{payDelivery.toFixed(2)}},请您在收到快递后支付给快递人员。</text>
+			</view>
+			<!-- 支付方式 -->
+			<view class="pay-type">
+				<view class="title">支付方式</view>
+				<!-- 改价订单只能选择微信支付和物流代收 -->
+				<radio-group  @change="payTypeChange" v-if="order.isEditMoney!=null&&order.isEditMoney==1">
+					<view class="item"  >
+						<view class="left"  >
+							<image src="/static/images/wecha_pay.png" mode=""></image>
+							<text class="text">微信支付</text>
+						</view>
+						<label>
+							<radio :value="1" :checked="order.payType=='1'" />
+						</label>
+					</view>
+					<view class="item"  >
+						<view class="left">
+							<image src="/static/images/pay_de.png" mode=""></image>
+							<text class="text">物流代收</text>
+						</view>
+						<label>
+							<radio  :value="2" :checked="order.payType=='2'" />
+						</label>
+					</view>
+				</radio-group>
+				 
+				<radio-group @change="payTypeChange" v-else-if="order.orderCreateType!=null&& order.orderCreateType==3">
+					<view class="item"  >
+						<view class="left" >
+							<image src="/static/images/wecha_pay.png" mode=""></image>
+							<text class="text">微信支付</text>
+						</view>
+						<label>
+							<radio :value="1" :checked="order.payType=='1'" />
+						</label>
+					</view>
+					<view class="item" >
+						<view class="left">
+							<image src="../../static/images/pay_de.png" mode=""></image>
+							<text class="text">物流代收</text>
+						</view>
+						<label>
+							<radio  :value="2" :checked="order.payType=='2'" />
+						</label>
+					</view>
+					<view class="item" v-if="user!=null&&user.level==1 ">
+						<view class="left">
+							<image src="../../static/images/pay_1.png" mode=""></image>
+							<text class="text">货到付款</text>
+						</view>
+						<label>
+							<radio  :value="3" :checked="order.payType=='3'" />
+						</label>
+					</view>
+				</radio-group>
+				<radio-group @change="payTypeChange" v-else-if="order.orderCreateType!=null&& order.orderCreateType==2">
+					<view class="item" v-if="payType==1||payType==4" >
+						<view class="left" >
+							<image src="/static/images/wecha_pay.png" mode=""></image>
+							<text class="text">微信支付</text>
+						</view>
+						<label>
+							<radio :value="1" :checked="order.payType=='1'" />
+						</label>
+					</view>
+					<view class="item" v-if="payType==2||payType==4">
+						<view class="left" >
+							<image src="../../static/images/pay_de.png" mode=""></image>
+							<text class="text">物流代收</text>
+						</view>
+						<label>
+							<radio  :value="2" :checked="order.payType=='2'" />
+						</label>
+					</view>
+					<view class="item" v-if="user!=null&&user.level==1 ">
+						<view class="left">
+							<image src="../../static/images/pay_1.png" mode=""></image>
+							<text class="text">货到付款</text>
+						</view>
+						<label>
+							<radio  :value="3" :checked="order.payType=='3'" />
+						</label>
+					</view>
+				</radio-group>
+				<radio-group @change="payTypeChange" v-else-if="order.orderCreateType!=null&&(order.orderCreateType==1)">
+					<view class="item"  >
+						<view class="left" >
+							<image src="/static/images/wecha_pay.png" mode=""></image>
+							<text class="text">微信支付</text>
+						</view>
+						<label>
+							<radio :value="1" checked />
+						</label>
+					</view>
+				</radio-group>
+			</view>
+			<!-- 订单详情查看 -->
+			<view class="order-info">
+				<view class="title">订单信息</view>
+				<view class="item">
+					<text class="label">订单编号</text>
+					<view class="sn-box">
+						<text class="text">{{order.orderCode}}</text>
+						<view class="copy-btn" @click="copyOrderSn(order.orderCode)">复制</view>
+					</view>
+				</view>
+				<view class="item">
+					<text class="label">下单时间</text>
+					<text class="text">{{order.createTime}}</text>
+				</view>
+				<view class="item">
+					<text class="label">订单金额</text>
+					<text class="text" v-if="order!=null">{{order.payPrice.toFixed(2)}}</text>
+				</view>
+				 
+				<!-- <view class="item">
+					<text class="label">支付方式</text>
+					<text class="text">微信支付</text>
+				</view> -->
+				 
+			</view>
+			
+		</view>
+		<view class="btn-box">
+			<view class="btn" @click="payOrder()">去支付</view>
+			<view class="other-btn" >
+				亲友代付
+				<button  class="share" data-name="shareBtn" open-type="share">分享</button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {getUserInfo} from '@/api/user'
+	
+	import {getStoreConfig} from '@/api/common'
+	import {editPayType,pay,getStoreOrderById} from '@/api/storeOrder'
+	export default {
+		data() {
+			return {
+				orderId:null,
+				payDelivery:0,
+				payMoney:0,
+				config:null,
+				payType:1,
+				payLimitTime:null,
+				order:null,
+				user:null,
+			}
+		},
+		onLoad(option) {
+			this.orderId=JSON.parse(option.orderId);
+			this.getStoreOrderById();
+			this.getStoreConfig();
+			this.getUserInfo();
+			uni.showShareMenu({
+				withShareTicket:true,
+				//小程序的原生菜单中显示分享按钮,才能够让发送给朋友与分享到朋友圈两个按钮可以点击
+				menus:["shareAppMessage"] //不设置默认发送给朋友
+			})
+		},
+		//发送给朋友
+		onShareAppMessage(res) {
+			return {
+				title: "帮TA支付",
+				path: '/pages_user/user/otherPaymentOrder?orderId='+this.orderId,
+				imageUrl: 'https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+			}
+			
+		},
+		methods: {
+			getUserInfo(){
+				getUserInfo().then(
+					res => {
+						if(res.code==200){
+							if(res.user!=null){
+								this.user=res.user;
+							}
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			getStoreConfig(){
+				getStoreConfig().then(
+					res => {
+						if(res.code==200){
+							this.config=res.data
+							console.log(this.config);
+						}
+					},
+					rej => {}
+				);
+				
+			},
+			payTypeChange(e){
+				this.editPayType(e.detail.value)
+			},
+			copyOrderSn(text) {
+				// 复制方法
+				uni.setClipboardData({
+					data:text,
+					success:()=>{
+						uni.showToast({
+							title:'内容已成功复制到剪切板',
+							icon:'none'
+						})
+					}
+				});
+			},
+			getStoreOrderById(){
+				var data = {orderId:this.orderId};
+				var that=this;
+				uni.showLoading();
+				getStoreOrderById(data).then(
+					res => {
+						if(res.code==200){
+							console.log(res);
+							uni.hideLoading();
+							that.order=res.order;
+							that.payLimitTime=res.payLimitTime;
+							//套餐订单处理
+							if(res.productPackage!=null){
+								this.payType=res.productPackage.payType;
+								console.log(this.payType)
+								if(this.order.payType==4){
+									this.order.payType=1;
+								}
+							}
+							this.editPayType(this.order.payType)
+							
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+				
+			},
+			editPayType(payType){
+				var data = {orderId:this.orderId,payType:payType};
+				var that=this;
+				uni.showLoading();
+				editPayType(data).then(
+					res => {
+						if(res.code==200){
+							console.log(res);
+							uni.hideLoading();
+							that.order=res.order;
+							//this.payType=this.order.payType
+							this.payMoney=this.order.payMoney;
+							this.payDelivery=this.order.payDelivery;
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+				
+			},
+			otherPayOrder(){
+				uni.navigateTo({
+					url: '/pages_user/user/otherPaymentOrder?orderId='+this.orderId
+				})
+			},
+			payOrder(){
+				var data = {orderId:this.order.id,payType:this.order.payType};
+				var that=this;
+				uni.showLoading();
+				pay(data).then(
+					res => {
+						if(res.code==200){
+							 console.log(res);
+							 if(res.payType==1||res.payType==2){
+								 var result=JSON.parse(res.result);
+								 uni.requestPayment({
+								 	provider: 'wxpay',
+								 	timeStamp: result.timeStamp,
+								 	nonceStr: result.nonceStr,
+								 	package: result.package,
+								 	signType: result.signType,
+								 	paySign: result.paySign,
+								 	success: function(res) {
+										uni.hideLoading();
+										uni.redirectTo({
+											url:"success?order="+JSON.stringify(that.order)
+										}) 
+								 	},
+								 	fail: function(err) {
+										uni.showToast({
+											icon:'none',
+											title:'fail:' + JSON.stringify(err),
+										});
+								 		console.log('fail:' + JSON.stringify(err));
+								 		uni.hideLoading();
+								 	}
+								 });
+								 
+								 // uni.requestPayment({
+								 // 	provider: 'wxpay',
+								 // 	timeStamp: res.result.timeStamp,
+								 // 	nonceStr: res.result.nonceStr,
+								 // 	package: res.result.packageValue,
+								 // 	signType: res.result.signType,
+								 // 	paySign: res.result.paySign,
+								 // 	success: function(res) {
+								 // 		 uni.hideLoading();
+									// 	  uni.redirectTo({
+									// 	  	url:"success?order="+JSON.stringify(that.order)
+									// 	  }) 
+								 // 	},
+								 // 	fail: function(err) {
+									// 	uni.showToast({
+									// 		icon:'none',
+									// 		title:'fail:' + JSON.stringify(err),
+									// 	});
+								 // 		console.log('fail:' + JSON.stringify(err));
+								 // 		uni.hideLoading();
+								 // 	}
+								 // });
+							 }
+							 else if(res.payType==3){
+								 uni.hideLoading();
+								 if(that.order.isPrescribe){
+									 //如果是处方订单开处方
+									uni.redirectTo({
+										url:"prescribe?orderId="+that.order.id
+									})
+								 }
+								 else{
+									//如果是普通订单
+									uni.redirectTo({
+										url:"success?order="+JSON.stringify(that.order)
+									}) 
+								 }
+							 }
+							 
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+				
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		height: 100%;
+	}
+	.content{
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;
+		.inner{
+			padding: 20upx;
+			.time-price{
+				box-sizing: border-box;
+				padding: 50upx 0upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				.time{
+					font-size: 32upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #222222;
+					line-height: 1;
+					text-align: center;
+				}
+				.desc{
+					margin: 30upx 0upx 15upx;
+					font-size: 26upx;
+					font-family: PingFang SC;
+					color: #999999;
+					line-height: 1;
+					text-align: center;
+				}
+				.price-box{
+					display: flex;
+					align-items: flex-end;
+					margin-top: 28upx;
+					.unit{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1.3;
+						margin-right: 10upx;
+					}
+					.num{
+						font-size: 56upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+			}
+			.pay-type{
+				box-sizing: border-box;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				margin-top: 20upx;
+				padding: 40upx 30upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				.title{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1;
+					margin-bottom: 10upx;
+				}
+				.item{
+					padding: 15upx 0upx;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					.left{
+						display: flex;
+						align-items: center;
+						image{
+							width: 44upx;
+							height: 44upx;
+							margin-right: 20upx;
+						}
+						.text{
+							font-size: 30upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #222222;
+							line-height: 1;
+						}
+					}
+				}
+			}
+			.order-info{
+				margin-top: 20upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				padding: 40upx 30upx;
+				.title{
+					font-size: 30upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #222222;
+					line-height: 1;
+				}
+				.item{
+					margin-top: 40upx;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					.label{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+						line-height: 1;
+					}
+					.text{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #222222;
+						line-height: 32upx;
+					}
+					.cont-text{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+						.bold{
+							color: #111111;
+						}
+					}
+					.sn-box{
+						display: flex;
+						align-items: center;
+						.copy-btn{
+							width: 58upx;
+							height: 32upx;
+							line-height: 32upx;
+							text-align: center;
+							font-size: 22upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #222222;
+							background: #F5F5F5;
+							border-radius: 4upx;
+							margin-left: 24upx;
+						}
+					}
+					 
+				}
+				.line{
+					width: 100%;
+					height: 1px;
+					background: #F0F0F0;
+					margin-top: 30upx;
+				}
+			}
+		}
+		.btn-box{
+			height: 242upx;
+			background: #FFFFFF;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			flex-direction: column;
+			.btn{
+				width: 91.73%;
+				height: 88upx;
+				line-height: 88upx;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				text-align: center;
+				background: #2BC7B9;
+				border-radius: 44upx;
+				margin-bottom: 10rpx;
+			}
+			.other-btn{
+				width: 91.73%;
+				height: 88upx;
+				line-height: 88upx;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #2BC7B9;
+				border: 1rpx solid #2BC7B9;
+				text-align: center;
+				background: #FFFFFF;
+				border-radius: 44upx;
+				margin-bottom: 10rpx;
+				position: relative;
+				.share{
+					display: inline-block;
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 100%;
+					height: 100%;
+					opacity: 0;
+				}
+			}
+		}
+	}
+	
+</style>

+ 813 - 0
pages/shopping/prescribe.vue

@@ -0,0 +1,813 @@
+<template>
+	<view class="content">
+		<view class="fixed-top-box">
+			<view class="status_bar" :style="{height: statusBarHeight}"></view>
+			<view class="back-box" @click="back">
+				<image src="../../static/images/back_white.png" mode=""></image>
+				<text class="title">填写处方信息</text>
+				<text></text>
+			</view>
+		</view>
+		<view class="inner">
+			<view :style="{height: statusBarHeight}"></view>
+			<!-- 步骤 -->
+			<view class="steps-box">
+				<view class="item active">填写信息</view>
+				<image class="arrow" src="../../static/images/arrow4.png" mode=""></image>
+				<view class="item">医生开方</view>
+				<image class="arrow" src="../../static/images/arrow4.png" mode=""></image>
+				<view class="item">支付订单</view>
+				<image class="arrow" src="../../static/images/arrow4.png" mode=""></image>
+				<view class="item">厂家发货</view>
+			</view>
+			<!-- 提示 -->
+			<view class="tip-box">
+				<view class="top">
+					<image src="../../static/images/safe2.png" mode=""></image>
+					<text class="text">依据国家规定、处方药需凭处方购买</text>
+				</view>
+				<view class="time-tip">填写问诊人信息、处方信息</view>
+			</view>
+			<view class="info-box">
+				<!-- 选择问诊人 -->
+				<view class="chose-people">
+					<view class="title-box">
+						<text class="title">选择问诊人</text>
+						<view class="add-box" @click="addPeople()">
+							<image src="../../static/images/add26.png" mode=""></image>
+							<text >添加</text>
+						</view>
+					</view>
+					<view class="peop-list" v-if="patient.length>0">
+						<view v-for="(item,index) in patient" :key="index" :class="patientId == item.patientId?'item active':'item'" @click="chosePatient(item)">
+							<view class="name">{{ item.patientName }}</view>
+							<view class="info">
+								<text class="sex" v-if="item.gender==1">男</text>
+								<text class="sex" v-if="item.gender==2">女</text>
+								<text class="ege">{{utils.getAge(item.birthday)}}岁</text>
+							</view>
+							<!-- 选中的对号角标 -->
+							<image v-if="patientId == item.patientId" class="active-img" src="../../static/images/sel_right50.png" mode=""></image>
+						</view>
+					</view>
+				</view>
+				<view class="text-content">
+					<view class="title">
+						<text class="black">主诉</text>
+						<text class="gray">(选填)</text>
+					</view>
+					<textarea class="textArea" maxlength="200" @input="chiefComplaintInput" placeholder="请填写主诉内容"></textarea>
+					  
+				</view>
+				<view class="text-content">
+					<view class="title">
+						<text class="black">既往病史</text>
+						<text class="gray">(选填)</text>
+					</view>
+					<textarea class="textArea" maxlength="200" @input="historyIllnessInput" placeholder="请填写既往病史内容"></textarea>
+					 
+				</view>
+				<view class="img-content">
+					<view class="title">
+						<text class="black">复诊凭证</text>
+						<text class="gray">(选填) {{imgList.length}}/4</text>
+					</view>
+					<view class="upload-img">
+						<view class="img" v-for="(item,index) in imgList" :key="index"  >
+							<image :src="item" mode="aspectFill"  @click="previewImage(index)"></image>
+							<view class="del" @click="delImg(index)" >
+								<image src="/static/images/del2.png"></image>
+							</view>
+						</view>
+						<view class="chose-img" @tap="chooseImage(1)" v-if="imgList.length<4">
+							<image src="/static/images/adds.png"></image>
+						</view>
+					</view>
+					
+					 
+				</view>
+				<!-- 疾病选择 -->
+				<!-- <view class="disease-select">
+					<view class="title">
+						<text class="black">本次用药的确诊疾病</text>
+						<text class="gray">(可多选)</text>
+					</view>
+					<view class="dise-list">
+						<view 
+							v-for="(item,index) in diseaseList" 
+							:key="index" 
+							:class="activeDise == index?'item active':'item'"
+							@click="choseDise(index)"
+						>
+							{{ item }}
+						</view>
+					</view>
+				</view> -->
+				<!-- 是否使用过此药 -->
+				<view class="check-box">
+					<view class="left">
+						<image src="../../static/images/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="left">
+						<image src="../../static/images/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="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>
+						</label>
+					</radio-group>
+				</view>
+				<view class="check-box">
+					<view class="left">
+						<image src="../../static/images/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="isRenal==true" style="margin-right: 16upx;" />
+							<text class="my-radio-text">是</text>
+						</label>
+						<label>
+							<radio value="0" :checked="isRenal==false" style="margin-right: 16upx;" />
+							<text class="my-radio-text">否</text>
+						</label>
+					</radio-group>
+				</view>
+				<view class="check-box">
+					<view class="left">
+						<image src="../../static/images/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="isLactation==true" style="margin-right: 16upx;" />
+							<text class="my-radio-text">是</text>
+						</label>
+						<label>
+							<radio value="0" :checked="isLactation==false" style="margin-right: 16upx;" />
+							<text class="my-radio-text">否</text>
+						</label>
+					</radio-group>
+				</view>
+			</view>
+		</view>
+		<view class="btn-box">
+			<view class="btn" @click="submit()">去开处方</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {getStoreOrderById} from '@/api/storeOrder'
+	import {getWeixinPrescribeTemps} from '@/api/common'
+	import {doPrescribe} from '@/api/prescribe'
+	import {getPatientList,delPatient} from '@/api/patient'
+	export default {
+		data() {
+			return {
+				statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
+				order:null,
+				temps:[],
+				imgList: [],  
+				orderId:null,
+				patient:[],
+				patientId:null,
+				// 疾病列表
+				// diseaseList: ['消化不良','心血管','呼吸系统','感染病','皮肤病','口腔','妇科','耳鼻喉'],
+				// 选中的疾病
+				// activeDise: 0,
+				isAllergic: false,
+				isLiver: false,
+				isRenal: false,
+				isLactation: false,
+				chiefComplaint:null,
+				historyIllness:null,
+				
+			}
+		},
+		onLoad(option) {
+			this.orderId=option.orderId
+			this.getPatientList();
+			uni.$on('refreshPatient', () => {
+				this.getPatientList()
+			})
+			this.getWeixinPrescribeTemps();
+			this.getStoreOrderById();
+		},
+		onShow() {
+			this.getPatientList();
+		},
+		
+		methods: {
+			back(){
+			  uni.showToast({
+			  	icon:'none',
+			  	title: "请填写资料提交处方,否则将无法发货"
+			  });
+			},
+			getStoreOrderById:function(){
+				var data={orderId:this.orderId}
+				getStoreOrderById(data).then(
+					res => {
+						if(res.code==200){
+							this.order=res.order
+						}else{
+							 
+						}
+					},
+					rej => {}
+				);
+			},
+			getWeixinPrescribeTemps:function(){
+				getWeixinPrescribeTemps().then(
+					res => {
+						if(res.code==200){
+							this.temps=res.temp
+							console.log(this.temps)
+						}else{
+							 
+						}
+					},
+					rej => {}
+				);
+			},
+			chiefComplaintInput(e) {
+				this.chiefComplaint = e.detail.value
+			},
+			historyIllnessInput(e) {
+				this.historyIllness = e.detail.value
+			},
+			// 选择图片
+			chooseImage(type) {
+				var that=this;
+				uni.chooseImage({
+					count: 4, //默认9
+					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['album', 'camera'], //从相册选择
+					success: (res) => {
+						uni.uploadFile({
+							url: uni.getStorageSync('requestPath')+'/app/common/uploadOSS', //仅为示例,非真实的接口地址
+							filePath: res.tempFilePaths[0],
+							name: 'file',
+							success: (res) => {
+								that.imgList.push(JSON.parse( res.data).url)
+							}
+						});
+					}
+				});
+			},
+			//图片预览
+			previewImage(index){
+				//预览图片
+				uni.previewImage({
+					urls: this.imgList,
+					current: this.imgList[index]
+				});
+			},
+			delImg(index) {
+				uni.showModal({
+					title: '提示',
+					content: '确定要删除这张图片吗?',
+					cancelText: '取消',
+					confirmText: '确定',
+					success: res => {
+						if (res.confirm) {
+							this.imgList.splice(index, 1);
+						}
+					}
+				})
+			},
+			submit(){
+				var that=this;
+				if(this.patientId==null){
+					uni.showToast({
+						icon:'none',
+						title: "请选择患者"
+					});
+					return;
+				}
+				 
+				uni.showLoading({
+					title:"正在处理中"
+				})
+				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()
+				}
+				 doPrescribe(data).then(
+				 	res => {
+				 		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
+											});
+											
+										}
+										
+									},500);
+							 	},
+							 	fail(res) {
+							 		setTimeout(function(){
+										if(order.paid!=1){
+											uni.redirectTo({
+												url: './paymentOrder?orderId='+that.order.id
+											})
+										}
+										else{
+											uni.navigateBack({  
+												delta: 1
+											});
+											
+										}
+							 			 
+							 		},500);
+							 	}
+							 })
+							 
+				 			
+				 		}else{
+				 			uni.showToast({
+								icon:'none',
+				 				title: res.msg,
+				 			});
+				 		}
+				 	},
+				 	rej => {}
+				 );
+				
+			},
+			getPatientList(){
+			 	uni.showLoading({
+			 		title:"正在加载中"
+			 	})
+			 	getPatientList().then(
+			 		res => {
+			 			uni.hideLoading()
+			 			if(res.code==200){
+			 				this.patient=res.data;
+			 			}else{
+			 				uni.showToast({
+			 					icon:'none',
+			 					title: "请求失败",
+			 				});
+			 			}
+			 		},
+			 		rej => {}
+			 	);
+			},
+			// 选中问诊人
+			chosePatient(item) {
+				this.patientId = item.patientId
+			},
+			// 添加问诊人
+			addPeople() {
+				uni.navigateTo({
+					url:"/pages_user/user/patient"
+				})
+			},
+			// 疾病选择
+			choseDise(index) {
+				this.activeDise = index
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content{
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;
+		.fixed-top-box{
+			width: 100%;
+			background: linear-gradient(135deg, #2BC7B9 0%, #60CDC3 100%);
+			position: fixed;
+			top: 0;
+			left: 0;
+			z-index: 1000;
+			.back-box{
+				height: 88upx;
+				padding-left: 22upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				padding: 0 20upx;
+				image{
+					width: 40upx;
+					height: 40upx;
+				}
+				.title{
+					font-size: 36upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #FFFFFF;
+				}
+			}
+		}
+		.inner{
+			margin-top: 88rpx;
+			.steps-box{
+				height: 88upx;
+				background: #FFFFFF;
+				padding: 0 48upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				.item{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					&.active{
+						font-weight: bold;
+						color: #2BC7B9;
+					}
+				}
+				.arrow{
+					width: 12upx;
+					height: 22upx;
+				}
+			}
+			.tip-box{
+				box-sizing: border-box;
+				height: 130upx;
+				background: #FFF4E6;
+				padding: 26upx 0 30upx 50upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				.top{
+					display: flex;
+					align-items: center;
+					image{
+						width: 26upx;
+						height: 31upx;
+						margin-right: 10upx;
+					}
+					.text{
+						font-size: 28upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #EF8A07;
+						line-height: 1;
+					}
+				}
+				.time-tip{
+					padding-left: 40upx;
+					font-size: 24upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1;
+				}
+			}
+			.info-box{
+				padding: 20upx;
+				.chose-people{
+					box-sizing: border-box;
+					background: #FFFFFF;
+					border-radius: 16upx;
+					padding: 40upx 30upx 30upx;
+					.title-box{
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						.title{
+							font-size: 32upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #111111;
+						}
+						.add-box{
+							display: flex;
+							align-items: center;
+							image{
+								width: 26upx;
+								height: 26upx;
+								margin-right: 11upx;
+							}
+							text{
+								font-size: 28upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+							}
+						}
+					}
+					.peop-list{
+						display: flex;
+						flex-wrap: wrap;
+						margin-top: 30upx;
+						.item{
+							box-sizing: border-box;
+							padding: 18upx 30upx;
+							width: 31.28%;
+							height: 110upx;
+							background: #F7F7F7;
+							border-radius: 16upx;
+							margin: 0 20upx 10upx 0;
+							border: 2upx solid #F7F7F7;
+							display: flex;
+							flex-direction: column;
+							justify-content: space-between;
+							&:nth-child(3n){
+								margin-right: 0;
+							}
+							&.active{
+								background: rgba(230, 250, 247, 0);
+								border: 2upx solid #2BC7B9;
+								position: relative;
+							}
+							.active-img{
+								width: 50upx;
+								height: 50upx;
+								position: absolute;
+								right: -2upx;
+								bottom: -2upx;
+							}
+							.name{
+								font-size: 30upx;
+								line-height: 1;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #111111;
+							}
+							.info{
+								display: flex;
+								align-items: center;
+								.sex,
+								.ege{
+									font-size: 26upx;
+									font-family: PingFang SC;
+									line-height: 1;
+									font-weight: 500;
+									color: #666666;
+								}
+								.ege{
+									margin-left: 19upx;
+								}
+							}
+						}
+					}
+				}
+				.disease-select{
+					box-sizing: border-box;
+					min-height: 286upx;
+					background: #FFFFFF;
+					border-radius: 16upx;
+					padding: 40upx 30upx 22upx;
+					margin-top: 20upx;
+					.title{
+						display: flex;
+						align-items: center;
+						align-items: flex-end;
+						.black{
+							font-size: 32upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #111111;
+							line-height: 1;
+							margin-left: 10upx;
+						}
+						.gray{
+							font-size: 28upx;
+							font-family: PingFang SC;
+							color: #999999;
+							line-height: 1;
+							margin-left: 10upx;
+						}
+					}
+					.dise-list{
+						display: flex;
+						flex-wrap: wrap;
+						margin-top: 26upx;
+						.item{
+							box-sizing: border-box;
+							height: 64upx;
+							line-height: 64upx;
+							font-size: 28upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #2BC7B9;
+							background: #F5FFFE;
+							border: 1px solid #8AD5CE;
+							padding: 0 20upx;
+							border-radius: 32upx;
+							margin: 0 20upx 20upx 0;
+							&.active{
+								background: #2BC7B9;
+								border: 1px solid #2BC7B9;
+								color: #FFFFFF;
+							}
+						}
+					}
+				}
+				.text-content{
+					box-sizing: border-box;
+					min-height: 286upx;
+					background: #FFFFFF;
+					border-radius: 16upx;
+					padding: 40upx 30upx 22upx;
+					margin-top: 20upx;
+					.title{
+						display: flex;
+						align-items: center;
+						align-items: flex-end;
+						.black{
+							font-size: 32upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #111111;
+							line-height: 1;
+							margin-left: 10upx;
+						}
+						.gray{
+							font-size: 28upx;
+							font-family: PingFang SC;
+							color: #999999;
+							line-height: 1;
+							margin-left: 10upx;
+						}
+					}
+					.textArea{
+						margin: 30rpx 0rpx 0rpx 0rpx;
+						width: 100%;
+					}
+					 
+					
+					 
+				}
+				.img-content{
+					box-sizing: border-box;
+					min-height: 286upx;
+					background: #FFFFFF;
+					border-radius: 16upx;
+					padding: 40upx 30upx 22upx;
+					margin-top: 20upx;
+					margin-bottom: 20upx;
+					.title{
+						display: flex;
+						align-items: center;
+						align-items: flex-end;
+						.black{
+							font-size: 32upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #111111;
+							line-height: 1;
+							margin-left: 10upx;
+						}
+						.gray{
+							font-size: 28upx;
+							font-family: PingFang SC;
+							color: #999999;
+							line-height: 1;
+							margin-left: 10upx;
+						}
+					}
+					.textArea{
+						margin: 30rpx 0rpx 0rpx 0rpx;
+						width: 100%;
+					}
+					.upload-img{
+						margin: 30rpx 0rpx 0rpx 0rpx;
+						width: 100%;
+						display: flex;
+						align-items: flex-start;
+						.img{
+							margin-right: 10rpx;
+							width: 100rpx;
+							height: 100rpx;
+							position: relative;
+							image{
+								width: 100%;
+								height: 100%;
+							}
+							.del{
+								right:0rpx;
+								top:0rpx;
+								position: absolute;
+								image{
+									width: 30rpx;
+									height:30rpx;
+								}
+							}
+						}
+						.chose-img{
+							border-radius: 5rpx;
+							border: 1px solid #eee;
+							padding: 5rpx;
+							display: flex;
+							align-items: center;
+							justify-content: center;
+							width: 100rpx;
+							height: 100rpx;
+							image{
+								width: 50rpx;
+								height: 50rpx;
+							}
+							
+						}
+					}
+					
+					 
+				}
+
+				.check-box{
+					height: 88upx;
+					background: #FFFFFF;
+					border-radius: 16upx;
+					padding: 0 30upx;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					.left{
+						display: flex;
+						align-items: center;
+						image{
+							width: 21upx;
+							height: 27upx;
+							margin-right: 20upx;
+						}
+						.text{
+							font-size: 32upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #666666;
+						}
+					}
+					.my-radio-text{
+						font-size: 30upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #111111;
+						line-height: 30upx;
+					}
+				}
+			}
+		}
+		.btn-box{
+			height: 120upx;
+			padding: 30upx;
+			// background: #FFFFFF;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			.btn{
+				width: 100%;
+				height: 88upx;
+				line-height: 88upx;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				text-align: center;
+				background: #2BC7B9;
+				border-radius: 44upx;
+			}
+		}
+	}
+	
+</style>

+ 1026 - 0
pages/shopping/productDetails.vue

@@ -0,0 +1,1026 @@
+<template>
+	<view class="content">
+		<!-- 商品轮播图片 -->
+		<view class="shop-banner" @click="showImg()">
+			<swiper
+				class="swiper" 
+				:indicator-dots="false" 
+				:circular="true" 
+				:autoplay="true" 
+				:interval="3000" 
+				:duration="1000"
+				indicator-color="rgba(255, 255, 255, 0.6)"
+				indicator-active-color="#ffffff"
+				@change="swiperChange"
+			>
+				<swiper-item  class="swiper-item" v-for="(item,index) in  banner" :key="index">
+					<image :src="item" mode="aspectFill"></image>
+				</swiper-item>
+			</swiper>
+			<!-- 底部遮罩 -->
+			<view class="banner-mask"></view>
+			<!-- 数量 -->
+			<view class="num-box">{{ activeBanner }}/{{ banner.length }}</view>
+		</view>
+		<!-- 详细信息 -->
+		<view class="det-info">
+			<view class="price-box">
+				<view class="price">
+					<text class="label">会员价</text>
+					<text class="unit">¥</text>
+					<text class="num" >{{product.price}}</text>
+					<text class="label">零售价</text>
+					<text class="old" >¥{{product.otPrice}}</text>
+				</view>
+				<view class="share-box">
+					<text class="text">分享</text>
+					<image src="../../static/images/share1.png" mode=""></image>
+					<button  class="share" data-name="shareBtn" open-type="share">分享</button>
+				</view>
+			</view>
+			<view class="name-box">
+				<view class="tag">{{utils.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>
+			<view class="safe-box">
+				<image src="../../static/images/safe.png" mode=""></image>
+				<text class="text">品质保障</text>
+				<view class="line"></view>
+				<text class="text">药师服务</text>
+				<view class="line"></view>
+				<text class="text">隐私保护</text>
+			</view>
+		</view>
+		<!-- 购买人数、库存 -->
+		<view class="inventor">
+			<view class="left">
+				<!-- <view class="head-box">
+					<view class="head" v-for="(item,j) in 5" :key="j">
+						<image src="../../static/images/head.jpg" mode=""></image>
+					</view>
+				</view> --> 
+				<view class="num-box">
+					已有 <text class="text">{{product.sales}}</text> 人购买
+				</view>
+			</view>
+			<!-- <view class="right">
+				库存 <text class="text">{{product.stock}}{{product.unitName}}</text>
+			</view> -->
+			<!-- <view class="right">
+				 <text class="text">库存{{product.stock>0?'充足':'售罄'}} </text>
+			</view> -->
+		</view>
+		<!-- 功效 -->
+		<!-- <view class="effect">
+			<view class="label">药品说明书</view>
+			<view class="label">查看</view>
+			
+		</view> -->
+		<!-- 图文详情 -->
+		<view class="det-box">
+			<view class="title">图文详情</view>
+			<view class="inner">
+				<view  v-html="product.description" style="font-size:0"></view>
+			</view>
+		</view>
+		<!-- 底部按钮 -->
+		<view class="btn-foot">
+			<view class="menu-box">
+				<view class="item" @click="goHome">
+					<image src="../../static/images/back_home.png" mode=""></image>
+					<text class="label">首页</text>
+				</view>
+				<view class="item" style="position: relative;">
+					<image src="../../static/images/consult_small.png" mode=""></image>
+					<text class="label">咨询</text>
+					<button class="contact-btn" open-type="contact"></button>
+				</view>
+				<!-- <view class="item" @click="navgetTo('./cart')">
+					<uni-badge size="small" :text="cartCount" absolute="rightTop" type="error">
+						<image src="../../static/images/cart36.png" mode=""></image>
+					</uni-badge>
+					<text class="label">购物车</text>
+				</view> -->
+			</view>
+			<view class="btn-box">
+				<view class="btn cart" >好药分享
+				<button  class="share" data-name="shareBtn" open-type="share"></button>
+				</view>
+				<view class="btn buy" @click="addCart('buy')">{{buyText}}</view>
+			</view>
+		</view>
+		<!-- 选择药品规格弹窗 -->
+		<popupBottom ref="popup" :visible.sync="specVisible" title=" "  radius="32"  maxHeight="1024">
+		    <view class="product-spec">
+				<!-- 商品信息 -->
+				<view class="pro-info">
+					<view class="img-box" @click="showImg(productValueSelect.image)">
+						<image :src="productValueSelect.image==null||productValueSelect.image==''?product.image:productValueSelect.image" mode="aspectFill"></image>
+					</view>
+					<view class="info-text">
+						<view class="price">
+							<text class="unit">¥</text>
+							<text class="num">{{ productValueSelect.price.toFixed(2) }}</text>
+						</view>
+						<view class="desc-box">
+							<text class="text">已选:{{ productValueSelect.sku }}</text>
+							<text class="text">库存{{ productValueSelect.stock?'充足':'售罄' }}</text>
+						</view>
+					</view>
+				</view>
+				<!-- 规格 -->
+				<view class="spec-box">
+					<view v-for="(item,index) in attrs">
+						<view class="title">{{item.attrName}}</view>
+						<view class="spec-list">
+							<view 
+								v-for="(subItem,subindex) in item.values" 
+								:key="subindex" 
+								:class="subindex==item.index?'item active':'item'" 
+								@click="choseSpec(index,subindex)"
+							>
+								{{ subItem }}
+							</view>
+						</view>
+					</view>
+				</view>
+				<!-- 数量 -->
+				<view class="price-num">
+					<view class="label">数量</view>
+					<view class="num-box">
+						<view class="img-box" @click="lessNum()">
+							<image v-if="specNum <= 1" src="../../static/images/jian.png" mode=""></image>
+							<image v-else src="../../static/images/jian2.png" mode=""></image>
+						</view>
+						<input   type="number" @change="changeNum" v-model="specNum"   />
+						<view class="img-box" @click="addNum()">
+							<image src="../../static/images/add.png" mode=""></image>
+						</view>
+					</view>
+				</view>
+				<view class="sub-btn" @click="submit">确定</view>
+			</view>
+		</popupBottom>
+		<view class="loadding" v-if="loadding==true">
+			<image src="../../static/images/logo.jpg"></image>
+			<text class="text">加载中...</text>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {getDicts} from '@/api/index'
+	import {getProductDetails,getCartCount,addCart} from '@/api/product'
+	import popupBottom from '@/components/px-popup-bottom/px-popup-bottom.vue'
+	export default {
+		components: {
+			item:{},
+			popupBottom
+		},
+		data() {
+			return {
+				loadding:true,
+				buyText:"立即购买",
+				type:null,
+				productValueSelect:{
+					price:0,
+				},
+				banner:[],
+				productId:null,
+				attrs:[],
+				values:[],
+				product:{
+					price:0,
+					otPrice:0,
+				},
+				 
+				// 当前轮播的图片
+				activeBanner: 1,
+				// 购物车数量
+				cartCount: 0,
+				// 规格弹窗
+				specVisible: false,
+				// 规格数量
+				specNum: 1,
+			};
+		},
+		onLoad(options) {
+			if(options.userId!=null){
+				uni.setStorageSync('tuiUserId',options.userId);
+			}
+			else if (options.hasOwnProperty('q') && options.q) {
+				// 通过下面这步解码,可以拿到url的值
+				const url = decodeURIComponent(options.q)
+				this.url=url;
+				// // 对url中携带的参数提取处理
+				const obj = this.utils.urlToObj(url)
+				uni.setStorageSync('tuiUserId',obj.userId);
+			}
+			uni.showShareMenu({
+				withShareTicket:true,
+				//小程序的原生菜单中显示分享按钮,才能够让发送给朋友与分享到朋友圈两个按钮可以点击
+				menus:["shareAppMessage","shareTimeline"] //不设置默认发送给朋友
+			})
+			this.getDicts();
+			this.productId = options.productId;
+			if(this.utils.checkToken()){
+				this.getCartCount();
+			}
+		},
+		onShow() {
+			this.getProductDetails();
+		},
+		//发送给朋友
+		onShareAppMessage(res) {
+			if(this.utils.isLogin()){
+				var user=JSON.parse( uni.getStorageSync('userInfo'))
+				return {
+					title: this.product.productName,
+					path: '/pages/shopping/productDetails?productId='+this.product.productId+"&userId="+user.userId,
+				}
+			}
+			
+		},
+		//分享到朋友圈
+		onShareTimeline(res) {
+			if(this.utils.isLogin()){
+				var user=JSON.parse( uni.getStorageSync('userInfo'))
+				return {
+					title: this.product.productName,
+					query:'productId='+this.product.productId+"&userId="+user.userId,//页面参数
+				}
+			}
+			
+		},
+		methods: {
+			getDicts:function(){
+				getDicts().then(
+					res => {
+						if(res.code==200){
+							uni.setStorageSync('dicts',JSON.stringify(res));
+						} 
+						 
+					},
+					rej => {}
+				);
+			},
+			showImg(img) {
+				if(img!=null){
+					var imgs=[];
+					imgs.push(img)
+					//预览图片
+					uni.previewImage({
+						urls: imgs,
+						current: imgs[0]
+					});
+				}
+				else{
+					//预览图片
+					uni.previewImage({
+						urls: this.banner,
+						current: this.banner[0]
+					});
+				}
+			},
+			doAddCart(type){
+				if(this.specNum==0){
+					uni.showToast({
+						icon:'none',
+						title: "库存不足",
+					});
+					return;
+				}
+				var isBuy=type=="buy"?1:0;
+				let data = {isBuy:isBuy,cartNum:this.specNum,productId:this.productValueSelect.productId,attrValueId:this.productValueSelect.id};
+				addCart(data).then(
+					res => {
+						if(res.code==200){
+							if(type=="buy"){
+								uni.navigateTo({
+									url: '/pages/shopping/confirmOrder?type='+this.type+"&cartIds="+res.id+"&orderType="+this.orderType
+								})
+							}
+							else
+							{
+								this.getCartCount()
+								uni.showToast({
+									icon:'success',
+									title: "添加成功",
+								});
+							}
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+							this.getProductDetails()
+						}
+					},
+					rej => {}
+				);
+			},
+			getProductDetails(){
+				let data = {productId:this.productId};
+				getProductDetails(data).then(
+					res => {
+						this.loadding=false
+						if(res.code==200){
+							this.product=res.product;
+							if(this.product.productType==1){
+								this.buyText="立即购买"
+							}
+							else if(this.product.productType==2){
+								this.buyText="开方购买"
+							}
+							this.product.otPrice=this.product.otPrice.toFixed(2);
+							this.product.price=this.product.price.toFixed(2);
+							if(this.product.sliderImage!=null){
+								this.banner=this.product.sliderImage.split(',');
+							}
+							else{
+								this.banner=[]
+							}
+							this.attrs=res.productAttr;
+							this.attrs.forEach((item,index,arr)=>{
+							     item.values=item.attrValues.split(',');
+								 item.index=0
+							})
+							console.log(this.attrs)
+							this.values=res.productValues;
+							this.choseSpec(0,0)
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+							setTimeout(function(){
+								uni.reLaunch({
+									url: '/pages/home/index',
+								})
+							},2000)
+							
+						}
+					},
+					rej => {}
+				);
+			},
+			getCartCount(){
+				let data = {productId:this.productId};
+				getCartCount(data).then(
+					cartRes => {
+						if(cartRes.code==200){
+							 this.cartCount=cartRes.data;
+						}
+					},
+					rej => {}
+				);
+				
+			},
+			// swiper变化事件
+			swiperChange(event) {
+				this.activeBanner = event.detail.current + 1
+			},
+			// 回到首页
+			goHome() {
+				uni.switchTab({
+					url: '/pages/home/index'
+				})
+			},
+			// 跳转页面
+			navgetTo(url) {
+				this.utils.isLogin().then(res => {
+					if(res){
+						uni.navigateTo({
+							url: url
+						})
+					}
+				})
+			},
+			// 加入购物车
+			addCart(type) {
+				this.utils.isLogin().then(res => {
+					if(res){
+						this.type=type;
+						this.specVisible = true
+					}
+				})
+			},
+			// 规格选择
+			choseSpec(index,subIndex) {
+				this.attrs[index].index = subIndex;
+				this.$forceUpdate();
+				let productAttr = this.attrs;
+				let values = [];
+				for (let i = 0; i < productAttr.length; i++) {
+				  for (let j = 0; j < productAttr[i].values.length; j++) {
+				    if (productAttr[i].index === j) {
+				      values.push(productAttr[i].values[j]);
+				    }
+				  }
+				}
+				var selectVal=values.sort().join(",");
+				console.log(selectVal)
+				var valueSelect=this.values.filter((item)=>{
+				     return item.sku==selectVal;
+				})
+				if(valueSelect!=null&&valueSelect.length==1){
+					this.productValueSelect=valueSelect[0];
+				}
+				this.updateSpecNum();
+				
+			},
+			//更新数量
+			updateSpecNum(){
+				if(this.productValueSelect.stock==0){
+					this.specNum=0;
+				}
+				else{
+					this.specNum=1;
+				}
+			},
+			changeNum(e) {
+				this.specNum = e.detail.value.replace(/\D/g, '')
+				if(this.specNum < 1) {
+					this.specNum = 1
+				}
+				if(this.specNum>=this.productValueSelect.stock){
+					this.specNum=this.productValueSelect.stock
+				}
+			},
+			// 数量减法
+			lessNum() {
+				this.specNum--
+				if(this.specNum < 1) {
+					this.specNum = 1
+				}
+				if(this.specNum>=this.productValueSelect.stock){
+					this.specNum=this.productValueSelect.stock
+				}
+			},
+			// 数量加法
+			addNum() {
+				if(this.specNum<10){
+					this.specNum++
+				}
+				else{
+					uni.showToast({
+						icon:'none',
+						title: '限购10盒',
+					});
+				}
+				if(this.specNum>=this.productValueSelect.stock){
+					this.specNum=this.productValueSelect.stock
+				}
+				
+			},
+			// 确定选择该规格
+			submit() {
+				this.specVisible = false
+				this.doAddCart(this.type);
+				 
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.shop-banner{
+		height: 756upx;
+		background-color: #FFFFFF;
+		position: relative;
+		.swiper-item{
+			box-sizing: border-box;
+		}
+		.swiper,
+		.swiper-item,
+		.swiper-item image{
+			width: 100%;
+			height: 100%;
+		}
+		.banner-mask{
+			width: 100%;
+			height: 44upx;
+			// background: linear-gradient(0deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0));
+			// opacity: 0.8;
+			position: absolute;
+			left: 0;
+			bottom: 0;
+			z-index: 9;
+			background-image: url(../../static/images/black_mask.png);
+			background-size: 20upx 44upx;
+			background-repeat: repeat-x;
+		}
+		.num-box{
+			width: 80upx;
+			height: 44upx;
+			line-height: 44upx;
+			text-align: center;
+			font-size: 24upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #FFFFFF;
+			background: rgba(0, 0, 0, .3);
+			border-radius: 22upx;
+			position: absolute;
+			right: 30upx;
+			bottom: 30upx;
+			z-index: 10;
+		}
+	}
+	.det-info{
+		background: #FFFFFF;
+		padding: 36upx 30upx 25upx;
+		.price-box{
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			.price{
+				display: flex;
+				align-items: flex-end;
+				.label{
+					color: #333;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					line-height: 1.3;
+					margin-right: 5upx;
+				}
+				.unit{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FF6633;
+					line-height: 1.3;
+				}
+				.num{
+					font-size: 40upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FF6633;
+					margin: 0 20upx 0 10upx;
+					line-height: 1;
+				}
+				.old{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					text-decoration: line-through;
+					color: #BBBBBB;
+					line-height: 1.3;
+				}
+			}
+			.share-box{
+				width: 120upx;
+				height: 46upx;
+				border: 1px solid #2BC7B9;
+				border-radius: 23upx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				position: relative;
+				.text{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #2BC7B9;
+				}
+				image{
+					margin-left: 2rpx;
+					width: 25upx;
+					height: 24upx;
+				}
+				.share{
+					display: inline-block;
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 100%;
+					height: 100%;
+					opacity: 0;
+				}
+			}
+			.spec{
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				line-height: 36upx;
+			}
+		}
+		.name-box{
+			font-size: 32upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #111111;
+			line-height: 44upx;
+			margin-top: 32upx;
+			.tag{
+				display: inline-block;
+				padding: 0 6upx;
+				height: 30upx;
+				background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
+				border-radius: 4upx;
+				margin-right: 10upx;
+				font-size: 22upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				line-height: 30upx;
+				float: left;
+				margin-top: 7upx;
+			}
+		}
+		.intro{
+			font-size: 26upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+			line-height: 36upx;
+			padding: 18upx 0 23upx;
+			border-bottom: 1px solid #f7f7f7;
+		}
+		.safe-box{
+			display: flex;
+			align-items: center;
+			padding-top: 24upx;
+			image{
+				width: 20upx;
+				height: 24upx;
+				margin-right: 20upx;
+			}
+			.text{
+				font-size: 22upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				line-height: 1;
+			}
+			.line{
+				width: 1px;
+				height: 23upx;
+				background: #EDEEEF;
+				margin: 0 20upx;
+			}
+		}
+	}
+	.inventor{
+		height: 88upx;
+		padding: 0 39upx 0 30upx;
+		margin-top: 10upx;
+		background: #FFFFFF;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		.left{
+			display: flex;
+			align-items: center;
+			.head-box{
+				margin-right: 27upx;
+				display: flex;
+				align-items: center;
+				.head{
+					width: 48upx;
+					height: 48upx;
+					border-radius: 50%;
+					overflow: hidden;
+					box-shadow: 0 0 0 1px #fff;
+					margin-right: -10upx;
+					image{
+						width: 100%;
+						height: 100%;
+					}
+				}
+			}
+			.num-box{
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				.text{
+					font-size: 24upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+				}
+			}
+		}
+		.right{
+			font-size: 24upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+			.text{
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #666666;
+			}
+		}
+	}
+	.effect{
+		box-sizing: border-box;
+		padding: 20upx 30upx;
+		background: #FFFFFF;
+		font-size: 28upx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #666666;
+		line-height: 1.8;
+		margin-top: 10upx;
+		display: flex; 
+		flex-direction: row;
+		align-items: center;
+		justify-content: space-between;
+		.label{
+			font-size: 28upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #111111;
+			line-height: 1.8;
+		}
+	}
+	.det-box{
+		margin-top: 10upx;
+		padding: 40upx 30upx 130upx 30upx;
+		background-color: #FFFFFF;
+		.title{
+			font-size: 30upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+			line-height: 1;
+			margin-bottom: 25upx;
+		}
+		
+	}
+	
+	.btn-foot{
+		box-sizing: border-box;
+		width: 100%;
+		height: 121upx;
+		background: #FFFFFF;
+		padding: 0 32upx 0 28upx;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		z-index: 99;
+		.menu-box{
+			display: flex;
+			align-items: center;
+			.item{
+				display: flex;
+				align-items: center;
+				flex-direction: column;
+				margin-right: 48upx;
+				&:last-child{
+					margin-right: 0;
+				}
+				image{
+					width: 36upx;
+					height: 36upx;
+					margin-bottom: 10upx;
+				}
+				.label{
+					font-size: 20upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					text-align: center;
+				}
+			}
+			/deep/.uni-badge--x{
+				display: flex;
+				align-items: center;
+				justify-content: center;
+			}
+			/deep/.uni-badge{
+				border: none;
+				background-color: #FF3636;
+				font-family: Roboto;
+			}
+		}
+		.btn-box{
+			display: flex;
+			align-items: center;
+			.btn{
+				position: relative;
+				width: 200upx;
+				height: 88upx;
+				line-height: 88upx;
+				text-align: center;
+				border-radius: 44upx;
+				margin-left: 20upx;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				&:first-child{
+					margin-left: 0;
+				}
+				&.cart{
+					background: #FF6633;
+					.share{
+						display: inline-block;
+						position: absolute;
+						top: 0;
+						left: 0;
+						width: 100%;
+						height: 100%;
+						opacity: 0;
+					}
+				}
+				&.buy{
+					background: #2BC7B9;
+				}
+			}
+		}
+	}
+	.product-spec{
+		.pro-info{
+			display: flex;
+			align-items: center;
+			.img-box{
+				width: 200upx;
+				height: 200upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				overflow: hidden;
+				margin-right: 30upx;
+				image{
+					width: 100%;
+					height: 100%;
+				}
+			}
+			.info-text{
+				height: 200upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				.price{
+					display: flex;
+					align-items: flex-end;
+					.unit{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1.2;
+						margin-right: 10upx;
+					}
+					.num{
+						font-size: 50upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+				.desc-box{
+					display: flex;
+					flex-direction: column;
+					padding-bottom: 9upx;
+					.text{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						margin-top: 27upx;
+						line-height: 1;
+						&:first-child{
+							margin-top: 0;
+						}
+					}
+				}
+			}
+		}
+		.spec-box{
+			padding-top: 50upx;
+			.title{
+				font-size: 34upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #111111;
+				line-height: 1;
+			}
+			.spec-list{
+				display: flex;
+				flex-wrap: wrap;
+				margin-top: 30upx;
+				.item{
+					box-sizing: border-box;
+					height: 64upx;
+					padding: 0 30upx;
+					line-height: 64upx;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					background: #F7F7F7;
+					border: 1px solid #F7F7F7;
+					border-radius: 32upx;
+					margin-right: 20upx;
+					margin-bottom: 30upx;
+					&.active{
+						background: #F1FFFE;
+						border: 1px solid #8AD5CE;
+						color: #2BC7B9;
+					}
+				}
+			}
+		}
+		.price-num{
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			margin-top: 14upx;
+			.label{
+				font-size: 34upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #111111;
+			}
+			.num-box{
+				display: flex;
+				align-items: center;
+				.img-box{
+					width: 60upx;
+					height: 60upx;
+					// border-radius: 4upx;
+					border: 1px solid #dddddd;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					image{
+						width: 25rpx;
+						height: 25rpx;
+					}
+				}
+				input{
+					width: 60upx;
+					height: 60upx;
+					line-height: 60upx;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					// border-radius: 4upx;
+					border-top: 1px solid #dddddd;
+					border-bottom: 1px solid #dddddd;
+					text-align: center;
+					// margin: 0 16upx;
+				}
+			}
+		}
+		.sub-btn{
+			width: 100%;
+			height: 88upx;
+			line-height: 88upx;
+			text-align: center;
+			font-size: 30upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #FFFFFF;
+			background: #2BC7B9;
+			border-radius: 44upx;
+			margin-top: 30upx;
+			// margin-bottom: 30upx;
+			
+		}
+	}
+	.contact-btn{
+		display: inline-block;
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		opacity: 0;
+		z-index: 9999;
+	}
+	.loadding{
+		background-color: #fff;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		z-index: 9999;
+		image{
+			border-radius: 50%;
+			animation: load linear 1s infinite;
+			width: 120rpx;
+			height:120rpx;
+		}
+		.text{
+			font-size: 28rpx;
+			margin-top: 20rpx;
+		}
+	}
+</style>

+ 434 - 0
pages/shopping/productList.vue

@@ -0,0 +1,434 @@
+<template>
+	<view>
+		<view class="top-fixed">
+			<view class="search-cont">
+				<view class="inner">
+					<image class="icon-search" src="../../static/images/search.png" mode=""></image>
+					<input type="text" @confirm="goSearch" :value="searchValue" placeholder="输入药品名称" placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
+				</view>
+				<view class="icon-search">
+					<image @click="showChange(2)" v-if="showType==1"  src="../../static/images/search1.png" mode=""></image>
+					<image @click="showChange(1)" v-if="showType==2"  src="../../static/images/search2.png" mode=""></image>
+				</view>
+			</view>
+			<!-- tab切换 -->
+			<view class="pub-tab-box">
+				<view class="tab-inner">
+					<view 
+						 
+						v-for="(item,index) in cates" 
+						:key="index"
+						:class="cateId == item.cateId?'item active':'item'"
+						@click="cateChange(item)"
+					>
+						<view class="text">
+							{{ item.cateName }}
+							<image v-show="cateId == item.cateId" class="tab-bg" src="../../static/images/tab_bg.png" mode=""></image>
+						</view>
+					</view>
+					
+				</view>
+			</view>
+		</view>
+		<!-- 数据列表 --> 
+		<mescroll-body  top="190upx" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+			<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>
+					<view class="info-box">
+						<view class="title ellipsis2">{{item.productName}}</view>
+						<view class="intro ellipsis">{{item.productInfo}}</view>
+						<view class="prce-num">
+							<view class="price">
+								<text class="unit">¥</text>
+								<text class="num">{{item.price.toFixed(2)}} </text>
+							</view>
+							<view class="cart-img" @click="navgetTo('../shopping/cart')">
+								<view class="sale">已售 {{item.sales}} {{item.unitName}}</view>
+							</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="aspectFit"></image>
+					</view>
+					<view class="info-box">
+						<view class="title ellipsis2">{{item.productName}}</view>
+						<view class="price-box">
+							<view class="now">
+								<text class="unit">¥</text>
+								<text class="num">{{item.price.toFixed(2)}}</text>
+							</view>
+							<view class="old">¥{{item.otPrice.toFixed(2)}}</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</mescroll-body>
+	</view>
+</template>
+
+<script>
+	import {getProductCateByPid,getProducts} from '@/api/product'
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	export default {
+		mixins: [MescrollMixin], 
+		data() {
+			return {
+				searchValue:"",
+				showType:2,
+				cates:[],
+				cateId:null,
+				defaultOrder:'desc',
+				pid:null,
+				//上拉加载的配置
+				upOption: {
+					onScroll:true,
+					use: true, // 是否启用上拉加载; 默认true
+					page: {
+						num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
+						size: 10 // 每页数据的数量,默认10
+					},
+					noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
+					empty: {
+						icon:'/static/images/no_data.png',
+						tip: '暂无数据',
+						
+					},
+					textNoMore:"已经到底了",
+				},
+				// 列表数据
+				dataList: []
+			};
+		},
+		onLoad(options) {
+			this.cateId = options.cateId;
+			this.pid=options.pid;
+			console.log(this.cateId)
+			//获取分类列表
+			this.getProductCateByPid();
+		 
+		},
+		methods: {
+			goSearch(e) {
+				this.searchValue=e.detail.value;
+				this.mescroll.resetUpScroll();
+			},
+			showChange(type){
+				this.showType=type;
+			},
+			getProductCateByPid(){
+				let data = {pid:this.pid};
+				getProductCateByPid(data).then(
+					res => {
+						if(res.code==200){
+							this.cates=res.data;
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			// tab切换
+			cateChange(item) {
+				this.cateId = item.cateId;
+				this.mescroll.resetUpScroll()
+			},
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
+			},
+			upCallback(page) {
+				//联网加载数据
+				var that = this;
+				var data = {
+					productName:this.searchValue,
+					cateId:this.cateId,
+					defaultOrder:this.defaultOrder,
+					page: page.num,
+					pageSize: page.size
+				};
+				getProducts(data).then(res => {
+					if(res.code==200){
+						//设置列表数据
+						if (page.num == 1) {
+							that.dataList = res.data.list; 
+							
+						} else {
+							that.dataList = that.dataList.concat(res.data.list);
+							 
+						}
+						that.mescroll.endBySize(res.data.list.length, res.data.total);
+						
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: "请求失败",
+						});
+						that.dataList = null;
+						mescroll.endErr();
+					}
+				});
+			},
+			// 查看药品详情
+			showDetail(item) {
+				uni.navigateTo({
+					url: './productDetails?productId='+item.productId
+				})
+			}
+			
+		}
+	}
+</script>
+
+<style lang="scss">
+	.top-fixed{
+		width: 100%;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 10;
+	}
+	.pub-tab-box{
+		box-sizing: border-box;
+		width: 100%;
+		padding: 0 33upx;
+		background-color: #FFFFFF;
+		.tab-inner{
+			height: 88upx;
+			line-height: 88upx;
+			display: flex;
+			overflow-x: auto;
+			justify-content: flex-start;
+			align-items: center;
+			
+		}
+		.item{
+			font-size: 28upx;
+			white-space: nowrap;
+			line-height: 1;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #666666;
+			margin-right: 60upx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			&:last-child{
+				margin-right: 0;
+			}
+			&.active{
+				font-weight: bold;
+				color: #333333;
+			}
+			.text{
+				position: relative;
+				z-index: 1;
+			}
+			.tab-bg{
+				width: 72upx;
+				height: 28upx;
+				position: absolute;
+				top: 17upx;
+				left: 50%;
+				transform: translateX(-36upx);
+				z-index: -1;
+			}
+		}
+		
+	}
+	 
+	.medic-list{
+		padding: 20upx;
+		.item{
+			box-sizing: border-box;
+			min-height: 285upx;
+			background: #FFFFFF;
+			border: 4upx solid #FFFFFF;
+			border-radius: 16upx;
+			margin-bottom: 20upx;
+			padding: 40upx 30upx;
+			display: flex;
+			.img-box{
+				width: 200upx;
+				height: 200upx;
+				margin-right: 30upx;
+				image{
+					width: 100%;
+					height: 100%;
+				}
+			}
+			.info-box{
+				width: calc(100% - 210upx);
+				.title{
+					font-size: 32upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					line-height: 40rpx;
+					height: 80rpx;
+				}
+				.intro{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1;
+					margin-top: 26upx;
+				}
+			 
+				.prce-num{
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					margin-top: 30upx;
+					.price{
+						display: flex;
+						align-items: flex-end;
+						.unit{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #FF6633;
+							line-height: 1.2;
+							margin-right: 4upx;
+						}
+						.num{
+							font-size: 36upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FF6633;
+							line-height: 1;
+						}
+					}
+					.cart-img{
+						.sale{
+							font-size: 20upx;
+							font-family: PingFang SC;
+							color: #999999;
+						}
+						 
+					}
+				}
+			}
+		}
+	}
+	
+	.goods-list{
+		padding: 20upx;
+		display: flex;
+		flex-wrap: wrap;
+		.item{
+			margin-right: 20rpx;
+			margin-bottom: 20rpx;
+			width: 345rpx;
+			background: #FFFFFF;
+			box-shadow: 0px 0px 10rpx 4rpx rgba(199, 199, 199, 0.22);
+			border-radius: 20rpx;
+			overflow: hidden;
+			&:nth-child(2n) {
+				margin-right: 0;
+			}
+			.img-box{
+				width: 100%;
+				height: 334upx;
+				image{
+					width: 100%;
+					height: 100%;
+				}
+			}
+			.info-box{
+				box-sizing: border-box;
+				height: 182upx;
+				padding: 20upx 20upx 30upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				.title{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					line-height: 40upx;
+				}
+				.price-box{
+					display: flex;
+					align-items: flex-end;
+					.now{
+						display: flex;
+						align-items: flex-end;
+						margin-right: 20upx;
+						.unit{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #FF6633;
+							line-height: 1.2;
+							margin-right: 4upx;
+						}
+						.num{
+							font-size: 36upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FF6633;
+							line-height: 1;
+						}
+					}
+					.old{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						text-decoration: line-through;
+						color: #BBBBBB;
+						line-height: 1.1;
+					}
+				}
+			}
+		}
+	}
+	.search-cont{
+		padding: 16upx 30upx;
+		background-color: #FFFFFF;
+		display:flex;
+		align-items: center;
+		justify-content: space-between;
+		.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;
+			}
+		}
+		.icon-search{
+			margin-left: 10upx;
+			width: 40upx;
+			height: 40upx;
+			image{
+				width: 40upx;
+				height: 40upx;
+			}
+			
+		}
+	}
+</style>

+ 191 - 0
pages/shopping/success.vue

@@ -0,0 +1,191 @@
+<template>
+	<view class="content">
+		<view class="inner">
+			<view class="top">
+				<text class="title">支付成功</text>
+				 <image class="icon" src="../../static/images/success.png" ></image>
+				 <view   class="btn-box">
+				 	<view class="btn cancel" @click="goOrderDetails(order.id)"> 查看订单</view>
+				 </view>
+			</view>
+			<!-- 订单详情查看 -->
+			<view class="order-info">
+				<view class="title">订单信息</view>
+				<view class="item">
+					<text class="label">订单编号</text>
+					<view class="sn-box">
+						<text class="text">{{order.orderCode}}</text>
+						<view class="copy-btn" @click="copyOrderSn(order.orderCode)">复制</view>
+					</view>
+				</view>
+				<view class="item">
+					<text class="label">下单时间</text>
+					<text class="text">{{order.createTime}}</text>
+				</view>
+				 
+			</view>
+			
+		</view>
+		 
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				order:null,
+			}
+		},
+		onLoad(option) {
+			this.order=JSON.parse(option.order) 
+			uni.$emit('refreshOrder');
+		},
+		methods: {
+			copyOrderSn(text) {
+				// 复制方法
+				uni.setClipboardData({
+					data:text,
+					success:()=>{
+						uni.showToast({
+							title:'内容已成功复制到剪切板',
+							icon:'none'
+						})
+					}
+				});
+			},
+			goOrderDetails(id){
+				uni.redirectTo({
+					url: "/pages_user/user/storeOrderDetail?id="+id
+				}) 
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		height: 100%;
+	}
+	.content{
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;
+		.inner{
+			padding: 20upx;
+			.top{
+				box-sizing: border-box;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				padding: 50upx 0upx;
+				.title{
+					font-size: 40upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #222222;
+					line-height: 1;
+					text-align: center;
+				}
+				.icon{
+					margin: 60upx 0upx;
+					width: 100upx;
+					height: 100upx;
+				}
+				 
+			}
+			 
+			.order-info{
+				margin-top: 20upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				padding: 40upx 30upx;
+				.title{
+					font-size: 30upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #222222;
+					line-height: 1;
+				}
+				.item{
+					margin-top: 40upx;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					.label{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+						line-height: 1;
+					}
+					.text{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #222222;
+						line-height: 32upx;
+					}
+					.cont-text{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+						.bold{
+							color: #111111;
+						}
+					}
+					.sn-box{
+						display: flex;
+						align-items: center;
+						.copy-btn{
+							width: 58upx;
+							height: 32upx;
+							line-height: 32upx;
+							text-align: center;
+							font-size: 22upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #222222;
+							background: #F5F5F5;
+							border-radius: 4upx;
+							margin-left: 24upx;
+						}
+					}
+					 
+				}
+				.line{
+					width: 100%;
+					height: 1px;
+					background: #F0F0F0;
+					margin-top: 30upx;
+				}
+			}
+		}
+		.btn-box{
+			margin-top: 20upx;
+			box-sizing: border-box;
+			display: flex;
+			align-items: center;
+			.btn{
+				width: 155upx;
+				height: 64upx;
+				line-height: 64upx;
+				font-size: 26upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				text-align: center;
+				border-radius: 32upx;
+				&.cancel{
+					border: 1px solid #DDDDDD;
+					color: #666666;
+				}
+				 
+			}
+		}
+	}
+	
+</style>

+ 555 - 0
pages/user/index.vue

@@ -0,0 +1,555 @@
+<template>
+	<view>
+		<view class="top-cont">
+			<view class="top-inner">			
+				<!-- 这里是状态栏 -->
+				<view class="status_bar" :style="{height: statusBarHeight}"></view>
+				<view class="user-info">
+					<view class="left" @click="openPersonInfo()">
+						<view class="head-img">
+							<image :src="user.avatar==null?'/static/images/detault_head.jpg':user.avatar" mode="aspectFill"></image>
+						</view>
+						<view class="name-phone">
+							<view class="name">{{user.nickname}}</view>
+							<view class="phone" v-if="user.phone!=''">{{utils.parsePhone(user.phone)}}</view>
+						</view>
+					</view>
+					<view class="right">
+						
+						<uni-badge size="small" :text="msgNum" absolute="rightTop" type="error">
+							<view class="set" @click="navgetTo('/pages_user/user/personInfo')">
+								<image src="../../static/images/icon-set.png" mode=""></image>
+							</view>
+						</uni-badge>
+						<uni-badge size="small" :text="msgNum" absolute="rightTop" type="error">
+							<view class="msg-box" @click="navgetTo('/pages_user/user/message')">
+								<image src="../../static/images/icon-msg.png" mode=""></image>
+							</view>
+							
+						</uni-badge>
+					</view>
+					
+					
+				</view>
+				<!-- 我的订单 -->
+				<view class="my-order">
+					<view class="inner">
+						<view class="title-box">
+							<text class="title">我的订单</text>
+							<view class="all-order" @click="showOrder('')">
+								<text class="text">全部订单</text>
+								<image src="../../static/images/arrow4.png" mode=""></image>
+							</view>
+						</view>
+						<view class="status-box">
+							<uni-badge size="small" :text=count0 absolute="rightTop" type="error">
+								<view class="item" @click="showOrder('0')">
+									<image src="../../static/images/payment.png" mode=""></image>
+									<text class="text">待付款</text>
+								</view>
+							</uni-badge>
+							<uni-badge size="small" :text=count1 absolute="rightTop" type="error">
+							<view class="item" @click="showOrder('1')">
+								<image src="../../static/images/send_goods.png" mode=""></image>
+								<text class="text">待发货</text>
+							</view>
+							</uni-badge>
+							<uni-badge size="small" :text=count2 absolute="rightTop" type="error">
+							<view class="item" @click="showOrder('2')">
+								<image src="../../static/images/sou_goods.png" mode=""></image>
+								<text class="text">待收货</text>
+							</view>
+							</uni-badge>
+							<view class="item" @click="showOrder('3')">
+								<image src="../../static/images/completed.png" mode=""></image>
+								<text class="text">已完成</text>
+							</view>
+							<uni-badge size="small" :text=afterSalesCount absolute="rightTop" type="error">
+							<view class="item" @click="navgetTo('/pages_user/user/refundOrderList')">
+								<image src="../../static/images/after_sales.png" mode=""></image>
+								<text class="text">售后/退款</text>
+							</view>
+							</uni-badge>
+						</view>
+					</view>
+				</view>
+				<view class="content">
+					<!-- 常用工具 -->
+					<view class="used-tools">
+						<view class="title">常用工具</view>
+						<view class="tools-list">
+							<!-- <view 
+								v-for="(item,index) in toolsArr" 
+								:key="index" 
+								@click="navgetTo(item.url)" 
+								:class="(toolsArr.length - index) > toolsRemain?'item':'item no-marin-bottom'">
+								<image :src="item.img" mode=""></image>
+								<text class="text">{{ item.name }}</text>
+								<button v-if="item.url == ''" class="contact-btn" open-type="contact"></button>
+							</view> -->
+							<!-- <view class="item" @click="navgetTo('/pages_user/user/doctorOrder')">
+								<image src="../../static/images/my_ask.png" mode=""></image>
+								<text class="text">我的问诊</text>
+							</view> -->
+							<view class="item" @click="navgetTo('/pages_user/user/prescribeOrder')">
+								<image src="../../static/images/prescription.png" mode=""></image>
+								<text class="text">我的处方</text>
+							</view>
+							<view class="item" @click="navgetTo('/pages_user/user/patient')">
+								<image src="../../static/images/management.png" mode=""></image>
+								<text class="text">就诊人管理</text>
+							</view>
+							<view class="item" @click="navgetTo('/pages_user/user/address')">
+								<image src="../../static/images/address.png" mode=""></image>
+								<text class="text">收货地址</text>
+							</view>
+							<view class="item no-marin-bottom" @click="navgetTo('/pages_user/user/integral')">
+								<image src="../../static/images/integral.png" mode=""></image>
+								<text class="text">积分管理</text>
+							</view>
+							<view class="item no-marin-bottom"  @click="navgetTo('/pages_shopping/shopping/myCoupon')">
+								<image src="../../static/images/mycoupon.png" mode=""></image>
+								<text class="text">优惠券</text>
+							</view>
+							<view class="item no-marin-bottom" @click="navgetTo('/pages_user/user/storeProductRelation')">
+								<image src="../../static/images/service_file.png" mode=""></image>
+								<text class="text">我的足迹</text>
+							</view>
+							<view class="item no-marin-bottom" @click="openH5('/h5/userAgreement')">
+								<image src="../../static/images/service_file.png" mode=""></image>
+								<text class="text">用户协议</text>
+							</view>
+							<view class="item no-marin-bottom align-top"  @click="openH5('/h5/privacyPolicy')">
+								<image src="../../static/images/advice.png" mode=""></image>
+								<text class="text">隐私保护</text>
+							</view>
+							<view class="item no-marin-bottom">
+								<image src="../../static/images/customer1.png" mode=""></image>
+								<text class="text">专属客服</text>
+								<button class="contact-btn" open-type="contact"></button>
+							</view>
+							<view v-if="user.isPromoter==0" class="item no-marin-bottom"  @click="navgetTo('/pages_user/user/userTuiAdd')">
+								<image src="../../static/images/my_promotion.png" mode=""></image>
+								<text class="text">申请健康大使</text>
+							</view>
+							<view v-if="user.isPromoter==1" class="item no-marin-bottom"  @click="navgetTo('/pages_user/user/userTui')">
+								<image src="../../static/images/my_promotion.png" mode=""></image>
+								<text class="text">我的推广</text>
+							</view>
+							<view class="item no-marin-bottom"  @click="navgetTo('/pages/home/cert')">
+								<image src="../../static/images/service_file.png" mode=""></image>
+								<text class="text">资质证书</text>
+							</view>
+	
+							<view class="item no-marin-bottom" @click="toManager()">
+								<image src="../../static/images/sale_file.png" mode=""></image>
+								<text class="text">销售管理</text>
+							</view>
+							 
+						</view>
+					</view>
+					<!-- 退出登录按钮 -->
+					<!-- <view class="log-out">退出登录</view> -->
+				</view>
+				<view class="banner">
+					<image src="https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20221125/71ddd95044bb46d5b27e19a5f61cf5ab.png"></image>
+					<view class="tel_btn" @click="callService()"></view>
+				</view>
+				<view class="like-product">
+					<likeProduct  ref="product" />
+				</view>
+			</view>
+			
+		</view>
+		
+	</view>
+</template>
+
+<script>
+	import {getOrderCount} from '@/api/storeOrder'
+	import {getUserInfo} from '@/api/user'
+	import likeProduct from '@/components/likeProduct.vue'
+	export default {
+		components: {
+			likeProduct
+		},
+		data() {
+			return {
+				count0:0,
+				count1:0,
+				count2:0,
+				afterSalesCount:0,
+				user:{
+					isPromoter:0,
+					isWeixinAuth:0,
+					phone:"",
+					nickname:"请登录",
+					avatarUrl:"/static/images/detault_head.png"
+				},
+				// 状态栏的高度
+				statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
+				// 消息数量
+				msgNum: 0,
+			 
+				 
+			};
+		},
+		onLoad() {
+			console.log("onload")
+		},
+		onShow() {
+			console.log("onshow")
+			var that=this;
+			this.utils.isLogin().then(res => {
+				that.getUserInfo();
+				that.getOrderCount();
+			})
+			
+		},
+		onReachBottom() {
+			console.log("onReachBottom")
+			this.$refs.product.getGoodsProducts();
+		},
+		methods: {
+			openPersonInfo(){
+				this.utils.isLogin().then(res => {
+					uni.navigateTo({
+						url:"/pages_user/user/personInfo"
+					})
+				})
+				 
+			},
+			callService(){
+				 uni.makePhoneCall({
+					phoneNumber:"4000717770",
+					success:function(){
+						console.log('拨打电话成功');
+					},
+					fail() {
+						console.log('打电话失败了');
+					}
+				})
+			},
+			 
+			getOrderCount(){
+				getOrderCount().then(
+					res => {
+						if(res.code==200){
+							this.count0=res.count0;
+							this.count1=res.count1; 
+							this.count2=res.count2; 
+							this.afterSalesCount=res.afterSalesCount; 
+						} 
+					},
+					rej => {}
+				);
+			},
+			toManager(){
+				if(this.utils.checkCompanyUserLoginState()){
+					uni.navigateTo({
+						url: '/pages_company/index'
+					})
+				}
+				else{
+					uni.navigateTo({
+						url: '/pages_company/auth/login'
+					})
+				}
+				
+			},
+			openH5(url){
+				var requestPath = uni.getStorageSync('requestPath');
+				uni.setStorageSync('url',requestPath+url);
+				uni.navigateTo({
+					url: '../home/h5'
+				})
+			},
+			getUserInfo(){
+				getUserInfo().then(
+					res => {
+						if(res.code==200){
+							if(res.user!=null){
+								this.user=res.user;
+							}
+							else{
+								this.utils.loginOut();
+							}
+							
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			// 跳转页面
+			navgetTo(url) {
+				this.utils.isLogin().then(res => {
+					if(res){
+						uni.navigateTo({
+							url: url
+						})
+					}
+				})
+			},
+			// 查看订单
+			showOrder(status) {
+				uni.navigateTo({
+					url: '/pages_user/user/storeOrder?status=' + status
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.top-cont{
+		width: 100%;
+		height: 494upx;
+		position: relative;
+		background-image: url(../../static/images/personl_top_bg.png);
+		background-repeat: repeat-x;
+		background-size: 40upx 100%;
+		.top-inner{
+			width: 100%;
+			height: 100%;
+			position: absolute;
+			top: 0;
+			left: 0;
+			z-index: 2;
+			.user-info{
+				padding: 88upx 30upx 0 30upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				.left{
+					position: relative;
+					display: flex;
+					.head-img{
+						width: 120upx;
+						height: 120upx;
+						border-radius: 50%;
+						overflow: hidden;
+						margin-right: 30upx;
+						border: 4upx solid #FFFFFF;
+						box-shadow: 0px 5px 15px 2px rgba(0,0,0,0.1);
+						image{
+							width: 100%;
+							height: 100%;
+						}
+					}
+					.name-phone{
+						padding-top: 15upx;
+						.name{
+							font-size: 40upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #111111;
+							line-height: 1;
+						}
+						.phone{
+							font-size: 28upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #666666;
+							line-height: 1;
+							margin-top: 30upx;
+						}
+					}
+				}
+				.right{
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					.msg-box{
+						margin-left: 10upx;
+						width: 44upx;
+						height: 44upx;
+						image{
+							width: 100%;
+							height: 100%;
+						}
+					}
+					.set{
+						
+						width: 44upx;
+						height: 44upx;
+						image{
+							width: 100%;
+							height: 100%;
+						}
+					}
+				}
+				
+			}
+			.my-order{
+				padding: 50upx 20upx 0;
+				.inner{
+					box-sizing: border-box;
+					height: 245upx;
+					background: #FFFFFF;
+					border-radius: 16upx;
+					padding: 40upx 30upx;
+					display: flex;
+					flex-direction: column;
+					justify-content: space-between;
+					.title-box{
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						.title{
+							font-size: 34upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #222222;
+							line-height: 1;
+						}
+						.all-order{
+							display: flex;
+							align-items: center;
+							.text{
+								font-size: 26upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #999999;
+								line-height: 1;
+								margin-right: 8upx;
+							}
+							image{
+								width: 14upx;
+								height: 24upx;
+							}
+						}
+					}
+					.status-box{
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						padding: 0 10upx;
+						.item{
+							display: flex;
+							flex-direction: column;
+							align-items: center;
+							justify-content: center;
+							image{
+								width: 40upx;
+								height: 40upx;
+								margin-bottom: 18upx;
+							}
+							.text{
+								font-size: 26upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1;
+							}
+						}
+					}
+				}
+			}
+			
+		}
+	}
+	.content{
+		margin-top: 20upx;
+		padding: 0 20upx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		.used-tools{
+			box-sizing: border-box;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			padding: 40upx 30upx;
+			
+			.title{
+				font-size: 34upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #222222;
+				line-height: 1;
+			}
+			.tools-list{
+				margin-top: 50upx;
+				display: flex;
+				flex-wrap: wrap;
+				width: 100%;
+				.item{
+					box-sizing: border-box;
+					width: 25%;
+					display: flex;
+					flex-direction: column;
+					align-items: center;
+					justify-content: center;
+					margin-bottom: 50upx;
+					position: relative;
+					image{
+						width: 44upx;
+						height: 44upx;
+					}
+					.text{
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #111111;
+						line-height: 1;
+						margin-top: 20upx;
+					}
+					.contact-btn{
+						display: inline-block;
+						position: absolute;
+						top: 0;
+						left: 0;
+						width: 100%;
+						height: 100%;
+						opacity: 0;
+					}
+				}
+			}
+		}
+		.log-out{
+			height: 80upx;
+			line-height: 80upx;
+			text-align: center;
+			font-size: 26upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #666666;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			margin-top: 20upx;
+		}
+	}
+	.sub-btn{
+		position: absolute;
+		width: 100%;
+		height: 100%;
+		opacity: 0;
+	}
+	.like-product{
+		padding: 0 20rpx;
+		 
+	}
+	.banner{
+		padding: 20rpx 20rpx 0rpx 20rpx;
+		height: 200rpx;
+		position: relative;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		image{
+			width:100%;
+			height: 100%;
+		}
+		.tel_btn{
+			width: 100%;
+			height: 100%;
+			top:0upx;
+			position: absolute;
+			opacity:0.0;
+		}
+	}
+</style>

+ 9 - 0
pages/user/test.vue

@@ -0,0 +1,9 @@
+<template>
+	<web-view src="https://www.baidu.com/"></web-view>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 103 - 0
pages_company/alipayImg.vue

@@ -0,0 +1,103 @@
+<template>
+  <view class="content">
+    <view class="images">
+       <image class="slide-image" :src="url" mode="widthFix" show-menu-by-longpress />
+    </view>
+	<view class="btn-box">
+		<view class="btn" @click="shareQr()">分享</view>
+	</view>
+    
+  </view>
+</template>
+<script>
+ 
+import {getUserInfo,getQrImg} from '@/api/companyUser'
+export default {
+  name: 'Poster',
+  components: {
+  },
+  props: {},
+  data: function() {
+    return {
+       url:null,
+    }
+  },
+  mounted: function() {
+    this.getQrImg()
+  },
+  methods: {
+	getQrImg(){
+	  	var data={token:uni.getStorageSync('CompanyUserToken')}
+	  	getQrImg(data).then(
+	  		res => {
+	  			var path=uni.getStorageSync('requestPath')
+	  			this.url =path+ "/"+res.url
+	  		},
+	  		rej => {}
+	  	);
+	},
+	shareQr(){
+		wx.downloadFile({
+		    url: this.url,
+		    success: (res) => {
+		      wx.showShareImageMenu({
+		        path: res.tempFilePath
+		      })
+		    }
+		})
+	},
+     
+     
+  },
+}
+</script>
+
+<style lang="less">
+page {
+	height: 100%;
+}
+
+.content {
+	width: 100%;
+	height: 100%;
+  
+}
+
+.images {
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	height: 100%;
+}
+
+.images .slide-image {
+	width: 80%;
+	height: auto;
+}
+.btn-box{
+ 	height: 140upx;
+ 	z-index: 9999;
+ 	width: 100%;
+ 	padding: 0rpx 30upx;
+ 	position: fixed;
+ 	bottom: 0;
+ 	left: 0;
+ 	box-sizing: border-box;
+ 	background-color: #ffffff;
+ 	display: flex;
+ 	align-items: center;
+ 	justify-content: center;
+ 	.btn{
+ 		width: 100%;
+ 		height: 88upx;
+ 		line-height: 88upx;
+ 		text-align: center;
+ 		font-size: 34upx;
+ 		font-family: PingFang SC;
+ 		font-weight: 400;
+ 		color: #FFFFFF;
+ 		background:#2BC7B9 !important;
+ 		border-radius: 44upx;
+ 	}
+ }
+</style>

+ 145 - 0
pages_company/auth/login.vue

@@ -0,0 +1,145 @@
+<template>
+  <view class="content">
+  	<view class="inner">
+  		<view class="form-box">
+  			<view class="form-item">
+  				<text class="label">员工帐号</text>
+  				<input type="text" v-model="form.userName" placeholder="登录帐号" placeholder-class="form-input" />
+  			</view>
+  			<view class="form-item">
+  			 	<text class="label">员工密码</text>
+  			 	<input type="password" v-model="form.password"   placeholder="登录密码" placeholder-class="form-input" />
+  			</view>
+  		</view>
+  	</view>
+  	<view class="btn-box">
+  		<view class="sub-btn" @click="submit()">员工登录</view>
+  	</view>
+  </view>
+</template>
+
+<script>
+import {login} from '@/api/companyUser'
+export default {
+  data() {
+    return {
+		form:{
+			userName:null,
+			password:null,
+		}
+    }
+  },
+  computed: {
+  },
+  onLoad() {
+  },
+  onHide() {
+  },
+  onUnload() {
+  },
+  mounted() {
+    
+  },
+  methods: {
+	submit(){
+		
+	 	login(this.form).then(
+	 		res => {
+	 			if(res.code==200){
+	 				 uni.showToast({
+	 				 	icon:'success',
+	 				 	title: "登录成功",
+	 				 });
+					 uni.setStorageSync('CompanyUserToken',res.companyUserToken);
+					 //写入TOKEN
+					 uni.navigateBack({
+						delta:1,//返回层数,2则上上页
+					 })
+					 uni.navigateTo({
+					 	url: '/pages_company/index'
+					 }) 
+	 				
+	 			}else{
+	 				uni.showToast({
+	 					icon:'none',
+	 					title: res.msg,
+	 				});
+	 			}
+	 		},
+	 		rej => {}
+	 	);
+	 },
+  },
+  
+}
+</script>
+
+<style lang="scss">
+	page{
+		height: 100%;
+	}
+	.content{
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;
+		
+		.inner{
+			padding: 20upx;
+			.form-box{
+				padding: 0 30upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				.form-item{
+					padding: 30upx 0;
+					display: flex;
+					align-items: flex-start;
+					border-bottom: 1px solid #F1F1F1;
+					&:last-child{
+						border-bottom: none;
+					}
+					.label{
+						width: 150upx;
+						text-align: left;
+						font-size: 30upx;
+						line-height: 44upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #222222;
+						flex-shrink: 0;
+					}
+					input{
+						text-align: left;
+					}
+					.form-input{
+						font-size: 30upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						text-align: left;
+					}
+					 
+				}
+			}
+			 
+		}
+		.btn-box{
+			height: 120upx;
+			padding: 0 30upx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			.sub-btn{
+				width: 100%;
+				height: 88upx;
+				line-height: 88upx;
+				text-align: center;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				background: #2BC7B9;
+				border-radius: 44upx;
+			}
+		}
+	}
+</style>

+ 106 - 0
pages_company/card.vue

@@ -0,0 +1,106 @@
+<template>
+  <view class="content">
+    <view class="images">
+       <image class="slide-image" :src="url" mode="widthFix" show-menu-by-longpress />
+    </view>
+	<view class="btn-box">
+		<view class="btn" @click="shareQr()">分享</view>
+	</view>
+    
+  </view>
+</template>
+<script>
+ 
+import { getCompanyUserCard} from '@/api/companyUser'
+export default {
+  components: {
+  },
+  props: {},
+  data: function() {
+    return {
+       url:null,
+	   cardId:null,
+    }
+  },
+  onLoad(options) {
+		console.log(options)
+		if(options.id!=null){
+			this.cardId=options.id;
+		}
+		this.getCompanyUserCard()
+  },
+  methods: {
+	getCompanyUserCard(){
+	  	var data={cardId:this.cardId}
+	  	getCompanyUserCard(data).then(
+	  		res => {
+	  			this.url =res.data.imageUrl
+	  		},
+	  		rej => {}
+	  	);
+	},
+	shareQr(){
+		wx.downloadFile({
+		    url: this.url,
+		    success: (res) => {
+		      wx.showShareImageMenu({
+		        path: res.tempFilePath
+		      })
+		    }
+		})
+	},
+     
+     
+  },
+}
+</script>
+
+<style lang="less">
+page {
+	height: 100%;
+}
+
+.content {
+	width: 100%;
+	height: 100%;
+  
+}
+
+.images {
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	height: 100%;
+}
+
+.images .slide-image {
+	width: 80%;
+	height: auto;
+}
+.btn-box{
+ 	height: 140upx;
+ 	z-index: 9999;
+ 	width: 100%;
+ 	padding: 0rpx 30upx;
+ 	position: fixed;
+ 	bottom: 0;
+ 	left: 0;
+ 	box-sizing: border-box;
+ 	background-color: #ffffff;
+ 	display: flex;
+ 	align-items: center;
+ 	justify-content: center;
+ 	.btn{
+ 		width: 100%;
+ 		height: 88upx;
+ 		line-height: 88upx;
+ 		text-align: center;
+ 		font-size: 34upx;
+ 		font-family: PingFang SC;
+ 		font-weight: 400;
+ 		color: #FFFFFF;
+ 		background:#2BC7B9 !important;
+ 		border-radius: 44upx;
+ 	}
+ }
+</style>

+ 379 - 0
pages_company/coupon.vue

@@ -0,0 +1,379 @@
+<template>
+  <view ref="container">
+	<view class="top-fixed">
+		<view class="cate-list">
+			<!-- 关键字列表 -->
+			<scroll-view   scroll-x="true" >
+				<view class="inner">
+					<view v-for="(item,index) in cates" :key="index" :class="cateId == item.dictValue?'item active':'item'" @click="choseCate(item)">
+						{{ item.dictLabel }}
+					</view>
+				</view>
+			</scroll-view>
+		</view>
+	</view>
+	<!-- <image src="/static/images/banner_coupon.png" mode="widthFix" class="tui-coupon-banner"></image> -->
+    <view class="tui-coupon-list">
+      <view class="tui-coupon-item tui-top20" v-for="(item, index) in couponsList" :key="index">
+         <image src="/static/images/bg_coupon_3x.png" class="tui-coupon-bg" mode="widthFix"></image>
+		<view class="tui-coupon-item-left">
+          <view class="tui-coupon-price-box" :class="{ 'tui-color-grey': item.receiveCount>0 }">
+            <view class="tui-coupon-price-sign">¥</view>
+            <view class="tui-coupon-price" :class="{ 'tui-price-small': false }">{{ item.couponPrice }}</view>
+          </view>
+          <view class="tui-coupon-intro">满{{ item.useMinPrice }}元可用</view>
+        </view>
+        <view class="tui-coupon-item-right">
+          <view class="tui-coupon-content">
+            <view class="tui-coupon-title-box">
+              <view class="tui-coupon-title">{{ item.couponName }}</view>
+            </view>
+            <view class="tui-coupon-rule">
+              <view class="tui-rule-box tui-padding-btm">
+                <view class="tui-coupon-circle"></view>
+                <view class="tui-coupon-text">不可叠加使用</view>
+              </view>
+              <view class="tui-rule-box">
+                <view class="tui-coupon-circle"></view>
+                <view class="tui-coupon-text">{{ item.limitTime }} 到期</view>
+            
+              </view>
+            </view>
+          </view>
+        </view>
+        <view class="tui-btn-box">
+			<view class="btn receive"   @click="show(item)">查看</view>
+        </view>
+      </view>
+    </view>
+	<Loading :loaded="loadend" :loading="loading"></Loading>
+	<!--暂无优惠券-->
+	<view v-if="couponsList.length == 0 && page > 1" class="no-data-box" >
+		<image src="/static/images/no_data.png" mode="aspectFit"></image>
+		<view class="empty-title">暂无数据</view>
+	</view>
+  </view>
+</template>
+<script>
+import { getCompanyCouponIssueList, receive } from '@/api/coupon'
+import Loading from '@/components/Loading'
+export default {
+  name: 'getCoupon',
+  components: {
+    Loading,
+  },
+  props: {},
+  data: function() {
+    return {
+		cateId:0,
+		cates:[],
+		page: 1,
+		limit: 10,
+		couponsList: [],
+		loading: false,
+		loadend: false,
+    }
+  },
+  onLoad(options) {
+		var cate={dictLabel:"全部",dictValue:0};
+		this.cates.push(cate);
+		this.cates=this.cates.concat(this.utils.getDict("storeProductPackageCate"));
+  },
+  mounted: function() {
+    
+  },
+  
+  onShow() {
+  	this.getCompanyCouponIssueList()
+  },
+  onReachBottom() {
+    !this.loading && this.getCompanyCouponIssueList()
+  },
+  methods: {
+	choseCate(item){
+	  	this.cateId = item.dictValue;
+		this.couponsList=[];
+		this.loading=false;
+		this.loadend=false;
+		this.page=1;
+		this.getCompanyCouponIssueList();
+	  	 
+	},
+    show(item){
+		uni.navigateTo({
+			url: './couponDetails?id=' +item.id+"&type=1"
+		})
+	},
+    getCompanyCouponIssueList() {
+      if (this.loading) return //阻止下次请求(false可以进行请求);
+      if (this.loadend) return //阻止结束当前请求(false可以进行请求);
+      this.loading = true
+      let q = { couponType:1,page: this.page, pageSize: this.limit,cateId:this.cateId }
+      getCompanyCouponIssueList(q).then(res => {
+        this.loading = false
+        this.couponsList.push.apply(this.couponsList, res.data.list)
+        this.loadend = res.data.list.length < this.limit //判断所有数据是否加载完成;
+        this.page = this.page + 1
+      })
+    },
+  },
+}
+</script>
+
+<style lang="less" scoped>
+page {
+  background-color: #f5f5f5;
+}
+
+.container {
+  padding-bottom: env(safe-area-inset-bottom);
+}
+.top-fixed{
+	width: 100%;
+	position: fixed;
+	top: 0;
+	left: 0;
+	z-index: 99999;
+	.cate-list{
+		box-sizing: border-box;
+		background: #fff;
+		padding: 10upx 27upx;
+		height: 100upx;
+		.inner{
+			display: flex;
+		}
+		.item{
+			flex-shrink: 0;
+			padding: 0 24upx;
+			height: 64upx;
+			line-height: 64upx;
+			font-size: 28upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #2BC7B9;
+			background: #F5FFFE;
+			border: 1px solid #8AD5CE;
+			border-radius: 32upx;
+			margin: 0 20upx 20upx 0;
+			&.active{
+				color: #FFFFFF;
+				background: #2BC7B9;
+				border: 1px solid #2BC7B9;
+			}
+		}
+	}
+}
+.tui-coupon-list {
+	margin-top: 120upx;
+	width: 100%;
+	padding: 0 25rpx;
+	box-sizing: border-box;
+}
+
+.tui-coupon-banner {
+  width: 100%;
+}
+
+.tui-coupon-item {
+  width: 100%;
+  height: 210rpx;
+  position: relative;
+  display: flex;
+  align-items: center;
+  padding-right: 30rpx;
+  box-sizing: border-box;
+  overflow: hidden;
+ 
+}
+
+.tui-coupon-bg {
+  width: 100%;
+  height: 210rpx;
+  position: absolute;
+  left: 0;
+  top: 0;
+  z-index: 1;
+}
+
+.tui-coupon-sign {
+  height: 110rpx;
+  width: 110rpx;
+  position: absolute;
+  z-index: 9;
+  top: -30rpx;
+  right: 40rpx;
+}
+
+.tui-coupon-item-left {
+  width: 218rpx;
+  height: 210rpx;
+  position: relative;
+  z-index: 2;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-direction: column;
+  flex-shrink: 0;
+}
+
+.tui-coupon-price-box {
+  display: flex;
+  color: #e41f19;
+  align-items: flex-end;
+}
+
+.tui-coupon-price-sign {
+  font-size: 30rpx;
+}
+
+.tui-coupon-price {
+  font-size: 32rpx;
+  line-height: 68rpx;
+  font-weight: bold;
+}
+
+.tui-price-small {
+  font-size: 58rpx !important;
+  line-height: 56rpx !important;
+}
+
+.tui-coupon-intro {
+  background: #f7f7f7;
+  padding: 8rpx 10rpx;
+  font-size: 26rpx;
+  line-height: 26rpx;
+  font-weight: 400;
+  color: #666;
+  margin-top: 18rpx;
+}
+
+.tui-coupon-item-right {
+  flex: 1;
+  height: 210rpx;
+  position: relative;
+  z-index: 2;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding-left: 24rpx;
+  box-sizing: border-box;
+  overflow: hidden;
+}
+
+.tui-coupon-content {
+  width: 82%;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.tui-coupon-title-box {
+  display: flex;
+  align-items: center;
+}
+
+.tui-coupon-btn {
+  padding: 6rpx;
+  background: #ffebeb;
+  color: #e41f19;
+  font-size: 25rpx;
+  line-height: 25rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  transform: scale(0.9);
+  transform-origin: 0 center;
+  border-radius: 4rpx;
+  flex-shrink: 0;
+}
+
+.tui-color-grey {
+  color: #888 !important;
+}
+
+.tui-bg-grey {
+  background: #f0f0f0 !important;
+  color: #888 !important;
+}
+
+.tui-coupon-title {
+  width: 100%;
+  font-size: 26rpx;
+  color: #333;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+.tui-coupon-rule {
+  padding-top: 52rpx;
+}
+
+.tui-rule-box {
+  display: flex;
+  align-items: center;
+  transform: scale(0.8);
+  transform-origin: 0 100%;
+}
+
+.tui-padding-btm {
+  padding-bottom: 6rpx;
+}
+
+.tui-coupon-circle {
+  width: 8rpx;
+  height: 8rpx;
+  background: rgb(160, 160, 160);
+  border-radius: 50%;
+}
+
+.tui-coupon-text {
+  font-size: 28rpx;
+  line-height: 28rpx;
+  font-weight: 400;
+  color: #666;
+  padding-left: 8rpx;
+  white-space: nowrap;
+}
+
+.tui-top20 {
+  margin-top: 20rpx;
+}
+
+.tui-coupon-title {
+  font-size: 28rpx;
+  line-height: 28rpx;
+}
+
+.tui-coupon-radio {
+  transform: scale(0.7);
+  transform-origin: 100% center;
+}
+
+.tui-btn-box {
+  position: absolute;
+  right: 20rpx;
+  bottom: 40rpx;
+  z-index: 10;
+  .btn{
+  	width: 155upx;
+  	height: 64upx;
+  	line-height: 64upx;
+  	font-size: 26upx;
+  	font-family: PingFang SC;
+  	font-weight: 500;
+  	text-align: center;
+  	border-radius: 32upx;
+  	margin-left: 15upx;
+
+  	&.cancel{
+  		border: 1px solid red;
+  		color: red;
+  	}
+  	&.receive{
+  		background: red;
+  		color: #FFFFFF;
+  	}
+  }
+}
+</style>

+ 390 - 0
pages_company/couponDetails.vue

@@ -0,0 +1,390 @@
+<template>
+  <view class="container">
+    <view class="tui-coupon-list">
+      <view class="tui-coupon-item tui-top20"  >
+         <image src="/static/images/bg_coupon_3x.png" class="tui-coupon-bg" mode="widthFix"></image>
+		<view class="tui-coupon-item-left">
+          <view class="tui-coupon-price-box"  >
+            <view class="tui-coupon-price-sign">¥</view>
+            <view class="tui-coupon-price" :class="{ 'tui-price-small': false }">{{ item.couponPrice }}</view>
+          </view>
+          <view class="tui-coupon-intro">满{{ item.useMinPrice }}元可用</view>
+        </view>
+        <view class="tui-coupon-item-right">
+          <view class="tui-coupon-content">
+            <view class="tui-coupon-title-box">
+              <view class="tui-coupon-title">{{ item.couponName }}</view>
+            </view>
+            <view class="tui-coupon-rule">
+              <view class="tui-rule-box tui-padding-btm">
+                <view class="tui-coupon-circle"></view>
+                <view class="tui-coupon-text">不可叠加使用</view>
+              </view>
+              <view class="tui-rule-box">
+                <view class="tui-coupon-circle"></view>
+                <view class="tui-coupon-text">{{ item.limitTime }} 到期</view>
+            
+              </view>
+            </view>
+          </view>
+        </view>
+        <view class="tui-btn-box" v-if="type==2">
+			<view class="btn cancel" v-if="item.receiveCount>0"  >已领取</view>
+			<view class="btn cancel" v-else-if="item.receiveCount==item.totalCount" >已领完</view>
+			<view class="btn receive" v-else @click="receive(item.id,index)">立即领取</view>
+        </view>
+      </view>
+    </view>
+	<view class="banner" @click="showImg()">
+		<image class="img" src="https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20221116/99f6dedb47394b43adb61a1aa1b2e7e2.jpg"></image>
+	</view>
+	
+	<view class="ad">
+		<ad unit-id="adunit-4768dead82e0c4ff" ad-type="video" ad-theme="white"></ad>
+	</view>
+  </view>
+</template>
+<script>
+import { getCouponIssueById, companyReceive } from '@/api/coupon'
+export default {
+  name: 'getCoupon',
+ 
+  props: {},
+  data: function() {
+    return {
+		id:null,
+		item:null,
+		code:null,
+		type:0,
+      
+    }
+  },
+  onLoad(options) {
+	//获取券CODE
+	console.log(options.id)
+	console.log(options.code)
+	this.type=options.type;
+	this.id=JSON.parse(options.id);
+	if(!this.utils.isEmpty(options.code)){
+		this.code=options.code;
+	}
+  	uni.showShareMenu({
+  		withShareTicket:true,
+  		//小程序的原生菜单中显示分享按钮,才能够让发送给朋友与分享到朋友圈两个按钮可以点击
+  		menus:["shareAppMessage"] //不设置默认发送给朋友
+  	})
+	this.getCouponIssueById();
+  },
+  //发送给朋友
+  onShareAppMessage(res) {
+  	return {
+  		title: this.item.couponName,
+  		path: `/pages_company/couponDetails?id=${this.item.id}&type=2&code=${this.code}`
+  	}
+  },
+  mounted: function() {
+  },
+  onShow() {
+  },
+  methods: {
+	showImg() {
+		var url=['https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20221116/99f6dedb47394b43adb61a1aa1b2e7e2.jpg']
+	  	uni.previewImage({
+	  	 	urls: url,
+	  	 	current: url[0]
+	  	});
+	},
+	getCouponIssueById: function() {
+	  	let that = this
+	  	var data={id:this.id}
+	  	getCouponIssueById(data)
+	  	  .then(function(res) {
+				that.item=res.data;
+				console.log(that.code)
+				if(that.utils.isEmpty(that.code)){
+					that.code=res.code;
+				}
+				console.log(that.code)
+	  	  })
+	  	  .catch(function(err) {
+	  	    uni.showToast({
+	  	      title: err.msg ,
+	  	      icon: 'none',
+	  	      duration: 2000,
+	  	    })
+	  	  })
+	    
+	},
+    receive: function() {
+		if(this.utils.isLogin()){
+			let that = this
+			var data={
+				id:this.item.id,
+				code:this.code
+			}
+			companyReceive(data)
+			  .then(function(res) {
+				  if(res.code==200){
+					  uni.showToast({
+					    title: '领取成功',
+					    icon: 'success',
+					    duration: 2000,
+					  })
+				  }
+				  else{
+					  uni.showToast({
+					    title: res.msg,
+					    duration: 2000,
+					  })
+				  }
+			    
+					   
+			  })
+			  .catch(function(err) {
+			    uni.showToast({
+			      title: err.msg ,
+			      icon: 'none',
+			      duration: 2000,
+			    })
+			  })
+		}
+      
+    },
+  },
+}
+</script>
+
+<style lang="less" scoped>
+page {
+  background-color: #f5f5f5;
+}
+
+.container {
+	height: 100%;
+	display: flex;
+	flex-direction: column;
+}
+
+.tui-coupon-list {
+  width: 100%;
+  padding: 0 25rpx;
+  box-sizing: border-box;
+}
+
+.tui-coupon-banner {
+  width: 100%;
+}
+
+.tui-coupon-item {
+  width: 100%;
+  height: 210rpx;
+  position: relative;
+  display: flex;
+  align-items: center;
+  padding-right: 30rpx;
+  box-sizing: border-box;
+  overflow: hidden;
+ 
+}
+
+.tui-coupon-bg {
+  width: 100%;
+  height: 210rpx;
+  position: absolute;
+  left: 0;
+  top: 0;
+  z-index: 1;
+}
+
+.tui-coupon-sign {
+  height: 110rpx;
+  width: 110rpx;
+  position: absolute;
+  z-index: 9;
+  top: -30rpx;
+  right: 40rpx;
+}
+
+.tui-coupon-item-left {
+  width: 218rpx;
+  height: 210rpx;
+  position: relative;
+  z-index: 2;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-direction: column;
+  flex-shrink: 0;
+}
+
+.tui-coupon-price-box {
+  display: flex;
+  color: #e41f19;
+  align-items: flex-end;
+}
+
+.tui-coupon-price-sign {
+  font-size: 30rpx;
+}
+
+.tui-coupon-price {
+  font-size: 32rpx;
+  line-height: 68rpx;
+  font-weight: bold;
+}
+
+.tui-price-small {
+  font-size: 58rpx !important;
+  line-height: 56rpx !important;
+}
+
+.tui-coupon-intro {
+  background: #f7f7f7;
+  padding: 8rpx 10rpx;
+  font-size: 26rpx;
+  line-height: 26rpx;
+  font-weight: 400;
+  color: #666;
+  margin-top: 18rpx;
+}
+
+.tui-coupon-item-right {
+  flex: 1;
+  height: 210rpx;
+  position: relative;
+  z-index: 2;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding-left: 24rpx;
+  box-sizing: border-box;
+  overflow: hidden;
+}
+
+.tui-coupon-content {
+  width: 82%;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.tui-coupon-title-box {
+  display: flex;
+  align-items: center;
+}
+
+.tui-coupon-btn {
+  padding: 6rpx;
+  background: #ffebeb;
+  color: #e41f19;
+  font-size: 25rpx;
+  line-height: 25rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  transform: scale(0.9);
+  transform-origin: 0 center;
+  border-radius: 4rpx;
+  flex-shrink: 0;
+}
+
+.tui-color-grey {
+  color: #888 !important;
+}
+
+.tui-bg-grey {
+  background: #f0f0f0 !important;
+  color: #888 !important;
+}
+
+.tui-coupon-title {
+  width: 100%;
+  font-size: 26rpx;
+  color: #333;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+.tui-coupon-rule {
+  padding-top: 52rpx;
+}
+
+.tui-rule-box {
+  display: flex;
+  align-items: center;
+  transform: scale(0.8);
+  transform-origin: 0 100%;
+}
+
+.tui-padding-btm {
+  padding-bottom: 6rpx;
+}
+
+.tui-coupon-circle {
+  width: 8rpx;
+  height: 8rpx;
+  background: rgb(160, 160, 160);
+  border-radius: 50%;
+}
+
+.tui-coupon-text {
+  font-size: 28rpx;
+  line-height: 28rpx;
+  font-weight: 400;
+  color: #666;
+  padding-left: 8rpx;
+  white-space: nowrap;
+}
+
+.tui-top20 {
+  margin-top: 20rpx;
+}
+
+.tui-coupon-title {
+  font-size: 28rpx;
+  line-height: 28rpx;
+}
+
+.tui-coupon-radio {
+  transform: scale(0.7);
+  transform-origin: 100% center;
+}
+
+.tui-btn-box {
+  position: absolute;
+  right: 20rpx;
+  bottom: 40rpx;
+  z-index: 10;
+  .btn{
+  	width: 155upx;
+  	height: 64upx;
+  	line-height: 64upx;
+  	font-size: 26upx;
+  	font-family: PingFang SC;
+  	font-weight: 500;
+  	text-align: center;
+  	border-radius: 32upx;
+  	margin-left: 15upx;
+
+  	&.cancel{
+  		border: 1px solid red;
+  		color: red;
+  	}
+  	&.receive{
+  		background: red;
+  		color: #FFFFFF;
+  	}
+  }
+}
+.banner{
+	margin: 25rpx;
+	.img{
+		height: 700rpx;
+		width: 100%;
+	}
+}
+.ad{
+	margin: 0rpx 0rpx 60rpx;
+}
+</style>

+ 301 - 0
pages_company/index.vue

@@ -0,0 +1,301 @@
+<template>
+	<view class="top-cont">
+		<view class="content">
+			<view class="user-info">
+				<view class="left">
+					<view class="name-phone">
+						<view class="name">{{user.nickName}}</view>
+						<view class="phone" v-if="user!=null">{{utils.parsePhone(user.phonenumber)}}</view>
+					</view>
+				</view>
+				<view class="msg-box"  >
+					 {{user.deptName}}
+				</view>
+			</view>
+			<!-- 常用工具 -->
+			<view class="used-tools">
+				<view class="title">常用工具</view>
+				<view class="tools-list">
+					<view class="item" @click="toCreateOrder()">
+						<image src="../static/images/order.png" mode=""></image>
+						<text class="text">商品制单</text>
+					</view>
+					<view class="item" @click="toCreateCoupon()">
+						<image src="../static/images/icon_coupon.png" mode=""></image>
+						<text class="text">制单优惠券</text>
+					</view>
+					<view class="item" @click="toPay()">
+						<image src="../static/images/money.png" mode=""></image>
+						<text class="text">微信收款</text>
+					</view>
+					<!-- <view class="item" @click="alipay()">
+						<image src="../static/images/money.png" mode=""></image>
+						<text class="text">支付宝收款</text>
+					</view> -->
+					<view class="item" @click="toOrder()">
+						<image src="../static/images/order.png" mode=""></image>
+						<text class="text">我的订单</text>
+					</view>
+					<view class="item" @click="toPackage()">
+						<image src="../static/images/package.png" mode=""></image>
+						<text class="text">商品套餐</text>
+					</view>
+					<view class="item" @click="toCoupon()">
+						<image src="../static/images/icon_coupon.png" mode=""></image>
+						<text class="text">套餐优惠券</text>
+					</view>
+					
+				</view>
+			</view>
+			<!-- 退出登录按钮 -->
+			<view class="log-out" @click="logout">退出登录</view>
+		</view>
+		
+	</view>
+</template>
+
+<script>
+	import {getUserInfo,getQrImg} from '@/api/companyUser'
+	export default {
+		data() {
+			return {
+				 user:null,
+			};
+		},
+		onLoad() {
+			console.log("onload")
+		},
+		onShow() {
+			console.log("onshow")
+			this.getUserInfo()
+		},
+		methods: {
+			
+			alipay(){
+				// var url="http://alipay.yjf.runtzh.com/#/?companyId="+this.user.companyId+"&companyUserId="+this.user.userId
+				// uni.setClipboardData({
+				// 	data:url,
+				// 	success:()=>{
+				// 		uni.showToast({
+				// 			title:'收款地址已复制到剪切板',
+				// 			icon:'none'
+				// 		})
+						
+				// 	}
+				// });
+				
+				uni.navigateTo({
+					url:'/pages_company/alipayImg'
+				})
+			},
+			toCreateOrder(){
+				uni.navigateTo({
+					url:'/pages_company/order/productList'
+				})
+			},
+			toPay(){
+				uni.navigateTo({
+					url:'/pages_user/user/pay?companyId='+this.user.companyId+"&companyUserId="+this.user.userId
+				})
+			},
+			toOrder(){
+				uni.navigateTo({
+					url:'/pages_company/storeOrder?companyId='+this.user.companyId+"&companyUserId="+this.user.userId
+				})
+			},
+			toPackage(){
+				uni.navigateTo({
+					url:'/pages_company/storeProductPackage?companyId='+this.user.companyId+"&companyUserId="+this.user.userId
+				})
+			},
+			toCoupon(){
+				uni.navigateTo({
+					url:'/pages_company/coupon'
+				})
+			},
+			toCreateCoupon(){
+				uni.navigateTo({
+					url:'/pages_company/order/coupon'
+				})
+			},
+			toCreateOrderCoupon(){
+				uni.navigateTo({
+					url:'/pages_company/order/coupon'
+				})
+			},
+			getUserInfo(){
+				var data={token:uni.getStorageSync('CompanyUserToken')}
+				getUserInfo(data).then(
+					res => {
+						if(res.code==200){
+							  this.user=res.data;
+						}
+						else if(res.code==403){
+							uni.setStorageSync('CompanyUserToken',null);
+							uni.navigateBack({
+								delta:-1
+							})			
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			logout(){
+			 	uni.showModal({
+			 		title:"提示",
+			 		content:"确认退出登录吗?",
+			 		showCancel:true,
+			 		cancelText:'取消',
+			 		confirmText:'确定',
+			 		success:res=>{
+			 			if(res.confirm){
+			 				uni.setStorageSync('CompanyUserToken',null);
+			 				uni.navigateBack({
+			 					delta:-1
+			 				})							
+			 			}else{
+			 			}
+			 		}
+			 	})
+			 },
+			 
+			// 跳转页面
+			navgetTo(url) {
+				this.utils.isLogin().then(res => {
+					if(res){
+						uni.navigateTo({
+							url: url
+						})
+					}
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content{
+		margin: 20upx 0upx;
+		padding: 0 20upx;
+		.user-info{
+			padding: 30upx;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			.left{
+				position: relative;
+				display: flex;
+				.head-img{
+					width: 120upx;
+					height: 120upx;
+					border-radius: 50%;
+					overflow: hidden;
+					margin-right: 30upx;
+					border: 4upx solid #FFFFFF;
+					box-shadow: 0px 5px 15px 2px rgba(0,0,0,0.1);
+					image{
+						width: 100%;
+						height: 100%;
+					}
+				}
+				.name-phone{
+					padding-top: 15upx;
+					.name{
+						font-size: 36upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #111111;
+						line-height: 1;
+					}
+					.phone{
+						font-size: 28upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+						line-height: 1;
+						margin-top: 30upx;
+					}
+				}
+			}
+			.msg-box{
+				padding: 5rpx 15upx;
+				height: 30upx;
+				line-height: 30upx;
+				font-size: 22upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #FFFFFF;
+				border-radius: 8rpx;
+				background-color: #2BC7B9;
+			}
+		}
+		.used-tools{
+			box-sizing: border-box;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			padding: 40upx 30upx;
+			
+			.title{
+				font-size: 32upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #222222;
+				line-height: 1;
+			}
+			.tools-list{
+				margin-top: 50upx;
+				display: flex;
+				flex-wrap: wrap;
+				width: 100%;
+				.item{
+					box-sizing: border-box;
+					width: 25%;
+					display: flex;
+					flex-direction: column;
+					align-items: center;
+					justify-content: center;
+					margin-bottom: 50upx;
+					position: relative;
+					image{
+						width: 44upx;
+						height: 44upx;
+					}
+					.text{
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #111111;
+						line-height: 1;
+						margin-top: 20upx;
+					}
+					.contact-btn{
+						display: inline-block;
+						position: absolute;
+						top: 0;
+						left: 0;
+						width: 100%;
+						height: 100%;
+						opacity: 0;
+					}
+				}
+			}
+		}
+		.log-out{
+			height: 80upx;
+			line-height: 80upx;
+			text-align: center;
+			font-size: 26upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #666666;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			margin-top: 20upx;
+		}
+	}
+</style>

+ 453 - 0
pages_company/order/cart.vue

@@ -0,0 +1,453 @@
+<template>
+	<view class="content">
+		<!-- 商品列表 -->
+		<view class="goods-list">
+			<view class="item" v-for="(item,index) in carts" :key="index">
+				<label style="margin-right: 30upx;">
+					<checkbox :value="item.checked"  :checked="item.checked" @click="checkChange(item)" />
+				</label>
+				<image class="goods-img" :src="item.productAttrImage==null||item.productAttrImage==''?item.productImage:item.productAttrImage" mode="aspectFit"></image>
+				<view class="info-box">
+					<view>
+						<view class="title-box">
+							<view class="tag">{{utils.getDictLabelName("storeProductType",item.productType)}}</view>
+							<view class="title ellipsis">{{ item.productName }}</view>
+						</view>
+						<view class="intro ellipsis">{{item.productAttrName}}</view>
+					</view>
+					<view class="price-num">
+						<view class="price">
+							<text class="unit">¥</text>
+							<text class="text">{{item.price}}</text>
+						</view>
+						<view class="num-box">
+							<view class="img-box" @click="delNum(item)">
+								<image v-if="item.cartNum <= 1" src="../../static/images/jian.png" mode=""></image>
+								<image v-else src="../../static/images/jian2.png" mode=""></image>
+							</view>
+							<input type="text"  @change="changeNum($event,item)" :value="item.cartNum"   />
+							<view class="img-box" @click="addNum(item)">
+								<image src="../../static/images/add.png" mode=""></image>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 底部按钮 -->
+		<view class="btn-foot">
+			<view class="left">
+				<label>
+					<checkbox  :checked="checkAll" @click="handleCheckAll()" />
+				</label>
+				<text class="text">全选</text>
+				<text class="text" @click="delCart()">删除</text>
+			</view>
+			<view class="right">
+				<view class="total">
+					<text class="label">合计:</text>
+					<view class="price">
+						<text class="unit">¥</text>
+						<text class="num">{{totalMoney.toFixed(2)}}</text>
+					</view>
+				</view>
+				<view class="btn" @click="submit">制单</view>
+			</view>
+		</view>
+		
+	</view>
+</template>
+
+<script>
+	import {getCarts,cartNum,delCart} from '@/api/product'
+	import {createSalesOrder} from '@/api/companyOrder.js'
+	export default {
+		 
+		data() {
+			return {
+				totalMoney:0.00,
+				carts:[],
+				checkAll:false,
+			}	
+		},
+		onLoad() {
+			this.getCarts();
+ 
+		},
+		 
+		methods: {
+			changeNum(e,item) {
+				item.cartNum = e.detail.value.replace(/\D/g, '')
+				if (item.cartNum <= 1) {
+				  uni.showToast({
+				    title: "已经是底线啦!",
+				    icon: "none",
+				    duration: 2000
+				  });
+				  return;
+				}
+				if(item.cartNum < 1) {
+					item.cartNum = 1
+				}
+				if(item.cartNum>=item.stock){
+					item.cartNum=item.stock;
+				}
+				this.changeCartNum(item)
+			},
+			delCart(){
+				var selectCarts=this.carts.filter(ele => ele.checked==true).map(ele => {
+				  return ele.id
+				});
+				if(selectCarts.length==0){
+					uni.showToast({
+						icon:'none',
+						title: "请选择商品删除",
+					});
+					return;
+				}
+				let data = {ids:selectCarts};
+				delCart(data).then(
+					res => {
+						if(res.code==200){
+							uni.showToast({
+								icon:'success',
+								title: "操作成功",
+							});
+							this.getCarts()
+						}else{
+							
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+				console.log(selectCarts)
+			},
+			computedMoney(){
+				var money=0;
+				var that=this;
+				this.carts.forEach((item,index,arr)=>{
+					 if(item.checked){
+						 money+=item.price*item.cartNum;
+					 }
+				})
+				console.log(money);
+				this.totalMoney=money;
+			},
+			handleCheckAll(){
+				this.checkAll=!this.checkAll;
+				var that=this;
+				this.carts.forEach((item,index,arr)=>{
+				     item.checked=that.checkAll;
+				})
+				this.computedMoney();
+			},
+			checkChange(item){
+				item.checked=!item.checked;
+				this.computedMoney();
+			},
+			changeCartNum(item){
+				let data = {number:item.cartNum,id:item.id};
+				cartNum(data).then(
+					res => {
+						if(res.code==200){
+							uni.showToast({
+								icon:'none',
+								title: "操作成功",
+							});
+							this.computedMoney();
+							
+						}else{
+							
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			getCarts(){
+				getCarts().then(
+					res => {
+						if(res.code==200){
+							 this.carts=res.carts;
+							 this.carts.forEach((item,index,arr)=>{
+							      item.checked=false;
+							 })
+							 this.computedMoney();
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			// 购物车减法
+			delNum(item) {
+				if (item.cartNum <= 1) {
+				  uni.showToast({
+				    title: "已经是底线啦!",
+				    icon: "none",
+				    duration: 2000
+				  });
+				  return;
+				}
+				item.cartNum --
+				if(item.cartNum < 1) {
+					item.cartNum = 1
+				}
+				 
+				this.changeCartNum(item)
+			},
+			// 购物车加法
+			addNum(item) {
+				console.log(item)
+				item.cartNum++
+				if(item.cartNum>=item.stock){
+					item.cartNum=item.stock;
+				}
+				this.changeCartNum(item)
+			},
+			// 结算
+			submit() {
+				var selectCarts=this.carts.filter(ele => ele.checked==true).map(ele => {
+				  return ele.id
+				});
+				if(selectCarts.length==0){
+					uni.showToast({
+						icon:'none',
+						title: "请选择商品",
+					});
+					return;
+				}
+				var data={token:uni.getStorageSync('CompanyUserToken'),cateIds:selectCarts.toString()}
+				createSalesOrder(data).then(
+					res => {
+						if(res.code==200){
+							uni.navigateTo({
+								url: './confirmCompanyOrder?orderKey='+res.orderKey
+							})
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+	}
+	.content{
+		height: 100%;
+		padding: 20upx;
+		.goods-list{
+			padding-bottom: 120upx;
+			.item{
+				box-sizing: border-box;
+				height: 221upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				margin-bottom: 20upx;
+				padding: 30upx;
+				display: flex;
+				align-items: center;
+				&:last-child{
+					margin-bottom: 0;
+				}
+				.goods-img{
+					width: 160upx;
+					height: 160upx;
+					background: #FFFFFF;
+					margin-right: 30upx;
+					flex-shrink: 0;
+				}
+				.info-box{
+					height: 160upx;
+					display: flex;
+					flex-direction: column;
+					justify-content: space-between;
+					width: calc(100% - 255upx);
+					.title-box{
+						width: 100%;
+						display: flex;
+						align-items: center;
+						.tag{
+							padding: 0 6upx;
+							height: 30upx;
+							line-height: 30upx;
+							font-size: 22upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FFFFFF;
+							background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
+							border-radius: 4upx;
+							margin-right: 10upx;
+							flex-shrink: 0;
+						}
+						.title{
+							flex: 1;
+							font-size: 28upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #111111;
+							line-height: 1;
+						}
+					}
+					.intro{
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						margin-top: 22upx;
+						line-height: 1;
+					}
+					.price-num{
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						.price{
+							display: flex;
+							align-items: flex-end;
+							.unit{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #FF6633;
+								line-height: 1.2;
+								margin-right: 4upx;
+							}
+							.text{
+								font-size: 32upx;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #FF6633;
+								line-height: 1;
+							}
+						}
+						.num-box{
+							display: flex;
+							align-items: center;
+							.img-box{
+								width: 60upx;
+								height: 60upx;
+								// border-radius: 4upx;
+								border: 1px solid #dddddd;
+								display: flex;
+								align-items: center;
+								justify-content: center;
+								image{
+									width: 25rpx;
+									height: 25rpx;
+								}
+							}
+							input{
+								width: 60upx;
+								height: 60upx;
+								line-height: 60upx;
+								font-size: 28upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								// border-radius: 4upx;
+								border-top: 1px solid #dddddd;
+								border-bottom: 1px solid #dddddd;
+								text-align: center;
+								// margin: 0 16upx;
+							}
+						}
+					}
+				}
+			}
+		}
+		.btn-foot{
+			box-sizing: border-box;
+			width: 100%;
+			height: 121upx;
+			background: #FFFFFF;
+			padding: 16upx 30upx 16upx 60upx;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			position: fixed;
+			left: 0;
+			bottom: 0;
+			z-index: 99;
+			.left{
+				display: flex;
+				align-items: center;
+				.text{
+					margin-left: 14upx;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					line-height: 1;
+				}
+			}
+			.right{
+				display: flex;
+				align-items: center;
+				.total{
+					display: flex;
+					align-items: flex-end;
+					margin-right: 36upx;
+					.label{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						line-height: 1.5;
+					}
+					.price{
+						display: flex;
+						align-items: flex-end;
+						.unit{
+							font-size: 32upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FF6633;
+							line-height: 1.2;
+							margin-right: 10upx;
+						}
+						.num{
+							font-size: 30upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FF6633;
+							line-height: 1;
+						}
+					}
+				}
+				.btn{
+					width: 200upx;
+					height: 88upx;
+					line-height: 88upx;
+					text-align: center;
+					font-size: 30upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FFFFFF;
+					background: #2BC7B9;
+					border-radius: 44upx;
+				}
+			}
+		}
+	}
+</style>

+ 430 - 0
pages_company/order/confirmCompanyOrder.vue

@@ -0,0 +1,430 @@
+<template>
+	<view>
+		<view class="inner-box">
+			<!-- 药品列表 -->
+			<view class="goods-list">
+				<view v-for="(item,index) in carts" :key="index" class="item" @click="showDetail(item)">
+					<view class="img-box">
+						<image :src="item.productAttrImage!=null?item.productAttrImage:item.productImage" mode="aspectFill"></image>
+					</view>
+					<view class="info-box">
+						<view>
+							<view class="name-box ellipsis2">
+								<view class="tag">{{utils.getDictLabelName("storeProductType",item.productType)}}</view>{{item.productName}}
+							</view>
+							<view class="spec ellipsis2">{{item.productAttrName}}</view>
+						</view>
+						<view class="price-num">
+							<view class="price">
+								<text class="unit">¥</text>
+								<text class="num">{{item.price.toFixed(2)}}</text>
+							</view>
+							<view class="num">x{{item.cartNum}}</view>
+						</view>
+					</view>
+				</view>
+				<!-- 小计 -->
+				<view class="sub-total">
+					<text class="label">合计金额:</text>
+					<view class="price">
+						<text class="unit">¥</text>
+						<text class="num">{{price.payPrice.toFixed(2)}}</text>
+					</view>
+				</view>
+			</view>
+			 
+		</view>
+		<!-- 底部按钮 -->
+		<view class="btn-foot">
+			<view class="right">
+				<view class="total" >
+					<text class="label">总金额:</text>
+					<view class="price">
+						<text class="unit">¥</text>
+						<text class="num">{{price.totalPrice.toFixed(2)}}</text>
+					</view>
+				</view>
+				<view class="btn" @click="openUpdateMoney()" >
+					实收金额
+				</view>
+				<view class="btn"  >
+					分享
+					<button  class="share" data-name="shareBtn" open-type="share">分享</button>
+				</view>
+			</view>
+		</view>
+		<modal v-if="inputShow" title="实收金额" confirm-text="保存" cancel-text="取消" @cancel="cancelUpdateMoney" @confirm="confirmUpdateMoney">
+			<input type="text" v-model="inputTxt" placeholder="请输入实收金额" class="intxt" maxlength="8" />
+		</modal>
+	</view>
+</template>
+
+<script>
+	import {getSalesOrder,addUserCart,updateSalseOrderMoney} from '@/api/companyOrder.js'
+	export default {
+		data() {
+			return {
+				inputShow:false,
+				inputTxt:null,
+				orderKey:null,
+				price:{
+					payPrice:0.00,
+					totalPrice:0.00,
+				},
+				carts:[],
+				
+			}
+		},
+		onLoad(option) {
+			this.orderKey=option.orderKey;
+			this.getSalesOrder();
+			 
+		},
+		//发送给朋友
+		onShareAppMessage(res) {
+			return {
+				title: "御君方-您的专属健康解决方案",
+				path: '/pages_company/order/confirmOrder?orderKey='+this.orderKey,
+				imageUrl: 'https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+			}
+			
+		},
+		//分享到朋友圈
+		onShareTimeline(res) {
+			return {
+				title:"御君方-您的专属健康解决方案",
+				query:'orderKey='+this.orderKey,
+				imageUrl:  'https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+			}
+		},
+		methods: {
+			openUpdateMoney(){
+				console.log(1)
+				this.inputShow = true
+			},
+			cancelUpdateMoney(){
+				this.inputShow = false
+			},
+			confirmUpdateMoney(){
+				if(parseFloat(this.inputTxt)>0){
+					var that=this;
+					var data={createOrderKey:this.orderKey,token:uni.getStorageSync('CompanyUserToken'),money:this.inputTxt}
+					updateSalseOrderMoney(data).then(
+						res => {
+							if(res.code==200){
+								this.inputShow = false
+								this.getSalesOrder();
+							}else{
+								uni.showToast({
+									icon:'none',
+									title: res.msg,
+								});
+							}
+						},
+						rej => {}
+					);
+					
+				}
+				else{
+					uni.showToast({
+						icon:'none',
+						title: "价格应大于0",
+					});
+				}
+			},
+			showDetail(item) {
+				uni.navigateTo({
+					url: 'productDetails?productId='+item.productId
+				})
+			},
+			getSalesOrder(){
+				var that=this;
+				that.price.payPrice=0;
+				that.price.totalPrice=0;
+				var data={createOrderKey:this.orderKey}
+				getSalesOrder(data).then(
+					res => {
+						if(res.code==200){
+							this.carts=res.carts;
+							this.carts.forEach(function(element) {
+								that.price.payPrice+=element.price*element.cartNum;
+							});
+							that.price.totalPrice=res.totalMoney
+							 
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			 
+		}
+	}
+</script>
+
+<style lang="scss">
+	.inner-box{
+		padding: 20upx 20upx 140upx;
+		 
+		.goods-list{
+			margin-top: 20upx;
+			padding: 0 30upx;
+			background-color: #FFFFFF;
+			border-radius: 16upx;
+			.item{
+				padding: 30upx 0;
+				border-bottom: 1px solid #EDEEEF;
+				display: flex;
+				align-items: center;
+				.img-box{
+					width: 160upx;
+					height: 160upx;
+					margin-right: 30upx;
+					image{
+						width: 100%;
+						height: 100%;
+					}
+				}
+				.info-box{
+					width: calc(100% - 190upx);
+					height: 160upx;
+					display: flex;
+					flex-direction: column;
+					justify-content: space-between;
+					.name-box{
+						font-size: 28upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #111111;
+						line-height: 40upx;
+						.tag{
+							display: inline-block;
+							padding: 0 6upx;
+							height: 30upx;
+							background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
+							border-radius: 4upx;
+							margin-right: 10upx;
+							font-size: 22upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FFFFFF;
+							line-height: 30upx;
+							float: left;
+							margin-top: 7upx;
+						}
+					}
+					.spec{
+						margin-top: 10upx;
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						line-height: 1;
+					}
+					.price-num{
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						.price{
+							display: flex;
+							align-items: flex-end;
+							.unit{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1.2;
+								margin-right: 4upx;
+							}
+							.num{
+								font-size: 32upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1;
+							}
+						}
+						.num{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1;
+						}
+					}
+				}
+			}
+			.sub-total{
+				height: 88upx;
+				display: flex;
+				align-items: center;
+				justify-content: flex-end;
+				.label{
+					font-size: 24upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+				}
+				.price{
+					display: flex;
+					align-items: flex-end;
+					.unit{
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #FF6633;
+						line-height: 1.2;
+						margin-right: 4upx;
+					}
+					.num{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+			}
+		}
+		.points{
+			height: 88upx;
+			padding: 0 30upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			 
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			.left{
+				display: flex;
+				align-items: center;
+				image{
+					width: 28upx;
+					height: 28upx;
+					margin-right: 20upx;
+				}
+				.text{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+				}
+			}
+			.right{
+				display: flex;
+				align-items: center;
+				.text{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					 
+				}
+				image{
+					margin-left: 15upx;
+					width: 14upx;
+					height: 24upx;
+				}
+			}
+		}
+		.remarks{
+			height: 88upx;
+			padding: 0 30upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			margin-top: 20upx;
+			display: flex;
+			align-items: center;
+			input{
+				width: 100%;
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #000000;
+			}
+			.input{
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+			}
+		}
+	}
+	.btn-foot{
+		box-sizing: border-box;
+		width: 100%;
+		height: 121upx;
+		background: #FFFFFF;
+		padding: 16upx 30upx;
+		display: flex;
+		align-items: center;
+		justify-content: flex-end;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		z-index: 99;
+		.right{
+			display: flex;
+			align-items: center;
+			.total{
+				display: flex;
+				align-items: flex-end;
+				margin-right: 15upx;
+				.label{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1.5;
+				}
+				.price{
+					display: flex;
+					align-items: flex-end;
+					.unit{
+						font-size: 28upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1.2;
+						margin-right: 10upx;
+					}
+					.num{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+			}
+			.btn{
+				margin-left: 10rpx;
+				width: 180upx;
+				height: 88upx;
+				line-height: 88upx;
+				text-align: center;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				background: #2BC7B9;
+				border-radius: 44upx;
+				position: relative;
+				.share{
+					display: inline-block;
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 100%;
+					height: 100%rpx;
+					opacity: 0;
+				}
+			}
+		}
+	}
+</style>
+ 

+ 558 - 0
pages_company/order/confirmOrder.vue

@@ -0,0 +1,558 @@
+<template>
+	<view>
+		<view class="inner-box">
+			<!-- 药品列表 -->
+			<view class="goods-list">
+				<view v-for="(item,index) in carts" :key="index" class="item" @click="showDetail(item)">
+					<view class="img-box">
+						<image :src="item.productAttrImage!=null?item.productAttrImage:item.productImage" mode="aspectFill"></image>
+					</view>
+					<view class="info-box">
+						<view>
+							<view class="name-box ellipsis2">
+								<view class="tag">{{utils.getDictLabelName("storeProductType",item.productType)}}</view>{{item.productName}}
+							</view>
+							<view class="spec ellipsis2">{{item.productAttrName}}</view>
+						</view>
+						<view class="price-num">
+							<view class="price">
+								<text class="unit">¥</text>
+								<text class="num">{{item.price.toFixed(2)}}</text>
+							</view>
+							<view class="num">x{{item.cartNum}}</view>
+						</view>
+					</view>
+				</view>
+				<!-- 小计 -->
+				<view class="sub-total">
+					<text class="label">订单金额:</text>
+					<view class="price">
+						<text class="unit">¥</text>
+						<text class="num">{{price.totalPrice.toFixed(2)}}</text>
+					</view>
+				</view>
+			</view>
+			 
+		</view>
+		<!-- 底部按钮 -->
+		<view class="btn-foot">
+			<view class="right">
+				<view class="total">
+					<text class="label">实付金额:</text>
+					<view class="price">
+						<text class="unit">¥</text>
+						<text class="num">{{price.payPrice.toFixed(2)}}</text>
+					</view>
+				</view>
+				 
+				<view class="btn" @click="submitOrder">支付{{price.payPrice.toFixed(2)}}</view>
+			</view>
+		</view>
+		<view class="message-box" v-if="messageShow">
+			<view class="left">
+				<image src="/static/images/close24.png" mode="" @click="closeOrder()" ></image>
+				<view class="text ellipsis">您有{{count0}}个待支付订单</view>
+			</view>
+			<view class="btn" @click="showOrder()">查看</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {getOrderCount} from '@/api/storeOrder'
+	import {getSalesOrder,addUserCart} from '@/api/companyOrder.js'
+	export default {
+		data() {
+			return {
+				count0:0,
+				messageShow:false,
+				orderKey:null,
+				price:{
+					totalPrice:0.00,
+					payPrice:0.00,
+				},
+				carts:[],
+				
+			}
+		},
+		onLoad(option) {
+			
+			this.orderKey=option.orderKey;
+			
+			 
+		},
+		onShow() {
+			if(this.utils.isLogin()){
+				this.getOrderCount();
+			}
+			this.getSalesOrder();
+		},
+		methods: {
+			showOrder(){
+				this.utils.isLogin().then(res => {
+					if(res){
+						uni.navigateTo({
+							url: '/pages_user/user/storeOrder?status=0'
+						})
+					}
+				})
+			},
+			closeOrder(){
+				this.messageShow=false;
+			},
+			getOrderCount(){
+				getOrderCount().then(
+					res => {
+						if(res.code==200){
+							this.count0=res.count0;
+							if(this.count0>0){
+								this.messageShow=true;
+							}
+						} 
+					},
+					rej => {}
+				);
+			},
+			showDetail(item) {
+				uni.navigateTo({
+					url: './productShowDetails?productId='+item.productId
+				})
+			},
+			getSalesOrder(item){
+				var that=this;
+				that.totalPrice=0.00;
+				that.payPrice=0.00;
+				var data={createOrderKey:this.orderKey}
+				getSalesOrder(data).then(
+					res => {
+						if(res.code==200){
+							this.carts=res.carts;
+							this.carts.forEach(function(element) {
+								that.price.totalPrice+=element.price*element.cartNum;
+							});
+							that.price.payPrice=res.totalMoney
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			// 提交订单
+			submitOrder() {
+				this.utils.isLogin().then(res => {
+					if(res){
+						var data={createOrderKey:this.orderKey}
+						addUserCart(data).then(
+							res => {
+								if(res.code==200){
+									uni.navigateTo({
+										url: '/pages/shopping/confirmCreateOrder?type=buy&cartIds='+res.cartIds.toString()+"&companyId="+res.companyId+"&companyUserId="+res.companyUserId+"&createOrderKey="+this.orderKey
+									})
+								}else{
+									uni.showToast({
+										icon:'none',
+										title: res.msg,
+									});
+								}
+							},
+							rej => {}
+						);
+						//将购物车产品更新为自己的购物车 
+					}
+				})
+				
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.inner-box{
+		padding: 20upx 20upx 140upx;
+		 
+		.goods-list{
+			margin-top: 20upx;
+			padding: 0 30upx;
+			background-color: #FFFFFF;
+			border-radius: 16upx;
+			.item{
+				padding: 30upx 0;
+				border-bottom: 1px solid #EDEEEF;
+				display: flex;
+				align-items: center;
+				.img-box{
+					width: 160upx;
+					height: 160upx;
+					margin-right: 30upx;
+					image{
+						width: 100%;
+						height: 100%;
+					}
+				}
+				.info-box{
+					width: calc(100% - 190upx);
+					height: 160upx;
+					display: flex;
+					flex-direction: column;
+					justify-content: space-between;
+					.name-box{
+						font-size: 28upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #111111;
+						line-height: 40upx;
+						.tag{
+							display: inline-block;
+							padding: 0 6upx;
+							height: 30upx;
+							background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
+							border-radius: 4upx;
+							margin-right: 10upx;
+							font-size: 22upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FFFFFF;
+							line-height: 30upx;
+							float: left;
+							margin-top: 7upx;
+						}
+					}
+					.spec{
+						margin-top: 10upx;
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						line-height: 1;
+					}
+					.price-num{
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						.price{
+							display: flex;
+							align-items: flex-end;
+							.unit{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1.2;
+								margin-right: 4upx;
+							}
+							.num{
+								font-size: 32upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1;
+							}
+						}
+						.num{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1;
+						}
+					}
+				}
+			}
+			.sub-total{
+				height: 88upx;
+				display: flex;
+				align-items: center;
+				justify-content: flex-end;
+				.label{
+					font-size: 24upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+				}
+				.price{
+					display: flex;
+					align-items: flex-end;
+					.unit{
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #FF6633;
+						line-height: 1.2;
+						margin-right: 4upx;
+					}
+					.num{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+			}
+		}
+		.points{
+			height: 88upx;
+			padding: 0 30upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			 
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			.left{
+				display: flex;
+				align-items: center;
+				image{
+					width: 28upx;
+					height: 28upx;
+					margin-right: 20upx;
+				}
+				.text{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+				}
+			}
+			.right{
+				display: flex;
+				align-items: center;
+				.text{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					 
+				}
+				image{
+					margin-left: 15upx;
+					width: 14upx;
+					height: 24upx;
+				}
+			}
+		}
+		.remarks{
+			height: 88upx;
+			padding: 0 30upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			margin-top: 20upx;
+			display: flex;
+			align-items: center;
+			input{
+				width: 100%;
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #000000;
+			}
+			.input{
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+			}
+		}
+	}
+	
+	
+	.btn-foot{
+		box-sizing: border-box;
+		width: 100%;
+		height: 121upx;
+		background: #FFFFFF;
+		 
+		display: flex;
+		align-items: center;
+		justify-content: flex-end;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		z-index: 99;
+		.right{
+			display: flex;
+			align-items: center;
+			.total{
+				display: flex;
+				align-items: flex-end;
+				margin-right: 15upx;
+				.label{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1.5;
+				}
+				.price{
+					display: flex;
+					align-items: flex-end;
+					.unit{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1.2;
+						margin-right: 10upx;
+					}
+					.num{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+			}
+			.btn{
+				margin-right: 15upx;
+				padding: 20rpx 30rpx;
+				text-align: center;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				background: #2BC7B9;
+				border-radius: 44upx;
+			}
+		}
+	}
+</style>
+<style lang="less" scoped>
+	.coupon {
+	  height: 100%;
+	}
+	/*优惠券列表公共*/
+	.coupon-list {
+	}
+	.coupon-list .item {
+	  display: flex;
+	  flex-direction: column;
+	  justify-content: center;
+	  align-items: center;
+	  width: 100%;
+	  height: 1.7 * 100rpx;
+	  margin-bottom: 0.16 * 100rpx;
+	}
+	
+	.coupon-list .item .money {
+	  background-size: 100% 100%;
+	  width: 2.4 * 100rpx;
+	  height: 100%;
+	  color: #fff;
+	  font-size: 0.36 * 100rpx;
+	  font-weight: bold;
+	  text-align: center;
+	  display: flex;
+	  flex-direction: column;
+	  align-items: center;
+	  justify-content: center;
+	  position: relative;
+	  
+	}
+	.coupon-list .item .money .img{
+	  position: absolute;
+	  width: 2.4 * 100rpx;
+	  height: 100%;
+	  color: #fff;
+	  
+	}
+	
+	.coupon-list .item .money .num {
+	  font-size: 0.6 * 100rpx;
+	}
+	.coupon-list .item .money .pic-num {
+	  font-size: 20rpx;
+	  z-index: 99;
+	}
+
+	
+	.coupon-list .item .text {
+	  width: 4.5 * 100rpx;
+	  padding: 0 0.17 * 100rpx 0 0.24 * 100rpx;
+	  background-color: #fff;
+	  box-sizing: border-box;
+	}
+	
+	.coupon-list .item .text .condition {
+	  font-size: 0.3 * 100rpx;
+	  color: #282828;
+	  height: 0.93 * 100rpx;
+	  line-height: 0.93 * 100rpx;
+	  border-bottom: 1px solid #f0f0f0;
+	}
+	
+	.coupon-list .item .text .data {
+	  font-size: 0.2 * 100rpx;
+	  color: #999;
+	  height: 0.76 * 100rpx;
+	}
+	
+	.coupon-list .item .text .data .bnt {
+	  width: 1.36 * 100rpx;
+	  height: 0.44 * 100rpx;
+	  border-radius: 0.22 * 100rpx;
+	  font-size: 0.22 * 100rpx;
+	  color: #fff;
+	  text-align: center;
+	  line-height: 0.44 * 100rpx;
+	  background-color: red;
+	}
+	
+	.coupon-list .item .text .data .bnt.gray {
+	  background-color: #ccc;
+	}
+	.message-box{
+		box-sizing: border-box;
+		width: 693upx;
+		height: 84upx;
+		background: #F3FFFD;
+		border: 1px solid #C7E9E5;
+		box-shadow: 0px 4upx 12upx 0px rgba(90, 203, 138, 0.16);
+		border-radius: 16upx;
+		position: fixed;
+		left: 50%;
+		transform: translateX(-50%);
+		bottom: 128upx;
+		z-index: 99;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding: 0 20upx 0 30upx;
+		.left{
+			width: 80%;
+			display: flex;
+			align-items: center;
+			image{
+				width: 24upx;
+				height: 24upx;
+				margin-right: 18upx;
+			}
+			.text{
+				width: 90%;
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #2BC7B9;
+			}
+		}
+		.btn{
+			width: 100upx;
+			height: 48upx;
+			line-height: 48upx;
+			text-align: center;
+			font-size: 24upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #FFFFFF;
+			border: 1px solid #D2E6FF;
+			background: linear-gradient(135deg, #2BC7B9 0%, #60CDC3 100%);
+			border-radius: 24upx;
+			margin-left: 30upx;
+		}
+	}
+</style>
+

+ 364 - 0
pages_company/order/coupon.vue

@@ -0,0 +1,364 @@
+<template>
+  <view ref="container">
+	<view class="search-cont">
+		<view class="inner">
+			<image class="icon-search" src="/static/images/search.png" mode=""></image>
+			<input type="text" value="" placeholder="输入订单号" confirm-type="搜索" @confirm="goSearch"   placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
+		</view>
+	</view>
+    <view class="tui-coupon-list">
+      <view class="tui-coupon-item tui-top20" v-for="(item, index) in couponsList" :key="index">
+         <image src="/static/images/bg_coupon_3x.png" class="tui-coupon-bg" mode="widthFix"></image>
+		<view class="tui-coupon-item-left">
+          <view class="tui-coupon-price-box" :class="{ 'tui-color-grey': item.receiveCount>0 }">
+            <view class="tui-coupon-price-sign">¥</view>
+            <view class="tui-coupon-price" :class="{ 'tui-price-small': false }">{{ item.couponPrice }}</view>
+          </view>
+          <view class="tui-coupon-intro">满{{ item.useMinPrice }}元可用</view>
+        </view>
+        <view class="tui-coupon-item-right">
+          <view class="tui-coupon-content">
+            <view class="tui-coupon-title-box">
+              <view class="tui-coupon-title">{{ item.couponName }}</view>
+            </view>
+            <view class="tui-coupon-rule">
+              <view class="tui-rule-box tui-padding-btm">
+                <view class="tui-coupon-circle"></view>
+                <view class="tui-coupon-text">不可叠加使用</view>
+              </view>
+              <view class="tui-rule-box">
+                <view class="tui-coupon-circle"></view>
+                <view class="tui-coupon-text">{{ item.limitTime }} 到期</view>
+            
+              </view>
+            </view>
+          </view>
+        </view>
+        <view class="tui-btn-box">
+			<view class="btn receive"   @click="show(item)">查看</view>
+        </view>
+      </view>
+    </view>
+	<Loading :loaded="loadend" :loading="loading"></Loading>
+	<!--暂无优惠券-->
+	<view v-if="couponsList.length == 0 && page > 1" class="no-data-box" >
+		<image src="/static/images/no_data.png" mode="aspectFit"></image>
+		<view class="empty-title">暂无数据</view>
+	</view>
+  </view>
+</template>
+<script>
+import { getCompanyCouponIssueList, receive } from '@/api/coupon'
+import Loading from '@/components/Loading'
+export default {
+  name: 'getCoupon',
+  components: {
+    Loading,
+  },
+  props: {},
+  data: function() {
+    return {
+		searchKey:null,
+		limit: 10,
+		couponsList: [],
+		loading: false,
+		loadend: false,
+		page: 1,
+		limit: 10,
+	}
+  },
+  onLoad(options) {
+  },
+  mounted: function() {
+    
+  },
+  onShow() {
+  	this.getCompanyCouponIssueList()
+  },
+  onReachBottom() {
+    !this.loading && this.getCompanyCouponIssueList()
+  },
+  methods: {
+	goSearch(e) {
+		this.searchKey=e.detail.value;
+		this.page=1;
+		this.couponsList=[];
+		this.getCompanyCouponIssueList()
+	},
+    show(item){
+		uni.navigateTo({
+			url: '../couponDetails?id=' +item.id+"&type=1"
+		})
+	},
+    getCompanyCouponIssueList() {
+      if (this.loading) return //阻止下次请求(false可以进行请求);
+      if (this.loadend) return //阻止结束当前请求(false可以进行请求);
+      this.loading = true
+	  var q=null;
+	  if(this.searchKey!=null){
+		  q = { couponPrice:this.searchKey,  page: this.page, pageSize: this.limit,couponType:2 }
+	  }
+	  else{
+		  q = {    page: this.page, pageSize: this.limit,couponType:2 }
+	  }
+      getCompanyCouponIssueList(q).then(res => {
+        this.loading = false
+        this.couponsList.push.apply(this.couponsList, res.data.list)
+        this.loadend = res.data.list.length < this.limit //判断所有数据是否加载完成;
+        this.page = this.page + 1
+      })
+    },
+  },
+}
+</script>
+
+<style lang="less" scoped>
+page {
+  background-color: #f5f5f5;
+}
+
+.container {
+  padding-bottom: env(safe-area-inset-bottom);
+}
+.search-cont{
+	width: 100%;
+	z-index: 999;
+	position: fixed;
+	top: 0;
+	left: 0;
+	padding: 0upx 30upx;
+	background-color: #FFFFFF;
+	.inner{
+		box-sizing: border-box;
+		width: 100%;
+		height: 72upx;
+		line-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;
+		}
+	}
+}
+ 
+.tui-coupon-list {
+	margin-top: 72rpx;
+	width: 100%;
+	padding: 0 25rpx;
+	box-sizing: border-box;
+}
+ 
+.tui-coupon-item {
+  
+  width: 100%;
+  height: 210rpx;
+  position: relative;
+  display: flex;
+  align-items: center;
+  padding-right: 30rpx;
+  box-sizing: border-box;
+  overflow: hidden;
+ 
+}
+
+.tui-coupon-bg {
+  width: 100%;
+  height: 210rpx;
+  position: absolute;
+  left: 0;
+  top: 0;
+  z-index: 1;
+}
+
+.tui-coupon-sign {
+  height: 110rpx;
+  width: 110rpx;
+  position: absolute;
+  z-index: 9;
+  top: -30rpx;
+  right: 40rpx;
+}
+
+.tui-coupon-item-left {
+  width: 218rpx;
+  height: 210rpx;
+  position: relative;
+  z-index: 2;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-direction: column;
+  flex-shrink: 0;
+}
+
+.tui-coupon-price-box {
+  display: flex;
+  color: #e41f19;
+  align-items: flex-end;
+}
+
+.tui-coupon-price-sign {
+  font-size: 30rpx;
+}
+
+.tui-coupon-price {
+  font-size: 32rpx;
+  line-height: 68rpx;
+  font-weight: bold;
+}
+
+.tui-price-small {
+  font-size: 58rpx !important;
+  line-height: 56rpx !important;
+}
+
+.tui-coupon-intro {
+  background: #f7f7f7;
+  padding: 8rpx 10rpx;
+  font-size: 26rpx;
+  line-height: 26rpx;
+  font-weight: 400;
+  color: #666;
+  margin-top: 18rpx;
+}
+
+.tui-coupon-item-right {
+  flex: 1;
+  height: 210rpx;
+  position: relative;
+  z-index: 2;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding-left: 24rpx;
+  box-sizing: border-box;
+  overflow: hidden;
+}
+
+.tui-coupon-content {
+  width: 82%;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.tui-coupon-title-box {
+  display: flex;
+  align-items: center;
+}
+
+.tui-coupon-btn {
+  padding: 6rpx;
+  background: #ffebeb;
+  color: #e41f19;
+  font-size: 25rpx;
+  line-height: 25rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  transform: scale(0.9);
+  transform-origin: 0 center;
+  border-radius: 4rpx;
+  flex-shrink: 0;
+}
+
+.tui-color-grey {
+  color: #888 !important;
+}
+
+.tui-bg-grey {
+  background: #f0f0f0 !important;
+  color: #888 !important;
+}
+
+.tui-coupon-title {
+  width: 100%;
+  font-size: 26rpx;
+  color: #333;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+.tui-coupon-rule {
+  padding-top: 52rpx;
+}
+
+.tui-rule-box {
+  display: flex;
+  align-items: center;
+  transform: scale(0.8);
+  transform-origin: 0 100%;
+}
+
+.tui-padding-btm {
+  padding-bottom: 6rpx;
+}
+
+.tui-coupon-circle {
+  width: 8rpx;
+  height: 8rpx;
+  background: rgb(160, 160, 160);
+  border-radius: 50%;
+}
+
+.tui-coupon-text {
+  font-size: 28rpx;
+  line-height: 28rpx;
+  font-weight: 400;
+  color: #666;
+  padding-left: 8rpx;
+  white-space: nowrap;
+}
+
+.tui-top20 {
+  margin-top: 20rpx;
+}
+
+.tui-coupon-title {
+  font-size: 28rpx;
+  line-height: 28rpx;
+}
+
+.tui-coupon-radio {
+  transform: scale(0.7);
+  transform-origin: 100% center;
+}
+
+.tui-btn-box {
+  position: absolute;
+  right: 20rpx;
+  bottom: 40rpx;
+  z-index: 10;
+  .btn{
+  	width: 155upx;
+  	height: 64upx;
+  	line-height: 64upx;
+  	font-size: 26upx;
+  	font-family: PingFang SC;
+  	font-weight: 500;
+  	text-align: center;
+  	border-radius: 32upx;
+  	margin-left: 15upx;
+
+  	&.cancel{
+  		border: 1px solid red;
+  		color: red;
+  	}
+  	&.receive{
+  		background: red;
+  		color: #FFFFFF;
+  	}
+  }
+}
+</style>

+ 926 - 0
pages_company/order/productDetails.vue

@@ -0,0 +1,926 @@
+<template>
+	<view class="content">
+		<!-- 商品轮播图片 -->
+		<view class="shop-banner" @click="showImg()">
+			<swiper
+				class="swiper" 
+				:indicator-dots="false" 
+				:circular="true" 
+				:autoplay="true" 
+				:interval="3000" 
+				:duration="1000"
+				indicator-color="rgba(255, 255, 255, 0.6)"
+				indicator-active-color="#ffffff"
+				@change="swiperChange"
+			>
+				<swiper-item  class="swiper-item" v-for="(item,index) in  banner" :key="index">
+					<image :src="item" mode="aspectFill"></image>
+				</swiper-item>
+			</swiper>
+			<!-- 底部遮罩 -->
+			<view class="banner-mask"></view>
+			<!-- 数量 -->
+			<view class="num-box">{{ activeBanner }}/{{ banner.length }}</view>
+		</view>
+		<!-- 详细信息 -->
+		<view class="det-info">
+			<view class="price-box">
+				<view class="price">
+					<text class="label">会员价</text>
+					<text class="unit">¥</text>
+					<text class="num" >{{product.price}}</text>
+					<text class="label">零售价</text>
+					<text class="old" >¥{{product.otPrice}}</text>
+				</view>
+			</view>
+			<view class="name-box">
+				<view class="tag">{{utils.getDictLabelName("storeProductType",product.productType)}}</view>{{product.productName}}
+			</view>
+			<view class="intro">
+				{{product.productInfo}}
+			</view>
+			<view class="safe-box">
+				<image src="../../static/images/safe.png" mode=""></image>
+				<text class="text">品质保障</text>
+				<view class="line"></view>
+				<text class="text">药师服务</text>
+				<view class="line"></view>
+				<text class="text">隐私保护</text>
+			</view>
+		</view>
+		<!-- 购买人数、库存 -->
+		<view class="inventor">
+			<view class="left">
+				<!-- <view class="head-box">
+					<view class="head" v-for="(item,j) in 5" :key="j">
+						<image src="../../static/images/head.jpg" mode=""></image>
+					</view>
+				</view> -->
+				<view class="num-box">
+					已有 <text class="text">{{product.sales}}</text> 人购买
+				</view>
+			</view>
+			<!-- <view class="right">
+				库存 <text class="text">{{product.stock}}{{product.unitName}}</text>
+			</view> -->
+			<!-- <view class="right">
+				 <text class="text">库存{{product.stock>0?'充足':'售罄'}} </text>
+			</view> -->
+		</view>
+		<!-- 功效 -->
+		<!-- <view class="effect">
+			<view class="label">药品说明书</view>
+			<view class="label">查看</view>
+			
+		</view> -->
+		<!-- 图文详情 -->
+		<view class="det-box">
+			<view class="title">图文详情</view>
+			<view class="inner">
+				<view  v-html="product.description" style="font-size:0"></view>
+			</view>
+		</view>
+		<!-- 底部按钮 -->
+		<view class="btn-foot">
+			<view class="menu-box">
+				<view class="item" @click="goHome">
+					<image src="../../static/images/back_home.png" mode=""></image>
+					<text class="label">首页</text>
+				</view>
+				<view class="item" style="position: relative;">
+					<image src="../../static/images/consult_small.png" mode=""></image>
+					<text class="label">咨询</text>
+					<button class="contact-btn" open-type="contact"></button>
+				</view>
+				<view class="item" @click="navgetTo('./cart')">
+					<uni-badge size="small" :text="cartCount" absolute="rightTop" type="error">
+						<image src="../../static/images/cart36.png" mode=""></image>
+					</uni-badge>
+					<text class="label">购物车</text>
+				</view>
+			</view>
+			<view class="btn-box">
+				<view class="btn cart" @click="addCart('cart')">加入购物车</view>
+				<!-- <view class="btn buy" @click="addCart('buy')">{{buyText}}</view> -->
+			</view>
+		</view>
+		<!-- 选择药品规格弹窗 -->
+		<popupBottom ref="popup" :visible.sync="specVisible" title=" "  radius="32"  maxHeight="1024">
+		    <view class="product-spec">
+				<!-- 商品信息 -->
+				<view class="pro-info">
+					<view class="img-box">
+						<image :src="productValueSelect.image==null||productValueSelect.image==''?product.image:productValueSelect.image" mode="aspectFill"></image>
+					</view>
+					<view class="info-text">
+						<view class="price">
+							<text class="unit">¥</text>
+							<text class="num">{{ productValueSelect.price.toFixed(2) }}</text>
+						</view>
+						<view class="desc-box">
+							<text class="text">已选:{{ productValueSelect.sku }}</text>
+							<text class="text">库存{{ productValueSelect.stock?'充足':'售罄' }}</text>
+						</view>
+					</view>
+				</view>
+				<!-- 规格 -->
+				<view class="spec-box">
+					<view v-for="(item,index) in attrs">
+						<view class="title">{{item.attrName}}</view>
+						<view class="spec-list">
+							<view 
+								v-for="(subItem,subindex) in item.values" 
+								:key="subindex" 
+								:class="subindex==item.index?'item active':'item'" 
+								@click="choseSpec(index,subindex)"
+							>
+								{{ subItem }}
+							</view>
+						</view>
+					</view>
+				</view>
+				<!-- 数量 -->
+				<view class="price-num">
+					<view class="label">数量</view>
+					<view class="num-box">
+						<view class="img-box" @click="lessNum()">
+							<image v-if="specNum <= 1" src="../../static/images/jian.png" mode=""></image>
+							<image v-else src="../../static/images/jian2.png" mode=""></image>
+						</view>
+						<input type="text" @change="changeNum" v-model="specNum"    />
+						<view class="img-box" @click="addNum()">
+							<image src="../../static/images/add.png" mode=""></image>
+						</view>
+					</view>
+				</view>
+				<view class="sub-btn" @click="submit">确定</view>
+			</view>
+		</popupBottom>
+	</view>
+</template>
+
+<script>
+	import {getDicts} from '@/api/index'
+	import {getProductDetails,getCartCount,addCart} from '@/api/product'
+	import popupBottom from '@/components/px-popup-bottom/px-popup-bottom.vue'
+	export default {
+		components: {
+			item:{},
+			popupBottom
+		},
+		data() {
+			return {
+				buyText:"立即购买",
+				type:null,
+				productValueSelect:{
+					price:0,
+				},
+				banner:[],
+				productId:null,
+				attrs:[],
+				values:[],
+				product:{
+					price:0,
+					otPrice:0,
+				},
+				 
+				// 当前轮播的图片
+				activeBanner: 0,
+				// 购物车数量
+				cartCount: 0,
+				// 规格弹窗
+				specVisible: false,
+				// 规格数量
+				specNum: 1,
+			};
+		},
+		onLoad(options) {
+			this.getDicts();
+			this.productId = options.productId;
+			if(this.utils.checkToken()){
+				this.getCartCount();
+			}
+		},
+		onShow() {
+			this.getProductDetails();
+		},
+		 
+		methods: {
+			getDicts:function(){
+				getDicts().then(
+					res => {
+						if(res.code==200){
+							uni.setStorageSync('dicts',JSON.stringify(res));
+						} 
+						 
+					},
+					rej => {}
+				);
+			},
+			showImg() {
+				 //预览图片
+				 uni.previewImage({
+				 	urls: this.banner,
+				 	current: this.banner[0]
+				 });
+			},
+			doAddCart(type){
+				if(this.specNum==0){
+					uni.showToast({
+						icon:'none',
+						title: "库存不足",
+					});
+					return;
+				}
+				var isBuy=type=="buy"?1:0;
+				let data = {isBuy:isBuy,cartNum:this.specNum,productId:this.productValueSelect.productId,attrValueId:this.productValueSelect.id};
+				addCart(data).then(
+					res => {
+						if(res.code==200){
+							if(type=="buy"){
+								uni.navigateTo({
+									url: '/pages/shopping/confirmOrder?type='+this.type+"&cartIds="+res.id
+								})
+							}
+							else
+							{
+								this.getCartCount()
+								uni.showToast({
+									icon:'success',
+									title: "添加成功",
+								});
+							}
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+							this.getProductDetails()
+						}
+					},
+					rej => {}
+				);
+			},
+			getProductDetails(){
+				let data = {productId:this.productId};
+				getProductDetails(data).then(
+					res => {
+						if(res.code==200){
+							this.product=res.product;
+							if(this.product.productType==1){
+								this.buyText="立即购买"
+							}
+							else if(this.product.productType==2){
+								this.buyText="提交需求"
+							}
+							this.product.otPrice=this.product.otPrice.toFixed(2);
+							this.product.price=this.product.price.toFixed(2);
+							if(this.product.sliderImage!=null){
+								this.banner=this.product.sliderImage.split(',');
+							}
+							else{
+								this.banner=[]
+							}
+							this.attrs=res.productAttr;
+							this.attrs.forEach((item,index,arr)=>{
+							     item.values=item.attrValues.split(',');
+								 item.index=0
+							})
+							this.values=res.productValues;
+							console.log(this.values)
+							this.choseSpec(0,0)
+							 
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+							setTimeout(function(){
+								uni.reLaunch({
+									url: '/pages/home/index',
+								})
+							},2000)
+							
+						}
+					},
+					rej => {}
+				);
+			},
+			getCartCount(){
+				let data = {productId:this.productId};
+				getCartCount(data).then(
+					cartRes => {
+						if(cartRes.code==200){
+							 this.cartCount=cartRes.data;
+						}
+					},
+					rej => {}
+				);
+				
+			},
+			// swiper变化事件
+			swiperChange(event) {
+				this.activeBanner = event.detail.current + 1
+			},
+			// 回到首页
+			goHome() {
+				uni.switchTab({
+					url: '/pages/home/index'
+				})
+			},
+			// 跳转页面
+			navgetTo(url) {
+				this.utils.isLogin().then(res => {
+					if(res){
+						uni.navigateTo({
+							url: url
+						})
+					}
+				})
+			},
+			// 加入购物车
+			addCart(type) {
+				this.utils.isLogin().then(res => {
+					if(res){
+						this.type=type;
+						this.specVisible = true
+					}
+				})
+			},
+			// 规格选择
+			choseSpec(index,subIndex) {
+				this.attrs[index].index = subIndex;
+				this.$forceUpdate();
+				let productAttr = this.attrs;
+				let values = [];
+				for (let i = 0; i < productAttr.length; i++) {
+				  for (let j = 0; j < productAttr[i].values.length; j++) {
+				    if (productAttr[i].index === j) {
+				      values.push(productAttr[i].values[j]);
+				    }
+				  }
+				}
+				var selectVal=values.sort().join(",");
+				console.log(selectVal)
+				var valueSelect=this.values.filter((item)=>{
+				     return item.sku==selectVal;
+				})
+				if(valueSelect!=null&&valueSelect.length==1){
+					this.productValueSelect=valueSelect[0];
+				}
+				
+				this.updateSpecNum();
+				
+			},
+			changeNum(e) {
+				this.specNum = e.detail.value.replace(/\D/g, '')
+				if(this.specNum < 1) {
+					this.specNum = 1
+				}
+				if(this.specNum>=this.productValueSelect.stock){
+					this.specNum=this.productValueSelect.stock
+				}
+			},
+			//更新数量
+			updateSpecNum(){
+				if(this.productValueSelect.stock==0){
+					this.specNum=0;
+				}
+				else{
+					this.specNum=1;
+				}
+			},
+			// 数量减法
+			lessNum(index) {
+				this.specNum--
+				if(this.specNum < 1) {
+					this.specNum = 1
+				}
+				if(this.specNum>=this.productValueSelect.stock){
+					this.specNum=this.productValueSelect.stock
+				}
+			},
+			// 数量加法
+			addNum(index) {
+				this.specNum++
+				if(this.specNum>=this.productValueSelect.stock){
+					this.specNum=this.productValueSelect.stock
+				}
+			},
+			// 确定选择该规格
+			submit() {
+				this.specVisible = false
+				this.doAddCart(this.type);
+				 
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.shop-banner{
+		height: 756upx;
+		background-color: #FFFFFF;
+		position: relative;
+		.swiper-item{
+			box-sizing: border-box;
+		}
+		.swiper,
+		.swiper-item,
+		.swiper-item image{
+			width: 100%;
+			height: 100%;
+		}
+		.banner-mask{
+			width: 100%;
+			height: 44upx;
+			// background: linear-gradient(0deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0));
+			// opacity: 0.8;
+			position: absolute;
+			left: 0;
+			bottom: 0;
+			z-index: 9;
+			background-image: url(../../static/images/black_mask.png);
+			background-size: 20upx 44upx;
+			background-repeat: repeat-x;
+		}
+		.num-box{
+			width: 80upx;
+			height: 44upx;
+			line-height: 44upx;
+			text-align: center;
+			font-size: 24upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #FFFFFF;
+			background: rgba(0, 0, 0, .3);
+			border-radius: 22upx;
+			position: absolute;
+			right: 30upx;
+			bottom: 30upx;
+			z-index: 10;
+		}
+	}
+	.det-info{
+		background: #FFFFFF;
+		padding: 36upx 30upx 25upx;
+		.price-box{
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			.price{
+				display: flex;
+				align-items: flex-end;
+				.label{
+					color: #333;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					line-height: 1.3;
+					margin-right: 5upx;
+				}
+				.unit{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FF6633;
+					line-height: 1.3;
+				}
+				.num{
+					font-size: 40upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FF6633;
+					margin: 0 20upx 0 10upx;
+					line-height: 1;
+				}
+				.old{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					text-decoration: line-through;
+					color: #BBBBBB;
+					line-height: 1.3;
+				}
+			}
+			.share-box{
+				width: 120upx;
+				height: 46upx;
+				border: 1px solid #2BC7B9;
+				border-radius: 23upx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				position: relative;
+				.text{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #2BC7B9;
+				}
+				image{
+					margin-left: 2rpx;
+					width: 25upx;
+					height: 24upx;
+				}
+				.share{
+					display: inline-block;
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 100%;
+					height: 100%rpx;
+					opacity: 0;
+				}
+			}
+			.spec{
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				line-height: 36upx;
+			}
+		}
+		.name-box{
+			font-size: 32upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #111111;
+			line-height: 44upx;
+			margin-top: 32upx;
+			.tag{
+				display: inline-block;
+				padding: 0 6upx;
+				height: 30upx;
+				background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
+				border-radius: 4upx;
+				margin-right: 10upx;
+				font-size: 22upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				line-height: 30upx;
+				float: left;
+				margin-top: 7upx;
+			}
+		}
+		.intro{
+			font-size: 26upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+			line-height: 36upx;
+			padding: 18upx 0 23upx;
+			border-bottom: 1px solid #f7f7f7;
+		}
+		.safe-box{
+			display: flex;
+			align-items: center;
+			padding-top: 24upx;
+			image{
+				width: 20upx;
+				height: 24upx;
+				margin-right: 20upx;
+			}
+			.text{
+				font-size: 22upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				line-height: 1;
+			}
+			.line{
+				width: 1px;
+				height: 23upx;
+				background: #EDEEEF;
+				margin: 0 20upx;
+			}
+		}
+	}
+	.inventor{
+		height: 88upx;
+		padding: 0 39upx 0 30upx;
+		margin-top: 10upx;
+		background: #FFFFFF;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		.left{
+			display: flex;
+			align-items: center;
+			.head-box{
+				margin-right: 27upx;
+				display: flex;
+				align-items: center;
+				.head{
+					width: 48upx;
+					height: 48upx;
+					border-radius: 50%;
+					overflow: hidden;
+					box-shadow: 0 0 0 1px #fff;
+					margin-right: -10upx;
+					image{
+						width: 100%;
+						height: 100%;
+					}
+				}
+			}
+			.num-box{
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				.text{
+					font-size: 24upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+				}
+			}
+		}
+		.right{
+			font-size: 24upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+			.text{
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #666666;
+			}
+		}
+	}
+	.effect{
+		box-sizing: border-box;
+		padding: 20upx 30upx;
+		background: #FFFFFF;
+		font-size: 28upx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #666666;
+		line-height: 1.8;
+		margin-top: 10upx;
+		display: flex; 
+		flex-direction: row;
+		align-items: center;
+		justify-content: space-between;
+		.label{
+			font-size: 28upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #111111;
+			line-height: 1.8;
+		}
+	}
+	.det-box{
+		margin-top: 10upx;
+		padding: 40upx 30upx 130upx 30upx;
+		background-color: #FFFFFF;
+		.title{
+			font-size: 30upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+			line-height: 1;
+			margin-bottom: 25upx;
+		}
+		
+	}
+	
+	.btn-foot{
+		box-sizing: border-box;
+		width: 100%;
+		height: 121upx;
+		background: #FFFFFF;
+		padding: 0 32upx 0 28upx;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		z-index: 99;
+		.menu-box{
+			display: flex;
+			align-items: center;
+			.item{
+				display: flex;
+				align-items: center;
+				flex-direction: column;
+				margin-right: 48upx;
+				&:last-child{
+					margin-right: 0;
+				}
+				image{
+					width: 36upx;
+					height: 36upx;
+					margin-bottom: 10upx;
+				}
+				.label{
+					font-size: 20upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					text-align: center;
+				}
+			}
+			/deep/.uni-badge--x{
+				display: flex;
+				align-items: center;
+				justify-content: center;
+			}
+			/deep/.uni-badge{
+				border: none;
+				background-color: #FF3636;
+				font-family: Roboto;
+			}
+		}
+		.btn-box{
+			display: flex;
+			align-items: center;
+			.btn{
+				width: 200upx;
+				height: 88upx;
+				line-height: 88upx;
+				text-align: center;
+				border-radius: 44upx;
+				margin-left: 20upx;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				&:first-child{
+					margin-left: 0;
+				}
+				&.cart{
+					background: #FF6633;
+				}
+				&.buy{
+					background: #2BC7B9;
+				}
+			}
+		}
+	}
+	.product-spec{
+		.pro-info{
+			display: flex;
+			align-items: center;
+			.img-box{
+				width: 200upx;
+				height: 200upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				overflow: hidden;
+				margin-right: 30upx;
+				image{
+					width: 100%;
+					height: 100%;
+				}
+			}
+			.info-text{
+				height: 200upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				.price{
+					display: flex;
+					align-items: flex-end;
+					.unit{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1.2;
+						margin-right: 10upx;
+					}
+					.num{
+						font-size: 50upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+				.desc-box{
+					display: flex;
+					flex-direction: column;
+					padding-bottom: 9upx;
+					.text{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						margin-top: 27upx;
+						line-height: 1;
+						&:first-child{
+							margin-top: 0;
+						}
+					}
+				}
+			}
+		}
+		.spec-box{
+			padding-top: 50upx;
+			.title{
+				font-size: 34upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #111111;
+				line-height: 1;
+			}
+			.spec-list{
+				display: flex;
+				flex-wrap: wrap;
+				margin-top: 30upx;
+				.item{
+					box-sizing: border-box;
+					height: 64upx;
+					padding: 0 30upx;
+					line-height: 64upx;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					background: #F7F7F7;
+					border: 1px solid #F7F7F7;
+					border-radius: 32upx;
+					margin-right: 20upx;
+					margin-bottom: 30upx;
+					&.active{
+						background: #F1FFFE;
+						border: 1px solid #8AD5CE;
+						color: #2BC7B9;
+					}
+				}
+			}
+		}
+		.price-num{
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			margin-top: 14upx;
+			.label{
+				font-size: 34upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #111111;
+			}
+			.num-box{
+				display: flex;
+				align-items: center;
+				.img-box{
+					width: 60upx;
+					height: 60upx;
+					// border-radius: 4upx;
+					border: 1px solid #dddddd;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					image{
+						width: 25rpx;
+						height: 25rpx;
+					}
+				}
+				input{
+					width: 60upx;
+					height: 60upx;
+					line-height: 60upx;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					// border-radius: 4upx;
+					border-top: 1px solid #dddddd;
+					border-bottom: 1px solid #dddddd;
+					text-align: center;
+					// margin: 0 16upx;
+				}
+			}
+		}
+		.sub-btn{
+			width: 100%;
+			height: 88upx;
+			line-height: 88upx;
+			text-align: center;
+			font-size: 30upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #FFFFFF;
+			background: #2BC7B9;
+			border-radius: 44upx;
+			margin-top: 30upx;
+			// margin-bottom: 30upx;
+			
+		}
+	}
+	.contact-btn{
+		display: inline-block;
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		opacity: 0;
+		z-index: 9999;
+	}
+</style>

+ 480 - 0
pages_company/order/productList.vue

@@ -0,0 +1,480 @@
+<template>
+	<view class="content">
+		<view class="top-fixed">
+			<!-- 搜索框 -->
+			<view class="search-cont">
+				<view class="inner">
+					<image class="icon-search" src="../../static/images/search.png" mode=""></image>
+					<input type="text" @confirm="goSearch"   :value="form.productName" placeholder="输入药品名称" placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
+				</view>
+				<view class="icon-search">
+					<image @click="showChange(2)" v-if="showType==1"  src="../../static/images/search1.png" mode=""></image>
+					<image @click="showChange(1)" v-if="showType==2"  src="../../static/images/search2.png" mode=""></image>
+					<image @click="openCart()"   src="../../static/images/carts.png" mode=""></image>
+				</view>
+			</view>
+			<!-- 排序框 -->
+			<view class="sort-box">
+				<view class="item" :class="form.defaultOrder=='desc'?'active':''" @click="searchChange('1')">
+					<text class="label">默认</text>
+				</view>
+				<view class="item" @click="searchChange('2')">
+					<text class="label">价格</text>
+					<view class="sort-img">
+						<image v-if="form.priceOrder==null||form.priceOrder=='desc'" src="../../static/images/price_arrow_up.png" mode="" @click="priceUp(true)"></image>
+						<image v-if="form.priceOrder=='asc'" src="../../static/images/price_arrow_up2.png" mode="" @click="priceUp(false)"></image>
+						<image v-if="form.priceOrder==null||form.priceOrder=='asc'" src="../../static/images/price_arrow_down.png" mode="" @click="priceDown(true)"></image>
+						<image v-if="form.priceOrder=='desc'" src="../../static/images/price_arrow_down2.png" mode="" @click="priceDown(false)"></image>
+					</view>
+				</view>
+				<view class="item" @click="searchChange('3')">
+					<text class="label">销量</text>
+					<view class="sort-img">
+						<image v-if="form.salesOrder==null||form.salesOrder=='desc'" src="../../static/images/price_arrow_up.png" mode="" @click="saleUp(true)"></image>
+						<image v-if="form.salesOrder=='asc'" src="../../static/images/price_arrow_up2.png" mode="" @click="saleUp(false)"></image>
+						<image v-if="form.salesOrder==null||form.salesOrder=='asc'" src="../../static/images/price_arrow_down.png" mode="" @click="saleDown(true)"></image>
+						<image v-if="form.salesOrder=='desc'" src="../../static/images/price_arrow_down2.png" mode="" @click="saleDown(false)"></image>
+					</view>
+				</view>
+				<view class="item" :class="form.newOrder=='desc'?'active':''" @click="searchChange('4')">
+					<text class="label">新品</text>
+				</view>
+			</view>
+		</view>
+	 
+		<!-- 数据列表 -->
+		<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 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>
+					<view class="info-box">
+						<view class="title ellipsis2">{{item.productName}}</view>
+						<view class="intro ellipsis">{{item.productInfo}}</view>
+						<view class="prce-num">
+							<view class="price">
+								<text class="unit">¥</text>
+								<text class="num">{{item.price.toFixed(2)}} </text>
+							</view>
+							<view class="cart-img" @click="navgetTo('../shopping/cart')">
+								<view class="sale">已售 {{item.sales}} {{item.unitName}}</view>
+							</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>
+					<view class="info-box">
+						<view class="title ellipsis2">{{item.productName}}</view>
+						<view class="price-box">
+							<view class="now">
+								<text class="unit">¥</text>
+								<text class="num">{{item.price.toFixed(2)}}</text>
+							</view>
+							<view class="old">¥{{item.otPrice.toFixed(2)}}</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</mescroll-body>
+	</view>
+</template>
+
+<script>
+	import {getSalesProducts} from '@/api/companyOrder'
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	export default {
+		mixins: [MescrollMixin], 
+		data() {
+			return {
+				showType:1,
+				form:{
+					defaultOrder:'desc',
+					newOrder:null,
+					priceOrder:null,
+					salesOrder:null,
+					productName:"",
+				},
+				mescroll:null,
+				// 上拉加载的配置
+				upOption: {
+					onScroll:true,
+					use: true, // 是否启用上拉加载; 默认true
+					page: {
+						num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
+						size: 10 // 每页数据的数量,默认10
+					},
+					noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
+					empty: {
+						icon:'/static/images/no_data.png',
+						tip: '暂无数据'
+					},
+					textNoMore:"已经到底了",
+				},
+				// 列表数据
+				dataList: [],
+			};
+		},
+		onLoad(option) {
+			if(option.key!=undefined){
+				this.form.productName = option.key
+			}
+		},
+		methods:{
+			goSearch(e) {
+				this.form.productName=e.detail.value;
+				this.mescroll.resetUpScroll();
+			},
+			searchChange(type){
+				if(type==1){
+					this.form.defaultOrder="desc";
+					this.form.priceOrder=null;
+					this.form.salesOrder=null;
+					this.form.newOrder=null;
+					
+				}
+				else if(type==2){
+					this.form.defaultOrder=null;
+					if(this.form.priceOrder==null){
+						this.form.priceOrder="asc"
+					}
+					else if(this.form.priceOrder=="asc"){
+						this.form.priceOrder="desc"
+					}
+					else if(this.form.priceOrder=="desc"){
+						this.form.priceOrder=null;
+					}
+					this.form.salesOrder=null;
+					this.form.newOrder=null;
+				}
+				else if(type==3){
+					this.form.defaultOrder=null;
+					this.form.priceOrder=null;
+					if(this.form.salesOrder==null){
+						this.form.salesOrder="asc"
+					}
+					else if(this.form.salesOrder=="asc"){
+						this.form.salesOrder="desc"
+					}
+					else if(this.form.salesOrder=="desc"){
+						this.form.salesOrder=null;
+					}
+					this.form.newOrder=null;
+					
+				}
+				else if(type==4){
+					this.form.newOrder="desc";
+					this.form.defaultOrder=null;
+					this.form.priceOrder=null;
+					this.form.salesOrder=null;
+					
+					
+				}
+				this.mescroll.resetUpScroll();
+			},
+			showChange(type){
+				this.showType=type;
+			},
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
+			},
+			/*下拉刷新的回调 */
+			downCallback(mescroll) {
+				mescroll.resetUpScroll()
+			},
+			upCallback(page) {
+				//联网加载数据
+				var that = this;
+				this.form.page=page.num;
+				this.form.pageSize=page.size;
+				getSalesProducts(this.form).then(res => {
+					if(res.code==200){
+						//设置列表数据
+						if (page.num == 1) {
+							that.dataList = res.data.list; 
+							
+						} else {
+							that.dataList = that.dataList.concat(res.data.list);
+							 
+						}
+						that.mescroll.endBySize(res.data.list.length, res.data.total);
+						
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: "请求失败",
+						});
+						that.dataList = null;
+						that.mescroll.endErr();
+					}
+				});
+			},
+			// 价格升序是否选中
+			priceUp(value) {
+				this.priceIsUp = value
+				this.priceIsDown = false
+			},
+			// 价格降序是否选中
+			priceDown(value) {
+				this.priceIsDown = value
+				this.priceIsUp = false
+			},
+			// 销量升序是否选中
+			saleUp(value) {
+				this.saleIsUp = value
+				this.saleIsDown = false
+			},
+			// 销量降序是否选中
+			saleDown(value) {
+				this.saleIsDown = value
+				this.saleIsUp = false
+			},
+			// 查看详情
+			showDetail(item) {
+				uni.navigateTo({
+					url: 'productDetails?productId='+item.productId
+				})
+			},
+			openCart() {
+				uni.navigateTo({
+					url: './cart'
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.top-fixed{
+		width: 100%;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 10;
+	}
+	.search-cont{
+		padding: 16upx 30upx;
+		background-color: #FFFFFF;
+		display:flex;
+		align-items: center;
+		justify-content: space-between;
+		.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;
+			}
+			
+		}
+		.icon-search{
+			height: 40upx;
+			display: flex;
+			align-items: center;
+			image{
+				margin-left: 10upx;
+				width: 40upx;
+				height: 40upx;
+			}
+			
+		}
+	}
+	.sort-box{
+		height: 88upx;
+		background: #FFFFFF;
+		padding: 0 100upx;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		.item{
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			&.active .label{
+				color: #2BC7B9;
+			}
+			.label{
+				font-size: 26upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #666666;
+				line-height: 1;
+			}
+			.sort-img{
+				height: 20upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				margin: 3upx 0 0 10upx;
+				image{
+					width: 12upx;
+					height: 8upx;
+				}
+			}
+		}
+	}
+	.medic-list{
+		padding: 20upx;
+		.item{
+			box-sizing: border-box;
+			min-height: 285upx;
+			background: #FFFFFF;
+			border: 4upx solid #FFFFFF;
+			border-radius: 16upx;
+			margin-bottom: 20upx;
+			padding: 40upx 30upx;
+			display: flex;
+			.img-box{
+				width: 200upx;
+				height: 200upx;
+				margin-right: 30upx;
+				image{
+					width: 100%;
+					height: 100%;
+				}
+			}
+			.info-box{
+				width: calc(100% - 210upx);
+				.title{
+					font-size: 32upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					line-height: 40rpx;
+					height: 80rpx;
+				}
+				.intro{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1;
+					margin-top: 26upx;
+				}
+			 
+				.prce-num{
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					margin-top: 30upx;
+					.price{
+						display: flex;
+						align-items: flex-end;
+						.unit{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #FF6633;
+							line-height: 1.2;
+							margin-right: 4upx;
+						}
+						.num{
+							font-size: 36upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FF6633;
+							line-height: 1;
+						}
+					}
+					.cart-img{
+						.sale{
+							font-size: 20upx;
+							font-family: PingFang SC;
+							color: #999999;
+						}
+						 
+					}
+				}
+			}
+		}
+	}
+	.goods-list{
+		padding: 20upx;
+		display: flex;
+		flex-wrap: wrap;
+		.item{
+			margin-right: 20rpx;
+			margin-bottom: 20rpx;
+			width: 345rpx;
+			background: #FFFFFF;
+			box-shadow: 0px 0px 10rpx 4rpx rgba(199, 199, 199, 0.22);
+			border-radius: 20rpx;
+			overflow: hidden;
+			&:nth-child(2n) {
+				margin-right: 0;
+			}
+			.img-box{
+				width: 100%;
+				height: 334upx;
+				image{
+					width: 100%;
+					height: 100%;
+				}
+			}
+			.info-box{
+				box-sizing: border-box;
+				height: 182upx;
+				padding: 20upx 20upx 30upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				.title{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					line-height: 40upx;
+				}
+				.price-box{
+					display: flex;
+					align-items: flex-end;
+					.now{
+						display: flex;
+						align-items: flex-end;
+						margin-right: 20upx;
+						.unit{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #FF6633;
+							line-height: 1.2;
+							margin-right: 4upx;
+						}
+						.num{
+							font-size: 36upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FF6633;
+							line-height: 1;
+						}
+					}
+					.old{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						text-decoration: line-through;
+						color: #BBBBBB;
+						line-height: 1.1;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 443 - 0
pages_company/order/productShowDetails.vue

@@ -0,0 +1,443 @@
+<template>
+	<view class="content">
+		<!-- 商品轮播图片 -->
+		<view class="shop-banner" @click="showImg()">
+			<swiper
+				class="swiper" 
+				:indicator-dots="false" 
+				:circular="true" 
+				:autoplay="true" 
+				:interval="3000" 
+				:duration="1000"
+				indicator-color="rgba(255, 255, 255, 0.6)"
+				indicator-active-color="#ffffff"
+				@change="swiperChange"
+			>
+				<swiper-item  class="swiper-item" v-for="(item,index) in  banner" :key="index">
+					<image :src="item" mode="aspectFill"></image>
+				</swiper-item>
+			</swiper>
+			<!-- 底部遮罩 -->
+			<view class="banner-mask"></view>
+			<!-- 数量 -->
+			<view class="num-box">{{ activeBanner }}/{{ banner.length }}</view>
+		</view>
+		<!-- 详细信息 -->
+		<view class="det-info">
+			<view class="price-box">
+				<view class="price">
+					<text class="label">会员价</text>
+					<text class="unit">¥</text>
+					<text class="num" >{{product.price}}</text>
+					<text class="label">零售价</text>
+					<text class="old" >¥{{product.otPrice}}</text>
+				</view>
+			</view>
+			<view class="name-box">
+				<view class="tag">{{utils.getDictLabelName("storeProductType",product.productType)}}</view>{{product.productName}}
+			</view>
+			<view class="intro">
+				{{product.productInfo}}
+			</view>
+			<view class="safe-box">
+				<image src="../../static/images/safe.png" mode=""></image>
+				<text class="text">免邮发货</text>
+				<view class="line"></view>
+				<text class="text">药师服务</text>
+				<view class="line"></view>
+				<text class="text">隐私保护</text>
+			</view>
+		</view>
+		<!-- 购买人数、库存 -->
+		<view class="inventor">
+			<view class="left">
+				<!-- <view class="head-box">
+					<view class="head" v-for="(item,j) in 5" :key="j">
+						<image src="../../static/images/head.jpg" mode=""></image>
+					</view>
+				</view> -->
+				<view class="num-box">
+					已有 <text class="text">{{product.sales}}</text> 人购买
+				</view>
+			</view>
+			<!-- <view class="right">
+				库存 <text class="text">{{product.stock}}{{product.unitName}}</text>
+			</view> -->
+		<!-- 	<view class="right">
+				 <text class="text">库存{{product.stock>0?'充足':'售罄'}} </text>
+			</view> -->
+		</view>
+		<!-- 功效 -->
+		<!-- <view class="effect">
+			<view class="label">药品说明书</view>
+			<view class="label">查看</view>
+			
+		</view> -->
+		<!-- 图文详情 -->
+		<view class="det-box">
+			<view class="title">图文详情</view>
+			<view class="inner">
+				<view  v-html="product.description" style="font-size:0"></view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {getDicts} from '@/api/index'
+	import {getProductDetails,getCartCount,addCart} from '@/api/product'
+	export default {
+		components: {
+		},
+		data() {
+			return {
+				banner:[],
+				productId:null,
+				product:{
+					price:0,
+					otPrice:0,
+				},
+				// 当前轮播的图片
+				activeBanner: 0,
+			};
+		},
+		onLoad(options) {
+			this.getDicts();
+			this.productId = options.productId;
+		},
+		onShow() {
+			this.getProductDetails();
+		},
+		 
+		methods: {
+			getDicts:function(){
+				getDicts().then(
+					res => {
+						if(res.code==200){
+							uni.setStorageSync('dicts',JSON.stringify(res));
+						} 
+						 
+					},
+					rej => {}
+				);
+			},
+			showImg() {
+				 //预览图片
+				 uni.previewImage({
+				 	urls: this.banner,
+				 	current: this.banner[0]
+				 });
+			},
+			 
+			getProductDetails(){
+				let data = {productId:this.productId};
+				getProductDetails(data).then(
+					res => {
+						if(res.code==200){
+							this.product=res.product;
+							this.product.otPrice=this.product.otPrice.toFixed(2);
+							this.product.price=this.product.price.toFixed(2);
+							if(this.product.sliderImage!=null){
+								this.banner=this.product.sliderImage.split(',');
+							}
+							else{
+								this.banner=[]
+							}
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+							setTimeout(function(){
+								uni.reLaunch({
+									url: '/pages/home/index',
+								})
+							},2000)
+							
+						}
+					},
+					rej => {}
+				);
+			},
+			// swiper变化事件
+			swiperChange(event) {
+				this.activeBanner = event.detail.current + 1
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.shop-banner{
+		height: 756upx;
+		background-color: #FFFFFF;
+		position: relative;
+		.swiper-item{
+			box-sizing: border-box;
+		}
+		.swiper,
+		.swiper-item,
+		.swiper-item image{
+			width: 100%;
+			height: 100%;
+		}
+		.banner-mask{
+			width: 100%;
+			height: 44upx;
+			// background: linear-gradient(0deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0));
+			// opacity: 0.8;
+			position: absolute;
+			left: 0;
+			bottom: 0;
+			z-index: 9;
+			background-image: url(../../static/images/black_mask.png);
+			background-size: 20upx 44upx;
+			background-repeat: repeat-x;
+		}
+		.num-box{
+			width: 80upx;
+			height: 44upx;
+			line-height: 44upx;
+			text-align: center;
+			font-size: 24upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #FFFFFF;
+			background: rgba(0, 0, 0, .3);
+			border-radius: 22upx;
+			position: absolute;
+			right: 30upx;
+			bottom: 30upx;
+			z-index: 10;
+		}
+	}
+	.det-info{
+		background: #FFFFFF;
+		padding: 36upx 30upx 25upx;
+		.price-box{
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			.price{
+				display: flex;
+				align-items: flex-end;
+				.label{
+					color: #333;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					line-height: 1.3;
+					margin-right: 5upx;
+				}
+				.unit{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FF6633;
+					line-height: 1.3;
+				}
+				.num{
+					font-size: 40upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FF6633;
+					margin: 0 20upx 0 10upx;
+					line-height: 1;
+				}
+				.old{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					text-decoration: line-through;
+					color: #BBBBBB;
+					line-height: 1.3;
+				}
+			}
+			.share-box{
+				width: 120upx;
+				height: 46upx;
+				border: 1px solid #2BC7B9;
+				border-radius: 23upx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				position: relative;
+				.text{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #2BC7B9;
+				}
+				image{
+					margin-left: 2rpx;
+					width: 25upx;
+					height: 24upx;
+				}
+				.share{
+					display: inline-block;
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 100%;
+					height: 100%rpx;
+					opacity: 0;
+				}
+			}
+			.spec{
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				line-height: 36upx;
+			}
+		}
+		.name-box{
+			font-size: 32upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #111111;
+			line-height: 44upx;
+			margin-top: 32upx;
+			.tag{
+				display: inline-block;
+				padding: 0 6upx;
+				height: 30upx;
+				background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
+				border-radius: 4upx;
+				margin-right: 10upx;
+				font-size: 22upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				line-height: 30upx;
+				float: left;
+				margin-top: 7upx;
+			}
+		}
+		.intro{
+			font-size: 26upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+			line-height: 36upx;
+			padding: 18upx 0 23upx;
+			border-bottom: 1px solid #f7f7f7;
+		}
+		.safe-box{
+			display: flex;
+			align-items: center;
+			padding-top: 24upx;
+			image{
+				width: 20upx;
+				height: 24upx;
+				margin-right: 20upx;
+			}
+			.text{
+				font-size: 22upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				line-height: 1;
+			}
+			.line{
+				width: 1px;
+				height: 23upx;
+				background: #EDEEEF;
+				margin: 0 20upx;
+			}
+		}
+	}
+	.inventor{
+		height: 88upx;
+		padding: 0 39upx 0 30upx;
+		margin-top: 10upx;
+		background: #FFFFFF;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		.left{
+			display: flex;
+			align-items: center;
+			.head-box{
+				margin-right: 27upx;
+				display: flex;
+				align-items: center;
+				.head{
+					width: 48upx;
+					height: 48upx;
+					border-radius: 50%;
+					overflow: hidden;
+					box-shadow: 0 0 0 1px #fff;
+					margin-right: -10upx;
+					image{
+						width: 100%;
+						height: 100%;
+					}
+				}
+			}
+			.num-box{
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				.text{
+					font-size: 24upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+				}
+			}
+		}
+		.right{
+			font-size: 24upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+			.text{
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #666666;
+			}
+		}
+	}
+	.effect{
+		box-sizing: border-box;
+		padding: 20upx 30upx;
+		background: #FFFFFF;
+		font-size: 28upx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #666666;
+		line-height: 1.8;
+		margin-top: 10upx;
+		display: flex; 
+		flex-direction: row;
+		align-items: center;
+		justify-content: space-between;
+		.label{
+			font-size: 28upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #111111;
+			line-height: 1.8;
+		}
+	}
+	.det-box{
+		margin-top: 10upx;
+		padding: 40upx 30upx;
+		background-color: #FFFFFF;
+		.title{
+			font-size: 30upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+			line-height: 1;
+			margin-bottom: 25upx;
+		}
+		
+	}
+	
+	 
+	 
+	 
+</style>

+ 438 - 0
pages_company/storeOrder.vue

@@ -0,0 +1,438 @@
+<template>
+	<view>
+		<view class="search-cont">
+			<view class="inner">
+				<image class="icon-search" src="/static/images/search.png" mode=""></image>
+				<input type="text" value="" placeholder="输入订单号" confirm-type="搜索" @confirm="goSearch"   placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
+			</view>
+		</view>
+		<!-- 订单列表 -->
+		<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+			<view class="order-list">
+				<view v-for="(item,index) in dataList" :key="index" class="item" >
+					<!-- 订单号,状态 -->
+					<view class="ordersn-box">
+						<view class="num">订单号:{{item.orderCode}}</view>
+						<view class="status-box">
+							<!-- <view   class="recom-box">推荐订单</view> -->
+							<text   class="text success">
+								{{utils.getDictLabelName("storeOrderStatus",item.status)}}
+							</text>
+						</view>
+					</view>
+					<!-- 药品列表 -->
+					<view class="drug-list"  >
+						<view v-for="(subItem,index) in item.items" :key="index" class="drug-item">
+							<view class="img-box">
+								<image :src="JSON.parse(subItem.jsonInfo).image" mode="aspectFill"></image>
+							</view>
+							<view class="drug-info"  >
+								<view>
+									<view class="name-box ellipsis2">
+										<view v-if="subItem.isPrescribe==1" class="tag">处方药</view>{{JSON.parse(subItem.jsonInfo).productName}}
+									</view>
+									<view class="spec">{{JSON.parse(subItem.jsonInfo).sku}}</view>
+								</view>
+								<view class="num-box">
+									<view class="price">
+										<text class="unit">¥</text>
+										<text class="num" v-if="JSON.parse(subItem.jsonInfo).price!=null">{{JSON.parse(subItem.jsonInfo).price.toFixed(2)}}</text>
+									</view>
+									<view class="amount">x{{JSON.parse(subItem.jsonInfo).num}}</view>
+								</view>
+							</view>
+						</view>
+						<!-- 实付金额、按钮 -->
+						<view class="bottom-box">
+							<view class="amount-paid">
+								<text class="label">实付金额:</text>
+								<view class="price-box">
+									<view class="unit">¥</view>
+									<view class="num" >{{item.payPrice.toFixed(2)}}</view>
+								</view>
+							</view>
+							<view class="btn-box">
+								<view  class="btn pay" @click.stop="showDetail(item)">
+									查看详情
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</mescroll-body>
+	</view>
+</template>
+
+<script>
+	import {getCompanyStoreOrderList} from '@/api/storeOrder'
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	export default {
+		mixins: [MescrollMixin], 
+		data() {
+			return {
+				searchKey:"",
+				mescroll:null,
+				// 上拉加载的配置
+				upOption: {
+					onScroll:true,
+					use: true, // 是否启用上拉加载; 默认true
+					page: {
+						num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
+						size: 10 // 每页数据的数量,默认10
+					},
+					noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
+					empty: {
+						icon:'/static/images/no_data.png',
+						tip: '暂无数据'
+					}
+				},
+				// 列表数据
+				dataList: [],
+			};
+		},
+		onLoad(options) {
+			var that=this;
+			uni.$on('refreshOrder', () => {
+				that.mescroll.resetUpScroll()
+			})
+			this.companyId=options.companyId;
+			this.companyUserId=options.companyUserId;
+		},
+		methods: {
+			goSearch(e) {
+				this.searchKey=e.detail.value;
+				this.mescroll.resetUpScroll()
+			},
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
+			},
+			/*下拉刷新的回调 */
+			downCallback(mescroll) {
+				mescroll.resetUpScroll()
+			},
+			upCallback(page) {
+				//联网加载数据
+				var that = this;
+				var data = {
+					keyword:this.searchKey,
+					companyId:this.companyId,
+					companyUserId:this.companyUserId,
+					page: page.num,
+					pageSize: page.size
+				};
+				getCompanyStoreOrderList(data).then(res => {
+					if(res.code==200){
+						//设置列表数据
+						if (page.num == 1) {
+							that.dataList = res.data.list; 
+							
+						} else {
+							that.dataList = that.dataList.concat(res.data.list);
+							 
+						}
+						that.mescroll.endBySize(res.data.list.length, res.data.total);
+						
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: "请求失败",
+						});
+						that.dataList = null;
+						that.mescroll.endErr();
+					}
+				});
+			},
+			showDetail(item) {
+				uni.navigateTo({
+					url: './storeOrderDetail?id=' + item.id
+				})
+			},
+			// cancel(item){
+			// 	var that=this;
+			// 	uni.showModal({
+			// 	    title: '提示',
+			// 	    content: '确定取消订单吗',
+			// 	    success: function (res) {
+			// 	        if (res.confirm) {
+			// 				var data = {
+			// 					orderId:item.id
+			// 				};
+			// 				cancelOrder(data).then(res => {
+			// 					if(res.code==200){
+			// 						uni.showToast({
+			// 							icon:'success',
+			// 							title: "操作成功",
+			// 						});
+			// 						 that.mescroll.resetUpScroll()
+			// 					}else{
+			// 						uni.showToast({
+			// 							icon:'none',
+			// 							title: res.msg,
+			// 						});
+			// 					}
+			// 				});
+			// 	        } 
+			// 			else if (res.cancel) {
+			// 	        }
+			// 	    }
+			// 	});
+			// },
+			// pay(item) {
+			// 	 uni.navigateTo({
+			// 	 	url: '../shopping/paymentOrder?orderId='+item.id
+			// 	 })
+			// },
+			// 查看物流
+			// showDelivery(item) {
+			// 	uni.navigateTo({
+			// 		url: './storeOrderDelivery?orderId='+item.id
+			// 	})
+			// }
+			
+		}
+	}
+</script>
+
+<style lang="scss">
+	.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;
+			}
+		}
+	}
+	.order-list{
+		padding: 20upx;
+		.item{
+			background: #FFFFFF;
+			border-radius: 16upx;
+			padding: 0 30upx;
+			margin-bottom: 20upx;
+			.ordersn-box{
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				padding: 34upx 0 20upx;
+				.num{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1;
+				}
+				.status-box{
+					display: flex;
+					align-items: center;
+					.recom-box{
+						width: 108upx;
+						height: 30upx;
+						line-height: 30upx;
+						text-align: left;
+						padding-left: 8upx;
+						font-size: 22upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #FFFFFF;
+						background-image: url(../static/images/recom.png);
+						background-repeat: no-repeat;
+						background-size: 100% 100%;
+						margin-right: 8upx;
+					}
+					.text{
+						font-size: 28upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						line-height: 1;
+						&.success{
+							color: #2BC7B9;
+						}
+						&.black{
+							color: #111111;
+						}
+						&.info{
+							color: #999999;
+						}
+					}
+				}
+			}
+			.drug-list{
+				.drug-item{
+					padding: 30upx 0;
+					border-bottom: 1px soli #F0F0F0;
+					display: flex;
+					align-items: center;
+					.img-box{
+						width: 160upx;
+						height: 160upx;
+						margin-right: 30upx;
+						flex-shrink: 0;
+						image{
+							width: 100%;
+							height: 100%;
+						}
+					}
+					.drug-info{
+						width: calc(100% - 190upx);
+						height: 160upx;
+						display: flex;
+						flex-direction: column;
+						justify-content: space-between;
+						.name-box{
+							font-size: 28upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #111111;
+							line-height: 40upx;
+							.tag{
+								display: inline-block;
+								padding: 0 6upx;
+								height: 30upx;
+								background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
+								border-radius: 4upx;
+								margin-right: 10upx;
+								font-size: 22upx;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #FFFFFF;
+								line-height: 30upx;
+								float: left;
+								margin-top: 7upx;
+							}
+						}
+						.spec{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1;
+							margin-top: 10upx;
+						}
+						.num-box{
+							display: flex;
+							align-items: center;
+							justify-content: space-between;
+							.price{
+								display: flex;
+								align-items: flex-end;
+								.unit{
+									font-size: 24upx;
+									font-family: PingFang SC;
+									font-weight: 500;
+									color: #111111;
+									line-height: 1.2;
+									margin-right: 4upx;
+								}
+								.num{
+									font-size: 32upx;
+									font-family: PingFang SC;
+									font-weight: 500;
+									color: #111111;
+									line-height: 1;
+								}
+							}
+							.amount{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #999999;
+								line-height: 1;
+							}
+						}
+					}
+				}
+				.bottom-box{
+					height: 110upx;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					.amount-paid{
+						display: flex;
+						align-items: center;
+						.label{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1;
+						}
+						.price-box{
+							display: flex;
+							align-items: flex-end;
+							.unit{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #FF6633;
+								line-height: 1.2;
+								margin-right: 4upx;
+							}
+							.num{
+								font-size: 32upx;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #FF6633;
+								line-height: 1;
+							}
+						}
+					}
+					.btn-box{
+						box-sizing: border-box;
+						display: flex;
+						align-items: center;
+						.btn{
+							width: 155upx;
+							height: 64upx;
+							line-height: 64upx;
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							text-align: center;
+							border-radius: 32upx;
+							margin-left: 15upx;
+							&:first-child{
+								margin-left: 0;
+							}
+							&.cancel{
+								border: 1px solid #DDDDDD;
+								color: #666666;
+							}
+							&.pay{
+								background: #2BC7B9;
+								color: #FFFFFF;
+								position: relative;
+								.share{
+									display: inline-block;
+									position: absolute;
+									top: 0;
+									left: 0;
+									width: 100%;
+									height: 100%rpx;
+									opacity: 0;
+								}
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+	
+</style>

+ 843 - 0
pages_company/storeOrderDetail.vue

@@ -0,0 +1,843 @@
+<template>
+	<view>
+		<view class="top-cont">
+			<!-- 背景图片 -->
+			<image class="bg" src="/static/images/order_top_bg.png" mode=""></image>
+			<view class="top-inner">			
+				<!-- 这里是状态栏 -->
+				<view class="fixed-top-box">
+					<view class="status_bar" :style="{height: statusBarHeight}"></view>
+					<view class="back-box" @click="back">
+						<image src="../static/images/back_white.png" mode=""></image>
+						<text class="title">订单详情</text>
+						<text></text>
+					</view>
+				</view>
+				
+				<!-- 顶部固定后站位元素 -->
+				<view style="padding-bottom: 88upx;">
+					<view :style="{height: statusBarHeight}"></view>
+				</view>
+				<!-- 订单状态 -->
+				<view class="order-status">
+					<!-- 待付款 -->
+					<view v-if="order.status == 0" class="inner">
+						<view class="img-box">
+							<image src="/static/images/pag96.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">待付款</text>
+							<text class="desc">请在{{payLimitTime}}前完成支付</text>
+						</view>
+					</view>
+					<!-- 待发货 -->
+					<view v-if="order.status == 1" class="inner">
+						<view class="img-box">
+							<image src="/static/images/pag96.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">待发货</text>
+							<text class="desc">等待后台发货</text>
+						</view>
+					</view>
+					<!-- 已发货、待收货 -->
+					<view v-if="order.status == 2" class="inner">
+						<view class="img-box">
+							<image src="/static/images/receipt.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">待收货</text>
+							<text class="desc">运输中</text>
+						</view>
+					</view>
+					<!-- 已完成 -->
+					<view v-if="order.status == 3" class="inner">
+						<view class="img-box">
+							<image src="/static/images/finish96.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">已完成</text>
+							<text class="desc">订单已确认收货,交易完成</text>
+						</view>
+					</view>
+					<!-- 交易取消 -->
+					<!--交易取消 -->
+					<view v-if="order.status == -3" class="inner">
+						<view class="img-box">
+							<image src="/static/images/close_trade.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">交易关闭</text>
+							<text class="desc">订单已取消</text>
+						</view>
+					</view>
+					<view v-if="order.status == -1" class="inner">
+						<view class="img-box">
+							<image src="/static/images/close_trade.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">申请售后</text>
+							<text class="desc">请等待客服审核</text>
+						</view>
+					</view>
+					<view v-if="order.status == -2" class="inner">
+						<view class="img-box">
+							<image src="/static/images/close_trade.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">退款成功</text>
+							<text class="desc">已成功退款</text>
+						</view>
+					</view>
+				</view>
+				<!-- 下单人信息 -->
+				<view class="order-placer">
+					<view class="inner">
+						<image class="location" src="/static/images/location.png" mode=""></image>
+						<view class="info">
+							<view class="name-phone">
+								<text class="text">{{order.realName}}</text>
+								<text class="text" v-if="order.userPhone!=null">{{utils.parsePhone(order.userPhone)}}</text>
+							</view>
+							<view class="address ellipsis2">
+								{{order.userAddress}}
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class="content">
+					<!-- 药品列表 -->
+					<view class="goods-list">
+						<view   v-if="order.isPackage!=1" v-for="(item,index) in items" :key="index" class="item">
+							<view class="img-box">
+								<image :src="JSON.parse(item.jsonInfo).image" mode="aspectFill"></image>
+							</view>
+							<view class="info-box">
+								<view>
+									<view class="name-box ellipsis2">
+										<view v-if="item.isPrescribe==1" class="tag">处方药</view>{{JSON.parse(item.jsonInfo).productName}}
+									</view>
+									<view class="spec">{{JSON.parse(item.jsonInfo).sku}}</view>
+								</view>
+								<view class="price-num">
+									<view class="price">
+										<text class="unit">¥</text>
+										<text class="num">{{JSON.parse(item.jsonInfo).price.toFixed(2)}}</text>
+									</view>
+									<view class="num">x{{JSON.parse(item.jsonInfo).num}}</view>
+								</view>
+							</view>
+						</view>
+						<view  v-if="order.isPackage==1&&order.packageJson!=null"   class="item">
+							<view class="img-box">
+								<image :src="JSON.parse(order.packageJson).imgUrl" mode="aspectFill"></image>
+							</view>
+							<view class="info-box">
+								<view>
+									<view class="name-box ellipsis2">
+										<view class="tag">套餐</view>{{JSON.parse(order.packageJson).title}}
+									</view>
+									<view class="spec">{{JSON.parse(order.packageJson).descs}}</view>
+								</view>
+								 
+							</view>
+						</view>
+						<!-- 已优惠、小计 -->
+						<view class="sub-total">
+							<view class="discount">
+								订单金额:¥{{order.totalPrice}}
+							</view>
+							<text class="label">实付金额:</text>
+							<view class="price">
+								<text class="unit">¥</text>
+								<text class="num">{{order.payPrice}}</text>
+							</view>
+						</view>
+					</view>
+					<!-- 订单信息 -->
+					<view class="order-info">
+						<view class="title">订单信息</view>
+						<view class="item">
+							<text class="label">订单编号</text>
+							<view class="sn-box">
+								<text class="text">{{order.orderCode}}</text>
+								<view class="copy-btn" @click="copyOrderSn(order.orderCode)">复制</view>
+							</view>
+						</view>
+						<view class="item">
+							<text class="label">下单时间</text>
+							<text class="text">{{order.createTime}}</text>
+						</view>
+						<view class="item">
+							<text class="label">支付方式</text>
+							<text class="text" v-if="order.payType==1">微信支付</text>
+							<text class="text" v-if="order.payType==2">物流代收</text>
+						</view>
+						<view   class="item">
+							<text class="label">支付金额</text>
+							<text class="text" v-if="order.payMoney!=null">¥{{order.payMoney.toFixed(2)}}</text>
+						</view>
+						<view   class="item">
+							<text class="label">代收金额</text>
+							<text class="text" v-if="order.payDelivery!=null">¥{{order.payDelivery.toFixed(2)}}</text>
+						</view>
+						<view v-if="order.status>0" class="item">
+							<text class="label">支付时间</text>
+							<text class="text">{{order.payTime}}</text>
+						</view>
+						<!-- <view v-if="order.status >1" class="item">
+							<text class="label">发货时间</text>
+							<text class="text"></text>
+						</view> -->
+						 
+					</view>
+					<!-- 处方信息 -->
+					<view class="order-info" v-if="order.isPrescribe&&prescribe!=null">
+						<view class="title">处方信息</view>
+						<view class="item">
+							<text class="label">处方单号</text>
+							<text class="text">{{prescribe.rpId}}</text>
+						</view>
+						<view class="item">
+							<text class="label">开方医生</text>
+							<text class="text">{{prescribe.doctorName}}</text>
+						</view>
+						<view class="item">
+							<text class="label">电子处方</text>
+							<view class="check-box" @click="showImg()">
+								<text class="text">查看</text>
+								<image src="/static/images/arrow4.png" mode=""></image>
+							</view>
+						</view>
+					</view>
+				</view>
+				
+			</view>
+		</view>
+		<!-- 按钮 -->
+		<view   class="btn-box">
+			<view class="btn share-btn" v-if="order.status==0">
+				支付分享
+				<button  class="share" data-name="shareBtn" open-type="share">分享</button>
+			</view>
+			<view class="btn share-btn" v-if="order.status==0" @click="openEditMoney()">
+				修改定金
+			</view>
+		</view>
+	 
+		<view class="popup-box" v-if="editShow">
+		  <view class="info-mask"  @tap="cancelEditMoney()" ></view>
+		  <view class="info-form"   >
+				<view class="title">修改订金</view>
+				<view class="form-box">
+					<view class="form-item">
+						<text class="label">支付金额</text>
+						<input type="text" @input="moneyChange()" v-model="payMoney" maxlength="10" placeholder="支付金额" class="form-input" />
+					</view>
+					<view class="form-item">
+						<text class="label">代收金额</text>
+						<input type="text" disabled v-model="payDelivery" maxlength="10" placeholder="代收金额" class="form-input" />
+					</view>
+				</view>
+				<view class="btns">
+					<view class="sub-btn" @click="confirmEditMoney()">提交</view>
+				</view>
+		  </view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {getMyStoreOrderById } from '@/api/storeOrder'
+	import {editOrderMoney} from '@/api/companyOrder.js'
+	export default {
+		data() {
+			return {
+				payMoney:0,
+				payDelivery:0,
+				editShow:false,
+				payLimitTime:null,
+				orderId:null,
+				order:{},
+				items:[],
+				prescribe:null,
+				// 状态栏的高度
+				statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
+		 
+			};
+		},
+		onLoad(option) {
+			this.orderId = option.id
+			this.getMyStoreOrderById()
+		},
+		onShareAppMessage(res) {
+			return {
+				title: "订单:"+this.order.orderCode,
+				path: `/pages/shopping/paymentOrder?orderId=${this.order.id}`,
+			}
+		},
+		methods: {
+			moneyChange(){
+				this.payDelivery=this.order.payPrice-this.payMoney
+			},
+			openEditMoney(){
+				console.log(1)
+				this.editShow = true
+			},
+			cancelEditMoney(){
+				this.editShow = false
+			},
+			confirmEditMoney(){
+				if(parseFloat(this.payMoney)>=0){
+					var that=this;
+					var data={orderId:this.order.id,token:uni.getStorageSync('CompanyUserToken'),money:this.payMoney}
+					editOrderMoney(data).then(
+						res => {
+							if(res.code==200){
+								this.editShow = false
+								this.getMyStoreOrderById();
+							}else{
+								uni.showToast({
+									icon:'none',
+									title: res.msg,
+								});
+							}
+						},
+						rej => {}
+					);
+					
+				}
+				else{
+					uni.showToast({
+						icon:'none',
+						title: "支付金额应大于等于0",
+					});
+				}
+			},
+			showImg(){
+				var imgArr = [];
+				imgArr.push(this.prescribe.rpUrl)
+				//预览图片
+				uni.previewImage({
+					urls: imgArr,
+					current: imgArr[0]
+				});
+			},
+			getMyStoreOrderById(){
+				var data={orderId:this.orderId};
+				getMyStoreOrderById(data).then(res => {
+					if(res.code==200){
+						 this.order=res.order;
+						 this.items=res.items;
+						 this.payLimitTime=res.payLimitTime;
+						 this.prescribe=res.prescribe;
+						 this.payMoney=this.order.payMoney;
+						 this.payDelivery=this.order.payDelivery
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: "请求失败",
+						});
+						 
+					}
+				});
+			},
+			express(){
+				uni.navigateTo({
+					url: './storeOrderDelivery?orderId='+this.order.orderId
+				})
+			},
+			 
+			// 返回上一页
+			back() {
+				uni.navigateBack()
+			},
+			// 复制订单编号
+			copyOrderSn(text) {
+				// 复制方法
+				uni.setClipboardData({
+					data:text,
+					success:()=>{
+						uni.showToast({
+							title:'内容已成功复制到剪切板',
+							icon:'none'
+						})
+					}
+				});
+			},
+			 
+		}
+	}
+</script>
+
+<style lang="scss">
+	.fixed-top-box{
+		width: 100%;
+		background: linear-gradient(135deg, #2BC7B9 0%, #60CDC3 100%);
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 1000;
+	}
+	.top-cont{
+		width: 100%;
+		height: 476upx;
+		position: relative;
+		.bg{
+			width: 100%;
+			height: 100%;
+			position: absolute;
+			top: 0;
+			left: 0;
+			z-index: 1;
+		}
+		.top-inner{
+			width: 100%;
+			height: 100%;
+			position: absolute;
+			top: 0;
+			left: 0;
+			z-index: 2;
+			.back-box{
+				height: 88upx;
+				padding-left: 22upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				padding: 0 20upx;
+				image{
+					width: 40upx;
+					height: 40upx;
+				}
+				.title{
+					font-size: 36upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #FFFFFF;
+				}
+			}
+			.order-status{
+				margin-top: 60upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				padding: 0 30upx;
+				.inner{
+					display: flex;
+					align-items: center;
+					.img-box{
+						width: 96upx;
+						height: 96upx;
+						margin-right: 30upx;
+						image{
+							width: 100%;
+							height: 100%;
+						}
+					}
+					.status-box{
+						height: 96upx;
+						display: flex;
+						flex-direction: column;
+						justify-content: center;
+						.status{
+							font-size: 40upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FFFFFF;
+							line-height: 1;
+						}
+						.desc{
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #FFFFFF;
+							line-height: 1;
+							margin-top: 30upx;
+						}
+					}
+				}
+			}
+			.order-placer{
+				margin-top: 50upx;
+				padding: 0 20upx;
+				.inner{
+					box-sizing: border-box;
+					border-radius: 16upx;
+					height: 150upx;
+					padding: 40upx 30upx;
+					display: flex;
+					align-items: center;
+					background: #FFFFFF;
+					.location{
+						width: 24upx;
+						height: 27upx;
+						margin-right: 18upx;
+						flex-shrink: 0;
+					}
+					.info{
+						.name-phone{
+							display: flex;
+							align-items: center;
+							.text{
+								font-size: 28upx;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #333333;
+								line-height: 1;
+								margin-right: 20upx;
+								&:last-child{
+									margin-right: 0;
+								}
+							}
+						}
+						.address{
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1.3;
+							margin-top: 10upx;
+						}
+					}
+				}
+				
+			}
+		}
+	}
+	.content{
+		margin: 20rpx 0rpx;
+		padding: 0 20upx 140rpx 20upx;
+		.goods-list{
+			padding: 0 30upx;
+			background-color: #FFFFFF;
+			border-radius: 16upx;
+			.item{
+				padding: 30upx 0;
+				border-bottom: 1px solid #EDEEEF;
+				display: flex;
+				align-items: center;
+				.img-box{
+					width: 160upx;
+					height: 160upx;
+					margin-right: 30upx;
+					image{
+						width: 100%;
+						height: 100%;
+					}
+				}
+				.info-box{
+					width: calc(100% - 190upx);
+					height: 160upx;
+					display: flex;
+					flex-direction: column;
+					justify-content: space-between;
+					.name-box{
+						font-size: 28upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #111111;
+						line-height: 40upx;
+						.tag{
+							display: inline-block;
+							padding: 0 6upx;
+							height: 30upx;
+							background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
+							border-radius: 4upx;
+							margin-right: 10upx;
+							font-size: 22upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FFFFFF;
+							line-height: 30upx;
+							float: left;
+							margin-top: 7upx;
+						}
+					}
+					.spec{
+						margin-top: 18upx;
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						line-height: 1;
+					}
+					.price-num{
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						.price{
+							display: flex;
+							align-items: flex-end;
+							.unit{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1.2;
+								margin-right: 4upx;
+							}
+							.num{
+								font-size: 32upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1;
+							}
+						}
+						.num{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1;
+						}
+					}
+				}
+			}
+			.sub-total{
+				height: 88upx;
+				display: flex;
+				align-items: center;
+				justify-content: flex-end;
+				.discount{
+					font-size: 24upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1;
+					margin-right: 30upx;
+				}
+				.label{
+					font-size: 24upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+				}
+				.price{
+					display: flex;
+					align-items: flex-end;
+					.unit{
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #FF6633;
+						line-height: 1.2;
+						margin-right: 4upx;
+					}
+					.num{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+			}
+		}
+		.order-info{
+			margin-top: 20upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			padding: 40upx 30upx;
+			.title{
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #222222;
+				line-height: 1;
+			}
+			.item{
+				margin-top: 40upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				.label{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					line-height: 1;
+				}
+				.text{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #222222;
+					line-height: 32upx;
+				}
+				.cont-text{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					.bold{
+						color: #111111;
+					}
+				}
+				.sn-box{
+					display: flex;
+					align-items: center;
+					.copy-btn{
+						width: 58upx;
+						height: 32upx;
+						line-height: 32upx;
+						text-align: center;
+						font-size: 22upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #222222;
+						background: #F5F5F5;
+						border-radius: 4upx;
+						margin-left: 24upx;
+					}
+				}
+				.check-box{
+					display: flex;
+					align-items: center;
+					image{
+						width: 14upx;
+						height: 24upx;
+						margin-left: 10upx;
+					}
+				}
+			}
+			.line{
+				width: 100%;
+				height: 1px;
+				background: #F0F0F0;
+				margin-top: 30upx;
+			}
+		}
+	}
+	.btn-box{
+		z-index: 999;
+		bottom: 0;
+		width: 100%;
+		position: fixed;
+		height: 120upx;
+		box-sizing: border-box;
+		background: #FFFFFF;
+		padding: 0 30upx;
+		display: flex;
+		align-items: center;
+		justify-content: flex-end;
+		.btn{
+			width: 155upx;
+			height: 64upx;
+			line-height: 64upx;
+			font-size: 26upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			text-align: center;
+			border-radius: 32upx;
+			margin-left: 15upx;
+			&.share-btn{
+				background: #2BC7B9;
+				color: #FFFFFF;
+				position: relative;
+				.share{
+					display: inline-block;
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 100%;
+					height: 100%rpx;
+					opacity: 0;
+				}
+				
+			}
+		}
+	}
+	.popup-box{
+		position: fixed;
+		top: 0;
+		right: 0;
+		left: 0;
+		bottom: 0;
+		z-index: 999;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		.info-mask {
+			position: fixed;
+			top: 0;
+			right: 0;
+			bottom: 0;
+			left: 0;
+			background-color: rgba($color: #000000, $alpha: 0.5);
+			z-index: 999;
+		}
+		.info-form {
+			z-index: 1000;
+			width: 650rpx;
+			display: flex;
+			flex-direction: column;
+			justify-content: center;
+			align-items: center;
+			padding: 0 30upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			.title{
+				padding: 30rpx 0rpx 15rpx;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				font-size: 40upx;
+				line-height: 44upx;
+				font-family: PingFang SC;
+				color: #222222;
+			}
+			.form-box{
+				width: 100%;
+				.form-item{
+					padding: 30upx 0;
+					display: flex;
+					align-items: flex-start;
+					border-bottom: 1px solid #F1F1F1;
+					.label{
+						width: 160upx;
+						text-align: left;
+						font-size: 30upx;
+						line-height: 44upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #222222;
+						flex-shrink: 0;
+					}
+					input{
+						text-align: left;
+					}
+					.form-input{
+						font-size: 34upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #222222;
+						text-align: left;
+					}
+					 
+				}
+			}
+			.btns{
+				width: 100%;
+				height: 120upx;
+				padding: 0 30upx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				.sub-btn{
+					width: 100%;
+					height: 88upx;
+					line-height: 88upx;
+					text-align: center;
+					font-size: 30upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FFFFFF;
+					background: #2BC7B9;
+					border-radius: 44upx;
+				}
+			}
+			
+		}
+	}
+</style>

+ 495 - 0
pages_company/storeProductPackage.vue

@@ -0,0 +1,495 @@
+<template>
+	<view >
+		<view class="top-fixed">
+			<view class="search-cont">
+				<view class="inner">
+					<image class="icon-search" src="/static/images/search.png" mode=""></image>
+					<input type="text" @confirm="goSearch"   :value="form.title" placeholder="输入套餐名称" placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
+				</view>
+			</view>
+			<view class="cate-list">
+			<!-- 关键字列表 -->
+			<scroll-view   scroll-x="true" >
+				<view class="inner">
+					<view v-for="(item,index) in cates" :key="index" :class="cateId == item.dictValue?'item active':'item'" @click="choseCate(item)">
+						{{ item.dictLabel }}
+					</view>
+				</view>
+			</scroll-view>
+			</view>
+		</view>
+		
+		<mescroll-body top="204rpx" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+			<view class="order-list">
+				<view  v-for="(item,index) in dataList" :key="index" class="item" >
+					<view class="ordersn-box">
+						<view class="title">{{item.title}}</view>
+					</view>
+					<!-- 药品列表 -->
+					<view class="drug-list"  >
+						<view v-for="(subItem,subIndex) in item.productList" :key="subIndex" class="drug-item" :class="item.displayMore==0?'hide':'show'">
+							<view class="img-box">
+								<image :src="subItem.image" mode="aspectFill"></image>
+							</view>
+							<view class="drug-info"  >
+								<view>
+									<view class="name-box ellipsis2">
+										{{subItem.productName}}
+									</view>
+									<view class="spec">{{subItem.sku}}</view>
+								</view>
+								<view class="num-box">
+									<view class="price">
+										<text class="unit">¥</text>
+										<text class="num">{{subItem.price.toFixed(2)}}</text>
+									</view>
+									<view class="amount">x{{subItem.count}}</view>
+								</view>
+							</view>
+						</view>
+						<view class="display-more" @click="showMore(item)" >{{item.displayText}}</view>
+						<!-- 实付金额、按钮 -->
+						<view class="bottom-box">
+							<view class="amount-paid">
+								<text class="label">套餐价格:</text>
+								<view class="price-box">
+									<view class="unit">¥</view>
+									<view class="num" >{{item.payMoney.toFixed(2)}}</view>
+								</view>
+							</view>
+							<view class="btn-box">
+								<view  class="btn pay" @click.stop="showDetail(item)">
+									查看详情
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</mescroll-body>
+	</view>
+</template>
+
+<script>
+	import {getStoreProductPackage} from '@/api/storeProductPackage.js'
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	export default {
+		mixins: [MescrollMixin], 
+		data() {
+			return {
+				displayMore:false,
+				displayText:"点击查看方案明细",
+				cates:[],
+				cateId:0,
+				searchKey:"",
+				mescroll:null,
+				// 上拉加载的配置
+				upOption: {
+					onScroll:true,
+					use: true, // 是否启用上拉加载; 默认true
+					page: {
+						num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
+						size: 10 // 每页数据的数量,默认10
+					},
+					noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
+					empty: {
+						icon:'/static/images/no_data.png',
+						tip: '暂无数据'
+					}
+				},
+				// 列表数据
+				dataList: [],
+			};
+		},
+		onLoad(options) {
+			var that=this;
+			uni.$on('refreshOrder', () => {
+				that.mescroll.resetUpScroll()
+			})
+			this.companyId=options.companyId;
+			this.companyUserId=options.companyUserId;
+			this.cates=this.utils.getDict("storeProductPackageCate");
+		},	
+		methods: {
+			showMore(item){
+				if(item.displayMore==1){
+					item.displayMore=0
+				}
+				else{
+					item.displayMore=1
+				}
+				item.displayText=item.displayMore==1?'收起':'点击查看方案明细'
+				 
+			},
+			choseCate(item){
+				this.cateId = item.dictValue;
+				this.mescroll.resetUpScroll()
+			},
+			goSearch(e) {
+				this.searchKey=e.detail.value;
+				this.mescroll.resetUpScroll()
+				 
+			},
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
+			},
+			/*下拉刷新的回调 */
+			downCallback(mescroll) {
+				mescroll.resetUpScroll()
+			},
+			upCallback(page) {
+				//联网加载数据
+				var that = this;
+				var data = {
+					cateId:this.cateId,
+					title:this.searchKey,
+					companyId:this.companyId,
+					page: page.num,
+					pageSize: page.size
+				};
+				getStoreProductPackage(data).then(res => {
+					if(res.code==200){
+						//设置列表数据
+						res.data.list.forEach(function(element) {
+						   element.displayMore=0
+						   element.displayText='点击查看方案明细'
+						   
+						});
+						if (page.num == 1) {
+							that.dataList = res.data.list; 
+							
+						} else {
+							that.dataList = that.dataList.concat(res.data.list);
+							 
+						}
+						that.dataList.forEach(function(value, index, arr) {
+							
+						});
+						that.mescroll.endBySize(res.data.list.length, res.data.total);
+						
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: "请求失败",
+						});
+						that.dataList = null;
+						that.mescroll.endErr();
+					}
+				});
+			},
+			showDetail(item) {
+				uni.navigateTo({
+					url: './storeProductPackageDetails?packageId=' + item.packageId+"&companyId="+this.companyId+"&companyUserId="+this.companyUserId
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.top-fixed{
+		width: 100%;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 10;
+		.search-cont{
+			padding: 16upx 30upx;
+			background-color: #FFFFFF;
+			display:flex;
+			align-items: center;
+			justify-content: space-between;
+			.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;
+				}
+				
+			}
+			 
+		}
+		.cate-list{
+			box-sizing: border-box;
+			background: #fff;
+			padding: 10upx 27upx;
+			height: 100upx;
+			.inner{
+				display: flex;
+			}
+			.item{
+				flex-shrink: 0;
+				padding: 0 24upx;
+				height: 64upx;
+				line-height: 64upx;
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #2BC7B9;
+				background: #F5FFFE;
+				border: 1px solid #8AD5CE;
+				border-radius: 32upx;
+				margin: 0 20upx 20upx 0;
+				&.active{
+					color: #FFFFFF;
+					background: #2BC7B9;
+					border: 1px solid #2BC7B9;
+				}
+			}
+		}
+	}
+	 
+	.order-list{
+		padding: 20upx;
+		 
+		.item{
+			background: #FFFFFF;
+			border-radius: 16upx;
+			padding: 0 30upx;
+			margin-bottom: 20upx;
+			.ordersn-box{
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				padding: 34upx 0 20upx;
+				.title{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+				}
+				// .num{
+				// 	font-size: 26upx;
+				// 	font-family: PingFang SC;
+				// 	font-weight: 500;
+				// 	color: #999999;
+				// 	line-height: 1;
+				// }
+				.status-box{
+					display: flex;
+					align-items: center;
+					.recom-box{
+						width: 108upx;
+						height: 30upx;
+						line-height: 30upx;
+						text-align: left;
+						padding-left: 8upx;
+						font-size: 22upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #FFFFFF;
+						background-image: url(../static/images/recom.png);
+						background-repeat: no-repeat;
+						background-size: 100% 100%;
+						margin-right: 8upx;
+					}
+					.text{
+						font-size: 28upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						line-height: 1;
+						&.success{
+							color: #2BC7B9;
+						}
+						&.black{
+							color: #111111;
+						}
+						&.info{
+							color: #999999;
+						}
+					}
+				}
+			}
+			.drug-list{
+				.drug-item{
+					padding: 30upx 0;
+					border-bottom: 1px soli #F0F0F0;
+					display: flex;
+					align-items: center;
+					
+					.img-box{
+						width: 160upx;
+						height: 160upx;
+						margin-right: 30upx;
+						flex-shrink: 0;
+						image{
+							width: 100%;
+							height: 100%;
+						}
+					}
+					.drug-info{
+						width: calc(100% - 190upx);
+						height: 160upx;
+						display: flex;
+						flex-direction: column;
+						justify-content: space-between;
+						.name-box{
+							font-size: 28upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #111111;
+							line-height: 40upx;
+							.tag{
+								display: inline-block;
+								padding: 0 6upx;
+								height: 30upx;
+								background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
+								border-radius: 4upx;
+								margin-right: 10upx;
+								font-size: 22upx;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #FFFFFF;
+								line-height: 30upx;
+								float: left;
+								margin-top: 7upx;
+							}
+						}
+						.spec{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1;
+							margin-top: 10upx;
+						}
+						.num-box{
+							display: flex;
+							align-items: center;
+							justify-content: space-between;
+							.price{
+								display: flex;
+								align-items: flex-end;
+								.unit{
+									font-size: 24upx;
+									font-family: PingFang SC;
+									font-weight: 500;
+									color: #111111;
+									line-height: 1.2;
+									margin-right: 4upx;
+								}
+								.num{
+									font-size: 32upx;
+									font-family: PingFang SC;
+									font-weight: 500;
+									color: #111111;
+									line-height: 1;
+								}
+							}
+							.amount{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #999999;
+								line-height: 1;
+							}
+						}
+					}
+				}
+				.show{
+					visibility: flex;
+				}
+				.hide{
+					display: none;
+				}
+				.display-more{
+					font-size: 24upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+				}
+				.bottom-box{
+					height: 110upx;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					.amount-paid{
+						display: flex;
+						align-items: center;
+						.label{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1;
+						}
+						.price-box{
+							display: flex;
+							align-items: flex-end;
+							.unit{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #FF6633;
+								line-height: 1.2;
+								margin-right: 4upx;
+							}
+							.num{
+								font-size: 32upx;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #FF6633;
+								line-height: 1;
+							}
+						}
+					}
+					.btn-box{
+						box-sizing: border-box;
+						display: flex;
+						align-items: center;
+						.btn{
+							width: 155upx;
+							height: 64upx;
+							line-height: 64upx;
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							text-align: center;
+							border-radius: 32upx;
+							margin-left: 15upx;
+							&:first-child{
+								margin-left: 0;
+							}
+							&.cancel{
+								border: 1px solid #DDDDDD;
+								color: #666666;
+							}
+							&.pay{
+								background: #2BC7B9;
+								color: #FFFFFF;
+								position: relative;
+								.share{
+									display: inline-block;
+									position: absolute;
+									top: 0;
+									left: 0;
+									width: 100%;
+									height: 100%rpx;
+									opacity: 0;
+								}
+							}
+						}
+					}
+				}
+			}
+		}
+		
+	}
+	
+</style>

+ 911 - 0
pages_company/storeProductPackageDetails.vue

@@ -0,0 +1,911 @@
+<template>
+	<view class="content">
+		<!-- 商品轮播图片 -->
+		<view class="shop-banner" @click="showImg()">
+			<swiper
+				class="swiper" 
+				:indicator-dots="false" 
+				:circular="true" 
+				:autoplay="true" 
+				:interval="3000" 
+				:duration="1000"
+				indicator-color="rgba(255, 255, 255, 0.6)"
+				indicator-active-color="#ffffff"
+				@change="swiperChange"
+			>
+				<swiper-item  class="swiper-item" v-for="(item,index) in  banner" :key="index">
+					<image :src="item" mode="aspectFit"></image>
+				</swiper-item>
+			</swiper>
+			<!-- 底部遮罩 -->
+			<view class="banner-mask"></view>
+			<!-- 数量 -->
+			<view class="num-box">{{ activeBanner }}/{{ banner.length }}</view>
+		</view>
+		<!-- 详细信息 -->
+		<view class="det-info">
+			<view class="price-box">
+				
+				<view class="price">
+					<text class="label">会员价</text>
+					<text class="unit">¥</text>
+					<text class="num" v-if="package!=null" >{{package.payMoney.toFixed(2)}}</text>
+					<text class="label">零售价</text>
+					<text class="old" v-if="package!=null" >¥{{package.money.toFixed(2)}}</text>
+				</view>
+			</view>
+			 <view class="name-box">
+			 	 {{package.title}}
+			 </view>
+			<view class="intro">
+				{{package.descs}}
+			</view>
+		</view>
+		<!-- <view class="drug-box">
+			<view class="title">组合套餐</view>
+			<view class="inner">
+				<view class="drug-list"  >
+					<view v-for="(subItem,index) in products" :key="index" class="drug-item">
+						<view class="img-box">
+							<image :src="subItem.image" mode="aspectFill"></image>
+						</view>
+						<view class="drug-info"  >
+							<view>
+								<view class="name-box ellipsis2">
+									{{subItem.productName}}
+								</view>
+								<view class="spec">{{subItem.sku}}</view>
+							</view>
+							<view class="num-box">
+								<view class="price">
+									<text class="unit">¥</text>
+									<text class="num">{{subItem.price.toFixed(2)}}</text>
+								</view>
+								<view class="amount">x{{subItem.count}}</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view> -->
+		<!-- 图文详情 -->
+		<view class="det-box">
+			<view class="title">图文详情</view>
+			<view class="inner">
+				<view  v-html="package.content" style="font-size:0" ></view>
+			</view>
+		</view>
+		<!-- 底部按钮 -->
+		<view class="btn-foot">
+			<view class="menu-box">
+				<view class="item" @click="goHome">
+					<image src="/static/images/back_home.png" mode=""></image>
+					<text class="label">首页</text>
+				</view>
+				<view class="item" style="position: relative;">
+					<image src="/static/images/consult_small.png" mode=""></image>
+					<text class="label">咨询</text>
+					<button class="contact-btn" open-type="contact"></button>
+				</view>
+				 
+			</view>
+			<view class="btn-box">
+				<view class="btn buy" @click="buy">立即购买</view>
+			</view>
+		</view>
+		<view class="message-box" v-if="messageShow">
+			<view class="left">
+				<image src="/static/images/close24.png" mode="" @click="closeOrder()" ></image>
+				<view class="text ellipsis">您有{{count0}}个待支付订单</view>
+			</view>
+			<view class="btn" @click="showOrder()">查看</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {getOrderCount} from '@/api/storeOrder'
+	import {getStoreProductPackageDetails} from '@/api/storeProductPackage'
+	export default {
+		data() {
+			return {
+				count0:0,
+				messageShow:false,
+				banner:[],
+				packageId:null,
+				package:null,
+				products:[],
+				// 当前轮播的图片
+				activeBanner: 1,
+				 
+			};
+		},
+		onLoad(options) {
+			if (options.hasOwnProperty('q') && options.q) {
+				// 通过下面这步解码,可以拿到url的值
+				const url = decodeURIComponent(options.q)
+				this.url=url;
+				// // 对url中携带的参数提取处理
+				const obj = this.utils.urlToObj(url)
+				this.packageId = obj.packageId;
+				this.companyId = obj.companyId;
+				this.companyUserId = obj.companyUserId;
+			}
+			else{
+				this.packageId = options.packageId;
+				this.companyId = options.companyId;
+				this.companyUserId = options.companyUserId;
+			}
+			uni.showShareMenu({
+				withShareTicket:true,
+				//小程序的原生菜单中显示分享按钮,才能够让发送给朋友与分享到朋友圈两个按钮可以点击
+				menus:["shareAppMessage","shareTimeline"] //不设置默认发送给朋友
+			})
+			
+			
+		},
+		//发送给朋友
+		onShareAppMessage(res) {
+			return {
+				title: this.package.title,
+				path: `/pages_company/storeProductPackageDetails?packageId=${this.package.packageId}`+"&companyId="+this.companyId+"&companyUserId="+this.companyUserId,
+				imageUrl: this.package.imgUrl //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+			}
+		},
+		//分享到朋友圈
+		onShareTimeline(res) {
+			return {
+				title: this.package.title,
+				query:'packageId='+this.package.packageId+"&companyId="+this.companyId+"&companyUserId="+this.companyUserId,//页面参数
+				imageUrl: this.package.imgUrl //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+			}
+		},
+		onShow() {
+			console.log("onshow")
+			if(this.utils.isLogin()){
+				this.getOrderCount();
+			}
+			this.getStoreProductPackageDetails();
+		},
+		methods: {
+			getOrderCount(){
+				getOrderCount().then(
+					res => {
+						if(res.code==200){
+							this.count0=res.count0;
+							if(this.count0>0){
+								this.messageShow=true;
+							}
+						} 
+					},
+					rej => {}
+				);
+			},
+			showOrder(){
+				this.utils.isLogin().then(res => {
+					if(res){
+						uni.navigateTo({
+							url: '/pages_user/user/storeOrder?status=0'
+						})
+					}
+				})
+			},
+			closeOrder(){
+				this.messageShow=false;
+			},
+			showImg() {
+				 //预览图片
+				 uni.previewImage({
+				 	urls: this.banner,
+				 	current: this.banner[0]
+				 });
+			},
+			 
+			getStoreProductPackageDetails(){
+				let data = {packageId:this.packageId};
+				getStoreProductPackageDetails(data).then(
+					res => {
+						if(res.code==200){
+							this.package=res.data;
+							if(this.package.images!=null){
+								this.banner=this.package.images.split(',')
+							}
+							else{
+								this.banner=[]
+							}
+							this.products=JSON.parse(this.package.products);
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			//swiper变化事件
+			swiperChange(event) {
+				this.activeBanner = event.detail.current + 1
+			},
+			buy() {
+				this.utils.isLogin().then(res => {
+					if(res){
+						uni.navigateTo({
+							url: '/pages/shopping/confirmPackageOrder?packageId='+this.packageId+"&companyUserId="+this.companyUserId
+						})
+					}
+				})
+				
+			},
+			//回到首页
+			goHome() {
+				uni.switchTab({
+					url: '/pages/home/index'
+				})
+			},
+			//跳转页面
+			navgetTo(url) {
+				this.utils.isLogin().then(res => {
+					if(res){
+						uni.navigateTo({
+							url: url
+						})
+					}
+				})
+			},
+			 
+		}
+	}
+</script>
+
+<style lang="scss">
+	.shop-banner{
+		height: 756upx;
+		background-color: #FFFFFF;
+		position: relative;
+		.swiper-item{
+			box-sizing: border-box;
+		}
+		.swiper,
+		.swiper-item,
+		.swiper-item image{
+			width: 100%;
+			height: 100%;
+		}
+		.banner-mask{
+			width: 100%;
+			height: 44upx;
+			// background: linear-gradient(0deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0));
+			// opacity: 0.8;
+			position: absolute;
+			left: 0;
+			bottom: 0;
+			z-index: 9;
+			background-image: url(/static/images/black_mask.png);
+			background-size: 20upx 44upx;
+			background-repeat: repeat-x;
+		}
+		.num-box{
+			width: 80upx;
+			height: 44upx;
+			line-height: 44upx;
+			text-align: center;
+			font-size: 24upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #FFFFFF;
+			background: rgba(0, 0, 0, .3);
+			border-radius: 22upx;
+			position: absolute;
+			right: 30upx;
+			bottom: 30upx;
+			z-index: 10;
+		}
+	}
+	.det-info{
+		background: #FFFFFF;
+		padding: 36upx 30upx 25upx;
+		.price-box{
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			.price{
+				display: flex;
+				align-items: flex-end;
+				.label{
+					color: #333;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					line-height: 1.3;
+					margin-right: 5upx;
+				}
+				.unit{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FF6633;
+					line-height: 1.3;
+				}
+				.num{
+					font-size: 40upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FF6633;
+					margin: 0 20upx 0 10upx;
+					line-height: 1;
+				}
+				.old{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					text-decoration: line-through;
+					color: #BBBBBB;
+					line-height: 1.3;
+				}
+			}
+			.share-box{
+				width: 120upx;
+				height: 46upx;
+				border: 1px solid #2BC7B9;
+				border-radius: 23upx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				position: relative;
+				.text{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #2BC7B9;
+				}
+				image{
+					margin-left: 2rpx;
+					width: 25upx;
+					height: 24upx;
+				}
+				.share{
+					display: inline-block;
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 100%;
+					height: 100%rpx;
+					opacity: 0;
+				}
+			}
+			.spec{
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				line-height: 36upx;
+			}
+		}
+		.name-box{
+			font-size: 32upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #111111;
+			line-height: 44upx;
+			margin-top: 32upx;
+			.tag{
+				display: inline-block;
+				padding: 0 6upx;
+				height: 30upx;
+				background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
+				border-radius: 4upx;
+				margin-right: 10upx;
+				font-size: 22upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				line-height: 30upx;
+				float: left;
+				margin-top: 7upx;
+			}
+		}
+		.intro{
+			font-size: 26upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+			line-height: 36upx;
+			padding: 18upx 0;
+			// border-bottom: 1px solid #f7f7f7;
+		}
+		.safe-box{
+			display: flex;
+			align-items: center;
+			padding-top: 24upx;
+			image{
+				width: 20upx;
+				height: 24upx;
+				margin-right: 20upx;
+			}
+			.text{
+				font-size: 22upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				line-height: 1;
+			}
+			.line{
+				width: 1px;
+				height: 23upx;
+				background: #EDEEEF;
+				margin: 0 20upx;
+			}
+		}
+	}
+	.inventor{
+		height: 88upx;
+		padding: 0 39upx 0 30upx;
+		margin-top: 10upx;
+		background: #FFFFFF;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		.left{
+			display: flex;
+			align-items: center;
+			.head-box{
+				margin-right: 27upx;
+				display: flex;
+				align-items: center;
+				.head{
+					width: 48upx;
+					height: 48upx;
+					border-radius: 50%;
+					overflow: hidden;
+					box-shadow: 0 0 0 1px #fff;
+					margin-right: -10upx;
+					image{
+						width: 100%;
+						height: 100%;
+					}
+				}
+			}
+			.num-box{
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				.text{
+					font-size: 24upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+				}
+			}
+		}
+		.right{
+			font-size: 24upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+			.text{
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #666666;
+			}
+		}
+	}
+	.effect{
+		box-sizing: border-box;
+		padding: 20upx 30upx;
+		background: #FFFFFF;
+		font-size: 28upx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #666666;
+		line-height: 1.8;
+		margin-top: 10upx;
+		display: flex; 
+		flex-direction: row;
+		align-items: center;
+		justify-content: space-between;
+		.label{
+			font-size: 28upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #111111;
+			line-height: 1.8;
+		}
+	}
+	.det-box{
+		margin-top: 10upx;
+		padding: 40upx 30upx 130upx 30upx;
+		background-color: #FFFFFF;
+		.title{
+			font-size: 30upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+			line-height: 1;
+			margin-bottom: 25upx;
+		}
+		
+	}
+	
+	.btn-foot{
+		box-sizing: border-box;
+		width: 100%;
+		height: 121upx;
+		background: #FFFFFF;
+		padding: 0 32upx 0 28upx;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		z-index: 99;
+		.menu-box{
+			display: flex;
+			align-items: center;
+			.item{
+				display: flex;
+				align-items: center;
+				flex-direction: column;
+				margin-right: 48upx;
+				&:last-child{
+					margin-right: 0;
+				}
+				image{
+					width: 36upx;
+					height: 36upx;
+					margin-bottom: 10upx;
+				}
+				.label{
+					font-size: 20upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					text-align: center;
+				}
+			}
+			/deep/.uni-badge--x{
+				display: flex;
+				align-items: center;
+				justify-content: center;
+			}
+			/deep/.uni-badge{
+				border: none;
+				background-color: #FF3636;
+				font-family: Roboto;
+			}
+		}
+		.btn-box{
+			display: flex;
+			align-items: center;
+			.btn{
+				width: 200upx;
+				height: 88upx;
+				line-height: 88upx;
+				text-align: center;
+				border-radius: 44upx;
+				margin-left: 20upx;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				&:first-child{
+					margin-left: 0;
+				}
+				&.cart{
+					background: #FF6633;
+				}
+				&.buy{
+					background: #2BC7B9;
+				}
+			}
+		}
+	}
+	.product-spec{
+		.pro-info{
+			display: flex;
+			align-items: center;
+			.img-box{
+				width: 200upx;
+				height: 200upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				overflow: hidden;
+				margin-right: 30upx;
+				image{
+					width: 100%;
+					height: 100%;
+				}
+			}
+			.info-text{
+				height: 200upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				.price{
+					display: flex;
+					align-items: flex-end;
+					.unit{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1.2;
+						margin-right: 10upx;
+					}
+					.num{
+						font-size: 50upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+				.desc-box{
+					display: flex;
+					flex-direction: column;
+					padding-bottom: 9upx;
+					.text{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						margin-top: 27upx;
+						line-height: 1;
+						&:first-child{
+							margin-top: 0;
+						}
+					}
+				}
+			}
+		}
+		.spec-box{
+			padding-top: 50upx;
+			.title{
+				font-size: 34upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #111111;
+				line-height: 1;
+			}
+			.spec-list{
+				display: flex;
+				flex-wrap: wrap;
+				margin-top: 30upx;
+				.item{
+					box-sizing: border-box;
+					height: 64upx;
+					padding: 0 30upx;
+					line-height: 64upx;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					background: #F7F7F7;
+					border: 1px solid #F7F7F7;
+					border-radius: 32upx;
+					margin-right: 20upx;
+					margin-bottom: 30upx;
+					&.active{
+						background: #F1FFFE;
+						border: 1px solid #8AD5CE;
+						color: #2BC7B9;
+					}
+				}
+			}
+		}
+		.price-num{
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			margin-top: 14upx;
+			.label{
+				font-size: 34upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #111111;
+			}
+			.num-box{
+				display: flex;
+				align-items: center;
+				.img-box{
+					width: 60upx;
+					height: 60upx;
+					// border-radius: 4upx;
+					border: 1px solid #dddddd;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					image{
+						width: 25rpx;
+						height: 25rpx;
+					}
+				}
+				input{
+					width: 60upx;
+					height: 60upx;
+					line-height: 60upx;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					// border-radius: 4upx;
+					border-top: 1px solid #dddddd;
+					border-bottom: 1px solid #dddddd;
+					text-align: center;
+					// margin: 0 16upx;
+				}
+			}
+		}
+		.sub-btn{
+			width: 100%;
+			height: 88upx;
+			line-height: 88upx;
+			text-align: center;
+			font-size: 30upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #FFFFFF;
+			background: #2BC7B9;
+			border-radius: 44upx;
+			margin-top: 30upx;
+			// margin-bottom: 30upx;
+			
+		}
+	}
+	.contact-btn{
+		display: inline-block;
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		opacity: 0;
+		z-index: 9999;
+	}
+	.drug-box{
+		margin: 10upx 0 10upx;
+		padding: 40upx 30upx;
+		background-color: #FFFFFF;
+		.drug-list{
+			.drug-item{
+				padding: 30upx 0;
+				border-bottom: 1px soli #F0F0F0;
+				display: flex;
+				align-items: center;
+				.img-box{
+					width: 160upx;
+					height: 160upx;
+					margin-right: 30upx;
+					flex-shrink: 0;
+					image{
+						width: 100%;
+						height: 100%;
+					}
+				}
+				.drug-info{
+					width: calc(100% - 190upx);
+					height: 160upx;
+					display: flex;
+					flex-direction: column;
+					justify-content: space-between;
+					.name-box{
+						font-size: 28upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #111111;
+						line-height: 40upx;
+						.tag{
+							display: inline-block;
+							padding: 0 6upx;
+							height: 30upx;
+							background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
+							border-radius: 4upx;
+							margin-right: 10upx;
+							font-size: 22upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FFFFFF;
+							line-height: 30upx;
+							float: left;
+							margin-top: 7upx;
+						}
+					}
+					.spec{
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						line-height: 1;
+						margin-top: 10upx;
+					}
+					.num-box{
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						.price{
+							display: flex;
+							align-items: flex-end;
+							.unit{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1.2;
+								margin-right: 4upx;
+							}
+							.num{
+								font-size: 32upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1;
+							}
+						}
+						.amount{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1;
+						}
+					}
+				}
+			}
+			 
+		}
+		
+	}
+	.message-box{
+		box-sizing: border-box;
+		width: 693upx;
+		height: 84upx;
+		background: #F3FFFD;
+		border: 1px solid #C7E9E5;
+		box-shadow: 0px 4upx 12upx 0px rgba(90, 203, 138, 0.16);
+		border-radius: 16upx;
+		position: fixed;
+		left: 50%;
+		transform: translateX(-50%);
+		bottom: 128upx;
+		z-index: 99;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding: 0 20upx 0 30upx;
+		.left{
+			width: 80%;
+			display: flex;
+			align-items: center;
+			image{
+				width: 24upx;
+				height: 24upx;
+				margin-right: 18upx;
+			}
+			.text{
+				width: 90%;
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #2BC7B9;
+			}
+		}
+		.btn{
+			width: 100upx;
+			height: 48upx;
+			line-height: 48upx;
+			text-align: center;
+			font-size: 24upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #FFFFFF;
+			border: 1px solid #D2E6FF;
+			background: linear-gradient(135deg, #2BC7B9 0%, #60CDC3 100%);
+			border-radius: 24upx;
+			margin-left: 30upx;
+		}
+	}
+	
+</style>

+ 188 - 0
pages_shopping/components/specialBanner.vue

@@ -0,0 +1,188 @@
+<template>
+  <div class="banner-container">
+    <swiper :style="{width: '100vw', height: '682rpx'}" 
+      :autoplay="swiperConfig.autoplay" 
+      :interval="swiperConfig.interval" 
+      :duration="swiperConfig.duration" 
+      :circular="swiperConfig.circular"
+      :previous-margin="swiperConfig.previousMargin"
+      :next-margin="swiperConfig.nextMargin"
+      @change="swiperChange" 
+      @animationfinish="animationfinish">
+      <swiper-item v-for="(item, i) in bannerList" :key="i">
+		<!-- 1.当前展示为第1项时,bannerList最后一项和第二项的justifyContent值分别为flex-end和flex-start,其余项值为center -->
+		<!-- 2.当前展示为最后一项时,bannerList倒数第2项和第1项的justifyContent值分别为flex-end和flex-start,其余项值为center -->
+		<!-- 3.当前展示为其他项(非第1和最后1项)时,bannerList当前项的前1项和后1项的justifyContent值分别为flex-end和flex-start,其余项值为center -->
+		<!-- 4.padding值也需要根据不同项设定不同值,但理同justifyContent -->
+        <div class="image-container" 
+			:class="[curIndex===0?((i===listLen-1)?'item-left':(i===1?'item-right':'item-center')):(curIndex===listLen-1?(i===0?'item-right':(i===listLen-2?'item-left':'item-center')):(i===curIndex-1?'item-left':(i===curIndex+1?'item-right':'item-center')))]">
+          <image :src="item.picture" 
+            class="slide-image" 
+            :style="{
+              transform: curIndex===i?'scale(' + scaleX + ',' + scaleY + ')':'scale(1,1)',
+              transitionDuration: '.3s',
+              transitionTimingFunction: 'ease'
+            }" 
+            @click="selectBanner(i)"/>
+        </div>
+      </swiper-item>
+    </swiper>
+	<div class="desc-wrap" :class="[isDescAnimating?'hideAndShowDesc':'']">
+	  <div class="btn" @click="selectBanner(descIndex)">一键购买</div>
+	</div>
+  </div>
+</template>
+<script>
+export default {
+  props: {
+	bannerList: {
+		type: Array,
+		default () {
+			return []
+		}
+	},
+	swiperConfig: {
+		type: Object,
+		default () {
+			return {
+				indicatorDots: true,
+				indicatorColor: 'rgba(255, 255, 255, .4)',
+				indicatorActiveColor: 'rgba(255, 255, 255, 1)',
+				autoplay: false,
+				interval: 3000,
+				duration: 300,
+				circular: true,
+				previousMargin: '58rpx',
+				nextMargin: '58rpx'
+			}
+		}
+	},
+	scaleX: {
+		type: String,
+		default: (634 / 550).toFixed(4)
+	},
+	scaleY: {
+		type: String,
+		default: (378 / 328).toFixed(4)
+	}
+  },
+  computed:{
+	listLen () {
+		return this.bannerList.length
+	}
+  },
+  data () {
+    return {
+      curIndex: 0,
+      descIndex: 0,
+      isDescAnimating: false
+    }
+  },
+  methods: {
+    swiperChange (e) {
+      const that = this
+      this.curIndex = e.mp.detail.current
+      this.isDescAnimating = true
+      let timer = setTimeout(function () {
+        that.descIndex = e.mp.detail.current
+        clearTimeout(timer)
+      }, 150)
+    },
+    animationfinish (e) {
+      this.isDescAnimating = false
+    },
+    selectBanner(index) {
+		this.$emit("selectBanner",this.bannerList[index]);
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.banner-container {
+  width: 100vw;
+  height: 662rpx;
+  position: relative;
+  .image-container {
+	box-sizing: border-box;
+	width: 100%;
+	height: 100%;
+	display: flex;
+	.slide-image {
+	  width: 550rpx;
+	  height: 550rpx;
+	  z-index: 200;
+	  border-radius: 15rpx;
+	}
+  }
+  .item-left {
+	justify-content: flex-end;
+	padding: 56rpx 26rpx 0 0;
+  }
+  .item-right {
+	justify-content: flex-start;
+	padding: 56rpx 0 0 26rpx;
+  }
+  .item-center {
+	justify-content: center;
+	padding: 56rpx 0 0 0;
+  }
+  .desc-wrap {
+		position: absolute;
+		bottom:-10rpx;
+		left:0rpx;
+		width: 100%;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		box-sizing: border-box;
+		.btn {
+			background-image: linear-gradient(#ff4545,red);
+			padding: 15rpx 30rpx;
+			border-radius: 30rpx;
+			background-color: red;
+			color: #fff;
+			font-size: 30rpx;
+			font-family: 'PingFangTC-Regular';
+			font-weight: 600;
+		}
+  }
+  @keyframes descAnimation {
+    0% {
+      opacity: 1;
+    }
+    25% {
+      opacity: .5;
+    }
+    50% {
+      opacity: 0;
+    }
+    75% {
+      opacity: .5;
+    }
+    100% {
+      opacity: 1;
+    }
+  }
+  @-webkit-keyframes descAnimation {
+    0% {
+      opacity: 1;
+    }
+    25% {
+      opacity: .5;
+    }
+    50% {
+      opacity: 0;
+    }
+    75% {
+      opacity: .5;
+    }
+    100% {
+      opacity: 1;
+    }
+  }
+  .hideAndShowDesc {
+    animation: descAnimation .3s ease 1;
+    -webkit-animation: descAnimation .3s ease 1;
+  }
+}
+</style>

+ 302 - 0
pages_shopping/shopping/activityDetails.vue

@@ -0,0 +1,302 @@
+<template>
+  <view class="content">
+	  <view class="banner-box" >
+	  	<view class="inner">
+	  		<swiper 
+	  			class="swiper" 
+	  			:autoplay="true" 
+	  			:interval="3000" 
+	  			:duration="1000"
+	  		>
+	  			<swiper-item class="swiper-item" v-for="(item,index) in images" :key="index"  >
+	  				<image :src="item" mode=""></image>
+	  			</swiper-item>
+	  		</swiper>
+	  	</view>
+	  </view>
+	  <view class="share">
+		  <view class="item">
+			  <view class="name">
+			  			 已有{{activity.shareNumber}}人分享 
+			  </view>
+			  <view class="btn">
+			  		分享 
+					<button  class="share" data-name="shareBtn" open-type="share">分享</button>
+			  </view>
+		  </view>
+		  
+	  </view>
+	 <view class="inner">
+	 	<view  v-html="activity.content" style="font-size:0"></view>
+	 </view>
+	 <view class="product">
+		<view>
+			<special-banner :banner-list="productList" v-on:selectBanner="selectProduct" :swiper-config="swiperConfig"></special-banner>
+		</view>
+		 <!-- <view class="list">
+			  <scroll-view   scroll-y="true" style="height: 500rpx;" >
+				<view class="medic-list">
+					<view v-for="(item,index) in products" :key="index" class="item" @click="showDetail(item)">
+						<view class="img-box">
+							<image :src="item.image" mode="aspectFit"></image>
+						</view>
+						<view class="info-box">
+							<view class="title ellipsis2">{{item.productName}}</view>
+							<view class="intro ellipsis">{{item.productInfo}}</view>
+							<view class="prce-num">
+								<view class="price">
+									<text class="unit">¥</text>
+									<text class="num">{{item.price.toFixed(2)}} </text>
+								</view>
+								<view class="cart-img" @click="navgetTo('../shopping/cart')">
+									<view class="sale">已售 {{item.sales}} {{item.unitName}}</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+				</scroll-view>
+		 </view> -->
+		 
+	 </view>
+  </view>
+</template>
+<script>
+import { getStoreActivityDetails,share } from '@/api/activity'
+import specialBanner from '../components/specialBanner.vue'
+	
+export default {
+	components: {
+		specialBanner
+	},
+  data: function() {
+    return {
+       activityId:null,
+	   products:[],
+	   activity:null,
+	   images:[],
+	   productList:[],
+	   swiperConfig: {
+	   	indicatorDots: true,
+	   	indicatorColor: 'rgba(255, 255, 255, .4)',
+	   	indicatorActiveColor: 'rgba(255, 255, 255, 1)',
+	   	autoplay: false,
+	   	interval: 3000,
+	   	duration: 300,
+	   	circular: true,
+	   	previousMargin: '58rpx',
+	   	nextMargin: '58rpx'
+	   }
+    }
+  },
+  onLoad: function(options) {
+    this.activityId=options.activityId;
+	this.getStoreActivityDetails();
+	// uni.setStorageSync(this.activityId,null);
+  },
+  onShareAppMessage(res) {
+	this.share();
+  	return {
+  		title: this.activity.title,
+  		path: '/pages_shopping/shopping/activityDetails?activityId='+this.activity.activityId,
+  		imageUrl: this.activity.logoUrl //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+  	}
+  },
+  //分享到朋友圈
+  onShareTimeline(res) {
+	this.share();
+  	return {
+  		title: this.activity.title,
+  		query:'',//页面参数
+  		imageUrl: this.activity.logoUrl //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+  	}
+  },
+  methods: {
+		selectProduct(item){
+			console.log(item);
+			uni.navigateTo({
+				url: '../../pages/shopping/productDetails?productId='+item.id
+			})
+		},
+		showDetail(item) {
+			uni.navigateTo({
+				url: '../../pages/shopping/productDetails?productId='+item.productId
+			})
+		},
+		getStoreActivityDetails() {
+			var that=this;
+			let data = { activityId: this.activityId }
+			getStoreActivityDetails(data).then(res => {
+				this.activity=res.activity;
+				this.products=res.products;
+				this.products.forEach (function (value) {
+					var item={
+						picture: value.image,
+						title: value.productName,
+						description:value.keyword,
+						id: value.productId,
+						obj:value
+					}
+					that.productList.push(item)
+				});
+				this.images=res.activity.images.split(',')
+				uni.setNavigationBarTitle({
+					title: this.activity.title
+				});
+			})
+		},
+		share() {
+			share(this.activityId).then(res => {
+			})
+		},
+  },
+}
+</script>
+<style lang="less" scoped>
+	.content{
+		position: relative;
+		.banner-box{
+			.inner{
+				width: 100%;
+				height: 400upx;
+				overflow: hidden;
+				.swiper,
+				.swiper-item,
+				.swiper-item image{
+					width: 100%;
+					height: 100%;
+				}
+				
+			}
+		}
+		.share{
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			background-color: #c8f2ee;
+			.item{
+				width: 100%;
+				display: flex;
+				align-items: center;
+				justify-content: flex-start;
+				background-color: #fff;
+				border-radius: 15rpx;
+				padding: 15rpx;
+				margin: 15rpx;
+			}
+			.name{
+				margin-left: 10rpx;
+				flex: 1;
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #b5b5b5;
+			}
+			.btn{
+				margin-right: 15rpx;
+				border-radius: 10rpx;
+				padding: 10rpx 30rpx;
+				background-color: #FF6633;
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #fff;
+				position: relative;
+				.share{
+					display: inline-block;
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 100%;
+					height: 100%rpx;
+					opacity: 0;
+				}
+			}
+		}
+		.product{
+			position: fixed;
+			bottom: 120rpx;
+			left:0rpx;
+			.list{
+				display: flex;
+				background-color: #fff;
+				border-radius: 15rpx;
+				margin: 15rpx;
+				padding: 15rpx;
+				.medic-list{
+					.item{
+						box-sizing: border-box;
+						background: #FFFFFF;
+						border: 4upx solid #FFFFFF;
+						border-radius: 16upx;
+						padding: 20upx 30upx;
+						display: flex;
+						.img-box{
+							width: 200upx;
+							height: 200upx;
+							margin-right: 30upx;
+							image{
+								width: 100%;
+								height: 100%;
+							}
+						}
+						.info-box{
+							width: calc(100% - 210upx);
+							.title{
+								font-size: 32upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 40rpx;
+								height: 80rpx;
+							}
+							.intro{
+								font-size: 26upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #999999;
+								line-height: 1;
+								margin-top: 26upx;
+							}
+						 
+							.prce-num{
+								display: flex;
+								align-items: center;
+								justify-content: space-between;
+								margin-top: 30upx;
+								.price{
+									display: flex;
+									align-items: flex-end;
+									.unit{
+										font-size: 24upx;
+										font-family: PingFang SC;
+										font-weight: 500;
+										color: #FF6633;
+										line-height: 1.2;
+										margin-right: 4upx;
+									}
+									.num{
+										font-size: 36upx;
+										font-family: PingFang SC;
+										font-weight: bold;
+										color: #FF6633;
+										line-height: 1;
+									}
+								}
+								.cart-img{
+									.sale{
+										font-size: 20upx;
+										font-family: PingFang SC;
+										color: #999999;
+									}
+									 
+								}
+							}
+						}
+					}
+				}
+				
+			}
+		}
+	}
+</style>

+ 337 - 0
pages_shopping/shopping/coupon.vue

@@ -0,0 +1,337 @@
+<template>
+  <view ref="container">
+	<image src="../../static/images/banner_coupon.jpg" mode="widthFix" class="tui-coupon-banner"></image>
+    <view class="tui-coupon-list">
+      <view class="tui-coupon-item tui-top20" v-for="(item, index) in couponsList" :key="index">
+         <image src="../../static/images/bg_coupon_3x.png" class="tui-coupon-bg" mode="widthFix"></image>
+		<view class="tui-coupon-item-left">
+          <view class="tui-coupon-price-box" :class="{ 'tui-color-grey': item.receiveCount>0 }">
+            <view class="tui-coupon-price-sign">¥</view>
+            <view class="tui-coupon-price" :class="{ 'tui-price-small': false }">{{ item.couponPrice }}</view>
+          </view>
+          <view class="tui-coupon-intro">满{{ item.useMinPrice }}元可用</view>
+        </view>
+        <view class="tui-coupon-item-right">
+          <view class="tui-coupon-content">
+            <view class="tui-coupon-title-box">
+              <view class="tui-coupon-title">{{ item.couponName }}</view>
+            </view>
+            <view class="tui-coupon-rule">
+              <view class="tui-rule-box tui-padding-btm">
+                <view class="tui-coupon-circle"></view>
+                <view class="tui-coupon-text">不可叠加使用</view>
+              </view>
+              <view class="tui-rule-box">
+                <view class="tui-coupon-circle"></view>
+                <view class="tui-coupon-text">{{ item.limitTime }} 到期</view>
+            
+              </view>
+            </view>
+          </view>
+        </view>
+        <view class="tui-btn-box">
+			<view class="btn cancel" v-if="item.receiveCount>0"  >已领取</view>
+			<view class="btn cancel" v-else-if="item.receiveCount==item.totalCount" >已领完</view>
+			<view class="btn receive" v-else @click="receive(item.id,index)">立即领取</view>
+        </view>
+      </view>
+    </view>
+	<Loading :loaded="loadend" :loading="loading"></Loading>
+	<!--暂无优惠券-->
+	<!-- <view v-if="couponsList.length == 0 && page > 1" class="no-data-box" >
+		<image src="/static/images/no_data.png" mode="aspectFit"></image>
+		<view class="empty-title">暂无数据</view>
+	</view> -->
+  </view>
+</template>
+<script>
+import { getCouponIssueList, receive } from '@/api/coupon'
+import Loading from '@/components/Loading'
+export default {
+  name: 'getCoupon',
+  components: {
+    Loading,
+  },
+  props: {},
+  data: function() {
+    return {
+      page: 1,
+      limit: 10,
+      couponsList: [],
+      loading: false,
+      loadend: false,
+    }
+  },
+  mounted: function() {
+    
+  },
+  onShow() {
+	this.loading = false
+	this.loadend = false
+	this.page = 1
+  	this.getUseCoupons()
+  },
+  onReachBottom() {
+    !this.loading && this.getUseCoupons()
+  },
+  methods: {
+    receive: function(id,index) {
+      let that = this
+      let list = that.couponsList
+	  var data={id:id}
+      receive(data)
+        .then(function(res) {
+          uni.showToast({
+            title: '领取成功',
+            icon: 'success',
+            duration: 2000,
+          })
+		  that.couponsList[index].receiveCount=1;
+        })
+        .catch(function(err) {
+          uni.showToast({
+            title: err.msg ,
+            icon: 'none',
+            duration: 2000,
+          })
+        })
+    },
+    getUseCoupons() {
+      if (this.loading) return //阻止下次请求(false可以进行请求);
+      if (this.loadend) return //阻止结束当前请求(false可以进行请求);
+      this.loading = true
+      let q = { page: this.page, pageSize: this.limit }
+      getCouponIssueList(q).then(res => {
+        this.loading = false
+        this.couponsList.push.apply(this.couponsList, res.data.list)
+        this.loadend = res.data.list.length < this.limit //判断所有数据是否加载完成;
+        this.page = this.page + 1
+      })
+    },
+  },
+}
+</script>
+
+<style lang="less" scoped>
+page {
+  background-color: #f5f5f5;
+}
+
+.container {
+
+  padding-bottom: env(safe-area-inset-bottom);
+}
+
+.tui-coupon-list {
+  width: 100%;
+  padding: 0 25rpx;
+  box-sizing: border-box;
+}
+
+.tui-coupon-banner {
+  width: 100%;
+}
+
+.tui-coupon-item {
+  width: 100%;
+  height: 210rpx;
+  position: relative;
+  display: flex;
+  align-items: center;
+  padding-right: 30rpx;
+  box-sizing: border-box;
+  overflow: hidden;
+ 
+}
+
+.tui-coupon-bg {
+  width: 100%;
+  height: 210rpx;
+  position: absolute;
+  left: 0;
+  top: 0;
+  z-index: 1;
+}
+
+.tui-coupon-sign {
+  height: 110rpx;
+  width: 110rpx;
+  position: absolute;
+  z-index: 9;
+  top: -30rpx;
+  right: 40rpx;
+}
+
+.tui-coupon-item-left {
+  width: 218rpx;
+  height: 210rpx;
+  position: relative;
+  z-index: 2;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-direction: column;
+  flex-shrink: 0;
+}
+
+.tui-coupon-price-box {
+  display: flex;
+  color: #e41f19;
+  align-items: flex-end;
+}
+
+.tui-coupon-price-sign {
+  font-size: 30rpx;
+}
+
+.tui-coupon-price {
+  font-size: 70rpx;
+  line-height: 68rpx;
+  font-weight: bold;
+}
+
+.tui-price-small {
+  font-size: 58rpx !important;
+  line-height: 56rpx !important;
+}
+
+.tui-coupon-intro {
+  background: #f7f7f7;
+  padding: 8rpx 10rpx;
+  font-size: 26rpx;
+  line-height: 26rpx;
+  font-weight: 400;
+  color: #666;
+  margin-top: 18rpx;
+}
+
+.tui-coupon-item-right {
+  flex: 1;
+  height: 210rpx;
+  position: relative;
+  z-index: 2;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding-left: 24rpx;
+  box-sizing: border-box;
+  overflow: hidden;
+}
+
+.tui-coupon-content {
+  width: 82%;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.tui-coupon-title-box {
+  display: flex;
+  align-items: center;
+}
+
+.tui-coupon-btn {
+  padding: 6rpx;
+  background: #ffebeb;
+  color: #e41f19;
+  font-size: 25rpx;
+  line-height: 25rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  transform: scale(0.9);
+  transform-origin: 0 center;
+  border-radius: 4rpx;
+  flex-shrink: 0;
+}
+
+.tui-color-grey {
+  color: #888 !important;
+}
+
+.tui-bg-grey {
+  background: #f0f0f0 !important;
+  color: #888 !important;
+}
+
+.tui-coupon-title {
+  width: 100%;
+  font-size: 26rpx;
+  color: #333;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+.tui-coupon-rule {
+  padding-top: 52rpx;
+}
+
+.tui-rule-box {
+  display: flex;
+  align-items: center;
+  transform: scale(0.8);
+  transform-origin: 0 100%;
+}
+
+.tui-padding-btm {
+  padding-bottom: 6rpx;
+}
+
+.tui-coupon-circle {
+  width: 8rpx;
+  height: 8rpx;
+  background: rgb(160, 160, 160);
+  border-radius: 50%;
+}
+
+.tui-coupon-text {
+  font-size: 28rpx;
+  line-height: 28rpx;
+  font-weight: 400;
+  color: #666;
+  padding-left: 8rpx;
+  white-space: nowrap;
+}
+
+.tui-top20 {
+  margin-top: 20rpx;
+}
+
+.tui-coupon-title {
+  font-size: 28rpx;
+  line-height: 28rpx;
+}
+
+.tui-coupon-radio {
+  transform: scale(0.7);
+  transform-origin: 100% center;
+}
+
+.tui-btn-box {
+  position: absolute;
+  right: 20rpx;
+  bottom: 40rpx;
+  z-index: 10;
+  .btn{
+  	width: 155upx;
+  	height: 64upx;
+  	line-height: 64upx;
+  	font-size: 26upx;
+  	font-family: PingFang SC;
+  	font-weight: 500;
+  	text-align: center;
+  	border-radius: 32upx;
+  	margin-left: 15upx;
+
+  	&.cancel{
+  		border: 1px solid red;
+  		color: red;
+  	}
+  	&.receive{
+  		background: red;
+  		color: #FFFFFF;
+  	}
+  }
+}
+</style>

+ 150 - 0
pages_shopping/shopping/myCoupon.vue

@@ -0,0 +1,150 @@
+<template>
+  <view ref="container">
+    <div class="coupon-list" v-if="couponsList.length > 0">
+      <div class="item acea-row row-center-wrapper"  v-for="(item, index) in couponsList" :key="index">
+        <div class="money" >
+          <image v-if="item.status==0" class="img" src="../../static/images/coupon1.png" mode="widthFix"></image>
+		  <image v-if="item.status!=0" class="img" src="../../static/images/coupon2.png" mode="widthFix"></image>
+		  <div style="z-index: 999;">
+            ¥<span class="num">{{ item.couponPrice }}</span>
+          </div>
+          <div class="pic-num"  >满{{ item.useMinPrice }}元可用</div>
+        </div>
+        <div class="text">
+          <div class="condition line1">
+            {{ item.couponTitle }}
+          </div>
+          <div class="data acea-row row-between-wrapper">
+            <div >{{ item.limitTime }}到期</div>
+			<div class="bnt gray" v-if="item.status==1" >已使用</div>
+			<div class="bnt gray" v-if="item.status==-1" >已过期</div>
+			<div class="bnt bg-color-red" v-if="item.status==0" >可使用</div>
+          </div>
+        </div>
+      </div>
+    </div>
+	<view v-if="couponsList.length == 0" class="no-data-box" @click="getMyCouponList()">
+		<image src="/static/images/no_data.png" mode="aspectFit"></image>
+		<view class="empty-title">暂无数据</view>
+	</view>
+     
+  </view>
+</template>
+<script>
+import { getMyCouponList } from '@/api/coupon'
+ 
+export default {
+  name: 'UserCoupon',
+ 
+  props: {},
+  data: function() {
+    return {
+      couponsList: [],
+      loading: false,
+    }
+  },
+  watch: {
+    
+  },
+  mounted: function() {
+    this.getUseCoupons()
+  },
+  onShow() {
+  	
+  },
+  methods: {
+    getUseCoupons: function() {
+      let that = this;
+	  var data={};
+      getMyCouponList(data).then(res => {
+        that.couponsList = res.data
+      })
+    },
+  },
+}
+</script>
+<style lang="less" scoped>
+	.container {
+	  height: 100%;
+	}
+	/*优惠券列表公共*/
+	.coupon-list {
+	  padding: 0 0.3 * 100rpx;
+	  margin-top: 0.25 * 100rpx;
+	  box-sizing: border-box;
+	}
+	
+	.coupon-list .item {
+	  width: 100%;
+	  height: 1.7 * 100rpx;
+	  margin-bottom: 0.16 * 100rpx;
+	}
+	
+	.coupon-list .item .money {
+	  background-size: 100% 100%;
+	  width: 2.4 * 100rpx;
+	  height: 100%;
+	  color: #fff;
+	  font-size: 0.36 * 100rpx;
+	  font-weight: bold;
+	  text-align: center;
+	  display: flex;
+	  flex-direction: column;
+	  align-items: center;
+	  justify-content: center;
+	  position: relative;
+	  
+	}
+	.coupon-list .item .money .img{
+	  position: absolute;
+	  width: 2.4 * 100rpx;
+	  height: 100%;
+	  color: #fff;
+	  
+	}
+	
+	.coupon-list .item .money .num {
+	  font-size: 0.6 * 100rpx;
+	}
+	.coupon-list .item .money .pic-num {
+	  font-size: 20rpx;
+	  z-index: 99;
+	}
+
+	
+	.coupon-list .item .text {
+	  width: 4.5 * 100rpx;
+	  padding: 0 0.17 * 100rpx 0 0.24 * 100rpx;
+	  background-color: #fff;
+	  box-sizing: border-box;
+	}
+	
+	.coupon-list .item .text .condition {
+	  font-size: 0.3 * 100rpx;
+	  color: #282828;
+	  height: 0.93 * 100rpx;
+	  line-height: 0.93 * 100rpx;
+	  border-bottom: 1px solid #f0f0f0;
+	}
+	
+	.coupon-list .item .text .data {
+	  font-size: 0.2 * 100rpx;
+	  color: #999;
+	  height: 0.76 * 100rpx;
+	}
+	
+	.coupon-list .item .text .data .bnt {
+	  width: 1.36 * 100rpx;
+	  height: 0.44 * 100rpx;
+	  border-radius: 0.22 * 100rpx;
+	  font-size: 0.22 * 100rpx;
+	  color: #fff;
+	  text-align: center;
+	  line-height: 0.44 * 100rpx;
+	  background-color: red;
+	}
+	
+	.coupon-list .item .text .data .bnt.gray {
+	  background-color: #ccc;
+	}
+</style>

+ 351 - 0
pages_shopping/shopping/productSalesList.vue

@@ -0,0 +1,351 @@
+<template>
+	<view class="content">
+		<!-- 数据列表 -->
+		<mescroll-body top="0rpx" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+			<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>
+					<view class="info-box">
+						<view class="title ellipsis2">{{item.productName}}</view>
+						<view class="intro ellipsis">{{item.productInfo}}</view>
+						<view class="prce-num">
+							<view class="price">
+								<text class="unit">¥</text>
+								<text class="num">{{item.price.toFixed(2)}} </text>
+							</view>
+							<view class="cart-img" @click="navgetTo('../shopping/cart')">
+								<view class="sale">已售 {{item.sales}} {{item.unitName}}</view>
+							</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>
+					<view class="info-box">
+						<view class="title ellipsis2">{{item.productName}}</view>
+						<view class="price-box">
+							<view class="now">
+								<text class="unit">¥</text>
+								<text class="num">{{item.price.toFixed(2)}}</text>
+							</view>
+							<view class="old">¥{{item.otPrice.toFixed(2)}}</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</mescroll-body>
+	</view>
+</template>
+
+<script>
+	import {getProducts} from '@/api/product'
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	export default {
+		mixins: [MescrollMixin], 
+		data() {
+			return {
+				showType:1,
+				form:{
+					salesOrder:'desc',
+				},
+				mescroll:null,
+				// 上拉加载的配置
+				upOption: {
+					onScroll:true,
+					use: true, // 是否启用上拉加载; 默认true
+					page: {
+						num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
+						size: 10 // 每页数据的数量,默认10
+					},
+					noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
+					empty: {
+						icon:'/static/images/no_data.png',
+						tip: '暂无数据'
+					},
+					textNoMore:"已经到底了",
+				},
+				// 列表数据
+				dataList: [],
+			};
+		},
+		onLoad(option) {
+		},
+		methods:{
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
+			},
+			/*下拉刷新的回调 */
+			downCallback(mescroll) {
+				mescroll.resetUpScroll()
+			},
+			upCallback(page) {
+				//联网加载数据
+				var that = this;
+				this.form.page=page.num;
+				this.form.pageSize=page.size;
+				getProducts(this.form).then(res => {
+					if(res.code==200){
+						//设置列表数据
+						if (page.num == 1) {
+							that.dataList = res.data.list; 
+							
+						} else {
+							that.dataList = that.dataList.concat(res.data.list);
+							 
+						}
+						that.mescroll.endBySize(res.data.list.length, res.data.total);
+						
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: "请求失败",
+						});
+						that.dataList = null;
+						that.mescroll.endErr();
+					}
+				});
+			},
+			// 查看详情
+			showDetail(item) {
+				uni.navigateTo({
+					url: '/pages/shopping/productDetails?productId='+item.productId
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.top-fixed{
+		width: 100%;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 10;
+	}
+	.search-cont{
+		padding: 16upx 30upx;
+		background-color: #FFFFFF;
+		display:flex;
+		align-items: center;
+		justify-content: space-between;
+		.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;
+			}
+			
+		}
+		.icon-search{
+			margin-left: 10upx;
+			width: 40upx;
+			height: 40upx;
+			image{
+				width: 40upx;
+				height: 40upx;
+			}
+			
+		}
+	}
+	.sort-box{
+		height: 88upx;
+		background: #FFFFFF;
+		padding: 0 100upx;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		.item{
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			&.active .label{
+				color: #2BC7B9;
+			}
+			.label{
+				font-size: 26upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #666666;
+				line-height: 1;
+			}
+			.sort-img{
+				height: 20upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				margin: 3upx 0 0 10upx;
+				image{
+					width: 12upx;
+					height: 8upx;
+				}
+			}
+		}
+	}
+	.medic-list{
+		padding: 20upx;
+		.item{
+			box-sizing: border-box;
+			min-height: 285upx;
+			background: #FFFFFF;
+			border: 4upx solid #FFFFFF;
+			border-radius: 16upx;
+			margin-bottom: 20upx;
+			padding: 40upx 30upx;
+			display: flex;
+			.img-box{
+				width: 200upx;
+				height: 200upx;
+				margin-right: 30upx;
+				image{
+					width: 100%;
+					height: 100%;
+				}
+			}
+			.info-box{
+				width: calc(100% - 210upx);
+				.title{
+					font-size: 32upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					line-height: 40rpx;
+					height: 80rpx;
+				}
+				.intro{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1;
+					margin-top: 26upx;
+				}
+			 
+				.prce-num{
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					margin-top: 30upx;
+					.price{
+						display: flex;
+						align-items: flex-end;
+						.unit{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #FF6633;
+							line-height: 1.2;
+							margin-right: 4upx;
+						}
+						.num{
+							font-size: 36upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FF6633;
+							line-height: 1;
+						}
+					}
+					.cart-img{
+						.sale{
+							font-size: 20upx;
+							font-family: PingFang SC;
+							color: #999999;
+						}
+						 
+					}
+				}
+			}
+		}
+	}
+	.goods-list{
+		padding: 20upx;
+		display: flex;
+		flex-wrap: wrap;
+		.item{
+			margin-right: 20rpx;
+			margin-bottom: 20rpx;
+			width: 345rpx;
+			background: #FFFFFF;
+			box-shadow: 0px 0px 10rpx 4rpx rgba(199, 199, 199, 0.22);
+			border-radius: 20rpx;
+			overflow: hidden;
+			&:nth-child(2n) {
+				margin-right: 0;
+			}
+			.img-box{
+				width: 100%;
+				height: 334upx;
+				image{
+					width: 100%;
+					height: 100%;
+				}
+			}
+			.info-box{
+				box-sizing: border-box;
+				height: 182upx;
+				padding: 20upx 20upx 30upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				.title{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					line-height: 40upx;
+				}
+				.price-box{
+					display: flex;
+					align-items: flex-end;
+					.now{
+						display: flex;
+						align-items: flex-end;
+						margin-right: 20upx;
+						.unit{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #FF6633;
+							line-height: 1.2;
+							margin-right: 4upx;
+						}
+						.num{
+							font-size: 36upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FF6633;
+							line-height: 1;
+						}
+					}
+					.old{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						text-decoration: line-through;
+						color: #BBBBBB;
+						line-height: 1.1;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 407 - 0
pages_user/user/addAddress.vue

@@ -0,0 +1,407 @@
+<template>
+	<view class="content">
+		<view class="inner">
+			<view class="address-box">
+				<textarea class="textarea" v-model="content"  placeholder="请粘贴或输入文本,点击'识别'自动识别姓名、电话、地址,格式:深圳市龙岗区坂田街道长坑路西2巷2号202 黄大大 18888888888"   />
+				<view  class="btns" >
+					<view  class="btn parse" @click="parseAddress()">识别</view>
+				</view>
+			</view>
+			<view class="form-box">
+				
+				<view class="form-item">
+					<text class="label">联系人</text>
+					<input type="text" v-model="form.realName" maxlength="10" placeholder="姓名" class="form-input" />
+				</view>
+				<view class="form-item">
+					<text class="label">手机号</text>
+					<input type="number" v-model="form.phone" maxlength="11"  placeholder="手机号" class="form-input" />
+				</view>
+				<view class="form-item">
+					<text class="label">所在地区</text>
+					<picker :value="multiIndex"  class="birth-picker"  mode="multiSelector" range-key="n" :range="addressList" @change="pickerChange"  @columnchange="pickerColumnchange">
+						<view class="right-box">
+							<view class="input-box">
+								<input type="text" v-model="form.address" placeholder="请选择" class="form-input" disabled="disabled" />
+							</view>
+							<image class="arrow" src="../../static/images/arrow_gray.png" mode=""></image>
+						</view>
+					</picker>
+				</view>
+				<view class="form-item">
+					<text class="label">详细地址</text>
+					<textarea class="form-textarea" v-model="form.detail" placeholder="请输入详细地址"   />
+				</view>
+			</view>
+			<!-- 设为默认地址 -->
+			<view class="setting-box">
+				<text class="label">设为默认地址</text>
+				<evan-switch v-model="isDefault" activeColor="#2BC7B9" inactiveColor="rgba(0, 0, 0, 0.1)"></evan-switch>
+			</view>
+		</view>
+		<view class="btn-box">
+			<view class="sub-btn" @click="submit()">保存地址</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {parseAddress,getCity,getCitys,getAddressById,addAddress,editAddress} from '@/api/address'
+	import EvanSwitch from '@/components/evan-switch/evan-switch.vue'
+	export default {
+		components: {
+			EvanSwitch
+		},
+		data() {
+			return {
+				content:null,
+				type:null,
+				id:null,
+				isDefault: false,
+				addressList:[[],[],[]],
+				multiIndex:[0,0,0],
+				address:[],
+				form: {
+					realName:null,
+					phone:null,
+					detail:null,
+					address: null,
+					isDefault: 0,
+				}
+			}
+		},
+		onLoad(option) {
+			this.type=option.type;
+			if(this.type=='edit'){
+				uni.setNavigationBarTitle({
+				  title:"修改收货地址"
+				})
+				this.id=option.id;
+				this.getAddressById();
+			}
+			else{
+				uni.setNavigationBarTitle({
+				  title:"新增收货地址"
+				})
+			}
+			this.getCitys()
+		},
+		methods: {
+			parseAddress(){
+				if(this.content==null||this.content==""){
+					uni.showToast({
						icon:'none',
						title: '请输入地址信息',
+					});
+					return;
+				}
+				var data={content:this.content};
+				parseAddress(data).then(
+					res => {
+						if(res.code==200){
+							this.form.realName=res.data.name
+							this.form.phone=res.data.mobile
+							this.form.address=res.data.provinceName+res.data.cityName+res.data.expAreaName
+							this.form.province=res.data.provinceName
+							this.form.city=res.data.cityName
+							this.form.district=res.data.expAreaName
+							this.form.detail=res.data.streetName+res.data.address
+							this.form.detail=this.form.detail.replace(/\s+/g,"");
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			getAddressById(){
+				var data={id:this.id};
+				getAddressById(data).then(
+					res => {
+						if(res.code==200){
+							  this.form=res.data;
+							  this.isDefault=this.form.isDefault==1?true:false;
+							  this.form.address=this.form.province+this.form.city+this.form.district
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			submit(){
+				if(this.type=="add"){
+					this.addAddress()
+				}
+				else if(this.type=="edit"){
+					this.editAddress()
+				}
+				
+			},
+			editAddress(){
+				this.form.isDefault=this.isDefault?1:0
+				editAddress(this.form).then(
+					res => {
+						if(res.code==200){
+							 uni.showToast({
+							 	icon:'success',
+							 	title: "操作成功",
+							 });
+							 setTimeout(function() {
+								 uni.$emit('refreshAddress');
+								 uni.navigateBack({
+									 delta: 1
+								 })
+							 }, 500);
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			addAddress(){
+				this.form.isDefault=this.isDefault?1:0
+				addAddress(this.form).then(
+					res => {
+						if(res.code==200){
+							 uni.showToast({
+							 	icon:'success',
+							 	title: "操作成功",
+							 });
+							 setTimeout(function() {
+								 uni.$emit('refreshAddress');
+								 uni.navigateBack({
+									 delta: 1
+								 })
+							 }, 500);
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			// 地区选择
+			pickerChange(e) {
+				this.multiIndex = e.detail.value;
+				// 数组内的下标
+				// 获取一级类目
+				// 获取二级类目
+				// 获取三级类目
+				this.form.address=this.addressList[0][this.multiIndex[0]].n+this.addressList[1][this.multiIndex[1]].n+this.addressList[2][this.multiIndex[2]].n
+				this.form.province=this.addressList[0][this.multiIndex[0]].n
+				this.form.city=this.addressList[1][this.multiIndex[1]].n
+				this.form.district=this.addressList[2][this.multiIndex[2]].n
+				this.form.cityId=this.addressList[1][this.multiIndex[1]].v;
+				
+				 
+			},
+			pickerColumnchange(e){
+				// 第一列滑动
+				if(e.detail.column === 0){
+					this.multiIndex[0] =  e.detail.value
+					// console.log('第一列滑动');
+					this.addressList[1] = this.address[this.multiIndex[0]].c;
+					this.addressList[2] = this.address[this.multiIndex[0]].c[0].c
+					// 第一列滑动  第二列 和第三列 都变为第一个
+					this.multiIndex.splice(1, 1, 0)
+					this.multiIndex.splice(2, 1, 0)
+				}
+				// 第二列滑动
+				if(e.detail.column === 1){
+					this.multiIndex[1] =  e.detail.value
+					// console.log('第二列滑动');
+					// console.log(this.multiIndex)
+					this.addressList[2] = this.address[this.multiIndex[0]].c[this.multiIndex[1]].c
+					// 第二列 滑动 第三列 变成第一个
+					this.multiIndex.splice(2, 1, 0)
+				}
+				// 第三列滑动
+				if(e.detail.column === 2){
+					this.multiIndex[2] =  e.detail.value
+				}
+			},
+			getCitys(){
+				getCitys().then(
+					res => {
+						if(res.code==200){
+							this.address=res.data
+							for(var i=0; i<this.address.length; i++){
+								this.addressList[0].push(this.address[i])
+							}
+							for(var i=0; i<this.address[0].c.length; i++){
+								this.addressList[1].push(this.address[0].c[i])
+							}
+							for(var i=0; i<this.address[0].c[0].c.length; i++){
+								this.addressList[2].push(this.address[0].c[0].c[i])
+							}
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		height: 100%;
+	}
+	.content{
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;
+		
+		.inner{
+			height: calc(100% - 120upx);
+			padding: 20upx;
+			.address-box{
+				padding: 30upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				margin-bottom: 20upx;
+				position: relative;
+				.textarea{
+					width: 100%;
+					height: 200upx;
+					font-size: 30upx;
+					color: #999999;
+					padding-bottom:100rpx;
+				}
+				.btns{
+					right:10rpx;
+					bottom:10rpx;
+					position: absolute;
+					.btn{
+						width: 155upx;
+						height: 64upx;
+						line-height: 64upx;
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						text-align: center;
+						border-radius: 32upx;
+						&.parse{
+							background: #2BC7B9;
+							color: #FFFFFF;
+						}
+					}
+				}
+			}
+			.form-box{
+				padding: 0 30upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				.form-item{
+					padding: 30upx 0;
+					display: flex;
+					align-items: flex-start;
+					border-bottom: 1px solid #F1F1F1;
+					&:last-child{
+						border-bottom: none;
+					}
+					.label{
+						width: 180upx;
+						text-align: left;
+						font-size: 30upx;
+						line-height: 44upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #222222;
+						flex-shrink: 0;
+					}
+					input{
+						text-align: left;
+					}
+					.form-input{
+						font-size: 30upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						text-align: left;
+					}
+					.form-textarea{
+						font-size: 30upx;
+						color: #999999;
+						height: 100upx;
+						padding: 4upx 0;
+					}
+					 
+					.birth-picker {
+						flex: 1;
+						display: flex;
+						align-items: center;
+						
+						.right-box{
+							width: 100%;
+							display: flex;
+							align-items: center;
+							.input-box{
+								width: 470upx;
+							}
+							.arrow{
+								width: 13upx;
+								height: 23upx;
+								margin-left: 20upx;
+							}
+						}
+					}
+				}
+			}
+			.setting-box{
+				height: 88upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				margin-top: 20upx;
+				padding: 0 30upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				.label{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+				}
+			}
+		}
+		.btn-box{
+			height: 120upx;
+			padding: 0 30upx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			background: #FFFFFF;
+			.sub-btn{
+				width: 100%;
+				height: 88upx;
+				line-height: 88upx;
+				text-align: center;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				background: #2BC7B9;
+				border-radius: 44upx;
+			}
+		}
+	}
+</style>

+ 281 - 0
pages_user/user/addDoc.vue

@@ -0,0 +1,281 @@
+<template>
+	<view class="content">
+		<view class="inner">
+			<view class="form-box">
+				<view class="form-item">
+					<text class="label">姓名</text>
+					<input  maxlength="10" class="input-width" type="text" v-model="form.userName" placeholder="请如实填写您的真实姓名" placeholder-class="form-input" />
+				</view>
+				<view class="form-item">
+					<text class="label">性别</text>
+					<radio-group style="display: flex;align-items: center;">
+						<label style="margin-right: 50upx;">
+							<radio @click="sexChange(1)" value="1" :checked="form.sex===1" style="margin-right: 16upx;" />
+							<text class="sex-text">男</text>
+						</label>
+						<label>
+							<radio @click="sexChange(2)" value="2" :checked="form.sex===2" style="margin-right: 16upx;" />
+							<text class="sex-text">女</text>
+						</label>
+					</radio-group>
+				</view>
+				<view class="form-item">
+					<text class="label">身份证号</text>
+					<input maxlength="18" class="input-width" type="idcard" v-model="form.idCard" placeholder="请如实填写身份证号" placeholder-class="form-input" />
+				</view>
+				<view class="form-item">
+					<text class="label">出生年月</text>
+					<picker class="birth-picker" mode="date"   @change="bindDateChange">
+						<view class="right-box">
+							<view class="input-box">
+								<input type="text" :value="form.birthday" placeholder="请选择出生年月" placeholder-class="form-input" disabled="disabled" />
+							</view>
+							<image class="arrow" src="../../static/images/arrow_gray.png" mode=""></image>
+						</view>
+					</picker>
+				</view>
+				<view class="form-item">
+					<text class="label">备注</text>
+					<textarea maxlength="200" class="form-textarea" v-model="form.remark" placeholder="请输入备注"   />
+				</view>
+				 
+			</view>
+		</view>
+		<view class="btn-box">
+			<view class="sub-btn" @click="submit()">保存档案</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {getDocDetails,addDoc,editDoc} from '@/api/doc.js'
+	export default {
+		data() {
+			return {
+				type:null,
+				patientId:null,
+				form: {
+					userName:null,
+					idCard: null,
+					sex:null,
+					birthday:null,
+					remark:null,
+				}
+			};
+		},
+		onLoad(option) {
+			this.type=option.type;
+			console.log(this.type)
+			if(this.type=='edit'){
+				this.docId=option.docId;
+				this.getDocDetails();
+			}
+		},
+		methods:{
+			sexChange(type){
+				this.form.sex=type
+			},
+			getDocDetails(){
+				var data={docId:this.docId};
+				getDocDetails(data).then(
+					res => {
+						if(res.code==200){
+							  this.form=res.data;
+							  
+						}else{
+							uni.showToast({
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			submit(){
+				if(this.form.userName==null){
+					uni.showToast({
+						icon:'none',
+						title: "姓名不能为空",
+					});
+					return;
+				}
+				if(this.form.idCard==null){
+					uni.showToast({
+						icon:'none',
+						title: "身份证号不能为空",
+					});
+					return;
+				}
+				if(this.form.sex==null){
+					uni.showToast({
+						icon:'none',
+						title: "性别不能为空",
+					});
+					return;
+				}
+				if(this.form.birthday==null){
+					uni.showToast({
+						icon:'none',
+						title: "出生年月不能为空",
+					});
+					return;
+				}
+				if(this.type=="add"){
+					this.addDoc()
+				}
+				else if(this.type=="edit"){
+					this.editDoc()
+				}
+				
+			},
+			editDoc(){
+				editDoc(this.form).then(
+					res => {
+						if(res.code==200){
+							 uni.showToast({
+							 	icon:'success',
+							 	title: "操作成功",
+							 });
+							 setTimeout(function() {
+								 uni.$emit('refreshDoc');
+								 uni.navigateBack({
+									 delta: 1
+								 })
+							 }, 500);
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			addDoc(){
+				addDoc(this.form).then(
+					res => {
+						if(res.code==200){
+							 uni.showToast({
+							 	icon:'success',
+							 	title: "操作成功",
+							 });
+							 setTimeout(function() {
+								 uni.$emit('refreshDoc');
+								 uni.navigateBack({
+									 delta: 1
+								 })
+							 }, 500);
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			// 出生日期选择
+			bindDateChange: function(e) {
+				this.form.birthday = e.target.value
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		height: 100%;
+	}
+	.content{
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;
+		.inner{
+			height: calc(100% - 120upx);
+			padding: 20upx;
+			.form-box{
+				padding: 0 30upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				.form-item{
+					padding: 30upx 0;
+					display: flex;
+					align-items: flex-start;
+					border-bottom: 1px solid #F1F1F1;
+					&:last-child{
+						border-bottom: none;
+					}
+					.label{
+						width: 150upx;
+						text-align: left;
+						font-size: 30upx;
+						line-height: 44upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #222222;
+						flex-shrink: 0;
+					}
+					input{
+						text-align: left;
+					}
+					.form-input{
+						font-size: 30upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						text-align: left;
+					}
+					.form-textarea{
+						font-size: 30upx;
+						color: #999999;
+						height: 100upx;
+						padding: 4upx 0;
+					}
+					 
+					.birth-picker {
+						flex: 1;
+						display: flex;
+						align-items: center;
+						
+						.right-box{
+							width: 100%;
+							display: flex;
+							align-items: center;
+							.input-box{
+								width: 470upx;
+							}
+							.arrow{
+								width: 13upx;
+								height: 23upx;
+								margin-left: 20upx;
+							}
+						}
+					}
+				}
+			}
+		}
+		.btn-box{
+			height: 120upx;
+			padding: 0 30upx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			background: #FFFFFF;
+			.sub-btn{
+				width: 100%;
+				height: 88upx;
+				line-height: 88upx;
+				text-align: center;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				background: #2BC7B9;
+				border-radius: 44upx;
+			}
+		}
+	}
+</style>

+ 285 - 0
pages_user/user/addDocRecord.vue

@@ -0,0 +1,285 @@
+<template>
+	<view class="content">
+		<view class="inner">
+			
+			<view class="text-content">
+				<view class="title">
+					<text class="black">健康记录</text>
+				</view>
+				<textarea class="textArea" maxlength="200" @input="contentInput" placeholder="请填写健康记录,我们会匹配专业的医师为您回复"></textarea>
+			</view>
+			<view class="img-content">
+				<view class="title">
+					<text class="black">上传图片</text>
+				</view>
+				<view class="upload-img">
+					<view class="img" v-for="(item,index) in imgList" :key="index"  >
+						<image :src="item" mode="aspectFill"  @click="previewImage(index)"></image>
+						<view class="del" @click="delImg(index)" >
+							<image src="/static/images/del2.png"></image>
+						</view>
+					</view>
+					<view class="chose-img" @tap="chooseImage(1)" v-if="imgList.length<4">
+						<image src="/static/images/adds.png"></image>
+					</view>
+				</view>
+			</view>
+			 
+		</view>
+		<view class="btn-box">
+			<view class="sub-btn" @click="submit()">提交记录</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {getDocDetails,addDocRecord} from '@/api/doc.js'
+	export default {
+		data() {
+			return {
+				imgList: [],  
+				docId:null,
+				form: {
+					images:[],
+					title:""
+				}
+			};
+		},
+		onLoad(option) {
+			this.docId=option.docId;
+		},
+		methods:{
+			contentInput(e) {
+				this.form.title = e.detail.value
+			},
+			// 选择图片
+			chooseImage(type) {
+				var that=this;
+				uni.chooseImage({
+					count: 4, //默认9
+					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['album', 'camera'], //从相册选择
+					success: (res) => {
+						uni.uploadFile({
+							url: uni.getStorageSync('requestPath')+'/app/common/uploadOSS', //仅为示例,非真实的接口地址
+							filePath: res.tempFilePaths[0],
+							name: 'file',
+							success: (res) => {
+								that.imgList.push(JSON.parse( res.data).url)
+							}
+						});
+					}
+				});
+			},
+			//图片预览
+			previewImage(index){
+				//预览图片
+				uni.previewImage({
+					urls: this.imgList,
+					current: this.imgList[index]
+				});
+			},
+			delImg(index) {
+				uni.showModal({
+					title: '提示',
+					content: '确定要删除这张图片吗?',
+					cancelText: '取消',
+					confirmText: '确定',
+					success: res => {
+						if (res.confirm) {
+							this.imgList.splice(index, 1);
+						}
+					}
+				})
+			},
+			submit(){
+				var that=this;
+				if(this.form.title==""){
+					uni.showToast({
+						icon:'none',
+						title: "请输入健康记录内容"
+					});
+					return;
+				}
+				uni.showLoading({
+					title:"正在处理中"
+				})
+				var data={
+					docId:this.docId,
+					title:this.form.title,
+					images:this.imgList.toString()
+				}
+				addDocRecord(data).then(
+				 	res => {
+				 		if(res.code==200){
+							uni.hideLoading()
+				 			uni.showToast({
+				 			 	icon:'success',
+				 			 	title:res.msg,
+				 			});
+							uni.$emit('refreshDocRecord');
+							setTimeout(function(){
+								uni.navigateBack({
+									delta:1
+								})
+							},200);
+				 			
+				 		}else{
+				 			uni.showToast({
+								icon:'none',
+				 				title: res.msg,
+				 			});
+				 		}
+				 	},
+				 	rej => {}
+				 );
+			},
+			 
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		height: 100%;
+	}
+	.content{
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;
+		.inner{
+			height: calc(100% - 120upx);
+			padding: 20upx;
+			.text-content{
+				box-sizing: border-box;
+				min-height: 286upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				padding: 40upx 30upx 22upx;
+				margin-top: 20upx;
+				.title{
+					display: flex;
+					align-items: center;
+					align-items: flex-end;
+					.black{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #111111;
+						line-height: 1;
+					}
+					.gray{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						color: #999999;
+						line-height: 1;
+						margin-left: 10upx;
+					}
+				}
+				.textArea{
+					margin: 30rpx 0rpx 0rpx 0rpx;
+					width: 100%;
+				}
+				 
+				
+				 
+			}
+			.img-content{
+				box-sizing: border-box;
+				min-height: 286upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				padding: 40upx 30upx 22upx;
+				margin-top: 20upx;
+				margin-bottom: 20upx;
+				.title{
+					display: flex;
+					align-items: center;
+					align-items: flex-end;
+					.black{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #111111;
+						line-height: 1;
+						margin-left: 10upx;
+					}
+					.gray{
+						font-size: 28upx;
+						font-family: PingFang SC;
+						color: #999999;
+						line-height: 1;
+						margin-left: 10upx;
+					}
+				}
+				.textArea{
+					margin: 30rpx 0rpx 0rpx 0rpx;
+					width: 100%;
+				}
+				.upload-img{
+					margin: 30rpx 0rpx 0rpx 0rpx;
+					width: 100%;
+					display: flex;
+					align-items: flex-start;
+					.img{
+						margin-right: 10rpx;
+						width: 100rpx;
+						height: 100rpx;
+						position: relative;
+						image{
+							width: 100%;
+							height: 100%;
+						}
+						.del{
+							right:0rpx;
+							top:0rpx;
+							position: absolute;
+							image{
+								width: 30rpx;
+								height:30rpx;
+							}
+						}
+					}
+					.chose-img{
+						box-sizing: border-box;
+						border-radius: 5rpx;
+						border: 1px solid #eee;
+						display: flex;
+						align-items: center;
+						justify-content: center;
+						width: 100rpx;
+						height: 100rpx;
+						image{
+							width: 50rpx;
+							height: 50rpx;
+						}
+						
+					}
+				}
+				
+				 
+			}
+		}
+		.btn-box{
+			height: 120upx;
+			padding: 0 30upx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			background: #FFFFFF;
+			.sub-btn{
+				width: 100%;
+				height: 88upx;
+				line-height: 88upx;
+				text-align: center;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				background: #2BC7B9;
+				border-radius: 44upx;
+			}
+		}
+	}
+</style>

+ 248 - 0
pages_user/user/addPatient.vue

@@ -0,0 +1,248 @@
+<template>
+	<view class="content">
+		<view class="inner">
+			<view class="form-box">
+				<view class="form-item">
+					<text class="label">姓名</text>
+					<input class="input-width" type="text" v-model="form.patientName" placeholder="请如实填写您的真实姓名" placeholder-class="form-input" />
+				</view>
+				<view class="form-item">
+					<text class="label">性别</text>
+					<radio-group style="display: flex;align-items: center;">
+						<label style="margin-right: 50upx;">
+							<radio @click="genderChange(1)" value="1" :checked="form.gender===1" style="margin-right: 16upx;" />
+							<text class="sex-text">男</text>
+						</label>
+						<label>
+							<radio @click="genderChange(2)" value="2" :checked="form.gender===2" style="margin-right: 16upx;" />
+							<text class="sex-text">女</text>
+						</label>
+					</radio-group>
+				</view>
+				<view class="form-item">
+					<text class="label">身份证号</text>
+					<input class="input-width" type="idcard" v-model="form.idCard" placeholder="请如实填写身份证号" placeholder-class="form-input" />
+				</view>
+				<view class="form-item">
+					<text class="label">出生年月</text>
+					<picker class="birth-picker" mode="date"   @change="bindDateChange">
+						<view class="right-box">
+							<view class="input-box">
+								<input type="text" :value="form.birthday" placeholder="请选择出生年月" placeholder-class="form-input" disabled="disabled" />
+							</view>
+							<image class="arrow" src="../../static/images/arrow_gray.png" mode=""></image>
+						</view>
+					</picker>
+				</view>
+				<!-- <view class="form-item">
+					<text class="label">联系电话</text>
+					<input type="number" value="" placeholder="请输入联系电话" placeholder-class="form-input" />
+				</view> -->
+			</view>
+		</view>
+		<view class="btn-box">
+			<view class="sub-btn" @click="submit()">保存就诊人</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {getPatientById,addPatient,editPatient} from '@/api/patient'
+	export default {
+		data() {
+			return {
+				type:null,
+				patientId:null,
+				form: {
+					gender: 1,
+					birthday: ''
+				}
+			};
+		},
+		onLoad(option) {
+			this.type=option.type;
+			console.log(this.type)
+			if(this.type=='edit'){
+				this.patientId=option.patientId;
+				this.getPatientById();
+			}
+		},
+		methods:{
+			genderChange(type){
+				this.form.gender=type
+			},
+			getPatientById(){
+				var data={patientId:this.patientId};
+				getPatientById(data).then(
+					res => {
+						if(res.code==200){
+							  this.form=res.data;
+							  
+						}else{
+							uni.showToast({
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			submit(){
+				if(this.type=="add"){
+					this.addPatient()
+				}
+				else if(this.type=="edit"){
+					this.editPatient()
+				}
+				
+			},
+			editPatient(){
+				editPatient(this.form).then(
+					res => {
+						if(res.code==200){
+							 uni.showToast({
+							 	icon:'success',
+							 	title: "操作成功",
+							 });
+							 setTimeout(function() {
+								 uni.$emit('refreshPatient');
+								 uni.navigateBack({
+									 delta: 1
+								 })
+							 }, 500);
+						}else{
+							uni.showToast({
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			addPatient(){
+				addPatient(this.form).then(
+					res => {
+						if(res.code==200){
+							 uni.showToast({
+							 	icon:'success',
+							 	title: "操作成功",
+							 });
+							 setTimeout(function() {
+								 uni.$emit('refreshPatient');
+								 uni.navigateBack({
+									 delta: 1
+								 })
+							 }, 500);
+						}else{
+							uni.showToast({
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			// 出生日期选择
+			bindDateChange: function(e) {
+				this.form.birthday = e.target.value
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		height: 100%;
+	}
+	.content{
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;
+		.inner{
+			height: calc(100% - 120upx);
+			padding: 20upx;
+			.form-box{
+				padding: 20upx 30upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				.form-item{
+					height: 103upx;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					border-bottom: 1px solid #F1F1F1;
+					&:last-child{
+						border-bottom: none;
+					}
+					.label{
+						font-size: 30upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #222222;
+					}
+					.input-width{
+						width: calc(100% - 150upx);
+						text-align: right;
+					}
+					.form-input{
+						font-size: 30upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						text-align: right;
+					}
+					.sex-text{
+						font-size: 30upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #111111;
+						line-height: 30upx;
+					}
+					.birth-picker {
+						display: flex;
+						align-items: center;
+						.right-box{
+							display: flex;
+							align-items: center;
+							.input-box{
+								width: 400upx;
+								display: flex;
+								align-items: center;
+								justify-content: flex-end;
+								input{
+									text-align: right;
+								}
+							}
+							.arrow{
+								width: 13upx;
+								height: 23upx;
+								margin-left: 20upx;
+							}
+						}
+					}
+				}
+			}
+		}
+		.btn-box{
+			height: 120upx;
+			padding: 0 30upx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			background: #FFFFFF;
+			.sub-btn{
+				width: 100%;
+				height: 88upx;
+				line-height: 88upx;
+				text-align: center;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				background: #2BC7B9;
+				border-radius: 44upx;
+			}
+		}
+	}
+</style>

+ 269 - 0
pages_user/user/address.vue

@@ -0,0 +1,269 @@
+<template>
+	<view class="content">
+		<view class="inner">
+			<view class="top">
+				<view  class="del"  @click="delAllAddress">清空地址</view>
+			</view>
+			<view v-for="(item,index) in address" :key="index" class="address-item" >
+				<view class="info" @click="selectAddress(item)">
+					<view class="title">
+						<view v-if="item.isDefault == 1" class="tag">默认</view>
+						{{item.province}}{{item.city}}{{item.district}}{{item.detail}} 
+					</view>
+					<view class="name-phone">
+						<text class="text">{{item.realName}}</text>
+						<text class="text">{{utils.parsePhone(item.phone)}}</text>
+					</view>
+				</view>
+				<view class="operat-box">
+					<image src="../../static/images/del1.png" mode="" @click="delAddress(item)"></image>
+					<image src="../../static/images/edit.png" mode="" @click="editAddress(item)"></image>
+				</view>
+			</view>
+			<view v-if="address.length == 0" class="no-data-box" @click="getAddressList()">
+				<image src="../../static/images/no_data.png" mode="aspectFit"></image>
+				<view class="empty-title">暂无数据</view>
+			</view>
+			
+		</view>
+		<view class="btn-box">
+			
+			<view class="sub-btn" @click="addAdress">新建收货地址</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {getAddressList,delAddress,delAllAddress} from '@/api/address'
+	export default {
+		data() {
+			return {
+				address:[],
+			}
+		},
+		onLoad() {
+			this.getAddressList()
+			uni.$on('refreshAddress', () => {
+				this.getAddressList()
+			})
+		 
+		},
+		methods: {
+			selectAddress(item){
+			  uni.$emit('updateAddress',item);
+			  uni.navigateBack({
+			  		delta: 1
+			  })
+			},
+			editAddress(item){
+				uni.navigateTo({
+					url: './addAddress?type=edit&id='+item.id
+				})
+			},
+			delAllAddress(item){
+				uni.showModal({
+					title:"提示",
+					content:"确认删除所有地址吗?",
+					showCancel:true,
+					cancelText:'取消',
+					confirmText:'确定',
+					success:res=>{
+						if(res.confirm){
+							var data={ }
+							delAllAddress(data).then(
+								res => {
+									if(res.code==200){
+										 uni.showToast({
+										 	icon:'success',
+										 	title: "操作成功",
+										 });
+										 this.getAddressList()
+									}else{
+										uni.showToast({
+											icon:'none',
+											title: "请求失败",
+										});
+									}
+								},
+								rej => {}
+							);
+														
+						}else{
+							// 否则点击了取消  
+						}
+					}
+				})
+			},
+			delAddress(item){
+				uni.showModal({
+					title:"提示",
+					content:"确认删除此地址吗?",
+					showCancel:true,
+					cancelText:'取消',
+					confirmText:'确定',
+					success:res=>{
+						if(res.confirm){
+							// 用户点击确定
+							var data={id:item.id}
+							delAddress(data).then(
+								res => {
+									if(res.code==200){
+										 uni.showToast({
+										 	icon:'success',
+										 	title: "操作成功",
+										 });
+										 this.getAddressList()
+									}else{
+										uni.showToast({
+											icon:'none',
+											title: "请求失败",
+										});
+									}
+								},
+								rej => {}
+							);
+														
+						}else{
+							// 否则点击了取消  
+						}
+					}
+				})
+			},
+			getAddressList(){
+				uni.showLoading({
+					title:"正在加载中"
+				})
+				getAddressList().then(
+					res => {
+						uni.hideLoading()
+						if(res.code==200){
+							this.address=res.data;
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			// 新建收货地址
+			addAdress() {
+				uni.navigateTo({
+					url: './addAddress?type=add'
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		height: 100%;
+	}
+	.content{
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;
+		.inner{
+			flex: 1;
+			padding: 20upx 20upx 160upx;
+			.top{
+				padding: 0upx 20upx 20upx;
+				text-align: right;
+				.del{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					color: #999999;
+				}
+			}
+			.address-item{
+				background: #FFFFFF;
+				border-radius: 16upx;
+				padding: 46upx 40upx 50upx 24upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				margin-bottom: 20upx;
+				.info{
+					width: 75%;
+					.title{
+						font-size: 30upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #111111;
+						line-height: 42upx;
+						word-break: break-all;
+						.tag{
+							padding: 0 6upx;
+							height: 32upx;
+							line-height: 32upx;
+							font-size: 22upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #FFFFFF;
+							background: #2BC7B9;
+							border-radius: 4upx;
+							float: left;
+							margin-right: 10upx;
+							margin-top: 5upx;
+						}
+					}
+					.name-phone{
+						margin-top: 30upx;
+						display: flex;
+						align-items: center;
+						.text{
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							margin-right: 22upx;
+							&:last-child{
+								margin-right: 0;
+							}
+						}
+					}
+				}
+				
+				.operat-box{
+					display: flex;
+					align-items: center;
+					image{
+						width: 30upx;
+						height: 30upx;
+						margin-left: 38upx;
+						&:first-child{
+							margin-left: 0;
+						}
+					}
+				}
+			}
+		}
+		.btn-box{
+			z-index: 9999;
+			width: 100%;
+			padding: 30upx;
+			position: fixed;
+			bottom: 0;
+			left: 0;
+			box-sizing: border-box;
+			background: #FFFFFF;
+			 
+			.sub-btn{
+				 
+				height: 88upx;
+				line-height: 88upx;
+				text-align: center;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				background: #2BC7B9;
+				border-radius: 44upx;
+			}
+		}
+	}
+</style>

+ 237 - 0
pages_user/user/doc.vue

@@ -0,0 +1,237 @@
+<template>
+	<view class="content">
+		<view class="inner">
+			<view v-for="(item,index) in docs" :key="index" class="item" @click="showDetail(item)">
+				<view class="user-info">
+					<view class="name">{{item.userName}}</view>
+					<text class="gray-tag" v-if="item.sex==1">男</text>
+					<text class="gray-tag" v-if="item.sex==2">女</text>
+					<view class="gray-tag">{{utils.getAge(item.birthday)}}岁</view>
+					<view class="blue-tag">标签</view>
+				</view>
+			<!-- 	<view class="stage-box">
+					<text class="stage">阶段1:</text>
+					<text class="stage-text">药物治疗胰岛素降糖,洛氟沙星抗感染治疗中治疗中治疗中治疗中</text>
+				</view>
+				<view class="progress-box">
+					<progress :percent="80" activeColor="#4BC9B1" border-radius="5" stroke-width="5" />
+				</view> -->
+				<view class="period">建档时间 {{item.createTime}}</view>
+				<view class="period">备注 {{item.remark!=null?item.remark:''}}</view>
+			</view>
+			<view v-if="docs.length == 0" class="no-data-box" @click="getMyDocList()">
+				<image src="../../static/images/no_data.png" mode="aspectFit"></image>
+				<view class="empty-title">暂无数据</view>
+			</view>
+		</view>
+		<view class="btn-box">
+			<view class="sub-btn" @click="addDoc">创建健康档案</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {getMyDocList,delDoc} from '@/api/doc.js'
+	export default {
+		data() {
+			return {
+				docs:[],
+			}
+		},
+		onLoad() {
+			this.getMyDocList()
+			uni.$on('refreshDoc', () => {
+				this.getMyDocList()
+			})
+		},
+		methods: {
+			showDetail(item){
+				uni.navigateTo({
+					url: './docDetail?docId='+item.docId
+				})
+			},
+			editDoc(item){
+				uni.navigateTo({
+					url: './addDoc?type=edit&docId='+item.docId
+				})
+			},
+			delDoc(item){
+				uni.showModal({
+					title:"提示",
+					content:"确认删除吗?",
+					showCancel:true,
+					cancelText:'取消',
+					confirmText:'确定',
+					success:res=>{
+						if(res.confirm){
+							// 用户点击确定
+							var data={docId:item.docId}
+							delDoc(data).then(
+								res => {
+									if(res.code==200){
+										 uni.showToast({
+										 	icon:'success',
+										 	title: "操作成功",
+										 });
+										 this.getMyDocList()
+									}else{
+										uni.showToast({
+											icon:'none',
+											title: "请求失败",
+										});
+									}
+								},
+								rej => {}
+							);
+														
+						}else{
+							// 否则点击了取消  
+						}
+					}
+				})
+			},
+			getMyDocList(){
+				uni.showLoading({
+					title:"正在加载中"
+				})
+				getMyDocList().then(
+					res => {
+						uni.hideLoading()
+						if(res.code==200){
+							this.docs=res.data;
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			addDoc() {
+				uni.navigateTo({
+					url: './addDoc?type=add'
+				})
+			}
+			 
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		height: 100%;
+	}
+	.content{
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;
+		.inner{
+			flex: 1;
+			padding: 20upx 20upx 160upx;
+			.item{
+				background: #FFFFFF;
+				border-radius: 20upx;
+				margin-bottom: 20upx;
+				padding: 40upx 30upx;
+				&:last-child{
+					margin-bottom: 0;
+				}
+				.user-info{
+					display: flex;
+					align-items: center;
+					.name{
+						font-size: 36upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #111111;
+						line-height: 1;
+						margin-right: 20upx;
+					}
+					.gray-tag{
+						height: 46upx;
+						line-height: 46upx;
+						padding: 0 16upx;
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #333333;
+						background: #F7F7F7;
+						border-radius: 8upx;
+						margin-right: 10upx;
+					}
+					.blue-tag{
+						height: 46upx;
+						line-height: 46upx;
+						padding: 0 16upx;
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #4BC9B1;
+						background: #E2F6F2;
+						border-radius: 8upx;
+					}
+				}
+				.stage-box{
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					margin-top: 34upx;
+					.stage{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #111111;
+						line-height: 1;
+					}
+					.stage-text{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+						line-height: 1;
+					}
+				}
+				.progress-box{
+					margin-top: 18upx;
+				}
+				.period{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1;
+					margin-top: 40upx;
+				}
+			}
+			 
+		}
+		.btn-box{
+			z-index: 9999;
+			width: 100%;
+			padding: 30upx;
+			position: fixed;
+			bottom: 0;
+			left: 0;
+			box-sizing: border-box;
+			background: #FFFFFF;
+			
+	 
+			.sub-btn{
+				width: 100%;
+				height: 88upx;
+				line-height: 88upx;
+				text-align: center;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				background: #2BC7B9;
+				border-radius: 44upx;
+			}
+		}
+		 
+	}
+</style>

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است