Browse Source

前端接口对接

wulanhaote
庞东旭 3 years ago
parent
commit
c26e5744f3
5 changed files with 57 additions and 13 deletions
  1. +10
    -1
      src/api/user/index.js
  2. +1
    -1
      src/views/project/index.vue
  3. +4
    -4
      src/views/project/projectDetail.vue
  4. +9
    -1
      src/views/user/supply/index.vue
  5. +33
    -6
      src/views/user/supply/supplyAdd.vue

+ 10
- 1
src/api/user/index.js View File

@@ -56,7 +56,7 @@ export function userConsulting(query){
return request({ return request({
url: '/transaction/communicate/communicateList/member', url: '/transaction/communicate/communicateList/member',
method: 'get', method: 'get',
data: query
params: query
}) })
} }


@@ -90,6 +90,15 @@ export function supplyList(query){
return request({ return request({
url: '/transaction/demand/supplyDemandList/member', url: '/transaction/demand/supplyDemandList/member',
method: 'get', method: 'get',
params: query
})
}

//发布供求
export function userDemand(query){
return request({
url: '/transaction/demand',
method: 'post',
data: query data: query
}) })
} }

+ 1
- 1
src/views/project/index.vue View File

@@ -16,7 +16,7 @@
<van-dropdown-item v-model="value3" :options="option3" @change="getList"/> <van-dropdown-item v-model="value3" :options="option3" @change="getList"/>
</van-dropdown-menu> </van-dropdown-menu>
<van-list v-model="loading" :finished="finished" finished-text="没有更多了"> <van-list v-model="loading" :finished="finished" finished-text="没有更多了">
<router-link :to="{path:'project/projectDetail',query:{id:item.id}}" v-for="(item,index) in infoList">
<router-link :to="{path:'project/projectDetail',query:{id:item.id}}" v-for="(item,index) in infoList" :key="index">
<van-card :thumb="item.fileUrl?''+item.fileUrl:'../../static/images/index/projectImg.png'" > <van-card :thumb="item.fileUrl?''+item.fileUrl:'../../static/images/index/projectImg.png'" >
<template #tags> <template #tags>
<p class="title">【{{item.rollout}}】{{item.projectName}}</p> <p class="title">【{{item.rollout}}】{{item.projectName}}</p>


+ 4
- 4
src/views/project/projectDetail.vue View File

@@ -11,7 +11,7 @@
<van-tab title="竞拍信息" title-style="font-size:12px;"> <van-tab title="竞拍信息" title-style="font-size:12px;">
<van-swipe class="my-swipe" height="235" indicator-color="white" @change="onChange"> <van-swipe class="my-swipe" height="235" indicator-color="white" @change="onChange">
<template v-if="detail.fileUrlList !== undefined &&detail.fileUrlList.length>0"> <template v-if="detail.fileUrlList !== undefined &&detail.fileUrlList.length>0">
<van-swipe-item v-for="(item,index) in detail.fileUrlList"><van-image :src="item.fileUrl?''+item.fileUrl:'../../static/images/index/banner.png'" height="235" /></van-swipe-item>
<van-swipe-item v-for="(item,index) in detail.fileUrlList" :key="index"><van-image :src="item.fileUrl?''+item.fileUrl:'../../static/images/index/banner.png'" height="235" /></van-swipe-item>
</template> </template>
<template v-else> <template v-else>
<van-swipe-item><van-image src="../../static/images/index/banner.png" height="235" /></van-swipe-item> <van-swipe-item><van-image src="../../static/images/index/banner.png" height="235" /></van-swipe-item>
@@ -136,7 +136,7 @@
<van-row> <van-row>
<van-col span="24" style="color:#007E72;">标的物信息</van-col> <van-col span="24" style="color:#007E72;">标的物信息</van-col>
</van-row> </van-row>
<div class="project_info" v-for="(item,index) in detail.subjectList">
<div class="project_info" v-for="(item,index) in detail.subjectList" :key="index">
<van-row> <van-row>
<van-col span="14"><span>标的物名称</span>{{ item.landName }}</van-col> <van-col span="14"><span>标的物名称</span>{{ item.landName }}</van-col>
<van-col span="10"><span>面积/数量</span>{{ item.area }}{{item.areaUnit}}</van-col> <van-col span="10"><span>面积/数量</span>{{ item.area }}{{item.areaUnit}}</van-col>
@@ -150,7 +150,7 @@
<van-tab title="标的物图片" title-style="font-size:12px;"> <van-tab title="标的物图片" title-style="font-size:12px;">
<p class="delTitle">标的物图片</p> <p class="delTitle">标的物图片</p>
<template v-if="detail.fileUrlList !== undefined &&detail.fileUrlList.length>0"> <template v-if="detail.fileUrlList !== undefined &&detail.fileUrlList.length>0">
<van-image v-for="(item,index) in detail.fileUrlList" :src="item.fileUrl?''+item.fileUrl:'../../static/images/index/detailImg.png'" style="vertical-align: text-top;" />
<van-image v-for="(item,index) in detail.fileUrlList" :key="index" :src="item.fileUrl?''+item.fileUrl:'../../static/images/index/detailImg.png'" style="vertical-align: text-top;" />
</template> </template>
<template v-else> <template v-else>
<van-image src="../../static/images/index/detailImg.png" style="vertical-align: text-top;" /> <van-image src="../../static/images/index/detailImg.png" style="vertical-align: text-top;" />
@@ -172,7 +172,7 @@
<td>状态</td> <td>状态</td>
<td>出价时间</td> <td>出价时间</td>
</tr> </tr>
<tr v-for="(item,index) in this.biddinglistInformation">
<tr v-for="(item,index) in this.biddinglistInformation" :key="index">
<td>{{ item.userAccount }}</td> <td>{{ item.userAccount }}</td>
<td>{{ item.userName }}</td> <td>{{ item.userName }}</td>
<td>{{ item.money}}</td> <td>{{ item.money}}</td>


+ 9
- 1
src/views/user/supply/index.vue View File

@@ -25,9 +25,17 @@
</template> </template>
<template #label> <template #label>
联系电话:{{item.phone}} <p style="float: right;">发布时间:{{item.logintime}}</p> 联系电话:{{item.phone}} <p style="float: right;">发布时间:{{item.logintime}}</p>
<van-row style="margin-top: 5px;">
<van-col span="16"></van-col>
<van-col span="4" style="color: #007E72;text-align: right;" @click="goAdd('update',item.id)" v-if="item.reply == null">
<van-icon name="edit" size="15" style="top:3px"/>修改
</van-col>
<van-col span="4" style="color: #007E72;text-align: right;" @click="deleteInteraction(item.id)" v-if="item.reply == null">
<van-icon name="delete-o" size="15" style="top:3px"/>删除
</van-col>
</van-row>
</template> </template>
</van-cell> </van-cell>

</van-list> </van-list>
</van-tab> </van-tab>
<van-tab title="选项"> <van-tab title="选项">


+ 33
- 6
src/views/user/supply/supplyAdd.vue View File

@@ -8,10 +8,28 @@
@click-left="onClickLeft" @click-left="onClickLeft"
/> />
<van-form @submit="submitInteraction"> <van-form @submit="submitInteraction">
<van-field v-model="form.title" label="标题" placeholder="请输入标题" required :rules="[{ required:true }]"/>
<van-field
readonly
clickable
name="picker"
:value="value"
label="选择器"
placeholder="点击选择城市"
@click="showPicker = true"
/>
<van-popup v-model="showPicker" position="bottom">
<van-picker
show-toolbar
:columns="columns"
@confirm="onConfirm"
@cancel="showPicker = false"
/>
</van-popup>
<van-field v-model="form.projectName" label="项目名称" placeholder="请输入标题" required :rules="[{ required:true }]"/>
<van-field v-model="form.location" label="项目地址" placeholder="请输入标题" required :rules="[{ required:true }]"/>
<van-field v-model="form.realname" label="姓名" placeholder="请输入姓名" required :rules="[{ required:true }]"/> <van-field v-model="form.realname" label="姓名" placeholder="请输入姓名" required :rules="[{ required:true }]"/>
<van-field v-model="form.phone" label="联系电话" placeholder="请输入联系电话" required :rules="[{ required:true }]"/> <van-field v-model="form.phone" label="联系电话" placeholder="请输入联系电话" required :rules="[{ required:true }]"/>
<van-field v-model="form.content" label="咨询内容" type="textarea" autosize placeholder="请输入咨询内容" required :rules="[{ required:true }]"/>
<van-field v-model="form.projectContent" label="项目详情" type="textarea" autosize placeholder="请输入咨询内容" required :rules="[{ required:true }]"/>
<div class="submit"> <div class="submit">
<van-button round block type="info" color="#007E72" native-type="submit">发布</van-button> <van-button round block type="info" color="#007E72" native-type="submit">发布</van-button>
</div> </div>
@@ -20,7 +38,7 @@
</template> </template>


<script> <script>
import { getMember , userCommunicate , updateCommunicate , selectCommunicate } from "@/api/user/index";
import { getMember , userDemand , updateCommunicate , selectCommunicate } from "@/api/user/index";
import { getInfo } from "@/api/login/index"; import { getInfo } from "@/api/login/index";
import {Dialog} from "vant"; import {Dialog} from "vant";
export default { export default {
@@ -29,11 +47,15 @@ export default {
return { return {
height:0, height:0,
pageTit:'', pageTit:'',
value: '',
showPicker: false,
columns:['供应','需求'],
form:{ form:{
title:'',
projectName:'',
location:'',
realname:'', realname:'',
phone:'', phone:'',
content:'',
projectContent:'',
logintime:'', logintime:'',
deptId:100, deptId:100,
} }
@@ -51,6 +73,11 @@ export default {
} }
}, },
methods: { methods: {
onConfirm(value, index) {
this.value = value;
this.showPicker = false;
Toast(`当前值:${value}, 当前索引:${index}`);
},
getInfo(){ getInfo(){
getInfo().then(response => { getInfo().then(response => {
getMember(response.user.userId).then(response => { getMember(response.user.userId).then(response => {
@@ -85,7 +112,7 @@ export default {
} }
}); });
}else{ }else{
userCommunicate(this.form).then(response => {
userDemand(this.form).then(response => {
if (response.code == 200){ if (response.code == 200){
Dialog.confirm({ Dialog.confirm({
title: '系统提示', title: '系统提示',


Loading…
Cancel
Save