mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-16 23:53:48 +08:00
Payment bug fixed
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user