index.vue 4.42 KB
Newer Older
张成 committed
1 2 3 4 5
<template>
	<div>
		<u-popup :show="show" :round="10" closeable mode="bottom" @close="close">
			<div class="order_flow">
				<div class="code">取单码 {{ orderInfo.orderNum }}</div>
1  
weijiguang committed
6 7 8 9 10
				<!-- <image mode="scaleToFill" :src="qrCode" class="qr_code"></image> -->
				<div class="qr_code">
					<image mode="scaleToFill" :src="qrCode" class="qr"></image>
					<view class="status_text">{{ orderStatusText }}</view>
				</div>
张成 committed
11
				<div class="flow_describe">
1  
weijiguang committed
12 13
					<h3>扫码流程</h3>
					<image :mode="'aspectFit'" width="600px" class="flow_img" src="/static/imgs/order_flow.png"></image>
张成 committed
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
				</div>
				<div class="flow_describe">
					<h3>注意事项</h3>
					<view class="text">
						<view>*热饮温度高,推荐使用纸吸管,纸吸管体验更佳。拿到后请小心饮用,吸入时请注意烫口喔</view>
						<view>*冷饮如选择冰块分装,冰块分装后饮品将不满杯,敬请谅解。</view>
						<view>*冷饮去冰如选择椰椰雪糕,默认分装椰椰雪糕,敬请谅解</view>
					</view>
				</div>
			</div>
		</u-popup>
	</div>
</template>

<script>
export default {
	data() {
		return {
			orderInfo: {},
			qrCode: '',
			show: false,
1  
weijiguang committed
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
		}
	},
	computed: {
		// 0 创建未校验 
		// 1 未支付 
		// 2 已支付 
		// 3 支付制作中 
		// 4 制作完成未取 
		// 5 取餐中 
		// 6 正常完成 
		// 7 待取超时 
		// 8 未支付取消 
		// 9 支付后制作前取消 
		// 10 制作中取消 
		// 11 制作完成取消 
		// 12 退款中
		// 13 退款失败
		// 14 部分退款 
		// 15 已退款 
		// 50 其他人工干预状态
		showMask() {
			return ['2', '3'].indexOf(this.orderInfo.state) != -1
		},
		orderStatusText() {
			switch (this.orderInfo.state) {
				case '2':
					return '已支付'
				case '3':
					return '等待中'
				default:
					return ''
			}
张成 committed
67 68 69
		}
	},
	onLoad() {
1  
weijiguang committed
70
		
张成 committed
71 72 73
	},
	methods: {
		close() {
1  
weijiguang committed
74
			this.show = false;
张成 committed
75 76
		},
		open(data, path) {
1  
weijiguang committed
77
			this.show = true;
张成 committed
78
			this.orderInfo = data;
1  
weijiguang committed
79
			// console.log("order:"+JSON.stringify(this.orderInfo));
1  
weijiguang committed
80 81 82 83 84 85
			
			if(this.showMask) {
				this.qrCode = '/static/imgs/noQr.png';
			} else {
				this.qrCode = path;
			}
张成 committed
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
		},
		jsonParse(json) {
			return JSON.parse(json)
		},
	}
}
</script>

<style lang="scss" scoped>
.pages {
	padding-top: 1rpx;
	padding-bottom: 30rpx;
}

.text {
	font-size: 20rpx;
	font-family: PingFangSC-Regular, PingFang SC;
	font-weight: 400;
	color: #333333;
	line-height: 30rpx;
}

.order_status {
	width: 686rpx;
	height: 174rpx;
	background: #FFFFFF;
	border-radius: 10rpx;
	margin: 32rpx auto 0;
	padding: 14px;

	.status_text {
		font-size: 32rpx;
		font-family: PingFangSC-Semibold, PingFang SC;
		font-weight: 600;
		color: #000000;
		text-align: center;
	}

	.btns {
		text-align: center;
		display: flex;
		align-items: center;
		justify-content: center;


	}

	.btn {
		width: 160rpx;
		height: 52rpx;
		background: #006ECF;
		border-radius: 6rpx;
		display: inline-block;
		margin: 20rpx;
		padding: 0;
		line-height: 52rpx;
		font-family: PingFangSC-Medium, PingFang SC;
		font-weight: 500;
		color: #FFFFFF;
		font-size: 20rpx;
		text-align: center;


	}
}

.order_flow {
	background: #FFFFFF;
	border-radius: 10rpx;
	margin-top: 32rpx;
	padding-top: 65rpx;

	.code {
		font-size: 36rpx;
		font-family: PingFangSC-Semibold, PingFang SC;
		font-weight: 600;
		color: #000000;
		text-align: center;

	}
1  
weijiguang committed
166
	
张成 committed
167
	.qr_code {
1  
weijiguang committed
168 169
		width: 508rpx;
		height: 510rpx;
张成 committed
170 171 172
		display: block;
		margin: 25rpx auto;
		background-color: #ccc;
1  
weijiguang committed
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
		position: relative;
	
		.status_text {
			font-size: 48rpx;
			font-family: PingFangSC-Semibold, PingFang SC;
			font-weight: 600;
			color: #FFFFFF;
			line-height: 66rpx;
			position: absolute;
			top: 50%;
			left: 50%;
			transform: translate(-50%, -50%);
		}
	
		.qr {
			width: 100%;
			height: 100%;
		}
张成 committed
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234
	}

	.flow_describe {
		width: 686rpx;
		background: #FFFFFF;
		box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(166, 166, 166, 0.5);
		border-radius: 10rpx;
		margin: 0 auto;
		padding: 30rpx;



		h3 {
			font-size: 28rpx;
			font-family: PingFangSC-Semibold, PingFang SC;
			font-weight: 600;
			color: #000000;
		}

		.flow_img {
			width: 600rpx;
			height: 214rpx;
			display: block;
			margin: 24rpx auto;
		}
	}
}

.customer_service {
	height: 90rpx;
	line-height: 90rpx;
	background: #FFFFFF;
	border-radius: 10rpx;
	font-size: 28rpx;
	font-family: PingFangSC-Medium, PingFang SC;
	font-weight: 500;
	color: #000000;
	padding: 0 64rpx;
	margin: 32rpx 0;

	display: flex;
	justify-content: space-between;
}
</style>