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;
|
height: auto;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: 30%;
|
top: 40%;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.16);
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.16);
|
||||||
border-radius: .25rem;
|
border-radius: .25rem;
|
||||||
|
@ -380,7 +380,8 @@ border-radius: 100px;
|
|||||||
@media screen and (min-width: 768px){
|
@media screen and (min-width: 768px){
|
||||||
.usersearch {
|
.usersearch {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0 auto;
|
margin-left:auto;
|
||||||
|
margin-right:auto;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
.ts-scrollable-container{
|
.ts-scrollable-container{
|
||||||
h2{
|
h2{
|
||||||
|
@ -274,6 +274,15 @@ export default {
|
|||||||
// });
|
// });
|
||||||
},
|
},
|
||||||
plus(num, index) {
|
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 =
|
this.cartData[index].buyCount =
|
||||||
parseInt(this.cartData[index].buyCount) + 1;
|
parseInt(this.cartData[index].buyCount) + 1;
|
||||||
},
|
},
|
||||||
|
@ -155,7 +155,7 @@ import Myheader from "~/components/header.vue";
|
|||||||
import { userin, memberAddress, generateOrderWX } from "../../ajax/getData";
|
import { userin, memberAddress, generateOrderWX } from "../../ajax/getData";
|
||||||
import tabs from "@/components/tabs.vue";
|
import tabs from "@/components/tabs.vue";
|
||||||
import myAddress from "~/components/address.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";
|
import itemMixin from "../../../smart-admin-web/src/components/main/components/side-menu/item-mixin";
|
||||||
export default {
|
export default {
|
||||||
middleware: "metaTitle",
|
middleware: "metaTitle",
|
||||||
@ -216,6 +216,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapMutations(["checkIsLogin"]),
|
||||||
async getAddressList() {
|
async getAddressList() {
|
||||||
let memberId = JSON.parse(localStorage.getItem("userInfo")).data.id;
|
let memberId = JSON.parse(localStorage.getItem("userInfo")).data.id;
|
||||||
let { data } = await memberAddress("getAll", { memberId: memberId });
|
let { data } = await memberAddress("getAll", { memberId: memberId });
|
||||||
@ -295,6 +296,16 @@ export default {
|
|||||||
},
|
},
|
||||||
async jiesuan() {
|
async jiesuan() {
|
||||||
let orderAddress = this.useraddress.filter((item) => item.isDefault);
|
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 = [];
|
let postData = [];
|
||||||
this.goldmedal.forEach((item) => {
|
this.goldmedal.forEach((item) => {
|
||||||
let basePoint = (item.basePoint?item.basePoint:0);
|
let basePoint = (item.basePoint?item.basePoint:0);
|
||||||
@ -304,8 +315,8 @@ export default {
|
|||||||
buyCount: item.buyCount,
|
buyCount: item.buyCount,
|
||||||
productId: item.productCode,
|
productId: item.productCode,
|
||||||
payAmount: item.productPrice,
|
payAmount: item.productPrice,
|
||||||
memberId: item.memberId,
|
memberId: userInfo.data.id,
|
||||||
phoneNumber: item.mobile,
|
phoneNumber: userInfo.data.mobile,
|
||||||
// couponId: "NGQ2022P12",
|
// couponId: "NGQ2022P12",
|
||||||
// couponTypeId: "4",
|
// couponTypeId: "4",
|
||||||
// couponName: "内购券",
|
// couponName: "内购券",
|
||||||
@ -402,6 +413,7 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.goldmedal = JSON.parse(this.$route.query.list);
|
this.goldmedal = JSON.parse(this.$route.query.list);
|
||||||
this.getAddressList();
|
this.getAddressList();
|
||||||
|
this.checkIsLogin();
|
||||||
// this.addressstype = this.$route.query.stype;
|
// this.addressstype = this.$route.query.stype;
|
||||||
// this.orderNumber = this.$route.query.orderNumber;
|
// this.orderNumber = this.$route.query.orderNumber;
|
||||||
// this.canceldanhao(this.orderNumber);
|
// this.canceldanhao(this.orderNumber);
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pc-bottom">
|
<div class="pc-bottom">
|
||||||
<span @click="userpay(item, index)">{{
|
<span v-if="item.status!=1" @click="userpay(item, index)">{{
|
||||||
item.status == "0"
|
item.status == "0"
|
||||||
? "取消订单"
|
? "取消订单"
|
||||||
: item.status == "1"
|
: item.status == "1"
|
||||||
|
@ -135,7 +135,7 @@
|
|||||||
<i class="ts-row-title">商品规格:</i>
|
<i class="ts-row-title">商品规格:</i>
|
||||||
</div>
|
</div>
|
||||||
<div class="ts-tag-list">
|
<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 }}
|
{{ item.specifications }}
|
||||||
</em>
|
</em>
|
||||||
</div>
|
</div>
|
||||||
@ -192,7 +192,7 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</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, 0)">加入购物车</span>
|
||||||
<span @click="usertanchu(curItem, 1)">立即购买</span>
|
<span @click="usertanchu(curItem, 1)">立即购买</span>
|
||||||
</div>
|
</div>
|
||||||
@ -254,7 +254,7 @@
|
|||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</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, 0)">加入购物车</span>
|
||||||
<span @click="usertanchu(curItem, 1)">立即购买</span>
|
<span @click="usertanchu(curItem, 1)">立即购买</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="usersearch">
|
<div class="usersearch rc-margin-top--md">
|
||||||
<div class="usercontentshow" ref="usercontent">
|
<div class="usercontentshow" ref="usercontent">
|
||||||
<div class="usercontentshow rc-product">
|
<div class="usercontentshow rc-product">
|
||||||
<h2>我想搜</h2>
|
<h2>我想搜</h2>
|
||||||
@ -118,7 +118,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="rc-column">
|
<div class="rc-column">
|
||||||
<div class="rc-click" @click="selectproduce(item)">
|
<div class="rc-click" @click="selectproduce(item)">
|
||||||
<span>{{ item.categoryName }}</span>
|
<span>{{ item.name }}</span>
|
||||||
<i>{{ item.ecPrice?("¥"+item.ecPrice):'' }}</i>
|
<i>{{ item.ecPrice?("¥"+item.ecPrice):'' }}</i>
|
||||||
</div>
|
</div>
|
||||||
<strong
|
<strong
|
||||||
|
Loading…
Reference in New Issue
Block a user