提交 add636fc 编写于 作者: W wanganxp

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

上级 e4667d08
{
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/tabBar/component/component",
"path": "pages/tabBar/component",
"style": {
"navigationBarTitleText": "内置组件",
"backgroundColor": "#F8F8F8"
......@@ -128,7 +128,7 @@
}
},
{
"path": "pages/tabBar/API/API",
"path": "pages/tabBar/API",
"style": {
"navigationBarTitleText": "接口",
"backgroundColor": "#F8F8F8"
......@@ -151,6 +151,17 @@
"style": {
"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",
......@@ -189,7 +200,7 @@
}
},
{
"path": "pages/tabBar/CSS/CSS",
"path": "pages/tabBar/CSS",
"style": {
"navigationBarTitleText": "CSS",
"backgroundColor": "#F8F8F8"
......@@ -446,12 +457,12 @@
"style": {
"navigationBarTitleText": "text-decoration-line"
}
},{
}, {
"path": "pages/CSS/transition/transition",
"style": {
"navigationBarTitleText": "Transition"
}
},{
}, {
"path": "pages/CSS/transform/transform",
"style": {
"navigationBarTitleText": "Transform"
......@@ -459,123 +470,100 @@
}, {
"path": "pages/API/request/request",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"navigationBarTitleText": "request网络"
}
}, {
"path": "pages/API/upload-file/upload-file",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"navigationBarTitleText": "上传文件"
}
}, {
"path": "pages/API/download-file/download-file",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"navigationBarTitleText": "下载文件"
}
}, {
"path": "pages/API/websocket-socketTask/websocket-socketTask",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"navigationBarTitleText": ""
}
}, {
"path": "pages/API/websocket-global/websocket-global",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"navigationBarTitleText": ""
}
}, {
"path": "pages/API/get-system-info/get-system-info",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"navigationBarTitleText": ""
}
}, {
"path": "pages/API/get-device-info/get-device-info",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"navigationBarTitleText": ""
}
}, {
"path": "pages/API/get-app-base-info/get-app-base-info",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"navigationBarTitleText": ""
}
}, {
"path": "pages/API/get-system-setting/get-system-setting",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"navigationBarTitleText": ""
}
}, {
"path": "pages/API/get-app-authorize-setting/get-app-authorize-setting",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"navigationBarTitleText": ""
}
}, {
"path": "pages/API/preview-image/preview-image",
"style": {
"navigationBarTitleText": "图片预览",
"enablePullDownRefresh": false
"navigationBarTitleText": "图片预览"
}
}, {
"path" : "pages/component/scroll-view/scroll-view-refresher",
"style" :
{
"navigationBarTitleText": "scroll-view-refresher",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/component/list/list",
"style" :
{
"navigationBarTitleText": "列表到详情示例",
"enablePullDownRefresh": false
"path": "pages/component/scroll-view/scroll-view-refresher",
"style": {
"navigationBarTitleText": "scroll-view-refresher"
}
}, {
"path": "pages/component/list/list",
"style": {
"navigationBarTitleText": "列表到详情示例"
}
,{
"path" : "pages/API/get-network-type/get-network-type",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}, {
"path": "pages/API/get-network-type/get-network-type",
"style": {
"navigationBarTitleText": ""
}
}
,{
"path" : "pages/component/list/detail/detail",
"style" :
{
"navigationBarTitleText": "详情示例",
"enablePullDownRefresh": false
}, {
"path": "pages/component/list/detail/detail",
"style": {
"navigationBarTitleText": "详情示例"
}
}
,{
"path" : "pages/API/page-scrollTo/page-scrollTo",
"style" : {
"navigationBarTitleText": "pageScrollTo",
"enablePullDownRefresh": false
}
}
// , {
// "path": "pages/API/pull-down-refresh/pull-down-refresh",
// "style": {
// "navigationBarTitleText": "页面下拉刷新",
// "enablePullDownRefresh": true
// }
// }
],
"globalStyle": {
"pageOrientation": "portrait",
......@@ -597,19 +585,19 @@
"borderStyle": "black",
"backgroundColor": "#F8F8F8",
"list": [{
"pagePath": "pages/tabBar/component/component",
"pagePath": "pages/tabBar/component",
"iconPath": "static/component.png",
"selectedIconPath": "static/componentHL.png",
"text": "内置组件"
},
{
"pagePath": "pages/tabBar/API/API",
"pagePath": "pages/tabBar/API",
"iconPath": "static/api.png",
"selectedIconPath": "static/apiHL.png",
"text": "接口"
},
{
"pagePath": "pages/tabBar/CSS/CSS",
"pagePath": "pages/tabBar/CSS",
"iconPath": "static/extui.png",
"selectedIconPath": "static/extuiHL.png",
"text": "CSS"
......
......@@ -41,7 +41,7 @@
</view>
</template>
<script lang="ts">
<script lang="uts">
type ItemType = {
value : 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 @@
return {
list: [{
id: "page",
name: "界面",
name: "页面",
open: false,
pages: [
{
name: "设置导航条",
url: "set-navigation-bar-title"
},
//#ifdef APP-PLUS
{
name: "原生子窗体",
url: "subnvue",
},
//#endif
{
name: "页面跳转",
url: "navigator",
enable: true
},
//#ifndef MP-TOUTIAO
{
name: "设置导航条",
url: "set-navigation-bar-title"
},
{
name: "设置TabBar",
url: "set-tabbar",
},
//#endif
{
name: "下拉刷新",
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: "创建动画",
url: "animation",
},
// #ifndef QUICKAPP-WEBVIEW-UNION
{
name: "创建绘画",
url: "canvas",
},
// #endif
// #ifndef MP-LARK
{
name: "节点信息",
url: "get-node-info",
},
// #endif
{
name: "节点布局交互状态",
url: "intersection-observer",
......@@ -112,11 +117,6 @@
url: "toast",
enable: true
},
{
name: "将页面滚动到目标位置",
url: "page-scrollTo",
enable: true
},
] as Page[],
},
{
......@@ -184,19 +184,19 @@
url: "brightness",
},
// #endif
// #ifdef APP-PLUS || MP-WEIXIN || MP-QQ || MP-JD
// #ifdef APP || MP-WEIXIN || MP-QQ || MP-JD
{
name: "蓝牙",
url: "bluetooth",
},
// #endif
// #ifdef APP-PLUS || MP-WEIXIN || MP-QQ
// #ifdef APP || MP-WEIXIN || MP-QQ
{
name: "生物认证",
url: "soter",
},
// #endif
// #ifdef APP-PLUS || MP-WEIXIN
// #ifdef APP || MP-WEIXIN
{
name: "iBeacon",
url: "ibeacon",
......@@ -214,7 +214,7 @@
url: "on-compass-change",
},
// #endif
//#ifdef APP-PLUS
//#ifdef APP
{
name: "监听距离传感器",
url: "/platforms/app-plus/proximity/proximity",
......@@ -287,7 +287,7 @@
url: "inner-audio",
},
// #endif
// #ifdef APP-PLUS || MP-WEIXIN || MP-BAIDU || MP-QQ|| MP-JD
// #ifdef APP || MP-WEIXIN || MP-BAIDU || MP-QQ|| MP-JD
{
name: "录音",
url: "voice",
......@@ -344,7 +344,7 @@
url: "map",
},
// #endif
// #ifdef APP-PLUS
// #ifdef APP
{
name: "地图搜索",
url: "map-search",
......@@ -363,7 +363,7 @@
url: "storage",
enable: true
},
// #ifdef APP-PLUS
// #ifdef APP
{
name: "SQLite",
url: "sqlite",
......@@ -371,7 +371,7 @@
// #endif
] as Page[],
},
// #ifdef APP-PLUS || MP-WEIXIN
// #ifdef APP || MP-WEIXIN
{
id: "rewarded-video-ad",
url: "rewarded-video-ad",
......@@ -381,7 +381,7 @@
pages: [] as Page[]
},
// #endif
// #ifdef APP-PLUS
// #ifdef APP
{
id: "full-screen-video-ad",
url: "full-screen-video-ad",
......@@ -421,7 +421,7 @@
] as Page[],
},
// #endif
// #ifdef APP-PLUS || MP-WEIXIN
// #ifdef APP || MP-WEIXIN
{
id: "payment",
name: "支付",
......@@ -434,7 +434,7 @@
] as Page[],
},
// #endif
// #ifdef APP-PLUS
// #ifdef APP
{
id: "speech",
name: "语音",
......@@ -501,5 +501,5 @@
</script>
<style>
@import '../../../common/uni-uvue.css';
@import '../../common/uni-uvue.css';
</style>
\ No newline at end of file
<template>
A<template>
<view class="uni-container">
<view class="uni-header-logo">
<image class="uni-header-image" src="/static/extuiIndex.png"></image>
......@@ -355,5 +355,5 @@
</script>
<style>
@import '../../../common/uni-uvue.css';
@import '../../common/uni-uvue.css';
</style>
\ No newline at end of file
......@@ -261,5 +261,5 @@
</script>
<style>
@import '../../../common/uni-uvue.css';
@import '../../common/uni-uvue.css';
</style>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册