宇宙无敌M1处理器的MacBook Pro 4 lat temu
rodzic
commit
582c8078d0

+ 2 - 1
components/page-component/app-attr/app-attr.vue

@@ -807,7 +807,8 @@
 					this.$emit('pay', this.number);
 					this.$emit('pay', this.number);
 					return;
 					return;
 				}
 				}
-				if (this.buyClick) {
+				if (this.buyClick) {
+					// this.buy()
 					this.display = 'none';
 					this.display = 'none';
 					this.selectAttr.number = this.number;
 					this.selectAttr.number = this.number;
 					this.selectAttr.service_label = this.service_label
 					this.selectAttr.service_label = this.service_label

+ 457 - 363
plugins/advance/components/detail-bottom-button.vue

@@ -1,370 +1,464 @@
-<template>
-	<view class="detail-bottom-button">
-		<view class="dir-left-nowrap" v-if="active">
-			<view class="but" @click="route_jump">
-				<app-form-id>
-					<view  class="but dir-top-nowrap main-left cross-center border-left">
-						<image class="icon" src="/static/image/icon/index.png"></image>
-						<text class="text">首页</text>
-					</view>
-				</app-form-id>
-			</view>
-			<view class="but" @click="set_favorite(favorite)">
-				<app-form-id>
-					<view  class="but dir-top-nowrap main-left cross-center" >
-						<image class="icon" :src="favorite ? '/static/image/icon/icon-favorite-active.png' : '/static/image/icon/icon-favorite.png'"></image>
-						<text  class="text">收藏</text>
-					</view>
-				</app-form-id>
-			</view>
-            <view class="buttons dir-left-nowrap" v-if="detail.goods_num == 0">
-                <view class="dir-top-nowrap main-center cross-center" style="background-color: #CDCDCD;color: #fff;width: 100%;">
-                    <text>已售罄</text>
-                </view>
-            </view>
-			<view v-else class="buttons dir-left-nowrap">
-				<view class="advance-title dir-top-nowrap main-center cross-center" :class="theme === 'b' || theme === 'a' || theme === 'f' ? theme+ '-s-back ' + 'text ' + theme : theme+ '-s-back ' + theme+ '-m-text ' + theme">
-					<text>预售截止</text>
-					<text>{{getDate(end_prepayment_at)}}</text>
-				</view>
-				<view class="pay" :class="theme+ '-m-back ' + theme" @click="set_active">
-					<app-form-id>
-						<text>
-							支付定金
-						</text>
-					</app-form-id>
-				</view>
-			</view>
-		</view>
-		<view  v-if="!active" class="dir-left-nowrap">
-			<view class="title dir-top-nowrap main-center cross-center" :class="theme === 'b' || theme === 'a' || theme === 'f' ? theme+ '-s-back ' + 'text ' + theme : theme+ '-s-back ' + theme+ '-m-text ' + theme">
-				<text>预售截止</text>
-				<text>{{getDate(end_prepayment_at)}}</text>
-			</view>
-			<view class="pay" :class="[theme+ '-m-back ' + theme, buttonDisabled ? 'dis-button' : '']" @click="pay">
-				<text>
-					支付定金
-				</text>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-    export default {
-        name: "detail-bottom-button",
-	    data() {
-            return {
-                request_time: false,
-	            once_pay: false,
-            }
-	    },
-	    props: {
-            end_prepayment_at: String,
-            active: Boolean,
-            favorite: Boolean,
-            goods_id: Number,
-            detail: Object,
-            num: Number,
-			theme: String,
-			buttonDisabled: Boolean
-	    },
-	    methods: {
-            set_active() {
-				if (this.$user.isLogin() && this.$store.state.user.info) {
-				    let  member_level =this.$store.state.user.info.identity.member_level;
-					if(member_level<this.detail.member_level){
-						uni.showModal({
-							title:"提示",
-							content:"需达到"+this.detail.member_name+"会员才可购买",
-							showCancel:true,
-							buttonText: '升级',
-							success:(res)=>{
-								if (res.confirm) {
-								  uni.navigateTo({
-								  	// url:"/pages/member/index/index",
-									url: '/pages/member/upgrade/upgrade?level=' + member_level + '&other=' + this.detail.member_level
-								  })
-								} else if (res.cancel) {
-								  console.log('用户点击取消');
+<template>
+	<view class="detail-bottom-button">
+		<view class="dir-left-nowrap" v-if="active">
+			<view class="but" @click="route_jump">
+				<app-form-id>
+					<view class="but dir-top-nowrap main-left cross-center border-left">
+						<image class="icon" src="/static/image/icon/index.png"></image>
+						<text class="text">首页</text>
+					</view>
+				</app-form-id>
+			</view>
+			<view class="but" @click="set_favorite(favorite)">
+				<app-form-id>
+					<view class="but dir-top-nowrap main-left cross-center">
+						<image class="icon"
+							:src="favorite ? '/static/image/icon/icon-favorite-active.png' : '/static/image/icon/icon-favorite.png'">
+						</image>
+						<text class="text">收藏</text>
+					</view>
+				</app-form-id>
+			</view>
+			<view class="buttons dir-left-nowrap" v-if="detail.goods_num == 0">
+				<view class="dir-top-nowrap main-center cross-center"
+					style="background-color: #CDCDCD;color: #fff;width: 100%;">
+					<text>已售罄</text>
+				</view>
+			</view>
+			<view v-else class="buttons dir-left-nowrap">
+				<view class="advance-title dir-top-nowrap main-center cross-center"
+					:class="theme === 'b' || theme === 'a' || theme === 'f' ? theme+ '-s-back ' + 'text ' + theme : theme+ '-s-back ' + theme+ '-m-text ' + theme">
+					<text>预售截止</text>
+					<text>{{getDate(end_prepayment_at)}}</text>
+				</view>
+				<view class="pay" :class="theme+ '-m-back ' + theme" @click="set_active">
+					<app-form-id>
+						<text>
+							支付定金
+						</text>
+					</app-form-id>
+				</view>
+			</view>
+		</view>
+		<view v-if="!active" class="dir-left-nowrap">
+			<view class="title dir-top-nowrap main-center cross-center"
+				:class="theme === 'b' || theme === 'a' || theme === 'f' ? theme+ '-s-back ' + 'text ' + theme : theme+ '-s-back ' + theme+ '-m-text ' + theme">
+				<text>预售截止</text>
+				<text>{{getDate(end_prepayment_at)}}</text>
+			</view>
+			<view class="pay" :class="[theme+ '-m-back ' + theme, buttonDisabled ? 'dis-button' : '']" @click="pay">
+				<text>
+					支付定金
+				</text>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "detail-bottom-button",
+		data() {
+			return {
+				request_time: false,
+				once_pay: false,
+			}
+		},
+		props: {
+			end_prepayment_at: String,
+			active: Boolean,
+			favorite: Boolean,
+			goods_id: Number,
+			detail: Object,
+			num: Number,
+			theme: String,
+			buttonDisabled: Boolean,
+			service_label: Object
+		},
+		methods: {
+			set_active() {
+				if (this.$user.isLogin() && this.$store.state.user.info) {
+					let member_level = this.$store.state.user.info.identity.member_level;
+					if (member_level < this.detail.member_level) {
+						uni.showModal({
+							title: "提示",
+							content: "需达到" + this.detail.member_name + "会员才可购买",
+							showCancel: true,
+							buttonText: '升级',
+							success: (res) => {
+								if (res.confirm) {
+									uni.navigateTo({
+										// url:"/pages/member/index/index",
+										url: '/pages/member/upgrade/upgrade?level=' + member_level +
+											'&other=' + this.detail.member_level
+									})
+								} else if (res.cancel) {
+									console.log('用户点击取消');
+								}
+
+							}
+						})
+						return;
+					}
+
+				}
+				if (this.$user.isLogin() && !this.once_pay) {
+					this.$emit('close_attr', false);
+				} else if (!this.$user.isLogin()) {
+					this.$user.getInfo().then(() => {}).catch(() => {});
+				}
+			},
+			set_favorite(data) {
+				if (data) {
+					this.$request({
+						url: this.$api.user.favorite_remove,
+						data: {
+							goods_id: this.goods_id,
+						}
+					}).then(res => {
+						if (res.code === 0) {
+							this.$emit('favorite', !this.favorite);
+						} else {
+							uni.showModal({
+								title: '提示',
+								content: res.msg
+							})
+						}
+					})
+				} else {
+					this.$request({
+						url: this.$api.user.favorite_add,
+						data: {
+							goods_id: this.goods_id,
+						}
+					}).then(res => {
+						if (res.code === 0) {
+							this.$emit('favorite', !this.favorite);
+						} else {
+							uni.showModal({
+								title: '提示',
+								content: res.msg
+							})
+						}
+					})
+				}
+			},
+			route_jump() {
+				uni.navigateTo({
+					url: `/pages/index/index`,
+				});
+			},
+			submit(body) {
+				this.once_pay = true;
+				uni.showLoading({
+					title: '生成订单中...',
+					mask: true,
+				});
+				this.$emit('close_attr', true);
+				this.get_submit(body).then(response => {
+					this.get_token(response.data);
+				});
+			},
+			pay() {
+				console.log(this.detail, "========-----------")
+				if (this.buttonDisabled) return;
+				if (this.service_label == null) {
+					uni.showModal({
+						title: "温馨提示",
+						content: "您购买碎屏险了吗 ?",
+						showCancel: true,
+						confirmText: '去购买',
+						success: (res) => {
+							if (res.confirm) {
+								return
+							} else if (res.cancel) {
+								if (this.$user.isLogin() && this.$store.state.user.info) {
+									let member_level = this.$store.state.user.info.identity.member_level;
+									if (member_level < this.detail.member_level) {
+										uni.showModal({
+											title: "提示",
+											content: "需达到" + this.detail.member_name + "会员才可购买",
+											showCancel: true,
+											buttonText: '升级',
+											success: (res) => {
+												if (res.confirm) {
+													uni.navigateTo({
+														// url:"/pages/member/index/index",
+														url: '/pages/member/upgrade/upgrade?level=' +
+															member_level +
+															'&other=' + this.detail
+															.member_level
+													})
+												} else if (res.cancel) {
+													console.log('用户点击取消');
+												}
+											}
+										})
+										return;
+									}
+								}
+								let body = {
+									goods_id: this.detail.id,
+									goods_attr_id: 0,
+									goods_num: `${this.num}`,
+									advance_goods_id: this.detail.advanceGoods.id,
+									service_label: JSON.stringify(this.service_label)
+								};
+								let attr = ``;
+								let attr_groups = this.detail.attr_groups;
+								for (let i = 0; i < attr_groups.length; i++) {
+									let attr_list = attr_groups[i];
+									for (let j = 0; j < attr_list.attr_list.length; j++) {
+										if (attr_list.attr_list[j].active) {
+											attr += `:${attr_list.attr_list[j].attr_id}`
+										}
+									}
+								}
+								for (let i = 0; i < this.detail.attr.length; i++) {
+									if (this.detail.attr[i].sign_id === attr.substring(1)) {
+										if (this.num > this.detail.attr[i].stock) {
+											uni.showToast({
+												title: '库存不足',
+												icon: 'none'
+											});
+											return;
+										}
+										body.goods_attr_id = this.detail.attr[i].id;
+									}
+								}
+								this.$subscribe(this.detail.template_message).then(() => {
+									this.submit(body);
+								}).catch(() => {
+									this.submit(body);
+								});
+							}
+
+						}
+					})
+				}else{
+					if (this.$user.isLogin() && this.$store.state.user.info) {
+						let member_level = this.$store.state.user.info.identity.member_level;
+						if (member_level < this.detail.member_level) {
+							uni.showModal({
+								title: "提示",
+								content: "需达到" + this.detail.member_name + "会员才可购买",
+								showCancel: true,
+								buttonText: '升级',
+								success: (res) => {
+									if (res.confirm) {
+										uni.navigateTo({
+											// url:"/pages/member/index/index",
+											url: '/pages/member/upgrade/upgrade?level=' +
+												member_level +
+												'&other=' + this.detail
+												.member_level
+										})
+									} else if (res.cancel) {
+										console.log('用户点击取消');
+									}
 								}
 								}
-				
-							}
-						})
-						return;
+							})
+							return;
+						}
 					}
 					}
-					
-				}
-                if (this.$user.isLogin() && !this.once_pay) {
-                    this.$emit('close_attr', false);
-                } else if (!this.$user.isLogin()) {
-                    this.$user.getInfo().then(() => {
-                    }).catch(() => {
-                    });
-                }
-            },
-            set_favorite(data) {
-                if (data) {
-                    this.$request({
-	                    url: this.$api.user.favorite_remove,
-	                    data: {
-                            goods_id: this.goods_id,
-	                    }
-                    }).then(res => {
-                        if (res.code === 0) {
-                            this.$emit('favorite', !this.favorite);
-                        } else {
-                            uni.showModal({
-                                title: '提示',
-                                content: res.msg
-                            })
-                        }
-                    })
-                } else {
-                    this.$request({
-                        url: this.$api.user.favorite_add,
-                        data: {
-                            goods_id: this.goods_id,
-                        }
-                    }).then(res => {
-                        if (res.code === 0) {
-                            this.$emit('favorite', !this.favorite);
-                        } else {
-                            uni.showModal({
-                                title: '提示',
-                                content: res.msg
-                            })
-                        }
-                    })
-                }
-            },
-            route_jump() {
-                uni.navigateTo({
-	                url: `/pages/index/index`,
-                });
-            },
-			submit(body) {
-				this.once_pay = true;
-				uni.showLoading({
-					title: '生成订单中...',
-					mask: true,
-				});
-				this.$emit('close_attr', true);
-				this.get_submit(body).then(response => {
-					this.get_token(response.data);
-				});
-			},
-            pay() {
-				console.log("hahhaa")
-            	if (this.buttonDisabled) return;
-			if (this.$user.isLogin() && this.$store.state.user.info) {
-			    let  member_level =this.$store.state.user.info.identity.member_level;
-				if(member_level<this.detail.member_level){
-					uni.showModal({
-						title:"提示",
-						content:"需达到"+this.detail.member_name+"会员才可购买",
-						showCancel:true,
-						buttonText: '升级',
-						success:(res)=>{
-							if (res.confirm) {
-							  uni.navigateTo({
-							  	// url:"/pages/member/index/index",
-								url: '/pages/member/upgrade/upgrade?level=' + member_level + '&other=' + this.detail.member_level
-							  })
-							} else if (res.cancel) {
-							  console.log('用户点击取消');
+					let body = {
+						goods_id: this.detail.id,
+						goods_attr_id: 0,
+						goods_num: `${this.num}`,
+						advance_goods_id: this.detail.advanceGoods.id,
+						service_label: JSON.stringify(this.service_label)
+					};
+					let attr = ``;
+					let attr_groups = this.detail.attr_groups;
+					for (let i = 0; i < attr_groups.length; i++) {
+						let attr_list = attr_groups[i];
+						for (let j = 0; j < attr_list.attr_list.length; j++) {
+							if (attr_list.attr_list[j].active) {
+								attr += `:${attr_list.attr_list[j].attr_id}`
 							}
 							}
-			
-						}
-					})
-					return;
-				}
-				
-			}
-				let body = {
-					goods_id: this.detail.id,
-					goods_attr_id: 0,
-					goods_num: `${this.num}`,
-					advance_goods_id: this.detail.advanceGoods.id,
-				};
-				let attr = ``;
-				let attr_groups = this.detail.attr_groups;
-				for (let i = 0; i < attr_groups.length; i++) {
-					let attr_list = attr_groups[i];
-					for (let j = 0; j < attr_list.attr_list.length; j++) {
-						if (attr_list.attr_list[j].active) {
-							attr += `:${attr_list.attr_list[j].attr_id}`
 						}
 						}
 					}
 					}
-				}
-				for (let i = 0; i < this.detail.attr.length; i++) {
-					if (this.detail.attr[i].sign_id === attr.substring(1)) {
-						if (this.num > this.detail.attr[i].stock) {
-							uni.showToast({
-								title: '库存不足',
-								icon: 'none'
-							});
-							return;
+					for (let i = 0; i < this.detail.attr.length; i++) {
+						if (this.detail.attr[i].sign_id === attr.substring(1)) {
+							if (this.num > this.detail.attr[i].stock) {
+								uni.showToast({
+									title: '库存不足',
+									icon: 'none'
+								});
+								return;
+							}
+							body.goods_attr_id = this.detail.attr[i].id;
 						}
 						}
-						body.goods_attr_id = this.detail.attr[i].id;
 					}
 					}
-				}
-				this.$subscribe(this.detail.template_message).then(() => {
-					this.submit(body);
-				}).catch(() => {
-					this.submit(body);
-				});
-            },
-		    get_token(data) {
-                this.$request({
-	                url: this.$api.advance.pay_data,
-	                method: 'post',
-	                data: {
-	                    ...data
-	                },
-                }).then(response => {
-                    if (response.code === 0) {
-                        if (response.data.hasOwnProperty('id')) {
-                            uni.hideLoading();
-                            this.$payment.pay(response.data.id).then(() => {
-                                this.once_pay = false;
-                                // 支付成功
-                                uni.navigateTo({
-                                    url: `/plugins/advance/order/order`
-                                })
-                            }).catch(() => {
-                                // 支付失败
-                                this.once_pay = false;
-                                uni.navigateTo({
-                                    url: `/plugins/advance/order/order`
-                                })
-                            });
-                        } else {
-                             setTimeout(() => {
-                                this.get_token(data);
-                            }, 1000);
-                        }
-                    } else {
-                        uni.hideLoading();
-                        uni.showModal({
-	                        title: '提示',
-	                        content: response.msg,
-                        })
-                    }
-                });
-		    },
-		    async get_submit(body) {
-                const response = await this.$request({
-                    url: this.$api.advance.order_submit,
-                    method: 'post',
-                    data: {
-                        ...body,
-                    }
-                });
-                if (response.code === 0) {
-                    return response;
-                } else if (response.code === 1) {
-                    uni.showModal({
-	                    title: '提示',
-	                    content: response.msg,
-                        success(res){
-                            if(res.cancel){
-                                this.$emit('request', this.goods_id);
-                            }else if(res.confirm){
-                               uni.navigateBack();
-                            }
-                        }
-                    });
-                }
-		    },
-            getDate(end_prepayment_at) {
-                let newDate = new Date(end_prepayment_at.replace(/-/g, '/'));
-                newDate.setDate(newDate.getDate());
-                let month = newDate.getMonth() + 1;
-                let day = newDate.getDate();
-                let mm = "'" + month + "'";
-                let dd = "'" + day + "'";
-                if(mm.length == 3) {
-                    month = "0" + month;
-                }
-                if(dd.length == 3) {
-                    day = "0" + day;
-                }
-                let hour = newDate.getHours();//得到小时
-                let minu = newDate.getMinutes();//得到分钟
-                let sec = newDate.getSeconds();//得到秒
-                sec = `${sec}`;
-                minu = `${minu}`;
-                hour = `${hour}`;
-                if (hour.length === 1) {
-                    hour = `0${hour}`
-                }
-                if (minu.length === 1) {
-                    minu = `0${minu}`
-                }
-                if (sec.length === 1) {
-                    sec = `0${sec}`
-                }
-                return newDate.getFullYear() + "." + month + "." + day + ' ' + hour +':' + minu + ':' + sec;
-            },
-	    },
-    }
-</script>
-
-<style scoped lang="scss">
-	.detail-bottom-button {
-		height: #{110rpx};
-		width: #{750rpx};
-		border-top: #{1rpx} solid #e3e3e3;
-		.dir-left-nowrap {
-			view {
-				height: #{110rpx};
-			}
-			.but {
-				width: #{105rpx};
-				.text {
-					font-size: #{20rpx};
-					color: #707070;
-					margin-top: #{9rpx};
-				}
-			}
-			.border-left {
-				border-right: #{1rpx} solid #e3e3e3;
-			}
-			.buttons {
-				width: #{272+272rpx};
-			}
-			.title {
-				width: 50%;
-				height: #{110rpx};
-				font-size: #{24rpx};
-				margin: 0;
-			}
-			.pay {
-				width: 50%;
-				height: #{110rpx};
-				line-height: #{110rpx};
-				text-align: center;
-				color: #ffffff;
-				font-size: #{28rpx};
-			}
-		}
-		.icon {
-			width: #{40rpx};
-			height: #{40rpx};
-			margin-top: #{21rpx};
-		}
-		.text {
-			color: #ffffff;
-		}
-	}
-	.advance-title {
-		width: 50%;
-		height: #{110rpx};
-		font-size: #{24rpx};
-		margin: 0;
-	}
-	.dis-button {
-		background-color: #dddddd;
-	}
-</style>
+					this.$subscribe(this.detail.template_message).then(() => {
+						this.submit(body);
+					}).catch(() => {
+						this.submit(body);
+					});
+				}
+
+			},
+			get_token(data) {
+				this.$request({
+					url: this.$api.advance.pay_data,
+					method: 'post',
+					data: {
+						...data
+					},
+				}).then(response => {
+					if (response.code === 0) {
+						if (response.data.hasOwnProperty('id')) {
+							uni.hideLoading();
+							this.$payment.pay(response.data.id).then(() => {
+								this.once_pay = false;
+								// 支付成功
+								uni.navigateTo({
+									url: `/plugins/advance/order/order`
+								})
+							}).catch(() => {
+								// 支付失败
+								this.once_pay = false;
+								uni.navigateTo({
+									url: `/plugins/advance/order/order`
+								})
+							});
+						} else {
+							setTimeout(() => {
+								this.get_token(data);
+							}, 1000);
+						}
+					} else {
+						uni.hideLoading();
+						uni.showModal({
+							title: '提示',
+							content: response.msg,
+						})
+					}
+				});
+			},
+			async get_submit(body) {
+				const response = await this.$request({
+					url: this.$api.advance.order_submit,
+					method: 'post',
+					data: {
+						...body,
+					}
+				});
+				if (response.code === 0) {
+					return response;
+				} else if (response.code === 1) {
+					uni.showModal({
+						title: '提示',
+						content: response.msg,
+						success(res) {
+							if (res.cancel) {
+								this.$emit('request', this.goods_id);
+							} else if (res.confirm) {
+								uni.navigateBack();
+							}
+						}
+					});
+				}
+			},
+			getDate(end_prepayment_at) {
+				let newDate = new Date(end_prepayment_at.replace(/-/g, '/'));
+				newDate.setDate(newDate.getDate());
+				let month = newDate.getMonth() + 1;
+				let day = newDate.getDate();
+				let mm = "'" + month + "'";
+				let dd = "'" + day + "'";
+				if (mm.length == 3) {
+					month = "0" + month;
+				}
+				if (dd.length == 3) {
+					day = "0" + day;
+				}
+				let hour = newDate.getHours(); //得到小时
+				let minu = newDate.getMinutes(); //得到分钟
+				let sec = newDate.getSeconds(); //得到秒
+				sec = `${sec}`;
+				minu = `${minu}`;
+				hour = `${hour}`;
+				if (hour.length === 1) {
+					hour = `0${hour}`
+				}
+				if (minu.length === 1) {
+					minu = `0${minu}`
+				}
+				if (sec.length === 1) {
+					sec = `0${sec}`
+				}
+				return newDate.getFullYear() + "." + month + "." + day + ' ' + hour + ':' + minu + ':' + sec;
+			},
+		},
+	}
+</script>
+
+<style scoped lang="scss">
+	.detail-bottom-button {
+		height: #{110rpx};
+		width: #{750rpx};
+		border-top: #{1rpx} solid #e3e3e3;
+
+		.dir-left-nowrap {
+			view {
+				height: #{110rpx};
+			}
+
+			.but {
+				width: #{105rpx};
+
+				.text {
+					font-size: #{20rpx};
+					color: #707070;
+					margin-top: #{9rpx};
+				}
+			}
+
+			.border-left {
+				border-right: #{1rpx} solid #e3e3e3;
+			}
+
+			.buttons {
+				width: #{272+272rpx};
+			}
+
+			.title {
+				width: 50%;
+				height: #{110rpx};
+				font-size: #{24rpx};
+				margin: 0;
+			}
+
+			.pay {
+				width: 50%;
+				height: #{110rpx};
+				line-height: #{110rpx};
+				text-align: center;
+				color: #ffffff;
+				font-size: #{28rpx};
+			}
+		}
+
+		.icon {
+			width: #{40rpx};
+			height: #{40rpx};
+			margin-top: #{21rpx};
+		}
+
+		.text {
+			color: #ffffff;
+		}
+	}
+
+	.advance-title {
+		width: 50%;
+		height: #{110rpx};
+		font-size: #{24rpx};
+		margin: 0;
+	}
+
+	.dis-button {
+		background-color: #dddddd;
+	}
+</style>

+ 1 - 0
plugins/advance/detail/detail.vue

@@ -148,6 +148,7 @@
                     v-bind:buttonDisabled="buttonDisabled"
                     v-bind:buttonDisabled="buttonDisabled"
                     v-bind:end_prepayment_at="detail.advanceGoods.end_prepayment_at"
                     v-bind:end_prepayment_at="detail.advanceGoods.end_prepayment_at"
                     @request="request_detail"
                     @request="request_detail"
+					v-bind:service_label="attrGoods.select.service_label"
                 ></detail-bottom-button>
                 ></detail-bottom-button>
 			</view>
 			</view>
             <app-close v-if="showClose" :modal="false" @update="getMall"></app-close>
             <app-close v-if="showClose" :modal="false" @update="getMall"></app-close>

+ 898 - 844
plugins/advance/order/order.vue

@@ -1,844 +1,898 @@
-<template>
-  <app-layout>
-	  <view class="order">
-		  <view  class="top dir-left-nowrap main-between cross-center">
-			  <view class="top-input cross-center" @click="go_search()" v-if="!search">
-				  <view class="input main-center cross-center">
-					 <image src="/static/image/icon/icon-search.png"></image>
-					  <text>搜索</text>
-				  </view>
-			  </view>
-			  <view class="to-top dir-left-nowrap main-center cross-center" v-if="!search" @click="active = true">
-				  <text :class="getTheme + '-m-text ' + getTheme">{{active_item}}</text>
-				  <image v-if="!active" :class="getTheme + '-m-back ' + getTheme" class="icon" src="../image/open.png"></image>
-				  <image v-else class="icon icon-active" :class="getTheme + '-m-back ' + getTheme" src="../image/open.png"></image>
-			  </view>
-			  <view class="search dir-left-nowrap cross-center main-between" v-if="search">
-				  <input type="text" class="input" :focus="true" v-model="search_text" @blur="blur_request" @confirm="set_search">
-				  <image class="delete" v-show="search_text.length>0" @click="empyt_search" src="../image/delete.png"></image>
-				  <text style="color:#666666;font-size: 32rpx;" @click="set_search">搜索</text>
-			  </view>
-		  </view>
-		  <view class="do-top" v-if="active" @click.stop="active = false">
-			  <view class="do-top-item"
-			        v-for="(item, index) in select_list"
-			        :key="index"
-			        :class="item.active ? getTheme + '-m-text ' + getTheme : 'default-text'"
-			        @click="set_active(item)"
-			  >
-				  {{item.text}}
-			  </view>
-		  </view>
-		  <view style="margin-top: 108rpx;"></view>
-		  <view class="item"  v-for="(item, index) in order_list" :key="index">
-			  <view class="item-top dir-left-wrap main-between cross-center" >
-				  <text class="order-number" style="color: #999999;">订单号{{item.advance_no}}</text>
-                  <text>{{item.status_num | orderStatus}}</text>
-			  </view>
-			  <view class="item-center dir-left-nowrap" @click="route_go(item)">
-				  <image class="image" :src="item.goods.goodsWarehouse.cover_pic"></image>
-				  <view class="content">
-					  <view class="name">{{item.goods.goodsWarehouse.name}}</view>
-					  <view class="attr">
-						  <text>{{item.attr_name}}</text>
-					  </view>
-					  <view class="num-price dir-left-nowrap main-between cross-center">
-						  <text>×{{item.goods_num}}</text>
-						  <text>¥{{item.goodsAttr.price}}</text>
-					  </view>
-					  <view class="des-price dir-left-wrap main-right cross-center">
-						  <text>定金</text>
-						  <text :style="{color: item.is_pay == 0 ? '#ff4544' : '#353535'}">¥{{item.deposit}}</text>
-						  <text>抵¥{{item.swell_deposit}}</text>
-						  <text style="color: #ff4544;" v-if="item.status_num == 9">(定金不退)</text>
-					  </view>
-				  </view>
-			  </view>
-			  <view class="item-bottom">
-				  <view class="swell-price main-right cross-center" v-if="item.status_num == 2 || item.status_num == 3 || item.status_num == 4 || item.status_num == 9 ">
-					  <text>尾款</text>
-					  <text style="color: #ff4544;">¥{{item.tail_money}}</text>
-				  </view>
-                  <view v-if="item.status_num == 1" class="text-time">
-                      <text>距截止</text>
-                      <text style="color: #ff4544">{{item.html}}</text>
-                  </view>
-                  <view v-if="item.status_num == 3  && item.pay_limit != -1" class="text-time">
-                      <text>距截止</text>
-                      <text style="color: #ff4544">{{item.html}}</text>
-                  </view>
-				  <view class="filal-payment-time" v-if="item.status_num == 2">
-					  支付尾款时间:{{set_time(item.pay_limit, item.end_prepayment_at)}}
-				  </view>
-				  <view class="button" :class="getTheme + '-m-back ' + getTheme" @click="payFinalPayment(item)" v-if="item.status_num == 3 && item.order_id == 0">
-					  <app-form-id>
-						  <text>
-							  去支付尾款
-						  </text>
-					  </app-form-id>
-				  </view>
-				  <view class="button" :class="getTheme + '-m-back ' + getTheme" @click="payPayment(item, index)" v-else-if="item.status_num == 3 && item.order_id != 0 && item.pay_type != 2">
-					  <app-form-id>
-						  <text>
-							  付款
-						  </text>
-					  </app-form-id>
-				  </view>
-				  <view class="button" :class="getTheme + '-m-back ' + getTheme" @click="payDeposit(item, index)" v-else-if="item.status_num == 1">
-					  <app-form-id>
-						  <text>
-							  去支付定金
-						  </text>
-					  </app-form-id>
-				  </view>
-			  </view>
-		  </view>
-		  <view class="order-empty" v-if="order_list.length === 0">
-			 <image src="../image/order.png"></image>
-			  <text>没有任何订单哦~</text>
-		  </view>
-	  </view>
-  </app-layout>
-</template>
-
-<script>
-	import {mapGetters} from "vuex";
-
-	export default {
-		name: 'order',
-		data() {
-			return {
-			  active: false,
-			  active_item: '全部预定',
-			  select_list: [
-				{
-				  id: -1,
-				  active: true,
-				  text: '全部预定',
-				},
-				 {
-				   id: 1,
-				  active: false,
-				  text: '定金待支付',
-				},
-				 {
-				   id: 2,
-				  active: false,
-				  text: '尾款支付未开始',
-				},
-				 {
-				   id: 3,
-				  active: false,
-				  text: '尾款待支付',
-				},
-				 {
-				   id: 4,
-				  active: false,
-				  text: '购买成功',
-				},
-				 {
-				   id: 5,
-				  active: false,
-				  text: '购买失败',
-				}
-			  ],
-				order_list: [],
-				page: 1,
-				keyword: -1,
-				over: false,
-				interval: null,
-				search: false,
-				search_text: '',
-				oldOrder: [],
-				template_message: []
-			}
-		},
-		onShow() {
-			this.order_list = [];
-			this.page = 1;
-			this.request(1).then(() => {
-				this.get_time();
-			});
-		},
-		onHide() {
-			clearInterval(this.interval);
-		},
-		onUnload() {
-			clearInterval(this.interval);
-		},
-		methods: {
-			empyt_search() {
-				this.search = false;
-				this.search_text = '';
-				this.set_active({id: -1});
-				this.active_item = '全部预定';
-			},
-			set_active(data) {
-				clearInterval(this.interval);
-				this.order_list = [];
-				this.keyword = data.id;
-				this.over = false;
-				this.page = 1;
-				this.request().then(() => {
-					if (data.id === 1 || data.id === -1 || data.id === 3) this.get_time();
-				});
-				for (let i = 0; i < this.select_list.length; i++) {
-					if (this.select_list[i].id === data.id) {
-						this.select_list[i].active = true;
-					} else {
-						this.select_list[i].active = false;
-					}
-				  }
-				this.active = false;
-				this.active_item = data.text;
-			},
-			route_go(data) {
-				if (data.status_num == 4) {
-					uni.navigateTo({
-						url: `/pages/order/order-detail/order-detail?id=${data.order_id}&sign=advance`
-					})
-				}
-			},
-			// 支付尾款
-			payFinalPayment(item) {
-				let data = [
-					{
-						"mch_id": item.goods.mch_id,
-						"goods_list": [
-							{
-								"id":item.goods_id,
-								"attr": JSON.parse(item.goods_info).attr_list,
-								"num":item.goods_num,
-								"cat_id":0,
-								"goods_attr_id":item.goodsAttr.id,
-								"advance_id": item.id,
-							}
-						]
-					}
-				];
-				this.$jump({
-					open_type: 'navigate',
-					url: `/pages/order-submit/order-submit?mch_list=${JSON.stringify(data)}&preview_url=${encodeURIComponent(this.$api.advance.order_preview)}&submit_url=${encodeURIComponent(this.$api.advance.order_sub)}&order_page_url=/plugins/advance/order/order&plugin=advance&total_title=尾款`
-				});
-			},
-			payPayment(item, index) {
-				this.$request({
-					url: this.$api.order.list_pay_data,
-					data: {
-						id: item.order_id,
-					},
-					method: 'get'
-				}).then(res => {
-					if (res.code === 0) {
-						this.$payment.pay(res.data.id).then(() => {
-							// 支付成功
-							if (this.keyword === -1) {
-								this.order_list[index].status_num = '4';
-							} else {
-								this.$delete(this.order_list, index);
-							}
-						}).catch(() => {
-							// 支付失败
-						});
-					}
-				})
-			},
-			// 去支付定金
-			payDeposit(data, index) {
-				this.$subscribe(this.template_message).then(() => {
-					this.submit(data, index);
-				}).catch(() => {
-					this.submit(data, index);
-				});
-			},
-			submit(data, index) {
-				let body = {
-					id: data.id,
-					goods_id: data.goods_id,
-					goods_num: data.goods_num,
-					goods_attr_id:data.goodsAttr.id,
-				};
-				this.get_submit(body).then(response => {
-					this.$payment.pay(response.data.id).then((res) => {
-						this.$request({
-							url: this.$api.advance.order,
-							method: 'get',
-							data: {
-								id: data.id,
-							}
-						}).then(response => {
-							if (response.code === 0) {
-								this.$set(this.order_list, index, response.data.list[0]);
-								let attr_name = '';
-								let attr_groups = JSON.parse(this.order_list[index].goods_info);
-								for (let j = 0; j < attr_groups.attr_list.length; j++) {
-									attr_name+= ` ${attr_groups.attr_list[j].attr_group_name}:${attr_groups.attr_list[j].attr_name}`
-								}
-								this.$set(this.order_list[index], 'attr_name', attr_name);
-							} else if (response.code === 1) {
-								uni.showModal({
-									title: '提示',
-									content: res.msg,
-									success(res) {
-										if (res.cancel) {
-											uni.navigateBack();
-										} else if (res.confirm) {
-											uni.navigateBack();
-										}
-									}
-								})
-							}
-						});
-					}).catch(() => {
-					});
-				});
-			},
-			addDate(date, days) {
-				if(days == undefined || days == '') {
-					days = 1;
-				}
-				let newDate = new Date(date.replace(/-/g, '/'));
-				newDate.setDate(newDate.getDate() + days);
-				let month = newDate.getMonth() + 1;
-				let day = newDate.getDate();
-				let mm = "'" + month + "'";
-				let dd = "'" + day + "'";
-				if(mm.length == 3) {
-					month = "0" + month;
-				}
-				if(dd.length == 3) {
-					day = "0" + day;
-				}
-			   let hour = newDate.getHours();//得到小时
-			   let minu = newDate.getMinutes();//得到分钟
-			   let sec = newDate.getSeconds();//得到秒
-			   if (sec === 0) {
-				 sec = 59;
-				 if (minu === 0) {
-				   minu = 59;
-				   if (hour === 0) {
-					   hour = 23;
-					   day = '0' + Number(day) -1;
-				   } else {
-					   hour = hour -1;
-				   }
-				 } else {
-				   minu = minu - 1;
-				 }
-			   } else {
-				  sec = sec -1;
-			   }
-			   sec = `${sec}`;
-			   minu = `${minu}`;
-			   hour = `${hour}`;
-			   if (hour.length === 1) {
-				   hour = `0${hour}`
-			   }
-			   if (minu.length === 1) {
-				   minu = `0${minu}`
-			   }
-			   if (sec.length === 1) {
-				   sec = `0${sec}`
-			   }
-			   return newDate.getFullYear() + "." + month + "." + day + ' ' + hour +':' + minu + ':' + sec;
-			},
-			getDate(end_prepayment_at) {
-				let newDate = new Date(end_prepayment_at.replace(/-/g, '/'));
-				newDate.setDate(newDate.getDate());
-				let month = newDate.getMonth() + 1;
-				let day = newDate.getDate();
-				let mm = "'" + month + "'";
-				let dd = "'" + day + "'";
-				if(mm.length == 3) {
-					month = "0" + month;
-				}
-				if(dd.length == 3) {
-					day = "0" + day;
-				}
-				let hour = newDate.getHours();//得到小时
-				let minu = newDate.getMinutes();//得到分钟
-				let sec = newDate.getSeconds();//得到秒
-				sec = `${sec}`;
-				minu = `${minu}`;
-				hour = `${hour}`;
-				if (hour.length === 1) {
-					hour = `0${hour}`
-				}
-				if (minu.length === 1) {
-					minu = `0${minu}`
-				}
-				if (sec.length === 1) {
-					sec = `0${sec}`
-				}
-				return newDate.getFullYear() + "." + month + "." + day + ' ' + hour +':' + minu + ':' + sec;
-			},
-			async request(data) {
-				uni.showLoading({
-					title: '加载中'
-				});
-				try {
-					const response = await this.$request({
-						url: this.$api.advance.order,
-						method: 'get',
-						data: {
-							keyword: this.keyword,
-							page: this.page,
-							name: this.search_text,
-						}
-					});
-					uni.hideLoading();
-					if (response.code === 0) {
-						if (data === 1) {
-							this.order_list = response.data.list;
-						} else {
-							this.order_list.push(...response.data.list);
-						}
-						this.template_message = response.data.template_message;
-						for (let i = 0; i < this.order_list.length; i++) {
-							let attr_name = '';
-							let attr_groups = JSON.parse(this.order_list[i].goods_info);
-							for (let j = 0; j < attr_groups.attr_list.length; j++) {
-								attr_name+= ` ${attr_groups.attr_list[j].attr_group_name}:${attr_groups.attr_list[j].attr_name}`
-							}
-							this.$set(this.order_list[i], 'attr_name', attr_name);
-						}
-					}
-				} catch (e) {
-					uni.hideLoading();
-					uni.navigateTo({
-						url: `/plugins/advance/index/index`
-					});
-				}
-			},
-			set_time(pay_limit, end_prepayment_at) {
-				if (pay_limit == -1) {
-					return `${this.getDate(end_prepayment_at)} ~ 无期限`
-				} else {
-					return `${this.getDate(end_prepayment_at)} ~ ${this.addDate(end_prepayment_at, Number(pay_limit))}`
-				}
-			},
-			async get_submit(body) {
-				const response = await this.$request({
-					url: this.$api.advance.order_submit,
-					method: 'post',
-					data: {
-						...body,
-					}
-				});
-				if (response.code === 0) {
-					return response;
-				} else if (response.code === 1) {
-					uni.showModal({
-						title: '提示',
-						content: response.msg,
-						success(res) {
-							if (res.cancel) {
-								uni.navigateBack();
-							} else if (res.confirm) {
-								uni.navigateBack();
-							}
-						}
-					})
-				}
-			},
-			get_time() {
-				clearInterval(this.interval);
-				let now = new Date().getTime();
-				for (let i = 0; i < this.order_list.length; i++) {
-					if (this.order_list[i].status_num == 1) {
-						let timelog = new Date(this.order_list[i].end_prepayment_at.replace(/-/g, '/')).getTime();
-						let time = timelog - now;
-						if (time > 0) {
-							let day = parseInt((time/1000/60/60/24)%30);
-							let hou = parseInt((time/1000/60/60)%24);
-							let min = parseInt((time/1000/60)%60);
-							let sec = parseInt((time/1000)%60);
-							if (day > 0) {
-								this.$set(this.order_list[i], 'html', day+"天"+hou+":"+(min<10?"0"+min:min) + ":"+(sec<10?"0"+sec:sec));
-							} else {
-								this.$set(this.order_list[i], 'html', hou+":"+(min<10?"0"+min:min) + ":"+(sec<10?"0"+sec:sec));
-							}
-						}
-					} else if (this.order_list[i].status_num == 3) {
-						if (this.order_list[i].pay_limit == -1) {
-							this.$set(this.order_list[i], 'html', '不显示');
-						} else {
-							let newDate = new Date(this.order_list[i].end_prepayment_at.replace(/-/g, '/'));
-							let timelog = newDate.setDate(newDate.getDate() + Number(this.order_list[i].pay_limit));
-							let time =  new Date(timelog).getTime() - now;
-							if (time > 0) {
-								let day = parseInt((time/1000/60/60/24)%30);
-								let hou = parseInt((time/1000/60/60)%24);
-								let min = parseInt((time/1000/60)%60);
-								let sec = parseInt((time/1000)%60);
-								if (day > 0) {
-									this.$set(this.order_list[i], 'html', day+"天"+hou+":"+(min<10?"0"+min:min) + ":"+(sec<10?"0"+sec:sec));
-								} else {
-									this.$set(this.order_list[i], 'html', hou+":"+(min<10?"0"+min:min) + ":"+(sec<10?"0"+sec:sec));
-								}
-							}
-						}
-					}
-				}
-				this.interval = setInterval(() => {
-					let now = new Date().getTime();
-					if (this.order_list.length === 0) clearInterval(this.interval);
-					for (let i = 0; i < this.order_list.length; i++) {
-						if (this.order_list[i].status_num == 1) {
-							let timelog = new Date(this.order_list[i].end_prepayment_at.replace(/-/g, '/')).getTime();
-							let time = timelog - now;
-							if (time > 0) {
-								let day = parseInt((time/1000/60/60/24)%30);
-								let hou = parseInt((time/1000/60/60)%24);
-								let min = parseInt((time/1000/60)%60);
-								let sec = parseInt((time/1000)%60);
-								if (day > 0) {
-									this.$set(this.order_list[i], 'html', day+"天"+hou+":"+(min<10?"0"+min:min) + ":"+(sec<10?"0"+sec:sec));
-								} else {
-									this.$set(this.order_list[i], 'html', hou+":"+(min<10?"0"+min:min) + ":"+(sec<10?"0"+sec:sec));
-								}
-							}
-						}  else if (this.order_list[i].status_num == 3) {
-							if (this.order_list[i].pay_limit == -1) {
-								this.$set(this.order_list[i], 'html', '不显示');
-							} else {
-								let newDate = new Date(this.order_list[i].end_prepayment_at.replace(/-/g, '/'));
-								let timelog = newDate.setDate(newDate.getDate() + Number(this.order_list[i].pay_limit));
-								let time =  new Date(timelog).getTime() - now;
-								if (time > 0) {
-									let day = parseInt((time/1000/60/60/24)%30);
-									let hou = parseInt((time/1000/60/60)%24);
-									let min = parseInt((time/1000/60)%60);
-									let sec = parseInt((time/1000)%60);
-									if (day > 0) {
-										this.$set(this.order_list[i], 'html', day+"天"+hou+":"+(min<10?"0"+min:min) + ":"+(sec<10?"0"+sec:sec));
-									} else {
-										this.$set(this.order_list[i], 'html', hou+":"+(min<10?"0"+min:min) + ":"+(sec<10?"0"+sec:sec));
-									}
-								}
-							}
-						}
-					}
-				}, 1000);
-			},
-			async set_search() {
-				this.page = 1;
-				this.keyword = -1;
-				uni.showLoading({
-					title: '加载中'
-				});
-				const response = await this.$request({
-					url: this.$api.advance.order,
-					method: 'get',
-					data: {
-						keyword: this.keyword,
-						page: this.page,
-						name: this.search_text,
-					}
-				});
-				if (response.code === 0) {
-					this.order_list = response.data.list;
-					for (let i = 0; i < this.order_list.length; i++) {
-						let attr_name = '';
-						let attr_groups = JSON.parse(this.order_list[i].goods_info);
-						for (let j = 0; j < attr_groups.attr_list.length; j++) {
-							attr_name+= ` ${attr_groups.attr_list[j].attr_group_name}:${attr_groups.attr_list[j].attr_name}`
-						}
-						this.$set(this.order_list[i], 'attr_name', attr_name);
-					}
-				}
-				uni.hideLoading();
-				this.get_time();
-			},
-			blur_request() {
-				// this.order_list = this.oldOrder;
-			},
-			go_search() {
-				this.search = true;
-				this.active = false;
-				this.oldOrder = this.order_list;
-				this.order_list = [];
-			}
-		  },
-		onReachBottom() {
-			if (!this.over) {
-				this.page+=1;
-				this.$request({
-					url: this.$api.advance.order,
-					method: 'get',
-					data: {
-						keyword: this.keyword,
-						page: this.page,
-						name: this.search_text,
-					}
-				}).then(res => {
-					if (res.code === 0) {
-						if (res.data.list.length > 0) {
-							this.order_list = [...this.order_list, ...res.data.list];
-							for (let i = 0; i < this.order_list.length; i++) {
-								let attr_name = '';
-								let attr_groups = JSON.parse(this.order_list[i].goods_info);
-								for (let j = 0; j < attr_groups.attr_list.length; j++) {
-									attr_name+= ` ${attr_groups.attr_list[j].attr_group_name}:${attr_groups.attr_list[j].attr_name}`
-								}
-								this.$set(this.order_list[i], 'attr_name', attr_name);
-							}
-							this.get_time();
-						} else {
-							this.over = true;
-						}
-					}
-				})
-			}
-		},
-		computed: {
-			...mapGetters('mallConfig',{
-				getTheme: 'getTheme'
-			})
-		},
-        filters: {
-		    orderStatus:function(status) {
-                if (status == 1) {
-                    return '定金待支付';
-                } else if (status == 2) {
-                    return '尾款支付未开始';
-                } else if (status == 3) {
-                    return '尾款待支付';
-                } else if (status == 4) {
-                    return '购买成功';
-                } else if (status == 5) {
-                    return '订单已取消';
-                } else if (status == 6) {
-                    return '订单已售后';
-                } else if (status == 7) {
-                    return '购买失败 定金支付超时';
-                } else if (status == 8) {
-                    return '购买失败 定金已退款';
-                } else if (status == 9) {
-                    return '购买失败 尾款支付超时';
-                }
-            }
-        }
-	}
-</script>
-
-<style lang="scss" scoped>
-  .order {
-    position: absolute;
-    width: #{750rpx};
-    top: 0;
-    left: 0;
-    height: 100%;
-	  z-index: 1500;
-    background-color: #f7f7f7;
-    .top {
-      position: fixed;
-      top: 0;
-      left: 0;
-      background-color: #efeff4;
-      font-size: #{32rpx};
-	    z-index: 1500;
-	    width: #{750upx};
-      .to-top {
-        width: #{280rpx};
-        height: #{88rpx};
-        .icon {
-            width: #{22rpx};
-            height: #{12rpx};
-	        margin-left: #{16rpx};
-        }
-	      text {
-		      width: #{145rpx};
-		      text-align: center;
-		      word-break: break-all;
-		      text-overflow: ellipsis;
-		      display: -webkit-box;
-		      -webkit-box-orient: vertical;
-		      -webkit-line-clamp: 1;
-		      overflow: hidden;
-		      font-size: #{26rpx};
-	      }
-	      .icon-active {
-		      transform:rotate(180deg);
-	      }
-      }
-	    .top-input {
-		    height: #{88rpx};
-		    width: #{750-280rpx};
-		    .input {
-			   width: #{570upx};
-			    height: #{56upx};
-			    background-color: white;
-			    border-radius: #{30upx};
-			    margin-left: #{28upx};
-			    >image {
-				    width: #{26upx};
-				    height: #{26upx};
-				    margin-right: #{13upx};
-			    }
-			    >text {
-				    font-size: #{26rpx};
-				    color: #b2b2b2;
-			    }
-		    }
-	    }
-    }
-    .do-top {
-         position: fixed;
-	      top: #{88rpx};
-	      width: 100%;
-	      height: 100%;
-	    z-index: 1500;
-        background-color: rgba(0,0,0,.3);
-      .do-top-item {
-        width: 100%;
-        height: #{88rpx};
-        background-color: #ffffff;
-        font-size: #{32rpx};
-
-        border-top: #{1rpx} solid #e2e2e2;
-        text-align: center;
-        line-height: #{88rpx};
-      }
-
-    }
-    .item {
-      width: #{750rpx};
-      margin-bottom: #{20rpx};
-      background-color: #ffffff;
-      .item-top {
-        width: 100%;
-        line-height: #{80rpx};
-        background-color: #ffffff;
-        border-bottom: #{1rpx} solid #e2e2e2;
-        font-size: #{26rpx};
-        color: #ff4544;
-        padding: 0 #{24rpx};
-      }
-      .item-center {
-        width: 100%;
-        padding: #{24rpx 24rpx 0 24rpx};
-        .image {
-          width: #{220rpx};
-          height: #{220rpx};
-          border-radius: #{16rpx};
-        }
-        .content {
-          width: #{530-48rpx};
-          min-height: #{220rpx};
-          padding-left: #{24rpx};
-          .name {
-              margin-top: #{12rpx};
-              word-break: break-all;
-              text-overflow: ellipsis;
-              display: -webkit-box;
-              -webkit-box-orient: vertical;
-              -webkit-line-clamp: 2;
-              overflow: hidden;
-              font-size: #{28rpx};
-              color:#353535;
-          }
-          .attr {
-            margin-top: #{16rpx};
-            >text {
-              font-size: #{26rpx};
-              color:#999999;
-              margin-right: #{16rpx};
-            }
-          }
-          .num-price {
-            font-size: #{28rpx};
-            color: #353535;
-            margin-top: #{24rpx};
-          }
-          .des-price {
-            font-size: #{28rpx};
-            color: #353535;
-            margin-top: #{24rpx};
-          }
-        }
-      }
-      .item-bottom {
-        width: #{750rpx};
-        background-color: #ffffff;
-        padding: #{0 24rpx 32rpx 24rpx};
-        overflow: hidden;
-        .swell-price {
-          font-size: #{28rpx};
-          color: #353535;
-          margin-top: #{24rpx};
-        }
-        .button {
-          // display: inline-block;
-          float: right;
-          height: #{56rpx};
-          line-height: #{56rpx};
-          font-size: #{28rpx};
-          color: #ffffff;
-          padding: 0 #{24rpx};
-          border-radius: #{28rpx};
-          margin-top: #{32rpx};
-        }
-      }
-    }
-  }
-	.order-empty {
-		position: absolute;
-		top: #{555rpx};
-		left: 50%;
-		transform: translate(-50%, -50%);
-		width: #{240rpx};
-		text-align: center;
-		>image {
-			height: #{240rpx};
-			width: #{240rpx};
-		}
-		>text {
-			font-size: #{24rpx};
-			color: #666666;
-		}
-	}
-	.text-time {
-		text-align: right;font-size: #{26upx};color: #999999;
-		margin-top: #{16upx};
-	}
-  .search {
-	  height: #{104rpx};
-	  width: 100%;
-	  background-color: #efeff4;
-	  padding: #{20rpx 24rpx};
-	  position: relative;
-	  overflow: hidden;
-	  .delete {
-		  width: #{32rpx};
-		  height: #{32rpx};
-	  }
-	  .input {
-		  height: #{64rpx};
-		  width: #{620rpx};
-		  border-radius: #{50rpx};
-		  background-color: #ffffff;
-		  padding-left: #{32rpx};
-		  font-size: #{26rpx};
-		  color: #353535;
-	  }
-	  .delete {
-		  position: absolute;
-		  right: #{125rpx};
-		  z-index: 1600;
-	  }
-  }
-	.order-number {
-	
-	}
-	
-	.filal-payment-time {
-		font-size:#{22upx};
-		color: #ff4544;
-		text-align: right;
-		margin-top: #{14upx};
-	}
-	.default-text {
-		color: #353535;
-	}
-</style>
+<template>
+	<app-layout>
+		<view class="order">
+			<view class="top dir-left-nowrap main-between cross-center">
+				<view class="top-input cross-center" @click="go_search()" v-if="!search">
+					<view class="input main-center cross-center">
+						<image src="/static/image/icon/icon-search.png"></image>
+						<text>搜索</text>
+					</view>
+				</view>
+				<view class="to-top dir-left-nowrap main-center cross-center" v-if="!search" @click="active = true">
+					<text :class="getTheme + '-m-text ' + getTheme">{{active_item}}</text>
+					<image v-if="!active" :class="getTheme + '-m-back ' + getTheme" class="icon"
+						src="../image/open.png"></image>
+					<image v-else class="icon icon-active" :class="getTheme + '-m-back ' + getTheme"
+						src="../image/open.png"></image>
+				</view>
+				<view class="search dir-left-nowrap cross-center main-between" v-if="search">
+					<input type="text" class="input" :focus="true" v-model="search_text" @blur="blur_request"
+						@confirm="set_search">
+					<image class="delete" v-show="search_text.length>0" @click="empyt_search" src="../image/delete.png">
+					</image>
+					<text style="color:#666666;font-size: 32rpx;" @click="set_search">搜索</text>
+				</view>
+			</view>
+			<view class="do-top" v-if="active" @click.stop="active = false">
+				<view class="do-top-item" v-for="(item, index) in select_list" :key="index"
+					:class="item.active ? getTheme + '-m-text ' + getTheme : 'default-text'" @click="set_active(item)">
+					{{item.text}}
+				</view>
+			</view>
+			<view style="margin-top: 108rpx;"></view>
+			<view class="item" v-for="(item, index) in order_list" :key="index">
+				<view class="item-top dir-left-wrap main-between cross-center">
+					<text class="order-number" style="color: #999999;">订单号{{item.advance_no}}</text>
+					<text>{{item.status_num | orderStatus}}</text>
+				</view>
+				<view class="item-center dir-left-nowrap" @click="route_go(item)">
+					<image class="image" :src="item.goods.goodsWarehouse.cover_pic"></image>
+					<view class="content">
+						<view class="name">{{item.goods.goodsWarehouse.name}}</view>
+						<view class="attr">
+							<text>{{item.attr_name}}</text>
+						</view>
+						<view class="num-price dir-left-nowrap main-between cross-center">
+							<text>×{{item.goods_num}}</text>
+							<text>¥{{item.goodsAttr.price}}</text>
+						</view>
+						<view v-if="item.service_price!=null" class="num-price dir-left-nowrap main-between cross-center">
+							<text style="color: #999;font-size: 26rpx;">碎屏险×1</text>
+							<text style="color: red;">¥{{item.service_price}}</text>
+						</view>
+						<view class="des-price dir-left-wrap main-right cross-center">
+							<text>定金</text>
+							<text :style="{color: item.is_pay == 0 ? '#ff4544' : '#353535'}">¥{{item.deposit}}</text>
+							<text>抵¥{{item.swell_deposit}}</text>
+							<text style="color: #ff4544;" v-if="item.status_num == 9">(定金不退)</text>
+						</view>
+					</view>
+				</view>
+				<view class="item-bottom">
+					<view class="swell-price main-right cross-center"
+						v-if="item.status_num == 2 || item.status_num == 3 || item.status_num == 4 || item.status_num == 9 ">
+						<text>尾款</text>
+						<text style="color: #ff4544;">¥{{item.tail_money}}</text>
+					</view>
+					<view v-if="item.status_num == 1" class="text-time">
+						<text>距截止</text>
+						<text style="color: #ff4544">{{item.html}}</text>
+					</view>
+					<view v-if="item.status_num == 3  && item.pay_limit != -1" class="text-time">
+						<text>距截止</text>
+						<text style="color: #ff4544">{{item.html}}</text>
+					</view>
+					<view class="filal-payment-time" v-if="item.status_num == 2">
+						支付尾款时间:{{set_time(item.pay_limit, item.end_prepayment_at)}}
+					</view>
+					<view class="button" :class="getTheme + '-m-back ' + getTheme" @click="payFinalPayment(item)"
+						v-if="item.status_num == 3 && item.order_id == 0">
+						<app-form-id>
+							<text>
+								去支付尾款
+							</text>
+						</app-form-id>
+					</view>
+					<view class="button" :class="getTheme + '-m-back ' + getTheme" @click="payPayment(item, index)"
+						v-else-if="item.status_num == 3 && item.order_id != 0 && item.pay_type != 2">
+						<app-form-id>
+							<text>
+								付款
+							</text>
+						</app-form-id>
+					</view>
+					<view class="button" :class="getTheme + '-m-back ' + getTheme" @click="payDeposit(item, index)"
+						v-else-if="item.status_num == 1">
+						<app-form-id>
+							<text>
+								去支付定金
+							</text>
+						</app-form-id>
+					</view>
+				</view>
+			</view>
+			<view class="order-empty" v-if="order_list.length === 0">
+				<image src="../image/order.png"></image>
+				<text>没有任何订单哦~</text>
+			</view>
+		</view>
+	</app-layout>
+</template>
+
+<script>
+	import {
+		mapGetters
+	} from "vuex";
+
+	export default {
+		name: 'order',
+		data() {
+			return {
+				active: false,
+				active_item: '全部预定',
+				select_list: [{
+						id: -1,
+						active: true,
+						text: '全部预定',
+					},
+					{
+						id: 1,
+						active: false,
+						text: '定金待支付',
+					},
+					{
+						id: 2,
+						active: false,
+						text: '尾款支付未开始',
+					},
+					{
+						id: 3,
+						active: false,
+						text: '尾款待支付',
+					},
+					{
+						id: 4,
+						active: false,
+						text: '购买成功',
+					},
+					{
+						id: 5,
+						active: false,
+						text: '购买失败',
+					}
+				],
+				order_list: [],
+				page: 1,
+				keyword: -1,
+				over: false,
+				interval: null,
+				search: false,
+				search_text: '',
+				oldOrder: [],
+				template_message: []
+			}
+		},
+		onShow() {
+			this.order_list = [];
+			this.page = 1;
+			this.request(1).then(() => {
+				this.get_time();
+			});
+		},
+		onHide() {
+			clearInterval(this.interval);
+		},
+		onUnload() {
+			clearInterval(this.interval);
+		},
+		methods: {
+			empyt_search() {
+				this.search = false;
+				this.search_text = '';
+				this.set_active({
+					id: -1
+				});
+				this.active_item = '全部预定';
+			},
+			set_active(data) {
+				clearInterval(this.interval);
+				this.order_list = [];
+				this.keyword = data.id;
+				this.over = false;
+				this.page = 1;
+				this.request().then(() => {
+					if (data.id === 1 || data.id === -1 || data.id === 3) this.get_time();
+				});
+				for (let i = 0; i < this.select_list.length; i++) {
+					if (this.select_list[i].id === data.id) {
+						this.select_list[i].active = true;
+					} else {
+						this.select_list[i].active = false;
+					}
+				}
+				this.active = false;
+				this.active_item = data.text;
+			},
+			route_go(data) {
+				if (data.status_num == 4) {
+					uni.navigateTo({
+						url: `/pages/order/order-detail/order-detail?id=${data.order_id}&sign=advance`
+					})
+				}
+			},
+			// 支付尾款
+			payFinalPayment(item) {
+				let data = [{
+					"mch_id": item.goods.mch_id,
+					"goods_list": [{
+						"id": item.goods_id,
+						"attr": JSON.parse(item.goods_info).attr_list,
+						"num": item.goods_num,
+						"cat_id": 0,
+						"goods_attr_id": item.goodsAttr.id,
+						"advance_id": item.id,
+					}]
+				}];
+				this.$jump({
+					open_type: 'navigate',
+					url: `/pages/order-submit/order-submit?mch_list=${JSON.stringify(data)}&preview_url=${encodeURIComponent(this.$api.advance.order_preview)}&submit_url=${encodeURIComponent(this.$api.advance.order_sub)}&order_page_url=/plugins/advance/order/order&plugin=advance&total_title=尾款`
+				});
+			},
+			payPayment(item, index) {
+				this.$request({
+					url: this.$api.order.list_pay_data,
+					data: {
+						id: item.order_id,
+					},
+					method: 'get'
+				}).then(res => {
+					if (res.code === 0) {
+						this.$payment.pay(res.data.id).then(() => {
+							// 支付成功
+							if (this.keyword === -1) {
+								this.order_list[index].status_num = '4';
+							} else {
+								this.$delete(this.order_list, index);
+							}
+						}).catch(() => {
+							// 支付失败
+						});
+					}
+				})
+			},
+			// 去支付定金
+			payDeposit(data, index) {
+				this.$subscribe(this.template_message).then(() => {
+					this.submit(data, index);
+				}).catch(() => {
+					this.submit(data, index);
+				});
+			},
+			submit(data, index) {
+				let body = {
+					id: data.id,
+					goods_id: data.goods_id,
+					goods_num: data.goods_num,
+					goods_attr_id: data.goodsAttr.id,
+				};
+				this.get_submit(body).then(response => {
+					this.$payment.pay(response.data.id).then((res) => {
+						this.$request({
+							url: this.$api.advance.order,
+							method: 'get',
+							data: {
+								id: data.id,
+							}
+						}).then(response => {
+							if (response.code === 0) {
+								this.$set(this.order_list, index, response.data.list[0]);
+								let attr_name = '';
+								let attr_groups = JSON.parse(this.order_list[index].goods_info);
+								for (let j = 0; j < attr_groups.attr_list.length; j++) {
+									attr_name +=
+										` ${attr_groups.attr_list[j].attr_group_name}:${attr_groups.attr_list[j].attr_name}`
+								}
+								this.$set(this.order_list[index], 'attr_name', attr_name);
+							} else if (response.code === 1) {
+								uni.showModal({
+									title: '提示',
+									content: res.msg,
+									success(res) {
+										if (res.cancel) {
+											uni.navigateBack();
+										} else if (res.confirm) {
+											uni.navigateBack();
+										}
+									}
+								})
+							}
+						});
+					}).catch(() => {});
+				});
+			},
+			addDate(date, days) {
+				if (days == undefined || days == '') {
+					days = 1;
+				}
+				let newDate = new Date(date.replace(/-/g, '/'));
+				newDate.setDate(newDate.getDate() + days);
+				let month = newDate.getMonth() + 1;
+				let day = newDate.getDate();
+				let mm = "'" + month + "'";
+				let dd = "'" + day + "'";
+				if (mm.length == 3) {
+					month = "0" + month;
+				}
+				if (dd.length == 3) {
+					day = "0" + day;
+				}
+				let hour = newDate.getHours(); //得到小时
+				let minu = newDate.getMinutes(); //得到分钟
+				let sec = newDate.getSeconds(); //得到秒
+				if (sec === 0) {
+					sec = 59;
+					if (minu === 0) {
+						minu = 59;
+						if (hour === 0) {
+							hour = 23;
+							day = '0' + Number(day) - 1;
+						} else {
+							hour = hour - 1;
+						}
+					} else {
+						minu = minu - 1;
+					}
+				} else {
+					sec = sec - 1;
+				}
+				sec = `${sec}`;
+				minu = `${minu}`;
+				hour = `${hour}`;
+				if (hour.length === 1) {
+					hour = `0${hour}`
+				}
+				if (minu.length === 1) {
+					minu = `0${minu}`
+				}
+				if (sec.length === 1) {
+					sec = `0${sec}`
+				}
+				return newDate.getFullYear() + "." + month + "." + day + ' ' + hour + ':' + minu + ':' + sec;
+			},
+			getDate(end_prepayment_at) {
+				let newDate = new Date(end_prepayment_at.replace(/-/g, '/'));
+				newDate.setDate(newDate.getDate());
+				let month = newDate.getMonth() + 1;
+				let day = newDate.getDate();
+				let mm = "'" + month + "'";
+				let dd = "'" + day + "'";
+				if (mm.length == 3) {
+					month = "0" + month;
+				}
+				if (dd.length == 3) {
+					day = "0" + day;
+				}
+				let hour = newDate.getHours(); //得到小时
+				let minu = newDate.getMinutes(); //得到分钟
+				let sec = newDate.getSeconds(); //得到秒
+				sec = `${sec}`;
+				minu = `${minu}`;
+				hour = `${hour}`;
+				if (hour.length === 1) {
+					hour = `0${hour}`
+				}
+				if (minu.length === 1) {
+					minu = `0${minu}`
+				}
+				if (sec.length === 1) {
+					sec = `0${sec}`
+				}
+				return newDate.getFullYear() + "." + month + "." + day + ' ' + hour + ':' + minu + ':' + sec;
+			},
+			async request(data) {
+				uni.showLoading({
+					title: '加载中'
+				});
+				try {
+					const response = await this.$request({
+						url: this.$api.advance.order,
+						method: 'get',
+						data: {
+							keyword: this.keyword,
+							page: this.page,
+							name: this.search_text,
+						}
+					});
+					uni.hideLoading();
+					if (response.code === 0) {
+						if (data === 1) {
+							this.order_list = response.data.list;
+						} else {
+							this.order_list.push(...response.data.list);
+						}
+						this.template_message = response.data.template_message;
+						for (let i = 0; i < this.order_list.length; i++) {
+							let attr_name = '';
+							let attr_groups = JSON.parse(this.order_list[i].goods_info);
+							for (let j = 0; j < attr_groups.attr_list.length; j++) {
+								attr_name +=
+									` ${attr_groups.attr_list[j].attr_group_name}:${attr_groups.attr_list[j].attr_name}`
+							}
+							this.$set(this.order_list[i], 'attr_name', attr_name);
+						}
+					}
+				} catch (e) {
+					uni.hideLoading();
+					uni.navigateTo({
+						url: `/plugins/advance/index/index`
+					});
+				}
+			},
+			set_time(pay_limit, end_prepayment_at) {
+				if (pay_limit == -1) {
+					return `${this.getDate(end_prepayment_at)} ~ 无期限`
+				} else {
+					return `${this.getDate(end_prepayment_at)} ~ ${this.addDate(end_prepayment_at, Number(pay_limit))}`
+				}
+			},
+			async get_submit(body) {
+				const response = await this.$request({
+					url: this.$api.advance.order_submit,
+					method: 'post',
+					data: {
+						...body,
+					}
+				});
+				if (response.code === 0) {
+					return response;
+				} else if (response.code === 1) {
+					uni.showModal({
+						title: '提示',
+						content: response.msg,
+						success(res) {
+							if (res.cancel) {
+								uni.navigateBack();
+							} else if (res.confirm) {
+								uni.navigateBack();
+							}
+						}
+					})
+				}
+			},
+			get_time() {
+				clearInterval(this.interval);
+				let now = new Date().getTime();
+				for (let i = 0; i < this.order_list.length; i++) {
+					if (this.order_list[i].status_num == 1) {
+						let timelog = new Date(this.order_list[i].end_prepayment_at.replace(/-/g, '/')).getTime();
+						let time = timelog - now;
+						if (time > 0) {
+							let day = parseInt((time / 1000 / 60 / 60 / 24) % 30);
+							let hou = parseInt((time / 1000 / 60 / 60) % 24);
+							let min = parseInt((time / 1000 / 60) % 60);
+							let sec = parseInt((time / 1000) % 60);
+							if (day > 0) {
+								this.$set(this.order_list[i], 'html', day + "天" + hou + ":" + (min < 10 ? "0" + min :
+									min) + ":" + (sec < 10 ? "0" + sec : sec));
+							} else {
+								this.$set(this.order_list[i], 'html', hou + ":" + (min < 10 ? "0" + min : min) + ":" + (
+									sec < 10 ? "0" + sec : sec));
+							}
+						}
+					} else if (this.order_list[i].status_num == 3) {
+						if (this.order_list[i].pay_limit == -1) {
+							this.$set(this.order_list[i], 'html', '不显示');
+						} else {
+							let newDate = new Date(this.order_list[i].end_prepayment_at.replace(/-/g, '/'));
+							let timelog = newDate.setDate(newDate.getDate() + Number(this.order_list[i].pay_limit));
+							let time = new Date(timelog).getTime() - now;
+							if (time > 0) {
+								let day = parseInt((time / 1000 / 60 / 60 / 24) % 30);
+								let hou = parseInt((time / 1000 / 60 / 60) % 24);
+								let min = parseInt((time / 1000 / 60) % 60);
+								let sec = parseInt((time / 1000) % 60);
+								if (day > 0) {
+									this.$set(this.order_list[i], 'html', day + "天" + hou + ":" + (min < 10 ? "0" + min :
+										min) + ":" + (sec < 10 ? "0" + sec : sec));
+								} else {
+									this.$set(this.order_list[i], 'html', hou + ":" + (min < 10 ? "0" + min : min) + ":" +
+										(sec < 10 ? "0" + sec : sec));
+								}
+							}
+						}
+					}
+				}
+				this.interval = setInterval(() => {
+					let now = new Date().getTime();
+					if (this.order_list.length === 0) clearInterval(this.interval);
+					for (let i = 0; i < this.order_list.length; i++) {
+						if (this.order_list[i].status_num == 1) {
+							let timelog = new Date(this.order_list[i].end_prepayment_at.replace(/-/g, '/'))
+								.getTime();
+							let time = timelog - now;
+							if (time > 0) {
+								let day = parseInt((time / 1000 / 60 / 60 / 24) % 30);
+								let hou = parseInt((time / 1000 / 60 / 60) % 24);
+								let min = parseInt((time / 1000 / 60) % 60);
+								let sec = parseInt((time / 1000) % 60);
+								if (day > 0) {
+									this.$set(this.order_list[i], 'html', day + "天" + hou + ":" + (min < 10 ? "0" +
+										min : min) + ":" + (sec < 10 ? "0" + sec : sec));
+								} else {
+									this.$set(this.order_list[i], 'html', hou + ":" + (min < 10 ? "0" + min :
+										min) + ":" + (sec < 10 ? "0" + sec : sec));
+								}
+							}
+						} else if (this.order_list[i].status_num == 3) {
+							if (this.order_list[i].pay_limit == -1) {
+								this.$set(this.order_list[i], 'html', '不显示');
+							} else {
+								let newDate = new Date(this.order_list[i].end_prepayment_at.replace(/-/g, '/'));
+								let timelog = newDate.setDate(newDate.getDate() + Number(this.order_list[i]
+									.pay_limit));
+								let time = new Date(timelog).getTime() - now;
+								if (time > 0) {
+									let day = parseInt((time / 1000 / 60 / 60 / 24) % 30);
+									let hou = parseInt((time / 1000 / 60 / 60) % 24);
+									let min = parseInt((time / 1000 / 60) % 60);
+									let sec = parseInt((time / 1000) % 60);
+									if (day > 0) {
+										this.$set(this.order_list[i], 'html', day + "天" + hou + ":" + (min < 10 ?
+											"0" + min : min) + ":" + (sec < 10 ? "0" + sec : sec));
+									} else {
+										this.$set(this.order_list[i], 'html', hou + ":" + (min < 10 ? "0" + min :
+											min) + ":" + (sec < 10 ? "0" + sec : sec));
+									}
+								}
+							}
+						}
+					}
+				}, 1000);
+			},
+			async set_search() {
+				this.page = 1;
+				this.keyword = -1;
+				uni.showLoading({
+					title: '加载中'
+				});
+				const response = await this.$request({
+					url: this.$api.advance.order,
+					method: 'get',
+					data: {
+						keyword: this.keyword,
+						page: this.page,
+						name: this.search_text,
+					}
+				});
+				if (response.code === 0) {
+					this.order_list = response.data.list;
+					for (let i = 0; i < this.order_list.length; i++) {
+						let attr_name = '';
+						let attr_groups = JSON.parse(this.order_list[i].goods_info);
+						for (let j = 0; j < attr_groups.attr_list.length; j++) {
+							attr_name +=
+								` ${attr_groups.attr_list[j].attr_group_name}:${attr_groups.attr_list[j].attr_name}`
+						}
+						this.$set(this.order_list[i], 'attr_name', attr_name);
+					}
+				}
+				uni.hideLoading();
+				this.get_time();
+			},
+			blur_request() {
+				// this.order_list = this.oldOrder;
+			},
+			go_search() {
+				this.search = true;
+				this.active = false;
+				this.oldOrder = this.order_list;
+				this.order_list = [];
+			}
+		},
+		onReachBottom() {
+			if (!this.over) {
+				this.page += 1;
+				this.$request({
+					url: this.$api.advance.order,
+					method: 'get',
+					data: {
+						keyword: this.keyword,
+						page: this.page,
+						name: this.search_text,
+					}
+				}).then(res => {
+					if (res.code === 0) {
+						if (res.data.list.length > 0) {
+							this.order_list = [...this.order_list, ...res.data.list];
+							for (let i = 0; i < this.order_list.length; i++) {
+								let attr_name = '';
+								let attr_groups = JSON.parse(this.order_list[i].goods_info);
+								for (let j = 0; j < attr_groups.attr_list.length; j++) {
+									attr_name +=
+										` ${attr_groups.attr_list[j].attr_group_name}:${attr_groups.attr_list[j].attr_name}`
+								}
+								this.$set(this.order_list[i], 'attr_name', attr_name);
+							}
+							this.get_time();
+						} else {
+							this.over = true;
+						}
+					}
+				})
+			}
+		},
+		computed: {
+			...mapGetters('mallConfig', {
+				getTheme: 'getTheme'
+			})
+		},
+		filters: {
+			orderStatus: function(status) {
+				if (status == 1) {
+					return '定金待支付';
+				} else if (status == 2) {
+					return '尾款支付未开始';
+				} else if (status == 3) {
+					return '尾款待支付';
+				} else if (status == 4) {
+					return '购买成功';
+				} else if (status == 5) {
+					return '订单已取消';
+				} else if (status == 6) {
+					return '订单已售后';
+				} else if (status == 7) {
+					return '购买失败 定金支付超时';
+				} else if (status == 8) {
+					return '购买失败 定金已退款';
+				} else if (status == 9) {
+					return '购买失败 尾款支付超时';
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.order {
+		position: absolute;
+		width: #{750rpx};
+		top: 0;
+		left: 0;
+		height: 100%;
+		z-index: 1500;
+		background-color: #f7f7f7;
+
+		.top {
+			position: fixed;
+			top: 0;
+			left: 0;
+			background-color: #efeff4;
+			font-size: #{32rpx};
+			z-index: 1500;
+			width: #{750upx};
+
+			.to-top {
+				width: #{280rpx};
+				height: #{88rpx};
+
+				.icon {
+					width: #{22rpx};
+					height: #{12rpx};
+					margin-left: #{16rpx};
+				}
+
+				text {
+					width: #{145rpx};
+					text-align: center;
+					word-break: break-all;
+					text-overflow: ellipsis;
+					display: -webkit-box;
+					-webkit-box-orient: vertical;
+					-webkit-line-clamp: 1;
+					overflow: hidden;
+					font-size: #{26rpx};
+				}
+
+				.icon-active {
+					transform: rotate(180deg);
+				}
+			}
+
+			.top-input {
+				height: #{88rpx};
+				width: #{750-280rpx};
+
+				.input {
+					width: #{570upx};
+					height: #{56upx};
+					background-color: white;
+					border-radius: #{30upx};
+					margin-left: #{28upx};
+
+					>image {
+						width: #{26upx};
+						height: #{26upx};
+						margin-right: #{13upx};
+					}
+
+					>text {
+						font-size: #{26rpx};
+						color: #b2b2b2;
+					}
+				}
+			}
+		}
+
+		.do-top {
+			position: fixed;
+			top: #{88rpx};
+			width: 100%;
+			height: 100%;
+			z-index: 1500;
+			background-color: rgba(0, 0, 0, .3);
+
+			.do-top-item {
+				width: 100%;
+				height: #{88rpx};
+				background-color: #ffffff;
+				font-size: #{32rpx};
+
+				border-top: #{1rpx} solid #e2e2e2;
+				text-align: center;
+				line-height: #{88rpx};
+			}
+
+		}
+
+		.item {
+			width: #{750rpx};
+			margin-bottom: #{20rpx};
+			background-color: #ffffff;
+
+			.item-top {
+				width: 100%;
+				line-height: #{80rpx};
+				background-color: #ffffff;
+				border-bottom: #{1rpx} solid #e2e2e2;
+				font-size: #{26rpx};
+				color: #ff4544;
+				padding: 0 #{24rpx};
+			}
+
+			.item-center {
+				width: 100%;
+				padding: #{24rpx 24rpx 0 24rpx};
+
+				.image {
+					width: #{220rpx};
+					height: #{220rpx};
+					border-radius: #{16rpx};
+				}
+
+				.content {
+					width: #{530-48rpx};
+					min-height: #{220rpx};
+					padding-left: #{24rpx};
+
+					.name {
+						margin-top: #{12rpx};
+						word-break: break-all;
+						text-overflow: ellipsis;
+						display: -webkit-box;
+						-webkit-box-orient: vertical;
+						-webkit-line-clamp: 2;
+						overflow: hidden;
+						font-size: #{28rpx};
+						color: #353535;
+					}
+
+					.attr {
+						margin-top: #{16rpx};
+
+						>text {
+							font-size: #{26rpx};
+							color: #999999;
+							margin-right: #{16rpx};
+						}
+					}
+
+					.num-price {
+						font-size: #{28rpx};
+						color: #353535;
+						margin-top: #{24rpx};
+					}
+
+					.des-price {
+						font-size: #{28rpx};
+						color: #353535;
+						margin-top: #{24rpx};
+					}
+				}
+			}
+
+			.item-bottom {
+				width: #{750rpx};
+				background-color: #ffffff;
+				padding: #{0 24rpx 32rpx 24rpx};
+				overflow: hidden;
+
+				.swell-price {
+					font-size: #{28rpx};
+					color: #353535;
+					margin-top: #{24rpx};
+				}
+
+				.button {
+					// display: inline-block;
+					float: right;
+					height: #{56rpx};
+					line-height: #{56rpx};
+					font-size: #{28rpx};
+					color: #ffffff;
+					padding: 0 #{24rpx};
+					border-radius: #{28rpx};
+					margin-top: #{32rpx};
+				}
+			}
+		}
+	}
+
+	.order-empty {
+		position: absolute;
+		top: #{555rpx};
+		left: 50%;
+		transform: translate(-50%, -50%);
+		width: #{240rpx};
+		text-align: center;
+
+		>image {
+			height: #{240rpx};
+			width: #{240rpx};
+		}
+
+		>text {
+			font-size: #{24rpx};
+			color: #666666;
+		}
+	}
+
+	.text-time {
+		text-align: right;
+		font-size: #{26upx};
+		color: #999999;
+		margin-top: #{16upx};
+	}
+
+	.search {
+		height: #{104rpx};
+		width: 100%;
+		background-color: #efeff4;
+		padding: #{20rpx 24rpx};
+		position: relative;
+		overflow: hidden;
+
+		.delete {
+			width: #{32rpx};
+			height: #{32rpx};
+		}
+
+		.input {
+			height: #{64rpx};
+			width: #{620rpx};
+			border-radius: #{50rpx};
+			background-color: #ffffff;
+			padding-left: #{32rpx};
+			font-size: #{26rpx};
+			color: #353535;
+		}
+
+		.delete {
+			position: absolute;
+			right: #{125rpx};
+			z-index: 1600;
+		}
+	}
+
+	.order-number {}
+
+	.filal-payment-time {
+		font-size:#{22upx};
+		color: #ff4544;
+		text-align: right;
+		margin-top: #{14upx};
+	}
+
+	.default-text {
+		color: #353535;
+	}
+</style>