Skip to content

Commit

Permalink
First Commit😃
Browse files Browse the repository at this point in the history
  • Loading branch information
fchange committed Apr 20, 2018
1 parent b3a1e79 commit 92c6dbd
Show file tree
Hide file tree
Showing 58 changed files with 1,712 additions and 73 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module.exports = {
settings: {
'html/html-extensions': ['.html', '.wpy']
},
globals: { wx: true },
// add your custom rules here
'rules': {
// allow paren-less arrow functions
Expand Down
2 changes: 1 addition & 1 deletion .wepycache
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\wepy\\lib\\wepy.js":1519786782000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\wepy-async-function\\index.js":1523427808000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\wepy-com-toast\\toast.wpy":1488432898000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\wepy\\lib\\app.js":1519786782000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\wepy\\lib\\page.js":1519786782000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\wepy\\lib\\component.js":1519786782000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\wepy\\lib\\event.js":1519786782000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\wepy\\lib\\base.js":1519786782000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\wepy\\lib\\util.js":1519786782000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\wepy\\lib\\mixin.js":1519786782000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\wepy-async-function\\global.js":1517302333000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\promise-polyfill\\promise.js":1511627065000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\regenerator-runtime\\runtime.js":1493390741000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\wepy\\lib\\native.js":1519786782000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\promise-polyfill\\lib\\index.js":1522935528000}
{"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\wepy\\lib\\wepy.js":1519786782000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\wepy-async-function\\index.js":1523427808000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\wepy-com-toast\\toast.wpy":1488432898000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\wepy\\lib\\app.js":1519786782000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\wepy\\lib\\page.js":1519786782000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\wepy\\lib\\component.js":1519786782000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\wepy\\lib\\event.js":1519786782000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\wepy\\lib\\base.js":1519786782000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\wepy\\lib\\util.js":1519786782000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\wepy\\lib\\mixin.js":1519786782000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\wepy-async-function\\global.js":1517302333000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\promise-polyfill\\promise.js":1511627065000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\regenerator-runtime\\runtime.js":1493390741000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\wepy\\lib\\native.js":1519786782000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\index.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\polyfills\\index.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\av.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\underscore\\underscore.js":1524076641000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\version.js":1524040444000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\promise.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\localstorage.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\cache.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\error.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\init.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\event.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\geopoint.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\acl.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\op.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\relation.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\file.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\object.js":1524040444000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\role.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\user.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\query.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\live-query.js":1524040444000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\captcha.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\cloudfunction.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\push.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\status.js":1524040444000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\search.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\insight.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\conversation.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\ua\\index.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\utils\\index.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\es6-promise\\dist\\es6-promise.js":1516734833000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\utils\\localstorage.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\app-router.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\uploader\\cos.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\uploader\\qiniu.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\uploader\\s3.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\request.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\debug\\src\\browser.js":1506086966000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\utils\\parse-base64.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\eventemitter3\\index.js":1490518260000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\node\\ua\\comments.js":1524040442000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\superagent\\lib\\node\\index.js":1512778288000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\localstorage-memory\\lib\\localstorage-memory.js":1450031045000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\md5\\md5.js":1472679460000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\debug\\src\\debug.js":1506086966000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\formidable\\lib\\index.js":1479495729000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\form-data\\lib\\browser.js":1478555747000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\superagent\\lib\\node\\response.js":1508422429000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\crypt\\crypt.js":1322071351000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\charenc\\charenc.js":1322071344000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\is-buffer\\index.js":1508966858000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\ms\\index.js":1494937320000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\formidable\\lib\\incoming_form.js":1521559793000,"E:\\XiaoChengXuWORKSPAC\\WhereIsMyBook\\node_modules\\leancloud-storage\\dist\\av-weapp-min.js":1524040444000}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mybook",
"name": "whereismybook",
"version": "0.0.1",
"description": "where is my book?",
"description": "find book",
"main": "dist/app.js",
"scripts": {
"dev": "wepy build --watch",
Expand All @@ -18,8 +18,7 @@
"license": "MIT",
"dependencies": {
"leancloud-storage": "^3.6.6",
"promise-polyfill": "^7.1.2",
"wepy": "^1.6.0",
"wepy": "^1.7.1",
"wepy-async-function": "^1.4.4",
"wepy-com-toast": "^1.0.2"
},
Expand All @@ -39,6 +38,7 @@
"eslint-plugin-standard": "^2.0.1",
"wepy-eslint": "^1.5.3",
"wepy-compiler-babel": "^1.5.1",
"wepy-compiler-less": "^1.3.10"
"wepy-compiler-less": "^1.3.10",
"leancloud-storage": "^3.6.6"
}
}
4 changes: 2 additions & 2 deletions project.config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"description": "where is my book?",
"description": "find book",
"setting": {
"urlCheck": true,
"es6": false,
Expand All @@ -8,6 +8,6 @@
},
"compileType": "miniprogram",
"appid": "wxb2539ea4ae6b9fc8",
"projectname": "mybook",
"projectname": "whereismybook",
"miniprogramRoot": "./dist"
}
22 changes: 17 additions & 5 deletions src/app.wpy
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<style lang="less">
@import "./style/weui.less";
.container {
height: 100%;
display: flex;
Expand All @@ -11,13 +12,17 @@

<script>
import wepy from 'wepy'
import Promise from 'promise-polyfill'
import 'wepy-async-function'

export default class extends wepy.app {
config = {
pages: [
'pages/indexx'
'pages/Rooms',
'pages/CreateRoom',
'pages/SearchRoom',
'pages/RoomDetail',
'pages/Room',
'pages/SearchBook'
],
window: {
backgroundTextStyle: 'light',
Expand All @@ -28,17 +33,23 @@ export default class extends wepy.app {
}

globalData = {
userInfo: null
userInfo: null,
APP_ID: 'Xq590guTvJr5nnSg8BwD4mnS-gzGzoHsz',
APP_KEY: 'JSj6886BVNuyRMBxm4bnYfas',
AV: null
}

constructor () {
super()
this.use('requestfix')
this.use('promisify')
}

onLaunch() {
this.testAsync()
this.globalData.AV = require('leancloud-storage')
this.globalData.AV.init({
appId: this.globalData.APP_ID,
appKey: this.globalData.APP_KEY
})
}

sleep (s) {
Expand All @@ -62,6 +73,7 @@ export default class extends wepy.app {
wepy.getUserInfo({
success (res) {
that.globalData.userInfo = res.userInfo
console.log(res.signature)
cb && cb(res.userInfo)
}
})
Expand Down
63 changes: 63 additions & 0 deletions src/components/FAB.wpy
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<style lang="less">
@import '../style/FAB.less';
</style>

<template>
<view class="wux-backdrop--transparent" wx:if="{{ opened }}"></view>
<view class="wux-speed-dial {{ className }} {{ opened ? 'wux-speed-dial--opened' : '' }}" @tap="toggle">
<view class="wux-speed-dial__action" hover-class="wux-speed-dial__action--hover">
<text class="wux-speed-dial__text"></text>
</view>
<view class="wux-speed-dial__buttons" wx:if="{{ opts.buttons.length }}">
<block wx:for="{{ opts.buttons }}" wx:key="">
<view class="wux-speed-dial__button" data-index="{{ index }}" data-label="{{ item.label }}" @tap="buttonClicked" hover-class="wux-speed-dial__button--hover">
<image class="wux-speed-dial__icon" src="{{ item.icon }}" />
</view>
</block>
</view>
</view>
</template>

<script>
import wepy from 'wepy'

export default class Group extends wepy.component {
props = {
opts: {}
}
customData = {
positionCss: {
'topLeft': `wux-speed-dial--top-left`,
'topRight': `wux-speed-dial--top-right`,
'bottomLeft': `wux-speed-dial--bottom-left`,
'bottomRight': `wux-speed-dial--bottom-right`
}
}
data = {
className: `wux-speed-dial--bottom-left`,
opened: false,
animateCss: undefined,
visible: true
}
methods = {
buttonClicked (e) {
const index = e.currentTarget.dataset.index
if (this.opts.buttonClicked && this.opts.buttonClicked(index, this.opts.buttons[index])) {
this.opened = !this.opened
this.$apply()
}
},
toggle () {
this.opened = !this.opened
if (this.opts.callback && typeof this.opts.callback === `function`) {
this.opts.callback(this, this.opened)
}
}
}
onLoad () {
if (this.opts && this.opts.position) {
this.className = this.customData.positionCss[this.opts.position]
}
}
}
</script>
21 changes: 0 additions & 21 deletions src/index.template.html

This file was deleted.

24 changes: 0 additions & 24 deletions src/js/AV.js

This file was deleted.

23 changes: 23 additions & 0 deletions src/pages/CreateRoom.wpy
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<style lang="less">
</style>
<template>

</template>

<script>
import wepy from 'wepy'

export default class CreateRoom extends wepy.page {
config = {
navigationBarTitleText: '创建房间'
}
data = {
}
methods = {
}
events = {
}
onLoad() {
}
}
</script>
13 changes: 4 additions & 9 deletions src/pages/indexx.wpy → src/pages/Room.wpy
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
<style lang="less">

</style>
<template>

</template>

<script>

export default class Index extends wepy.page {
import wepy from 'wepy'

export default class Room extends wepy.page {
config = {
navigationBarTitleText: '我的书呢🤔'
navigationBarTitleText: '房间'
}

data = {
mynum: 20
}

methods = {
}

events = {
}

onLoad() {
}
}
Expand Down
24 changes: 24 additions & 0 deletions src/pages/RoomDetail.wpy
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<style lang="less">
</style>
<template>

</template>

<script>
import wepy from 'wepy'

export default class RoomDetail extends wepy.page {
config = {
navigationBarTitleText: '房间详情'
}
data = {
}
methods = {
}
events = {
}
onLoad(option) {
console.log(option)
}
}
</script>
Loading

0 comments on commit 92c6dbd

Please sign in to comment.