zhengjinyi преди 4 години
родител
ревизия
b082481bde

+ 9 - 0
common/config/utilsTools.js

@@ -102,6 +102,14 @@ const _Tools = {
 		s = s < 10 ? ('0' + s) : s;
 	    return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
 	},
+	isNumber:function(value){//验证是否为数字
+	    var patrn = /^(-)?\d+(\.\d+)?$/;
+	    if (patrn.exec(value) == null || value == "") {
+	         return false
+	    } else {
+	         return true  
+		}	 
+	},
 	FormatMoney:function(num){
 		// 金额千分位
 		return num.toString().replace(/\d+/, function (n) { // 先提取整数部分
@@ -121,6 +129,7 @@ module.exports = {
 	navigateTo: _Tools.navigateTo,
 	redirectTo: _Tools.redirectTo,
 	switchTabTo: _Tools.switchTabTo,
+	isNumber:_Tools.isNumber,
 	setStorage: _Tools.setStorage,
 	getStorage: _Tools.getStorage,
 	getComStorage: _Tools.getComStorage,

Файловите разлики са ограничени, защото са твърде много
+ 0 - 2
common/css/iconfont.scss


+ 5 - 5
components/cm-module/creatOrder/address.vue

@@ -3,7 +3,7 @@
 		 <!-- 地址 -->
 		 <navigator :url="addressSrc" class="address-section">
 			<view class="address-empty" v-if="isEmpty">
-			 	<text>添加收货地址</text><text class="iconfont icon-tianjiadizhi"></text>
+			 	<text class="iconfont icon-tianjiadizhi"></text><text>添加收货地址</text>
 			</view>
 		 	<view class="address-content" v-else>
 		 		<view class="address-cen">
@@ -41,6 +41,7 @@
 		},
 		data() {
 			return{
+				StaticUrl:this.$Static,
 				isEmpty:false,
 				addressSrc:'',
 			}
@@ -93,8 +94,8 @@
 		
 		.address-empty{
 			width: 100%;
-			height: 84rpx;
-			line-height: 84rpx;
+			height: 117rpx;
+			line-height: 117rpx;
 			color: $color-system;
 			text-align: center;
 			font-size: $font-size-26;
@@ -102,7 +103,7 @@
 			background: #fff;
 			float: left;
 			.icon-tianjiadizhi{
-				font-size: 30rpx;
+				font-size: 34rpx;
 				margin: 0 8rpx;
 			}
 		}
@@ -112,7 +113,6 @@
 			padding:20rpx 24rpx;
 			background: #fff;
 		}
-		
 		.icon-shouhuodizhi {
 			flex-shrink: 0;
 			display: flex;

+ 0 - 202
components/cm-module/creatOrder/choiceAddress.vue

@@ -1,202 +0,0 @@
-<template name="address">
-	<view class="address-template">
-		 <!-- 地址 -->
-		 <navigator :url="addressSrc" class="address-section">
-			<view class="address-empty" v-if="isEmpty">
-			 	<text>添加收货地址</text><text class="iconfont icon-tianjiadizhi"></text>
-			</view>
-		 	<view class="address-content" v-else>
-		 		<view class="address-cen">
-		 			<view class="top">
-		 				<view class="name">{{addressData.shouHuoRen !== undefined ? addressData.shouHuoRen : ''}}</view>
-		 				<view class="mobile">{{addressData.mobile !== undefined ? addressData.mobile : ''}}</view>
-		 			</view>
-		 			<view class="address">
-						<view class="address-icon">
-							<text class="iconfont icon-shouhuodizhi"></text>
-						</view>
-						<view class="address-text">
-							{{addressData.province !== undefined ? addressData.province : ''}}
-							{{addressData.city !== undefined ? addressData.city : ''}}
-							{{addressData.town !== undefined ? addressData.town : ''}}
-							{{addressData.address !== undefined ? addressData.address : ''}}
-						</view>
-					</view>
-					<view class="nexpage"><text class="iconfont icon-genghuan"></text></view>
-		 		</view>
-		 	</view>
-		 </navigator>
-		 <image  :src="StaticUrl+'icon-line.png'" mode=""></image>
-	</view>
-</template>
-
-<script>
-	export default{
-		name:"address",
-		props:{
-			addressData:{
-				type:Object
-			}
-		},
-		data() {
-			return{
-				StaticUrl:this.$Static,
-				isEmpty:false,
-				addressSrc:'',
-			}
-		},
-		created(){
-			this.initData(this.addressData)
-		},
-		computed: {
-
-		},
-		watch:{
-			addressData:{
-				handler:function(val){
-					this.initData(val)
-				}
-			}
-		},
-		methods:{
-			initData(res) {
-				if(Object.keys(res).length == 0){
-					this.isEmpty = true
-					this.addressSrc = '/pages/user/address/addressManage'
-				}else{
-					this.isEmpty = false
-					this.$parent.isFreight = false
-					this.addressSrc = '/pages/user/address/address?type=select'
-				}
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.address-template{
-		width: 100%;
-		height: auto;
-		background: #FFFFFF;
-		border-top: 1px solid #F8F8F8;
-		image{
-			float: left;
-			width: 100%;
-			height: 16rpx;
-		}
-	}
-	.address-section {
-		width: 100%;
-		height: auto;
-		float: left;
-		position: relative;
-		
-		.address-empty{
-			width: 100%;
-			height: 100rpx;
-			line-height: 100rpx;
-			color: $color-system;
-			text-align: center;
-			font-size: $font-size-26;
-			font-weight: bold;
-			background: #fff;
-			float: left;
-			.icon-tianjiadizhi{
-				font-size: 30rpx;
-				margin: 0 8rpx;
-			}
-		}
-		.address-content {
-			display: flex;
-			align-items: center;
-			padding:20rpx 24rpx;
-			background: #fff;
-		}
-		
-		.icon-shouhuodizhi {
-			flex-shrink: 0;
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			width: 40rpx;
-			color: $color-system;
-			font-size: 40rpx;
-			margin-right: 10rpx;
-		}	
-		.address-cen {
-			width: 100%;
-			height: auto;
-			position: relative;
-			.top{
-				padding-left: 50rpx;
-				height: 42rpx;
-				line-height: 42rpx;
-				text-align: left;
-				font-size: $font-size-30;
-				color: $text-color;
-				padding-bottom: 8rpx;
-				display: flex;
-				float: left;
-				.name{
-					font-weight: bold;
-					margin-right: 48rpx;
-				}
-				.mobile{
-					margin-right: 40rpx;
-					font-weight: bold;
-				}
-			}
-			.address {
-				width: 100%;
-				height: auto;
-				float: left;
-				.address-icon{
-					width: 40rpx;
-					height: auto;
-					float: left;
-					line-height: 40rpx;
-				}
-				.address-text{
-					width: 610rpx;
-					padding-left: 10rpx;
-					float: left;
-					line-height: 40rpx;
-					font-size: $font-size-28;
-					color: $text-color;
-					text-align: left;
-					-o-text-overflow: ellipsis;
-					text-overflow: ellipsis;
-					display: -webkit-box;
-					word-break: break-all;
-					-webkit-box-orient: vertical;
-					-webkit-line-clamp: 2;
-					overflow: hidden;
-				}
-			}
-			.nexpage{
-				text-align: right;
-				font-size: $font-size-30;
-				color: $color-system;
-				position: absolute;
-				right: 0;
-				top: 45rpx;
-				.icon-genghuan{
-					font-size: $font-size-30;
-				}
-			}
-		}
-		.icon-chakangengduo {
-			font-size: 32rpx;
-			color: $text-color;
-			margin-right: 30rpx;
-		}
-		.a-bg {
-			position: absolute;
-			left: 0;
-			bottom: 0;
-			display: block;
-			width: 100%;
-			height: 5rpx;
-		}
-	}
-</style>

+ 31 - 28
components/cm-module/creatOrder/goodsList.vue

@@ -4,29 +4,23 @@
 		<view class="goods-list">
 			<view v-for="(item, index) in goodsData" :key="index" class="goods-item">
 				<view class="shoptitle">
+					<view class="title-logo"><image :src="item.logo" mode=""></image></view>
 					<view class="title-text">{{item.name}}</view> 
 				</view>
 				<view class="productlist" v-for="(pros,idx) in item.productList" :key="idx">
 					<view class="goods-pros-t">
 						<view class="pros-img">
 							<image :src="pros.mainImage" alt="" />
-							<text class="tips" v-if="pros.productType == 2">赠品</text>
 						</view>
 						<view class="pros-product">
 							<view class="producttitle">{{ pros.productName }}</view>
-							<view class="floor-item-act" v-if="pros.promotion!=null">
-								<view v-if="PromotionsFormat(pros.promotion)" class="floor-tags">
-									{{pros.promotion.name}}
-									<text v-if ="pros.promotion!=null">
-										:¥{{ pros.promotion == null ? '0.00' : pros.promotion.touchPrice | NumFormat}}
-									</text>
-								</view>
-								<view v-else-if="pros.promotion.type !=3" class="floor-tags">{{pros.promotion.name}}</view>	
-							</view>
 							<view class="productspec">规格:{{ pros.unit }}</view>
+							<view class="floor-item-act" v-if="pros.activeStatus == 1">
+								<view class="tag">活动价</view>
+							</view>
 							<view class="productprice">
-								<view class="price" :class="PromotionsFormat(pros.promotion) ? 'disabled' : ''">
-									<text>¥{{(PromotionsFormat(pros.promotion) ? pros.price : pros.retailPrice)  | NumFormat}}</text>
+								<view class="price">
+									<text>¥{{ pros.price | NumFormat}}</text>
 								</view>
 								<view class="count"><text class="small">x</text>{{ pros.productCount }}</view>
 							</view>
@@ -133,6 +127,19 @@
 				align-items: center;
 				height: 80rpx;
 				line-height: 80rpx;
+				.title-logo{
+					width: 48rpx;
+					height: 48rpx;
+					float: left;
+					border-radius: 8rpx;
+					border: 1px solid #e1e1e1;
+					margin-right: 10rpx;
+					image{
+						border-radius: 8rpx;
+						width: 48rpx;
+						height: 48rpx;
+					}
+				}
 				.title-text{
 					width: 400rpx;
 					overflow: hidden;
@@ -208,6 +215,7 @@
 					height: 40rpx;
 					color: #999999;
 					line-height: 40rpx;
+					font-size: 20rpx;
 					text-overflow:ellipsis;
 					display: -webkit-box;
 					word-break: break-all;
@@ -220,8 +228,6 @@
 					height: 54rpx;
 					line-height: 54rpx;
 					width: 100%;
-					float: left;
-					margin-top: 30rpx;
 					.price{
 						line-height: 54rpx;
 						font-size: $font-size-28;
@@ -244,22 +250,19 @@
 				}
 				.floor-item-act{
 					width: 100%;
-					height: auto;
-					text-align: center;
-					box-sizing: border-box;
+					height: 30rpx;
+					margin-top: 8rpx;
 					float: left;
-					padding:0 0 10rpx 0;
-					.floor-tags{
-						height: 28rpx;
-						border-radius: 6rpx;
-						background-color: #FFFFFF;
-						line-height: 28rpx;
-						color: #ff2a2a;
-						text-align: center;
+					.tag{
 						display: inline-block;
-						padding:0 5rpx;
-						font-size: $font-size-20;
-						border: 1px solid #ff2a2a;
+						width: 80rpx;
+						height: 30rpx;
+						background: url(https://static.caimei365.com/app/mini-hehe/icon/icon-active.png)top center no-repeat;
+						background-size: contain;
+						font-size: 22rpx;
+						line-height: 30rpx;
+						text-align: center;
+						color: #f83c6c;
 						float: left;
 					}
 				}

+ 16 - 33
pages/goods/cart.vue

@@ -87,7 +87,7 @@
 					</view>
 				</view>
 				<!-- 脚部菜单 -->
-				<view class="footer">
+				<view class="footer" :style="{paddingBottom :isIphoneX ? '68rpx' : '0rpx'}">
 					<view class="footer-le">
 						<view class="foot-check checkbox-box" @tap.stop="checkAll()">
 							<button class="checkbox iconfont" :class="[isCheckAll?'icon-xuanze':'icon-weixuanze']"></button> 
@@ -173,7 +173,6 @@
 				skeletonShow:true,
 				isshowDelbtn:false,
 				isDisabled: false, // 供应商/店铺全选是否禁用状态
-				isNoConfim:false,
 				isEmpty:false,//显示空购物车
 				scrollHeight: 'auto',
 				nomoreText: '上拉显示更多',
@@ -187,7 +186,6 @@
 				modal:false,
 				contentModalText:'',
 				deleteType:0,
-				
 			}
 		},
 		onLoad(){
@@ -538,37 +536,22 @@
 				if(setGoodsList == ''){
 					this.$util.msg("请先选择结算商品~",2000);
 					return
-				}else{
-					this.isNoConfim = false
-					this.goodsList.forEach(el=>{
-						el.productList.forEach(pros=>{
-							if(pros.productsChecked){
-							   if(pros.productCount<pros.min){
-								   this.isNoConfim = true
-							   }
-							}
-						})
+				}
+				let productIds = '';
+				this.goodsList.forEach(el=>{//获取勾选的商品ID拼接字符串逗号隔开,最后一个逗号去掉
+					el.productList.forEach(pros=>{
+						if(pros.productsChecked){
+						   productIds += pros.productId+','
+						}
 					})
-					if(this.isNoConfim){
-						this.$util.modal('','有商品的购买量没达到最小起订量,请修改数量后再次提交结算','去修改','',false,() =>{})
-						return;
+				})
+				let cartPramsData={
+						allPrice:this.allPrice,
+						allCount:this.allCount,
+						productIds:productIds.substring(0,productIds.lastIndexOf(',')),
+						productCount:''
 					}
-					let productID = '';
-					this.goodsList.forEach(el=>{//获取勾选的商品ID拼接字符串逗号隔开,最后一个逗号去掉
-						el.productList.forEach(pros=>{
-							if(pros.productsChecked){
-							   productID += pros.productId+','
-							}
-						})
-					})
-					let cartPramsData={
-							allPrice:this.allPrice,
-							allCount:this.allCount,
-							productID:productID.substring(0,productID.lastIndexOf(',')),
-							productCount:''
-						}
-					this.$api.navigateTo(`/pages/user/order/create-order?data=${JSON.stringify({data:cartPramsData})}`)
-				}
+				this.$api.navigateTo(`/pages/user/order/create-order?data=${JSON.stringify({data:cartPramsData})}`)
 			},
 			showDelManager(){//显示删除商品管理
 				this.isshowDelbtn = true;
@@ -803,7 +786,7 @@
 		.checkbox{
 			display: flex;
 			margin: 0;
-			padding: 5rpx;
+			padding:0 5rpx;
 			display: flex;
 			flex-direction: column;
 			align-items: center;

+ 2 - 2
pages/goods/product.vue

@@ -24,7 +24,7 @@
 				</view>	
 			</view>	
 		</view>
-		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="5"></tui-skeleton>
+		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="2"></tui-skeleton>
 		<template v-else >
 			<view class="container-product tui-skeleton">
 				<view class="container-product-main product-details0">
@@ -474,7 +474,7 @@
 				let productStp ={
 						allPrice:this.number*this.buyRetailPrice,
 						allCount:this.number,
-						productId:this.product.productId,
+						productIds:this.product.productId,
 						productCount:this.number
 				}	
 				this.$api.navigateTo(`/pages/user/order/create-order?type=prodcut&data=${JSON.stringify({data:productStp})}`)

+ 17 - 60
pages/tabBar/cart/index.vue

@@ -163,7 +163,6 @@
 				skeletonShow:true,
 				isshowDelbtn:false,
 				isDisabled: false, // 供应商/店铺全选是否禁用状态
-				isNoConfim:false,
 				isEmpty:false,//显示空购物车
 				scrollHeight: 'auto',
 				nomoreText: '上拉显示更多',
@@ -528,37 +527,22 @@
 				if(setGoodsList == ''){
 					this.$util.msg("请先选择结算商品~",2000);
 					return
-				}else{
-					this.isNoConfim = false
-					this.goodsList.forEach(el=>{
-						el.productList.forEach(pros=>{
-							if(pros.productsChecked){
-							   if(pros.productCount<pros.min){
-								   this.isNoConfim = true
-							   }
-							}
-						})
+				}
+				let productIds = '';
+				this.goodsList.forEach(el=>{//获取勾选的商品ID拼接字符串逗号隔开,最后一个逗号去掉
+					el.productList.forEach(pros=>{
+						if(pros.productsChecked){
+						   productIds += pros.productId+','
+						}
 					})
-					if(this.isNoConfim){
-						this.$util.modal('','有商品的购买量没达到最小起订量,请修改数量后再次提交结算','去修改','',false,() =>{})
-						return;
+				})
+				let cartPramsData={
+						allPrice:this.allPrice,
+						allCount:this.allCount,
+						productIds:productIds.substring(0,productIds.lastIndexOf(',')),
+						productCount:''
 					}
-					let productID = '';
-					this.goodsList.forEach(el=>{//获取勾选的商品ID拼接字符串逗号隔开,最后一个逗号去掉
-						el.productList.forEach(pros=>{
-							if(pros.productsChecked){
-							   productID += pros.productId+','
-							}
-						})
-					})
-					let cartPramsData={
-							allPrice:this.allPrice,
-							allCount:this.allCount,
-							productID:productID.substring(0,productID.lastIndexOf(',')),
-							productCount:''
-						}
-					this.$api.navigateTo(`/pages/user/order/create-order?data=${JSON.stringify({data:cartPramsData})}`)
-				}
+				this.$api.navigateTo(`/pages/user/order/create-order?data=${JSON.stringify({data:cartPramsData})}`)
 			},
 			showDelManager(){//显示删除商品管理
 				this.isshowDelbtn = true;
@@ -793,7 +777,7 @@
 		.checkbox{
 			display: flex;
 			margin: 0;
-			padding: 5rpx;
+			padding:0 5rpx;
 			display: flex;
 			flex-direction: column;
 			align-items: center;
@@ -1298,42 +1282,15 @@
 				float: right;
 				box-sizing: border-box;
 				padding:0 10rpx;
-				.sum-none{
-					width: 100%;
-					height: 40rpx;
-					line-height: 40rpx;
-					color: $text-color;
-					float: left;
-					text-align: right;
-					.money{
-						font-size: $font-size-24;
-						color: #999999;
-						text-decoration: line-through;
-					}
-					.money-sign{
-						font-size: $font-size-24;
-						color: #999999;
-						text-decoration: line-through;
-					}
-					.money-reduced{
-						margin-left: 10rpx;
-						font-size: $font-size-24;
-						color: $color-system;
-					}
-				}
 				.sum-price{
 					text-align: right;
 					width: 100%;
-					height: 40rpx;
-					line-height: 40rpx;
+					height: 80rpx;
+					line-height: 80rpx;
 					font-size: $font-size-30;
 					color: $text-color;
 					float: left;
 					font-weight: normal;
-					&.none{
-						height: 80rpx;
-						line-height: 80rpx;
-					}
 					.money{
 						color: $color-system;
 					}

+ 57 - 119
pages/user/order/create-order.vue

@@ -7,11 +7,8 @@
 		<!-- 运费 -->
 		<seller-freight ref="freight" 
 						v-if="isRequest" 
-						:freightDatas="freightData" 
-						@handleChoiceaFreight="handleChoiceaFreightData" 
-						@showFreightAlert="handFreightAlertShow">
+						:freightDatas="freightData">
 		</seller-freight>
-		<freight-alert v-if="isfreightTip" ref="csPhone"></freight-alert>
 		<!-- 底部 -->
 		<view class="footer" :style="{paddingBottom :isIphoneX ? '68rpx' : '0rpx'}">
 			<view class="footer-le">
@@ -29,7 +26,7 @@
 	</view>
 </template>
 
-<script>
+<script> 
 	import choiceAddress from '@/components/cm-module/creatOrder/address'  
 	import goodsList from '@/components/cm-module/creatOrder/goodsList'
 	import sellerFreight from '@/components/cm-module/creatOrder/sellerFreight'
@@ -42,62 +39,55 @@
 		data() {
 			return {
 				isSubLoading:false,
-				orderID:0,
-				userId:'',
 				productIds:'',			  //获取上一级页面商品信息
 				productCount:'',		  //获取上一级页面商品数量
-				classifyIDS:'',			  //获取上一级页面商品分类
-				serviceProviderId:'',	  //协销ID
-				submitState:'',  		  //提交状态
 				allCount:1,				  //订单提交总数量
 				totalOriginalPrice:0,	  //订单总原价(划线部分)
-				totalFullReduction:0,			  //满减金额
+				totalFullReduction:0,	  //满减金额
 				payAllPrice:0.00,		  //订单提交总金额
 				allPrice:0.00,			  //订单总金额
-				addressId:'',			  //地址ID
 				townId:'',				  //区ID
 				isRequest:false,		  //是否加载完成渲染子组件
 				isFreight:false,		  //是否加载完成渲染子组件
 				isAddress:false,		  //是否加载完成地址
-				isfreightTip:false,		  //控制邮费弹窗
 				ischecked:false,	      //是否勾选余额
-				addressData:{
-					address: "奥术大师大所打撒大是奥术大师大所打撒大是奥术大师大所打撒大是",
-					addressID: 2913,
-					city: "县",
-					cityID: 2,
-					defaultFlag: "1",
-					mobile: "13316418828",
-					phone: null,
-					postalCode: null,
-					province: "北京市",
-					provinceID: 1,
-					shouHuoRen: "郑大大",
-					town: "东城区282",
-					townID: 17,
-					userID: 11063
-				},//初始化地址信息
-				goodsData:[
-					
-				],//初始化商品信息
-				invoiceData:{type:0},	  //初始化发票信息
+				addressData:{},//初始化地址信息
+				goodsData:[],//初始化商品信息
 				freightData:{},			  //邮费数据
-				orderInfo:[],			  //提交的商品信息
-				payInfo:{},				  //订单信息
 				isIphoneX:this.$store.state.isIphoneX,
-				clauseId:0,
 				productsList:[],
+				params:{
+					userId:0,
+					productIds:'',
+					productCount:0
+				},
+				subParams:{
+					userId:0,
+					orderInfo:[],//提交的商品信息
+					addressId:0,
+					cartType:0,
+					payInfo:{
+						orderShouldPayFee:0
+					}
+				}
 			}
 		},
 		onLoad(option){//商品数据
-			this.getInitCrearOrder();
 			let data = JSON.parse(option.data);
-			this.allPrice = data.data.allPrice;
 			this.allCount = data.data.allCount;
-			this.payAllPrice = this.totalPrice;
-			this.userId = data.data.userId
-			this.productIds = data.data.productID
-			console.log(this.allCount)
+			if(option.type =='prodcut'){
+				this.subParams.cartType = 2
+				this.params.productCount = data.data.productCount
+				this.params.productIds = data.data.productIds
+			}else{
+				this.subParams.cartType = 1 
+				this.params.productCount = data.data.productCount
+				this.params.productIds = data.data.productIds
+			}
+			this.$api.getStorage().then((resolve) =>{
+				this.params.userId = this.subParams.userId =  resolve.userId ? resolve.userId : 0
+				this.getInitCrearOrder(this.params);
+			})
 		},
 		filters:{
 			NumFormat(value) {//处理金额
@@ -105,107 +95,62 @@
 			},
 		},
 		methods: {
-			getInitCrearOrder(option){//确认订单初始化信息 
-				let params ={
-						userId:11104,
-						count:1,
-						productIds:1010,
-						unionId:'ox_1SwWzHhZwQg1va3Sr-InZoccc'
-					}
+			getInitCrearOrder(params){//确认订单初始化信息 
 				this.OrderService.QueryOrderConfirm(params)
 					.then(response =>{
 						let data = response.data
 						let productIds = []
 						this.isRequest = true
 						this.goodsData = data.shopList
-						this.totalFullReduction = data.totalFullReduction
-						this.totalOriginalPrice = data.totalFullReduction + data.totalPrice
+						// this.totalFullReduction = data.totalFullReduction
+						// this.totalOriginalPrice = data.totalFullReduction + data.totalPrice
 						this.allPrice = this.payAllPrice = data.totalPrice
+						this.subParams.payInfo.orderShouldPayFee = this.payAllPrice.toFixed(2)
+						console.log('this.subParams.payInfo.orderShouldPayFee',this.subParams.payInfo.orderShouldPayFee)
 					})
 					.catch(error =>{
 						this.$util.msg(error.msg,2000)
 					})
 			},
 			getAddressData(){//获取地址信息
-				this.UserService.QueryAddressList({pageNum:1,pageSize:1,userId:11104})
-				.then(response =>{
-					this.isAddress = true
-					this.addressData = {}
-					if(response.data.list != ''){
-						this.addressId = response.data.list[0].addressId;
-						this.townId = response.data.list[0].townId;
-						this.addressData = response.data.list[0];
-					}else{
-						this.addressData = this.addressData;
-					}
+				this.$api.getStorage().then((resolve) => {
+					this.UserService.QueryAddressList({pageNum:1,pageSize:1,userId:resolve.userId})
+					.then(response =>{
+						this.isAddress = true
+						this.addressData = {}
+						if(response.data.list != ''){
+							this.subParams.addressId = response.data.list[0].addressId;
+							this.townId = response.data.list[0].townId;
+							this.addressData = response.data.list[0];
+						}else{
+							this.addressData = this.addressData;
+						}
+					})
 				})
 			},
 			handChangeInputGoodsList(data){//对应供应商的留言信息
 				this.goodsData = data;
 			},
-			handleChoiceaInvoiceData(data){//获取发票信息
-				this.invoiceData = data
-			},
-			handleChoiceaFreightData(data){//获取运费信息
-				if(data.freePostFlag == '1'){
-					this.freightData = data
-					this.payAllPrice = this.allPrice+parseInt(data.freight)
-					this.attributePallPrice()
-				}else{
-					this.freightData = data
-					this.payAllPrice = this.allPrice
-					this.attributePallPrice()
-				}
-			},
-			attributePallPrice(){//计算价格
-				if(this.freightData.freePostFlag == 1 || this.freightData.freePostFlag == '1'){
-					this.attributeHashfreight(this.freightData.freight)
-				}else{
-					this.attributeNofreight()
-				}
-			},
-			attributeNofreight(){//计算没有邮费的支付价格
-				this.payAllPrice = this.allPrice;
-			},
-			attributeHashfreight(freight){//计算需要邮费的支付价格
-				this.payAllPrice = this.allPrice+parseInt(freight)//计算不包邮的价格 总价等于商品价格+邮费
-			},
 			orderSubmitMit(){//提交订单
 				if(this.isSubLoading){ return; }
-				if(this.addressId == ''){
+				if(this.subParams.addressId == ''){
 					this.$util.msg('请先添加收货地址~',2000)
 					return
 				}
 				// 处理商品信息及留言
-				this.orderInfo = this.goodsData.map(el => {
+				this.subParams.orderInfo = this.goodsData.map(el => {
 					let productInfo = [];
 					el.productList.forEach(item => {
 						productInfo.push({
 							productId:item.productId,
-							productNum:item.productCount,
-							productType:item.productType ? Number(item.productType) : 0,
-							presentNum:0,
+							productNum:item.productCount
 						})
 					})				
 					return {shopId:el.shopId,note:el.note?el.note:'',productInfo:productInfo}
 				})
-				//订单信息
-				this.payInfo = {
-						orderShouldPayFee:this.payAllPrice.toFixed(2),//提交的总价
-						balancePayFlag:this.balanceDeductionFlag,//余额抵扣的状态
-						freight:-1,//邮费
-						freePostFlag:-1//运费形式
-					}
-					console.log(this.payInfo)
-				let params = {
-						clubUserId:this.userId,
-						addressId:this.addressId,	  //地址ID
-						orderInfo:this.orderInfo,	  //商品信息
-						payInfo:this.payInfo,		  //订单信息
-						orderInvoice:this.invoiceData //发票信息
-					}
+				console.log(this.subParams)
 				this.isSubLoading = true;	
-				this.OrderService.CreatedOrderSubmit(params).then(response =>{
+				this.OrderService.CreatedOrderSubmit(this.subParams).then(response =>{
 					const data = response.data;
 					this.$util.msg('订单提交成功',2000,true,'success')
 					setTimeout(()=>{
@@ -218,21 +163,14 @@
 					this.$util.msg(error.msg,2000);
 				})
 			},
-			handFreightAlertShow(){//显示邮费弹窗
-				this.isfreightTip = true;
-			},
-			hideFreight(){//关闭邮费弹窗
-				this.isfreightTip = false;
-			},
 		},
 		onShow() {
-			// this.addressId = ''		
 			let pages = getCurrentPages();
 			let currPage = pages[pages.length-1];
 			if(currPage.data.select =='select'){
 				this.isAddress = true
 				let SelectData = uni.getStorageSync('selectAddress');
-				this.addressId = SelectData.addressId;
+				this.subParams.addressId = SelectData.addressId;
 				this.addressData = SelectData
 			}else{
 				this.getAddressData()
@@ -377,7 +315,7 @@
 			float: right;
 			text-align: right;
 			color: $text-color;
-			padding: 10rpx 20rpx 10rpx 0;
+			padding-right:20rpx;
 			box-sizing: border-box;
 			width: 370rpx;
 			.sum{

Някои файлове не бяха показани, защото твърде много файлове са промени