diff --git a/.gitignore b/.gitignore
index 94aec66..1ce3551 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,4 +5,5 @@ unpackage/release/*
.DS_Store
*/.DS_Store
config.js
-.idea
\ No newline at end of file
+.idea
+.hbuilderx
\ No newline at end of file
diff --git a/components/scrollBook.vue b/components/scrollBook.vue
index 76b0858..9e75984 100644
--- a/components/scrollBook.vue
+++ b/components/scrollBook.vue
@@ -57,5 +57,13 @@
.ellipsis-2row{
line-height: 200%;
}
+ .hor navigator {
+ width: 170px;
+ margin: 3px 15px;
+ }
+ .hor navigator image {
+ width: 170px;
+ height: 223.4px;
+ }
}
diff --git a/manifest.json b/manifest.json
index 87b4363..20a1f42 100644
--- a/manifest.json
+++ b/manifest.json
@@ -17,6 +17,13 @@
"autoclose" : true,
"delay" : 0
},
+ // 屏幕方向
+ "screenOrientation": [
+ "portrait-primary",
+ "landscape-primary",
+ "portrait-secondary",
+ "landscape-secondary"
+ ],
/* 模块配置 */
"modules" : {},
/* 应用发布信息 */
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 7f82010..aa96385 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -6,10 +6,11 @@
-
+
-
+
@@ -40,7 +41,8 @@
{{category.title}}
- 更多
+ 更多
@@ -112,13 +114,23 @@
if (this.showHeaderSearch == true) this.showHeaderSearch = false
}
},
+ onResize(e) {
+ let that = this
+ let info = uni.getSystemInfoSync()
+ let oriInfo = util.getSysInfo()
+ let newInfo = {...oriInfo, ...info}
+ util.setSysInfo(newInfo)
+ // 重新计算横幅的宽高
+ that.bannerWidth = parseFloat(that.bannerWidth.split("px")[0])*((e.size.windowWidth -60 )/ e.size.windowHeight) + 'px'
+ that.bannerHeight = parseFloat(that.bannerHeight.split("px")[0])*((e.size.windowWidth -60 ) / e.size.windowHeight) + 'px'
+ },
methods: {
- adLoad() {
- this.adLoaded = true
- },
- adClose() {
- this.adClosed = true
- },
+ adLoad() {
+ this.adLoaded = true
+ },
+ adClose() {
+ this.adClosed = true
+ },
loadData() {
let that = this
let cids = []
@@ -163,7 +175,8 @@
that.bannerWidth = width / info.pixelRatio + "px"
that.bannerHeight = height / info.pixelRatio + "px"
}
- if (resRecommendBooks.data && resRecommendBooks.data.books) recommendBooks = resRecommendBooks.data.books
+ if (resRecommendBooks.data && resRecommendBooks.data.books) recommendBooks =
+ resRecommendBooks.data.books
if (resBookLists.data && resBookLists.data.books) {
bookLists = resBookLists.data.books
categories = categories.map(function(category) {