Sfoglia il codice sorgente

修改核销完成

1004749546@qq.com 4 anni fa
parent
commit
702da059e1
3 ha cambiato i file con 28 aggiunte e 15 eliminazioni
  1. 21 12
      pages/checkOut/checkFinish.vue
  2. 5 1
      pages/checkOut/checkOut.vue
  3. 2 2
      pages/toOrder/payFinish.vue

+ 21 - 12
pages/checkOut/checkFinish.vue

@@ -1,12 +1,17 @@
 <template>
 	<view class="page-cont">
 		<view class="icon-cont">
-			<u-icon class="icon" name="checkmark" color="#62c500" size="80"></u-icon>
+			<u-icon class="icon" name="checkmark" color="#fff" size="80"></u-icon>
 			<view>支付成功</view>
-			<view>150 乐豆</view>
+			<view class="num-cont">
+				<view>
+					{{payNum}}
+				</view>
+				<u-image mode="scaleToFill" width="40rpx" height="40rpx" src="/static/ledou.png"></u-image>
+			</view>
 		</view>
 		<view class="back-btn">
-			<u-button @click="toHome">返回首页</u-button>
+			<u-button :custom-style="btnStyle" @click="toHome">返回首页</u-button>
 		</view>
 	</view>
 </template>
@@ -15,20 +20,18 @@
 export default {
 	data() {
 		return {
-			orderId: '' //订单id
+			btnStyle: {
+				backgroundColor: '#07c160',
+				color:'#fff'
+			},
+			payNum: 0 //支付乐豆数
 		}
 	},
 	onLoad(option) {
 		console.log(option,'option')
-		this.orderId = option.id
+		this.payNum = option.num
 	},
 	methods: {
-		// 查看订单详情
-		toOrderDetail() {
-			uni.navigateTo({
-			    url: '/pages/order/orderDetail?id=' + this.orderId
-			})
-		},
 		// 返回首页
 		toHome() {
 			uni.reLaunch({
@@ -55,6 +58,12 @@ export default {
 			flex-direction: column;
 			align-items: center;
 			justify-content: center;
+			.num-cont{
+				display: flex;
+				color: red;
+				font-size: 36upx;
+				font-weight: 600;
+			}
 			>view{
 				font-size: 30upx;
 				margin-top: 40upx;
@@ -63,7 +72,7 @@ export default {
 		.icon{
 			width: 120upx;
 			height: 120upx;
-			background-color: #d1d1d1;
+			background-color: #07c160;
 			display: flex;
 			justify-content: center;
 			border-radius: 50%;

+ 5 - 1
pages/checkOut/checkOut.vue

@@ -154,7 +154,11 @@
 				sellerReceive(data).then(res => {
 					console.log(res)
 					if(res.status == 200){
-						uni.navigateBack()
+						uni.navigateTo({
+							url: '/pages/checkOut/checkFinish?num='+this.number
+						})
+						
+					} else {
 						uni.showToast({
 							icon: 'none',
 							title: res.message

+ 2 - 2
pages/toOrder/payFinish.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="page-cont">
 		<view class="icon-cont">
-			<u-icon class="icon" name="checkmark" color="#62c500" size="80"></u-icon>
+			<u-icon class="icon" name="checkmark" color="#fff" size="80"></u-icon>
 			<view>支付成功</view>
 		</view>
 		<u-button @click="toOrderDetail" type="primary">查看订单详情</u-button>
@@ -63,7 +63,7 @@ export default {
 		.icon{
 			width: 120upx;
 			height: 120upx;
-			background-color: #d1d1d1;
+			background-color: #07c160;
 			display: flex;
 			justify-content: center;
 			border-radius: 50%;