Browse Source

'优化一些代码'

china德鲁 5 years ago
parent
commit
bf9694acc4

+ 8 - 0
Himalayan.code-workspace

@@ -0,0 +1,8 @@
+{
+	"folders": [
+		{
+			"path": "."
+		}
+	],
+	"settings": {}
+}

+ 2 - 3
app.wxss

@@ -3,8 +3,6 @@
 /* 引入icon样式库 */
 /* 引入icon样式库 */
 @import 'icon.wxss';
 @import 'icon.wxss';
 
 
-
-
 /* 登录样式 */
 /* 登录样式 */
 .logo{
 .logo{
     width: 128rpx;
     width: 128rpx;
@@ -96,7 +94,8 @@
   .Title-left{
   .Title-left{
     float: left;
     float: left;
     font-size: 37rpx;
     font-size: 37rpx;
-    font-weight: 470;
+    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
+    font-weight: 800;
     color: #333;
     color: #333;
   }
   }
   .Title-right{
   .Title-right{

+ 13 - 0
pages/details/detail.wxss

@@ -0,0 +1,13 @@
+.top-title-bar{
+    width: 100%;
+    height: 300rpx;
+    background-color: black;
+}
+.Performance{
+    width: 100%;
+    height: 500rpx;
+    /* height: 100%; */
+    background-color: #fff;
+    border-top-left-radius: 25rpx;
+    border-top-right-radius: 25rpx;
+}

+ 65 - 0
pages/details/details.js

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

+ 4 - 4
pages/details/details.wxml

@@ -1,11 +1,11 @@
 <!-- title和背景 -->
 <!-- title和背景 -->
-<view class="">
+<view class="top-title-bar">
     <view class="">
     <view class="">
         <view class="">
         <view class="">
-            
+            dsadsa
         </view>
         </view>
         <view class="">
         <view class="">
-            
+            dsad
         </view>
         </view>
     </view>
     </view>
     <view class="">
     <view class="">
@@ -13,7 +13,7 @@
     </view>
     </view>
 </view>
 </view>
 <!-- 节目列表 -->
 <!-- 节目列表 -->
-<view class="">
+<view class="Performance">
     <view class="">
     <view class="">
         <view class="" wx:for="{{}}">
         <view class="" wx:for="{{}}">
             {{}}
             {{}}

+ 8 - 2
pages/index/index.js

@@ -17,6 +17,13 @@ Page({
       '/image/ad6.jpg',
       '/image/ad6.jpg',
       '/image/ad7.jpg'
       '/image/ad7.jpg'
     ],
     ],
+    navList:[
+      {icon:'/image/nav-icon/diantai.png',events:'goToBangDan',text:'榜单'},
+      {icon:'/image/nav-icon/diantai.png',events:'goToBangDan',text:'听小说'},
+      {icon:'/image/nav-icon/diantai.png',events:'goToBangDan',text:'情感电台'},
+      {icon:'/image/nav-icon/diantai.png',events:'goToBangDan',text:'听相声'},
+      {icon:'/image/nav-icon/diantai.png',events:'goToBangDan',text:'儿童故事'},
+    ],
     swiperCurrent: 0,
     swiperCurrent: 0,
   },
   },
   //轮播图改变事件
   //轮播图改变事件
@@ -43,6 +50,7 @@ Page({
         if(result.statusCode == 200){
         if(result.statusCode == 200){
           that.setData({
           that.setData({
             showitem:true,
             showitem:true,
+            // guess:result.data.guess.list[0].list,
             xiaoshuocontent:result.data.hotRecommends.list[0].list,
             xiaoshuocontent:result.data.hotRecommends.list[0].list,
             xiangshengcontent:result.data.hotRecommends.list[2].list,
             xiangshengcontent:result.data.hotRecommends.list[2].list,
             tuokocontent:result.data.hotRecommends.list[4].list
             tuokocontent:result.data.hotRecommends.list[4].list
@@ -53,8 +61,6 @@ Page({
           })
           })
         }
         }
       },
       },
-      fail: ()=>{},
-      complete: ()=>{}
     });
     });
   },
   },
   goToBangDan:function(){
   goToBangDan:function(){

+ 13 - 30
pages/index/index.wxml

@@ -24,27 +24,10 @@
 <!-- 宫格导航 -->
 <!-- 宫格导航 -->
 <view class="nav">
 <view class="nav">
   <block>  
   <block>  
-  <!-- 因为每个宫格的导航都不一样所以没有使用循环 -->
-    <view class="navItem" bindtap="goToBangDan">
+    <view class="navItem" bindtap="{{item.events}}" wx:for="{{navList}}"  wx:key="index">
       <!-- 因为没有合适的图,所以全部使用的一样的 -->
       <!-- 因为没有合适的图,所以全部使用的一样的 -->
-      <image class="navIcon" src="/image/nav-icon/bangdan.png" mode="widthFix" lazy-load="false"></image>
-      <text class="navText">榜单</text>
-    </view>
-     <view class="navItem" bindtap="">
-      <image class="navIcon" src="/image/nav-icon/bangdan.png" mode="widthFix" lazy-load="false"></image>
-      <text class="navText">听小说</text>
-    </view>
-     <view class="navItem" bindtap="">
-      <image class="navIcon" src="/image/nav-icon/bangdan.png" mode="widthFix" lazy-load="false"></image>
-      <text class="navText">情感电台</text>
-    </view>
-     <view class="navItem" bindtap="">
-      <image class="navIcon" src="/image/nav-icon/bangdan.png" mode="widthFix" lazy-load="false"></image>
-      <text class="navText">听相声</text>
-    </view>
-     <view class="navItem" bindtap="">
-      <image class="navIcon" src="/image/nav-icon/bangdan.png" mode="widthFix" lazy-load="false"></image>
-      <text class="navText">儿童故事</text>
+      <image class="navIcon" src="{{item.icon}}" mode="widthFix" lazy-load="false"></image>
+      <text class="navText">{{item.text}}</text>
     </view>
     </view>
   </block>
   </block>
 </view>
 </view>
@@ -106,11 +89,11 @@
             <view class="introduction">{{item.trackTitle}}</view>
             <view class="introduction">{{item.trackTitle}}</view>
           </view>
           </view>
           <view class="count">
           <view class="count">
-            <text class="playcount">
+            <view class="playcount">
               <!-- <text class="icon-"></text> -->
               <!-- <text class="icon-"></text> -->
               126亿
               126亿
-            </text>
-            <text class="jicount">{{item.tracks}}集</text>
+            </view>
+            <view class="jicount">{{item.tracks}}集</view>
           </view>
           </view>
         </view>
         </view>
       </view>
       </view>
@@ -133,11 +116,11 @@
             <view class="introduction">{{item.trackTitle}}</view>
             <view class="introduction">{{item.trackTitle}}</view>
           </view>
           </view>
           <view class="count">
           <view class="count">
-            <text class="playcount">
+            <view class="playcount">
               <!-- <text class="icon-"></text> -->
               <!-- <text class="icon-"></text> -->
               126亿
               126亿
-            </text>
-            <text class="jicount">{{item.tracks}}集</text>
+            </view>
+            <view class="jicount">{{item.tracks}}集</view>
           </view>
           </view>
         </view>
         </view>
       </view>
       </view>
@@ -160,11 +143,11 @@
             <view class="introduction">{{item.trackTitle}}</view>
             <view class="introduction">{{item.trackTitle}}</view>
           </view>
           </view>
           <view class="count">
           <view class="count">
-            <text class="playcount">
-              <!-- <text class="icon-"></text> -->
+            <view class="playcount">
+              <!-- <view class="icon-"></view> -->
               126亿
               126亿
-            </text>
-            <text class="jicount">{{item.tracks}}集</text>
+            </view>
+            <view class="jicount">{{item.tracks}}集</view>
           </view>
           </view>
         </view>
         </view>
       </view>
       </view>

+ 3 - 0
pages/index/index.wxss

@@ -181,6 +181,7 @@
   height: 50rpx;
   height: 50rpx;
   display: flex;
   display: flex;
   justify-content: start;
   justify-content: start;
+  align-items: center;
 }
 }
 .playcount{
 .playcount{
  font-size: 25rpx;
  font-size: 25rpx;
@@ -202,4 +203,6 @@
   height: 100rpx;
   height: 100rpx;
   text-align: center;
   text-align: center;
   margin: 0rpx auto;
   margin: 0rpx auto;
+  color: red;
+  font-weight: 800;
 }
 }

+ 1 - 0
pages/user/user.wxml

@@ -65,6 +65,7 @@
                 <view class="">
                 <view class="">
                     <text class="icon-creative text-gray"></text>
                     <text class="icon-creative text-gray"></text>
                     夜间模式
                     夜间模式
+                    <!-- <button class="switch"></button> -->
                 </view>
                 </view>
                 <text class="icon-right text-gray"></text>
                 <text class="icon-right text-gray"></text>
             </view>
             </view>

+ 8 - 1
project.config.json

@@ -48,7 +48,7 @@
 			"list": []
 			"list": []
 		},
 		},
 		"miniprogram": {
 		"miniprogram": {
-			"current": 3,
+			"current": 4,
 			"list": [
 			"list": [
 				{
 				{
 					"id": -1,
 					"id": -1,
@@ -75,6 +75,13 @@
 					"id": -1,
 					"id": -1,
 					"name": "user",
 					"name": "user",
 					"pathName": "pages/user/user",
 					"pathName": "pages/user/user",
+					"query": "",
+					"scene": null
+				},
+				{
+					"id": -1,
+					"name": "details",
+					"pathName": "pages/details/details",
 					"scene": null
 					"scene": null
 				}
 				}
 			]
 			]

+ 0 - 0
utils/utils.js