Quellcode durchsuchen

前端修改

wulanhaote
庞东旭 vor 3 Jahren
Ursprung
Commit
5c3cbd19c2
17 geänderte Dateien mit 447 neuen und 59 gelöschten Zeilen
  1. +1
    -1
      config/index.js
  2. +10
    -0
      src/api/index.js
  3. +10
    -0
      src/api/notice/index.js
  4. +4
    -0
      src/main.js
  5. +29
    -1
      src/router/index.js
  6. +9
    -0
      src/utils/data.js
  7. +81
    -25
      src/views/index.vue
  8. +43
    -22
      src/views/news/index.vue
  9. +10
    -3
      src/views/notice/index.vue
  10. +13
    -1
      src/views/project/projectDetail.vue
  11. +1
    -1
      src/views/supply/index.vue
  12. +2
    -2
      src/views/user/accountSetting/phoneInformation/index.vue
  13. +76
    -0
      src/views/user/bidding/index.vue
  14. +3
    -3
      src/views/user/index.vue
  15. +63
    -0
      src/views/user/interaction/index.vue
  16. +92
    -0
      src/views/user/supply/index.vue
  17. BIN
      static/images/zwtp.jpg

+ 1
- 1
config/index.js Datei anzeigen

@@ -12,7 +12,7 @@ module.exports = {
proxyTable: {
"/dev-api": {
// 请求的目标主机
target: 'http://192.168.31.107/api',
target: 'http://116.255.135.38:8081/nsgk_test/',
changeOrigin: true,
pathRewrite: {
'^/dev-api': ''


+ 10
- 0
src/api/index.js Datei anzeigen

@@ -0,0 +1,10 @@
import request from '@/utils/request'

//通讯录查询
export function newList(query) {
return request({
url: '/transaction/website/newsList',
method: 'get',
params: query
})
}

+ 10
- 0
src/api/notice/index.js Datei anzeigen

@@ -0,0 +1,10 @@
import request from '@/utils/request'

//通讯录查询
export function newList(query) {
return request({
url: '/transaction/website/outproject/publicity',
method: 'get',
params: query
})
}

+ 4
- 0
src/main.js Datei anzeigen

@@ -10,6 +10,10 @@ import 'amfe-flexible/index.js'
import './config/flexible'
import store from './store/'
import './permission' // permission control
import { getDicts } from "utils/data";

//全局方法挂载
Vue.prototype.getDicts = () => new getDicts();

// Vant 引用
import Vant from 'vant';


+ 29
- 1
src/router/index.js Datei anzeigen

@@ -97,7 +97,8 @@ export const constantRoutes = [
path: '/project/projectDetail',
name: 'projectDetail',
meta: {
title: '挂牌项目'
title: '挂牌项目',
hidden: true
},
component: (resolve) => require(['@/views/project/projectDetail'], resolve)
},
@@ -229,6 +230,33 @@ export const constantRoutes = [
hidden: true,
},
component: (resolve) => require(['@/views/user/accountSetting/phoneInformation/index'], resolve)
},
{
path: '/bidding',
name: 'bidding',
meta: {
title: '我的竞价',
hidden: true,
},
component: (resolve) => require(['@/views/user/bidding/index'], resolve)
},
{
path: '/userInteraction',
name: 'userInteraction',
meta: {
title: '我的咨询',
hidden: true,
},
component: (resolve) => require(['@/views/user/interaction/index'], resolve)
},
{
path: '/userSupply',
name: 'userSupply',
meta: {
title: '我的供求',
hidden: true,
},
component: (resolve) => require(['@/views/user/supply/index'], resolve)
}
];



+ 9
- 0
src/utils/data.js Datei anzeigen

@@ -0,0 +1,9 @@
import request from '@/utils/request'

//字典查询
export function getDicts(type) {
return request({
url: '/transaction/website/data/type/'+type,
method: 'get',
})
}

+ 81
- 25
src/views/index.vue Datei anzeigen

@@ -7,10 +7,10 @@
<van-col span="22" style="line-height: 29px;font-size: 20px;">农村产权交易平台</van-col>
</van-row>
<van-swipe class="my-swipe" :autoplay="3000" height="180" indicator-color="white">
<van-swipe-item><van-image src="../../static/images/index/banner.png" height="180" /></van-swipe-item>
<van-swipe-item><van-image src="../../static/images/index/banner.png" height="180" /></van-swipe-item>
<van-swipe-item><van-image src="../../static/images/index/banner.png" height="180" /></van-swipe-item>
<van-swipe-item><van-image src="../../static/images/index/banner.png" height="180" /></van-swipe-item>
<van-swipe-item v-for="item in bannerList" v-key="item.id">
<van-image :src="item.img" height="180" />
<p class="bannerTit">{{item.title}}</p>
</van-swipe-item>
</van-swipe>
<div style="border-radius: 10px;overflow: hidden;">
<van-grid :border="false" :column-num="3">
@@ -46,12 +46,13 @@
v-model="loading"
:finished="finished"
finished-text="没有更多了"
@load="getList()"
>
<!-- @load="newList"-->
<van-cell v-for="item in newList" :key="item.id" :title="item.title" :label="item.time">
<van-cell v-for="item in newList" :key="item.id" :title="item.title" :label="item.newsTime">
<!-- 使用 right-icon 插槽来自定义右侧图标 -->
<template #right-icon>
<van-image :src="item.image" class="search-icon" />
<van-image :src="item.img" class="search-icon" width="30%" />
</template>
</van-cell>
</van-list>
@@ -60,6 +61,7 @@
</template>

<script>
import { newList } from "@/api/index";
export default {
name: "index",
data() {
@@ -67,27 +69,68 @@ export default {
//是否显示加载
loading: false,
//是否滚动到底部
finished: true,
newList:[{
id:1,
title:'海勃湾区森林草原防火区划定:哪些地方 是重点防火区?严禁做什么?',
time:'2021-5-28 17:39:49',
image:'../../static/images/index/newImage.png'
},{
id:2,
title:'海勃湾区森林草原防火区划定:哪些地方 是重点防火区?严禁做什么?',
time:'2021-5-28 17:39:49',
image:'../../static/images/index/newImage.png'
},{
id:3,
title:'海勃湾区森林草原防火区划定:哪些地方 是重点防火区?严禁做什么?',
time:'2021-5-28 17:39:49',
image:'../../static/images/index/newImage.png'
}]
finished: false,
//查询参数
queryParams: {
pageNum: 1,
pageSize: 5,
deptId:100,
number:2
},
//新闻集合
newList:[],
//轮播图集合
bannerList:''
};
},
created() {},
methods: {},
created() {
//this.getList();
this.getBanner();
},
methods: {
getList(){
this.loading = true;
this.queryParams.number = 2 ;
this.queryParams.pageSize = 5 ;
newList(this.queryParams).then(response => {
console.log(response);
for (var i = 0; i < response.rows.length; i++) {
this.newList.push(response.rows[i]);
var imgStrs = response.rows[i].content.match(/<IMG src=\"([^\"]*?)\">/gi)
if (imgStrs != null && imgStrs != '') {
console.log(imgStrs[0].length-2)
console.log(imgStrs[0])
this.newList[i].img = imgStrs[0].substr(10,(imgStrs[0].length-12));
}
}
console.log(this.newList)
if(this.newList.length >= response.total){
this.finished = true;
return;
}
this.queryParams.pageNum += 1 ;
this.loading = false;
});
},
getBanner(){
this.loading = true;
this.queryParams.number = 1 ;
this.queryParams.pageSize = 5 ;
newList(this.queryParams).then(response => {
console.log(response);
this.bannerList = response.rows;
for (var i = 0; i < response.rows.length; i++) {
var imgStrs = response.rows[i].content.match(/<IMG src=\"([^\"]*?)\">/gi)
if (imgStrs != null && imgStrs != '') {
console.log(imgStrs[0].length-2)
console.log(imgStrs[0])
this.bannerList[i].img = imgStrs[0].substr(10,(imgStrs[0].length-12));
}
}
this.loading = false;
});
}
},
};
</script>

@@ -95,6 +138,19 @@ export default {
.app-container {
padding: 6% 3% 0;
}
.bannerTit{
position: absolute;
bottom: 0;
background: #000;
opacity: 0.5;
width: 100%;
height: 0.8rem;
line-height: 0.8rem;
color: #eee;
text-align: center;
overflow: hidden;
padding: 0 5%;
}
.link{
color: #000;
}


+ 43
- 22
src/views/news/index.vue Datei anzeigen

@@ -11,12 +11,13 @@
v-model="loading"
:finished="finished"
finished-text="没有更多了"
@load="getList()"
>
<!-- @load="newList"-->
<van-cell v-for="item in newList" :key="item.id" :title="item.title" :label="item.time">
<van-cell v-for="item in newList" :key="item.id" :title="item.title" :label="item.newsTime">
<!-- 使用 right-icon 插槽来自定义右侧图标 -->
<template #right-icon>
<van-image :src="item.image" class="search-icon" />
<van-image :src="item.img" class="search-icon" width="30%" style="margin-left: 10px;" />
</template>
</van-cell>
</van-list>
@@ -24,34 +25,54 @@
</template>

<script>
import { newList } from "@/api/index";
export default {
name: "project",
name: "news",
data() {
return {
//是否显示加载
loading: false,
//是否滚动到底部
finished: true,
newList:[{
id:1,
title:'海勃湾区森林草原防火区划定:哪些地方 是重点防火区?严禁做什么?',
time:'2021-5-28 17:39:49',
image:'../../static/images/index/newImage.png'
},{
id:2,
title:'海勃湾区森林草原防火区划定:哪些地方 是重点防火区?严禁做什么?',
time:'2021-5-28 17:39:49',
image:'../../static/images/index/newImage.png'
},{
id:3,
title:'海勃湾区森林草原防火区划定:哪些地方 是重点防火区?严禁做什么?',
time:'2021-5-28 17:39:49',
image:'../../static/images/index/newImage.png'
}]
finished: false,
//新闻集合
newList:[],
//查询参数
queryParams: {
pageNum: 1,
pageSize: 5,
deptId:100,
number:2
},
};
},
mounted() {},
methods: {},
created() {},
methods: {
onClickLeft(){
history.back(-1);
},
getList(){
this.loading = true;
newList(this.queryParams).then(response => {
console.log(response);
for (var i = 0; i < response.rows.length; i++) {
this.newList.push(response.rows[i]);
var imgStrs = response.rows[i].content.match(/<IMG src=\"([^\"]*?)\">/gi)
if (imgStrs != null && imgStrs != '') {
console.log(imgStrs[0].length-2)
console.log(imgStrs[0])
this.newList[i].img = imgStrs[0].substr(10,(imgStrs[0].length-12));
}
}
console.log(this.newList)
if(this.newList.length >= response.total){
this.finished = true;
return;
}
this.queryParams.pageNum += 1 ;
this.loading = false;
});
},
},
};
</script>



+ 10
- 3
src/views/notice/index.vue Datei anzeigen

@@ -6,7 +6,7 @@
fixed
placeholder
/>
<van-tabs animated color="#007b76" style="margin-top: 10px;">
<van-tabs animated type="card" color="#007b76" style="margin-top: 10px;">
<van-tab>
<template #title><van-icon name="newspaper-o" size="18" style="top: 4px"/>成交公告</template>
<van-list
@@ -62,6 +62,7 @@
</template>

<script>
import { newList } from "@/api/notice/index";
export default {
name: "notice",
data() {
@@ -72,8 +73,14 @@ export default {
finished: true,
};
},
mounted() {},
methods: {},
mounted() {
getDicts("project_type").then(response => {
console.log(response)
})
},
methods: {

},
};
</script>



+ 13
- 1
src/views/project/projectDetail.vue Datei anzeigen

@@ -1,5 +1,11 @@
<template>
<div class="app-container">
<van-nav-bar
title="项目详情"
left-arrow
fixed
placeholder
/>
<van-tabs scrollspy sticky color="#007b76" >
<van-tab title="竞拍信息" title-style="font-size:12px;">
<van-swipe class="my-swipe" height="235" indicator-color="white" @change="onChange">
@@ -215,6 +221,7 @@
</div>
</van-tab>
</van-tabs>
<div style="height: 2rem;"></div>
<div class="bottomBtn">
<van-row>
<van-col span="8" style="margin-top: 4px;" @click="showPopup">
@@ -264,7 +271,9 @@ export default {
show: false,
};
},
mounted() {},
mounted() {

},
methods: {
onChange(index) {
this.current = index;
@@ -384,6 +393,9 @@ export default {
.bottomBtn{
padding: 0.2rem 0.5rem;
background-color: #FFF;
position: fixed;
bottom: 0;
width: 100%;
}
.popup{
text-align: center;


+ 1
- 1
src/views/supply/index.vue Datei anzeigen

@@ -6,7 +6,7 @@
fixed
placeholder
/>
<van-tabs animated color="#007b76" style="margin-top: 10px;">
<van-tabs animated color="#007b76" type="card" style="margin-top: 10px;">
<van-tab>
<template #title><van-icon name="label" size="18" style="top: 4px"/>供应信息</template>
<van-list


+ 2
- 2
src/views/user/accountSetting/phoneInformation/index.vue Datei anzeigen

@@ -15,10 +15,10 @@
<p style="color: #007e72">免费获取短信验证码</p>
</template>
</van-field>
<div class="submit">
<div class="submit">
<van-button round block type="info" color="#007E72" native-type="submit">保存</van-button>
</div>
</van-form>
</van-form>
</div>
</template>



+ 76
- 0
src/views/user/bidding/index.vue Datei anzeigen

@@ -0,0 +1,76 @@
<template>
<div class="app-container" >
<van-nav-bar
title="我的竞价"
left-arrow
fixed
placeholder
@click-left="onClickLeft"
/>
<van-list
v-model="loading"
:finished="finished"
finished-text="没有更多了"
@load="onLoad"
class="biddingList"
>
<van-row>
<van-col span="11" style="font-size: 0.4rem;line-height: 0.65rem">管家堡乡张村张三丰500亩水田出租出</van-col>
<van-col span="13">
<van-row class="row">
<van-col span="9">距竞价结束</van-col>
<van-col span="15" class="col"><van-count-down :time="time" format="DD天HH时mm分ss秒" style="font-size: 0.2rem;color: #C21F3A" /></van-col>
</van-row>
<van-row class="row">
<van-col span="9">当前价格</van-col>
<van-col span="15" class="col"><span>500</span>元/亩/年</van-col>
</van-row>
<van-row class="row" style="margin: 0;">
<van-col span="9">我的出价</van-col>
<van-col span="15" class="col"><span>500</span>元/亩/年</van-col>
</van-row>
</van-col>
</van-row>
<van-divider :style="{borderColor:'#B4B4B4'}"/>

</van-list>
</div>
</template>

<script>
export default {
name: "notice",
data() {
return {
loading: false,
finished: true,
time: 30 * 60 * 60 * 1000,
};
},
created() {
},
methods: {},
};
</script>

<style scoped lang="scss">
.app-container {

}
.biddingList{
padding: 0.5rem 2% 0;
.van-row{
padding: 0 3%;
}
}
.row{
color: #666666;
margin-bottom: 5px;
}
.col{
color: #C21F3A;
span{
font-weight: bold;
}
}
</style>

+ 3
- 3
src/views/user/index.vue Datei anzeigen

@@ -18,9 +18,9 @@
</van-row>
</div>
<div style="width: 96%;transform: translateY(-30%);margin: 0 auto;border-radius: 0.4rem;overflow: hidden;">
<van-cell title="我的竞价" is-link icon="bar-chart-o" url="/vant/mobile.html" />
<van-cell title="我的咨询" is-link icon="service-o" to="index" />
<van-cell title="我的供求" is-link icon="bag-o" to="index" />
<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" />
</div>
</div>
</template>


+ 63
- 0
src/views/user/interaction/index.vue Datei anzeigen

@@ -0,0 +1,63 @@
<template>
<div class="app-container">
<van-nav-bar
title="我的咨询"
left-arrow
fixed
placeholder
/>
<van-list
v-model="loading"
:finished="finished"
finished-text="没有更多了"
style="margin-top: 10px;"
>
<van-cell>
<template #title>
<van-row>
<van-col span="20"><van-icon name="../../static/images/icon/questions.png" size="18" style="top: 5px;margin-right: 5px;"/>没拍到,钱怎么自动退回?</van-col>
<van-col span="4" style="text-align: right;font-size: 0.2rem;color: #007E72;">已回复</van-col>
</van-row>
</template>
<template #label>
<van-icon name="../../static/images/icon/answer.png" size="18" style="top: 5px;margin-right: 5px;"/>如果报名后未出价或者未竞价成功,保证金会在拍卖结束后的24小时内解冻。 钱款需要退回银行卡方法如下: 通过银行专用款项交保,请在支付宝app搜索“银行专用款项”,点击转出自行提现,无需手续费; 通过网银交保,保证金会在1-3个工作日内自动退回您的银行卡; 通过余额宝交保,请在支付宝app找到余额宝,点击转出; 通过余额交保,如果钱款是通过银行卡充值到余额的,请在自充值之日起30天内点击“免费退回”申请免手续费退回银行卡。
<van-row>
<van-col span="18">发布时间:2021-06-30</van-col>
<van-col span="3" style="color: #007E72;text-align: right;">
<van-icon name="edit" size="15" style="top:3px"/>修改
</van-col>
<van-col span="3" style="color: #007E72;text-align: right;">
<van-icon name="delete-o" size="15" style="top:3px"/>删除
</van-col>
</van-row>
<p></p>
</template>
</van-cell>

</van-list>
</div>
</template>

<script>
export default {
name: "notice",
data() {
return {
//是否显示加载
loading: false,
//是否滚动到底部
finished: true,
};
},
mounted() {},
methods: {},
};
</script>

<style scoped lang="scss">
.app-container {
}
.titleClass{

}
</style>

+ 92
- 0
src/views/user/supply/index.vue Datei anzeigen

@@ -0,0 +1,92 @@
<template>
<div class="app-container">
<van-nav-bar
title="我的供求"
left-arrow
fixed
placeholder
/>
<van-tabs animated color="#007b76" type="card" style="margin-top: 10px;">
<van-tab>
<template #title><van-icon name="label" size="18" style="top: 4px"/>供应信息</template>
<van-list
v-model="loading"
:finished="finished"
finished-text="没有更多了"
style="margin-top: 10px;"
>
<van-cell icon="play">
<template #title>
<span style="color: #007E72;">已审核</span> 海勃湾区森林草原防火区划定:哪些地方是重点防火区严禁做什么?
</template>
<template #label>
联系电话:13306310001 <p style="float: right;">发布时间:2021-06-30</p>
</template>
</van-cell>
<van-cell icon="play">
<template #title>
<span style="color: #c21F3a;">未审核</span> 海勃湾区森林草原防火区划定:哪些地方是重点防火区严禁做什么?
</template>
<template #label>
联系电话:13306310001 <p style="float: right;">发布时间:2021-06-30</p>
</template>
</van-cell>
<van-cell icon="play" title="海勃湾区森林草原防火区划定:哪些地方是重点防火区严禁做什么?">
<template #label>
联系电话:13306310001 <p style="float: right;">发布时间:2021-06-30</p>
</template>
</van-cell>
</van-list>
</van-tab>
<van-tab title="选项">
<template #title><van-icon name="bookmark" size="18" style="top: 4px"/>需求信息</template>
<van-list
v-model="loading"
:finished="finished"
finished-text="没有更多了"
style="margin-top: 10px;"
>
<van-cell icon="play" title="海勃湾区森林草原防火区划定:哪些地方是重点防火区严禁做什么?">
<template #label>
联系电话:13306310001 <p style="float: right;">发布时间:2021-06-30</p>
</template>
</van-cell>
<van-cell icon="play" title="海勃湾区森林草原防火区划定:哪些地方是重点防火区严禁做什么?">
<template #label>
联系电话:13306310001 <p style="float: right;">发布时间:2021-06-30</p>
</template>
</van-cell>
<van-cell icon="play" title="海勃湾区森林草原防火区划定:哪些地方是重点防火区严禁做什么?">
<template #label>
联系电话:13306310001 <p style="float: right;">发布时间:2021-06-30</p>
</template>
</van-cell>
</van-list>
</van-tab>
</van-tabs>
</div>
</template>

<script>
export default {
name: "notice",
data() {
return {
//是否显示加载
loading: false,
//是否滚动到底部
finished: true,
};
},
mounted() {},
methods: {},
};
</script>

<style scoped lang="scss">
.app-container {
}
.titleClass{

}
</style>

BIN
static/images/zwtp.jpg Datei anzeigen

Vorher Nachher
Breite: 444  |  Höhe: 297  |  Größe: 6.7 KiB

Laden…
Abbrechen
Speichern