forked from hzuapps/wechat-miniprogram-hzc-2017
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
a0cd69c
commit ee8bcd7
Showing
106 changed files
with
1,065 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,39 @@ | ||
//app.js | ||
App({ | ||
onLaunch: function () { | ||
// 展示本地存储能力 | ||
var logs = wx.getStorageSync('logs') || [] | ||
logs.unshift(Date.now()) | ||
wx.setStorageSync('logs', logs) | ||
|
||
// 登录 | ||
wx.login({ | ||
success: res => { | ||
// 发送 res.code 到后台换取 openId, sessionKey, unionId | ||
} | ||
}) | ||
// 获取用户信息 | ||
wx.getSetting({ | ||
success: res => { | ||
if (res.authSetting['scope.userInfo']) { | ||
// 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 | ||
wx.getUserInfo({ | ||
success: res => { | ||
// 可以将 res 发送给后台解码出 unionId | ||
this.globalData.userInfo = res.userInfo | ||
|
||
// 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 | ||
// 所以此处加入 callback 以防止这种情况 | ||
if (this.userInfoReadyCallback) { | ||
this.userInfoReadyCallback(res) | ||
} | ||
} | ||
}) | ||
} | ||
} | ||
}) | ||
}, | ||
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,42 @@ | ||
{ | ||
"pages": [ | ||
"pages/index/index", | ||
"pages/comp/scroll", | ||
"pages/form/form", | ||
"pages/example/article/article", | ||
"pages/example/qqweq/qqweq", | ||
"pages/fm/fm" | ||
|
||
], | ||
"window": { | ||
"backgroundTextStyle": "light", | ||
"navigationBarBackgroundColor": "#FF6666", | ||
"navigationBarTitleText": "程智滨", | ||
"navigationBarTextStyle": "while" | ||
}, | ||
"tabBar": { | ||
"color": "#000000", | ||
"backgroundColor": "#FF6666", | ||
|
||
"list": [ | ||
{ | ||
"selectedIconPath": "pages/image/14.jpg", | ||
"iconPath": "pages/image/13.jpg", | ||
"pagePath": "pages/index/index", | ||
"text": "首页" | ||
}, | ||
{ | ||
"pagePath": "pages/comp/scroll", | ||
"selectedIconPath": "pages/image/14.jpg", | ||
"iconPath": "pages/image/13.jpg", | ||
"text": "外形" | ||
}, | ||
{ | ||
"pagePath": "pages/form/form", | ||
"selectedIconPath": "pages/image/15.jpg", | ||
"iconPath": "pages/image/14.jpg", | ||
"text": "提交" | ||
} | ||
] | ||
} | ||
} |
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,12 @@ | ||
/**app.wxss**/ | ||
@import 'style/weui.wxss'; | ||
.container { | ||
height: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: space-between; | ||
padding: 200rpx 0; | ||
box-sizing: border-box; | ||
|
||
} |
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,113 @@ | ||
// pages/comp/scroll.js | ||
var base64 = require("../example/images/base64"); | ||
|
||
Page({ | ||
|
||
/** | ||
* 页面的初始数据 | ||
*/ | ||
data: { | ||
isEnd: true, | ||
messages: [{ | ||
image:"/pages/image/t0.jpg", | ||
name: "法拉利488", | ||
last: "极速跑车" | ||
}, { | ||
image: "/pages/image/t1.jpg", | ||
name: "法拉利California", | ||
last: " 火速前进 " | ||
}, { | ||
image: "/pages/image/t2.jpg", | ||
name: "法拉利812Superfast", | ||
last: "极品飞车" | ||
}, { | ||
image: "/pages/image/t3.jpg", | ||
name: "法拉利F12berlinetta", | ||
last: "极速暴走" | ||
}, { | ||
image: "/pages/image/t4.jpg", | ||
name: "法拉利458", | ||
last: "无影无踪" | ||
}, { | ||
image: "/pages/image/t5.jpg", | ||
name: "法拉利GTC4Lusso", | ||
last: "飞速疾跑" | ||
}, ] | ||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面加载 | ||
*/ | ||
onLoad: function (options) { | ||
this.setData({ | ||
icon20: base64.icon20, | ||
icon60: base64.icon60 | ||
}); | ||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面初次渲染完成 | ||
*/ | ||
onReady: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面显示 | ||
*/ | ||
onShow: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面隐藏 | ||
*/ | ||
onHide: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面卸载 | ||
*/ | ||
onUnload: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 页面相关事件处理函数--监听用户下拉动作 | ||
*/ | ||
onPullDownRefresh: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 页面上拉触底事件的处理函数 | ||
*/ | ||
onReachBottom: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 用户点击右上角分享 | ||
*/ | ||
onShareAppMessage: function () { | ||
|
||
}, | ||
|
||
onEnd: function () { | ||
|
||
var that = this; | ||
var data = that.data; | ||
that.setData({ | ||
isEnd: true /*, | ||
messages: data.messages.concat([{ | ||
name: "Tom", | ||
last: "Hello!" | ||
}, { | ||
name: "john", | ||
last: "yes." | ||
}]) */ | ||
}); | ||
|
||
} | ||
}) |
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,23 @@ | ||
<!--pages/comp/scroll.wxml--> | ||
<scroll-view class="page" bindtouchend='onEnd' > | ||
<view class="page__bd"> | ||
<view class="weui-panel weui-panel_access"> | ||
<view class="weui-panel__hd"></view> | ||
<view class="weui-panel__bd"> | ||
<navigator url="/pages/fm" class="weui-media-box weui-media-box_appmsg" hover-class="weui-cell_active" wx:for="{{messages}}"> | ||
<view class="weui-media-box__hd weui-media-box__hd_in-appmsg"> | ||
<image class="weui-media-box__thumb" src="{{item.image}}" /> | ||
</view> | ||
<view class="weui-media-box__bd weui-media-box__bd_in-appmsg"> | ||
<view class="weui-media-box__title"> {{item.name}}</view> | ||
<view class="weui-media-box__desc">{{item.last}}</view> | ||
</view> | ||
</navigator> | ||
</view> | ||
</view> | ||
<view class='weui-loadmore' wx:if="{{isEnd}}"> | ||
<view class='weui-loading'></view> | ||
<view class='weui-loadmore__tips'>正在加载……</view> | ||
</view> | ||
</view> | ||
</scroll-view> |
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 @@ | ||
/* pages/comp/scroll.wxss */ |
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 @@ | ||
Page({}); |
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 @@ | ||
{} |
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,69 @@ | ||
<view class="page"> | ||
<view class="page__hd"> | ||
<view class="page__title">法拉利LaFerrari</view> | ||
</view> | ||
<view class="page__bd"> | ||
<view class="weui-article"> | ||
<view class="weui-article__section"> | ||
<view class="weui-article__section"> | ||
<view class="weui-article__h3">历史</view> | ||
<view class="weui-article__p">2013年3月5日,马拉内罗,作为法拉利Enzo的接班人--LaFerrari终于揭开其神秘面纱,法拉利品牌最受期待的特别限量版车型当天在日内瓦国际车展上耀世登场。 | ||
</view> | ||
<view class="weui-article__p"> | ||
<image class="weui-article__img" src="/pages/image/1.jpg" mode="aspectFit" style="height: 180px" /> | ||
</view> | ||
</view> | ||
<view class="weui-article__section"> | ||
<view class="weui-article__h3">产量</view> | ||
<view class="weui-article__p">法拉利LaFerrari是法拉利品牌最受期待的特别限量版车型当天在日内瓦国际车展上耀世登场,此款特别版公路跑车将仅限量生产499辆。 | ||
</view> | ||
<view class="weui-article__p"> | ||
<image class="weui-article__img" src="/pages/image/2.jpg" mode="aspectFit" style="height: 180px" /> | ||
</view> | ||
</view> | ||
<view class="weui-article__section"> | ||
<view class="weui-article__h3">外形</view> | ||
<view class="weui-article__p">LaFerrari的底盘采用了四种以上不同类别的碳纤维,全部手工层压处理并由赛车部门采用与F1赛车相同的设计和生产工艺高压铸造。这有助于优化设计:在底盘中集成多项不同功能(例如座椅和电池舱),以改善抗扭刚度(+27%)和纵梁刚度(+22%),同时减轻重量。 | ||
</view> | ||
<view class="weui-article__p"> | ||
<image class="weui-article__img" src="/pages/image/3.jpg" mode="aspectFit" style="height: 180px" /> | ||
</view> | ||
</view> | ||
<view class="weui-article__section"> | ||
<view class="weui-article__h3">特点</view> | ||
<view class="weui-article__p">该车采用了混合动力方式驱动。这种混合动力技术称为HY-KERS,代表着极致性能与低排放的完美整合。LaFerrari配备动态车辆控制系统,这是该系统首次与主动式空气动力学设计和HY-KERS系统同时整合在一款公路跑车上。 | ||
</view> | ||
<view class="weui-article__p"> | ||
<image class="weui-article__img" src="/pages/image/4.jpg" mode="aspectFit" style="height: 180px" /> | ||
</view> | ||
</view> | ||
<view class="weui-article__section"> | ||
<view class="weui-article__h3">速度</view> | ||
<view class="weui-article__p">法拉利LaFerrari的0-100km/h加速时间少于3秒,0-200km/h加速也少于7秒,0-300km/h更只需15秒,极速高达350km/h以上。LaFerrari拥有超凡极致的性能表现、空气动力效率以及操控性,为超级跑车树立了新的标杆。 | ||
</view> | ||
<view class="weui-article__p"> | ||
<image class="weui-article__img" src="/pages/image/5.jpg" mode="aspectFit" style="height: 180px" /> | ||
</view> | ||
</view> | ||
<view class="weui-article__section"> | ||
<view class="weui-article__h3">内部</view> | ||
<view class="weui-article__p">车内则是全新设计的方向盘,集成了各种主要功能,换挡拨片更长、更符合人体工程学原理。独具特色的排挡座采用优美的悬挂翼式外观设计,其上排列着各种F1变速箱控制功能。 | ||
</view> | ||
<view class="weui-article__p"> | ||
<image class="weui-article__img" src="/pages/image/6.jpg" mode="aspectFit" style="height: 180px" /> | ||
</view> | ||
</view> | ||
<view class="weui-article__section"> | ||
<view class="weui-article__h3">售价</view> | ||
<view class="weui-article__p">HY-KERS系统,最大功率合计 963 CV,最大扭矩合计 >900 Nm,V12 最大功率 800 CV 9000 rpm,最大转速 9250 rpm,V12最大扭矩 700 Nm 6750 rpm,电机输出 120 Kw (163 CV)二氧化碳排放量 330 g/km,售价2250万 | ||
</view> | ||
<view class="weui-article__p"> | ||
<image class="weui-article__img" src="/pages/image/7.jpg" mode="aspectFit" style="height: 180px" /> | ||
</view> | ||
</view> | ||
|
||
|
||
</view> | ||
</view> | ||
</view> | ||
</view> |
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,6 @@ | ||
page{ | ||
background-color: #FFFFFF; | ||
} | ||
image{ | ||
margin: 4px 0; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.
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,8 @@ | ||
var base64 = require("../images/base64"); | ||
Page({ | ||
onLoad: function(){ | ||
this.setData({ | ||
icon: base64.icon20 | ||
}); | ||
} | ||
}); |
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 @@ | ||
{} |
Oops, something went wrong.