提交 add636fc 编写于 作者: W wanganxp

缩短了tabbar页面的层级,把api里的页面和界面分开。遗留页面生命周期和页面下拉刷新待完善

上级 e4667d08
{ {
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{ {
"path": "pages/tabBar/component/component", "path": "pages/tabBar/component",
"style": { "style": {
"navigationBarTitleText": "内置组件", "navigationBarTitleText": "内置组件",
"backgroundColor": "#F8F8F8" "backgroundColor": "#F8F8F8"
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
} }
}, },
{ {
"path": "pages/tabBar/API/API", "path": "pages/tabBar/API",
"style": { "style": {
"navigationBarTitleText": "接口", "navigationBarTitleText": "接口",
"backgroundColor": "#F8F8F8" "backgroundColor": "#F8F8F8"
...@@ -151,6 +151,17 @@ ...@@ -151,6 +151,17 @@
"style": { "style": {
"navigationBarTitleText": "新UVUE页面2" "navigationBarTitleText": "新UVUE页面2"
} }
}, {
"path": "pages/API/page-scrollTo/page-scrollTo",
"style": {
"navigationBarTitleText": "页面滚动"
}
}, {
"path": "pages/API/page-lifecircle/page-lifecircle",
"style": {
"navigationBarTitleText": "页面生命周期"
}
}, },
{ {
"path": "pages/API/storage/storage", "path": "pages/API/storage/storage",
...@@ -189,7 +200,7 @@ ...@@ -189,7 +200,7 @@
} }
}, },
{ {
"path": "pages/tabBar/CSS/CSS", "path": "pages/tabBar/CSS",
"style": { "style": {
"navigationBarTitleText": "CSS", "navigationBarTitleText": "CSS",
"backgroundColor": "#F8F8F8" "backgroundColor": "#F8F8F8"
...@@ -446,12 +457,12 @@ ...@@ -446,12 +457,12 @@
"style": { "style": {
"navigationBarTitleText": "text-decoration-line" "navigationBarTitleText": "text-decoration-line"
} }
},{ }, {
"path": "pages/CSS/transition/transition", "path": "pages/CSS/transition/transition",
"style": { "style": {
"navigationBarTitleText": "Transition" "navigationBarTitleText": "Transition"
} }
},{ }, {
"path": "pages/CSS/transform/transform", "path": "pages/CSS/transform/transform",
"style": { "style": {
"navigationBarTitleText": "Transform" "navigationBarTitleText": "Transform"
...@@ -459,123 +470,100 @@ ...@@ -459,123 +470,100 @@
}, { }, {
"path": "pages/API/request/request", "path": "pages/API/request/request",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "request网络"
"enablePullDownRefresh": false
} }
}, { }, {
"path": "pages/API/upload-file/upload-file", "path": "pages/API/upload-file/upload-file",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "上传文件"
"enablePullDownRefresh": false
} }
}, { }, {
"path": "pages/API/download-file/download-file", "path": "pages/API/download-file/download-file",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "下载文件"
"enablePullDownRefresh": false
} }
}, { }, {
"path": "pages/API/websocket-socketTask/websocket-socketTask", "path": "pages/API/websocket-socketTask/websocket-socketTask",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": ""
"enablePullDownRefresh": false
} }
}, { }, {
"path": "pages/API/websocket-global/websocket-global", "path": "pages/API/websocket-global/websocket-global",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": ""
"enablePullDownRefresh": false
} }
}, { }, {
"path": "pages/API/get-system-info/get-system-info", "path": "pages/API/get-system-info/get-system-info",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": ""
"enablePullDownRefresh": false
} }
}, { }, {
"path": "pages/API/get-device-info/get-device-info", "path": "pages/API/get-device-info/get-device-info",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": ""
"enablePullDownRefresh": false
} }
}, { }, {
"path": "pages/API/get-app-base-info/get-app-base-info", "path": "pages/API/get-app-base-info/get-app-base-info",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": ""
"enablePullDownRefresh": false
} }
}, { }, {
"path": "pages/API/get-system-setting/get-system-setting", "path": "pages/API/get-system-setting/get-system-setting",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": ""
"enablePullDownRefresh": false
} }
}, { }, {
"path": "pages/API/get-app-authorize-setting/get-app-authorize-setting", "path": "pages/API/get-app-authorize-setting/get-app-authorize-setting",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": ""
"enablePullDownRefresh": false
} }
}, { }, {
"path": "pages/API/preview-image/preview-image", "path": "pages/API/preview-image/preview-image",
"style": { "style": {
"navigationBarTitleText": "图片预览", "navigationBarTitleText": "图片预览"
"enablePullDownRefresh": false
} }
}, { }, {
"path" : "pages/component/scroll-view/scroll-view-refresher", "path": "pages/component/scroll-view/scroll-view-refresher",
"style" : "style": {
{ "navigationBarTitleText": "scroll-view-refresher"
"navigationBarTitleText": "scroll-view-refresher",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/component/list/list",
"style" :
{
"navigationBarTitleText": "列表到详情示例",
"enablePullDownRefresh": false
} }
}, {
"path": "pages/component/list/list",
"style": {
"navigationBarTitleText": "列表到详情示例"
} }
,{ }, {
"path" : "pages/API/get-network-type/get-network-type", "path": "pages/API/get-network-type/get-network-type",
"style" : "style": {
{ "navigationBarTitleText": ""
"navigationBarTitleText": "",
"enablePullDownRefresh": false
} }
} }, {
,{ "path": "pages/component/list/detail/detail",
"path" : "pages/component/list/detail/detail", "style": {
"style" : "navigationBarTitleText": "详情示例"
{
"navigationBarTitleText": "详情示例",
"enablePullDownRefresh": false
} }
} }
,{ // , {
"path" : "pages/API/page-scrollTo/page-scrollTo", // "path": "pages/API/pull-down-refresh/pull-down-refresh",
"style" : { // "style": {
"navigationBarTitleText": "pageScrollTo", // "navigationBarTitleText": "页面下拉刷新",
"enablePullDownRefresh": false // "enablePullDownRefresh": true
} // }
} // }
], ],
"globalStyle": { "globalStyle": {
"pageOrientation": "portrait", "pageOrientation": "portrait",
...@@ -597,19 +585,19 @@ ...@@ -597,19 +585,19 @@
"borderStyle": "black", "borderStyle": "black",
"backgroundColor": "#F8F8F8", "backgroundColor": "#F8F8F8",
"list": [{ "list": [{
"pagePath": "pages/tabBar/component/component", "pagePath": "pages/tabBar/component",
"iconPath": "static/component.png", "iconPath": "static/component.png",
"selectedIconPath": "static/componentHL.png", "selectedIconPath": "static/componentHL.png",
"text": "内置组件" "text": "内置组件"
}, },
{ {
"pagePath": "pages/tabBar/API/API", "pagePath": "pages/tabBar/API",
"iconPath": "static/api.png", "iconPath": "static/api.png",
"selectedIconPath": "static/apiHL.png", "selectedIconPath": "static/apiHL.png",
"text": "接口" "text": "接口"
}, },
{ {
"pagePath": "pages/tabBar/CSS/CSS", "pagePath": "pages/tabBar/CSS",
"iconPath": "static/extui.png", "iconPath": "static/extui.png",
"selectedIconPath": "static/extuiHL.png", "selectedIconPath": "static/extuiHL.png",
"text": "CSS" "text": "CSS"
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
</view> </view>
</template> </template>
<script lang="ts"> <script lang="uts">
type ItemType = { type ItemType = {
value : string, value : string,
name : string, name : string,
......
<template>
<view>
<text>onLoad触发时间</text>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onLoad() {
// const d = Date.now();
// const s = d.toDateString()
console.log("onLoad");
},
onShow() {
console.log("onShow");
},
onReady() {
console.log("onReady");
},
onHide() {
console.log("onHide");
},
onUnload() {
console.log("onUnLoad");
},
methods: {
}
}
</script>
<style>
</style>
<template>
<view>
<page-head :title="title"></page-head>
<view class="uni-padding-wrap uni-common-mt">
<view style="font-size: 12px; color: #666;">注:PC 不支持下拉刷新</view>
<view class="text" v-for="(num,index) in data" :key="index">list - {{num}}</view>
<view class="uni-loadmore" v-if="showLoadMore">{{loadMoreText}}</view>
</view>
</view>
</template>
<script lang="uts">
export default {
data() {
return {
title: '下拉刷新 + 加载更多',
data: [],
loadMoreText: "加载中...",
showLoadMore: false,
max: 0
}
},
onLoad() {
this.initData();
},
onUnload() {
this.max = 0,
this.data = [],
this.loadMoreText = "加载更多",
this.showLoadMore = false;
},
onReachBottom() {
console.log("onReachBottom");
if (this.max > 40) {
this.loadMoreText = "没有更多数据了!"
return;
}
this.showLoadMore = true;
setTimeout(() => {
this.setListData();
}, 300);
},
onPullDownRefresh() {
console.log('onPullDownRefresh');
this.initData();
},
methods: {
initData(){
setTimeout(() => {
this.max = 0;
this.data = [];
let data = [];
this.max += 20;
for (var i = this.max - 19; i < this.max + 1; i++) {
data.push(i)
}
this.data = this.data.concat(data);
uni.stopPullDownRefresh();
}, 300);
},
setListData() {
let data = [];
this.max += 10;
for (var i = this.max - 9; i < this.max + 1; i++) {
data.push(i)
}
this.data = this.data.concat(data);
}
}
}
</script>
<style>
.text {
margin: 16rpx 0;
width:100%;
background-color: #fff;
height: 120rpx;
line-height: 120rpx;
text-align: center;
color: #555;
border-radius: 8rpx;
}
</style>
...@@ -44,50 +44,55 @@ ...@@ -44,50 +44,55 @@
return { return {
list: [{ list: [{
id: "page", id: "page",
name: "界面", name: "页面",
open: false, open: false,
pages: [ pages: [
{
name: "设置导航条",
url: "set-navigation-bar-title"
},
//#ifdef APP-PLUS
{
name: "原生子窗体",
url: "subnvue",
},
//#endif
{ {
name: "页面跳转", name: "页面跳转",
url: "navigator", url: "navigator",
enable: true enable: true
}, },
//#ifndef MP-TOUTIAO {
name: "设置导航条",
url: "set-navigation-bar-title"
},
{ {
name: "设置TabBar", name: "设置TabBar",
url: "set-tabbar", url: "set-tabbar",
}, },
//#endif
{ {
name: "下拉刷新", name: "下拉刷新",
url: "pull-down-refresh", url: "pull-down-refresh",
}, },
{
name: "页面生命周期",
url: "page-lifecircle",
enable: true
},
{
name: "将页面滚动到目标位置",
url: "page-scrollTo",
enable: true
},
] as Page[],
},
{
id: "ui",
name: "界面",
open: false,
pages: [
{ {
name: "创建动画", name: "创建动画",
url: "animation", url: "animation",
}, },
// #ifndef QUICKAPP-WEBVIEW-UNION
{ {
name: "创建绘画", name: "创建绘画",
url: "canvas", url: "canvas",
}, },
// #endif
// #ifndef MP-LARK
{ {
name: "节点信息", name: "节点信息",
url: "get-node-info", url: "get-node-info",
}, },
// #endif
{ {
name: "节点布局交互状态", name: "节点布局交互状态",
url: "intersection-observer", url: "intersection-observer",
...@@ -112,11 +117,6 @@ ...@@ -112,11 +117,6 @@
url: "toast", url: "toast",
enable: true enable: true
}, },
{
name: "将页面滚动到目标位置",
url: "page-scrollTo",
enable: true
},
] as Page[], ] as Page[],
}, },
{ {
...@@ -184,19 +184,19 @@ ...@@ -184,19 +184,19 @@
url: "brightness", url: "brightness",
}, },
// #endif // #endif
// #ifdef APP-PLUS || MP-WEIXIN || MP-QQ || MP-JD // #ifdef APP || MP-WEIXIN || MP-QQ || MP-JD
{ {
name: "蓝牙", name: "蓝牙",
url: "bluetooth", url: "bluetooth",
}, },
// #endif // #endif
// #ifdef APP-PLUS || MP-WEIXIN || MP-QQ // #ifdef APP || MP-WEIXIN || MP-QQ
{ {
name: "生物认证", name: "生物认证",
url: "soter", url: "soter",
}, },
// #endif // #endif
// #ifdef APP-PLUS || MP-WEIXIN // #ifdef APP || MP-WEIXIN
{ {
name: "iBeacon", name: "iBeacon",
url: "ibeacon", url: "ibeacon",
...@@ -214,7 +214,7 @@ ...@@ -214,7 +214,7 @@
url: "on-compass-change", url: "on-compass-change",
}, },
// #endif // #endif
//#ifdef APP-PLUS //#ifdef APP
{ {
name: "监听距离传感器", name: "监听距离传感器",
url: "/platforms/app-plus/proximity/proximity", url: "/platforms/app-plus/proximity/proximity",
...@@ -287,7 +287,7 @@ ...@@ -287,7 +287,7 @@
url: "inner-audio", url: "inner-audio",
}, },
// #endif // #endif
// #ifdef APP-PLUS || MP-WEIXIN || MP-BAIDU || MP-QQ|| MP-JD // #ifdef APP || MP-WEIXIN || MP-BAIDU || MP-QQ|| MP-JD
{ {
name: "录音", name: "录音",
url: "voice", url: "voice",
...@@ -344,7 +344,7 @@ ...@@ -344,7 +344,7 @@
url: "map", url: "map",
}, },
// #endif // #endif
// #ifdef APP-PLUS // #ifdef APP
{ {
name: "地图搜索", name: "地图搜索",
url: "map-search", url: "map-search",
...@@ -363,7 +363,7 @@ ...@@ -363,7 +363,7 @@
url: "storage", url: "storage",
enable: true enable: true
}, },
// #ifdef APP-PLUS // #ifdef APP
{ {
name: "SQLite", name: "SQLite",
url: "sqlite", url: "sqlite",
...@@ -371,7 +371,7 @@ ...@@ -371,7 +371,7 @@
// #endif // #endif
] as Page[], ] as Page[],
}, },
// #ifdef APP-PLUS || MP-WEIXIN // #ifdef APP || MP-WEIXIN
{ {
id: "rewarded-video-ad", id: "rewarded-video-ad",
url: "rewarded-video-ad", url: "rewarded-video-ad",
...@@ -381,7 +381,7 @@ ...@@ -381,7 +381,7 @@
pages: [] as Page[] pages: [] as Page[]
}, },
// #endif // #endif
// #ifdef APP-PLUS // #ifdef APP
{ {
id: "full-screen-video-ad", id: "full-screen-video-ad",
url: "full-screen-video-ad", url: "full-screen-video-ad",
...@@ -421,7 +421,7 @@ ...@@ -421,7 +421,7 @@
] as Page[], ] as Page[],
}, },
// #endif // #endif
// #ifdef APP-PLUS || MP-WEIXIN // #ifdef APP || MP-WEIXIN
{ {
id: "payment", id: "payment",
name: "支付", name: "支付",
...@@ -434,7 +434,7 @@ ...@@ -434,7 +434,7 @@
] as Page[], ] as Page[],
}, },
// #endif // #endif
// #ifdef APP-PLUS // #ifdef APP
{ {
id: "speech", id: "speech",
name: "语音", name: "语音",
...@@ -501,5 +501,5 @@ ...@@ -501,5 +501,5 @@
</script> </script>
<style> <style>
@import '../../../common/uni-uvue.css'; @import '../../common/uni-uvue.css';
</style> </style>
\ No newline at end of file
<template> A<template>
<view class="uni-container"> <view class="uni-container">
<view class="uni-header-logo"> <view class="uni-header-logo">
<image class="uni-header-image" src="/static/extuiIndex.png"></image> <image class="uni-header-image" src="/static/extuiIndex.png"></image>
...@@ -355,5 +355,5 @@ ...@@ -355,5 +355,5 @@
</script> </script>
<style> <style>
@import '../../../common/uni-uvue.css'; @import '../../common/uni-uvue.css';
</style> </style>
\ No newline at end of file
...@@ -261,5 +261,5 @@ ...@@ -261,5 +261,5 @@
</script> </script>
<style> <style>
@import '../../../common/uni-uvue.css'; @import '../../common/uni-uvue.css';
</style> </style>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册