西海岸-购物车收藏功能

This commit is contained in:
guoyue 2022-10-08 16:00:26 +08:00
parent f727efbdcd
commit c71784567c
4 changed files with 56 additions and 55 deletions

View File

@ -74,7 +74,8 @@ export function getHls(params) {
//
export function sgcInsert(data) {
return request({
url: '/resourcecar/insert',
// url: '/resourcecar/insert',
url: '/resourcecar/batchInsert', // 西-
method: 'post',
data,
})

View File

@ -452,15 +452,6 @@
>
批量预览
</a-button>
<!-- 批量预览 -->
<!-- <a-button
type="primary"
@click="batchPicturePreview"
class="buttonAdd"
v-else
>
批量预览
</a-button> -->
<!-- 添加至申购车 -->
<a-button
v-if="isXiHaiAn"
@ -1916,13 +1907,20 @@
//
const addShoppingCart = () => {
if (selectedList.value.length > 0) {
sgcInsert({
let _arr = []
selectedList.value.map(v => {
_arr.push({
delFlag: '0',
resourceId: '8888888880000000001',
note1: selectedList.value,
// userId: userId.value,
}).then((res) => {
console.log(res)
resourceId: v.idtCameraChannel,
note1: [v],
})
})
console.log('_arr------------>', _arr);
sgcInsert(_arr).then((res) => {
console.log('res------申购车------>', res);
if(res.data.code !== 0) {
return message.error(res.data.msg)
}
message.success('添加申购车成功!')
mybus.emit('getSgcNum')
})
@ -1958,7 +1956,7 @@
])
// 西--
if(isXiHaiAn) {
columns.value = columns.value.splice(2, 0, {
columns.value.splice(2, 0, {
title: '状态',
dataIndex: 'status',
width: '10%',

View File

@ -498,6 +498,8 @@
pageSize: pageSize.value,
name: name.value,
}).then((res) => {
console.log('res-----selectResourceCarGroupByDept------->', res);
let statistics = 0
res.data.data.list.map((val) => {
val.initLoading = true
@ -557,7 +559,7 @@
// deptid
const getListByDeptId = (item) => {
console.log(item, 'item')
if (item.children.length == 0) {
if (item.children && item.children.length == 0) {
selectResourceListByDept({
pageNum: item.pageNum,
pageSize: item.pageSize,

View File

@ -40,42 +40,42 @@
imgActive: require('@/assets/personalCenter/demandactive.png'),
key: 'PurchaseVehicle',
},
{
title: '我的发布',
img: require('@/assets/personalCenter/push.png'),
imgActive: require('@/assets/personalCenter/pushactive.png'),
key: 'push',
},
{
title: '我的申请',
img: require('@/assets/personalCenter/apply.png'),
imgActive: require('@/assets/personalCenter/applyactive.png'),
key: 'apply',
},
{
title: '我的收藏',
img: require('@/assets/personalCenter/collect.png'),
imgActive: require('@/assets/personalCenter/collectactive.png'),
key: 'collect',
},
{
title: '我的浏览',
img: require('@/assets/personalCenter/recent.png'),
imgActive: require('@/assets/personalCenter/recentactive.png'),
key: 'recent',
},
{
title: '我的需求',
img: require('@/assets/personalCenter/demand.png'),
imgActive: require('@/assets/personalCenter/demandactive.png'),
key: 'demand',
},
{
title: '我的评论',
img: require('@/assets/personalCenter/remark.png'),
imgActive: require('@/assets/personalCenter/remarkactive.png'),
key: 'remark',
},
// {
// title: '',
// img: require('@/assets/personalCenter/push.png'),
// imgActive: require('@/assets/personalCenter/pushactive.png'),
// key: 'push',
// },
// {
// title: '',
// img: require('@/assets/personalCenter/apply.png'),
// imgActive: require('@/assets/personalCenter/applyactive.png'),
// key: 'apply',
// },
// {
// title: '',
// img: require('@/assets/personalCenter/collect.png'),
// imgActive: require('@/assets/personalCenter/collectactive.png'),
// key: 'collect',
// },
// {
// title: '',
// img: require('@/assets/personalCenter/recent.png'),
// imgActive: require('@/assets/personalCenter/recentactive.png'),
// key: 'recent',
// },
// {
// title: '',
// img: require('@/assets/personalCenter/demand.png'),
// imgActive: require('@/assets/personalCenter/demandactive.png'),
// key: 'demand',
// },
// {
// title: '',
// img: require('@/assets/personalCenter/remark.png'),
// imgActive: require('@/assets/personalCenter/remarkactive.png'),
// key: 'remark',
// },
]
const selectedKeys = ref(['PurchaseVehicle'])
const type = JSON.parse(window.sessionStorage.getItem('type'))