Skip to content

Commit 27d815c

Browse files
committed
‘我的’页面横屏适配调整
1 parent 1ff3211 commit 27d815c

4 files changed

Lines changed: 55 additions & 56 deletions

File tree

config.example.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// api host,末尾不要带斜杠。后端程序是BookStack (https://github.com/truthhun/BookStack)
22
// let host = 'http://localhost:8181/bookchat'
3-
let host = 'https://www.bookstack.cn/bookchat'
4-
5-
63

74
// 默认分享的内容
85
let shareContent = 'BookChat,程序员IT互联网开源编程书籍免费阅读'
@@ -17,7 +14,7 @@ const bannerAdUnitId = ''
1714
// 程序信息,置空则不显示
1815
const info = {
1916
about: 'help/about', // "关于我们"的文档标识
20-
version: 'v1.5.1',
17+
version: 'v1.7.0',
2118
copyright: 'BookStack.CN',
2219
license: 'Apache 2.0',
2320
author: 'TruthHun',

manifest.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name" : "BookChat",
33
"appid" : "__UNI__8FAB29C",
44
"description" : "",
5-
"versionName" : "1.5.1",
6-
"versionCode" : 151,
5+
"versionName" : "1.7.0",
6+
"versionCode" : 170,
77
"transformPx" : false,
88
/* 5+App特有相关 */
99
"app-plus" : {
@@ -17,13 +17,13 @@
1717
"autoclose" : true,
1818
"delay" : 0
1919
},
20-
// 屏幕方向
21-
"screenOrientation": [
22-
"portrait-primary",
23-
"landscape-primary",
24-
"portrait-secondary",
25-
"landscape-secondary"
26-
],
20+
// 屏幕方向
21+
"screenOrientation" : [
22+
"portrait-primary",
23+
"landscape-primary",
24+
"portrait-secondary",
25+
"landscape-secondary"
26+
],
2727
/* 模块配置 */
2828
"modules" : {},
2929
/* 应用发布信息 */

pages/me/me.vue

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,20 @@
3030
</view>
3131
<view v-if="moreInfo.uid>0" class="row text-center font-lv4 text-muted reading-time">
3232
<view class="col-4">
33-
<view><text class="font-lv3">{{moreInfo.today_reading_hour}}</text> 时 <text class="font-lv3">{{moreInfo.today_reading_min}}</text>
33+
<view><text class="font-lv3">{{moreInfo.today_reading_hour}}</text> 时 <text
34+
class="font-lv3">{{moreInfo.today_reading_min}}</text>
3435
分</view>
3536
<view class="font-lv5">今日阅读</view>
3637
</view>
3738
<view class="col-4">
38-
<view><text class="font-lv3">{{moreInfo.month_reading_hour}}</text> 时 <text class="font-lv3">{{moreInfo.month_reading_min}}</text>
39+
<view><text class="font-lv3">{{moreInfo.month_reading_hour}}</text> 时 <text
40+
class="font-lv3">{{moreInfo.month_reading_min}}</text>
3941
分</view>
4042
<view class="font-lv5">本月阅读</view>
4143
</view>
4244
<view class="col-4">
43-
<view><text class="font-lv3">{{moreInfo.total_reading_hour}}</text> 时 <text class="font-lv3">{{moreInfo.total_reading_min}}</text>
45+
<view><text class="font-lv3">{{moreInfo.total_reading_hour}}</text> 时 <text
46+
class="font-lv3">{{moreInfo.total_reading_min}}</text>
4447
分</view>
4548
<view class="font-lv5">累计阅读</view>
4649
</view>
@@ -59,7 +62,7 @@
5962

6063
</view>
6164
<view class='base-padding row base-info font-lv2'>
62-
65+
6366
<navigator url='/pages/search/search' class='col-12'>
6467
<image class="me-icon" src='../../static/images/search.png'></image>
6568
<text>书籍搜索</text>
@@ -207,7 +210,7 @@
207210
util.request(config.api.logout) // 只需调用,不需要处理返回结果
208211
util.clearUser()
209212
util.toastSuccess('退出成功')
210-
that.initUser()
213+
that.initUser()
211214
util.setSignedAt(0)
212215
let sysInfo = util.getSysInfo()
213216
sysInfo.bookshelfChanged = true
@@ -223,21 +226,21 @@
223226
url: '/pages/login/login?redirect=' + this.redirect
224227
})
225228
}
226-
},
227-
sign: function(){
228-
let that = this
229-
util.request(config.api.userSign, {}, 'POST').then(function(res){
230-
util.setSignedAt(res.data.signed_at)
231-
uni.showToast({
232-
title: res.data.message,
233-
duration: 5000,
234-
icon: 'none',
235-
})
236-
that.isSignedToday = util.isSignedToday()
237-
}).catch(function(e){
238-
console.log(e)
239-
util.toastError(e.data.message || e.errMsg)
240-
})
229+
},
230+
sign: function() {
231+
let that = this
232+
util.request(config.api.userSign, {}, 'POST').then(function(res) {
233+
util.setSignedAt(res.data.signed_at)
234+
uni.showToast({
235+
title: res.data.message,
236+
duration: 5000,
237+
icon: 'none',
238+
})
239+
that.isSignedToday = util.isSignedToday()
240+
}).catch(function(e) {
241+
console.log(e)
242+
util.toastError(e.data.message || e.errMsg)
243+
})
241244
},
242245
getUserMoreInfo: function() {
243246
let that = this
@@ -283,12 +286,12 @@
283286
284287
.row {
285288
background-color: #fff;
286-
margin-bottom: 10upx;
287-
padding: 30upx;
289+
margin-bottom: 5px;
290+
padding: 15px;
288291
}
289292
290293
.row:last-of-type {
291-
margin-bottom: 0upx;
294+
margin-bottom: 0;
292295
}
293296
294297
.user {
@@ -316,20 +319,20 @@
316319
}
317320
318321
.username {
319-
margin: 15upx auto;
322+
margin: 15px auto;
320323
}
321324
322325
.user image {
323-
width: 180upx;
324-
height: 180upx;
325-
border-radius: 90upx;
326+
width: 90px;
327+
height: 90px;
328+
border-radius: 45px;
326329
border: 1px solid #ddd;
327330
margin: 0 auto;
328331
display: block;
329332
}
330333
331334
.base-info image {
332-
margin-right: 30upx !important;
335+
margin-right: 15px !important;
333336
}
334337
335338
.base-info image.pull-right {
@@ -344,8 +347,8 @@
344347
345348
.base-info .col-12 {
346349
border-bottom: 1px solid #f6f6f6;
347-
padding-bottom: 30upx;
348-
padding-top: 30upx;
350+
padding-bottom: 15px;
351+
padding-top: 15px;
349352
color: #666;
350353
}
351354
@@ -360,7 +363,7 @@
360363
}
361364
362365
.user-func {
363-
line-height: 40upx;
366+
line-height: 20px;
364367
border: 1px solid #000000;
365368
}
366369
@@ -372,11 +375,11 @@
372375
}
373376
374377
.user-func .color-red {
375-
margin-right: 8upx;
378+
margin-right: 4px;
376379
}
377380
378381
.reading-time text {
379-
margin: auto 8upx;
382+
margin: auto 4px;
380383
color: red;
381384
}
382385
@@ -388,13 +391,13 @@
388391
.reading-time .col-4:nth-child(2),
389392
.reading-time .col-4:nth-child(3) {
390393
border-bottom: 1px solid #f6f6f6;
391-
padding-bottom: 16upx;
394+
padding-bottom: 8px;
392395
}
393396
394397
.reading-time .col-4:nth-child(4),
395398
.reading-time .col-4:nth-child(5),
396399
.reading-time .col-4:nth-child(6) {
397-
padding-top: 16upx;
400+
padding-top: 8px;
398401
}
399402
400403
.reading-time .col-4:nth-child(2),
@@ -404,17 +407,17 @@
404407
}
405408
406409
image.me-icon {
407-
width: 40upx;
408-
height: 40upx;
410+
width: 20px;
411+
height: 20px;
409412
vertical-align: middle;
410-
margin-right: 6upx;
413+
margin-right: 3px;
411414
position: relative;
412-
top: -4upx;
415+
top: -2px;
413416
}
414417
415418
.signed image {
416-
width: 25upx;
417-
height: 25upx;
419+
width: 13px;
420+
height: 13px;
418421
}
419422
420423
.signed.text-muted {
@@ -431,7 +434,6 @@
431434
}
432435
433436
@media (min-width: 768px) {
434-
435437
.base-info image,
436438
image.me-icon {
437439
max-width: 20px;

pages/read/read.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<view class='title font-lv1 text-center'>{{article.title}}</view>
77
<block v-for="(node, idx) of nodes" :key='idx'>
88
<block v-if="node.type == 'img'">
9-
<image @click="imgPreview" :src="node['src']" :data-src="node['src']" mode="widthFix"></image>
9+
<image @click="imgPreview" :src="node['src']" :data-src="node['src']" mode="aspectFit"></image>
1010
</block>
1111
<block v-else-if="node.type == 'audio'">
1212
<!-- #ifdef MP-WEIXIN -->

0 commit comments

Comments
 (0)