|
@@ -115,7 +115,7 @@ export default {
|
|
|
loading: null,
|
|
loading: null,
|
|
|
countTimer: null,
|
|
countTimer: null,
|
|
|
checkGoodsList: [],
|
|
checkGoodsList: [],
|
|
|
- isBK: "",
|
|
|
|
|
|
|
+ isBK: ""
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {},
|
|
computed: {},
|
|
@@ -130,7 +130,7 @@ export default {
|
|
|
if (!this.$tools.isLogin()) {
|
|
if (!this.$tools.isLogin()) {
|
|
|
this.setCurrentRouter(this.$route);
|
|
this.setCurrentRouter(this.$route);
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
|
- path: "/login",
|
|
|
|
|
|
|
+ path: "/login"
|
|
|
});
|
|
});
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -156,7 +156,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
this.$request
|
|
this.$request
|
|
|
.orderResumePCOrder({ orderSn: this.orderSn })
|
|
.orderResumePCOrder({ orderSn: this.orderSn })
|
|
|
- .then((res) => {
|
|
|
|
|
|
|
+ .then(res => {
|
|
|
this.loading.close();
|
|
this.loading.close();
|
|
|
this.urlBase64 = res.data.urlBase64;
|
|
this.urlBase64 = res.data.urlBase64;
|
|
|
this.orderSn = res.data.orderSn;
|
|
this.orderSn = res.data.orderSn;
|
|
@@ -173,7 +173,7 @@ export default {
|
|
|
this.lastTime--;
|
|
this.lastTime--;
|
|
|
}, 1000);
|
|
}, 1000);
|
|
|
})
|
|
})
|
|
|
- .catch((err) => {
|
|
|
|
|
|
|
+ .catch(err => {
|
|
|
// this.loading.close();
|
|
// this.loading.close();
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -181,31 +181,90 @@ export default {
|
|
|
console.log(999);
|
|
console.log(999);
|
|
|
this.$confirm("确定离开支付页面吗", "提示", {
|
|
this.$confirm("确定离开支付页面吗", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
|
|
|
|
+ cancelButtonText: "取消"
|
|
|
})
|
|
})
|
|
|
- .then((_) => {
|
|
|
|
|
|
|
+ .then(_ => {
|
|
|
this.qrCodeShow = false;
|
|
this.qrCodeShow = false;
|
|
|
this.$router.back(-1);
|
|
this.$router.back(-1);
|
|
|
})
|
|
})
|
|
|
- .catch((_) => {});
|
|
|
|
|
|
|
+ .catch(_ => {});
|
|
|
},
|
|
},
|
|
|
caculate() {
|
|
caculate() {
|
|
|
this.total = 0;
|
|
this.total = 0;
|
|
|
- this.checkGoodsList.forEach((item) => {
|
|
|
|
|
|
|
+ this.checkGoodsList.forEach(item => {
|
|
|
this.total += item.standPrice;
|
|
this.total += item.standPrice;
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
orderGoodsList() {
|
|
orderGoodsList() {
|
|
|
this.$request
|
|
this.$request
|
|
|
.orderGoodsList({
|
|
.orderGoodsList({
|
|
|
- orderSn: this.orderSn,
|
|
|
|
|
|
|
+ orderSn: this.orderSn
|
|
|
})
|
|
})
|
|
|
- .then((res) => {
|
|
|
|
|
|
|
+ .then(res => {
|
|
|
this.checkGoodsList = res.rows;
|
|
this.checkGoodsList = res.rows;
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
- pay() {
|
|
|
|
|
|
|
+ verify() {
|
|
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
|
|
+ for (let i = 0; i < this.checkGoodsList.length; i++) {
|
|
|
|
|
+ if (
|
|
|
|
|
+ this.checkGoodsList[i].educationName == "继续教育" &&
|
|
|
|
|
+ (this.checkGoodsList[i].projectName == "建造师" ||
|
|
|
|
|
+ this.checkGoodsList[i].projectName == "造价师") &&
|
|
|
|
|
+ this.checkGoodsList[i].businessName == "二级" &&
|
|
|
|
|
+ (!this.$store.state.userInfo.realname ||
|
|
|
|
|
+ !this.$store.state.userInfo.idCard)
|
|
|
|
|
+ ) {
|
|
|
|
|
+ this.$confirm("请完善学员姓名、身份证", "提示", {
|
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
|
+ type: "warning"
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ this.$router.push({
|
|
|
|
|
+ path: "/person-center/my-info"
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {});
|
|
|
|
|
+ reject();
|
|
|
|
|
+ }
|
|
|
|
|
+ if (
|
|
|
|
|
+ this.checkGoodsList[i].educationName == "继续教育" &&
|
|
|
|
|
+ this.checkGoodsList[i].projectName == "施工现场专业人员" &&
|
|
|
|
|
+ this.checkGoodsList[i].businessName == "七大员" &&
|
|
|
|
|
+ (!this.$store.state.userInfo.realname ||
|
|
|
|
|
+ !this.$store.state.userInfo.idCard ||
|
|
|
|
|
+ !this.$store.state.userInfo.companyName ||
|
|
|
|
|
+ !this.$store.state.userInfo.eduLevel ||
|
|
|
|
|
+ !this.$store.state.userInfo.sex)
|
|
|
|
|
+ ) {
|
|
|
|
|
+ this.$confirm(
|
|
|
|
|
+ "请完善学员姓名、身份证、性别、公司名称、教育层次",
|
|
|
|
|
+ "提示",
|
|
|
|
|
+ {
|
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
|
+ type: "warning"
|
|
|
|
|
+ }
|
|
|
|
|
+ )
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ this.$router.push({
|
|
|
|
|
+ path: "/person-center/my-info"
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {});
|
|
|
|
|
+ reject();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ resolve();
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ async pay() {
|
|
|
|
|
+ try {
|
|
|
|
|
+ await this.verify();
|
|
|
|
|
+ } catch (_) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
if (this.radio == 1) {
|
|
if (this.radio == 1) {
|
|
|
//微信
|
|
//微信
|
|
|
|
|
|
|
@@ -214,7 +273,7 @@ export default {
|
|
|
text: "支付中",
|
|
text: "支付中",
|
|
|
spinner: "el-icon-loading",
|
|
spinner: "el-icon-loading",
|
|
|
background: "rgba(0, 0, 0, 0)",
|
|
background: "rgba(0, 0, 0, 0)",
|
|
|
- target: document.querySelector(".section__body"),
|
|
|
|
|
|
|
+ target: document.querySelector(".section__body")
|
|
|
});
|
|
});
|
|
|
if (this.orderSn) {
|
|
if (this.orderSn) {
|
|
|
//订单继续支付
|
|
//订单继续支付
|
|
@@ -231,7 +290,7 @@ export default {
|
|
|
orderPlacePcOrder() {
|
|
orderPlacePcOrder() {
|
|
|
this.$request
|
|
this.$request
|
|
|
.orderPlacePcOrder({ goodsList: this.checkGoodsList })
|
|
.orderPlacePcOrder({ goodsList: this.checkGoodsList })
|
|
|
- .then((res) => {
|
|
|
|
|
|
|
+ .then(res => {
|
|
|
this.loading.close();
|
|
this.loading.close();
|
|
|
localStorage.removeItem("checkGoodsList");
|
|
localStorage.removeItem("checkGoodsList");
|
|
|
console.log(res);
|
|
console.log(res);
|
|
@@ -249,15 +308,15 @@ export default {
|
|
|
isBK: this.isBK,
|
|
isBK: this.isBK,
|
|
|
goodsId: this.checkGoodsList[0].learnGoodsId,
|
|
goodsId: this.checkGoodsList[0].learnGoodsId,
|
|
|
gradeId: this.checkGoodsList[0].learnGradeId,
|
|
gradeId: this.checkGoodsList[0].learnGradeId,
|
|
|
- orderGoodsId: this.checkGoodsList[0].learnOrderGoodsId,
|
|
|
|
|
|
|
+ orderGoodsId: this.checkGoodsList[0].learnOrderGoodsId
|
|
|
},
|
|
},
|
|
|
query: {
|
|
query: {
|
|
|
orderSn: this.orderSn,
|
|
orderSn: this.orderSn,
|
|
|
isBK: this.isBK,
|
|
isBK: this.isBK,
|
|
|
goodsId: this.checkGoodsList[0].learnGoodsId,
|
|
goodsId: this.checkGoodsList[0].learnGoodsId,
|
|
|
gradeId: this.checkGoodsList[0].learnGradeId,
|
|
gradeId: this.checkGoodsList[0].learnGradeId,
|
|
|
- orderGoodsId: this.checkGoodsList[0].learnOrderGoodsId,
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ orderGoodsId: this.checkGoodsList[0].learnOrderGoodsId
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
this.$router.replace({
|
|
this.$router.replace({
|
|
@@ -268,14 +327,14 @@ export default {
|
|
|
gradeId: this.checkGoodsList[0].gradeId,
|
|
gradeId: this.checkGoodsList[0].gradeId,
|
|
|
orderGoodsId: this.checkGoodsList[0].orderGoodsId,
|
|
orderGoodsId: this.checkGoodsList[0].orderGoodsId,
|
|
|
orderSn: this.orderSn,
|
|
orderSn: this.orderSn,
|
|
|
- total: this.total,
|
|
|
|
|
|
|
+ total: this.total
|
|
|
},
|
|
},
|
|
|
query: {
|
|
query: {
|
|
|
goodsId: this.checkGoodsList[0].goodsId,
|
|
goodsId: this.checkGoodsList[0].goodsId,
|
|
|
gradeId: this.checkGoodsList[0].gradeId,
|
|
gradeId: this.checkGoodsList[0].gradeId,
|
|
|
orderGoodsId: this.checkGoodsList[0].orderGoodsId,
|
|
orderGoodsId: this.checkGoodsList[0].orderGoodsId,
|
|
|
- orderSn: this.orderSn,
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ orderSn: this.orderSn
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
return;
|
|
return;
|
|
@@ -297,26 +356,26 @@ export default {
|
|
|
}, 1000);
|
|
}, 1000);
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- .catch((err) => {
|
|
|
|
|
|
|
+ .catch(err => {
|
|
|
this.loading.close();
|
|
this.loading.close();
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
if (err.code == 510) {
|
|
if (err.code == 510) {
|
|
|
this.$confirm(err.msg + "。点击确定跳转待支付订单列表", "提示", {
|
|
this.$confirm(err.msg + "。点击确定跳转待支付订单列表", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
|
|
|
|
+ cancelButtonText: "取消"
|
|
|
})
|
|
})
|
|
|
- .then((_) => {
|
|
|
|
|
|
|
+ .then(_ => {
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
|
- path: "/person-center/my-order",
|
|
|
|
|
|
|
+ path: "/person-center/my-order"
|
|
|
});
|
|
});
|
|
|
})
|
|
})
|
|
|
- .catch((_) => {});
|
|
|
|
|
|
|
+ .catch(_ => {});
|
|
|
// this.qrCodeShow = true;
|
|
// this.qrCodeShow = true;
|
|
|
} else {
|
|
} else {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
type: "warning",
|
|
type: "warning",
|
|
|
- message: err.msg,
|
|
|
|
|
|
|
+ message: err.msg
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
}, 500);
|
|
}, 500);
|
|
@@ -326,7 +385,7 @@ export default {
|
|
|
orderResumePCOrder() {
|
|
orderResumePCOrder() {
|
|
|
this.$request
|
|
this.$request
|
|
|
.orderResumePCOrder({ orderSn: this.orderSn })
|
|
.orderResumePCOrder({ orderSn: this.orderSn })
|
|
|
- .then((res) => {
|
|
|
|
|
|
|
+ .then(res => {
|
|
|
this.loading.close();
|
|
this.loading.close();
|
|
|
this.urlBase64 = res.data.urlBase64;
|
|
this.urlBase64 = res.data.urlBase64;
|
|
|
this.orderSn = res.data.orderSn;
|
|
this.orderSn = res.data.orderSn;
|
|
@@ -344,7 +403,7 @@ export default {
|
|
|
this.lastTime--;
|
|
this.lastTime--;
|
|
|
}, 1000);
|
|
}, 1000);
|
|
|
})
|
|
})
|
|
|
- .catch((err) => {
|
|
|
|
|
|
|
+ .catch(err => {
|
|
|
// this.loading.close();
|
|
// this.loading.close();
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -352,7 +411,7 @@ export default {
|
|
|
orderPayStatus() {
|
|
orderPayStatus() {
|
|
|
this.$request
|
|
this.$request
|
|
|
.orderPayStatus(this.orderSn)
|
|
.orderPayStatus(this.orderSn)
|
|
|
- .then((res) => {
|
|
|
|
|
|
|
+ .then(res => {
|
|
|
if (res.data) {
|
|
if (res.data) {
|
|
|
clearInterval(this.checkOrderTimer);
|
|
clearInterval(this.checkOrderTimer);
|
|
|
console.log(1);
|
|
console.log(1);
|
|
@@ -367,15 +426,15 @@ export default {
|
|
|
isBK: this.isBK,
|
|
isBK: this.isBK,
|
|
|
goodsId: this.checkGoodsList[0].learnGoodsId,
|
|
goodsId: this.checkGoodsList[0].learnGoodsId,
|
|
|
gradeId: this.checkGoodsList[0].learnGradeId,
|
|
gradeId: this.checkGoodsList[0].learnGradeId,
|
|
|
- orderGoodsId: this.checkGoodsList[0].learnOrderGoodsId,
|
|
|
|
|
|
|
+ orderGoodsId: this.checkGoodsList[0].learnOrderGoodsId
|
|
|
},
|
|
},
|
|
|
query: {
|
|
query: {
|
|
|
orderSn: this.orderSn,
|
|
orderSn: this.orderSn,
|
|
|
isBK: this.isBK,
|
|
isBK: this.isBK,
|
|
|
goodsId: this.checkGoodsList[0].learnGoodsId,
|
|
goodsId: this.checkGoodsList[0].learnGoodsId,
|
|
|
gradeId: this.checkGoodsList[0].learnGradeId,
|
|
gradeId: this.checkGoodsList[0].learnGradeId,
|
|
|
- orderGoodsId: this.checkGoodsList[0].learnOrderGoodsId,
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ orderGoodsId: this.checkGoodsList[0].learnOrderGoodsId
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
console.log(3);
|
|
console.log(3);
|
|
@@ -387,25 +446,25 @@ export default {
|
|
|
gradeId: this.checkGoodsList[0].gradeId,
|
|
gradeId: this.checkGoodsList[0].gradeId,
|
|
|
orderGoodsId: this.checkGoodsList[0].orderGoodsId,
|
|
orderGoodsId: this.checkGoodsList[0].orderGoodsId,
|
|
|
orderSn: this.orderSn,
|
|
orderSn: this.orderSn,
|
|
|
- total: this.total,
|
|
|
|
|
|
|
+ total: this.total
|
|
|
},
|
|
},
|
|
|
query: {
|
|
query: {
|
|
|
goodsId: this.checkGoodsList[0].goodsId,
|
|
goodsId: this.checkGoodsList[0].goodsId,
|
|
|
gradeId: this.checkGoodsList[0].gradeId,
|
|
gradeId: this.checkGoodsList[0].gradeId,
|
|
|
orderGoodsId: this.checkGoodsList[0].orderGoodsId,
|
|
orderGoodsId: this.checkGoodsList[0].orderGoodsId,
|
|
|
- orderSn: this.orderSn,
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ orderSn: this.orderSn
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
console.log(this.checkGoodsList);
|
|
console.log(this.checkGoodsList);
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- .catch((err) => {
|
|
|
|
|
|
|
+ .catch(err => {
|
|
|
console.log(err, "err");
|
|
console.log(err, "err");
|
|
|
});
|
|
});
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|