Commit 5900ff005109fd6f3e5eb1586e364517bbd85eb0

Authored by 周铨
1 parent 29452b66

去除无用代码

1 { 1 {
2 "pages": [ 2 "pages": [
3 "pages/monitor/monitor", 3 "pages/monitor/monitor",
4 - "pages/home/home",  
5 - "pages/detail/detail" 4 + "pages/home/home"
6 ], 5 ],
7 "tabBar": { 6 "tabBar": {
8 "color": "#323241", 7 "color": "#323241",
1 -{  
2 - "usingComponents": {}  
3 -}  
1 -// pages/detail/detail.ts  
2 -Page({  
3 -  
4 - /**  
5 - * 页面的初始数据  
6 - */  
7 - data: {  
8 -  
9 - },  
10 -  
11 - /**  
12 - * 生命周期函数--监听页面加载  
13 - */  
14 - onLoad(params: any) {  
15 - console.log(params, 'detail---params')  
16 - },  
17 -  
18 - /**  
19 - * 生命周期函数--监听页面初次渲染完成  
20 - */  
21 - onReady() {  
22 -  
23 - },  
24 -  
25 - /**  
26 - * 生命周期函数--监听页面显示  
27 - */  
28 - onShow() {  
29 -  
30 - },  
31 -  
32 - /**  
33 - * 生命周期函数--监听页面隐藏  
34 - */  
35 - onHide() {  
36 -  
37 - },  
38 -  
39 - /**  
40 - * 生命周期函数--监听页面卸载  
41 - */  
42 - onUnload() {  
43 -  
44 - },  
45 -  
46 - /**  
47 - * 页面相关事件处理函数--监听用户下拉动作  
48 - */  
49 - onPullDownRefresh() {  
50 -  
51 - },  
52 -  
53 - /**  
54 - * 页面上拉触底事件的处理函数  
55 - */  
56 - onReachBottom() {  
57 -  
58 - },  
59 -  
60 - /**  
61 - * 用户点击右上角分享  
62 - */  
63 - onShareAppMessage() {  
64 -  
65 - },  
66 - gobackEvent(){  
67 - wx.navigateBack()  
68 - },  
69 - getcurrentPage(){  
70 - // let pages = getCurrentPages(); //当前页面栈  
71 - const deviceInfo = wx.getDeviceInfo()  
72 - console.log(deviceInfo,'pgagegegeg')  
73 - }  
74 -})  
1 -<view class="container_detail">  
2 - 这是详情页面  
3 - <view>  
4 - <van-button bindtap="gobackEvent" type="primary">返回到上级</van-button>  
5 - </view>  
6 - <view>  
7 - '-----------------------'  
8 - </view>  
9 - <view>  
10 - <van-button bindtap="getcurrentPage" type="primary">查看当前页面</van-button>  
11 - </view>  
12 -</view>  
1 -.container_detail {  
2 - background: red;  
3 -}  
@@ -2,20 +2,4 @@ @@ -2,20 +2,4 @@
2 <view class="home_content"> 2 <view class="home_content">
3 home页面 3 home页面
4 </view> 4 </view>
5 -  
6 - <view style="margin-top: 100rpx;">  
7 - <mutiSlots>  
8 - <view slot="header">  
9 - 这是插槽进来的数据---header  
10 - </view>  
11 - <view slot="footer">  
12 - 这是插槽进来的数据---footer  
13 - </view>  
14 - </mutiSlots>  
15 - </view>  
16 -  
17 -  
18 - <view>  
19 - <van-button bindtap="gotoDetail">进入详情</van-button>  
20 - </view>  
21 </view> 5 </view>