Skip to content

Commit

Permalink
分包加载+图片分布到icon里
Browse files Browse the repository at this point in the history
  • Loading branch information
徐钰 徐 authored and 徐钰 徐 committed Oct 31, 2018
1 parent 685b379 commit f4e810f
Show file tree
Hide file tree
Showing 111 changed files with 787 additions and 944 deletions.
9 changes: 9 additions & 0 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,14 @@
<arguments>1.0-name-matches-false-false-node_modules</arguments>
</matcher>
</filter>
<filter>
<id>1540972108778</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-node_modules</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
230 changes: 125 additions & 105 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,106 +1,126 @@
<script>
export default {
created () {
// 调用API从本地缓存中获取数据
const logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
console.log('app created and cache logs by setStorageSync')
}
}
</script>

<style>
/*通用样式*/
*{
margin:0rpx;
padding:0rpx;
}
.body {
background-color: #f2f2f2;
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
}
.box-shadow{
border-radius: 10rpx;
box-shadow: 0rpx 8rpx 36rpx rgba(204,202,202,0.3);
box-sizing: border-box;
}
.clearfix{
display: table;
clear: both;
content: "";
}
.fl{
float: left;
}
.fr{
float: right;
}
.i-icon{
display:block;
}
.span-inline{
display: inline-block;
}
.span-block{
display: block;
}
.btn{
width:180rpx;
height: 50rpx;
line-height: 50rpx;
border-radius: 10rpx;
display: inline-block;
}
.width710{
width:710rpx;
}
.big-input{
width: 460rpx;
height: 40rpx;
border-radius: 10rpx;
border:2rpx solid #cccccc;
}
/*样色样式*/
.bgff{
background-color: #ffffff;
}
.theme-color{
background-color: #fece00;
}
.color11{
color: #111111;
}
.color52{
color:#525252;
}
.color75{
color: #757575;
}
.color00{
color:#ffcc00;
}
/*部分tab 样式*/
#tab_select ul li {
height: 70rpx;
line-height: 70rpx;
float: left;
background: #FFFFFF;
text-align: center;
font-size: 28rpx;
font-weight: 400;
}
#tab_select ul li.tab_select_now {
color: #FECE00;
}
.tab_content_now {
display: block;
}
<script>
export default {
created() {
// 调用API从本地缓存中获取数据
const logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
console.log('app created and cache logs by setStorageSync')
}
}
</script>

<style>
/*通用样式*/
* {
margin: 0rpx;
padding: 0rpx;
}
.body {
background-color: #f2f2f2;
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
}
.box-shadow {
border-radius: 10rpx;
box-shadow: 0rpx 8rpx 36rpx rgba(204, 202, 202, 0.3);
box-sizing: border-box;
}
.clearfix {
display: table;
clear: both;
content: "";
}
.fl {
float: left;
}
.fr {
float: right;
}
.i-icon {
display: block;
}
.span-inline {
display: inline-block;
}
.span-block {
display: block;
}
.btn {
width: 180rpx;
height: 50rpx;
line-height: 50rpx;
border-radius: 10rpx;
display: inline-block;
}
.width710 {
width: 710rpx;
}
.big-input {
width: 460rpx;
height: 40rpx;
border-radius: 10rpx;
border: 2rpx solid #cccccc;
}
/*样色样式*/
.bgff {
background-color: #ffffff;
}
.theme-color {
background-color: #ffd000;
}
.color11 {
color: #111111;
}
.color52 {
color: #525252;
}
.color75 {
color: #757575;
}
.color00 {
color: #ffcc00;
}
/*部分tab 样式*/
#tab_select ul li {
height: 70rpx;
line-height: 70rpx;
float: left;
background: #FFFFFF;
text-align: center;
font-size: 28rpx;
font-weight: 400;
}
#tab_select ul li.tab_select_now {
color: #FECE00;
}
.tab_content_now {
display: block;
}
</style>
3 changes: 1 addition & 2 deletions src/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"pages/reserveShop/orderSelf/main",
"pages/activity/main",
"pages/activity/submitOrder/main",
"pages/order/main",
"pages/search/main",
"pages/coupon/main"
],
Expand All @@ -33,7 +32,7 @@
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fece00",
"navigationBarBackgroundColor": "#ffd000",
"navigationBarTitleText": "",
"navigationBarTextStyle": "black"
}
Expand Down
22 changes: 22 additions & 0 deletions src/commands/MySalesEChartCommand.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import Command from './Command';
export default class MySalesEchartCommand extends Command {
constructor(app) {
super(app);
}
async handle(xDate) {
let yData = null;
let [salesInfo, sellTop, merchandiseTop, statics] = await this.service('http.myStoreStatusSales').salesInfo(
xDate);
yData = statics;
console.log('XU-ZHENG', xDate, yData, this.service('mp.eCharts'));
let result = await this.service('mp.eCharts').createChart(xDate, yData, true);
console.log('MySalesEchartCommand-------MySalesEchartCommand', result);
this.store().dispatch({
type: 'model.my.sales.echart/chartDatas',
chartDatas: result
});
}
static commandName() {
return 'MYSALESECHARTS';
}
}
4 changes: 2 additions & 2 deletions src/components/CartControl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
.cart-decrease{
width:48rpx;
height:48rpx;
background:url(../../static/images/reduce-icon.png) no-repeat center;
background:url(../../static/images/icon/reduce-icon.png) no-repeat center;
background-size: contain;
position: absolute;
top: 0rpx;
Expand All @@ -69,7 +69,7 @@
.cart-add{
width:48rpx;
height:48rpx;
background:url(../../static/images/plus-icon.png) no-repeat;
background:url(../../static/images/icon/plus-icon.png) no-repeat;
background-size: contain;
position: absolute;
bottom: -1rpx;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Consignee.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
.edit-icon{
width:23rpx;
height:30rpx;
background:url(../../static/images/edit-icon.png) no-repeat;
background:url(../../static/images/icon/edit-icon.png) no-repeat;
background-size: contain;
position: absolute;
top:72rpx;
Expand Down
20 changes: 10 additions & 10 deletions src/components/FooterNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<i>扫码</i>
</li>

<li @click="jump('order')">
<li @click="jump('myorder')">
<img :src="order" />
<i>订单</i>
</li>
Expand All @@ -29,29 +29,29 @@
data() {
return {
navName: "",
index: "/static/images/index.png",
scanning: "/static/images/scanning.png",
order: "/static/images/order.png",
my: "/static/images/my.png"
index: "/static/images/icon/index.png",
scanning: "/static/images/icon/scanning.png",
order: "/static/images/icon/order.png",
my: "/static/images/icon/my.png"
};
},
methods: {
nowNav(name) {
switch(name) {
case "index":
this.index = "/static/images/index_now.png";
this.index = "/static/images/icon/index_now.png";
break;
case "scanning":
this.scanning = "/static/images/scanning_now.png";
this.scanning = "/static/images/icon/scanning_now.png";
break;
case "order":
this.order = "/static/images/order_now.png";
this.order = "/static/images/icon/order_now.png";
break;
case "my":
this.my = "/static/images/my_now.png";
this.my = "/static/images/icon/my_now.png";
break;
default:
this.index = "/static/images/index_now.png";
this.index = "/static/images/icon/index_now.png";
break;
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/MerchandiseList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
.plus-icon{
width:48rpx;
height: 48rpx;
background:url(../../static/images/plus-icon.png) no-repeat;
background:url(../../static/images/icon/plus-icon.png) no-repeat;
background-size: contain;
position: absolute;
bottom: 58rpx;
Expand Down
Loading

0 comments on commit f4e810f

Please sign in to comment.