Commit b3d8d74e authored by denghr's avatar denghr

公众号

parent 8c0dcfb0
......@@ -13,7 +13,7 @@
<div style="text-align:center">
<img style="width: 10%;" :src="Height>=306?'../../../../static/images/top.png':'../../../../static/images/bottom.png'" alt="">
</div>
<div class="moveBox" id="moveDiv" @mousedown="down" @touchstart="down" @mousemove="move" @touchmove="move" @mouseup="end" @touchend="end">
<div class="moveBox" id="moveDiv" @click="move">
<div class="moveBoxLeft" v-if="!otherProvince">
<div class="moveBoxItem" :class="index==1?'active':''" @click="quanguo">全国<div class="bage" v-show="index==1"></div></div>
<div class="moveBoxItem" :class="index==2?'active':''" @click="currentProvince">当前省<div class="bage" v-show="index==2"></div></div>
......@@ -58,7 +58,7 @@
</div>
<div v-if="toList && !loading && list.length == 0" style="text-align: center;color: #999;padding: 10px;">
<img src="../../../../static/images/noThing.png" alt="" srcset="" style="width:50%">
<div style="color:#999;font-size:12px">当前地区暂无公司</div>
<div style="color:#999;font-size:12px">当前地区暂无营地</div>
</div>
</div>
</div>
......@@ -100,6 +100,7 @@
.moveBoxLeft .active{font-size: 15px;color: #171413}
.addressBox{display: flex;justify-content: space-between;align-items: center;padding: 5px 15px}
.addressLeft{flex: 1;display: flex;}
a:focus, a:hover{color: #fff}
/* .addressRight{display: flex;} */
</style>
<script>
......@@ -329,37 +330,11 @@
openAddress(obj){
window.location.href='http://api.map.baidu.com/marker?location='+obj.latitude+','+obj.longitude+'&title='+obj.address+'&content='+obj.address+'&output=html&src=webapp.baidu.openAPIdemo'
},
down(){
this.flags = true;
var touch;
if(event.touches){
touch = event.touches[0];
}else {
touch = event;
}
this.position.x = touch.clientX;
this.position.y = touch.clientY;
this.dx = moveDiv.offsetLeft;
this.dy = moveDiv.offsetTop;
},
move(){
if(this.flags){
var touch ;
if(event.touches){
touch = event.touches[0];
}else {
touch = event;
}
this.nx = touch.clientX - this.position.x;
this.ny = touch.clientY - this.position.y;
this.xPum = this.dx+this.nx;
this.yPum = this.dy+this.ny;
this.Height = Number(this.Height) + Number(this.yPum)
// //阻止页面的滑动默认事件
document.addEventListener("touchmove",function(){ // 1.2 如果碰到滑动问题,请注意是否获取到 touchmove
// event.preventDefault();//jq 阻止冒泡事件
event.stopPropagation(); // 如果没有引入jq 就用 stopPropagation()
},false);
if(this.Height==406){
this.Height=136
}else{
this.Height=406
}
},
//鼠标释放时候的函数
......@@ -368,6 +343,9 @@
},
close(){
this.otherProvince = false
this.listQuery.addrProvince=undefined
this.listQuery.addrCity = undefined
this.getList();
},
quanguo(){
this.index=1
......@@ -511,15 +489,6 @@
},
},
mounted() {
},
watch:{
Height(newVal,oldVal){
if(newVal<136){
this.Height = 136
}else if(newVal>406){
this.Height = 406
}
}
}
}
</script>
......@@ -13,7 +13,7 @@
<div style="text-align:center">
<img style="width: 10%;" :src="Height>=306?'../../../../static/images/top.png':'../../../../static/images/bottom.png'" alt="">
</div>
<div class="moveBox" id="moveDiv" @mousedown="down" @touchstart="down" @mousemove="move" @touchmove="move" @mouseup="end" @touchend="end">
<div class="moveBox" id="moveDiv" @click="move">
<div class="moveBoxLeft" v-if="!otherProvince">
<div class="moveBoxItem" :class="index==1?'active':''" @click="quanguo">全国<div class="bage" v-show="index==1"></div></div>
<div class="moveBoxItem" :class="index==2?'active':''" @click="currentProvince">当前省<div class="bage" v-show="index==2"></div></div>
......@@ -36,7 +36,7 @@
<div>总经理:{{item.leader}}</div>
<div>电话:{{item.leaderContactInfo}}</div>
</div>
<a :href="'tel:'+item.leaderContactInfo" class="companyInforRight">拨打电话</a>
<a :href="'tel:'+item.leaderContactInfo" @click.stop="" class="companyInforRight">拨打电话</a>
</div>
</div>
</div>
......@@ -136,6 +136,7 @@
.moveBoxLeft .active{font-size: 15px;color: #171413}
.addressBox{display: flex;justify-content: space-between;align-items: center;padding: 5px 15px}
.addressLeft{flex: 1;display: flex;}
a:focus, a:hover{color: #fff}
</style>
<script>
......@@ -370,37 +371,11 @@
openAddress(obj){
window.location.href='http://api.map.baidu.com/marker?location='+obj.latitude+','+obj.longitude+'&title='+obj.address+'&content='+obj.address+'&output=html&src=webapp.baidu.openAPIdemo'
},
down(){
this.flags = true;
var touch;
if(event.touches){
touch = event.touches[0];
}else {
touch = event;
}
this.position.x = touch.clientX;
this.position.y = touch.clientY;
this.dx = moveDiv.offsetLeft;
this.dy = moveDiv.offsetTop;
},
move(){
if(this.flags){
var touch ;
if(event.touches){
touch = event.touches[0];
}else {
touch = event;
}
this.nx = touch.clientX - this.position.x;
this.ny = touch.clientY - this.position.y;
this.xPum = this.dx+this.nx;
this.yPum = this.dy+this.ny;
this.Height = Number(this.Height) + Number(this.yPum)
// //阻止页面的滑动默认事件
document.addEventListener("touchmove",function(){ // 1.2 如果碰到滑动问题,请注意是否获取到 touchmove
// event.preventDefault();//jq 阻止冒泡事件
event.stopPropagation(); // 如果没有引入jq 就用 stopPropagation()
},false);
if(this.Height==406){
this.Height=136
}else{
this.Height=406
}
},
//鼠标释放时候的函数
......@@ -409,6 +384,9 @@
},
close(){
this.otherProvince = false
this.listQuery.addrProvince=undefined
this.listQuery.addrCity = undefined
this.getList();
},
quanguo(){
this.index=1
......@@ -548,15 +526,6 @@
},
},
mounted() {
},
watch:{
Height(newVal,oldVal){
if(newVal<136){
this.Height = 136
}else if(newVal>406){
this.Height = 406
}
}
}
}
</script>
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