Browse Source

update: Unified code style

qiang 3 years ago
parent
commit
551d5f2612
58 changed files with 1965 additions and 1951 deletions
  1. 1 1
      LICENSE
  2. 2 2
      api/index.js
  3. 25 26
      app.js
  4. 8 8
      app.json
  5. 18 18
      component/search/search.js
  6. 1 1
      component/search/search.json
  7. 1 5
      component/search/search.wxml
  8. 0 0
      image/swiper/ad1.jpg
  9. 0 0
      image/swiper/ad2.jpg
  10. 0 0
      image/swiper/ad3.jpg
  11. 0 0
      image/swiper/ad4.jpg
  12. 0 0
      image/swiper/ad5.jpg
  13. 0 0
      image/swiper/ad6.jpg
  14. 0 0
      image/swiper/ad7.jpg
  15. 0 0
      image/tabbar/collection-icon.png
  16. 0 0
      image/tabbar/collection-selectIcon.png
  17. 0 0
      image/tabbar/fen-icon.png
  18. 0 0
      image/tabbar/fen-selectIcon.png
  19. 0 0
      image/tabbar/home-icon.png
  20. 0 0
      image/tabbar/home-selectIcon.png
  21. 0 0
      image/tabbar/user-icon.png
  22. 0 0
      image/tabbar/user-selectIcon.png
  23. 0 3
      pages/classification/classification.js
  24. 3 3
      pages/classification/classification.json
  25. 28 25
      pages/classification/classification.wxml
  26. 63 55
      pages/classification/classification.wxss
  27. 7 33
      pages/collection/collection.js
  28. 3 3
      pages/collection/collection.json
  29. 72 71
      pages/collection/collection.wxml
  30. 73 66
      pages/collection/collection.wxss
  31. 69 78
      pages/details/details.js
  32. 1 1
      pages/details/details.json
  33. 57 56
      pages/details/details.wxml
  34. 142 136
      pages/details/details.wxss
  35. 59 61
      pages/index/bangdan/bangdan.js
  36. 3 3
      pages/index/bangdan/bangdan.json
  37. 46 44
      pages/index/bangdan/bangdan.wxml
  38. 133 125
      pages/index/bangdan/bangdan.wxss
  39. 74 76
      pages/index/index.js
  40. 3 3
      pages/index/index.json
  41. 128 132
      pages/index/index.wxml
  42. 85 73
      pages/index/index.wxss
  43. 13 27
      pages/search/search.js
  44. 1 1
      pages/search/search.json
  45. 87 77
      pages/search/search.wxss
  46. 19 29
      pages/user/phoneLogin/phoneLogin.js
  47. 1 3
      pages/user/phoneLogin/phoneLogin.json
  48. 37 37
      pages/user/phoneLogin/phoneLogin.wxml
  49. 140 125
      pages/user/phoneLogin/phoneLogin.wxss
  50. 92 94
      pages/user/user.js
  51. 1 1
      pages/user/user.json
  52. 90 89
      pages/user/user.wxss
  53. 120 111
      project.config.json
  54. 14 12
      style/color.wxss
  55. 192 177
      style/common.wxss
  56. 0 3
      style/icons.wxss
  57. 23 27
      utils/request.js
  58. 30 30
      utils/utils.js

+ 1 - 1
LICENSE

@@ -1,6 +1,6 @@
 MIT License
 
-Copyright (c) 2020 XiaoQiang
+Copyright (c) 2020 Qiang
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal

+ 2 - 2
api/index.js

@@ -1,8 +1,8 @@
-const request = require('../utils/request').request;
+const { request } = require('../utils/request');
 
 function getData() {
   return request({
-    method: 'get'
+    method: 'GET'  // 因为没有二级请求地址所以不需要添加url
   })
 }
 

+ 25 - 26
app.js

@@ -1,29 +1,28 @@
 //app.js
 App({
-  onLaunch: function () {
-    // 获取用户信息
-    wx.getSetting({
-      success: res => {
-        if (res.authSetting['scope.userInfo']) {
-          // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框
-          wx.getUserInfo({
-            success: res => {
-              // 可以将 res 发送给后台解码出 unionId
-              // console.log("app.js:"+res.userInfo)
-              this.globalData.userInfo = res.userInfo
-              this.globalData.login = false
-              // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
-              // 所以此处加入 callback 以防止这种情况
-              if (this.userInfoReadyCallback) {
-                this.userInfoReadyCallback(res)
-              }
-            }
-          })
-        }
-      }
-    })
-  },
-  globalData: {
-    userInfo:null
-  }
+	onLaunch: function () {
+		// 获取用户信息
+		wx.getSetting({
+			success: res => {
+				if (res.authSetting['scope.userInfo']) {
+					// 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框
+					wx.getUserInfo({
+						success: res => {
+							// 可以将 res 发送给后台解码出 unionId
+							this.globalData.userInfo = res.userInfo
+							this.globalData.login = false
+							// 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
+							// 所以此处加入 callback 以防止这种情况
+							if (this.userInfoReadyCallback) {
+								this.userInfoReadyCallback(res)
+							}
+						}
+					})
+				}
+			}
+		})
+	},
+	globalData: {
+		userInfo: null
+	}
 })

+ 8 - 8
app.json

@@ -22,26 +22,26 @@
       {
         "pagePath": "pages/index/index",
         "text": "首页",
-        "iconPath": "/image/icon/home-icon.png",
-        "selectedIconPath": "/image/icon/home-selectIcon.png"
+        "iconPath": "/image/tabbar/home-icon.png",
+        "selectedIconPath": "/image/tabbar/home-selectIcon.png"
       },
       {
         "pagePath": "pages/classification/classification",
         "text": "分类",
-        "iconPath": "/image/icon/fen-icon.png",
-        "selectedIconPath": "/image/icon/fen-selectIcon.png"
+        "iconPath": "/image/tabbar/fen-icon.png",
+        "selectedIconPath": "/image/tabbar/fen-selectIcon.png"
       },
       {
         "pagePath": "pages/collection/collection",
         "text": "收藏",
-        "iconPath": "/image/icon/collection-icon.png",
-        "selectedIconPath": "/image/icon/collection-selectIcon.png"
+        "iconPath": "/image/tabbar/collection-icon.png",
+        "selectedIconPath": "/image/tabbar/collection-selectIcon.png"
       },
       {
         "pagePath": "pages/user/user",
         "text": "我的",
-        "iconPath": "/image/icon/user-icon.png",
-        "selectedIconPath": "/image/icon/user-selectIcon.png"
+        "iconPath": "/image/tabbar/user-icon.png",
+        "selectedIconPath": "/image/tabbar/user-selectIcon.png"
       }
     ]
   },

+ 18 - 18
component/search/search.js

@@ -1,21 +1,21 @@
 //Component Object
 Component({
-    properties: {
-        myProperty:{
-            type:String,
-            value:'',
-            observer: function(){}
-        },
-    },
-    data: {
-        disabled:true,
-        isshow:false,
-    },
-    methods: {
-        goToSearch(){
-            wx.navigateTo({
-              url: '/pages/search/search',
-            })
-        }
-    },
+  properties: {
+    myProperty: {
+		type: String,
+			value: '',
+			observer: function () { }
+		},
+  },
+	data: {
+		disabled: true,
+		isshow: false,
+	},
+	methods: {
+		goToSearch() {
+			wx.navigateTo({
+				url: '/pages/search/search',
+			})
+		}
+	},
 });

+ 1 - 1
component/search/search.json

@@ -1,3 +1,3 @@
 {
-    "component":true
+  "component":true
 }

+ 1 - 5
component/search/search.wxml

@@ -8,8 +8,4 @@
 		<input placeholder="搜索你想听的节目" disabled="{{disabled}}"></input>
 	</view>
 	<view class="search-right" wx:if="{{isshow}}">取消</view>
-</view>
-<!-- <view class="search marginTopBottom" bindtap="goToSearch">
-  <text class="icon-search"></text>
-  <view class="search-item">搜索你想听的节目</view>
-</view> -->
+</view>

+ 0 - 0
image/ad1.jpg → image/swiper/ad1.jpg


+ 0 - 0
image/ad2.jpg → image/swiper/ad2.jpg


+ 0 - 0
image/ad3.jpg → image/swiper/ad3.jpg


+ 0 - 0
image/ad4.jpg → image/swiper/ad4.jpg


+ 0 - 0
image/ad5.jpg → image/swiper/ad5.jpg


+ 0 - 0
image/ad6.jpg → image/swiper/ad6.jpg


+ 0 - 0
image/ad7.jpg → image/swiper/ad7.jpg


+ 0 - 0
image/icon/collection-icon.png → image/tabbar/collection-icon.png


+ 0 - 0
image/icon/collection-selectIcon.png → image/tabbar/collection-selectIcon.png


+ 0 - 0
image/icon/fen-icon.png → image/tabbar/fen-icon.png


+ 0 - 0
image/icon/fen-selectIcon.png → image/tabbar/fen-selectIcon.png


+ 0 - 0
image/icon/home-icon.png → image/tabbar/home-icon.png


+ 0 - 0
image/icon/home-selectIcon.png → image/tabbar/home-selectIcon.png


+ 0 - 0
image/icon/user-icon.png → image/tabbar/user-icon.png


+ 0 - 0
image/icon/user-selectIcon.png → image/tabbar/user-selectIcon.png


+ 0 - 3
pages/classification/classification.js

@@ -186,14 +186,11 @@ Page({
   onLoad: function (options) {
     var that = this;
     //调用getSystemInfo APi获取到用户的手机屏幕高度,动态设置scroll-view的高度
-
     // 还有缺陷,代改进
     wx.getSystemInfo({
       success (res) {
-        
         // var heightleft = (res.windowHeight*2);
         var height = (res.windowHeight*2);
-       
         that.setData({
           phoneHeight:height,
         })

+ 3 - 3
pages/classification/classification.json

@@ -1,5 +1,5 @@
 {
-  "usingComponents": {
-    "search":"/component/search/search"
-  }
+	"usingComponents": {
+		"search": "/component/search/search"
+	}
 }

+ 28 - 25
pages/classification/classification.wxml

@@ -3,28 +3,31 @@
 
 <!-- 分类索引 -->
 <view class="hmly-ification">
-    <!-- 左边部分 -->
-    <scroll-view class="hmly-scroll-left" scroll-y scroll-with-animation style="height:{{phoneHeight}}rpx" scroll-top="{{VerticalNavTop}}">
-        <block wx:for="{{ificationTitle}}" wx:key="index">
-            <view class="hmly-left-title {{index === activeIndex ? 'hmly-active':''}}" data-index="{{index}}" data-id="{{index}}" bindtap="change">{{item.title}}</view>
-        </block>
-    </scroll-view>
-    
-    <!-- 右边部分 -->
-    
-    <scroll-view class="hmly-scroll-right" scroll-y bindscroll="showActive" style="height:{{phoneHeight}}rpx" scroll-into-view="main-id-{{TabCur}}">
-        <view class="hmly-content-scroll-item" wx:for="{{ificationContent}}" wx:key="index"  data-index="{{index}}" id="main-id-{{index}}" >
-            <view class="hmly-top">
-                <view class="hmly-content-title">
-                    {{item.title}}
-                    <text class="icon-right"></text>
-                </view>
-            </view>
-            <view class="hmly-content">
-                <view class="hmly-content-text" wx:for="{{item.content}}" wx:key="index">
-                    {{item.text}}
-                </view>
-            </view>
-        </view>
-    </scroll-view>
-</view>
+	<!-- 左边部分 -->
+	<scroll-view class="hmly-scroll-left" scroll-y scroll-with-animation style="height:{{phoneHeight}}rpx"
+		scroll-top="{{VerticalNavTop}}">
+		<block wx:for="{{ificationTitle}}" wx:key="index">
+			<view class="hmly-left-title {{index === activeIndex ? 'hmly-active':''}}" data-index="{{index}}"
+				data-id="{{index}}" bindtap="change">{{item.title}}</view>
+		</block>
+	</scroll-view>
+
+	<!-- 右边部分 -->
+	<scroll-view class="hmly-scroll-right" scroll-y bindscroll="showActive" style="height:{{phoneHeight}}rpx"
+		scroll-into-view="main-id-{{TabCur}}">
+		<view class="hmly-content-scroll-item" wx:for="{{ificationContent}}" wx:key="index" data-index="{{index}}"
+			id="main-id-{{index}}">
+			<view class="hmly-top">
+				<view class="hmly-content-title">
+					{{item.title}}
+					<text class="icon-right"></text>
+				</view>
+			</view>
+			<view class="hmly-content">
+				<view class="hmly-content-text" wx:for="{{item.content}}" wx:key="index">
+					{{item.text}}
+				</view>
+			</view>
+		</view>
+	</scroll-view>
+</view>

+ 63 - 55
pages/classification/classification.wxss

@@ -1,67 +1,75 @@
 /* pages/classification/classification.wxss */
-.hmly-ification{
-    width: 100%;
-    height: 100%;
-    
-    background-color: rgb(243, 244, 246);
-    display: flex;
-    justify-content: start;
+.hmly-ification {
+	width: 100%;
+	height: 100%;
+
+	background-color: rgb(243, 244, 246);
+	display: flex;
+	justify-content: start;
 }
-.hmly-scroll-left{
-    width: 22%;
-    padding-top: 55rpx;
-    margin-right: 20rpx;
-    background-color: #fff;
-    overflow: hidden;
+
+.hmly-scroll-left {
+	width: 22%;
+	padding-top: 55rpx;
+	margin-right: 20rpx;
+	background-color: #fff;
+	overflow: hidden;
 }
-.hmly-left-title{
-    text-align: center;
-    font-size: 28rpx;
-    height: 100rpx;
-    line-height: 100rpx;
+
+.hmly-left-title {
+	text-align: center;
+	font-size: 28rpx;
+	height: 100rpx;
+	line-height: 100rpx;
 }
 
-.hmly-scroll-right{
-    width: 75%;
+.hmly-scroll-right {
+	width: 75%;
 }
-.hmly-active{
-    color: #ff520f;
-    background-color: rgb(243, 244, 246);
+
+.hmly-active {
+	color: #ff520f;
+	background-color: rgb(243, 244, 246);
 }
-.hmly-content-scroll-item{
-    width: auto;
-    height: auto;
-    margin-bottom: 20rpx;
+
+.hmly-content-scroll-item {
+	width: auto;
+	height: auto;
+	margin-bottom: 20rpx;
 }
-.hmly-top{
-    width: 100%;
-    height: 40rpx;
-    padding: 20rpx 0rpx;
-    margin: 0rpx auto;
+
+.hmly-top {
+	width: 100%;
+	height: 40rpx;
+	padding: 20rpx 0rpx;
+	margin: 0rpx auto;
 }
-.hmly-content-title{
-    color: rgb(12, 11, 11);
-    font-size: 30rpx;
-    text-align: center;
-    margin: 0rpx auto;
+
+.hmly-content-title {
+	color: rgb(12, 11, 11);
+	font-size: 30rpx;
+	text-align: center;
+	margin: 0rpx auto;
 }
-.hmly-content{
-    width: 100%;
-    height: 140rpx;
-    padding: 30rpx 0rpx;
-    display: flex;
-    flex-direction: row;
-    flex-wrap: wrap;
-    align-content: space-around;
-    justify-content: space-between;
-    background-color: #fff;
-    border-top-left-radius: 7rpx;
-    border-bottom-left-radius: 7rpx;
+
+.hmly-content {
+	width: 100%;
+	height: 140rpx;
+	padding: 30rpx 0rpx;
+	display: flex;
+	flex-direction: row;
+	flex-wrap: wrap;
+	align-content: space-around;
+	justify-content: space-between;
+	background-color: #fff;
+	border-top-left-radius: 7rpx;
+	border-bottom-left-radius: 7rpx;
 }
-.hmly-content-text{
-    width: 130rpx;
-    height: 50rpx;
-    margin: 10rpx 20rpx;
-    font-size: 30rpx;
-    text-align: center;
+
+.hmly-content-text {
+	width: 130rpx;
+	height: 50rpx;
+	margin: 10rpx 20rpx;
+	font-size: 30rpx;
+	text-align: center;
 }

+ 7 - 33
pages/collection/collection.js

@@ -1,11 +1,5 @@
-// pages/collection/collection.js
 const app = getApp()
-
 Page({
-
-  /**
-   * 页面的初始数据
-   */
   data: {
     currentIndex:0,
     height:0,
@@ -17,12 +11,8 @@ Page({
     ],
     login: true
   },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    var that = this;
+  onLoad(options) {
+    const that = this;
     wx.getSystemInfo({
       success (res) {
         that.setData({
@@ -38,25 +28,12 @@ Page({
             login: false,
           })
         }
-      },
-      fail(res){
-        console.log(res)
       }
     })
-
   },
-
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  },
-  
   // 点击获取头像和昵称
   bindGetUserInfo(e) {
-    var that = this;
+    const that = this;
     wx.getUserInfo({
       success: function (res) {
         app.globalData.userInfo = e.detail.userInfo;
@@ -70,9 +47,8 @@ Page({
       }
     })
   },
-
-  checkItem(e){
-    var that = this;
+  checkItem(e) {
+    const that = this;
     if (this.data.currentIndex === e.target.dataset.current) {
       return false;
     } else {
@@ -82,10 +58,8 @@ Page({
     }
   },
   // 滑动切换tab
-
-  changeTab:function(e){
-    var that = this;
-    console.log(e.detail.current)
+  changeTab(e) {
+    const that = this;
     that.setData({
       currentIndex:e.detail.current
     })

+ 3 - 3
pages/collection/collection.json

@@ -1,5 +1,5 @@
 {
-  "usingComponents": {
-    "search":"/component/search/search"
-  }
+	"usingComponents": {
+		"search": "/component/search/search"
+	}
 }

+ 72 - 71
pages/collection/collection.wxml

@@ -1,76 +1,77 @@
 <!-- 若是没有登录就显示登录界面 -->
 <block wx:if="{{login}}">
-    <!-- logo -->
-    <view class="hmly-logo" hover-class="none" hover-stop-propagation="false">
-        <image class="hmly-logo-img" src="/image/logo.png" mode="widthFix" lazy-load="false"></image>
-    </view>
-    <!-- 登录按钮 -->
-    <view class="hmly-login-button" hover-class="none" hover-stop-propagation="false">
-        <view class="hmly-wechat-login">
-            <button open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
-                <text class="icon-message"></text>  微信登录
-            </button>
-        </view>
-        <view class="hmly-phone-login">
-            <button>手机号登录</button>
-        </view>
-    </view>
+	<!-- logo -->
+	<view class="hmly-logo" hover-class="none" hover-stop-propagation="false">
+		<image class="hmly-logo-img" src="/image/logo.png" mode="widthFix" lazy-load="false"></image>
+	</view>
+	<!-- 登录按钮 -->
+	<view class="hmly-login-button" hover-class="none" hover-stop-propagation="false">
+		<view class="hmly-wechat-login">
+			<button open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
+				<text class="icon-message"></text> 微信登录
+			</button>
+		</view>
+		<view class="hmly-phone-login">
+			<button>手机号登录</button>
+		</view>
+	</view>
 </block>
 <block wx:else>
-    <!-- 搜索框 -->
-    <search></search>
-    <!-- 功能栏 -->
-    <view class="hmly-title-bar">
-      <view class="hmly-item-title {{index == currentIndex ? 'hmly-active' : ' '}}" 
-        data-index="{{index}}" bindtap="checkItem" wx:for="{{content}}" wx:key="index">
-          {{item.text}}
-      </view>
-    </view>
-    <swiper class="hmly-swiper-box" style="min-height:{{height}}px" duration="300" current="{{currentIndex}}" bindchange="changeTab">
-        <swiper-item class="hmly-swiper-box-item" >
-            <block>
-                <view class="hmly-no-content">
-                    <text class="icon-empty text-gray" style="font-size:400rpx"></text>
-                    <!-- <image src="/image/noContent.png"></image> -->
-                    <view class="hmly-but-box">
-                        <text style="font-size:30rpx" class="text-gray">没有内容</text>
-                        <button class="hmly-but">看看推荐</button>
-                    </view>
-                </view>
-            </block>
-        </swiper-item>
-        <swiper-item>
-            <block>
-                <view class="hmly-no-content">
-                    <text class="icon-empty text-gray" style="font-size:400rpx"></text>
-                    <view class="hmly-but-box">
-                        <text style="font-size:30rpx" class="text-gray">没有内容</text>
-                        <button class="hmly-but">看看推荐</button>
-                    </view>
-                </view>
-            </block>
-        </swiper-item>
-        <swiper-item>
-            <block>
-                <view class="hmly-no-content">
-                    <text class="icon-empty text-gray" style="font-size:400rpx"></text>
-                    <view class="hmly-but-box">
-                        <text style="font-size:30rpx" class="text-gray">没有内容</text>
-                        <button class="hmly-but">看看推荐</button>
-                    </view>
-                </view>
-            </block>
-        </swiper-item>
-        <swiper-item>
-            <block>
-                <view class="hmly-no-content">
-                    <text class="icon-empty text-gray" style="font-size:400rpx"></text>
-                    <view class="hmly-but-box">
-                        <text style="font-size:30rpx" class="text-gray">没有内容</text>
-                        <button class="hmly-but">更多礼包</button>
-                    </view>
-                </view>
-            </block>
-        </swiper-item>
-    </swiper>
+	<!-- 搜索框 -->
+	<search></search>
+	<!-- 功能栏 -->
+	<view class="hmly-title-bar">
+		<view class="hmly-item-title {{index == currentIndex ? 'hmly-active' : ' '}}" data-index="{{index}}"
+			bindtap="checkItem" wx:for="{{content}}" wx:key="index">
+			{{item.text}}
+		</view>
+	</view>
+	<swiper class="hmly-swiper-box" style="min-height:{{height}}px" duration="300" current="{{currentIndex}}"
+		bindchange="changeTab">
+		<swiper-item class="hmly-swiper-box-item">
+			<block>
+				<view class="hmly-no-content">
+					<text class="icon-empty text-gray" style="font-size:400rpx"></text>
+					<!-- <image src="/image/noContent.png"></image> -->
+					<view class="hmly-but-box">
+						<text style="font-size:30rpx" class="text-gray">没有内容</text>
+						<button class="hmly-but">看看推荐</button>
+					</view>
+				</view>
+			</block>
+		</swiper-item>
+		<swiper-item>
+			<block>
+				<view class="hmly-no-content">
+					<text class="icon-empty text-gray" style="font-size:400rpx"></text>
+					<view class="hmly-but-box">
+						<text style="font-size:30rpx" class="text-gray">没有内容</text>
+						<button class="hmly-but">看看推荐</button>
+					</view>
+				</view>
+			</block>
+		</swiper-item>
+		<swiper-item>
+			<block>
+				<view class="hmly-no-content">
+					<text class="icon-empty text-gray" style="font-size:400rpx"></text>
+					<view class="hmly-but-box">
+						<text style="font-size:30rpx" class="text-gray">没有内容</text>
+						<button class="hmly-but">看看推荐</button>
+					</view>
+				</view>
+			</block>
+		</swiper-item>
+		<swiper-item>
+			<block>
+				<view class="hmly-no-content">
+					<text class="icon-empty text-gray" style="font-size:400rpx"></text>
+					<view class="hmly-but-box">
+						<text style="font-size:30rpx" class="text-gray">没有内容</text>
+						<button class="hmly-but">更多礼包</button>
+					</view>
+				</view>
+			</block>
+		</swiper-item>
+	</swiper>
 </block>

+ 73 - 66
pages/collection/collection.wxss

@@ -1,88 +1,95 @@
 /* pages/collection/collection.wxss */
 
 .hmly-title-bar {
-  width: 100%;
-  height: 80rpx;
-  /* 这个配色不对 */
-  border-bottom: 1rpx solid #f1f1f1;
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  font-size: 28rpx;
-  overflow: hidden;
+	width: 100%;
+	height: 80rpx;
+	/* 这个配色不对 */
+	border-bottom: 1rpx solid #f1f1f1;
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	font-size: 28rpx;
+	overflow: hidden;
 }
 
 .hmly-item-title {
-  width: 200rpx;
-  height: 100%;
-  text-align: center;
-  line-height: 80rpx;
-  position: relative;
-  color: #aaa;
+	width: 200rpx;
+	height: 100%;
+	text-align: center;
+	line-height: 80rpx;
+	position: relative;
+	color: #aaa;
 }
 
 .hmly-active:after {
-  content: '';
-  width: 40rpx;
-  height: 8rpx;
-  position: absolute;
-  bottom: 0rpx;
-  left: 70rpx;
-  border-radius: 15rpx;
-  background: #ff520f;
+	content: '';
+	width: 40rpx;
+	height: 8rpx;
+	position: absolute;
+	bottom: 0rpx;
+	left: 70rpx;
+	border-radius: 15rpx;
+	background: #ff520f;
 }
 
 .hmly-active {
-  font-size: 32rpx;
-  font-weight: 700;
-  transition: all 0.3s;
-  color: #333;
+	font-size: 32rpx;
+	font-weight: 700;
+	transition: all 0.3s;
+	color: #333;
 }
 
 .hmly-collection-content {
-  width: 90%;
-  margin: 0rpx auto;
-  margin-top: 10rpx;
+	width: 90%;
+	margin: 0rpx auto;
+	margin-top: 10rpx;
 }
-.hmly-collection-content{
-  width: 100%;
-  text-align: center;
-  position: absolute;
-  top: 300rpx;
-  color: #aaaaaa
-}
-swiper{
-  display: block;
-  width: 100%;
+
+.hmly-collection-content {
+	width: 100%;
+	text-align: center;
+	position: absolute;
+	top: 300rpx;
+	color: #aaaaaa
 }
-.hmly-swiper-box-item{
-  height: 400rpx;
+
+swiper {
+	display: block;
+	width: 100%;
 }
-.hmly-no-content{
-  width: 90%;
-  height: auto;
-  margin: 0rpx auto;
-  margin-top: 100rpx;
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
-  text-align: center;
+
+.hmly-swiper-box-item {
+	height: 400rpx;
 }
-.hmly-no-content image{
-  width: 400rpx;
-  height: 300rpx;
-  align-self: center;
+
+.hmly-no-content {
+	width: 90%;
+	height: auto;
+	margin: 0rpx auto;
+	margin-top: 100rpx;
+	display: flex;
+	flex-direction: column;
+	justify-content: center;
+	text-align: center;
 }
-.hmly-but-box{
-  width: 80%;
-  margin: 0rpx auto;
-  margin-top: 40rpx;
-  text-align: center;
+
+.hmly-no-content image {
+	width: 400rpx;
+	height: 300rpx;
+	align-self: center;
 }
-.hmly-but{
-  width: 300rpx;
-  height: 80rpx;
-  font-size: 40rpx;
-  line-height: 80rpx;
-  margin-top: 10rpx;
+
+.hmly-but-box {
+	width: 80%;
+	margin: 0rpx auto;
+	margin-top: 40rpx;
+	text-align: center;
 }
+
+.hmly-but {
+	width: 300rpx;
+	height: 80rpx;
+	font-size: 40rpx;
+	line-height: 80rpx;
+	margin-top: 10rpx;
+}

+ 69 - 78
pages/details/details.js

@@ -1,84 +1,75 @@
 Page({
 
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    performance: [{
-        name: "《人在江湖》郭德纲 于谦",
-        year: "2年前",
-        count: "5601.9万",
-        time: "34:36"
-      },
-      {
-        name: "《人在江湖》郭德纲 于谦",
-        year: "2年前",
-        count: "5601.9万",
-        time: "34:36"
-      },
-      {
-        name: "《人在江湖》郭德纲 于谦",
-        year: "2年前",
-        count: "5601.9万",
-        time: "34:36"
-      },
-      {
-        name: "《人在江湖》郭德纲 于谦",
-        year: "2年前",
-        count: "5601.9万",
-        time: "34:36"
-      },
-      {
-        name: "《人在江湖》郭德纲 于谦",
-        year: "2年前",
-        count: "5601.9万",
-        time: "34:36"
-      },
-      {
-        name: "《人在江湖》郭德纲 于谦",
-        year: "2年前",
-        count: "5601.9万",
-        time: "34:36"
-      },
-      {
-        name: "《人在江湖》郭德纲 于谦",
-        year: "2年前",
-        count: "5601.9万",
-        time: "34:36"
-      },
-      {
-        name: "《人在江湖》郭德纲 于谦",
-        year: "2年前",
-        count: "5601.9万",
-        time: "34:36"
-      },
-    ]
-  },
+	/**
+	 * 页面的初始数据
+	 */
+	data: {
+		performance: [{
+			name: "《人在江湖》郭德纲 于谦",
+			year: "2年前",
+			count: "5601.9万",
+			time: "34:36"
+		},
+		{
+			name: "《人在江湖》郭德纲 于谦",
+			year: "2年前",
+			count: "5601.9万",
+			time: "34:36"
+		},
+		{
+			name: "《人在江湖》郭德纲 于谦",
+			year: "2年前",
+			count: "5601.9万",
+			time: "34:36"
+		},
+		{
+			name: "《人在江湖》郭德纲 于谦",
+			year: "2年前",
+			count: "5601.9万",
+			time: "34:36"
+		},
+		{
+			name: "《人在江湖》郭德纲 于谦",
+			year: "2年前",
+			count: "5601.9万",
+			time: "34:36"
+		},
+		{
+			name: "《人在江湖》郭德纲 于谦",
+			year: "2年前",
+			count: "5601.9万",
+			time: "34:36"
+		},
+		{
+			name: "《人在江湖》郭德纲 于谦",
+			year: "2年前",
+			count: "5601.9万",
+			time: "34:36"
+		},
+		{
+			name: "《人在江湖》郭德纲 于谦",
+			year: "2年前",
+			count: "5601.9万",
+			time: "34:36"
+		},
+		]
+	},
 
-  /**
-   * 生命周期函数--监听页面加载
-   */
+	/**
+	 * 生命周期函数--监听页面加载
+	 */
 
 
-  onLoad: function (options) {
-    console.log(options)
-    this.setData({
-      performanceInfo: [{
-        imgurl: options.url+'=5&upload_type=album&device_type=ios&name=medium&magick=png',
-        title: options.title,
-        author: "某某某",
-        num1: "767.6万",
-        num2: "257"
-      }],
-      imgurl: options.url+'=5&upload_type=album&device_type=ios&name=medium&magick=png',
-    });
-  },
-
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
+	onLoad: function (options) {
+		this.setData({
+			performanceInfo: [{
+				imgurl: options.url + '=5&upload_type=album&device_type=ios&name=medium&magick=png',
+				title: options.title,
+				author: "某某某",
+				num1: "767.6万",
+				num2: "257"
+			}],
+			imgurl: options.url + '=5&upload_type=album&device_type=ios&name=medium&magick=png',
+		});
+	}
 })

+ 1 - 1
pages/details/details.json

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

+ 57 - 56
pages/details/details.wxml

@@ -3,63 +3,64 @@
   注:这部分的背景色还没有处理好
 -->
 <view class="hmly-top-title-bar">
-    <!-- 背景虚化层 -->
-    <view class="hmly-bg" style="background:url({{imgurl}}); background-size: 100% 100%; background-repeat: no-repeat;"></view>
-    <!-- 内容 -->
-    <view class="hmly-bar-item" wx:for="{{performanceInfo}}" wx:key="index">
-      <view class="hmly-bar-item-top">
-        <view class="hmly-theme-bg-img" style="background:url({{item.imgurl}}); background-size:100% 100%"></view>
-        <view class="hmly-theme-info">
-          <view class="hmly-theme-title">{{item.title}}</view>
-          <view class="hmly-theme-author">
-            <!-- <image class="" src="" mode="widthFix"></image> -->
-            {{item.author}} <text class="icon-right"></text>
-          </view>
-          <view class="hmly-view-info">
-            <view class="hmly-view-info-left">{{item.num1}}人收藏</view>
-            <text class="hmly-viewhmly-info-mid">|</text>
-            <view class="hmly-view-info-right">已更新{{item.num2}}期</view>
-          </view>
-        </view>
-      </view>
-      <view class="hmly-bar-item-bottom">
-        <button class="hmly-share-but"><text class="icon-share"></text> 分享</button>
-        <button class="hmly-collection"><text class="icon-add"></text> 收藏</button>
-      </view>
-    </view>
+	<!-- 背景虚化层 -->
+	<view class="hmly-bg" style="background:url({{imgurl}}); background-size: 100% 100%; background-repeat: no-repeat;">
+	</view>
+	<!-- 内容 -->
+	<view class="hmly-bar-item" wx:for="{{performanceInfo}}" wx:key="index">
+		<view class="hmly-bar-item-top">
+			<view class="hmly-theme-bg-img" style="background:url({{item.imgurl}}); background-size:100% 100%"></view>
+			<view class="hmly-theme-info">
+				<view class="hmly-theme-title">{{item.title}}</view>
+				<view class="hmly-theme-author">
+					<!-- <image class="" src="" mode="widthFix"></image> -->
+					{{item.author}} <text class="icon-right"></text>
+				</view>
+				<view class="hmly-view-info">
+					<view class="hmly-view-info-left">{{item.num1}}人收藏</view>
+					<text class="hmly-viewhmly-info-mid">|</text>
+					<view class="hmly-view-info-right">已更新{{item.num2}}期</view>
+				</view>
+			</view>
+		</view>
+		<view class="hmly-bar-item-bottom">
+			<button class="hmly-share-but"><text class="icon-share"></text> 分享</button>
+			<button class="hmly-collection"><text class="icon-add"></text> 收藏</button>
+		</view>
+	</view>
 </view>
 <!-- 顶部选项 -->
 <view class="hmly-performance">
-  <view class="hmly-selectbar">
-    <view class="hmly-detail">详情</view>
-    <view class="hmly-list hmly-active">节目<text>152</text>
-    </view>
-  </view>
-  <!-- 播放选项 -->
-  <view class="hmly-play">
-    <view class="hmly-play-all">
-      <text class="icon-video"></text> 播放全部
-    </view>
-    <view class="hmly-play-select">
-      <view style="margin-right:20rpx"><text class="icon-order"></text> 正序</view>
-      <view><text class="icon-list"></text> 选集</view>
-    </view>
-  </view>
-  <!-- 节目列表 -->
-  <view class="hmly-performance-content" wx:for="{{performance}}" wx:key="index">
-    <!-- 序号 -->
-    <view class="hmly-performance-index">{{index+1}}</view>
-    <!-- 节目标题 -->
-    <view class="hmly-performance-info">
-      <view class="hmly-performance-info-top">
-        <view style="font-size:33rpx">{{item.name}}</view>
-        <view style="color:#aaaaaa">{{item.year}}</view>
-      </view>
-      <!-- 播放次数和时间 -->
-      <view class="hmly-performance-info-bottom">
-        <view><text class="icon-video"></text>{{item.count}}</view>
-        <view style="margin-left:20rpx"><text class="icon-time"></text>{{item.time}}</view>
-      </view>
-    </view>
-  </view>
+	<view class="hmly-selectbar">
+		<view class="hmly-detail">详情</view>
+		<view class="hmly-list hmly-active">节目<text>152</text>
+		</view>
+	</view>
+	<!-- 播放选项 -->
+	<view class="hmly-play">
+		<view class="hmly-play-all">
+			<text class="icon-video"></text> 播放全部
+		</view>
+		<view class="hmly-play-select">
+			<view style="margin-right:20rpx"><text class="icon-order"></text> 正序</view>
+			<view><text class="icon-list"></text> 选集</view>
+		</view>
+	</view>
+	<!-- 节目列表 -->
+	<view class="hmly-performance-content" wx:for="{{performance}}" wx:key="index">
+		<!-- 序号 -->
+		<view class="hmly-performance-index">{{index+1}}</view>
+		<!-- 节目标题 -->
+		<view class="hmly-performance-info">
+			<view class="hmly-performance-info-top">
+				<view style="font-size:33rpx">{{item.name}}</view>
+				<view style="color:#aaaaaa">{{item.year}}</view>
+			</view>
+			<!-- 播放次数和时间 -->
+			<view class="hmly-performance-info-bottom">
+				<view><text class="icon-video"></text>{{item.count}}</view>
+				<view style="margin-left:20rpx"><text class="icon-time"></text>{{item.time}}</view>
+			</view>
+		</view>
+	</view>
 </view>

+ 142 - 136
pages/details/details.wxss

@@ -1,213 +1,219 @@
 .hmly-top-title-bar {
-  width: 100%;
-  height: 410rpx;
-  overflow: hidden;
-  position: relative;
+	width: 100%;
+	height: 410rpx;
+	overflow: hidden;
+	position: relative;
 }
+
 /* 背景虚化层 */
-.hmly-bg{
-  width: 100%;
-  height: 410rpx;
-  filter: blur(15rpx);
+.hmly-bg {
+	width: 100%;
+	height: 410rpx;
+	filter: blur(15rpx);
 }
+
 .hmly-bar-item {
-  width: 100%;
-  height: 400rpx;
-  margin-top: 50rpx;
-  padding: 20rpx 0rpx;
-  position: absolute;
-  top: 0rpx;
+	width: 100%;
+	height: 400rpx;
+	margin-top: 50rpx;
+	padding: 20rpx 0rpx;
+	position: absolute;
+	top: 0rpx;
 }
 
 .hmly-bar-item-top {
-  width: 100%;
-  height: 200rpx;
-  display: flex;
-  justify-content: center;
-  align-items: center;
+	width: 100%;
+	height: 200rpx;
+	display: flex;
+	justify-content: center;
+	align-items: center;
 }
 
 .hmly-theme-bg-img {
-  width: 200rpx;
-  height: 200rpx;
-  margin-right: 30rpx;
-  background-repeat: no-repeat;
-  background-size: 100% 100%;
+	width: 200rpx;
+	height: 200rpx;
+	margin-right: 30rpx;
+	background-repeat: no-repeat;
+	background-size: 100% 100%;
 }
 
 .hmly-theme-info {
-  width: 60%;
-  height: 200rpx;
+	width: 60%;
+	height: 200rpx;
 }
 
 .hmly-theme-title {
-  color: #fff;
-  font-size: 40rpx;
-  display: -webkit-box;
-  -webkit-line-clamp: 2;/*行数n*/
-  -webkit-box-orient: vertical; 
-  overflow: hidden;
-  text-overflow: ellipsis;
+	color: #fff;
+	font-size: 40rpx;
+	display: -webkit-box;
+	-webkit-line-clamp: 2;
+	/*行数n*/
+	-webkit-box-orient: vertical;
+	overflow: hidden;
+	text-overflow: ellipsis;
 }
 
 .hmly-theme-author {
-  font-size: 25rpx;
-  color: #fff;
-  margin-top: 5rpx;
+	font-size: 25rpx;
+	color: #fff;
+	margin-top: 5rpx;
 }
 
 .hmly-view-info {
-  color: #fff;
-  font-size: 30rpx;
-  margin-top: 5rpx;
-  display: flex;
-  justify-content: flex-start;
+	color: #fff;
+	font-size: 30rpx;
+	margin-top: 5rpx;
+	display: flex;
+	justify-content: flex-start;
 }
 
 .hmly-view-info-left {
-  margin-right: 5rpx;
+	margin-right: 5rpx;
 }
 
 .hmly-view-info-right {
-  margin-left: 5rpx;
+	margin-left: 5rpx;
 }
 
 .hmly-bar-item-bottom {
-  width: 70%;
-  height: 100rpx;
-  display: flex;
-  justify-content: flex-end;
-  align-items: center;
-  border-radius: 20rpx;
-  float: right;
-  margin-top: 15rpx;
+	width: 70%;
+	height: 100rpx;
+	display: flex;
+	justify-content: flex-end;
+	align-items: center;
+	border-radius: 20rpx;
+	float: right;
+	margin-top: 15rpx;
 }
 
 .hmly-bar-item-bottom button {
-  width: 210rpx;
-  height: 75rpx;
-  text-align: center;
-  font-size: 30rpx;
-  color: #fff;
-  border-radius: 20rpx;
+	width: 210rpx;
+	height: 75rpx;
+	text-align: center;
+	font-size: 30rpx;
+	color: #fff;
+	border-radius: 20rpx;
 }
 
 .hmly-share-but {
-  background: orangered;
-  border: 1rpx solid #fff;
-  margin-left: 70rpx;
+	background: orangered;
+	border: 1rpx solid #fff;
+	margin-left: 70rpx;
 }
 
 .hmly-collection {
-  background: orangered;
+	background: orangered;
 }
 
 .hmly-performance {
-  width: 100%;
-  height: 500rpx;
-  border-top-left-radius: 20rpx;
-  border-top-right-radius: 20rpx;
-  position: relative;
-  top: -10rpx;
+	width: 100%;
+	height: 500rpx;
+	border-top-left-radius: 20rpx;
+	border-top-right-radius: 20rpx;
+	position: relative;
+	top: -10rpx;
 }
+
 .hmly-selectbar {
-  width: 100%;
-  height: 100rpx;
-  line-height: 100rpx;
-  text-align: center;
-  display: flex;
-  justify-content: space-between;
-  background: #fff;
-  box-sizing: border-box;
-  color: #aaa;
-  border-radius: 15rpx;
-  border-bottom: 1rpx solid #f1f1f1;
+	width: 100%;
+	height: 100rpx;
+	line-height: 100rpx;
+	text-align: center;
+	display: flex;
+	justify-content: space-between;
+	background: #fff;
+	box-sizing: border-box;
+	color: #aaa;
+	border-radius: 15rpx;
+	border-bottom: 1rpx solid #f1f1f1;
 }
 
 .hmly-detail {
-  width: 50%;
+	width: 50%;
 }
 
 .hmly-list {
-  width: 50%;
+	width: 50%;
 }
 
 .hmly-play {
-  width: 100%;
-  height: 100rpx;
-  padding: 0rpx 40rpx;
-  box-sizing: border-box;
-  border-bottom: 1rpx solid #f1f1f1;
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
+	width: 100%;
+	height: 100rpx;
+	padding: 0rpx 40rpx;
+	box-sizing: border-box;
+	border-bottom: 1rpx solid #f1f1f1;
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
 }
 
 .hmly-play-all {
-  width: auto;
-  text-align: center;
-  font-size: 30rpx;
+	width: auto;
+	text-align: center;
+	font-size: 30rpx;
 }
 
 .hmly-play-select {
-  width: auto;
-  display: flex;
-  justify-content: space-between;
-  text-align: center;
-  font-size: 30rpx;
+	width: auto;
+	display: flex;
+	justify-content: space-between;
+	text-align: center;
+	font-size: 30rpx;
 }
 
 .hmly-performance-content {
-  width: 100%;
-  height: 150rpx;
-  display: flex;
-  box-sizing: border-box;
-  justify-content: flex-start;
-  align-items: center;
-  border-bottom: 1rpx solid #f1f1f1;
-  padding: 20rpx 20rpx;
+	width: 100%;
+	height: 150rpx;
+	display: flex;
+	box-sizing: border-box;
+	justify-content: flex-start;
+	align-items: center;
+	border-bottom: 1rpx solid #f1f1f1;
+	padding: 20rpx 20rpx;
 }
 
 .hmly-performance-index {
-  width: 15%;
-  height: 80rpx;
-  text-align: center;
-  line-height: 80rpx;
-  color: #aaa;
+	width: 15%;
+	height: 80rpx;
+	text-align: center;
+	line-height: 80rpx;
+	color: #aaa;
 }
 
 .hmly-performance-info {
-  width: 85%;
-  height: 100%;
+	width: 85%;
+	height: 100%;
 }
 
 .hmly-performance-info-top {
-  width: 100%;
-  height: 50%;
-  display: flex;
-  justify-content: space-between;
-  font-size: 30rpx;
+	width: 100%;
+	height: 50%;
+	display: flex;
+	justify-content: space-between;
+	font-size: 30rpx;
 }
 
 .hmly-performance-info-bottom {
-  width: 100%;
-  height: auto;
-  display: flex;
-  justify-content: flex-start;
-  color: #aaa;
-  font-size: 25rpx;
-  margin-top: 20rpx;
-}
-.hmly-active{
-  position: relative;
-  color: #333;
-}
-.hmly-active::after{
-  content: '';
-  width: 80rpx;
-  height: 5rpx;
-  position: absolute;
-  bottom: 0rpx;
-  left: 150rpx;
-  background-color: orangered;
+	width: 100%;
+	height: auto;
+	display: flex;
+	justify-content: flex-start;
+	color: #aaa;
+	font-size: 25rpx;
+	margin-top: 20rpx;
+}
+
+.hmly-active {
+	position: relative;
+	color: #333;
+}
+
+.hmly-active::after {
+	content: '';
+	width: 80rpx;
+	height: 5rpx;
+	position: absolute;
+	bottom: 0rpx;
+	left: 150rpx;
+	background-color: orangered;
 }

+ 59 - 61
pages/index/bangdan/bangdan.js

@@ -1,68 +1,66 @@
 const app = getApp();
 let myRequest = require('../../../api/index.js')
 // 定义一个全局变量保存从接口获取到的数据,以免重复请求接口
-let resut; 
+let resut;
 Page({
 
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    showCover:false,
-    currentTab:0,
-    navTitle:[
-      {title:'经典必听'},
-      {title:'优质专辑'},
-      {title:'有声小说'},
-      {title:'儿童教育'},
-      {title:'人文历史'},
-      {title:'最潮外语'},
-      {title:'商业财经'},
-      {title:'热门新闻'}
-    ]
-  },
+	/**
+	 * 页面的初始数据
+	 */
+	data: {
+		showCover: false,
+		currentTab: 0,
+		navTitle: [
+			{ title: '经典必听' },
+			{ title: '优质专辑' },
+			{ title: '有声小说' },
+			{ title: '儿童教育' },
+			{ title: '人文历史' },
+			{ title: '最潮外语' },
+			{ title: '商业财经' },
+			{ title: '热门新闻' }
+		]
+	},
 
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    let that = this;
-    myRequest.getData().then(res => {
-      resut = res;
-      that.setData({
-        list: res.data.hotRecommends.list[0].list
-      })
-    }).catch(err => {
-      console.log(err);
-    })
-  },
-  handleClick(e) {
-    let currentTab = e.currentTarget.dataset.index;
-    // 实现每一个tabbar切换对应内容的原理,根据每一个tabbar的index对应数组中的数据
-    this.setData({
-      currentTab,
-      list: resut.data.hotRecommends.list[currentTab].list
-    })
-  },
-  pullDown:function(){
-    let that = this;
-    that.setData({
-      showCover:true
-    })
-  },
-  closeCover:function(){
-    let that = this;
-    that.setData({
-      showCover:false
-    })
-  },
-  coverCheck:function(e){
-    let currentTab = e.currentTarget.dataset.index;
-    // 实现每一个tabbar切换对应内容的原理,根据每一个tabbar的index对应数组中的数据
-    this.setData({
-      currentTab,
-      list: resut.data.hotRecommends.list[currentTab].list
-    })
-    this.closeCover()
-  }
+	/**
+	 * 生命周期函数--监听页面加载
+	 */
+	onLoad: function (options) {
+		let that = this;
+		myRequest.getData().then(res => {
+			resut = res;
+			that.setData({
+				list: res.data.hotRecommends.list[0].list
+			})
+		})
+	},
+	handleClick(e) {
+		let currentTab = e.currentTarget.dataset.index;
+		// 实现每一个tabbar切换对应内容的原理,根据每一个tabbar的index对应数组中的数据
+		this.setData({
+			currentTab,
+			list: resut.data.hotRecommends.list[currentTab].list
+		})
+	},
+	pullDown: function () {
+		let that = this;
+		that.setData({
+			showCover: true
+		})
+	},
+	closeCover: function () {
+		let that = this;
+		that.setData({
+			showCover: false
+		})
+	},
+	coverCheck: function (e) {
+		let currentTab = e.currentTarget.dataset.index;
+		// 实现每一个tabbar切换对应内容的原理,根据每一个tabbar的index对应数组中的数据
+		this.setData({
+			currentTab,
+			list: resut.data.hotRecommends.list[currentTab].list
+		})
+		this.closeCover()
+	}
 })

+ 3 - 3
pages/index/bangdan/bangdan.json

@@ -1,4 +1,4 @@
-{  
-  "usingComponents": {},
-  "navigationBarTitleText": "榜单"
+{
+	"usingComponents": {},
+	"navigationBarTitleText": "榜单"
 }

+ 46 - 44
pages/index/bangdan/bangdan.wxml

@@ -1,48 +1,50 @@
 <!-- 因为其他几个页面和榜单是一样的所以其他3个页面就都用的这一个界面 -->
 <block wx:if="{{showCover}}">
-  <!-- 蒙板内容 要放在蒙板的外面-->
-  <view class="hmly-menu">
-    <view class="hmly-menu-item {{currentTab === index ? 'hmly-menu-item-active' : ''}}" 
-    wx:for="{{navTitle}}" wx:key="index" data-index="{{index}}" bindtap="coverCheck">
-      {{item.title}}
-    </view>
-  </view>
-  <!-- 蒙板 -->
-  <view class="hmly-cover" bindtap="closeCover"></view>
+	<!-- 蒙板内容 要放在蒙板的外面-->
+	<view class="hmly-menu">
+		<view class="hmly-menu-item {{currentTab === index ? 'hmly-menu-item-active' : ''}}" wx:for="{{navTitle}}"
+			wx:key="index" data-index="{{index}}" bindtap="coverCheck">
+			{{item.title}}
+		</view>
+	</view>
+	<!-- 蒙板 -->
+	<view class="hmly-cover" bindtap="closeCover"></view>
 </block>
 <block>
-  <view class="hmly-top-nav">
-    <scroll-view class="hmly-scroll-wrapper" scroll-x scroll-with-animation="true" scroll-into-view="item{{currentTab < 4 ? 0 : currentTab - 3}}" catchtouchmove="preventTouchMove" >
-      <view class="hmly-navigate-item" id="item{{index}}" wx:for="{{navTitle}}" wx:key="index" data-index="{{index}}" bindtap="handleClick">
-        <view class="hmly-names {{currentTab === index ? 'active' : ''}}">{{item.title}}</view>
-        <view class="hmly-currtline {{currentTab === index ? 'active' : ''}}"></view>
-      </view>
-    </scroll-view>
-    <!-- 下拉按钮 -->
-    <view class="hmly-pull-down" bindtap="pullDown">
-      <view class="icon-right"></view>
-    </view>
-  </view>
-  <!-- 对应的内容区 -->
-  <view class="hmly-content-item"  wx:for="{{list}}" wx:key="index">
-    <view class="hmly-index-number">
-      <view>{{index > 10 ? index : '0'+(index+1)}}</view>
-    </view>
-    <image src="{{item.albumCoverUrl290}}"></image>
-    <view class="hmly-content-left">
-      <view class="hmly-content-title">{{item.title}}</view>
-      <view class="hmly-content-text">{{item.trackTitle}}</view>
-      <view class="hmly-count">
-        <view style="margin-right:25rpx;">
-          <!-- 本例中33.2亿的单位是写死的,此处应该是后端返回数据吧 -->
-          <text class="icon-video"></text>
-          <text class="">33.2亿</text>
-        </view>
-        <view>
-          <text class="icon"></text>
-          <text class="">44集</text>
-        </view>
-      </view>
-    </view>
-  </view>
-</block>
+	<view class="hmly-top-nav">
+		<scroll-view class="hmly-scroll-wrapper" scroll-x scroll-with-animation="true"
+			scroll-into-view="item{{currentTab < 4 ? 0 : currentTab - 3}}" catchtouchmove="preventTouchMove">
+			<view class="hmly-navigate-item" id="item{{index}}" wx:for="{{navTitle}}" wx:key="index" data-index="{{index}}"
+				bindtap="handleClick">
+				<view class="hmly-names {{currentTab === index ? 'active' : ''}}">{{item.title}}</view>
+				<view class="hmly-currtline {{currentTab === index ? 'active' : ''}}"></view>
+			</view>
+		</scroll-view>
+		<!-- 下拉按钮 -->
+		<view class="hmly-pull-down" bindtap="pullDown">
+			<view class="icon-right"></view>
+		</view>
+	</view>
+	<!-- 对应的内容区 -->
+	<view class="hmly-content-item" wx:for="{{list}}" wx:key="index">
+		<view class="hmly-index-number">
+			<view>{{index > 10 ? index : '0'+(index+1)}}</view>
+		</view>
+		<image src="{{item.albumCoverUrl290}}"></image>
+		<view class="hmly-content-left">
+			<view class="hmly-content-title">{{item.title}}</view>
+			<view class="hmly-content-text">{{item.trackTitle}}</view>
+			<view class="hmly-count">
+				<view style="margin-right:25rpx;">
+					<!-- 本例中33.2亿的单位是写死的,此处应该是后端返回数据吧 -->
+					<text class="icon-video"></text>
+					<text class="">33.2亿</text>
+				</view>
+				<view>
+					<text class="icon"></text>
+					<text class="">44集</text>
+				</view>
+			</view>
+		</view>
+	</view>
+</block>

+ 133 - 125
pages/index/bangdan/bangdan.wxss

@@ -1,163 +1,171 @@
-.hmly-top-nav{
-  width: 100%;
-  height: 80rpx;
-  display: flex;
-  justify-content: start;
+.hmly-top-nav {
+	width: 100%;
+	height: 80rpx;
+	display: flex;
+	justify-content: start;
 }
 
 .hmly-scroll-wrapper {
-  white-space: nowrap;
-  -webkit-overflow-scrolling: touch;
-  background: #FFF;
-  padding-left: 20rpx;
-  width: 90%;
-  height: 85rpx;
-  box-sizing: border-box;
+	white-space: nowrap;
+	-webkit-overflow-scrolling: touch;
+	background: #FFF;
+	padding-left: 20rpx;
+	width: 90%;
+	height: 85rpx;
+	box-sizing: border-box;
 }
 
 ::-webkit-scrollbar {
-  width: 0;
-  height: 0;
-  color: transparent;
+	width: 0;
+	height: 0;
+	color: transparent;
 }
 
 .hmly-navigate-item {
-  display: inline-block;
-  text-align: center;
-  height: 90rpx;
-  line-height: 90rpx;
-  margin-right: 80rpx;
+	display: inline-block;
+	text-align: center;
+	height: 90rpx;
+	line-height: 90rpx;
+	margin-right: 80rpx;
 }
 
 .hmly-names {
-  font-size: 28rpx;
-  color: #3c3c3c;
+	font-size: 28rpx;
+	color: #3c3c3c;
 }
 
 .hmly-names.active {
-  color: #ff520f;
-  font-weight: bold;
-  font-size: 34rpx;
+	color: #ff520f;
+	font-weight: bold;
+	font-size: 34rpx;
 }
 
 .hmly-currtline {
-  margin: -8rpx auto 0 auto;
-  width: 100rpx;
-  height: 1rpx;
-  border-radius: 4rpx;
+	margin: -8rpx auto 0 auto;
+	width: 100rpx;
+	height: 1rpx;
+	border-radius: 4rpx;
 }
 
 .hmly-currtline.active {
-  background: #ff520f;
-  transition: all .3s;
+	background: #ff520f;
+	transition: all .3s;
 }
 
-.hmly-pull-down{
-  width: 10%;
-  height: 25rpx;
-  padding: 30rpx 0rpx;
-  background-color: rgb(249, 249, 249);
-  text-align: center;
-  color: #ff520f;
-  line-height: 30rpx
+.hmly-pull-down {
+	width: 10%;
+	height: 25rpx;
+	padding: 30rpx 0rpx;
+	background-color: rgb(249, 249, 249);
+	text-align: center;
+	color: #ff520f;
+	line-height: 30rpx
 }
+
 /* 内容区的代码 */
 
-.hmly-content-item{
-  width: 100%;
-  display: flex;
-  justify-content: space-around;
-  align-items: center;
-  padding: 20rpx 0rpx;
+.hmly-content-item {
+	width: 100%;
+	display: flex;
+	justify-content: space-around;
+	align-items: center;
+	padding: 20rpx 0rpx;
 }
 
 .hmly-index-number {
-  width: 15%;
-  height: auto;
-  padding: 20rpx 0rpx;
-  text-align: center;
-  font-size: 50rpx;
-  color: #ff520f;
+	width: 15%;
+	height: auto;
+	padding: 20rpx 0rpx;
+	text-align: center;
+	font-size: 50rpx;
+	color: #ff520f;
 }
 
 .hmly-content-item image {
-  width: 140rpx;
-  height: 140rpx;
-  margin-top: 10rpx;
-  border-radius: 15rpx;
+	width: 140rpx;
+	height: 140rpx;
+	margin-top: 10rpx;
+	border-radius: 15rpx;
 }
 
 .hmly-content-left {
-  padding: 10rpx 0rpx;
-  margin-left: 30rpx;
-  width: 60%;
-  height: auto;
-  border-bottom: 1rpx solid #f1f1f1;
-}
-
-.hmly-content-title{
-  font-size: 35rpx;
-  height: 40rpx;
-  color: #000;
-  display: -webkit-box;
-  -webkit-line-clamp: 2;/*行数n*/
-  -webkit-box-orient: vertical; 
-  overflow: hidden;
-  text-overflow: ellipsis;
-}
-.hmly-content-text{
-  height: 40rpx;
-  display: -webkit-box;
-  -webkit-line-clamp: 1;/*行数n*/
-  -webkit-box-orient: vertical; 
-  overflow: hidden;
-  text-overflow: ellipsis;
-  font-size: 27rpx;
-  text-align: left;
-  color: #ccc;
-  margin-top: 15rpx;
-}
-.hmly-count{
-  font-size: 27rpx;
-  color: #ccc;
-  display: flex;
-  justify-content: start;
-  margin-top: 15rpx;
-}
-
-.hmly-menu{ 
-  width: 100%;
-  height: 200rpx;
-  position: fixed;
-  top: 0rpx;
-  z-index: 9999;
-  display: flex;
-  justify-content: space-around;
-  align-items: center;
-  flex-wrap: wrap;
-  background: #fff;
-}
-.hmly-menu-item{
-  color: #000;
-  width: auto;
-  font-size: 32rpx;
-  padding: 20rpx 10rpx;
-  margin: 0rpx 15rpx;
-  position: relative;
+	padding: 10rpx 0rpx;
+	margin-left: 30rpx;
+	width: 60%;
+	height: auto;
+	border-bottom: 1rpx solid #f1f1f1;
+}
+
+.hmly-content-title {
+	font-size: 35rpx;
+	height: 40rpx;
+	color: #000;
+	display: -webkit-box;
+	-webkit-line-clamp: 2;
+	/*行数n*/
+	-webkit-box-orient: vertical;
+	overflow: hidden;
+	text-overflow: ellipsis;
+}
+
+.hmly-content-text {
+	height: 40rpx;
+	display: -webkit-box;
+	-webkit-line-clamp: 1;
+	/*行数n*/
+	-webkit-box-orient: vertical;
+	overflow: hidden;
+	text-overflow: ellipsis;
+	font-size: 27rpx;
+	text-align: left;
+	color: #ccc;
+	margin-top: 15rpx;
+}
+
+.hmly-count {
+	font-size: 27rpx;
+	color: #ccc;
+	display: flex;
+	justify-content: start;
+	margin-top: 15rpx;
 }
+
+.hmly-menu {
+	width: 100%;
+	height: 200rpx;
+	position: fixed;
+	top: 0rpx;
+	z-index: 9999;
+	display: flex;
+	justify-content: space-around;
+	align-items: center;
+	flex-wrap: wrap;
+	background: #fff;
+}
+
+.hmly-menu-item {
+	color: #000;
+	width: auto;
+	font-size: 32rpx;
+	padding: 20rpx 10rpx;
+	margin: 0rpx 15rpx;
+	position: relative;
+}
+
 .hmly-menu-item-active {
-  font-size: 32rpx;
-  font-weight: 700;
-  transition: all .3s;
-  color: #333333;
-}
-.hmly-menu-item-active:after{
-  content: '';
-  width: 40rpx;
-  height: 8rpx;
-  position: absolute;
-  bottom: 0rpx;
-  left: 50rpx;
-  border-radius: 15rpx;
-  background: #ff520f;
+	font-size: 32rpx;
+	font-weight: 700;
+	transition: all .3s;
+	color: #333333;
 }
+
+.hmly-menu-item-active:after {
+	content: '';
+	width: 40rpx;
+	height: 8rpx;
+	position: absolute;
+	bottom: 0rpx;
+	left: 50rpx;
+	border-radius: 15rpx;
+	background: #ff520f;
+}

+ 74 - 76
pages/index/index.js

@@ -3,81 +3,79 @@
 const app = getApp()
 const myRequest = require('../../api/index.js');
 Page({
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    imgList: [
-      '/image/ad1.jpg',
-      '/image/ad2.jpg',
-      '/image/ad3.jpg',
-      '/image/ad4.jpg',
-      '/image/ad5.jpg',
-      '/image/ad6.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: '听知识'
-      },
+	/**
+	 * 页面的初始数据
+	 */
+	data: {
+		imgList: [
+			'/image/swiper/ad1.jpg',
+			'/image/swiper/ad2.jpg',
+			'/image/swiper/ad3.jpg',
+			'/image/swiper/ad4.jpg',
+			'/image/swiper/ad5.jpg',
+			'/image/swiper/ad6.jpg',
+			'/image/swiper/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: '听知识'
+		},
 
-    ],
-    swiperCurrent: 0,
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    var that = this
-    myRequest.getData().then(res => {
-      console.log('res',res);
-      that.setData({
-        showitem: true,
-        guess: res.data.guess.list.slice(0,3),
-        xiaoshuocontent: res.data.hotRecommends.list[0].list,
-        xiangshengcontent: res.data.hotRecommends.list[2].list,
-        tuokocontent: res.data.hotRecommends.list[4].list
-      })
-    }).catch(err => {
-      console.log(err);
-      that.setData({
-        showitem: false
-      })
-    })
-  },
-  //轮播图改变事件
-  swiperChange: function (e) {
-    this.setData({
-      swiperCurrent: e.detail.current
-    })
-  },
-  goToBangDan: function () {
-    wx.navigateTo({
-      url: '/pages/index/bangdan/bangdan',
-    })
-  },
-  gotoDetails(e) {
-    var url = e.currentTarget.dataset.coverimg;
-    var title = e.currentTarget.dataset.title;
-    wx.navigateTo({
-      // 页面传参
-      url: '/pages/details/details?url=' + url + '&title=' + title,
-    })
-  }
+		],
+		swiperCurrent: 0,
+	},
+	/**
+	 * 生命周期函数--监听页面加载
+	 */
+	onLoad: function (options) {
+		const that = this
+		myRequest.getData().then(res => {
+			that.setData({
+				showitem: true,
+				guess: res.data.guess.list.slice(0, 3),
+				xiaoshuocontent: res.data.hotRecommends.list[0].list,
+				xiangshengcontent: res.data.hotRecommends.list[2].list,
+				tuokocontent: res.data.hotRecommends.list[4].list
+			})
+		}).catch(err => {
+			that.setData({
+				showitem: false
+			})
+		})
+	},
+	//轮播图改变事件
+	swiperChange: function (e) {
+		this.setData({
+			swiperCurrent: e.detail.current
+		})
+	},
+	goToBangDan: function () {
+		wx.navigateTo({
+			url: '/pages/index/bangdan/bangdan',
+		})
+	},
+	gotoDetails(e) {
+		const url = e.currentTarget.dataset.coverimg;
+		const title = e.currentTarget.dataset.title;
+		wx.navigateTo({
+			// 页面传参
+			url: '/pages/details/details?url=' + url + '&title=' + title,
+		})
+	}
 })

+ 3 - 3
pages/index/index.json

@@ -1,5 +1,5 @@
 {
-  "usingComponents": {
-    "search":"/component/search/search"
-  }
+	"usingComponents": {
+		"search": "/component/search/search"
+	}
 }

+ 128 - 132
pages/index/index.wxml

@@ -2,156 +2,152 @@
 <search></search>
 <!-- 轮播图 -->
 <view class="hmly-swiper-container">
-  <swiper class="hmly-swiper" autoplay="true" circular="true" 
-    interval="3000" easing-function="easeOutCubic" 
-    current="{{swiperCurren}}" 
-    bindchange="swiperChange">
-    <!-- 轮播图图片 -->
-    <swiper-item class="hmly-swiper-item" wx:for="{{imgList}}" wx:key="index">
-      <!-- 加上widthFix可以使图片自适应 -->
-      <image src="{{item}}"></image>
-    </swiper-item>
-  </swiper>
-  <!-- 为了和喜马拉雅一致,自己需定制轮播图dots -->
-  <view class="hmly-dots">
-    <block wx:for="{{imgList.length}}" wx:key="index">
-      <view class="hmly-dots-item{{index == swiperCurrent ? ' hmly-dot-active' : ''}}"></view>
-    </block>
-  </view>
+	<swiper class="hmly-swiper" autoplay="true" circular="true" interval="3000" easing-function="easeOutCubic"
+		current="{{swiperCurren}}" bindchange="swiperChange">
+		<!-- 轮播图图片 -->
+		<swiper-item class="hmly-swiper-item" wx:for="{{imgList}}" wx:key="index">
+			<!-- 加上widthFix可以使图片自适应 -->
+			<image src="{{item}}"></image>
+		</swiper-item>
+	</swiper>
+	<!-- 为了和喜马拉雅一致,自己需定制轮播图dots -->
+	<view class="hmly-dots">
+		<block wx:for="{{imgList.length}}" wx:key="index">
+			<view class="hmly-dots-item{{index == swiperCurrent ? ' hmly-dot-active' : ''}}"></view>
+		</block>
+	</view>
 </view>
 
 <!-- 宫格导航 -->
 <view class="hmly-nav">
-  <block>  
-    <view class="hmly-nav-item" bindtap="{{item.events}}" wx:for="{{navList}}"  wx:key="index">
-      <!-- 
+	<block>
+		<view class="hmly-nav-item" bindtap="{{item.events}}" wx:for="{{navList}}" wx:key="index">
+			<!-- 
         
         因为没有合适的图,所以全部使用的一样的 
         并且因为界面都是一致的就是内容不同,这里为了简单,使用的都是统一界面
 
         解决办法:你可以通过页面传参的方式来进行区分
         -->
-      <image class="hmly-nav-icon" src="{{item.icon}}" mode="widthFix" lazy-load="false"></image>
-      <text class="hmly-nav-text">{{item.text}}</text>
-    </view>
-  </block>
+			<image class="hmly-nav-icon" src="{{item.icon}}" mode="widthFix" lazy-load="false"></image>
+			<text class="hmly-nav-text">{{item.text}}</text>
+		</view>
+	</block>
 </view>
 
 <!-- 猜你喜欢 -->
 <view class="hmly-like">
-  <view class="hmly-bar-title">
-    <view class="hmly-title-left">猜你喜欢</view>
-    <view class="hmly-title-right">查看全部 <text class="icon-right"></text> </view>
-  </view>
-  <!-- 这没有使用数据绑定,因为是练手而且数据比较少 -->
-  <view class="hmly-like-item-box">
-    <view class="hmly-like-item"
-      bindtap="gotoDetails"
-      data-coverImg="{{item.coverMiddle}}"
-      data-title="{{item.intro}}"
-      wx:for="{{guess}}"
-      wx:key="{{index}}"
-    >
-      <view class="hmly-like-img">
-        <image class="hmly-like-item-icon" src="{{item.coverMiddle}}" mode="widthFix"></image>
-        <view class="hmly-like-cover">
-          <!-- text用来显示icon  暂无 -->
-          <text class=""></text> 4.6亿
-        </view>
-      </view>
-      <view class="hmly-like-text">{{item.intro}}</view>
-    </view>
-  </view>
+	<view class="hmly-bar-title">
+		<view class="hmly-title-left">猜你喜欢</view>
+		<view class="hmly-title-right">查看全部 <text class="icon-right"></text> </view>
+	</view>
+	<!-- 这没有使用数据绑定,因为是练手而且数据比较少 -->
+	<view class="hmly-like-item-box">
+		<view class="hmly-like-item" bindtap="gotoDetails" data-coverImg="{{item.coverMiddle}}" data-title="{{item.intro}}"
+			wx:for="{{guess}}" wx:key="{{index}}">
+			<view class="hmly-like-img">
+				<image class="hmly-like-item-icon" src="{{item.coverMiddle}}" mode="widthFix"></image>
+				<view class="hmly-like-cover">
+					<!-- text用来显示icon  暂无 -->
+					<text class=""></text> 4.6亿
+				</view>
+			</view>
+			<view class="hmly-like-text">{{item.intro}}</view>
+		</view>
+	</view>
 </view>
 
 <!-- 有数据的时候显示 -->
 <block wx:if="{{showitem}}">
-  <!-- 有声小说 -->
-  <view class="hmly-content-list">
-    <view class="hmly-bar-title">
-      <view class="hmly-title-left">有声小说</view>
-      <view class="hmly-title-right">查看全部<text class="icon-right"></text></view>
-    </view>
-    <block wx:for="{{xiaoshuocontent}}" wx:key="index">
-      <view class="hmly-content" bindtap="gotoDetails" data-coverImg="{{item.albumCoverUrl290}}" data-title="{{item.title}}">
-        <view class="hmly-content-img">
-          <image src="{{item.albumCoverUrl290}}" mode="widthFix"></image>
-        </view>
-        <view class="hmly-content-right">
-          <view class="hmly-content-title">
-            <view class="hmly-title-text">{{item.title}}</view>
-            <view class="hmly-introduction">{{item.trackTitle}}</view>
-          </view>
-          <view class="hmly-count">
-            <view class="hmly-play-count">
-              <!-- <text class="icon-"></text> -->
-              126亿
-            </view>
-            <view class="hmly-ji-count">{{item.tracks}}集</view>
-          </view>
-        </view>
-      </view>
-    </block>
-  </view>
-  <!-- 相声评书 -->
-  <view class="hmly-content-list">
-    <view class="hmly-bar-title">
-      <view class="hmly-title-left">相声评书</view>
-      <view class="hmly-title-right">查看全部<text class="icon-right"></text></view>
-    </view>
-    <block wx:for="{{xiangshengcontent}}" wx:key="index">
-      <view class="hmly-content" bindtap="gotoDetails" data-coverImg="{{item.albumCoverUrl290}}" data-title="{{item.title}}">
-        <view class="hmly-content-img">
-          <image src="{{item.albumCoverUrl290}}" mode="widthFix"></image>
-        </view>
-        <view class="hmly-content-right">
-          <view class="hmly-content-title">
-            <view class="hmly-title-text">{{item.title}}</view>
-            <view class="hmly-introduction">{{item.trackTitle}}</view>
-          </view>
-          <view class="hmly-count">
-            <view class="hmly-play-count">
-              <!-- <text class="icon-"></text> -->
-              126亿
-            </view>
-            <view class="hmly-ji-count">{{item.tracks}}集</view>
-          </view>
-        </view>
-      </view>
-    </block>
-  </view>
-  <!-- 脱口秀 -->
-  <view class="hmly-content-list">
-    <view class="hmly-bar-title">
-      <view class="hmly-title-left">脱口秀</view>
-      <view class="hmly-title-right">查看全部<text class="icon-right"></text></view>
-    </view>
-    <block wx:for="{{tuokocontent}}" wx:key="index">
-      <view class="hmly-content" bindtap="gotoDetails" data-coverImg="{{item.albumCoverUrl290}}" data-title="{{item.title}}">
-        <view class="hmly-content-img">
-          <image src="{{item.albumCoverUrl290}}" mode="widthFix" lazy-load="false"></image>
-        </view>
-        <view class="hmly-content-right">
-          <view class="hmly-content-title">
-            <view class="hmly-title-text">{{item.title}}</view>
-            <view class="hmly-introduction">{{item.trackTitle}}</view>
-          </view>
-          <view class="hmly-count">
-            <view class="hmly-play-count">
-              <!-- <view class="icon-"></view> -->
-              126亿
-            </view>
-            <view class="hmly-ji-count">{{item.tracks}}集</view>
-          </view>
-        </view>
-      </view>
-    </block>
-  </view>
+	<!-- 有声小说 -->
+	<view class="hmly-content-list">
+		<view class="hmly-bar-title">
+			<view class="hmly-title-left">有声小说</view>
+			<view class="hmly-title-right">查看全部<text class="icon-right"></text></view>
+		</view>
+		<block wx:for="{{xiaoshuocontent}}" wx:key="index">
+			<view class="hmly-content" bindtap="gotoDetails" data-coverImg="{{item.albumCoverUrl290}}"
+				data-title="{{item.title}}">
+				<view class="hmly-content-img">
+					<image src="{{item.albumCoverUrl290}}" mode="widthFix"></image>
+				</view>
+				<view class="hmly-content-right">
+					<view class="hmly-content-title">
+						<view class="hmly-title-text">{{item.title}}</view>
+						<view class="hmly-introduction">{{item.trackTitle}}</view>
+					</view>
+					<view class="hmly-count">
+						<view class="hmly-play-count">
+							<!-- <text class="icon-"></text> -->
+							126亿
+						</view>
+						<view class="hmly-ji-count">{{item.tracks}}集</view>
+					</view>
+				</view>
+			</view>
+		</block>
+	</view>
+	<!-- 相声评书 -->
+	<view class="hmly-content-list">
+		<view class="hmly-bar-title">
+			<view class="hmly-title-left">相声评书</view>
+			<view class="hmly-title-right">查看全部<text class="icon-right"></text></view>
+		</view>
+		<block wx:for="{{xiangshengcontent}}" wx:key="index">
+			<view class="hmly-content" bindtap="gotoDetails" data-coverImg="{{item.albumCoverUrl290}}"
+				data-title="{{item.title}}">
+				<view class="hmly-content-img">
+					<image src="{{item.albumCoverUrl290}}" mode="widthFix"></image>
+				</view>
+				<view class="hmly-content-right">
+					<view class="hmly-content-title">
+						<view class="hmly-title-text">{{item.title}}</view>
+						<view class="hmly-introduction">{{item.trackTitle}}</view>
+					</view>
+					<view class="hmly-count">
+						<view class="hmly-play-count">
+							<!-- <text class="icon-"></text> -->
+							126亿
+						</view>
+						<view class="hmly-ji-count">{{item.tracks}}集</view>
+					</view>
+				</view>
+			</view>
+		</block>
+	</view>
+	<!-- 脱口秀 -->
+	<view class="hmly-content-list">
+		<view class="hmly-bar-title">
+			<view class="hmly-title-left">脱口秀</view>
+			<view class="hmly-title-right">查看全部<text class="icon-right"></text></view>
+		</view>
+		<block wx:for="{{tuokocontent}}" wx:key="index">
+			<view class="hmly-content" bindtap="gotoDetails" data-coverImg="{{item.albumCoverUrl290}}"
+				data-title="{{item.title}}">
+				<view class="hmly-content-img">
+					<image src="{{item.albumCoverUrl290}}" mode="widthFix" lazy-load="false"></image>
+				</view>
+				<view class="hmly-content-right">
+					<view class="hmly-content-title">
+						<view class="hmly-title-text">{{item.title}}</view>
+						<view class="hmly-introduction">{{item.trackTitle}}</view>
+					</view>
+					<view class="hmly-count">
+						<view class="hmly-play-count">
+							<!-- <view class="icon-"></view> -->
+							126亿
+						</view>
+						<view class="hmly-ji-count">{{item.tracks}}集</view>
+					</view>
+				</view>
+			</view>
+		</block>
+	</view>
 </block>
 <block wx:else>
-  <view class="hmly-data-notip">
-    <view class="hmly-tip">
-      网络暂时走丢了,请稍后再试
-    </view>  
-  </view>
+	<view class="hmly-data-notip">
+		<view class="hmly-tip">
+			网络暂时走丢了,请稍后再试
+		</view>
+	</view>
 </block>

+ 85 - 73
pages/index/index.wxss

@@ -1,87 +1,99 @@
 /* 宫格导航 */
-.hmly-nav{
-  width: 90%;
-  height: 132rpx;
-  margin: 0rpx auto;
-  margin-top: 40rpx;
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  align-content: center;
+.hmly-nav {
+	width: 90%;
+	height: 132rpx;
+	margin: 0rpx auto;
+	margin-top: 40rpx;
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	align-content: center;
 }
-.hmly-nav-item{
-  width: 94rpx;
-  font-size: 20rpx;
-  text-align: center;
-  line-height: 35rpx;
-  color: #aaa;
+
+.hmly-nav-item {
+	width: 94rpx;
+	font-size: 20rpx;
+	text-align: center;
+	line-height: 35rpx;
+	color: #aaa;
 }
-.hmly-nav-icon{
-  width: 84rpx;
-  height: 84rpx;
+
+.hmly-nav-icon {
+	width: 84rpx;
+	height: 84rpx;
 }
+
 /* 猜你喜欢 */
-.hmly-like{
-  width: 90%;
-  margin: 0rpx auto;
-  margin-top: 40rpx;
+.hmly-like {
+	width: 90%;
+	margin: 0rpx auto;
+	margin-top: 40rpx;
 }
-.hmly-like-item-box{
-  width: 100%;
-  display: flex;
-  justify-content: space-between;
-  overflow: hidden;
+
+.hmly-like-item-box {
+	width: 100%;
+	display: flex;
+	justify-content: space-between;
+	overflow: hidden;
 }
-.hmly-like-item{
-  width: 210rpx;
-  height: 310rpx;
-  border-radius: 15rpx;
+
+.hmly-like-item {
+	width: 210rpx;
+	height: 310rpx;
+	border-radius: 15rpx;
 }
-.hmly-like-img{
-  width: 210rpx;
-  height: 210rpx;
-  border-radius: 15rpx;
-  position: relative;
+
+.hmly-like-img {
+	width: 210rpx;
+	height: 210rpx;
+	border-radius: 15rpx;
+	position: relative;
 }
-.hmly-like-item-icon{
-  width: 100%;
-  height: 100%;
-  border-radius: 15rpx;
+
+.hmly-like-item-icon {
+	width: 100%;
+	height: 100%;
+	border-radius: 15rpx;
 }
-.hmly-like-text{
-  font-size: 28rpx;
-  color: #333;
-  margin-top: 10rpx;
-  display: -webkit-box;
-  -webkit-line-clamp: 2;/*行数n*/
-  -webkit-box-orient: vertical; 
-  overflow: hidden;
-  text-overflow: ellipsis;
+
+.hmly-like-text {
+	font-size: 28rpx;
+	color: #333;
+	margin-top: 10rpx;
+	display: -webkit-box;
+	-webkit-line-clamp: 2;
+	/*行数n*/
+	-webkit-box-orient: vertical;
+	overflow: hidden;
+	text-overflow: ellipsis;
 }
-.hmly-like-cover{
-  width: 190rpx;
-  height: 40rpx;
-  /* 透明背景层 */
-  background-image: linear-gradient(rgba(0, 0, 0, 0.01), rgba(0, 0, 0, 1));
-  /* opacity: 0.3; */
-  position: absolute;
-  bottom: 0rpx;
-  color: #fff;
-  font-size: 25rpx;
-  padding: 5rpx 10rpx;
-  border-bottom-left-radius: 15rpx;
-  border-bottom-right-radius: 15rpx;
+
+.hmly-like-cover {
+	width: 190rpx;
+	height: 40rpx;
+	/* 透明背景层 */
+	background-image: linear-gradient(rgba(0, 0, 0, 0.01), rgba(0, 0, 0, 1));
+	/* opacity: 0.3; */
+	position: absolute;
+	bottom: 0rpx;
+	color: #fff;
+	font-size: 25rpx;
+	padding: 5rpx 10rpx;
+	border-bottom-left-radius: 15rpx;
+	border-bottom-right-radius: 15rpx;
 }
-.hmly-data-notip{
-  width: 100%;
-  height: 300rpx;
-  padding-top: 150rpx;
+
+.hmly-data-notip {
+	width: 100%;
+	height: 300rpx;
+	padding-top: 150rpx;
 }
-.hmly-tip{
-  width: auto;
-  height: 100rpx;
-  text-align: center;
-  margin: 0rpx auto;
-  color: red;
-  font-weight: 800;
+
+.hmly-tip {
+	width: auto;
+	height: 100rpx;
+	text-align: center;
+	margin: 0rpx auto;
+	color: red;
+	font-weight: 800;
 }

+ 13 - 27
pages/search/search.js

@@ -1,31 +1,17 @@
 // pages/search/search.js
 Page({
 
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    hotData:[
-      {title:"宝宝巴士",icon:"icon-jiantouUp",color:"text-orange"},
-      {title:"孟鹤堂",icon:"icon-jiantouUp",color:"text-red"},
-      {title:"三体",icon:"icon-jiantouDown",color:"text-green"},
-      {title:"龙王殿",icon:"icon-jiantouUp",color:"text-red"},
-      {title:"儿童恐龙故事",icon:"icon-jiantouDown",color:"text-red"},
-      {title:"儿童版三国演义",icon:"icon-jiantouUp",color:"text-red"},
-    ]
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
+	/**
+	 * 页面的初始数据
+	 */
+	data: {
+		hotData: [
+			{ title: "宝宝巴士", icon: "icon-jiantouUp", color: "text-orange" },
+			{ title: "孟鹤堂", icon: "icon-jiantouUp", color: "text-red" },
+			{ title: "三体", icon: "icon-jiantouDown", color: "text-green" },
+			{ title: "龙王殿", icon: "icon-jiantouUp", color: "text-red" },
+			{ title: "儿童恐龙故事", icon: "icon-jiantouDown", color: "text-red" },
+			{ title: "儿童版三国演义", icon: "icon-jiantouUp", color: "text-red" },
+		]
+	}
 })

+ 1 - 1
pages/search/search.json

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

+ 87 - 77
pages/search/search.wxss

@@ -3,102 +3,112 @@
   搜索部分css 
   ========
 */
-.hmly-search{
-  width: 90%;
-  height: auto;
-  display: flex;
-  align-items: center;
-  margin: 0rpx auto;
+.hmly-search {
+	width: 90%;
+	height: auto;
+	display: flex;
+	align-items: center;
+	margin: 0rpx auto;
 }
 
-.hmly-search-left{
-  flex: 4;
-  background-color: rgb(240, 240, 240);
-  display: flex;
-  justify-content: flex-start;
-  align-items: center;
-  padding: 10rpx 20rpx;
-  border-radius: 15rpx;
+.hmly-search-left {
+	flex: 4;
+	background-color: rgb(240, 240, 240);
+	display: flex;
+	justify-content: flex-start;
+	align-items: center;
+	padding: 10rpx 20rpx;
+	border-radius: 15rpx;
 }
 
-.hmly-search input{
-  width: 90%;
-  height: 100%;
-  font-size: 29rpx;
-  margin-left: 20rpx;
+.hmly-search input {
+	width: 90%;
+	height: 100%;
+	font-size: 29rpx;
+	margin-left: 20rpx;
 }
-.hmly-search-right{
-  flex: 0.5;
-  font-size:30rpx;
-  color: #aaa;
-  text-align: center;
-  margin-left: 30rpx;
+
+.hmly-search-right {
+	flex: 0.5;
+	font-size: 30rpx;
+	color: #aaa;
+	text-align: center;
+	margin-left: 30rpx;
 }
+
 /* 
   ======== 
   搜索历史和热门搜索部分css 
   ========
 */
-.hmly-title{
-  width: 100%;
-  height: 50rpx;
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  box-sizing: border-box;
+.hmly-title {
+	width: 100%;
+	height: 50rpx;
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	box-sizing: border-box;
 }
-.hmly-title-text{
-  color: #000;
-  font-weight: 700;
+
+.hmly-title-text {
+	color: #000;
+	font-weight: 700;
 }
-.hmly-history{
-  width: 90%;
-  height: auto;
-  margin: 0rpx auto;
-  margin-top: 80rpx;
+
+.hmly-history {
+	width: 90%;
+	height: auto;
+	margin: 0rpx auto;
+	margin-top: 80rpx;
 }
-.hmly-history-content{
-  width: 100%;
-  height: auto;
-  margin-top: 30rpx;
-  display: flex;
-  justify-content: space-between;
-  flex-wrap: wrap;
-  align-items: center;
+
+.hmly-history-content {
+	width: 100%;
+	height: auto;
+	margin-top: 30rpx;
+	display: flex;
+	justify-content: space-between;
+	flex-wrap: wrap;
+	align-items: center;
 }
-.hmly-content-item{
-  width: 150rpx;
-  font-size: 33rpx;
-  text-align: center;
-  padding: 10rpx 20rpx;
-  margin-bottom: 20rpx;
-  border-radius: 25rpx;
+
+.hmly-content-item {
+	width: 150rpx;
+	font-size: 33rpx;
+	text-align: center;
+	padding: 10rpx 20rpx;
+	margin-bottom: 20rpx;
+	border-radius: 25rpx;
 }
 
-.hmly-hot{
-  width: 90%;
-  height: auto;
-  margin: 0rpx auto;
-  margin-top: 80rpx;
+.hmly-hot {
+	width: 90%;
+	height: auto;
+	margin: 0rpx auto;
+	margin-top: 80rpx;
 }
-.hmly-hot-content{
-  width: 100%;
-  height: auto;
-  margin-top: 30rpx;
+
+.hmly-hot-content {
+	width: 100%;
+	height: auto;
+	margin-top: 30rpx;
 }
-.hmly-hot-items{
-  width: 100%;
-  height: 50rpx;
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  margin-bottom: 20rpx;
+
+.hmly-hot-items {
+	width: 100%;
+	height: 50rpx;
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	margin-bottom: 20rpx;
 }
-.hmly-item-left{
-  display: flex;
-  justify-content: flex-start;
-  font-size: 32rpx;
+
+.hmly-item-left {
+	display: flex;
+	justify-content: flex-start;
+	font-size: 32rpx;
 }
-.hmly-item-title{
-  margin-left: 40rpx;
+
+.hmly-item-title {
+	margin-left: 40rpx;
 }

+ 19 - 29
pages/user/phoneLogin/phoneLogin.js

@@ -1,32 +1,22 @@
 const app = getApp();
-
 Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    height:400
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    //获取设备信息
-    var that = this;
-    wx.getSystemInfo({
-      success(res) {
-        console.log(res.windowHeight);
-        that.setData({
-          height: res.screenHeight
-        })
-      }
-    })
-  },
-  login: function () {
-    wx.showToast({
-      title: '成功',
-    })
-  }
+	data: {
+		height: 400
+	},
+	onLoad(options) {
+		//获取设备信息
+		const that = this;
+		wx.getSystemInfo({
+			success(res) {
+				that.setData({
+					height: res.screenHeight
+				})
+			}
+		})
+	},
+	login() {
+		wx.showToast({
+			title: '成功',
+		})
+	}
 })

+ 1 - 3
pages/user/phoneLogin/phoneLogin.json

@@ -1,3 +1 @@
-{
-  
-}
+{}

+ 37 - 37
pages/user/phoneLogin/phoneLogin.wxml

@@ -1,39 +1,39 @@
 <view class="hmly-main bg-white" style="min-height:{{height}}px">
-    <view class="hmly-content_">
-        <!-- 提示标语 -->
-        <view class="hmly-slogn">
-            <!-- <view class="left-line" style="width:20rpx"></view> -->
-            登录后即可收听你的收藏专辑哦
-            <!-- <view class="right-line" style="width:20rpx"></view> -->
-        </view>
-        <!-- 表单输入部分 -->
-        <view class="hmly-login">
-            <form class="frombox" report-submit="false" bindsubmit="" bindreset="">
-                <!-- 输入手机号 -->
-                <view class="hmly-phone-number">
-                    <view class="hmly-code">+86</view>
-                    <input type="number" placeholder="请输入手机号" placeholder-class="hmly-place"></input>
-                </view>      
-                <!-- 验证码 -->
-                <view class="hmly-yzm">
-                    <input type="number" placeholder="输入验证码" placeholder-class="hmly-place"></input>
-                    <view class="hmly-get-code">获取验证码</view>
-                </view>
-                <view class="hmly-submit" bindtap="login">
-                    <button><text class="icon-wechat"></text> 立即登录</button>
-                </view>
-            </form>
-        </view>
-        <!-- 其他登录方式 -->
-        <view class="hmly-wechat" >
-            <view class="hmly-tips" >
-                <view class="hmly-left-line"></view>
-                其他账户登录
-                <view class="hmly-right-line"></view>
-            </view>
-            <view class="hmly-wecaht-login" >
-                <button><text class="icon-wechat"></text> 微信登陆</button>
-            </view>
-        </view>
-    </view>
+	<view class="hmly-content_">
+		<!-- 提示标语 -->
+		<view class="hmly-slogn">
+			<!-- <view class="left-line" style="width:20rpx"></view> -->
+			登录后即可收听你的收藏专辑哦
+			<!-- <view class="right-line" style="width:20rpx"></view> -->
+		</view>
+		<!-- 表单输入部分 -->
+		<view class="hmly-login">
+			<form class="frombox" report-submit="false" bindsubmit="" bindreset="">
+				<!-- 输入手机号 -->
+				<view class="hmly-phone-number">
+					<view class="hmly-code">+86</view>
+					<input type="number" placeholder="请输入手机号" placeholder-class="hmly-place"></input>
+				</view>
+				<!-- 验证码 -->
+				<view class="hmly-yzm">
+					<input type="number" placeholder="输入验证码" placeholder-class="hmly-place"></input>
+					<view class="hmly-get-code">获取验证码</view>
+				</view>
+				<view class="hmly-submit" bindtap="login">
+					<button><text class="icon-wechat"></text> 立即登录</button>
+				</view>
+			</form>
+		</view>
+		<!-- 其他登录方式 -->
+		<view class="hmly-wechat">
+			<view class="hmly-tips">
+				<view class="hmly-left-line"></view>
+				其他账户登录
+				<view class="hmly-right-line"></view>
+			</view>
+			<view class="hmly-wecaht-login">
+				<button><text class="icon-wechat"></text> 微信登陆</button>
+			</view>
+		</view>
+	</view>
 </view>

+ 140 - 125
pages/user/phoneLogin/phoneLogin.wxss

@@ -2,129 +2,144 @@
     96D655 
     CCCCCC
 */
-.hmly-main{
-   width: 100%; 
-}
-
-.hmly-content_{
-    width: 80%;
-    margin: 0rpx auto;
-    margin-top: 100rpx;
-    display: flex;
-    flex-wrap: wrap
-}
-.hmly-slogn{
-    width: 100%;
-    height: auto;
-    font-size: 25rpx;
-    color: #c3c3c3;
-    text-align: center;
-    display: flex;
-    justify-content: space-evenly;
-    align-items: center;
-}
-.hmly-login{
-    width: 100%;
-    height: auto;
-    margin-top: 50rpx;
-    overflow: hidden;
-}
-.hmly-phone-number{
-    width: 100%;
-    height: auto;
-    display: flex;
-    padding: 20rpx;
-    justify-content: flex-start;
-    align-items: center;
-    border-bottom: 0.5rpx solid #cccccc;
-}
-.hmly-code{
-    width: 60rpx;
-    font-size: 27rpx;
-    line-height: 60rpx;
-    text-align: center;
-    padding-right: 20rpx;
-    border-right: 1rpx solid #cccccc;
-    margin-right: 20rpx;
-    color: #cccccc;
-}
-.hmly-yzm{
-    width: 100%;
-    height: auto;
-    display: flex;
-    padding: 20rpx;
-    justify-content: flex-start;
-    align-items: center;
-    box-sizing: border-box;
-    border-bottom: 0.5rpx solid #cccccc;
-}
-.hmly-get-code{
-    width: 200rpx;
-    font-size: 35rpx;
-    line-height: 60rpx;
-    text-align: center;
-    padding-left: 20rpx;
-    border-left: 1rpx solid #cccccc;
-    /* box-sizing: border-box; */
-    /* margin-left: 20rpx; */
-    color: #cccccc;
-}
-.hmly-place{
-    font-size: 29rpx;
-}
-.hmly-submit{
-    width: 100%;
-    height: 100rpx;
-    margin-top: 50rpx;
-    border-radius: 50rpx;
-    border: 0rpx;
-}
-.hmly-submit button{
-    width: 100%;
-    height: 100rpx;
-    /* margin-top: 50rpx; */
-    border-radius: 50rpx;
-    border: 0rpx;
-    color: #ffffff;
-    background: #cccccc;
-    font-size: 38rpx;
-}
-.hmly-wechat{
-    width: 100%;
-    height: auto;
-    margin-top: 150rpx;
-    text-align: center;
-}
-.hmly-tips{
-    font-size: 32rpx;
-    color: #333333;
-    display: flex;
-    justify-content: space-evenly;
-    align-items: center;
-}
-.hmly-left-line{
-    width: 100rpx;
-    height: 3rpx;
-    background: #aaa;
-}
-.hmly-right-line{
-    width: 100rpx;
-    height: 3rpx;
-    background: #aaa;
-}
-.hmly-wecaht-login{
-    width: 100%;
-    height: 100rpx;
-    margin-top: 100rpx;
-    border-radius: 50rpx;
-    border: 0rpx;
-}
-.hmly-wecaht-login button{
-    width: 100%;
-    height: 100rpx;
-    border-radius: 50rpx;
-    border: 0rpx;
-    background: #96D655;
-    color: #ffffff;
-    font-size: 38rpx;
+.hmly-main {
+	width: 100%;
+}
+
+.hmly-content_ {
+	width: 80%;
+	margin: 0rpx auto;
+	margin-top: 100rpx;
+	display: flex;
+	flex-wrap: wrap
+}
+
+.hmly-slogn {
+	width: 100%;
+	height: auto;
+	font-size: 25rpx;
+	color: #c3c3c3;
+	text-align: center;
+	display: flex;
+	justify-content: space-evenly;
+	align-items: center;
+}
+
+.hmly-login {
+	width: 100%;
+	height: auto;
+	margin-top: 50rpx;
+	overflow: hidden;
+}
+
+.hmly-phone-number {
+	width: 100%;
+	height: auto;
+	display: flex;
+	padding: 20rpx;
+	justify-content: flex-start;
+	align-items: center;
+	border-bottom: 0.5rpx solid #cccccc;
+}
+
+.hmly-code {
+	width: 60rpx;
+	font-size: 27rpx;
+	line-height: 60rpx;
+	text-align: center;
+	padding-right: 20rpx;
+	border-right: 1rpx solid #cccccc;
+	margin-right: 20rpx;
+	color: #cccccc;
+}
+
+.hmly-yzm {
+	width: 100%;
+	height: auto;
+	display: flex;
+	padding: 20rpx;
+	justify-content: flex-start;
+	align-items: center;
+	box-sizing: border-box;
+	border-bottom: 0.5rpx solid #cccccc;
+}
+
+.hmly-get-code {
+	width: 200rpx;
+	font-size: 35rpx;
+	line-height: 60rpx;
+	text-align: center;
+	padding-left: 20rpx;
+	border-left: 1rpx solid #cccccc;
+	/* box-sizing: border-box; */
+	/* margin-left: 20rpx; */
+	color: #cccccc;
+}
+
+.hmly-place {
+	font-size: 29rpx;
+}
+
+.hmly-submit {
+	width: 100%;
+	height: 100rpx;
+	margin-top: 50rpx;
+	border-radius: 50rpx;
+	border: 0rpx;
+}
+
+.hmly-submit button {
+	width: 100%;
+	height: 100rpx;
+	/* margin-top: 50rpx; */
+	border-radius: 50rpx;
+	border: 0rpx;
+	color: #ffffff;
+	background: #cccccc;
+	font-size: 38rpx;
+}
+
+.hmly-wechat {
+	width: 100%;
+	height: auto;
+	margin-top: 150rpx;
+	text-align: center;
+}
+
+.hmly-tips {
+	font-size: 32rpx;
+	color: #333333;
+	display: flex;
+	justify-content: space-evenly;
+	align-items: center;
+}
+
+.hmly-left-line {
+	width: 100rpx;
+	height: 3rpx;
+	background: #aaa;
+}
+
+.hmly-right-line {
+	width: 100rpx;
+	height: 3rpx;
+	background: #aaa;
+}
+
+.hmly-wecaht-login {
+	width: 100%;
+	height: 100rpx;
+	margin-top: 100rpx;
+	border-radius: 50rpx;
+	border: 0rpx;
+}
+
+.hmly-wecaht-login button {
+	width: 100%;
+	height: 100rpx;
+	border-radius: 50rpx;
+	border: 0rpx;
+	background: #96D655;
+	color: #ffffff;
+	font-size: 38rpx;
 }

+ 92 - 94
pages/user/user.js

@@ -3,99 +3,97 @@ const app = getApp()
 let userInfo = app.globalData.userInfo;
 Page({
 
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    timeout:[
-      {text:"不开启"},
-      {text:"播放当前声音关闭"},
-      {text:"播放2首声音关闭"},
-      {text:"播放3首声音关闭"},
-      {text:"播放4首声音关闭"},
-      {text:"10分钟后"},
-      {text:"20分钟后"},
-      {text:"30分钟后"},
-    ],
-    activeIndex:0,
-    login: true,
-    avatarUrl:"",
-    nickName:""
-  },
+	/**
+	 * 页面的初始数据
+	 */
+	data: {
+		timeout: [
+			{ text: "不开启" },
+			{ text: "播放当前声音关闭" },
+			{ text: "播放2首声音关闭" },
+			{ text: "播放3首声音关闭" },
+			{ text: "播放4首声音关闭" },
+			{ text: "10分钟后" },
+			{ text: "20分钟后" },
+			{ text: "30分钟后" },
+		],
+		activeIndex: 0,
+		login: true,
+		avatarUrl: "",
+		nickName: ""
+	},
 
-  onLoad: function (options) {
-    var that = this;
-    //获得设备信息
-    wx.getSystemInfo({
-      success (res) {
-        console.log(res.windowHeight);
-        that.setData({
-          phoneHeight: res.windowHeight,
-        })
-      }
-    })
-    // 查看是否授权
-    wx.getStorage({
-      key: 'login',
-      success(res){
-        if (res.data === 200) {
-          that.setData({
-            login: false
-          })
-        } else {
-          that.setData({
-            login: true
-          })
-        }
-      }
-    })
-    
-  },
-  // 获取用户的头像和昵称信息
-  bindGetUserInfo(e) {
-    var that = this;
-    wx.getUserInfo({
-      success: function(res) {
-        app.globalData.userInfo = e.detail.userInfo;
-        wx.setStorage({
-          key: "login",
-          data: 200
-        })
-        that.setData({
-          login: false,
-          avatarUrl: e.detail.userInfo.avatarUrl,
-          nickName: e.detail.userInfo.nickName
-        })
-      }
-    })
-  },
-  phoneLogin:function(){
-    wx.navigateTo({
-      url: './phoneLogin/phoneLogin',
-    });
-  },
-  gotoLogin(){
-    wx.navigateTo({
-      url: './phoneLogin/phoneLogin',
-    });
-  },
-  openSwitch:function(){
-    var that = this;
-    that.setData({
-      show:true
-    })
-  },
-  close:function(){
-    var that = this;
-    that.setData({
-      show:false
-    })
-  },
-  chooseTimeOut:function(e){
-    var that = this;
-    console.log(e)
-    that.setData({
-      activeIndex:e.currentTarget.dataset.activeindex
-    })
-  }
+	onLoad(options) {
+		var that = this;
+		//获得设备信息
+		wx.getSystemInfo({
+			success(res) {
+				that.setData({
+					phoneHeight: res.windowHeight,
+				})
+			}
+		})
+		// 查看是否授权
+		wx.getStorage({
+			key: 'login',
+			success(res) {
+				if (res.data === 200) {
+					that.setData({
+						login: false
+					})
+				} else {
+					that.setData({
+						login: true
+					})
+				}
+			}
+		})
+
+	},
+	// 获取用户的头像和昵称信息
+	bindGetUserInfo(e) {
+		var that = this;
+		wx.getUserInfo({
+			success: function (res) {
+				app.globalData.userInfo = e.detail.userInfo;
+				wx.setStorage({
+					key: "login",
+					data: 200
+				})
+				that.setData({
+					login: false,
+					avatarUrl: e.detail.userInfo.avatarUrl,
+					nickName: e.detail.userInfo.nickName
+				})
+			}
+		})
+	},
+	phoneLogin() {
+		wx.navigateTo({
+			url: './phoneLogin/phoneLogin',
+		});
+	},
+	gotoLogin() {
+		wx.navigateTo({
+			url: './phoneLogin/phoneLogin',
+		});
+	},
+	openSwitch() {
+		var that = this;
+		that.setData({
+			show: true
+		})
+	},
+	close() {
+		var that = this;
+		that.setData({
+			show: false
+		})
+	},
+	chooseTimeOut(e) {
+		var that = this;
+		that.setData({
+			activeIndex: e.currentTarget.dataset.activeindex
+		})
+	}
 })

+ 1 - 1
pages/user/user.json

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

+ 90 - 89
pages/user/user.wxss

@@ -1,146 +1,147 @@
 /* pages/user/user.wxss */
 .hmly-body {
-    background-color: #f1f1f1;
+	background-color: #f1f1f1;
 }
 
 .hmly-top-bar {
-    width: 100%;
-    height: 270rpx;
-    background-color: #fff;
+	width: 100%;
+	height: 270rpx;
+	background-color: #fff;
 }
 
 .hmly-user-img {
-    width: 95%;
-    height: 200rpx;
-    margin: 0rpx auto;
-    display: flex;
-    justify-content: space-around;
-    align-items: center;
+	width: 95%;
+	height: 200rpx;
+	margin: 0rpx auto;
+	display: flex;
+	justify-content: space-around;
+	align-items: center;
 
 }
 
 .hmly-avatar-nickname {
-    width: 70%;
-    height: 100%;
-    display: flex;
-    justify-content: start;
-    align-items: center;
+	width: 70%;
+	height: 100%;
+	display: flex;
+	justify-content: start;
+	align-items: center;
 }
 
 .hmly-avatar {
-    width: 120rpx;
-    height: 120rpx;
-    border-radius: 50%;
+	width: 120rpx;
+	height: 120rpx;
+	border-radius: 50%;
 }
 
 .hmly-avatar-img {
-    width: 120rpx;
-    height: 120rpx;
-    border-radius: 50%;
+	width: 120rpx;
+	height: 120rpx;
+	border-radius: 50%;
 }
 
 .hmly-nickname {
-    margin-left: 20rpx;
+	margin-left: 20rpx;
 }
 
 .hmly-qian-dao {
-    width: 90%;
-    height: 70rpx;
-    padding: 0rpx 30rpx;
-    font-size: 32rpx;
+	width: 90%;
+	height: 70rpx;
+	padding: 0rpx 30rpx;
+	font-size: 32rpx;
 }
 
 .hmly-qian-text {
-    float: left;
+	float: left;
 }
 
 .hmly-icon_ {
-    float: right;
+	float: right;
 }
 
 .hmly-kefu {
-    width: 160rpx;
-    height: 50rpx;
-    font-size: 25rpx;
-    border-radius: 25rpx;
-    outline: none;
-    text-align: center;
-    line-height: 50rpx;
-    background-color: #f1f1f1;
+	width: 160rpx;
+	height: 50rpx;
+	font-size: 25rpx;
+	border-radius: 25rpx;
+	outline: none;
+	text-align: center;
+	line-height: 50rpx;
+	background-color: #f1f1f1;
 }
 
 /* 选项卡 */
 .hmly-chioce {
-    width: 100%;
-    height: auto;
-    background-color: #fff;
-    margin-top: 10rpx;
-    font-size: 32rpx;
+	width: 100%;
+	height: auto;
+	background-color: #fff;
+	margin-top: 10rpx;
+	font-size: 32rpx;
 }
 
 .hmly-choice-item {
-    display: flex;
-    width: 90%;
-    height: 60rpx;
-    padding: 20rpx 30rpx;
-    justify-content: space-between;
-    align-items: center;
+	display: flex;
+	width: 90%;
+	height: 60rpx;
+	padding: 20rpx 30rpx;
+	justify-content: space-between;
+	align-items: center;
 }
 
 /* 定时关闭 */
 .hmly-switch {
-    width: 100%;
-    height: 500rpx;
-    position: fixed;
-    bottom: 0rpx;
-    z-index: 9999;
-    display: flex;
-    justify-content: space-around;
-    align-items: center;
-    flex-wrap: wrap;
-    background: #fff;
-    border-top-left-radius: 15rpx;
-    border-top-right-radius: 15rpx;
-    padding-top: 20rpx;
+	width: 100%;
+	height: 500rpx;
+	position: fixed;
+	bottom: 0rpx;
+	z-index: 9999;
+	display: flex;
+	justify-content: space-around;
+	align-items: center;
+	flex-wrap: wrap;
+	background: #fff;
+	border-top-left-radius: 15rpx;
+	border-top-right-radius: 15rpx;
+	padding-top: 20rpx;
 }
 
 .hmly-switch-item {
-    width: 100%;
-    height: 120rpx;
-    line-height: 120rpx;
-    border-bottom: 1rpx solid #f1f1f1;
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    /* padding: 0rpx 30rpx; */
+	width: 100%;
+	height: 120rpx;
+	line-height: 120rpx;
+	border-bottom: 1rpx solid #f1f1f1;
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	/* padding: 0rpx 30rpx; */
 }
 
 .hmly-close {
-    width: 100%;
-    height: 100rpx;
-    text-align: center;
-    line-height: 100rpx;
+	width: 100%;
+	height: 100rpx;
+	text-align: center;
+	line-height: 100rpx;
 }
 
 .hmly-scroll-wrapper {
-    white-space: nowrap;
-    -webkit-overflow-scrolling: touch;
-    background: #FFF;
-    padding-left: 20rpx;
-    width: 100%;
-    height: 400rpx;
-    box-sizing: border-box;
+	white-space: nowrap;
+	-webkit-overflow-scrolling: touch;
+	background: #FFF;
+	padding-left: 20rpx;
+	width: 100%;
+	height: 400rpx;
+	box-sizing: border-box;
 }
 
 ::-webkit-scrollbar {
-    width: 0;
-    height: 0;
-    color: transparent;
-}
-.hmly-active{
-    width: 30rpx;
-    height: 30rpx;
-    background-color: red;
-    border-radius: 50%;
-    margin-right: 40rpx;
+	width: 0;
+	height: 0;
+	color: transparent;
+}
+
+.hmly-active {
+	width: 30rpx;
+	height: 30rpx;
+	background-color: red;
+	border-radius: 50%;
+	margin-right: 40rpx;
 }

+ 120 - 111
project.config.json

@@ -1,113 +1,122 @@
 {
-	"description": "项目配置文件",
-	"packOptions": {
-		"ignore": []
-	},
-	"setting": {
-		"urlCheck": false,
-		"es6": true,
-		"postcss": true,
-		"preloadBackgroundData": false,
-		"minified": true,
-		"newFeature": true,
-		"coverView": true,
-		"autoAudits": false,
-		"showShadowRootInWxmlPanel": true,
-		"scopeDataCheck": false,
-		"checkInvalidKey": true,
-		"checkSiteMap": true,
-		"uploadWithSourceMap": true,
-		"babelSetting": {
-			"ignore": [],
-			"disablePlugins": [],
-			"outputPath": ""
-		},
-		"useCompilerModule": false,
-		"userConfirmedUseCompilerModuleSwitch": false
-	},
-	"compileType": "miniprogram",
-	"libVersion": "2.11.3",
-	"appid": "wx101d03d3f1aab84c",
-	"projectname": "%E4%BB%BF%E5%96%9C%E9%A9%AC%E6%8B%89%E9%9B%85lite",
-	"debugOptions": {
-		"hidedInDevtools": []
-	},
-	"isGameTourist": false,
-	"simulatorType": "wechat",
-	"simulatorPluginLibVersion": {},
-	"condition": {
-		"search": {
-			"current": -1,
-			"list": []
-		},
-		"conversation": {
-			"current": -1,
-			"list": []
-		},
-		"plugin": {
-			"current": -1,
-			"list": []
-		},
-		"game": {
-			"currentL": -1,
-			"list": []
-		},
-		"gamePlugin": {
-			"current": -1,
-			"list": []
-		},
-		"miniprogram": {
-			"current": 4,
-			"list": [
-				{
-					"id": -1,
-					"name": "收藏页",
-					"pathName": "pages/collection/collection",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "分类页",
-					"pathName": "pages/classification/classification",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "榜单页",
-					"pathName": "pages/index/bangdan/bangdan",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "user",
-					"pathName": "pages/user/user",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "details",
-					"pathName": "pages/details/details",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "phoneLogin",
-					"pathName": "pages/user/phoneLogin/phoneLogin",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "搜索页",
-					"pathName": "pages/search/search",
-					"scene": null
-				}
-			]
-		}
-	}
+  "description": "项目配置文件",
+  "packOptions": {
+    "ignore": []
+  },
+  "setting": {
+    "urlCheck": false,
+    "es6": true,
+    "enhance": false,
+    "postcss": true,
+    "preloadBackgroundData": false,
+    "minified": true,
+    "newFeature": true,
+    "coverView": true,
+    "nodeModules": false,
+    "autoAudits": false,
+    "showShadowRootInWxmlPanel": true,
+    "scopeDataCheck": false,
+    "uglifyFileName": false,
+    "checkInvalidKey": true,
+    "checkSiteMap": true,
+    "uploadWithSourceMap": true,
+    "compileHotReLoad": false,
+    "useMultiFrameRuntime": true,
+    "useApiHook": true,
+    "babelSetting": {
+      "ignore": [],
+      "disablePlugins": [],
+      "outputPath": ""
+    },
+    "enableEngineNative": false,
+    "bundle": false,
+    "useIsolateContext": true,
+    "useCompilerModule": false,
+    "userConfirmedUseCompilerModuleSwitch": false,
+    "userConfirmedBundleSwitch": false,
+    "packNpmManually": false,
+    "packNpmRelationList": [],
+    "minifyWXSS": true,
+    "useApiHostProcess": true
+  },
+  "compileType": "miniprogram",
+  "libVersion": "2.11.3",
+  "appid": "wx101d03d3f1aab84c",
+  "projectname": "%E4%BB%BF%E5%96%9C%E9%A9%AC%E6%8B%89%E9%9B%85lite",
+  "debugOptions": {
+    "hidedInDevtools": []
+  },
+  "isGameTourist": false,
+  "simulatorType": "wechat",
+  "simulatorPluginLibVersion": {},
+  "condition": {
+    "search": {
+      "list": []
+    },
+    "conversation": {
+      "list": []
+    },
+    "plugin": {
+      "list": []
+    },
+    "game": {
+      "currentL": -1,
+      "list": []
+    },
+    "gamePlugin": {
+      "list": []
+    },
+    "miniprogram": {
+      "list": [
+        {
+          "id": -1,
+          "name": "收藏页",
+          "pathName": "pages/collection/collection",
+          "query": "",
+          "scene": null
+        },
+        {
+          "id": -1,
+          "name": "分类页",
+          "pathName": "pages/classification/classification",
+          "query": "",
+          "scene": null
+        },
+        {
+          "id": -1,
+          "name": "榜单页",
+          "pathName": "pages/index/bangdan/bangdan",
+          "query": "",
+          "scene": null
+        },
+        {
+          "id": -1,
+          "name": "user",
+          "pathName": "pages/user/user",
+          "query": "",
+          "scene": null
+        },
+        {
+          "id": -1,
+          "name": "details",
+          "pathName": "pages/details/details",
+          "query": "",
+          "scene": null
+        },
+        {
+          "id": -1,
+          "name": "phoneLogin",
+          "pathName": "pages/user/phoneLogin/phoneLogin",
+          "query": "",
+          "scene": null
+        },
+        {
+          "id": -1,
+          "name": "搜索页",
+          "pathName": "pages/search/search",
+          "scene": null
+        }
+      ]
+    }
+  }
 }

+ 14 - 12
style/color.wxss

@@ -1,23 +1,25 @@
-
 /**
-*  color.wxss主要包含本程序主要的文本颜色,背景颜色
+*  color.wxss包含本程序主要的文本颜色,背景颜色
 */
 
 /* 背景颜色 */
-.bg-gray{
-  background-color: #eeeeee;
+.bg-gray {
+	background-color: #eeeeee;
 }
 
 /* 字体颜色 */
-.text-black{
-  color: #181818;
+.text-black {
+	color: #181818;
 }
-.text-red{
-  color: #f00;
+
+.text-red {
+	color: #f00;
 }
-.text-orange{
-  color: orange;
+
+.text-orange {
+	color: orange;
 }
-.text-gray{
-  color: #aaaaaa;
+
+.text-gray {
+	color: #aaaaaa;
 }

+ 192 - 177
style/common.wxss

@@ -4,222 +4,237 @@
 */
 
 /* 轮播图 */
-.hmly-swiper{
-  width: 100%;
-  height: 100%;
-  border-radius: 15rpx;
-}
-
-.hmly-swiper-container{
-  width: 90%;
-  height: 280rpx;
-  margin: 0rpx auto;
-  position: relative;
-  border-radius: 15rpx;
-  overflow: hidden;
-}
-
-.hmly-swiper-item{
-  width: 100%;
-  height: 100%;
-  border-radius: 15rpx;
-}
-
-.hmly-swiper-item>image{
-  width: 100%;
-  height: 100%;
-  border-radius: 15rpx;
-}
-
-.hmly-dots{
-  width: auto;
-  height: 10rpx;
-  position: absolute;
-  bottom: 20rpx;
-  border-radius: 50rpx;
-  left: 240rpx;
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  padding: 3rpx 10rpx;
-}
-.hmly-dots-item{
-  width: 8rpx;
-  height: 8rpx;
-  margin: 0rpx 8rpx;
-  border-radius: 50%;
-  background-color: #cdcdcd;
-  transition: all .3s;
-}
-.hmly-dot-active{
-  width: 10rpx;
-  height: 10rpx;
-  background-color: #fff;
+.hmly-swiper {
+	width: 100%;
+	height: 100%;
+	border-radius: 15rpx;
+}
+
+.hmly-swiper-container {
+	width: 90%;
+	height: 280rpx;
+	margin: 0rpx auto;
+	position: relative;
+	border-radius: 15rpx;
+	overflow: hidden;
+}
+
+.hmly-swiper-item {
+	width: 100%;
+	height: 100%;
+	border-radius: 15rpx;
+}
+
+.hmly-swiper-item>image {
+	width: 100%;
+	height: 100%;
+	border-radius: 15rpx;
+}
+
+.hmly-dots {
+	width: auto;
+	height: 10rpx;
+	position: absolute;
+	bottom: 20rpx;
+	border-radius: 50rpx;
+	left: 240rpx;
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	padding: 3rpx 10rpx;
+}
+
+.hmly-dots-item {
+	width: 8rpx;
+	height: 8rpx;
+	margin: 0rpx 8rpx;
+	border-radius: 50%;
+	background-color: #cdcdcd;
+	transition: all .3s;
+}
+
+.hmly-dot-active {
+	width: 10rpx;
+	height: 10rpx;
+	background-color: #fff;
 }
 
 /* 主要内容列表样式 */
-.hmly-content-list{
-  width: 90%;
-  margin: 0rpx auto;
-  margin-top: 10rpx;
-}
-.hmly-content{
-  width: 100%;
-  height: auto;
-  padding: 20rpx 0rpx;
-  display: flex;
-  justify-content: space-between;
-  border-bottom: 1rpx solid #f1f1f1;
-}
-.hmly-content-img{
-  width: 232rpx;
-  height: 232rpx;
-  border-radius: 15rpx;
-}
-.hmly-content-img>image{
-  width: 100%;
-  height: 100%;
-  border-radius: 15rpx;
-}
-.hmly-content-right{
-  width: 530rpx;
-  height: 100%;
-  margin-left: 20rpx;
-  display: flex;
-  flex-direction: column;
-}
-.hmly-content-title{
-  width: 100%;
-  height: 138rpx;
-  overflow: hidden;
-  display: flex;
-  flex-direction: column;
-}
-.hmly-title-text{
-  width: 100%;
-  font-size: 35rpx;
-  color: #333;
-  text-align: left;
-  display: -webkit-box;
-  -webkit-line-clamp: 1;/*行数n*/
-  -webkit-box-orient: vertical; 
-  overflow: hidden;
-  text-overflow: ellipsis;
-}
-.hmly-introduction{
-  width: 100%;
-  font-size: 28rpx;
-  color: #cdcdcd;
-  text-align: left;
-  padding: 15rpx 0rpx;
-  display: -webkit-box;
-  -webkit-line-clamp: 2;/*行数n*/
-  -webkit-box-orient: vertical; 
-  overflow: hidden;
-  text-overflow: ellipsis;
-}
-.hmly-count{
-  width: 100%;
-  height: 50rpx;
-  display: flex;
-  justify-content: start;
-  align-items: center;
-}
-.hmly-play-count{
- font-size: 25rpx;
- color: #cdcdcd;
- margin-right: 30rpx;
-}
-.hmly-ji-count{
-  font-size: 25rpx;
-  color: #cdcdcd;
+.hmly-content-list {
+	width: 90%;
+	margin: 0rpx auto;
+	margin-top: 10rpx;
+}
+
+.hmly-content {
+	width: 100%;
+	height: auto;
+	padding: 20rpx 0rpx;
+	display: flex;
+	justify-content: space-between;
+	border-bottom: 1rpx solid #f1f1f1;
+}
+
+.hmly-content-img {
+	width: 232rpx;
+	height: 232rpx;
+	border-radius: 15rpx;
+}
+
+.hmly-content-img>image {
+	width: 100%;
+	height: 100%;
+	border-radius: 15rpx;
+}
+
+.hmly-content-right {
+	width: 530rpx;
+	height: 100%;
+	margin-left: 20rpx;
+	display: flex;
+	flex-direction: column;
+}
+
+.hmly-content-title {
+	width: 100%;
+	height: 138rpx;
+	overflow: hidden;
+	display: flex;
+	flex-direction: column;
+}
+
+.hmly-title-text {
+	width: 100%;
+	font-size: 35rpx;
+	color: #333;
+	text-align: left;
+	display: -webkit-box;
+	-webkit-line-clamp: 1;
+	/*行数n*/
+	-webkit-box-orient: vertical;
+	overflow: hidden;
+	text-overflow: ellipsis;
+}
+
+.hmly-introduction {
+	width: 100%;
+	font-size: 28rpx;
+	color: #cdcdcd;
+	text-align: left;
+	padding: 15rpx 0rpx;
+	display: -webkit-box;
+	-webkit-line-clamp: 2;
+	/*行数n*/
+	-webkit-box-orient: vertical;
+	overflow: hidden;
+	text-overflow: ellipsis;
+}
+
+.hmly-count {
+	width: 100%;
+	height: 50rpx;
+	display: flex;
+	justify-content: start;
+	align-items: center;
+}
+
+.hmly-play-count {
+	font-size: 25rpx;
+	color: #cdcdcd;
+	margin-right: 30rpx;
+}
+
+.hmly-ji-count {
+	font-size: 25rpx;
+	color: #cdcdcd;
 }
 
 /* 登录样式 */
 .hmly-logo {
-  width: 128rpx;
-  height: 128rpx;
-  margin: 0rpx auto;
-  position: relative;
-  top: 200rpx;
+	width: 128rpx;
+	height: 128rpx;
+	margin: 0rpx auto;
+	position: relative;
+	top: 200rpx;
 }
 
 .hmly-logo-img {
-  width: 100%;
-  height: 100%;
+	width: 100%;
+	height: 100%;
 }
 
 .hmly-login-button {
-  width: 80%;
-  margin: 0rpx auto;
-  position: relative;
-  top: 500rpx;
+	width: 80%;
+	margin: 0rpx auto;
+	position: relative;
+	top: 500rpx;
 }
 
-.hmly-wechat-login, .phone-login {
-  width: 100%;
-  height: 80rpx;
-  border-radius: 50rpx;
-  border: 0rpx;
-  outline: none;
+.hmly-wechat-login,
+.phone-login {
+	width: 100%;
+	height: 80rpx;
+	border-radius: 50rpx;
+	border: 0rpx;
+	outline: none;
 }
 
 .hmly-wechat-login button {
-  background-color: #70e500;
-  border-radius: 50rpx;
-  border: none;
-  color: #fff;
+	background-color: #70e500;
+	border-radius: 50rpx;
+	border: none;
+	color: #fff;
 }
 
 .hmly-phone-login {
-  margin-top: 40rpx;
+	margin-top: 40rpx;
 }
 
 .hmly-phone-login button {
-  border-radius: 50rpx;
-  border: 1rpx solid #70e500;
-  background-color: #fff;
-  color: #70e500;
+	border-radius: 50rpx;
+	border: 1rpx solid #70e500;
+	background-color: #fff;
+	color: #70e500;
 }
 
 /*蒙板*/
-.hmly-cover{
-  position: fixed;
-  top: 0;
-  right: 0;
-  bottom: 0;
-  left: 0;
-  width: 100%;
-  height: 100%;
-  z-index: 9000;
-  background: rgba(0, 0, 0, 0.6);
-  opacity: 0.7;
+.hmly-cover {
+	position: fixed;
+	top: 0;
+	right: 0;
+	bottom: 0;
+	left: 0;
+	width: 100%;
+	height: 100%;
+	z-index: 9000;
+	background: rgba(0, 0, 0, 0.6);
+	opacity: 0.7;
 }
 
 
 /* bar相关 */
 .hmly-margin-top-bottom {
-  margin-top: 20rpx;
-  margin-bottom: 30rpx;
+	margin-top: 20rpx;
+	margin-bottom: 30rpx;
 }
 
 .hmly-bar-title {
-  width: 100%;
-  height: 56rpx;
-  padding: 20rpx 0rpx;
-  text-align: center;
+	width: 100%;
+	height: 56rpx;
+	padding: 20rpx 0rpx;
+	text-align: center;
 }
 
 .hmly-title-left {
-  float: left;
-  font-size: 37rpx;
-  font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
-  font-weight: 800;
-  color: #333;
+	float: left;
+	font-size: 37rpx;
+	font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
+	font-weight: 800;
+	color: #333;
 }
 
 .hmly-title-right {
-  float: right;
-  font-size: 26rpx;
-  color: #aaa;
+	float: right;
+	font-size: 26rpx;
+	color: #aaa;
 }

File diff suppressed because it is too large
+ 0 - 3
style/icons.wxss


+ 23 - 27
utils/request.js

@@ -2,36 +2,32 @@
 const baseURL = 'http://mobile.ximalaya.com/mobile/discovery/v3/recommend/hotAndGuess?code=43_310000_3100&device=android&version=5.4.45';
 
 
-function request(params = {method, url, data}) {
-  return new Promise(function (resolve, reject) {
-    let header = {    //定义请求头
-      'content-type': 'application/json',
-    };
-    wx.request({
-      url: baseURL + params.url,
-      method: params.method,
-      data: params.data ? JSON.stringify(params.data) : null,
-      header: header,
-      success(res) {
-        //请求成功
-        //判断状态码---errCode状态根据后端定义来判断
-        if (res.data.code != '-1') {  //请求成功
-          resolve(res);
-        } else {
-          //其他异常
-          reject('运行时错误,请稍后再试');
-        }
-      },
-      fail(err) {
-        //请求失败
-        reject(err)
-      }
-    })
-  })
+function request(params = { method, url, data }) {
+	return new Promise(function (resolve, reject) {
+		let header = { 'content-type': 'application/json' }; // 定义请求头
+		wx.request({
+			url: baseURL + params.url,
+			method: params.method,
+			data: params.data ? JSON.stringify(params.data) : null,
+			header: header,
+			success(res) {
+				// 判断状态码---根据后端定义来判断
+				if (res.data.code != '-1') {  // 请求成功
+					resolve(res);
+				} else {
+					reject('运行时错误,请稍后再试'); // 其他异常
+				}
+			},
+			fail(err) {
+				// 请求失败
+				reject(err)
+			}
+		})
+	})
 }
 
 
 // 向外暴露接口
 module.exports = {
-  request : request
+	request: request
 }

+ 30 - 30
utils/utils.js

@@ -8,7 +8,7 @@
  * @returns {Boolean}
  */
 function isExternal(path) {
-  return /^(https?:|mailto:|tel:)/.test(path)
+	return /^(https?:|mailto:|tel:)/.test(path)
 }
 
 /**
@@ -16,8 +16,8 @@ function isExternal(path) {
  * @returns {Boolean}
  */
 function validUsername(str) {
-  const valid_map = ['admin', 'editor']
-  return valid_map.indexOf(str.trim()) >= 0
+	const valid_map = ['admin', 'editor']
+	return valid_map.indexOf(str.trim()) >= 0
 }
 
 /**
@@ -25,8 +25,8 @@ function validUsername(str) {
  * @returns {Boolean}
  */
 function validURL(url) {
-  const reg = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/
-  return reg.test(url)
+	const reg = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/
+	return reg.test(url)
 }
 
 /**
@@ -34,8 +34,8 @@ function validURL(url) {
  * @returns {Boolean}
  */
 function validLowerCase(str) {
-  const reg = /^[a-z]+$/
-  return reg.test(str)
+	const reg = /^[a-z]+$/
+	return reg.test(str)
 }
 
 /**
@@ -43,8 +43,8 @@ function validLowerCase(str) {
  * @returns {Boolean}
  */
 function validUpperCase(str) {
-  const reg = /^[A-Z]+$/
-  return reg.test(str)
+	const reg = /^[A-Z]+$/
+	return reg.test(str)
 }
 
 /**
@@ -52,8 +52,8 @@ function validUpperCase(str) {
  * @returns {Boolean}
  */
 function validAlphabets(str) {
-  const reg = /^[A-Za-z]+$/
-  return reg.test(str)
+	const reg = /^[A-Za-z]+$/
+	return reg.test(str)
 }
 
 /**
@@ -61,8 +61,8 @@ function validAlphabets(str) {
  * @returns {Boolean}
  */
 function validEmail(email) {
-  const reg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
-  return reg.test(email)
+	const reg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
+	return reg.test(email)
 }
 
 /**
@@ -70,10 +70,10 @@ function validEmail(email) {
  * @returns {Boolean}
  */
 function isString(str) {
-  if (typeof str === 'string' || str instanceof String) {
-    return true
-  }
-  return false
+	if (typeof str === 'string' || str instanceof String) {
+		return true
+	}
+	return false
 }
 
 /**
@@ -81,21 +81,21 @@ function isString(str) {
  * @returns {Boolean}
  */
 function isArray(arg) {
-  if (typeof Array.isArray === 'undefined') {
-    return Object.prototype.toString.call(arg) === '[object Array]'
-  }
-  return Array.isArray(arg)
+	if (typeof Array.isArray === 'undefined') {
+		return Object.prototype.toString.call(arg) === '[object Array]'
+	}
+	return Array.isArray(arg)
 }
 
 // 向外暴露接口
 module.exports = {
-  isExternal,
-  validUsername,
-  validURL,
-  validLowerCase,
-  validUpperCase,
-  validAlphabets,
-  validEmail,
-  isString,
-  isArray
+	isExternal,
+	validUsername,
+	validURL,
+	validLowerCase,
+	validUpperCase,
+	validAlphabets,
+	validEmail,
+	isString,
+	isArray
 }

Some files were not shown because too many files changed in this diff