| | |
| | | import { getReleaseProduct } from "@/api/product"; |
| | | import { resumeOrder } from "@/api/shopcart"; |
| | | import ConfirmOrder from "@/views/productDetail/components/ConfirmOrder"; |
| | | import { resumePay } from "@/api/order"; |
| | | |
| | | export default { |
| | | props: { |
| | |
| | | ConfirmOrder, |
| | | }, |
| | | created() { |
| | | this.data = this.dataInfo.data; |
| | | this.labels = this.dataInfo.labels; |
| | | this.cartItem.id = this.data.id; |
| | | this.getDevList(); |
| | | if (this.dataInfo.data.pics.length > 0) { |
| | | this.activeImg.url = this.dataInfo.data.pics[0].url; |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | data: this.dataInfo.data, |
| | | labels: this.dataInfo.labels, |
| | | data: {}, |
| | | labels: [], |
| | | cartItem: { |
| | | id: "", |
| | | productName: "", |
| | |
| | | this.activeImg.url = url; |
| | | }, |
| | | confirmNow() { |
| | | this.cartItem.totalPrice = this.computTotalPrice; |
| | | let products = [ |
| | | { |
| | | activateCode: this.cartItem.requestCode, |
| | |
| | | }).then((res) => { |
| | | if (res.success) { |
| | | this.orderId = res.data.orderId; |
| | | this.showOrder = true; |
| | | |
| | | if (this.data.priceBase == 0) { |
| | | resumePay({ orderId: this.orderId, payMethod: 5 }).then((res) => { |
| | | if (res.success) { |
| | | this.$router.push({ |
| | | path: "/personalCenter", |
| | | query: { |
| | | id: 1, |
| | | }, |
| | | }); |
| | | this.$notify({ |
| | | type: "success", |
| | | message: "成功试用", |
| | | duration: 2500, |
| | | offset: 57, |
| | | }); |
| | | } |
| | | }); |
| | | return; |
| | | } else { |
| | | this.showOrder = true; |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | |
| | | border: 1px solid #c0c5cc; |
| | | border-radius: 0; |
| | | } |
| | | |
| | | .el-tag { |
| | | margin-top: 0; |
| | | } |
| | | } |
| | | } |
| | | |