首页分类导航优化

master
Lee1203 2022-08-10 14:11:31 +08:00
parent 152804458f
commit fd40966be1
14 changed files with 111 additions and 109 deletions

View File

@ -1,87 +1,87 @@
{
"name" : "app适配微信小程序",
"appid" : "__UNI__768F35C",
"description" : "这是一款基于uniapp开发的app和微信小程序的模板框架",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
"app-plus" : {
"usingComponents" : true,
"compilerVersion" : 3,
/* 5+App */
"modules" : {
"Payment" : {},
"Share" : {}
},
/* */
"distribute" : {
/* */
"android" : {
/* android */
"permissions" : [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
"ios" : {},
/* ios */
"sdkConfigs" : {
"maps" : {},
"payment" : {
"weixin" : {
"__platform__" : [ "ios", "android" ],
"appid" : "wx2654bc27c419ada6",
"UniversalLinks" : ""
}
},
"push" : {},
"geolocation" : {},
"share" : {
"weixin" : {
"appid" : "wx2654bc27c419ada6",
"UniversalLinks" : ""
}
},
"ad" : {}
}
},
"splashscreen" : {
"alwaysShowBeforeRender" : false,
"waiting" : false
}
},
/* SDK */
"quickapp" : {},
/* */
"mp-weixin" : {
/* */
"appid" : "wxa02e44170bc722cd",
"setting" : {
"urlCheck" : true,
"es6" : true
},
"usingComponents" : true,
"permission" : {
"scope.userLocation" : {
"desc" : "您的位置信息将用于小程序位置接口的效果展示"
}
}
},
"mp-baidu" : {
"appid" : "24346353"
}
}
{
"name" : "老农极鲜",
"appid" : "__UNI__768F35C",
"description" : "这是一款基于uniapp开发的app和微信小程序的模板框架",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
"app-plus" : {
"usingComponents" : true,
"compilerVersion" : 3,
/* 5+App */
"modules" : {
"Payment" : {},
"Share" : {}
},
/* */
"distribute" : {
/* */
"android" : {
/* android */
"permissions" : [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
"ios" : {},
/* ios */
"sdkConfigs" : {
"maps" : {},
"payment" : {
"weixin" : {
"__platform__" : [ "ios", "android" ],
"appid" : "wx2654bc27c419ada6",
"UniversalLinks" : ""
}
},
"push" : {},
"geolocation" : {},
"share" : {
"weixin" : {
"appid" : "wx2654bc27c419ada6",
"UniversalLinks" : ""
}
},
"ad" : {}
}
},
"splashscreen" : {
"alwaysShowBeforeRender" : false,
"waiting" : false
}
},
/* SDK */
"quickapp" : {},
/* */
"mp-weixin" : {
/* */
"appid" : "wxa02e44170bc722cd",
"setting" : {
"urlCheck" : true,
"es6" : true
},
"usingComponents" : true,
"permission" : {
"scope.userLocation" : {
"desc" : "您的位置信息将用于小程序位置接口的效果展示"
}
}
},
"mp-baidu" : {
"appid" : "24346353"
}
}

View File

@ -6,7 +6,7 @@
<image :src="indexBackground" mode="widthFix"></image>
</view>
<view class="index-content background-white">
<view class="index-statis-bg background-white" :style="{height:statusHeight+50+'px'}" v-if="!isShow"></view>
<view class="index-statis-bg background-white" :style="{height:statusHeight+80+'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">
@ -152,9 +152,10 @@
this.isplay =false;
},
onPageScroll(object){
if(object.scrollTop >= this.statusHeight+65){
if(object.scrollTop >= this.statusHeight+65 && object.scrollTop <= this.statusHeight+135){
this.isShow = false;
}else{
}
if(object.scrollTop <= this.statusHeight+50){
this.isShow = true;
}
},
@ -202,7 +203,7 @@
this.$requst.get('/api/index/mini-program-setting').then(res=>{
if(res.code == 0){
console.log(res,'个性装扮')
this.indexBackground = this.$hostHttp + res.data.indexBackground;
this.indexBackground = this.$hostHttp + res.data.indexBackground;
}
})
},
@ -338,7 +339,7 @@
this.isShow = true;
}
})
},
},
// DOM
getElementData(el, callback) {

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

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

View File

@ -305,9 +305,10 @@ var _default = {
this.isplay = false;
},
onPageScroll: function onPageScroll(object) {
if (object.scrollTop >= this.statusHeight + 65) {
if (object.scrollTop >= this.statusHeight + 65 && object.scrollTop <= this.statusHeight + 135) {
this.isShow = false;
} else {
}
if (object.scrollTop <= this.statusHeight + 50) {
this.isShow = true;
}
},

View File

@ -1 +1 @@
<view><block wx:if="{{isLoading}}"><view class="index-page pad-x190 border-box"><view class="index-top"><image src="{{indexBackground}}" mode="widthFix"></image></view><view class="index-content background-white"><block wx:if="{{!isShow}}"><view class="index-statis-bg background-white" style="{{'height:'+(statusHeight+50+'px')+';'}}"></view></block><block wx:if="{{isShow}}"><view class="pull-search-bg background-white radius20 pad-sx30 border-box"><view class="pull-search radius20 flex"><image class="img" src="/static/icon/icon-search.png" mode="widthFix"></image><input class="input pad-zy15 border-box font30" type="text" placeholder="搜索" confirm-type="search" placeholder-style="color: #666666" data-event-opts="{{[['confirm',[['doSearch',['$event']]]],['input',[['__set_model',['','keyword','$event',[]]]]]]}}" value="{{keyword}}" bindconfirm="__e" bindinput="__e"/></view></view></block><view class="{{['index-cate-bg','pad-zy20','background-white',!isShow?'show':'']}}" style="{{'top:'+(statusHeight+35+'px')+';'}}" id="index-cate-bg"><view class="{{['index-cate','pad-zy20','border-box',!isShow?'show':'']}}"><block wx:if="{{isShow}}"><view class="pull-title"><view class="txt font32 pad-sx10">商品</view><view class="line background-orange"></view></view></block><view class="cate-list-bg"><scroll-view scroll-x="true" scroll-left="{{tabsScrollLeft}}" data-event-opts="{{[['scroll',[['scroll',['$event']]]]]}}" bindscroll="__e"><view class="cate-list flex" style="{{'width:'+(cateWidth)+';'}}" id="tab_list"><block wx:for="{{cateList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="{{['cate-item',index==currentIndex?'color-orange':'']}}" id="tab_item" data-event-opts="{{[['tap',[['changeCateEv',[index]]]]]}}" bindtap="__e"><view class="img mar-sx20"><image src="{{item.cover}}" mode="widthFix"></image></view><view class="txt font24">{{item.title}}</view></view></block></view></scroll-view></view></view></view><view class="commodity pad-zy20 border-box flex"><block wx:for="{{commodityList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['goDetail',['$0'],[[['commodityList','',index,'id']]]]]]]}}" class="item mar-s40 radius20" catchtap="__e"><view class="img"><image src="{{item.cover}}" mode="widthFix"></image></view><view class="txt pad-all20"><view class="title fon30 clips2">{{item.name}}</view><view class="price font30 mar-sx10">{{"¥"+item.price}}</view><view class="bottom flex"><view class="sold font24 color-99">{{(item.amount>=1000?'999+':item.amount)+"件已售"}}</view><view data-event-opts="{{[['tap',[['joinCart',[index]]]]]}}" class="btn font24 background-orange flex" catchtap="__e">加入购物车</view></view></view></view></block></view><block wx:if="{{noMore}}"><view class="no-more font24"><text>—— 到底啦 ——</text></view></block></view></view></block><block wx:if="{{showSearch}}"><view data-event-opts="{{[['tap',[['closeSearch',['$event']]]]]}}" class="pull-bg" bindtap="__e"></view></block><block wx:if="{{showSearch}}"><view class="search-box border-box" style="{{'height:'+(screenHeight-statusHeight-50+'px')+';'+('top:'+(statusHeight+50+'px')+';')}}"><view class="search-bg background-white pad-sx30 border-box"><view class="search radius20 flex"><image class="img" src="/static/icon/icon-search.png" mode="widthFix"></image><input class="input pad-zy15 border-box font30" type="text" placeholder="搜索" confirm-type="search" placeholder-style="color: #666666" data-event-opts="{{[['confirm',[['doSearch',['$event']]]],['input',[['__set_model',['','keyword','$event',[]]]]]]}}" value="{{keyword}}" bindconfirm="__e" bindinput="__e"/></view></view><view class="keyword-txt background-white font30">{{"关键词:"+searchKeyword}}</view><scroll-view class="search-list background-white" scroll-y="true"><view class="commodity pad-zy20 border-box flex"><block wx:for="{{searchList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['goDetail',['$0'],[[['searchList','',index,'id']]]]]]]}}" class="item mar-s40 radius20" catchtap="__e"><view class="img"><image src="{{item.cover}}" mode="widthFix"></image></view><view class="txt pad-all20"><view class="title fon30 clips2">{{item.name}}</view><view class="price font30 mar-sx10">{{"¥"+item.price}}</view><view class="bottom flex"><view class="sold font24 color-99">{{(item.stock>=100?'99+':item.stock)+"件已售"}}</view><view data-event-opts="{{[['tap',[['joinCart',[index]]]]]}}" class="btn font24 background-orange flex" catchtap="__e">加入购物车</view></view></view></view></block></view><block wx:if="{{searchList.length==0}}"><view class="no-more font24 pad-sx25" style="margin:0;"><text>—— 没有相关结果 ——</text></view></block></scroll-view></view></block><block wx:if="{{isLoading}}"><tabbar vue-id="8dd740cc-1" bind:__l="__l"></tabbar></block></view>
<view><block wx:if="{{isLoading}}"><view class="index-page pad-x190 border-box"><view class="index-top"><image src="{{indexBackground}}" mode="widthFix"></image></view><view class="index-content background-white"><block wx:if="{{!isShow}}"><view class="index-statis-bg background-white" style="{{'height:'+(statusHeight+80+'px')+';'}}"></view></block><block wx:if="{{isShow}}"><view class="pull-search-bg background-white radius20 pad-sx30 border-box"><view class="pull-search radius20 flex"><image class="img" src="/static/icon/icon-search.png" mode="widthFix"></image><input class="input pad-zy15 border-box font30" type="text" placeholder="搜索" confirm-type="search" placeholder-style="color: #666666" data-event-opts="{{[['confirm',[['doSearch',['$event']]]],['input',[['__set_model',['','keyword','$event',[]]]]]]}}" value="{{keyword}}" bindconfirm="__e" bindinput="__e"/></view></view></block><view class="{{['index-cate-bg','pad-zy20','background-white',!isShow?'show':'']}}" style="{{'top:'+(statusHeight+35+'px')+';'}}" id="index-cate-bg"><view class="{{['index-cate','pad-zy20','border-box',!isShow?'show':'']}}"><block wx:if="{{isShow}}"><view class="pull-title"><view class="txt font32 pad-sx10">商品</view><view class="line background-orange"></view></view></block><view class="cate-list-bg"><scroll-view scroll-x="true" scroll-left="{{tabsScrollLeft}}" data-event-opts="{{[['scroll',[['scroll',['$event']]]]]}}" bindscroll="__e"><view class="cate-list flex" style="{{'width:'+(cateWidth)+';'}}" id="tab_list"><block wx:for="{{cateList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="{{['cate-item',index==currentIndex?'color-orange':'']}}" id="tab_item" data-event-opts="{{[['tap',[['changeCateEv',[index]]]]]}}" bindtap="__e"><view class="img mar-sx20"><image src="{{item.cover}}" mode="widthFix"></image></view><view class="txt font24">{{item.title}}</view></view></block></view></scroll-view></view></view></view><view class="commodity pad-zy20 border-box flex"><block wx:for="{{commodityList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['goDetail',['$0'],[[['commodityList','',index,'id']]]]]]]}}" class="item mar-s40 radius20" catchtap="__e"><view class="img"><image src="{{item.cover}}" mode="widthFix"></image></view><view class="txt pad-all20"><view class="title fon30 clips2">{{item.name}}</view><view class="price font30 mar-sx10">{{"¥"+item.price}}</view><view class="bottom flex"><view class="sold font24 color-99">{{(item.amount>=1000?'999+':item.amount)+"件已售"}}</view><view data-event-opts="{{[['tap',[['joinCart',[index]]]]]}}" class="btn font24 background-orange flex" catchtap="__e">加入购物车</view></view></view></view></block></view><block wx:if="{{noMore}}"><view class="no-more font24"><text>—— 到底啦 ——</text></view></block></view></view></block><block wx:if="{{showSearch}}"><view data-event-opts="{{[['tap',[['closeSearch',['$event']]]]]}}" class="pull-bg" bindtap="__e"></view></block><block wx:if="{{showSearch}}"><view class="search-box border-box" style="{{'height:'+(screenHeight-statusHeight-50+'px')+';'+('top:'+(statusHeight+50+'px')+';')}}"><view class="search-bg background-white pad-sx30 border-box"><view class="search radius20 flex"><image class="img" src="/static/icon/icon-search.png" mode="widthFix"></image><input class="input pad-zy15 border-box font30" type="text" placeholder="搜索" confirm-type="search" placeholder-style="color: #666666" data-event-opts="{{[['confirm',[['doSearch',['$event']]]],['input',[['__set_model',['','keyword','$event',[]]]]]]}}" value="{{keyword}}" bindconfirm="__e" bindinput="__e"/></view></view><view class="keyword-txt background-white font30">{{"关键词:"+searchKeyword}}</view><scroll-view class="search-list background-white" scroll-y="true"><view class="commodity pad-zy20 border-box flex"><block wx:for="{{searchList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['goDetail',['$0'],[[['searchList','',index,'id']]]]]]]}}" class="item mar-s40 radius20" catchtap="__e"><view class="img"><image src="{{item.cover}}" mode="widthFix"></image></view><view class="txt pad-all20"><view class="title fon30 clips2">{{item.name}}</view><view class="price font30 mar-sx10">{{"¥"+item.price}}</view><view class="bottom flex"><view class="sold font24 color-99">{{(item.stock>=100?'99+':item.stock)+"件已售"}}</view><view data-event-opts="{{[['tap',[['joinCart',[index]]]]]}}" class="btn font24 background-orange flex" catchtap="__e">加入购物车</view></view></view></view></block></view><block wx:if="{{searchList.length==0}}"><view class="no-more font24 pad-sx25" style="margin:0;"><text>—— 没有相关结果 ——</text></view></block></scroll-view></view></block><block wx:if="{{isLoading}}"><tabbar vue-id="8dd740cc-1" bind:__l="__l"></tabbar></block></view>

View File

@ -16,7 +16,7 @@
"compileType": "miniprogram",
"libVersion": "2.25.2",
"appid": "wxa02e44170bc722cd",
"projectname": "app适配微信小程序",
"projectname": "老农极鲜",
"condition": {},
"editorSetting": {
"tabIndent": "insertSpaces",