Browse Source

详情页

xulihua 5 năm trước cách đây
mục cha
commit
76262049b7

+ 23 - 23
app.json

@@ -4,7 +4,8 @@
     "pages/logs/logs",
     "pages/logs/logs",
     "pages/rise/rise",
     "pages/rise/rise",
     "pages/drop/drop",
     "pages/drop/drop",
-    "pages/me/me"
+    "pages/me/me",
+    "pages/details/details"
   ],
   ],
   "window": {
   "window": {
     "backgroundTextStyle": "light",
     "backgroundTextStyle": "light",
@@ -12,38 +13,37 @@
     "navigationBarTitleText": "首页",
     "navigationBarTitleText": "首页",
     "navigationBarTextStyle": "black"
     "navigationBarTextStyle": "black"
   },
   },
-  "tabBar":{
-    "color":"#fff",
-    "selectedColor":"#fff",
+  "tabBar": {
+    "color": "#fff",
+    "selectedColor": "#fff",
     "backgroundColor": "#000",
     "backgroundColor": "#000",
-    "borderStyle":"white",
-    "list":[
+    "borderStyle": "white",
+    "list": [
       {
       {
-        "selectedIconPath":"images/tabBar011.png",
-        "iconPath":"images/tabBar001.png",
-        "pagePath":"pages/index/index",
-        "text":"首页"
+        "selectedIconPath": "images/tabBar011.png",
+        "iconPath": "images/tabBar001.png",
+        "pagePath": "pages/index/index",
+        "text": "首页"
       },
       },
       {
       {
-        "selectedIconPath":"images/tabBar012.png",
-        "iconPath":"images/tabBar002.png",
-        "pagePath":"pages/rise/rise",
-        "text":"涨幅"
+        "selectedIconPath": "images/tabBar012.png",
+        "iconPath": "images/tabBar002.png",
+        "pagePath": "pages/rise/rise",
+        "text": "涨幅"
       },
       },
       {
       {
-        "selectedIconPath":"images/tabBar013.png",
-        "iconPath":"images/tabBar003.png",
-        "pagePath":"pages/drop/drop",
-        "text":"跌幅"
+        "selectedIconPath": "images/tabBar013.png",
+        "iconPath": "images/tabBar003.png",
+        "pagePath": "pages/drop/drop",
+        "text": "跌幅"
       },
       },
       {
       {
-        "selectedIconPath":"images/tabBar014.png",
-        "iconPath":"images/tabBar004.png",
-        "pagePath":"pages/me/me",
-        "text":"我的"
+        "selectedIconPath": "images/tabBar014.png",
+        "iconPath": "images/tabBar004.png",
+        "pagePath": "pages/me/me",
+        "text": "我的"
       }
       }
     ]
     ]
-
   },
   },
   "style": "v2",
   "style": "v2",
   "sitemapLocation": "sitemap.json"
   "sitemapLocation": "sitemap.json"

+ 66 - 0
pages/details/details.js

@@ -0,0 +1,66 @@
+// pages/details/details.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 3 - 0
pages/details/details.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 2 - 0
pages/details/details.wxml

@@ -0,0 +1,2 @@
+<!--pages/details/details.wxml-->
+<text>pages/details/details.wxml</text>

+ 1 - 0
pages/details/details.wxss

@@ -0,0 +1 @@
+/* pages/details/details.wxss */

+ 6 - 1
pages/drop/drop.js

@@ -79,7 +79,7 @@ Page({
   onShareAppMessage: function () {
   onShareAppMessage: function () {
 
 
   },
   },
-      swichNav: function( e ) {
+    swichNav: function( e ) {
 
 
         var that = this;
         var that = this;
 
 
@@ -98,4 +98,9 @@ Page({
         that.setData( { currentTab: e.detail.current });
         that.setData( { currentTab: e.detail.current });
 
 
     },
     },
+    gotoDetail:function(options){
+        wx.switchTab({
+          url: '../details/details',
+        })
+    }
 })
 })

+ 1 - 2
pages/drop/drop.wxml

@@ -3,17 +3,16 @@
   <view class="swiper-tab">
   <view class="swiper-tab">
     <view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" bindtap="swichNav">上周实际数据</view>
     <view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" bindtap="swichNav">上周实际数据</view>
     <view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" bindtap="swichNav">上周预测数据</view>
     <view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" bindtap="swichNav">上周预测数据</view>
-    
 </view>
 </view>
 
 
 <swiper current="{{currentTab}}" class="swiper-box" duration="300" style="height:{{winHeight - 31}}px" bindchange="bindChange">
 <swiper current="{{currentTab}}" class="swiper-box" duration="300" style="height:{{winHeight - 31}}px" bindchange="bindChange">
     <swiper-item>
     <swiper-item>
         <view>上周实际数据</view>
         <view>上周实际数据</view>
+        <button type="primary" bindtap="gotoDetail">跳转到详情页</button>
     </swiper-item>
     </swiper-item>
     <swiper-item>
     <swiper-item>
         <view>上周预测数据</view>
         <view>上周预测数据</view>
     </swiper-item>
     </swiper-item>
-    
 </swiper>
 </swiper>
 
 
 </view>
 </view>