|
|
@@ -0,0 +1,107 @@ |
|
|
|
<template> |
|
|
|
<div class="app-container"> |
|
|
|
<van-nav-bar |
|
|
|
title="我的报名" |
|
|
|
right-text="发布" |
|
|
|
left-arrow |
|
|
|
fixed |
|
|
|
placeholder |
|
|
|
@click-left="goClickLeft" |
|
|
|
@click-right="goAdd" |
|
|
|
/> |
|
|
|
<van-list |
|
|
|
v-model="loading" |
|
|
|
:finished="finished" |
|
|
|
finished-text="没有更多了" |
|
|
|
style="margin-top: 10px;" |
|
|
|
> |
|
|
|
<van-cell icon="play" v-for="(item , index) in supplyList" :key="index" :to="{path:'project/projectDetail',query:{id:item.projectId}}"> |
|
|
|
<template #title> |
|
|
|
<span :style="{color:item.depositStatus == '1' ? '#007E72':'#c21F3a'}">{{item.depositStatus == '1' ? '报名成功':'报名失败'}}</span> {{item.projectName}} |
|
|
|
</template> |
|
|
|
<template #label> |
|
|
|
<p>开始时间:{{item.biddingStartTime}}</p> |
|
|
|
<p>结束时间:{{item.biddingStopTime}}</p> |
|
|
|
</template> |
|
|
|
</van-cell> |
|
|
|
</van-list> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { getMember , getSignupByMemberId , deleteSupply} from "@/api/user/index"; |
|
|
|
import { getInfo } from "@/api/login/index"; |
|
|
|
import {Dialog} from "vant"; |
|
|
|
export default { |
|
|
|
name: "userSupply", |
|
|
|
data() { |
|
|
|
return { |
|
|
|
//是否显示加载 |
|
|
|
loading: false, |
|
|
|
//是否滚动到底部 |
|
|
|
finished: false, |
|
|
|
//数据集合 |
|
|
|
supplyList:[], |
|
|
|
//查询参数 |
|
|
|
queryParams:{ |
|
|
|
memberId:'', |
|
|
|
} |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getInfo(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
goAdd(type,id){ |
|
|
|
console.log(id) |
|
|
|
if (id == undefined){ |
|
|
|
window.location='supplyAdd'; |
|
|
|
}else{ |
|
|
|
window.location='supplyAdd?type='+type+'&id='+id; |
|
|
|
} |
|
|
|
}, |
|
|
|
goClickLeft(){ |
|
|
|
window.location='user'; |
|
|
|
}, |
|
|
|
getInfo(){ |
|
|
|
getInfo().then(response => { |
|
|
|
getMember(response.user.userId).then(response => { |
|
|
|
this.queryParams.memberId = response.data.id; |
|
|
|
this.getList(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
getList(){ |
|
|
|
this.loading = true; |
|
|
|
getSignupByMemberId(this.queryParams).then(response => { |
|
|
|
console.log(response) |
|
|
|
for (var i = 0; i < response.rows.length; i++) { |
|
|
|
this.supplyList.push(response.rows[i]); |
|
|
|
} |
|
|
|
this.finished = true; |
|
|
|
this.loading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
deleteSupply(id){ |
|
|
|
Dialog.confirm({ |
|
|
|
title: '系统提示', |
|
|
|
message: '是否删除?', |
|
|
|
confirmButtonText: '确定', |
|
|
|
}).then(() => { |
|
|
|
deleteSupply(id).then(response => { |
|
|
|
Dialog.confirm({ |
|
|
|
title: '系统提示', |
|
|
|
message: '删除成功', |
|
|
|
confirmButtonText: '确定', |
|
|
|
showCancelButton:false |
|
|
|
}).then(() => { |
|
|
|
this.supplyList = []; |
|
|
|
this.getList(); |
|
|
|
}) |
|
|
|
}); |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |