|
@@ -20,10 +20,10 @@
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :md="4">
|
|
<el-col :md="4">
|
|
|
- <el-image :src="scope.row.coverUrl" min-width="30" height="20" />
|
|
|
|
|
|
|
+ <el-image :src="scope.row.picUrl" min-width="30" height="20" />
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :md="20">
|
|
<el-col :md="20">
|
|
|
- <router-link target="_blank" style="text-decoration-line: none" :to="`/mall/item?id=${scope.row.productId}`">
|
|
|
|
|
|
|
+ <router-link target="_blank" style="text-decoration-line: none" :to="`/mall/item?id=${scope.row.itemId}`">
|
|
|
<span>{{scope.row.title}}</span>
|
|
<span>{{scope.row.title}}</span>
|
|
|
</router-link>
|
|
</router-link>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -110,6 +110,7 @@ import {
|
|
|
getFolderTree,
|
|
getFolderTree,
|
|
|
moveDiskFile
|
|
moveDiskFile
|
|
|
} from "@/api/disk";
|
|
} from "@/api/disk";
|
|
|
|
|
+import {getCartItems} from "@/api/mall";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'Cart',
|
|
name: 'Cart',
|
|
@@ -120,69 +121,26 @@ export default {
|
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
|
totalSize: 0,
|
|
totalSize: 0,
|
|
|
- dataList: [
|
|
|
|
|
- {
|
|
|
|
|
- productId: 1,
|
|
|
|
|
- title: '莽牛MN78长续航电池7.4V2500毫安MN99S兰达科技P06大容量MN82锂电',
|
|
|
|
|
- price: 1.11,
|
|
|
|
|
- num: 1,
|
|
|
|
|
- coverUrl: '//pic4.zhimg.com/v2-40c2552d5f3f63c181c19d66644de7e9_r.jpg',
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- productId: 2,
|
|
|
|
|
- title: '莽牛MN78长续航电池7.4V2500毫安MN99S兰达科技P06大容量MN82锂电',
|
|
|
|
|
- price: 2.32,
|
|
|
|
|
- num: 1,
|
|
|
|
|
- coverUrl: '//pic4.zhimg.com/v2-40c2552d5f3f63c181c19d66644de7e9_r.jpg',
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- productId: 3,
|
|
|
|
|
- title: '莽牛MN78长续航电池7.4V2500毫安MN99S兰达科技P06大容量MN82锂电',
|
|
|
|
|
- price: 11.12,
|
|
|
|
|
- num: 3,
|
|
|
|
|
- coverUrl: '//pic4.zhimg.com/v2-40c2552d5f3f63c181c19d66644de7e9_r.jpg',
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- productId: 4,
|
|
|
|
|
- title: '莽牛MN78长续航电池7.4V2500毫安MN99S兰达科技P06大容量MN82锂电',
|
|
|
|
|
- price: 12.22,
|
|
|
|
|
- num: 4,
|
|
|
|
|
- coverUrl: '//pic4.zhimg.com/v2-40c2552d5f3f63c181c19d66644de7e9_r.jpg',
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
|
|
+ dataList: [],
|
|
|
checked: false,
|
|
checked: false,
|
|
|
- searchForm: {
|
|
|
|
|
- page: 1,
|
|
|
|
|
- path: '/',
|
|
|
|
|
- fileType: '0',
|
|
|
|
|
- filename: null
|
|
|
|
|
- },
|
|
|
|
|
multipleSelection: [],
|
|
multipleSelection: [],
|
|
|
totalSelected: 0,
|
|
totalSelected: 0,
|
|
|
totalPrice: '0.00'
|
|
totalPrice: '0.00'
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
- const path = this.$route.query.path
|
|
|
|
|
- if (path !== undefined && path !== null) {
|
|
|
|
|
- this.searchForm.path = path
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
document.title = '购物车'
|
|
document.title = '购物车'
|
|
|
- // this.getData(this.searchForm)
|
|
|
|
|
|
|
+ this.getData()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
handleCurrentChange(pageNumber) {
|
|
handleCurrentChange(pageNumber) {
|
|
|
this.currentPage = pageNumber
|
|
this.currentPage = pageNumber
|
|
|
- this.searchForm.page = this.currentPage
|
|
|
|
|
- this.getData(this.searchForm)
|
|
|
|
|
|
|
+ this.getData()
|
|
|
},
|
|
},
|
|
|
getData() {
|
|
getData() {
|
|
|
- this.dataList = []
|
|
|
|
|
- getFileList(this.searchForm).then(resp => {
|
|
|
|
|
|
|
+ getCartItems().then(resp => {
|
|
|
if (resp.code === 0) {
|
|
if (resp.code === 0) {
|
|
|
- this.dataList = resp.data.fileList.list
|
|
|
|
|
- this.totalSize = resp.data.fileList.totalSize
|
|
|
|
|
|
|
+ this.dataList = resp.data
|
|
|
} else {
|
|
} else {
|
|
|
this.$notify({
|
|
this.$notify({
|
|
|
title: '提示',
|
|
title: '提示',
|
|
@@ -200,20 +158,8 @@ export default {
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- getDetail(fileId) {
|
|
|
|
|
- getFileDetail(fileId).then(resp => {
|
|
|
|
|
- if (resp.code === 0) {
|
|
|
|
|
- console.log(resp.data)
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
cache(row) {
|
|
cache(row) {
|
|
|
},
|
|
},
|
|
|
- search() {
|
|
|
|
|
- this.currentPage = 1
|
|
|
|
|
- this.searchForm.page = this.currentPage
|
|
|
|
|
- this.getData(this.searchForm)
|
|
|
|
|
- },
|
|
|
|
|
handleSelectionChange(val) {
|
|
handleSelectionChange(val) {
|
|
|
this.multipleSelection = val
|
|
this.multipleSelection = val
|
|
|
},
|
|
},
|
|
@@ -249,6 +195,7 @@ export default {
|
|
|
console.log(value);
|
|
console.log(value);
|
|
|
},
|
|
},
|
|
|
buy() {
|
|
buy() {
|
|
|
|
|
+ console.log(this.multipleSelection)
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
|
path: '/mall/order/confirm',
|
|
path: '/mall/order/confirm',
|
|
|
query: {
|
|
query: {
|