|
|
@ -47,7 +47,7 @@ |
|
|
|
<script> |
|
|
|
import { mapState, mapMutations } from 'vuex'; |
|
|
|
import BreadCrumb from 'components/BreadCrumb/BreadCrumb.vue'; |
|
|
|
import { front } from 'config/api'; |
|
|
|
import { SearchCar } from 'config/api'; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'Cart', |
|
|
@ -95,20 +95,22 @@ export default { |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: mapState('home', []), |
|
|
|
created() {}, |
|
|
|
created() { |
|
|
|
this.getData(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
...mapMutations('home', []), |
|
|
|
|
|
|
|
// 获取购物车列表 |
|
|
|
async getData() { |
|
|
|
try { |
|
|
|
this.setActIpCon(this.iptCon); |
|
|
|
const params = { param: {} }; |
|
|
|
// const res = await front(params); |
|
|
|
// const { data, msg, code } = res.data; |
|
|
|
// if (code === 200) { |
|
|
|
// this.lists = data.list; |
|
|
|
// this.total = parseInt(data.total); |
|
|
|
// } |
|
|
|
const params = { param: { pageNum: 1, pageSize: 10 } }; |
|
|
|
const res = await SearchCar(params); |
|
|
|
const { data, msg, code } = res.data; |
|
|
|
if (code === 200) { |
|
|
|
console.log('data: ', data); |
|
|
|
// this.lists = data.list; |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
console.log(error); |
|
|
|
} |
|
|
@ -117,7 +119,6 @@ export default { |
|
|
|
// 跳转到详情界面 |
|
|
|
jumpDetails(item) { |
|
|
|
console.log('item: ', item); |
|
|
|
// this.$router.push('/ActDetails'); |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|