Pārlūkot izejas kodu

产交我的报名

rongxin_prod
庞东旭 pirms 1 gada
vecāks
revīzija
231f0b9a9a
4 mainītis faili ar 127 papildinājumiem un 1 dzēšanām
  1. +9
    -0
      src/api/user/index.js
  2. +9
    -0
      src/router/index.js
  3. +107
    -0
      src/views/user/application/index.vue
  4. +2
    -1
      src/views/user/index.vue

+ 9
- 0
src/api/user/index.js Parādīt failu

@@ -107,6 +107,15 @@ export function supplyList(query){
})
}

//查询我的报名
export function getSignupByMemberId(query){
return request({
url: '/transaction/signup/getSignupByMemberId',
method: 'get',
params: query
})
}

//发布供求
export function userDemand(query){
return request({


+ 9
- 0
src/router/index.js Parādīt failu

@@ -344,6 +344,15 @@ export const constantRoutes = [
},
component: (resolve) => require(['@/views/user/supply/index'], resolve)
},
{
path: '/application',
name: 'application',
meta: {
title: '我的供求',
hidden: true,
},
component: (resolve) => require(['@/views/user/application/index'], resolve)
},
{
path: '/policy',
name: 'policy',


+ 107
- 0
src/views/user/application/index.vue Parādīt failu

@@ -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>

+ 2
- 1
src/views/user/index.vue Parādīt failu

@@ -21,10 +21,11 @@
</van-col>
</van-row>
</div>
<div style="width: 96%;transform: translateY(-20%);margin: 0 auto;border-radius: 0.4rem;overflow: hidden;">
<div style="width: 96%;transform: translateY(-18%);margin: 0 auto;border-radius: 0.4rem;overflow: hidden;">
<van-cell title="我的竞价" is-link icon="bar-chart-o" to="bidding" />
<van-cell title="我的咨询" is-link icon="service-o" to="userInteraction" />
<van-cell title="我的供求" is-link icon="bag-o" to="userSupply" />
<van-cell title="我的报名" is-link icon="balance-list-o" to="application" />
<van-cell title="合同网签" is-link icon="orders-o" to="/user/signature/signatureList" />
</div>
<van-button class="loginOut" round color="#007E72" @click="loginOut">


Notiek ielāde…
Atcelt
Saglabāt