Ver código fonte

商品模块

hmp 4 anos atrás
pai
commit
d70b5ffc8f
2 arquivos alterados com 83 adições e 38 exclusões
  1. 8 1
      assets/http/api.js
  2. 75 37
      pagesD/pages/take-order/take-order.vue

+ 8 - 1
assets/http/api.js

@@ -145,6 +145,7 @@ const withdraw={
 
 const goods={
 	menu:p => http.get("goods/getGoodsMenuList", {params:p}),
+	order:p => http.post('ldt_bills/goodsbills/order',p),
 }
 
 const address={
@@ -154,6 +155,11 @@ const address={
 }
 
 
+const userChannelPoint={
+	list:p => http.get('ldt_user/userchannelpoint/list',{params:p}),
+} 
+
+
 
 export const api={
 	wxApp,
@@ -178,5 +184,6 @@ export const api={
 	statistics,
 	withdraw,
 	goods,
-	address
+	address,
+	userChannelPoint
 }

+ 75 - 37
pagesD/pages/take-order/take-order.vue

@@ -12,33 +12,40 @@
 			</view>
 		</view>
 		<view class="card" style="flex-direction: column;">
-			<view class="center text-bold margin-50" style="font-size: 56rpx;">
+			<view class="center text-bold margin-50" style="font-size: 66rpx;">
 				<text>2874</text>
 			</view>
-			<view class="cu-steps steps-arrow">
-				<view class="cu-item" :class="index>1?'text-default':'text-base'" v-for="(item,index) in stepList" :key="index">
+			<view class="cu-steps steps-arrow ">
+				<view class="cu-item" :class="index>0?'text-default':'text-base'" v-for="(item,index) in stepList" :key="index">
 					<text style="font-size: 80rpx;margin-bottom: 20rpx;margin-right: 10rpx;" :class="'cuIcon-' + item.icon"></text>
 					<text >{{item.name}}</text>
 				</view>
 			</view>
-			
-<!-- 			<view class="step">
-				<view class="">
-					<image src="../../static/icon/step1.png" mode=""></image>
-					<view>待付款</view>
-				</view>
-				
-				<view class="">
-					<image src="../../static/icon/step1.png" mode=""></image>
-					<view>制作中</view>
-				</view>
-				
-				<view class="">
-					<image src="../../static/icon/step1.png" mode=""></image>
-					<view>已完成</view>
+			<view class="center text-gray margin-50">
+				<text>您前面还有4单待制作</text>
+			</view>
+			<u-read-more ref="uReadMore" close-text="展开更多" show-height="500" color="#999">
+				<view v-for="(item,index) in vuex_orderInfo.cart" :key="index" class="cart">
+					<view class="flex" style="width: 70%;">
+						<image :src="item.image" mode=""></image>
+						<view class="item-content " style="justify-content: flex-start;text-align: left;">
+							<text class="text-cut-1">{{item.name}}</text>
+							<text class="text-cut-1">{{item.propertyStr ? item.propertyStr : item.name}}</text>
+						</view>
+					</view>
+					<view class="item-data">
+						<view class="">
+							<text class="text-sm">x</text>
+							<text class="text-lg" style="margin-left: 6rpx;">{{item.number}}</text>
+						</view>
+						<text class="text-price text-lg">{{item.realPrice / 100}}</text>
+					</view>
 				</view>
-			</view> -->
+			</u-read-more>
 		</view>
+		
+		
+		
 	</view>
 </template>
 
@@ -49,7 +56,7 @@ export default {
 		return {
 			stepList:[{
 				name:'待付款',
-				icon:'pay'
+				icon:'recharge'
 			},
 			{
 				name:'制作中',
@@ -57,7 +64,7 @@ export default {
 			},
 			{
 				name:'已完成',
-				icon:'goods'
+				icon:'roundcheck'
 			}]
 		};
 	}
@@ -65,18 +72,12 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-	.cu-steps.steps-bottom .cu-item::before,
-	.cu-steps.steps-bottom .cu-item::after {
-		bottom: 20upx;
-		top: initial;
-	}
-	
 	.page{
 		margin: 20rpx;
 	}
 	
 	.text-default{
-		color: #FF9447;
+		color: #ffbf91;
 	}
 	
 	.btn-icon{
@@ -84,15 +85,6 @@ export default {
 		color: #FF9447;
 	}
 	
-	.step{
-		display: flex;
-		justify-content: space-around;
-		
-		image{
-			width: 88rpx;
-			height: 88rpx;
-		}
-	}
 	
 	.card {
 		padding: 30rpx;
@@ -101,4 +93,50 @@ export default {
 		display: flex;
 		justify-content: space-between;
 	}
+	
+	.cart {
+		border-bottom: 1rpx solid #f1f1f1;
+		display: flex;
+		background-color: #FFFFFF;
+	
+		image {
+			width: 120rpx;
+			height: 120rpx;
+		}
+	
+		.item-content {
+			background-color: #007AFF;
+			width: calc(100% - 120rpx);
+			display: flex;
+			flex-direction: column;
+			justify-content: space-between;
+			justify-content: flex-start;
+			align-items: flex-start;
+	
+			text:first-child {
+				font-size: 32rpx;
+				padding-top: 10rpx;
+			}
+	
+			text:last-child {
+				font-size: 26rpx;
+				color: #999;
+				font-weight: 400;
+				padding-bottom: 10rpx;
+			}
+		}
+	
+		.item-data {
+			display: flex;
+			align-items: center;
+			width: 30%;
+			justify-content: space-between;
+			margin-right: 20rpx;
+	
+		}
+	}
+	
+	.cart:last-child {
+		border: none;
+	}
 </style>