首页滚动优化

master
Lee1203 2022-08-16 11:13:24 +08:00
parent 2e140221f4
commit 1a2185c0a8
17 changed files with 24 additions and 24 deletions

View File

@ -6,7 +6,7 @@
<swiper-pu newRadius="0" :bannerList="bannerList" newHeight="500rpx" :isplay='isplay' :isDot="false"></swiper-pu>
</view>
<view class="index-content background-white">
<view class="index-statis-bg background-white" :style="{height:statusHeight+60+'px'}" v-if="!isShow"></view>
<view class="index-statis-bg background-white" :style="{height:statusHeight+90+'px'}" v-if="!isShow"></view>
<!-- 搜索 -->
<view class="pull-search-bg background-white radius20 pad-sx30 border-box" v-if="isShow">
<view class="pull-search radius20 flex">
@ -155,10 +155,10 @@
this.isplay =false;
},
onPageScroll(object){
if(object.scrollTop >= this.statusHeight+160 && object.scrollTop <= this.statusHeight+200){
if(object.scrollTop >= this.statusHeight+150){
this.isShow = false;
}
if(object.scrollTop <= this.statusHeight+150){
if(object.scrollTop <= this.statusHeight+120){
this.isShow = true;
}
},

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1430,7 +1430,7 @@ function initData(vueOptions, context) {
try {
data = data.call(context); // 支持 Vue.prototype 上挂的数据
} catch (e) {
if (Object({"NODE_ENV":"development","VUE_APP_NAME":"老农极鲜","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
if (Object({"VUE_APP_NAME":"老农极鲜","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
}
}
@ -11022,7 +11022,7 @@ function type(obj) {
function flushCallbacks$1(vm) {
if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
if (Object({"NODE_ENV":"development","VUE_APP_NAME":"老农极鲜","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
if (Object({"VUE_APP_NAME":"老农极鲜","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
var mpInstance = vm.$scope;
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
@ -11043,14 +11043,14 @@ function nextTick$1(vm, cb) {
//1.nextTick 之前 已 setData 且 setData 还未回调完成
//2.nextTick 之前存在 render watcher
if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
if(Object({"NODE_ENV":"development","VUE_APP_NAME":"老农极鲜","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
if(Object({"VUE_APP_NAME":"老农极鲜","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
var mpInstance = vm.$scope;
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
']:nextVueTick');
}
return nextTick(cb, vm)
}else{
if(Object({"NODE_ENV":"development","VUE_APP_NAME":"老农极鲜","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
if(Object({"VUE_APP_NAME":"老农极鲜","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
var mpInstance$1 = vm.$scope;
console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
']:nextMPTick');
@ -11136,7 +11136,7 @@ var patch = function(oldVnode, vnode) {
});
var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
if (Object.keys(diffData).length) {
if (Object({"NODE_ENV":"development","VUE_APP_NAME":"老农极鲜","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
if (Object({"VUE_APP_NAME":"老农极鲜","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
']差量更新',
JSON.stringify(diffData));

View File

@ -310,10 +310,10 @@ var _default = {
this.isplay = false;
},
onPageScroll: function onPageScroll(object) {
if (object.scrollTop >= this.statusHeight + 160 && object.scrollTop <= this.statusHeight + 200) {
if (object.scrollTop >= this.statusHeight + 150) {
this.isShow = false;
}
if (object.scrollTop <= this.statusHeight + 150) {
if (object.scrollTop <= this.statusHeight + 120) {
this.isShow = true;
}
},

File diff suppressed because one or more lines are too long