Commit 0fb67f81 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 75dfbac4
...@@ -21,9 +21,10 @@ ...@@ -21,9 +21,10 @@
{ {
"path": "pages/home", "path": "pages/home",
"style": { "style": {
"navigationBarTitleText": "河狸小故事",
"navigationStyle": "default", "navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff", "navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "#000000" "navigationBarTextStyle": "black"
} }
}, { }, {
"path": "pages/brower/brower", "path": "pages/brower/brower",
...@@ -59,21 +60,30 @@ ...@@ -59,21 +60,30 @@
"path": "book-search/book-search", "path": "book-search/book-search",
"style": { "style": {
"navigationBarTitleText": "书籍搜索", "navigationBarTitleText": "书籍搜索",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
} }
}, { }, {
"path": "book-content/book-content", "path": "book-content/book-content",
"style": { "style": {
"navigationBarTitleText": "阅读", "navigationBarTitleText": "阅读",
"enablePullDownRefresh": true "enablePullDownRefresh": true,
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
} }
}, { }, {
"path": "book-cover/book-cover", "path": "book-cover/book-cover",
"style": { "style": {
"navigationBarTitleText": "封面", "navigationBarTitleText": "封面",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
} }
}] }]
......
...@@ -38,7 +38,17 @@ ...@@ -38,7 +38,17 @@
</view> </view>
<view v-else class="body"> <view v-else class="body">
<view style="height: 95%;"> <view
:style="'display: flex;flex-direction: row;align-items: center;margin: 20rpx;padding-left: 10rpx;margin-top:'+10+'px;'">
<image class="avatar" src="@/static/logo-about.png"></image>
<view>
<view style="font-size: 34rpx;color: black;margin-left: 30rpx;">用户ID:{{localIdcode}}</view>
<view style="font-size: 26rpx;color: #b5b5b5;margin-left: 30rpx;margin-top: 10rpx;">
书中自有颜如玉,书中自有黄金屋,书中自有千钟黍</view>
</view>
</view>
<view style="height: 92%;">
<warehouse v-show="currentPage==1" ref="recommend" /> <warehouse v-show="currentPage==1" ref="recommend" />
</view> </view>
</view> </view>
...@@ -67,13 +77,14 @@ ...@@ -67,13 +77,14 @@
data() { data() {
return { return {
currentPage: 1, currentPage: 1,
localActiviteFlag: 0 localActiviteFlag: 0,
localIdcode: 0,
} }
}, },
onLoad(options) { onLoad(options) {
let index = options.index ?? '' let index = options.index ?? ''
this.localActiviteFlag = options.activiteFlag; this.localActiviteFlag = options.activiteFlag;
console.log("activiteFlag====", options.activiteFlag) this.localIdcode = options.idcode;
if (index != '' && index != undefined) { if (index != '' && index != undefined) {
this.currentPage = index this.currentPage = index
} }
...@@ -134,4 +145,13 @@ ...@@ -134,4 +145,13 @@
height: 100%; height: 100%;
background-color: whitesmoke; background-color: whitesmoke;
} }
.avatar {
background-color: #d8d8d8;
width: 100rpx;
height: 100rpx;
border-radius: 50%;
overflow: hidden;
//box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1)
}
</style> </style>
\ No newline at end of file
...@@ -90,8 +90,9 @@ ...@@ -90,8 +90,9 @@
app.globalData.userId = data.idcode; app.globalData.userId = data.idcode;
saveToken(data.token) saveToken(data.token)
setTimeout(() => { setTimeout(() => {
// redirectTo('home?activiteFlag='+data.activiteFlag); // redirectTo('home?activiteFlag='+data.activiteFlag+"&idcode="+data.idcode);
redirectTo('home?activiteFlag='+0); redirectTo('home?activiteFlag='+1+"&idcode="+data.idcode);
}, 1000); }, 1000);
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment