Browse Source

用户体系优化V1.0.0

zhengjinyi 5 năm trước cách đây
mục cha
commit
d085a3b87b

+ 2 - 2
api/cart.js

@@ -69,7 +69,7 @@ export function shoppingCartDelete(params) {
  */
 export function queryAddressList(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/personalCenter/findAddress',params, res => {
+		request.lodingGet('/personalCenter/findAddress',params, res => {
 			if(res.code == 0){
 				resolve(res)
 			}else{
@@ -97,7 +97,7 @@ export function addNewAddress(params) {
  */
 export function deleteNewAddress(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/findAddress/deleteAddress',params, res => {
+		request.lodingGet('/findAddress/deleteAddress',params, res => {
 			if(res.code == 0){
 				resolve(res)
 			}else{

+ 59 - 11
api/order.js

@@ -40,6 +40,21 @@ export function queryOrderList(params) {
 		})
 	})
 }
+/**
+ *查询订单详情
+ *@param orderID 订单ID
+ */
+export function queryOrderDetails(params) {
+	return new Promise(function(resolve,reject) {
+		request.get('/order/detail',params, res => {
+			if(res.code == 0){
+				resolve(res)
+			}else{
+				reject(res)
+			}
+		})
+	})
+}
 /**
  *获取订单分享码
  * @param
@@ -61,7 +76,7 @@ export function queryOrderShareCode(params) {
  */
 export function cancelOrder(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/club/authorization',params, res => {
+		request.get('/order/cancel',params, res => {
 			if(res.code == 0){
 				resolve(res)
 			}else{
@@ -76,7 +91,7 @@ export function cancelOrder(params) {
  */
 export function deleteOrder(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/club/authorization',params, res => {
+		request.get('/order/delete',params, res => {
 			if(res.code == 0){
 				resolve(res)
 			}else{
@@ -91,7 +106,7 @@ export function deleteOrder(params) {
  */
 export function confirmReceipt(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/club/authorization',params, res => {
+		request.get('/order/affirm',params, res => {
 			if(res.code == 0){
 				resolve(res)
 			}else{
@@ -106,7 +121,7 @@ export function confirmReceipt(params) {
  */
 export function queryLogistics(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/club/authorization',params, res => {
+		request.get('/order/logistics',params, res => {
 			if(res.code == 0){
 				resolve(res)
 			}else{
@@ -116,12 +131,12 @@ export function queryLogistics(params) {
 	})
 }
 /**
- *查询订单详情
+ *分享订单登录
  * @param
  */
-export function queryOrderDetails(params) {
+export function orderShareCode(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/club/authorization',params, res => {
+		request.get('/order/share',params, res => {
 			if(res.code == 0){
 				resolve(res)
 			}else{
@@ -131,12 +146,45 @@ export function queryOrderDetails(params) {
 	})
 }
 /**
- *分享订单登录
- * @param
+ *搜索订单
+ *@param searchWord 关键词
+ *@param userId		用户ID
+ *@param pageNum	页码
+ *@param pageSize	条数
  */
-export function orderShareLogin(params) {
+export function searchOrderInfo(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/club/authorization',params, res => {
+		request.lodingGet('/order/search',params, res => {
+			if(res.code == 0){
+				resolve(res)
+			}else{
+				reject(res)
+			}
+		})
+	})
+}
+/**
+ *搜索订单历史记录
+ *@param userId
+ */
+export function searchOrderHistory(params) {
+	return new Promise(function(resolve,reject) {
+		request.get('/order/searchHistory',params, res => {
+			if(res.code == 0){
+				resolve(res)
+			}else{
+				reject(res)
+			}
+		})
+	})
+}
+/**
+ *清楚订单历史记录
+ *@param
+ */
+export function clearOrderHistory(params) {
+	return new Promise(function(resolve,reject) {
+		request.lodingGet('/order/searchHistory/delete',params, res => {
 			if(res.code == 0){
 				resolve(res)
 			}else{

+ 22 - 6
api/product.js

@@ -40,13 +40,14 @@ export function queryGoodslist(url,params) {
 }
 /**
  * @商品搜索
+ * @param:userId 用户ID
  * @param:searchWord 关键词
  * @param:pageNum	页码
  * @param:pageSize	每页显示条数
  */
 export function querySearchProduct(params) {
 	return new Promise(function(resolve,reject) {
-		request.get("/product/search",params, res => {
+		request.lodingGet("/product/search",params, res => {
 			if(res.code == 0){
 				resolve(res);
 			}else{
@@ -57,11 +58,26 @@ export function querySearchProduct(params) {
 }
 /**
  * @搜索历史记录
- * @param:header请求头加入token
+ * @param:userId 用户ID
  */
-export function querySearchHistory() {
+export function querySearchHistory(params) {
 	return new Promise(function(resolve,reject) {
-		request.get("/product/searchHistory",{}, res => {
+		request.get("/product/searchHistory",params, res => {
+			if(res.code == 0){
+				resolve(res);
+			}else{
+				reject(res)
+			}
+		})
+	});
+}
+/**
+ * @清除历史记录
+ * @param:userId 用户ID
+ */
+export function clearSearchHistory(params) {
+	return new Promise(function(resolve,reject) {
+		request.lodingGet("/product/searchHistory/delete",params, res => {
 			if(res.code == 0){
 				resolve(res);
 			}else{
@@ -134,13 +150,13 @@ export function queryPreferred(params) {
 }
 /**
  * @再次购买商品列表
- * @param:
+ * @param:userId  用户ID
  * @param:pageNum 页码
  * @param:pageSize 每页条数
  */
 export function queryAgaingoodslist(params) {
 	return new Promise(function(resolve,reject) {
-		request.get("/product/preferred",params, res => {
+		request.lodingGet("/repeat/buyAgain",params, res => {
 			if(res.code == 0){
 				resolve(res);
 			}else{

+ 1 - 1
components/module/creatOrder/choiceAddress.vue

@@ -20,7 +20,7 @@
 							{{addressData.province !== undefined ? addressData.province : ''}}
 							{{addressData.city !== undefined ? addressData.city : ''}}
 							{{addressData.town !== undefined ? addressData.town : ''}}
-							{{addressData.addressDetail !== undefined ? addressData.addressDetail : ''}}
+							{{addressData.address !== undefined ? addressData.address : ''}}
 						</view>
 					</view>
 					<view class="nexpage"><text class="iconfont icon-genghuan"></text></view>

+ 1 - 1
components/module/listTemplate/commodityList.vue

@@ -128,7 +128,7 @@
 				if(self.$parent.lastPageType === '再次购买') {
 					self.fromRegularPurchasePage = true;
 				}
-				queryGoodslist(thisServerurl,{userID:this.userID,pageNum:self.pageNum,pageSize:self.pageSize}).then(response=>{
+				queryGoodslist(thisServerurl,{userId:this.userID,pageNum:self.pageNum,pageSize:self.pageSize}).then(response=>{
 					const resData = self.fromRegularPurchasePage ?response.data.page :response.data;
 					const resList = resData.results,
 						  getCartNum = response.data.count;

+ 43 - 29
components/module/modelAlert/freightAlert.vue

@@ -3,14 +3,20 @@
 		<!-- 运费弹窗说明 -->
 		<view class="freight-alert"  @tap="hideFreight">
 			<view class="content">
+				<view class="title">
+					<text>运费规则</text>
+					<text class="iconfont icon-iconfontguanbi" @click.stop="hideFreight"></text>
+				</view>
 				<view class="text-content">
-					<view class="title">运费说明</view>
+					<view class="text-h1">一、除含有仪器类、家具类等指定商品的订单,运费规则如下:</view>
 					<view class="text">
-						<text>所有仪器类商品都是到付;针对非仪器类商品,若您所在的机构购买了包邮服务,则为包邮;否则,也是到付。包邮服务可以联系客服进行购买,</text>
+						<text>1、首单,全国包邮(注:如果首单中含有不包邮的指定商品,则首单只能"到付");</text>
+						<text>2、订单商品总额满1000元,全国包邮;</text>
+						<text>3、订单商品总额不足1000元,深圳市内运费10元,广东省内深圳市外运费15元,其它地方运费到付;</text>
+						<text>4、地推送货上门无需运费(注:下单可选择运费是否到付)。</text>
 					</view>
-					<view class="tel">客服热线:<text class="txt">{{cellPhone}}</text></view>
+					<view class="text-h1">二、含有仪器类、家具类等指定商品的订单,运费到付。</view>
 				</view>
-				<view class="btn"  @tap="hideFreight">确定</view>
 			</view>
 		</view>
 	</view>
@@ -19,7 +25,7 @@
 <script>
 	export default{
 		name:'alert',
-		props:['cellPhone'],
+		props:{},
 		data() {
 			return{
 				
@@ -66,8 +72,8 @@
 			display: block;
 		}
 		.content{
-			width: 580rpx;
-			height: 750rpx;
+			width: 530rpx;
+			height: 710rpx;
 			position: absolute;
 			background: $bg-color;
 			left: 0;
@@ -75,36 +81,44 @@
 			bottom: 0;
 			top: 0;
 			margin: auto;
-			.text-content{
-				width: 448rpx;
-				height: 264rpx;
-				padding: 35rpx;
-				float: left;
-				.title{
-					line-height: 40rpx;
-					font-size: $font-size-28;
-					color: $text-color;
+			padding: 20rpx 25rpx;
+			border-radius: 12rpx;
+			.title{
+				width: 100%;
+				height: 68rpx;
+				line-height: 68rpx;
+				font-size: $font-size-28;
+				color: $text-color;
+				text-align: center;
+				margin-bottom: 32rpx;
+				position: relative;
+				.icon-iconfontguanbi{
+					width: 68rpx;
+					height: 68rpx;
 					text-align: center;
-					font-weight: bold;
-					margin-bottom: 32rpx;
+					line-height: 68rpx;
+					position: absolute;
+					right: 0;
+					top: 0;
+					font-size: $font-size-36;
+					color: #999999;
 				}
+			}
+			.text-content{
+				width: 100%;
+				height: auto;
 				.text{
-					line-height: 36rpx;
+					padding: 40rpx 0;
+					line-height: 44rpx;
 					font-size: $font-size-26;
-					color: $text-color;
+					color:#666666;
 					text-align: justify;
-					margin-top: 22rpx;
 				}
-				.tel{
-					line-height: 36rpx;
-					font-size: $font-size-26;
+				.text-h1{
+					line-height: 44rpx;
+					font-size: $font-size-28;
 					color: $text-color;
 					text-align: justify;
-					margin-top: 22rpx;
-					font-weight: bold;
-					.txt{
-						margin-left: 10rpx;
-					}
 				}
 			}
 			.btn{

+ 19 - 20
components/module/modelAlert/shareAlert.vue

@@ -6,7 +6,7 @@
 					<view class="title">分享订单</view>
 					<view class="share">您的分享码:<text class="txt">{{shareCode}}</text></view>
 					<view class="text">
-						<text>有效期为24小时。分享订单后请将该分享码也一并告知被分享者,被分享者需要输入该分享码才能查看本订单。</text>
+						<text>有效期为24小时。分享订单后请将该分享码也一并告知被分享者,被分享者需要输入该分享码才能查看本订单。</text>
 					</view>
 				</view>				
 				<view class="alert-btn">
@@ -21,6 +21,7 @@
 </template>
 
 <script>
+	import { orderShareCode } from "@/api/order.js" 
 	export default{
 		name:'sharealert',
 		props:{
@@ -38,20 +39,15 @@
 		},
 		methods:{
 			getShareCode(res){
-				this.$api.get('/order/share',{orderID:res},
-					response => {
-						if(response.code === '1'){
-							// console.log( response.data)
-							this.shareCode = response.data
-							this.$parent.shareCode = this.shareCode;
-						}else{
-							this.$parent.isShareModal = false;
-							this.$util.modal('提示',response.msg,'确定','',false,() =>{
-								 this.$api.switchTabTo('/pages/tabBar/home/home')
-							})
-						}
-					}
-				)
+				orderShareCode({orderID:res}).then(response =>{
+					this.shareCode = response.data
+					this.$parent.shareCode = this.shareCode;
+				}).catch(response =>{
+					this.$parent.isShareModal = false;
+					this.$util.modal('提示',response.msg,'确定','',false,() =>{
+						 this.$api.switchTabTo('/pages/tabBar/home/home')
+					})
+				})
 			},
 			hideConfirm(){
 				this.$parent.isShareModal = false
@@ -97,10 +93,11 @@
 			bottom: 0;
 			top: 0;
 			margin: auto;
+			border-radius: 24rpx;
 			.text-content{
 				width: 448rpx;
 				height: 264rpx;
-				padding: 35rpx;
+				padding: 20rpx 35rpx;
 				float: left;
 				.title{
 					line-height: 40rpx;
@@ -131,17 +128,19 @@
 				}
 			}
 			.alert-btn{
-				width: 100%;
-				height: 88rpx;
+				width: 80%;
+				height: 70rpx;
 				display: flex;
+				margin: 0 auto;
 				.btn{
 					flex: 1;
-					line-height: 88rpx;
+					line-height: 70rpx;
 					font-size: $font-size-28;
 					text-align: center;
 					color: #FFFFFF;
-					border-radius: 0;
+					border-radius: 14rpx;
 					padding: 0;
+					margin: 0 15rpx;
 					&.btn-cancel{
 						background: $btn-cancel;
 					}

+ 42 - 17
components/module/orderDetails/goodsList.vue

@@ -7,19 +7,27 @@
 					<view class="title-logo"><image :src="item.shopLogo" mode=""></image></view>
 					<view class="title-text">{{item.shopName}}</view> 
 				</view>
-				<view class="productlist" v-for="(pros,idx) in item.cmOrderProducts" :key="idx">
+				<view class="productlist" v-for="(pros,idx) in item.orderProductList" :key="idx">
 					<view class="goods-pros-t">
-						<view class="pros-img"><image :src="pros.productImage" alt="" /></view>
+						<view class="pros-left">
+							<view class="pros-img"><image :src="pros.productImage" alt="" /></view>
+						</view>
 						<view class="pros-product">
 							<view class="producttitle">{{pros.name}}</view>
-							<view class="productspec">规格:{{pros.productUnit}}</view>
-							<view class="productprice">
-								<view class="price">
-									<text>¥{{pros.price.toFixed(2)}}</text>
-								</view>
-								<view class="count">
-									<text class="small">x</text>{{pros.num}}
-								</view>
+							<view class="productspec">规格:{{pros.productUnit}}</view>
+							<view class="product-view">
+								<view class="view-num">单价:{{pros.price.toFixed(2)}}</view>
+								<view class="view-num">数量(赠品):{{pros.num}}({{pros.presentNum}})</view>
+							</view>
+							<view class="product-view">
+								<view class="view-num">税率:{{pros.taxRate}}%</view>
+								<view class="view-num">折扣:{{discount == null ? '0' : discount}}%</view>
+							</view>
+							<view class="product-view">
+								<view class="view-num">折后单价:{{pros.discountPrice.toFixed(2)}}</view>
+							</view>
+							<view class="product-view">
+								<view class="view-num">合计:{{pros.totalFee.toFixed(2)}}</view>
 							</view>
 						</view>	
 					</view>
@@ -27,12 +35,12 @@
 				<view class="goods-pros-m" v-if="item.note!=''">
 					<view class="m-text">留言:</view>
 					<view class="m-input">
-						<view class="text">{{item.note}}</view>
+						<view class="text">{{item.note ? item.note : ''}}</view>
 					</view>	
 				</view>
 				<view class="goods-pros-b">
 					<view class="count">共{{item.itemCount}}件商品</view>
-					<view class="sum">合计:<text class="money">¥{{item.productAmount.toFixed(2)}}</text></view>
+					<view class="sum">商品总额:<text class="money">¥{{item.productAmount.toFixed(2)}}</text></view>
 				</view>
 			</view>
 		</view>	
@@ -118,13 +126,17 @@
 				display: flex;
 				align-items: center;
 				width: 100%;
-				height: 217rpx;
+				height: 260rpx;
 				padding: 12rpx 0;
-				.pros-img{
+				.pros-left{
 					width: 210rpx;
 					height: 100%;
-					border-radius: 10rpx;
 					margin:0 26rpx 0 0;
+				}
+				.pros-img{
+					width: 210rpx;
+					height: 210rpx;
+					border-radius: 10rpx;
 					border:1px solid #f3f3f3;
 					image{
 						width: 100%;
@@ -139,6 +151,18 @@
 				line-height: 36rpx;
 				font-size: $font-size-26;	
 				position: relative;
+				.product-view{
+					width: 100%;
+					height: auto;
+					display: flex;
+					.view-num{
+						flex: 1;
+						text-align: left;
+						font-size: $font-size-26;
+						color: #666666;
+						line-height: 44rpx;
+					}
+				}
 				.producttitle{
 					width: 100%;
 					display: inline-block;
@@ -152,8 +176,9 @@
 					margin-bottom: 8rpx;
 				}
 				.productspec{
-					height: 36rpx;
-					color: #999999;
+					height: 44rpx;
+					color: #666666;
+					line-height: 44rpx;
 				}
 				.productprice{
 					height: 48rpx;

+ 10 - 10
components/module/orderDetails/invoiceTent.vue

@@ -8,7 +8,7 @@
 			</view>
 			<view class="invoice-text" v-else>
 				<view class="invoice-top" @click="showInvoice">
-					<view class="name">{{orderInvoice.invoiceTitle}}</view>
+					<view class="name">{{orderInvoice.invoiceTitle ? orderInvoice.invoiceTitle : ''}}</view>
 					<text class="iconfont icon-web_xiangxiazhankai" :class="{'icon-web_xiangxiazhankai-active':isOpen}"></text>
 				</view>
 				<view :class="{'invoice-warp--hide':!isOpen}" class="invoice-warp">
@@ -16,27 +16,27 @@
 						   :style="{'transform':isOpen?'translateY(0)':'translateY(-50%)','-webkit-transform':isOpen?'translateY(0)':'translateY(-50%)'}">
 						<view class="table">
 							<text class="label-name">单位名称:</text>
-							<text>{{orderInvoice.invoiceTitle}}</text>
+							<text>{{orderInvoice.invoiceTitle ? orderInvoice.invoiceTitle : ''}}</text>
 						</view>
 						<view class="table long">
 							<text class="label-name">纳锐人识别号:</text>
-							<text>{{orderInvoice.corporationTaxNum}}</text> 
+							<text>{{orderInvoice.corporationTaxNum ? orderInvoice.corporationTaxNum :''}}</text> 
 						</view>
 						<view class="table">
 							<text class="label-name">注册地址:</text>
-							<text>{{orderInvoice.registeredAddress}}</text> 
+							<text>{{orderInvoice.registeredAddress ? orderInvoice.registeredAddress : ''}}</text> 
 						</view>
 						<view class="table">
 							<text class="label-name">注册电话:</text>
-							<text>{{orderInvoice.registeredPhone}}</text>
+							<text>{{orderInvoice.registeredPhone ? orderInvoice.registeredPhone : ''}}</text>
 						</view>
 						<view class="table">
 							<text class="label-name">开户银行:</text>
-							<text>{{orderInvoice.openBank}}</text>
+							<text>{{orderInvoice.openBank ? orderInvoice.openBank : ''}}</text>
 						</view>
 						<view class="table">
 							<text class="label-name">银行账号:</text>
-							<text>{{bankAccountNo}}</text>
+							<text>{{bankAccountNo ? bankAccountNo : ''}}</text>
 						</view>
 					</view>
 				</view>
@@ -69,11 +69,11 @@
 		},
 		methods:{
 			initData(res) {
-				if(res){
+				if(res.invoiceTitle == null){
+					this.isEmpty = true
+				}else{
 					this.isEmpty = false
 					this.bankAccountNo = this.$reg.bankRegex(res.bankAccountNo)
-				}else{
-					this.isEmpty = true
 				}
 			},
 			onMessage(pros){

+ 35 - 19
components/module/orderDetails/orderInformation.vue

@@ -2,7 +2,7 @@
 	<view class="information-template">
 		 <!-- 订单信息 -->
 		 <view class="information-content">
-			<view class="information-view">
+			<view class="information-view num">
 				<view class="view-num ord">订单编号:{{orderData.orderNo =='undefined' ? '' : orderData.orderNo}}</view>
 				<view class="view-type bold">{{typeText}}</view>
 			</view>
@@ -13,14 +13,16 @@
 				</view>
 			</view>
 			<view class="information-view">
-				<view class="view-num">订单总额:¥{{productTotalFee =='undefined' ? '' : productTotalFee}}</view>
+				<view class="view-num">订单总额:¥{{payTotalFee =='undefined' ? '' : payTotalFee}}</view>
+				<view class="view-man">余额抵扣:¥{{balancePayFee =='undefined' ? '' : balancePayFee}}</view>
 			</view>
 			<view class="information-view">
-				<view class="view-num">余额抵扣:¥{{balancePayFee =='undefined' ? '' : balancePayFee}}</view>
-				<view class="view-man" v-if="discountFee!=0">经理折扣:¥{{discountFee =='undefined' ? '' : discountFee}}</view>
+				<view class="view-num">运费:¥{{freight =='undefined' ? '0.00' : freight}}</view>
+				<view class="view-man">经理折扣:¥{{discountFee =='undefined' ? '' : discountFee}}</view>
 			</view>
 			<view class="information-view">
-				<view class="view-num bold">应付总额:¥{{payableAmount =='undefined' ? '' : payableAmount}}</view>
+				<view class="view-num">税费:¥{{expensesOfTaxation == null ? '0.00' : expensesOfTaxation}}</view>
+				<view class="view-man bold">应付总额:<text class="red">¥{{payableAmount =='undefined' ? '0.00' : payableAmount}}</text></view>
 			</view>
 			<view class="information-view">
 				<view class="view-num time">下单时间:{{orderData.orderTime =='undefined' ? '' : orderData.orderTime}}</view>
@@ -41,11 +43,13 @@
 		data() {
 			return{
 				orderData:'',
-				productTotalFee:'',
+				payTotalFee:'',
 				balancePayFee:'',
 				discountFee:'',
+				freight:'',
 				payableAmount:'',
 				typeText:'',
+				expensesOfTaxation:'',
 				typeTextObject:{
 					4:'交易完成',
 					5:'订单完成',
@@ -83,10 +87,13 @@
 		methods:{
 			initData(res) {
 				this.orderData = res;
-				this.productTotalFee = res.productTotalFee.toFixed(2);
-				this.balancePayFee = res.balancePayFee.toFixed(2);
-				this.discountFee = res.discountFee.toFixed(2);
-				this.payableAmount = res.payableAmount.toFixed(2);
+				this.payTotalFee =this.toFiexdFn(res.payTotalFee);		//订单总额
+				this.payableAmount =this.toFiexdFn(res.payableAmount);	//应付总额
+				this.balancePayFee = this.toFiexdFn(res.balancePayFee);
+				this.discountFee = this.toFiexdFn(res.discountFee);
+				this.freight = this.toFiexdFn(res.freight);
+				this.expensesOfTaxation = this.toFiexdFn(res.expensesOfTaxation);
+				console.log(this.expensesOfTaxation)
 				Object.keys(this.typeTextObject).forEach(key => {
 					if(key == res.status){
 						this.typeText = this.typeTextObject[key]
@@ -103,6 +110,15 @@
 					}
 					// #endif
 				})
+			},
+			toFiexdFn(n){
+				let num 
+				if(n==null){
+					num='0.00'
+				}else{
+					num = n.toFixed(2)
+				}
+				return num
 			}
 		}
 	}
@@ -119,25 +135,22 @@
 			width: 702rpx;
 			padding: 20rpx 24rpx;
 			.information-view{
-				height: 44rpx;
-				line-height: 44rpx;
+				height: 50rpx;
+				line-height: 50rpx;
 				font-size: $font-size-28;
 				color: $text-color;
 				margin: 4rpx 0;
-				.view-num{
-					float: left;
+				display: flex;
+				view{
+					flex: 1;
 					color: $text-color;
 					text-align: left;
 				}
-				.view-man{
-					float: left;
-					margin-left: 40rpx;
-				}
 				.view-num.ord{
 					color: $color-system;
 					text-align: left;
+					flex:3;
 					font-weight: bold;
-					float: left;
 				}
 				.view-num.time{
 					color: #999999;
@@ -145,6 +158,9 @@
 				.bold{
 					font-weight: bold;
 				}
+				.red{
+					color: #FF2A2A;
+				}
 				.view-type{
 					float: right;
 					text-align: right;

+ 1 - 0
components/module/orderDetails/orderListButton.vue

@@ -130,6 +130,7 @@
 				font-size:$font-size-26;
 				color: #FFFFFF;
 				text-align: center;
+				border-radius: 10rpx;
 				float: right;
 			}
 			.btn-cancel{

+ 1 - 1
components/module/productDetails/evaluate.vue

@@ -66,7 +66,7 @@
 			}
 		},
 		created() {
-			console.log(this.queryProductid)
+			// console.log(this.queryProductid)
 			this.productID = this.queryProductid
 			this.infoEvaluate()
 			this.setScrollHeight();		

+ 2 - 2
components/module/productDetails/recommend.vue

@@ -52,7 +52,7 @@
 			}
 		},
 		created() {
-			console.log(this.queryProductid)
+			// console.log(this.queryProductid)
 			this.productID = this.queryProductid
 			this.infoRecommend(this.queryProductid)
 			this.setScrollHeight();		
@@ -60,7 +60,7 @@
 		methods:{
 			infoRecommend(id){
 				queryRelevant({productID:id,pageNum:this.pageNum,pageSize:this.pageSize}).then(response =>{
-					console.log(response)
+					// console.log(response)
 					let responseData = response.data
 					if(responseData.results&&responseData.results.length > 0){
 						this.isEmpty = false

+ 7 - 7
pages/goods/product.vue

@@ -272,7 +272,7 @@
 		},
 		methods:{
 			initData(){// 初始化商品详情查询
-				queryProductDetils({productID:this.productID}).then(response =>{	
+				queryProductDetils({userId:this.userID,productID:this.productID}).then(response =>{	
 					this.skeletonShow = false
 					this.productImage=[];
 					this.shop = response.data.shop
@@ -494,13 +494,13 @@
 		onShow() {
 			this.$api.getStorage().then((resolve) => {
 				this.userID = resolve.userID;	
+				if (isPreviewImg) {
+					isPreviewImg = false;
+					return;
+				} else {
+					this.initData();
+				}
 			})	
-			if (isPreviewImg) {
-				isPreviewImg = false;
-				return;
-			} else {
-				this.initData();
-			}
 		}
 	}
 </script>

+ 125 - 187
pages/search/search-order.vue

@@ -15,7 +15,7 @@
 			<view :class="'s-' + themeClass" v-if="serachRecordList.length>0">
 				<view class="header">
 					搜索历史
-					<text class="iconfont icon-shanchu" @click="delhistory"></text>
+					<text class="iconfont icon-shanchu" @click="confirmDetele"></text>
 				</view>
 				<view class="list">
 					<view v-for="(item,index) in serachRecordList" :key="index" @click="keywordsClick(item.searchWord)">{{item.searchWord}}</view>
@@ -87,17 +87,6 @@
 					   :orderID="btnoRderID" 
 					   @shareConfirm ='onShareAppMessage'>
 		</share-alert>
-		<!-- 删除订单弹窗 -->
-		<model-alert v-if="isShowDelModal"
-					 :alertText='alertText'
-					 :alertType ='alertType'
-					 @btnConfirm ='handBtnDetele'>
-		</model-alert>
-		<!-- 取消订单弹窗 -->
-		<cancel-alert v-if="isCenceModal"
-					 :cenceAlertText='cenceAlertText'
-					 @cenceConfirm ='handCenceConfirm'>
-		</cancel-alert>
 		<!-- 透明模态层 -->
 		<modal-layer v-if='isModalLayer'></modal-layer>
 	</view>
@@ -111,9 +100,16 @@
 	import modalLayer from "@/components/modal-layer"
 	import empty from "@/components/empty";
 	import shareAlert from '@/components/module/modelAlert/shareAlert'			 //分享弹窗
-	import modelAlert from '@/components/module/modelAlert/modelAlert'			 //删除弹窗
-	import cancelAlert from '@/components/module/modelAlert/cancelAlert'		 //取消弹窗
 	import authorize from '@/common/config/authorize.js'
+	import { 
+		searchOrderInfo, 
+		searchOrderHistory,
+		clearOrderHistory,
+		queryOrderList,
+		cancelOrder,
+		deleteOrder,
+		confirmReceipt
+	} from "@/api/order.js"
 	export default {
 		components: {
 			orSearch,
@@ -122,8 +118,6 @@
 			orderButton,
 			empty,
 			shareAlert,
-			modelAlert,
-			cancelAlert
 		},
 		data() {
 			return {
@@ -154,23 +148,10 @@
 				hasNextPage: false,
 				pullFlag: true,
 				navbarHeight:'',
-				alertText: '',
-				alertType:'',
-				cenceAlertText: '确认取消该订单吗?',
 				nomoreText: '上拉显示更多',
 				scrollHeight:''
 			}
 		},
-		created() {
-			let self = this;
-			self.$api.getStorage().then((resolve) =>{
-				self.userID = resolve.userID
-			})
-			self.setScrollHeight();
-			self.$api.loginStatus().then((resolveData) => {
-				self.loginStatus = resolveData;
-			});
-		},
 		onLoad() {
 		  this.initGetSerachRecord()
 		},
@@ -184,24 +165,19 @@
 				}
 			},
 			initGetSerachRecord(){
-				authorize.getCode('weixin').then(wechatcode =>{
-					// console.log(wechatcode);
-					this.$api.get('/search/history',{organizeID:this.userOrganizeID,code:wechatcode},
-						response =>{
-							// console.log(response);
-							if(response.code == '1'){
-								this.serachRecordList = response.data
-								if(this.serachRecordList.length>0){
-									this.isSearchHistory = true
-								}else{
-									this.isSearchHistory = false
-								}
-							}else{
-								this.$util.msg(response.msg,2000)
-							}							
+				this.$api.getStorage().then((resolve) =>{
+					this.userID = resolve.userID
+					searchOrderHistory({userId:this.userID}).then(response =>{
+						this.serachRecordList = response.data
+						if(this.serachRecordList.length>0){
+							this.isSearchHistory = true
+						}else{
+							this.isSearchHistory = false
 						}
-					)
-				})
+					}).catch(response =>{
+						this.$util.msg(response.msg,2000)
+					})
+				})	
 			},
 			onShowClose () { //输入框失去焦点时触发
 				this.inputEmpty(this.searchInputVal)
@@ -222,26 +198,14 @@
 				this.isShowClose = true;
 				this.subMitSearch();
 			},
-			delhistory () {		//清空历史记录
-				this.alertType = 'delsearch'
-				this.alertText ='确定删除全部历史记录?'
-				this.isShowDelModal = true;				
-			},
-			confirmDetele() {
-				authorize.getCode('weixin').then(wechatcode =>{
-					// console.log(wechatcode);
-					this.$api.get('/search/deleteOrderRecord',{organizeID:this.userOrganizeID,code:wechatcode},
-						response =>{
-							// console.log(response);
-							if(response.code == '1'){
-								this.serachRecordList=[];
-								this.isShowDelModal = false;
-								this.isSearchHistory = false
-							}else{
-								this.$util.msg(response.msg,2000)
-							}							
-						}
-					)
+			confirmDetele () {//清空历史记录
+				this.$util.modal('提示','确定删除历史记录?','确定','取消',true,() =>{
+					clearOrderHistory({userId:this.userID}).then(response =>{
+						this.$util.msg('删除成功',2000,true,'success')
+						this.serachRecordList=[]
+					}).catch(response =>{
+						this.$util.msg(response.msg,2000)
+					})
 				})
 			},
 			inputEmpty(val){
@@ -255,81 +219,67 @@
 			getOrderDatainit(index,source){
 				/**
 				 * @订单初始化加载  仅加载第一页码
-				 * @param:code(微信返回的用户code)
 				 * @param:searchWord(搜索关键词)
-				 * @param:userID(用户ID)
-				 * @param:index(页码数)
+				 * @param:userId(用户ID)
+				 * @param:pageNum(页码数)
 				 * @param:pageSize(每页条数)
 				 * @param:organizeID(全局变量组织ID)
 				 */ 
-				authorize.getCode('weixin').then(wechatcode =>{
-					this.$api.getStorage().then((resolve) =>{
-						this.userID = resolve.userID
-						let params = {code:wechatcode,searchWord:this.searchInputVal,userID:this.userID,index:1,pageSize:this.pageSize,organizeID:this.userOrganizeID};
-						this.$api.lodingGet('/search/order',params,
-							response => {
-								if(response.code === '1'){
-									this.isShowWrapper = true
-									this.showSkeleton = true
-									const _responseData = response.data.results;
-									if(_responseData && _responseData.length > 0){
-										let filrerData = _responseData.filter(item=>{
-											//添加不同状态下订单的表现形式
-											item = Object.assign(item, this.orderStateExp(item.state));
-											return item;
-										});
-										this.orderList =[];
-										filrerData.forEach(item=>{
-											this.orderList.push(item);
-										})
-										this.hasNextPage = response.data.hasNextPage;
-										if(this.hasNextPage){
-											this.pullUpOn = false
-											this.nomoreText = '上拉显示更多'
-										}else{
-											if(this.orderList.length < 2){
-												this.pullUpOn = true
-											}else{
-												this.pullUpOn = false
-												this.nomoreText = '已至底部'
-											}
-										}
-										this.isShowEmpty = false
-									}else{
-										this.isShowEmpty = true
-									}
-								}else{
-									this.$util.msg(response.msg,2000);
-								}
-							}
-						)	
-					})
-				})
-			}, 
-			getOnReachBottomData(index){//上拉加载
-				this.pageNum+=1
-				let params = {code:wechatcode,searchWord:this.searchInputVal,userID:this.userID,index:1,pageSize:this.pageSize,organizeID:this.userOrganizeID};
-				this.$api.get('/search/order',params,
-					response => {
-						if(response.code === '1'){
-							let resData = response.data.results
-							this.hasNextPage = response.data.hasNextPage;
-							this.orderList = this.orderList.concat(resData)
-							this.pullFlag = false;// 防上拉暴滑
-							setTimeout(()=>{this.pullFlag = true;},500)
-							if(this.hasNextPage){
-								this.pullUpOn = false
-								this.nomoreText = '上拉显示更多'
+				let params = {searchWord:this.searchInputVal,userId:this.userID,pageNum:1,pageSize:this.pageSize};
+				searchOrderInfo(params).then(response =>{
+					this.isShowWrapper = true
+					this.showSkeleton = true
+					const _responseData = response.data.results;
+					if(_responseData && _responseData.length > 0){
+						let filrerData = _responseData.filter(item=>{
+							//添加不同状态下订单的表现形式
+							item = Object.assign(item, this.orderStateExp(item.state));
+							return item;
+						});
+						this.orderList =[];
+						filrerData.forEach(item=>{
+							this.orderList.push(item);
+						})
+						this.hasNextPage = response.data.hasNextPage;
+						if(this.hasNextPage){
+							this.pullUpOn = false
+							this.nomoreText = '上拉显示更多'
+						}else{
+							if(this.orderList.length < 2){
+								this.pullUpOn = true
 							}else{
-								this.loadding = false
 								this.pullUpOn = false
 								this.nomoreText = '已至底部'
 							}
-						}else{
-							this.$util.msg(response.msg,2000);
 						}
+						this.isShowEmpty = false
+					}else{
+						this.isShowEmpty = true
+					}
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000)
+				})
+			}, 
+			getOnReachBottomData(index){//上拉加载
+				this.pageNum+=1
+				let params = {searchWord:this.searchInputVal,userId:this.userID,pageNum:this.pageNum,pageSize:this.pageSize}
+				searchOrderInfo(params).then(response =>{
+					let resData = response.data.results
+					this.hasNextPage = response.data.hasNextPage;
+					this.orderList = this.orderList.concat(resData)
+					this.pullFlag = false;// 防上拉暴滑
+					setTimeout(()=>{this.pullFlag = true;},500)
+					if(this.hasNextPage){
+						this.pullUpOn = false
+						this.nomoreText = '上拉显示更多'
+					}else{
+						this.loadding = false
+						this.pullUpOn = false
+						this.nomoreText = '已至底部'
 					}
-				)	
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000)
+				})
 			},
 			scrolltolower() {
 				if(this.hasNextPage){
@@ -340,32 +290,22 @@
 				}	
 			},
 			detail(id) {//订单详情跳转
-				console.log(id)
+				// console.log(id)
 				this.isModalLayer = true;	
 				this.$api.navigateTo(`/pages/user/order/order-details?state=${this.currentTab}&orderID=${id}`)
 			},
-			handBtnDetele(e){
-				console.log(e)
-				if(e == 'delsearch'){
-					this.confirmDetele()
-				}else{
-					this.handOrderDetele()
-				}
-			},
 			handButtonConfirm(data) {//获取点击
-				console.log('点击按钮的类型是',data);
+				// console.log('点击按钮的类型是',data);
 				this.handShowAlert(data)
 				this.btnoRderID = data.orderId
 			},
 			handShowAlert(data) {//执行
 				switch(data.type){
 					case 'delete':
-						this.isShowDelModal = true;
-						this.alertType = 'delorder'
-						this.alertText ='确认删除订单吗?'
+						this.handOrderDetele();
 						break
 					case 'cancel':
-						this.isCenceModal = true;
+						this.handCenceConfirm()
 						break
 					case 'query':
 						this.isModalLayer = true;
@@ -377,49 +317,43 @@
 				}
 			},
 			handOrderConfirm (id){//确认收货
-				this.$api.get('/order/affirm',{orderID:id},
-					response => {
-						if(response.code === '1'){
-							this.$util.msg(response.msg,2000,true,'success');
-							this.isShowDelModal = false
-							setTimeout(() => {
-								this.getOrderDatainit(this.currentTab)
-							},2000)
-						}else{
-							this.$util.msg(response.msg,2000);
-						}
-					}
-				)
+				this.$util.modal('提示','是否确认收货','确定','取消',true,() =>{
+					confirmReceipt({orderID:id}).then(response =>{
+						this.$util.msg(response.msg,2000,true,'success');
+						this.initOrderDetaileData()
+					}).catch(response =>{
+						this.$util.msg(response.msg,2000)
+					})
+				})
 			},
-			handOrderDetele (){//删除订单
-				this.$api.get('/order/delete',{orderID:this.btnoRderID},
-					response => {
-						if(response.code === '1'){
-							this.$util.msg(response.msg,2000,true,'success');
-							this.isShowDelModal = false
-							setTimeout(() => {
-								this.getOrderDatainit(this.currentTab)
-							},2000)
-						}else{
-							this.$util.msg(response.msg,2000);
-						}
-					}
-				)
+			handOrderDetele(){//删除订单
+				this.$util.modal('提示','确认删除该订单吗?','确定','取消',true,() =>{
+					deleteOrder({orderID:this.orderID}).then(response =>{
+						this.$util.msg(response.msg,2000,true,'success');
+						setTimeout(() => {
+							if(this.shareType ==='share'){
+								this.$api.switchTabTo('/pages/tabBar/user/user')
+							}else{
+								this.$api.redirectTo(`/pages/user/order/order-list?type=detele&state=${this.state}`)
+							}
+						},500)
+					}).catch(response =>{
+						this.$util.msg(response.msg,2000)
+					})
+				})
 			},
-			handCenceConfirm (){//取消订单
-				this.$api.get('/order/cancel',{orderID:this.btnoRderID},
-					response => {
-						if(response.code === '1'){
-							this.$util.msg(response.msg,2000,true,'success');
-							this.isCenceModal = false
-							setTimeout(() => {
-								this.getOrderDatainit(this.currentTab)
-							},2000)
-						}else{
-							this.$util.msg(response.msg,2000);
-						}
-					}
-				)
+			handCenceConfirm(){//取消订单
+				this.$util.modal('提示','确认取消该订单吗?','确定','取消',true,() =>{
+					cancelOrder({orderID:this.orderID}).then(response =>{
+						this.$util.msg(response.msg,2000,true,'success');
+						this.initOrderDetaileData()
+					}).catch(response =>{
+						this.$util.msg(response.msg,2000)
+					})
+				})
+			},
+			handlSearchPath(){
+				this.$api.navigateTo('/pages/search/search-order')
 			},
 			onShareAppMessage (res){//分享转发
 				this.isShareModal = false
@@ -429,7 +363,7 @@
 				return {
 					title: '您有新的分享订单,快来查看吧~',
 					path: `/pages/user/order/orderShareLogin?orderID=${this.btnoRderID}&userID=${this.userID}`,
-					imageUrl:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/02/%E5%88%86%E4%BA%AB%E7%95%8C%E9%9D%A2a%CC%8A%403x.png'
+					imageUrl:'https://img.caimei365.com/group1/M00/03/8C/Cmis215XHXSAWWkhAAXDP4-6m_c397.png'
 				}
 			},
 			//订单状态文字和颜色
@@ -472,6 +406,10 @@
 		},
 		onPageScroll(e) {
 			this.scrollTop = e.scrollTop;
+			
+		},
+		onShow() {
+			this.setScrollHeight();
 		}
 	}
 </script>

+ 31 - 34
pages/search/search.vue

@@ -12,7 +12,7 @@
 			<view :class="'s-' + themeClass" v-if="serachRecordList.length>0">
 				<view class="header">
 					搜索历史
-					<text class="iconfont icon-shanchu" @click="delhistory"></text>
+					<text class="iconfont icon-shanchu" @click="confirmDetele"></text>
 				</view>
 				<view class="list">
 					<view v-for="(item,index) in serachRecordList" :key="index" @click="keywordsClick(item.searchWord)">{{item.searchWord}}</view>
@@ -30,7 +30,8 @@
 						<text class="list-details-miniQuantity" v-if="fromRegularPurchasePage">起订量:{{item.minBuyNumber}}</text>
 						<view class="list-details-price">
 							<view v-if="!hasLogin" class="list-login-now">
-								<text @click.stop="toLoginPage" class="login-now">登录查看价格<text class="iconfont icon-xiayibu" style="font-size: 22rpx;margin: 0 6rpx;"></text></text>
+								<text class="p-no">价格:</text>
+								<uni-stars :stars="parseInt(item.price1Grade)" :font-size='36' :width-info="180"></uni-stars>
 							</view>
 							<view class="list-price" v-else>
 								<text>¥<text class="price-larger">{{item.retailPrice.toFixed(2)}}</text></text>
@@ -58,13 +59,15 @@
 	import { mapState,mapMutations } from 'vuex'
 	import goSearch from '@/components/uni-search/go-search.vue'
 	import modalLayer from "@/components/modal-layer"
+	import uniStars from '@/components/uni-stars/uni-stars.vue'
 	import authorize from '@/common/config/authorize.js'
-	import { querySearchProduct , querySearchHistory } from "@/api/product.js" 
+	import { querySearchProduct , querySearchHistory,clearSearchHistory } from "@/api/product.js" 
 	
 	export default {
 		components: {
 			// goSearch,
 			modalLayer,
+			uniStars
 		},
 		data() {
 			return {
@@ -89,23 +92,23 @@
 				totalPage: 1,
 				pullFlag: true,
 			}
-		},
-		created() {
-			
 		},
 		onLoad() {
-		  this.initGetSerachRecord()
+			this.initGetSerachRecord()			
 		},
 		computed: {
 			...mapState(['hasLogin','userInfo'])
 		},
 		methods:{
 			initGetSerachRecord(){
-				querySearchHistory({userID:this.userID}).then(response =>{
-					this.serachRecordList = response.data
-				}).catch(response =>{
-					console.log('error:'+response.msg)
-				})
+				this.$api.getStorage().then((resolve) =>{
+					this.userID = resolve.userID
+				    querySearchHistory({userId:this.userID}).then(response =>{
+				    	this.serachRecordList = response.data
+				    }).catch(response =>{
+				    	this.$util.msg(response.msg,3000);
+				    })
+				})	
 			},
 			subMitSearch() {
 				if (this.searchInputVal == '') {
@@ -116,7 +119,6 @@
 				}
 			},
 			scrolltolower() {
-				// 第一次加载排除常用商品
 				if(this.hasNextPage && this.pullFlag) {
 					this.getListFromServer(true);
 				}
@@ -129,7 +131,7 @@
 				if(loadMore) {
 					this.pageNum += 1;
 				}
-				let params = {userID:this.userID,searchWord:this.searchInputVal,pageNum:this.pageNum,pageSize:this.pageSize}
+				let params = {userId:this.userID,searchWord:this.searchInputVal,pageNum:this.pageNum,pageSize:this.pageSize}
 				querySearchProduct(params).then(response =>{
 					this.isShowWrapper = true
 					const resData = response.data;
@@ -183,23 +185,14 @@
 				this.isShowClose = true;
 				this.subMitSearch();
 			},
-			delhistory () {//清空历史记录
-				this.isShowDelModal = true;				
-			},
-			confirmDetele() {
-				this.isShowDelModal = false;
-				authorize.getCode('weixin').then(wechatcode =>{
-					// console.log(wechatcode);
-					this.$api.get('/search/delete',{organizeID:this.userOrganizeID,code:wechatcode},
-						response =>{
-							// console.log(response);
-							if(response.code == '1'){
-								this.serachRecordList=[];
-							}else{
-								this.$util.msg(response.msg,2000)
-							}							
-						}
-					)
+			confirmDetele() {//清空历史记录
+				this.$util.modal('提示','确定删除历史记录?','确定','取消',true,() =>{
+					clearSearchHistory({userId:this.userID}).then(response =>{
+						this.$util.msg('删除成功',2000,true,'success')
+						this.serachRecordList=[];
+					}).catch(response =>{
+						this.$util.msg(response.msg,2000)
+					})
 				})
 			},
 			inputEmpty(val){
@@ -229,9 +222,6 @@
 		},
 		onShow() {
 			this.setScrollHeight();
-			this.$api.getStorage().then((resolve) =>{
-				this.userID = resolve.userID
-			})	
 		}
 	}
 </script>
@@ -506,9 +496,16 @@
 			vertical-align: middle;
 		}
 		.list-login-now {
+			width: 375rpx;
 			color: #F8C499;
 			position: absolute;
 			bottom: 0;
+			.p-no{
+				float: left;
+				font-size: $font-size-24;
+				color: $color-system;
+				margin-right: 10rpx;
+			}
 		}
 		.login-now {
 			padding: 10rpx 10rpx 10rpx 0;

+ 2 - 2
pages/tabBar/cart/cart.vue

@@ -2,7 +2,7 @@
 	<view class="container cart clearfix">	
 		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="9"></tui-skeleton>
 		<view class="container-cart-main tui-skeleton">
-			<view v-if="goodsList.length > 0" class="container-cart">
+			<view v-if="!isEmpty" class="container-cart">
 				<scroll-view class="cart-content"  scroll-y  @scrolltolower="toLower">
 					<view class="goods-list">
 						<view v-for="(item, index) in goodsList" :key="index" class="goods-item">
@@ -85,7 +85,7 @@
 					</view>
 				</view>
 			</view>
-			<view v-else class="cart-content empty">
+			<view v-if="isEmpty" class="cart-content empty">
 				<view  class="empty-container">
 					<image class="empty-container-image" src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AWdWzAAGlgAP0das422.png" mode="aspectFit"></image>
 					<text class="error-text">购物车空空如也,快去商城逛逛吧~</text>

+ 2 - 2
pages/tabBar/home/home.vue

@@ -134,7 +134,7 @@
 			tuiSkeleton,
 			modalLayer,
 			btSearch,
-			uniStars
+			uniStars,
 		},
 		data() {
 			return {
@@ -217,7 +217,7 @@
 				})
 			},
 			getOrganizeProducts(){//获取模块三商品
-				queryPreferred({userID:this.userID,preferredFlag:100,pageNum:1,pageSize:5}).then(res =>{
+				queryPreferred({userId:this.userID,preferredFlag:100,pageNum:1,pageSize:5}).then(res =>{
 					this.organizeProducts = res.data.results
 				})
 			},

+ 2 - 3
pages/user/operator/list.vue

@@ -425,12 +425,11 @@
 			.list-head{
 				width: 92rpx;
 				height: 92rpx;
-				border: 1px solid $color-system;
-				border-radius: 50%;
+				border-radius: 14rpx;
 				image{
 					width: 92rpx;
 					height: 92rpx;
-					border-radius: 50%;
+					border-radius: 14rpx;
 				}
 			}
 			.list-tel{

+ 5 - 78
pages/user/order/create-order.vue

@@ -10,7 +10,7 @@
 		<invoice-tent ref="invoice" v-if="isRequest" :invoiceData="invoiceData"></invoice-tent>
 		<!-- 运费 -->
 		<freight ref="freight" v-if="isRequest" :freightData="freightData" @showFreightAlert="handFreightAlertShow"></freight>
-		<freight-alert v-if="isfreightTip" ref="csPhone" :cellPhone ="cellPhone"></freight-alert>
+		<freight-alert v-if="isfreightTip" ref="csPhone"></freight-alert>
 		<!-- 余额抵扣 -->
 		<view class="invoice-balance">
 			<view class="balabce-t">
@@ -78,7 +78,6 @@
 				productIds:'',			  //获取上一级页面商品信息
 				productCount:'',		  //获取上一级页面商品数量
 				classifyIDS:'',			  //获取上一级页面商品分类
-				cellPhone:'0755-88888888',//默认客服电话
 				userID:'',				  //用户ID
 				cartType:'',			  //购买类型(1购物车提交,2直接购买提交)
 				submitState:'',  		  //提交状态
@@ -133,7 +132,7 @@
 						this.isRequest = true
 						this.goodsData = resData.shopList
 						this.userMoney = resData.userMoney
-						this.freightData = {freePostFlag:resData.freight,cellPhone:resData.cellPhone}
+						this.freightData = {freePostFlag:resData.freight}
 						this.invoiceData = resData.invoice
 						this.goodsData = resData.shopList
 					}).catch(response =>{
@@ -146,9 +145,9 @@
 					queryAddressList({index:1,pageSize:1,userID:resolve.userID}).then(response =>{
 						this.isAddress = true
 						this.addressData = {}
-						if(response.results != ''){
-							this.addressID = response.results[0].addressID;
-							this.addressData = response.results[0];
+						if(response.data.results != ''){
+							this.addressID = response.data.results[0].addressID;
+							this.addressData = response.data.results[0];
 						}else{
 							this.addressData = this.addressData;
 						}
@@ -213,7 +212,6 @@
 			},
 			handFreightAlertShow(){//显示邮费弹窗
 				this.isfreightTip = true;
-				this.cellPhone = this.freightData.cellPhone;
 			},
 			hideFreight(){//关闭邮费弹窗
 				this.isfreightTip = false;
@@ -298,77 +296,6 @@
 			color: #2A81FF;
 		}
 	}
-	.freight-alert{
-		width: 100%;
-		height: 100%;
-		background: rgba(0,0,0,.5);
-		position: fixed;
-		top: 0;
-		left: 0;
-		z-index: 8888;
-		transition: all 0.4s;
-		&.none{
-			display: none;			
-		}
-		&.show{
-			display: block;
-		}
-		.content{
-			width: 518rpx;
-			height: 420rpx;
-			position: absolute;
-			background: $bg-color;
-			left: 0;
-			right: 0;
-			bottom: 0;
-			top: 0;
-			margin: auto;
-			.text-content{
-				width: 448rpx;
-				height: 264rpx;
-				padding: 35rpx;
-				float: left;
-				.title{
-					line-height: 40rpx;
-					font-size: $font-size-28;
-					color: $text-color;
-					text-align: center;
-					font-weight: bold;
-					margin-bottom: 32rpx;
-				}
-				.text{
-					line-height: 36rpx;
-					font-size: $font-size-26;
-					color: $text-color;
-					text-align: justify;
-					margin-top: 22rpx;
-				}
-				.tel{
-					line-height: 36rpx;
-					font-size: $font-size-26;
-					color: $text-color;
-					text-align: justify;
-					margin-top: 22rpx;
-					font-weight: bold;
-					.txt{
-						margin-left: 10rpx;
-					}
-				}
-			}
-			.btn{
-				width: 100%;
-				height: 88rpx;
-				float: left;
-				background: #000000;
-				line-height: 88rpx;
-				font-size: $font-size-28;
-				text-align: center;
-				color: #FFFFFF;
-				border-radius: 0;
-				padding: 0;
-			}
-		}
-	}
 	.invoice-balance{
 		width: 702rpx;
 		height: auto;

+ 58 - 101
pages/user/order/order-details.vue

@@ -11,9 +11,6 @@
 			<goods-list ref='goods' v-if="isRequest" :shopOrderData="shopOrderData"></goods-list>
 			<!-- 发票信息 -->
 			<invoice-tent ref="invoice" v-if="isRequest" :orderInvoice="orderInvoice"></invoice-tent>
-			<!-- 运费 -->
-			<freight ref="freight"  v-if="isRequest" :freightData="freightData" @showFreightAlert="handFreightAlertShow"></freight>
-			<freight-alert v-if="isfreightTip" ref="csPhone" :cellPhone ="cellPhone"></freight-alert>
 			<!-- 转账信息 -->
 			<transfe-record ref="transfe" v-if="isRequest"></transfe-record>
 			<!-- 支付记录 -->
@@ -32,16 +29,6 @@
 					  v-if="isShareModal"  
 					  @shareConfirm ='onShareAppMessage'>
 		</share-alert>		
-		<!-- 删除订单弹窗 -->
-		<model-alert v-if="isShowDelModal"
-					 :alertText='alertText'
-					 @btnConfirm ='handOrderDetele'>
-		</model-alert>
-		<!-- 取消订单弹窗 -->
-		<cancel-alert v-if="isCenceModal"
-					 :cenceAlertText='cenceAlertText'
-					 @cenceConfirm ='handCenceConfirm'>
-		</cancel-alert>
 	</view>
 </template>
 
@@ -55,11 +42,8 @@
 	import paymentRecord from '@/components/module/orderDetails/paymentRecord'		 //支付记录
 	import refundRecord from '@/components/module/orderDetails/refundRecord'		 //退款记录
 	import orderButton from '@/components/module/orderDetails/orderButton'			 //底部按钮
-	import freight from '@/components/module/creatOrder/freight'					 //邮费信息
-	import freightAlert from '@/components/module/modelAlert/freightAlert'			 //邮费弹窗
 	import shareAlert from '@/components/module/modelAlert/shareAlert.vue'			 //分享弹窗
-	import modelAlert from '@/components/module/modelAlert/modelAlert.vue'			 //删除弹窗
-	import cancelAlert from '@/components/module/modelAlert/cancelAlert.vue'		 //取消弹窗
+	import { queryOrderDetails,cancelOrder,deleteOrder,confirmReceipt } from "@/api/order.js" 
 	export default {
 		components:{
 			headerBack,
@@ -67,15 +51,11 @@
 			orderAddress,
 			invoiceTent,
 			goodsList,
-			freight,
-			freightAlert,
 			transfeRecord,
 			paymentRecord,
 			refundRecord,
 			orderButton,
 			shareAlert,
-			modelAlert,
-			cancelAlert,
 		},
 		data() {
 			return {
@@ -90,20 +70,14 @@
 				isRequest:false,			//是否加载完成渲染子组件
 				isOrderShare:false,
 				isShareModal:false,
-				isShowDelModal:false,
-				isCenceModal:false,
-				isfreightTip:false,
 				addressData:{},				//地址信息初始化
 				information:{},				//订单信息初始化
-				freightData:{},				//邮费信息初始化
 				shopOrderData:{},			//商品信息初始化
 				orderInvoice:{},			//发票信息初始化
 				returnedPurchaseList:{},	//退款信息初始化
 				discernReceiptList:{},		//支付信息初始化
 				receiptAmount:0,			//支付金额
 				returnedPurchaseFee:0,		//退款金额
-				alertText: '确认删除订单吗?',
-				cenceAlertText: '确认取消该订单吗?',
 				navbarHeight:'',
 				headerBtnPosi:	this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
 				systeminfo: this.setSysteminfo(),		 //获取设备信息
@@ -129,36 +103,27 @@
 		},
 		methods: {
 			initOrderDetaileData(){//初始化页面数据@参数:订单ID
-				this.$api.lodingGet('/order/particulars',{ orderID : this.orderID },
-					response => {
-						// console.log(response)
-						if(response.code === '1'){
-							let resData = response.data;
-							this.isRequest = true
-							this.userID = resData.order.userID
-							this.shareCode = resData.shareCode
-							this.addressData = resData.userInfo
-							this.information = resData.order
-							this.btnStatus = resData.order.status
-							this.payStatus = resData.order.payStatus
-							this.shopOrderData = resData.shopOrderList
-							this.orderInvoice = resData.orderInvoice
-							this.returnedPurchaseList = resData.returnedPurchaseList
-							this.discernReceiptList = resData.discernReceiptList
-							this.receiptAmount = resData.order.receiptAmount
-							this.returnedPurchaseFee = resData.order.returnedPurchaseFee
-							this.freightData = {freePostFlag:resData.order.freePostFlag,cellPhone:resData.cellPhone}
-						}else{
-							this.$util.modal('提示',response.msg,'确定','',false,() =>{
-								 uni.navigateBack({data:1})
-							})
-						}
-					}
-				)
-			},
-			handFreightAlertShow(){//显示邮费弹窗
-				this.isfreightTip = true;
-				this.cellPhone = this.freightData.cellPhone;
+				queryOrderDetails({ orderID : this.orderID }).then(response =>{
+					// console.log(response)
+					let resData = response.data;
+					this.isRequest = true
+					this.userID = resData.order.userID
+					this.shareCode = resData.shareCode
+					this.addressData = resData.userInfo
+					this.information = resData.order
+					this.btnStatus = resData.order.status
+					this.payStatus = resData.order.payStatus
+					this.shopOrderData = resData.shopOrderList
+					this.orderInvoice = resData.orderInvoice
+					this.returnedPurchaseList = resData.returnedPurchaseList
+					this.discernReceiptList = resData.discernReceiptList
+					this.receiptAmount = resData.order.receiptAmount
+					this.returnedPurchaseFee = resData.order.returnedPurchaseFee
+				}).catch(response =>{
+					this.$util.modal('提示',response.msg,'确定','',false,() =>{
+						 uni.navigateBack({data:1})
+					})
+				})
 			},
 			handButtonConfirm(data){//监听点击时间的按钮类型并执行...
 				console.log('点击按钮的类型是',data);
@@ -166,8 +131,12 @@
 			},
 			handShowAlert(type){//判断点击的按钮类型并执行...
 				switch(type){
-					case 'delete':this.isShowDelModal = true;break
-					case 'cancel':this.isCenceModal = true;break
+					case 'delete':
+						this.handOrderDetele();
+						break
+					case 'cancel':
+						this.handCenceConfirm();
+						break
 					case 'query':
 						this.$api.navigateTo('/pages/user/order/order-logistics?orderID='+this.orderID)
 						break
@@ -176,52 +145,40 @@
 				}
 			},
 			handOrderConfirm(){//确认收货
-				this.$api.get('/order/affirm',{orderID:this.orderID},
-					response => {
-						// console.log(response)
-						if(response.code === '1'){
-							this.$util.msg(response.msg,2000,true,'success');
-							this.isShowDelModal = false
-							this.initOrderDetaileData()
-						}else{
-							this.$util.msg(response.msg,2000);
-						}
-					}
-				)
+				this.$util.modal('提示','是否确认收货','确定','取消',true,() =>{
+					confirmReceipt({orderID:this.orderID}).then(response =>{
+						this.$util.msg(response.msg,2000,true,'success');
+						this.initOrderDetaileData()
+					}).catch(response =>{
+						this.$util.msg(response.msg,2000)
+					})
+				})
 			},
 			handOrderDetele(){//删除订单
-				this.$api.get('/order/delete',{orderID:this.orderID},
-					response => {
-						// console.log(response)
-						if(response.code === '1'){
-							this.$util.msg(response.msg,2000,true,'success');
-							this.isShowDelModal = false
-							setTimeout(() => {
-								if(this.shareType ==='share'){
-									this.$api.switchTabTo('/pages/tabBar/user/user')
-								}else{
-									this.$api.redirectTo(`/pages/user/order/myOrder?type=detele&state=${this.state}`)
-								}
-							},500)
-						}else{
-							this.$util.msg(response.msg,2000);
-						}
-					}
-				)
+				this.$util.modal('提示','确认删除该订单吗?','确定','取消',true,() =>{
+					deleteOrder({orderID:this.orderID}).then(response =>{
+						this.$util.msg(response.msg,2000,true,'success');
+						setTimeout(() => {
+							if(this.shareType ==='share'){
+								this.$api.switchTabTo('/pages/tabBar/user/user')
+							}else{
+								this.$api.redirectTo(`/pages/user/order/order-list?type=detele&state=${this.state}`)
+							}
+						},500)
+					}).catch(response =>{
+						this.$util.msg(response.msg,2000)
+					})
+				})
 			},
 			handCenceConfirm(){//取消订单
-				this.$api.get('/order/cancel',{orderID:this.orderID},
-					response => {
-						// console.log(response)
-						if(response.code === '1'){
-							this.$util.msg(response.msg,2000,true,'success');
-							this.isCenceModal = false
-							this.initOrderDetaileData()
-						}else{
-							this.$util.msg(response.msg,2000);
-						}
-					}
-				)
+				this.$util.modal('提示','确认取消该订单吗?','确定','取消',true,() =>{
+					cancelOrder({orderID:this.orderID}).then(response =>{
+						this.$util.msg(response.msg,2000,true,'success');
+						this.initOrderDetaileData()
+					}).catch(response =>{
+						this.$util.msg(response.msg,2000)
+					})
+				})
 			},
 			onShareAppMessage(res){//分享转发
 				this.isShareModal = false

+ 83 - 117
pages/user/order/order-list.vue

@@ -32,7 +32,7 @@
 										<view class="title-logo tui-skeleton-fillet"><image :src="shop.shopLogo" mode=""></image></view>
 										<view class="title-text tui-skeleton-fillet">{{shop.shopName}}</view>
 									</view>
-									<view class="goods-item" v-for="(pros,prosIndex) in shop.cmOrderProducts" :key="prosIndex">
+									<view class="goods-item" v-for="(pros,prosIndex) in shop.orderProductList" :key="prosIndex">
 										<view class="goods-pros-t">
 											<view class="pros-img tui-skeleton-fillet"><image :src="pros.productImage" alt="" /></view>
 											<view class="pros-product">
@@ -54,7 +54,7 @@
 									<view class="order-footer-top" v-if="order.discountFee!=0">经理折扣:¥{{orderPriceToFixed(order.discountFee)}}</view>
 									<view class="order-footer-bot">
 										<view class="count tui-skeleton-fillet">共{{order.productCount}}件商品</view>
-										<view class="money tui-skeleton-fillet">合计:¥{{orderPriceToFixed(order.payableAmount)}}</view>
+										<view class="money tui-skeleton-fillet">应付总额:¥{{orderPriceToFixed(order.payableAmount)}}</view>
 									</view>
 								</view>
 								<!-- 底部button -->
@@ -78,16 +78,6 @@
 					   :orderID="btnoRderID" 
 					   @shareConfirm ='onShareAppMessage'>
 		</share-alert>
-		<!-- 删除订单弹窗 -->
-		<model-alert v-if="isShowDelModal"
-					 :alertText='alertText'
-					 @btnConfirm ='handOrderDetele'>
-		</model-alert>
-		<!-- 取消订单弹窗 -->
-		<cancel-alert v-if="isCenceModal"
-					 :cenceAlertText='cenceAlertText'
-					 @cenceConfirm ='handCenceConfirm'>
-		</cancel-alert>
 		<!-- 透明模态层 -->
 		<modal-layer v-if='isModalLayer'></modal-layer>
 	</view>
@@ -104,11 +94,11 @@
 	import modalLayer from "@/components/modal-layer"
 	import empty from "@/components/empty";
 	import shareAlert from '@/components/module/modelAlert/shareAlert'			 //分享弹窗
-	import modelAlert from '@/components/module/modelAlert/modelAlert'			 //删除弹窗
-	import cancelAlert from '@/components/module/modelAlert/cancelAlert'		 //取消弹窗
+	import { queryOrderList,cancelOrder,deleteOrder,confirmReceipt } from "@/api/order.js" 
 	
 	export default {
 		components: {
+			headerBack,
 			empty,
 			btSearch,
 			tuiListCell,
@@ -117,10 +107,7 @@
 			orderButton,
 			tuiSkeleton,
 			modalLayer,
-			modelAlert,
-			shareAlert,
-			cancelAlert,
-			headerBack
+			shareAlert
 		},
 		data() {
 			return {
@@ -152,16 +139,12 @@
 				isDelete:false,
 				isClickChange: false,
 				isShareModal: false,//控制分享弹窗
-				isCenceModal: false,//控制取消订单弹窗
-				isShowDelModal: false,//控制删除订单弹窗
 				isModalLayer: false,
 				loadding: false,
 				pullUpOn: true,
 				hasNextPage: false,
 				pullFlag: true,
 				navbarHeight:'',
-				alertText: '确认删除订单吗?',
-				cenceAlertText: '确认取消该订单吗?',
 				nomoreText: '上拉显示更多',
 			}
 		},
@@ -225,7 +208,7 @@
 				 * @订单初始化加载  仅加载第一页码
 				 * @param:orderState(订单状态:0全部,1待付款,2待发货,3已发货,4退货款)
 				 * @param:userID(用户ID)
-				 * @param:index(页码数)
+				 * @param:pageNum(页码数)
 				 * @param:pageSize(每页条数)
 				 * @param:organizeID(全局变量组织ID)
 				 */ 
@@ -239,66 +222,58 @@
 				setTimeout(()=>{
 					this.$api.getStorage().then((resolve) =>{
 						this.userID = resolve.userID
-						let param = {orderState:index,userID:this.userID,index:1,pageSize:this.pageSize,organizeID:this.userOrganizeID};
-						this.$api.lodingGet('/order/myOrder',param,
-							response => {
-								if(response.code === '1'){
-									let orderList = response.data.results.filter(item=>{
-										//添加不同状态下订单的表现形式
-										item = Object.assign(item, this.orderStateExp(item.state));
-										return item;
-									});
-									orderItem.orderList =[];
-									orderList.forEach(item=>{
-										orderItem.orderList.push(item);
-									})
-									//loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
-									this.$set(orderItem, 'loaded', true);
-									this.hasNextPage = response.data.hasNextPage;
-									if(this.hasNextPage){
-										this.pullUpOn = false
-										this.nomoreText = '上拉显示更多'
-									}else{
-										if(orderItem.orderList.length < 2){
-											this.pullUpOn = true
-										}else{
-											this.pullUpOn = false
-											this.nomoreText = '已至底部'
-										}
-									}
+						let params = {orderState:index,userId:10086,pageNum:1,pageSize:this.pageSize};
+						queryOrderList(params).then(response =>{
+							let orderList = response.data.results.filter(item=>{
+								//添加不同状态下订单的表现形式
+								item = Object.assign(item, this.orderStateExp(item.state));
+								return item;
+							});
+							orderItem.orderList =[];
+							orderList.forEach(item=>{
+								orderItem.orderList.push(item);
+							})
+							//loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
+							this.$set(orderItem, 'loaded', true);
+							this.hasNextPage = response.data.hasNextPage;
+							if(this.hasNextPage){
+								this.pullUpOn = false
+								this.nomoreText = '上拉显示更多'
+							}else{
+								if(orderItem.orderList.length < 2){
+									this.pullUpOn = true
 								}else{
-									this.$util.msg(response.msg,2000);
+									this.pullUpOn = false
+									this.nomoreText = '已至底部'
 								}
 							}
-						)	
+						}).catch(response =>{
+							this.$util.msg(response.msg,2000);
+						})
 					})
 				}, 600);	
 			}, 
 			getOnReachBottomData(index){//上拉加载
 				this.pageNum+=1
-				let param = {orderState:index,userID:this.userID,index:this.pageNum,pageSize:this.pageSize,organizeID:this.userOrganizeID}
-				this.$api.get('/order/myOrder',param,
-					response => {
-						if(response.code === '1'){
-							let orderItem = this.orderTabBar[index];
-							let resData = response.data.results
-							this.hasNextPage = response.data.hasNextPage;
-							orderItem.orderList = orderItem.orderList.concat(resData)
-							this.pullFlag = false;// 防上拉暴滑
-							setTimeout(()=>{this.pullFlag = true;},500)
-							if(this.hasNextPage){
-								this.pullUpOn = false
-								this.nomoreText = '上拉显示更多'
-							}else{
-								this.loadding = false
-								this.pullUpOn = false
-								this.nomoreText = '已至底部'
-							}
-						}else{
-							this.$util.msg(response.msg,2000);
-						}
+				let params = {orderState:index,userId:10086,pageNum:1,pageSize:this.pageSize};
+				queryOrderList(params).then(response =>{
+					let orderItem = this.orderTabBar[index];
+					let resData = response.data.results
+					this.hasNextPage = response.data.hasNextPage;
+					orderItem.orderList = orderItem.orderList.concat(resData)
+					this.pullFlag = false;// 防上拉暴滑
+					setTimeout(()=>{this.pullFlag = true;},500)
+					if(this.hasNextPage){
+						this.pullUpOn = false
+						this.nomoreText = '上拉显示更多'
+					}else{
+						this.loadding = false
+						this.pullUpOn = false
+						this.nomoreText = '已至底部'
 					}
-				)	
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000)
+				})
 			},
 			scrolltolower() {
 				if(this.hasNextPage){
@@ -320,10 +295,10 @@
 			handShowAlert(data) {//执行
 				switch(data.type){
 					case 'delete':
-						this.isShowDelModal = true;
+						this.handOrderDetele();
 						break
 					case 'cancel':
-						this.isCenceModal = true;
+						this.handCenceConfirm()
 						break
 					case 'query':
 						this.isModalLayer = true;
@@ -335,49 +310,40 @@
 				}
 			},
 			handOrderConfirm (id){//确认收货
-				this.$api.get('/order/affirm',{orderID:id},
-					response => {
-						if(response.code === '1'){
-							this.$util.msg(response.msg,2000,true,'success');
-							this.isShowDelModal = false
-							setTimeout(() => {
-								this.getOrderDatainit(this.currentTab)
-							},2000)
-						}else{
-							this.$util.msg(response.msg,2000);
-						}
-					}
-				)
+				this.$util.modal('提示','是否确认收货','确定','取消',true,() =>{
+					confirmReceipt({orderID:id}).then(response =>{
+						this.$util.msg(response.msg,2000,true,'success');
+						this.initOrderDetaileData()
+					}).catch(response =>{
+						this.$util.msg(response.msg,2000)
+					})
+				})
 			},
-			handOrderDetele (){//删除订单
-				this.$api.get('/order/delete',{orderID:this.btnoRderID},
-					response => {
-						if(response.code === '1'){
-							this.$util.msg(response.msg,2000,true,'success');
-							this.isShowDelModal = false
-							setTimeout(() => {
-								this.getOrderDatainit(this.currentTab)
-							},2000)
-						}else{
-							this.$util.msg(response.msg,2000);
-						}
-					}
-				)
+			handOrderDetele(){//删除订单
+				this.$util.modal('提示','确认删除该订单吗?','确定','取消',true,() =>{
+					deleteOrder({orderID:this.orderID}).then(response =>{
+						this.$util.msg(response.msg,2000,true,'success');
+						setTimeout(() => {
+							if(this.shareType ==='share'){
+								this.$api.switchTabTo('/pages/tabBar/user/user')
+							}else{
+								this.$api.redirectTo(`/pages/user/order/order-list?type=detele&state=${this.state}`)
+							}
+						},500)
+					}).catch(response =>{
+						this.$util.msg(response.msg,2000)
+					})
+				})
 			},
-			handCenceConfirm (){//取消订单
-				this.$api.get('/order/cancel',{orderID:this.btnoRderID},
-					response => {
-						if(response.code === '1'){
-							this.$util.msg(response.msg,2000,true,'success');
-							this.isCenceModal = false
-							setTimeout(() => {
-								this.getOrderDatainit(this.currentTab)
-							},2000)
-						}else{
-							this.$util.msg(response.msg,2000);
-						}
-					}
-				)
+			handCenceConfirm(){//取消订单
+				this.$util.modal('提示','确认取消该订单吗?','确定','取消',true,() =>{
+					cancelOrder({orderID:this.orderID}).then(response =>{
+						this.$util.msg(response.msg,2000,true,'success');
+						this.initOrderDetaileData()
+					}).catch(response =>{
+						this.$util.msg(response.msg,2000)
+					})
+				})
 			},
 			handlSearchPath(){
 				this.$api.navigateTo('/pages/search/search-order')

+ 8 - 28
pages/user/regularPurchase/regularPurchase.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="container all-type-list-wrapper">
-		<commodity-list ref="childList" :empty-text="emptyText" @operationConfim="hanldOperationConfim"></commodity-list>
+		<product-list ref="childList" @operationConfim="hanldOperationConfim"></product-list>
 		<!--底部选择模态层弹窗组件 -->
 		<view class="popup spec" :class="specClass"  @touchmove.stop.prevent="discard" @tap="hideSpec">
 			<!-- 遮罩层 -->
@@ -37,11 +37,10 @@
 </template>
 
 <script>
-	import commodityList from '@/components/module/listTemplate/commodityList'
-	
+	import productList from '@/components/module/listTemplate/productList'
 	export default{
 		components:{
-			commodityList
+			productList
 		},
 		data(){
 			return{
@@ -59,31 +58,10 @@
 				buyRetailPrice:0
 			}
 		},
-		onShow() {
-			let pages = getCurrentPages(),
-				thisPage = pages[pages.length - 1];
-			if(thisPage.refresh) {
-				this.setServerUrl(thisPage.listData);
-			}
-			this.$api.loginStatus().then((resolveData) => {
-				this.$refs.childList.loginStatus = resolveData;
-			});
-		},
 		onLoad() {
-			this.$api.getStorage().then((resolve) =>{
-				this.userID = resolve.userID
-				this.setServerUrl();
-			})
+
 		},
 		methods:{
-			setServerUrl() {
-				this.lastPageType = '再次购买';
-				this.lastPageVal = '再次购买';
-				// 空内容文案
-				const emptyTxt = '您还没有购买过任何商品哟~';
-				this.serverUrl = `/order/purchase?userID=${this.userID}`;
-				this.$refs.childList.getListFromServer();
-			},
 			hanldOperationConfim(data){//显示选择数量确认弹窗
 				console.log(data)
 				this.handleData = data
@@ -157,7 +135,6 @@
 						productID:this.handleData.productID,
 						userID:this.userID,
 						productCount:this.number,
-						organizeID:this.userOrganizeID
 					},
 					response => {
 						if (response.code == "1") {				
@@ -183,7 +160,10 @@
 			discard(){
 				//丢弃
 			}
-		}
+		},
+		onShow() {
+			let pages = getCurrentPages(),thisPage = pages[pages.length - 1];
+		},
 	}
 </script>
 

+ 1 - 0
uni.scss

@@ -22,6 +22,7 @@ $sub-bg-color: #F7F7F7;
 $green-color: #62BF00;
 
 /* 字体大小变量 */
+$font-size-20:20rpx;
 $font-size-24:24rpx;
 $font-size-26:26rpx;
 $font-size-28:28rpx;