Commit deec128c authored by shilei's avatar shilei

列表跳转,首页滑动

parent f839327d
......@@ -52,7 +52,7 @@
},
maxHeight: {
type: Number,
default: 1
default: 0.9
},
touchHeight: {
type: Number,
......
......@@ -110,11 +110,11 @@ export default {
}
.thumb {
width: 178rpx;
height: 134rpx;
height: 158rpx;
overflow: hidden;
}
.media-left {
height: 134rpx;
height: 158rpx;
}
.media-right {
display: flex;
......
......@@ -3,6 +3,7 @@
:img="areaInfo.imgUrl"
:title="areaInfo.name"
:cardId="areaInfo.id"
@click="toDetail"
>
<template v-slot:rightMedia>
<view>
......@@ -31,10 +32,6 @@ import mediaCard from "./card.vue";
export default {
components: { mediaCard, umTexthighlight },
props: {
isHeightLight: {
type: Boolean,
default: false,
},
detail: {
type: Object,
default: {},
......@@ -43,20 +40,6 @@ export default {
type: String,
default: "",
},
hideCollect: {
default: false,
},
showUpdateTime: {
default: false,
},
showBtn: {
type: Boolean,
default: false,
},
form: {
type: String,
default: '',
},
},
data() {
return {
......@@ -67,19 +50,9 @@ export default {
this.areaInfo = this.detail;
},
methods: {
changeCollecte(e) {
this.areaInfo.isCollection = e;
},
handleEdit() {
const params = {
id: this.area.id,
from: this.from,
};
const query = Object.entries(params).reduce((pre, [key, value]) => {
return `${pre}&${key}=${value}`;
}, '');
toDetail() {
uni.navigateTo({
url: "/pages/writeData/develop?" + query,
url: "/pages/detail/carrierDetail?id" + this.detail.id,
});
},
},
......
......@@ -4,6 +4,7 @@
:title="detail.name"
:keyWords="keyWords"
:cardId="detail.id"
@click="toDetail"
>
<template v-slot:rightMedia>
<view>
......@@ -33,6 +34,19 @@ export default {
default: () => ({}),
},
},
methods: {
toDetail() {
uni.navigateTo({
url: '/pages/detail/landDetail?id=' + this.detail.id,
success: (result) => {
},
fail: () => {},
complete: () => {}
});
}
}
};
</script>
......
......@@ -4,6 +4,7 @@
:title="parkInfo.name"
:keyWords="keyWords"
:cardId="parkInfo.id"
@click="toDetail"
>
<template v-slot:rightMedia>
<view>
......@@ -66,16 +67,9 @@ export default {
changeCollecte(e) {
this.parkInfo.isCollection = e;
},
handleEdit() {
const params = {
id: this.park.id,
from: this.from,
};
const query = Object.entries(params).reduce((pre, [key, value]) => {
return `${pre}&${key}=${value}`;
}, '');
toDetail() {
uni.navigateTo({
url: "/pages/writeData/industry?" + query,
url: "/pages/detail/industrialDetail?id" + this.detail.id,
});
},
},
......
<template>
<view class="you-touchbox" :class="{touchend:isTouchEnd}" @touchstart="onTouchStart"
@touchmove.stop.prevent="onTouchmove" @touchend="onTouchend"
@touchmove.prevent="onTouchmove" @touchend="onTouchend"
:style="{top: top + distance + 'px',zIndex,height:windowHeight+'px'}">
<view class="you-touchbox-content" :style="customStyle" @click.stop.prevent>
<view class="touch-line-box">
......@@ -43,12 +43,12 @@
// 最高top
maxTop: {
type: [Number, String],
default: 0.8
default: 0.9
},
// 最低top
minTop: {
type: [Number, String],
default: 0.4
default: 0.38
},
// 初始top
initTop: {
......@@ -194,7 +194,8 @@
this.$emit('get-end-detail', {
minTop: this.min,
maxTop: this.max,
curTop: this.top
curTop: this.top,
maxHeight: this.windowHeight - this.max
})
this.distance = 0 // 滑动距离归零
}
......@@ -209,7 +210,7 @@
right: 0;
padding: 0 24rpx;
background: #fff;
border-radius: 16rpx 16rpx 0 0;
border-radius: 32rpx 32rpx 0 0;
}
.touchend {
......
let baseUrl;
switch (process.env.VUE_APP_ENV) {
case 'production':
baseUrl = 'https://prod.techbook.com.cn:9445'
baseUrl = 'https://prod.postcard-api.liyeyun.com.cn'
break;
case 'development':
baseUrl = 'https://test.postcard-api.liyeyun.com.cn'
......
......@@ -62,7 +62,7 @@
"list": [
{
"iconPath": "/static/img/icon-tab_1.png",
"selectedIconPath": "/static/img/icon-tab_1.png",
"selectedIconPath": "/static/img/icon-tab_1_active.png",
"pagePath": "pages/index/index",
"text": "认识舒城"
},
......
......@@ -5,7 +5,7 @@
indicator
circular
:list="detail.imgUrlList"
:height="320"
:height="420"
></u-swiper>
</div>
<div class="common-detail__cells">
......
......@@ -28,18 +28,19 @@
</div>
<div
style="
margin-left: 10rpx;
width: 92rpx;
margin-left: 30rpx;
text-align: center;
font-size: 0;
flex-shrink: 0;
"
class="flex align-center"
>
<image
src="/static/img/icon-map.png"
style="width: 30rpx; height: 30rpx"
src="/static/img/icon-exchange.png"
style="width: 24rpx; height: 25rpx"
></image>
<p style="font-size: 18rpx; color: #999999; font-weight: 500">
地图模式
<p style="font-size: 28rpx; color: #33;margin-left: 12rpx;">
地图
</p>
</div>
</div>
......@@ -51,7 +52,7 @@
:dataObj="dataObj"
@change="change"
themeColor="#C0322B"
:top="186"
:top="166"
></dropdown-vue>
<div style="height: 172rpx" :style="{height: activeBar === 1 ? '112rpx': '186rpx'}"></div>
<view class="tab-contant">
......@@ -425,7 +426,7 @@ export default {
height: 10rpx;
border-radius: 10rpx;
margin-top: -10rpx;
background: linear-gradient(to right, #4374EF 0%, #FFFFFF 100%);
background: linear-gradient(to right, #4374EF 0%, rgba(0,0,0,0) 100%);
display: inline-block;
overflow: hidden;
}
......
<template>
<page-meta page-style="overflow: hidden">
<div style="width: 100vw;height: 70vh;background: #021129">
<img src="/static/img/home/bg.png" style="width: 100vw;" mode='widthFix' alt="">
<img src="https://cfld-hw-obs-01.obs.cn-north-4.myhuaweicloud.com/lyy/img/shucheng/bg.png" style="width: 100vw;" mode='widthFix' alt="">
</div>
<touch-box @maxtHeight="handleMax" @currentHeight="handleCurrent">
<div>
<div style="height: 50rpx;"></div>
<video v-if="videoInfo.videourl" style="width: 100%;height: 318rpx;" :src="videoInfo.videourl" :poster="videoInfo.videoCover" object-fit="fill"></video>
<touch-box :touchHeight='500' @get-end-detail="getMaxHeight">
<div style="height: 690px;" :style="{'overflow-y': allowScroll? 'scroll': 'hidden'}" ref="scrollView" id="scrollView">
<div style="height: 10rpx;"></div>
<video v-if="videoInfo.videourl" style="width: 100%;height: 418rpx;" :src="videoInfo.videourl" :poster="videoInfo.videoCover" object-fit="fill"></video>
<section-title-vue title="舒城荣誉"></section-title-vue>
<div class="flex honor-group">
<div class="flex honor-item" v-for="item in honorList" :key="item.name">
......@@ -27,7 +27,7 @@
<div class="num-data" v-for="item in numList" :key="item">{{item}}</div>
</div>
<div style="margin-top: 50rpx;">
<img src="/static/img/home/data-banner.png" style="width: 100%" mode="widthFix" alt="">
<img src="https://cfld-hw-obs-01.obs.cn-north-4.myhuaweicloud.com/lyy/img/shucheng/data-banner.png" style="width: 100%" mode="widthFix" alt="">
</div>
<div class="flex flex-wrap justify-between data-box">
<div class="flex flex-column data-wrap">
......@@ -120,7 +120,7 @@ export default{
videourl: '',
videoCover: ''
},
maxHeight: 0,
maxHeight: 400,
currentHeight: 0,
allowScroll: false
}
......@@ -137,21 +137,35 @@ export default{
})
},
methods: {
handleMax(e) {
console.log('max', e);
this.maxHeight = e;
},
handleCurrent(e){
console.log('handleCurrent', e);
this.initHeight = this.initHeight ? this.initHeight : e
this.currentHeight = e;
if(Number(this.currentHeight) + 1 >= Number(this.maxHeight)){
this.allowScroll = true;
}
if(Number(this.initHeight) + 1 >= Number(this.currentHeight)){
this.allowScroll = false
getMaxHeight(e) {
console.log('max', e, );
const query = uni.createSelectorQuery().in(this);
console.log(query.select('#scrollView'))
this.maxHeight = e.maxHeight;
if(e.curTop == e.maxTop) {
this.allowScroll = true
// this.$refs.scrollView.style.overflowY = 'scroll'
}else {
// this.$refs.scrollView.style.overflowY = 'hidden'
// this.$refs.scrollView.scrollTop = 0
query.select('#scrollView').scrollTop = 0
setTimeout(() => {
this.allowScroll = false
}, 500)
}
}
},
handleScroll() {}
// handleCurrent(e){
// console.log('handleCurrent', e);
// this.initHeight = this.initHeight ? this.initHeight : e
// this.currentHeight = e;
// if(Number(this.currentHeight) + 1 >= Number(this.maxHeight)){
// this.allowScroll = true;
// }
// if(Number(this.initHeight) + 1 >= Number(this.currentHeight)){
// this.allowScroll = false
// }
// }
}
}
</script>
......
......@@ -13,7 +13,8 @@
</view>
</view>
<div style="padding: 80rpx 23rpx;padding-top: 80rpx;">
<img v-if="activeBar === 0" style="width: 100vw;" mode="widthFix" src="https://cfld-hw-obs-01.obs.cn-north-4.myhuaweicloud.com/lyy/img/shucheng/zsyz_04.jpg" />
<div style="padding: 40rpx 23rpx;">
<!-- 招商亮点 -->
<div v-if="activeBar === 0">
<div v-for="light in lights" :key="light.title">
......@@ -135,16 +136,17 @@ export default {
flex-direction: column;
justify-content: space-between;
align-items: center;
padding-bottom: 15rpx;
}
.active {
// color: #bf0000;
}
.line {
width: 50rpx;
height: 6rpx;
border-radius: 3rpx;
margin-top: 15rpx;
background-color: #bf0000;
width: 96rpx;
height: 10rpx;
border-radius: 10rpx;
margin-top: -10rpx;
background: linear-gradient(to right, #4374EF 0%, rgba(0,0,0,0) 100%);
display: inline-block;
overflow: hidden;
}
......
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