-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 07f82ef
Showing
65 changed files
with
6,845 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
//app.js | ||
App({ | ||
onLaunch: function() { | ||
//调用API从本地缓存中获取数据 | ||
var logs = wx.getStorageSync('logs') || [] | ||
logs.unshift(Date.now()) | ||
wx.setStorageSync('logs', logs) | ||
}, | ||
|
||
getUserInfo: function(cb) { | ||
var that = this | ||
if (this.globalData.userInfo) { | ||
typeof cb == "function" && cb(this.globalData.userInfo) | ||
} else { | ||
//调用登录接口 | ||
wx.getUserInfo({ | ||
withCredentials: false, | ||
success: function(res) { | ||
that.globalData.userInfo = res.userInfo | ||
typeof cb == "function" && cb(that.globalData.userInfo) | ||
} | ||
}) | ||
} | ||
}, | ||
|
||
globalData: { | ||
userInfo: null | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"pages": [ | ||
"pages/index/index", | ||
"pages/member/index/index", | ||
"pages/goods/list/list", | ||
"pages/goods/detail/detail", | ||
"pages/catalog/catalog", | ||
"pages/auth/login/login", | ||
"pages/shopping/cart/cart" | ||
], | ||
"window": { | ||
"backgroundTextStyle": "light", | ||
"navigationBarBackgroundColor": "#fafafa", | ||
"navigationBarTitleText": "ecshop小程序商城", | ||
"navigationBarTextStyle": "black" | ||
}, | ||
"tabBar": { | ||
"color": "#2c2c2c", | ||
"selectedColor": "#d81e06", | ||
"backgroundColor": "#fafafa", | ||
"borderStyle": "white", | ||
"list": [ | ||
{ | ||
"pagePath": "pages/index/index", | ||
"text": "首页", | ||
"iconPath": "images/icon_home.png", | ||
"selectedIconPath": "images/icon_home_active.png" | ||
}, | ||
{ | ||
"pagePath": "pages/catalog/catalog", | ||
"text": "分类", | ||
"iconPath": "images/icon_catalog.png", | ||
"selectedIconPath": "images/icon_catalog_active.png" | ||
}, | ||
{ | ||
"pagePath": "pages/shopping/cart/cart", | ||
"text": "购物车", | ||
"iconPath": "images/icon_cart.png", | ||
"selectedIconPath": "images/icon_cart_active.png" | ||
}, | ||
{ | ||
"pagePath": "pages/member/index/index", | ||
"text": "我的", | ||
"iconPath": "images/icon_member.png", | ||
"selectedIconPath": "images/icon_member_active.png" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/**app.wxss**/ | ||
page{ | ||
background: #f4f4f4; | ||
color: #333; | ||
font-size: 14px; | ||
min-height: 100%; | ||
} | ||
|
||
view, text, image, navigator, input, button{ | ||
box-sizing: border-box; | ||
} | ||
|
||
.container { | ||
min-height: 100%; | ||
box-sizing: border-box; | ||
background: #f4f4f4; | ||
} | ||
|
||
.list-empty{ | ||
height: 100%; | ||
width: 100%; | ||
display: flex; | ||
justify-content: center; | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
|
||
.list-empty .icon{ | ||
height: 200rpx; | ||
width: 200rpx; | ||
} | ||
|
||
.list-empty .msg{ | ||
line-height: 40rpx; | ||
font-size: 12px; | ||
color: #999; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.