-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #155 from CCCCJQ/master
- Loading branch information
Showing
40 changed files
with
676 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": "#CD0000", | ||
"navigationBarTitleText": "陈建权", | ||
"navigationBarTextStyle": "while" | ||
}, | ||
"tabBar": { | ||
"color": "#ffffff", | ||
"backgroundColor": "#CD0000", | ||
|
||
"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": "提交" | ||
} | ||
] | ||
} | ||
} |
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: "草帽海贼团", | ||
last: "caomaohaizeituan" | ||
}, { | ||
image: "/pages/image/t1.jpg", | ||
name: "四皇", | ||
last: "sihuang" | ||
}, { | ||
image: "/pages/image/t2.jpg", | ||
name: "王下七武海", | ||
last: "qiwuhai" | ||
}, { | ||
image: "/pages/image/t3.jpg", | ||
name: "极恶的世代", | ||
last: "jiedeshidai" | ||
}, { | ||
image: "/pages/image/t4.jpg", | ||
name: "海军", | ||
last: "haijun" | ||
}, { | ||
image: "/pages/image/t5.jpg", | ||
name: "革命军", | ||
last: "genmingjun" | ||
}] | ||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面加载 | ||
*/ | ||
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,90 @@ | ||
<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">船长 “草帽”蒙奇·D·路飞</view> | ||
<view class="weui-article__p">由于他的标志性特征是一顶草帽,因此常被直接称呼为“草帽”。梦想是找到传说中的ONE PIECE,成为海贼王。性格积极乐观,爱憎分明且十分重视伙伴,对任何危险的事物都超感兴趣。看似白痴,却是一个大智若愚型的无愧船长之职的人。和其他传统的海贼所不同的是,他并不会为了追求财富而无故杀戮,而是享受着身为海贼的冒险。 | ||
</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">爱喝酒,爱睡觉,讲义气,海贼第一超级大路痴。为了小时候与挚友的约定而踏上了前往世界第一剑士的道路,随后成为路飞出海后遇到的第一个伙伴。在初次败给世界第一剑士“鹰眼米霍克”后向路飞发誓永不再败,并且更加努力的锻炼自己。两年后的他成功与伙伴们汇合,并且为了实现自己的梦想,奔赴强者如云的新世界。 | ||
</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">拥有橘色的短发(两年后为波浪长发)和左肩的刺青(风车与橘子的图案)。使用棍术,现在武器为“魔法天候棒”。头脑聪明又机灵,精通气象学和航海术,擅长偷术,能用身体感知天气,完美指示航路,是个能精确画出航海图的天才航海士。本质上是个细心、善良、重视感情、嫉恶如仇、偶尔有些温柔的能干的女性。最喜欢钱和橘子,梦想是要画出全世界的地图。 | ||
</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">狙击手 “GOD”▪乌索普</view> | ||
<view class="weui-article__p">常特征为头戴狙击防风镜、浅啡色头巾,长鼻子。先前武器为弹弓“银河小弹珠”,后武器为提高了攻击性和准确度的独角仙弹弓,并用空岛的各种贝进行了强化。两年后武器为弹弓“黑兜”,并发射产自波音列岛的植物种子POP GREEN。小时候是出名的吹牛大王,和村里的几个孩子组成“乌索普海贼团”,自称乌索普船长。发现克洛船长的阴谋后,立志要保护村里的人,和路飞并肩作战。梦想是要成为勇敢的海上战士。 | ||
</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">金发,有着卷曲眉毛,永远遮住半边脸的家伙,香烟不离口,最爱女人,很花心但很有风度,海贼中的绅士。小时候跟随大海贼红脚哲普学习厨艺。踢技以快准狠被海军称之为“黑足”。遵守“骑士道精神”,从不愿意伤害任何的女性,哪怕是敌人。梦想是找到传说之海All Blue而跟随路飞一同进入了伟大航路。 | ||
</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">原为磁鼓岛Dr.库蕾哈医生最宠爱的驯鹿兼医疗助手。乔巴的恩人是“庸医”希鲁鲁克医生,他身为野生驯鹿时本来没有名字,“乔巴”也是由希鲁鲁克给他命名的,意思是他有一对连树木都可以轻松砍倒的角。 | ||
乔巴的特征是蓝色的鼻子和一顶画有“X”标记的粉红色帽子。本身很怕热,所以喜欢的岛屿是春天的冬岛。是草帽海贼团年龄最小的成员。人兽型的姿态下,则是伙伴中身材最矮小的成员。其梦想是成为“万能药”。(不管什么病都能治的医生) | ||
</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">年仅8岁就被悬赏千万的奥哈拉幸存者。在巴洛克解散后,加入草帽海贼团。个性冷静,擅长考古学以及暗杀,学识渊博,对于世界政府、海盗、航海一事都知道的很详细。目标是找到真正的历史正文,绝不饶恕践踏历史文物的人。 | ||
</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">船工 “改造人”弗兰奇</view> | ||
<view class="weui-article__p">性格豪放,喜欢唱歌,跳奇怪的舞,下身喜欢只穿一条短裤。身为改造人的弗兰奇,身体藏着各种兵器。弗兰奇在被CP9抓入司法岛的过程中被路飞他们救罗宾的精神所感动,义无返顾的站在路飞他们一边。司法岛事件结束后,弗兰奇用宝树亚当的材料建造了一艘梦想之船,取名“桑尼号(即万里阳光号)”,并赠送给草帽海贼团。后来在路飞的邀请下进入了草帽海贼团。 | ||
弗兰奇本来是想制造出梦想之船,但“桑尼号”完成后,只想看到自己制造的船能到达世界尽头。 | ||
</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">音乐家 “鼻歌”&“灵魂之王”布鲁克</view> | ||
<view class="weui-article__p">原本是某国护卫队团长,后加入伦巴海贼团,50年前跟鲸鱼拉布约定在“双子峡”重逢。后来在魔幻三角地带遇到敌人并遭遇毒手,因黄泉果实的能力,灵魂走出黄泉并准备回身体时,在魔幻三角地带迷路一年,找到的身体已变成骷髅,但爆炸头仍然存在,自此他只能以骷髅状态生存。幽灵岛战役结束后,从路飞口中得知伙伴拉布现在平安无事的消息,为了履行和拉布的约定,才正式加入草帽海贼团。 | ||
</view> | ||
<view class="weui-article__p"> | ||
<image class="weui-article__img" src="/pages/image/9.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; | ||
} |
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,25 @@ | ||
<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">东海</view> | ||
</view> | ||
<view class="weui-article__section"> | ||
<view class="weui-article__h3">北海</view> | ||
</view> | ||
<view class="weui-article__section"> | ||
<view class="weui-article__h3">南海</view> | ||
</view> | ||
<view class="weui-article__section"> | ||
<view class="weui-article__h3">西海</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; | ||
} |
Oops, something went wrong.