Payment bug fixed

This commit is contained in:
Vion
2022-01-23 21:10:24 +08:00
parent c5e5978615
commit 560d9b5c1c
7 changed files with 33 additions and 11 deletions

View File

@@ -155,7 +155,7 @@ import Myheader from "~/components/header.vue";
import { userin, memberAddress, generateOrderWX } from "../../ajax/getData";
import tabs from "@/components/tabs.vue";
import myAddress from "~/components/address.vue";
import { mapMutations } from "vuex";
import itemMixin from "../../../smart-admin-web/src/components/main/components/side-menu/item-mixin";
export default {
middleware: "metaTitle",
@@ -216,6 +216,7 @@ export default {
},
},
methods: {
...mapMutations(["checkIsLogin"]),
async getAddressList() {
let memberId = JSON.parse(localStorage.getItem("userInfo")).data.id;
let { data } = await memberAddress("getAll", { memberId: memberId });
@@ -295,6 +296,16 @@ export default {
},
async jiesuan() {
let orderAddress = this.useraddress.filter((item) => item.isDefault);
let userInfo = this.$store.state.userInfo;
if(!userInfo) {
this.$router.push({
path: "/userlogin/login",
query: {
},
});
return;
}
let postData = [];
this.goldmedal.forEach((item) => {
let basePoint = (item.basePoint?item.basePoint:0);
@@ -304,8 +315,8 @@ export default {
buyCount: item.buyCount,
productId: item.productCode,
payAmount: item.productPrice,
memberId: item.memberId,
phoneNumber: item.mobile,
memberId: userInfo.data.id,
phoneNumber: userInfo.data.mobile,
// couponId: "NGQ2022P12",
// couponTypeId: "4",
// couponName: "内购券",
@@ -402,6 +413,7 @@ export default {
mounted() {
this.goldmedal = JSON.parse(this.$route.query.list);
this.getAddressList();
this.checkIsLogin();
// this.addressstype = this.$route.query.stype;
// this.orderNumber = this.$route.query.orderNumber;
// this.canceldanhao(this.orderNumber);

View File

@@ -65,7 +65,7 @@
</div>
<div class="pc-bottom">
<span @click="userpay(item, index)">{{
<span v-if="item.status!=1" @click="userpay(item, index)">{{
item.status == "0"
? "取消订单"
: item.status == "1"