Commit 772c36dc authored by jyx's avatar jyx

代码优化

parent 64d49eb9
......@@ -4,7 +4,8 @@ export default {
share: {
title: '更多小说,等你来看',
imageUrl: 'https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/book_bg_splash.png',
path: '/pages/loading?shareId='+getApp().globalData.userId
// path: '/pages/loading?shareId='+getApp().globalData.userId
path: '/pages/loading?shareId='
}
}
},
......
......@@ -71,18 +71,18 @@
},
onShow() {
try {
// 在子组件重写show()代替onShow()
if (this.currentPage == 0) {
this.$refs.index.show();
} else if (this.currentPage == 1) {
this.$refs.recommend.show();
} else if (this.currentPage == 2) {
this.$refs.user.show();
}
} catch (e) {
// try {
// // 在子组件重写show()代替onShow()
// if (this.currentPage == 0) {
// this.$refs.index.show();
// } else if (this.currentPage == 1) {
// this.$refs.recommend.show();
// } else if (this.currentPage == 2) {
// this.$refs.user.show();
// }
// } catch (e) {
}
// }
},
mounted() {
// 渲染完成 初始化首页数据
......@@ -92,7 +92,7 @@
tabChange(index) {
if (this.currentPage == index) return
this.currentPage = index;
this.loadComponentData();
// this.loadComponentData();
},
loadComponentData() {
if (this.currentPage == 0) {
......
......@@ -70,14 +70,14 @@
}
// app.globalData.userId = data.idcode;
// uni.setStorage({
// key: 'token',
// data: 'D6E76AC8E89ABE548B56568B8814D578D6980EAB68926EB1E7C07BF9E96A316F5F433703067DF5142735505C42F58997'
// });
// setTimeout(() => {
// redirectTo('home');
// }, 1000);
// return
uni.setStorage({
key: 'token',
data: 'D6E76AC8E89ABE548B56568B8814D578D6980EAB68926EB1E7C07BF9E96A316F5F433703067DF5142735505C42F58997'
});
setTimeout(() => {
redirectTo('home');
}, 1000);
return
tt.login({
force: true,
......
@font-face {
font-family: "readiconfont";
/* Project id 4264833 */
src: url('/static/fonts/readiconfont.ttf') format('truetype');
}
.readiconfont {
font-family: "readiconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-vip:before {
content: "\e60d";
}
.icon-share:before {
content: "\e60e";
}
.icon-setting:before {
content: "\e64a";
}
.icon-undiss:before {
content: "\e686";
}
.icon-unlike:before {
content: "\ec7f";
}
.icon-like:before {
content: "\ec8c";
}
.icon-uncollection:before {
content: "\e602";
}
.icon-collection:before {
content: "\e7ef";
}
.icon-diss:before {
content: "\e68f";
}
.icon-love:before {
content: "\e638";
}
.icon-author:before {
content: "\e668";
}
.icon-server:before {
content: "\e6aa";
}
.icon-read:before {
content: "\e633";
}
.icon-logout:before {
content: "\e677";
}
.icon-bookshelf:before {
content: "\e604";
}
.icon-person:before {
content: "\e605";
}
.icon-cloud:before {
content: "\e606";
}
\ No newline at end of file
export const PAKEAGE_NAME = 'com.duben.dybookhm'
// export const PAKEAGE_NAME = 'com.test.test'
export function trim(str) {
return str ? str.replace(/(^\s*)|(\s*$)/g, "") : ''
......
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