Skip to content

Commit

Permalink
fixed css
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcaufy committed Dec 4, 2016
1 parent 8221389 commit 44a3cc8
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 27 deletions.
13 changes: 11 additions & 2 deletions src/common/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ export default {
});
},


// select * from history h
// left join contact c
// on (h.from == c.id or h.to == c.id)
// where h.from = :id or h.to = :id or :id = '';
// order by h.time asc;
getHistory (id) {
let history = wx.getStorageSync('_wechat_history_') || m_history;
return new Promise((resolve, reject) => {
Expand All @@ -58,7 +62,12 @@ export default {
});
});
},

// select *, (select msg from history h2 where h2.from = c.id or h2.to = c.id order by time desc limit 1) as lastmsg
// from history h
// left join contact c
// on (h.from == c.id or h.to == c.id)
// where h.from = :id or h.to = :id or :id = '';
// order by h.time desc;
getMessageList () {
let history = wx.getStorageSync('_wechat_history_') || m_history;
return new Promise((resolve, reject) => {
Expand Down
9 changes: 2 additions & 7 deletions src/components/contact.wpy
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@
font-size: 32rpx;
padding: 10rpx 0;
}
.lastmsg {
color: $fontcolor;
font-size: 26rpx;
padding: 10rpx 0;
}
}
}
}
Expand Down Expand Up @@ -69,7 +64,7 @@
.user_name {
margin-left: 90rpx;
margin-top: 10rpx;
font-size: 32rpx;
font-size: 33rpx;
line-height: 70rpx;
}
}
Expand All @@ -81,7 +76,7 @@
text-align: center;
line-height: 140rpx;
color: $fontcolor;
font-size: 32rpx;
font-size: 33rpx;
}
}
}
Expand Down
5 changes: 2 additions & 3 deletions src/components/discovery.wpy
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<style type="sass">
$fontcolor: #7b7b7b;
$activecolor: #13b113;
$bgcolor: #f0eff5;
.discovery {
background-color: #f0eff5;
background-color: $bgcolor;
height: 100%;
padding-top: 0rpx;
}
Expand Down
11 changes: 5 additions & 6 deletions src/components/list.wpy
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
<style type="sass">
$fontcolor: #7b7b7b;
$activecolor: #13b113;
$border: 1px solid #eeeeee;
.list {
margin-top: 30rpx;
margin-top: 40rpx;
background-color: #fff;
border-bottom: 1px solid #eeeeee;
border-bottom: $border;
.item {
height: 100rpx;
position: relative;
box-sizing: border-box;
padding: 20rpx;
border-bottom: 1px solid #eeeeee;
border-bottom: $border;
.icon {
width: 60rpx;
height: 60rpx;
Expand All @@ -27,7 +26,7 @@
.title {
padding: 18rpx 0 0 100rpx;
display: block;
font-size: 30rpx;
font-size: 33rpx;
}
}
}
Expand Down
11 changes: 5 additions & 6 deletions src/components/me.wpy
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
<style type="sass">
$fontcolor: #7b7b7b;
$activecolor: #13b113;
$bgcolor: #f0eff5;
.me {
background-color: #f0eff5;
background-color: $bgcolor;
height: 100%;
padding-top: 30rpx;
padding-top: 40rpx;
.item {
background-color: #fff;
height: 100rpx;
position: relative;
box-sizing: border-box;
padding: 20rpx;
padding: 15rpx 25rpx;
border-bottom: 1px solid #eeeeee;
&.info {
height: 176rpx;
height: 160rpx;
position: relative;
.me_icon {
width: 130rpx;
Expand Down
2 changes: 1 addition & 1 deletion src/components/message.wpy
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
margin-left: 120rpx;
.name {
color: #000;
font-size: 30rpx;
font-size: 33rpx;
padding: 10rpx 0;
}
.lastmsg {
Expand Down
2 changes: 1 addition & 1 deletion src/components/tab.wpy
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
width: 100%;
border-top: 1px solid #dad9d6;
background-color: #f7f7f7;
font-size: 22rpx;
font-size: 24rpx;
.tab_item {
&.active {
color: $activecolor;
Expand Down
35 changes: 34 additions & 1 deletion wepy.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

let prod = process.env.NODE_ENV === 'production';

module.exports = {
"wpyExt": ".wpy",
"sass": {
Expand All @@ -17,4 +20,34 @@ module.exports = {
"transform-runtime"
]
}
};
};


if (prod || true) {
// 压缩sass
module.exports['sass'] = {"outputStyle": "compressed"};

// 压缩less
module.exports['less'] = {"compress": true};

// 压缩js
module.exports.plugins = {
'UglifyJsPlugin': {
filter: /\.js$/,
config: {
compress: {
warnings: false
}
}
},
'TestPlugin': {
filter: /\.wxss$/,
config: {
}
},
'ImageMinPlugin': {
filter: /\.(png|jpg|jpeg)$/,
config: {}
}
};
}

0 comments on commit 44a3cc8

Please sign in to comment.