Commit 71d69b01 authored by lixy's avatar lixy

入股+地图

parent c7502836
...@@ -46,7 +46,11 @@ ...@@ -46,7 +46,11 @@
provinceName(newValue, oldValue) { provinceName(newValue, oldValue) {
console.log(this.provinceName); console.log(this.provinceName);
if(this.map){ if(this.map){
this.map.centerAndZoom(this.provinceName,6); if(this.provinceName == "兰州"){
this.map.centerAndZoom("兰州",4);
} else {
this.map.centerAndZoom(this.provinceName,6);
}
} }
}, },
}, },
...@@ -83,7 +87,7 @@ ...@@ -83,7 +87,7 @@
const bounds = map.getBounds(); const bounds = map.getBounds();
for (let i = 0; i < list.length; i++) { for (let i = 0; i < list.length; i++) {
const point = { const point = {
title: list[i].name, title: "",//list[i].name
point: { point: {
lng: list[i].longitude, lng: list[i].longitude,
lat: list[i].latitude lat: list[i].latitude
......
...@@ -284,6 +284,10 @@ ...@@ -284,6 +284,10 @@
}, },
getValue(e){ getValue(e){
let that = this; let that = this;
if(!e){
//全部
that.provinceName = "兰州";
}
this.listQuery.addrCity = undefined; this.listQuery.addrCity = undefined;
this.provinceRegions.map(function(item){ this.provinceRegions.map(function(item){
if(item.id == that.listQuery.addrProvince){ if(item.id == that.listQuery.addrProvince){
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</div> </div>
<div class="ft12">剩余:{{item.balance}}</div> <div class="ft12">剩余:{{item.balance}}</div>
</div> </div>
<div class="ft20">{{item.price}}w/股</div> <div class="ft20">{{item.price}}/股</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
.then(response => { .then(response => {
let arr = []; let arr = [];
response.data.map(function(item){ response.data.map(function(item){
item = item / 10000+"w"; item = item / 10000+"";
arr.push(item); arr.push(item);
}); });
that.allStockPrice = arr; that.allStockPrice = arr;
...@@ -174,8 +174,14 @@ ...@@ -174,8 +174,14 @@
* @param target * @param target
*/ */
getStartValue() { getStartValue() {
this.listQuery.priceEnd = this.listQuery.priceStart.substring(0,this.listQuery.priceStart.length-1)*10000; this.listQuery.priceEnd = this.listQuery.priceStart;
this.listQuery.priceStart = this.listQuery.priceStart.substring(0,this.listQuery.priceStart.length-1)*10000; // if(this.listQuery.priceStart){
// this.listQuery.priceEnd = this.listQuery.priceStart.substring(0,this.listQuery.priceStart.length-1)*10000;
// this.listQuery.priceStart = this.listQuery.priceStart.substring(0,this.listQuery.priceStart.length-1)*10000;
// } else {
// this.listQuery.priceEnd = this.listQuery.priceStart;
// }
// if (this.listQuery.priceStart >= this.listQuery.priceEnd) { // if (this.listQuery.priceStart >= this.listQuery.priceEnd) {
// this.listQuery.priceEnd = undefined; // this.listQuery.priceEnd = undefined;
// } // }
...@@ -195,14 +201,28 @@ ...@@ -195,14 +201,28 @@
this.nomore = false; this.nomore = false;
this.loadMore(); this.loadMore();
}, },
/**
* 深拷贝
*/
objDeepCopy (source) {
var sourceCopy = source instanceof Array ? [] : {};
for (var item in source) {
sourceCopy[item] = typeof source[item] === 'object' ? objDeepCopy(source[item]) : source[item];
}
return sourceCopy;
},
loadMore: function() { loadMore: function() {
let that = this;
if(this.nomore){ if(this.nomore){
return; return;
} }
this.busy = true; this.busy = true;
this.loading = true; this.loading = true;
let params = this.listQuery; let params = this.objDeepCopy(this.listQuery);//深拷贝
// this.listQuery.priceStart = this.listQuery.priceStart/10000+"w"; if(this.listQuery.priceStart){
params.priceStart = that.listQuery.priceStart.substring(0,that.listQuery.priceStart.length-1)*10000;
params.priceEnd = that.listQuery.priceStart.substring(0,that.listQuery.priceStart.length-1)*10000;
}
params.page = this.page++; params.page = this.page++;
stockSearchPage(params) stockSearchPage(params)
.then(res => { .then(res => {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<h3>{{companyName}}</h3> <h3>{{companyName}}</h3>
<div class="pad10 tips"> <div class="pad10 tips">
<p>参与须知:</p> <p>参与须知:</p>
<p>本次提交为意向参与,后续会有专门的工作人员联系您,联系您,最终的入股申请参与成功,需要线下确认。</p> <p>本次提交为意向参与,后续会有专门的工作人员联系您,最终的入股申请参与成功,需要线下确认。</p>
</div> </div>
<el-form :model="form" :rules="rules" ref="form" label-width="100px"> <el-form :model="form" :rules="rules" ref="form" label-width="100px">
<el-input v-model="form.companyId" hidden></el-input> <el-input v-model="form.companyId" hidden></el-input>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment