mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-16 23:53:48 +08:00
Merge remote-tracking branch 'origin/sit-Leung' into sit-jiamin-v2
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="rc-header">
|
||||
<Myheader></Myheader>
|
||||
</div>
|
||||
<div class="rc-main">
|
||||
<tabs></tabs>
|
||||
<Myheader></Myheader>
|
||||
<div class="rc-top"></div>
|
||||
<tabs :crumbs="crumbs"></tabs>
|
||||
|
||||
<div class="rc-main rc-max-width--xl">
|
||||
<div class="cart-list">
|
||||
<div class="header">
|
||||
<div class="list-left">
|
||||
@@ -114,12 +114,21 @@
|
||||
import Myheader from "~/components/header.vue";
|
||||
import MyFooter from '~/components/rc-footer.vue'
|
||||
import tabs from "@/components/tabs.vue";
|
||||
import { mapMutations } from "vuex";
|
||||
import { isexistCart, generateOrderWX, deleteCart } from "../../ajax/getData";
|
||||
export default {
|
||||
middleware: "metaTitle",
|
||||
meta: { title: "购物车" },
|
||||
data() {
|
||||
return {
|
||||
crumbs:[
|
||||
{
|
||||
path:'/productdetails/productlist/',
|
||||
},
|
||||
{
|
||||
path:'/myorder/userrecord/'
|
||||
}
|
||||
],
|
||||
ordersum: 1,
|
||||
usercheckbox: false,
|
||||
shopnum: 0,
|
||||
@@ -174,26 +183,26 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.carmessage();
|
||||
this.checkIsLogin();
|
||||
},
|
||||
|
||||
components: {
|
||||
Myheader,
|
||||
tabs,
|
||||
MyFooter,
|
||||
MyFooter
|
||||
},
|
||||
methods: {
|
||||
//请求猫
|
||||
|
||||
...mapMutations(["checkIsLogin"]),
|
||||
async carmessage() {
|
||||
let user = JSON.parse(localStorage.getItem("userInfo"));
|
||||
let user = this.$store.state.userInfo;
|
||||
this.userid = user.data.id;
|
||||
let data = await isexistCart(user.data.id);
|
||||
this.cartData = data;
|
||||
// this.goldmedal = data;
|
||||
},
|
||||
async userjie(list) {
|
||||
let user = JSON.parse(localStorage.getItem("userInfo"));
|
||||
console.log(user);
|
||||
let user = this.$store.state.userInfo;
|
||||
this.userid = user.data.id;
|
||||
let data = await generateOrderWX(list);
|
||||
if (data) {
|
||||
@@ -201,7 +210,6 @@ export default {
|
||||
type: "warning",
|
||||
message: data.msg,
|
||||
});
|
||||
console.log(data);
|
||||
this.$router.push({
|
||||
path: "/personal/settlement",
|
||||
query: {
|
||||
@@ -209,12 +217,11 @@ export default {
|
||||
},
|
||||
});
|
||||
}
|
||||
console.log(data);
|
||||
},
|
||||
|
||||
//删除购物车
|
||||
async deletsmessage(productCode) {
|
||||
let user = JSON.parse(localStorage.getItem("userInfo"));
|
||||
let user = this.$store.state.userInfo;
|
||||
this.userid = user.data.id;
|
||||
let data = await deleteCart( productCode);
|
||||
if (data) {
|
||||
@@ -287,7 +294,6 @@ export default {
|
||||
if (this.ys1 == false) {
|
||||
this.$nextTick(() => {
|
||||
this.userdelete = "删除";
|
||||
console.log(this.userdelete);
|
||||
});
|
||||
} else if (this.ys1 == true) {
|
||||
this.$nextTick(() => {
|
||||
@@ -504,10 +510,6 @@ export default {
|
||||
}
|
||||
}
|
||||
.rc-main {
|
||||
width: 92%;
|
||||
margin: 0 auto;
|
||||
padding-top: 60px;
|
||||
max-width: 1400px;
|
||||
.cart-list {
|
||||
width: 100%;
|
||||
border: 1px solid #d7d7d7;
|
||||
@@ -775,8 +777,8 @@ export default {
|
||||
width: 100%;
|
||||
}
|
||||
ul {
|
||||
margin-top: -32px;
|
||||
margin-left: 140px;
|
||||
margin-top: -2rem;
|
||||
margin-left: 9.75rem;
|
||||
width: 50%;
|
||||
.del {
|
||||
display: none;
|
||||
@@ -796,6 +798,7 @@ export default {
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
z-index: 10;
|
||||
margin-bottom:0;
|
||||
.rc-shop {
|
||||
display: none;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user