mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 02:06:38 +08:00
Payment bug fixed
This commit is contained in:
parent
c5e5978615
commit
560d9b5c1c
@ -317,7 +317,7 @@ picture {
|
||||
height: auto;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 30%;
|
||||
top: 40%;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.16);
|
||||
border-radius: .25rem;
|
||||
|
@ -380,7 +380,8 @@ border-radius: 100px;
|
||||
@media screen and (min-width: 768px){
|
||||
.usersearch {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
overflow: hidden;
|
||||
.ts-scrollable-container{
|
||||
h2{
|
||||
|
@ -274,6 +274,15 @@ export default {
|
||||
// });
|
||||
},
|
||||
plus(num, index) {
|
||||
let leftAllotment = this.cartData[index].leftAllotment;
|
||||
if(this.cartData[index].buyCount >= leftAllotment) {
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: "已达到本品最大购买上限",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
this.cartData[index].buyCount =
|
||||
parseInt(this.cartData[index].buyCount) + 1;
|
||||
},
|
||||
|
@ -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"
|
||||
|
@ -135,7 +135,7 @@
|
||||
<i class="ts-row-title">商品规格:</i>
|
||||
</div>
|
||||
<div class="ts-tag-list">
|
||||
<em v-for="(item, index) in newlist" :key="index" @click="selectsearch(item, index)" :class="[activeIndexa==index?'active':'unactive',item.leftAllotment>0?'':'disabled']">
|
||||
<em v-for="(item, index) in newlist" :key="index" @click="selectsearch(item, index)" :class="[(activeIndexa==index && item.leftAllotment>0)?'active':'unactive',item.leftAllotment>0?'':'disabled']">
|
||||
{{ item.specifications }}
|
||||
</em>
|
||||
</div>
|
||||
@ -192,7 +192,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="rc-button" v-if="userbuy">
|
||||
<div class="rc-button" v-if="(userbuy && curItem.leftAllotment>0)">
|
||||
<span @click="usertanchu(curItem, 0)">加入购物车</span>
|
||||
<span @click="usertanchu(curItem, 1)">立即购买</span>
|
||||
</div>
|
||||
@ -254,7 +254,7 @@
|
||||
</nuxt-link>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<div class="rc-button rc-md-down">
|
||||
<div class="rc-button rc-md-down" v-if="(userbuy && curItem.leftAllotment>0)">
|
||||
<span @click="usertanchu(curItem, 0)">加入购物车</span>
|
||||
<span @click="usertanchu(curItem, 1)">立即购买</span>
|
||||
</div>
|
||||
|
@ -38,7 +38,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="usersearch">
|
||||
<div class="usersearch rc-margin-top--md">
|
||||
<div class="usercontentshow" ref="usercontent">
|
||||
<div class="usercontentshow rc-product">
|
||||
<h2>我想搜</h2>
|
||||
@ -118,7 +118,7 @@
|
||||
</div>
|
||||
<div class="rc-column">
|
||||
<div class="rc-click" @click="selectproduce(item)">
|
||||
<span>{{ item.categoryName }}</span>
|
||||
<span>{{ item.name }}</span>
|
||||
<i>{{ item.ecPrice?("¥"+item.ecPrice):'' }}</i>
|
||||
</div>
|
||||
<strong
|
||||
|
Loading…
Reference in New Issue
Block a user