Showing preview only (2,524K chars total). Download the full file or copy to clipboard to get everything.
Repository: yefangyong/ofo
Branch: master
Commit: 1cd2db9ed876
Files: 343
Total size: 2.2 MB
Directory structure:
gitextract_m6p0u8d2/
├── .gitignore
├── .travis.yml
├── LICENSE.txt
├── README.md
├── application/
│ ├── .htaccess
│ ├── admin/
│ │ ├── config.php
│ │ ├── controller/
│ │ │ ├── Base.php
│ │ │ ├── Bike.php
│ │ │ ├── Charge.php
│ │ │ ├── Index.php
│ │ │ ├── Record.php
│ │ │ ├── Trouble.php
│ │ │ └── User.php
│ │ ├── model/
│ │ │ ├── Bike.php
│ │ │ ├── BikeTrouble.php
│ │ │ ├── Charge.php
│ │ │ ├── Record.php
│ │ │ ├── TroubleCate.php
│ │ │ ├── TroubleRecord.php
│ │ │ └── User.php
│ │ └── view/
│ │ ├── bike/
│ │ │ ├── add.html
│ │ │ └── index.html
│ │ ├── charge/
│ │ │ └── index.html
│ │ ├── index/
│ │ │ └── index.html
│ │ ├── public/
│ │ │ ├── footer.html
│ │ │ ├── header.html
│ │ │ └── menu.html
│ │ ├── record/
│ │ │ └── index.html
│ │ ├── trouble/
│ │ │ ├── add.html
│ │ │ ├── index.html
│ │ │ └── troublecate.html
│ │ └── user/
│ │ └── index.html
│ ├── api/
│ │ ├── controller/
│ │ │ └── v1/
│ │ │ ├── Base.php
│ │ │ ├── Bike.php
│ │ │ ├── Token.php
│ │ │ ├── TroubleCate.php
│ │ │ ├── TroubleRecord.php
│ │ │ └── User.php
│ │ ├── model/
│ │ │ ├── Base.php
│ │ │ ├── Bike.php
│ │ │ ├── BikeTrouble.php
│ │ │ ├── Charge.php
│ │ │ ├── Record.php
│ │ │ ├── TroubleCate.php
│ │ │ ├── TroubleRecord.php
│ │ │ └── User.php
│ │ ├── service/
│ │ │ ├── Token.php
│ │ │ └── UserToken.php
│ │ └── validate/
│ │ ├── AddressNews.php
│ │ ├── AppTokenGet.php
│ │ ├── BaseValidate.php
│ │ ├── Count.php
│ │ ├── IDCollection.php
│ │ ├── IsMustBePostiveInt.php
│ │ ├── OrderPlace.php
│ │ ├── PagingParameter.php
│ │ └── TokenGet.php
│ ├── command.php
│ ├── common.php
│ ├── config.php
│ ├── database.php
│ ├── extra/
│ │ ├── map.php
│ │ ├── pagination.php
│ │ ├── queue.php
│ │ ├── redis.php
│ │ ├── secure.php
│ │ ├── setting.php
│ │ ├── tx.php
│ │ └── wx.php
│ ├── index/
│ │ └── controller/
│ │ └── Index.php
│ ├── lib/
│ │ └── exception/
│ │ ├── BaseException.php
│ │ ├── BikeException.php
│ │ ├── ExceptionHandler.php
│ │ ├── ParameterException.php
│ │ ├── SuccessMessage.php
│ │ ├── TokenException.php
│ │ ├── UserException.php
│ │ └── WxChatException.php
│ ├── route.php
│ └── tags.php
├── build.php
├── composer.json
├── extend/
│ ├── .gitignore
│ ├── Map.php
│ ├── My/
│ │ └── RedisPackage.php
│ ├── TxMap.php
│ └── Weixin.php
├── ofo 无微信支付/
│ ├── README.md
│ ├── app.js
│ ├── app.json
│ ├── app.wxss
│ ├── pages/
│ │ ├── billing/
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ ├── charge/
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ ├── index/
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ ├── input/
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ ├── logs/
│ │ │ ├── logs.js
│ │ │ ├── logs.json
│ │ │ ├── logs.wxml
│ │ │ └── logs.wxss
│ │ ├── my/
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ ├── pay/
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ ├── scanresult/
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ ├── unlock/
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ ├── wallet/
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ └── warn/
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── project.config.json
│ └── utils/
│ ├── av-weapp-min.js
│ ├── base.js
│ ├── config.js
│ └── util.js
├── phpunit.xml
├── public/
│ ├── .htaccess
│ ├── index.php
│ ├── robots.txt
│ ├── router.php
│ └── static/
│ ├── .gitignore
│ ├── admin/
│ │ ├── common.css
│ │ └── js/
│ │ ├── common.js
│ │ └── dialog.js
│ ├── h-ui/
│ │ ├── css/
│ │ │ ├── H-ui.css
│ │ │ ├── H-ui.ie.css
│ │ │ └── H-ui.reset.css
│ │ └── js/
│ │ └── H-ui.js
│ ├── h-ui.admin/
│ │ ├── css/
│ │ │ ├── H-ui.admin.css
│ │ │ ├── H-ui.login.css
│ │ │ └── style.css
│ │ ├── js/
│ │ │ ├── H-ui.admin.js
│ │ │ └── de_DE.txt
│ │ └── skin/
│ │ ├── blue/
│ │ │ └── skin.css
│ │ ├── default/
│ │ │ └── skin.css
│ │ ├── green/
│ │ │ └── skin.css
│ │ ├── orange/
│ │ │ └── skin.css
│ │ ├── red/
│ │ │ └── skin.css
│ │ └── yellow/
│ │ └── skin.css
│ ├── js/
│ │ ├── common.js
│ │ ├── login.js
│ │ └── order.js
│ └── lib/
│ ├── DD_belatedPNG_0.0.8a-min.js
│ ├── Hui-iconfont/
│ │ └── 1.0.8/
│ │ ├── demo.html
│ │ └── iconfont.css
│ ├── html5shiv.js
│ ├── jquery/
│ │ └── 1.9.1/
│ │ └── jquery.js
│ └── layer/
│ └── 2.4/
│ ├── layer.js
│ └── skin/
│ └── layer.css
├── runtime/
│ └── .gitignore
├── tests/
│ ├── ExampleTest.php
│ └── TestCase.php
├── think
├── thinkphp/
│ ├── .gitignore
│ ├── .htaccess
│ ├── .travis.yml
│ ├── CONTRIBUTING.md
│ ├── LICENSE.txt
│ ├── README.md
│ ├── base.php
│ ├── codecov.yml
│ ├── composer.json
│ ├── console.php
│ ├── convention.php
│ ├── helper.php
│ ├── lang/
│ │ └── zh-cn.php
│ ├── library/
│ │ ├── think/
│ │ │ ├── App.php
│ │ │ ├── Build.php
│ │ │ ├── Cache.php
│ │ │ ├── Collection.php
│ │ │ ├── Config.php
│ │ │ ├── Console.php
│ │ │ ├── Controller.php
│ │ │ ├── Cookie.php
│ │ │ ├── Db.php
│ │ │ ├── Debug.php
│ │ │ ├── Env.php
│ │ │ ├── Error.php
│ │ │ ├── Exception.php
│ │ │ ├── File.php
│ │ │ ├── Hook.php
│ │ │ ├── Lang.php
│ │ │ ├── Loader.php
│ │ │ ├── Log.php
│ │ │ ├── Model.php
│ │ │ ├── Paginator.php
│ │ │ ├── Process.php
│ │ │ ├── Request.php
│ │ │ ├── Response.php
│ │ │ ├── Route.php
│ │ │ ├── Session.php
│ │ │ ├── Template.php
│ │ │ ├── Url.php
│ │ │ ├── Validate.php
│ │ │ ├── View.php
│ │ │ ├── cache/
│ │ │ │ ├── Driver.php
│ │ │ │ └── driver/
│ │ │ │ ├── File.php
│ │ │ │ ├── Lite.php
│ │ │ │ ├── Memcache.php
│ │ │ │ ├── Memcached.php
│ │ │ │ ├── Redis.php
│ │ │ │ ├── Sqlite.php
│ │ │ │ ├── Wincache.php
│ │ │ │ └── Xcache.php
│ │ │ ├── config/
│ │ │ │ └── driver/
│ │ │ │ ├── Ini.php
│ │ │ │ ├── Json.php
│ │ │ │ └── Xml.php
│ │ │ ├── console/
│ │ │ │ ├── Command.php
│ │ │ │ ├── Input.php
│ │ │ │ ├── LICENSE
│ │ │ │ ├── Output.php
│ │ │ │ ├── bin/
│ │ │ │ │ └── README.md
│ │ │ │ ├── command/
│ │ │ │ │ ├── Build.php
│ │ │ │ │ ├── Clear.php
│ │ │ │ │ ├── Help.php
│ │ │ │ │ ├── Lists.php
│ │ │ │ │ ├── Make.php
│ │ │ │ │ ├── make/
│ │ │ │ │ │ ├── Controller.php
│ │ │ │ │ │ ├── Model.php
│ │ │ │ │ │ └── stubs/
│ │ │ │ │ │ ├── controller.plain.stub
│ │ │ │ │ │ ├── controller.stub
│ │ │ │ │ │ └── model.stub
│ │ │ │ │ └── optimize/
│ │ │ │ │ ├── Autoload.php
│ │ │ │ │ ├── Config.php
│ │ │ │ │ ├── Route.php
│ │ │ │ │ └── Schema.php
│ │ │ │ ├── input/
│ │ │ │ │ ├── Argument.php
│ │ │ │ │ ├── Definition.php
│ │ │ │ │ └── Option.php
│ │ │ │ └── output/
│ │ │ │ ├── Ask.php
│ │ │ │ ├── Descriptor.php
│ │ │ │ ├── Formatter.php
│ │ │ │ ├── Question.php
│ │ │ │ ├── descriptor/
│ │ │ │ │ └── Console.php
│ │ │ │ ├── driver/
│ │ │ │ │ ├── Buffer.php
│ │ │ │ │ ├── Console.php
│ │ │ │ │ └── Nothing.php
│ │ │ │ ├── formatter/
│ │ │ │ │ ├── Stack.php
│ │ │ │ │ └── Style.php
│ │ │ │ └── question/
│ │ │ │ ├── Choice.php
│ │ │ │ └── Confirmation.php
│ │ │ ├── controller/
│ │ │ │ ├── Rest.php
│ │ │ │ └── Yar.php
│ │ │ ├── db/
│ │ │ │ ├── Builder.php
│ │ │ │ ├── Connection.php
│ │ │ │ ├── Query.php
│ │ │ │ ├── builder/
│ │ │ │ │ ├── Mysql.php
│ │ │ │ │ ├── Pgsql.php
│ │ │ │ │ ├── Sqlite.php
│ │ │ │ │ └── Sqlsrv.php
│ │ │ │ ├── connector/
│ │ │ │ │ ├── Mysql.php
│ │ │ │ │ ├── Pgsql.php
│ │ │ │ │ ├── Sqlite.php
│ │ │ │ │ ├── Sqlsrv.php
│ │ │ │ │ └── pgsql.sql
│ │ │ │ └── exception/
│ │ │ │ ├── BindParamException.php
│ │ │ │ ├── DataNotFoundException.php
│ │ │ │ └── ModelNotFoundException.php
│ │ │ ├── debug/
│ │ │ │ ├── Console.php
│ │ │ │ └── Html.php
│ │ │ ├── exception/
│ │ │ │ ├── ClassNotFoundException.php
│ │ │ │ ├── DbException.php
│ │ │ │ ├── ErrorException.php
│ │ │ │ ├── Handle.php
│ │ │ │ ├── HttpException.php
│ │ │ │ ├── HttpResponseException.php
│ │ │ │ ├── PDOException.php
│ │ │ │ ├── RouteNotFoundException.php
│ │ │ │ ├── TemplateNotFoundException.php
│ │ │ │ ├── ThrowableError.php
│ │ │ │ └── ValidateException.php
│ │ │ ├── log/
│ │ │ │ └── driver/
│ │ │ │ ├── File.php
│ │ │ │ ├── Socket.php
│ │ │ │ └── Test.php
│ │ │ ├── model/
│ │ │ │ ├── Collection.php
│ │ │ │ ├── Merge.php
│ │ │ │ ├── Pivot.php
│ │ │ │ ├── Relation.php
│ │ │ │ └── relation/
│ │ │ │ ├── BelongsTo.php
│ │ │ │ ├── BelongsToMany.php
│ │ │ │ ├── HasMany.php
│ │ │ │ ├── HasManyThrough.php
│ │ │ │ ├── HasOne.php
│ │ │ │ ├── MorphMany.php
│ │ │ │ ├── MorphOne.php
│ │ │ │ ├── MorphTo.php
│ │ │ │ └── OneToOne.php
│ │ │ ├── paginator/
│ │ │ │ └── driver/
│ │ │ │ └── Bootstrap.php
│ │ │ ├── process/
│ │ │ │ ├── Builder.php
│ │ │ │ ├── Utils.php
│ │ │ │ ├── exception/
│ │ │ │ │ ├── Failed.php
│ │ │ │ │ └── Timeout.php
│ │ │ │ └── pipes/
│ │ │ │ ├── Pipes.php
│ │ │ │ ├── Unix.php
│ │ │ │ └── Windows.php
│ │ │ ├── response/
│ │ │ │ ├── Json.php
│ │ │ │ ├── Jsonp.php
│ │ │ │ ├── Redirect.php
│ │ │ │ ├── View.php
│ │ │ │ └── Xml.php
│ │ │ ├── session/
│ │ │ │ └── driver/
│ │ │ │ ├── Memcache.php
│ │ │ │ ├── Memcached.php
│ │ │ │ └── Redis.php
│ │ │ ├── template/
│ │ │ │ ├── TagLib.php
│ │ │ │ ├── driver/
│ │ │ │ │ └── File.php
│ │ │ │ └── taglib/
│ │ │ │ └── Cx.php
│ │ │ └── view/
│ │ │ └── driver/
│ │ │ ├── Php.php
│ │ │ └── Think.php
│ │ └── traits/
│ │ ├── controller/
│ │ │ └── Jump.php
│ │ ├── model/
│ │ │ └── SoftDelete.php
│ │ └── think/
│ │ └── Instance.php
│ ├── phpunit.xml
│ ├── start.php
│ └── tpl/
│ ├── default_index.tpl
│ ├── dispatch_jump.tpl
│ ├── page_trace.tpl
│ └── think_exception.tpl
└── vendor/
└── .gitignore
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
.idea
composer.lock
*.log
================================================
FILE: .travis.yml
================================================
sudo: false
language: php
branches:
only:
- stable
cache:
directories:
- $HOME/.composer/cache
before_install:
- composer self-update
install:
- composer install --no-dev --no-interaction --ignore-platform-reqs
- zip -r --exclude='*.git*' --exclude='*.zip' --exclude='*.travis.yml' ThinkPHP_Core.zip .
- composer require --update-no-dev --no-interaction "topthink/think-image:^1.0"
- composer require --update-no-dev --no-interaction "topthink/think-migration:^1.0"
- composer require --update-no-dev --no-interaction "topthink/think-captcha:^1.0"
- composer require --update-no-dev --no-interaction "topthink/think-mongo:^1.0"
- composer require --update-no-dev --no-interaction "topthink/think-worker:^1.0"
- composer require --update-no-dev --no-interaction "topthink/think-helper:^1.0"
- composer require --update-no-dev --no-interaction "topthink/think-queue:^1.0"
- composer require --update-no-dev --no-interaction "topthink/think-angular:^1.0"
- composer require --dev --update-no-dev --no-interaction "topthink/think-testing:^1.0"
- zip -r --exclude='*.git*' --exclude='*.zip' --exclude='*.travis.yml' ThinkPHP_Full.zip .
script:
- php think unit
deploy:
provider: releases
api_key:
secure: TSF6bnl2JYN72UQOORAJYL+CqIryP2gHVKt6grfveQ7d9rleAEoxlq6PWxbvTI4jZ5nrPpUcBUpWIJHNgVcs+bzLFtyh5THaLqm39uCgBbrW7M8rI26L8sBh/6nsdtGgdeQrO/cLu31QoTzbwuz1WfAVoCdCkOSZeXyT/CclH99qV6RYyQYqaD2wpRjrhA5O4fSsEkiPVuk0GaOogFlrQHx+C+lHnf6pa1KxEoN1A0UxxVfGX6K4y5g4WQDO5zT4bLeubkWOXK0G51XSvACDOZVIyLdjApaOFTwamPcD3S1tfvuxRWWvsCD5ljFvb2kSmx5BIBNwN80MzuBmrGIC27XLGOxyMerwKxB6DskNUO9PflKHDPI61DRq0FTy1fv70SFMSiAtUv9aJRT41NQh9iJJ0vC8dl+xcxrWIjU1GG6+l/ZcRqVx9V1VuGQsLKndGhja7SQ+X1slHl76fRq223sMOql7MFCd0vvvxVQ2V39CcFKao/LB1aPH3VhODDEyxwx6aXoTznvC/QPepgWsHOWQzKj9ftsgDbsNiyFlXL4cu8DWUty6rQy8zT2b4O8b1xjcwSUCsy+auEjBamzQkMJFNlZAIUrukL/NbUhQU37TAbwsFyz7X0E/u/VMle/nBCNAzgkMwAUjiHM6FqrKKBRWFbPrSIixjfjkCnrMEPw=
file:
- ThinkPHP_Core.zip
- ThinkPHP_Full.zip
skip_cleanup: true
on:
tags: true
================================================
FILE: LICENSE.txt
================================================
ThinkPHP遵循Apache2开源协议发布,并提供免费使用。
版权所有Copyright © 2006-2016 by ThinkPHP (http://thinkphp.cn)
All rights reserved。
ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。
Apache Licence是著名的非盈利开源组织Apache采用的协议。
该协议和BSD类似,鼓励代码共享和尊重原作者的著作权,
允许代码修改,再作为开源或商业软件发布。需要满足
的条件:
1. 需要给代码的用户一份Apache Licence ;
2. 如果你修改了代码,需要在被修改的文件中说明;
3. 在延伸的代码中(修改和有源代码衍生的代码中)需要
带有原来代码中的协议,商标,专利声明和其他原来作者规
定需要包含的说明;
4. 如果再发布的产品中包含一个Notice文件,则在Notice文
件中需要带有本协议内容。你可以在Notice中增加自己的
许可,但不可以表现为对Apache Licence构成更改。
具体的协议参考:http://www.apache.org/licenses/LICENSE-2.0
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
================================================
FILE: README.md
================================================
# 简介
本项目是采用PHP语言,THINKPHP5.0框架开发的全栈应用系统。在开发这个项目时,微信还没有OFO微信小程序,又不想下载APP去使用,只能在支付宝上面使用OFO,偶然间发现某人写了一个关于OFO的微信小程序,链接如下:给ofo小黄车撸一个微信小程序,数据是模拟的,没有数据库,没有后台,所以我基于这个前端项目,设计了数据库,提供了数据支持和后台服务。
# 项目截图

**体验版页面**

**支付页面**

**首页页面**

**用车页面**

**开锁页面**

**开锁页面**

**计费页面**

**充值页面**

**个人中心页面**

**我的钱包页面**
# ofo小程序的架构体系:

# 小程序数据从服务器到前端交互总结:

# 数据库设计:
**用户表:**
```
**user | CREATE TABLE `user` (**
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`openid` varchar(50) NOT NULL COMMENT '用户的唯一标识',
`create_time` int(11) DEFAULT NULL,
`delete_time` int(11) DEFAULT NULL,
`balance` decimal(60,2) NOT NULL COMMENT '余额',
`guarantee` decimal(60,2) NOT NULL COMMENT '保证金',
`update_time` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 |
```
**小黄车表:**
```
**| bike | CREATE TABLE `bike` (**
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`latitude` float(11,6) NOT NULL COMMENT '经度',
`is_show` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0未使用 1使用',
`longitude` float(11,6) NOT NULL COMMENT '纬度',
`password` int(11) NOT NULL COMMENT '单车密码',
`type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0正常,1故障',
`create_time` int(11) NOT NULL,
`update_time` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 |
```
**故障分类表:**
```
**| trouble_cate | CREATE TABLE `trouble_cate` (**
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(20) NOT NULL COMMENT '故障名称',
`create_time` int(11) DEFAULT NULL,
`update_time` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 |
```
**故障记录表:**
```
**| trouble_record | CREATE TABLE `trouble_record` (**
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL COMMENT '用户ID',
`bike_id` int(11) DEFAULT NULL COMMENT '单车ID',
`longitude` varchar(50) NOT NULL COMMENT '经度',
`latitude` varchar(50) NOT NULL COMMENT '纬度',
`img` varchar(50) DEFAULT NULL COMMENT '上传的图片',
`remark` varchar(50) DEFAULT NULL COMMENT '备注',
`create_time` int(11) NOT NULL,
`update_time` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 |
```
**充值表:**
```
**| charge | CREATE TABLE `charge` (**
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL COMMENT '用户ID',
`price` decimal(60,2) NOT NULL COMMENT '费用',
`type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '0为保证金 1为余额',
`create_time` int(11) NOT NULL,
`update_time` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=101 DEFAULT CHARSET=utf8 |
```
**骑行记录表:**
```
**| record | CREATE TABLE `record` (**
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`bike_id` int(11) NOT NULL COMMENT '单车ID',
`user_id` int(11) NOT NULL COMMENT '用户ID',
`end_time` int(11) NOT NULL COMMENT '结束时间',
`start_time` int(11) NOT NULL COMMENT '开始时间',
`total_price` decimal(10,0) NOT NULL COMMENT '总价格',
`start_long` varchar(50) NOT NULL COMMENT '开始经度',
`start_lati` varchar(50) NOT NULL COMMENT '开始纬度',
`end_long` varchar(50) NOT NULL COMMENT '结束经度',
`end_lati` varchar(50) NOT NULL COMMENT '结束纬度',
`create_time` int(11) NOT NULL,
`update_time` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8 |
```
# 核心知识体系
## 1.thinkphp5.0相关的知识
* TP5三大核心:路由、控制器、模型
* 以ORM的方式查询数据库
* 使用TP5验证器Validate构建整个验证层
* 开发环境和生产环境下不同的全局异常处理机制
* TP5缓存的使用
* 在TP5中使用数据库事务
## 2.微信小程序+微信支付
* 微信小程序登录状态维护
* 微信支付接入
* Class和Module面向对象的思维构建前端代码
* 体验优化
## 3.API接口的设计
* 采用RESTFul API风格
* (RESTFul API风格可参考GitHub 开发者文档)
* 返回码、URL语义、HTTP动词、错误码、异常返回
* 使用Token令牌来构建用户授权体系
* API版本控制(v1、v2)
#ofo页面逻辑和所需接口分析
## 1.首页页面逻辑与接口分析

根据效果图,很明显我们知道肯定需要一个获取单车信息的接口,接口代码如下:
```php
/**
* @return false|\PDOStatement|string|\think\Collection
* @throws BikeException
* 获取单车的位置信息
*/
public function getBicyclePosition() {
$bikes = BikeModel::getBicyclePosition();
if(!$bikes) {
throw new BikeException();
}
return $bikes;
}
```
立即用车按钮分析,首先我们需要先判断有没有登录,登录我们使用的是token令牌(**后面会在个人中心登录按钮讲下如何生成token令牌,如何利用tp5的缓存,使token令牌有有效期**),如果令牌存在,我们还得判断令牌是否有效,否则重新登录,如果验证通过,我们还得判断这个用户是否已经有押金,如果没有押金,跳到充值页面去充值,否则跳转到用车页面,根据分析,我们需要一个验证token是否有效的接口,接口代码如下,
```php
/**
* @return bool
* @throws TokenException
* 验证token
*/
public function verifyToken() {
$token = Request::instance()->header('token');
$var = Cache::get($token);
if(!$var) {
throw new TokenException([
'msg'=>'token已经过期',
'errorCode'=>10002
]);
}
return true;
}
```
我们还需要一个获取用户信息的接口,判断是否有押金,接口代码如下:
```php
/**
* @return null|static
* @throws UserException
* 获取用户的信息
*/
public function getUserInfo(){
$uid = Token::getCurrentUid();
$user = UserModel::get($uid);
if(!$user) {
throw new UserException();
}
return $user;
}
```
故障按钮分析:同样的我们需要验证是否登录,登录是否过期,否则我们跳转到登录页面。(**注意:我们需要把用户的初始位置,记录到小程序的缓存中,因为骑行记录表需要记录用户的初始位置**)
## 2.登录页面逻辑和所需接口分析
关于使用token令牌的好处,请自行百度,首先我先用一张图来说明微信小程序如何获取token:

根据效果图,我们需要获取token令牌接口,接口代码如下:
```php
/**
* @param $code
* @return array
* 获取token
*/
public function getToken($code) {
(new TokenGet())->goCheck();
$user = new UserToken($code);
$token = $user->get();
return [
'token'=>$token
];
}
```
设置token的有效期,把token存储在服务器端的缓存中,返回token,客户端获取到token,存储到缓存中,双向存储token,以后每次访问接口都携带token,更加安全,有效的防止有人伪造token获取接口的信息
## 3.个人中心页面逻辑和所需接口分析

根据效果图,点击我的钱包按钮需要跳转到我的钱包页面,我们需要一个获取用户信息的接口,接口代码如下:
```php
/**
* @return null|static
* @throws UserException
* 获取用户的信息
*/
public function getUserInfo(){
$uid = Token::getCurrentUid();
$user = UserModel::get($uid);
if(!$user) {
throw new UserException();
}
return $user;
}
```
退出登录按钮:我们需要删除本地token,跳转到登录页面
## 4.充值页面逻辑和接口分析
根据效果图:我们需要一个充值的接口,因为是个人开发,没有商户号,所以微信支付就没有做,不过其实微信支付也并不难,附上微信支付的流程:
```php
商户系统和微信支付系统主要交互说明:
步骤1:用户在商户APP中选择商品,提交订单,选择微信支付。
步骤2:商户后台收到用户支付单,调用微信支付统一下单接口。参见【[统一下单API](https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=9_1)】。
步骤3:统一下单接口返回正常的prepay_id,再按签名规范重新生成签名后,将数据传输给APP。参与签名的字段名为appid,partnerid,prepayid,noncestr,timestamp,package。注意:package的值格式为Sign=WXPay
步骤4:商户APP调起微信支付。api参见本章节【[app端开发步骤说明](https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=8_5)】
步骤5:商户后台接收支付通知。api参见【[支付结果通知API](https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=9_7)】
步骤6:商户后台查询支付结果。,api参见【[查询订单API](https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=9_2)】
```
这个接口需要注意的是,从哪个页面过来的,从首页过来的,应该就是押金充值,从我的钱包页面和支付页面过来的,就应该是余额充值,根据form不同,我们数据库充值记录表里面的type就不同,type为1代表余额充值,type为1为押金充值,接口代码如下:
```php
/**
* @param $guarantee
* 充值
*/
public function pay($from,$price) {
$type = 1;
if($from == 'index') {
$type = 0;
}else if($from == 'wallet' || $from == 'pay') {
$type = 1;
}
$uid = Token::getCurrentUid();
Db::startTrans();
try{
if($type == 1) {
$user = UserModel::get($uid);
$price = $price + $user->balance;
$result = new UserModel();
$res = $result->save(['balance'=>$price],['id'=>$uid]);
}else {
$res = UserModel::update(['guarantee'=>$price],['id'=>$uid]);
}
$rel = Charge::create([
'price'=>$price,
'type'=>$type,
'user_id'=>$uid
]);
if($rel && $res) {
Db::commit();
}
}catch (Exception $e) {
Db::rollback();
throw new UserException([
'msg'=>'充值失败'
]);
}
}
```
## 5.立即用车页面逻辑与接口分析

根据效果图,我们需要一个获取单车密码的接口,根据用户输入的ID,获取单车的信息,如果is_show为1,服务器抛出自定义的异常,单车正在被使用,type为1,单车被报修,出现故障,不能使用,单车如果不存在,抛出异常,单车不存在。获取到单车的密码后,携带密码和单车号到结果页面,接口代码如下:
```php
/**
* @param $id
* @return array|false|\PDOStatement|string|\think\Model
* @throws BikeException
* 根据单车的ID获取单车的信息
*/
public function getBikeByID($id) {
// (new IsMustBePostiveInt())->goCheck();
$bike = BikeModel::getBikeByID($id);
if(!$bike) {
throw new BikeException([
'msg'=>'该车牌号不存在'
]);
}
if($bike['is_show'] == 1){
throw new BikeException([
'msg'=>'此单车正在被使用',
'errorCode'=>10001
]);
}
if($bike['type'] == 1) {
throw new BikeException([
'msg'=>'此单车多次被报修,暂不可使用',
'errorCode'=>10002
]);
}
return $bike;
}
}
```
## 6.计时页面逻辑和接口分析

根据效果图:计时开始时,我们需要把单车的使用状态改变,改变为正在使用状态,接口代码如下:
```php
/**
* @param $id
* 修改单车的使用状态
*/
public function updateBikeStatus($type = 0,$id) {
// (new IsMustBePostiveInt())->goCheck();
if($type == 0) {
//锁定单车,单车在被使用中
$data = [
'is_show'=>1
];
}elseif ($type == 1) {
//释放单车,单车恢复使用
$data = [
'is_show'=>0
];
}elseif ($type == 2) {
//单车出现故障
$data = [
'type'=>1
];
}elseif ($type == 3) {
//单车恢复正常
$data = [
'type'=>0
];
}
$res = \app\api\model\Bike::update($data,['id'=>$id]);
if($res) {
return true;
}else {
echo false;
}
}
```
## 7.故障页面逻辑和接口分析
根据效果图,我们首先需要一个获取故障分类名称的接口,接口代码如下:
```php
/**
* @return false|\PDOStatement|string|\think\Collection
* 获取问题的分类信息
*/
public function getTroubleCate() {
$res = new \app\api\model\TroubleCate();
$troubleCate = $res->select();
return $troubleCate;
}
```
然后提交的时候,我们需要一个记录故障的接口,这个接口中,我们首先需要判断,如果没有选择车牌损坏,则必须填写车牌号,否则服务器返回自定义的异常,请输入单车号,单车和故障很明显是多对多的关系,我们在记录的时候,还要写到另外一张表中去,有记录ID和分类ID组成的主键的表,同时我们根据单车的ID还得修改单车的状态,接口代码如下:
```php
public function recordTrouble($record) {
//分为两种情况,车牌损坏,车牌未损坏
//如果有车牌号码,先判断单车是否存在,不存在,抛出异常,
//如果存在,写到trouble_record表,根据trouble_record
//的id,还有trouble_id写到bike_trouble表,多对多表,全部写入成功之后,
//修改bike表的type值,用到事务,要么失败,要么成功
$bikeID = $record['inputValue']['num'];
//2代表车牌被损坏,看不到车牌号码
if(!in_array(2,$record['checkboxValue'])) {
if($bikeID) {
$bike = new Bike();
$bike->getBikeByID($bikeID);
}else {
throw new BikeException([
'msg'=>'请输入单车编号',
'errorCode'=>10003
]);
}
}
try {
Db::startTrans();
$address = $record['address'];
$uid = \app\api\service\Token::getCurrentUid();
$troubleRecord = new \app\api\model\TroubleRecord();
$troubleRecord->user_id=$uid;
$troubleRecord->bike_id=$bikeID;
$troubleRecord->longitude=$address['start_long'];
$troubleRecord->latitude=$address['start_lati'];
$troubleRecord->img=json_encode($record['picUrls']);
$troubleRecord->remark=$record['inputValue']['desc'];
//更新故障记录表troubleRecord
$troubleRecord->save();
$resID = $troubleRecord->id;
$troublesID = $record['checkboxValue'];
$newArr = array();
foreach ($troublesID as $k=>$v) {
$newArr[$k]['trouble_id'] = $v;
$newArr[$k]['record_id'] = $resID;
}
$bikeTrouble = new BikeTrouble();
//更新故障表bikeTrouble表
$rel = $bikeTrouble->saveAll($newArr);
if($bikeID) {
//修改单车的状态,发送了故障
$bike = new Bike();
$bike->updateBikeStatus(2,$bikeID);
}
if($resID && $rel) {
Db::commit();
}
}catch (Exception $e) {
Db::rollback();
}
}
```
## 8.支付页面的逻辑和接口分析

根据效果图:我们需要一个记录骑行的接口,这个接口中,这里有对多张表的操作,所以我们利用了tp的事务(**注意:mysql数据引擎MyISAM不支持事务**),提高数据库数据的一致性,我们需要记录用户的开始地址,开始时间,结束地址,结束时间,总价格,用户的id,单车的id等等,我们还需要修改用户表的余额,同时修改小程序缓存的余额,**关键点的是,我们还要再次获取用户的地址,及时修改单车的使用状态和位置,便于其他用户的使用,小黄车没有GPS定位系统,而是巧妙的利用了用户的地址**,这里我们看下小黄车的整个使用流程:

接口代码如下:
```
/**
* @param $start_time
* @param $bikeID
* @param $end_time
* @param $start_long
* @param $start_lati
* @param $end_long
* @param $end_lati
* @param $price
* 用户骑行后记录到数据库
*/
public function record($start_time,$bikeID,$end_time,$start_long,$start_lati,$end_long,$end_lati,$price) {
$uid = Token::getCurrentUid();
$data = [
'start_time'=>$start_time,
'end_time'=>$end_time,
'start_long'=>$start_long,
'start_lati'=>$start_lati,
'end_lati'=>$end_lati,
'end_long'=>$end_long,
'total_price'=>$price,
'user_id'=>$uid,
'bike_id'=>$bikeID
];
Db::startTrans();
try {
//创建记录
$res = Record::create($data);
//修改用户的余额
$user = new UserModel();
$userInfo = $user->find($uid);
$data = [
'balance'=>$userInfo->balance-$price
];
$rel = $user->save($data,['id'=>$uid]);
//修改小黄车的状态和位置
$bikeData = [
'is_show'=>'0',
'latitude'=>$end_lati,
'longitude'=>$end_long
];
$rs = \app\api\model\Bike::update($bikeData,['id'=>$bikeID]);
if($res && $rel && $rs) {
echo 'success';
Db::commit();
}
}catch (Exception $e) {
Db::rollback();
}
}
```
# 结语
> - 到这里,ofo小程序的制作就到了尾声了。开篇我们简单进行了数据库的设计,然后一个一个页面从页面分析,到完成接口设计,分别响应着不同的业务逻辑,有的页面与页面之间有数据往来,我们就通过跳转页面传参或设置本地存储来将它们建立起联系,环环相扣,构建起了整个小程序的基本功能,使原本的ofo小程序有了灵魂。
> - 这个项目做完,使我对前后端分离理解深刻,注意代码的复用性,实践才是王道,这个项目采用了tp5框架,自定义了全局异常类,自定义验证器,加深了我对AOP思想的理解,使用restful API设计接口,更加符合规范。
> - 源码在我的github主页上面,需要的请移步下载[github链接](https://github.com/yefangyong/ofo),如果喜欢,请给一个start,谢谢
================================================
FILE: application/.htaccess
================================================
deny from all
================================================
FILE: application/admin/config.php
================================================
<?php
return [
'default_return_type'=>'html'
];
================================================
FILE: application/admin/controller/Base.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/12/14
* Time: 10:29
*/
namespace app\admin\controller;
use think\Controller;
use think\Exception;
class Base extends Controller
{
public $model;
/**
* @return string
* 公用的修改状态和删除的方法
*/
public function status() {
$params = request()->param();
if(!intval($params['id'])){
return show(0,'id不合法');
}
//获取当前控制器的名字,一般控制器名字和model和数据表名字一直,如果不一致,我们可以在model里面,直接声明model
//例如 $this->model = 'model名'
$model = $this->model?$this->model:request()->controller();
try {
$res = model($model)->save(['status'=>$params['status']],['id'=>$params['id']]);
}catch (Exception $e) {
return show(0,$e->getMessage());
}
$trouble = model($model)->get($params['id']);
if(isset($trouble->bike_id ) && $trouble->bike_id != 0 ) {
try {
$rel = model('Bike')->save(['type'=>0],['id'=>$trouble->bike_id ]);
}catch (Exception $e) {
return show(0,$e->getMessage());
}
}
if($res) {
return show(1,'操作成功');
}else {
return show(0,'操作失败');
}
}
}
================================================
FILE: application/admin/controller/Bike.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/10/12
* Time: 17:31
*/
namespace app\admin\controller;
use think\Controller;
class Bike extends Controller
{
public function index() {
$bikes = \app\admin\model\Bike::getAllBike();
return $this->fetch('',['bike'=>$bikes]);
}
public function add() {
if($_POST) {
$passwd = $_POST['password'];
$address = $_POST['address'];
if(empty($passwd) || empty($address)) {
return show(0,'请填写密码或者地址');
}
$result = \TxMap::getLngLat($address);
$lat = $result['result']['location']['lat'];
$lng = $result['result']['location']['lng'];
$data = [
'latitude'=>$lat,
'longitude'=>$lng,
'is_show'=>0,
'type'=>0,
'password'=>$passwd
];
$res = \app\admin\model\Bike::create($data);
if($res) {
return show(1,'添加成功');
}else {
return show(0,'添加失败');
}
}else {
return $this->fetch();
}
}
}
================================================
FILE: application/admin/controller/Charge.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/10/13
* Time: 10:08
*/
namespace app\admin\controller;
use think\Controller;
class Charge extends Controller
{
public function index() {
$charge = \app\admin\model\Charge::getAllCharge();
return $this->fetch('',['charge'=>$charge]);
}
}
================================================
FILE: application/admin/controller/Index.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/10/12
* Time: 14:19
*/
namespace app\admin\controller;
use My\RedisPackage;
use think\cache\driver\Memcached;
use think\Controller;
class Index extends Controller
{
public function index() {
// $memcache = new Memcached();
// session('test','测试');
return $this->fetch();
}
public function welcome() {
return "欢迎访问享骑单车小程序后台管理系统";
}
}
================================================
FILE: application/admin/controller/Record.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/10/13
* Time: 10:58
*/
namespace app\admin\controller;
use think\Controller;
class Record extends Controller
{
/**
* @return mixed
* 获取骑行记录
*/
public function index() {
$records = \app\admin\model\Record::getAllRecord();
return $this->fetch('',['records'=>$records]);
}
}
================================================
FILE: application/admin/controller/Trouble.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/10/13
* Time: 11:58
*/
namespace app\admin\controller;
use app\admin\model\TroubleCate;
use app\admin\model\TroubleRecord;
use think\Controller;
class Trouble extends Base
{
public $model = 'trouble_record';
/**
* @return mixed
* 故障列表
*/
public function index() {
$troubles = TroubleRecord::getAllTrouble();
$reason = '';
foreach ($troubles as $key=>$val) {
foreach ($val['trouble_cate'] as $value) {
$reason .= ','.$value['name'];
}
$reason = substr($reason,1);
$troubles[$key]['reason'] = $reason;
}
return $this->fetch('',['trouble'=>$troubles]);
}
/**
* @return mixed
* 故障分类列表
*/
public function troubleCate() {
$result = TroubleCate::getTroubleCate();
return $this->fetch('',['troubleCate'=>$result]);
}
/**
* @return mixed|void
* 分类添加
*/
public function add(){
if($_POST) {
if(empty($_POST['catename'])) {
return show(0,'请输入分类名称');
}else {
$data = [
'name'=>$_POST['catename'],
];
$res = TroubleCate::create($data);
if($res) {
return show(1,'添加成功');
}else {
return show(0,'添加失败');
}
}
}else{
return $this->fetch();
}
}
}
================================================
FILE: application/admin/controller/User.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/10/12
* Time: 15:26
*/
namespace app\admin\controller;
use think\Controller;
class User extends Controller
{
public function index() {
$user = \app\admin\model\User::getAllUser();
return $this->fetch('',['user'=>$user]);
}
}
================================================
FILE: application/admin/model/Bike.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/10/12
* Time: 17:31
*/
namespace app\admin\model;
use think\Model;
class Bike extends Model
{
public static function getAllBike() {
return self::order('create_time','desc')->paginate(config('pagination.list_rows'))->each(function ($item, $key){
$lnt = $item->latitude;
$lgt = $item->longitude;
$result = \TxMap::getAddress($lgt,$lnt);
$item->address = $result['result']['formatted_addresses']['recommend'];
return $item;
});
}
}
================================================
FILE: application/admin/model/BikeTrouble.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/10/13
* Time: 13:30
*/
namespace app\admin\model;
use think\Model;
class BikeTrouble extends Model
{
}
================================================
FILE: application/admin/model/Charge.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/10/13
* Time: 10:18
*/
namespace app\admin\model;
use think\Model;
class Charge extends Model
{
/**
* @param $value
* @param $data
* @return string
* 改变获取到数据的属性值
*/
public function getTypeAttr($value,$data) {
if($value == 0) {
return $value ='押金充值';
}else {
return $value = '余额充值';
}
}
/**
* @return \think\model\relation\BelongsTo
* 关联用户表 多对一关联
*/
public function user(){
return $this->belongsTo('User','user_id');
}
/**
* @return \think\Paginator
* 获取所有的充值记录
*/
public static function getAllCharge() {
$pagination = config('pagination.charge');
return self::order('create_time','desc')->with('user')->paginate($pagination['list_row']);
}
}
================================================
FILE: application/admin/model/Record.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/10/13
* Time: 10:58
*/
namespace app\admin\model;
use think\Model;
class Record extends Model
{
/**
* @return \think\model\relation\BelongsTo
* 关联单车表
*/
public function bike() {
return $this->belongsTo('bike','bike_id');
}
/**
* @return \think\model\relation\BelongsTo
* 关联用户表
*/
public function user() {
return $this->belongsTo('user','user_id');
}
/**
* @return $this
* 获取所有的记录
*/
public static function getAllRecord() {
return self::order('create_time','desc')->with(['bike','user'])->paginate(config('pagination.list_rows'))->each(function($item,$key){
$slnt = $item->start_lati;
$slgt = $item->start_long;
$sresult = \TxMap::getAddress($slgt,$slnt);
if($sresult['status'] !=0) {
$item->start_address = '' ;
}else {
$item->start_address = $sresult['result']['formatted_addresses']['recommend'];
}
$elnt = $item->end_lati;
$elgt = $item->end_long;
$eresult = \TxMap::getAddress($elgt,$elnt);
if($eresult['status'] !=0) {
$item->end_address = '' ;
}else {
$item->end_address = $eresult['result']['formatted_addresses']['recommend'];
}
return $item;
});
}
}
================================================
FILE: application/admin/model/TroubleCate.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/10/13
* Time: 11:59
*/
namespace app\admin\model;
use think\Model;
class TroubleCate extends Model
{
/**
* @return \think\Paginator
* 获取故障分类
*/
public static function getTroubleCate() {
return self::order('create_time','desc')->paginate(config('pagination.list_rows'));
}
}
================================================
FILE: application/admin/model/TroubleRecord.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/10/13
* Time: 13:31
*/
namespace app\admin\model;
use think\Model;
class TroubleRecord extends Model
{
/**
* @return \think\model\relation\BelongsToMany
* 关联troubleCate表,多对多关联
*/
public function troubleCate() {
return $this->belongsToMany('troubleCate','bike_trouble','trouble_id','record_id');
}
/**
* @return \think\model\relation\BelongsTo
* 关联用户表
*/
public function user() {
return $this->belongsTo('user','user_id');
}
/**
* @return $this
* 获取所有的故障列表
*/
public static function getAllTrouble(){
return self::order('create_time','desc')->with(['troubleCate','user','troubleCate'])->paginate(config('pagination.list_rows'))->each(function($item,$key){
$lnt = $item->latitude;
$lgt = $item->longitude;
$result = \TxMap::getAddress($lgt,$lnt);
if($result['status'] != 0) {
$item->address = '' ;
}else {
$item->address = $result['result']['formatted_addresses']['recommend'];
}
return $item;
});
}
}
================================================
FILE: application/admin/model/User.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/10/12
* Time: 16:02
*/
namespace app\admin\model;
use think\Model;
class User extends Model
{
public static function getAllUser() {
$pagination = config('pagination.user');
return self::order('create_time','desc')->paginate($pagination['list_row']);
}
}
================================================
FILE: application/admin/view/bike/add.html
================================================
{include file="public/header" /}
<body>
<article class="page-container">
<form class="form form-horizontal" id="yfycms-form">
<div class="row cl">
<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>车辆密码:</label>
<div class="formControls col-xs-8 col-sm-9">
<input type="password" class="input-text" value="" placeholder="请输入车辆的密码" id="password" name="password">
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>所在位置:</label>
<div class="formControls col-xs-8 col-sm-9">
<input type="text" class="input-text" value="" placeholder="请输入车辆的位置" id="username" name="address">
</div>
</div>
<div class="row cl">
<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
<input class="btn btn-primary radius" type="button" id="yfycms-button-submit" value=" 提交 ">
</div>
</div>
</form>
</article>
<script>
var SCOPE = {
'save_url':"{:url('bike/add')}",
'jump_url':"{:url('bike/index')}"
};
</script>
{include file="public/footer" /}
</body>
</html>
================================================
FILE: application/admin/view/bike/index.html
================================================
<!--包含头部文件-->
{include file="public/header" /}
<body>
<nav class="breadcrumb"><i class="Hui-iconfont"></i> 首页 <span class="c-gray en">></span> 用户管理 <span class="c-gray en">></span> 用户列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont"></i></a></nav>
<div class="page-container">
<div class="mt-20">
<div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"> <a class="btn btn-primary radius" onclick="edit_add('添加车辆','{:url('Bike/add')}')" href="javascript:;"><i class="Hui-iconfont"></i> 添加车辆</a></span> <span class="r"></span> </div>
<table class="table table-border table-bordered table-bg table-hover table-sort o2o_yfycms">
<thead>
<tr class="text-c">
<th width="40"><input name="" type="checkbox" value=""></th>
<th width="80">ID</th>
<th width="150">车辆位置</th>
<th width="30">车辆密码</th>
<th width="30">使用状态</th>
<th width="30">故障状态</th>
<th width="60">创建时间</th>
<th width="100">操作</th>
</tr>
</thead>
<tbody>
{volist name="bike" id="vo"}
<tr class="text-c">
<td><input name="" type="checkbox" value="{$vo.id}"></td>
<td>{$key+1}</td>
<td>{$vo.address}</td>
<td>{$vo.password}</td>
<td class="td-status"><span class="label radius {$vo.is_show ? 'label-danger':'label-success'}">{$vo.is_show|userStatus}</span></td>
<td class="td-status"><span class="label radius {$vo.type ? 'label-danger':'label-success'}">{$vo.type|troubleStatus}</span></td>
<td>{$vo.create_time}</td>
<td class="td-manage"><a style="text-decoration:none" class="ml-5 o2o_status" attr-id="{$vo.id}" attr-status="-1" href="javascript:;" title="删除"><i class="Hui-iconfont"></i></a></td>
</tr>
{/volist}
</tbody>
</table>
</div>
</div>
<div class="cl pd-5 bg-1 bk-gray mt-20 tp5">{$bike->render()}</div>
<!--包含头部文件-->
{include file="public/footer" /}
<script>
var SCOPE ={
'listorder_url':"{:url('category/listorder')}",
'jump_url':"{:url('category/index')}",
'status_url':"{:url('category/status')}",
}
</script>
</body>
</html>
================================================
FILE: application/admin/view/charge/index.html
================================================
<!--包含头部文件-->
{include file="public/header" /}
<body>
<nav class="breadcrumb"><i class="Hui-iconfont"></i> 首页 <span class="c-gray en">></span> 充值管理 <span class="c-gray en">></span> 充值列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont"></i></a></nav>
<div class="page-container">
<div class="mt-20">
<table class="table table-border table-bordered table-bg table-hover table-sort o2o_yfycms">
<thead>
<tr class="text-c">
<th width="40"><input name="" type="checkbox" value=""></th>
<th width="80">ID</th>
<th width="100">用户昵称</th>
<th width="30">充值金额</th>
<th width="150">充值类型</th>
<th width="60">创建时间</th>
<th width="100">操作</th>
</tr>
</thead>
<tbody>
{volist name="charge" id="vo"}
<tr class="text-c">
<td><input name="" type="checkbox" value="{$vo.id}"></td>
<td>{$key+1}</td>
<td>{$vo.user.nickname}</td>
<td class="td-status"><span class="label label-success radius">{$vo.price}</span></td>
<td>{$vo.type}</td>
<td class="td-status"><span class="label label-success radius">{$vo.create_time}</span></td>
<td class="td-manage"><a style="text-decoration:none" class="ml-5 o2o_status" attr-id="{$vo.id}" attr-status="-1" href="javascript:;" title="删除"><i class="Hui-iconfont"></i></a></td>
</tr>
{/volist}
</tbody>
</table>
</div>
</div>
<div class="cl pd-5 bg-1 bk-gray mt-20 tp5">{$charge->render()}</div>
<!--包含头部文件-->
{include file="public/footer" /}
<script>
var SCOPE ={
'listorder_url':"{:url('category/listorder')}",
'jump_url':"{:url('category/index')}",
'status_url':"{:url('category/status')}",
}
</script>
</body>
</html>
================================================
FILE: application/admin/view/index/index.html
================================================
<!--包含头部文件-->
{include file="public/header" /}
<body>
<header class="navbar-wrapper">
<div class="navbar navbar-fixed-top">
<div class="container-fluid cl"> <a class="logo navbar-logo f-l mr-10 hidden-xs" href="">享骑单车后台管理系统</a> <a class="logo navbar-logo-m f-l mr-10 visible-xs" href=""></a> <span class="logo navbar-slogan f-l mr-10 hidden-xs"></span> <a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:;"></a>
<nav id="Hui-userbar" class="nav navbar-nav navbar-userbar hidden-xs">
<ul class="cl">
<li>超级管理员</li>
<li class="dropDown dropDown_hover"> <a href="#" class="dropDown_A">admin <i class="Hui-iconfont"></i></a>
<ul class="dropDown-menu menu radius box-shadow">
<li><a href="#">个人信息</a></li>
<li><a href="#">切换账户</a></li>
<li><a href="#">退出</a></li>
</ul>
</li>
<li id="Hui-msg"> <a href="#" title="消息"><span class="badge badge-danger">1</span><i class="Hui-iconfont" style="font-size:18px"></i></a> </li>
<li id="Hui-skin" class="dropDown right dropDown_hover"> <a href="javascript:;" class="dropDown_A" title="换肤"><i class="Hui-iconfont" style="font-size:18px"></i></a>
<ul class="dropDown-menu menu radius box-shadow">
<li><a href="javascript:;" data-val="default" title="默认(黑色)">默认(黑色)</a></li>
<li><a href="javascript:;" data-val="blue" title="蓝色">蓝色</a></li>
<li><a href="javascript:;" data-val="green" title="绿色">绿色</a></li>
<li><a href="javascript:;" data-val="red" title="红色">红色</a></li>
<li><a href="javascript:;" data-val="yellow" title="黄色">黄色</a></li>
<li><a href="javascript:;" data-val="orange" title="绿色">橙色</a></li>
</ul>
</li>
</ul>
</nav>
</div>
</div>
</header>
<!--包含菜单文件-->
{include file="public/menu" /}
<div class="dislpayArrow hidden-xs"><a class="pngfix" href="javascript:void(0);" onClick="displaynavbar(this)"></a></div>
<section class="Hui-article-box">
<div id="Hui-tabNav" class="Hui-tabNav hidden-xs">
<div class="Hui-tabNav-wp">
<ul id="min_title_list" class="acrossTab cl">
<li class="active"><span title="我的桌面" data-href="welcome.html">我的桌面</span><em></em></li>
</ul>
</div>
<div class="Hui-tabNav-more btn-group"><a id="js-tabNav-prev" class="btn radius btn-default size-S" href="javascript:;"><i class="Hui-iconfont"></i></a><a id="js-tabNav-next" class="btn radius btn-default size-S" href="javascript:;"><i class="Hui-iconfont"></i></a></div>
</div>
<div id="iframe_box" class="Hui-article">
<div class="show_iframe">
<div style="display:none" class="loading"></div>
<iframe scrolling="yes" frameborder="0" src="{:url('index/welcome')}"></iframe>
</div>
</div>
</section>
<!--包含菜单文件-->
{include file="public/footer" /}
</body>
</html>
================================================
FILE: application/admin/view/public/footer.html
================================================
<script type="text/javascript" src="/static/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/static/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="/static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="/static/admin/js/common.js"></script>
<script type="text/javascript" src="/static/admin/js/dialog.js"></script>
<script type="text/javascript" src="/static/h-ui.admin/js/H-ui.admin.js"></script>
================================================
FILE: application/admin/view/public/header.html
================================================
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<LINK rel="Bookmark" href="/favicon.ico" >
<LINK rel="Shortcut Icon" href="/favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="/static/lib/html5shiv.js"></script>
<script type="text/javascript" src="/static/lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="/static/admin/common.css" />
<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="/static/lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>享骑单车小程序后台管理系统</title>
<meta name="keywords" content="tp5打造o2o平台系统">
<meta name="description" content="o2o平台">
</head>
================================================
FILE: application/admin/view/public/menu.html
================================================
<aside class="Hui-aside">
<div class="menu_dropdown bk_2">
<dl id="menu-article">
<dt><i class="Hui-iconfont"></i> 用户管理<i class="Hui-iconfont menu_dropdown-arrow"></i></dt>
<dd>
<ul>
<li><a data-href="{:url('user/index')}" data-title="用户列表" href="javascript:void(0)">用户列表</a></li>
</ul>
</dd>
</dl>
<dl id="menu-picture">
<dt><i class="Hui-iconfont"></i> 车辆管理<i class="Hui-iconfont menu_dropdown-arrow"></i></dt>
<dd>
<ul>
<li><a data-href="{:url('bike/index')}" data-title="车辆列表" href="javascript:void(0)">车辆列表</a></li>
<li><a data-href="{:url('bike/add')}" data-title="车辆添加" href="javascript:void(0)">车辆添加</a></li>
</ul>
</dd>
</dl>
<dl id="menu-product">
<dt><i class="Hui-iconfont"></i> 充值管理<i class="Hui-iconfont menu_dropdown-arrow"></i></dt>
<dd>
<ul>
<li><a data-href="{:url('charge/index')}" data-title="充值管理" href="javascript:void(0)">充值列表</a></li>
</ul>
</dd>
</dl>
<dl id="menu-comments">
<dt><i class="Hui-iconfont"></i> 订单管理<i class="Hui-iconfont menu_dropdown-arrow"></i></dt>
<dd>
<ul>
<li><a data-href="{:url('record/index')}" data-title="订单列表" href="javascript:;">订单列表</a></li>
</ul>
</dd>
</dl>
<dl id="menu-member">
<dt><i class="Hui-iconfont"></i> 故障管理<i class="Hui-iconfont menu_dropdown-arrow"></i></dt>
<dd>
<ul>
<li><a data-href="{:url('trouble/index')}" data-title="故障列表" href="javascript:;">故障列表</a></li>
<li><a data-href="{:url('trouble/troubleCate')}" data-title="故障分类" href="javascript:;">故障分类</a></li>
</ul>
</dd>
</dl>
</div>
</aside>
<div class="dislpayArrow hidden-xs"><a class="pngfix" href="javascript:void(0);" onClick="displaynavbar(this)"></a></div>
================================================
FILE: application/admin/view/record/index.html
================================================
<!--包含头部文件-->
{include file="public/header" /}
<body>
<nav class="breadcrumb"><i class="Hui-iconfont"></i> 首页 <span class="c-gray en">></span> 订单管理 <span class="c-gray en">></span> 订单列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont"></i></a></nav>
<div class="page-container">
<div class="mt-20">
<table class="table table-border table-bordered table-bg table-hover table-sort o2o_yfycms">
<thead>
<tr class="text-c">
<th width="40"><input name="" type="checkbox" value=""></th>
<th width="40">ID</th>
<th width="40">单车ID</th>
<th width="190">用户昵称</th>
<th width="40">费用</th>
<th width="150">开始位置</th>
<th width="150">结束位置</th>
<th width="120">开始时间</th>
<th width="120">结束时间</th>
<th width="120">创建时间</th>
<th width="80">操作</th>
</tr>
</thead>
<tbody>
{volist name="records" id="vo"}
<tr class="text-c">
<td><input name="" type="checkbox" value="{$vo.id}"></td>
<td>{$key+1}</td>
<td>{$vo.bike_id}</td>
<td>{$vo.user.nickname}</td>
<td>{$vo.total_price}</td>
<td>{$vo.start_address}</td>
<td>{$vo.end_address}</td>
<td class="td-status"><span class="label label-success radius">{$vo.start_time|date="Y-m-d H:i:s",###}</span></td>
<td class="td-status"><span class="label label-success radius">{$vo.end_time|date="Y-m-d H:i:s",###}</span></td>
<td>{$vo.create_time}</td>
<td class="td-manage"><a style="text-decoration:none" class="ml-5 o2o_status" attr-id="{$vo.id}" attr-status="-1" href="javascript:;" title="删除"><i class="Hui-iconfont"></i></a></td>
</tr>
{/volist}
</tbody>
</table>
</div>
</div>
<div class="cl pd-5 bg-1 bk-gray mt-20 tp5">{$records->render()}</div>
<!--包含头部文件-->
{include file="public/footer" /}
<script>
var SCOPE ={
'listorder_url':"{:url('category/listorder')}",
'jump_url':"{:url('category/index')}",
'status_url':"{:url('category/status')}",
}
</script>
</body>
</html>
================================================
FILE: application/admin/view/trouble/add.html
================================================
{include file="public/header" /}
<body>
<article class="page-container">
<form class="form form-horizontal" id="yfycms-form">
<div class="row cl">
<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>分类名称:</label>
<div class="formControls col-xs-8 col-sm-9">
<input type="text" class="input-text" value="" placeholder="请输入分类的名称" id="catename" name="catename">
</div>
</div>
<div class="row cl">
<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
<input class="btn btn-primary radius" type="button" id="yfycms-button-submit" value=" 提交 ">
</div>
</div>
</form>
</article>
<script>
var SCOPE = {
'save_url':"{:url('trouble/add')}",
'jump_url':"{:url('trouble/index')}"
};
</script>
{include file="public/footer" /}
</body>
</html>
================================================
FILE: application/admin/view/trouble/index.html
================================================
<!--包含头部文件-->
{include file="public/header" /}
<body>
<nav class="breadcrumb"><i class="Hui-iconfont"></i> 首页 <span class="c-gray en">></span> 故障管理 <span class="c-gray en">></span> 故障列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont"></i></a></nav>
<div class="page-container">
<div class="mt-20">
<table class="table table-border table-bordered table-bg table-hover table-sort o2o_yfycms">
<thead>
<tr class="text-c">
<th width="40"><input name="" type="checkbox" value=""></th>
<th width="20">ID</th>
<th width="40">单车ID</th>
<th width="100">单车位置</th>
<th width="160">报修人</th>
<th width="100">报修原因</th>
<th width="100">故障图片</th>
<th width="60">备注</th>
<th width="40">状态</th>
<th width="70">创建时间</th>
<th width="40">操作</th>
</tr>
</thead>
<tbody>
{volist name="$trouble" id="vo"}
<tr class="text-c">
<td><input name="" type="checkbox" value="{$vo.id}"></td>
<td>{$key+1}</td>
<td>{$vo.bike_id}</td>
<td>{$vo.address}</td>
<td>{$vo.user.nickname}</td>
<td>{$vo.reason}</td>
<td><img width="100" height="100" class="picture-thumb" src="{$vo.img}"></td>
<td>{$vo.remark}</td>
<td class="td-status"><a class="{$vo.status ? '' : 'app-status'}" attr-id="{$vo.id}" attr-status="1" attr-message="修改"><span class="label radius {$vo.status? 'label-success':'label-danger'}">{$vo.status|getStatusAttr}</span></a></td>
<td>{$vo.create_time}</td>
<td class="td-manage"><a style="text-decoration:none" class="ml-5 o2o_status" attr-id="{$vo.id}" attr-status="-1" href="javascript:;" title="删除"><i class="Hui-iconfont"></i></a></td>
</tr>
{/volist}
</tbody>
</table>
</div>
</div>
<div class="cl pd-5 bg-1 bk-gray mt-20 tp5">{$trouble->render()}</div>
<!--包含头部文件-->
{include file="public/footer" /}
<script>
var SCOPE ={
'jump_url':"{:url('trouble/index')}",
'status_url':"{:url('trouble/status')}",
}
</script>
</body>
</html>
================================================
FILE: application/admin/view/trouble/troublecate.html
================================================
<!--包含头部文件-->
{include file="public/header" /}
<body>
<nav class="breadcrumb"><i class="Hui-iconfont"></i> 首页 <span class="c-gray en">></span> 故障管理 <span class="c-gray en">></span> 故障分类 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont"></i></a></nav>
<div class="page-container">
<div class="mt-20">
<div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"> <a class="btn btn-primary radius" onclick="yfy_s_edit('添加分类','{:url('trouble/add')}',400,200)" href="javascript:;"><i class="Hui-iconfont"></i> 添加分类</a></span> <span class="r"></span> </div>
<table class="table table-border table-bordered table-bg table-hover table-sort o2o_yfycms">
<thead>
<tr class="text-c">
<th width="40"><input name="" type="checkbox" value=""></th>
<th width="80">ID</th>
<th width="100">故障名称</th>
<th width="60">创建时间</th>
<th width="100">操作</th>
</tr>
</thead>
<tbody>
{volist name="troubleCate" id="vo"}
<tr class="text-c">
<td><input name="" type="checkbox" value="{$vo.id}"></td>
<td>{$vo.id}</td>
<td>{$vo.name}</td>
<td class="td-status"><span class="label radius label-success">{$vo.create_time}</span></td>
<td class="td-manage"><a style="text-decoration:none" class="ml-5 o2o_status" attr-id="{$vo.id}" attr-status="-1" href="javascript:;" title="删除"><i class="Hui-iconfont"></i></a></td>
</tr>
{/volist}
</tbody>
</table>
</div>
</div>
<div class="cl pd-5 bg-1 bk-gray mt-20 tp5">{$troubleCate->render()}</div>
<!--包含头部文件-->
{include file="public/footer" /}
<script>
var SCOPE ={
'listorder_url':"{:url('category/listorder')}",
'jump_url':"{:url('category/index')}",
'status_url':"{:url('category/status')}",
}
</script>
</body>
</html>
================================================
FILE: application/admin/view/user/index.html
================================================
<!--包含头部文件-->
{include file="public/header" /}
<body>
<nav class="breadcrumb"><i class="Hui-iconfont"></i> 首页 <span class="c-gray en">></span> 用户管理 <span class="c-gray en">></span> 用户列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont"></i></a></nav>
<div class="page-container">
<div class="mt-20">
<table class="table table-border table-bordered table-bg table-hover table-sort o2o_yfycms">
<thead>
<tr class="text-c">
<th width="40"><input name="" type="checkbox" value=""></th>
<th width="80">ID</th>
<th width="100">用户昵称</th>
<th width="100">用户头像</th>
<th width="30">押金余额</th>
<th width="150">充值余额</th>
<th width="60">创建时间</th>
<th width="100">操作</th>
</tr>
</thead>
<tbody>
{volist name="user" id="vo"}
<tr class="text-c">
<td><input name="" type="checkbox" value="{$vo.id}"></td>
<td>{$key+1}</td>
<td>{$vo.nickname}</td>
<td><img src="{$vo.avatarUrl}" width="100" height="100"></td>
<td class="td-status"><span class="label label-success radius">{$vo.guarantee}</span></td>
<td class="td-status"><span class="label label-success radius">{$vo.balance}</span></td>
<td>{$vo.create_time}</td>
<td class="td-manage"><a style="text-decoration:none" class="ml-5 o2o_status" attr-id="{$vo.id}" attr-status="-1" href="javascript:;" title="删除"><i class="Hui-iconfont"></i></a></td>
</tr>
{/volist}
</tbody>
</table>
</div>
</div>
<div class="cl pd-5 bg-1 bk-gray mt-20 tp5">{$user->render()}</div>
<!--包含头部文件-->
{include file="public/footer" /}
<script>
var SCOPE ={
'listorder_url':"{:url('category/listorder')}",
'jump_url':"{:url('category/index')}",
'status_url':"{:url('category/status')}",
}
</script>
</body>
</html>
================================================
FILE: application/api/controller/v1/Base.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/9/1
* Time: 9:57
*/
namespace app\api\controller\v1;
use think\Controller;
class Base extends Controller
{
}
================================================
FILE: application/api/controller/v1/Bike.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/9/1
* Time: 9:57
*/
namespace app\api\controller\v1;
use app\api\model\Bike as BikeModel;
use app\api\validate\IsMustBePostiveInt;
use app\lib\exception\BikeException;
class Bike extends Base
{
/**
* @return false|\PDOStatement|string|\think\Collection
* @throws BikeException
* 获取单车的位置信息
*/
public function getBicyclePosition() {
$bikes = BikeModel::getBicyclePosition();
if(!$bikes) {
throw new BikeException();
}
return $bikes;
}
/**
* @param int $type
* @param $id
* @return bool
* 修改单车的使用状态
*/
public function updateBikeStatus($type = 0,$id) {
// (new IsMustBePostiveInt())->goCheck();
if($type == 0) {
//锁定单车,单车在被使用中
$data = [
'is_show'=>1
];
}elseif ($type == 1) {
//释放单车,单车恢复使用
$data = [
'is_show'=>0
];
}elseif ($type == 2) {
//单车出现故障
$data = [
'type'=>1
];
}elseif ($type == 3) {
//单车恢复正常
$data = [
'type'=>0
];
}
$res = \app\api\model\Bike::update($data,['id'=>$id]);
if($res) {
return true;
}else {
echo false;
}
}
/**
* @param $id
* @return array|false|\PDOStatement|string|\think\Model
* @throws BikeException
* 根据单车的ID获取单车的信息
*/
public function getBikeByID($id) {
// (new IsMustBePostiveInt())->goCheck();
$bike = BikeModel::getBikeByID($id);
if(!$bike) {
throw new BikeException([
'msg'=>'该车牌号不存在'
]);
}
if($bike['is_show'] == 1){
throw new BikeException([
'msg'=>'此单车正在被使用',
'errorCode'=>10001
]);
}
if($bike['type'] == 1) {
throw new BikeException([
'msg'=>'此单车多次被报修,暂不可使用',
'errorCode'=>10002
]);
}
return $bike;
}
}
================================================
FILE: application/api/controller/v1/Token.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/9/1
* Time: 15:19
*/
namespace app\api\controller\v1;
use app\api\service\UserToken;
use app\api\validate\TokenGet;
use app\lib\exception\TokenException;
use think\Cache;
use think\Request;
class Token extends Base
{
/**
* @param $code
* @return array
* 获取token
*/
public function getToken($code) {
(new TokenGet())->goCheck();
$user = new UserToken($code);
$token = $user->get();
return [
'token'=>$token
];
}
/**
* @return bool
* @throws TokenException
* 验证token
*/
public function verifyToken() {
$token = Request::instance()->header('token');
$var = Cache::get($token);
if(!$var) {
throw new TokenException([
'msg'=>'token已经过期',
'errorCode'=>10002
]);
}
return true;
}
}
================================================
FILE: application/api/controller/v1/TroubleCate.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/9/8
* Time: 13:15
*/
namespace app\api\controller\v1;
class TroubleCate extends Base
{
/**
* @return false|\PDOStatement|string|\think\Collection
* 获取问题的分类信息
*/
public function getTroubleCate() {
$res = new \app\api\model\TroubleCate();
$troubleCate = $res->select();
return $troubleCate;
}
}
================================================
FILE: application/api/controller/v1/TroubleRecord.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/9/8
* Time: 11:21
*/
namespace app\api\controller\v1;
use app\api\model\BikeTrouble;
use app\lib\exception\BikeException;
use think\Db;
use think\Exception;
class TroubleRecord extends Base
{
public function recordTrouble($record) {
//分为两种情况,车牌损坏,车牌未损坏
//如果有车牌号码,先判断单车是否存在,不存在,抛出异常,
//如果存在,写到trouble_record表,根据trouble_record
//的id,还有trouble_id写到bike_trouble表,多对多表,全部写入成功之后,
//修改bike表的type值,用到事务,要么失败,要么成功
$bikeID = $record['inputValue']['num'];
//2代表车牌被损坏,看不到车牌号码
if(!in_array(2,$record['checkboxValue'])) {
if($bikeID) {
$bike = new Bike();
$bike->getBikeByID($bikeID);
}else {
throw new BikeException([
'msg'=>'请输入单车编号',
'errorCode'=>10003
]);
}
}
try {
Db::startTrans();
$address = $record['address'];
$uid = \app\api\service\Token::getCurrentUid();
$troubleRecord = new \app\api\model\TroubleRecord();
$troubleRecord->user_id=$uid;
$troubleRecord->bike_id=$bikeID;
$troubleRecord->longitude=$address['start_long'];
$troubleRecord->latitude=$address['start_lati'];
$troubleRecord->img=json_encode($record['picUrls']);
$troubleRecord->remark=$record['inputValue']['desc'];
//更新故障记录表troubleRecord
$troubleRecord->save();
$resID = $troubleRecord->id;
$troublesID = $record['checkboxValue'];
$newArr = array();
foreach ($troublesID as $k=>$v) {
$newArr[$k]['trouble_id'] = $v;
$newArr[$k]['record_id'] = $resID;
}
$bikeTrouble = new BikeTrouble();
//更新故障表bikeTrouble表
$rel = $bikeTrouble->saveAll($newArr);
if($bikeID) {
//修改单车的状态,发送了故障
$bike = new Bike();
$bike->updateBikeStatus(2,$bikeID);
}
if($resID && $rel) {
Db::commit();
}
}catch (Exception $e) {
Db::rollback();
}
}
}
================================================
FILE: application/api/controller/v1/User.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/9/1
* Time: 16:59
*/
namespace app\api\controller\v1;
use app\api\model\Charge;
use app\api\model\Record;
use app\api\service\Token;
use app\lib\exception\UserException;
use app\api\model\User as UserModel;
use think\Db;
use think\Exception;
class User extends Base
{
/**
* @return null|static
* @throws UserException
* 获取用户的信息
*/
public function getUserInfo(){
$uid = Token::getCurrentUid();
$user = UserModel::get($uid);
if(!$user) {
throw new UserException();
}
return $user;
}
/**
* @param $guarantee
* 充值
*/
public function pay($from,$price) {
$type = 1;
if($from == 'index') {
$type = 0;
}else if($from == 'wallet' || $from == 'pay') {
$type = 1;
}
$uid = Token::getCurrentUid();
Db::startTrans();
try{
if($type == 1) {
$user = UserModel::get($uid);
$price = $price + $user->balance;
$result = new UserModel();
$res = $result->save(['balance'=>$price],['id'=>$uid]);
}else {
$res = UserModel::update(['guarantee'=>$price],['id'=>$uid]);
}
$rel = Charge::create([
'price'=>$price,
'type'=>$type,
'user_id'=>$uid
]);
if($rel && $res) {
Db::commit();
}
}catch (Exception $e) {
Db::rollback();
throw new UserException([
'msg'=>'充值失败'
]);
}
}
/**
* @param $price
* @return array
* 押金退款
*/
public function refund() {
$uid = Token::getCurrentUid();
$res = UserModel::update(['guarantee'=>0],['id'=>$uid]);
$rel = Charge::create([
'price'=>0,
'type'=>0,
'user_id'=>$uid
]);
if($rel && $res) {
return [
'msg'=>'退款成功',
'code'=>201
];
}
}
/**
* @param $start_time
* @param $bikeID
* @param $end_time
* @param $start_long
* @param $start_lati
* @param $end_long
* @param $end_lati
* @param $price
* 用户骑行后记录到数据库
*/
public function record($start_time,$bikeID,$end_time,$start_long,$start_lati,$end_long,$end_lati,$price) {
$uid = Token::getCurrentUid();
$data = [
'start_time'=>$start_time,
'end_time'=>$end_time,
'start_long'=>$start_long,
'start_lati'=>$start_lati,
'end_lati'=>$end_lati,
'end_long'=>$end_long,
'total_price'=>$price,
'user_id'=>$uid,
'bike_id'=>$bikeID
];
Db::startTrans();
try {
//创建记录
$res = Record::create($data);
//修改用户的余额
$user = new UserModel();
$userInfo = $user->find($uid);
$data = [
'balance'=>$userInfo->balance-$price
];
$rel = $user->save($data,['id'=>$uid]);
//修改小黄车的状态和位置
$bikeData = [
'is_show'=>'0',
'latitude'=>$end_lati,
'longitude'=>$end_long
];
$rs = \app\api\model\Bike::update($bikeData,['id'=>$bikeID]);
if($res && $rel && $rs) {
echo 'success';
Db::commit();
}
}catch (Exception $e) {
Db::rollback();
}
}
}
================================================
FILE: application/api/model/Base.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/9/1
* Time: 10:00
*/
namespace app\api\model;
use think\Model;
class Base extends Model
{
}
================================================
FILE: application/api/model/Bike.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/9/1
* Time: 9:59
*/
namespace app\api\model;
use think\Model;
class Bike extends Model
{
/**
* @return false|\PDOStatement|string|\think\Collection
* 获取单车的位置信息
*/
public static function getBicyclePosition() {
$data = [
'is_show'=>0,
'type'=>0
];
return self::where($data)->select();
}
/**
* @param $id
* @return array|false|\PDOStatement|string|Model
* 获取根据ID获取单车的密码
*/
public static function getBikeByID($id) {
$data = [
'id'=>$id
];
return self::where($data)->find();
}
}
================================================
FILE: application/api/model/BikeTrouble.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/9/8
* Time: 15:27
*/
namespace app\api\model;
class BikeTrouble extends Base
{
}
================================================
FILE: application/api/model/Charge.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/9/4
* Time: 14:04
*/
namespace app\api\model;
class Charge extends Base
{
}
================================================
FILE: application/api/model/Record.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/9/4
* Time: 20:52
*/
namespace app\api\model;
class Record extends Base
{
}
================================================
FILE: application/api/model/TroubleCate.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/9/8
* Time: 11:52
*/
namespace app\api\model;
class TroubleCate extends Base
{
protected $hidden = ['create_time','update_time'];
}
================================================
FILE: application/api/model/TroubleRecord.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/9/8
* Time: 11:23
*/
namespace app\api\model;
class TroubleRecord extends Base
{
}
================================================
FILE: application/api/model/User.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/9/1
* Time: 15:39
*/
namespace app\api\model;
class User extends Base
{
/**
* @param $id
* @return array|false|\PDOStatement|string|\think\Model
* 根据openid获取用户的信息
*/
public static function getUserByOpenID($id){
$data = [
'openid'=>$id
];
return self::where($data)->find();
}
/**
* @param $id
* @param $guarantee
* @return $this
* 修改保证金的金额
*/
public static function updateGuarantee($id,$guarantee) {
$data = [
'guarantee'=>$guarantee
];
return self::update($data,['id'=>$id]);
}
}
================================================
FILE: application/api/service/Token.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/9/1
* Time: 15:22
*/
namespace app\api\service;
use app\lib\exception\TokenException;
use think\Cache;
use think\Exception;
use think\Request;
class Token
{
/**
* @return string
* 生成token
*/
public function generateToken() {
$time = $_SERVER['REQUEST_TIME'];
$prefix = config('secure.prefix');
$str = getRandChars(32);
return md5($time.$prefix.$str);
}
/**
* @param $key
* @return mixed
* @throws Exception
* @throws TokenException
* 根据变量获取缓存token里面的内容,例如:uid,openid,session_key
*/
public static function getCurrentTokenVar($key) {
//获取token
$token = Request::instance()->header('token');
$vars = Cache::get($token);
if(!$vars) {
throw new TokenException();
}else {
if(!is_array($vars)) {
$vars = json_decode($vars,true);
}
if(array_key_exists($key,$vars)) {
return $vars[$key];
}else {
throw new Exception(['尝试获取token的变量不存在']);
}
}
}
public static function getCurrentUid() {
$uid = self::getCurrentTokenVar('id');
return $uid;
}
}
================================================
FILE: application/api/service/UserToken.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/9/1
* Time: 15:21
*/
namespace app\api\service;
use app\api\model\User;
use app\lib\exception\WxChatException;
use app\lib\exception\WxException;
use think\Exception;
class UserToken extends Token
{
protected $app_id;
protected $app_secret;
protected $wx_login_url;
public $code;
protected $nickname;
public function __construct($code)
{
$this->code = $code;
$this->app_id = config('wx.app_id');
$this->app_secret = config('wx.app_secret');
$this->wx_login_url = sprintf(config('wx.login_url'),$this->app_id,$this->app_secret,$code);
}
public function get() {
$result = curl_get($this->wx_login_url);
$result = json_decode($result,true);
if(!$result) {
throw new Exception([
'msg'=>'获取openID失败,微信内部错误'
]);
}else {
if(array_key_exists('errcode',$result)){
$this->processLoginError($result);
}else {
return $this->grantToken($result);
}
}
}
/**
* @param $result
* @return string
* 分配token
*/
public function grantToken($result) {
$openId = $result['openid'];
$user = User::getUserByOpenID($openId);
if($user) {
$userId = $user->id;
}else {
$userId = $this->newUser($openId);
}
$user = User::get($userId);
return $this->saveToCache($user);
}
/**
* @param $user
* @return string
* @throws Exception
* 保存到缓存中
*/
public function saveToCache($user) {
$value = json_encode($user);
$key = $this->generateToken();
$expire_in = config('setting.token_expire_in');
$res = cache($key,$value,$expire_in);
if(!$res) {
throw new Exception([
'msg'=>'缓存失败,请查看系统日志'
]);
}
return $key;
}
/**
* @param $openId
* @return mixed
* 创造新的用户
*/
public function newUser($openId) {
$user = User::create(['openid'=>$openId]);
return $user->id;
}
/**
* @param $result
* @throws WxException
* 处理微信登录的错误
*/
public function processLoginError($result) {
throw new WxChatException([
'msg'=>$result['errmsg'],
'errCode'=>$result['errcode']
]);
}
}
================================================
FILE: application/api/validate/AddressNews.php
================================================
<?php
/**
* Created by PhpStorm.
* User: 12810
* Date: 2017/7/1
* Time: 14:29
*/
namespace app\api\validate;
class AddressNews extends BaseValidate
{
protected $rule = [
'name'=>'require|isNotEmpty',
'mobile'=>'require',
'city'=>'require|isNotEmpty',
'country'=>'require|isNotEmpty',
'detail'=>'require|isNotEmpty',
'province'=>'require|isNotEmpty',
];
}
================================================
FILE: application/api/validate/AppTokenGet.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/8/6
* Time: 19:21
*/
namespace app\api\validate;
class AppTokenGet extends BaseValidate
{
protected $rule = [
'ac'=>"require",
'se'=>'require'
];
}
================================================
FILE: application/api/validate/BaseValidate.php
================================================
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2017/5/29
* Time: 9:03
*/
namespace app\api\validate;
use app\lib\exception\ParameterException;
use think\Exception;
use think\Request;
use think\Validate;
class BaseValidate extends Validate
{
/**
* @return bool
* @throws ParameterException
* 验证器的入口方法
*/
public function goCheck() {
//获取实例接口
$request = Request::instance();
//获取所有参数
$param = $request->param();
$result = $this->batch()->check($param);
if(!$result) {
$e = new ParameterException([
'msg' => $this->error
]);
throw $e;
}
return true;
}
/**
* @param $value
* @param string $rule
* @param string $data
* @param string $filed
* @return bool
* 判断参数是否是整数
*/
protected function isPostiveInt($value,$rule = '',$data = '',$filed = '')
{
if (is_numeric($value) && is_int($value + 0) && is_int($value + 0) > 0) {
return true;
} else {
return false;
}
}
/**
* @param $value
* @param string $rule
* @param string $data
* @param string $filed
* @return bool
* 判断参数是否为空
*/
public function isNotEmpty($value,$rule = '',$data = '',$filed = ''){
if(empty($value)) {
return false;
}else {
return true;
}
}
/**
* @param $arrays
* @return array
* @throws ParameterException
* 根据规则获取参数数据
*/
public function getDataByRule($arrays) {
if(array_key_exists('uid',$arrays) || array_key_exists('user_id',$arrays)) {
throw new ParameterException([
'msg'=>'传递了非法参数user_id或者uid'
]);
}
$newArr = [];
foreach ($this->rule as $key=>$value) {
$newArr[$key] = $arrays[$key];
}
return $newArr;
}
}
================================================
FILE: application/api/validate/Count.php
================================================
<?php
/**
* Created by PhpStorm.
* User: 12810
* Date: 2017/6/23
* Time: 20:29
*/
namespace app\api\validate;
class Count extends BaseValidate
{
protected $rule = [
'count'=>'isPostiveInt|between:1,15'
];
}
================================================
FILE: application/api/validate/IDCollection.php
================================================
<?php
/**
* Created by PhpStorm.
* User: 12810
* Date: 2017/6/21
* Time: 22:57
*/
namespace app\api\validate;
class IDCollection extends BaseValidate
{
protected $rule = [
'ids'=>'require|checkIDs'
];
protected $message = [
'ids'=>'ids是以逗号分隔的正整数'
];
protected function checkIDs($value) {
$values = explode(',',$value);
if(empty($values)) {
return false;
}
foreach ($values as $id) {
if(!$this->isPostiveInt($id)) {
return false;
}
}
return true;
}
}
================================================
FILE: application/api/validate/IsMustBePostiveInt.php
================================================
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2017/5/28
* Time: 22:29
*/
namespace app\api\validate;
use think\Validate;
class IsMustBePostiveInt extends BaseValidate
{
protected $rule = [
'id'=>'require|isPostiveInt',
];
protected $message = [
'id'=>'id必须是正整数'
];
}
================================================
FILE: application/api/validate/OrderPlace.php
================================================
<?php
/**
* Created by PhpStorm.
* User: 12810
* Date: 2017/7/2
* Time: 9:56
*/
namespace app\api\validate;
use app\lib\exception\ParameterException;
class OrderPlace extends BaseValidate
{
protected $rule = [
'products'=>'checkProducts'
];
protected $singleRule = [
'product_id'=>'require|isPostiveInt',
'count'=>'require|isPostiveInt'
];
public function checkProducts($values) {
if(!is_array($values)) {
throw new ParameterException([
'msg'=>'参数不合法'
]);
}
if(empty($values)) {
throw new ParameterException([
'msg'=>'商品列表不能为空'
]);
}
foreach($values as $value) {
$this->checkProduct($value);
}
return true;
}
public function checkProduct($value) {
$validate = new BaseValidate($this->singleRule);
$result = $validate->check($value);
if(!$result) {
throw new ParameterException([
'msg'=>'商品列表参数错误'
]);
}
}
}
================================================
FILE: application/api/validate/PagingParameter.php
================================================
<?php
/**
* Created by PhpStorm.
* User: 12810
* Date: 2017/7/15
* Time: 18:35
*/
namespace app\api\validate;
class PagingParameter extends BaseValidate
{
protected $rule = [
'page'=>'require|isPostiveInt',
'size'=>'isPostiveInt'
];
protected $message = [
'page'=>'分页参数必须是正整数',
'size'=>'分页参数必须是正整数'
];
}
================================================
FILE: application/api/validate/TokenGet.php
================================================
<?php
/**
* Created by PhpStorm.
* User: 12810
* Date: 2017/6/25
* Time: 14:17
*/
namespace app\api\validate;
class TokenGet extends BaseValidate
{
protected $rule = [
'code'=>'require|isNotEmpty'
];
protected $message = [
'code'=>'没有code值还想获取token值做梦哦'
];
}
================================================
FILE: application/command.php
================================================
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: yunwuxin <448901948@qq.com>
// +----------------------------------------------------------------------
return [];
================================================
FILE: application/common.php
================================================
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 流年 <liu21st@gmail.com>
// +----------------------------------------------------------------------
/**
* @param $url
* @param $type 1|post方式 0|get方式
* @param array $data
*/
function doCurl($url,$type = 0,$data=[]) {
$cu = curl_init(); //初始化
//设置选项
curl_setopt($cu,CURLOPT_URL,$url); //设置url
curl_setopt($cu,CURLOPT_RETURNTRANSFER,1); //信息以文件流的方式保存,而不是直接输出
curl_setopt($cu,CURLOPT_HEADER,0); //不包括header头部信息
if($type == 1) {
//post
curl_setopt($cu,CURLOPT_POST,1);
curl_setopt($cu,CURLOPT_POSTFIELDS,$data);
}
//执行并获取内容
$output = curl_exec($cu);
//释放curl句柄
curl_close($cu);
return $output;
}
// 应用公共文件
/**
* @param $url
* @param int $httpCode
* @return mixed
* 获取网咯资源
*/
function curl_get($url,&$httpCode = 0) {
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url); // 要访问的地址
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // 获取的信息以文件流的形式返回
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); // 对认证证书来源的检查
curl_setopt($curl,CURLOPT_CONNECTTIMEOUT,10);
$file_contents = curl_exec($curl);
$httpCode = curl_getinfo($curl,CURLINFO_HTTP_CODE);
curl_close($curl);
return $file_contents;
}
/**
* @param $length
* @return string
* 获取随机的字符串
*/
function getRandChars($length) {
$str = '';
$strPol = 'QWERTYUIOPASDFGHJKLXCVBNM1234567890qwertyuiopasdfghjklzxcvbnm';
$max =strlen($strPol)-1;
for($i=0;$i<$length;$i++) {
$str.=$strPol[rand(0,$max)];
}
return $str;
}
/**
* @param $status
* @param $message
* @param array $data
* 公用的展示方法
*/
function show($status,$message,$data =array()){
$result = [
'status'=>$status,
'message'=>$message,
'data'=>$data
];
exit(json_encode($result));
}
/**
* @param $code
* @return string
* 车辆的使用情况
*/
function userStatus($code) {
if($code == 0) {
return '未使用';
}else {
return "使用中";
}
}
/**
* @param $code
* @return string
* 车辆是否发生故障
*/
function troubleStatus($code) {
if($code == 0) {
return "正常";
}else {
return "故障";
}
}
/**
* @param $value
* @return string
* 单车的修理状态
*/
function getStatusAttr($value) {
if($value == 0) {
return $value = '待修理';
}elseif($value == 1) {
return $value = '已修理';
}
}
================================================
FILE: application/config.php
================================================
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
return [
// +----------------------------------------------------------------------
// | 应用设置
// +----------------------------------------------------------------------
// 应用命名空间
'app_namespace' => 'app',
// 应用调试模式
'app_debug' => true,
// 应用Trace
'app_trace' => false,
// 应用模式状态
'app_status' => '',
// 是否支持多模块
'app_multi_module' => true,
// 入口自动绑定模块
'auto_bind_module' => false,
// 注册的根命名空间
'root_namespace' => [],
// 扩展函数文件
'extra_file_list' => [THINK_PATH . 'helper' . EXT],
// 默认输出类型
'default_return_type' => 'html',
// 默认AJAX 数据返回格式,可选json xml ...
'default_ajax_return' => 'json',
// 默认JSONP格式返回的处理方法
'default_jsonp_handler' => 'jsonpReturn',
// 默认JSONP处理方法
'var_jsonp_handler' => 'callback',
// 默认时区
'default_timezone' => 'PRC',
// 是否开启多语言
'lang_switch_on' => false,
// 默认全局过滤方法 用逗号分隔多个
'default_filter' => '',
// 默认语言
'default_lang' => 'zh-cn',
// 应用类库后缀
'class_suffix' => false,
// 控制器类后缀
'controller_suffix' => false,
// +----------------------------------------------------------------------
// | 模块设置
// +----------------------------------------------------------------------
// 默认模块名
'default_module' => 'index',
// 禁止访问模块
'deny_module_list' => ['common'],
// 默认控制器名
'default_controller' => 'Index',
// 默认操作名
'default_action' => 'index',
// 默认验证器
'default_validate' => '',
// 默认的空控制器名
'empty_controller' => 'Error',
// 操作方法后缀
'action_suffix' => '',
// 自动搜索控制器
'controller_auto_search' => false,
// +----------------------------------------------------------------------
// | URL设置
// +----------------------------------------------------------------------
// PATHINFO变量名 用于兼容模式
'var_pathinfo' => 's',
// 兼容PATH_INFO获取
'pathinfo_fetch' => ['ORIG_PATH_INFO', 'REDIRECT_PATH_INFO', 'REDIRECT_URL'],
// pathinfo分隔符
'pathinfo_depr' => '/',
// URL伪静态后缀
'url_html_suffix' => 'html',
// URL普通方式参数 用于自动生成
'url_common_param' => false,
// URL参数方式 0 按名称成对解析 1 按顺序解析
'url_param_type' => 0,
// 是否开启路由
'url_route_on' => true,
// 路由使用完整匹配
'route_complete_match' => false,
// 路由配置文件(支持配置多个)
'route_config_file' => ['route'],
// 是否强制使用路由
'url_route_must' => false,
// 域名部署
'url_domain_deploy' => false,
// 域名根,如thinkphp.cn
'url_domain_root' => '',
// 是否自动转换URL中的控制器和操作名
'url_convert' => true,
// 默认的访问控制器层
'url_controller_layer' => 'controller',
// 表单请求类型伪装变量
'var_method' => '_method',
// 表单ajax伪装变量
'var_ajax' => '_ajax',
// 表单pjax伪装变量
'var_pjax' => '_pjax',
// 是否开启请求缓存 true自动缓存 支持设置请求缓存规则
'request_cache' => false,
// 请求缓存有效期
'request_cache_expire' => null,
// 全局请求缓存排除规则
'request_cache_except' => [],
// +----------------------------------------------------------------------
// | 模板设置
// +----------------------------------------------------------------------
'template' => [
// 模板引擎类型 支持 php think 支持扩展
'type' => 'Think',
// 模板路径
'view_path' => '',
// 模板后缀
'view_suffix' => 'html',
// 模板文件名分隔符
'view_depr' => DS,
// 模板引擎普通标签开始标记
'tpl_begin' => '{',
// 模板引擎普通标签结束标记
'tpl_end' => '}',
// 标签库标签开始标记
'taglib_begin' => '{',
// 标签库标签结束标记
'taglib_end' => '}',
],
// 视图输出字符串内容替换
'view_replace_str' => [],
// 默认跳转页面对应的模板文件
'dispatch_success_tmpl' => THINK_PATH . 'tpl' . DS . 'dispatch_jump.tpl',
'dispatch_error_tmpl' => THINK_PATH . 'tpl' . DS . 'dispatch_jump.tpl',
// +----------------------------------------------------------------------
// | 异常及错误设置
// +----------------------------------------------------------------------
// 异常页面的模板文件
'exception_tmpl' => THINK_PATH . 'tpl' . DS . 'think_exception.tpl',
// 错误显示信息,非调试模式有效
'error_message' => '页面错误!请稍后再试~',
// 显示错误信息
'show_error_msg' => false,
// 异常处理handle类 留空使用 \think\exception\Handle
'exception_handle' => 'app\lib\exception\ExceptionHandler',
// +----------------------------------------------------------------------
// | 日志设置
// +----------------------------------------------------------------------
'log' => [
// 日志记录方式,内置 file socket 支持扩展
'type' => 'File',
// 日志保存目录
'path' => LOG_PATH,
// 日志记录级别
'level' => ['error'],
],
// +----------------------------------------------------------------------
// | Trace设置 开启 app_trace 后 有效
// +----------------------------------------------------------------------
'trace' => [
// 内置Html Console 支持扩展
'type' => 'Html',
],
// +----------------------------------------------------------------------
// | 缓存设置
// +----------------------------------------------------------------------
'cache' => [
// 驱动方式
'type' => 'File',
// 缓存保存目录
'path' => CACHE_PATH,
// 缓存前缀
'prefix' => '',
// 缓存有效期 0表示永久缓存
'expire' => 0,
],
// +----------------------------------------------------------------------
// | 会话设置
// +----------------------------------------------------------------------
'session' => [
'id' => '',
// SESSION_ID的提交变量,解决flash上传跨域
'var_session_id' => '',
// SESSION 前缀
'prefix' => '',
// 驱动方式 支持redis memcache memcached
'type' => 'memcached',
// 是否自动开启 SESSION
'auto_start' => true,
],
// +----------------------------------------------------------------------
// | Cookie设置
// +----------------------------------------------------------------------
'cookie' => [
// cookie 名称前缀
'prefix' => '',
// cookie 保存时间
'expire' => 0,
// cookie 保存路径
'path' => '/',
// cookie 有效域名
'domain' => '',
// cookie 启用安全传输
'secure' => false,
// httponly设置
'httponly' => '',
// 是否使用 setcookie
'setcookie' => true,
],
//分页配置
'paginate' => [
'type' => 'bootstrap',
'var_page' => 'page',
'list_rows' => 15,
],
];
================================================
FILE: application/database.php
================================================
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
return [
// 数据库类型
'type' => 'mysql',
// 服务器地址
'hostname' => '127.0.0.1',
// 数据库名
'database' => 'ofo',
// 用户名
'username' => 'root',
// 密码
'password' => 'root',
// 端口
'hostport' => '',
// 连接dsn
'dsn' => '',
// 数据库连接参数
'params' => [],
// 数据库编码默认采用utf8
'charset' => 'utf8',
// 数据库表前缀
'prefix' => '',
// 数据库调试模式
'debug' => true,
// 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
'deploy' => 0,
// 数据库读写是否分离 主从式有效
'rw_separate' => false,
// 读写分离后 主服务器数量
'master_num' => 1,
// 指定从服务器序号
'slave_no' => '',
// 是否严格检查字段是否存在
'fields_strict' => true,
// 数据集返回类型
'resultset_type' => 'array',
// 自动写入时间戳字段
'auto_timestamp' => true,
// 时间字段取出后的默认时间格式
'datetime_format' => 'Y-m-d H:i:s',
// 是否需要进行SQL性能分析
'sql_explain' => false,
];
================================================
FILE: application/extra/map.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/10/12
* Time: 18:01
*/
return [
'ak'=>'ORFYUgrDDYS5ralxOkh5KS8gNG30mVzy',
'baidu_map_url'=>'http://api.map.baidu.com/',
'geocorder'=>'geocoder/v2/',
];
================================================
FILE: application/extra/pagination.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/10/12
* Time: 16:11
*/
return [
'page'=>1,
'list_rows'=>2,
'user'=>[
'page'=>1,
'list_row'=>10
],
'charge'=>[
'page'=>1,
'list_row'=>15
]
];
================================================
FILE: application/extra/queue.php
================================================
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: yunwuxin <448901948@qq.com>
// +----------------------------------------------------------------------
return [
'connector' => 'Sync'
];
================================================
FILE: application/extra/redis.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/9/1
* Time: 16:04
*/
return [
'ip'=>'127.0.0.1',
'port'=>6379
];
================================================
FILE: application/extra/secure.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/9/1
* Time: 15:59
*/
return [
'profix'=>'yfyjsz'
];
================================================
FILE: application/extra/setting.php
================================================
<?php
/**
* Created by PhpStorm.
* User: 12810
* Date: 2017/6/20
* Time: 21:08
*/
return [
'token_expire_in'=>7200
];
================================================
FILE: application/extra/tx.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/10/16
* Time: 11:05
*/
/**
*
* 腾讯地图的相关配置
*/
return [
'tx_url'=>'http://apis.map.qq.com/ws/geocoder/v1/',
'key'=>'CKYBZ-ED2CX-XHM4T-7TSWJ-B6RZO-RMB7H'
];
================================================
FILE: application/extra/wx.php
================================================
<?php
/**
* Created by PhpStorm.
* User: 12810
* Date: 2017/6/25
* Time: 15:46
*/
return [
'app_id'=>'wxa1352690d1c0904f',
'app_secret'=>'55554158847ba36f944a385cf8d4cb4a',
'login_url'=>"https://api.weixin.qq.com/sns/oauth2/access_token?appid=%s&secret=%s&code=%s&grant_type=authorization_code"
];
================================================
FILE: application/index/controller/Index.php
================================================
<?php
namespace app\index\controller;
class Index
{
public function index()
{
return '<style type="text/css">*{ padding: 0; margin: 0; } .think_default_text{ padding: 4px 48px;} a{color:#2E5CD5;cursor: pointer;text-decoration: none} a:hover{text-decoration:underline; } body{ background: #fff; font-family: "Century Gothic","Microsoft yahei"; color: #333;font-size:18px} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.6em; font-size: 42px }</style><div style="padding: 24px 48px;"> <h1>:)</h1><p> ThinkPHP V5<br/><span style="font-size:30px">十年磨一剑 - 为API开发设计的高性能框架</span></p><span style="font-size:22px;">[ V5.0 版本由 <a href="http://www.qiniu.com" target="qiniu">七牛云</a> 独家赞助发布 ]</span></div><script type="text/javascript" src="http://tajs.qq.com/stats?sId=9347272" charset="UTF-8"></script><script type="text/javascript" src="http://ad.topthink.com/Public/static/client.js"></script><thinkad id="ad_bd568ce7058a1091"></thinkad>';
}
}
================================================
FILE: application/lib/exception/BaseException.php
================================================
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2017/5/29
* Time: 15:46
*/
namespace app\lib\exception;
use think\Exception;
class BaseException extends Exception
{
//http状态码
public $code = 400;
//错误信息
public $msg = '参数错误';
//错误码
public $errorCode = 40000;
/**
* BaseException constructor.
* @param array $param
* 构造函数
*/
public function __construct($param = [])
{
if(!is_array($param)) {
return ;
}
if(array_key_exists('code',$param)) {
$this->code = $param['code'];
}
if(array_key_exists('msg',$param)) {
$this->msg = $param['msg'];
}
if(array_key_exists('errorCode',$param)) {
$this->errorCode= $param['errorCode'];
}
}
}
================================================
FILE: application/lib/exception/BikeException.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/9/1
* Time: 10:21
*/
namespace app\lib\exception;
class BikeException extends BaseException
{
public $code = 401;
public $msg = '单车不存在';
public $errorCode = 10000;
}
================================================
FILE: application/lib/exception/ExceptionHandler.php
================================================
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2017/5/29
* Time: 15:44
*/
namespace app\lib\exception;
use Exception;
use think\Config;
use think\exception\Handle;
use think\Log;
use think\Request;
class ExceptionHandler extends Handle
{
private $code;
private $msg;
private $errorCode;
//请求资源的url
/**
* @param Exception $e
* @return \think\response\Json
* 重写tp5的异常处理方法,自定义异常处理
*/
public function render(Exception $e)
{
//判断是什么异常类型
if($e instanceof BaseException) {
//自定义的异常,用户行为导致的异常
$this->code = $e->code;
$this->msg = $e->msg;
$this->errorCode = $e->errorCode;
}else {
//服务器内部异常
//Config::get('app_debug');
if(config('app_debug')) {
//return default error page
return parent::render($e);
}else {
$this->code = '500';
$this->msg = '服务器内部异常,不想告诉你!';
$this->errorCode = '999';
$this->recordErrorLog($e);
}
}
$request = Request::instance();
$result = [
'code'=>$this->code,
'msg'=>$this->msg,
'errorCode'=>$this->errorCode,
'request_url'=>$request->url()
];
return json($result,$this->code);
}
/**
* @param Exception $e
* 记录错误异常,用户导致的异常无需记录日志,意义不大,
* 服务器内部产生的异常需要记录到日志文件,排错
* 生产环境下,只能通过日志来排查错误,测试环境下可以直接打断点排查错误
*/
protected function recordErrorLog(Exception $e) {
Log::init([
'type'=>'File',
'path'=>LOG_PATH,
'level'=>['error']
]);
Log::record($e->getMessage(),'error');
}
}
================================================
FILE: application/lib/exception/ParameterException.php
================================================
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2017/5/30
* Time: 0:07
*/
namespace app\lib\exception;
class ParameterException extends BaseException
{
public $code = 400;
public $msg = '参数错误';
public $errorCode = 10000;
}
================================================
FILE: application/lib/exception/SuccessMessage.php
================================================
<?php
/**
* Created by PhpStorm.
* User: 12810
* Date: 2017/7/1
* Time: 15:17
*/
namespace app\lib\exception;
class SuccessMessage
{
public $code = 201;
public $msg ='ok';
public $errorCode = 0;
}
================================================
FILE: application/lib/exception/TokenException.php
================================================
<?php
/**
* Created by PhpStorm.
* User: 12810
* Date: 2017/6/29
* Time: 11:34
*/
namespace app\lib\exception;
class TokenException extends BaseException
{
public $code = 401;
public $errorCode = 10001;
public $msg = 'token已过期或者无效toekn';
}
================================================
FILE: application/lib/exception/UserException.php
================================================
<?php
/**
* Created by PhpStorm.
* User: 12810
* Date: 2017/7/1
* Time: 15:12
*/
namespace app\lib\exception;
class UserException extends BaseException
{
public $code = 401;
public $msg = '用户不存在';
public $errorCode = 60001;
}
================================================
FILE: application/lib/exception/WxChatException.php
================================================
<?php
/**
* Created by PhpStorm.
* User: 12810
* Date: 2017/6/26
* Time: 23:49
*/
namespace app\lib\exception;
class WxChatException extends BaseException
{
public $code = 400;
public $errorCode = 50000;
public $msg = '微信内部错误';
}
================================================
FILE: application/route.php
================================================
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;
//bike
Route::post('api/:version/bike/status','api/:version.bike/updateBikeStatus');
Route::get('api/:version/bike','api/:version.bike/getBicyclePosition');
Route::post('api/:version/bike','api/:version.bike/getBikeByID');
//token
Route::post('api/:version/token/user','api/:version.token/getToken');
Route::post('api/:version/token/verify','api/:version.token/verifyToken');
//user
Route::post('api/:version/user/wallet','api/:version.user/getUserInfo');
Route::post('api/:version/user/pay','api/:version.user/pay');
Route::post('api/:version/user/refund','api/:version.user/refund');
Route::post('api/:version/user/record','api/:version.user/record');
//trouble
Route::post('api/:version/trouble/record','api/:version.TroubleRecord/recordTrouble');
Route::post('api/:version/trouble','api/:version.troubleCate/getTroubleCate');
================================================
FILE: application/tags.php
================================================
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
// 应用行为扩展定义文件
return [
// 应用初始化
'app_init' => [],
// 应用开始
'app_begin' => [],
// 模块初始化
'module_init' => [],
// 操作开始执行
'action_begin' => [],
// 视图内容过滤
'view_filter' => [],
// 日志写入
'log_write' => [],
// 应用结束
'app_end' => [],
];
================================================
FILE: build.php
================================================
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
return [
// 生成应用公共文件
'__file__' => ['common.php', 'config.php', 'database.php'],
// 定义demo模块的自动生成 (按照实际定义的文件名生成)
'demo' => [
'__file__' => ['common.php'],
'__dir__' => ['behavior', 'controller', 'model', 'view'],
'controller' => ['Index', 'Test', 'UserType'],
'model' => ['User', 'UserType'],
'view' => ['index/index'],
],
// 其他更多的模块定义
];
================================================
FILE: composer.json
================================================
{
"name": "topthink/think",
"description": "the new thinkphp framework",
"type": "project",
"keywords": [
"framework",
"thinkphp",
"ORM"
],
"homepage": "http://thinkphp.cn/",
"license": "Apache-2.0",
"authors": [
{
"name": "liu21st",
"email": "liu21st@gmail.com"
}
],
"require": {
"php": ">=5.4.0",
"topthink/framework": "^5.0"
},
"extra": {
"think-path": "thinkphp"
},
"config": {
"preferred-install": "dist"
}
}
================================================
FILE: extend/.gitignore
================================================
!.gitignore
================================================
FILE: extend/Map.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/10/12
* Time: 17:59
*/
/*百度地图获取地址封装*/
class Map
{
/**
* @param $address
* @return mixed
* 根据地址获取经纬度
*/
public static function getLngLat($address)
{
$data = [
'address' => $address,
'ak' => config('map.ak'),
'output' => 'json'
];
$url = config('map.baidu_map_url') . config('map.geocorder') . '?' . http_build_query($data);
$result = doCurl($url);
$result = json_decode($result, true);
return $result;
}
/**
* @param $lng
* @param $lat
* @return mixed
* 根据经纬度获取单车的地址
*/
public static function getAddress($lng, $lat)
{
$data = [
'location' => $lng . ',' . $lat,
'ak' => config('map.ak'),
'output' => 'json'
];
$url = config('map.baidu_map_url') . config('map.geocorder') . '?' . http_build_query($data);
$result = curl_get($url);
$result = json_decode($result, true);
return $result;
}
}
================================================
FILE: extend/My/RedisPackage.php
================================================
<?php
namespace My;
class RedisPackage
{
protected static $handler = null;
protected $options = [
'host' => '118.31.12.220',
'port' => 6379,
'password' => '',
'select' => 0,
'timeout' => 0,
'expire' => 0,
'persistent' => false,
'prefix' => '',
];
public function __construct($options = [])
{
if (!extension_loaded('redis')) { //判断是否有扩展(如果你的apache没reids扩展就会抛出这个异常)
throw new \BadFunctionCallException('not support: redis');
}
if (!empty($options)) {
$this->options = array_merge($this->options, $options);
}
$func = $this->options['persistent'] ? 'pconnect' : 'connect'; //判断是否长连接
self::$handler = new \Redis;
self::$handler->$func($this->options['host'], $this->options['port'], $this->options['timeout']);
if ('' != $this->options['password']) {
self::$handler->auth($this->options['password']);
}
if (0 != $this->options['select']) {
self::$handler->select($this->options['select']);
}
}
/**
* 写入缓存
* @param string $key 键名
* @param string $value 键值
* @param int $exprie 过期时间 0:永不过期
* @return bool
*/
public static function set($key, $value, $exprie = 0)
{
if ($exprie == 0) {
$set = self::$handler->set($key, $value);
} else {
$set = self::$handler->setex($key, $exprie, $value);
}
return $set;
}
/**
* @param $key
* 删除缓存
*/
public static function delete($key) {
self::$handler->delete($key);
}
/**
* 读取缓存
* @param string $key 键值
* @return mixed
*/
public static function get($key)
{
$fun = is_array($key) ? 'Mget' : 'get';
return self::$handler->{$fun}($key);
}
/**
* 获取值长度
* @param string $key
* @return int
*/
public static function lLen($key)
{
return self::$handler->lLen($key);
}
/**
* 将一个或多个值插入到列表头部
* @param $key
* @param $value
* @return int
*/
public static function LPush($key, $value, $value2 = null, $valueN = null)
{
return self::$handler->lPush($key, $value, $value2, $valueN);
}
/**
* 移出并获取列表的第一个元素
* @param string $key
* @return string
*/
public static function lPop($key)
{
return self::$handler->lPop($key);
}
}
================================================
FILE: extend/TxMap.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/10/16
* Time: 11:02
*/
/**
* 腾讯地图根据经纬度获取地址或者根据地址获取经纬度
*/
class TxMap
{
/**
* @param $address
* @return mixed
* 根据地址获取经纬度
*/
public static function getLngLat($address){
$data = [
'address'=>$address,
'key'=>config('tx.key')
];
$url = config('tx.tx_url').'?'.http_build_query($data);
$result = doCurl($url);
return json_decode($result,true);
}
/**
* @param $lng
* @param $lat
* @return mixed
* 根据经纬度获取地址
*/
public static function getAddress($lng,$lat){
$data = [
'location'=>$lat.','.$lng,
'key'=>config('tx.key'),
'get_poi'=>0
];
$url = config('tx.tx_url').'?'.http_build_query($data);
$result = doCurl($url);
return json_decode($result,true);
}
}
================================================
FILE: extend/Weixin.php
================================================
<?php
/**
* Created by PhpStorm.
* User: yefy
* Date: 2017/10/13
* Time: 17:49
*/
class Weixin
{
//构造函数,获取Access Token
public function __construct($appid = NULL, $appsecret = NULL)
{
if(!$appid || !$appsecret){
$this->appid = config('wx.app_id');
$this->appsecret = config('wx.app_secret');
}
}
/*
* PART1 网站应用
*/
//生成扫码登录的URL
public function qrconnect($redirect_url, $scope, $state = NULL)
{
$url = "https://open.weixin.qq.com/connect/qrconnect?appid=".$this->appid."&redirect_uri=".urlencode($redirect_url)."&response_type=code&scope=".$scope."&state=".$state."#wechat_redirect";
return $url;
}
//生成OAuth2的Access Token
public function oauth2_access_token($code)
{
$url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=".$this->appid."&secret=".$this->appsecret."&code=".$code."&grant_type=authorization_code";
$res = $this->http_request($url);
return json_decode($res, true);
}
//获取用户基本信息(OAuth2 授权的 Access Token 获取 未关注用户,Access Token为临时获取)
public function oauth2_get_user_info($access_token, $openid)
{
$url = "https://api.weixin.qq.com/sns/userinfo?access_token=".$access_token."&openid=".$openid."&lang=zh_CN";
$res = $this->http_request($url);
return json_decode($res, true);
}
public function http_request($strUrl)
{
$tmpHeader[] = "API-RemoteIP: " . $_SERVER['REMOTE_ADDR'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, $tmpHeader );
curl_setopt($ch, CURLOPT_URL, $strUrl);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
$tmpRe = curl_exec($ch);
curl_close ($ch);
return $tmpRe;
}
}
================================================
FILE: ofo 无微信支付/README.md
================================================
## 运行截图
<img src="http://oht7mjuah.bkt.clouddn.com/%E9%A6%96%E9%A1%B5.png" width="270" height="480"/>
<img src="http://oht7mjuah.bkt.clouddn.com/timer-over.png" width="270" height="480" />
<img src="http://oht7mjuah.bkt.clouddn.com/timer.png" width="270" height="480" />
<img src="http://oht7mjuah.bkt.clouddn.com/wallet.png" width="270" height="480" />
<img src="http://oht7mjuah.bkt.clouddn.com/charge.png" width="270" height="480" />
<img src="http://oht7mjuah.bkt.clouddn.com/me.png" width="270" height="480" />
<img src="http://oht7mjuah.bkt.clouddn.com/password.png" width="270" height="480"/>
<img src="http://oht7mjuah.bkt.clouddn.com/warn-fill.png" width="270" height="480"/>
<img src="http://oht7mjuah.bkt.clouddn.com/mark.png" width="270" height="480"/>
## 本地运行
~~~
git clone https://github.com/MiceLiD/ofo-applet.git
~~~
微信开发者工具选择目录为ofo
## 非法域名报错
微信开发者工具中请关闭校验域名,或把www.easy-mock.com添加到域名配置中
## 提示
调试看效果请用真机,开发者工具定位有bug
[本小程序教程链接](http://www.jianshu.com/p/68e3b8927a77)
================================================
FILE: ofo 无微信支付/app.js
================================================
//app.js
const AV = require('/utils/av-weapp-min.js');
AV.init({
appId: 'pTf5kDMERjsFopcOt9mO4C3e-gzGzoHsz',
appKey: 'YRb4tW0mekPrVHpCHzokI3Bf'
})
App({
})
================================================
FILE: ofo 无微信支付/app.json
================================================
{
"pages": [
"pages/index/index",
"pages/warn/index",
"pages/scanresult/index",
"pages/billing/index",
"pages/my/index",
"pages/wallet/index",
"pages/charge/index",
"pages/logs/logs",
"pages/unlock/index",
"pages/input/index",
"pages/pay/index"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#b9dd08",
"navigationBarTitleText": "ofo 共享单车",
"navigationBarTextStyle": "black"
},
"tabBar": {
"list": [
{
"pagePath": "pages/index/index",
"iconPath": "images/bike.png",
"selectedIconPath": "images/bike.png",
"text": "用车"
},
{
"pagePath": "pages/my/index",
"iconPath": "images/my.png",
"selectedIconPath": "images/my.png",
"text": "我的"
}
]
}
}
================================================
FILE: ofo 无微信支付/app.wxss
================================================
/**app.wxss**/
.container{
background-color: #f2f2f2;
height: 100vh;
}
.title{
background-color: #f2f2f2;
padding: 30rpx 0 30rpx 50rpx;
font-size: 28rpx;
color: #000;
}
.tapbar{
display: flex;
align-items: center;
justify-content: space-between;
background-color: #fff;
padding: 40rpx;
}
.btn-charge{
width: 90%;
background-color: #b9dd08;
margin: 40rpx auto 30rpx;
text-align: center;
}
================================================
FILE: ofo 无微信支付/pages/billing/index.js
================================================
// pages/billing/index.js
Page({
data:{
hours: 0,
minuters: 0,
seconds: 0,
billing: "正在计费"
},
// 页面加载
onLoad:function(options){
console.log(options.number);
//改变单车的状态
wx.request({
url: 'https://72988837.qcloud.la//index.php/api/v1/bike/status',
method:'post',
data:{
id:options.number
}
})
wx.setStorageSync('time', true);
// 获取车牌号,设置定时器
this.setData({
number: options.number,
timer: this.timer
})
// 初始化计时器
let s = 0;
let m = 0;
let h = 0;
//获取开始的时间
var tmp = Date.parse(new Date()).toString();
tmp = tmp.substr(0, 10);
wx.setStorageSync('start_time', tmp);
// 计时开始
this.timer = setInterval(() => {
this.setData({
seconds: s++
})
if(s == 60){
s = 0;
m++;
setTimeout(() => {
this.setData({
minuters: m
});
},1000)
if(m == 60){
m = 0;
h++
setTimeout(() => {
this.setData({
hours: h
});
},1000)
}
};
},1000)
},
// 结束骑行,清除定时器
endRide: function(){
//结束时间
var tmp = Date.parse(new Date()).toString();
tmp = tmp.substr(0, 10);
wx.setStorageSync('end_time', tmp);
//结束位置
// 2.获取并设置当前位置经纬度
wx.getLocation({
type: "gcj02",
success: (res) => {
console.log(res);
wx.setStorageSync('end_long', res.longitude);
wx.setStorageSync('end_lati', res.latitude);
}
});
var times = (this.data.minuters * 60 + this.data.hours * 3600 + this.data.seconds);
wx.setStorageSync('time', false)
clearInterval(this.timer);
this.timer = "";
this.setData({
billing: "本次骑行耗时",
disabled: true
});
setTimeout(()=>{
wx.navigateTo({
url: '../pay/index?times='+times+"&bikeID="+this.data.number,
});
},2000);
},
// 携带定时器内容回到地图
moveToIndex: function(){
// 如果定时器为空
if(this.timer == ""){
// 关闭计费页跳到地图
wx.switchTab({
url: '../index/index'
})
// 保留计费页跳到地图
}else{
wx.switchTab({
url: '../index/index?timer=' + this.timer
})
}
}
})
================================================
FILE: ofo 无微信支付/pages/billing/index.json
================================================
{}
================================================
FILE: ofo 无微信支付/pages/billing/index.wxml
================================================
<!--pages/billing/index.wxml-->
<view class="container">
<view class="number">
<text>当前单车编号: {{number}}</text>
</view>
<view class="time">
<view class="time-title">
<text>{{billing}}</text>
</view>
<view class="time-content">
<text>{{hours}}:{{minuters}}:{{seconds}}</text>
</view>
</view>
<view class="endride">
<button type="warn" disabled="{{disabled}}" bindtap="endRide">结束骑行</button>
<button type="primary" bindtap="moveToIndex">回到地图</button>
</view>
</view>
================================================
FILE: ofo 无微信支付/pages/billing/index.wxss
================================================
.container{
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
background-color: #fff;
}
.number,.endride{
padding: 60rpx 0;
flex: 2;
width: 100%;
text-align: center;
}
.time{
text-align: center;
width: 100%;
flex: 6;
}
.time .time-content{
font-size: 100rpx;
}
.endride button{
width: 90%;
margin-top: 40rpx;
}
================================================
FILE: ofo 无微信支付/pages/charge/index.js
================================================
// pages/charge/index.js
Page({
data:{
inputValue: 0
},
// 页面加载
onLoad:function(options){
console.log(options);
this.setData({
from: options.from
})
wx.setNavigationBarTitle({
title: '充值'
})
},
// 存储输入的充值金额
bindInput: function(res){
this.setData({
inputValue: res.detail.value
})
},
// 充值
charge: function(){
// 必须输入大于0的数字
var that = this;
if(parseInt(this.data.inputValue) <= 0 || isNaN(this.data.inputValue)){
wx.showModal({
title: "警告",
content: "请输入金额",
showCancel: false,
confirmText: "确定"
})
}else{
var token = wx.getStorageSync('token');
wx.request({
url: 'https://72988837.qcloud.la/index.php/api/v1/user/pay',
method: 'post',
data: {
from:this.data.from,
price: this.data.inputValue,
},
header: {
'token': token
},
success: function (rel) {
if(that.data.from == 'index') {
wx.setStorageSync('guarantee', that.data.inputValue);
wx.switchTab({
url: '../index/index',
success:function(res){
wx.showToast({
title: "充值成功",
icon: "success",
duration: 2000
});
}
})
}else if(that.data.from == 'wallet') {
var balance = wx.getStorageSync('balance');
var price = parseFloat(that.data.inputValue) + parseFloat(balance);
wx.setStorageSync('balance', price);
wx.redirectTo({
url: '../wallet/index',
success: function (res) {
wx.showToast({
title: "充值成功",
icon: "success",
duration: 2000
});
}
});
}else if(that.data.from == 'pay'){
var balance = wx.getStorageSync('balance');
var price = parseFloat(that.data.inputValue) +parseFloat(balance);
wx.setStorageSync('balance', price);
wx.showToast({
title: "充值成功",
icon: "success",
duration: 10000,
success:function(res) {
wx.navigateBack({
delta: 1,
})
}
});
}
}
});
}
},
// 页面销毁,更新本地金额,(累加)
onUnload:function(){
wx.getStorage({
key: 'overage',
success: (res) => {
wx.setStorage({
key: 'overage',
data: {
overage: parseInt(this.data.inputValue) + parseInt(res.data.overage)
}
})
},
// 如果没有本地金额,则设置本地金额
fail: (res) => {
wx.setStorage({
key: 'overage',
data: {
overage: parseInt(this.data.inputValue)
},
})
}
})
}
})
================================================
FILE: ofo 无微信支付/pages/charge/index.json
================================================
{}
================================================
FILE: ofo 无微信支付/pages/charge/index.wxml
================================================
<!--pages/charge/index.wxml-->
<view class="container">
<view class="title">请输入充值金额</view>
<view class="input-box">
<input bindinput="bindInput" />
</view>
<button bindtap="charge" class="btn-charge">充值</button>
</view>
================================================
FILE: ofo 无微信支付/pages/charge/index.wxss
================================================
/* pages/charge/index.wxss */
.input-box{
background-color: #fff;
margin: 0 auto;
padding: 20rpx 0;
border-radius: 10rpx;
width: 90%;
}
.input-box input{
width: 100%;
height: 100%;
text-align: center;
}
================================================
FILE: ofo 无微信支付/pages/index/index.js
================================================
//index.js
//获取应用实例
var app = getApp()
Page({
data: {
scale: 18,
latitude: 0,
longitude: 0,
time:false
},
// 页面加载
onLoad: function (options) {
var that = this;
// 2.获取并设置当前位置经纬度
wx.getLocation({
type: "gcj02",
success: (res) => {
//获取用户的初始位置
wx.setStorageSync('start_long', res.longitude);
wx.setStorageSync('start_lati', res.latitude);
this.setData({
longitude: res.longitude,
latitude: res.latitude
});
}
});
wx.setStorageSync('time', false);
// this.setData({
// markers:[
// {
// "id": 1,
// "title": "去这里",
// "iconPath": "/images/markers.png",
// "latitude": 31.096575,
// "longitude": 121.506271,
// "width": 45,
// "height": 50
// },
// {
// "id": 2,
// "title": "去这里",
// "iconPath": "/images/markers.png",
// "latitude": 31.09761,
// "longitude": 121.50666,
// "width": 45,
// "height": 50
// }
// ]
// })
// 4.请求服务器,显示附近的单车,用marker标记
wx.request({
url: 'https://72988837.qcloud.la//index.php/api/v1/bike',
data: {},
header:{
'Content-Type': 'application/json'
},
method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
// header: {}, // 设置请求的 header
success: (res) => {
console.log(res);
let data = res.data.map((item, index, arr) => {
return {
"id": item.id,
"title": "去这里",
"iconPath": "/images/markers.png",
"latitude": item.latitude,
"longitude": item.longitude,
"width": 45,
"height": 50
}
})
console.log(data);
this.setData({
markers: data
});
// console.log(res);
// for (var i = 0; i < res.data.length; i++) {
// data[i].id = res.data[i].id,
// data[i].title = "title",
// data[i].iconPath = "/images/markers.png",
// data[i].latitude = res.data[i].latitude,
// data[i].longitude = res.data[i].longitude,
// data[i].width = res.data[i].width,
// data[i].height = res.data[i].height
// }
// console.log(data);
// this.setData({
// markers: data
// })
}
});
// 3.设置地图控件的位置及大小,通过设备宽高定位
wx.getSystemInfo({
success: (res) => {
this.setData({
controls: [{
id: 1,
iconPath: '/images/location.png',
position: {
left: 20,
top: res.windowHeight - 80,
width: 50,
height: 50
},
clickable: true
},
{
id: 2,
iconPath: '/images/use.png',
position: {
left: res.windowWidth/2 - 45,
top: res.windowHeight - 100,
width: 90,
height: 90
},
clickable: true
},
{
id: 3,
iconPath: '/images/warn.png',
position: {
left: res.windowWidth - 70,
top: res.windowHeight - 80,
width: 50,
height: 50
},
clickable: true
},
{
id: 4,
iconPath: '/images/marker.png',
position: {
left: res.windowWidth/2 - 11,
top: res.windowHeight/2 - 45,
width: 22,
height: 45
},
clickable: true
},]
});
}
});
},
// 页面显示
onShow: function(){
// 1.创建地图上下文,移动当前位置到地图中心
this.mapCtx = wx.createMapContext("ofoMap");
this.movetoPosition()
},
// 地图控件点击事件
bindcontroltap: function(e){
// 判断点击的是哪个控件 e.controlId代表控件的id,在页面加载时的第3步设置的id
switch(e.controlId){
// 点击定位控件
case 1: this.movetoPosition();
break;
// 点击立即用车,判断当前是否正在计费
case 2: if(!wx.getStorageSync('time')){
//根据token判断是否登录,没有登录,先登录,第一种情况没有token
//直接跳转到登录页,第二种情况有token,但是已经过期了,需要先删除token,再重新登录
if(!wx.getStorageSync('token')){
wx.showModal({
title: '请先登录',
content: '用车失败',
success:function(res){
wx.switchTab({
url: '../my/index',
});
}
});
}else if(wx.getStorageSync('token')) {
var token = wx.getStorageSync('token');
wx.request({
url: 'https://72988837.qcloud.la//index.php/api/v1/token/verify',
method:'post',
header:{
token:token
},
success:function(res){
if(res.statusCode == '401') {
wx.removeStorageSync('userInfo');
wx.showModal({
title: '用车失败',
content: '登录已过期,请重新登录',
showCancel: false,
success: function(res) {
wx.switchTab({
url: '../my/index',
});
},
});
}else if(wx.getStorageSync('guarantee') == 0) {
wx.showModal({
title: '用车失败',
content: '您的押金为0,请先充值199元',
showCancel: false,
success: function(res) {
wx.navigateTo({
url: '../charge/index?from=index',
});
},
})
}else {
wx.setStorageSync('login', true);
wx.navigateTo({
url: '../unlock/index',
})
}
}
});
}
// 当前已经在计费就回退到计费页
}else{
wx.navigateTo({
url: '../billing/index',
})
}
break;
// 点击保障控件,跳转到报障页
case 3: wx.navigateTo({
url: '../warn/index'
});
break;
default: break;
}
},
// 地图视野改变事件
bindregionchange: function(e){
// 拖动地图,获取附件单车位置
if(e.type == "begin"){
wx.request({
url: 'https://72988837.qcloud.la//index.php/api/v1/bike',
header: {
'Content-Type': 'application/json'
},
data: {},
method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
// header: {}, // 设置请求的 header
success: (res) => {
for (var i = 0; i < res.data.length; i++) {
res.data[i].title = '去这里',
res.data[i].iconPath = "/images/markers.png",
res.data[i].width = 45,
res.data[i].height = 50
}
this.setData({
_markers: res.data
})
}
})
// 停止拖动,显示单车位置
}else if(e.type == "end"){
this.setData({
markers: this.data._markers
})
}
},
// 地图标记点击事件,连接用户位置和点击的单车位置
bindmarkertap: function(e){
console.log(e);
let _markers = this.data.markers;
let markerId = e.markerId;
let currMaker = _markers[markerId];
this.setData({
polyline: [{
points: [{
longitude: this.data.longitude,
latitude: this.data.latitude
}, {
longitude: currMaker.longitude,
latitude: currMaker.latitude
}],
color:"#FF0000DD",
width: 1,
dottedLine: true
}],
scale: 18
})
},
// 定位函数,移动位置到地图中心
movetoPosition: function(){
this.mapCtx.moveToLocation();
}
})
================================================
FILE: ofo 无微信支付/pages/index/index.json
================================================
{}
================================================
FILE: ofo 无微信支付/pages/index/index.wxml
================================================
<!--index.wxml-->
<view class="container">
<map id="ofoMap" latitude="{{latitude}}" longitude="{{longitude}}" scale="{{scale}}" bindregionchange="bindregionchange" polyline="{{polyline}}" markers="{{markers}}" controls="{{controls}}" bindmarkertap="bindmarkertap" bindcontroltap="bindcontroltap" show-location/>
</view>
================================================
FILE: ofo 无微信支付/pages/index/index.wxss
================================================
/**index.wxss**/
.container{
position: relative;
width: 100%;
height: 100vh;
}
#ofoMap{
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
z-index: 1;
}
================================================
FILE: ofo 无微信支付/pages/input/index.js
================================================
// index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
numberChange:function(e) {
this.data.bikeID = e.detail.value;
},
userBike:function(){
console.log(this.data.bikeID);
if (this.data.bikeID == undefined || isNaN(this.data.bikeID)) {
wx.showModal({
title: '开锁失败',
content: '请输入正确的车牌号',
showCancel: false,
});
}else {
// 正在获取密码通知
wx.showLoading({
title: '正在获取密码',
mask: true
}),
wx.request({
url: 'https://72988837.qcloud.la//index.php/api/v1/bike',
data: { id: this.data.bikeID },
method: 'POST',
success: function (res) {
// 请求成功隐藏等待框
wx.hideLoading();
if (res.statusCode == '401') {
wx.showModal({
title: '开锁失败',
content: res.data.msg,
showCancel: false,
confirmText: '确定',
})
} else {
//携带密码和车号跳转到密码页
console.log(res);
wx.redirectTo({
url: '../scanresult/index?password=' + res.data.password + '&number=' + res.data.id,
success: function (res) {
wx.showToast({
title: '获取密码成功',
duration: 1000
});
}
});
}
}
});
}
},
})
================================================
FILE: ofo 无微信支付/pages/input/index.json
================================================
{}
================================================
FILE: ofo 无微信支付/pages/input/index.wxml
================================================
<view>
<view class="input-top">计费说明:1元/小时</view>
<view class="input-tips">温馨提示:若输错车牌号,将无法打开车锁</view>
<input class="input-num" bindinput="numberChange" name="number" focus="true" placeholder="请输入车牌号" type="number" />
<view class="input-bottom" bindtap="userBike">立即用车</view>
</view>
================================================
FILE: ofo 无微信支付/pages/input/index.wxss
================================================
/* index.wxss */
.input-top{
text-align: center;
margin: 40rpx auto;
border-radius: 20rpx;
background-color: #9c9a9a;
font-size: 30rpx;
width: 40%;
}
.input-tips{
text-align: center;
font-size: 20rpx;
color: red;
}
.input-num {
text-align: center;
margin: 20rpx auto;
height: 80rpx;
width: 80%;
border-radius: 40rpx;
border:1rpx solid #f5f804;
}
.input-bottom {
text-align: center;
height: 80rpx;
margin: 30rpx auto;
width: 80%;
line-height: 80rpx;
border-radius: 40rpx;
background-color:#f5f804;
}
================================================
FILE: ofo 无微信支付/pages/logs/logs.js
================================================
//logs.js
var util = require('../../utils/util.js')
Page({
data: {
logs: []
},
onLoad: function () {
this.setData({
logs: (wx.getStorageSync('logs') || []).map(function (log) {
return util.formatTime(new Date(log))
})
})
}
})
================================================
FILE: ofo 无微信支付/pages/logs/logs.json
================================================
{
"navigationBarTitleText": "查看启动日志"
}
================================================
FILE: ofo 无微信支付/pages/logs/logs.wxml
================================================
<!--logs.wxml-->
<view class="container log-list">
<block wx:for="{{logs}}" wx:for-item="log" wx:key="*this">
<text class="log-item">{{index + 1}}. {{log}}</text>
</block>
</view>
================================================
FILE: ofo 无微信支付/pages/logs/logs.wxss
================================================
.log-list {
display: flex;
flex-direction: column;
padding: 40rpx;
}
.log-item {
margin: 10rpx;
}
================================================
FILE: ofo 无微信支付/pages/my/index.js
================================================
// pages/my/index.js
Page({
data:{
// 用户信息
from:'personal',
userInfo: {
avatarUrl: "",
nickName: "未登录"
},
bType: "primary", // 按钮类型
actionText: "登录", // 按钮文字提示
lock: false //登录按钮状态,false表示未登录
},
// 页面加载
onLoad:function(){
// 设置本页导航标题
wx.setNavigationBarTitle({
title: '个人中心'
})
// 获取本地数据-用户信息
wx.getStorage({
key: 'userInfo',
// 能获取到则显示用户信息,并保持登录状态,不能就什么也不做
success: (res) => {
wx.hideLoading();
this.setData({
userInfo: {
avatarUrl: res.data.userInfo.avatarUrl,
nickName: res.data.userInfo.nickName
},
bType: 'warn',
actionText: '退出登录',
lock: true
})
}
});
},
//生命周期函数--监听页面显示
onShow: function () {
var that = this;
if (!wx.getStorageSync('token')) {
this.data.lock = false;
this.setData({
userInfo: {
avatarUrl: "",
nickName: "未登录"
},
bType: "primary",
actionText: "登录"
})
}
if(wx.getStorageSync('token')) {
var token = wx.getStorageSync('token');
wx.request({
url: 'https://72988837.qcloud.la//index.php/api/v1/token/verify',
method: 'post',
header: {
token: token
},
success: function (res) {
if (res.statusCode == '401') {
that.setData({
userInfo: {
avatarUrl: "",
nickName: "未登录"
},
bType: "primary",
actionText: "登录"
});
// wx.showModal({
// title: '用车失败',
// content: '登录已过期,请重新登录',
// showCancel: false,
// });
}
}
});
}
},
// 登录或退出登录按钮点击事件
bindAction: function(){
// 如果没有登录,登录按钮操作
this.data.lock = !this.data.lock;
if(this.data.lock){
wx.showLoading({
title: "正在登录"
});
var that = this;
wx.login({
success: (res) => {
console.log(res);
wx.request({
url: 'https://72988837.qcloud.la//index.php/api/v1/token/user',
header: {
'Content-Type': 'application/json'
},
method:'post',
data:{code:res.code},
success:function(rel) {
wx.setStorageSync('login',true);
console.log(rel.data.token);
wx.setStorageSync('token', rel.data.token);
//把余额和保证金存储到缓存中
var that = this;
var token = wx.getStorageSync('token');
wx.request({
url: 'https://72988837.qcloud.la//index.php/api/v1/user/wallet',
method: 'post',
header: {
'token': token
},
success: function (res) {
wx.setStorageSync('balance', res.data.balance);
wx.setStorageSync('guarantee', res.data.guarantee);
}
});
}
});
wx.hideLoading();
wx.getUserInfo({
withCredentials: false,
success: (res) => {
this.setData({
userInfo: {
avatarUrl: res.userInfo.avatarUrl,
nickName: res.userInfo.nickName
},
bType: "warn",
actionText: "退出登录"
});
wx.setStorageSync('userInfo', res);
}
})
}
})
// 如果已经登录,退出登录按钮操作
}else{
wx.showModal({
title: "确认退出?",
content: "退出后将不能使用ofo",
success: (res) => {
if(res.confirm){
console.log("确定")
// 退出登录则移除本地用户信息
wx.removeStorageSync('userInfo');
wx.removeStorageSync('token');
this.setData({
userInfo: {
avatarUrl: "",
nickName: "未登录"
},
bType: "primary",
actionText: "登录"
})
}else {
console.log("cancel")
this.setData({
lock: true
})
}
}
})
}
},
// 跳转至钱包
movetoWallet: function(){
// var that = this;
// var token = wx.getStorageSync('token');
// wx.request({
// url: 'https://72988837.qcloud.la//index.php/api/v1/user/wallet',
// method: 'post',
// header: {
// 'token': token
// },
// success: function (res) {
// if (res.data.guarantee == 0){
// wx.showModal({
// title: '请先充值',
// content: '您的押金为0,请先充值199元',
// success: function(res) {
// wx.redirectTo({
// url: '../charge/index'+"?from="+that.data.from,
// })
// },
// fail: function(res) {},
// complete: function(res) {},
// })
// }else {
wx.navigateTo({
url: '../wallet/index',
});
}
// }
// });
// },
})
================================================
FILE: ofo 无微信支付/pages/my/index.json
================================================
{}
================================================
FILE: ofo 无微信支付/pages/my/index.wxml
================================================
<!--pages/my/index.wxml-->
<view class="container">
<view class="user-info">
<block wx:if="{{userInfo.avatarUrl != ''}}">
<image src="{{userInfo.avatarUrl}}"></image>
</block>
<text>{{userInfo.nickName}}</text>
</view>
<block wx:if="{{userInfo.avatarUrl != ''}}">
<view class="my-wallet tapbar" bindtap="movetoWallet">
<text>我的钱包</text>
<text>></text>
</view>
</block>
<button bindtap="bindAction" class="btn-login" hover-class="gray" type="{{bType}}" >{{actionText}}</button>
</view>
================================================
FILE: ofo 无微信支付/pages/my/index.wxss
================================================
/* pages/my/index.wxss */
.user-info{
background-color: #fff;
padding-top: 60rpx;
}
.user-info image{
display: block;
width: 180rpx;
height: 180rpx;
border-radius: 50%;
margin: 0 auto 40rpx;
box-shadow: 0 0 20rpx rgba(0,0,0,.2)
}
.user-info text{
display: block;
text-align: center;
padding: 30rpx 0;
margin-bottom: 30rpx;
}
.btn-login{
position: absolute;
bottom: 60rpx;
width: 90%;
left: 50%;
margin-left: -45%;
}
.gray{
background-color: #ccc;
}
================================================
FILE: ofo 无微信支付/pages/pay/index.js
================================================
// index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var times = options.times;
var price = Math.ceil(times/3600);
var bikeID = options.bikeID;
this.setData({
price:price,
bikeID:bikeID
});
},
pay:function(){
var that = this;
if ((wx.getStorageSync('balance')-this.data.price)>=0){
wx.request({
url: 'https://72988837.qcloud.la//index.php/api/v1/user/record',
method: 'post',
header: {
token: wx.getStorageSync('token')
},
data: {
'start_time': wx.getStorageSync('start_time'),
'end_time': wx.getStorageSync('end_time'),
'start_long': wx.getStorageSync('start_long'),
'start_lati': wx.getStorageSync('start_lati'),
'end_long': wx.getStorageSync('end_long'),
'end_lati': wx.getStorageSync('end_lati'),
'price': this.data.price,
'bikeID': this.data.bikeID
},
success: function (res) {
//更新余额的缓存
var balance = wx.getStorageSync('balance');
var price =balance - that.data.price;
wx.setStorageSync('balance', price);
//清除时间和位置的缓存
wx.removeStorageSync('end_time');
wx.removeStorageSync('start_time');
wx.removeStorageSync('start_long');
wx.removeStorageSync('start_lati');
wx.removeStorageSync('end_long');
wx.removeStorageSync('end_lati');
wx.showToast({
title: '支付成功',
icon: 'success',
duration: 6000,
success: function(res) {
wx.switchTab({
url: '../index/index',
})
},
})
}
});
}else {
wx.showModal({
title: '支付失败',
content: '您的余额不足,请先充值',
success: function(res) {
wx.navigateTo({
url: '../charge/index?from=pay',
})
},
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
================================================
FILE: ofo 无微信支付/pages/pay/index.json
================================================
{}
================================================
FILE: ofo 无微信支付/pages/pay/index.wxml
================================================
<view class="">
<view class="top">关锁后请打乱密码,注意检查车篮,带好随身物品</view>
<view class="distance">本次行程需要支付(元)</view>
<view class="price">{{price}}.00</view>
<view class="middle">
<view class="total-fee">总费用:{{price}}元</view>
<view class="discount">未使用优惠券></view>
</view>
<view class="pay" bindtap="pay">确认支付</view>
</view>
================================================
FILE: ofo 无微信支付/pages/pay/index.wxss
================================================
.top {
font-size: 30rpx;
height: 70rpx;
width: 100%;
color: #d43e5d;
text-align: center;
line-height: 70rpx;
background-color: #d7e482;
}
.distance {
text-align: center;
margin-top:80rpx;
height: 10rpx;
font-size: 30rpx;
color: #b3b3b1;
}
.price {
margin-top: 30rpx;
text-align: center;
font-size: 80rpx;
font-weight: bold;
}
.middle {
display: flex;
justify-content: space-between;
align-content: center;
margin-top: 50rpx;
margin-bottom: 80rpx;
padding: 0 100rpx 0 100rpx;
}
.total-fee {
color: #b3b3b1;
font-size: 30rpx;
}
.discount {
color:#d43e5d;
font-size: 30rpx;
}
.pay {
text-align: center;
height: 80rpx;
line-height: 80rpx;
width: 80%;
margin: 0 auto;
border-radius: 40rpx;
background-color: #f5f804;
box-shadow: 0 10rpx 0 #d4d630;
}
================================================
FILE: ofo 无微信支付/pages/scanresult/index.js
================================================
// pages/scanresult/index.js
Page({
data:{
time: 3
},
// 页面加载
onLoad:function(options){
// 获取解锁密码
this.setData({
password: options.password
})
// 设置初始计时秒数
let time = 3;
// 开始定时器
this.timer = setInterval(() => {
this.setData({
time: -- time
});
// 读完秒后携带单车号码跳转到计费页
if(time < 0){
clearInterval(this.timer)
wx.redirectTo({
url: '../billing/index?number=' + options.number
})
}
},1000)
},
// 点击去首页报障
moveToWarn: function(){
clearInterval(this.timer)
wx.redirectTo({
url: '../warn/index'
})
}
})
================================================
FILE: ofo 无微信支付/pages/scanresult/index.json
================================================
{}
================================================
FILE: ofo 无微信支付/pages/scanresult/index.wxml
================================================
<!--pages/scanresult/index.wxml-->
<view class="container">
<view class="password-title">
<text>开锁密码</text>
</view>
<view class="password-content">
<text>{{password}}</text>
</view>
<view class="tips">
<text>请使用密码解锁,{{time}}s后开始计费</text>
<view class="tips-action" bindtap="moveToWarn">
车辆有问题?
<text class="tips-href">回首页去车辆报障</text>
</view>
</view>
</view>
================================================
FILE: ofo 无微信支付/pages/scanresult/index.wxss
================================================
.container{
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
background-color: #fff;
}
.password-title,.tips{
width: 100%;
flex: 1;
text-align: center;
padding: 60rpx 0;
}
.password-content{
width: 100%;
flex: 8;
text-align: center;
font-size: 240rpx;
font-weight: 900;
}
.tips{
font-size: 32rpx;
}
.tips .tips-action{
margin-top: 20rpx;
}
.tips .tips-href{
color: #b9dd08
}
================================================
FILE: ofo 无微信支付/pages/unlock/index.js
================================================
// index.js
Page({
/**
* 页面的初始数据
*/
data: {
type:'scan'
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
scan:function() {
wx.scanCode({
success: (res) => {
// 正在获取密码通知
wx.showLoading({
title: '正在获取密码',
mask: true
})
// 请求服务器获取密码和车号
wx.request({
url: 'https://www.easy-mock.com/mock/59098d007a878d73716e966f/ofodata/password',
data: {},
method: 'GET',
success: function(res){
// 请求密码成功隐藏等待框
wx.hideLoading();
// 携带密码和车号跳转到密码页
wx.redirectTo({
url: '../scanresult/index?password=' + res.data.data.password + '&number=' + res.data.data.number,
success: function(res){
wx.showToast({
title: '获取密码成功',
duration: 1000
})
}
})
}
})
}
})
},
changeType:function() {
wx.redirectTo({
url: '../input/index',
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
================================================
FILE: ofo 无微信支付/pages/unlock/index.json
================================================
{}
================================================
FILE: ofo 无微信支付/pages/unlock/index.wxml
================================================
<view class="">
<view class="text-box">
<view class="top">您是有押金用户,可以正常用车</view>
<view class="middle">请规范用车,用完记得结束行程</view>
<view class="scan" bindtap="scan" >扫码骑车</view>
<view class="bottom" bindtap="changeType">手动输入</view>
</view>
</view>
================================================
FILE: ofo 无微信支付/pages/unlock/index.wxss
================================================
/* index.wxss */
.top {
font-size: 28rpx;
text-align: center;
line-height: 30rpx;
margin: 30px;
color: #169e99;
}
.middle {
font-size: 28rpx;
text-align: center;
line-height: 30rpx;
margin: 20px 20px 40px;
}
.scan {
text-align: center;
height: 80rpx;
margin: 0 auto;
width: 80%;
line-height: 80rpx;
border-radius: 40rpx;
background-color: #f5f804;
}
.bottom {
text-align: center;
height: 80rpx;
margin: 30rpx auto;
width: 80%;
line-height: 80rpx;
border-radius: 40rpx;
border:1rpx solid #93938d;
}
================================================
FILE: ofo 无微信支付/pages/wallet/index.js
================================================
// pages/wallet/index.js
Page({
data:{
from: 'wallet',
overage: 0,
ticket: 0
},
// 页面加载
onLoad:function(options){
wx.setNavigationBarTitle({
title: '我的钱包'
});
this._loadData();
},
_loadData() {
var that = this;
var token = wx.getStorageSync('token');
wx.request({
url: 'https://72988837.qcloud.la/index.php/api/v1/user/wallet',
method:'post',
header:{
'token':token
},
success:function(res){
console.log(res);
that.setData({
userInfo:res.data,
});
}
});
},
// 页面加载完成,更新本地存储的overage
onReady:function(){
wx.getStorage({
key: 'overage',
success: (res) => {
this.setData({
overage: res.data.overage
})
}
})
},
// 页面显示完成,获取本地存储的overage
onShow:function(){
wx.getStorage({
key: 'overage',
success: (res) => {
this.setData({
overage: res.data.overage
})
}
})
},
// 余额说明
overageDesc: function(){
wx.showModal({
title: "",
content: "充值余额0.00元+活动赠送余额0.00元",
showCancel: false,
confirmText: "我知道了",
})
},
// 跳转到充值页面
movetoCharge: function(){
// 关闭当前页面,跳转到指定页面,返回时将不会回到当前页面
wx.redirectTo({
url: '../charge/index'+"?from="+this.data.from
})
},
// 用车券
showTicket: function(){
wx.showModal({
title: "",
content: "你没有用车券了",
showCancel: false,
confirmText: "好吧",
})
},
// 押金退还
showDeposit: function(){
wx.showModal({
title: "",
content: "押金会立即退回,退款后,您将不能使用ofo共享单车确认要进行此退款吗?",
cancelText: "继续使用",
cancelColor: "#b9dd08",
confirmText: "押金退款",
confirmColor: "#ccc",
success: (res) => {
if(res.confirm){
wx.request({
url: 'https://72988837.qcloud.la/index.php/api/v1/user/refund',
header:{
token:wx.getStorageSync('token')
},
method:'post',
success:function(res) {
wx.setStorageSync('guarantee', 0.00);
wx.showModal({
title: '操作成功',
content: '押金已经退还到您的钱包中,注意查收',
showCancel:true,
success:function(res){
wx.switchTab({
url: '../index/index',
})
}
})
}
});
}
}
});
},
// 关于ofo
showInvcode: function(){
wx.showModal({
title: "ofo共享单车",
content: "微信服务号:ofobike,网址:m.ofo.so",
showCancel: false,
confirmText: "玩的6"
})
}
})
================================================
FILE: ofo 无微信支付/pages/wallet/index.json
================================================
{}
================================================
FILE: ofo 无微信支付/pages/wallet/index.wxml
================================================
<!--pages/wallet/index.wxml-->
<view class="container">
<view class="overage">
<view>
<text class="overage-header">我的余额(元)</text>
</view>
<view>
<text class="overage-amount">{{userInfo.balance}}</text>
</view>
<view>
<text bindtap="overageDesc" class="overage-desc">余额说明</text>
</view>
</view>
<button bindtap="movetoCharge" class="btn-charge">充值</button>
<view bindtap="showTicket" class="my-ticket tapbar">
<text>我的用车券</text>
<text><text class="c-g">{{ticket}}张</text>></text>
</view>
<view bindtap="showDeposit" class="my-deposit tapbar">
<text>我的押金</text>
<text><text class="c-y">{{userInfo.guarantee}}元,押金退款</text>></text>
</view>
<view bindtap="showInvcode" class="my-invcode tapbar">
<text>关于ofo</text>
<text>></text>
</view>
</view>
================================================
FILE: ofo 无微信支付/pages/wallet/index.wxss
================================================
/* pages/wallet/index.wxss */
.overage{
background-color: #fff;
padding: 40rpx 0;
text-align: center;
}
.overage-header{
font-size: 24rpx;
}
.overage-amount{
display: inline-block;
padding: 20rpx 0;
font-size: 100rpx;
font-weight: 700;
}
.overage-desc{
padding: 10rpx 30rpx;
font-size: 24rpx;
border-radius: 40rpx;
border: 1px solid #666;
}
.my-deposit{
margin-top: 2rpx;
}
.my-invcode{
margin-top: 40rpx;
}
.c-y{
color: #b9dd08;
padding-top: -5rpx;
padding-right: 10rpx;
}
.c-g{
padding-top: -5rpx;
padding-right: 10rpx;
}
================================================
FILE: ofo 无微信支付/pages/warn/index.js
================================================
// pages/wallet/index.js
const AV = require('../../utils/av-weapp-min.js');
Page({
data:{
// 故障车周围环境图路径数组
picUrls: [],
// 故障车编号和备注
inputValue: {
num: 0,
desc: ""
},
// 故障类型数组
checkboxValue: [],
// 选取图片提示
actionText: "拍照/相册",
// 提交按钮的背景色,未勾选类型时无颜色
btnBgc: "",
// 复选框的value,此处预定义,然后循环渲染到页面
},
// 页面加载
onLoad:function(options){
var that = this;
wx.setNavigationBarTitle({
title: '报障维修'
});
//获取故障的类型
wx.request({
url: 'https://72988837.qcloud.la//index.php/api/v1/trouble',
method:'post',
success:function(res) {
let data = res.data.map((item, index, arr) => {
return {
"id": item.id,
"value": item.name
}
})
console.log(data);
that.setData({
itemsValue: data
});
}
})
},
// 勾选故障类型,获取类型值存入checkboxValue
checkboxChange: function(e){
let _values = e.detail.value;
if(_values.length == 0){
this.setData({
btnBgc: ""
})
}else{
this.setData({
checkboxValue: _values,
btnBgc: "#b9dd08"
})
}
},
// 输入单车编号,存入inputValue
numberChange: function(e){
this.setData({
inputValue: {
num: e.detail.value,
desc: this.data.inputValue.desc
}
})
},
// 输入备注,存入inputValue
descChange: function(e){
this.setData({
inputValue: {
num: this.data.inputValue.num,
desc: e.detail.value
}
})
},
// 提交到服务器
formSubmit: function(e){
//获取单车的位置
this.setData({
address: {
'start_lati': wx.getStorageSync('start_lati'),
'start_long': wx.getStorageSync('start_long')
}});
//设置需要提交的数据
this.setData({
record:{
picUrls: this.data.picUrls,
inputValue: this.data.inputValue,
checkboxValue: this.data.checkboxValue,
address:this.data.address
}
});
console.log(this.data.record);
if(this.data.checkboxValue.length> 0){
wx.request({
url: 'https://72988837.qcloud.la//index.php/api/v1/trouble/record',
data: {
record:this.data.record
},
method: 'post', // POST
header:{
'content-type':'application/json',
'token':wx.getStorageSync('token')
},
success: function(res){
console.log(res);
if(res.statusCode == '401') {
wx.showModal({
title: '提交失败',
content: res.data.msg,
showCancel: false,
});
}else {
wx.showModal({
title: '提交成功',
content: "谢谢您的反馈",
showCancel: false,
success: function (res) {
wx.navigateBack({
delta:1
})
},
});
}
}
})
}else{
wx.showModal({
title: '提交失败',
content: '请选择故障的类型',
showCancel:false,
});
}
},
// 选择故障车周围环境图 拍照或选择相册
bindCamera: function(){
wx.chooseImage({
count: 4,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: (res) => {
let tfps = res.tempFilePaths;
let _picUrls = this.data.picUrls;
for(let item of tfps){
_picUrls.push(item);
this.setData({
picUrls: _picUrls,
actionText: "+"
});
};
var tempFilePath = res.tempFilePaths[0];
new AV.File('pictrue', {
blob: {
uri: tempFilePath,
},
}).save().then(
file => console.log(file.url())
).catch(console.error);
}
})
},
// 删除选择的故障车周围环境图
delPic: function(e){
let index = e.target.dataset.index;
let _picUrls = this.data.picUrls;
_picUrls.splice(index,1);
this.setData({
picUrls: _picUrls
})
}
})
================================================
FILE: ofo 无微信支付/pages/warn/index.json
================================================
{}
================================================
FILE: ofo 无微信支付/pages/warn/index.wxml
================================================
<!--pages/warn/index.wxml-->
<view class="container">
<view class="choose">
<view class="title">请选择故障类型</view>
<checkbox-group bindchange="checkboxChange" class="choose-grids">
<block wx:for="{{itemsValue}}" wx:key="{{item}}">
<view class="grid">
<checkbox value="{{item.id}}" checked="{{item.checked}}" color="#b9dd08" />{{item.value}}
</view>
</block>
</checkbox-group>
</view>
<view class="action">
<view class="title">拍摄单车周围环境,便于维修师傅找车</view>
<view class="action-photo">
<block wx:for="{{picUrls}}" wx:key="{{item}}" wx:index="{{index}}">
<image src="{{item}}"><icon type="cancel" data-index="{{index}}" color="red" size="18" class ="del" bindtap="delPic" /></image>
</block>
<text class="add" bindtap="bindCamera">{{actionText}}</text>
</view>
<view class="action-input">
<input bindinput="numberChange" name="number" placeholder="车牌号(车牌损坏不用填)" />
<input bindinput="descChange" name="desc" placeholder="备注" />
</view>
<view class="action-submit">
<button class="submit-btn" type="default" loading="{{loading}}" bindtap="formSubmit" style="background-color: {{btnBgc}}">提交</button>
</view>
</view>
</view>
================================================
FILE: ofo 无微信支付/pages/warn/index.wxss
================================================
/* pages/wallet/index.wxss */
.choose{
background-color: #fff;
}
.choose-grids{
display: flex;
flex-wrap: wrap;
justify-content: space-around;
padding: 50rpx;
}
.choose-grids .grid{
width: 45%;
height: 100rpx;
margin-top: 36rpx;
border-radius: 6rpx;
line-height: 100rpx;
text-align: center;
border: 2rpx solid #b9dd08;
}
.choose-grids .grid:first-child,
.choose-grids .grid:nth-of-type(2){
margin-top: 0;
}
.action .action-photo{
background-color: #fff;
padding: 40rpx 0px 40rpx 50rpx;
}
.action .action-photo image{
position: relative;
display: inline-block;
width: 120rpx;
height: 120rpx;
overflow: visible;
margin-left: 25rpx;
}
.action .action-photo image icon.del{
display: block;
position: absolute;
top: -20rpx;
right: -20rpx;
}
.action .action-photo text.add{
display: inline-block;
width: 120rpx;
height: 120rpx;
line-height: 120rpx;
text-align: center;
font-size: 24rpx;
color: #ccc;
border: 2rpx dotted #ccc;
margin-left: 25rpx;
vertical-align: top;
}
.action .action-input{
padding-left: 50rpx;
margin-top: 30rpx;
background-color: #fff;
}
.action .action-input input{
width: 90%;
padding-top: 40rpx;
padding-bottom: 40rpx;
}
.action .action-input input:first-child{
border-bottom: 2rpx solid #ccc;
padding-bottom: 20rpx;
}
.action .action-input input:last-child{
padding-top: 20rpx;
}
.action .action-submit{
padding: 40rpx 40rpx;
background-color: #f2f2f2;
}
================================================
FILE: ofo 无微信支付/project.config.json
================================================
{
"description": "项目配置文件。",
"setting": {
"urlCheck": true,
"es6": true,
"postcss": true,
"minified": true,
"newFeature": true
},
"compileType": "miniprogram",
"libVersion": "1.6.6",
"appid": "wx0c0338b196a35915",
"projectname": "ofo%E5%89%AF%E6%9C%AC",
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": []
}
}
}
================================================
FILE: ofo 无微信支付/utils/av-weapp-min.js
================================================
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AV=t():e.AV=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=31)}([function(e,t,n){var r,i;(function(){function n(e){function t(t,n,r,i,o,s){for(;o>=0&&o<s;o+=e){var a=i?i[o]:o;r=n(r,t[a],a,t)}return r}return function(n,r,i,o){r=S(r,o,4);var s=!C(n)&&O.keys(n),a=(s||n).length,u=e>0?0:a-1;return arguments.length<3&&(i=n[s?s[u]:u],u+=e),t(n,r,i,s,u,a)}}function o(e){return function(t,n,r){n=E(n,r);for(var i=x(t),o=e>0?0:i-1;o>=0&&o<i;o+=e)if(n(t[o],o,t))return o;return-1}}function s(e,t,n){return function(r,i,o){var s=0,a=x(r);if("number"==typeof o)e>0?s=o>=0?o:Math.max(o+a,s):a=o>=0?Math.min(o+1,a):o+a+1;else if(n&&o&&a)return o=n(r,i),r[o]===i?o:-1;if(i!==i)return o=t(p.call(r,s,a),O.isNaN),o>=0?o+s:-1;for(o=e>0?s:a-1;o>=0&&o<a;o+=e)if(r[o]===i)return o;return-1}}function a(e,t){var n=P.length,r=e.constructor,i=O.isFunction(r)&&r.prototype||h,o="constructor";for(O.has(e,o)&&!O.contains(t,o)&&t.push(o);n--;)o=P[n],o in e&&e[o]!==i[o]&&!O.contains(t,o)&&t.push(o)}var u=this,c=u._,l=Array.prototype,h=Object.prototype,f=Function.prototype,d=l.push,p=l.slice,_=h.toString,v=h.hasOwnProperty,y=Array.isArray,m=Object.keys,g=f.bind,b=Object.create,w=function(){},O=function(e){return e instanceof O?e:this instanceof O?void(this._wrapped=e):new O(e)};"undefined"!=typeof e&&e.exports&&(t=e.exports=O),t._=O,O.VERSION="1.8.3";var S=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}},E=function(e,t,n){return null==e?O.identity:O.isFunction(e)?S(e,t,n):O.isObject(e)?O.matcher(e):O.property(e)};O.iteratee=function(e,t){return E(e,t,1/0)};var A=function(e,t){return function(n){var r=arguments.length;if(r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],s=e(o),a=s.length,u=0;u<a;u++){var c=s[u];t&&void 0!==n[c]||(n[c]=o[c])}return n}},T=function(e){if(!O.isObject(e))return{};if(b)return b(e);w.prototype=e;var t=new w;return w.prototype=null,t},j=function(e){return function(t){return null==t?void 0:t[e]}},N=Math.pow(2,53)-1,x=j("length"),C=function(e){var t=x(e);return"number"==typeof t&&t>=0&&t<=N};O.each=O.forEach=function(e,t,n){t=S(t,n);var r,i;if(C(e))for(r=0,i=e.length;r<i;r++)t(e[r],r,e);else{var o=O.keys(e);for(r=0,i=o.length;r<i;r++)t(e[o[r]],o[r],e)}return e},O.map=O.collect=function(e,t,n){t=E(t,n);for(var r=!C(e)&&O.keys(e),i=(r||e).length,o=Array(i),s=0;s<i;s++){var a=r?r[s]:s;o[s]=t(e[a],a,e)}return o},O.reduce=O.foldl=O.inject=n(1),O.reduceRight=O.foldr=n(-1),O.find=O.detect=function(e,t,n){var r;if(r=C(e)?O.findIndex(e,t,n):O.findKey(e,t,n),void 0!==r&&r!==-1)return e[r]},O.filter=O.select=function(e,t,n){var r=[];return t=E(t,n),O.each(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r},O.reject=function(e,t,n){return O.filter(e,O.negate(E(t)),n)},O.every=O.all=function(e,t,n){t=E(t,n);for(var r=!C(e)&&O.keys(e),i=(r||e).length,o=0;o<i;o++){var s=r?r[o]:o;if(!t(e[s],s,e))return!1}return!0},O.some=O.any=function(e,t,n){t=E(t,n);for(var r=!C(e)&&O.keys(e),i=(r||e).length,o=0;o<i;o++){var s=r?r[o]:o;if(t(e[s],s,e))return!0}return!1},O.contains=O.includes=O.include=function(e,t,n,r){return C(e)||(e=O.values(e)),("number"!=typeof n||r)&&(n=0),O.indexOf(e,t,n)>=0},O.invoke=function(e,t){var n=p.call(arguments,2),r=O.isFunction(t);return O.map(e,function(e){var i=r?t:e[t];return null==i?i:i.apply(e,n)})},O.pluck=function(e,t){return O.map(e,O.property(t))},O.where=function(e,t){return O.filter(e,O.matcher(t))},O.findWhere=function(e,t){return O.find(e,O.matcher(t))},O.max=function(e,t,n){var r,i,o=-(1/0),s=-(1/0);if(null==t&&null!=e){e=C(e)?e:O.values(e);for(var a=0,u=e.length;a<u;a++)r=e[a],r>o&&(o=r)}else t=E(t,n),O.each(e,function(e,n,r){i=t(e,n,r),(i>s||i===-(1/0)&&o===-(1/0))&&(o=e,s=i)});return o},O.min=function(e,t,n){var r,i,o=1/0,s=1/0;if(null==t&&null!=e){e=C(e)?e:O.values(e);for(var a=0,u=e.length;a<u;a++)r=e[a],r<o&&(o=r)}else t=E(t,n),O.each(e,function(e,n,r){i=t(e,n,r),(i<s||i===1/0&&o===1/0)&&(o=e,s=i)});return o},O.shuffle=function(e){for(var t,n=C(e)?e:O.values(e),r=n.length,i=Array(r),o=0;o<r;o++)t=O.random(0,o),t!==o&&(i[o]=i[t]),i[t]=n[o];return i},O.sample=function(e,t,n){return null==t||n?(C(e)||(e=O.values(e)),e[O.random(e.length-1)]):O.shuffle(e).slice(0,Math.max(0,t))},O.sortBy=function(e,t,n){return t=E(t,n),O.pluck(O.map(e,function(e,n,r){return{value:e,index:n,criteria:t(e,n,r)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return e.index-t.index}),"value")};var k=function(e){return function(t,n,r){var i={};return n=E(n,r),O.each(t,function(r,o){var s=n(r,o,t);e(i,r,s)}),i}};O.groupBy=k(function(e,t,n){O.has(e,n)?e[n].push(t):e[n]=[t]}),O.indexBy=k(function(e,t,n){e[n]=t}),O.countBy=k(function(e,t,n){O.has(e,n)?e[n]++:e[n]=1}),O.toArray=function(e){return e?O.isArray(e)?p.call(e):C(e)?O.map(e,O.identity):O.values(e):[]},O.size=function(e){return null==e?0:C(e)?e.length:O.keys(e).length},O.partition=function(e,t,n){t=E(t,n);var r=[],i=[];return O.each(e,function(e,n,o){(t(e,n,o)?r:i).push(e)}),[r,i]},O.first=O.head=O.take=function(e,t,n){if(null!=e)return null==t||n?e[0]:O.initial(e,e.length-t)},O.initial=function(e,t,n){return p.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},O.last=function(e,t,n){if(null!=e)return null==t||n?e[e.length-1]:O.rest(e,Math.max(0,e.length-t))},O.rest=O.tail=O.drop=function(e,t,n){return p.call(e,null==t||n?1:t)},O.compact=function(e){return O.filter(e,O.identity)};var U=function(e,t,n,r){for(var i=[],o=0,s=r||0,a=x(e);s<a;s++){var u=e[s];if(C(u)&&(O.isArray(u)||O.isArguments(u))){t||(u=U(u,t,n));var c=0,l=u.length;for(i.length+=l;c<l;)i[o++]=u[c++]}else n||(i[o++]=u)}return i};O.flatten=function(e,t){return U(e,t,!1)},O.without=function(e){return O.difference(e,p.call(arguments,1))},O.uniq=O.unique=function(e,t,n,r){O.isBoolean(t)||(r=n,n=t,t=!1),null!=n&&(n=E(n,r));for(var i=[],o=[],s=0,a=x(e);s<a;s++){var u=e[s],c=n?n(u,s,e):u;t?(s&&o===c||i.push(u),o=c):n?O.contains(o,c)||(o.push(c),i.push(u)):O.contains(i,u)||i.push(u)}return i},O.union=function(){return O.uniq(U(arguments,!0,!0))},O.intersection=function(e){for(var t=[],n=arguments.length,r=0,i=x(e);r<i;r++){var o=e[r];if(!O.contains(t,o)){for(var s=1;s<n&&O.contains(arguments[s],o);s++);s===n&&t.push(o)}}return t},O.difference=function(e){var t=U(arguments,!0,!0,1);return O.filter(e,function(e){return!O.contains(t,e)})},O.zip=function(){return O.unzip(arguments)},O.unzip=function(e){for(var t=e&&O.max(e,x).length||0,n=Array(t),r=0;r<t;r++)n[r]=O.pluck(e,r);return n},O.object=function(e,t){for(var n={},r=0,i=x(e);r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},O.findIndex=o(1),O.findLastIndex=o(-1),O.sortedIndex=function(e,t,n,r){n=E(n,r,1);for(var i=n(t),o=0,s=x(e);o<s;){var a=Math.floor((o+s)/2);n(e[a])<i?o=a+1:s=a}return o},O.indexOf=s(1,O.findIndex,O.sortedIndex),O.lastIndexOf=s(-1,O.findLastIndex),O.range=function(e,t,n){null==t&&(t=e||0,e=0),n=n||1;for(var r=Math.max(Math.ceil((t-e)/n),0),i=Array(r),o=0;o<r;o++,e+=n)i[o]=e;return i};var I=function(e,t,n,r,i){if(!(r instanceof t))return e.apply(n,i);var o=T(e.prototype),s=e.apply(o,i);return O.isObject(s)?s:o};O.bind=function(e,t){if(g&&e.bind===g)return g.apply(e,p.call(arguments,1));if(!O.isFunction(e))throw new TypeError("Bind must be called on a function");var n=p.call(arguments,2),r=function(){return I(e,r,t,this,n.concat(p.call(arguments)))};return r},O.partial=function(e){var t=p.call(arguments,1),n=function(){for(var r=0,i=t.length,o=Array(i),s=0;s<i;s++)o[s]=t[s]===O?arguments[r++]:t[s];for(;r<arguments.length;)o.push(arguments[r++]);return I(e,n,this,this,o)};return n},O.bindAll=function(e){var t,n,r=arguments.length;if(r<=1)throw new Error("bindAll must be passed function names");for(t=1;t<r;t++)n=arguments[t],e[n]=O.bind(e[n],e);return e},O.memoize=function(e,t){var n=function(r){var i=n.cache,o=""+(t?t.apply(this,arguments):r);return O.has(i,o)||(i[o]=e.apply(this,arguments)),i[o]};return n.cache={},n},O.delay=function(e,t){var n=p.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},O.defer=O.partial(O.delay,O,1),O.throttle=function(e,t,n){var r,i,o,s=null,a=0;n||(n={});var u=function(){a=n.leading===!1?0:O.now(),s=null,o=e.apply(r,i),s||(r=i=null)};return function(){var c=O.now();a||n.leading!==!1||(a=c);var l=t-(c-a);return r=this,i=arguments,l<=0||l>t?(s&&(clearTimeout(s),s=null),a=c,o=e.apply(r,i),s||(r=i=null)):s||n.trailing===!1||(s=setTimeout(u,l)),o}},O.debounce=function(e,t,n){var r,i,o,s,a,u=function(){var c=O.now()-s;c<t&&c>=0?r=setTimeout(u,t-c):(r=null,n||(a=e.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,s=O.now();var c=n&&!r;return r||(r=setTimeout(u,t)),c&&(a=e.apply(o,i),o=i=null),a}},O.wrap=function(e,t){return O.partial(t,e)},O.negate=function(e){return function(){return!e.apply(this,arguments)}},O.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},O.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},O.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},O.once=O.partial(O.before,2);var R=!{toString:null}.propertyIsEnumerable("toString"),P=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];O.keys=function(e){if(!O.isObject(e))return[];if(m)return m(e);var t=[];for(var n in e)O.has(e,n)&&t.push(n);return R&&a(e,t),t},O.allKeys=function(e){if(!O.isObject(e))return[];var t=[];for(var n in e)t.push(n);return R&&a(e,t),t},O.values=function(e){for(var t=O.keys(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=e[t[i]];return r},O.mapObject=function(e,t,n){t=E(t,n);for(var r,i=O.keys(e),o=i.length,s={},a=0;a<o;a++)r=i[a],s[r]=t(e[r],r,e);return s},O.pairs=function(e){for(var t=O.keys(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=[t[i],e[t[i]]];return r},O.invert=function(e){for(var t={},n=O.keys(e),r=0,i=n.length;r<i;r++)t[e[n[r]]]=n[r];return t},O.functions=O.methods=function(e){var t=[];for(var n in e)O.isFunction(e[n])&&t.push(n);return t.sort()},O.extend=A(O.allKeys),O.extendOwn=O.assign=A(O.keys),O.findKey=function(e,t,n){t=E(t,n);for(var r,i=O.keys(e),o=0,s=i.length;o<s;o++)if(r=i[o],t(e[r],r,e))return r},O.pick=function(e,t,n){var r,i,o={},s=e;if(null==s)return o;O.isFunction(t)?(i=O.allKeys(s),r=S(t,n)):(i=U(arguments,!1,!1,1),r=function(e,t,n){return t in n},s=Object(s));for(var a=0,u=i.length;a<u;a++){var c=i[a],l=s[c];r(l,c,s)&&(o[c]=l)}return o},O.omit=function(e,t,n){if(O.isFunction(t))t=O.negate(t);else{var r=O.map(U(arguments,!1,!1,1),String);t=function(e,t){return!O.contains(r,t)}}return O.pick(e,t,n)},O.defaults=A(O.allKeys,!0),O.create=function(e,t){var n=T(e);return t&&O.extendOwn(n,t),n},O.clone=function(e){return O.isObject(e)?O.isArray(e)?e.slice():O.extend({},e):e},O.tap=function(e,t){return t(e),e},O.isMatch=function(e,t){var n=O.keys(t),r=n.length;if(null==e)return!r;for(var i=Object(e),o=0;o<r;o++){var s=n[o];if(t[s]!==i[s]||!(s in i))return!1}return!0};var D=function(e,t,n,r){if(e===t)return 0!==e||1/e===1/t;if(null==e||null==t)return e===t;e instanceof O&&(e=e._wrapped),t instanceof O&&(t=t._wrapped);var i=_.call(e);if(i!==_.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!==+e?+t!==+t:0===+e?1/+e===1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t}var o="[object Array]"===i;if(!o){if("object"!=typeof e||"object"!=typeof t)return!1;var s=e.constructor,a=t.constructor;if(s!==a&&!(O.isFunction(s)&&s instanceof s&&O.isFunction(a)&&a instanceof a)&&"constructor"in e&&"constructor"in t)return!1}n=n||[],r=r||[];for(var u=n.length;u--;)if(n[u]===e)return r[u]===t;if(n.push(e),r.push(t),o){if(u=e.length,u!==t.length)return!1;for(;u--;)if(!D(e[u],t[u],n,r))return!1}else{var c,l=O.keys(e);if(u=l.length,O.keys(t).length!==u)return!1;for(;u--;)if(c=l[u],!O.has(t,c)||!D(e[c],t[c],n,r))return!1}return n.pop(),r.pop(),!0};O.isEqual=function(e,t){return D(e,t)},O.isEmpty=function(e){return null==e||(C(e)&&(O.isArray(e)||O.isString(e)||O.isArguments(e))?0===e.length:0===O.keys(e).length)},O.isElement=function(e){return!(!e||1!==e.nodeType)},O.isArray=y||function(e){return"[object Array]"===_.call(e)},O.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},O.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(e){O["is"+e]=function(t){return _.call(t)==="[object "+e+"]"}}),O.isArguments(arguments)||(O.isArguments=function(e){return O.has(e,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(O.isFunction=function(e){return"function"==typeof e||!1}),O.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},O.isNaN=function(e){return O.isNumber(e)&&e!==+e},O.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"===_.call(e)},O.isNull=function(e){return null===e},O.isUndefined=function(e){return void 0===e},O.has=function(e,t){return null!=e&&v.call(e,t)},O.noConflict=function(){return u._=c,this},O.identity=function(e){return e},O.constant=function(e){return function(){return e}},O.noop=function(){},O.property=j,O.propertyOf=function(e){return null==e?function(){}:function(t){return e[t]}},O.matcher=O.matches=function(e){return e=O.extendOwn({},e),function(t){return O.isMatch(t,e)}},O.times=function(e,t,n){var r=Array(Math.max(0,e));t=S(t,n,1);for(var i=0;i<e;i++)r[i]=t(i);return r},O.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},O.now=Date.now||function(){return(new Date).getTime()};var L={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},q=O.invert(L),M=function(e){var t=function(t){return e[t]},n="(?:"+O.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};O.escape=M(L),O.unescape=M(q),O.result=function(e,t,n){var r=null==e?void 0:e[t];return void 0===r&&(r=n),O.isFunction(r)?r.call(e):r};var F=0;O.uniqueId=function(e){var t=++F+"";return e?e+t:t},O.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var J=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},W=/\\|'|\r|\n|\u2028|\u2029/g,V=function(e){return"\\"+B[e]};O.template=function(e,t,n){!t&&n&&(t=n),t=O.defaults({},t,O.templateSettings);var r=RegExp([(t.escape||J).source,(t.interpolate||J).source,(t.evaluate||J).source].join("|")+"|$","g"),i=0,o="__p+='";e.replace(r,function(t,n,r,s,a){return o+=e.slice(i,a).replace(W,V),i=a+t.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\n__p+='"),t}),o+="';\n",t.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var s=new Function(t.variable||"obj","_",o)}catch(e){throw e.source=o,e}var a=function(e){return s.call(this,e,O)},u=t.variable||"obj";return a.source="function("+u+"){\n"+o+"}",a},O.chain=function(e){var t=O(e);return t._chain=!0,t};var Q=function(e,t){return e._chain?O(t).chain():t};O.mixin=function(e){O.each(O.functions(e),function(t){var n=O[t]=e[t];O.prototype[t]=function(){var e=[this._wrapped];return d.apply(e,arguments),Q(this,n.apply(O,e))}})},O.mixin(O),O.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=l[e];O.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],Q(this,n)}}),O.each(["concat","join","slice"],function(e){var t=l[e];O.prototype[e]=function(){return Q(this,t.apply(this._wrapped,arguments))}}),O.prototype.value=function(){return this._wrapped},O.prototype.valueOf=O.prototype.toJSON=O.prototype.value,O.prototype.toString=function(){return""+this._wrapped},r=[],i=function(){return O}.apply(t,r),!(void 0!==i&&(e.exports=i))}).call(this)},function(e,t,n){"use strict";var r=(n(0),n(53).Promise);r._continueWhile=function(e,t){return e()?t().then(function(){return r._continueWhile(e,t)}):r.resolve()},e.exports=r},function(e,t,n){"use strict";var r=n(58),i=n(0),o=i.extend,s=n(1),a=n(3),u=n(6),c=n(4),l=c.getSessionToken,h=c.ajax,f=function(e,t){var n=(new Date).getTime(),i=r(n+e);return t?i+","+n+",master":i+","+n},d=function(e,t){t?e["X-LC-Sign"]=f(u.applicationKey):e["X-LC-Key"]=u.applicationKey},p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],n={"X-LC-Id":u.applicationId,"Content-Type":"application/json;charset=UTF-8"},r=!1;return"boolean"==typeof e.useMasterKey?r=e.useMasterKey:"boolean"==typeof u._config.useMasterKey&&(r=u._config.useMasterKey),r?u.masterKey?t?n["X-LC-Sign"]=f(u.masterKey,!0):n["X-LC-Key"]=u.masterKey+",master":(console.warn("masterKey is not set, fall back to use appKey"),d(n,t)):d(n,t),u.hookKey&&(n["X-LC-Hook-Key"]=u.hookKey),null!==u._config.production&&(n["X-LC-Prod"]=String(u._config.production)),n["X-LC-UA"]=u._config.userAgent,s.resolve().then(function(){var t=l(e);if(t)n["X-LC-Session"]=t;else if(!u._config.disableCurrentUser)return u.User.currentAsync().then(function(e){return e&&e._sessionToken&&(n["X-LC-Session"]=e._sessionToken),n});return n})},_=function(e){var t=e.service,n=void 0===t?"api":t,r=e.version,i=void 0===r?"1.1":r,o=e.path,s=u._config.serverURLs[n];if(!s)throw new Error("undefined server URL for "+n);return"/"!==s.charAt(s.length-1)&&(s+="/"),s+=i,o&&(s+=o),s},v=function(e){return new s(function(t,n){var r={code:e.code||-1,error:e.message||e.responseText};if(e.response&&e.response.code)r=e.response;else if(e.responseText)try{r=JSON.parse(e.responseText)}catch(e){}n(new a(r.code,r.error))})},y=function(e){var t=e.service,n=e.version,r=e.method,i=e.path,o=e.query,s=e.data,a=void 0===s?{}:s,c=e.authOptions,l=e.signKey,f=void 0===l||l;if(!u.applicationId||!u.applicationKey&&!u.masterKey)throw new Error("Not initialized");u._appRouter.refresh();var d=_({service:t,path:i,version:n});return p(c,f).then(function(e){return h({method:r,url:d,query:o,data:a,headers:e}).catch(v)})},m=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=arguments[5],a=arguments[6],u="";if(e&&(u+="/"+e),t&&(u+="/"+t),n&&(u+="/"+n),i&&i._fetchWhenSave)throw new Error("_fetchWhenSave should be in the query");if(i&&i._where)throw new Error("_where should be in the query");return r&&"get"===r.toLowerCase()&&(a=o({},a,i),i=null),y({method:r,path:u,query:a,data:i,authOptions:s})};u.request=y,e.exports={_request:m,request:y}},function(e,t,n){"use strict";function r(e,t){var n=new Error(t);return n.code=e,n}var i=n(0);i.extend(r,{OTHER_CAUSE:-1,INTERNAL_SERVER_ERROR:1,CONNECTION_FAILED:100,OBJECT_NOT_FOUND:101,INVALID_QUERY:102,INVALID_CLASS_NAME:103,MISSING_OBJECT_ID:104,INVALID_KEY_NAME:105,INVALID_POINTER:106,INVALID_JSON:107,COMMAND_UNAVAILABLE:108,NOT_INITIALIZED:109,INCORRECT_TYPE:111,INVALID_CHANNEL_NAME:112,PUSH_MISCONFIGURED:115,OBJECT_TOO_LARGE:116,OPERATION_FORBIDDEN:119,CACHE_MISS:120,INVALID_NESTED_KEY:121,INVALID_FILE_NAME:122,INVALID_ACL:123,TIMEOUT:124,INVALID_EMAIL_ADDRESS:125,MISSING_CONTENT_TYPE:126,MISSING_CONTENT_LENGTH:127,INVALID_CONTENT_LENGTH:128,FILE_TOO_LARGE:129,FILE_SAVE_ERROR:130,FILE_DELETE_ERROR:153,DUPLICATE_VALUE:137,INVALID_ROLE_NAME:139,EXCEEDED_QUOTA:140,SCRIPT_FAILED:141,VALIDATION_ERROR:142,INVALID_IMAGE_DATA:150,UNSAVED_FILE_ERROR:151,INVALID_PUSH_TIME_ERROR:152,USERNAME_MISSING:200,PASSWORD_MISSING:201,USERNAME_TAKEN:202,EMAIL_TAKEN:203,EMAIL_MISSING:204,EMAIL_NOT_FOUND:205,SESSION_MISSING:206,MUST_CREATE_USER_THROUGH_SIGNUP:207,ACCOUNT_ALREADY_LINKED:208,LINKED_ID_MISSING:250,INVALID_LINKED_SESSION:251,UNSUPPORTED_SERVICE:252,X_DOMAIN_REQUEST:602}),e.exports=r},function(e,t,n){"use strict";function r(e){var t=new RegExp("^([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2})T([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})(.([0-9]+))?Z$"),n=t.exec(e);if(!n)return null;var r=n[1]||0,i=(n[2]||1)-1,o=n[3]||0,s=n[4]||0,a=n[5]||0,u=n[6]||0,c=n[8]||0;return new Date(Date.UTC(r,i,o,s,a,u,c))}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=n(0),s=n(7),a=n(5)("leancloud:request"),u=0,c=function(e){var t=e.method,n=e.url,r=e.query,o=e.data,c=e.headers,l=void 0===c?{}:c,h=e.onprogress,f=u++;a("request("+f+")",t,n,r,o,l);var d={};if(r)for(var p in r)"object"===i(r[p])?d[p]=JSON.stringify(r[p]):d[p]=r[p];return new Promise(function(e,r){var i=s(t,n).set(l).query(d).send(o);h&&i.on("progress",h),i.end(function(t,n){return n&&a("response("+f+")",n.status,n.body||n.text,n.header),t?(n&&(t.statusCode=n.status,t.responseText=n.text,t.response=n.body),r(t)):e(n.body)})})},l=function(e){return o.isNull(e)||o.isUndefined(e)},h=function(e){return o.isArray(e)?e:void 0===e||null===e?[]:[e]},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.keys,n=e.include,r=e.includeACL,i={};return t&&(i.keys=h(t).join(",")),n&&(i.include=h(n).join(",")),r&&(i.returnACL=r),i},d=function(e){return e.sessionToken?e.sessionToken:e.user&&"function"==typeof e.user.getSessionToken?e.user.getSessionToken():void 0},p=function(e){return function(t){return e(t),t}},_=function(){},v=function(e,t,n){var r;return r=t&&t.hasOwnProperty("constructor")?t.constructor:function(){e.apply(this,arguments)},o.extend(r,e),_.prototype=e.prototype,r.prototype=new _,t&&o.extend(r.prototype,t),n&&o.extend(r,n),r.prototype.constructor=r,r.__super__=e.prototype,r};e.exports={ajax:c,isNullOrUndefined:l,ensureArray:h,transformFetchOptions:f,getSessionToken:d,tap:p,inherits:v,parseDate:r}},function(e,t,n){function r(){return!("undefined"==typeof window||!window||"undefined"==typeof window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document&&"WebkitAppearance"in document.documentElement.style||"undefined"!=typeof window&&window&&window.console&&(console.firebug||console.exception&&console.table)||"undefined"!=typeof navigator&&navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function i(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,r)}}function o(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}}function a(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}function u(){try{return window.localStorage}catch(e){}}t=e.exports=n(52),t.log=o,t.formatArgs=i,t.save=s,t.load=a,t.useColors=r,t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:u(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(a())},function(e,t,n){"use strict";(function(t){var r=n(0),i=n(43),o=n(4),s=o.inherits,a=o.parseDate,u=t.AV||{};u._config={userAgent:i,serverURLs:{},useMasterKey:!1,production:null},u._getAVPath=function(e){if(!u.applicationId)throw new Error("You need to call AV.initialize before using AV.");if(e||(e=""),!r.isString(e))throw new Error("Tried to get a localStorage path that wasn't a String.");return"/"===e[0]&&(e=e.substring(1)),"AV/"+u.applicationId+"/"+e},u._installationId=null,u._getInstallationId=function(){if(u._installationId)return u.Promise.resolve(u._installationId);var e=u._getAVPath("installationId");return u.localStorage.getItemAsync(e).then(function(t){if(u._installationId=t,u._installationId)return t;var n=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return u._installationId=n()+n()+"-"+n()+"-"+n()+"-"+n()+"-"+n()+n()+n(),u.localStorage.setItemAsync(e,u._installationId)})},u._parseDate=a,u._extend=function(e,t){var n=s(this,e,t);return n.extend=this.extend,n},u._encode=function(e,t,n){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e instanceof u.Object){if(n)throw new Error("AV.Objects not allowed here");return t&&!r.include(t,e)&&e._hasData?e._toFullJSON(t.concat(e),i):e._toPointer()}if(e instanceof u.ACL)return e.toJSON();if(r.isDate(e))return i?{__type:"Date",iso:e.toJSON()}:e.toJSON();if(e instanceof u.GeoPoint)return e.toJSON();if(r.isArray(e))return r.map(e,function(e){return u._encode(e,t,n,i)});if(r.isRegExp(e))return e.source;if(e instanceof u.Relation)return e.toJSON();if(e instanceof u.Op)return e.toJSON();if(e instanceof u.File){if(!e.url()&&!e.id)throw new Error("Tried to save an object containing an unsaved file.");return e._toFullJSON(t,i)}return r.isObject(e)?r.mapObject(e,function(e,r){return u._encode(e,t,n,i)}):e},u._decode=function(e,t){if(!r.isObject(e)||r.isDate(e))return e;if(r.isArray(e))return r.map(e,function(e){return u._decode(e)});if(e instanceof u.Object)return e;if(e instanceof u.File)return e;if(e instanceof u.Op)return e;if(e instanceof u.GeoPoint)return e;if(e instanceof u.ACL)return e;if("ACL"===t)return new u.ACL(e);if(e.__op)return u.Op._decode(e);var n;if("Pointer"===e.__type){n=e.className;var i=u.Object._create(n);if(Object.keys(e).length>3){var o=r.clone(e);delete o.__type,delete o.className,i._finishFetch(o,!0)}else i._finishFetch({objectId:e.objectId},!1);return i}if("Object"===e.__type){n=e.className;var s=r.clone(e);delete s.__type,delete s.className;var a=u.Object._create(n);return a._finishFetch(s,!0),a}if("Date"===e.__type)return u._parseDate(e.iso);if("GeoPoint"===e.__type)return new u.GeoPoint({latitude:e.latitude,longitude:e.longitude});if("Relation"===e.__type){if(!t)throw new Error("key missing decoding a Relation");var c=new u.Relation(null,t);return c.targetClassName=e.className,c}if("File"===e.__type){var l=new u.File(e.name),h=r.clone(e);return delete h.__type,l._finishFetch(h),l}return r.mapObject(e,u._decode)},u.parseJSON=u._decode,u._encodeObjectOrArray=function(e){var t=function(e){return e&&e._toFullJSON&&(e=e._toFullJSON([])),r.mapObject(e,function(e){return u._encode(e,[])})};return r.isArray(e)?e.map(function(e){return t(e)}):t(e)},u._arrayEach=r.each,u._traverse=function(e,t,n){if(e instanceof u.Object){if(n=n||[],r.indexOf(n,e)>=0)return;return n.push(e),u._traverse(e.attributes,t,n),t(e)}return e instanceof u.Relation||e instanceof u.File?t(e):r.isArray(e)?(r.each(e,function(r,i){var o=u._traverse(r,t,n);o&&(e[i]=o)}),t(e)):r.isObject(e)?(u._each(e,function(r,i){var o=u._traverse(r,t,n);o&&(e[i]=o)}),t(e)):t(e)},u._objectEach=u._each=function(e,t){r.isObject(e)?r.each(r.keys(e),function(n){t(e[n],n)}):r.each(e,t)},e.exports=u}).call(t,n(8))},function(e,t,n){function r(){}function i(e){if(!_(e))return e;var t=[];for(var n in e)o(t,n,e[n]);return t.join("&")}function o(e,t,n){if(null!=n)if(Array.isArray(n))n.forEach(function(n){o(e,t,n)});else if(_(n))for(var r in n)o(e,t+"["+r+"]",n[r]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(n));else null===n&&e.push(encodeURIComponent(t))}function s(e){for(var t,n,r={},i=e.split("&"),o=0,s=i.length;o<s;++o)t=i[o],n=t.indexOf("="),n==-1?r[decodeURIComponent(t)]="":r[decodeURIComponent(t.slice(0,n))]=decodeURIComponent(t.slice(n+1));return r}function a(e){var t,n,r,i,o=e.split(/\r?\n/),s={};o.pop();for(var a=0,u=o.length;a<u;++a)n=o[a],t=n.indexOf(":"),r=n.slice(0,t).toLowerCase(),i=b(n.slice(t+1)),s[r]=i;return s}function u(e){return/[\/+]json\b/.test(e)}function c(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||"undefined"==typeof this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.header=this.headers=a(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"!=this.req.method?this._parseBody(this.text?this.text:this.xhr.response):null}function l(e,t){var n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this
gitextract_m6p0u8d2/
├── .gitignore
├── .travis.yml
├── LICENSE.txt
├── README.md
├── application/
│ ├── .htaccess
│ ├── admin/
│ │ ├── config.php
│ │ ├── controller/
│ │ │ ├── Base.php
│ │ │ ├── Bike.php
│ │ │ ├── Charge.php
│ │ │ ├── Index.php
│ │ │ ├── Record.php
│ │ │ ├── Trouble.php
│ │ │ └── User.php
│ │ ├── model/
│ │ │ ├── Bike.php
│ │ │ ├── BikeTrouble.php
│ │ │ ├── Charge.php
│ │ │ ├── Record.php
│ │ │ ├── TroubleCate.php
│ │ │ ├── TroubleRecord.php
│ │ │ └── User.php
│ │ └── view/
│ │ ├── bike/
│ │ │ ├── add.html
│ │ │ └── index.html
│ │ ├── charge/
│ │ │ └── index.html
│ │ ├── index/
│ │ │ └── index.html
│ │ ├── public/
│ │ │ ├── footer.html
│ │ │ ├── header.html
│ │ │ └── menu.html
│ │ ├── record/
│ │ │ └── index.html
│ │ ├── trouble/
│ │ │ ├── add.html
│ │ │ ├── index.html
│ │ │ └── troublecate.html
│ │ └── user/
│ │ └── index.html
│ ├── api/
│ │ ├── controller/
│ │ │ └── v1/
│ │ │ ├── Base.php
│ │ │ ├── Bike.php
│ │ │ ├── Token.php
│ │ │ ├── TroubleCate.php
│ │ │ ├── TroubleRecord.php
│ │ │ └── User.php
│ │ ├── model/
│ │ │ ├── Base.php
│ │ │ ├── Bike.php
│ │ │ ├── BikeTrouble.php
│ │ │ ├── Charge.php
│ │ │ ├── Record.php
│ │ │ ├── TroubleCate.php
│ │ │ ├── TroubleRecord.php
│ │ │ └── User.php
│ │ ├── service/
│ │ │ ├── Token.php
│ │ │ └── UserToken.php
│ │ └── validate/
│ │ ├── AddressNews.php
│ │ ├── AppTokenGet.php
│ │ ├── BaseValidate.php
│ │ ├── Count.php
│ │ ├── IDCollection.php
│ │ ├── IsMustBePostiveInt.php
│ │ ├── OrderPlace.php
│ │ ├── PagingParameter.php
│ │ └── TokenGet.php
│ ├── command.php
│ ├── common.php
│ ├── config.php
│ ├── database.php
│ ├── extra/
│ │ ├── map.php
│ │ ├── pagination.php
│ │ ├── queue.php
│ │ ├── redis.php
│ │ ├── secure.php
│ │ ├── setting.php
│ │ ├── tx.php
│ │ └── wx.php
│ ├── index/
│ │ └── controller/
│ │ └── Index.php
│ ├── lib/
│ │ └── exception/
│ │ ├── BaseException.php
│ │ ├── BikeException.php
│ │ ├── ExceptionHandler.php
│ │ ├── ParameterException.php
│ │ ├── SuccessMessage.php
│ │ ├── TokenException.php
│ │ ├── UserException.php
│ │ └── WxChatException.php
│ ├── route.php
│ └── tags.php
├── build.php
├── composer.json
├── extend/
│ ├── .gitignore
│ ├── Map.php
│ ├── My/
│ │ └── RedisPackage.php
│ ├── TxMap.php
│ └── Weixin.php
├── ofo 无微信支付/
│ ├── README.md
│ ├── app.js
│ ├── app.json
│ ├── app.wxss
│ ├── pages/
│ │ ├── billing/
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ ├── charge/
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ ├── index/
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ ├── input/
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ ├── logs/
│ │ │ ├── logs.js
│ │ │ ├── logs.json
│ │ │ ├── logs.wxml
│ │ │ └── logs.wxss
│ │ ├── my/
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ ├── pay/
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ ├── scanresult/
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ ├── unlock/
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ ├── wallet/
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ └── warn/
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── project.config.json
│ └── utils/
│ ├── av-weapp-min.js
│ ├── base.js
│ ├── config.js
│ └── util.js
├── phpunit.xml
├── public/
│ ├── .htaccess
│ ├── index.php
│ ├── robots.txt
│ ├── router.php
│ └── static/
│ ├── .gitignore
│ ├── admin/
│ │ ├── common.css
│ │ └── js/
│ │ ├── common.js
│ │ └── dialog.js
│ ├── h-ui/
│ │ ├── css/
│ │ │ ├── H-ui.css
│ │ │ ├── H-ui.ie.css
│ │ │ └── H-ui.reset.css
│ │ └── js/
│ │ └── H-ui.js
│ ├── h-ui.admin/
│ │ ├── css/
│ │ │ ├── H-ui.admin.css
│ │ │ ├── H-ui.login.css
│ │ │ └── style.css
│ │ ├── js/
│ │ │ ├── H-ui.admin.js
│ │ │ └── de_DE.txt
│ │ └── skin/
│ │ ├── blue/
│ │ │ └── skin.css
│ │ ├── default/
│ │ │ └── skin.css
│ │ ├── green/
│ │ │ └── skin.css
│ │ ├── orange/
│ │ │ └── skin.css
│ │ ├── red/
│ │ │ └── skin.css
│ │ └── yellow/
│ │ └── skin.css
│ ├── js/
│ │ ├── common.js
│ │ ├── login.js
│ │ └── order.js
│ └── lib/
│ ├── DD_belatedPNG_0.0.8a-min.js
│ ├── Hui-iconfont/
│ │ └── 1.0.8/
│ │ ├── demo.html
│ │ └── iconfont.css
│ ├── html5shiv.js
│ ├── jquery/
│ │ └── 1.9.1/
│ │ └── jquery.js
│ └── layer/
│ └── 2.4/
│ ├── layer.js
│ └── skin/
│ └── layer.css
├── runtime/
│ └── .gitignore
├── tests/
│ ├── ExampleTest.php
│ └── TestCase.php
├── think
├── thinkphp/
│ ├── .gitignore
│ ├── .htaccess
│ ├── .travis.yml
│ ├── CONTRIBUTING.md
│ ├── LICENSE.txt
│ ├── README.md
│ ├── base.php
│ ├── codecov.yml
│ ├── composer.json
│ ├── console.php
│ ├── convention.php
│ ├── helper.php
│ ├── lang/
│ │ └── zh-cn.php
│ ├── library/
│ │ ├── think/
│ │ │ ├── App.php
│ │ │ ├── Build.php
│ │ │ ├── Cache.php
│ │ │ ├── Collection.php
│ │ │ ├── Config.php
│ │ │ ├── Console.php
│ │ │ ├── Controller.php
│ │ │ ├── Cookie.php
│ │ │ ├── Db.php
│ │ │ ├── Debug.php
│ │ │ ├── Env.php
│ │ │ ├── Error.php
│ │ │ ├── Exception.php
│ │ │ ├── File.php
│ │ │ ├── Hook.php
│ │ │ ├── Lang.php
│ │ │ ├── Loader.php
│ │ │ ├── Log.php
│ │ │ ├── Model.php
│ │ │ ├── Paginator.php
│ │ │ ├── Process.php
│ │ │ ├── Request.php
│ │ │ ├── Response.php
│ │ │ ├── Route.php
│ │ │ ├── Session.php
│ │ │ ├── Template.php
│ │ │ ├── Url.php
│ │ │ ├── Validate.php
│ │ │ ├── View.php
│ │ │ ├── cache/
│ │ │ │ ├── Driver.php
│ │ │ │ └── driver/
│ │ │ │ ├── File.php
│ │ │ │ ├── Lite.php
│ │ │ │ ├── Memcache.php
│ │ │ │ ├── Memcached.php
│ │ │ │ ├── Redis.php
│ │ │ │ ├── Sqlite.php
│ │ │ │ ├── Wincache.php
│ │ │ │ └── Xcache.php
│ │ │ ├── config/
│ │ │ │ └── driver/
│ │ │ │ ├── Ini.php
│ │ │ │ ├── Json.php
│ │ │ │ └── Xml.php
│ │ │ ├── console/
│ │ │ │ ├── Command.php
│ │ │ │ ├── Input.php
│ │ │ │ ├── LICENSE
│ │ │ │ ├── Output.php
│ │ │ │ ├── bin/
│ │ │ │ │ └── README.md
│ │ │ │ ├── command/
│ │ │ │ │ ├── Build.php
│ │ │ │ │ ├── Clear.php
│ │ │ │ │ ├── Help.php
│ │ │ │ │ ├── Lists.php
│ │ │ │ │ ├── Make.php
│ │ │ │ │ ├── make/
│ │ │ │ │ │ ├── Controller.php
│ │ │ │ │ │ ├── Model.php
│ │ │ │ │ │ └── stubs/
│ │ │ │ │ │ ├── controller.plain.stub
│ │ │ │ │ │ ├── controller.stub
│ │ │ │ │ │ └── model.stub
│ │ │ │ │ └── optimize/
│ │ │ │ │ ├── Autoload.php
│ │ │ │ │ ├── Config.php
│ │ │ │ │ ├── Route.php
│ │ │ │ │ └── Schema.php
│ │ │ │ ├── input/
│ │ │ │ │ ├── Argument.php
│ │ │ │ │ ├── Definition.php
│ │ │ │ │ └── Option.php
│ │ │ │ └── output/
│ │ │ │ ├── Ask.php
│ │ │ │ ├── Descriptor.php
│ │ │ │ ├── Formatter.php
│ │ │ │ ├── Question.php
│ │ │ │ ├── descriptor/
│ │ │ │ │ └── Console.php
│ │ │ │ ├── driver/
│ │ │ │ │ ├── Buffer.php
│ │ │ │ │ ├── Console.php
│ │ │ │ │ └── Nothing.php
│ │ │ │ ├── formatter/
│ │ │ │ │ ├── Stack.php
│ │ │ │ │ └── Style.php
│ │ │ │ └── question/
│ │ │ │ ├── Choice.php
│ │ │ │ └── Confirmation.php
│ │ │ ├── controller/
│ │ │ │ ├── Rest.php
│ │ │ │ └── Yar.php
│ │ │ ├── db/
│ │ │ │ ├── Builder.php
│ │ │ │ ├── Connection.php
│ │ │ │ ├── Query.php
│ │ │ │ ├── builder/
│ │ │ │ │ ├── Mysql.php
│ │ │ │ │ ├── Pgsql.php
│ │ │ │ │ ├── Sqlite.php
│ │ │ │ │ └── Sqlsrv.php
│ │ │ │ ├── connector/
│ │ │ │ │ ├── Mysql.php
│ │ │ │ │ ├── Pgsql.php
│ │ │ │ │ ├── Sqlite.php
│ │ │ │ │ ├── Sqlsrv.php
│ │ │ │ │ └── pgsql.sql
│ │ │ │ └── exception/
│ │ │ │ ├── BindParamException.php
│ │ │ │ ├── DataNotFoundException.php
│ │ │ │ └── ModelNotFoundException.php
│ │ │ ├── debug/
│ │ │ │ ├── Console.php
│ │ │ │ └── Html.php
│ │ │ ├── exception/
│ │ │ │ ├── ClassNotFoundException.php
│ │ │ │ ├── DbException.php
│ │ │ │ ├── ErrorException.php
│ │ │ │ ├── Handle.php
│ │ │ │ ├── HttpException.php
│ │ │ │ ├── HttpResponseException.php
│ │ │ │ ├── PDOException.php
│ │ │ │ ├── RouteNotFoundException.php
│ │ │ │ ├── TemplateNotFoundException.php
│ │ │ │ ├── ThrowableError.php
│ │ │ │ └── ValidateException.php
│ │ │ ├── log/
│ │ │ │ └── driver/
│ │ │ │ ├── File.php
│ │ │ │ ├── Socket.php
│ │ │ │ └── Test.php
│ │ │ ├── model/
│ │ │ │ ├── Collection.php
│ │ │ │ ├── Merge.php
│ │ │ │ ├── Pivot.php
│ │ │ │ ├── Relation.php
│ │ │ │ └── relation/
│ │ │ │ ├── BelongsTo.php
│ │ │ │ ├── BelongsToMany.php
│ │ │ │ ├── HasMany.php
│ │ │ │ ├── HasManyThrough.php
│ │ │ │ ├── HasOne.php
│ │ │ │ ├── MorphMany.php
│ │ │ │ ├── MorphOne.php
│ │ │ │ ├── MorphTo.php
│ │ │ │ └── OneToOne.php
│ │ │ ├── paginator/
│ │ │ │ └── driver/
│ │ │ │ └── Bootstrap.php
│ │ │ ├── process/
│ │ │ │ ├── Builder.php
│ │ │ │ ├── Utils.php
│ │ │ │ ├── exception/
│ │ │ │ │ ├── Failed.php
│ │ │ │ │ └── Timeout.php
│ │ │ │ └── pipes/
│ │ │ │ ├── Pipes.php
│ │ │ │ ├── Unix.php
│ │ │ │ └── Windows.php
│ │ │ ├── response/
│ │ │ │ ├── Json.php
│ │ │ │ ├── Jsonp.php
│ │ │ │ ├── Redirect.php
│ │ │ │ ├── View.php
│ │ │ │ └── Xml.php
│ │ │ ├── session/
│ │ │ │ └── driver/
│ │ │ │ ├── Memcache.php
│ │ │ │ ├── Memcached.php
│ │ │ │ └── Redis.php
│ │ │ ├── template/
│ │ │ │ ├── TagLib.php
│ │ │ │ ├── driver/
│ │ │ │ │ └── File.php
│ │ │ │ └── taglib/
│ │ │ │ └── Cx.php
│ │ │ └── view/
│ │ │ └── driver/
│ │ │ ├── Php.php
│ │ │ └── Think.php
│ │ └── traits/
│ │ ├── controller/
│ │ │ └── Jump.php
│ │ ├── model/
│ │ │ └── SoftDelete.php
│ │ └── think/
│ │ └── Instance.php
│ ├── phpunit.xml
│ ├── start.php
│ └── tpl/
│ ├── default_index.tpl
│ ├── dispatch_jump.tpl
│ ├── page_trace.tpl
│ └── think_exception.tpl
└── vendor/
└── .gitignore
SYMBOL INDEX (2158 symbols across 208 files)
FILE: application/admin/controller/Base.php
class Base (line 15) | class Base extends Controller
method status (line 23) | public function status() {
FILE: application/admin/controller/Bike.php
class Bike (line 14) | class Bike extends Controller
method index (line 16) | public function index() {
method add (line 21) | public function add() {
FILE: application/admin/controller/Charge.php
class Charge (line 14) | class Charge extends Controller
method index (line 16) | public function index() {
FILE: application/admin/controller/Index.php
class Index (line 15) | class Index extends Controller
method index (line 17) | public function index() {
method welcome (line 25) | public function welcome() {
FILE: application/admin/controller/Record.php
class Record (line 13) | class Record extends Controller
method index (line 19) | public function index() {
FILE: application/admin/controller/Trouble.php
class Trouble (line 17) | class Trouble extends Base
method index (line 24) | public function index() {
method troubleCate (line 41) | public function troubleCate() {
method add (line 50) | public function add(){
FILE: application/admin/controller/User.php
class User (line 14) | class User extends Controller
method index (line 16) | public function index() {
FILE: application/admin/model/Bike.php
class Bike (line 14) | class Bike extends Model
method getAllBike (line 16) | public static function getAllBike() {
FILE: application/admin/model/BikeTrouble.php
class BikeTrouble (line 14) | class BikeTrouble extends Model
FILE: application/admin/model/Charge.php
class Charge (line 14) | class Charge extends Model
method getTypeAttr (line 22) | public function getTypeAttr($value,$data) {
method user (line 33) | public function user(){
method getAllCharge (line 41) | public static function getAllCharge() {
FILE: application/admin/model/Record.php
class Record (line 16) | class Record extends Model
method bike (line 22) | public function bike() {
method user (line 30) | public function user() {
method getAllRecord (line 39) | public static function getAllRecord() {
FILE: application/admin/model/TroubleCate.php
class TroubleCate (line 14) | class TroubleCate extends Model
method getTroubleCate (line 20) | public static function getTroubleCate() {
FILE: application/admin/model/TroubleRecord.php
class TroubleRecord (line 14) | class TroubleRecord extends Model
method troubleCate (line 20) | public function troubleCate() {
method user (line 29) | public function user() {
method getAllTrouble (line 37) | public static function getAllTrouble(){
FILE: application/admin/model/User.php
class User (line 14) | class User extends Model
method getAllUser (line 16) | public static function getAllUser() {
FILE: application/api/controller/v1/Base.php
class Base (line 14) | class Base extends Controller
FILE: application/api/controller/v1/Bike.php
class Bike (line 16) | class Bike extends Base
method getBicyclePosition (line 23) | public function getBicyclePosition() {
method updateBikeStatus (line 38) | public function updateBikeStatus($type = 0,$id) {
method getBikeByID (line 76) | public function getBikeByID($id) {
FILE: application/api/controller/v1/Token.php
class Token (line 18) | class Token extends Base
method getToken (line 25) | public function getToken($code) {
method verifyToken (line 39) | public function verifyToken() {
FILE: application/api/controller/v1/TroubleCate.php
class TroubleCate (line 12) | class TroubleCate extends Base
method getTroubleCate (line 18) | public function getTroubleCate() {
FILE: application/api/controller/v1/TroubleRecord.php
class TroubleRecord (line 17) | class TroubleRecord extends Base
method recordTrouble (line 19) | public function recordTrouble($record) {
FILE: application/api/controller/v1/User.php
class User (line 19) | class User extends Base
method getUserInfo (line 26) | public function getUserInfo(){
method pay (line 39) | public function pay($from,$price) {
method refund (line 79) | public function refund() {
method record (line 107) | public function record($start_time,$bikeID,$end_time,$start_long,$star...
FILE: application/api/model/Base.php
class Base (line 14) | class Base extends Model
FILE: application/api/model/Bike.php
class Bike (line 11) | class Bike extends Model
method getBicyclePosition (line 19) | public static function getBicyclePosition() {
method getBikeByID (line 32) | public static function getBikeByID($id) {
FILE: application/api/model/BikeTrouble.php
class BikeTrouble (line 12) | class BikeTrouble extends Base
FILE: application/api/model/Charge.php
class Charge (line 12) | class Charge extends Base
FILE: application/api/model/Record.php
class Record (line 12) | class Record extends Base
FILE: application/api/model/TroubleCate.php
class TroubleCate (line 12) | class TroubleCate extends Base
FILE: application/api/model/TroubleRecord.php
class TroubleRecord (line 12) | class TroubleRecord extends Base
FILE: application/api/model/User.php
class User (line 12) | class User extends Base
method getUserByOpenID (line 19) | public static function getUserByOpenID($id){
method updateGuarantee (line 32) | public static function updateGuarantee($id,$guarantee) {
FILE: application/api/service/Token.php
class Token (line 17) | class Token
method generateToken (line 23) | public function generateToken() {
method getCurrentTokenVar (line 38) | public static function getCurrentTokenVar($key) {
method getCurrentUid (line 55) | public static function getCurrentUid() {
FILE: application/api/service/UserToken.php
class UserToken (line 17) | class UserToken extends Token
method __construct (line 28) | public function __construct($code)
method get (line 36) | public function get() {
method grantToken (line 57) | public function grantToken($result) {
method saveToCache (line 75) | public function saveToCache($user) {
method newUser (line 93) | public function newUser($openId) {
method processLoginError (line 103) | public function processLoginError($result) {
FILE: application/api/validate/AddressNews.php
class AddressNews (line 12) | class AddressNews extends BaseValidate
FILE: application/api/validate/AppTokenGet.php
class AppTokenGet (line 12) | class AppTokenGet extends BaseValidate
FILE: application/api/validate/BaseValidate.php
class BaseValidate (line 17) | class BaseValidate extends Validate
method goCheck (line 24) | public function goCheck() {
method isPostiveInt (line 49) | protected function isPostiveInt($value,$rule = '',$data = '',$filed = '')
method isNotEmpty (line 66) | public function isNotEmpty($value,$rule = '',$data = '',$filed = ''){
method getDataByRule (line 80) | public function getDataByRule($arrays) {
FILE: application/api/validate/Count.php
class Count (line 12) | class Count extends BaseValidate
FILE: application/api/validate/IDCollection.php
class IDCollection (line 12) | class IDCollection extends BaseValidate
method checkIDs (line 22) | protected function checkIDs($value) {
FILE: application/api/validate/IsMustBePostiveInt.php
class IsMustBePostiveInt (line 14) | class IsMustBePostiveInt extends BaseValidate
FILE: application/api/validate/OrderPlace.php
class OrderPlace (line 14) | class OrderPlace extends BaseValidate
method checkProducts (line 25) | public function checkProducts($values) {
method checkProduct (line 42) | public function checkProduct($value) {
FILE: application/api/validate/PagingParameter.php
class PagingParameter (line 12) | class PagingParameter extends BaseValidate
FILE: application/api/validate/TokenGet.php
class TokenGet (line 12) | class TokenGet extends BaseValidate
FILE: application/common.php
function doCurl (line 19) | function doCurl($url,$type = 0,$data=[]) {
function curl_get (line 43) | function curl_get($url,&$httpCode = 0) {
function getRandChars (line 60) | function getRandChars($length) {
function show (line 76) | function show($status,$message,$data =array()){
function userStatus (line 90) | function userStatus($code) {
function troubleStatus (line 103) | function troubleStatus($code) {
function getStatusAttr (line 116) | function getStatusAttr($value) {
FILE: application/index/controller/Index.php
class Index (line 4) | class Index
method index (line 6) | public function index()
FILE: application/lib/exception/BaseException.php
class BaseException (line 14) | class BaseException extends Exception
method __construct (line 30) | public function __construct($param = [])
FILE: application/lib/exception/BikeException.php
class BikeException (line 12) | class BikeException extends BaseException
FILE: application/lib/exception/ExceptionHandler.php
class ExceptionHandler (line 18) | class ExceptionHandler extends Handle
method render (line 31) | public function render(Exception $e)
method recordErrorLog (line 70) | protected function recordErrorLog(Exception $e) {
FILE: application/lib/exception/ParameterException.php
class ParameterException (line 12) | class ParameterException extends BaseException
FILE: application/lib/exception/SuccessMessage.php
class SuccessMessage (line 12) | class SuccessMessage
FILE: application/lib/exception/TokenException.php
class TokenException (line 12) | class TokenException extends BaseException
FILE: application/lib/exception/UserException.php
class UserException (line 12) | class UserException extends BaseException
FILE: application/lib/exception/WxChatException.php
class WxChatException (line 12) | class WxChatException extends BaseException
FILE: extend/Map.php
class Map (line 11) | class Map
method getLngLat (line 18) | public static function getLngLat($address)
method getAddress (line 37) | public static function getAddress($lng, $lat)
FILE: extend/My/RedisPackage.php
class RedisPackage (line 4) | class RedisPackage
method __construct (line 17) | public function __construct($options = [])
method set (line 45) | public static function set($key, $value, $exprie = 0)
method delete (line 59) | public static function delete($key) {
method get (line 68) | public static function get($key)
method lLen (line 79) | public static function lLen($key)
method LPush (line 90) | public static function LPush($key, $value, $value2 = null, $valueN = n...
method lPop (line 100) | public static function lPop($key)
FILE: extend/TxMap.php
class TxMap (line 12) | class TxMap
method getLngLat (line 19) | public static function getLngLat($address){
method getAddress (line 34) | public static function getAddress($lng,$lat){
FILE: extend/Weixin.php
class Weixin (line 9) | class Weixin
method __construct (line 14) | public function __construct($appid = NULL, $appsecret = NULL)
method qrconnect (line 26) | public function qrconnect($redirect_url, $scope, $state = NULL)
method oauth2_access_token (line 33) | public function oauth2_access_token($code)
method oauth2_get_user_info (line 41) | public function oauth2_get_user_info($access_token, $openid)
method http_request (line 48) | public function http_request($strUrl)
FILE: ofo 无微信支付/pages/wallet/index.js
method _loadData (line 16) | _loadData() {
FILE: ofo 无微信支付/utils/av-weapp-min.js
function t (line 1) | function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{...
function n (line 1) | function n(e){function t(t,n,r,i,o,s){for(;o>=0&&o<s;o+=e){var a=i?i[o]:...
function o (line 1) | function o(e){return function(t,n,r){n=E(n,r);for(var i=x(t),o=e>0?0:i-1...
function s (line 1) | function s(e,t,n){return function(r,i,o){var s=0,a=x(r);if("number"==typ...
function a (line 1) | function a(e,t){var n=P.length,r=e.constructor,i=O.isFunction(r)&&r.prot...
function r (line 1) | function r(e,t){var n=new Error(t);return n.code=e,n}
function r (line 1) | function r(e){var t=new RegExp("^([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2})T...
function r (line 1) | function r(){return!("undefined"==typeof window||!window||"undefined"==t...
function i (line 1) | function i(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n...
function o (line 1) | function o(){return"object"==typeof console&&console.log&&Function.proto...
function s (line 1) | function s(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=...
function a (line 1) | function a(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"...
function u (line 1) | function u(){try{return window.localStorage}catch(e){}}
function r (line 1) | function r(){}
function i (line 1) | function i(e){if(!_(e))return e;var t=[];for(var n in e)o(t,n,e[n]);retu...
function o (line 1) | function o(e,t,n){if(null!=n)if(Array.isArray(n))n.forEach(function(n){o...
function s (line 1) | function s(e){for(var t,n,r={},i=e.split("&"),o=0,s=i.length;o<s;++o)t=i...
function a (line 1) | function a(e){var t,n,r,i,o=e.split(/\r?\n/),s={};o.pop();for(var a=0,u=...
function u (line 1) | function u(e){return/[\/+]json\b/.test(e)}
function c (line 1) | function c(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.re...
function l (line 1) | function l(e,t){var n=this;this._query=this._query||[],this.method=e,thi...
function h (line 1) | function h(e,t,n){var r=g("DELETE",e);return"function"==typeof t&&(n=t,t...
function r (line 2) | function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a ...
function e (line 2) | function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.en...
function e (line 2) | function e(){r(this,e),this._entries=[]}
function n (line 2) | function n(e){return null!==e&&"object"==typeof e}
function r (line 2) | function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a ...
function e (line 2) | function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.en...
function e (line 2) | function e(){r(this,e)}
function r (line 2) | function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a ...
function i (line 2) | function i(e,t){if(!e)throw new ReferenceError("this hasn't been initial...
function o (line 2) | function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("S...
function s (line 2) | function s(e){""!==e.message&&_&&(_._readyState=d,_.dispatchEvent({type:...
function e (line 2) | function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.en...
function t (line 2) | function t(e,n){if(r(this,t),!e)throw new TypeError("Failed to construct...
function r (line 2) | function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enume...
function i (line 2) | function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a ...
function o (line 2) | function o(e,t){if(!e)throw new ReferenceError("this hasn't been initial...
function s (line 2) | function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("S...
function a (line 2) | function a(e){this.status=e.statusCode,this.statusText=e.statusCode;var ...
function e (line 2) | function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.en...
function t (line 2) | function t(){i(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(...
function r (line 2) | function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign...
function i (line 2) | function i(){try{if(!Object.assign)return!1;var e=new String("abc");if(e...
function r (line 2) | function r(e){var t=this;this.AV=e,this.lockedUntil=0,s.getAsync("server...
function r (line 3) | function r(e,t){if("us"===t)return h("https://us-api.leancloud.cn");var ...
function r (line 3) | function r(e,t){return e&&e[t]?i.isFunction(e[t])?e[t]():e[t]:null}
function r (line 4) | function r(e){if(e)return i(e)}
function i (line 4) | function i(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}
function n (line 4) | function n(){this.off(e,n),t.apply(this,arguments)}
function r (line 4) | function r(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;retur...
function i (line 4) | function i(e){function n(){if(n.enabled){var e=n,r=+new Date,i=r-(c||r);...
function o (line 4) | function o(e){t.save(e),t.names=[],t.skips=[];for(var n=("string"==typeo...
function s (line 4) | function s(){t.enable("")}
function a (line 4) | function a(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].tes...
function u (line 4) | function u(e){return e instanceof Error?e.stack||e.message:e}
function e (line 4) | function e(e){return"function"==typeof e||"object"==typeof e&&null!==e}
function r (line 4) | function r(e){return"function"==typeof e}
function i (line 4) | function i(e){z=e}
function o (line 4) | function o(e){H=e}
function s (line 4) | function s(){return function(){return process.nextTick(h)}}
function a (line 4) | function a(){return"undefined"!=typeof G?function(){
function u (line 5) | function u(){var e=0,t=new Y(h),n=document.createTextNode("");return t.o...
function c (line 5) | function c(){var e=new MessageChannel;return e.port1.onmessage=h,functio...
function l (line 5) | function l(){var e=setTimeout;return function(){return e(h,1)}}
function h (line 5) | function h(){for(var e=0;e<K;e+=2){var t=te[e],n=te[e+1];t(n),te[e]=void...
function f (line 5) | function f(){try{var e=n(65);return G=e.runOnLoop||e.runOnContext,a()}ca...
function d (line 5) | function d(e,t){var n=arguments,r=this,i=new this.constructor(_);void 0=...
function p (line 5) | function p(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)ret...
function _ (line 5) | function _(){}
function v (line 5) | function v(){return new TypeError("You cannot resolve a promise with its...
function y (line 5) | function y(){return new TypeError("A promises callback cannot return tha...
function m (line 5) | function m(e){try{return e.then}catch(e){return ae.error=e,ae}}
function g (line 5) | function g(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}
function b (line 5) | function b(e,t,n){H(function(e){var r=!1,i=g(n,t,function(n){r||(r=!0,t!...
function w (line 5) | function w(e,t){t._state===oe?A(e,t._result):t._state===se?T(e,t._result...
function O (line 5) | function O(e,t,n){t.constructor===e.constructor&&n===d&&t.constructor.re...
function S (line 5) | function S(t,n){t===n?T(t,v()):e(n)?O(t,n,m(n)):A(t,n)}
function E (line 5) | function E(e){e._onerror&&e._onerror(e._result),N(e)}
function A (line 5) | function A(e,t){e._state===ie&&(e._result=t,e._state=oe,0!==e._subscribe...
function T (line 5) | function T(e,t){e._state===ie&&(e._state=se,e._result=t,H(E,e))}
function j (line 5) | function j(e,t,n,r){var i=e._subscribers,o=i.length;e._onerror=null,i[o]...
function N (line 5) | function N(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r...
function x (line 5) | function x(){this.error=null}
function C (line 5) | function C(e,t){try{return e(t)}catch(e){return ue.error=e,ue}}
function k (line 5) | function k(e,t,n,i){var o=r(n),s=void 0,a=void 0,u=void 0,c=void 0;if(o)...
function U (line 5) | function U(e,t){try{t(function(t){S(e,t)},function(t){T(e,t)})}catch(t){...
function I (line 5) | function I(){return ce++}
function R (line 5) | function R(e){e[re]=ce++,e._state=void 0,e._result=void 0,e._subscribers...
function P (line 5) | function P(e,t){this._instanceConstructor=e,this.promise=new e(_),this.p...
function D (line 5) | function D(){return new Error("Array Methods must be provided an Array")}
function L (line 5) | function L(e){return new P(this,e).promise}
function q (line 5) | function q(e){var t=this;return new t(Q(e)?function(n,r){for(var i=e.len...
function M (line 5) | function M(e){var t=this,n=new t(_);return T(n,e),n}
function F (line 5) | function F(){throw new TypeError("You must pass a resolver function as t...
function J (line 5) | function J(){throw new TypeError("Failed to construct 'Promise': Please ...
function B (line 5) | function B(e){this[re]=I(),this._result=this._state=void 0,this._subscri...
function W (line 5) | function W(){var e=void 0;if("undefined"!=typeof t)e=t;else if("undefine...
function r (line 5) | function r(e,t){for(var n=e[s][t];null!=n;){if(n.kind===a)return n.liste...
function i (line 5) | function i(e,t,n){"function"!=typeof n&&"object"!=typeof n&&(n=null);for...
function n (line 5) | function n(){e.call(this)}
function n (line 5) | function n(e){return!!e.constructor&&"function"==typeof e.constructor.is...
function r (line 5) | function r(e){return"function"==typeof e.readFloatLE&&"function"==typeof...
function n (line 5) | function n(e){if(e=String(e),!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *...
function r (line 5) | function r(e){return e>=c?Math.round(e/c)+"d":e>=u?Math.round(e/u)+"h":e...
function i (line 5) | function i(e){return o(e,c,"day")||o(e,u,"hour")||o(e,a,"minute")||o(e,s...
function o (line 5) | function o(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ce...
function r (line 5) | function r(e){var t=i(e)?Object.prototype.toString.call(e):"";return"[ob...
function r (line 5) | function r(e){if(e)return i(e)}
function i (line 5) | function i(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}
function r (line 5) | function r(e){if(e)return i(e)}
function i (line 5) | function i(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}
FILE: ofo 无微信支付/utils/base.js
class Base (line 2) | class Base {
method constructor (line 3) | constructor(){
method requet (line 8) | requet(params) {
FILE: ofo 无微信支付/utils/config.js
class Config (line 1) | class Config {
method constructor (line 2) | constructor(){
FILE: ofo 无微信支付/utils/util.js
function formatTime (line 1) | function formatTime(date) {
function formatNumber (line 14) | function formatNumber(n) {
FILE: public/static/admin/js/common.js
function edit_add (line 6) | function edit_add(title,url) {
function yfy_s_edit (line 16) | function yfy_s_edit(title,url,w,h){
function todelete (line 68) | function todelete(){
FILE: public/static/h-ui.admin/js/H-ui.admin.js
function tabNavallwidth (line 13) | function tabNavallwidth(){
function Huiasidedisplay (line 34) | function Huiasidedisplay(){
function getskincookie (line 40) | function getskincookie(){
function Hui_admin_tab (line 52) | function Hui_admin_tab(obj){
function min_titleList (line 90) | function min_titleList(){
function creatIframe (line 97) | function creatIframe(href,titleName){
function removeIframe (line 150) | function removeIframe(){
function removeIframeAll (line 164) | function removeIframeAll(){
function layer_show (line 185) | function layer_show(title,url,w,h){
function layer_close (line 209) | function layer_close(){
function getHTMLDate (line 215) | function getHTMLDate(obj) {
function toNavPos (line 305) | function toNavPos(){
FILE: public/static/h-ui/js/H-ui.js
function stopDefault (line 75) | function stopDefault(e) {
function encode (line 103) | function encode(s) {
function decode (line 106) | function decode(s) {
function stringifyCookieValue (line 109) | function stringifyCookieValue(value) {
function parseCookieValue (line 112) | function parseCookieValue(s) {
function read (line 126) | function read(s, converter) {
function deepSerialize (line 442) | function deepSerialize(extraData) {
function fileUploadXhr (line 458) | function fileUploadXhr(a) {
function fileUploadIframe (line 523) | function fileUploadIframe(a) {
function doAjaxSubmit (line 1059) | function doAjaxSubmit(e) {
function captureSubmittingElement (line 1068) | function captureSubmittingElement(e) {
function log (line 1473) | function log() {
function update (line 1510) | function update() {
function args (line 2497) | function args(elem) {
function clearPlaceholder (line 2509) | function clearPlaceholder(event, value) {
function setPlaceholder (line 2527) | function setPlaceholder() {
function safeActiveElement (line 2559) | function safeActiveElement() {
function EmailSug (line 2581) | function EmailSug(elem, options) {
function operate (line 3249) | function operate(input, direct, method) {
function on (line 3297) | function on(input, state, keep) {
function off (line 3371) | function off(input, state, keep) {
function tidy (line 3411) | function tidy(input, callback) {
function option (line 3429) | function option(input, state, regular) {
function capitalize (line 3436) | function capitalize(string) {
function callbacks (line 3441) | function callbacks(input, checked, callback, keep) {
function HuiaddFavorite (line 4277) | function HuiaddFavorite(obj) {
function Huisethome (line 4294) | function Huisethome(obj){
function displaynavbar (line 4316) | function displaynavbar(obj){
function gettagval (line 4562) | function gettagval(obj) {
function unique (line 4577) | function unique(o, type){
function Plugin (line 4985) | function Plugin(option) {
function bottomView (line 5099) | function bottomView(i) {
function Plugin (line 5326) | function Plugin(option, _relatedTarget) {
function getParent (line 5383) | function getParent($this) {
function clearMenus (line 5392) | function clearMenus(e) {
function Plugin (line 5450) | function Plugin(option) {
function transitionEnd (line 5515) | function transitionEnd() {
function complete (line 5810) | function complete() {
function Plugin (line 5968) | function Plugin(option) {
function Plugin (line 6072) | function Plugin(option) {
function removeElement (line 6146) | function removeElement() {
function Plugin (line 6156) | function Plugin(option) {
function noop (line 6227) | function noop() {}
function defineBridget (line 6229) | function defineBridget($) {
function createNewSlider (line 6351) | function createNewSlider(element, options) {
function elementOrParentIsFixed (line 7381) | function elementOrParentIsFixed(element) {
function UTCDate (line 7394) | function UTCDate() {
function UTCToday (line 7398) | function UTCToday() {
FILE: public/static/js/order.js
function getOrders (line 16) | function getOrders(pageIndex){
function getOrderHtmlStr (line 30) | function getOrderHtmlStr(res){
function getOrderStatus (line 59) | function getOrderStatus(status){
function getBtns (line 77) | function getBtns(status){
function ctrlLoadMoreBtn (line 97) | function ctrlLoadMoreBtn(){
FILE: public/static/lib/html5shiv.js
function m (line 4) | function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}
function i (line 4) | function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}
function p (line 4) | function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=...
function t (line 4) | function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.cr...
function q (line 5) | function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a...
FILE: public/static/lib/jquery/1.9.1/jquery.js
function isArraylike (line 951) | function isArraylike( obj ) {
function createOptions (line 974) | function createOptions( options ) {
function internalData (line 1551) | function internalData( elem, name, data, pvt /* Internal Use Only */ ){
function internalRemoveData (line 1645) | function internalRemoveData( elem, name, pvt ) {
function dataAttr (line 1841) | function dataAttr( elem, key, data ) {
function isEmptyDataObject (line 1873) | function isEmptyDataObject( obj ) {
function returnTrue (line 2702) | function returnTrue() {
function returnFalse (line 2706) | function returnFalse() {
function isNative (line 3841) | function isNative( fn ) {
function createCache (line 3851) | function createCache() {
function markFunction (line 3869) | function markFunction( fn ) {
function assert (line 3878) | function assert( fn ) {
function Sizzle (line 3891) | function Sizzle( selector, context, results, seed ) {
function siblingCheck (line 4449) | function siblingCheck( a, b ) {
function createInputPseudo (line 4471) | function createInputPseudo( type ) {
function createButtonPseudo (line 4479) | function createButtonPseudo( type ) {
function createPositionalPseudo (line 4487) | function createPositionalPseudo( fn ) {
function tokenize (line 5014) | function tokenize( selector, parseOnly ) {
function toSelector (line 5081) | function toSelector( tokens ) {
function addCombinator (line 5091) | function addCombinator( matcher, combinator, base ) {
function elementMatcher (line 5141) | function elementMatcher( matchers ) {
function condense (line 5155) | function condense( unmatched, map, filter, context, xml ) {
function setMatcher (line 5176) | function setMatcher( preFilter, selector, matcher, postFilter, postFinde...
function matcherFromTokens (line 5269) | function matcherFromTokens( tokens ) {
function matcherFromGroupMatchers (line 5321) | function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
function multipleContexts (line 5449) | function multipleContexts( selector, contexts, results ) {
function select (line 5458) | function select( selector, context, results, seed ) {
function setFilters (line 5527) | function setFilters() {}
function sibling (line 5680) | function sibling( cur, dir ) {
function winnow (line 5788) | function winnow( elements, qualifier, keep ) {
function createSafeFragment (line 5821) | function createSafeFragment( document ) {
function findOrAppend (line 6202) | function findOrAppend( elem, tag ) {
function disableScript (line 6207) | function disableScript( elem ) {
function restoreScript (line 6212) | function restoreScript( elem ) {
function setGlobalEval (line 6223) | function setGlobalEval( elems, refElements ) {
function cloneCopyEvent (line 6231) | function cloneCopyEvent( src, dest ) {
function fixCloneNodeIssues (line 6259) | function fixCloneNodeIssues( src, dest ) {
function getAll (line 6352) | function getAll( context, tag ) {
function fixDefaultChecked (line 6375) | function fixDefaultChecked( elem ) {
function vendorPropName (line 6640) | function vendorPropName( style, name ) {
function isHidden (line 6662) | function isHidden( elem, el ) {
function showHide (line 6669) | function showHide( elements, show ) {
function setPositiveNumber (line 7016) | function setPositiveNumber( elem, value, subtract ) {
function augmentWidthOrHeight (line 7024) | function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
function getWidthOrHeight (line 7063) | function getWidthOrHeight( elem, name, extra ) {
function css_defaultDisplay (line 7107) | function css_defaultDisplay( nodeName ) {
function actualDisplay (line 7139) | function actualDisplay( name, doc ) {
function buildParams (line 7368) | function buildParams( prefix, obj, traditional, add ) {
function addToPrefiltersOrTransports (line 7466) | function addToPrefiltersOrTransports( structure ) {
function inspectPrefiltersOrTransports (line 7498) | function inspectPrefiltersOrTransports( structure, options, originalOpti...
function ajaxExtend (line 7525) | function ajaxExtend( target, src ) {
function done (line 7991) | function done( status, nativeStatusText, responses, headers ) {
function ajaxHandleResponses (line 8117) | function ajaxHandleResponses( s, jqXHR, responses ) {
function ajaxConvert (line 8178) | function ajaxConvert( s, response ) {
function createStandardXHR (line 8439) | function createStandardXHR() {
function createActiveXHR (line 8445) | function createActiveXHR() {
function createFxNow (line 8684) | function createFxNow() {
function createTweens (line 8691) | function createTweens( animation, props ) {
function Animation (line 8706) | function Animation( elem, properties, options ) {
function propFilter (line 8810) | function propFilter( props, specialEasing ) {
function defaultPrefilter (line 8877) | function defaultPrefilter( elem, props, opts ) {
function Tween (line 9004) | function Tween( elem, options, prop, end, easing ) {
function genFx (line 9230) | function genFx( type, includeWidth ) {
function getWindow (line 9526) | function getWindow( elem ) {
FILE: public/static/lib/layer/2.4/layer.js
function b (line 2) | function b(a){a=g.find(a),a.height(i[1]-j-k-2*(0|parseFloat(a.css("paddi...
function a (line 2) | function a(){var a=g.cancel&&g.cancel(b.index,d);a===!1||f.close(b.index)}
function b (line 2) | function b(){a.css({top:f+(e.config.fix?d.scrollTop():0)})}
function g (line 2) | function g(a,b,c){var d=new Image;return d.src=a,d.complete?b(d):(d.onlo...
FILE: tests/ExampleTest.php
class ExampleTest (line 13) | class ExampleTest extends TestCase
method testBasicExample (line 16) | public function testBasicExample()
FILE: tests/TestCase.php
class TestCase (line 13) | class TestCase extends \think\testing\TestCase
FILE: thinkphp/helper.php
function load_trait (line 40) | function load_trait($class, $ext = EXT)
function exception (line 56) | function exception($msg, $code = 0, $exception = '')
function debug (line 71) | function debug($start, $end = '', $dec = 6)
function lang (line 89) | function lang($name, $vars = [], $lang = '')
function config (line 103) | function config($name = '', $value = null, $range = '')
function input (line 121) | function input($key = '', $default = null, $filter = '')
function widget (line 153) | function widget($name, $data = [])
function model (line 167) | function model($name = '', $layer = 'model', $appendSuffix = false)
function validate (line 181) | function validate($name = '', $layer = 'validate', $appendSuffix = false)
function db (line 195) | function db($name = '', $config = [], $force = false)
function controller (line 209) | function controller($name, $layer = 'controller', $appendSuffix = false)
function action (line 224) | function action($url, $vars = [], $layer = 'controller', $appendSuffix =...
function import (line 238) | function import($class, $baseUrl = '', $ext = EXT)
function vendor (line 251) | function vendor($class, $ext = EXT)
function dump (line 265) | function dump($var, $echo = true, $label = null)
function url (line 280) | function url($url = '', $vars = '', $suffix = true, $domain = false)
function session (line 294) | function session($name, $value = '', $prefix = null)
function cookie (line 323) | function cookie($name, $value = '', $option = null)
function cache (line 353) | function cache($name, $value = '', $options = null, $tag = null)
function trace (line 399) | function trace($log = '[think]', $level = 'log')
function request (line 414) | function request()
function response (line 429) | function response($data = [], $code = 200, $header = [], $type = 'html')
function view (line 444) | function view($template = '', $vars = [], $replace = [], $code = 200)
function json (line 459) | function json($data = [], $code = 200, $header = [], $options = [])
function jsonp (line 474) | function jsonp($data = [], $code = 200, $header = [], $options = [])
function xml (line 489) | function xml($data = [], $code = 200, $header = [], $options = [])
function redirect (line 504) | function redirect($url = [], $params = [], $code = 302, $with = [])
function abort (line 521) | function abort($code, $message = null, $header = [])
function halt (line 536) | function halt($var)
function token (line 550) | function token($name = '__token__', $type = 'md5')
function load_relation (line 564) | function load_relation($resultSet, $relation)
function collection (line 580) | function collection($resultSet)
FILE: thinkphp/library/think/App.php
class App (line 22) | class App
method run (line 69) | public static function run(Request $request = null)
method dispatch (line 156) | public static function dispatch($dispatch, $type = 'module')
method invokeFunction (line 168) | public static function invokeFunction($function, $vars = [])
method invokeMethod (line 184) | public static function invokeMethod($method, $vars = [])
method invokeClass (line 206) | public static function invokeClass($class, $vars = [])
method bindParams (line 225) | private static function bindParams($reflect, $vars = [])
method getParamValue (line 256) | private static function getParamValue($param, &$vars, $type)
method exec (line 286) | protected static function exec($dispatch, $config)
method module (line 328) | public static function module($result, $config, $convert = null)
method initCommon (line 414) | public static function initCommon()
method init (line 473) | private static function init($module = '')
method routeCheck (line 533) | public static function routeCheck($request, array $config)
method route (line 583) | public static function route($route, $must = false)
FILE: thinkphp/library/think/Build.php
class Build (line 14) | class Build
method run (line 24) | public static function run(array $build = [], $namespace = 'app', $suf...
method buildDir (line 55) | protected static function buildDir($list)
method buildFile (line 71) | protected static function buildFile($list)
method module (line 93) | public static function module($module = '', $list = [], $namespace = '...
method buildHello (line 168) | protected static function buildHello($module, $namespace, $suffix = fa...
method buildCommon (line 185) | protected static function buildCommon($module)
method checkDirBuild (line 199) | protected static function checkDirBuild($dirname)
FILE: thinkphp/library/think/Cache.php
class Cache (line 16) | class Cache
method connect (line 36) | public static function connect(array $options = [], $name = false)
method init (line 63) | public static function init(array $options = [])
method store (line 85) | public static function store($name = '')
method has (line 99) | public static function has($name)
method get (line 112) | public static function get($name, $default = false)
method set (line 126) | public static function set($name, $value, $expire = null)
method inc (line 139) | public static function inc($name, $step = 1)
method dec (line 152) | public static function dec($name, $step = 1)
method rm (line 164) | public static function rm($name)
method clear (line 176) | public static function clear($tag = null)
method pull (line 188) | public static function pull($name)
method remember (line 203) | public static function remember($name, $value, $expire = null)
method tag (line 217) | public static function tag($name, $keys = null, $overlay = false)
FILE: thinkphp/library/think/Collection.php
class Collection (line 20) | class Collection implements ArrayAccess, Countable, IteratorAggregate, J...
method __construct (line 24) | public function __construct($items = [])
method make (line 29) | public static function make($items = [])
method isEmpty (line 38) | public function isEmpty()
method toArray (line 43) | public function toArray()
method all (line 50) | public function all()
method merge (line 61) | public function merge($items)
method diff (line 72) | public function diff($items)
method flip (line 82) | public function flip()
method intersect (line 93) | public function intersect($items)
method keys (line 103) | public function keys()
method pop (line 113) | public function pop()
method reduce (line 125) | public function reduce(callable $callback, $initial = null)
method reverse (line 135) | public function reverse()
method shift (line 145) | public function shift()
method chunk (line 157) | public function chunk($size, $preserveKeys = false)
method unshift (line 174) | public function unshift($value, $key = null)
method each (line 189) | public function each(callable $callback)
method filter (line 205) | public function filter(callable $callback = null)
method column (line 220) | public function column($column_key, $index_key = null)
method sort (line 258) | public function sort(callable $callback = null)
method shuffle (line 279) | public function shuffle()
method slice (line 296) | public function slice($offset, $length = null, $preserveKeys = false)
method offsetExists (line 302) | public function offsetExists($offset)
method offsetGet (line 307) | public function offsetGet($offset)
method offsetSet (line 312) | public function offsetSet($offset, $value)
method offsetUnset (line 321) | public function offsetUnset($offset)
method count (line 327) | public function count()
method getIterator (line 333) | public function getIterator()
method jsonSerialize (line 339) | public function jsonSerialize()
method toJson (line 350) | public function toJson($options = JSON_UNESCAPED_UNICODE)
method __toString (line 355) | public function __toString()
method convertToArray (line 366) | protected function convertToArray($items)
FILE: thinkphp/library/think/Config.php
class Config (line 14) | class Config
method range (line 22) | public static function range($range)
method parse (line 38) | public static function parse($config, $type = '', $name = '', $range =...
method load (line 55) | public static function load($file, $name = '', $range = '')
method has (line 82) | public static function has($name, $range = '')
method get (line 101) | public static function get($name = null, $range = '')
method set (line 127) | public static function set($name, $value = null, $range = '')
method reset (line 161) | public static function reset($range = '')
FILE: thinkphp/library/think/Console.php
class Console (line 21) | class Console
method __construct (line 50) | public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN')
method init (line 63) | public static function init($run = true)
method call (line 96) | public static function call($command, array $parameters = [], $driver ...
method run (line 117) | public function run()
method doRun (line 161) | public function doRun(Input $input, Output $output)
method setDefinition (line 196) | public function setDefinition(InputDefinition $definition)
method getDefinition (line 205) | public function getDefinition()
method getHelp (line 214) | public function getHelp()
method setCatchExceptions (line 224) | public function setCatchExceptions($boolean)
method setAutoExit (line 234) | public function setAutoExit($boolean)
method getName (line 243) | public function getName()
method setName (line 252) | public function setName($name)
method getVersion (line 262) | public function getVersion()
method setVersion (line 271) | public function setVersion($version)
method getLongVersion (line 280) | public function getLongVersion()
method register (line 294) | public function register($name)
method addCommands (line 303) | public function addCommands(array $commands)
method add (line 315) | public function add(Command $command)
method get (line 343) | public function get($name)
method has (line 369) | public function has($name)
method getNamespaces (line 378) | public function getNamespaces()
method findNamespace (line 398) | public function findNamespace($namespace)
method find (line 436) | public function find($name)
method all (line 488) | public function all($namespace = null)
method getAbbreviations (line 509) | public static function getAbbreviations($names)
method configureIO (line 527) | protected function configureIO(Input $input, Output $output)
method doRunCommand (line 560) | protected function doRunCommand(Command $command, Input $input, Output...
method getCommandName (line 570) | protected function getCommandName(Input $input)
method getDefaultInputDefinition (line 579) | protected function getDefaultInputDefinition()
method getDefaultCommands (line 597) | protected function getDefaultCommands()
method addDefaultCommands (line 610) | public static function addDefaultCommands(array $classnames)
method getAbbreviationSuggestions (line 620) | private function getAbbreviationSuggestions($abbrevs)
method extractNamespace (line 631) | public function extractNamespace($name, $limit = null)
method findAlternatives (line 645) | private function findAlternatives($name, $collection)
method setDefaultCommand (line 693) | public function setDefaultCommand($commandName)
method extractAllNamespaces (line 703) | private function extractAllNamespaces($name)
FILE: thinkphp/library/think/Controller.php
class Controller (line 18) | class Controller
method __construct (line 47) | public function __construct(Request $request = null)
method _initialize (line 69) | protected function _initialize()
method beforeAction (line 79) | protected function beforeAction($method, $options = [])
method fetch (line 109) | protected function fetch($template = '', $vars = [], $replace = [], $c...
method display (line 123) | protected function display($content = '', $vars = [], $replace = [], $...
method assign (line 135) | protected function assign($name, $value = '')
method engine (line 146) | protected function engine($engine)
method validateFailException (line 157) | protected function validateFailException($fail = true)
method validate (line 174) | protected function validate($data, $validate, $message = [], $batch = ...
FILE: thinkphp/library/think/Cookie.php
class Cookie (line 14) | class Cookie
method init (line 40) | public static function init(array $config = [])
method prefix (line 57) | public static function prefix($prefix = '')
method set (line 75) | public static function set($name, $value = '', $option = null)
method forever (line 109) | public static function forever($name, $value = '', $option = null)
method has (line 124) | public static function has($name, $prefix = null)
method get (line 138) | public static function get($name = '', $prefix = null)
method delete (line 175) | public static function delete($name, $prefix = null)
method clear (line 193) | public static function clear($prefix = null)
method jsonFormatProtect (line 217) | private static function jsonFormatProtect(&$val, $key, $type = 'encode')
FILE: thinkphp/library/think/Db.php
class Db (line 50) | class Db
method connect (line 68) | public static function connect($config = [], $name = false)
method parseConfig (line 100) | private static function parseConfig($config)
method parseDsn (line 123) | private static function parseDsn($dsnStr)
method __callStatic (line 148) | public static function __callStatic($method, $params)
FILE: thinkphp/library/think/Debug.php
class Debug (line 17) | class Debug
method remark (line 30) | public static function remark($name, $value = '')
method getRangeTime (line 47) | public static function getRangeTime($start, $end, $dec = 6)
method getUseTime (line 60) | public static function getUseTime($dec = 6)
method getThroughputRate (line 69) | public static function getThroughputRate()
method getRangeMem (line 81) | public static function getRangeMem($start, $end, $dec = 2)
method getUseMem (line 101) | public static function getUseMem($dec = 2)
method getMemPeak (line 120) | public static function getMemPeak($start, $end, $dec = 2)
method getFile (line 140) | public static function getFile($detail = false)
method dump (line 161) | public static function dump($var, $echo = true, $label = null, $flags ...
method inject (line 184) | public static function inject(Response $response, &$content)
FILE: thinkphp/library/think/Env.php
class Env (line 14) | class Env
method get (line 22) | public static function get($name, $default = null)
FILE: thinkphp/library/think/Error.php
class Error (line 19) | class Error
method register (line 25) | public static function register()
method appException (line 37) | public static function appException($e)
method appError (line 60) | public static function appError($errno, $errstr, $errfile = '', $errli...
method appShutdown (line 74) | public static function appShutdown()
method isFatal (line 93) | protected static function isFatal($type)
method getExceptionHandler (line 103) | public static function getExceptionHandler()
FILE: thinkphp/library/think/Exception.php
class Exception (line 14) | class Exception extends \Exception
method setData (line 39) | final protected function setData($label, array $data)
method getData (line 49) | final public function getData()
FILE: thinkphp/library/think/File.php
class File (line 16) | class File extends SplFileObject
method __construct (line 38) | public function __construct($filename, $mode = 'r')
method isTest (line 49) | public function isTest($test = false)
method setUploadInfo (line 60) | public function setUploadInfo($info)
method getInfo (line 71) | public function getInfo($name = '')
method getSaveName (line 80) | public function getSaveName()
method setSaveName (line 90) | public function setSaveName($saveName)
method hash (line 100) | public function hash($type = 'sha1')
method checkPath (line 113) | protected function checkPath($path)
method getMime (line 131) | public function getMime()
method rule (line 142) | public function rule($rule)
method validate (line 153) | public function validate($rule = [])
method isValid (line 163) | public function isValid()
method check (line 176) | public function check($rule = [])
method checkExt (line 212) | public function checkExt($ext)
method checkImg (line 228) | public function checkImg()
method getImageType (line 239) | protected function getImageType($image)
method checkSize (line 254) | public function checkSize($size)
method checkMime (line 267) | public function checkMime($mime)
method move (line 285) | public function move($path, $savename = true, $replace = true)
method buildSaveName (line 338) | protected function buildSaveName($savename)
method error (line 373) | private function error($errorNo)
method getError (line 401) | public function getError()
method __call (line 406) | public function __call($method, $args)
FILE: thinkphp/library/think/Hook.php
class Hook (line 14) | class Hook
method add (line 26) | public static function add($tag, $behavior, $first = false)
method import (line 49) | public static function import(array $tags, $recursive = true)
method get (line 65) | public static function get($tag = '')
method listen (line 83) | public static function listen($tag, &$params = null, $extra = null, $o...
method exec (line 107) | public static function exec($class, $tag = '', &$params = null, $extra...
FILE: thinkphp/library/think/Lang.php
class Lang (line 14) | class Lang
method range (line 34) | public static function range($range = '')
method set (line 51) | public static function set($name, $value = null, $range = '')
method load (line 71) | public static function load($file, $range = '')
method has (line 104) | public static function has($name, $range = '')
method get (line 117) | public static function get($name = null, $vars = [], $range = '')
method detect (line 155) | public static function detect()
method setLangDetectVar (line 186) | public static function setLangDetectVar($var)
method setLangCookieVar (line 196) | public static function setLangCookieVar($var)
method setLangCookieExpire (line 206) | public static function setLangCookieExpire($expire)
method setAllowLangList (line 216) | public static function setAllowLangList($list)
FILE: thinkphp/library/think/Loader.php
class Loader (line 16) | class Loader
method autoload (line 38) | public static function autoload($class)
method findFile (line 68) | private static function findFile($class)
method addClassMap (line 131) | public static function addClassMap($class, $map = '')
method addNamespace (line 141) | public static function addNamespace($namespace, $path = '')
method addPsr0 (line 153) | private static function addPsr0($prefix, $paths, $prepend = false)
method addPsr4 (line 191) | private static function addPsr4($prefix, $paths, $prepend = false)
method addNamespaceAlias (line 230) | public static function addNamespaceAlias($namespace, $original = '')
method register (line 240) | public static function register($autoload = '')
method registerComposerLoader (line 265) | private static function registerComposerLoader()
method import (line 306) | public static function import($class, $baseUrl = '', $ext = EXT)
method model (line 366) | public static function model($name = '', $layer = 'model', $appendSuff...
method controller (line 406) | public static function controller($name, $layer = 'controller', $appen...
method validate (line 435) | public static function validate($name = '', $layer = 'validate', $appe...
method db (line 476) | public static function db($config = [], $name = false)
method action (line 489) | public static function action($url, $vars = [], $layer = 'controller',...
method parseName (line 515) | public static function parseName($name, $type = 0, $ucfirst = true)
method parseClass (line 535) | public static function parseClass($module, $layer, $name, $appendSuffi...
method clearInstance (line 548) | public static function clearInstance()
function __include_file (line 560) | function __include_file($file)
function __require_file (line 565) | function __require_file($file)
FILE: thinkphp/library/think/Log.php
class Log (line 27) | class Log
method init (line 53) | public static function init($config = [])
method getLog (line 73) | public static function getLog($type = '')
method record (line 84) | public static function record($msg, $type = 'log')
method clear (line 97) | public static function clear()
method key (line 107) | public static function key($key)
method check (line 117) | public static function check($config)
method save (line 129) | public static function save()
method write (line 174) | public static function write($msg, $type = 'log', $force = false)
method __callStatic (line 205) | public static function __callStatic($method, $args)
FILE: thinkphp/library/think/Model.php
class Model (line 33) | abstract class Model implements \JsonSerializable, \ArrayAccess
method __construct (line 117) | public function __construct($data = [])
method buildQuery (line 162) | protected function buildQuery()
method getQuery (line 200) | public function getQuery($buildNewQuery = false)
method db (line 219) | public function db($useBaseQuery = true, $buildNewQuery = true)
method initialize (line 237) | protected function initialize()
method init (line 251) | protected static function init()
method setParent (line 261) | public function setParent($model)
method getParent (line 273) | public function getParent()
method data (line 285) | public function data($data, $value = null)
method getData (line 314) | public function getData($name = null)
method isAutoWriteTimestamp (line 333) | public function isAutoWriteTimestamp($auto)
method setAttr (line 347) | public function setAttr($name, $value, $data = [])
method getRelation (line 374) | public function getRelation($name = null)
method setRelation (line 392) | public function setRelation($name, $value)
method autoWriteTimestamp (line 404) | protected function autoWriteTimestamp($name)
method formatDateTime (line 444) | protected function formatDateTime($time, $format, $timestamp = false)
method writeTransform (line 461) | protected function writeTransform($value, $type)
method getAttr (line 522) | public function getAttr($name)
method getRelationData (line 571) | protected function getRelationData(Relation $modelRelation)
method readTransform (line 589) | protected function readTransform($value, $type)
method append (line 654) | public function append($append = [], $override = false)
method appendRelationAttr (line 668) | public function appendRelationAttr($relation, $append)
method hidden (line 703) | public function hidden($hidden = [], $override = false)
method visible (line 716) | public function visible($visible = [], $override = false)
method parseAttr (line 730) | protected function parseAttr($attrs, &$result, $visible = true)
method subToArray (line 761) | protected function subToArray($model, $visible, $hidden, $key)
method toArray (line 777) | public function toArray()
method toJson (line 836) | public function toJson($options = JSON_UNESCAPED_UNICODE)
method removeRelation (line 846) | public function removeRelation()
method toCollection (line 858) | public function toCollection($collection)
method together (line 877) | public function together($relation)
method getPk (line 892) | public function getPk($name = '')
method isPk (line 909) | protected function isPk($key)
method save (line 928) | public function save($data = [], $where = [], $sequence = null)
method checkAllowField (line 1095) | protected function checkAllowField($auto = [])
method autoRelationUpdate (line 1110) | protected function autoRelationUpdate($relation)
method getChangedData (line 1130) | public function getChangedData()
method setInc (line 1160) | public function setInc($field, $step = 1, $lazyTime = 0)
method setDec (line 1190) | public function setDec($field, $step = 1, $lazyTime = 0)
method saveAll (line 1219) | public function saveAll($dataSet, $replace = true)
method allowField (line 1260) | public function allowField($field)
method readonly (line 1275) | public function readonly($field)
method isUpdate (line 1291) | public function isUpdate($update = true, $where = null)
method autoCompleteData (line 1306) | protected function autoCompleteData($auto = [])
method delete (line 1329) | public function delete()
method auto (line 1372) | public function auto($fields)
method validate (line 1386) | public function validate($rule = true, $msg = [], $batch = false)
method validateFailException (line 1406) | public function validateFailException($fail = true)
method validateData (line 1420) | protected function validateData($data, $rule = null, $batch = null)
method getError (line 1459) | public function getError()
method event (line 1472) | public static function event($event, $callback, $override = false)
method trigger (line 1488) | protected function trigger($event, &$params)
method create (line 1510) | public static function create($data = [], $field = null)
method update (line 1528) | public static function update($data = [], $where = [], $field = null)
method get (line 1547) | public static function get($data, $with = [], $cache = false)
method all (line 1570) | public static function all($data = null, $with = [], $cache = false)
method parseQuery (line 1588) | protected static function parseQuery(&$data, $with, $cache)
method destroy (line 1610) | public static function destroy($data)
method scope (line 1641) | public static function scope($name)
method useGlobalScope (line 1670) | public static function useGlobalScope($use)
method has (line 1685) | public static function has($relation, $operator = '>=', $count = 1, $i...
method hasWhere (line 1701) | public static function hasWhere($relation, $where = [])
method parseModel (line 1712) | protected function parseModel($model)
method relationQuery (line 1729) | public function relationQuery($relations)
method eagerlyResultSet (line 1762) | public function eagerlyResultSet(&$resultSet, $relation)
method eagerlyResult (line 1790) | public function eagerlyResult(&$result, $relation)
method relationCount (line 1819) | public function relationCount(&$result, $relation)
method getForeignKey (line 1847) | protected function getForeignKey($name)
method hasOne (line 1865) | public function hasOne($model, $foreignKey = '', $localKey = '', $alia...
method belongsTo (line 1884) | public function belongsTo($model, $foreignKey = '', $localKey = '', $a...
method hasMany (line 1903) | public function hasMany($model, $foreignKey = '', $localKey = '')
method hasManyThrough (line 1922) | public function hasManyThrough($model, $through, $foreignKey = '', $th...
method belongsToMany (line 1942) | public function belongsToMany($model, $table = '', $foreignKey = '', $...
method morphMany (line 1961) | public function morphMany($model, $morph = null, $type = '')
method morphOne (line 1987) | public function morphOne($model, $morph = null, $type = '')
method morphTo (line 2012) | public function morphTo($morph = null, $alias = [])
method __call (line 2030) | public function __call($method, $args)
method __callStatic (line 2045) | public static function __callStatic($method, $args)
method __set (line 2069) | public function __set($name, $value)
method __get (line 2080) | public function __get($name)
method __isset (line 2091) | public function __isset($name)
method __unset (line 2112) | public function __unset($name)
method __toString (line 2117) | public function __toString()
method jsonSerialize (line 2123) | public function jsonSerialize()
method offsetSet (line 2129) | public function offsetSet($name, $value)
method offsetExists (line 2134) | public function offsetExists($name)
method offsetUnset (line 2139) | public function offsetUnset($name)
method offsetGet (line 2144) | public function offsetGet($name)
method __wakeup (line 2152) | public function __wakeup()
method beforeInsert (line 2162) | protected static function beforeInsert($callback, $override = false)
method afterInsert (line 2167) | protected static function afterInsert($callback, $override = false)
method beforeUpdate (line 2172) | protected static function beforeUpdate($callback, $override = false)
method afterUpdate (line 2177) | protected static function afterUpdate($callback, $override = false)
method beforeWrite (line 2182) | protected static function beforeWrite($callback, $override = false)
method afterWrite (line 2187) | protected static function afterWrite($callback, $override = false)
method beforeDelete (line 2192) | protected static function beforeDelete($callback, $override = false)
method afterDelete (line 2197) | protected static function afterDelete($callback, $override = false)
FILE: thinkphp/library/think/Paginator.php
class Paginator (line 21) | abstract class Paginator implements ArrayAccess, Countable, IteratorAggr...
method __construct (line 52) | public function __construct($items, $listRows, $currentPage = null, $t...
method make (line 87) | public static function make($items, $listRows, $currentPage = null, $t...
method setCurrentPage (line 92) | protected function setCurrentPage($currentPage)
method url (line 107) | protected function url($page)
method getCurrentPage (line 136) | public static function getCurrentPage($varPage = 'page', $default = 1)
method getCurrentPath (line 151) | public static function getCurrentPath()
method total (line 156) | public function total()
method listRows (line 164) | public function listRows()
method currentPage (line 169) | public function currentPage()
method lastPage (line 174) | public function lastPage()
method hasPages (line 186) | public function hasPages()
method getUrlRange (line 198) | public function getUrlRange($start, $end)
method fragment (line 215) | public function fragment($fragment)
method appends (line 228) | public function appends($key, $value = null)
method buildFragment (line 250) | protected function buildFragment()
method render (line 259) | abstract public function render();
method items (line 261) | public function items()
method getCollection (line 266) | public function getCollection()
method isEmpty (line 271) | public function isEmpty()
method each (line 282) | public function each(callable $callback)
method getIterator (line 298) | public function getIterator()
method offsetExists (line 308) | public function offsetExists($offset)
method offsetGet (line 318) | public function offsetGet($offset)
method offsetSet (line 328) | public function offsetSet($offset, $value)
method offsetUnset (line 339) | public function offsetUnset($offset)
method count (line 347) | public function count()
method __toString (line 352) | public function __toString()
method toArray (line 357) | public function toArray()
method jsonSerialize (line 377) | public function jsonSerialize()
method __call (line 382) | public function __call($name, $arguments)
FILE: thinkphp/library/think/Process.php
class Process (line 21) | class Process
method __construct (line 126) | public function __construct($commandline, $cwd = null, array $env = nu...
method __destruct (line 154) | public function __destruct()
method __clone (line 159) | public function __clone()
method run (line 169) | public function run($callback = null)
method mustRun (line 183) | public function mustRun($callback = null)
method start (line 203) | public function start($callback = null)
method restart (line 253) | public function restart($callback = null)
method wait (line 270) | public function wait($callback = null)
method getPid (line 302) | public function getPid()
method signal (line 318) | public function signal($signal)
method disableOutput (line 329) | public function disableOutput()
method enableOutput (line 348) | public function enableOutput()
method isOutputDisabled (line 363) | public function isOutputDisabled()
method getOutput (line 375) | public function getOutput()
method getIncrementalOutput (line 392) | public function getIncrementalOutput()
method clearOutput (line 413) | public function clearOutput()
method getErrorOutput (line 425) | public function getErrorOutput()
method getIncrementalErrorOutput (line 442) | public function getIncrementalErrorOutput()
method clearErrorOutput (line 463) | public function clearErrorOutput()
method getExitCode (line 475) | public function getExitCode()
method getExitCodeText (line 490) | public function getExitCodeText()
method isSuccessful (line 503) | public function isSuccessful()
method hasBeenSignaled (line 512) | public function hasBeenSignaled()
method getTermSignal (line 529) | public function getTermSignal()
method hasBeenStopped (line 546) | public function hasBeenStopped()
method getStopSignal (line 559) | public function getStopSignal()
method isRunning (line 572) | public function isRunning()
method isStarted (line 587) | public function isStarted()
method isTerminated (line 596) | public function isTerminated()
method getStatus (line 607) | public function getStatus()
method stop (line 617) | public function stop()
method addOutput (line 647) | public function addOutput($line)
method addErrorOutput (line 657) | public function addErrorOutput($line)
method getCommandLine (line 667) | public function getCommandLine()
method setCommandLine (line 677) | public function setCommandLine($commandline)
method getTimeout (line 688) | public function getTimeout()
method getIdleTimeout (line 697) | public function getIdleTimeout()
method setTimeout (line 707) | public function setTimeout($timeout)
method setIdleTimeout (line 719) | public function setIdleTimeout($timeout)
method setTty (line 735) | public function setTty($tty)
method isTty (line 753) | public function isTty()
method setPty (line 763) | public function setPty($bool)
method isPty (line 774) | public function isPty()
method getWorkingDirectory (line 783) | public function getWorkingDirectory()
method setWorkingDirectory (line 797) | public function setWorkingDirectory($cwd)
method getEnv (line 808) | public function getEnv()
method setEnv (line 818) | public function setEnv(array $env)
method getInput (line 836) | public function getInput()
method setInput (line 846) | public function setInput($input)
method getOptions (line 861) | public function getOptions()
method setOptions (line 871) | public function setOptions(array $options)
method getEnhanceWindowsCompatibility (line 882) | public function getEnhanceWindowsCompatibility()
method setEnhanceWindowsCompatibility (line 892) | public function setEnhanceWindowsCompatibility($enhance)
method getEnhanceSigchildCompatibility (line 903) | public function getEnhanceSigchildCompatibility()
method setEnhanceSigchildCompatibility (line 913) | public function setEnhanceSigchildCompatibility($enhance)
method checkTimeout (line 923) | public function checkTimeout()
method isPtySupported (line 946) | public static function isPtySupported()
method getDescriptors (line 972) | private function getDescriptors()
method buildCallback (line 996) | protected function buildCallback($callback)
method updateStatus (line 1018) | protected function updateStatus($blocking)
method isSigchildEnabled (line 1038) | protected function isSigchildEnabled()
method validateTimeout (line 1059) | private function validateTimeout($timeout)
method readPipes (line 1077) | private function readPipes($blocking, $close)
method captureExitCode (line 1094) | private function captureExitCode()
method close (line 1105) | private function close()
method resetProcessData (line 1131) | private function resetProcessData()
method doSignal (line 1153) | private function doSignal($signal, $throwException)
method requireProcessIsStarted (line 1188) | private function requireProcessIsStarted($functionName)
method requireProcessIsTerminated (line 1199) | private function requireProcessIsTerminated($functionName)
FILE: thinkphp/library/think/Request.php
class Request (line 14) | class Request
method __construct (line 125) | protected function __construct($options = [])
method __call (line 140) | public function __call($method, $args)
method hook (line 157) | public static function hook($method, $callback = null)
method instance (line 172) | public static function instance($options = [])
method create (line 192) | public static function create($uri, $method = 'GET', $params = [], $co...
method domain (line 265) | public function domain($domain = null)
method url (line 282) | public function url($url = null)
method baseUrl (line 309) | public function baseUrl($url = null)
method baseFile (line 327) | public function baseFile($file = null)
method root (line 359) | public function root($url = null)
method pathinfo (line 379) | public function pathinfo()
method path (line 411) | public function path()
method ext (line 435) | public function ext()
method time (line 446) | public function time($float = false)
method type (line 456) | public function type()
method mimeType (line 481) | public function mimeType($type, $val = '')
method method (line 496) | public function method($method = false)
method isGet (line 519) | public function isGet()
method isPost (line 529) | public function isPost()
method isPut (line 539) | public function isPut()
method isDelete (line 549) | public function isDelete()
method isHead (line 559) | public function isHead()
method isPatch (line 569) | public function isPatch()
method isOptions (line 579) | public function isOptions()
method isCli (line 589) | public function isCli()
method isCgi (line 599) | public function isCgi()
method param (line 612) | public function param($name = '', $default = null, $filter = '')
method route (line 649) | public function route($name = '', $default = null, $filter = '')
method get (line 666) | public function get($name = '', $default = null, $filter = '')
method post (line 686) | public function post($name = '', $default = null, $filter = '')
method put (line 711) | public function put($name = '', $default = null, $filter = '')
method delete (line 737) | public function delete($name = '', $default = null, $filter = '')
method patch (line 750) | public function patch($name = '', $default = null, $filter = '')
method request (line 762) | public function request($name = '', $default = null, $filter = '')
method session (line 782) | public function session($name = '', $default = null, $filter = '')
method cookie (line 801) | public function cookie($name = '', $default = null, $filter = '')
method server (line 834) | public function server($name = '', $default = null, $filter = '')
method file (line 851) | public function file($name = '')
method env (line 912) | public function env($name = '', $default = null, $filter = '')
method header (line 930) | public function header($name = '', $default = null)
method input (line 971) | public function input($data = [], $name = '', $default = null, $filter...
method filter (line 1021) | public function filter($filter = null)
method getFilter (line 1030) | protected function getFilter($filter, $default)
method filterValue (line 1054) | private function filterValue(&$value, $key, $filters)
method filterExp (line 1088) | public function filterExp(&$value)
method typeCast (line 1103) | private function typeCast(&$data, $type)
method has (line 1141) | public function has($name, $type = 'param', $checkEmpty = false)
method only (line 1166) | public function only($name, $type = 'param')
method except (line 1188) | public function except($name, $type = 'param')
method isSsl (line 1207) | public function isSsl()
method isAjax (line 1230) | public function isAjax($ajax = false)
method isPjax (line 1247) | public function isPjax($pjax = false)
method ip (line 1263) | public function ip($type = 0, $adv = false)
method isMobile (line 1298) | public function isMobile()
method scheme (line 1318) | public function scheme()
method query (line 1328) | public function query()
method host (line 1338) | public function host()
method port (line 1348) | public function port()
method protocol (line 1358) | public function protocol()
method remotePort (line 1368) | public function remotePort()
method contentType (line 1378) | public function contentType()
method routeInfo (line 1398) | public function routeInfo($route = [])
method dispatch (line 1413) | public function dispatch($dispatch = null)
method module (line 1427) | public function module($module = null)
method controller (line 1443) | public function controller($controller = null)
method action (line 1459) | public function action($action = null)
method langset (line 1475) | public function langset($lang = null)
method getContent (line 1490) | public function getContent()
method getInput (line 1503) | public function getInput()
method token (line 1515) | public function token($name = '__token__', $type = 'md5')
method cache (line 1534) | public function cache($key, $expire = null, $except = [])
method getCache (line 1599) | public function getCache()
method bind (line 1611) | public function bind($name, $obj = null)
method __set (line 1620) | public function __set($name, $value)
method __get (line 1625) | public function __get($name)
method __isset (line 1630) | public function __isset($name)
FILE: thinkphp/library/think/Response.php
class Response (line 20) | class Response
method __construct (line 49) | public function __construct($data = '', $code = 200, array $header = [...
method create (line 70) | public static function create($data = '', $type = '', $code = 200, arr...
method send (line 90) | public function send()
method output (line 148) | protected function output($data)
method options (line 159) | public function options($options = [])
method data (line 171) | public function data($data)
method header (line 184) | public function header($name, $value = null)
method content (line 199) | public function content($content)
method code (line 219) | public function code($code)
method lastModified (line 230) | public function lastModified($time)
method expires (line 241) | public function expires($time)
method eTag (line 252) | public function eTag($eTag)
method cacheControl (line 263) | public function cacheControl($cache)
method contentType (line 275) | public function contentType($contentType, $charset = 'utf-8')
method getHeader (line 286) | public function getHeader($name = '')
method getData (line 299) | public function getData()
method getContent (line 308) | public function getContent()
method getCode (line 330) | public function getCode()
FILE: thinkphp/library/think/Route.php
class Route (line 16) | class Route
method pattern (line 75) | public static function pattern($name = null, $rule = '')
method domain (line 93) | public static function domain($domain, $rule = '', $option = [], $patt...
method setDomain (line 116) | private static function setDomain($domain)
method bind (line 128) | public static function bind($bind, $type = 'module')
method name (line 140) | public static function name($name = '', $value = null)
method getBind (line 160) | public static function getBind($type)
method import (line 172) | public static function import(array $rule, $type = '*')
method registerRules (line 202) | protected static function registerRules($rules, $type = '*')
method rule (line 232) | public static function rule($rule, $route = '', $type = '*', $option =...
method setRule (line 279) | protected static function setRule($rule, $route, $type = '*', $option ...
method setOption (line 352) | protected static function setOption($options = [])
method getOption (line 362) | public static function getOption()
method getGroup (line 373) | public static function getGroup($type)
method setGroup (line 390) | public static function setGroup($name, $option = [], $pattern = [])
method group (line 406) | public static function group($name, $routes, $option = [], $pattern = [])
method any (line 491) | public static function any($rule, $route = '', $option = [], $pattern ...
method get (line 505) | public static function get($rule, $route = '', $option = [], $pattern ...
method post (line 519) | public static function post($rule, $route = '', $option = [], $pattern...
method put (line 533) | public static function put($rule, $route = '', $option = [], $pattern ...
method delete (line 547) | public static function delete($rule, $route = '', $option = [], $patte...
method patch (line 561) | public static function patch($rule, $route = '', $option = [], $patter...
method resource (line 575) | public static function resource($rule, $route = '', $option = [], $pat...
method controller (line 622) | public static function controller($rule, $route = '', $option = [], $p...
method alias (line 637) | public static function alias($rule = null, $route = '', $option = [])
method setMethodPrefix (line 653) | public static function setMethodPrefix($method, $prefix = '')
method rest (line 669) | public static function rest($name, $resource = [])
method miss (line 686) | public static function miss($route, $method = '*', $option = [])
method auto (line 697) | public static function auto($route)
method rules (line 708) | public static function rules($rules = '')
method checkDomain (line 729) | public static function checkDomain($request, &$currentRules, $method =...
method check (line 831) | public static function check($request, $url, $depr = '/', $checkDomain...
method getRouteExpress (line 878) | private static function getRouteExpress($key)
method checkRoute (line 894) | private static function checkRoute($request, $rules, $url, $depr = '/'...
method checkRouteAlias (line 974) | private static function checkRouteAlias($request, $url, $depr)
method checkUrlBind (line 1021) | private static function checkUrlBind(&$url, &$rules, $depr = '/')
method bindToClass (line 1052) | public static function bindToClass($url, $class, $depr = '/')
method bindToNamespace (line 1071) | public static function bindToNamespace($url, $namespace, $depr = '/')
method bindToController (line 1091) | public static function bindToController($url, $controller, $depr = '/')
method bindToModule (line 1110) | public static function bindToModule($url, $controller, $depr = '/')
method checkOption (line 1128) | private static function checkOption($option, $request)
method checkRule (line 1159) | private static function checkRule($rule, $route, $url, $pattern, $opti...
method parseUrl (line 1203) | public static function parseUrl($url, $depr = '/', $autoSearch = false)
method parseUrlPath (line 1270) | private static function parseUrlPath($url)
method match (line 1298) | private static function match($url, $rule, $pattern)
method parseRule (line 1375) | private static function parseRule($rule, $route, $pathinfo, $option = ...
method parseModule (line 1526) | private static function parseModule($url)
method parseUrlParams (line 1550) | private static function parseUrlParams($url, &$var = [])
method parseVar (line 1566) | private static function parseVar($rule)
FILE: thinkphp/library/think/Session.php
class Session (line 16) | class Session
method prefix (line 26) | public static function prefix($prefix = '')
method init (line 41) | public static function init(array $config = [])
method boot (line 116) | public static function boot()
method set (line 135) | public static function set($name, $value = '', $prefix = null)
method get (line 161) | public static function get($name = '', $prefix = null)
method pull (line 193) | public static function pull($name, $prefix = null)
method flash (line 211) | public static function flash($name, $value)
method flush (line 224) | public static function flush()
method delete (line 246) | public static function delete($name, $prefix = null)
method clear (line 275) | public static function clear($prefix = null)
method has (line 292) | public static function has($name, $prefix = null)
method push (line 311) | public static function push($key, $value)
method start (line 325) | public static function start()
method destroy (line 335) | public static function destroy()
method regenerate (line 350) | private static function regenerate($delete = false)
method pause (line 359) | public static function pause()
FILE: thinkphp/library/think/Template.php
class Template (line 21) | class Template
method __construct (line 63) | public function __construct(array $config = [])
method stripPreg (line 84) | private function stripPreg($str)
method assign (line 99) | public function assign($name, $value = '')
method __set (line 114) | public function __set($name, $value)
method config (line 125) | public function config($config)
method get (line 142) | public function get($name = '')
method fetch (line 168) | public function fetch($template, $vars = [], $config = [])
method display (line 215) | public function display($content, $vars = [], $config = [])
method layout (line 239) | public function layout($name, $replace = '')
method checkCache (line 265) | private function checkCache($cacheFile)
method isCache (line 305) | public function isCache($cacheId)
method compiler (line 321) | private function compiler(&$content, $cacheFile)
method parse (line 368) | public function parse(&$content)
method parsePhp (line 428) | private function parsePhp(&$content)
method parseLayout (line 445) | private function parseLayout(&$content)
method parseInclude (line 474) | private function parseInclude(&$content)
method parseExtend (line 510) | private function parseExtend(&$content)
method parseLiteral (line 586) | private function parseLiteral(&$content, $restore = false)
method parseBlock (line 618) | private function parseBlock(&$content, $sort = false)
method getIncludeTagLib (line 663) | private function getIncludeTagLib(&$content)
method parseTagLib (line 682) | public function parseTagLib($tagLib, &$content, $hide = false)
method parseAttr (line 703) | public function parseAttr($str, $name = null)
method parseTag (line 727) | private function parseTag(&$content)
method parseVar (line 843) | public function parseVar(&$varStr)
method parseVarFunction (line 903) | public function parseVarFunction(&$varStr)
method parseThinkVar (line 963) | public function parseThinkVar($vars)
method parseTemplateName (line 1034) | private function parseTemplateName($templateName)
method parseTemplateFile (line 1061) | private function parseTemplateFile($template)
method getRegex (line 1096) | private function getRegex($tagName)
FILE: thinkphp/library/think/Url.php
class Url (line 14) | class Url
method build (line 28) | public static function build($url = '', $vars = '', $suffix = true, $d...
method parseUrl (line 166) | protected static function parseUrl($url, &$domain)
method parseDomain (line 229) | protected static function parseDomain(&$url, $domain)
method parseSuffix (line 284) | protected static function parseSuffix($suffix)
method getRuleUrl (line 296) | public static function getRuleUrl($rule, &$vars = [])
method root (line 323) | public static function root($root)
FILE: thinkphp/library/think/Validate.php
class Validate (line 16) | class Validate
method __construct (line 111) | public function __construct(array $rules = [], $message = [], $field =...
method make (line 126) | public static function make($rules = [], $message = [], $field = [])
method rule (line 141) | public function rule($name, $rule = '')
method extend (line 158) | public static function extend($type, $callback = null)
method setTypeMsg (line 174) | public static function setTypeMsg($type, $msg = null)
method message (line 190) | public function message($name, $message = '')
method scene (line 207) | public function scene($name, $fields = null)
method hasScene (line 227) | public function hasScene($name)
method batch (line 238) | public function batch($batch = true)
method check (line 252) | public function check($data, $rules = [], $scene = '')
method checkItem (line 353) | protected function checkItem($field, $value, $rules, $data, $title = '...
method confirm (line 429) | protected function confirm($value, $rule, $data, $field = '')
method different (line 449) | protected function different($value, $rule, $data)
method egt (line 462) | protected function egt($value, $rule, $data)
method gt (line 476) | protected function gt($value, $rule, $data)
method elt (line 490) | protected function elt($value, $rule, $data)
method lt (line 504) | protected function lt($value, $rule, $data)
method eq (line 517) | protected function eq($value, $rule)
method is (line 530) | protected function is($value, $rule, $data = [])
method getImageType (line 630) | protected function getImageType($image)
method activeUrl (line 647) | protected function activeUrl($value, $rule)
method ip (line 662) | protected function ip($value, $rule)
method fileExt (line 677) | protected function fileExt($file, $rule)
method fileMime (line 704) | protected function fileMime($file, $rule)
method fileSize (line 731) | protected function fileSize($file, $rule)
method image (line 755) | protected function image($file, $rule)
method method (line 787) | protected function method($value, $rule)
method dateFormat (line 800) | protected function dateFormat($value, $rule)
method unique (line 815) | protected function unique($value, $rule, $data, $field)
method behavior (line 865) | protected function behavior($value, $rule, $data)
method filter (line 877) | protected function filter($value, $rule)
method requireIf (line 898) | protected function requireIf($value, $rule, $data)
method requireCallback (line 916) | protected function requireCallback($value, $rule, $data)
method requireWith (line 934) | protected function requireWith($value, $rule, $data)
method in (line 951) | protected function in($value, $rule)
method notIn (line 963) | protected function notIn($value, $rule)
method between (line 975) | protected function between($value, $rule)
method notBetween (line 991) | protected function notBetween($value, $rule)
method length (line 1007) | protected function length($value, $rule)
method max (line 1034) | protected function max($value, $rule)
method min (line 1053) | protected function min($value, $rule)
method after (line 1072) | protected function after($value, $rule)
method before (line 1084) | protected function before($value, $rule)
method expire (line 1096) | protected function expire($value, $rule)
method allowIp (line 1119) | protected function allowIp($value, $rule)
method denyIp (line 1131) | protected function denyIp($value, $rule)
method regex (line 1143) | protected function regex($value, $rule)
method token (line 1163) | protected function token($value, $rule, $data)
method getError (line 1183) | public function getError()
method getDataValue (line 1195) | protected function getDataValue($data, $key)
method getRuleMsg (line 1218) | protected function getRuleMsg($attribute, $title, $type, $rule)
method getScene (line 1257) | protected function getScene($scene = '')
method __callStatic (line 1276) | public static function __callStatic($method, $params)
FILE: thinkphp/library/think/View.php
class View (line 14) | class View
method __construct (line 33) | public function __construct($engine = [], $replace = [])
method instance (line 61) | public static function instance($engine = [], $replace = [])
method share (line 76) | public static function share($name, $value = '')
method assign (line 92) | public function assign($name, $value = '')
method engine (line 108) | public function engine($options = [])
method config (line 132) | public function config($name, $value = null)
method fetch (line 148) | public function fetch($template = '', $vars = [], $replace = [], $conf...
method replace (line 180) | public function replace($content, $replace = '')
method display (line 199) | public function display($content, $vars = [], $replace = [], $config =...
method __set (line 210) | public function __set($name, $value)
method __get (line 221) | public function __get($name)
method __isset (line 232) | public function __isset($name)
FILE: thinkphp/library/think/cache/Driver.php
class Driver (line 17) | abstract class Driver
method has (line 29) | abstract public function has($name);
method get (line 38) | abstract public function get($name, $default = false);
method set (line 48) | abstract public function set($name, $value, $expire = null);
method inc (line 57) | abstract public function inc($name, $step = 1);
method dec (line 66) | abstract public function dec($name, $step = 1);
method rm (line 74) | abstract public function rm($name);
method clear (line 82) | abstract public function clear($tag = null);
method getCacheKey (line 90) | protected function getCacheKey($name)
method pull (line 101) | public function pull($name)
method remember (line 120) | public function remember($name, $value, $expire = null)
method tag (line 141) | public function tag($name, $keys = null, $overlay = false)
method setTagItem (line 167) | protected function setTagItem($name)
method getTagItem (line 189) | protected function getTagItem($tag)
method handler (line 206) | public function handler()
FILE: thinkphp/library/think/cache/driver/File.php
class File (line 20) | class File extends Driver
method __construct (line 34) | public function __construct($options = [])
method init (line 50) | private function init()
method getCacheKey (line 67) | protected function getCacheKey($name)
method has (line 91) | public function has($name)
method get (line 103) | public function get($name, $default = false)
method set (line 137) | public function set($name, $value, $expire = null)
method inc (line 169) | public function inc($name, $step = 1)
method dec (line 186) | public function dec($name, $step = 1)
method rm (line 202) | public function rm($name)
method clear (line 213) | public function clear($tag = null)
method unlink (line 243) | private function unlink($path)
FILE: thinkphp/library/think/cache/driver/Lite.php
class Lite (line 20) | class Lite extends Driver
method __construct (line 34) | public function __construct($options = [])
method getCacheKey (line 51) | protected function getCacheKey($name)
method has (line 62) | public function has($name)
method get (line 74) | public function get($name, $default = false)
method set (line 99) | public function set($name, $value, $expire = null)
method inc (line 128) | public function inc($name, $step = 1)
method dec (line 145) | public function dec($name, $step = 1)
method rm (line 161) | public function rm($name)
method clear (line 172) | public function clear($tag = null)
FILE: thinkphp/library/think/cache/driver/Memcache.php
class Memcache (line 16) | class Memcache extends Driver
method __construct (line 33) | public function __construct($options = [])
method has (line 63) | public function has($name)
method get (line 76) | public function get($name, $default = false)
method set (line 90) | public function set($name, $value, $expire = null)
method inc (line 113) | public function inc($name, $step = 1)
method dec (line 129) | public function dec($name, $step = 1)
method rm (line 147) | public function rm($name, $ttl = false)
method clear (line 161) | public function clear($tag = null)
FILE: thinkphp/library/think/cache/driver/Memcached.php
class Memcached (line 16) | class Memcached extends Driver
method __construct (line 34) | public function __construct($options = [])
method has (line 74) | public function has($name)
method get (line 87) | public function get($name, $default = false)
method set (line 101) | public function set($name, $value, $expire = null)
method inc (line 125) | public function inc($name, $step = 1)
method dec (line 141) | public function dec($name, $step = 1)
method rm (line 159) | public function rm($name, $ttl = false)
method clear (line 173) | public function clear($tag = null)
FILE: thinkphp/library/think/cache/driver/Redis.php
class Redis (line 23) | class Redis extends Driver
method __construct (line 41) | public function __construct($options = [])
method has (line 68) | public function has($name)
method get (line 80) | public function get($name, $default = false)
method set (line 99) | public function set($name, $value, $expire = null)
method inc (line 126) | public function inc($name, $step = 1)
method dec (line 139) | public function dec($name, $step = 1)
method rm (line 151) | public function rm($name)
method clear (line 162) | public function clear($tag = null)
FILE: thinkphp/library/think/cache/driver/Sqlite.php
class Sqlite (line 20) | class Sqlite extends Driver
method __construct (line 36) | public function __construct($options = [])
method getCacheKey (line 54) | protected function getCacheKey($name)
method has (line 65) | public function has($name)
method get (line 80) | public function get($name, $default = false)
method set (line 104) | public function set($name, $value, $expire = null)
method inc (line 136) | public function inc($name, $step = 1)
method dec (line 153) | public function dec($name, $step = 1)
method rm (line 169) | public function rm($name)
method clear (line 183) | public function clear($tag = null)
FILE: thinkphp/library/think/cache/driver/Wincache.php
class Wincache (line 20) | class Wincache extends Driver
method __construct (line 33) | public function __construct($options = [])
method has (line 49) | public function has($name)
method get (line 62) | public function get($name, $default = false)
method set (line 76) | public function set($name, $value, $expire = null)
method inc (line 99) | public function inc($name, $step = 1)
method dec (line 112) | public function dec($name, $step = 1)
method rm (line 124) | public function rm($name)
method clear (line 135) | public function clear($tag = null)
FILE: thinkphp/library/think/cache/driver/Xcache.php
class Xcache (line 20) | class Xcache extends Driver
method __construct (line 33) | public function __construct($options = [])
method has (line 49) | public function has($name)
method get (line 62) | public function get($name, $default = false)
method set (line 76) | public function set($name, $value, $expire = null)
method inc (line 99) | public function inc($name, $step = 1)
method dec (line 112) | public function dec($name, $step = 1)
method rm (line 124) | public function rm($name)
method clear (line 135) | public function clear($tag = null)
FILE: thinkphp/library/think/config/driver/Ini.php
class Ini (line 14) | class Ini
method parse (line 16) | public function parse($config)
FILE: thinkphp/library/think/config/driver/Json.php
class Json (line 14) | class Json
method parse (line 16) | public function parse($config)
FILE: thinkphp/library/think/config/driver/Xml.php
class Xml (line 14) | class Xml
method parse (line 16) | public function parse($config)
FILE: thinkphp/library/think/console/Command.php
class Command (line 19) | class Command
method __construct (line 48) | public function __construct($name = null)
method ignoreValidationErrors (line 66) | public function ignoreValidationErrors()
method setConsole (line 75) | public function setConsole(Console $console = null)
method getConsole (line 85) | public function getConsole()
method isEnabled (line 94) | public function isEnabled()
method configure (line 102) | protected function configure()
method execute (line 114) | protected function execute(Input $input, Output $output)
method interact (line 124) | protected function interact(Input $input, Output $output)
method initialize (line 133) | protected function initialize(Input $input, Output $output)
method run (line 146) | public function run(Input $input, Output $output)
method setCode (line 188) | public function setCode(callable $code)
method mergeConsoleDefinition (line 210) | public function mergeConsoleDefinition($mergeArgs = true)
method setDefinition (line 239) | public function setDefinition($definition)
method getDefinition (line 257) | public function getDefinition()
method getNativeDefinition (line 266) | public function getNativeDefinition()
method addArgument (line 279) | public function addArgument($name, $mode = null, $description = '', $d...
method addOption (line 295) | public function addOption($name, $shortcut = null, $mode = null, $desc...
method setName (line 308) | public function setName($name)
method getName (line 321) | public function getName()
method setDescription (line 331) | public function setDescription($description)
method getDescription (line 342) | public function getDescription()
method setHelp (line 352) | public function setHelp($help)
method getHelp (line 363) | public function getHelp()
method getProcessedHelp (line 372) | public function getProcessedHelp()
method setAliases (line 394) | public function setAliases($aliases)
method getAliases (line 413) | public function getAliases()
method getSynopsis (line 423) | public function getSynopsis($short = false)
method addUsage (line 439) | public function addUsage($usage)
method getUsages (line 454) | public function getUsages()
method validateName (line 464) | private function validateName($name)
FILE: thinkphp/library/think/console/Input.php
class Input (line 18) | class Input
method __construct (line 41) | public function __construct($argv = null)
method setTokens (line 54) | protected function setTokens(array $tokens)
method bind (line 63) | public function bind(Definition $definition)
method parse (line 75) | protected function parse()
method parseShortOption (line 98) | private function parseShortOption($token)
method parseShortOptionSet (line 120) | private function parseShortOptionSet($name)
method parseLongOption (line 143) | private function parseLongOption($token)
method parseArgument (line 159) | private function parseArgument($token)
method addShortOption (line 183) | private function addShortOption($shortcut, $value)
method addLongOption (line 198) | private function addLongOption($name, $value)
method getFirstArgument (line 246) | public function getFirstArgument()
method hasParameterOption (line 263) | public function hasParameterOption($values)
method getParameterOption (line 284) | public function getParameterOption($values, $default = false)
method validate (line 310) | public function validate()
method isInteractive (line 321) | public function isInteractive()
method setInteractive (line 330) | public function setInteractive($interactive)
method getArguments (line 339) | public function getArguments()
method getArgument (line 350) | public function getArgument($name)
method setArgument (line 366) | public function setArgument($name, $value)
method hasArgument (line 380) | public function hasArgument($name)
method getOptions (line 389) | public function getOptions()
method getOption (line 400) | public function getOption($name)
method setOption (line 415) | public function setOption($name, $value)
method hasOption (line 429) | public function hasOption($name)
method escapeToken (line 439) | public function escapeToken($token)
method __toString (line 448) | public function __toString()
FILE: thinkphp/library/think/console/Output.php
class Output (line 41) | class Output
method __construct (line 67) | public function __construct($driver = 'console')
method ask (line 74) | public function ask(Input $input, $question, $default = null, $validat...
method askHidden (line 82) | public function askHidden(Input $input, $question, $validator = null)
method confirm (line 92) | public function confirm(Input $input, $question, $default = true)
method choice (line 100) | public function choice(Input $input, $question, array $choices, $defau...
method askQuestion (line 110) | protected function askQuestion(Input $input, Question $question)
method block (line 122) | protected function block($style, $message)
method newLine (line 131) | public function newLine($count = 1)
method writeln (line 141) | public function writeln($messages, $type = self::OUTPUT_NORMAL)
method write (line 152) | public function write($messages, $newline = false, $type = self::OUTPU...
method renderException (line 157) | public function renderException(\Exception $e)
method setVerbosity (line 165) | public function setVerbosity($level)
method getVerbosity (line 173) | public function getVerbosity()
method isQuiet (line 178) | public function isQuiet()
method isVerbose (line 183) | public function isVerbose()
method isVeryVerbose (line 188) | public function isVeryVerbose()
method isDebug (line 193) | public function isDebug()
method describe (line 198) | public function describe($object, array $options = [])
method __call (line 208) | public function __call($method, $args)
FILE: thinkphp/library/think/console/command/Build.php
class Build (line 19) | class Build extends Command
method configure (line 25) | protected function configure()
method execute (line 35) | protected function execute(Input $input, Output $output)
FILE: thinkphp/library/think/console/command/Clear.php
class Clear (line 18) | class Clear extends Command
method configure (line 20) | protected function configure()
method execute (line 29) | protected function execute(Input $input, Output $output)
method clearPath (line 40) | protected function clearPath($path)
FILE: thinkphp/library/think/console/command/Help.php
class Help (line 20) | class Help extends Command
method configure (line 28) | protected function configure()
method setCommand (line 49) | public function setCommand(Command $command)
method execute (line 57) | protected function execute(Input $input, Output $output)
FILE: thinkphp/library/think/console/command/Lists.php
class Lists (line 21) | class Lists extends Command
method configure (line 27) | protected function configure()
method getNativeDefinition (line 48) | public function getNativeDefinition()
method execute (line 56) | protected function execute(Input $input, Output $output)
method createDefinition (line 67) | private function createDefinition()
FILE: thinkphp/library/think/console/command/Make.php
class Make (line 21) | abstract class Make extends Command
method getStub (line 26) | abstract protected function getStub();
method configure (line 28) | protected function configure()
method execute (line 33) | protected function execute(Input $input, Output $output)
method buildClass (line 57) | protected function buildClass($name)
method getPathName (line 73) | protected function getPathName($name)
method getClassName (line 80) | protected function getClassName($name)
method getNamespace (line 105) | protected function getNamespace($appNamespace, $module)
FILE: thinkphp/library/think/console/command/make/Controller.php
class Controller (line 18) | class Controller extends Make
method configure (line 23) | protected function configure()
method getStub (line 31) | protected function getStub()
method getClassName (line 40) | protected function getClassName($name)
method getNamespace (line 45) | protected function getNamespace($appNamespace, $module)
FILE: thinkphp/library/think/console/command/make/Model.php
class Model (line 16) | class Model extends Make
method configure (line 20) | protected function configure()
method getStub (line 27) | protected function getStub()
method getNamespace (line 32) | protected function getNamespace($appNamespace, $module)
FILE: thinkphp/library/think/console/command/optimize/Autoload.php
class Autoload (line 19) | class Autoload extends Command
method configure (line 22) | protected function configure()
method execute (line 28) | protected function execute(Input $input, Output $output)
method addClassMapCode (line 81) | protected function addClassMapCode($dir, $namespace, $classMap)
method getPathCode (line 101) | protected function getPathCode($path)
method normalizePath (line 132) | protected function normalizePath($path)
method createMap (line 166) | protected function createMap($path, $namespace = null)
method findClasses (line 222) | protected function findClasses($path)
FILE: thinkphp/library/think/console/command/optimize/Config.php
class Config (line 19) | class Config extends Command
method configure (line 24) | protected function configure()
method execute (line 31) | protected function execute(Input $input, Output $output)
method buildCacheContent (line 50) | protected function buildCacheContent($module)
FILE: thinkphp/library/think/console/command/optimize/Route.php
class Route (line 17) | class Route extends Command
method configure (line 22) | protected function configure()
method execute (line 28) | protected function execute(Input $input, Output $output)
method buildRouteCache (line 34) | protected function buildRouteCache()
method buildClosure (line 53) | protected function buildClosure(&$value)
FILE: thinkphp/library/think/console/command/optimize/Schema.php
class Schema (line 20) | class Schema extends Command
method configure (line 25) | protected function configure()
method execute (line 35) | protected function execute(Input $input, Output $output)
method buildModelSchema (line 89) | protected function buildModelSchema($class)
method buildDataBaseSchema (line 102) | protected function buildDataBaseSchema($tables, $db, $config)
FILE: thinkphp/library/think/console/input/Argument.php
class Argument (line 14) | class Argument
method __construct (line 34) | public function __construct($name, $mode = null, $description = '', $d...
method getName (line 53) | public function getName()
method isRequired (line 62) | public function isRequired()
method isArray (line 71) | public function isArray()
method setDefault (line 81) | public function setDefault($default = null)
method getDefault (line 102) | public function getDefault()
method getDescription (line 111) | public function getDescription()
FILE: thinkphp/library/think/console/input/Definition.php
class Definition (line 14) | class Definition
method __construct (line 37) | public function __construct(array $definition = [])
method setDefinition (line 46) | public function setDefinition(array $definition)
method setArguments (line 66) | public function setArguments($arguments = [])
method addArguments (line 80) | public function addArguments($arguments = [])
method addArgument (line 94) | public function addArgument(Argument $argument)
method getArgument (line 127) | public function getArgument($name)
method hasArgument (line 144) | public function hasArgument($name)
method getArguments (line 155) | public function getArguments()
method getArgumentCount (line 164) | public function getArgumentCount()
method getArgumentRequiredCount (line 173) | public function getArgumentRequiredCount()
method getArgumentDefaults (line 182) | public function getArgumentDefaults()
method setOptions (line 196) | public function setOptions($options = [])
method addOptions (line 208) | public function addOptions($options = [])
method addOption (line 221) | public function addOption(Option $option)
method getOption (line 252) | public function getOption($name)
method hasOption (line 267) | public function hasOption($name)
method getOptions (line 277) | public function getOptions()
method hasShortcut (line 287) | public function hasShortcut($name)
method getOptionForShortcut (line 297) | public function getOptionForShortcut($shortcut)
method getOptionDefaults (line 306) | public function getOptionDefaults()
method shortcutToName (line 322) | private function shortcutToName($shortcut)
method getSynopsis (line 336) | public function getSynopsis($short = false)
FILE: thinkphp/library/think/console/input/Option.php
class Option (line 14) | class Option
method __construct (line 37) | public function __construct($name, $shortcut = null, $mode = null, $de...
method getShortcut (line 86) | public function getShortcut()
method getName (line 95) | public function getName()
method acceptValue (line 104) | public function acceptValue()
method isValueRequired (line 113) | public function isValueRequired()
method isValueOptional (line 122) | public function isValueOptional()
method isArray (line 131) | public function isArray()
method setDefault (line 141) | public function setDefault($default = null)
method getDefault (line 162) | public function getDefault()
method getDescription (line 171) | public function getDescription()
method equals (line 181) | public function equals(Option $option)
FILE: thinkphp/library/think/console/output/Ask.php
class Ask (line 19) | class Ask
method __construct (line 34) | public function __construct(Input $input, Output $output, Question $qu...
method run (line 41) | public function run()
method doAsk (line 60) | protected function doAsk()
method autocomplete (line 99) | private function autocomplete($inputStream)
method getHiddenResponse (line 192) | protected function getHiddenResponse($inputStream)
method validateAttempts (line 236) | protected function validateAttempts($interviewer)
method writePrompt (line 258) | protected function writePrompt()
method getShell (line 309) | private function getShell()
method hasSttyAvailable (line 330) | private function hasSttyAvailable()
FILE: thinkphp/library/think/console/output/Descriptor.php
class Descriptor (line 22) | class Descriptor
method describe (line 33) | public function describe(Output $output, $object, array $options = [])
method write (line 63) | protected function write($content, $decorated = false)
method describeInputArgument (line 74) | protected function describeInputArgument(InputArgument $argument, arra...
method describeInputOption (line 98) | protected function describeInputOption(InputOption $option, array $opt...
method describeInputDefinition (line 133) | protected function describeInputDefinition(InputDefinition $definition...
method describeCommand (line 178) | protected function describeCommand(Command $command, array $options = [])
method describeConsole (line 213) | protected function describeConsole(Console $console, array $options = [])
method writeText (line 268) | private function writeText($content, array $options = [])
method formatDefaultValue (line 279) | private function formatDefaultValue($default)
method getColumnWidth (line 288) | private function getColumnWidth(array $commands)
method calculateTotalWidthForOptions (line 302) | private function calculateTotalWidthForOptions($options)
FILE: thinkphp/library/think/console/output/Formatter.php
class Formatter (line 16) | class Formatter
method escape (line 28) | public static function escape($text)
method __construct (line 36) | public function __construct()
method setDecorated (line 52) | public function setDecorated($decorated)
method isDecorated (line 61) | public function isDecorated()
method setStyle (line 71) | public function setStyle($name, Style $style)
method hasStyle (line 81) | public function hasStyle($name)
method getStyle (line 92) | public function getStyle($name)
method format (line 106) | public function format($message)
method getStyleStack (line 149) | public function getStyleStack()
method createStyleFromString (line 159) | private function createStyleFromString($string)
method applyCurrentStyle (line 194) | private function applyCurrentStyle($text)
FILE: thinkphp/library/think/console/output/Question.php
class Question (line 14) | class Question
method __construct (line 31) | public function __construct($question, $default = null)
method getQuestion (line 41) | public function getQuestion()
method getDefault (line 50) | public function getDefault()
method isHidden (line 59) | public function isHidden()
method setHidden (line 69) | public function setHidden($hidden)
method isHiddenFallback (line 84) | public function isHiddenFallback()
method setHiddenFallback (line 94) | public function setHiddenFallback($fallback)
method getAutocompleterValues (line 105) | public function getAutocompleterValues()
method setAutocompleterValues (line 117) | public function setAutocompleterValues($values)
method setValidator (line 143) | public function setValidator($validator)
method getValidator (line 154) | public function getValidator()
method setMaxAttempts (line 165) | public function setMaxAttempts($attempts)
method getMaxAttempts (line 180) | public function getMaxAttempts()
method setNormalizer (line 190) | public function setNormalizer($normalizer)
method getNormalizer (line 202) | public function getNormalizer()
method isAssoc (line 207) | protected function isAssoc($array)
FILE: thinkphp/library/think/console/output/descriptor/Console.php
class Console (line 17) | class Console
method __construct (line 52) | public function __construct(ThinkConsole $console, $namespace = null)
method getNamespaces (line 61) | public function getNamespaces()
method getCommands (line 73) | public function getCommands()
method getCommand (line 87) | public function getCommand($name)
method inspectConsole (line 96) | private function inspectConsole()
method sortCommands (line 128) | private function sortCommands(array $commands)
FILE: thinkphp/library/think/console/output/driver/Buffer.php
class Buffer (line 16) | class Buffer
method __construct (line 23) | public function __construct(Output $output)
method fetch (line 28) | public function fetch()
method write (line 35) | public function write($messages, $newline = false, $options = Output::...
method renderException (line 47) | public function renderException(\Exception $e)
FILE: thinkphp/library/think/console/output/driver/Console.php
class Console (line 17) | class Console
method __construct (line 31) | public function __construct(Output $output)
method getFormatter (line 40) | public function getFormatter()
method setDecorated (line 45) | public function setDecorated($decorated)
method write (line 50) | public function write($messages, $newline = false, $type = Output::OUT...
method renderException (line 76) | public function renderException(\Exception $e)
method getTerminalWidth (line 148) | protected function getTerminalWidth()
method getTerminalHeight (line 159) | protected function getTerminalHeight()
method getTerminalDimensions (line 170) | public function getTerminalDimensions()
method getSttyColumns (line 201) | private function getSttyColumns()
method getMode (line 224) | private function getMode()
method stringWidth (line 245) | private function stringWidth($string)
method splitStringByWidth (line 258) | private function splitStringByWidth($string, $width)
method isRunningOS400 (line 288) | private function isRunningOS400()
method hasStdoutSupport (line 303) | protected function hasStdoutSupport()
method hasStderrSupport (line 313) | protected function hasStderrSupport()
method openOutputStream (line 321) | private function openOutputStream()
method openErrorStream (line 332) | private function openErrorStream()
method doWrite (line 343) | protected function doWrite($message, $newline, $stream = null)
method hasColorSupport (line 360) | protected function hasColorSupport($stream)
FILE: thinkphp/library/think/console/output/driver/Nothing.php
class Nothing (line 16) | class Nothing
method __construct (line 19) | public function __construct(Output $output)
method write (line 24) | public function write($messages, $newline = false, $options = Output::...
method renderException (line 29) | public function renderException(\Exception $e)
FILE: thinkphp/library/think/console/output/formatter/Stack.php
class Stack (line 14) | class Stack
method __construct (line 31) | public function __construct(Style $emptyStyle = null)
method reset (line 40) | public function reset()
method push (line 49) | public function push(Style $style)
method pop (line 60) | public function pop(Style $style = null)
method getCurrent (line 89) | public function getCurrent()
method setEmptyStyle (line 102) | public function setEmptyStyle(Style $emptyStyle)
method getEmptyStyle (line 112) | public function getEmptyStyle()
FILE: thinkphp/library/think/console/output/formatter/Style.php
class Style (line 14) | class Style
method __construct (line 56) | public function __construct($foreground = null, $background = null, ar...
method setForeground (line 75) | public function setForeground($color = null)
method setBackground (line 96) | public function setBackground($color = null)
method setOption (line 117) | public function setOption($option)
method unsetOption (line 133) | public function unsetOption($option)
method setOptions (line 149) | public function setOptions(array $options)
method apply (line 163) | public function apply($text)
FILE: thinkphp/library/think/console/output/question/Choice.php
class Choice (line 16) | class Choice extends Question
method __construct (line 30) | public function __construct($question, array $choices, $default = null)
method getChoices (line 43) | public function getChoices()
method setMultiselect (line 53) | public function setMultiselect($multiselect)
method isMultiselect (line 61) | public function isMultiselect()
method getPrompt (line 70) | public function getPrompt()
method setPrompt (line 80) | public function setPrompt($prompt)
method setErrorMessage (line 92) | public function setErrorMessage($errorMessage)
method getDefaultValidator (line 104) | private function getDefaultValidator()
FILE: thinkphp/library/think/console/output/question/Confirmation.php
class Confirmation (line 16) | class Confirmation extends Question
method __construct (line 27) | public function __construct($question, $default = true, $trueAnswerReg...
method getDefaultNormalizer (line 39) | private function getDefaultNormalizer()
FILE: thinkphp/library/think/controller/Rest.php
class Rest (line 18) | abstract class Rest
method __construct (line 38) | public function __construct()
method _empty (line 68) | public function _empty($method)
method response (line 94) | protected function response($data, $type = 'json', $code = 200)
FILE: thinkphp/library/think/controller/Yar.php
class Yar (line 17) | abstract class Yar
method __construct (line 24) | public function __construct()
method __call (line 49) | public function __call($method, $args)
FILE: thinkphp/library/think/db/Builder.php
class Builder (line 17) | abstract class Builder
method __construct (line 40) | public function __construct(Connection $connection, Query $query)
method getConnection (line 51) | public function getConnection()
method getQuery (line 61) | public function getQuery()
method parseSqlTable (line 72) | protected function parseSqlTable($sql)
method parseData (line 84) | protected function parseData($data, $options)
method parseKey (line 134) | protected function parseKey($key, $options = [])
method parseValue (line 146) | protected function parseValue($value, $field = '')
method parseField (line 167) | protected function parseField($fields, $options = [])
method parseTable (line 193) | protected function parseTable($tables, $options = [])
method parseWhere (line 222) | protected function parseWhere($where, $options)
method buildWhere (line 243) | public function buildWhere($where, $options)
method parseWhereItem (line 296) | protected function parseWhereItem($field, $val, $rule = '', $options =...
method parseClosure (line 442) | protected function parseClosure($call, $show = true)
method parseDateTime (line 459) | protected function parseDateTime($value, $key, $options = [], $bindNam...
method parseLimit (line 498) | protected function parseLimit($limit)
method parseJoin (line 510) | protected function parseJoin($join, $options = [])
method parseOrder (line 540) | protected function parseOrder($order, $options = [])
method parseGroup (line 569) | protected function parseGroup($group)
method parseHaving (line 580) | protected function parseHaving($having)
method parseComment (line 591) | protected function parseComment($comment)
method parseDistinct (line 602) | protected function parseDistinct($distinct)
method parseUnion (line 613) | protected function parseUnion($union)
method parseForce (line 636) | protected function parseForce($index)
method parseLock (line 655) | protected function parseLock($lock = false)
method select (line 666) | public function select($options = [])
method insert (line 696) | public function insert(array $data, $options = [], $replace = false)
method insertAll (line 727) | public function insertAll($dataSet, $options, $replace = false)
method selectInsert (line 780) | public function selectInsert($fields, $table, $options)
method update (line 798) | public function update($data, $options)
method delete (line 831) | public function delete($options)
FILE: thinkphp/library/think/db/Connection.php
class Connection (line 30) | abstract class Connection
method __construct (line 130) | public function __construct(array $config = [])
method getQuery (line 142) | protected function getQuery()
method getBuilder (line 153) | public function getBuilder()
method __call (line 169) | public function __call($method, $args)
method parseDsn (line 180) | abstract protected function parseDsn($config);
method getFields (line 188) | abstract public function getFields($tableName);
method getTables (line 196) | abstract public function getTables($dbName);
method getExplain (line 204) | abstract protected function getExplain($sql);
method fieldCase (line 212) | public function fieldCase($info)
method getConfig (line 235) | public function getConfig($config = '')
method setConfig (line 247) | public function setConfig($config, $value = '')
method connect (line 265) | public function connect(array $config = [], $linkNum = 0, $autoConnect...
method free (line 314) | public function free()
method getPdo (line 324) | public function getPdo()
method query (line 344) | public function query($sql, $bind = [], $master = false, $pdo = false)
method execute (line 406) | public function execute($sql, $bind = [])
method getRealSql (line 467) | public function getRealSql($sql, array $bind = [])
method bindValue (line 497) | protected function bindValue(array $bind = [])
method bindParam (line 528) | protected function bindParam($bind)
method getResult (line 557) | protected function getResult($pdo = false, $procedure = false)
method procedure (line 577) | protected function procedure()
method transaction (line 599) | public function transaction($callback)
method startTrans (line 623) | public function startTrans()
method commit (line 659) | public function commit()
method rollback (line 676) | public function rollback()
method supportSavepoint (line 695) | protected function supportSavepoint()
method parseSavepoint (line 705) | protected function parseSavepoint($name)
method parseSavepointRollBack (line 715) | protected function parseSavepointRollBack($name)
method batchQuery (line 727) | public function batchQuery($sqlArray = [])
method getQueryTimes (line 753) | public function getQueryTimes($execute = false)
method getExecuteTimes (line 763) | public function getExecuteTimes()
method close (line 773) | public function close()
method isBreak (line 788) | protected function isBreak($e)
method getLastSql (line 822) | public function getLastSql()
method getLastInsID (line 833) | public function getLastInsID($sequence = null)
method getNumRows (line 843) | public function getNumRows()
method getError (line 853) | public function getError()
method quote (line 874) | public function quote($str, $master = true)
method debug (line 887) | protected function debug($start, $sql = '')
method listen (line 915) | public function listen($callback)
method trigger (line 928) | protected function trigger($sql, $runtime, $explain = [])
method initConnect (line 951) | protected function initConnect($master = true)
method multiConnect (line 978) | protected function multiConnect($master = false)
method __destruct (line 1023) | public function __destruct()
FILE: thinkphp/library/think/db/Query.php
class Query (line 31) | class Query
method __construct (line 62) | public function __construct(Connection $connection = null, $model = '')
method __call (line 80) | public function __call($method, $args)
method getConnection (line 102) | public function getConnection()
method connect (line 113) | public function connect($config)
method setBuilder (line 125) | protected function setBuilder()
method getModel (line 136) | public function getModel()
method getBuilder (line 146) | public function getBuilder()
method name (line 157) | public function name($name)
method setTable (line 169) | public function setTable($table)
method getTable (line 181) | public function getTable($name = '')
method parseSqlTable (line 201) | public function parseSqlTable($sql)
method query (line 223) | public function query($sql, $bind = [], $master = false, $class = false)
method execute (line 237) | public function execute($sql, $bind = [])
method getLastInsID (line 248) | public function getLastInsID($sequence = null)
method getLastSql (line 258) | public function getLastSql()
method transaction (line 269) | public function transaction($callback)
method startTrans (line 279) | public function startTrans()
method commit (line 290) | public function commit()
method rollback (line 301) | public function rollback()
method batchQuery (line 313) | public function batchQuery($sql = [])
method getConfig (line 324) | public function getConfig($name = '')
method getPartitionTableName (line 337) | public function getPartitionTableName($data, $field, $rule = [])
method value (line 395) | public function value($field, $default = null, $force = false)
method column (line 438) | public function column($field, $key = '')
method count (line 507) | public function count($field = '*')
method sum (line 525) | public function sum($field)
method min (line 536) | public function min($field)
method max (line 547) | public function max($field)
method avg (line 558) | public function avg($field)
method setField (line 571) | public function setField($field, $value = '')
method setInc (line 590) | public function setInc($field, $step = 1, $lazyTime = 0)
method setDec (line 619) | public function setDec($field, $step = 1, $lazyTime = 0)
method lazyWrite (line 649) | protected function lazyWrite($type, $guid, $step, $lazyTime)
method join (line 676) | public function join($join, $condition = null, $type = 'INNER')
method getJoinTable (line 700) | protected function getJoinTable($join, &$alias = null)
method union (line 743) | public function union($union, $all = false)
method field (line 765) | public function field($field, $except = false, $tableName = '', $prefi...
method data (line 807) | public function data($field, $value = null)
method inc (line 824) | public function inc($field, $step = 1)
method dec (line 840) | public function dec($field, $step = 1)
method exp (line 856) | public function exp($field, $value)
method view (line 871) | public function view($join, $field = true, $on = null, $type = 'INNER')
method partition (line 921) | public function partition($data, $field, $rule = [])
method where (line 935) | public function where($field, $op = null, $condition = null)
method whereOr (line 951) | public function whereOr($field, $op = null, $condition = null)
method whereXor (line 967) | public function whereXor($field, $op = null, $condition = null)
method whereNull (line 982) | public function whereNull($field, $logic = 'AND')
method whereNotNull (line 995) | public function whereNotNull($field, $logic = 'AND')
method whereExists (line 1008) | public function whereExists($condition, $logic = 'AND')
method whereNotExists (line 1021) | public function whereNotExists($condition, $logic = 'AND')
method whereIn (line 1035) | public function whereIn($field, $condition, $logic = 'AND')
method whereNotIn (line 1049) | public function whereNotIn($field, $condition, $logic = 'AND')
method whereLike (line 1063) | public function whereLike($field, $condition, $logic = 'AND')
method whereNotLike (line 1077) | public function whereNotLike($field, $condition, $logic = 'AND')
method whereBetween (line 1091) | public function whereBetween($field, $condition, $logic = 'AND')
method whereNotBetween (line 1105) | public function whereNotBetween($field, $condition, $logic = 'AND')
method whereExp (line 1119) | public function whereExp($field, $condition, $logic = 'AND')
method useSoftDelete (line 1132) | public function useSoftDelete($field, $condition = null)
method parseWhereExp (line 1150) | protected function parseWhereExp($logic, $field, $op, $condition, $par...
method checkMultiField (line 1224) | private function checkMultiField($field, $logic)
method removeWhereField (line 1236) | public function removeWhereField($field, $logic = 'AND')
method removeOption (line 1251) | public function removeOption($option = true)
method limit (line 1268) | public function limit($offset, $length = null)
method page (line 1284) | public function page($page, $listRows = null)
method paginate (line 1308) | public function paginate($listRows = null, $simple = false, $config = [])
method table (line 1356) | public function table($table)
method using (line 1401) | public function using($using)
method order (line 1414) | public function order($field, $order = null)
method cache (line 1452) | public function cache($key = true, $expire = null, $tag = null)
method group (line 1471) | public function group($group)
method having (line 1483) | public function having($having)
method lock (line 1495) | public function lock($lock = false)
method distinct (line 1508) | public function distinct($distinct)
method alias (line 1520) | public function alias($alias)
method force (line 1547) | public function force($force)
method comment (line 1559) | public function comment($comment)
method fetchSql (line 1571) | public function fetchSql($fetch = true)
method fetchPdo (line 1583) | public function fetchPdo($pdo = true)
method master (line 1594) | public function master()
method strict (line 1606) | public function strict($strict = true)
method failException (line 1618) | public function failException($fail = true)
method sequence (line 1630) | public function sequence($sequence = null)
method pk (line 1642) | public function pk($pk)
method whereTime (line 1656) | public function whereTime($field, $op, $range = null)
method getTableInfo (line 1706) | public function getTableInfo($tableName = '', $fetch = '')
method getPk (line 1768) | public function getPk($options = '')
method getTableFields (line 1779) | public function getTableFields($table = '')
method getFieldsType (line 1785) | public function getFieldsType($table = '')
method getFieldsBind (line 1791) | public function getFieldsBind($table = '')
method getFieldBindType (line 1809) | protected function getFieldBindType($type)
method bind (line 1829) | public function bind($key, $value = false, $type = PDO::PARAM_STR)
method isBind (line 1845) | public function isBind($key)
method options (line 1856) | protected function options(array $options)
method getOptions (line 1868) | public function getOptions($name = '')
method with (line 1883) | public function with($with)
method withCount (line 1940) | public function withCount($relation, $subQuery = true)
method withField (line 1973) | public function withField($field)
method via (line 1985) | public function via($via = '')
method relation (line 1997) | public function relation($relation)
method parsePkWhere (line 2021) | protected function parsePkWhere($data, &$options)
method insert (line 2068) | public function insert(array $data = [], $replace = false, $getLastIns...
method insertGetId (line 2111) | public function insertGetId(array $data, $replace = false, $sequence =...
method insertAll (line 2123) | public function insertAll(array $dataSet, $replace = false)
method selectInsert (line 2151) | public function selectInsert($fields, $table)
method update (line 2177) | public function update(array $data = [])
method getPdo (line 2252) | public function getPdo()
method select (line 2277) | public function select($data = null)
method cacheData (line 2379) | protected function cacheData($key, $data, $config = [])
method getCacheKey (line 2395) | protected function getCacheKey($value, $options, $bind = [])
method find (line 2418) | public function find($data = null)
method throwNotFound (line 2523) | protected function throwNotFound($options = [])
method selectOrFail (line 2542) | public function selectOrFail($data = null)
method findOrFail (line 2556) | public function findOrFail($data = null)
method chunk (line 2569) | public function chunk($count, $callback, $column = null)
method getBind (line 2613) | public function getBind()
method buildSql (line 2627) | public function buildSql($sub = true)
method delete (line 2640) | public function delete($data = null)
method parseExpress (line 2699) | protected function parseExpress()
method event (line 2792) | public static function event($event, $callback)
method trigger (line 2804) | protected function trigger($event, $params = [])
FILE: thinkphp/library/think/db/builder/Mysql.php
class Mysql (line 19) | class Mysql extends Builder
method parseKey (line 30) | protected function parseKey($key, $options = [])
method parseRand (line 63) | protected function parseRand()
FILE: thinkphp/library/think/db/builder/Pgsql.php
class Pgsql (line 19) | class Pgsql extends Builder
method parseLimit (line 28) | public function parseLimit($limit)
method parseKey (line 49) | protected function parseKey($key, $options = [])
method parseRand (line 76) | protected function parseRand()
FILE: thinkphp/library/think/db/builder/Sqlite.php
class Sqlite (line 19) | class Sqlite extends Builder
method parseLimit (line 27) | public function parseLimit($limit)
method parseRand (line 46) | protected function parseRand()
method parseKey (line 58) | protected function parseKey($key, $options = [])
FILE: thinkphp/library/think/db/builder/Sqlsrv.php
class Sqlsrv (line 19) | class Sqlsrv extends Builder
method parseOrder (line 33) | protected function parseOrder($order, $options = [])
method parseRand (line 59) | protected function parseRand()
method parseKey (line 71) | protected function parseKey($key, $options = [])
method parseLimit (line 98) | protected function parseLimit($limit)
method selectInsert (line 113) | public function selectInsert($fields, $table, $options)
FILE: thinkphp/library/think/db/connector/Mysql.php
class Mysql (line 21) | class Mysql extends Connection
method parseDsn (line 32) | protected function parseDsn($config)
method getFields (line 52) | public function getFields($tableName)
method getTables (line 87) | public function getTables($dbName = '')
method getExplain (line 105) | protected function getExplain($sql)
method supportSavepoint (line 118) | protected function supportSavepoint()
FILE: thinkphp/library/think/db/connector/Pgsql.php
class Pgsql (line 20) | class Pgsql extends Connection
method parseDsn (line 30) | protected function parseDsn($config)
method getFields (line 45) | public function getFields($tableName)
method getTables (line 76) | public function getTables($dbName = '')
method getExplain (line 94) | protected function getExplain($sql)
method supportSavepoint (line 99) | protected function supportSavepoint()
FILE: thinkphp/library/think/db/connector/Sqlite.php
class Sqlite (line 20) | class Sqlite extends Connection
method parseDsn (line 31) | protected function parseDsn($config)
method getFields (line 43) | public function getFields($tableName)
method getTables (line 73) | public function getTables($dbName = '')
method getExplain (line 95) | protected function getExplain($sql)
method supportSavepoint (line 100) | protected function supportSavepoint()
FILE: thinkphp/library/think/db/connector/Sqlsrv.php
class Sqlsrv (line 20) | class Sqlsrv extends Connection
method parseDsn (line 35) | protected function parseDsn($config)
method getFields (line 50) | public function getFields($tableName)
method getTables (line 96) | public function getTables($dbName = '')
method getExplain (line 118) | protected function getExplain($sql)
FILE: thinkphp/library/think/db/connector/pgsql.sql
function pgsql_type (line 1) | CREATE OR REPLACE FUNCTION pgsql_type(a_type varchar) RETURNS varchar AS
function "public" (line 32) | CREATE OR REPLACE FUNCTION "public"."table_msg" (a_schema_name varchar, ...
function "public" (line 103) | CREATE OR REPLACE FUNCTION "public"."table_msg" (a_table_name varchar) R...
FILE: thinkphp/library/think/db/exception/BindParamException.php
class BindParamException (line 19) | class BindParamException extends DbException
method __construct (line 30) | public function __construct($message, $config, $sql, $bind, $code = 10...
FILE: thinkphp/library/think/db/exception/DataNotFoundException.php
class DataNotFoundException (line 16) | class DataNotFoundException extends DbException
method __construct (line 26) | public function __construct($message, $table = '', array $config = [])
method getTable (line 39) | public function getTable()
FILE: thinkphp/library/think/db/exception/ModelNotFoundException.php
class ModelNotFoundException (line 16) | class ModelNotFoundException extends DbException
method __construct (line 25) | public function __construct($message, $model = '', array $config = [])
method getModel (line 38) | public function getModel()
FILE: thinkphp/library/think/debug/Console.php
class Console (line 24) | class Console
method __construct (line 31) | public function __construct($config = [])
method output (line 45) | public function output(Response $response, array $log = [])
method console (line 121) | protected function console($type, $msg)
FILE: thinkphp/library/think/debug/Html.php
class Html (line 24) | class Html
method __construct (line 32) | public function __construct(array $config = [])
method output (line 45) | public function output(Response $response, array $log = [])
FILE: thinkphp/library/think/exception/ClassNotFoundException.php
class ClassNotFoundException (line 14) | class ClassNotFoundException extends \RuntimeException
method __construct (line 17) | public function __construct($message, $class = '')
method getClass (line 28) | public function getClass()
FILE: thinkphp/library/think/exception/DbException.php
class DbException (line 19) | class DbException extends Exception
method __construct (line 28) | public function __construct($message, array $config, $sql, $code = 10500)
FILE: thinkphp/library/think/exception/ErrorException.php
class ErrorException (line 22) | class ErrorException extends Exception
method __construct (line 38) | public function __construct($severity, $message, $file, $line, array $...
method getSeverity (line 53) | final public function getSeverity()
FILE: thinkphp/library/think/exception/Handle.php
class Handle (line 22) | class Handle
method report (line 35) | public function report(Exception $exception)
method isIgnoreReport (line 63) | protected function isIgnoreReport(Exception $exception)
method render (line 79) | public function render(Exception $e)
method renderForConsole (line 92) | public function renderForConsole(Output $output, Exception $e)
method renderHttpException (line 104) | protected function renderHttpException(HttpException $e)
method convertExceptionToResponse (line 119) | protected function convertExceptionToResponse(Exception $exception)
method getCode (line 189) | protected function getCode(Exception $exception)
method getMessage (line 204) | protected function getMessage(Exception $exception)
method getSourceCode (line 229) | protected function getSourceCode(Exception $exception)
method getExtendData (line 253) | protected function getExtendData(Exception $exception)
method getConst (line 266) | private static function getConst()
FILE: thinkphp/library/think/exception/HttpException.php
class HttpException (line 14) | class HttpException extends \RuntimeException
method __construct (line 19) | public function __construct($statusCode, $message = null, \Exception $...
method getStatusCode (line 27) | public function getStatusCode()
method getHeaders (line 32) | public function getHeaders()
FILE: thinkphp/library/think/exception/HttpResponseException.php
class HttpResponseException (line 16) | class HttpResponseException extends \RuntimeException
method __construct (line 23) | public function __construct(Response $response)
method getResponse (line 28) | public function getResponse()
FILE: thinkphp/library/think/exception/PDOException.php
class PDOException (line 18) | class PDOException extends DbException
method __construct (line 27) | public function __construct(\PDOException $exception, array $config, $...
FILE: thinkphp/library/think/exception/RouteNotFoundException.php
class RouteNotFoundException (line 14) | class RouteNotFoundException extends HttpException
method __construct (line 17) | public function __construct()
FILE: thinkphp/library/think/exception/TemplateNotFoundException.php
class TemplateNotFoundException (line 14) | class TemplateNotFoundException extends \RuntimeException
method __construct (line 18) | public function __construct($message, $template = '')
method getTemplate (line 29) | public function getTemplate()
FILE: thinkphp/library/think/exception/ThrowableError.php
class ThrowableError (line 14) | class ThrowableError extends \ErrorException
method __construct (line 16) | public function __construct(\Throwable $e)
method setTrace (line 41) | protected function setTrace($trace)
FILE: thinkphp/library/think/exception/ValidateException.php
class ValidateException (line 14) | class ValidateException extends \RuntimeException
method __construct (line 18) | public function __construct($error)
method getError (line 29) | public function getError()
FILE: thinkphp/library/think/log/driver/File.php
class File (line 19) | class File
method __construct (line 31) | public function __construct($config = [])
method save (line 44) | public function save(array $log = [])
method write (line 75) | protected function write($message, $destination, $apart = false)
FILE: thinkphp/library/think/log/driver/Socket.php
class Socket (line 20) | class Socket
method __construct (line 50) | public function __construct(array $config = [])
method save (line 63) | public function save(array $log = [])
method sendToClient (line 162) | protected function sendToClient($tabid, $client_id, $logs, $force_clie...
method check (line 175) | protected function check()
method getClientArg (line 201) | protected function getClientArg($name)
method send (line 233) | protected function send($host, $message = '', $address = '/')
FILE: thinkphp/library/think/log/driver/Test.php
class Test (line 17) | class Test
method save (line 25) | public function save(array $log = [])
FILE: thinkphp/library/think/model/Collection.php
class Collection (line 17) | class Collection extends BaseCollection
method column (line 25) | public function column($column_key, $index_key = null)
method load (line 39) | public function load($relation)
method hidden (line 53) | public function hidden($hidden = [], $override = false)
method visible (line 68) | public function visible($visible = [], $override = false)
method append (line 84) | public function append($append = [], $override = false)
FILE: thinkphp/library/think/model/Merge.php
class Merge (line 18) | class Merge extends Model
method __construct (line 30) | public function __construct($data = [])
method get (line 48) | public static function get($data = null, $with = [], $cache = false)
method attachQuery (line 61) | protected static function attachQuery($query)
method getModelField (line 88) | protected static function getModelField($query, $name, $table = '', $m...
method all (line 112) | public static function all($data = null, $with = [], $cache = false)
method parseData (line 126) | protected function parseData($model, $data)
method save (line 151) | public function save($data = [], $where = [], $sequence = null)
method delete (line 292) | public function delete()
FILE: thinkphp/library/think/model/Pivot.php
class Pivot (line 16) | class Pivot extends Model
method __construct (line 31) | public function __construct(Model $parent, $data = [], $table = '')
FILE: thinkphp/library/think/model/Relation.php
class Relation (line 24) | abstract class Relation
method getParent (line 44) | public function getParent()
method getModel (line 54) | public function getModel()
method getQuery (line 64) | public function getQuery()
method resultSetBuild (line 75) | protected function resultSetBuild($resultSet)
method getQueryFields (line 80) | protected function getQueryFields($model)
method getRelationQueryFields (line 86) | protected function getRelationQueryFields($fields, $model)
method baseQuery (line 111) | abstract protected function baseQuery();
method __call (line 113) | public function __call($method, $args)
FILE: thinkphp/library/think/model/relation/BelongsTo.php
class BelongsTo (line 17) | class BelongsTo extends OneToOne
method __construct (line 29) | public function __construct(Model $parent, $model, $foreignKey, $local...
method getRelation (line 47) | public function getRelation($subRelation = '', $closure = null)
method has (line 74) | public function has($operator = '>=', $count = 1, $id = '*')
method hasWhere (line 85) | public function hasWhere($where = [])
method eagerlySet (line 113) | protected function eagerlySet(&$resultSet, $relation, $subRelation, $c...
method eagerlyOne (line 165) | protected function eagerlyOne(&$result, $relation, $subRelation, $clos...
method associate (line 192) | public function associate($model)
method dissociate (line 208) | public function dissociate()
FILE: thinkphp/library/think/model/relation/BelongsToMany.php
class BelongsToMany (line 23) | class BelongsToMany extends Relation
method __construct (line 41) | public function __construct(Model $parent, $model, $table, $foreignKey...
method pivot (line 62) | public function pivot($pivot)
method newPivot (line 73) | protected function newPivot($data = [])
method hydratePivot (line 83) | protected function hydratePivot($models)
method buildQuery (line 104) | protected function buildQuery()
method getRelation (line 120) | public function getRelation($subRelation = '', $closure = null)
method select (line 135) | public function select($data = null)
method paginate (line 149) | public function paginate($listRows = null, $simple = false, $config = [])
method find (line 161) | public function find($data = null)
method selectOrFail (line 176) | public function selectOrFail($data = null)
method findOrFail (line 187) | public function findOrFail($data = null)
method has (line 201) | public function has($operator = '>=', $count = 1, $id = '*', $joinType...
method hasWhere (line 213) | public function hasWhere($where = [])
method wherePivot (line 225) | public function wherePivot($field, $op = null, $condition = null)
method eagerlyResultSet (line 241) | public function eagerlyResultSet(&$resultSet, $relation, $subRelation,...
method eagerlyResult (line 285) | public function eagerlyResult(&$result, $relation, $subRelation, $clos...
method relationCount (line 308) | public function relationCount($result, $closure)
method getRelationCountQuery (line 325) | public function getRelationCountQuery($closure)
method eagerlyManyToMany (line 343) | protected function eagerlyManyToMany($where, $relation, $subRelation =...
method belongsToManyQuery (line 375) | protected function belongsToManyQuery($foreignKey, $localKey, $conditi...
method save (line 400) | public function save($data, array $pivot = [])
method saveAll (line 414) | public function saveAll(array $dataSet, array $pivot = [], $samePivot ...
method attach (line 436) | public function attach($data, $pivot = [])
method detach (line 483) | public function detach($data = null, $relationDel = false)
method sync (line 515) | public function sync($ids, $detaching = true)
method baseQuery (line 563) | protected function baseQuery()
FILE: thinkphp/library/think/model/relation/HasMany.php
class HasMany (line 19) | class HasMany extends Relation
method __construct (line 29) | public function __construct(Model $parent, $model, $foreignKey, $local...
method getRelation (line 44) | public function getRelation($subRelation = '', $closure = null)
method eagerlyResultSet (line 68) | public function eagerlyResultSet(&$resultSet, $relation, $subRelation,...
method eagerlyResult (line 112) | public function eagerlyResult(&$result, $relation, $subRelation, $clos...
method relationCount (line 138) | public function relationCount($result, $closure)
method getRelationCountQuery (line 157) | public function getRelationCountQuery($closure)
method eagerlyOneToMany (line 181) | protected function eagerlyOneToMany($model, $where, $relation, $subRel...
method save (line 204) | public function save($data)
method saveAll (line 221) | public function saveAll(array $dataSet)
method has (line 239) | public function has($operator = '>=', $count = 1, $id = '*', $joinType...
method hasWhere (line 254) | public function hasWhere($where = [])
method baseQuery (line 278) | protected function baseQuery()
FILE: thinkphp/library/think/model/relation/HasManyThrough.php
class HasManyThrough (line 20) | class HasManyThrough extends Relation
method __construct (line 37) | public function __construct(Model $parent, $model, $through, $foreignK...
method getRelation (line 54) | public function getRelation($subRelation = '', $closure = null)
method has (line 72) | public function has($operator = '>=', $count = 1, $id = '*', $joinType...
method hasWhere (line 83) | public function hasWhere($where = [])
method eagerlyResultSet (line 98) | public function eagerlyResultSet(&$resultSet, $relation, $subRelation,...
method eagerlyResult (line 111) | public function eagerlyResult(&$result, $relation, $subRelation, $clos...
method relationCount (line 121) | public function relationCount($result, $closure)
method baseQuery (line 129) | protected function baseQuery()
FILE: thinkphp/library/think/model/relation/HasOne.php
class HasOne (line 18) | class HasOne extends OneToOne
method __construct (line 29) | public function __construct(Model $parent, $model, $foreignKey, $local...
method getRelation (line 45) | public function getRelation($subRelation = '', $closure = null)
method has (line 67) | public function has()
method hasWhere (line 84) | public function hasWhere($where = [])
method eagerlySet (line 112) | protected function eagerlySet(&$resultSet, $relation, $subRelation, $c...
method eagerlyOne (line 163) | protected function eagerlyOne(&$result, $relation, $subRelation, $clos...
FILE: thinkphp/library/think/model/relation/MorphMany.php
class MorphMany (line 20) | class MorphMany extends Relation
method __construct (line 37) | public function __construct(Model $parent, $model, $morphKey, $morphTy...
method getRelation (line 53) | public function getRelation($subRelation = '', $closure = null)
method has (line 77) | public function has($operator = '>=', $count = 1, $id = '*', $joinType...
method hasWhere (line 88) | public function hasWhere($where = [])
method eagerlyResultSet (line 102) | public function eagerlyResultSet(&$resultSet, $relation, $subRelation,...
method eagerlyResult (line 146) | public function eagerlyResult(&$result, $relation, $subRelation, $clos...
method relationCount (line 175) | public function relationCount($result, $closure)
method getRelationCountQuery (line 194) | public function getRelationCountQuery($closure)
method eagerlyMorphToMany (line 218) | protected function eagerlyMorphToMany($where, $relation, $subRelation ...
method save (line 240) | public function save($data)
method saveAll (line 260) | public function saveAll(array $dataSet)
method baseQuery (line 274) | protected function baseQuery()
FILE: thinkphp/library/think/model/relation/MorphOne.php
class MorphOne (line 20) | class MorphOne extends Relation
method __construct (line 37) | public function __construct(Model $parent, $model, $morphKey, $morphTy...
method getRelation (line 53) | public function getRelation($subRelation = '', $closure = null)
method has (line 76) | public function has($operator = '>=', $count = 1, $id = '*', $joinType...
method hasWhere (line 87) | public function hasWhere($where = [])
method eagerlyResultSet (line 101) | public function eagerlyResultSet(&$resultSet, $relation, $subRelation,...
method eagerlyResult (line 146) | public function eagerlyResult(&$result, $relation, $subRelation, $clos...
method eagerlyMorphToOne (line 177) | protected function eagerlyMorphToOne($where, $relation, $subRelation =...
method save (line 199) | public function save($data)
method baseQuery (line 218) | protected function baseQuery()
FILE: thinkphp/library/think/model/relation/MorphTo.php
class MorphTo (line 19) | class MorphTo extends Relation
method __construct (line 37) | public function __construct(Model $parent, $morphType, $morphKey, $ali...
method getRelation (line 52) | public function getRelation($subRelation = '', $closure = null)
method has (line 77) | public function has($operator = '>=', $count = 1, $id = '*', $joinType...
method hasWhere (line 88) | public function hasWhere($where = [])
method parseModel (line 99) | protected function parseModel($model)
method setAlias (line 119) | public function setAlias($alias)
method removeOption (line 130) | public function removeOption()
method eagerlyResultSet (line 145) | public function eagerlyResultSet(&$resultSet, $relation, $subRelation,...
method eagerlyResult (line 197) | public function eagerlyResult(&$result, $relation, $subRelation, $clos...
method relationCount (line 213) | public function relationCount($result, $closure)
method eagerlyMorphToOne (line 226) | protected function eagerlyMorphToOne($model, $relation, &$result, $sub...
method associate (line 244) | public function associate($model)
method dissociate (line 262) | public function dissociate()
method baseQuery (line 279) | protected function baseQuery()
FILE: thinkphp/library/think/model/relation/OneToOne.php
class OneToOne (line 25) | abstract class OneToOne extends Relation
method joinType (line 42) | public function joinType($type)
method eagerly (line 58) | public function eagerly(Query $query, $relation, $subRelation, $closur...
method eagerlySet (line 109) | abstract protected function eagerlySet(&$resultSet, $relation, $subRel...
method eagerlyOne (line 119) | abstract protected function eagerlyOne(&$result, $relation, $subRelati...
method eagerlyResultSet (line 130) | public function eagerlyResultSet(&$resultSet, $relation, $subRelation,...
method eagerlyResult (line 152) | public function eagerlyResult(&$result, $relation, $subRelation, $clos...
method save (line 169) | public function save($data)
method setEagerlyType (line 186) | public function setEagerlyType($type)
method getEagerlyType (line 197) | public function getEagerlyType()
method bind (line 208) | public function bind($attr)
method relationCount (line 224) | public function relationCount($result, $closure)
method match (line 236) | protected function match($model, $relation, &$result)
method bindAttr (line 272) | protected function bindAttr($model, &$result, $bindAttr)
method eagerlyWhere (line 295) | protected function eagerlyWhere($model, $where, $key, $relation, $subR...
method baseQuery (line 319) | protected function baseQuery()
FILE: thinkphp/library/think/paginator/driver/Bootstrap.php
class Bootstrap (line 16) | class Bootstrap extends Paginator
method getPreviousButton (line 24) | protected function getPreviousButton($text = "«")
method getNextButton (line 43) | protected function getNextButton($text = '»')
method getLinks (line 58) | protected function getLinks()
method render (line 109) | public function render()
method getAvailablePageWrapper (line 136) | protected function getAvailablePageWrapper($url, $page)
method getDisabledTextWrapper (line 147) | protected function getDisabledTextWrapper($text)
method getActivePageWrapper (line 158) | protected function getActivePageWrapper($text)
method getDots (line 168) | protected function getDots()
method getUrlLinks (line 179) | protected function getUrlLinks(array $urls)
method getPageLinkWrapper (line 197) | protected function getPageLinkWrapper($url, $page)
FILE: thinkphp/library/think/process/Builder.php
class Builder (line 16) | class Builder
method __construct (line 32) | public function __construct(array $arguments = [])
method create (line 42) | public static function create(array $arguments = [])
method add (line 52) | public function add($argument)
method setPrefix (line 64) | public function setPrefix($prefix)
method setArguments (line 76) | public function setArguments(array $arguments)
method setWorkingDirectory (line 88) | public function setWorkingDirectory($cwd)
method inheritEnvironmentVariables (line 100) | public function inheritEnvironmentVariables($inheritEnv = true)
method setEnv (line 113) | public function setEnv($name, $value)
method addEnvironmentVariables (line 125) | public function addEnvironmentVariables(array $variables)
method setInput (line 137) | public function setInput($input)
method setTimeout (line 149) | public function setTimeout($timeout)
method setOption (line 174) | public function setOption($name, $value)
method disableOutput (line 185) | public function disableOutput()
method enableOutput (line 196) | public function enableOutput()
method getProcess (line 207) | public function getProcess()
FILE: thinkphp/library/think/process/Utils.php
class Utils (line 12) | class Utils
method escapeArgument (line 20) | public static function escapeArgument($argument)
method validateInput (line 56) | public static function validateInput($caller, $input)
method isSurroundedBy (line 70) | private static function isSurroundedBy($arg, $char)
FILE: thinkphp/library/think/process/exception/Failed.php
class Failed (line 16) | class Failed extends \RuntimeException
method __construct (line 21) | public function __construct(Process $process)
method getProcess (line 38) | public function getProcess()
FILE: thinkphp/library/think/process/exception/Timeout.php
class Timeout (line 16) | class Timeout extends \RuntimeException
method __construct (line 25) | public function __construct(Process $process, $timeoutType)
method getProcess (line 33) | public function getProcess()
method isGeneralTimeout (line 38) | public function isGeneralTimeout()
method isIdleTimeout (line 43) | public function isIdleTimeout()
method getExceededTimeout (line 48) | public function getExceededTimeout()
FILE: thinkphp/library/think/process/pipes/Pipes.php
class Pipes (line 14) | abstract class Pipes
method getDescriptors (line 34) | abstract public function getDescriptors();
method getFiles (line 40) | abstract public function getFiles();
method readAndWrite (line 48) | abstract public function readAndWrite($blocking, $close = false);
method areOpen (line 54) | abstract public function areOpen();
method close (line 59) | public function close()
method hasSystemCallBeenInterrupted (line 71) | protected function hasSystemCallBeenInterrupted()
method unblock (line 78) | protected function unblock()
FILE: thinkphp/library/think/process/pipes/Unix.php
class Unix (line 16) | class Unix extends Pipes
method __construct (line 26) | public function __construct($ttyMode, $ptyMode, $input, $disableOutput)
method __destruct (line 39) | public function __destruct()
method getDescriptors (line 47) | public function getDescriptors()
method getFiles (line 85) | public function getFiles()
method readAndWrite (line 93) | public function readAndWrite($blocking, $close = false)
method areOpen (line 181) | public function areOpen()
method create (line 192) | public static function create(Process $process, $input)
FILE: thinkphp/library/think/process/pipes/Windows.php
class Windows (line 16) | class Windows extends Pipes
method __construct (line 31) | public function __construct($disableOutput, $input)
method __destruct (line 56) | public function __destruct()
method getDescriptors (line 65) | public function getDescriptors()
method getFiles (line 87) | public function getFiles()
method readAndWrite (line 95) | public function readAndWrite($blocking, $close = false)
method areOpen (line 129) | public function areOpen()
method close (line 137) | public function close()
method create (line 152) | public static function create(Process $process, $input)
method removeFiles (line 160) | private function removeFiles()
method write (line 175) | private function write($blocking, $close)
FILE: thinkphp/library/think/response/Json.php
class Json (line 16) | class Json extends Response
method output (line 32) | protected function output($data)
FILE: thinkphp/library/think/response/Jsonp.php
class Jsonp (line 17) | class Jsonp extends Response
method output (line 35) | protected function output($data)
FILE: thinkphp/library/think/response/Redirect.php
class Redirect (line 19) | class Redirect extends Response
method __construct (line 27) | public function __construct($data = '', $code = 302, array $header = [...
method output (line 39) | protected function output($data)
method with (line 52) | public function with($name, $value = null)
method getTargetUrl (line 68) | public function getTargetUrl()
method params (line 73) | public function params($params = [])
method remember (line 83) | public function remember()
method restore (line 93) | public function restore()
FILE: thinkphp/library/think/response/View.php
class View (line 18) | class View extends Response
method output (line 32) | protected function output($data)
method getVars (line 45) | public function getVars($name = null)
method assign (line 61) | public function assign($name, $value = '')
method replace (line 79) | public function replace($content, $replace = '')
FILE: thinkphp/library/think/response/Xml.php
class Xml (line 16) | class Xml extends Response
method output (line 40) | protected function output($data)
method xmlEncode (line 56) | protected function xmlEncode($data, $root, $item, $attr, $id, $encoding)
method dataToXml (line 81) | protected function dataToXml($data, $item, $id)
FILE: thinkphp/library/think/session/driver/Memcache.php
class Memcache (line 17) | class Memcache extends SessionHandler
method __construct (line 29) | public function __construct($config = [])
method open (line 40) | public function open($savePath, $sessName)
method close (line 67) | public function close()
method read (line 80) | public function read($sessID)
method write (line 92) | public function write($sessID, $sessData)
method destroy (line 103) | public function destroy($sessID)
method gc (line 114) | public function gc($sessMaxLifeTime)
FILE: thinkphp/library/think/session/driver/Memcached.php
class Memcached (line 17) | class Memcached extends SessionHandler
method __construct (line 30) | public function __construct($config = [])
method open (line 41) | public function open($savePath, $sessName)
method close (line 75) | public function close()
method read (line 88) | public function read($sessID)
method write (line 100) | public function write($sessID, $sessData)
method destroy (line 111) | public function destroy($sessID)
method gc (line 122) | public function gc($sessMaxLifeTime)
FILE: thinkphp/library/think/session/driver/Redis.php
class Redis (line 17) | class Redis extends SessionHandler
method __construct (line 32) | public function __construct($config = [])
method open (line 45) | public function open($savePath, $sessName)
method close (line 72) | public function close()
method read (line 86) | public function read($sessID)
method write (line 98) | public function write($sessID, $sessData)
method destroy (line 113) | public function destroy($sessID)
method gc (line 124) | public function gc($sessMaxLifeTime)
FILE: thinkphp/library/think/template/TagLib.php
class TagLib (line 23) | class TagLib
method __construct (line 75) | public function __construct($template)
method parseTag (line 87) | public function parseTag(&$content, $lib = '')
method getRegex (line 193) | public function getRegex($tags, $close)
method parseAttr (line 225) | public function parseAttr($str, $name, $alias = '')
method parseCondition (line 287) | public function parseCondition($condition)
method autoBuildVar (line 304) | public function autoBuildVar(&$name)
method getTags (line 330) | public function getTags()
FILE: thinkphp/library/think/template/driver/File.php
class File (line 16) | class File
method write (line 24) | public function write($cacheFile, $content)
method read (line 43) | public function read($cacheFile, $vars = [])
method check (line 59) | public function check($cacheFile, $cacheTime)
FILE: thinkphp/library/think/template/taglib/Cx.php
class Cx (line 23) | class Cx extends Taglib
method tagPhp (line 63) | public function tagPhp($tag, $content)
method tagVolist (line 81) | public function tagVolist($tag, $content)
method tagForeach (line 133) | public function tagForeach($tag, $content)
method tagIf (line 214) | public function tagIf($tag, $content)
method tagElseif (line 230) | public function tagElseif($tag, $content)
method tagElse (line 245) | public function tagElse($tag)
method tagSwitch (line 264) | public function tagSwitch($tag, $content)
method tagCase (line 279) | public function tagCase($tag, $content)
method tagDefault (line 311) | public function tagDefault($tag)
method tagCompare (line 326) | public function tagCompare($tag, $content)
method tagRange (line 361) | public function tagRange($tag, $content)
method tagPresent (line 396) | public function tagPresent($tag, $content)
method tagNotpresent (line 413) | public function tagNotpresent($tag, $content)
method tagEmpty (line 430) | public function tagEmpty($tag, $content)
method tagNotempty (line 447) | public function tagNotempty($tag, $content)
method tagDefined (line 462) | public function tagDefined($tag, $content)
method tagNotdefined (line 476) | public function tagNotdefined($tag, $content)
method tagLoad (line 491) | public function tagLoad($tag, $content)
method tagAssign (line 534) | public function tagAssign($tag, $content)
method tagDefine (line 556) | public function tagDefine($tag, $content)
method tagFor (line 580) | public function tagFor($tag, $content)
method tagUrl (line 631) | public function tagUrl($tag, $content)
method tagFunction (line 657) | public function tagFunction($tag, $content)
FILE: thinkphp/library/think/view/driver/Php.php
class Php (line 20) | class Php
method __construct (line 34) | public function __construct($config = [])
method exists (line 45) | public function exists($template)
method fetch (line 61) | public function fetch($template, $data = [])
method display (line 90) | public function display($content, $data = [])
method parseTemplate (line 108) | private function parseTemplate($template)
method config (line 153) | public function config($name, $value = null)
FILE: thinkphp/library/think/view/driver/Think.php
class Think (line 21) | class Think
method __construct (line 39) | public function __construct($config = [])
method exists (line 55) | public function exists($template)
method fetch (line 72) | public function fetch($template, $data = [], $config = [])
method display (line 95) | public function display($template, $data = [], $config = [])
method parseTemplate (line 106) | private function parseTemplate($template)
method config (line 148) | public function config($name, $value = null)
method __call (line 161) | public function __call($method, $params)
FILE: thinkphp/library/traits/controller/Jump.php
type Jump (line 25) | trait Jump
method success (line 37) | protected function success($msg = '', $url = null, $data = '', $wait =...
method error (line 76) | protected function error($msg = '', $url = null, $data = '', $wait = 3...
method result (line 115) | protected function result($data, $code = 0, $msg = '', $type = '', arr...
method redirect (line 137) | protected function redirect($url, $params = [], $code = 302, $with = [])
method getResponseType (line 153) | protected function getResponseType()
FILE: thinkphp/library/traits/model/SoftDelete.php
type SoftDelete (line 7) | trait SoftDelete
method trashed (line 15) | public function trashed()
method withTrashed (line 29) | public static function withTrashed()
method onlyTrashed (line 41) | public static function onlyTrashed()
method delete (line 55) | public function delete($force = false)
method destroy (line 80) | public static function destroy($data, $force = false)
method restore (line 111) | public function restore($where = [])
method base (line 131) | protected function base($query)
method getDeleteTimeField (line 143) | protected function getDeleteTimeField($read = false)
FILE: thinkphp/library/traits/think/Instance.php
type Instance (line 16) | trait Instance
method instance (line 24) | public static function instance($options = [])
method __callStatic (line 33) | public static function __callStatic($method, $params)
Condensed preview — 343 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,624K chars).
[
{
"path": ".gitignore",
"chars": 26,
"preview": ".idea\ncomposer.lock\n*.log\n"
},
{
"path": ".travis.yml",
"chars": 2038,
"preview": "sudo: false\n\nlanguage: php\n\nbranches:\n only:\n - stable\n\ncache:\n directories:\n - $HOME/.composer/cache\n\nbefore_in"
},
{
"path": "LICENSE.txt",
"chars": 1270,
"preview": "\nThinkPHP遵循Apache2开源协议发布,并提供免费使用。\n版权所有Copyright © 2006-2016 by ThinkPHP (http://thinkphp.cn)\nAll rights reserved。\nThinkP"
},
{
"path": "README.md",
"chars": 16724,
"preview": "# 简介\n本项目是采用PHP语言,THINKPHP5.0框架开发的全栈应用系统。在开发这个项目时,微信还没有OFO微信小程序,又不想下载APP去使用,只能在支付宝上面使用OFO,偶然间发现某人写了一个关于OFO的微信小程序,链接如下:给of"
},
{
"path": "application/.htaccess",
"chars": 13,
"preview": "deny from all"
},
{
"path": "application/admin/config.php",
"chars": 51,
"preview": "<?php\nreturn [\n 'default_return_type'=>'html'\n];"
},
{
"path": "application/admin/controller/Base.php",
"chars": 1254,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/12/14\n * Time: 10:29\n */\n\nnamespace app\\admin\\controller;\n"
},
{
"path": "application/admin/controller/Bike.php",
"chars": 1187,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/10/12\n * Time: 17:31\n */\n\nnamespace app\\admin\\controller;\n"
},
{
"path": "application/admin/controller/Charge.php",
"chars": 329,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/10/13\n * Time: 10:08\n */\n\nnamespace app\\admin\\controller;\n"
},
{
"path": "application/admin/controller/Index.php",
"chars": 447,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/10/12\n * Time: 14:19\n */\n\nnamespace app\\admin\\controller;\n"
},
{
"path": "application/admin/controller/Record.php",
"chars": 381,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/10/13\n * Time: 10:58\n */\n\nnamespace app\\admin\\controller;\n"
},
{
"path": "application/admin/controller/Trouble.php",
"chars": 1533,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/10/13\n * Time: 11:58\n */\n\nnamespace app\\admin\\controller;\n"
},
{
"path": "application/admin/controller/User.php",
"chars": 316,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/10/12\n * Time: 15:26\n */\n\nnamespace app\\admin\\controller;\n"
},
{
"path": "application/admin/model/Bike.php",
"chars": 580,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/10/12\n * Time: 17:31\n */\n\nnamespace app\\admin\\model;\n\n\nuse"
},
{
"path": "application/admin/model/BikeTrouble.php",
"chars": 171,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/10/13\n * Time: 13:30\n */\n\nnamespace app\\admin\\model;\n\n\nuse"
},
{
"path": "application/admin/model/Charge.php",
"chars": 873,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/10/13\n * Time: 10:18\n */\n\nnamespace app\\admin\\model;\n\n\nuse"
},
{
"path": "application/admin/model/Record.php",
"chars": 1469,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/10/13\n * Time: 10:58\n */\n\nnamespace app\\admin\\model;\n\n\n\n\nu"
},
{
"path": "application/admin/model/TroubleCate.php",
"chars": 376,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/10/13\n * Time: 11:59\n */\n\nnamespace app\\admin\\model;\n\n\nuse"
},
{
"path": "application/admin/model/TroubleRecord.php",
"chars": 1198,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/10/13\n * Time: 13:31\n */\n\nnamespace app\\admin\\model;\n\n\nuse"
},
{
"path": "application/admin/model/User.php",
"chars": 345,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/10/12\n * Time: 16:02\n */\n\nnamespace app\\admin\\model;\n\n\nuse"
},
{
"path": "application/admin/view/bike/add.html",
"chars": 1271,
"preview": "{include file=\"public/header\" /}\n<body>\n<article class=\"page-container\">\n <form class=\"form form-horizontal\" id=\"yfyc"
},
{
"path": "application/admin/view/bike/index.html",
"chars": 2494,
"preview": "<!--包含头部文件-->\n{include file=\"public/header\" /}\n<body>\n<nav class=\"breadcrumb\"><i class=\"Hui-iconfont\"></i> 首页 <s"
},
{
"path": "application/admin/view/charge/index.html",
"chars": 2082,
"preview": "<!--包含头部文件-->\n{include file=\"public/header\" /}\n<body>\n<nav class=\"breadcrumb\"><i class=\"Hui-iconfont\"></i> 首页 <s"
},
{
"path": "application/admin/view/index/index.html",
"chars": 3331,
"preview": "<!--包含头部文件-->\n{include file=\"public/header\" /}\n<body>\n<header class=\"navbar-wrapper\">\n <div class=\"navbar navbar-fixe"
},
{
"path": "application/admin/view/public/footer.html",
"chars": 469,
"preview": "<script type=\"text/javascript\" src=\"/static/lib/jquery/1.9.1/jquery.min.js\"></script>\n<script type=\"text/javascript\" src"
},
{
"path": "application/admin/view/public/header.html",
"chars": 1632,
"preview": "<!DOCTYPE HTML>\n <html>\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"renderer\" content=\"webkit|ie-co"
},
{
"path": "application/admin/view/public/menu.html",
"chars": 2236,
"preview": "<aside class=\"Hui-aside\">\n <div class=\"menu_dropdown bk_2\">\n <dl id=\"menu-article\">\n <dt><i class=\""
},
{
"path": "application/admin/view/record/index.html",
"chars": 2474,
"preview": "<!--包含头部文件-->\n{include file=\"public/header\" /}\n<body>\n<nav class=\"breadcrumb\"><i class=\"Hui-iconfont\"></i> 首页 <s"
},
{
"path": "application/admin/view/trouble/add.html",
"chars": 939,
"preview": "{include file=\"public/header\" /}\n<body>\n<article class=\"page-container\">\n <form class=\"form form-horizontal\" id=\"yfyc"
},
{
"path": "application/admin/view/trouble/index.html",
"chars": 2481,
"preview": "<!--包含头部文件-->\n{include file=\"public/header\" /}\n<body>\n<nav class=\"breadcrumb\"><i class=\"Hui-iconfont\"></i> 首页 <s"
},
{
"path": "application/admin/view/trouble/troublecate.html",
"chars": 2126,
"preview": "<!--包含头部文件-->\n{include file=\"public/header\" /}\n<body>\n<nav class=\"breadcrumb\"><i class=\"Hui-iconfont\"></i> 首页 <s"
},
{
"path": "application/admin/view/user/index.html",
"chars": 2200,
"preview": "<!--包含头部文件-->\n{include file=\"public/header\" /}\n<body>\n<nav class=\"breadcrumb\"><i class=\"Hui-iconfont\"></i> 首页 <s"
},
{
"path": "application/api/controller/v1/Base.php",
"chars": 177,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/9/1\n * Time: 9:57\n */\n\nnamespace app\\api\\controller\\v1;\n\n\n"
},
{
"path": "application/api/controller/v1/Bike.php",
"chars": 2190,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/9/1\n * Time: 9:57\n */\n\nnamespace app\\api\\controller\\v1;\n\nu"
},
{
"path": "application/api/controller/v1/Token.php",
"chars": 955,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/9/1\n * Time: 15:19\n */\n\nnamespace app\\api\\controller\\v1;\n\n"
},
{
"path": "application/api/controller/v1/TroubleCate.php",
"chars": 410,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/9/8\n * Time: 13:15\n */\n\nnamespace app\\api\\controller\\v1;\n\n"
},
{
"path": "application/api/controller/v1/TroubleRecord.php",
"chars": 2288,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/9/8\n * Time: 11:21\n */\n\nnamespace app\\api\\controller\\v1;\n\n"
},
{
"path": "application/api/controller/v1/User.php",
"chars": 3681,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/9/1\n * Time: 16:59\n */\n\nnamespace app\\api\\controller\\v1;\n\n"
},
{
"path": "application/api/model/Base.php",
"chars": 160,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/9/1\n * Time: 10:00\n */\n\nnamespace app\\api\\model;\n\n\nuse thi"
},
{
"path": "application/api/model/Bike.php",
"chars": 684,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/9/1\n * Time: 9:59\n */\nnamespace app\\api\\model;\nuse think\\M"
},
{
"path": "application/api/model/BikeTrouble.php",
"chars": 148,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/9/8\n * Time: 15:27\n */\n\nnamespace app\\api\\model;\n\n\nclass B"
},
{
"path": "application/api/model/Charge.php",
"chars": 143,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/9/4\n * Time: 14:04\n */\n\nnamespace app\\api\\model;\n\n\nclass C"
},
{
"path": "application/api/model/Record.php",
"chars": 143,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/9/4\n * Time: 20:52\n */\n\nnamespace app\\api\\model;\n\n\nclass R"
},
{
"path": "application/api/model/TroubleCate.php",
"chars": 203,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/9/8\n * Time: 11:52\n */\n\nnamespace app\\api\\model;\n\n\nclass T"
},
{
"path": "application/api/model/TroubleRecord.php",
"chars": 150,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/9/8\n * Time: 11:23\n */\n\nnamespace app\\api\\model;\n\n\nclass T"
},
{
"path": "application/api/model/User.php",
"chars": 688,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/9/1\n * Time: 15:39\n */\n\nnamespace app\\api\\model;\n\n\nclass U"
},
{
"path": "application/api/service/Token.php",
"chars": 1296,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/9/1\n * Time: 15:22\n */\n\nnamespace app\\api\\service;\n\n\nuse a"
},
{
"path": "application/api/service/UserToken.php",
"chars": 2471,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/9/1\n * Time: 15:21\n */\n\nnamespace app\\api\\service;\n\n\nuse a"
},
{
"path": "application/api/validate/AddressNews.php",
"chars": 418,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: 12810\n * Date: 2017/7/1\n * Time: 14:29\n */\n\nnamespace app\\api\\validate;\n\n\ncla"
},
{
"path": "application/api/validate/AppTokenGet.php",
"chars": 238,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/8/6\n * Time: 19:21\n */\n\nnamespace app\\api\\validate;\n\n\nclas"
},
{
"path": "application/api/validate/BaseValidate.php",
"chars": 2023,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: Administrator\n * Date: 2017/5/29\n * Time: 9:03\n */\n\nnamespace app\\api\\validat"
},
{
"path": "application/api/validate/Count.php",
"chars": 230,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: 12810\n * Date: 2017/6/23\n * Time: 20:29\n */\n\nnamespace app\\api\\validate;\n\n\ncl"
},
{
"path": "application/api/validate/IDCollection.php",
"chars": 600,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: 12810\n * Date: 2017/6/21\n * Time: 22:57\n */\n\nnamespace app\\api\\validate;\n\n\ncl"
},
{
"path": "application/api/validate/IsMustBePostiveInt.php",
"chars": 329,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: Administrator\n * Date: 2017/5/28\n * Time: 22:29\n */\n\nnamespace app\\api\\valida"
},
{
"path": "application/api/validate/OrderPlace.php",
"chars": 1095,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: 12810\n * Date: 2017/7/2\n * Time: 9:56\n */\n\nnamespace app\\api\\validate;\n\n\nuse "
},
{
"path": "application/api/validate/PagingParameter.php",
"chars": 360,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: 12810\n * Date: 2017/7/15\n * Time: 18:35\n */\n\nnamespace app\\api\\validate;\n\n\ncl"
},
{
"path": "application/api/validate/TokenGet.php",
"chars": 299,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: 12810\n * Date: 2017/6/25\n * Time: 14:17\n */\n\nnamespace app\\api\\validate;\n\n\ncl"
},
{
"path": "application/command.php",
"chars": 606,
"preview": "<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE CAN DO IT JUST THINK"
},
{
"path": "application/common.php",
"chars": 2810,
"preview": "<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE CAN DO IT JUST THINK"
},
{
"path": "application/config.php",
"chars": 7539,
"preview": "<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE CAN DO IT JUST THINK"
},
{
"path": "application/database.php",
"chars": 1583,
"preview": "<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE CAN DO IT JUST THINK"
},
{
"path": "application/extra/map.php",
"chars": 227,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/10/12\n * Time: 18:01\n */\nreturn [\n 'ak'=>'ORFYUgrDDYS5r"
},
{
"path": "application/extra/pagination.php",
"chars": 260,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/10/12\n * Time: 16:11\n */\nreturn [\n 'page'=>1,\n 'list"
},
{
"path": "application/extra/queue.php",
"chars": 635,
"preview": "<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE CAN DO IT JUST THINK"
},
{
"path": "application/extra/redis.php",
"chars": 136,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/9/1\n * Time: 16:04\n */\nreturn [\n 'ip'=>'127.0.0.1',\n "
},
{
"path": "application/extra/secure.php",
"chars": 119,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/9/1\n * Time: 15:59\n */\nreturn [\n 'profix'=>'yfyjsz'\n];"
},
{
"path": "application/extra/setting.php",
"chars": 126,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: 12810\n * Date: 2017/6/20\n * Time: 21:08\n */\nreturn [\n 'token_expire_in'=>7"
},
{
"path": "application/extra/tx.php",
"chars": 227,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/10/16\n * Time: 11:05\n */\n/**\n *\n * 腾讯地图的相关配置\n */\nreturn [\n"
},
{
"path": "application/extra/wx.php",
"chars": 315,
"preview": "<?php\n\n/**\n * Created by PhpStorm.\n * User: 12810\n * Date: 2017/6/25\n * Time: 15:46\n */\nreturn [\n 'app_id'=>'wxa13526"
},
{
"path": "application/index/controller/Index.php",
"chars": 992,
"preview": "<?php\nnamespace app\\index\\controller;\n\nclass Index\n{\n public function index()\n {\n return '<style type=\"text"
},
{
"path": "application/lib/exception/BaseException.php",
"chars": 824,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: Administrator\n * Date: 2017/5/29\n * Time: 15:46\n */\n\nnamespace app\\lib\\except"
},
{
"path": "application/lib/exception/BikeException.php",
"chars": 246,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/9/1\n * Time: 10:21\n */\n\nnamespace app\\lib\\exception;\n\n\ncla"
},
{
"path": "application/lib/exception/ExceptionHandler.php",
"chars": 1771,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: Administrator\n * Date: 2017/5/29\n * Time: 15:44\n */\n\nnamespace app\\lib\\except"
},
{
"path": "application/lib/exception/ParameterException.php",
"chars": 259,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: Administrator\n * Date: 2017/5/30\n * Time: 0:07\n */\n\nnamespace app\\lib\\excepti"
},
{
"path": "application/lib/exception/SuccessMessage.php",
"chars": 216,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: 12810\n * Date: 2017/7/1\n * Time: 15:17\n */\n\nnamespace app\\lib\\exception;\n\n\ncl"
},
{
"path": "application/lib/exception/TokenException.php",
"chars": 259,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: 12810\n * Date: 2017/6/29\n * Time: 11:34\n */\n\nnamespace app\\lib\\exception;\n\n\nc"
},
{
"path": "application/lib/exception/UserException.php",
"chars": 245,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: 12810\n * Date: 2017/7/1\n * Time: 15:12\n */\n\nnamespace app\\lib\\exception;\n\n\ncl"
},
{
"path": "application/lib/exception/WxChatException.php",
"chars": 249,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: 12810\n * Date: 2017/6/26\n * Time: 23:49\n */\n\nnamespace app\\lib\\exception;\n\n\nc"
},
{
"path": "application/route.php",
"chars": 1446,
"preview": "<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE CAN DO IT JUST THINK"
},
{
"path": "application/tags.php",
"chars": 893,
"preview": "<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE CAN DO IT JUST THINK"
},
{
"path": "build.php",
"chars": 1019,
"preview": "<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE CAN DO IT JUST THINK"
},
{
"path": "composer.json",
"chars": 570,
"preview": "{\n \"name\": \"topthink/think\",\n \"description\": \"the new thinkphp framework\",\n \"type\": \"project\",\n \"keywords\": "
},
{
"path": "extend/.gitignore",
"chars": 11,
"preview": "!.gitignore"
},
{
"path": "extend/Map.php",
"chars": 1097,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/10/12\n * Time: 17:59\n */\n\n/*百度地图获取地址封装*/\n\nclass Map\n{\n "
},
{
"path": "extend/My/RedisPackage.php",
"chars": 2379,
"preview": "<?php\nnamespace My;\n\nclass RedisPackage\n{\n protected static $handler = null;\n protected $options = [\n 'host' =>"
},
{
"path": "extend/TxMap.php",
"chars": 922,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/10/16\n * Time: 11:02\n */\n\n/**\n * 腾讯地图根据经纬度获取地址或者根据地址获取经纬度\n"
},
{
"path": "extend/Weixin.php",
"chars": 2127,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: yefy\n * Date: 2017/10/13\n * Time: 17:49\n */\n\nclass Weixin\n{\n\n\n //构造函数,获取Ac"
},
{
"path": "ofo 无微信支付/README.md",
"chars": 985,
"preview": "## 运行截图\n<img src=\"http://oht7mjuah.bkt.clouddn.com/%E9%A6%96%E9%A1%B5.png\" width=\"270\" height=\"480\"/>\n<img src=\"http://o"
},
{
"path": "ofo 无微信支付/app.js",
"chars": 163,
"preview": "//app.js\nconst AV = require('/utils/av-weapp-min.js'); \nAV.init({\n appId: 'pTf5kDMERjsFopcOt9mO4C3e-gzGzoHsz',\n appKey"
},
{
"path": "ofo 无微信支付/app.json",
"chars": 839,
"preview": "{\n \"pages\": [\n \"pages/index/index\",\n \"pages/warn/index\",\n \"pages/scanresult/index\",\n \"pages/billing/index\","
},
{
"path": "ofo 无微信支付/app.wxss",
"chars": 402,
"preview": "/**app.wxss**/\n.container{\n\tbackground-color: #f2f2f2;\n\theight: 100vh;\n}\n.title{\n\tbackground-color: #f2f2f2;\n\tpadding: 3"
},
{
"path": "ofo 无微信支付/pages/billing/index.js",
"chars": 2264,
"preview": "// pages/billing/index.js\nPage({\n data:{\n hours: 0,\n minuters: 0,\n seconds: 0,\n billing: \"正在计费\"\n },\n// 页面加"
},
{
"path": "ofo 无微信支付/pages/billing/index.json",
"chars": 2,
"preview": "{}"
},
{
"path": "ofo 无微信支付/pages/billing/index.wxml",
"chars": 569,
"preview": "<!--pages/billing/index.wxml-->\n<view class=\"container\">\n <view class=\"number\">\n <text>当前单车编号: {{number}}</tex"
},
{
"path": "ofo 无微信支付/pages/billing/index.wxss",
"chars": 383,
"preview": ".container{\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tjustify-content: space-between"
},
{
"path": "ofo 无微信支付/pages/charge/index.js",
"chars": 3051,
"preview": "// pages/charge/index.js\nPage({\n data:{\n inputValue: 0\n },\n// 页面加载\n onLoad:function(options){\n console.log(opti"
},
{
"path": "ofo 无微信支付/pages/charge/index.json",
"chars": 2,
"preview": "{}"
},
{
"path": "ofo 无微信支付/pages/charge/index.wxml",
"chars": 244,
"preview": "<!--pages/charge/index.wxml-->\n<view class=\"container\">\n <view class=\"title\">请输入充值金额</view>\n <view class=\"input-bo"
},
{
"path": "ofo 无微信支付/pages/charge/index.wxss",
"chars": 211,
"preview": "/* pages/charge/index.wxss */\n.input-box{\n\tbackground-color: #fff;\n\tmargin: 0 auto;\n\tpadding: 20rpx 0;\n\tborder-radius: 1"
},
{
"path": "ofo 无微信支付/pages/index/index.js",
"chars": 7824,
"preview": "//index.js\n//获取应用实例\nvar app = getApp()\nPage({\n data: {\n scale: 18,\n latitude: 0,\n longitude: 0,\n time:false"
},
{
"path": "ofo 无微信支付/pages/index/index.json",
"chars": 2,
"preview": "{}"
},
{
"path": "ofo 无微信支付/pages/index/index.wxml",
"chars": 323,
"preview": "<!--index.wxml-->\n<view class=\"container\">\n <map id=\"ofoMap\" latitude=\"{{latitude}}\" longitude=\"{{longitude}}\" scale=\"{"
},
{
"path": "ofo 无微信支付/pages/index/index.wxss",
"chars": 208,
"preview": "/**index.wxss**/\n.container{\n position: relative;\n width: 100%;\n height: 100vh;\n}\n#ofoMap{\n position: absolute;\n le"
},
{
"path": "ofo 无微信支付/pages/input/index.js",
"chars": 1504,
"preview": "// index.js\nPage({\n\n /**\n * 页面的初始数据\n */\n data: {\n\n },\n\n /**\n * 生命周期函数--监听页面加载\n */\n onLoad: function (option"
},
{
"path": "ofo 无微信支付/pages/input/index.json",
"chars": 2,
"preview": "{}"
},
{
"path": "ofo 无微信支付/pages/input/index.wxml",
"chars": 308,
"preview": "<view>\n <view class=\"input-top\">计费说明:1元/小时</view>\n <view class=\"input-tips\">温馨提示:若输错车牌号,将无法打开车锁</view>\n <"
},
{
"path": "ofo 无微信支付/pages/input/index.wxss",
"chars": 546,
"preview": "/* index.wxss */\n.input-top{\n text-align: center;\n margin: 40rpx auto;\n border-radius: 20rpx;\n background-color: #9c"
},
{
"path": "ofo 无微信支付/pages/logs/logs.js",
"chars": 266,
"preview": "//logs.js\nvar util = require('../../utils/util.js')\nPage({\n data: {\n logs: []\n },\n onLoad: function () {\n this."
},
{
"path": "ofo 无微信支付/pages/logs/logs.json",
"chars": 42,
"preview": "{\n \"navigationBarTitleText\": \"查看启动日志\"\n}"
},
{
"path": "ofo 无微信支付/pages/logs/logs.wxml",
"chars": 188,
"preview": "<!--logs.wxml-->\n<view class=\"container log-list\">\n <block wx:for=\"{{logs}}\" wx:for-item=\"log\" wx:key=\"*this\">\n <tex"
},
{
"path": "ofo 无微信支付/pages/logs/logs.wxss",
"chars": 106,
"preview": ".log-list {\n display: flex;\n flex-direction: column;\n padding: 40rpx;\n}\n.log-item {\n margin: 10rpx;\n}\n"
},
{
"path": "ofo 无微信支付/pages/my/index.js",
"chars": 5098,
"preview": "// pages/my/index.js\nPage({\n data:{\n // 用户信息\n from:'personal',\n userInfo: {\n avatarUrl: \"\",\n nickNam"
},
{
"path": "ofo 无微信支付/pages/my/index.json",
"chars": 2,
"preview": "{}"
},
{
"path": "ofo 无微信支付/pages/my/index.wxml",
"chars": 553,
"preview": "<!--pages/my/index.wxml-->\n<view class=\"container\">\n <view class=\"user-info\">\n <block wx:if=\"{{userInfo.avatarUrl "
},
{
"path": "ofo 无微信支付/pages/my/index.wxss",
"chars": 466,
"preview": "/* pages/my/index.wxss */\n.user-info{\n\tbackground-color: #fff;\n\tpadding-top: 60rpx;\n}\n.user-info image{\n\tdisplay: block;"
},
{
"path": "ofo 无微信支付/pages/pay/index.js",
"chars": 2538,
"preview": "// index.js\nPage({\n\n /**\n * 页面的初始数据\n */\n data: {\n \n },\n\n /**\n * 生命周期函数--监听页面加载\n */\n onLoad: function (opti"
},
{
"path": "ofo 无微信支付/pages/pay/index.json",
"chars": 2,
"preview": "{}"
},
{
"path": "ofo 无微信支付/pages/pay/index.wxml",
"chars": 335,
"preview": "<view class=\"\">\n <view class=\"top\">关锁后请打乱密码,注意检查车篮,带好随身物品</view>\n <view class=\"distance\">本次行程需要支付(元)</view>\n <view cl"
},
{
"path": "ofo 无微信支付/pages/pay/index.wxss",
"chars": 819,
"preview": ".top {\n font-size: 30rpx;\n height: 70rpx;\n width: 100%;\n color: #d43e5d;\n text-align: center;\n line-height: 70rpx;"
},
{
"path": "ofo 无微信支付/pages/scanresult/index.js",
"chars": 634,
"preview": "// pages/scanresult/index.js\nPage({\n data:{\n time: 3\n },\n// 页面加载\n onLoad:function(options){\n // 获取解锁密码\n this"
},
{
"path": "ofo 无微信支付/pages/scanresult/index.json",
"chars": 2,
"preview": "{}"
},
{
"path": "ofo 无微信支付/pages/scanresult/index.wxml",
"chars": 444,
"preview": "<!--pages/scanresult/index.wxml-->\n<view class=\"container\">\n <view class=\"password-title\">\n <text>开锁密码</text>\n"
},
{
"path": "ofo 无微信支付/pages/scanresult/index.wxss",
"chars": 450,
"preview": ".container{\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tjustify-content: space-between"
},
{
"path": "ofo 无微信支付/pages/unlock/index.js",
"chars": 1640,
"preview": "// index.js\nPage({\n\n /**\n * 页面的初始数据\n */\n data: {\n type:'scan'\n },\n\n /**\n * 生命周期函数--监听页面加载\n */\n onLoad: f"
},
{
"path": "ofo 无微信支付/pages/unlock/index.json",
"chars": 2,
"preview": "{}"
},
{
"path": "ofo 无微信支付/pages/unlock/index.wxml",
"chars": 278,
"preview": "<view class=\"\">\n <view class=\"text-box\">\n \n <view class=\"top\">您是有押金用户,可以正常用车</view>\n <view class=\"middle\">"
},
{
"path": "ofo 无微信支付/pages/unlock/index.wxss",
"chars": 549,
"preview": "/* index.wxss */\n\n.top {\n font-size: 28rpx;\n text-align: center;\n line-height: 30rpx;\n margin: 30px;\n color: #169e9"
},
{
"path": "ofo 无微信支付/pages/wallet/index.js",
"chars": 2627,
"preview": "// pages/wallet/index.js\nPage({\n data:{\n from: 'wallet',\n overage: 0,\n ticket: 0\n },\n// 页面加载\n onLoad:functio"
},
{
"path": "ofo 无微信支付/pages/wallet/index.json",
"chars": 2,
"preview": "{}"
},
{
"path": "ofo 无微信支付/pages/wallet/index.wxml",
"chars": 916,
"preview": "<!--pages/wallet/index.wxml-->\n<view class=\"container\">\n <view class=\"overage\">\n <view>\n <text clas"
},
{
"path": "ofo 无微信支付/pages/wallet/index.wxss",
"chars": 543,
"preview": "/* pages/wallet/index.wxss */\n.overage{\n\tbackground-color: #fff;\n\tpadding: 40rpx 0;\n\ttext-align: center;\n}\n.overage-head"
},
{
"path": "ofo 无微信支付/pages/warn/index.js",
"chars": 3970,
"preview": "// pages/wallet/index.js\nconst AV = require('../../utils/av-weapp-min.js'); \nPage({\n data:{\n // 故障车周围环境图路径数组\n pic"
},
{
"path": "ofo 无微信支付/pages/warn/index.json",
"chars": 2,
"preview": "{}"
},
{
"path": "ofo 无微信支付/pages/warn/index.wxml",
"chars": 1380,
"preview": "<!--pages/warn/index.wxml-->\n<view class=\"container\">\n <view class=\"choose\">\n <view class=\"title\">请选择故障类型</vie"
},
{
"path": "ofo 无微信支付/pages/warn/index.wxss",
"chars": 1420,
"preview": "/* pages/wallet/index.wxss */\n.choose{\n\tbackground-color: #fff;\n}\n.choose-grids{\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tjust"
},
{
"path": "ofo 无微信支付/project.config.json",
"chars": 453,
"preview": "{\n\t\"description\": \"项目配置文件。\",\n\t\"setting\": {\n\t\t\"urlCheck\": true,\n\t\t\"es6\": true,\n\t\t\"postcss\": true,\n\t\t\"minified\": true,\n\t\t\""
},
{
"path": "ofo 无微信支付/utils/av-weapp-min.js",
"chars": 147552,
"preview": "!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.am"
},
{
"path": "ofo 无微信支付/utils/base.js",
"chars": 621,
"preview": "import {Config} from \"config.js\";\nclass Base {\n constructor(){\n this.baseRequestUrl = Config.baseUrl;\n }\n\n//封装好的请求方"
},
{
"path": "ofo 无微信支付/utils/config.js",
"chars": 102,
"preview": "class Config {\n constructor(){\n\n }\n}\nConfig.baseUrl = \"http://www.ofo.com/qpi/v1/\";\n\nexport{Config};"
},
{
"path": "ofo 无微信支付/utils/util.js",
"chars": 459,
"preview": "function formatTime(date) {\n var year = date.getFullYear()\n var month = date.getMonth() + 1\n var day = date.getDate()"
},
{
"path": "phpunit.xml",
"chars": 648,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<phpunit backupGlobals=\"false\"\n backupStaticAttributes=\"false\"\n c"
},
{
"path": "public/.htaccess",
"chars": 216,
"preview": "<IfModule mod_rewrite.c>\n Options +FollowSymlinks -Multiviews\n RewriteEngine On\n\n RewriteCond %{REQUEST_FILENAME} !-d"
},
{
"path": "public/index.php",
"chars": 726,
"preview": "<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE CAN DO IT JUST THINK"
},
{
"path": "public/robots.txt",
"chars": 24,
"preview": "User-agent: *\nDisallow:\n"
},
{
"path": "public/router.php",
"chars": 736,
"preview": "<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE CAN DO IT JUST THINK"
},
{
"path": "public/static/.gitignore",
"chars": 11,
"preview": "!.gitignore"
},
{
"path": "public/static/admin/common.css",
"chars": 123,
"preview": ".tp5 >ul>li{\n display: inline-block;\n width:20px;\n color: #337ab7;\n text-align: center;\n margin-left: 5px"
},
{
"path": "public/static/admin/js/common.js",
"chars": 1793,
"preview": "/**\n * 添加\n * @param title\n * @param url\n */\n function edit_add(title,url) {\n var index = layer.open({\n ty"
},
{
"path": "public/static/admin/js/dialog.js",
"chars": 989,
"preview": "\n var dialogs = {\n // 错误弹出层\n error: function(message) {\n layer.open({\n conten"
},
{
"path": "public/static/h-ui/css/H-ui.css",
"chars": 198105,
"preview": "@charset \"utf-8\";\n/* -----------H-ui前端框架-------------\n* H-ui.css v3.1.5\n* http://www.h-ui.net/\n* Created & Modified by g"
},
{
"path": "public/static/h-ui/css/H-ui.ie.css",
"chars": 2831,
"preview": "/* -----------H-ui前端框架-------------\n* H-ui.ie.css v1.0\n* http://www.h-ui.net/\n* Created & Modified by guojunhui\n* Date m"
},
{
"path": "public/static/h-ui/css/H-ui.reset.css",
"chars": 3132,
"preview": "@charset \"utf-8\";\n/* -----------H-ui前端框架-------------\n* H-ui.reset.css v1.2\t重定义浏览器默认样式\n* http://www.h-ui.net/\n* Created"
},
{
"path": "public/static/h-ui/js/H-ui.js",
"chars": 277674,
"preview": "/*-----------H-ui前端框架-------------\n* H-ui.js v3.1.3\n* http://www.h-ui.net/\n* Created & Modified by guojunhui\n* Date modi"
},
{
"path": "public/static/h-ui.admin/css/H-ui.admin.css",
"chars": 6923,
"preview": "@charset \"utf-8\";\n/* -----------H-ui前端框架-------------\n* H-ui.admin.css v2.5\n* http://www.h-ui.net/\n* Created & Modified "
},
{
"path": "public/static/h-ui.admin/css/H-ui.login.css",
"chars": 1871,
"preview": "@charset \"utf-8\";\n/* -----------H-ui前端框架-------------\n* H-ui.login.css v2.2.1\t后台登录页样式\n* http://www.h-ui.net/\n* Created &"
},
{
"path": "public/static/h-ui.admin/css/style.css",
"chars": 32,
"preview": "@charset \"utf-8\";\n/* 你自己的样式 */\n\n"
},
{
"path": "public/static/h-ui.admin/js/H-ui.admin.js",
"chars": 8110,
"preview": "/* -----------H-ui前端框架-------------\n* H-ui.admin.js v3.1\n* http://www.h-ui.net/\n* Created & Modified by guojunhui\n* Date"
},
{
"path": "public/static/h-ui.admin/js/de_DE.txt",
"chars": 394,
"preview": "{\n\t\"processing\": \"处理中...\",\n\t\"lengthMenu\": \"每页显示 _MENU_ 条\",\n\t\"zeroRecords\": \"没有找到匹配的记录\",\n\t\"sProcessing\": \"<img src=’./"
},
{
"path": "public/static/h-ui.admin/skin/blue/skin.css",
"chars": 1174,
"preview": "@charset \"utf-8\";\n/* 蓝色 */\n/*全站默认字体颜色*/\na{color:#333}a:hover,a:focus,.maincolor,.maincolor a{color:#06c}\n.navbar{ backgr"
},
{
"path": "public/static/h-ui.admin/skin/default/skin.css",
"chars": 1085,
"preview": "@charset \"utf-8\";\n/* 默认 黑色 */\t\n/*全站默认字体颜色*/\na{color:#333}a:hover,a:focus,.maincolor,.maincolor a{color:#06c}\n.navbar{ ba"
},
{
"path": "public/static/h-ui.admin/skin/green/skin.css",
"chars": 1174,
"preview": "@charset \"utf-8\";\n/* 绿色 */\n/*全站默认字体颜色*/\na{color:#333}a:hover,a:focus,.maincolor,.maincolor a{color:#06c}\n.navbar{ backgr"
},
{
"path": "public/static/h-ui.admin/skin/orange/skin.css",
"chars": 1174,
"preview": "@charset \"utf-8\";\n/* 橙色 */\n/*全站默认字体颜色*/\na{color:#333}a:hover,a:focus,.maincolor,.maincolor a{color:#06c}\n.navbar{ backgr"
},
{
"path": "public/static/h-ui.admin/skin/red/skin.css",
"chars": 1174,
"preview": "@charset \"utf-8\";\n/* 红色 */\n/*全站默认字体颜色*/\na{color:#333}a:hover,a:focus,.maincolor,.maincolor a{color:#06c}\n.navbar{ backgr"
},
{
"path": "public/static/h-ui.admin/skin/yellow/skin.css",
"chars": 1200,
"preview": "@charset \"utf-8\";\n/* 黄色 */\n/*全站默认字体颜色*/\na{color:#333}a:hover,a:focus,.maincolor,.maincolor a{color:#06c}\n.navbar{ backgr"
},
{
"path": "public/static/js/common.js",
"chars": 3096,
"preview": "// window.base={\n// g_restUrl:'http://115.159.6.199/index.php/api/v1/',\n//\n// getData:function(params){\n// "
},
{
"path": "public/static/js/login.js",
"chars": 1429,
"preview": "$(function(){\n $(document).on('click','#login',function(){\n var userName = $('#username'),\n pwd = $('#"
},
{
"path": "public/static/js/order.js",
"chars": 4349,
"preview": "$(function(){\n\n if(!window.base.getLocalStorage('token')){\n window.location.href = 'login.html';\n }\n var"
},
{
"path": "public/static/lib/DD_belatedPNG_0.0.8a-min.js",
"chars": 7019,
"preview": "/**\n* DD_belatedPNG: Adds IE6 support: PNG images for CSS background-image and HTML <IMG/>.\n* Author: Drew Diller\n* Emai"
},
{
"path": "public/static/lib/Hui-iconfont/1.0.8/demo.html",
"chars": 59338,
"preview": "<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"utf-8\"/>\n<title>Hui-iconfont_v1.0.8</title>\n<link href=\"http://static.h-ui."
},
{
"path": "public/static/lib/Hui-iconfont/1.0.8/iconfont.css",
"chars": 16551,
"preview": "/* -----------H-ui前端框架-------------\n* iconfont.css v1.0.8\n* http://www.h-ui.net/\n* Created & Modified by guojunhui\n* Dat"
},
{
"path": "public/static/lib/html5shiv.js",
"chars": 2429,
"preview": "/*\n HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed\n*/\n(function(l,f){function m(){var a=e.elem"
},
{
"path": "public/static/lib/jquery/1.9.1/jquery.js",
"chars": 268381,
"preview": "/*!\n * jQuery JavaScript Library v1.9.1\n * http://jquery.com/\n *\n * Includes Sizzle.js\n * http://sizzlejs.com/\n *\n * Cop"
},
{
"path": "public/static/lib/layer/2.4/layer.js",
"chars": 19831,
"preview": "/*! layer-v2.4 弹层组件 License LGPL http://layer.layui.com/ By 贤心 */\n;!function(a,b){\"use strict\";var c,d,e={getPath:funct"
},
{
"path": "public/static/lib/layer/2.4/skin/layer.css",
"chars": 14036,
"preview": "/*!\n \n @Name: layer's style\n @Author: 贤心\n @Blog: sentsin.com\n \n */.layui-layer-imgbar,.layui-layer-imgtit a,.layui-layer"
},
{
"path": "runtime/.gitignore",
"chars": 13,
"preview": "*\n!.gitignore"
},
{
"path": "tests/ExampleTest.php",
"chars": 749,
"preview": "<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE CAN DO IT JUST THINK"
},
{
"path": "tests/TestCase.php",
"chars": 710,
"preview": "<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE CAN DO IT JUST THINK"
},
{
"path": "think",
"chars": 725,
"preview": "#!/usr/bin/env php\n<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE C"
},
{
"path": "thinkphp/.gitignore",
"chars": 39,
"preview": "/composer.lock\n/vendor\n.idea\n.DS_Store\n"
},
{
"path": "thinkphp/.htaccess",
"chars": 13,
"preview": "deny from all"
},
{
"path": "thinkphp/.travis.yml",
"chars": 944,
"preview": "sudo: false\n\nlanguage: php\n\nservices:\n - memcached\n - mongodb\n - mysql\n - postgresql\n - redis-server\n\nmatrix:\n fas"
},
{
"path": "thinkphp/CONTRIBUTING.md",
"chars": 2463,
"preview": "如何贡献我的源代码\n===\n\n此文档介绍了 ThinkPHP 团队的组成以及运转机制,您提交的代码将给 ThinkPHP 项目带来什么好处,以及如何才能加入我们的行列。\n\n## 通过 Github 贡献代码\n\nThinkPHP 目前使用 G"
},
{
"path": "thinkphp/LICENSE.txt",
"chars": 1270,
"preview": "\nThinkPHP遵循Apache2开源协议发布,并提供免费使用。\n版权所有Copyright © 2006-2016 by ThinkPHP (http://thinkphp.cn)\nAll rights reserved。\nThinkP"
},
{
"path": "thinkphp/README.md",
"chars": 3251,
"preview": "ThinkPHP 5.0\n===============\n\n[](https://st"
},
{
"path": "thinkphp/base.php",
"chars": 2535,
"preview": "<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE CAN DO IT JUST THINK"
},
{
"path": "thinkphp/codecov.yml",
"chars": 184,
"preview": "comment:\n layout: header, changes, diff\ncoverage:\n ignore:\n - base.php\n - helper.php\n - convention.php\n - lang/zh-"
},
{
"path": "thinkphp/composer.json",
"chars": 834,
"preview": "{\n \"name\": \"topthink/framework\",\n \"description\": \"the new thinkphp framework\",\n \"type\": \"think-framework\",\n "
},
{
"path": "thinkphp/console.php",
"chars": 719,
"preview": "<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE CAN DO IT JUST THINK"
},
{
"path": "thinkphp/convention.php",
"chars": 8523,
"preview": "<?php\n\nreturn [\n // +----------------------------------------------------------------------\n // | 应用设置\n // +---"
},
{
"path": "thinkphp/helper.php",
"chars": 16030,
"preview": "<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE CAN DO IT JUST THINK"
},
{
"path": "thinkphp/lang/zh-cn.php",
"chars": 3084,
"preview": "<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE CAN DO IT JUST THINK"
},
{
"path": "thinkphp/library/think/App.php",
"chars": 19193,
"preview": "<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE CAN DO IT JUST THINK"
},
{
"path": "thinkphp/library/think/Build.php",
"chars": 7117,
"preview": "<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE CAN DO IT JUST THINK"
},
{
"path": "thinkphp/library/think/Cache.php",
"chars": 5675,
"preview": "<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE CAN DO IT JUST THINK"
},
{
"path": "thinkphp/library/think/Collection.php",
"chars": 8060,
"preview": "<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE CAN DO IT JUST THINK"
},
{
"path": "thinkphp/library/think/Config.php",
"chars": 5499,
"preview": "<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE CAN DO IT JUST THINK"
},
{
"path": "thinkphp/library/think/Console.php",
"chars": 20435,
"preview": "<?php\n// +----------------------------------------------------------------------\n// | TopThink [ WE CAN DO IT JUST THINK"
},
{
"path": "thinkphp/library/think/Controller.php",
"chars": 5712,
"preview": "<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE CAN DO IT JUST THINK"
},
{
"path": "thinkphp/library/think/Cookie.php",
"chars": 6860,
"preview": "<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE CAN DO IT JUST THINK"
},
{
"path": "thinkphp/library/think/Db.php",
"chars": 6007,
"preview": "<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE CAN DO IT JUST THINK"
}
]
// ... and 143 more files (download for full content)
About this extraction
This page contains the full source code of the yefangyong/ofo GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 343 files (2.2 MB), approximately 607.1k tokens, and a symbol index with 2158 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.