├── pages
├── footballsns
│ ├── exit
│ │ ├── exit.wxss
│ │ ├── exit.wxml
│ │ ├── exit.json
│ │ └── exit.js
│ ├── my
│ │ ├── my.json
│ │ ├── my.wxml
│ │ ├── my.wxss
│ │ ├── my.scss
│ │ └── my.js
│ ├── media
│ │ ├── media.json
│ │ ├── media.scss
│ │ ├── media.wxss
│ │ ├── media.wxml
│ │ └── media.js
│ ├── detail
│ │ ├── detail.json
│ │ ├── detail.js
│ │ ├── detail.wxss
│ │ └── detail.wxml
│ ├── search
│ │ ├── search.json
│ │ ├── search.scss
│ │ ├── search.wxss
│ │ ├── search.wxml
│ │ └── search.js
│ └── main
│ │ ├── main.json
│ │ ├── main.wxss
│ │ ├── main.wxml
│ │ └── main.js
└── index
│ ├── index.wxss
│ ├── index.wxml
│ └── index.js
├── v1.0
├── pages
│ ├── footballsns
│ │ ├── my
│ │ │ ├── my.wxss
│ │ │ ├── my.wxml
│ │ │ ├── my.json
│ │ │ └── my.js
│ │ ├── exit
│ │ │ ├── exit.wxss
│ │ │ ├── exit.wxml
│ │ │ ├── exit.json
│ │ │ └── exit.js
│ │ ├── photo
│ │ │ ├── photo.wxss
│ │ │ ├── photo.wxml
│ │ │ ├── photo.json
│ │ │ └── photo.js
│ │ ├── search
│ │ │ ├── search.wxss
│ │ │ ├── search.wxml
│ │ │ ├── search.json
│ │ │ └── search.js
│ │ ├── images
│ │ │ ├── img1.jpg
│ │ │ ├── img2.png
│ │ │ ├── img3.jpg
│ │ │ ├── img4.jpg
│ │ │ ├── .DS_Store
│ │ │ └── iconfont
│ │ │ │ ├── .DS_Store
│ │ │ │ ├── iconfont.ttf
│ │ │ │ ├── iconfont.woff
│ │ │ │ ├── iconfont-menu.ttf
│ │ │ │ └── iconfont-menu.woff
│ │ ├── app.json
│ │ ├── app.js
│ │ ├── app.wxml
│ │ └── app.wxss
│ └── index
│ │ ├── index.wxss
│ │ ├── index.wxml
│ │ └── index.js
├── .DS_Store
├── images
│ ├── my.png
│ ├── exit.png
│ ├── home.png
│ ├── .DS_Store
│ ├── camera.png
│ ├── search.png
│ ├── my_light.png
│ ├── camera_light.png
│ ├── exit_light.png
│ ├── home_light.png
│ └── search_light.png
├── app.wxss
├── utils
│ └── util.js
├── mock
│ └── list.json
├── app.js
└── app.json
├── libs
└── test.js
├── .DS_Store
├── images
├── my.png
├── exit.png
├── home.png
├── img1.jpg
├── img2.png
├── img3.jpg
├── img4.jpg
├── .DS_Store
├── camera.png
├── media.png
├── search.png
├── football.jpg
├── my_light.png
├── camera_light.png
├── exit_light.png
├── home_light.png
├── media_light.png
└── search_light.png
├── media
├── now.mp3
├── .DS_Store
└── xuwei.webp
├── tpls
├── reminders.wxml
├── actionsheet.wxml
└── signin.wxml
├── mock
├── more.json
├── refresh.json
└── list.json
├── README.md
├── app.wxss
├── package.json
├── utils
└── util.js
├── gulpfile.js
├── .gitignore
├── app.js
└── app.json
/pages/footballsns/exit/exit.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/my/my.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/exit/exit.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/libs/test.js:
--------------------------------------------------------------------------------
1 | module.exports = "abc";
2 |
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/photo/photo.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/search/search.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/.DS_Store
--------------------------------------------------------------------------------
/images/my.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/images/my.png
--------------------------------------------------------------------------------
/media/now.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/media/now.mp3
--------------------------------------------------------------------------------
/pages/footballsns/exit/exit.wxml:
--------------------------------------------------------------------------------
1 |
2 | exit...
3 |
4 |
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/my/my.wxml:
--------------------------------------------------------------------------------
1 |
2 | my...
3 |
4 |
--------------------------------------------------------------------------------
/images/exit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/images/exit.png
--------------------------------------------------------------------------------
/images/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/images/home.png
--------------------------------------------------------------------------------
/images/img1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/images/img1.jpg
--------------------------------------------------------------------------------
/images/img2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/images/img2.png
--------------------------------------------------------------------------------
/images/img3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/images/img3.jpg
--------------------------------------------------------------------------------
/images/img4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/images/img4.jpg
--------------------------------------------------------------------------------
/media/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/media/.DS_Store
--------------------------------------------------------------------------------
/v1.0/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/v1.0/.DS_Store
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/exit/exit.wxml:
--------------------------------------------------------------------------------
1 |
2 | exit...
3 |
4 |
--------------------------------------------------------------------------------
/images/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/images/.DS_Store
--------------------------------------------------------------------------------
/images/camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/images/camera.png
--------------------------------------------------------------------------------
/images/media.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/images/media.png
--------------------------------------------------------------------------------
/images/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/images/search.png
--------------------------------------------------------------------------------
/media/xuwei.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/media/xuwei.webp
--------------------------------------------------------------------------------
/v1.0/images/my.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/v1.0/images/my.png
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/search/search.wxml:
--------------------------------------------------------------------------------
1 |
2 | search...
3 |
4 |
--------------------------------------------------------------------------------
/images/football.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/images/football.jpg
--------------------------------------------------------------------------------
/images/my_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/images/my_light.png
--------------------------------------------------------------------------------
/v1.0/images/exit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/v1.0/images/exit.png
--------------------------------------------------------------------------------
/v1.0/images/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/v1.0/images/home.png
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/photo/photo.wxml:
--------------------------------------------------------------------------------
1 |
2 | take a photo...
3 |
4 |
--------------------------------------------------------------------------------
/images/camera_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/images/camera_light.png
--------------------------------------------------------------------------------
/images/exit_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/images/exit_light.png
--------------------------------------------------------------------------------
/images/home_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/images/home_light.png
--------------------------------------------------------------------------------
/images/media_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/images/media_light.png
--------------------------------------------------------------------------------
/images/search_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/images/search_light.png
--------------------------------------------------------------------------------
/v1.0/images/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/v1.0/images/.DS_Store
--------------------------------------------------------------------------------
/v1.0/images/camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/v1.0/images/camera.png
--------------------------------------------------------------------------------
/v1.0/images/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/v1.0/images/search.png
--------------------------------------------------------------------------------
/v1.0/images/my_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/v1.0/images/my_light.png
--------------------------------------------------------------------------------
/v1.0/images/camera_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/v1.0/images/camera_light.png
--------------------------------------------------------------------------------
/v1.0/images/exit_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/v1.0/images/exit_light.png
--------------------------------------------------------------------------------
/v1.0/images/home_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/v1.0/images/home_light.png
--------------------------------------------------------------------------------
/v1.0/images/search_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/v1.0/images/search_light.png
--------------------------------------------------------------------------------
/pages/footballsns/my/my.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "我的",
3 | "navigationBarBackgroundColor": "#0dc441"
4 | }
5 |
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/images/img1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/v1.0/pages/footballsns/images/img1.jpg
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/images/img2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/v1.0/pages/footballsns/images/img2.png
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/images/img3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/v1.0/pages/footballsns/images/img3.jpg
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/images/img4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/v1.0/pages/footballsns/images/img4.jpg
--------------------------------------------------------------------------------
/pages/footballsns/exit/exit.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "退出",
3 | "navigationBarBackgroundColor": "#0dc441"
4 | }
5 |
--------------------------------------------------------------------------------
/pages/footballsns/media/media.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "多媒体",
3 | "navigationBarBackgroundColor": "#0dc441"
4 | }
5 |
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/images/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/v1.0/pages/footballsns/images/.DS_Store
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/my/my.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "我的",
3 | "navigationBarBackgroundColor": "#0dc441"
4 | }
5 |
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/search/search.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "发现",
3 | "navigationBarBackgroundColor": "#0dc441"
4 | }
--------------------------------------------------------------------------------
/pages/footballsns/detail/detail.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "详情页",
3 | "navigationBarBackgroundColor": "#0dc441"
4 | }
5 |
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/exit/exit.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "退出",
3 | "navigationBarBackgroundColor": "#0dc441"
4 | }
5 |
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/photo/photo.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "拍照",
3 | "navigationBarBackgroundColor": "#0dc441"
4 | }
5 |
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/images/iconfont/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/v1.0/pages/footballsns/images/iconfont/.DS_Store
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/images/iconfont/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/v1.0/pages/footballsns/images/iconfont/iconfont.ttf
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/images/iconfont/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/v1.0/pages/footballsns/images/iconfont/iconfont.woff
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/my/my.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | current: 0
4 | },
5 | onLoad: function () {
6 | // console.log('loaded.');
7 | }
8 | });
9 |
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/exit/exit.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | current: 0
4 | },
5 | onLoad: function () {
6 | // console.log('loaded.');
7 | }
8 | });
9 |
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/images/iconfont/iconfont-menu.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/v1.0/pages/footballsns/images/iconfont/iconfont-menu.ttf
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/images/iconfont/iconfont-menu.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lurongtao/first-weapp/HEAD/v1.0/pages/footballsns/images/iconfont/iconfont-menu.woff
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/photo/photo.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | current: 0
4 | },
5 | onLoad: function () {
6 | // console.log('loaded.');
7 | }
8 | });
9 |
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/search/search.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | current: 0
4 | },
5 | onLoad: function () {
6 | // console.log('loaded.');
7 | }
8 | });
9 |
--------------------------------------------------------------------------------
/pages/footballsns/search/search.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarBackgroundColor": "#0dc441",
3 | "navigationBarTitleText": "发现",
4 | "navigationBarTextStyle": "white"
5 | }
6 |
--------------------------------------------------------------------------------
/tpls/reminders.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 催办成功~
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/pages/footballsns/exit/exit.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | current: 0
4 | },
5 | onLoad: function () {
6 | wx.clearStorageSync();
7 | wx.navigateBack();
8 | }
9 | });
10 |
--------------------------------------------------------------------------------
/pages/footballsns/main/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarBackgroundColor": "#0dc441",
3 | "navigationBarTitleText": "足球圈",
4 | "navigationBarTextStyle": "white",
5 | "enablePullDownRefresh": true
6 | }
7 |
--------------------------------------------------------------------------------
/mock/more.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "img": "/images/img1.jpg",
4 | "title": "more西甲-巴萨3-4客负 皇马1-1丢榜首"
5 | },
6 | {
7 | "img": "/images/img2.png",
8 | "title": "more英超-曼联憾平 曼城0-2热刺 瓜帅首败"
9 | }
10 | ]
11 |
--------------------------------------------------------------------------------
/mock/refresh.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "img": "/images/img1.jpg",
4 | "title": "refresh西甲-巴萨3-4客负 皇马1-1丢榜首"
5 | },
6 | {
7 | "img": "/images/img2.png",
8 | "title": "refresh英超-曼联憾平 曼城0-2热刺 瓜帅首败"
9 | }
10 | ]
11 |
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "backgroundTextStyle": "light",
3 | "navigationBarBackgroundColor": "#0dc441",
4 | "navigationBarTitleText": "足球圈",
5 | "navigationBarTextStyle": "white",
6 | "enablePullDownRefresh": true
7 | }
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # weapp
2 | 微信小程序案例
3 | # 功能
4 | ### 基本功能
5 | ### 上拉刷新与下拉加载更多
6 | ### swiper
7 | ### scroll
8 | ### progress
9 | ### audio
10 | ### loading & toast & modal & actionsheet
11 | ### template
12 | ### 数据渲染
13 | ### storage
14 | ### 详情页
15 |
--------------------------------------------------------------------------------
/v1.0/app.wxss:
--------------------------------------------------------------------------------
1 | /**app.wxss**/
2 | .container {
3 | height: 100%;
4 | display: flex;
5 | flex-direction: column;
6 | align-items: center;
7 | justify-content: space-between;
8 | padding: 200rpx 0;
9 | box-sizing: border-box;
10 | }
11 |
--------------------------------------------------------------------------------
/pages/footballsns/search/search.scss:
--------------------------------------------------------------------------------
1 | .search-container {
2 | box-sizing: border-box;
3 | padding: 10px;
4 | .pos {
5 | box-sizing: border-box;
6 | padding: 10px;
7 | }
8 | .device {
9 | box-sizing: border-box;
10 | padding: 10px;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/app.wxss:
--------------------------------------------------------------------------------
1 | /**app.wxss**/
2 | .container {
3 | height: 100%;
4 | display: flex;
5 | flex-direction: column;
6 | align-items: center;
7 | justify-content: space-between;
8 | padding: 200rpx 0;
9 | box-sizing: border-box;
10 | }
11 |
12 | page {
13 | height: 100%;
14 | }
15 |
--------------------------------------------------------------------------------
/pages/footballsns/search/search.wxss:
--------------------------------------------------------------------------------
1 | .search-container {
2 | box-sizing: border-box;
3 | padding: 10px; }
4 | .search-container .pos {
5 | box-sizing: border-box;
6 | padding: 10px; }
7 | .search-container .device {
8 | box-sizing: border-box;
9 | padding: 10px; }
10 |
--------------------------------------------------------------------------------
/pages/footballsns/detail/detail.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | current: 0,
4 | id: 0
5 | },
6 | onLoad: function (params) {
7 | this.setData({
8 | id: params.id
9 | })
10 | },
11 | onReady: function () {
12 | console.log(this.data.id);
13 | wx.setNavigationBarTitle({
14 | title: '西甲-巴萨3-4客负 皇马1-1丢榜首'
15 | });
16 | }
17 | });
18 |
--------------------------------------------------------------------------------
/pages/index/index.wxss:
--------------------------------------------------------------------------------
1 | /**index.wxss**/
2 | .userinfo {
3 | display: flex;
4 | flex-direction: column;
5 | align-items: center;
6 | }
7 |
8 | .userinfo-avatar {
9 | width: 128rpx;
10 | height: 128rpx;
11 | margin: 20rpx;
12 | border-radius: 50%;
13 | }
14 |
15 | .userinfo-nickname {
16 | color: #aaa;
17 | }
18 |
19 | .usermotto {
20 | margin-top: 200px;
21 | }
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "weapp",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "app.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "devDependencies": {
12 | "gulp": "^3.9.1",
13 | "gulp-rename": "^1.2.2",
14 | "gulp-sass": "^2.3.2"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/pages/footballsns/detail/detail.wxss:
--------------------------------------------------------------------------------
1 | view {
2 | display: flex;
3 | justify-content: center;
4 | box-sizing: border-box;
5 | padding: 10px;
6 | }
7 |
8 | view .title {
9 | width: 100%;
10 | font-size: 18px;
11 | text-align: center;
12 | margin-bottom: 10px;
13 | }
14 |
15 | view image {
16 | width: 100%;
17 | }
18 |
19 | view .body {
20 | font-size: 12px;
21 | }
22 |
--------------------------------------------------------------------------------
/tpls/actionsheet.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{item}}
5 |
6 | 取消
7 |
8 |
9 |
--------------------------------------------------------------------------------
/v1.0/pages/index/index.wxss:
--------------------------------------------------------------------------------
1 | /**index.wxss**/
2 | .userinfo {
3 | display: flex;
4 | flex-direction: column;
5 | align-items: center;
6 | }
7 |
8 | .userinfo-avatar {
9 | width: 128rpx;
10 | height: 128rpx;
11 | margin: 20rpx;
12 | border-radius: 50%;
13 | }
14 |
15 | .userinfo-nickname {
16 | color: #aaa;
17 | }
18 |
19 | .usermotto {
20 | margin-top: 200px;
21 | }
22 |
23 | .footballsns {
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/pages/footballsns/my/my.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/pages/footballsns/my/my.wxss:
--------------------------------------------------------------------------------
1 | .section label {
2 | display: flex;
3 | align-items: center;
4 | justify-content: center;
5 | margin-bottom: 3px; }
6 | .section label text {
7 | width: 100px;
8 | text-align: right; }
9 | .section label input {
10 | flex: 1;
11 | border: solid 1px #ccc;
12 | border-radius: 3px;
13 | padding: 0 2px; }
14 |
15 | .ctrl {
16 | box-sizing: border-box;
17 | padding: 10px; }
18 |
--------------------------------------------------------------------------------
/pages/footballsns/my/my.scss:
--------------------------------------------------------------------------------
1 | .section {
2 | label {
3 | display: flex;
4 | align-items: center;
5 | justify-content: center;
6 | margin-bottom: 3px;
7 | text {
8 | width: 100px;
9 | text-align: right;
10 | }
11 | input {
12 | flex: 1;
13 | border: solid 1px #ccc;
14 | border-radius: 3px;
15 | padding: 0 2px;
16 | }
17 | }
18 | }
19 | .ctrl {
20 | box-sizing: border-box;
21 | padding: 10px;
22 | }
23 |
--------------------------------------------------------------------------------
/pages/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{userInfo.nickName}}
6 |
7 |
8 | {{motto}}
9 |
10 |
11 | 足球圈
12 |
13 |
14 |
--------------------------------------------------------------------------------
/v1.0/pages/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{userInfo.nickName}}
6 |
7 |
8 | {{motto}}
9 |
10 |
13 |
14 |
--------------------------------------------------------------------------------
/utils/util.js:
--------------------------------------------------------------------------------
1 | function formatTime(date) {
2 | var year = date.getFullYear()
3 | var month = date.getMonth() + 1
4 | var day = date.getDate()
5 |
6 | var hour = date.getHours()
7 | var minute = date.getMinutes()
8 | var second = date.getSeconds()
9 |
10 |
11 | return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
12 | }
13 |
14 | function formatNumber(n) {
15 | n = n.toString()
16 | return n[1] ? n : '0' + n
17 | }
18 |
19 | module.exports = {
20 | formatTime: formatTime
21 | }
22 |
--------------------------------------------------------------------------------
/v1.0/utils/util.js:
--------------------------------------------------------------------------------
1 | function formatTime(date) {
2 | var year = date.getFullYear()
3 | var month = date.getMonth() + 1
4 | var day = date.getDate()
5 |
6 | var hour = date.getHours()
7 | var minute = date.getMinutes()
8 | var second = date.getSeconds()
9 |
10 |
11 | return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
12 | }
13 |
14 | function formatNumber(n) {
15 | n = n.toString()
16 | return n[1] ? n : '0' + n
17 | }
18 |
19 | module.exports = {
20 | formatTime: formatTime
21 | }
22 |
--------------------------------------------------------------------------------
/tpls/signin.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/gulpfile.js:
--------------------------------------------------------------------------------
1 | var gulp = require('gulp');
2 |
3 | var sass = require('gulp-sass');
4 |
5 | var rename = require('gulp-rename');
6 |
7 | gulp.task('scss', function () {
8 | gulp.src(['./**/*.scss', '!node_modules/**/*'])
9 | .pipe(sass().on('error', sass.logError))
10 | .pipe(rename(function (path) {
11 | path.extname = '.wxss';
12 | }))
13 | .pipe(gulp.dest('./'));
14 | });
15 |
16 | gulp.task('watch', function () {
17 | gulp.watch('./pages/**/*', ['scss']);
18 | gulp.watch('./*.scss', ['scss']);
19 | });
20 |
21 | gulp.task('default', ['watch'], function () {
22 | console.log('done!');
23 | });
24 |
--------------------------------------------------------------------------------
/pages/footballsns/search/search.wxml:
--------------------------------------------------------------------------------
1 |
2 | [当前位置]
3 |
4 | 纬度:{{latitude}}
5 | 经度:{{longitude}}
6 | 速度:{{speed}}
7 | 位置的精确度:{{acuracy}}
8 |
9 |
10 |
11 |
12 |
13 | [设备]
14 |
15 | 网络状态:{{networkType}}
16 | 系统信息:见控制台
17 |
18 |
19 |
--------------------------------------------------------------------------------
/pages/index/index.js:
--------------------------------------------------------------------------------
1 | //index.js
2 | //获取应用实例
3 | var app = getApp()
4 | Page({
5 | data: {
6 | motto: 'Hello World',
7 | userInfo: {}
8 | },
9 | //事件处理函数
10 | bindViewTap: function() {
11 | wx.navigateTo({
12 | url: '../logs/logs'
13 | })
14 | },
15 | gotoFootball: function () {
16 | wx.navigateTo({
17 | url: '../footballsns/main/main'
18 | });
19 | },
20 | onLoad: function () {
21 | console.log('onLoad')
22 | var that = this
23 | //调用应用实例的方法获取全局数据
24 | app.abc(function(userInfo){
25 | //更新数据
26 | that.setData({
27 | userInfo:userInfo
28 | })
29 | })
30 | }
31 | })
32 |
--------------------------------------------------------------------------------
/v1.0/pages/index/index.js:
--------------------------------------------------------------------------------
1 | //index.js
2 | //获取应用实例
3 | var app = getApp()
4 | Page({
5 | data: {
6 | motto: 'Hello World',
7 | footballsns: '前往足球圈',
8 | userInfo: {}
9 | },
10 | //事件处理函数
11 | bindViewTap: function() {
12 | wx.navigateTo({
13 | url: '../logs/logs'
14 | })
15 | },
16 | gotoFootballsns: function () {
17 | wx.navigateTo({
18 | url: '../footballsns/app'
19 | })
20 | },
21 | onLoad: function () {
22 | console.log('onLoad')
23 | var that = this
24 | //调用应用实例的方法获取全局数据
25 | app.getUserInfo(function(userInfo){
26 | //更新数据
27 | that.setData({
28 | userInfo:userInfo
29 | })
30 | })
31 | }
32 | })
33 |
--------------------------------------------------------------------------------
/pages/footballsns/media/media.scss:
--------------------------------------------------------------------------------
1 | .media-container {
2 | height: 100%;
3 | display: flex;
4 | justify-content: flex-start;;
5 | align-items: center;
6 | flex-direction: column;
7 | box-sizing: border-box;
8 | padding-top: 10px;
9 | .progress {
10 | width: 304px;
11 | box-sizing: border-box;
12 | padding-bottom: 10px;
13 | }
14 | .media {
15 | height: 304px;
16 | }
17 | .record, .chooseimg {
18 | display: flex;
19 | button {
20 | margin: 10px;
21 | }
22 | }
23 | .chooseimg {
24 | button {
25 | background: #058;
26 | font-size: 14px;
27 | }
28 | image {
29 | width: 36px;
30 | height: 36px;
31 | margin-top: 10px;
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 |
6 | # Runtime data
7 | pids
8 | *.pid
9 | *.seed
10 |
11 | # Directory for instrumented libs generated by jscoverage/JSCover
12 | lib-cov
13 |
14 | # Coverage directory used by tools like istanbul
15 | coverage
16 |
17 | # nyc test coverage
18 | .nyc_output
19 |
20 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
21 | .grunt
22 |
23 | # node-waf configuration
24 | .lock-wscript
25 |
26 | # Compiled binary addons (http://nodejs.org/api/addons.html)
27 | build/Release
28 |
29 | # Dependency directories
30 | node_modules
31 | jspm_packages
32 |
33 | # Optional npm cache directory
34 | .npm
35 |
36 | # Optional REPL history
37 | .node_repl_history
38 |
--------------------------------------------------------------------------------
/v1.0/mock/list.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "img": "/images/img1.jpg",
4 | "title": "西甲-巴萨3-4客负 皇马1-1丢榜首"
5 | },
6 | {
7 | "img": "/images/img2.png",
8 | "title": "英超-曼联憾平 曼城0-2热刺 瓜帅首败"
9 | },
10 | {
11 | "img": "/images/img3.jpg",
12 | "title": "意甲-AC米兰4-3 国米1-2罗马"
13 | },
14 | {
15 | "img": "/images/img4.jpg",
16 | "title": "德甲-拜仁1-1终结连胜 药厂擒多特"
17 | },
18 | {
19 | "img": "/images/img1.jpg",
20 | "title": "西甲-巴萨3-4客负 皇马1-1丢榜首"
21 | },
22 | {
23 | "img": "/images/img2.png",
24 | "title": "英超-曼联憾平 曼城0-2热刺 瓜帅首败"
25 | },
26 | {
27 | "img": "/images/img3.jpg",
28 | "title": "意甲-AC米兰4-3 国米1-2罗马"
29 | },
30 | {
31 | "img": "/images/img4.jpg",
32 | "title": "德甲-拜仁1-1终结连胜 药厂擒多特"
33 | }
34 | ]
35 |
--------------------------------------------------------------------------------
/app.js:
--------------------------------------------------------------------------------
1 | //app.js
2 | App({
3 | onLaunch: function () {
4 | //调用API从本地缓存中获取数据
5 | var logs = wx.getStorageSync('logs') || []
6 | logs.unshift(Date.now())
7 | wx.setStorageSync('logs', logs)
8 | },
9 | abc:function(cb){
10 | var that = this
11 | if(this.globalData.userInfo){
12 | typeof cb == "function" && cb(this.globalData.userInfo)
13 | }else{
14 | //调用登录接口
15 | wx.login({
16 | success: function () {
17 | wx.getUserInfo({
18 | success: function (res) {
19 | that.globalData.userInfo = res.userInfo
20 | typeof cb == "function" && cb(that.globalData.userInfo)
21 | }
22 | })
23 | }
24 | })
25 | }
26 | },
27 | globalData:{
28 | userInfo:null
29 | }
30 | })
--------------------------------------------------------------------------------
/v1.0/app.js:
--------------------------------------------------------------------------------
1 | //app.js
2 | App({
3 | onLaunch: function () {
4 | //调用API从本地缓存中获取数据
5 | var logs = wx.getStorageSync('logs') || []
6 | logs.unshift(Date.now())
7 | wx.setStorageSync('logs', logs)
8 | },
9 | getUserInfo:function(cb){
10 | var that = this
11 | if(this.globalData.userInfo){
12 | typeof cb == "function" && cb(this.globalData.userInfo)
13 | }else{
14 | //调用登录接口
15 | wx.login({
16 | success: function () {
17 | wx.getUserInfo({
18 | success: function (res) {
19 | that.globalData.userInfo = res.userInfo
20 | typeof cb == "function" && cb(that.globalData.userInfo)
21 | }
22 | })
23 | }
24 | })
25 | }
26 | },
27 | globalData:{
28 | userInfo:null
29 | }
30 | })
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/app.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | current: 0,
4 | list: []
5 | },
6 | onLoad: function () {
7 | // 请注意无 AppID 关联下,工具未检查安全域名
8 | var that = this;
9 | wx.request({
10 | url: 'mock/list.json',
11 | header: {
12 | 'Content-Type': 'application/json'
13 | },
14 | success: function(res) {
15 | console.log(0);
16 | that.setData({
17 | list: res.data
18 | });
19 | }
20 | });
21 | },
22 | onPullDownRefreash: function () {
23 | console.log(0);
24 | },
25 | changeItem: function (e) {
26 | this.setData({
27 | current: e.detail.current
28 | })
29 | },
30 | switchSwiper: function (e) {
31 | this.setData({
32 | current: e.target.dataset.index
33 | })
34 | }
35 | });
36 |
--------------------------------------------------------------------------------
/pages/footballsns/media/media.wxss:
--------------------------------------------------------------------------------
1 | .media-container {
2 | height: 100%;
3 | display: flex;
4 | justify-content: flex-start;
5 | align-items: center;
6 | flex-direction: column;
7 | box-sizing: border-box;
8 | padding-top: 10px; }
9 | .media-container .progress {
10 | width: 304px;
11 | box-sizing: border-box;
12 | padding-bottom: 10px; }
13 | .media-container .media {
14 | height: 304px; }
15 | .media-container .record, .media-container .chooseimg {
16 | display: flex; }
17 | .media-container .record button, .media-container .chooseimg button {
18 | margin: 10px; }
19 | .media-container .chooseimg button {
20 | background: #058;
21 | font-size: 14px; }
22 | .media-container .chooseimg image {
23 | width: 36px;
24 | height: 36px;
25 | margin-top: 10px; }
26 |
--------------------------------------------------------------------------------
/mock/list.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": 0,
4 | "img": "/images/img1.jpg",
5 | "title": "西甲-巴萨3-4客负 皇马1-1丢榜首"
6 | },
7 | {
8 | "id": 1,
9 | "img": "/images/img2.png",
10 | "title": "英超-曼联憾平 曼城0-2热刺 瓜帅首败"
11 | },
12 | {
13 | "id": 2,
14 | "img": "/images/img3.jpg",
15 | "title": "意甲-AC米兰4-3 国米1-2罗马"
16 | },
17 | {
18 | "id": 3,
19 | "img": "/images/img4.jpg",
20 | "title": "德甲-拜仁1-1终结连胜 药厂擒多特"
21 | },
22 | {
23 | "id": 4,
24 | "img": "/images/img1.jpg",
25 | "title": "西甲-巴萨3-4客负 皇马1-1丢榜首"
26 | },
27 | {
28 | "id": 5,
29 | "img": "/images/img2.png",
30 | "title": "英超-曼联憾平 曼城0-2热刺 瓜帅首败"
31 | },
32 | {
33 | "id": 6,
34 | "img": "/images/img3.jpg",
35 | "title": "意甲-AC米兰4-3 国米1-2罗马"
36 | },
37 | {
38 | "id": 7,
39 | "img": "/images/img4.jpg",
40 | "title": "德甲-拜仁1-1终结连胜 药厂擒多特"
41 | }
42 | ]
43 |
--------------------------------------------------------------------------------
/pages/footballsns/detail/detail.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 最强PK!谁才是当今足坛第一门神?
4 |
5 |
6 |
7 | 通过对比2015/2016赛季联赛数据,不难发现皇马门将纳瓦斯场均扑救次数是最多的,达到2.47次,这比德赫亚、布冯、诺伊尔等人都要多。通常来讲,门将的这项数据,与球队的战术和防守都有着密切的关系。皇马身处西甲,打法相对开放,这也使得纳瓦斯场均扑救次数最多。而诺伊尔所在的拜仁,综合实力要碾压德甲其他对手,因此其他球队在比赛中的射门机会并不多。
8 |
9 | 场均扑救次数,在说明门将能力方面稍显不足。但被攻入一球,所需要的扑救次数,这一数据却能反映出门将的实力。具体而言,德赫亚每扑救2.45次,便会丢一球。诺伊尔为2.73次扑救丢一球,马竞门将奥布拉克3.82次扑救丢一球。而布冯扑救3.94次才丢一球,是上述5大门将中这1数据中,最为出色的一位。值得一提的是,德赫亚这项数据略显黯淡的原因,无疑是受到了曼联防线不稳的一定影响。
10 | 让人意外的是,上述5人中,平均传球距离最短的,竟然是布冯。这也意味着,他也在尤文图斯的传控体系中肩负着不小责任。具体的传球精度,诺伊尔高达83%,他是5名门将中传球最为准确的。布冯这一数据也很高,精度达到81%,是5名门将中第二好的。传球精度最低的是马竞门将奥布拉克,仅仅为55%,这与他惯于开远球的踢法有关,他的平均传球距离达到43米。
11 |
12 | 通常来讲,门将都是身高出众的球员。至于原因,这是因为他们得应对高空球的挑战。每当对手开出高球吊入禁区,这时门将若是位置合适,他便会冲上用手将球摘下,或者用拳击出。毫无疑问,防高球是门将最基本的素养之一。数据显示,德赫亚上赛季平均每场比赛接高空球2.5次,是5名门将中最高的。而这也显示出,德赫亚加盟英超之初在防守高球时的短板,如今已变成他的优势。
13 |
14 | 当然,接高空球数据的高低,也与球队的打法有关,比如曼联上赛季控制力较弱,经常会被对手攻击,因此德赫亚接高球的机会就多。至于拜仁,他们上赛季主打控球和进攻,因此对手进攻的机会并不多,在这种情况下,诺伊尔接高空球的次数反而是5大门将中最少的。要知道,诺伊尔的身高可是达到1米93。
15 |
16 |
17 |
--------------------------------------------------------------------------------
/pages/footballsns/media/media.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/pages/footballsns/search/search.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | latitude: 40.056601,
4 | longitude: 116.334655,
5 | speed: 0,
6 | accuracy: 0,
7 |
8 | networkType: ''
9 | },
10 | onLoad: function () {
11 |
12 | },
13 | onShow: function () {
14 | var that = this;
15 | wx.getNetworkType({
16 | success: function(res) {
17 | var networkType = res.networkType // 返回网络类型2g,3g,4g,wifi
18 | that.setData({
19 | networkType: networkType
20 | })
21 | }
22 | });
23 |
24 | wx.getSystemInfo({
25 | success: function(res) {
26 | console.log('手机型号:' + res.model)
27 | console.log('设备像素比:' + res.pixelRatio)
28 | console.log('窗口宽度:' + res.windowWidth)
29 | console.log('窗口高度:' + res.windowHeight)
30 | console.log('微信设置的语言:' + res.language)
31 | console.log('微信版本号:' + res.version)
32 | }
33 | });
34 | },
35 | showInWechatMap: function () {
36 | var that = this;
37 | wx.getLocation({
38 | type: 'wgs84',
39 | success: function(res) {
40 | // that.setData({
41 | // latitude: res.latitude,
42 | // longitude: res.longitude,
43 | // speed: res.speed,
44 | // accuracy: res.accuracy
45 | // });
46 |
47 | // 使用微信内置地图查看位置
48 | wx.openLocation({
49 | latitude: that.data.latitude,
50 | longitude: that.data.longitude,
51 | scale: 28
52 | });
53 | },
54 | fail: function () {
55 | console.log('开发工具不支持~');
56 | }
57 | })
58 | }
59 | });
60 |
--------------------------------------------------------------------------------
/v1.0/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages":[
3 | "pages/footballsns/app",
4 | "pages/footballsns/search/search",
5 | "pages/footballsns/photo/photo",
6 | "pages/footballsns/my/my",
7 | "pages/footballsns/exit/exit",
8 | "pages/index/index",
9 | "pages/logs/logs"
10 | ],
11 | "window":{
12 | "backgroundTextStyle":"light",
13 | "navigationBarBackgroundColor": "#000",
14 | "navigationBarTitleText": "WeChat",
15 | "navigationBarTextStyle": "white"
16 | },
17 | "tabBar": {
18 | "color": "#a9b7b7",
19 | "selectedColor": "#0dc441",
20 | "borderStyle": "white",
21 | "list": [
22 | {
23 | "pagePath": "pages/footballsns/app",
24 | "iconPath": "images/home.png",
25 | "selectedIconPath": "images/home_light.png",
26 | "text": "首页"
27 | },
28 | {
29 | "pagePath": "pages/footballsns/search/search",
30 | "iconPath": "images/search.png",
31 | "selectedIconPath": "images/search_light.png",
32 | "text": "发现"
33 | },
34 | {
35 | "pagePath": "pages/footballsns/photo/photo",
36 | "iconPath": "images/camera.png",
37 | "selectedIconPath": "images/camera_light.png",
38 | "text": "拍照"
39 | },
40 | {
41 | "pagePath": "pages/footballsns/my/my",
42 | "iconPath": "images/my.png",
43 | "selectedIconPath": "images/my_light.png",
44 | "text": "我的"
45 | },
46 | {
47 | "pagePath": "pages/footballsns/exit/exit",
48 | "iconPath": "images/exit.png",
49 | "selectedIconPath": "images/exit_light.png",
50 | "text": "退出"
51 | }
52 | ]
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages":[
3 | "pages/footballsns/search/search",
4 | "pages/footballsns/media/media",
5 | "pages/footballsns/main/main",
6 | "pages/index/index",
7 | "pages/footballsns/detail/detail",
8 | "pages/footballsns/my/my",
9 | "pages/footballsns/exit/exit",
10 | "pages/logs/logs"
11 | ],
12 | "window": {
13 | "backgroundTextStyle":"light",
14 | "navigationBarBackgroundColor": "#058",
15 | "navigationBarTitleText": "WeChat",
16 | "navigationBarTextStyle": "white"
17 | },
18 | "tabBar": {
19 | "color": "#a9b7b7",
20 | "selectedColor": "#0dc441",
21 | "borderStyle": "white",
22 | "list": [
23 | {
24 | "pagePath": "pages/footballsns/main/main",
25 | "text": "首页",
26 | "iconPath": "images/home.png",
27 | "selectedIconPath": "images/home_light.png"
28 | },
29 | {
30 | "pagePath": "pages/footballsns/search/search",
31 | "text": "发现",
32 | "iconPath": "images/search.png",
33 | "selectedIconPath": "images/search_light.png"
34 | },
35 | {
36 | "pagePath": "pages/footballsns/media/media",
37 | "iconPath": "images/media.png",
38 | "selectedIconPath": "images/media_light.png",
39 | "text": "多媒体"
40 | },
41 | {
42 | "pagePath": "pages/footballsns/my/my",
43 | "iconPath": "images/my.png",
44 | "selectedIconPath": "images/my_light.png",
45 | "text": "我的"
46 | },
47 | {
48 | "pagePath": "pages/footballsns/exit/exit",
49 | "iconPath": "images/exit.png",
50 | "selectedIconPath": "images/exit_light.png",
51 | "text": "退出"
52 | }
53 | ]
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/pages/footballsns/main/main.wxss:
--------------------------------------------------------------------------------
1 | .main-container {
2 | height: 100%;
3 | display: flex;
4 | flex-direction: column;
5 | }
6 |
7 | .main-list {
8 | flex: 1;
9 | overflow: hidden;
10 | }
11 |
12 | .main-list scroll-view {
13 | height: 100%;
14 | }
15 |
16 | .main-list scroll-view button {
17 | font-size: 14px;
18 | border: 0;
19 | }
20 |
21 | .main-list ul {
22 | display: flex;
23 | flex-wrap: wrap;
24 | padding: 4px 4px 4px 0;
25 | }
26 |
27 | .main-list ul navigator {
28 | box-sizing: border-box;
29 | width: 50%;
30 | padding-left: 4px;
31 | }
32 |
33 | .main-list ul li image {
34 | width: 100%;
35 | height: 180px;
36 | }
37 |
38 | .main-list ul li b {
39 | display: block;
40 | padding: 4px;
41 | }
42 |
43 | .main-list .main-list-life,
44 | .main-list .main-list-girl {
45 | display: flex;
46 | align-items: center;
47 | justify-content: center;
48 | }
49 |
50 | @media screen and (max-width: 321px) {
51 | .main-list ul li {
52 | font-size: 14px;
53 | }
54 | }
55 |
56 | @media screen and (min-width: 322px) and (max-width: 400px) {
57 | .main-list ul li {
58 | font-size: 15px;
59 | }
60 | }
61 |
62 | @media screen and (min-width: 400px) {
63 | .main-list ul li {
64 | font-size: 16px;
65 | }
66 | }
67 |
68 | .main-nav{
69 | height: 35px;
70 | background-color: #fff;
71 | }
72 |
73 | .main-nav ul {
74 | height: 35px;
75 | display: flex;
76 | }
77 |
78 | .main-nav ul li {
79 | height: 35px;
80 | flex: 1;
81 | line-height: 35px;
82 | text-align: center;
83 | border-bottom: solid 1px #d9d9d9;
84 | font-size: 14px;
85 | box-sizing: border-box;
86 | }
87 |
88 | .main-nav ul li.active {
89 | border-bottom: solid 2px #0dc441;
90 | color: #0dc441;
91 | }
92 |
93 | .list-loading {
94 |
95 | }
96 |
--------------------------------------------------------------------------------
/pages/footballsns/my/my.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | modal: {
4 | modalHidden: false,
5 | username: '',
6 | password: '',
7 | },
8 | toastHidden: true,
9 | actionSheet: {
10 | actionSheetHidden: true,
11 | actionSheetItems: [
12 | '催办'
13 | ]
14 | }
15 | },
16 | onLoad: function () {
17 |
18 | },
19 | onShow: function () {
20 | if(wx.getStorageSync('username') && wx.getStorageSync('password')) {
21 | this.setData({
22 | 'modal.modalHidden': true
23 | });
24 | } else {
25 | this.setData({
26 | modal: {
27 | username: '',
28 | password: ''
29 | }
30 | });
31 | this.setData({
32 | 'modal.modalHidden': false
33 | });
34 | }
35 | },
36 | signinConfirm: function () {
37 | wx.setStorageSync('username', this.data.modal.username);
38 | wx.setStorageSync('password', this.data.modal.password);
39 | this.setData({
40 | 'modal.modalHidden': true
41 | });
42 | },
43 | saveUsername: function (event) {
44 | this.setData({
45 | 'modal.username': event.detail.value
46 | });
47 | },
48 | savePassword: function (event) {
49 | this.setData({
50 | 'modal.password': event.detail.value
51 | });
52 | },
53 | toastChange: function () {
54 | this.setData({
55 | toastHidden: true
56 | })
57 | },
58 | showActionsheet: function () {
59 | this.setData({
60 | 'actionSheet.actionSheetHidden': false
61 | });
62 | },
63 | actionSheetChange: function () {
64 | this.setData({
65 | 'actionSheet.actionSheetHidden': true
66 | });
67 | },
68 | bindItemTap: function () {
69 | this.setData({
70 | toastHidden: false
71 | });
72 | }
73 | });
74 |
--------------------------------------------------------------------------------
/pages/footballsns/main/main.wxml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 | 努力加载中...
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | -
24 |
25 | {{item.title}}
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | 足球生活
36 |
37 |
38 | 足球美女
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/pages/footballsns/media/media.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | persent: 0,
4 | isHide: false,
5 | poster: '/media/xuwei.webp',
6 | name: '此时此刻',
7 | author: '许巍',
8 | src: '/media/now.mp3',
9 |
10 | imgUrl: ['http://placehold.it/36x36']
11 | },
12 | onLoad: function () {
13 | var that = this;
14 | var timer = setInterval(function () {
15 | this.setData({
16 | persent: ++this.data.persent
17 | });
18 | if(this.data.persent === 100) {
19 | this.setData({
20 | isShow: true,
21 | action: {
22 | method: 'pause'
23 | }
24 | });
25 | clearInterval(timer);
26 | }
27 | }.bind(this), 10);
28 | },
29 | onShow: function () {
30 |
31 | },
32 |
33 | // 注:开发工具貌似不能录音
34 | startRecord: function () {
35 | wx.startRecord({
36 | success: function(res) {
37 | var tempFilePath = res.tempFilePath
38 | console.log(0);
39 | },
40 | fail: function(res) {
41 | //录音失败
42 | }
43 | })
44 | },
45 | stopRecord: function () {
46 | console.log('stop');
47 | },
48 |
49 | chooseImage: function () {
50 | var that = this;
51 | wx.chooseImage({
52 | count: 1, // 默认9
53 | sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
54 | sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
55 | success: function (res) {
56 | // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
57 | that.setData({
58 | imgUrl: res.tempFilePaths
59 | })
60 | }
61 | })
62 | },
63 | uploadFile: function () {
64 | // 上传文件
65 | wx.uploadFile({
66 | url: 'http://felixlu.bceapp.com/upload.php',
67 | filePath: this.data.imgUrl[0],
68 | name: 'file',
69 | formData:{
70 | 'user': 'test'
71 | },
72 | success: function (res) {
73 | console.log("服务器返回信息:" + res.data);
74 | }
75 | })
76 | },
77 | downloadFile: function () {
78 | // 下载文件
79 | var that = this;
80 | wx.downloadFile({
81 | url: 'http://felixlu.bceapp.com/files/img4.jpg',
82 | type: 'audio',
83 | success: function(res) {
84 | // 保存文件到本地
85 | wx.saveFile({
86 | tempFilePath: res.tempFilePath,
87 | success: function(res) {
88 | var savedFilePath = res.savedFilePath;
89 | console.log('本地文件路径:' + savedFilePath);
90 | that.setData({
91 | 'imgUrl[0]': res.savedFilePath
92 | })
93 | }
94 | })
95 | }
96 | })
97 | }
98 | });
99 |
--------------------------------------------------------------------------------
/pages/footballsns/main/main.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | current: 0,
4 | list: [],
5 | loadingHidden: false,
6 | refreshHidden: true,
7 | loadmoreHidden: true,
8 | swiper: {
9 | indicatorDots: false,
10 | autoplay: false,
11 | interval: 0,
12 | duration: 300
13 | }
14 | },
15 |
16 | onLoad: function () {
17 | var that = this;
18 | wx.request({
19 | url: 'http://localhost/mock/list.json',
20 | // url: 'http://felixlu.bceapp.com/list.php',
21 | header: {
22 | 'Content-Type': 'application/json'
23 | },
24 | success: function(res) {
25 | setTimeout(function () {
26 | that.setData({
27 | list: res.data,
28 | loadingHidden: true
29 | });
30 | }, 1500);
31 | },
32 | fail: function (error) {
33 | console.log(error);
34 | }
35 | });
36 | // this.setData({
37 | // list: [
38 | // {
39 | // "img": "/images/img1.jpg",
40 | // "title": "西甲-巴萨3-4客负 皇马1-1丢榜首",
41 | // },
42 | // {
43 | // "img": "/images/img2.png",
44 | // "title": "英超-曼联憾平 曼城0-2热刺 瓜帅首败",
45 | // },
46 | // {
47 | // "img": "/images/img3.jpg",
48 | // "title": "意甲-AC米兰4-3 国米1-2罗马",
49 | // },
50 | // {
51 | // "img": "/images/img4.jpg",
52 | // "title": "德甲-拜仁1-1终结连胜 药厂擒多特",
53 | // },
54 | // {
55 | // "img": "/images/img1.jpg",
56 | // "title": "西甲-巴萨3-4客负 皇马1-1丢榜首",
57 | // },
58 | // {
59 | // "img": "/images/img2.png",
60 | // "title": "英超-曼联憾平 曼城0-2热刺 瓜帅首败",
61 | // },
62 | // {
63 | // "img": "/images/img3.jpg",
64 | // "title": "意甲-AC米兰4-3 国米1-2罗马",
65 | // },
66 | // {
67 | // "img": "/images/img4.jpg",
68 | // "title": "德甲-拜仁1-1终结连胜 药厂擒多特",
69 | // }
70 | // ]
71 | // })
72 | },
73 |
74 | actionToupper: function () {
75 | var that = this;
76 | this.setData({
77 | refreshHidden: false
78 | });
79 | wx.request({
80 | url: 'http://localhost/mock/refresh.json',
81 | success: function (res) {
82 | setTimeout(function () {
83 | that.setData({
84 | list: res.data.concat(that.data.list),
85 | refreshHidden: true
86 | });
87 | }, 1500);
88 | }
89 | });
90 | },
91 |
92 | onPullDownRefresh: function () {
93 | console.log(0);
94 | },
95 |
96 | actionTolower: function () {
97 | var that = this;
98 | this.setData({
99 | loadmoreHidden: false
100 | });
101 | wx.request({
102 | url: 'http://localhost/mock/more.json',
103 | success: function (res) {
104 | setTimeout(function () {
105 | that.setData({
106 | list: that.data.list.concat(res.data),
107 | loadmoreHidden: true
108 | });
109 | }, 1500);
110 | }
111 | });
112 | },
113 |
114 | switchSlider: function (event) {
115 | this.setData({
116 | current: event.target.dataset.index
117 | })
118 | },
119 |
120 | changeSlider: function (event) {
121 | this.setData({
122 | current: event.detail.current
123 | });
124 | }
125 | });
126 |
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/app.wxml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | -
30 |
31 | 西甲-巴萨3-4客负 皇马1-1丢榜首
32 |
33 | -
34 |
35 | 英超-曼联憾平 曼城0-2热刺 瓜帅首败
36 |
37 | -
38 |
39 | 意甲-AC米兰4-3 国米1-2罗马
40 |
41 | -
42 |
43 | 德甲-拜仁1-1终结连胜 药厂擒多特
44 |
45 | -
46 |
47 | 西甲-巴萨3-4客负 皇马1-1丢榜首
48 |
49 | -
50 |
51 | 英超-曼联憾平 曼城0-2热刺 瓜帅首败
52 |
53 | -
54 |
55 | 意甲-AC米兰4-3 国米1-2罗马
56 |
57 | -
58 |
59 | 德甲-拜仁1-1终结连胜 药厂擒多特
60 |
61 |
62 |
68 |
69 |
70 | 足球生活
71 | 足球美女
72 |
73 |
74 |
75 |
98 |
99 |
--------------------------------------------------------------------------------
/v1.0/pages/footballsns/app.wxss:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | /* reset */
4 |
5 | html, body {
6 | height: 100%;
7 | }
8 |
9 | html {
10 | background-color: #fafafa;
11 | color: #212121;
12 | }
13 |
14 | body {
15 | margin: 0;
16 | font-size: 14px;
17 | line-height: 1.5;
18 | font-family: Helvetica Neue, Helvetica, STHeiTi, sans-serif;
19 | }
20 |
21 | ul, ol, dl, dd, h1, h2, h3, h4, h5, h6, figure, form, fieldset, legend, input, textarea, button, p, blockquote, th, td, pre, xmp {
22 | margin: 0;
23 | padding: 0;
24 | }
25 |
26 | ul, ol, menu {
27 | list-style: none;
28 | }
29 |
30 | address, cite, dfn, em, i, optgroup, var {
31 | font-style: normal;
32 | }
33 |
34 | article, aside, details, figcaption, figure, footer, header, main, menu, nav, section, summary {
35 | display: block;
36 | }
37 |
38 | /*@font-face {
39 | font-family: iconfont;
40 | src: url("./images/iconfont/iconfont.woff") format("woff"), url("./images/iconfont/iconfont.ttf") format("truetype");
41 | }
42 |
43 | @font-face {
44 | font-family: iconfont;
45 | src: url("./images/iconfont/iconfont-menu.woff") format("woff"), url("./images/iconfont/iconfont-menu.ttf") format("truetype");
46 | }
47 |
48 | .iconfont {
49 | font-family: iconfont;
50 | }*/
51 |
52 | /* index styles */
53 |
54 | .m-container {
55 | height: 100%;
56 | display: flex;
57 | flex-direction: column;
58 | }
59 |
60 | .m-container header {
61 | height: 44px;
62 | background-color: #0dc441;
63 | }
64 |
65 | .m-container header ul {
66 | height: 100%;
67 | display: flex;
68 | }
69 |
70 | .m-container header ul li:first-child,
71 | .m-container header ul li:last-child {
72 | height: 100%;
73 | width: 44px;
74 | display: flex;
75 | align-items: center;
76 | justify-content: center;
77 | }
78 |
79 | .m-container header ul li icon {
80 | font-size: 24px;
81 | color: rgba(255, 255, 255, 0.5);
82 | height: 30px;
83 | }
84 |
85 | .m-container header ul li.header-nav {
86 | flex: 1;
87 | display: flex;
88 | align-items: center;
89 | justify-content: center;
90 | }
91 |
92 | .m-container header ul li.header-nav span {
93 | height: 25px;
94 | width: 59px;
95 | font-size: 12px;
96 | color: rgba(255, 255, 255, 0.5);
97 | background-color: rgba(10, 217, 133, 0.5);
98 | line-height: 25px;
99 | text-align: center;
100 | }
101 |
102 | .m-container header ul li.header-nav span:first-child {
103 | border-radius: 10px 0 0 10px;
104 | }
105 |
106 | .m-container header ul li.header-nav span:last-child {
107 | border-radius: 0 10px 10px 0;
108 | }
109 |
110 | .m-container header ul li.header-nav span.active {
111 | color: rgba(255, 255, 255, 1);
112 | background-color: rgba(10, 217, 133, 1);
113 | }
114 |
115 | .m-container nav {
116 | height: 35px;
117 | background-color: #fff;
118 | }
119 |
120 | .m-container nav ul {
121 | height: 100%;
122 | display: flex;
123 | }
124 |
125 | .m-container nav ul li {
126 | flex: 1;
127 | line-height: 35px;
128 | text-align: center;
129 | border-bottom: solid 1px #d9d9d9;
130 | font-size: 14px;
131 | box-sizing: border-box;
132 | }
133 |
134 | @media only screen and (-Webkit-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5) {
135 | .m-container nav ul li {
136 | border-bottom: solid 0.5px #ced6cf;
137 | }
138 | .m-container footer ul {
139 | border-top: solid 0.5px #ced6cf;
140 | }
141 | .m-container footer ul li.choose-image i {
142 | border: solid 0.5px #ced6cf;
143 | }
144 | }
145 |
146 | @media only screen and (-Webkit-min-device-pixel-ratio: 2.5), only screen and (min-device-pixel-ratio: 3.5) {
147 | .m-container nav ul li {
148 | border-bottom: solid 0.3333px #ced6cf;
149 | }
150 | .m-container footer ul {
151 | border-top: solid 0.3333px #ced6cf;
152 | }
153 | .m-container footer ul li.choose-image i {
154 | border: solid 0.3333px #ced6cf;
155 | }
156 | }
157 |
158 | .m-container nav ul li.active {
159 | border-bottom: solid 2px #0dc441;
160 | color: #0dc441;
161 | }
162 |
163 | .m-container section {
164 | flex: 1;
165 | background-color: #fff;
166 | overflow-y: scroll;
167 | padding-bottom: 4px;
168 | box-sizing: border-box;
169 | padding-right: 4px;
170 | }
171 |
172 | .m-container section swiper {
173 | height: 100%;
174 | }
175 |
176 | .m-container section swiper scroll-view{
177 | height: 100%;
178 | }
179 |
180 | .m-container section ul {
181 | display: flex;
182 | flex-wrap: wrap;
183 | align-content: flex-start;
184 | }
185 |
186 | .m-container section ul li {
187 | width: 50%;
188 | display: flex;
189 | flex-direction: column;
190 | align-items: center;
191 | justify-content: center;
192 | margin-top: 4px;
193 | padding-left: 4px;
194 | box-sizing: border-box;
195 | }
196 |
197 | @media screen and (max-width: 321px) {
198 | .m-container section ul li {
199 | font-size: 14px;
200 | }
201 | }
202 |
203 | @media screen and (min-width: 322px) and (max-width: 400px) {
204 | .m-container section ul li {
205 | font-size: 15px;
206 | }
207 | }
208 |
209 | @media screen and (min-width: 400px) {
210 | .m-container section ul li {
211 | font-size: 16px;
212 | }
213 | }
214 |
215 | .m-container section ul li image {
216 | width: 100%;
217 | height: 160px;
218 | }
219 |
220 |
221 |
222 | .m-container section ul li b {
223 | font-style: normal;
224 | box-sizing: border-box;
225 | padding: 4px;
226 | width: 100%;
227 | overflow: hidden;
228 | white-space: nowrap;
229 | text-overflow: ellipsis;
230 | }
231 |
232 | .m-container footer {
233 | height: 44px;
234 | background-color: #fff;
235 | }
236 |
237 | .m-container footer ul {
238 | height: 100%;
239 | display: flex;
240 | border-top: solid 1px #ced6cf;
241 | box-sizing: border-box;
242 | }
243 |
244 | .m-container footer ul li {
245 | flex: 1;
246 | display: flex;
247 | flex-direction: column;
248 | justify-content: center;
249 | align-items: center;
250 | color: #d6d6d6;
251 | }
252 |
253 | .m-container footer ul li.choose-image {
254 | position: relative;
255 | }
256 |
257 | .m-container footer ul li.choose-image icon {
258 | position: absolute;
259 | left: 50%;
260 | transform: translate(-50%);
261 | top: -9px;
262 | width: 50px;
263 | height: 50px;
264 | background-color: #fff;
265 | border-radius: 50%;
266 | border: solid 1px #ced6cf;
267 | text-align: center;
268 | line-height: 48px;
269 | font-size: 40px;
270 | }
271 |
272 | .m-container footer ul li i {
273 | font-size: 24px;
274 | line-height: 24px;
275 | }
276 |
277 | .m-container footer ul li b {
278 | font-size: 12px;
279 | line-height: 12px;
280 | font-weight: normal;
281 | }
282 |
283 | .m-container footer ul li.active i,
284 | .m-container footer ul li.active b {
285 | color: #0dc441;
286 | }
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 | /* end */
296 |
--------------------------------------------------------------------------------