Browse Source

用户体系优化V6.2.0

zhengjinyi 5 years ago
parent
commit
fa0850f876

+ 3 - 3
api/cart.js

@@ -41,7 +41,7 @@ export function queryShoppingCartList(params) {
  */
 export function shoppingCartUpdate(params) {
 	return new Promise(function(resolve,reject) {
-		request.post('/shoppingCart/update',params, res => {
+		request.post('/shoppingCart/update',params, true, res => {
 			if(res.code == 0){
 				resolve(res)
 			}else{
@@ -55,7 +55,7 @@ export function shoppingCartUpdate(params) {
  */
 export function shoppingCartDelete(params) {
 	return new Promise(function(resolve,reject) {
-		request.post('/club/authorization',params, res => {
+		request.post('/shoppingCart/delete',params, true, 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.lodingGet('/findAddress/deleteAddress',params, res => {
+		request.lodingGet('/personalCenter/deleteAddress',params, res => {
 			if(res.code == 0){
 				resolve(res)
 			}else{

+ 1 - 1
api/operator.js

@@ -29,7 +29,7 @@ export function queryOperatorList(params) {
  */
 export function addOperator(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/club/authorization',params, res => {
+		request.post('/operation/add',params,true, res => {
 			if(res.code == 0){
 				resolve(res)
 			}else{

+ 43 - 17
api/order.js

@@ -8,7 +8,7 @@ import request from '@/common/config/caimeiApi.js'
 import $reg from '@/common/config/common.js'
 
 /**
- *@提交订单
+ *@结算页面
  *@param productIds 商品ID【”,”分割】
  *@param count		立即购买商品数量,购物车count为nul
  */
@@ -24,14 +24,27 @@ export function createOrderInfo(params) {
 	})
 }
 /**
- *@获取订单列表
- *@param orderState 订单状态 1 2 3 4
- *@param pageNum	页码
- *@param pageSize	条数
+ *@提交订单
+ *@param productIds 商品ID【”,”分割】
+ *@param count	立即购买商品数量,购物车count为nul
  */
-export function queryOrderList(params) {
+export function createOrderSubmit(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/order/list',params, res => {
+		request.post('/order/submit',params, true,res => {
+			resolve(res)
+		})
+	})
+}
+/**
+ *@获取运费
+ *@param productIds 商品ID【”,”分割】
+ *@param totalPrice	商品总额
+ *@param userId		用户ID
+ *@param townID		地址区ID
+ */
+export function getOrderPostage(params) {
+	return new Promise(function(resolve,reject) {
+		request.get('/order/postage',params, true,res => {
 			if(res.code == 0){
 				resolve(res)
 			}else{
@@ -41,12 +54,14 @@ export function queryOrderList(params) {
 	})
 }
 /**
- *查询订单详情
- *@param orderID 订单ID
+ *@获取订单列表
+ *@param orderState 订单状态 1 2 3 4
+ *@param pageNum	页码
+ *@param pageSize	条数
  */
-export function queryOrderDetails(params) {
+export function queryOrderList(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/order/detail',params, res => {
+		request.get('/order/list',params, res => {
 			if(res.code == 0){
 				resolve(res)
 			}else{
@@ -56,12 +71,12 @@ export function queryOrderDetails(params) {
 	})
 }
 /**
- *获取订单分享码
- * @param
+ *查询订单详情
+ *@param orderID 订单ID
  */
-export function queryOrderShareCode(params) {
+export function queryOrderDetails(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/club/authorization',params, res => {
+		request.get('/order/detail',params, res => {
 			if(res.code == 0){
 				resolve(res)
 			}else{
@@ -131,10 +146,10 @@ export function queryLogistics(params) {
 	})
 }
 /**
- *分享订单登录
+ *获取订单分享码
  * @param
  */
-export function orderShareCode(params) {
+export function queryOrderShareCode(params) {
 	return new Promise(function(resolve,reject) {
 		request.get('/order/share',params, res => {
 			if(res.code == 0){
@@ -145,6 +160,17 @@ export function orderShareCode(params) {
 		})
 	})
 }
+/**
+ *分享订单登录
+ * @param
+ */
+export function orderShareCode(params) {
+	return new Promise(function(resolve,reject) {
+		request.get('/order/shareCode',params, res => {
+			resolve(res)
+		})
+	})
+}
 /**
  *搜索订单
  *@param searchWord 关键词

+ 12 - 0
common/config/caimeiApi.js

@@ -100,6 +100,17 @@ const caimeiApi = {
 			}
 		})
 	},
+	getCommonStorage:function(key){
+	// 获取本地Storage
+		return new Promise(function(resolve,reject) {
+			uni.getStorage({
+				key: key,
+				success: function (res){
+					resolve(res.data);
+				}
+			})
+		});
+	},
 	getStorage:function(){
 	// 获取本地Storage
 		return new Promise(function(resolve,reject) {
@@ -262,6 +273,7 @@ module.exports = {
 	formatDate: caimeiApi.formatDate,
 	loginStatus: caimeiApi.loginStatus,
 	getStorage: caimeiApi.getStorage,
+	getCommonStorage: caimeiApi.getCommonStorage,
 	navToListPage: caimeiApi.navToListPage,
 	getWindowHeight: caimeiApi.getWindowHeight,
 	adaptRichTextImg: caimeiApi.adaptRichTextImg,

+ 3 - 3
common/config/config.js

@@ -1,9 +1,9 @@
 let URL_CONFIG = ""
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
-	URL_CONFIG = 'http://192.168.1.22:8008'//本地联调地址
-	// URL_CONFIG = 'http://192.168.1.24:8107'//俊俊联调地址
-    // URL_CONFIG = 'https://spi-b.caimei365.com'//测试地址
+	URL_CONFIG = 'http://192.168.1.22:8008'	 //裴裴联调地址
+	// URL_CONFIG = 'http://192.168.1.24:8008'	 //俊俊联调地址
+    // URL_CONFIG = 'https://spi-b.caimei365.com'//采美测试地址
 }else{
     // 生产环境
     URL_CONFIG = 'https://spi.caimei365.com'

+ 5 - 9
common/css/iconfont.scss

@@ -4,7 +4,7 @@
 	font-family: iconfont;
 	font-weight: normal;
 	font-style: normal;
-	src: url('https://at.alicdn.com/t/font_1519039_wbaaxrlswa.ttf') format('truetype');
+	src: url('https://at.alicdn.com/t/font_1519039_k3wm9mm5pf.ttf') format('truetype');
 }
 .iconfont {
 	font-family: "iconfont" !important;
@@ -13,22 +13,18 @@
 	-webkit-font-smoothing: antialiased;
 	-moz-osx-font-smoothing: grayscale;
 }
-.icon-dkw_jine:before {
-  content: "\e625";
+.icon-wenhao:before {
+  content: "\e671";
 }
 
-.icon-ziyuan:before {
-  content: "\e626";
+.icon-dkw_jine:before {
+  content: "\e625";
 }
 
 .icon-aixin:before {
   content: "\e663";
 }
 
-.icon-qian:before {
-  content: "\e642";
-}
-
 .icon-qian1:before {
   content: "\e62c";
 }

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

@@ -14,7 +14,11 @@
 							<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>
+							<view class="price-larger" v-if="item.price1TextFlag == '1'">
+								<text class="txt">该商品尚未公开价格</text>
+								<text class="txt">购买请致电:0755-22907771</text>
+							</view>
+							<text v-else>¥<text class="price-larger">{{item.retailPrice.toFixed(2)}}</text></text>
 						</view>
 						<button v-if="fromRegularPurchasePage" class="add-cart-btn" @click.stop="operationHanld(item)">选择数量</button>
 					</view>
@@ -291,6 +295,12 @@
 			color: #FF2A2A;
 			.price-larger {
 				font-size: 32rpx;
+				.txt{
+					font-size: $font-size-24;
+					display: inline-block;
+					line-height: 30rpx;
+					text-align: left;
+				}
 			}
 		}
 		.add-cart-btn {

+ 64 - 46
components/module/listTemplate/productList.vue

@@ -9,25 +9,25 @@
 						<text class="list-details-title">{{item.name}}</text>
 						<text class="list-details-specs">规格:{{item.unit}}</text>
 						<text class="list-details-miniQuantity">起订量:{{item.minBuyNumber}}</text>
-						<view class="list-details-price">
-							<view class="list-none" v-if="item.price1TextFlag == 1">
+						<view class="list-details-price" v-if="item.price1TextFlag == 1">
+							<view class="list-none">
 								<view class="price-small">该商品尚未公开价格</view>
 								<view class="price-small">购买请致电:0755-22907771</view>
 							</view>
-							<view class="list-shop" v-else>
+						</view>
+						<view class="list-details-price" v-else>
+							<view class="list-shop">
 								<view class="list-price" >
 									<text class="price-view activity" v-if="item.isShowActFlg">活动价</text>
 									<text class="price-view ladder" v-if="item.ladderPriceFlag == 1">阶梯价</text>
 									<text class="price-larger">¥{{item.retailPrice.toFixed(2)}}</text>
 								</view>
-								<button class="add-cart-btn" @click.stop="operationHanld(item)">选择数量</button>
+								<view class="list-price-none" v-if="item.repurchasePriceState">
+									<text class="price-none">¥{{item.discountPrice}}</text>
+									<text class="iconfont icon-wenhao" @click.stop="repurchModel"></text>
+								</view>
 							</view>
-						</view>
-						<view class="list-details-price">
-							<text v-if="item.repurchasePriceState">
-								<text class="price-none">¥{{item.discountPrice}}</text>
-								<text class="iconfont"></text>
-							</text>
+							<button class="add-cart-btn" @click.stop="operationHanld(item)">选择数量</button>
 						</view>
 					</view>
 				</view>
@@ -44,8 +44,8 @@
 			<button class="submit-btn toIndexPage" @click="toIndexPage">去逛逛</button>
 		</view>
 		<view class="cart-icon" v-if="!isShowEmpty" @click="toCartPage">
-			<text v-if="cartNum > 0" class="uni-badge uni-badge-error uni-small uni-badge--small icon-num">
-				{{cartNum >= 100 ? '99+' : cartNum}}
+			<text v-if="cartQuantity > 0" class="uni-badge uni-badge-error uni-small uni-badge--small icon-num">
+				{{cartQuantity >= 100 ? '99+' : cartQuantity}}
 			</text>
 			<image src='../../../static/icon-cart-active@3x.png' mode="widthFix"></image>
 		</view>
@@ -89,7 +89,7 @@
 				hasNextPage: false,
 				pullFlag: true,
 				fromRegularPurchasePage: false,
-				cartNum: 0,
+				cartQuantity: 0,
 				showRegularBtn: false,
 				isPrecedence:false
 			}
@@ -121,10 +121,11 @@
 				this.loadingText = '加载中';
 				this.isShowEmpty = false;				
 				if(loadMore) {this.pageNum += 1;}
-				let params = {userId:10081,pageNum:this.pageNum,pageSize:this.pageSize}
+				let params = {userId:this.userID,pageNum:this.pageNum,pageSize:this.pageSize}
 				queryAgaingoodslist(params).then(response =>{
 					this.isShowWrapper = true
-					const responseData = response.data;
+					this.cartQuantity = response.data.cartQuantity
+					const responseData = response.data.pageDate;
 					if(responseData.results && responseData.results.length > 0){
 						this.hasNextPage = responseData.hasNextPage;
 						this.isShowEmpty = false;
@@ -134,7 +135,8 @@
 							this.productList = [...responseData.results];
 							this.showSkeleton = false;
 						}
-						let isActFlg,newArry=[];
+						//价格显示处理
+						let isActFlg,newProductList=[];
 						this.productList.map((item, index)=> {
 							if(item.actFlag == 1){
 								isActFlg = true
@@ -143,9 +145,9 @@
 							}else{
 								isActFlg = false
 							}
-							newArry.push(Object.assign({},item,{isShowActFlg:isActFlg}))
+							newProductList.push(Object.assign({},item,{isShowActFlg:isActFlg}))
 						})
-						this.productList = newArry
+						this.productList = newProductList
 						console.log(this.productList)
 						// 防上拉暴滑
 						this.pullFlag = false;
@@ -185,6 +187,9 @@
 				uni.switchTab({
 					url: '/pages/tabBar/home/home' 
 				})
+			},
+			repurchModel(){
+				this.$util.modal('','此商品成本有变化原来的购买价已不适用','知道了','',false,() =>{})
 			}
 		}
 	}
@@ -216,7 +221,7 @@
 		}
 	}
 	.all-type-list-content {
-		height: 216rpx;
+		height: 240rpx;
 		padding: 24rpx;
 		background: #fff;
 		margin-bottom: 2rpx;
@@ -224,16 +229,15 @@
 		flex-direction: row;
 		box-sizing: content-box;
 		.list-img {
-			width: 210rpx;
-			height: 218rpx !important;
+			width: 240rpx;
+			height: 240rpx !important;
 			margin-right: 26rpx;
 			border-radius: 10rpx;
 			border: 2rpx solid #f3f3f3;
 		}
 	}
 	.list-details-info {
-		width: 466rpx;
-		display: flex;
+		width: 442rpx;
 		flex-direction: column;
 		font-size: 26rpx;
 		position: relative;
@@ -247,10 +251,14 @@
 			-webkit-box-orient: vertical;
 		}
 		.list-details-specs {
+			width: 100%;
+			display: inline-block;
 			margin-top: 8rpx;
 			color: #999999;
 		}
 		.list-details-miniQuantity {
+			width: 100%;
+			display: inline-block;
 			margin-top: 7rpx;
 		}
 	}
@@ -258,15 +266,7 @@
 		width: 100%;
 		display: flex;
 		flex-direction: row;
-		justify-content: space-between;
-		position: absolute;
-		bottom: 0;
-		right: 0;
-		.price-none{
-			text-decoration: line-through;
-			color: #999999;
-			display: inline-block;
-		}
+		justify-content: space-between;		
 		.price-icon {
 			width: 22rpx;
 			height: 28rpx;
@@ -293,25 +293,28 @@
 			padding: 10rpx 10rpx 10rpx 0;
 		}
 		.list-none{
+			margin-top: 30rpx;
 			.price-small{
 				font-size:$font-size-24;
-				line-height: 36rpx;
+				line-height: 40rpx;
 				color: #FF2A2A;
 			}
 		}
+		
 		.list-shop{
 			width: 100%;
 			height: auto;
-			display: flex;
+			flex: 6;
 			.list-price {
-				flex: 7;
+				width: 100%;
 				color: #FF2A2A;
 				float: left;
-				line-height:64rpx ;
+				line-height:36rpx ;
 				align-items: center;
 				justify-content: center;
 				.price-larger {
-					font-size: $font-size-32;
+					margin-top: 20rpx;
+					font-size: $font-size-30;
 					display: inline-block;
 				}
 				.price-view{
@@ -323,6 +326,7 @@
 					color: #FFFFFF;
 					height: 36rpx;
 					line-height: 36rpx;
+					margin-right: 8rpx;
 					&.ladder{
 						background: linear-gradient(135deg,rgba(255,0,0,1) 0%,rgba(242,143,49,1) 100%);
 					}
@@ -331,17 +335,31 @@
 					}
 				}
 			}
-			.add-cart-btn {
-				width: 156rpx;
-				height: 64rpx;
-				line-height: 64rpx;
-				border-radius: 32rpx;
-				color: #fff;
-				font-size: 26rpx;
-				margin-right: 0;
-				background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
+			.list-price-none{
+				width: 100%;
+				.price-none{
+					text-decoration: line-through;
+					color: #999999;
+					display: inline-block;
+				}
+				.icon-wenhao{
+					font-size: $font-size-32;
+					color: #0091FF;
+					margin-left: 6rpx;
+				}
 			}
 		}
+		.add-cart-btn {
+			flex: 4;
+			width: 156rpx;
+			height: 64rpx;
+			line-height: 64rpx;
+			border-radius: 32rpx;
+			color: #fff;
+			font-size: 26rpx;
+			margin-right: 0;
+			background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
+		}
 	}
 	.cart-icon {
 		width: 92rpx;

+ 4 - 4
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,7 +21,7 @@
 </template>
 
 <script>
-	import { orderShareCode } from "@/api/order.js" 
+	import { queryOrderShareCode } from "@/api/order.js" 
 	export default{
 		name:'sharealert',
 		props:{
@@ -39,7 +39,7 @@
 		},
 		methods:{
 			getShareCode(res){
-				orderShareCode({orderID:res}).then(response =>{
+				queryOrderShareCode({orderID:res}).then(response =>{
 					this.shareCode = response.data
 					this.$parent.shareCode = this.shareCode;
 				}).catch(response =>{
@@ -56,7 +56,7 @@
 			btnConfirm(code){
 				this.$emit('btnConfirm')
 			}
-		},
+		}
 	}
 </script>
 

+ 2 - 1
components/module/orderDetails/invoiceTent.vue

@@ -69,7 +69,8 @@
 		},
 		methods:{
 			initData(res) {
-				if(res.invoiceTitle == null){
+				console.log(res)
+				if(res == null){
 					this.isEmpty = true
 				}else{
 					this.isEmpty = false

+ 1 - 1
components/uni-stars/uni-stars.vue

@@ -35,7 +35,7 @@
 			iconClass:{
 				// fontSize类型
 				type: String,
-				default:'icon-qian1'
+				default:'icon-dkw_jine'
 			},
 			iconColor:{
 				// fontSize类型

+ 6 - 6
pages.json

@@ -63,12 +63,6 @@
 				"navigationBarTitleText": "商品详情",
 				"navigationStyle":"custom"
 			}
-		},{
-			"path": "pages/user/order/order-cashier",
-			"style": {
-				"navigationBarTitleText": "收银台",
-				"navigationStyle":"custom"
-			}
 		},{
 			"path": "pages/service/aftersale",
 			"style": {
@@ -114,6 +108,12 @@
 			"style": {
 				"navigationBarTitleText": "确认订单"			
 			}
+		},{
+			"path": "pages/user/order/order-cashier",
+			"style": {
+				"navigationBarTitleText": "收银台",
+				"navigationStyle":"custom"
+			}
 		},{
 			"path": "pages/user/order/orderShareLogin",
 			"style": {

+ 67 - 45
pages/goods/product.vue

@@ -21,11 +21,11 @@
 					</uni-swiper-dot>
 				</view>
 				<view class="product-wrap clearfix">
-					<view class="wrap-top" :class="goodsData.disabled ? 'none' : ''">
+					<view class="wrap-top" :class="goodsData.isNoneDisabled ? 'none' : ''">
 						<view class="p-title tui-skeleton-fillet">
 							{{product.name == undefined ? '' : product.name}}
 						</view>
-						<view class="wrap-top-price" v-if="!goodsData.disabled">
+						<view class="wrap-top-price" v-if="!goodsData.isNoneDisabled">
 							<view v-if="!hasLogin" class="p-login grade  tui-skeleton-fillet">
 								<text class="p-no">价格:</text>
 								<uni-stars :stars="parseInt(product.price1Grade)" :font-size='36' :width-info="180"></uni-stars>
@@ -34,31 +34,36 @@
 								<text @click.stop="navToLogin">登录查看价格<text class="iconfont icon-xiayibu" style="font-size: 22rpx;margin: 0 6rpx;"></text></text>
 							</view>
 							<view class="wrap-main" v-else>
-								<view class="p-main" v-if="ladderPriceFlag == '0'">
-									<view class="p-price tui-skeleton-fillet">
-										<text class="txt sm">¥</text>
-										<text class="txt big">{{retailPrice}}</text>
-										<text class="txt big">{{smallMoney== '0'?'.00':smallMoney}}</text>
-									</view>
-									<view class="p-minBuy">
-										起订量:
-										<text class="min-text">{{minBuyNumber}}</text>
-									</view>
+								<view class="wrap-main-pricenone" v-if="product.price1TextFlag == 1">
+									<text>该商品尚未公开价格,请联系客服购买</text>
 								</view>
-								<view class="wrap-ladder" v-else>
-									<view class="ladder-text">
-										<text class="ladder-h1">说明:</text>
-										<text class="ladder-p">本商品有以下优惠购物方案</text>
+								<view class="wrap-main-price" v-else>
+									<view class="p-main" v-if="ladderPriceFlag == '0' || product.actFlag == 1">
+										<view class="p-price tui-skeleton-fillet">
+											<text class="txt sm">¥</text>
+											<text class="txt big">{{retailPrice}}</text>
+											<text class="txt big">{{smallMoney== '0'?'.00':smallMoney}}</text>
+										</view>
+										<view class="p-minBuy">
+											起订量:
+											<text class="min-text">{{minBuyNumber}}</text>
+										</view>
 									</view>
-									<view class="ladder-main tui-skeleton-fillet">
-										<view class="ladder-left">
-											<view class="ladder-b">起订量:</view>
-											<view class="ladder-b">价格:</view>
+									<view class="wrap-ladder" v-else>
+										<view class="ladder-text">
+											<text class="ladder-h1">说明:</text>
+											<text class="ladder-p">本商品有以下优惠购物方案</text>
 										</view>
-										<view class="ladder-right">
-											<view class="ladder-li" v-for="(ladder,index) in  ladderPriceList" :key="index">
-												<view class="ladder-a">{{ladder.buyNumRangeShow}}</view>
-												<view class="ladder-a">¥{{ladder.buyPrice.toFixed(2)}}</view>
+										<view class="ladder-main tui-skeleton-fillet">
+											<view class="ladder-left">
+												<view class="ladder-b">起订量:</view>
+												<view class="ladder-b">价格:</view>
+											</view>
+											<view class="ladder-right">
+												<view class="ladder-li" v-for="(ladder,index) in  ladderPriceList" :key="index">
+													<view class="ladder-a">{{ladder.buyNumRangeShow}}</view>
+													<view class="ladder-a">¥{{ladder.buyPrice.toFixed(2)}}</view>
+												</view>
 											</view>
 										</view>
 									</view>
@@ -69,16 +74,16 @@
 					<view class="wrap-label" v-if="product.tagsList.length>0">
 						<view class="label-a tui-skeleton-fillet" v-for="(label,index) in  product.tagsList" :key="index">{{label}}</view>
 					</view>
-					<view class="wrap-label"  v-if="goodsData.disabled">
+					<view class="wrap-label"  v-if="goodsData.isNoneDisabled">
 						<view class="isLower">此商品已{{disabledText}},请浏览以下推荐商品~</view>
 					</view>
 					<view class="wrap-info">
-						<view class="info-viewT" :class="goodsData.disabled ? 'none' : ''">
+						<view class="info-viewT" :class="goodsData.isNoneDisabled ? 'none' : ''">
 							<view class="info-viewL tui-skeleton-fillet">品牌:<text>{{product.brandName == null? '其他' : product.brandName}}</text></view>
 							<view class="info-viewR tui-skeleton-fillet">包装规格:<text>{{product.unit}}</text></view>														
 						</view>
 					</view>
-					<view class="wrap-seve" :class="goodsData.disabled ? 'none' : ''">
+					<view class="wrap-seve" :class="goodsData.isNoneDisabled ? 'none' : ''">
 						<text class="tui-skeleton-rect">服务:</text>
 						<text class="iconfont icon-dui tui-skeleton-rect"><text class="text">无忧退货</text></text>
 						<text class="iconfont icon-dui tui-skeleton-rect"><text class="text">快速退款</text></text>
@@ -88,7 +93,7 @@
 			</view>
 			<view class="product-details">
 				<!-- 头部 -->
-				<view  v-if="goodsData.disabled" class="navbar" :class="navbarFiexd"
+				<view  v-if="goodsData.isNoneDisabled" class="navbar" :class="navbarFiexd"
 					 :style="{top:headerBtnPosi.bottom + (headerBtnPosi.bottom - headerBtnPosi.height - systeminfo.statusBarHeight) +'px'}">
 					<view class="nav-item tui-skeleton-fillet" v-for="(item,index) in  disabledTabNavList" :key="index" :class="{ current: tabCurrentIndex === index+2 }" @click="tabClick(index+2)">
 						<text class="line"></text>
@@ -232,6 +237,7 @@
 				isQuantity:false,
 				isStock:false,
 				disabled:false,
+				isNoneDisabled:false,
 				disabledText:'',
 				tabCurrentIndex:0,
 				userID:'',
@@ -294,19 +300,28 @@
 					}
 					//拆分金额并转千分位格式显示
 					this.retailPrice = this.product.retailPrice.toFixed(2);
+					//处理除阶梯价格以外的购买价格
+					// if(this.ladderPriceFlag == '0' || this.product.actFlag == 1){
 					this.buyRetailPrice = this.product.retailPrice;
+					// }
 					//处理下架商品和售罄商品
-					if(this.product.validFlag =='3' || this.stock == 0){
+					if(this.product.validFlag =='3' || this.stock == 0 ){
 						this.disabled = true
+						this.isNoneDisabled = true
 						this.tabCurrentIndex = 2;// 页面显示是默认选中第一
 						this.isRecommend = true
 						this.disabledText = '下架'
 					}else{
 						this.disabled = false
+						this.isNoneDisabled = false
 						this.tabCurrentIndex = 0;// 页面显示是默认选中第三
 						this.disabledText = ''
 					}
+					if(this.product.price1TextFlag == 1){
+						this.disabled = true
+					}
 					this.goodsData.disabled = this.disabled
+					this.goodsData.isNoneDisabled = this.isNoneDisabled
 					if(this.product.validFlag =='3'){
 						this.disabledText = '下架'
 					}
@@ -363,13 +378,7 @@
 			},	
 			changeCountAdd(){//popup弹窗数量增加按钮
 				this.number++
-				if(this.ladderPriceFlag == '1'){
-					this.ladderPriceList.forEach((item,index)=>{
-						if(this.number>=item.buyNum){
-							this.buyRetailPrice = item.buyPrice
-						}
-					})
-				}
+				this.processActivityPrice()
 			},
 			changeCountSub(){//popup弹窗数量减按钮
 				if(this.number<=this.minBuyNumber){
@@ -379,13 +388,7 @@
 					return
 				}else{
 					this.number--
-					if(this.ladderPriceFlag == '1'){
-						this.ladderPriceList.forEach((item,index)=>{
-							if(this.number>=item.buyNum){
-								this.buyRetailPrice = item.buyPrice
-							}
-						})
-					}
+					this.processActivityPrice()
 					this.isQuantity =false
 				}
 			 },
@@ -398,6 +401,18 @@
 					this.number = this.minBuyNumber
 				}else{
 					this.number = e.detail.value
+					this.processActivityPrice()
+				}
+			},
+			processActivityPrice(){//单独处理活动价格和阶梯价格
+				if(this.ladderPriceFlag == '1' && this.product.actFlag == 1){
+					this.buyRetailPrice = this.product.retailPrice
+				}else{
+					this.ladderPriceList.forEach((item,index)=>{
+						if(this.number>=item.buyNum){
+							this.buyRetailPrice = item.buyPrice
+						}
+					})
 				}
 			},
 			showSpec(type) {//显示选择数量确认弹窗
@@ -424,7 +439,7 @@
 				let productStp ={
 						allPrice:this.number*this.buyRetailPrice,
 						allCount:this.number,
-						id:this.product.productID,
+						productID:this.product.productID,
 						productCount:this.number
 				}	
 				this.$api.navigateTo(`/pages/user/order/create-order?type=prodcut&data=${JSON.stringify({data:productStp})}`)
@@ -436,7 +451,7 @@
 				console.log(this.number)
 				shoppingAddCart({productID:this.productID,userID:this.userID,productCount:this.number}).then(response => {
 					this.specClass = 'hide';
-					this.$util.msg(response.msg,1500,true,'success')
+					this.$util.msg('加入购物车成功',1500,true,'success')
 					this.isAnimation = true
 					setTimeout(() => {this.specClass = 'none'}, 200)
 					setTimeout(() => {this.isAnimation = false},2000)
@@ -588,6 +603,12 @@
 				margin-bottom: 16rpx;
 				
 			}
+			.wrap-main-pricenone{
+				line-height: 44rpx;
+				color: #FF2A2A;
+				font-size: $font-size-28;
+				font-weight: 600;
+			}
 			.p-price{
 				height: 44rpx;
 				line-height: 44rpx;
@@ -780,6 +801,7 @@
 			background: #fff;
 			z-index: 10;
 			display: flex;
+			border-bottom: 1px solid #F8F8F8;
 			&.fixed{
 				position: fixed;
 				left: 0;

+ 2 - 2
pages/search/search-order.vue

@@ -42,7 +42,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">
@@ -201,7 +201,7 @@
 			confirmDetele () {//清空历史记录
 				this.$util.modal('提示','确定删除历史记录?','确定','取消',true,() =>{
 					clearOrderHistory({userId:this.userID}).then(response =>{
-						this.$util.msg('删除成功',2000,true,'success')
+						this.$util.msg('删除记录成功',2000,true,'success')
 						this.serachRecordList=[]
 					}).catch(response =>{
 						this.$util.msg(response.msg,2000)

+ 27 - 30
pages/tabBar/cart/cart.vue

@@ -386,20 +386,13 @@
 			    })
 			},		
 			changeCountAdd(item,pros){//商品数量加加
-				let ladderPriceList = pros.productLadderPrices;
 				if(pros.productCount>=pros.stock){
 					pros.productCount= pros.stock
 					this.isStock =true
 					return
 				}else{
 					pros.productCount++
-					if(pros.ladderPriceFlag == '1'){
-						ladderPriceList.forEach((item,index)=>{
-							if(pros.productCount>=item.buyNum){
-								pros.retailPrice = item.buyPrice
-							}
-						})
-					}
+					this.processActivityPrice(pros)
 					this.isStock =false
 				}
 				
@@ -407,20 +400,13 @@
 				this.totalShopPeice();
 			},
 			changeCountSub(item,pros){//商品数量减减
-				let ladderPriceList = pros.productLadderPrices;
 				if(pros.productCount<=pros.minBuyNumber){
 					pros.productCount= pros.minBuyNumber
 					this.$util.msg(`该商品最小起订量为${pros.minBuyNumber}`,2000);
 					return
 				}else{
 					pros.productCount--
-					if(pros.ladderPriceFlag == '1'){
-						ladderPriceList.forEach((item,index)=>{
-							if(pros.productCount>=item.buyNum){
-								pros.retailPrice = item.buyPrice
-							}
-						})
-					}
+					this.processActivityPrice(pros)
 				}
 				this.updateShoppogNum(pros)
 				this.totalShopPeice();
@@ -434,10 +420,23 @@
 					pros.productCount = pros.minBuyNumber
 				}else{
 					pros.productCount = e.detail.value
+					this.processActivityPrice(pros)
 				}
 				this.updateShoppogNum(pros)
 				this.totalShopPeice();
 			},
+			processActivityPrice(pros){//单独处理活动价格和阶梯价格
+				let ladderPriceList = pros.ladderPriceList;
+				if(pros.ladderPriceFlag == '0' || pros.actFlag == 1){
+					pros.retailPrice = pros.retailPrice
+				}else{
+					ladderPriceList.forEach((item,index)=>{
+						if(pros.productCount>=item.buyNum){
+							pros.retailPrice = item.buyPrice
+						}
+					})
+				}
+			},
 			updateShoppogNum(pros){//加减购物车商品更新到后台
 				let params ={userID:this.userID,productID:pros.productID,productCount:pros.productCount}
 				shoppingCartUpdate(params).then(response =>{
@@ -453,7 +452,7 @@
 					let products = res.productsList
 					products.forEach(pros=>{
 						if(pros.productsChecked){
-						    setGoodsList.push(pros.id)
+						    setGoodsList.push(pros.productID)
 						}
 					})
 				})
@@ -466,23 +465,20 @@
 					 * @获取勾选的商品分类ID拼接字符串格式逗号隔开,最后一个逗号去掉
 					 */
 					let productID = '';
-					let classifyID ='';
 					this.goodsList.forEach(el=>{
 						el.productsList.forEach(pros=>{
 							if(pros.productsChecked){
-							   productID += pros.id+','
-							   classifyID += pros.classifyID+','
+							   productID += pros.productID+','
 							}
 						})
 					})
-					let CartPramsData={
+					let cartPramsData={
 							allPrice:this.allPrice,
 							allCount:this.allCount,
-							id:productID.substring(0,productID.lastIndexOf(',')),
-							productCount:'',
-							classifyID:classifyID.substring(0,classifyID.lastIndexOf(',')),
+							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})}`)
 				}
 			},
 			setOrderGoods(){//本地获取勾选商品信息***暂时丢弃***
@@ -547,7 +543,7 @@
 					let products = delitem.productsList
 					products.forEach(pros=>{
 						if(pros.productsChecked){
-						    this.delGoodsList += pros.id+','
+						    this.delGoodsList += pros.productID+','
 						}
 					})
 				})
@@ -558,10 +554,11 @@
 				}else{				
 					this.$util.modal('','确定删除选中的商品吗?','确定','取消',true,() =>{
 						shoppingCartDelete({userID:this.userID,productIDs:this.delGoodsList}).then(response =>{
-							this.$util.msg(response.msg,2000);
-							this.isshowDelbtn = false;
-							setTimeout(function(){
-								self.initGetCartGoodsList();
+							console.log(response)
+							this.$util.msg('删除成功',2000);
+							setTimeout(()=>{
+								this.isshowDelbtn = false;
+								this.initGetCartGoodsList();
 							},2000)
 						}).catch(response =>{
 							this.$util.msg(response.msg,2000)

+ 22 - 11
pages/tabBar/home/home.vue

@@ -48,9 +48,9 @@
 			</view>
 			<!-- 热销商品 -->
 			<view class="hotgoods-section">
-				<view class="s-header" @click="this.$api.navToListPage({type:'3',value:thirdModulesName})">
-					<text class="tip tui-skeleton-fillet">{{thirdModulesName}}</text>
-					<text class="tit tui-skeleton-fillet">更多</text>
+				<view class="s-header tui-skeleton-fillet" @click="this.$api.navToListPage({type:'3',value:thirdModulesName})">
+					<text class="tip">{{thirdModulesName}}</text>
+					<text class="tit">更多</text>
 					<text class="iconfont icon-xiayibu"></text>
 				</view>
 				<view class="hotgoods-swiper">
@@ -65,14 +65,19 @@
 								<view class="title tui-skeleton-rect">
 									<text class="mclap">{{item.name}}</text>
 								</view>
-								<view v-if="isLogin" class="price tui-skeleton-rect">
-									<text class="p sm">¥</text>
-									<text class="p big">{{item.retailPrice.toFixed(2)}}</text>
+								<view class="title-none" v-if="item.price1TextFlag == '1'">
+									<text class="p big">尚未公开价格</text>
+								</view>
+								<view class="" v-else>
+									<view v-if="isLogin" class="price tui-skeleton-rect">
+										<text class="p sm">¥</text>
+										<text class="p big">{{item.retailPrice.toFixed(2)}}</text>
+									</view>
+									<view v-else class="no-price">		
+										<text class="p-no">价格:</text>
+										<uni-stars :stars="parseInt(item.price1Grade)"></uni-stars>
+									</view>	
 								</view>
-								<view v-else class="no-price">		
-									<text class="p-no">价格:</text>
-									<uni-stars :stars="parseInt(item.price1Grade)"></uni-stars>
-								</view>		
 							</view>
 						</view>
 					</scroll-view>
@@ -511,12 +516,18 @@
 			font-size: $font-size-24;
 			color: $text-color;
 			line-height: 36rpx;
-			border-radius: 10rpx;
+			border-radius: 10rpx;			
 			image{
 				width: 210rpx;
 				height: 217rpx;
 				border-radius: 10rpx;
 			}
+			.title-none{
+				font-size: $font-size-28;
+				color: #FF2A2A;
+				line-height: 24rpx;
+				margin-top: 18rpx;
+			}
 			.title{
 				width: 210rpx;
 				height: 72rpx;

+ 9 - 8
pages/tabBar/user/user.vue

@@ -6,7 +6,7 @@
 				<view class="u-header-main">
 					<view class="user-item">
 						<view class="logo-m">
-							<image :src="headpic" mode=""></image>
+							<image :src="headpic == null? '../../../static/temp/icon-club@3x.png' : headpic" mode=""></image>
 						</view>
 					</view>
 					<view class="user-item">
@@ -125,7 +125,7 @@
 		data() {
 			return{	
 				name:'采美采购商城',
-				headpic:'../../../static/temp/icon-club@3x.png',
+				headpic:'',
 				userMoney:0.00,
 				contactNumber:'',
 				openid:'',
@@ -174,16 +174,17 @@
 						}
 					}
 					this.name = _clubData.name //会所名称
-					if(user_data.headpic!=null){
-						this.headpic = _userData.image //会所头像
-					}else{
-						this.headpic='../../../static/temp/icon-club@3x.png'
-					}
+					this.headpic = _userData.image //会所头像
 					this.contactNumber = user_data.organize.contactNumber //联系电话		
 					this.paymentCount = this.showBadge(user_data.paymentCount)//待付款
 					this.waitShipmentsCount = this.showBadge(user_data.waitShipmentsCount)//待收货		
 					this.shipmentsCount = this.showBadge(user_data.shipmentsCount)//已发货	
-					this.salesReturnCount = this.showBadge(user_data.salesReturnCount)//退货/款			
+					this.salesReturnCount = this.showBadge(user_data.salesReturnCount)//退货/款	
+					let clubInfo ={name:this.name,image:this.headpic}
+					uni.setStorage({//缓存用户登陆状态
+						key: 'clubInfo',  
+						data: clubInfo  
+					}) 
 				}).catch(response =>{
 					this.$util.msg(response.msg,2000)
 				})

+ 1 - 1
pages/user-module/login.vue

@@ -121,7 +121,7 @@
 								if(response.code == 0){
 									this.login(response.data)
 									uni.switchTab({
-										url:'/pages/tabBar/user/user'
+										url:'/pages/tabBar/home/home'
 									})
 								}else if(response.code == 4){
 									this.login(response.data)

+ 9 - 6
pages/user/address/address.vue

@@ -135,12 +135,15 @@
 			//删除收货地址
 			deleteAddress(id){
 				console.log('删除地址的ID',id)
-				this.$util.modal('','确定要删除该地址?','确定删除',true,() =>{
-					deleteNewAddress({addressID:id,userID:resolve.userID}).then(response =>{
-						this.$util.msg(response.msg,2000)
-						this.pageNum = 1;
-						this.addressList = [];
-						this.initAddressList();
+				this.$util.modal('','确定要删除该地址?','确定','取消',true,() =>{
+					deleteNewAddress({addressID:id,userID:this.userID}).then(response =>{
+						console.log('11111111111')
+						this.$util.msg('删除成功',2000)
+						setTimeout(() =>{
+							this.pageNum = 1;
+							this.addressList = [];
+							this.initAddressList();
+						},2000)
 					}).catch(response =>{
 						this.$util.msg(response.msg,2000);
 						setTimeout(function(){

+ 2 - 2
pages/user/address/addressManage.vue

@@ -107,7 +107,7 @@
 			},
 			onConfirm(e) {
 				// console.log('地址',e);
-				this.addressData.address = e.name;
+				this.addressData.allAddress = e.name;
 				this.addressData.townID = e.cityCode;	
 			},			
 			//提交
@@ -141,7 +141,7 @@
 			postAddressData(res){
 				this.btnText(true)
 				addNewAddress(res).then( response=>{
-					this.$util.msg(response.msg,2000);
+					this.$util.msg('添加成功',2000);
 					this.btnText(false)
 					setTimeout(()=>{
 						uni.navigateBack();

+ 23 - 95
pages/user/operator/addoperator.vue

@@ -8,7 +8,7 @@
 				<view class="from-row">
 					<input class="input" type="text" v-model="clubMobile" placeholder="请输入运营人员手机号" maxlength="11"/>
 				</view>
-				<button class="add-btn" @click="confirm">{{buttonText}}</button>
+				<button class="add-btn" @click="confirm">确定</button>
 			</view>
 			<view class="operator-text">
 				<view class="title" @click="this.$api.navigateTo('/pages/user/operator/bindstep')">
@@ -28,39 +28,19 @@
 
 <script>	
 	import authorize from '@/common/config/authorize.js'	
+	import { addOperator } from "@/api/operator.js"
+	
 	export default {
 		data() {
 			return {
-				buttonText:'确定',
-				addType:1,				//记录添加地址的类型
+				clubID:'',
+				userID:'',
 				linkman:'',
 				clubMobile:'',
-				isConfirm:true,
-				isShowInput:false,
-				switchDefault:false,
-				params:{}				//参数
 			}
 		},
 		onLoad(option){
-			// console.log(option.data)
-			let title = '添加新地址'
-			if(option.type==='edit'){
-				title = '编辑收货地址'
-				this.isConfirm = false;
-				this.addType = 2;				
-				this.addressData = JSON.parse(option.data)
-				this.addressData.address = `${this.addressData.province}-${this.addressData.city}-${this.addressData.town}`
-				this.addressData.userOrganizeID = this.userOrganizeID;
-				this.addressData.defaultFlag = this.addressData.defaultFlag;
-				if(this.addressData.defaultFlag == 1){
-					this.switchDefault = true
-				}else{
-					this.switchDefault = false
-				}
-			}
-			uni.setNavigationBarTitle({
-				title
-			})
+			
 		},
 		methods: {			
 			//提交
@@ -78,79 +58,27 @@
 					this.$util.msg('请输入正确的手机号码');
 					return;
 				}
-				if(this.addType ==1){
-					this.params ={
-							userID:data.userID  ,//用户id ,只在新增收货地址时传
-							shouHuoRen:data.shouHuoRen ,//收货人
-							townID:data.townID,//区ID
-							addressDetail:data.addressDetail,//地址
-							mobile:data.mobile,//手机
-							userOrganizeID:this.userOrganizeID,//组织ID
-							defaultFlag:data.defaultFlag//是否默认收货地址(0 不是默认,1 默认)
-						}
-					this.postAddressData(this.params)	
-				}else{
-					this.params =  this.addressData;
-					this.postAddressData(this.params)
-				}
-			},
-			postAddressData(res){
-				let self = this;
-				self.btnText(true)
-				authorize.getCode('weixin').then(wechatcode =>{
-					self.$api.post('/personal/save?code='+`${wechatcode}`,JSON.stringify(res),
-						response => {
-							if(response.code==1){
-								self.$util.msg(response.msg,3000);
-								self.btnText(false)
-								uni.navigateBack();
-							}else{
-								self.$util.msg(response.msg,3000);
-								setTimeout(function(){
-									uni.switchTab({
-										url:'/pages/tabBar/home/home'
-									})
-								},1000)
-							}
-						}
-					)
-				})	
-			},
-			btnText(flg){
-				if(flg){
-					this.isConfirm = true;
-					this.buttonText = '保存中...'
-				}else{
-					this.isConfirm = false;
-					this.buttonText = '保存'
-				}
-			},
-			onShouHuoRen(e){
-			   this.addressData.shouHuoRen = e.detail.value;
-			   // console.log(this.addressData.shouHuoRen)
-			   this.initInput();
-			},
-			onMobile(e){
-			   this.addressData.mobile = e.detail.value;
-			   // console.log(this.addressData.mobile)
-			   this.initInput();
-			},
-			onTextareaInput(e){
-			   this.addressData.addressDetail = e.detail.value;
-			   // console.log(this.addressData.addressDetail)
-			   this.initInput();
-			},
-			initInput(){
-				if(this.addressData.shouHuoRen !== "" && this.addressData.mobile !=="" && this.addressData.addressDetail !==""){
-					this.isConfirm =false;
-				}else{
-					this.isConfirm =true;
-				}
+				let params = {
+						mobile:this.clubMobile,
+						linkName:this.linkman,
+						userID:this.userID,
+						clubID:this.clubID
+					}
+				addOperator(params).then(response =>{
+					this.$util.msg('添加成功',2000);
+					setTimeout(() =>{
+						uni.navigateBack();
+					},2000)
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000);
+				})
 			}
 		},
 		onShow() {
 			this.$api.getStorage().then((resolve) =>{
-				this.addressData.userID = resolve.userID
+				console.log(resolve)
+				this.userID = resolve.userID
+				this.clubID = resolve.userID
 			})
 		}
 	}

+ 9 - 6
pages/user/operator/list.vue

@@ -2,7 +2,7 @@
 	<view class="container operator clearfix">
 		<view class="operator-top clearfix">
 			<view class="operator-title">
-				<view class="head"><image src="../../../static/temp/icon-club@3x.png" mode=""></image></view>
+				<view class="head"><image :src="clubImage == null ? '../../../static/temp/icon-club@3x.png' : clubImage" mode=""></image></view>
 				<view class="title">{{clubName}}</view>
 			</view>
 			<view class="operator-search">
@@ -72,7 +72,7 @@
 					<view class="ciew-t">邀请码有效期:{{modelData.effectiveDays}}天</view>
 					<view class="ciew-t">状态:{{modelData.status == '2' ? '已绑定' : '未绑定'}}</view>
 					<view class="ciew-t">添加时间:{{modelData.addTime}}</view>
-					<view class="ciew-t">绑定时间:{{modelData.bindTime}}</view>
+					<view class="ciew-t">绑定时间:{{modelData.bindTime == null ? '无' : modelData.bindTime }}</view>
 				</view>
 				<view class="btn" v-if="modelData.status != '2'" @click.stop="updateInvitationCode(modelData)">更新邀请码</view>
 			</view>
@@ -93,10 +93,10 @@
 		},
 		data() {
 			return {
-				clubName:'采美商城采购机构按时',
+				clubName:'',
+				clubImage:'',
 				linkman:'',
 				clubMobile:'',
-				isSelect:false,
 				isEmpty:false,
 				nomoreText: '上拉显示更多',
 				userID:'',
@@ -119,8 +119,11 @@
 				modelData:''
 			}
 		},
-		onLoad(option){	
-			if(option.type=='select'){this.isSelect = true;}
+		onLoad(){	
+			this.$api.getCommonStorage('clubInfo').then(response =>{
+				this.clubName = response.name
+				this.clubImage = response.image
+			})
 			this.setScrollHeight();
 		},
 		methods: {

+ 47 - 29
pages/user/order/create-order.vue

@@ -60,7 +60,7 @@
 	import freightAlert from '@/components/module/modelAlert/freightAlert'
 	import modalLayer from "@/components/modal-layer"
 	import { queryAddressList } from "@/api/cart.js" 
-	import { createOrderInfo } from "@/api/order.js" 
+	import { createOrderInfo,createOrderSubmit,getOrderPostage } from "@/api/order.js" 
 	
 	export default {
 		components:{
@@ -89,6 +89,7 @@
 				userMoney:0.00,			  //显示可使用余额
 				deductMoney:0.00,		  //显示已使用的余额
 				addressID:'',			  //地址ID
+				townID:'',				  //区ID
 				isRequest:false,		  //是否加载完成渲染子组件
 				isAddress:false,		  //是否加载完成地址
 				isfreightTip:false,		  //控制邮费弹窗
@@ -111,13 +112,13 @@
 			if(option.type =='prodcut'){
 				this.cartType = 2
 				this.productCount = data.data.productCount
-				this.productIds = data.data.id
-				this.classifyIDS =  data.data.classifyID
+				this.productIds = data.data.productID
+				// this.classifyIDS =  data.data.classifyID
 			}else{
 				this.cartType = 1
 				this.productCount = data.data.productCount
-				this.productIds = data.data.id
-				this.classifyIDS =  data.data.classifyID
+				this.productIds = data.data.productID
+				// this.classifyIDS =  data.data.classifyID
 			}
 			this.getInitCrearOrder(option);
 			// this.getAddressData()
@@ -126,7 +127,7 @@
 			getInitCrearOrder(option){//获取订单商品信息&&邮费信息&&发票信息
 				this.$api.getStorage().then((resolve) =>{
 					this.userID = resolve.userID
-					let params ={userID:this.userID,count:this.productCount,productIds:this.productIds}
+					let params ={userId:this.userID,count:this.productCount,productIds:this.productIds}
 					createOrderInfo(params).then(response =>{
 						let resData = response.data
 						this.isRequest = true
@@ -142,11 +143,12 @@
 			},
 			getAddressData(){//获取地址信息
 				this.$api.getStorage().then((resolve) =>{
-					queryAddressList({index:1,pageSize:1,userID:resolve.userID}).then(response =>{
+					queryAddressList({pageNum:1,pageSize:1,userID:resolve.userID}).then(response =>{
 						this.isAddress = true
 						this.addressData = {}
 						if(response.data.results != ''){
 							this.addressID = response.data.results[0].addressID;
+							this.townID = response.data.results[0].townID;
 							this.addressData = response.data.results[0];
 						}else{
 							this.addressData = this.addressData;
@@ -160,14 +162,14 @@
 			},
 			submit(){//提交订单
 				if(this.addressID == ''){
-					this.$util.msg('请先添加收货地址~',3000)
+					this.$util.msg('请先添加收货地址~',2000)
 					return
 				}
 				this.orderInfo = this.goodsData.map(el => {
 					let productInfo = [];
 					el.productsList.forEach(item => {
 						productInfo.push({
-							productId:item.id,
+							productId:item.productID,
 							productNum:item.productCount
 						})
 					})
@@ -178,37 +180,52 @@
 					}
 					return {shopId:el.shopID,note:el.note,productInfo:productInfo}
 				})
+				let orderInvoice = Object.assign(this.invoiceData,'',{type:0})
 				let param = {
+						orderSource:6,
 						userId:this.userID,
-						organizeID:this.userOrganizeID,
 						cartType:this.cartType,
-						addressID:this.addressID,
+						addressId:this.addressID,
 						orderInfo:this.orderInfo,
 						balanceDeductionFlag:this.balanceDeductionFlag,
 						orderShouldPayFee:this.payAllPrice,
+						orderInvoice:orderInvoice
 					}
 				this.modalLayer = true;	
 				// console.log(JSON.stringify(param))
-				this.$api.lodingGet('/order/submitOrder',{'params':JSON.stringify(param)},
-					response => {
-						if(response.code === '1'){
-							this.submitState ='success'
-							let data = {orderID:response.data.orderID}
-							this.$api.navigateTo(`/pages/user/order/order-cashier?type=${this.submitState}&data=${JSON.stringify({data:data})}`)
-						}else if(response.code === '2'){
-							this.submitState ='nosuccess'
-							let data = {
-									orderID:response.data.orderID,
-									orderNo:response.data.orderNo,
-									orderMark:response.data.orderMark,
-									payableAmount:response.data.payableAmount
-							}
-							this.$api.navigateTo(`/pages/user/order/order-cashier?type=${this.submitState}&data=${JSON.stringify({data:data})}`)
-						}else{
-							this.$util.msg(response.msg,3000);
+				createOrderSubmit({'params':JSON.stringify(param)}).then(response =>{
+					if(response.code === 1){
+						this.submitState ='success'
+						let data = {orderID:response.data.orderID}
+						this.$api.navigateTo(`/pages/user/order/order-cashier?type=${this.submitState}&data=${JSON.stringify({data:data})}`)
+					}else if(response.code === 2){
+						this.submitState ='nosuccess'
+						let data = {
+								orderID:response.data.orderID,
+								orderNo:response.data.orderNo,
+								orderMark:response.data.orderMark,
+								payableAmount:response.data.payableAmount
 						}
+						this.$api.navigateTo(`/pages/user/order/order-cashier?type=${this.submitState}&data=${JSON.stringify({data:data})}`)
+					}else{
+						this.$util.msg(response.msg,2000);
 					}
-				)
+				}).catch(response =>{
+					
+				})
+			},
+			getPostage(){
+				this.$api.getStorage().then((resolve) =>{
+					let params ={
+							userId:resolve.userID,
+							productIds:this.productIds,
+							totalPrice:this.payAllPrice,
+							townID:this.addressData.townID
+						}
+					getOrderPostage(params).then(response =>{
+						console.log(response)
+					})	
+				})
 			},
 			handFreightAlertShow(){//显示邮费弹窗
 				this.isfreightTip = true;
@@ -338,6 +355,7 @@
 						border-radius: 0;
 						-webkit-tap-highlight-color: transparent;
 						overflow: hidden;
+						color: $color-system;
 					}
 				}	
 			}

+ 4 - 4
pages/user/order/order-cashier.vue

@@ -8,7 +8,7 @@
 					<view class="txt">订单提交成功</view>
 				</view>
 				<view v-else class="cashier-wrapper">
-					<image src="https://img.caimei365.com/group1/M00/03/81/Cmis214BwaGAbpW7AAGeF-TKoj4551.png" mode=""></image>
+					<image src="https://admin-b.caimei365.com/userfiles/1/images/photo/2020/03/%E8%AE%A2%E5%8D%95%E6%8F%90%E4%BA%A4%E6%88%90%E5%8A%9F%EF%BC%8C%E8%AF%B7%E5%8F%8A%E6%97%B6%E8%BD%AC%E8%B4%A6%E4%BB%98%E6%AC%BE%20%EF%BC%88%E7%9B%AE%E5%89%8D%E5%8F%AA%E6%94%AF%E6%8C%81%E7%BD%91%E9%93%B6%E8%BD%AC%E8%B4%A6%EF%BC%89%E5%90%A6%E5%88%99%E8%AE%A2%E5%8D%95%E5%B0%86%E4%BC%9A%E8%A2%AB%E5%8F%96%E6%B6%88%E3%80%82%403x.png" mode=""></image>
 					<view class="wrapper-text">
 						<view>订单提交成功,请及时转账付款</view>
 						<view><text class="red">(目前只支持网银转账)</text>否则订单将会被取消。</view>
@@ -163,7 +163,7 @@
 				return {
 					title: '您有新的分享订单,快来查看吧~',
 					path: `/pages/user/order/orderShareLogin?orderID=${this.shareOrderID}&userID=${this.userID}`,
-					imageUrl:'https://img.caimei365.com/group1/M00/03/8C/Cmis215XHXSAWWkhAAXDP4-6m_c397.png'
+					imageUrl:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/03/%E8%AE%A2%E5%8D%95%E5%88%86%E4%BA%AB%E5%9B%BE%403x.png'
 				}
 			},
 			goIndex(){
@@ -233,11 +233,11 @@
 					}
 				}
 				.wrapper-text.warning{
-					width: 702rpx;
+					width:540rpx;
 					text-align: justify;
 					color: #FF2A2A;
 					font-size: $font-size-24;
-					line-height: 36rpx;
+					line-height: 40rpx;
 					font-weight: normal;
 				}
 				.wrapper-title{					

+ 3 - 3
pages/user/order/order-details.vue

@@ -120,8 +120,8 @@
 					this.receiptAmount = resData.order.receiptAmount
 					this.returnedPurchaseFee = resData.order.returnedPurchaseFee
 				}).catch(response =>{
-					this.$util.modal('提示',response.msg,'确定','',false,() =>{
-						 uni.navigateBack({data:1})
+					this.$util.modal('提示','订单查询失败,请稍后重试~','确定','',false,() =>{
+						this.$api.switchTabTo('/pages/tabBar/home/home')
 					})
 				})
 			},
@@ -189,7 +189,7 @@
 				return {
 					title: '您有新的分享订单,快来查看吧~',
 					path: `/pages/user/order/orderShareLogin?orderID=${this.orderID}&userID=${this.userID}`,
-					imageUrl:'https://img.caimei365.com/group1/M00/03/8C/Cmis215XHXSAWWkhAAXDP4-6m_c397.png'
+					imageUrl:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/03/%E8%AE%A2%E5%8D%95%E5%88%86%E4%BA%AB%E5%9B%BE%403x.png'
 				}
 			},
 			getHeaderTopHeight(){

+ 17 - 17
pages/user/order/order-list.vue

@@ -222,7 +222,7 @@
 				setTimeout(()=>{
 					this.$api.getStorage().then((resolve) =>{
 						this.userID = resolve.userID
-						let params = {orderState:index,userId:10086,pageNum:1,pageSize:this.pageSize};
+						let params = {orderState:index,userId:this.userID,pageNum:1,pageSize:this.pageSize};
 						queryOrderList(params).then(response =>{
 							let orderList = response.data.results.filter(item=>{
 								//添加不同状态下订单的表现形式
@@ -255,7 +255,7 @@
 			}, 
 			getOnReachBottomData(index){//上拉加载
 				this.pageNum+=1
-				let params = {orderState:index,userId:10086,pageNum:1,pageSize:this.pageSize};
+				let params = {orderState:index,userId:this.userID,pageNum:1,pageSize:this.pageSize};
 				queryOrderList(params).then(response =>{
 					let orderItem = this.orderTabBar[index];
 					let resData = response.data.results
@@ -295,10 +295,10 @@
 			handShowAlert(data) {//执行
 				switch(data.type){
 					case 'delete':
-						this.handOrderDetele();
+						this.handOrderDetele(data.orderId);
 						break
 					case 'cancel':
-						this.handCenceConfirm()
+						this.handCenceConfirm(data.orderId)
 						break
 					case 'query':
 						this.isModalLayer = true;
@@ -313,33 +313,33 @@
 				this.$util.modal('提示','是否确认收货','确定','取消',true,() =>{
 					confirmReceipt({orderID:id}).then(response =>{
 						this.$util.msg(response.msg,2000,true,'success');
-						this.initOrderDetaileData()
+						setTimeout(() => {
+							this.getOrderDatainit(this.currentTab)
+						},2000)
 					}).catch(response =>{
 						this.$util.msg(response.msg,2000)
 					})
 				})
 			},
-			handOrderDetele(){//删除订单
+			handOrderDetele(id){//删除订单
 				this.$util.modal('提示','确认删除该订单吗?','确定','取消',true,() =>{
-					deleteOrder({orderID:this.orderID}).then(response =>{
+					deleteOrder({orderID:id}).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)
+							this.getOrderDatainit(this.currentTab)
+						},2000)
 					}).catch(response =>{
 						this.$util.msg(response.msg,2000)
 					})
 				})
 			},
-			handCenceConfirm(){//取消订单
+			handCenceConfirm(id){//取消订单
 				this.$util.modal('提示','确认取消该订单吗?','确定','取消',true,() =>{
-					cancelOrder({orderID:this.orderID}).then(response =>{
+					cancelOrder({orderID:id}).then(response =>{
 						this.$util.msg(response.msg,2000,true,'success');
-						this.initOrderDetaileData()
+						setTimeout(() => {
+							this.getOrderDatainit(this.currentTab)
+						},2000)
 					}).catch(response =>{
 						this.$util.msg(response.msg,2000)
 					})
@@ -356,7 +356,7 @@
 				return {
 					title: '您有新的分享订单,快来查看吧~',
 					path: `/pages/user/order/orderShareLogin?orderID=${this.btnoRderID}&userID=${this.userID}`,
-					imageUrl:'https://img.caimei365.com/group1/M00/03/8C/Cmis215XHXSAWWkhAAXDP4-6m_c397.png'
+					imageUrl:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/03/%E8%AE%A2%E5%8D%95%E5%88%86%E4%BA%AB%E5%9B%BE%403x.png'
 				}
 			},
 			//订单状态文字和颜色

+ 25 - 42
pages/user/order/order-sharedetails.vue

@@ -8,9 +8,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,14 @@
 	import transfeRecord from '@/components/module/orderDetails/transfeRecord'		 //转账信息
 	import paymentRecord from '@/components/module/orderDetails/paymentRecord'		 //支付记录
 	import refundRecord from '@/components/module/orderDetails/refundRecord'		 //退款记录
-	import freight from '@/components/module/creatOrder/freight'					 //邮费信息
-	import freightAlert from '@/components/module/modelAlert/freightAlert'			 //邮费弹窗
+	import { queryOrderDetails } from "@/api/order.js"
+	
 	export default {
 		components:{
 			orderInformation,
 			orderAddress,
 			invoiceTent,
 			goodsList,
-			freight,
-			freightAlert,
 			transfeRecord,
 			paymentRecord,
 			refundRecord,
@@ -54,10 +49,8 @@
 				cellPhone:'',				//客服电话
 				btnStatus:0,				//按钮组件状态
 				isRequest:false,			//是否加载完成渲染子组件
-				isfreightTip:false,			//是否显示邮费说明弹窗
 				addressData:{},				//地址信息初始化
 				information:{},				//订单信息初始化
-				freightData:{},				//邮费信息初始化
 				shopOrderData:{},			//商品信息初始化
 				orderInvoice:{},			//发票信息初始化
 				returnedPurchaseList:{},	//退款信息初始化
@@ -80,39 +73,29 @@
 		},
 		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.status = resData.order.status
-							this.addressData = resData.userInfo
-							this.information = resData.order
-							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},
-							this.mapStateArr.forEach(el => {
-								el.val.forEach(value => {
-									if(this.status === value){
-										this.btnState[el.label] = el.status
-									}
-								})
-							})
-						}else{
-							this.$util.msg(response.msg,2000);
-						}
-					}
-				)
-			},
-			handFreightAlertShow(){//显示邮费弹窗
-				this.isfreightTip = true;
-				this.cellPhone = this.freightData.cellPhone;
+				queryOrderDetails({ orderID : this.orderID }).then(response =>{
+					let resData = response.data;
+					this.isRequest = true
+					this.userID = resData.order.userID
+					this.status = resData.order.status
+					this.addressData = resData.userInfo
+					this.information = resData.order
+					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.mapStateArr.forEach(el => {
+						el.val.forEach(value => {
+							if(this.status === value){
+								this.btnState[el.label] = el.status
+							}
+						})
+					})
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000);
+				})
 			},
 			queryLogistics(){//跳转查询物流页面
 				this.$api.navigateTo('/pages/user/order/order-logistics?orderID='+this.orderID)

+ 29 - 33
pages/user/order/orderShareLogin.vue

@@ -16,6 +16,7 @@
 </template>
 <script>
 	import authorize from '@/common/config/authorize.js' 
+	import { orderShareCode } from "@/api/order.js" 
 	export default{
 		data() {
 			return{
@@ -37,33 +38,30 @@
 		methods:{
 			initQueryUser(){
 				authorize.getCode('weixin').then(wechatcode =>{
-					let param ={
+					let params ={
 							code:wechatcode,
 							orderID:this.orderID,
 							userID:this.userID,
-							organizeID:this.userOrganizeID,
 							shareCode:this.shareCode
-					}
-					this.$api.lodingGet('/order/shareCode',param, 
-						response => {
-							console.log(response)
-							if (response.code === "1") {
-								if(response.data == true){
-									// console.log('同为会所运营人员查看订单详情')
-									this.$api.navigateTo(`/pages/user/order/order-details?type=share&orderID=${this.orderID}`)
-								}else{
-									// console.log('游客第二次查看订单详情')
-									this.$api.redirectTo(`/pages/user/order/order-sharedetails?orderID=${this.orderID}`)
-								}
-							}else if(response.code === "-2"){
-								this.$util.modal('提示',response.msg,'确定','',false,() =>{
-									 this.$api.switchTabTo('/pages/tabBar/home/home')
-								})
+						}
+					orderShareCode(params).then(response =>{
+						console.log(response)
+						if (response.code === 0) {
+							if(response.data == true){
+								console.log('同为会所运营人员查看订单详情')
+								this.$api.navigateTo(`/pages/user/order/order-details?type=share&orderID=${this.orderID}`)
 							}else{
-								this.isShareStatus = true
+								console.log('游客第二次查看订单详情')
+								this.$api.redirectTo(`/pages/user/order/order-sharedetails?orderID=${this.orderID}`)
 							}
+						}else if(response.code === -2){
+							this.$util.modal('提示',response.msg,'确定','',false,() =>{
+								 this.$api.switchTabTo('/pages/tabBar/home/home')
+							})
+						}else{
+							this.isShareStatus = true
 						}
-					)
+					})
 				})
 			},
 			goLogin() {
@@ -76,23 +74,20 @@
 					return
 				}
 				authorize.getCode('weixin').then(wechatcode =>{
-					let param ={
+					let params ={
 							code:wechatcode,
 							orderID:this.orderID,
 							userID:this.userID,
-							organizeID:this.userOrganizeID,
 							shareCode:this.shareCode
-					}
-					this.$api.get('/order/shareCode',param, 
-						response => {
-							if (response.code == "1") {
-								console.log('游客第一次查看订单详情')
-								this.$api.redirectTo('/pages/user/order/order-sharedetails?orderID='+this.orderID)
-							}else{
-								this.$util.msg(response.msg,2000);
-							}
 						}
-					)
+					orderShareCode(params).then(response =>{
+						if (response.code === 0) {
+							console.log('游客第一次查看订单详情')
+							this.$api.redirectTo('/pages/user/order/order-sharedetails?orderID='+this.orderID)
+						}else{
+							this.$util.msg(response.msg,2000);
+						}
+					})
 				})
 			},
 		},
@@ -137,6 +132,7 @@
 				height: 100%;
 				background: #F7F7F7;
 				font-size: $font-size-28;
+				border-radius: 14rpx;  
 				line-height: 40rpx;
 				color: #333333;
 			}
@@ -151,7 +147,7 @@
 			margin-top: 100rpx;
 			text-align: center;
 			background: $btn-confirm;
-			border-radius: 0;
+			border-radius: 14rpx;
 		}
 		.model-authorization{
 			width: 100%;

+ 18 - 32
pages/user/regularPurchase/regularPurchase.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="container all-type-list-wrapper">
-		<product-list ref="childList" @operationConfim="hanldOperationConfim"></product-list>
+		<product-list ref="productList" @operationConfim="hanldOperationConfim"></product-list>
 		<!--底部选择模态层弹窗组件 -->
 		<view class="popup spec" :class="specClass"  @touchmove.stop.prevent="discard" @tap="hideSpec">
 			<!-- 遮罩层 -->
@@ -38,6 +38,7 @@
 
 <script>
 	import productList from '@/components/module/listTemplate/productList'
+	import { shoppingAddCart } from "@/api/cart.js" 
 	export default{
 		components:{
 			productList
@@ -64,11 +65,11 @@
 		methods:{
 			hanldOperationConfim(data){//显示选择数量确认弹窗
 				console.log(data)
+				this.specClass = 'show';
 				this.handleData = data
 				this.number = data.minBuyNumber
 				this.minBuyNumber = data.minBuyNumber
 				this.buyRetailPrice = data.retailPrice;
-				this.specClass = 'show';
 			},
 			hideSpec() {//关闭选择数量确认弹窗
 				this.specClass = 'hide';
@@ -120,42 +121,24 @@
 				let productStp ={
 						allPrice:this.number*this.buyRetailPrice,
 						allCount:this.number,
-						id:this.handleData.id,
-						productCount:this.number,
-						classifyID:this.handleData.classifyID,
+						id:this.handleData.productID,
+						productCount:this.number
 				}	
 				this.$api.navigateTo(`/pages/user/order/create-order?type=prodcut&data=${JSON.stringify({data:productStp})}`)
 				setTimeout(() => {
 					this.specClass = 'none';
 				}, 200);
 			},
-			getAddProductCart(){//增加购物车成功和toast弹窗提示成功		
-				this.$api.post('/details/addCart',
-					{
-						productID:this.handleData.productID,
-						userID:this.userID,
-						productCount:this.number,
-					},
-					response => {
-						if (response.code == "1") {				
-							this.specClass = 'hide';
-							this.$util.msg(response.msg,1500,true,'success');
-							this.isAnimation = true
-							setTimeout(() => {
-								this.specClass = 'none';							
-							}, 200);
-							setTimeout(() => {
-								this.isAnimation = false;							
-							}, 2000);
-							this.$refs.childList.cartNum = response.data;
-						}else{
-							this.$util.msg(response.msg,2000);
-							setTimeout(function(){
-								this.$api.switchTabTo('/pages/tabBar/home/home')
-							},1000)
-						}
-					}	
-				)	
+			getAddProductCart(){//增加购物车成功和toast弹窗提示成功
+				console.log(this.number)
+				shoppingAddCart({productID:this.handleData.productID,userID:this.userID,productCount:this.number}).then(response => {
+					this.specClass = 'hide';
+					this.$util.msg(response.msg,1500,true,'success')
+					setTimeout(() => {this.specClass = 'none'}, 200)
+					this.$refs.productList.cartQuantity = response.data
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000);
+				})
 			},
 			discard(){
 				//丢弃
@@ -163,6 +146,9 @@
 		},
 		onShow() {
 			let pages = getCurrentPages(),thisPage = pages[pages.length - 1];
+			this.$api.getStorage().then((resolve) =>{
+				this.userID = resolve.userID
+			})
 		},
 	}
 </script>