Commit deec128c authored by shilei's avatar shilei

列表跳转,首页滑动

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