|
@@ -474,6 +474,9 @@ export default {
|
|
|
return Number(special_value.replace("元", ""));
|
|
|
}
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+ this.popup()
|
|
|
+ },
|
|
|
methods: {
|
|
|
changeCoupon() {
|
|
|
if (this.availdCouponList.length <= 0) {
|
|
@@ -509,41 +512,43 @@ export default {
|
|
|
Number(this.product[this.selectedProduct].price.replace("元", ""))
|
|
|
);
|
|
|
},
|
|
|
+ popup() {
|
|
|
+ const from_where = this.$route.query.from_where;
|
|
|
+ const msg = "";
|
|
|
+ if(this.$route.query.isRecharge){
|
|
|
+ MessageBox({
|
|
|
+ title: "支付确认",
|
|
|
+ message:
|
|
|
+ '1.请在微信内完成支付,如果您已经支付成功,请点击"已完成支付"按钮</br>2.请确保微信版本高于6.0.2',
|
|
|
+ confirmButtonText: "已完成支付", //确认按钮的文本
|
|
|
+ cancelButtonText: "取消", //取消按钮的文本
|
|
|
+ confirmButtonHighlight: true, // 是否将确认按钮的文本加粗显示
|
|
|
+ showCancelButton: true,//是否显示取消按钮
|
|
|
+ showConfirmButton: true //是否显示确认按钮
|
|
|
+ }).then(action => {
|
|
|
+ if (action === "confirm") {
|
|
|
+ if (from_where && from_where === 1){
|
|
|
+ this.$router.replace({
|
|
|
+ name: Reader.name,
|
|
|
+ query: {
|
|
|
+ bid: this.$route.query.book_id,
|
|
|
+ cid: this.$route.query.chapter_id
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }else {
|
|
|
+ this.$router.back();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
pay() {
|
|
|
recharge({
|
|
|
product_id: this.product[this.selectedProduct].product_id,
|
|
|
bid: this.$route.query.book_id,
|
|
|
cid: this.$route.query.chapter_id,
|
|
|
use_coupon: this.currentCoupon.id
|
|
|
- });
|
|
|
- const from_where = this.$route.query.from_where;
|
|
|
- const msg = "";
|
|
|
- // this.setTimeout(() => {
|
|
|
- MessageBox({
|
|
|
- title: "支付确认",
|
|
|
- message:
|
|
|
- '1.请在微信内完成支付,如果您已经支付成功,请点击"已完成支付"按钮</br>2.请确保微信版本高于6.0.2',
|
|
|
- confirmButtonText: "已完成支付", //确认按钮的文本
|
|
|
- cancelButtonText: "取消", //取消按钮的文本
|
|
|
- confirmButtonHighlight: true, // 是否将确认按钮的文本加粗显示
|
|
|
- showCancelButton: true,//是否显示取消按钮
|
|
|
- showConfirmButton: true //是否显示确认按钮
|
|
|
- }).then(action => {
|
|
|
- if (action === "confirm") {
|
|
|
- if (from_where && from_where === 1){
|
|
|
- this.$router.replace({
|
|
|
- name: Reader.name,
|
|
|
- query: {
|
|
|
- bid: this.$route.query.book_id,
|
|
|
- cid: this.$route.query.chapter_id
|
|
|
- }
|
|
|
- });
|
|
|
- }else {
|
|
|
- this.$router.back();
|
|
|
- }
|
|
|
- }
|
|
|
})
|
|
|
- // }, 0);
|
|
|
},
|
|
|
payForYear() {
|
|
|
let product_id = this.product[this.product.length - 1].product_id;
|