Skip to content

Commit

Permalink
hzuapps#84 期末作业
Browse files Browse the repository at this point in the history
  • Loading branch information
liangfenghan committed Nov 1, 2017
1 parent c27e2d0 commit 81cebf4
Show file tree
Hide file tree
Showing 51 changed files with 718 additions and 0 deletions.
39 changes: 39 additions & 0 deletions 1517060338/app.js
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
}
})
42 changes: 42 additions & 0 deletions 1517060338/app.json
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/a/a",
"pages/example/qqweq/qqweq",
"pages/fm/fm"

],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#006cff",
"navigationBarTitleText": "郑昊",
"navigationBarTextStyle": "while"
},
"tabBar": {
"color": "#ffffff",
"backgroundColor": "#006cff",

"list": [
{
"selectedIconPath": "pages/image/14.png",
"iconPath": "pages/image/13.png",
"pagePath": "pages/index/index",
"text": "首页"
},
{
"pagePath": "pages/comp/scroll",
"selectedIconPath": "pages/image/14.png",
"iconPath": "pages/image/13.png",
"text": "角色介绍"
},
{
"pagePath": "pages/form/form",
"selectedIconPath": "pages/image/14.png",
"iconPath": "pages/image/13.png",
"text": "提交"
}
]
}
}
12 changes: 12 additions & 0 deletions 1517060338/app.wxss
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;

}
121 changes: 121 additions & 0 deletions 1517060338/pages/comp/scroll.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
// pages/comp/scroll.js
var base64 = require("../example/images/base64");

Page({

/**
* 页面的初始数据
*/
data: {
isEnd: true,
messages: [{
image:"/pages/image/t0.jpg",
name: "达拉斯",
last: "Dallas"
}, {
image: "/pages/image/t1.jpg",
name: "沃尔夫",
last: "Wolf"
}, {
image: "/pages/image/t2.jpg",
name: "钱恩斯",
last: "Chains"
}, {
image: "/pages/image/t3.jpg",
name: "休斯顿",
last: "Mage"
}, {
image: "/pages/image/t4.jpg",
name: "约翰·威克",
last: "John Wick"
}, {
image: "/pages/image/t5.jpg",
name: "霍斯顿",
last: "Hoxton"
}, {
image: "/pages/image/t6.jpg",
name: "克洛芙",
last: "Clover"
}, {
image: "/pages/image/t7.jpg",
name: "德拉甘",
last: "Dragan"
}]
},

/**
* 生命周期函数--监听页面加载
*/
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."
}]) */
});

}
})
23 changes: 23 additions & 0 deletions 1517060338/pages/comp/scroll.wxml
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>
1 change: 1 addition & 0 deletions 1517060338/pages/comp/scroll.wxss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* pages/comp/scroll.wxss */
1 change: 1 addition & 0 deletions 1517060338/pages/example/a/a.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Page({});
1 change: 1 addition & 0 deletions 1517060338/pages/example/a/a.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
95 changes: 95 additions & 0 deletions 1517060338/pages/example/a/a.wxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<view class="page">
<view class="page__hd">
<view class="page__title">合约提供者</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">贝恩(Bain)</view>
<view class="weui-article__p">Crime.net的幕后主使。没有任何一个人,甚至就连四人组成员都没有见过贝恩的真容。他和线人通过精心安排的秘密渠道联系,以确保所有方面所承受的风险尽可能低。
</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">弗拉德(Vlad)</view>
<view class="weui-article__p">弗拉德是个乌克兰人在俄罗斯时曾经是一个可怕的暴徒,现在他离开地盘多年,在华盛顿做着敲诈和犯罪的买卖。
</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">赫克特(Hector)</view>
<view class="weui-article__p">赫克特是一位注重细节的前业务管理员,而现在是东海岸最大的毒品贩子,也是墨西哥锡那罗亚帮派的下任领袖。查明为出卖霍斯顿的叛徒,现已被击毙。
</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">“大象”(The Elephant)</view>
<view class="weui-article__p">约翰·亨利·西蒙斯(John Henry Simmons),被媒体称为“大象”。一个肮脏的共和国会议员,通过各种神秘得到关系达到了权力的高峰。
</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">盖奇(Gage)</view>
<view class="weui-article__p">盖奇是一名参与过阿富汗战争的老兵,以推着轮椅完成各种暗杀而闻名。他是这片地区最大的军火商-----同时也是一名暗杀好手。必要时,它将成为你们的得力帮手。
</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">牙医(The Dentist)</view>
<view class="weui-article__p">“牙医"其人,知之甚少。他把客户视为自己的病人。他态度坚决,计划周密,并且对PAYDAY帮很有兴趣。最重要的是,只有他有办法救出霍斯顿。
</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">屠夫(The Butcher)</view>
<view class="weui-article__p">屠夫是一名军火贩子,从事着各类军火的采购,贩卖和中转运输。由于盖奇正在“度长假”,她想借此时机与贝恩和PAYDAY帮建立长期稳定的合作关系。
</view>
<view class="weui-article__p">
<image class="weui-article__img" src="/pages/image/7.jpg" mode="aspectFit" style="height: 180px" />
</view>
</view>
<view class="weui-article__section">
<view class="weui-article__h3">洛克(Locke)</view>
<view class="weui-article__p">生于南非,受教于林肯实验室(Lincoln Lab),受训于军情五处(MI5),现在受雇于“黑水”(Murkywater)集团。弗农·洛克(Vernon Locke)是特别网络行动组(Special Cyberwarfare Division)的领导,负责执行渗透Crime.net的任务。洛克成功完成目标,然而他将这是为一个机会,并与贝恩和PAYDAY帮接触。条件是什么?为他工作,否则他就让Crime.net永远消失。
</view>
<view class="weui-article__p">
<image class="weui-article__img" src="/pages/image/8.jpg" mode="aspectFit" style="height: 180px" />
</view>
</view>
<view class="weui-article__section">
<view class="weui-article__h3">吉米(Jimmy)</view>
<view class="weui-article__p">不得不承认,一开始我对他持非常怀疑的态度,但吉米的能力却胜过任何一个人,是一个拥有Crime.Net能力的劫匪。
他什么都做,不会拒绝任何一项合约行动,总把每天当成他人生的最后一天来过。他十分忠诚,我从未想过他能够证明自己是我们所需要的一位十分出色的新成员
</view>
<view class="weui-article__p">
<image class="weui-article__img" src="/pages/image/9.jpg" mode="aspectFit" style="height: 180px" />
</view>
</view>
<view class="weui-article__section">
<view class="weui-article__h3">欧陆集团(The Continental)</view>
<view class="weui-article__p">欧陆集团是个神秘的机构,一座酒店同时为职业杀手以及其他步入黑暗之人的避风港。有时候欧陆集团会需要一些服务,特殊天赋的服务。这是PAYDAY帮牵扯进来的原因。
</view>
<view class="weui-article__p">
<image class="weui-article__img" src="/pages/image/10.jpg" mode="aspectFit" style="height: 180px" />
</view>


</view>

</view>
</view>
</view>
</view>
6 changes: 6 additions & 0 deletions 1517060338/pages/example/a/a.wxss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
page{
background-color: #FFFFFF;
}
image{
margin: 4px 0;
}
1 change: 1 addition & 0 deletions 1517060338/pages/example/q/q.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Page({});
1 change: 1 addition & 0 deletions 1517060338/pages/example/q/q.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Loading

0 comments on commit 81cebf4

Please sign in to comment.