├── laravel
├── public
│ ├── favicon.ico
│ ├── robots.txt
│ ├── .htaccess
│ ├── web.config
│ └── index.php
├── database
│ ├── .gitignore
│ ├── seeds
│ │ └── DatabaseSeeder.php
│ ├── factories
│ │ └── ModelFactory.php
│ └── migrations
│ │ ├── 2014_10_12_100000_create_password_resets_table.php
│ │ ├── 2014_10_12_000000_create_users_table.php
│ │ ├── 2018_06_09_195009_create_pclogin_table.php
│ │ └── 2018_06_09_193549_add_morefield_weixin_to_users_table.php
├── app
│ ├── wxpaycert
│ │ ├── apiclient_cert.pem
│ │ └── apiclient_key.pem
│ ├── Pclogin.php
│ ├── myUtil.php
│ ├── Http
│ │ ├── Middleware
│ │ │ ├── EncryptCookies.php
│ │ │ ├── VerifyCsrfToken.php
│ │ │ ├── TrustProxies.php
│ │ │ ├── RedirectIfAuthenticated.php
│ │ │ └── checkadmin.php
│ │ ├── Controllers
│ │ │ └── Controller.php
│ │ └── Kernel.php
│ ├── Api
│ │ └── V1
│ │ │ ├── Requests
│ │ │ ├── LoginRequest.php
│ │ │ ├── SignUpRequest.php
│ │ │ ├── ForgotPasswordRequest.php
│ │ │ └── ResetPasswordRequest.php
│ │ │ └── Controllers
│ │ │ ├── LogoutController.php
│ │ │ ├── RefreshController.php
│ │ │ ├── SignUpController.php
│ │ │ ├── LoginController.php
│ │ │ ├── ForgotPasswordController.php
│ │ │ ├── qiniuController.php
│ │ │ ├── ResetPasswordController.php
│ │ │ └── UserController.php
│ ├── Providers
│ │ ├── AppServiceProvider.php
│ │ ├── BroadcastServiceProvider.php
│ │ ├── AuthServiceProvider.php
│ │ ├── EventServiceProvider.php
│ │ └── RouteServiceProvider.php
│ ├── Console
│ │ └── Kernel.php
│ ├── User.php
│ ├── Exceptions
│ │ └── Handler.php
│ └── WinXinRefund.php
├── resources
│ ├── views
│ │ ├── vendor
│ │ │ └── .gitkeep
│ │ ├── errors
│ │ │ └── 503.blade.php
│ │ └── welcome.blade.php
│ ├── assets
│ │ ├── sass
│ │ │ ├── app.scss
│ │ │ └── _variables.scss
│ │ └── js
│ │ │ ├── app.js
│ │ │ ├── components
│ │ │ └── Example.vue
│ │ │ └── bootstrap.js
│ └── lang
│ │ └── en
│ │ ├── pagination.php
│ │ ├── auth.php
│ │ └── passwords.php
├── storage
│ ├── logs
│ │ └── .gitignore
│ ├── app
│ │ ├── public
│ │ │ └── .gitignore
│ │ └── .gitignore
│ └── framework
│ │ ├── cache
│ │ └── .gitignore
│ │ ├── sessions
│ │ └── .gitignore
│ │ ├── views
│ │ └── .gitignore
│ │ └── .gitignore
├── bootstrap
│ ├── cache
│ │ └── .gitignore
│ ├── autoload.php
│ └── app.php
├── .gitattributes
├── config
│ ├── qiniu.php
│ ├── weixinpay.php
│ ├── hashing.php
│ ├── cors.php
│ ├── compile.php
│ ├── services.php
│ ├── view.php
│ ├── broadcasting.php
│ ├── boilerplate.php
│ ├── filesystems.php
│ ├── logging.php
│ ├── queue.php
│ └── cache.php
├── .gitignore
├── routes
│ ├── console.php
│ ├── web.php
│ └── api.php
├── server.php
├── tests
│ ├── TestCase.php
│ └── Functional
│ │ └── Api
│ │ └── V1
│ │ └── Controllers
│ │ ├── LogoutControllerTest.php
│ │ ├── UserControllerTest.php
│ │ ├── SignUpControllerTest.php
│ │ ├── ForgotPasswordControllerTest.php
│ │ ├── RefreshControllerTest.php
│ │ ├── LoginControllerTest.php
│ │ └── ResetPasswordControllerTest.php
├── .env
├── env.pro
├── .env.example
├── phpunit.xml
├── artisan
└── composer.json
├── wechat
├── pages
│ ├── ordermanager
│ │ ├── ordermanager.wxss
│ │ ├── ordermanager.json
│ │ └── ordermanager.js
│ ├── personalcenter
│ │ ├── personalcenter.wxss
│ │ ├── personalcenter.json
│ │ └── personalcenter.wxml
│ ├── modifyradiooperation
│ │ ├── modifyradiooperation.wxss
│ │ ├── modifyradiooperation.json
│ │ ├── modifyradiooperation.wxml
│ │ └── modifyradiooperation.js
│ ├── logs
│ │ ├── logs.json
│ │ ├── logs.wxss
│ │ ├── logs.wxml
│ │ └── logs.js
│ ├── addressmanager
│ │ ├── addressmanager.json
│ │ ├── addressmanager.wxml
│ │ ├── addressmanager.wxss
│ │ └── addressmanager.js
│ ├── modifyoperation
│ │ ├── modifyOperation.json
│ │ ├── modifyoperation.wxml
│ │ ├── modifyoperation.wxss
│ │ └── modifyoperation.js
│ ├── orderpurchase
│ │ ├── orderpurchase.json
│ │ ├── orderpurchase.wxss
│ │ ├── orderpurchase.js
│ │ └── orderpurchase.wxml
│ ├── productdetail
│ │ ├── productdetail.json
│ │ ├── productdetail.wxss
│ │ └── productdetail.js
│ ├── pclogin
│ │ ├── pclogin.json
│ │ ├── pclogin.wxss
│ │ └── pclogin.wxml
│ └── index
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── index.wxml
│ │ └── index.js
├── components
│ ├── item
│ │ ├── item.wxss
│ │ ├── item.json
│ │ ├── item.js
│ │ └── item.wxml
│ └── adv
│ │ ├── adv.json
│ │ ├── adv.js
│ │ ├── adv.wxss
│ │ └── adv.wxml
├── images
│ ├── adv.png
│ ├── my.png
│ ├── fruit.png
│ ├── order.png
│ ├── address.png
│ ├── cartoff.png
│ ├── carton.png
│ ├── indexoff.png
│ ├── indexon.png
│ ├── arrowright.png
│ ├── index_finger.png
│ ├── productdetail1.jpeg
│ ├── productdetail2.jpeg
│ ├── personalcenteroff.png
│ └── personalcenteron.png
├── app.json
├── project.config.json
├── config.js
├── app.wxss
├── app.js
└── utils
│ └── util.js
├── arch.pptx
├── images
├── arch.jpg
├── lavas.jpg
└── pclogin.jpg
├── lavas
├── .fecsignore
├── static
│ ├── img
│ │ ├── logo.png
│ │ └── icons
│ │ │ ├── favicon.ico
│ │ │ ├── favicon-16x16.png
│ │ │ ├── favicon-32x32.png
│ │ │ ├── android-chrome-192x192.png
│ │ │ ├── android-chrome-512x512.png
│ │ │ ├── apple-touch-icon-120x120.png
│ │ │ ├── apple-touch-icon-152x152.png
│ │ │ ├── apple-touch-icon-180x180.png
│ │ │ ├── apple-touch-icon-60x60.png
│ │ │ └── apple-touch-icon-76x76.png
│ └── manifest.json
├── assets
│ ├── images
│ │ ├── icon.png
│ │ └── logo.png
│ ├── fonts
│ │ ├── iconfont.ttf
│ │ ├── iconfont.woff
│ │ ├── iconfont.eot
│ │ └── iconfont.svg
│ ├── stylus
│ │ └── main.styl
│ └── css
│ │ └── iconfont.css
├── .gitignore
├── .travis.yml
├── .editorconfig
├── .postcssrc.js
├── store
│ ├── pageTransition.js
│ ├── scrollBehavior.js
│ ├── user.js
│ └── basic.js
├── pages
│ ├── Appshell.vue
│ ├── Error.vue
│ ├── Test.vue
│ ├── settings
│ │ └── Settings.vue
│ ├── Userdetail
│ │ └── _id.vue
│ └── Dashboard.vue
├── README.md
├── core
│ ├── app.js
│ ├── service-worker.js
│ ├── ssr.html.tmpl
│ └── spa.html.tmpl
├── server.prod.js
├── LICENSE
├── package.json
├── lavas.config.js
├── components
│ ├── UpdateToast.vue
│ └── ProgressBar.vue
└── server.dev.js
├── 微信小程序授权登录设计-0609.pptx
└── LICENSE
/laravel/public/favicon.ico:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/laravel/database/.gitignore:
--------------------------------------------------------------------------------
1 | *.sqlite
2 |
--------------------------------------------------------------------------------
/wechat/pages/ordermanager/ordermanager.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/laravel/app/wxpaycert/apiclient_cert.pem:
--------------------------------------------------------------------------------
1 | xxx
2 |
--------------------------------------------------------------------------------
/laravel/app/wxpaycert/apiclient_key.pem:
--------------------------------------------------------------------------------
1 | xxx
2 |
--------------------------------------------------------------------------------
/laravel/resources/views/vendor/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/wechat/pages/personalcenter/personalcenter.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/laravel/storage/logs/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/laravel/bootstrap/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/laravel/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow:
3 |
--------------------------------------------------------------------------------
/laravel/storage/app/public/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/wechat/components/item/item.wxss:
--------------------------------------------------------------------------------
1 | @import '../../app.wxss';
2 |
--------------------------------------------------------------------------------
/wechat/pages/modifyradiooperation/modifyradiooperation.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/laravel/storage/app/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !public/
3 | !.gitignore
4 |
--------------------------------------------------------------------------------
/laravel/storage/framework/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/laravel/storage/framework/sessions/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/laravel/storage/framework/views/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/wechat/components/adv/adv.json:
--------------------------------------------------------------------------------
1 | {
2 | "component":true
3 | }
4 |
--------------------------------------------------------------------------------
/wechat/components/item/item.json:
--------------------------------------------------------------------------------
1 | {
2 | "component":true
3 | }
4 |
--------------------------------------------------------------------------------
/wechat/pages/logs/logs.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "查看启动日志"
3 | }
--------------------------------------------------------------------------------
/arch.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/arch.pptx
--------------------------------------------------------------------------------
/wechat/pages/addressmanager/addressmanager.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "地址管理"
3 | }
4 |
--------------------------------------------------------------------------------
/wechat/pages/modifyoperation/modifyOperation.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "修改基本信息"
3 | }
--------------------------------------------------------------------------------
/wechat/pages/ordermanager/ordermanager.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "我的订单"
3 | }
4 |
--------------------------------------------------------------------------------
/wechat/pages/orderpurchase/orderpurchase.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "确认订单"
3 | }
4 |
--------------------------------------------------------------------------------
/wechat/pages/productdetail/productdetail.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "抢购详情"
3 | }
4 |
--------------------------------------------------------------------------------
/images/arch.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/images/arch.jpg
--------------------------------------------------------------------------------
/images/lavas.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/images/lavas.jpg
--------------------------------------------------------------------------------
/images/pclogin.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/images/pclogin.jpg
--------------------------------------------------------------------------------
/wechat/pages/modifyradiooperation/modifyradiooperation.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "修改基本信息"
3 | }
--------------------------------------------------------------------------------
/lavas/.fecsignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | config
3 | dist
4 | lib
5 | test
6 | _old
7 | build/templates
8 | *.html
9 |
--------------------------------------------------------------------------------
/wechat/images/adv.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/wechat/images/adv.png
--------------------------------------------------------------------------------
/wechat/images/my.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/wechat/images/my.png
--------------------------------------------------------------------------------
/微信小程序授权登录设计-0609.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/微信小程序授权登录设计-0609.pptx
--------------------------------------------------------------------------------
/wechat/images/fruit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/wechat/images/fruit.png
--------------------------------------------------------------------------------
/wechat/images/order.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/wechat/images/order.png
--------------------------------------------------------------------------------
/lavas/static/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/lavas/static/img/logo.png
--------------------------------------------------------------------------------
/wechat/images/address.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/wechat/images/address.png
--------------------------------------------------------------------------------
/wechat/images/cartoff.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/wechat/images/cartoff.png
--------------------------------------------------------------------------------
/wechat/images/carton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/wechat/images/carton.png
--------------------------------------------------------------------------------
/wechat/images/indexoff.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/wechat/images/indexoff.png
--------------------------------------------------------------------------------
/wechat/images/indexon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/wechat/images/indexon.png
--------------------------------------------------------------------------------
/lavas/assets/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/lavas/assets/images/icon.png
--------------------------------------------------------------------------------
/lavas/assets/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/lavas/assets/images/logo.png
--------------------------------------------------------------------------------
/wechat/images/arrowright.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/wechat/images/arrowright.png
--------------------------------------------------------------------------------
/lavas/assets/fonts/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/lavas/assets/fonts/iconfont.ttf
--------------------------------------------------------------------------------
/wechat/images/index_finger.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/wechat/images/index_finger.png
--------------------------------------------------------------------------------
/wechat/pages/pclogin/pclogin.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "授权登录确认",
3 | "usingComponents": {
4 |
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/lavas/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | npm-debug.log*
4 | yarn-debug.log*
5 | yarn-error.log*
6 | .lavas/
7 | .nyc_output
8 |
--------------------------------------------------------------------------------
/lavas/assets/fonts/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/lavas/assets/fonts/iconfont.woff
--------------------------------------------------------------------------------
/lavas/assets/stylus/main.styl:
--------------------------------------------------------------------------------
1 | @import '~normalize.css';
2 | @import '../css/iconfont.css';
3 |
4 | html, body
5 | height 100%
6 |
--------------------------------------------------------------------------------
/wechat/images/productdetail1.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/wechat/images/productdetail1.jpeg
--------------------------------------------------------------------------------
/wechat/images/productdetail2.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/wechat/images/productdetail2.jpeg
--------------------------------------------------------------------------------
/lavas/static/img/icons/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/lavas/static/img/icons/favicon.ico
--------------------------------------------------------------------------------
/wechat/images/personalcenteroff.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/wechat/images/personalcenteroff.png
--------------------------------------------------------------------------------
/wechat/images/personalcenteron.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/wechat/images/personalcenteron.png
--------------------------------------------------------------------------------
/laravel/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 | *.css linguist-vendored
3 | *.scss linguist-vendored
4 | *.js linguist-vendored
5 | CHANGELOG.md export-ignore
6 |
--------------------------------------------------------------------------------
/lavas/static/img/icons/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/lavas/static/img/icons/favicon-16x16.png
--------------------------------------------------------------------------------
/lavas/static/img/icons/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/lavas/static/img/icons/favicon-32x32.png
--------------------------------------------------------------------------------
/wechat/pages/index/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "我的酷酷小程序",
3 | "usingComponents": {
4 | "adv": "/components/adv/adv"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/wechat/pages/logs/logs.wxss:
--------------------------------------------------------------------------------
1 | .log-list {
2 | display: flex;
3 | flex-direction: column;
4 | padding: 40rpx;
5 | }
6 | .log-item {
7 | margin: 10rpx;
8 | }
9 |
--------------------------------------------------------------------------------
/laravel/storage/framework/.gitignore:
--------------------------------------------------------------------------------
1 | config.php
2 | routes.php
3 | schedule-*
4 | compiled.php
5 | services.json
6 | events.scanned.php
7 | routes.scanned.php
8 | down
9 |
--------------------------------------------------------------------------------
/lavas/static/img/icons/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/lavas/static/img/icons/android-chrome-192x192.png
--------------------------------------------------------------------------------
/lavas/static/img/icons/android-chrome-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/lavas/static/img/icons/android-chrome-512x512.png
--------------------------------------------------------------------------------
/lavas/static/img/icons/apple-touch-icon-120x120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/lavas/static/img/icons/apple-touch-icon-120x120.png
--------------------------------------------------------------------------------
/lavas/static/img/icons/apple-touch-icon-152x152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/lavas/static/img/icons/apple-touch-icon-152x152.png
--------------------------------------------------------------------------------
/lavas/static/img/icons/apple-touch-icon-180x180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/lavas/static/img/icons/apple-touch-icon-180x180.png
--------------------------------------------------------------------------------
/lavas/static/img/icons/apple-touch-icon-60x60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/lavas/static/img/icons/apple-touch-icon-60x60.png
--------------------------------------------------------------------------------
/lavas/static/img/icons/apple-touch-icon-76x76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pailjin/wechat-laravel-lavas-system/HEAD/lavas/static/img/icons/apple-touch-icon-76x76.png
--------------------------------------------------------------------------------
/wechat/pages/personalcenter/personalcenter.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "个人中心",
3 | "usingComponents": {
4 | "item": "/components/item/item"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/laravel/config/qiniu.php:
--------------------------------------------------------------------------------
1 | [
4 | 'AK' => 'xxxxxxxxxxxxx',
5 | 'SK' => 'xxxxxxxxxxx',
6 | 'Name' => 'common'
7 | ]
8 | ];
9 |
--------------------------------------------------------------------------------
/lavas/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | language: node_js
3 | node_js:
4 | - "6.9"
5 | - "7"
6 | - "8"
7 | os:
8 | - linux
9 | install:
10 | - npm install
11 | script:
12 | - npm test
13 |
--------------------------------------------------------------------------------
/wechat/pages/modifyoperation/modifyoperation.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/wechat/pages/logs/logs.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{index + 1}}. {{log}}
5 |
6 |
7 |
--------------------------------------------------------------------------------
/wechat/pages/modifyoperation/modifyoperation.wxss:
--------------------------------------------------------------------------------
1 | /**modifyPersonalInfo.wxss**/
2 | input{
3 | padding: 10rpx;
4 | width: 100%;
5 | height:88rpx;
6 | border-bottom:1rpx solid #ccc;
7 | /* margin: 20rpx auto; */
8 | }
--------------------------------------------------------------------------------
/laravel/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | /public/hot
3 | /public/storage
4 | /storage/*.key
5 | /vendor
6 | /.idea
7 | /.vscode
8 | /.vagrant
9 | Homestead.json
10 | Homestead.yaml
11 | npm-debug.log
12 | yarn-error.log
13 | .env
14 |
--------------------------------------------------------------------------------
/laravel/resources/assets/sass/app.scss:
--------------------------------------------------------------------------------
1 |
2 | // Fonts
3 | @import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600);
4 |
5 | // Variables
6 | @import "variables";
7 |
8 | // Bootstrap
9 | @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
10 |
--------------------------------------------------------------------------------
/wechat/pages/addressmanager/addressmanager.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/laravel/app/Pclogin.php:
--------------------------------------------------------------------------------
1 | call(UsersTableSeeder::class);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/lavas/.editorconfig:
--------------------------------------------------------------------------------
1 | # http://editorconfig.org/
2 | root = true
3 |
4 | [*]
5 | indent_size = 4
6 | indent_style = space
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
15 | [{package.json,.travis.yml}]
16 | indent_size = 2
17 |
--------------------------------------------------------------------------------
/wechat/pages/logs/logs.js:
--------------------------------------------------------------------------------
1 | //logs.js
2 | const util = require('../../utils/util.js')
3 |
4 | Page({
5 | data: {
6 | logs: []
7 | },
8 | onLoad: function () {
9 | this.setData({
10 | logs: (wx.getStorageSync('logs') || []).map(log => {
11 | return util.formatTime(new Date(log))
12 | })
13 | })
14 | }
15 | })
16 |
--------------------------------------------------------------------------------
/wechat/pages/pclogin/pclogin.wxss:
--------------------------------------------------------------------------------
1 | /**myClub.wxss**/
2 | .bannerImg {
3 | width: 100%;
4 | height: 440rpx;
5 | }
6 |
7 | .userIcon {
8 | position: absolute;
9 | width: 160rpx;
10 | height: 160rpx;
11 | top: 340rpx;
12 | left: 300rpx;
13 | border-radius: 50%;
14 | }
15 |
16 | .userName {
17 | margin-top: 70rpx;
18 | font-size: 32rpx;
19 | }
20 |
--------------------------------------------------------------------------------
/laravel/app/myUtil.php:
--------------------------------------------------------------------------------
1 | [
4 | 'app_id' => 'wxxxxxxxxxxxx',//小程序APPID
5 | 'app_secret' => 'dfadfdfdasfdsafdfdfdfadfdfdf',
6 | 'merchant_id' => '1232131232',//微信支付分配的商户号
7 | 'pay_key' => 'dafdafadfadsfdasfdsafdsf',//支付签名使用
8 | 'notify_url' => 'https://pay.abc.com/api/weixinpaycallback',//异步接收微信支付结果通知的回调地址
9 | ]
10 | ];
11 |
--------------------------------------------------------------------------------
/laravel/app/Http/Middleware/EncryptCookies.php:
--------------------------------------------------------------------------------
1 | {
7 | return {
8 | enable: true,
9 | type: 'none',
10 | effect: 'none'
11 | };
12 | };
13 |
14 | export const mutations = {
15 | setType(state, type) {
16 | state.type = type;
17 | },
18 | setEffect(state, effect) {
19 | state.effect = effect;
20 | }
21 | };
22 |
--------------------------------------------------------------------------------
/wechat/components/adv/adv.wxss:
--------------------------------------------------------------------------------
1 | @import '../../app.wxss';
2 | .adv {
3 | top:0;
4 | width: 750rpx;
5 | position: fixed;
6 | z-index: 1000;
7 | }
8 |
9 | .index-adv-img {
10 | width:38rpx;
11 | height: 38rpx;
12 | margin-right: 10rpx;
13 | vertical-align: middle;
14 | }
15 |
16 | .index-adv-title {
17 | width: 300rpx;
18 | overflow: hidden;
19 | font-size: 30rpx;
20 | text-overflow:ellipsis;
21 | white-space: nowrap;
22 | margin-top: 10rpx;
23 | }
24 |
--------------------------------------------------------------------------------
/lavas/pages/Appshell.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
19 |
--------------------------------------------------------------------------------
/wechat/components/adv/adv.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | {{ advTitle }}
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/wechat/pages/addressmanager/addressmanager.wxss:
--------------------------------------------------------------------------------
1 | .float-btn {
2 | color: #888;
3 | position: fixed;
4 | /*display: flex;
5 | align-items: center;
6 | justify-content: right;*/
7 | width: 100%;
8 | height: 100rpx;
9 | line-height: 100rpx;
10 | text-align: right;
11 | bottom: 0;
12 | right: 0;
13 | font-size: 28rpx;
14 | background: #fff;
15 | border-top: 2rpx solid #ccc;
16 | }
17 |
18 | .float-btn-part {
19 | padding: 20rpx 40rpx;
20 | }
21 |
22 | .float-btn-part-image {
23 | width: 50rpx;
24 | height: 50rpx;
25 | }
26 |
--------------------------------------------------------------------------------
/laravel/app/Providers/AppServiceProvider.php:
--------------------------------------------------------------------------------
1 | 'bcrypt',
19 |
20 | ];
21 |
--------------------------------------------------------------------------------
/wechat/pages/personalcenter/personalcenter.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/laravel/config/cors.php:
--------------------------------------------------------------------------------
1 | false,
15 | 'allowedOrigins' => ['*'],
16 | 'allowedHeaders' => ['*'],
17 | 'allowedMethods' => ['*'],
18 | 'exposedHeaders' => [],
19 | 'maxAge' => 0,
20 | 'hosts' => [],
21 | ];
22 |
23 |
--------------------------------------------------------------------------------
/laravel/routes/console.php:
--------------------------------------------------------------------------------
1 | comment(Inspiring::quote());
18 | })->describe('Display an inspiring quote');
19 |
--------------------------------------------------------------------------------
/laravel/public/.htaccess:
--------------------------------------------------------------------------------
1 |
2 |
3 | Options -MultiViews
4 |
5 |
6 | RewriteEngine On
7 |
8 | # Redirect Trailing Slashes If Not A Folder...
9 | RewriteCond %{REQUEST_FILENAME} !-d
10 | RewriteRule ^(.*)/$ /$1 [L,R=301]
11 |
12 | # Handle Front Controller...
13 | RewriteCond %{REQUEST_FILENAME} !-d
14 | RewriteCond %{REQUEST_FILENAME} !-f
15 | RewriteRule ^ index.php [L]
16 |
17 | # Handle Authorization Header
18 | RewriteCond %{HTTP:Authorization} .
19 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
20 |
21 |
--------------------------------------------------------------------------------
/laravel/resources/lang/en/pagination.php:
--------------------------------------------------------------------------------
1 | '« Previous',
17 | 'next' => 'Next »',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/wechat/pages/modifyradiooperation/modifyradiooperation.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/laravel/server.php:
--------------------------------------------------------------------------------
1 |
8 | */
9 |
10 | $uri = urldecode(
11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
12 | );
13 |
14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the
15 | // built-in PHP web server. This provides a convenient way to test a Laravel
16 | // application without having installed a "real" web server software here.
17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
18 | return false;
19 | }
20 |
21 | require_once __DIR__.'/public/index.php';
22 |
--------------------------------------------------------------------------------
/lavas/README.md:
--------------------------------------------------------------------------------
1 | # pwa-lavas-admin
2 |
3 | > 这是一个 Lavas PWA 项目
4 |
5 | ## npm 相关命令
6 |
7 | ``` bash
8 | # 安装工程依赖
9 | npm install
10 |
11 | # 在本地启动调试 server
12 | npm run dev
13 |
14 | # 构建线上生产环境产物
15 | npm run build
16 |
17 | # 启动编译后的代码,注意,需要在 dist 目录中启动,仅 SSR 模式下有效
18 | npm run start
19 |
20 | # 检查代码是否符合规范
21 | npm run lint
22 | ```
23 |
24 | Lavas 工程模版基于 [vue-template-vue](https://github.com/lavas-project/lavas-template-vue/) 模版的 `release-*` 分支创建。
25 | 如果想要了解具体如何玩转整个 Lavas 创建的 PWA 工程, 请查看[Lavas 官网教程](https://lavas.baidu.com/guide)。
26 |
27 | ## Changelog
28 |
29 | 详细的 Changelog 请看 [Release Notes](https://github.com/lavas-project/lavas-template-vue/releases)
30 |
--------------------------------------------------------------------------------
/wechat/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages":[
3 | "pages/index/index",
4 | "pages/logs/logs",
5 | "pages/productdetail/productdetail",
6 | "pages/orderpurchase/orderpurchase",
7 | "pages/addressmanager/addressmanager",
8 | "pages/personalcenter/personalcenter",
9 | "pages/modifyoperation/modifyoperation",
10 | "pages/modifyradiooperation/modifyradiooperation",
11 | "pages/ordermanager/ordermanager",
12 | "pages/pclogin/pclogin"
13 | ],
14 |
15 | "window":{
16 | "backgroundTextStyle":"light",
17 | "navigationBarBackgroundColor": "#3fb207",
18 | "navigationBarTitleText": "首页",
19 | "navigationBarTextStyle":"white"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/laravel/app/Http/Middleware/RedirectIfAuthenticated.php:
--------------------------------------------------------------------------------
1 | check()) {
21 | return redirect('/home');
22 | }
23 |
24 | return $next($request);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/laravel/resources/assets/js/app.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * First we will load all of this project's JavaScript dependencies which
4 | * include Vue and Vue Resource. This gives a great starting point for
5 | * building robust, powerful web applications using Vue and Laravel.
6 | */
7 |
8 | require('./bootstrap');
9 |
10 | /**
11 | * Next, we will create a fresh Vue application instance and attach it to
12 | * the page. Then, you may begin adding components to this application
13 | * or customize the JavaScript scaffolding to fit your unique needs.
14 | */
15 |
16 | Vue.component('example', require('./components/Example.vue'));
17 |
18 | const app = new Vue({
19 | el: '#app'
20 | });
21 |
--------------------------------------------------------------------------------
/laravel/routes/web.php:
--------------------------------------------------------------------------------
1 | 'password.reset', function($token)
15 | {
16 | // implement your reset password route here!
17 | }]);
18 |
19 | Route::get('/', function () {
20 | return view('welcome');
21 | });
22 |
--------------------------------------------------------------------------------
/laravel/app/Providers/BroadcastServiceProvider.php:
--------------------------------------------------------------------------------
1 | id === (int) $userId;
24 | });
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/laravel/resources/assets/js/components/Example.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
Example Component
7 |
8 |
9 | I'm an example component!
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
24 |
--------------------------------------------------------------------------------
/wechat/pages/addressmanager/addressmanager.js:
--------------------------------------------------------------------------------
1 | //获取应用实例
2 | const app = getApp()
3 |
4 | Page({
5 | data: {
6 |
7 | },
8 |
9 | onLoad: function(options) {
10 | // 生命周期函数--监听页面加载
11 | // console.log("test onLoad");
12 | },
13 |
14 | onReady: function() {
15 | // 生命周期函数--监听页面初次渲染完成
16 | // console.log("test onReady");
17 | },
18 |
19 | onShow: function() {
20 | // 生命周期函数--监听页面显示
21 | // console.log("test onShow");
22 | },
23 |
24 | onHide:function() {
25 | // 生命周期函数--监听页面隐藏
26 | // console.log("test onHide");
27 | },
28 |
29 | onUnload: function() {
30 | // 生命周期函数--监听页面卸载
31 | // console.log("test onUnload");
32 | },
33 |
34 | })
35 |
--------------------------------------------------------------------------------
/lavas/core/app.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @file entry
3 | * @author pail(pail@techcopemate.net)
4 | */
5 |
6 | import Vue from 'vue';
7 | import Meta from 'vue-meta';
8 |
9 | import {createRouter} from '@/.lavas/router';
10 | import {createStore} from '@/.lavas/store';
11 | import AppComponent from './App.vue';
12 |
13 | Vue.use(Meta);
14 |
15 | Vue.config.productionTip = false;
16 |
17 | export function createApp() {
18 | let router = createRouter();
19 | let store = createStore();
20 | let App = Vue.extend({
21 | router,
22 | store,
23 | ...AppComponent
24 | });
25 | return {App, router, store};
26 | }
27 |
28 | if (module.hot) {
29 | module.hot.accept();
30 | }
31 |
--------------------------------------------------------------------------------
/laravel/resources/lang/en/auth.php:
--------------------------------------------------------------------------------
1 | 'These credentials do not match our records.',
17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/wechat/project.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": "项目配置文件。",
3 | "packOptions": {
4 | "ignore": []
5 | },
6 | "setting": {
7 | "urlCheck": true,
8 | "es6": true,
9 | "postcss": true,
10 | "minified": true,
11 | "newFeature": true
12 | },
13 | "compileType": "miniprogram",
14 | "libVersion": "2.0.9",
15 | "appid": "xxxxxxxxxxxxxx",
16 | "projectname": "WLLxcx",
17 | "isGameTourist": false,
18 | "condition": {
19 | "search": {
20 | "current": -1,
21 | "list": []
22 | },
23 | "conversation": {
24 | "current": -1,
25 | "list": []
26 | },
27 | "game": {
28 | "currentL": -1,
29 | "list": []
30 | },
31 | "miniprogram": {
32 | "current": -1,
33 | "list": []
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/laravel/app/Providers/AuthServiceProvider.php:
--------------------------------------------------------------------------------
1 | 'App\Policies\ModelPolicy',
17 | ];
18 |
19 | /**
20 | * Register any authentication / authorization services.
21 | *
22 | * @return void
23 | */
24 | public function boot()
25 | {
26 | $this->registerPolicies();
27 |
28 | //
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/laravel/tests/TestCase.php:
--------------------------------------------------------------------------------
1 | make(Kernel::class)->bootstrap();
27 |
28 | return $app;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/laravel/app/Api/V1/Controllers/LogoutController.php:
--------------------------------------------------------------------------------
1 | middleware('jwt.auth', []);
18 | }
19 |
20 | /**
21 | * Log the user out (Invalidate the token)
22 | *
23 | * @return \Illuminate\Http\JsonResponse
24 | */
25 | public function logout()
26 | {
27 | Auth::guard()->logout();
28 |
29 | return response()
30 | ->json(['message' => 'Successfully logged out']);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/laravel/app/Providers/EventServiceProvider.php:
--------------------------------------------------------------------------------
1 | [
17 | 'App\Listeners\EventListener',
18 | ],
19 | ];
20 |
21 | /**
22 | * Register any events for your application.
23 | *
24 | * @return void
25 | */
26 | public function boot()
27 | {
28 | parent::boot();
29 |
30 | //
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/wechat/config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 小程序配置文件
3 | */
4 |
5 |
6 | var host = 'https://api.abc.com';
7 | var qiniudomain = 'https://qinius.abc.com';
8 | var config = {
9 |
10 | // 下面的地址配合云端 Demo 工作
11 | service: {
12 | host,
13 | qiniudomain:qiniudomain,
14 |
15 | // 登录地址,用于建立会话
16 | loginUrl: `${host}/api/login`,
17 |
18 | // 测试的请求地址
19 | requestUrl: `${host}/api`,
20 | // requestUrlmalls: `${host}/api/searchmalls/search`,
21 | // requestUrlduobiusers: `${host}/api/duobiusers`,
22 | // 测试的信道服务地址
23 | tunnelUrl: `${host}/weapp/tunnel`,
24 |
25 | // 上传图片接口,不需要用,直接用七牛
26 | uploadUrl: `${host}/weapp/upload`,
27 | downloadUrl:`${qiniudomain}`
28 | }
29 | };
30 |
31 | module.exports = config;
32 |
--------------------------------------------------------------------------------
/lavas/pages/Error.vue:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
26 |
27 |
34 |
--------------------------------------------------------------------------------
/wechat/pages/pclogin/pclogin.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | 确认登录吗?
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/laravel/database/factories/ModelFactory.php:
--------------------------------------------------------------------------------
1 | define(App\User::class, function (Faker\Generator $faker) {
16 | static $password;
17 |
18 | return [
19 | 'name' => $faker->name,
20 | 'email' => $faker->unique()->safeEmail,
21 | 'password' => $password ?: $password = bcrypt('secret'),
22 | 'remember_token' => str_random(10),
23 | ];
24 | });
25 |
--------------------------------------------------------------------------------
/laravel/app/Api/V1/Controllers/RefreshController.php:
--------------------------------------------------------------------------------
1 | refresh();
23 |
24 | return response()->json([
25 | 'status' => 'ok',
26 | 'token' => $token,
27 | 'expires_in' => Auth::guard()->factory()->getTTL() * 60
28 | ]);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/laravel/database/migrations/2014_10_12_100000_create_password_resets_table.php:
--------------------------------------------------------------------------------
1 | string('email')->index();
18 | $table->string('token')->index();
19 | $table->timestamp('created_at')->nullable();
20 | });
21 | }
22 |
23 | /**
24 | * Reverse the migrations.
25 | *
26 | * @return void
27 | */
28 | public function down()
29 | {
30 | Schema::dropIfExists('password_resets');
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/laravel/resources/lang/en/passwords.php:
--------------------------------------------------------------------------------
1 | 'Passwords must be at least six characters and match the confirmation.',
17 | 'reset' => 'Your password has been reset!',
18 | 'sent' => 'We have e-mailed your password reset link!',
19 | 'token' => 'This password reset token is invalid.',
20 | 'user' => "We can't find a user with that e-mail address.",
21 |
22 | ];
23 |
--------------------------------------------------------------------------------
/lavas/server.prod.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @file server.prod.js
3 | * @author lavas
4 | */
5 |
6 | var LavasCore = require('lavas-core-vue');
7 | var express = require('express');
8 | var app = express();
9 |
10 | var port = process.env.PORT || 3000;
11 |
12 | var core = new LavasCore(__dirname);
13 |
14 | core.init(process.env.NODE_ENV || 'production')
15 | .then(function () {
16 | core.runAfterBuild();
17 | })
18 | .then(function () {
19 | app.use(core.expressMiddleware());
20 | app.listen(port, function () {
21 | console.log('server started at localhost:' + port);
22 | });
23 | }).catch(function (err) {
24 | console.log(err);
25 | });
26 |
27 | // catch promise error
28 | process.on('unhandledRejection', function (err, promise) {
29 | console.log('in unhandledRejection');
30 | console.log(err);
31 | // cannot redirect without ctx!
32 | });
33 |
--------------------------------------------------------------------------------
/lavas/static/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "start_url": "/?utm_source=homescreen",
3 | "name": "pwa-lavas-admin",
4 | "short_name": "pwa-lavas-admin",
5 | "icons": [
6 | {
7 | "src": "img/icons/android-chrome-512x512.png",
8 | "type": "image/png",
9 | "sizes": "512x512"
10 | },
11 | {
12 | "src": "img/icons/android-chrome-192x192.png",
13 | "type": "image/png",
14 | "sizes": "192x192"
15 | },
16 | {
17 | "src": "img/icons/apple-touch-icon-180x180.png",
18 | "type": "image/png",
19 | "sizes": "180x180"
20 | },
21 | {
22 | "src": "img/icons/apple-touch-icon-152x152.png",
23 | "type": "image/png",
24 | "sizes": "152x152"
25 | }
26 | ],
27 | "display": "standalone",
28 | "background_color": "#000000",
29 | "theme_color": "#278fef"
30 | }
31 |
--------------------------------------------------------------------------------
/laravel/database/migrations/2014_10_12_000000_create_users_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
18 | $table->string('name');
19 | $table->string('email')->unique();
20 | $table->string('password');
21 | $table->rememberToken();
22 | $table->timestamps();
23 | });
24 | }
25 |
26 | /**
27 | * Reverse the migrations.
28 | *
29 | * @return void
30 | */
31 | public function down()
32 | {
33 | Schema::dropIfExists('users');
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/laravel/app/Api/V1/Controllers/SignUpController.php:
--------------------------------------------------------------------------------
1 | all());
17 | if(!$user->save()) {
18 | throw new HttpException(500);
19 | }
20 |
21 | if(!Config::get('boilerplate.sign_up.release_token')) {
22 | return response()->json([
23 | 'status' => 'ok'
24 | ], 201);
25 | }
26 |
27 | $token = $JWTAuth->fromUser($user);
28 | return response()->json([
29 | 'status' => 'ok',
30 | 'token' => $token
31 | ], 201);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/laravel/resources/assets/sass/_variables.scss:
--------------------------------------------------------------------------------
1 |
2 | // Body
3 | $body-bg: #f5f8fa;
4 |
5 | // Borders
6 | $laravel-border-color: darken($body-bg, 10%);
7 | $list-group-border: $laravel-border-color;
8 | $navbar-default-border: $laravel-border-color;
9 | $panel-default-border: $laravel-border-color;
10 | $panel-inner-border: $laravel-border-color;
11 |
12 | // Brands
13 | $brand-primary: #3097D1;
14 | $brand-info: #8eb4cb;
15 | $brand-success: #2ab27b;
16 | $brand-warning: #cbb956;
17 | $brand-danger: #bf5329;
18 |
19 | // Typography
20 | $font-family-sans-serif: "Raleway", sans-serif;
21 | $font-size-base: 14px;
22 | $line-height-base: 1.6;
23 | $text-color: #636b6f;
24 |
25 | // Navbar
26 | $navbar-default-bg: #fff;
27 |
28 | // Buttons
29 | $btn-default-color: $text-color;
30 |
31 | // Inputs
32 | $input-border: lighten($text-color, 40%);
33 | $input-border-focus: lighten($brand-primary, 25%);
34 | $input-color-placeholder: lighten($text-color, 30%);
35 |
36 | // Panels
37 | $panel-default-heading-bg: #fff;
38 |
--------------------------------------------------------------------------------
/laravel/app/Console/Kernel.php:
--------------------------------------------------------------------------------
1 | command('inspire')
28 | // ->hourly();
29 | }
30 |
31 | /**
32 | * Register the Closure based commands for the application.
33 | *
34 | * @return void
35 | */
36 | protected function commands()
37 | {
38 | require base_path('routes/console.php');
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/laravel/public/web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/wechat/components/item/item.js:
--------------------------------------------------------------------------------
1 | Component({
2 | options: {
3 | multipleSlots: true // 在组件定义时的选项中启用多slot支持
4 | },
5 |
6 | properties: {
7 | // 这里定义了innerText属性,属性值可以在组件使用时指定
8 | itemLeft: {
9 | type: String,
10 | value: ''
11 | },
12 |
13 | itemRight: {
14 | type: String,
15 | value: '',
16 | },
17 |
18 | itemType: {
19 | type: String,
20 | value: ''
21 | },
22 |
23 | tag: {
24 | type: String,
25 | value: ''
26 | },
27 | },
28 |
29 | data: {
30 |
31 | },
32 |
33 | methods:{
34 | setInput: function() {
35 | wx.navigateTo({
36 | url: '/pages/modifyoperation/modifyoperation?from='+this.properties.tag+'&orgvalue=' + this.properties.itemRight
37 | })
38 | },
39 |
40 | setRadioChoose: function() {
41 | wx.navigateTo({
42 | url: '/pages/modifyradiooperation/modifyradiooperation?from='+this.properties.tag+'&orgvalue=' + this.properties.itemRight
43 | })
44 | }
45 | }
46 | })
47 |
--------------------------------------------------------------------------------
/laravel/.env:
--------------------------------------------------------------------------------
1 | APP_NAME=WLL
2 | APP_ENV=local
3 | APP_KEY=base64:B8CRetjQBe2GUEO0u3c+p3nQGFnq/sbPlrG5nWWUub0=
4 | APP_DEBUG=true
5 | APP_URL=http://localhost
6 |
7 | LOG_CHANNEL=stack
8 |
9 | DB_CONNECTION=mysql
10 | DB_HOST=106.12.34.28
11 | DB_PORT=3306
12 | DB_DATABASE=wlldb
13 | DB_USERNAME=root
14 | DB_PASSWORD=coolJe2018
15 |
16 | BROADCAST_DRIVER=log
17 | CACHE_DRIVER=file
18 | SESSION_DRIVER=file
19 | SESSION_LIFETIME=120
20 | QUEUE_DRIVER=sync
21 |
22 | REDIS_HOST=127.0.0.1
23 | REDIS_PASSWORD=null
24 | REDIS_PORT=6379
25 |
26 | MAIL_DRIVER=smtp
27 | MAIL_HOST=smtp.mailtrap.io
28 | MAIL_PORT=2525
29 | MAIL_USERNAME=null
30 | MAIL_PASSWORD=null
31 | MAIL_ENCRYPTION=null
32 |
33 | PUSHER_APP_ID=
34 | PUSHER_APP_KEY=
35 | PUSHER_APP_SECRET=
36 | PUSHER_APP_CLUSTER=mt1
37 |
38 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
39 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
40 |
41 | API_PREFIX=api
42 | API_SUBTYPE=app
43 | API_VERSION=v1
44 |
45 | SIGN_UP_RELEASE_TOKEN=false
46 | PASSWORD_RESET_RELEASE_TOKEN=false
47 |
48 | JWT_SECRET=zK9WgxqDBG4dMnrDuqyY9LzZWvzjOCk8
49 |
--------------------------------------------------------------------------------
/laravel/env.pro:
--------------------------------------------------------------------------------
1 | APP_NAME=WLL
2 | APP_ENV=local
3 | APP_KEY=base64:B8CRetjQBe2GUEO0u3c+p3nQGFnq/sbPlrG5nWWUub0=
4 | APP_DEBUG=true
5 | APP_URL=http://localhost
6 |
7 | LOG_CHANNEL=stack
8 |
9 | DB_CONNECTION=mysql
10 | DB_HOST=127.0.0.1
11 | DB_PORT=3306
12 | DB_DATABASE=mydbname
13 | DB_USERNAME=mydbusername
14 | DB_PASSWORD=mydbpassword
15 |
16 | BROADCAST_DRIVER=log
17 | CACHE_DRIVER=file
18 | SESSION_DRIVER=file
19 | SESSION_LIFETIME=120
20 | QUEUE_DRIVER=sync
21 |
22 | REDIS_HOST=127.0.0.1
23 | REDIS_PASSWORD=null
24 | REDIS_PORT=6379
25 |
26 | MAIL_DRIVER=smtp
27 | MAIL_HOST=smtp.mailtrap.io
28 | MAIL_PORT=2525
29 | MAIL_USERNAME=null
30 | MAIL_PASSWORD=null
31 | MAIL_ENCRYPTION=null
32 |
33 | PUSHER_APP_ID=
34 | PUSHER_APP_KEY=
35 | PUSHER_APP_SECRET=
36 | PUSHER_APP_CLUSTER=mt1
37 |
38 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
39 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
40 |
41 | API_PREFIX=api
42 | API_SUBTYPE=app
43 | API_VERSION=v1
44 |
45 | SIGN_UP_RELEASE_TOKEN=false
46 | PASSWORD_RESET_RELEASE_TOKEN=false
47 |
48 | JWT_SECRET=zK9WgxqDBG4dMnrDuqyY9LzZWvzjOCk8
49 |
--------------------------------------------------------------------------------
/laravel/.env.example:
--------------------------------------------------------------------------------
1 | APP_NAME=WLL
2 | APP_ENV=local
3 | APP_KEY=base64:B8CRetjQBe2GUEO0u3c+p3nQGFnq/sbPlrG5nWWUub0=
4 | APP_DEBUG=true
5 | APP_URL=http://localhost
6 |
7 | LOG_CHANNEL=stack
8 |
9 | DB_CONNECTION=mysql
10 | DB_HOST=8.8.8.8
11 | DB_PORT=3306
12 | DB_DATABASE=mydbname
13 | DB_USERNAME=mydbusername
14 | DB_PASSWORD=mydbpassword
15 |
16 | BROADCAST_DRIVER=log
17 | CACHE_DRIVER=file
18 | SESSION_DRIVER=file
19 | SESSION_LIFETIME=120
20 | QUEUE_DRIVER=sync
21 |
22 | REDIS_HOST=127.0.0.1
23 | REDIS_PASSWORD=null
24 | REDIS_PORT=6379
25 |
26 | MAIL_DRIVER=smtp
27 | MAIL_HOST=smtp.mailtrap.io
28 | MAIL_PORT=2525
29 | MAIL_USERNAME=null
30 | MAIL_PASSWORD=null
31 | MAIL_ENCRYPTION=null
32 |
33 | PUSHER_APP_ID=
34 | PUSHER_APP_KEY=
35 | PUSHER_APP_SECRET=
36 | PUSHER_APP_CLUSTER=mt1
37 |
38 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
39 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
40 |
41 | API_PREFIX=api
42 | API_SUBTYPE=app
43 | API_VERSION=v1
44 |
45 | SIGN_UP_RELEASE_TOKEN=false
46 | PASSWORD_RESET_RELEASE_TOKEN=false
47 |
48 | JWT_SECRET=zK9WgxqDBG4dMnrDuqyY9LzZWvzjOCk8
49 |
--------------------------------------------------------------------------------
/lavas/store/scrollBehavior.js:
--------------------------------------------------------------------------------
1 | export const SET_PAGE_SCROLL_POSITION = 'SET_PAGE_SCROLL_POSITION';
2 |
3 | export const state = () => {
4 | return {
5 | /**
6 | * 保存页面滚动位置,以 `route.fullPath` 为键
7 | * {'/': 0, '/detail/1': 100, '/detail/2': 200}
8 | *
9 | * @type {Object}
10 | */
11 | scrollPostionMap: {}
12 | };
13 | };
14 |
15 | export const mutations = {
16 | [SET_PAGE_SCROLL_POSITION](state, {pageId, scrollPosition}) {
17 | state.scrollPostionMap = {
18 | ...state.scrollPostionMap,
19 | [pageId]: scrollPosition
20 | };
21 | }
22 | };
23 |
24 | export const actions = {
25 | /**
26 | * 保存页面滚动位置
27 | *
28 | * @param {Function} commit commit
29 | * @param {Object} payload
30 | * @param {string} payload.pageId 页面 ID
31 | * @param {Object} payload.scrollPosition 滚动位置对象 {x:, y:}
32 | */
33 | savePageScrollPosition({commit}, {pageId, scrollPosition}) {
34 | commit(SET_PAGE_SCROLL_POSITION, {pageId, scrollPosition});
35 | }
36 | };
37 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 pailjin
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/laravel/database/migrations/2018_06_09_195009_create_pclogin_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
18 | $table->timestamps();
19 |
20 | $table->string('scene', 45)->nullable()->comment('微信qr的scene参数');
21 | $table->string('openid', 100)->nullable()->comment('微信openid');
22 | $table->string('status', 45)->nullable()->comment('登录状态:创建,使用中,允许,已使用,超时, 拒绝');
23 | $table->integer('user_id')->unsigned()->comment('创建用户users表中的userid');
24 |
25 | });
26 | }
27 |
28 | /**
29 | * Reverse the migrations.
30 | *
31 | * @return void
32 | */
33 | public function down()
34 | {
35 | Schema::dropIfExists('pclogin');
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/lavas/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 pail
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/laravel/config/compile.php:
--------------------------------------------------------------------------------
1 | [
17 | //
18 | ],
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Compiled File Providers
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may list service providers which define a "compiles" function
26 | | that returns additional files that should be compiled, providing an
27 | | easy way to get common files from any packages you are utilizing.
28 | |
29 | */
30 |
31 | 'providers' => [
32 | //
33 | ],
34 |
35 | ];
36 |
--------------------------------------------------------------------------------
/laravel/config/services.php:
--------------------------------------------------------------------------------
1 | [
18 | 'domain' => env('MAILGUN_DOMAIN'),
19 | 'secret' => env('MAILGUN_SECRET'),
20 | ],
21 |
22 | 'ses' => [
23 | 'key' => env('SES_KEY'),
24 | 'secret' => env('SES_SECRET'),
25 | 'region' => 'us-east-1',
26 | ],
27 |
28 | 'sparkpost' => [
29 | 'secret' => env('SPARKPOST_SECRET'),
30 | ],
31 |
32 | 'stripe' => [
33 | 'model' => App\User::class,
34 | 'key' => env('STRIPE_KEY'),
35 | 'secret' => env('STRIPE_SECRET'),
36 | ],
37 |
38 | ];
39 |
--------------------------------------------------------------------------------
/laravel/config/view.php:
--------------------------------------------------------------------------------
1 | [
17 | realpath(base_path('resources/views')),
18 | ],
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Compiled View Path
23 | |--------------------------------------------------------------------------
24 | |
25 | | This option determines where all the compiled Blade templates will be
26 | | stored for your application. Typically, this is within the storage
27 | | directory. However, as usual, you are free to change this value.
28 | |
29 | */
30 |
31 | 'compiled' => realpath(storage_path('framework/views')),
32 |
33 | ];
34 |
--------------------------------------------------------------------------------
/laravel/tests/Functional/Api/V1/Controllers/LogoutControllerTest.php:
--------------------------------------------------------------------------------
1 | 'Test',
20 | 'email' => 'test@email.com',
21 | 'password' => '123456'
22 | ]);
23 |
24 | $user->save();
25 | }
26 |
27 | public function testLogout()
28 | {
29 | $response = $this->post('api/auth/login', [
30 | 'email' => 'test@email.com',
31 | 'password' => '123456'
32 | ]);
33 |
34 | $response->assertStatus(200);
35 |
36 | $responseJSON = json_decode($response->getContent(), true);
37 | $token = $responseJSON['token'];
38 |
39 | $this->post('api/auth/logout?token=' . $token, [], [])->assertStatus(200);
40 | $this->post('api/auth/logout?token=' . $token, [], [])->assertStatus(401);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/laravel/tests/Functional/Api/V1/Controllers/UserControllerTest.php:
--------------------------------------------------------------------------------
1 | 'Test',
20 | 'email' => 'test@email.com',
21 | 'password' => '123456'
22 | ]);
23 |
24 | $user->save();
25 | }
26 |
27 | public function testMe()
28 | {
29 | $response = $this->post('api/auth/login', [
30 | 'email' => 'test@email.com',
31 | 'password' => '123456'
32 | ]);
33 |
34 | $response->assertStatus(200);
35 |
36 | $responseJSON = json_decode($response->getContent(), true);
37 | $token = $responseJSON['token'];
38 |
39 | $this->get('api/auth/me?token=' . $token, [], [])->assertJson([
40 | 'name' => 'Test',
41 | 'email' => 'test@email.com'
42 | ])->isOk();
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/laravel/bootstrap/autoload.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
44 |
45 |
54 |
--------------------------------------------------------------------------------
/laravel/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 | ./tests
14 |
15 |
16 |
17 |
18 | ./app
19 |
20 | ./app/Http/routes.php
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/lavas/core/service-worker.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @file service-worker.js with workbox api
3 | * @desc [example](https://workbox-samples.glitch.me/examples/workbox-sw/)
4 | * @author pail(pail@techcopemate.net)
5 | */
6 |
7 | /* globals WorkboxSW */
8 |
9 | const workboxSW = new WorkboxSW({
10 | cacheId: 'lavas-cache',
11 | ignoreUrlParametersMatching: [/^utm_/],
12 | skipWaiting: true,
13 | clientsClaim: true
14 | });
15 |
16 | // Define precache injection point.
17 | workboxSW.precache([]);
18 |
19 | /**
20 | * example runningCache with api
21 | */
22 | // workboxSW.router.registerRoute(/^https:\/\/lavas\.baidu\.com\/some\/api/,
23 | // workboxSW.strategies.networkFirst());
24 |
25 |
26 | /**
27 | * example runningCache with resources from CDN
28 | * including maxAge, maxEntries
29 | * cacheableResponse is important for CDN
30 | */
31 | // workboxSW.router.registerRoute(/^https:\/\/cdn\.baidu\.com/i,
32 | // workboxSW.strategies.cacheFirst({
33 | // cacheName: 'lavas-cache-images',
34 | // cacheExpiration: {
35 | // maxEntries: 100,
36 | // maxAgeSeconds: 7 * 24 * 60 * 60
37 | // },
38 | // cacheableResponse: {
39 | // statuses: [0, 200]
40 | // }
41 | // })
42 | // );
43 |
--------------------------------------------------------------------------------
/lavas/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "pwa-lavas-admin",
3 | "version": "0.0.1",
4 | "description": "这是一个 Lavas PWA 项目",
5 | "author": "pail ",
6 | "private": true,
7 | "lavas": {
8 | "core": "lavas-core-vue",
9 | "version": "2"
10 | },
11 | "scripts": {
12 | "dev": "lavas dev",
13 | "build": "lavas build",
14 | "start": "lavas start",
15 | "lint": "fecs ./ --rule --type 'vue,js,css'"
16 | },
17 | "dependencies": {
18 | "array-includes": "^3.0.3",
19 | "array.prototype.find": "^2.0.4",
20 | "axios": "^0.18.0",
21 | "es6-promise": "^4.1.1",
22 | "lavas-core-vue": "^1.1.11",
23 | "mint-ui": "^2.2.13",
24 | "muse-ui": "^2.1.0",
25 | "normalize.css": "^7.0.0"
26 | },
27 | "devDependencies": {
28 | "autoprefixer": "^7.2.5",
29 | "babel-preset-vue-app": "^1.3.1",
30 | "express": "^4.16.2",
31 | "http-proxy-middleware": "^0.17.4",
32 | "stoppable": "^1.0.4"
33 | },
34 | "engines": {
35 | "node": ">= 6.9.0",
36 | "npm": ">= 3.0.0"
37 | },
38 | "browserslist": [
39 | "> 1%",
40 | "last 2 versions",
41 | "not ie <= 8"
42 | ]
43 | }
44 |
--------------------------------------------------------------------------------
/laravel/resources/views/errors/503.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Be right back.
5 |
6 |
7 |
8 |
39 |
40 |
41 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/laravel/app/Api/V1/Controllers/LoginController.php:
--------------------------------------------------------------------------------
1 | only(['email', 'password']);
25 |
26 | try {
27 | $token = Auth::guard()->attempt($credentials);
28 |
29 | if(!$token) {
30 | throw new AccessDeniedHttpException();
31 | }
32 |
33 | } catch (JWTException $e) {
34 | throw new HttpException(500);
35 | }
36 |
37 | return response()
38 | ->json([
39 | 'status' => 'ok',
40 | 'token' => $token,
41 | 'expires_in' => Auth::guard()->factory()->getTTL() * 60
42 | ]);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/laravel/app/Api/V1/Controllers/ForgotPasswordController.php:
--------------------------------------------------------------------------------
1 | get('email'))->first();
17 |
18 | if(!$user) {
19 | throw new NotFoundHttpException();
20 | }
21 |
22 | $broker = $this->getPasswordBroker();
23 | $sendingResponse = $broker->sendResetLink($request->only('email'));
24 |
25 | if($sendingResponse !== Password::RESET_LINK_SENT) {
26 | throw new HttpException(500);
27 | }
28 |
29 | return response()->json([
30 | 'status' => 'ok'
31 | ], 200);
32 | }
33 |
34 | /**
35 | * Get the broker to be used during password reset.
36 | *
37 | * @return \Illuminate\Contracts\Auth\PasswordBroker
38 | */
39 | private function getPasswordBroker()
40 | {
41 | return Password::broker();
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/lavas/store/user.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios';
2 |
3 | export const state = () => ({
4 | global_userlist:{}
5 | });
6 |
7 | export const mutations = {
8 | SET_NEW_USER_LIST(state,userlist){
9 | var saveData = []
10 | if(state.global_userlist.data){
11 | saveData = state.global_userlist.data
12 | }
13 | var tmpuserlist = userlist;
14 | if(saveData.length==0){
15 | tmpuserlist.data = userlist.data
16 | }else{
17 | tmpuserlist.data = saveData.concat(userlist.data)
18 | }
19 |
20 | state.global_userlist = tmpuserlist;
21 | },
22 | CLEAN_NEW_USER_LIST(state,userlist){
23 | state.global_userlist = {};
24 | }
25 |
26 | };
27 | export const actions = {
28 | async getUserlist({commit}, params){//params == { token, page}
29 | if(params.page<=1){
30 | commit('CLEAN_NEW_USER_LIST',{})
31 | }
32 | let new_token = params.token;
33 | let url = 'https://api.abc.com/api/auth/getuserlistpage?token='+new_token+'&page='+params.page;
34 |
35 | axios.get(url)
36 | .then(function (listresult) {
37 | console.log("listresult===",listresult);
38 | if(listresult.data && listresult.data.status=='ok'){
39 | var newuserlist = listresult.data.ret
40 | commit('SET_NEW_USER_LIST',newuserlist)
41 | }
42 | })
43 | .catch(function (error) {
44 | console.log(error);
45 | });
46 | }
47 | };
48 |
--------------------------------------------------------------------------------
/laravel/app/Http/Middleware/checkadmin.php:
--------------------------------------------------------------------------------
1 | is('admin/*')
10 | /*
11 | The path method returns the request's path information.
12 | So, if the incoming request is targeted at http://domain.com/foo/bar,
13 | the path method will return foo/bar:
14 |
15 | $uri = $request->path();
16 | */
17 | use Auth;
18 | use App\User;
19 |
20 | class checkadmin
21 | {
22 | /**
23 | * Handle an incoming request.
24 | *
25 | * @param \Illuminate\Http\Request $request
26 | * @param \Closure $next
27 | * @return mixed
28 | */
29 | public function handle($request, Closure $next)
30 | {
31 | // 用户等级:0 无效,10 普通user, 20 管理员 30 员工
32 | if ($request->isMethod('post')) {
33 | if($request->get('userlevel')){
34 | $user_id = Auth::id();
35 | if($user_id){
36 | $user = User::find($user_id);
37 | if($user){
38 | if($user->userlevel != 20){
39 | return response()->json([
40 | 'status' => 'ko',
41 | 'ret' => 'not admin'
42 | ], 201);
43 | }
44 |
45 | }
46 |
47 | }
48 |
49 | }
50 | }
51 |
52 | return $next($request);
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/laravel/tests/Functional/Api/V1/Controllers/SignUpControllerTest.php:
--------------------------------------------------------------------------------
1 | post('api/auth/signup', [
16 | 'name' => 'Test User',
17 | 'email' => 'test@email.com',
18 | 'password' => '123456'
19 | ])->assertJson([
20 | 'status' => 'ok'
21 | ])->assertStatus(201);
22 | }
23 |
24 | public function testSignUpSuccessfullyWithTokenRelease()
25 | {
26 | Config::set('boilerplate.sign_up.release_token', true);
27 |
28 | $this->post('api/auth/signup', [
29 | 'name' => 'Test User',
30 | 'email' => 'test@email.com',
31 | 'password' => '123456'
32 | ])->assertJsonStructure([
33 | 'status', 'token'
34 | ])->assertJson([
35 | 'status' => 'ok'
36 | ])->assertStatus(201);
37 | }
38 |
39 | public function testSignUpReturnsValidationError()
40 | {
41 | $this->post('api/auth/signup', [
42 | 'name' => 'Test User',
43 | 'email' => 'test@email.com'
44 | ])->assertJsonStructure([
45 | 'error'
46 | ])->assertStatus(422);
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/laravel/tests/Functional/Api/V1/Controllers/ForgotPasswordControllerTest.php:
--------------------------------------------------------------------------------
1 | 'Test',
19 | 'email' => 'test@email.com',
20 | 'password' => '123456'
21 | ]);
22 |
23 | $user->save();
24 | }
25 |
26 | public function testForgotPasswordRecoverySuccessfully()
27 | {
28 | $this->post('api/auth/recovery', [
29 | 'email' => 'test@email.com'
30 | ])->assertJson([
31 | 'status' => 'ok'
32 | ])->isOk();
33 | }
34 |
35 | public function testForgotPasswordRecoveryReturnsUserNotFoundError()
36 | {
37 | $this->post('api/auth/recovery', [
38 | 'email' => 'unknown@email.com'
39 | ])->assertJsonStructure([
40 | 'error'
41 | ])->assertStatus(404);
42 | }
43 |
44 | public function testForgotPasswordRecoveryReturnsValidationErrors()
45 | {
46 | $this->post('api/auth/recovery', [
47 | 'email' => 'i am not an email'
48 | ])->assertJsonStructure([
49 | 'error'
50 | ])->assertStatus(422);
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/lavas/lavas.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lavas config
3 | * @author pail(pail@techcopemate.net)
4 | */
5 |
6 | 'use strict';
7 |
8 | const path = require('path');
9 | const BUILD_PATH = path.resolve(__dirname, 'dist');
10 | const isDev = process.env.NODE_ENV === 'development';
11 | const isProd = process.env.NODE_ENV === 'production';
12 |
13 | module.exports = {
14 | build: {
15 | ssr: false,
16 | path: BUILD_PATH,
17 | publicPath: '/',
18 | ssrCopy: isDev ? [] : [
19 | {
20 | src: 'server.prod.js'
21 | },
22 | {
23 | src: 'package.json'
24 | }
25 | ]
26 | },
27 | router: {
28 | mode: 'history',
29 | base: '/',
30 | pageTransition: {
31 | type: 'fade',
32 | transitionClass: 'fade'
33 | }
34 | },
35 | serviceWorker: {
36 | swSrc: path.join(__dirname, 'core/service-worker.js'),
37 | swDest: path.join(BUILD_PATH, 'service-worker.js'),
38 | // swPath: '/custom_path/', // specify custom serveice worker file's path, default is publicPath
39 | globDirectory: BUILD_PATH,
40 | globPatterns: [
41 | '**/*.{html,js,css,eot,svg,ttf,woff}'
42 | ],
43 | globIgnores: [
44 | 'sw-register.js',
45 | '**/*.map'
46 | ],
47 | appshellUrl: '/appshell',
48 | dontCacheBustUrlsMatching: /\.\w{8}\./
49 | }
50 | };
51 |
--------------------------------------------------------------------------------
/wechat/components/item/item.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{ itemLeft }}
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | {{ itemLeft }}
14 | {{ itemRight }}
15 |
16 |
17 |
18 |
19 |
20 | {{ itemLeft }}
21 | {{ itemRight }}
22 |
23 |
24 |
25 |
26 |
27 | {{ itemLeft }}
28 | {{ itemRight }}
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/laravel/tests/Functional/Api/V1/Controllers/RefreshControllerTest.php:
--------------------------------------------------------------------------------
1 | 'Test',
20 | 'email' => 'test@email.com',
21 | 'password' => '123456'
22 | ]);
23 |
24 | $user->save();
25 | }
26 |
27 | public function testRefresh()
28 | {
29 | $response = $this->post('api/auth/login', [
30 | 'email' => 'test@email.com',
31 | 'password' => '123456'
32 | ]);
33 |
34 | $response->assertStatus(200);
35 |
36 | $responseJSON = json_decode($response->getContent(), true);
37 | $token = $responseJSON['token'];
38 |
39 | $this->post('api/auth/refresh', [], [
40 | 'Authorization' => 'Bearer ' . $token
41 | ])->assertJsonStructure([
42 | 'status',
43 | 'token',
44 | 'expires_in'
45 | ])->isOk();
46 | }
47 |
48 | public function testRefreshWithError()
49 | {
50 | $response = $this->post('api/auth/refresh', [], [
51 | 'Authorization' => 'Bearer Wrong'
52 | ]);
53 |
54 | $response->assertStatus(500);
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/laravel/resources/assets/js/bootstrap.js:
--------------------------------------------------------------------------------
1 |
2 | window._ = require('lodash');
3 |
4 | /**
5 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support
6 | * for JavaScript based Bootstrap features such as modals and tabs. This
7 | * code may be modified to fit the specific needs of your application.
8 | */
9 |
10 | window.$ = window.jQuery = require('jquery');
11 | require('bootstrap-sass');
12 |
13 | /**
14 | * Vue is a modern JavaScript library for building interactive web interfaces
15 | * using reactive data binding and reusable components. Vue's API is clean
16 | * and simple, leaving you to focus on building your next great project.
17 | */
18 |
19 | window.Vue = require('vue');
20 | require('vue-resource');
21 |
22 | /**
23 | * We'll register a HTTP interceptor to attach the "CSRF" header to each of
24 | * the outgoing requests issued by this application. The CSRF middleware
25 | * included with Laravel will automatically verify the header's value.
26 | */
27 |
28 | Vue.http.interceptors.push((request, next) => {
29 | request.headers.set('X-CSRF-TOKEN', Laravel.csrfToken);
30 |
31 | next();
32 | });
33 |
34 | /**
35 | * Echo exposes an expressive API for subscribing to channels and listening
36 | * for events that are broadcast by Laravel. Echo and event broadcasting
37 | * allows your team to easily build robust real-time web applications.
38 | */
39 |
40 | // import Echo from "laravel-echo"
41 |
42 | // window.Echo = new Echo({
43 | // broadcaster: 'pusher',
44 | // key: 'your-pusher-key'
45 | // });
46 |
--------------------------------------------------------------------------------
/laravel/database/migrations/2018_06_09_193549_add_morefield_weixin_to_users_table.php:
--------------------------------------------------------------------------------
1 | integer('userlevel')->default(10)->comment('用户等级:0 无效,10 普通user, 20 管理员 30 员工');
19 | $table->string('nickname', 45)->nullable()->comment('昵称');
20 | $table->string('iconurl', 500)->nullable()->comment('头像的url,一般为七牛存储的图片路径');
21 | $table->string('sex', 45)->nullable()->comment('性别:男,女,保密');
22 | $table->string('phone', 45)->nullable()->comment('电话');
23 | $table->json('wxinfo')->nullable()->comment('微信用户信息json格式');
24 | });
25 | }
26 |
27 | /**
28 | * Reverse the migrations.
29 | *
30 | * @return void
31 | */
32 | public function down()
33 | {
34 | Schema::table('users', function (Blueprint $table) {
35 | //
36 | $table->dropColumn('userlevel');
37 | $table->dropColumn('nickname');
38 | $table->dropColumn('iconurl');
39 | $table->dropColumn('sex');
40 | $table->dropColumn('phone');
41 | $table->dropColumn('wxinfo');
42 | });
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/laravel/tests/Functional/Api/V1/Controllers/LoginControllerTest.php:
--------------------------------------------------------------------------------
1 | 'Test',
20 | 'email' => 'test@email.com',
21 | 'password' => '123456'
22 | ]);
23 |
24 | $user->save();
25 | }
26 |
27 | public function testLoginSuccessfully()
28 | {
29 | $this->post('api/auth/login', [
30 | 'email' => 'test@email.com',
31 | 'password' => '123456'
32 | ])->assertJson([
33 | 'status' => 'ok'
34 | ])->assertJsonStructure([
35 | 'status',
36 | 'token',
37 | 'expires_in'
38 | ])->isOk();
39 | }
40 |
41 | public function testLoginWithReturnsWrongCredentialsError()
42 | {
43 | $this->post('api/auth/login', [
44 | 'email' => 'unknown@email.com',
45 | 'password' => '123456'
46 | ])->assertJsonStructure([
47 | 'error'
48 | ])->assertStatus(403);
49 | }
50 |
51 | public function testLoginWithReturnsValidationError()
52 | {
53 | $this->post('api/auth/login', [
54 | 'email' => 'test@email.com'
55 | ])->assertJsonStructure([
56 | 'error'
57 | ])->assertStatus(422);
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/wechat/pages/ordermanager/ordermanager.js:
--------------------------------------------------------------------------------
1 | //获取应用实例
2 | const app = getApp()
3 |
4 | var sliderWidth = 96; // 需要设置slider的宽度,用于计算中间位置
5 |
6 | Page({
7 | data: {
8 | tabs: ["全部", "待付款", "待发货", "待收货"],
9 | activeIndex: 0,
10 | sliderOffset: 0,
11 | sliderLeft: 0,
12 | storeName: '墨刀小集市集市集市集市集市集市集市集市',
13 | orderStatus: '等待买家付款',
14 | orderNumber: '102390219302139',
15 | productName: '商品名称',
16 | productPrice: '233.00',
17 | productDesc: '商品描述商品描述商品描述商品描述商品描述',
18 | productNumber: '1',
19 | orderTotalPrice: '233.00'
20 | },
21 |
22 | onLoad: function(options) {
23 | // 生命周期函数--监听页面加载
24 | // console.log("test onLoad");
25 | var that = this;
26 | wx.getSystemInfo({
27 | success: function(res) {
28 | that.setData({
29 | sliderLeft: (res.windowWidth / that.data.tabs.length - sliderWidth) / 2,
30 | sliderOffset: res.windowWidth / that.data.tabs.length * that.data.activeIndex
31 | });
32 | }
33 | });
34 | },
35 |
36 | onReady: function() {
37 | // 生命周期函数--监听页面初次渲染完成
38 | // console.log("test onReady");
39 | },
40 |
41 | onShow: function() {
42 | // 生命周期函数--监听页面显示
43 | // console.log("test onShow");
44 | },
45 |
46 | onHide:function() {
47 | // 生命周期函数--监听页面隐藏
48 | // console.log("test onHide");
49 | },
50 |
51 | onUnload: function() {
52 | // 生命周期函数--监听页面卸载
53 | // console.log("test onUnload");
54 | },
55 |
56 | tabClick: function (e) {
57 | this.setData({
58 | sliderOffset: e.currentTarget.offsetLeft,
59 | activeIndex: e.currentTarget.id
60 | });
61 | }
62 |
63 | })
64 |
--------------------------------------------------------------------------------
/laravel/app/Api/V1/Controllers/qiniuController.php:
--------------------------------------------------------------------------------
1 | COMMON_AK = Config::get('qiniu.commonbuket.AK');
23 | $this->COMMON_SK = Config::get('qiniu.commonbuket.SK');
24 | $this->COMMON_BUKET_NAME = Config::get('qiniu.commonbuket.Name');
25 | // $this->middleware('jwt.auth', []);
26 | $exceptapi=[
27 | // 'uptoken'
28 | ];
29 | // $this->middleware('auth:api', ['except'=>$exceptapi]);
30 | $this->middleware('jwt.auth', ['except'=>$exceptapi]);
31 | }
32 | /**
33 | * qiniu router
34 | *
35 | *
36 | * @return \Illuminate\Http\JsonResponse
37 | */
38 | public function uptoken(Request $request)
39 | {
40 | $accessKey=$this->COMMON_AK;
41 | $secretKey=$this->COMMON_SK;
42 | $bucketName=$this->COMMON_BUKET_NAME;
43 |
44 | $auth = new Auth($accessKey, $secretKey);
45 | $token = $auth->uploadToken($bucketName);
46 |
47 | return response()
48 | ->json([
49 | 'uptoken' =>$token
50 | ]
51 | );
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/wechat/pages/modifyoperation/modifyoperation.js:
--------------------------------------------------------------------------------
1 | // 引入配置
2 | var config = require('../../config');
3 | var Util = require('../../utils/util.js');
4 | //获取应用实例
5 | const app = getApp()
6 |
7 | Page({
8 | data: {
9 | inputValue: '',
10 | fromKeyword: '',
11 | },
12 |
13 | onLoad: function(options) {
14 | // 生命周期函数--监听页面加载
15 | console.log("test onLoad",options);
16 | if (options && options.from) {
17 | console.log("test onLoad--options.query.from----",options.from);
18 | this.setData({
19 | fromKeyword: options.from,
20 | inputValue: options.orgvalue
21 | })
22 | }
23 | },
24 |
25 | onReady: function() {
26 | // 生命周期函数--监听页面初次渲染完成
27 | // console.log("test onReady");
28 | },
29 |
30 | onShow: function() {
31 | // 生命周期函数--监听页面显示
32 | // console.log("test onShow");
33 | },
34 |
35 | onHide:function() {
36 | // 生命周期函数--监听页面隐藏
37 | // console.log("test onHide");
38 | },
39 |
40 | onUnload: function() {
41 | // 生命周期函数--监听页面卸载
42 | // console.log("test onUnload");
43 | // wx.clearStorageSync(Util.ITEM_RETURN_VALUE, {})
44 | },
45 |
46 | onPullDownRefresh: function() {
47 | // 页面相关事件处理函数--监听用户下拉动作
48 | // console.log("test onPullDownRefresh");
49 | },
50 |
51 | onReachBottom: function() {
52 | // 页面上拉触底事件的处理函数
53 | // console.log("test onReachBottom");
54 | },
55 |
56 | bindReplaceInput: function(event) {
57 | // console.log(event.detail)
58 | //if (this.data.fromKeyword === 'listNickname') {
59 | wx.setStorageSync(Util.ITEM_RETURN_VALUE, {
60 | value: event.detail.value,
61 | ifchange: 1,
62 | tag: this.data.fromKeyword
63 | })
64 | //}
65 | }
66 | })
67 |
--------------------------------------------------------------------------------
/laravel/config/broadcasting.php:
--------------------------------------------------------------------------------
1 | env('BROADCAST_DRIVER', 'null'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Broadcast Connections
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may define all of the broadcast connections that will be used
26 | | to broadcast events to other systems or over websockets. Samples of
27 | | each available type of connection are provided inside this array.
28 | |
29 | */
30 |
31 | 'connections' => [
32 |
33 | 'pusher' => [
34 | 'driver' => 'pusher',
35 | 'key' => env('PUSHER_KEY'),
36 | 'secret' => env('PUSHER_SECRET'),
37 | 'app_id' => env('PUSHER_APP_ID'),
38 | 'options' => [
39 | //
40 | ],
41 | ],
42 |
43 | 'redis' => [
44 | 'driver' => 'redis',
45 | 'connection' => 'default',
46 | ],
47 |
48 | 'log' => [
49 | 'driver' => 'log',
50 | ],
51 |
52 | 'null' => [
53 | 'driver' => 'null',
54 | ],
55 |
56 | ],
57 |
58 | ];
59 |
--------------------------------------------------------------------------------
/laravel/bootstrap/app.php:
--------------------------------------------------------------------------------
1 | singleton(
30 | Illuminate\Contracts\Http\Kernel::class,
31 | App\Http\Kernel::class
32 | );
33 |
34 | $app->singleton(
35 | Illuminate\Contracts\Console\Kernel::class,
36 | App\Console\Kernel::class
37 | );
38 |
39 | $app->singleton(
40 | Illuminate\Contracts\Debug\ExceptionHandler::class,
41 | App\Exceptions\Handler::class
42 | );
43 |
44 | /*
45 | |--------------------------------------------------------------------------
46 | | Return The Application
47 | |--------------------------------------------------------------------------
48 | |
49 | | This script returns the application instance. The instance is given to
50 | | the calling script so we can separate the building of the instances
51 | | from the actual running of the application and sending responses.
52 | |
53 | */
54 |
55 | return $app;
56 |
--------------------------------------------------------------------------------
/laravel/artisan:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 | make(Illuminate\Contracts\Console\Kernel::class);
32 |
33 | $status = $kernel->handle(
34 | $input = new Symfony\Component\Console\Input\ArgvInput,
35 | new Symfony\Component\Console\Output\ConsoleOutput
36 | );
37 |
38 | /*
39 | |--------------------------------------------------------------------------
40 | | Shutdown The Application
41 | |--------------------------------------------------------------------------
42 | |
43 | | Once Artisan has finished running. We will fire off the shutdown events
44 | | so that any final work may be done by the application before we shut
45 | | down the process. This is the last thing to happen to the request.
46 | |
47 | */
48 |
49 | $kernel->terminate($input, $status);
50 |
51 | exit($status);
52 |
--------------------------------------------------------------------------------
/laravel/config/boilerplate.php:
--------------------------------------------------------------------------------
1 | [
7 |
8 | // this option must be set to true if you want to release a token
9 | // when your user successfully terminates the sign-in procedure
10 | 'release_token' => env('SIGN_UP_RELEASE_TOKEN', false),
11 |
12 | // here you can specify some validation rules for your sign-in request
13 | 'validation_rules' => [
14 | 'name' => 'required',
15 | 'email' => 'required|email',
16 | 'password' => 'required'
17 | ]
18 | ],
19 |
20 | // these options are related to the login procedure
21 | 'login' => [
22 |
23 | // here you can specify some validation rules for your login request
24 | 'validation_rules' => [
25 | 'email' => 'required|email',
26 | 'password' => 'required'
27 | ]
28 | ],
29 |
30 | // these options are related to the password recovery procedure
31 | 'forgot_password' => [
32 |
33 | // here you can specify some validation rules for your password recovery procedure
34 | 'validation_rules' => [
35 | 'email' => 'required|email'
36 | ]
37 | ],
38 |
39 | // these options are related to the password recovery procedure
40 | 'reset_password' => [
41 |
42 | // this option must be set to true if you want to release a token
43 | // when your user successfully terminates the password reset procedure
44 | 'release_token' => env('PASSWORD_RESET_RELEASE_TOKEN', false),
45 |
46 | // here you can specify some validation rules for your password recovery procedure
47 | 'validation_rules' => [
48 | 'token' => 'required',
49 | 'email' => 'required|email',
50 | 'password' => 'required|confirmed'
51 | ]
52 | ]
53 |
54 | ];
55 |
--------------------------------------------------------------------------------
/lavas/core/ssr.html.tmpl:
--------------------------------------------------------------------------------
1 |
2 |
3 | << meta = meta.inject() >>
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{{ meta.title.text() }}}
11 | {{{ meta.meta.text() }}}
12 | {{{ meta.link.text() }}}
13 | {{{ meta.style.text() }}}
14 | {{{ meta.script.text() }}}
15 | {{{ meta.noscript.text() }}}
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | << if (isProd) { >>
28 |
38 | << } >>
39 |
40 |
41 |
--------------------------------------------------------------------------------
/wechat/pages/index/index.wxss:
--------------------------------------------------------------------------------
1 |
2 | .index-part1-data {
3 | padding-top: 20rpx;
4 | font-size: 28rpx;
5 | color: #999;
6 | }
7 |
8 | .index-part1-over {
9 | background: #e5246d;
10 | padding: 20rpx;
11 | color: #fff;
12 | }
13 |
14 | .index-part1-overtime {
15 | padding-top: 16rpx;
16 | }
17 |
18 | .index-part2-prodcutimg {
19 | width: 100%;
20 | height: 400rpx;
21 | }
22 |
23 | .index-part3-finger {
24 | width: 80rpx;
25 | height: 80rpx;
26 | }
27 |
28 | .float-btn {
29 | color: #ffffff;
30 | position: fixed;
31 | display: flex;
32 | align-items: center;
33 | justify-content: center;
34 | bottom: 20rpx;
35 | right: 20rpx;
36 | font-size: 28rpx;
37 | background: #3fb207;
38 | }
39 |
40 | .float-btn-part {
41 | padding: 20rpx 40rpx;
42 | }
43 |
44 | .float-btn-part-image {
45 | width: 50rpx;
46 | height: 50rpx;
47 | }
48 |
49 | /*.index-adv {
50 | margin-bottom: 84rpx;
51 | }
52 |
53 |
54 |
55 | .index-adv-title {
56 | margin-top: 10rpx;
57 | }
58 |
59 | .index-content {
60 | padding: 20rpx;
61 | }
62 |
63 | .index-content-part1-prodcutimg {
64 | width: 100%;
65 | height: 400rpx;
66 | }
67 |
68 | .index-content-part2-productitle {
69 | -webkit-line-clamp:2;
70 | }
71 |
72 | .marginright12 {
73 | margin-right: 12rpx;
74 | }
75 |
76 | .marginright20 {
77 | margin-right: 20rpx;
78 | }
79 |
80 | .index-content-part4-leftcontent {
81 | width: 512rpx;
82 | }
83 |
84 | .index-content-part4-rightcontent {
85 | width: 200rpx;
86 | }*/
87 |
88 |
89 | /*.userinfo {
90 | display: flex;
91 | flex-direction: column;
92 | align-items: center;
93 | }
94 |
95 | .userinfo-avatar {
96 | width: 128rpx;
97 | height: 128rpx;
98 | margin: 20rpx;
99 | border-radius: 50%;
100 | }
101 |
102 | .userinfo-nickname {
103 | color: #aaa;
104 | }
105 |
106 | .usermotto {
107 | margin-top: 200px;
108 | }*/
109 |
--------------------------------------------------------------------------------
/wechat/app.wxss:
--------------------------------------------------------------------------------
1 | /**app.wxss**/
2 | @import 'weui.wxss';
3 |
4 | /*page{
5 | background-color: #ccc;
6 | height:100%;
7 | }*/
8 |
9 | .container {
10 | margin: 30rpx;
11 | border: 1px solid #ccc;
12 | background: #fff;
13 | }
14 |
15 | .overflowdot {
16 | overflow:hidden;
17 | text-overflow:ellipsis;
18 | display:-webkit-box;
19 | -webkit-box-orient:vertical;
20 | -webkit-line-clamp:1;
21 | }
22 |
23 | .postionstatic {
24 | position: static;
25 | }
26 |
27 | .floatleft {
28 | float: left;
29 | }
30 |
31 | .clearfloat {
32 | overflow: hidden;
33 | }
34 |
35 | .fontsize36 {
36 | font-size: 36rpx;
37 | }
38 |
39 | .fontsize32 {
40 | font-size: 32rpx;
41 | }
42 |
43 | .fontsize30 {
44 | font-size: 30rpx;
45 | }
46 |
47 | .fontsize28 {
48 | font-size: 28rpx;
49 | }
50 |
51 | .color666 {
52 | color: #666;
53 | }
54 |
55 | .color999 {
56 | color: #999;
57 | }
58 |
59 | .colored {
60 | color: red;
61 | }
62 |
63 | .orignalpricethroughline {
64 | text-decoration: line-through
65 | }
66 |
67 | .bgcolor3fb207 {
68 | background: #3fb207;
69 | }
70 |
71 | .borderbottom {
72 | border-bottom: 1px solid #ccc;
73 | }
74 |
75 | .textright {
76 | text-align: right;
77 | }
78 |
79 | /*.container {
80 | height: 100%;
81 | display: flex;
82 | flex-direction: column;
83 | align-items: center;
84 | justify-content: space-between;
85 | padding: 200rpx 0;
86 | box-sizing: border-box;
87 | }
88 |
89 | .colore84e2a {
90 | color: #e84e2a;
91 | }
92 |
93 | .color999 {
94 | color: #999;
95 | }
96 |
97 | .fontsize30 {
98 | font-size: 30rpx;
99 | }
100 |
101 | .fontsize40 {
102 | font-size: 40rpx;
103 | }
104 |
105 | .margintop30 {
106 | margin-top: 30rpx;
107 | }
108 |
109 |
110 |
111 | .clearfloat:after {
112 | content: ".";
113 | display: block;
114 | height: 0;
115 | clear: both;
116 | visibility: hidden;
117 | }
118 | */
119 |
--------------------------------------------------------------------------------
/laravel/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "francescomalatesta/laravel-api-boilerplate-jwt",
3 | "description": "An API Boilerplate to create a ready-to-use REST API in seconds.",
4 | "keywords": ["laravel", "api", "boilerplate", "jwt", "auth", "rest"],
5 | "license": "MIT",
6 | "type": "project",
7 | "require": {
8 | "php": ">=7.1.3",
9 | "barryvdh/laravel-cors": "0.11.*",
10 | "dingo/api": "2.0.0-alpha1",
11 | "fideloper/proxy": "^4.0",
12 | "guzzlehttp/guzzle": "^6.3",
13 | "laravel/framework": "5.6.*",
14 | "laravel/tinker": "^1.0",
15 | "nesbot/carbon": "^1.29",
16 | "qiniu/php-sdk": "^7.2",
17 | "tymon/jwt-auth": "1.0.*"
18 | },
19 | "require-dev": {
20 | "filp/whoops": "^2.0",
21 | "fzaninotto/faker": "^1.4",
22 | "mockery/mockery": "^1.0",
23 | "nunomaduro/collision": "^2.0",
24 | "phpunit/phpunit": "^7.0"
25 | },
26 | "autoload": {
27 | "classmap": [
28 | "database"
29 | ],
30 | "psr-4": {
31 | "App\\": "app/"
32 | }
33 | },
34 | "autoload-dev": {
35 | "psr-4": {
36 | "App\\": "tests/"
37 | }
38 | },
39 | "scripts": {
40 | "post-root-package-install": [
41 | "php -r \"file_exists('.env') || copy('.env.example', '.env');\""
42 | ],
43 | "post-create-project-cmd": [
44 | "php artisan key:generate",
45 | "php artisan jwt:secret -f"
46 | ],
47 | "post-install-cmd": [
48 | "Illuminate\\Foundation\\ComposerScripts::postInstall"
49 | ],
50 | "post-update-cmd": [
51 | "Illuminate\\Foundation\\ComposerScripts::postUpdate"
52 | ]
53 | },
54 | "config": {
55 | "preferred-install": "dist",
56 | "sort-packages": true,
57 | "optimize-autoloader": true
58 | },
59 | "minimum-stability": "dev",
60 | "prefer-stable": true
61 | }
62 |
--------------------------------------------------------------------------------
/laravel/public/index.php:
--------------------------------------------------------------------------------
1 |
8 | */
9 |
10 | /*
11 | |--------------------------------------------------------------------------
12 | | Register The Auto Loader
13 | |--------------------------------------------------------------------------
14 | |
15 | | Composer provides a convenient, automatically generated class loader for
16 | | our application. We just need to utilize it! We'll simply require it
17 | | into the script here so that we don't have to worry about manual
18 | | loading any of our classes later on. It feels nice to relax.
19 | |
20 | */
21 |
22 | require __DIR__.'/../bootstrap/autoload.php';
23 |
24 | /*
25 | |--------------------------------------------------------------------------
26 | | Turn On The Lights
27 | |--------------------------------------------------------------------------
28 | |
29 | | We need to illuminate PHP development, so let us turn on the lights.
30 | | This bootstraps the framework and gets it ready for use, then it
31 | | will load up this application so that we can run it and send
32 | | the responses back to the browser and delight our users.
33 | |
34 | */
35 |
36 | $app = require_once __DIR__.'/../bootstrap/app.php';
37 |
38 | /*
39 | |--------------------------------------------------------------------------
40 | | Run The Application
41 | |--------------------------------------------------------------------------
42 | |
43 | | Once we have the application, we can handle the incoming request
44 | | through the kernel, and send the associated response back to
45 | | the client's browser allowing them to enjoy the creative
46 | | and wonderful application we have prepared for them.
47 | |
48 | */
49 |
50 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
51 |
52 | $response = $kernel->handle(
53 | $request = Illuminate\Http\Request::capture()
54 | );
55 |
56 | $response->send();
57 |
58 | $kernel->terminate($request, $response);
59 |
--------------------------------------------------------------------------------
/laravel/app/Providers/RouteServiceProvider.php:
--------------------------------------------------------------------------------
1 | mapApiRoutes();
39 |
40 | $this->mapWebRoutes();
41 |
42 | //
43 | }
44 |
45 | /**
46 | * Define the "web" routes for the application.
47 | *
48 | * These routes all receive session state, CSRF protection, etc.
49 | *
50 | * @return void
51 | */
52 | protected function mapWebRoutes()
53 | {
54 | Route::group([
55 | 'middleware' => 'web',
56 | 'namespace' => $this->namespace,
57 | ], function ($router) {
58 | require base_path('routes/web.php');
59 | });
60 | }
61 |
62 | /**
63 | * Define the "api" routes for the application.
64 | *
65 | * These routes are typically stateless.
66 | *
67 | * @return void
68 | */
69 | protected function mapApiRoutes()
70 | {
71 | Route::group([
72 | 'middleware' => 'api',
73 | 'namespace' => $this->namespace,
74 | 'prefix' => 'api',
75 | ], function ($router) {
76 | require base_path('routes/api.php');
77 | });
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/lavas/pages/settings/Settings.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
65 |
66 |
78 |
--------------------------------------------------------------------------------
/laravel/app/User.php:
--------------------------------------------------------------------------------
1 | attributes['password'] = Hash::make($value);
41 | }
42 |
43 | /**
44 | * Get the identifier that will be stored in the subject claim of the JWT.
45 | *
46 | * @return mixed
47 | */
48 | public function getJWTIdentifier()
49 | {
50 | return $this->getKey();
51 | }
52 |
53 | /**
54 | * Return a key value array, containing any custom claims to be added to the JWT.
55 | *
56 | * @return array
57 | */
58 | public function getJWTCustomClaims()
59 | {
60 | return [];
61 | }
62 |
63 | //level : 0 无效,10 普通user, 20 管理员 30 员工
64 | public function getUserLevel($userid){
65 | $user = $this->find($userid);
66 | if($user){
67 | return $user->userlevel;
68 | }else{
69 | return 0;
70 | }
71 | }
72 |
73 | public function isAdmin($userid){
74 | $userlevel = $this->getUserLevel($userid);
75 | if($userlevel==20){
76 | return true;
77 | }else{
78 | return false;
79 | }
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/lavas/components/UpdateToast.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{ text }}
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
43 |
44 |
84 |
--------------------------------------------------------------------------------
/laravel/app/Exceptions/Handler.php:
--------------------------------------------------------------------------------
1 | expectsJson()) {
60 | return response()->json(['error' => 'Unauthenticated.'], 401);
61 | }
62 |
63 | return redirect()->guest('login');
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/wechat/app.js:
--------------------------------------------------------------------------------
1 | //app.js
2 | var config = require('./config');
3 | App({
4 | onLaunch: function () {
5 | // 展示本地存储能力
6 | var logs = wx.getStorageSync('logs') || []
7 | logs.unshift(Date.now())
8 | wx.setStorageSync('logs', logs)
9 | var _this = this;
10 | // 登录
11 | wx.login({
12 | success: res => {
13 | // 发送 res.code 到后台换取 openId, sessionKey, unionId
14 | wx.request({
15 | url: config.service.requestUrl+'/wxlogin/'+res.code, //仅为示例,并非真实的接口地址
16 | data: {
17 | },
18 | header: {
19 | 'content-type': 'application/json' // 默认值
20 | },
21 | method: 'GET',
22 | success: function(res) {
23 | console.log('wx.login---res==',res.data);
24 |
25 | if(res.data.status=='ok'){
26 | var ret = res.data.ret;
27 | _this.globalData.iflogin = true;
28 | _this.globalData.apitoken = ret.token;
29 | _this.globalData.userInfo = ret.userinfo;
30 | if (this.apiloginCallback) {
31 | this.apiloginCallback()
32 | }
33 | }else{
34 | _this.globalData.iflogin = false;
35 | _this.globalData.apitoken = '';
36 | _this.globalData.userInfo = null;
37 | }
38 | }
39 | })
40 |
41 | }
42 | })
43 | // 获取用户信息
44 | wx.getSetting({
45 | success: res => {
46 | if (res.authSetting['scope.userInfo']) {
47 | // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框
48 | wx.getUserInfo({
49 | success: res => {
50 | // 可以将 res 发送给后台解码出 unionId
51 | _this.globalData.wxuserInfo = res.userInfo
52 |
53 | // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
54 | // 所以此处加入 callback 以防止这种情况
55 | if (this.userInfoReadyCallback) {
56 | this.userInfoReadyCallback(res)
57 | }
58 | }
59 | })
60 | }
61 | }
62 | })
63 | },
64 | globalData: {
65 | userInfo: null,
66 | wxuserInfo:null,
67 | apitoken: '',
68 | iflogin:false
69 | }
70 | })
71 |
--------------------------------------------------------------------------------
/laravel/config/filesystems.php:
--------------------------------------------------------------------------------
1 | 'local',
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Default Cloud Filesystem Disk
21 | |--------------------------------------------------------------------------
22 | |
23 | | Many applications store files both locally and in the cloud. For this
24 | | reason, you may specify a default "cloud" driver here. This driver
25 | | will be bound as the Cloud disk implementation in the container.
26 | |
27 | */
28 |
29 | 'cloud' => 's3',
30 |
31 | /*
32 | |--------------------------------------------------------------------------
33 | | Filesystem Disks
34 | |--------------------------------------------------------------------------
35 | |
36 | | Here you may configure as many filesystem "disks" as you wish, and you
37 | | may even configure multiple disks of the same driver. Defaults have
38 | | been setup for each driver as an example of the required options.
39 | |
40 | | Supported Drivers: "local", "ftp", "s3", "rackspace"
41 | |
42 | */
43 |
44 | 'disks' => [
45 |
46 | 'local' => [
47 | 'driver' => 'local',
48 | 'root' => storage_path('app'),
49 | ],
50 |
51 | 'public' => [
52 | 'driver' => 'local',
53 | 'root' => storage_path('app/public'),
54 | 'visibility' => 'public',
55 | ],
56 |
57 | 's3' => [
58 | 'driver' => 's3',
59 | 'key' => 'your-key',
60 | 'secret' => 'your-secret',
61 | 'region' => 'your-region',
62 | 'bucket' => 'your-bucket',
63 | ],
64 |
65 | ],
66 |
67 | ];
68 |
--------------------------------------------------------------------------------
/laravel/app/Http/Kernel.php:
--------------------------------------------------------------------------------
1 | [
29 | \App\Http\Middleware\EncryptCookies::class,
30 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
31 | \Illuminate\Session\Middleware\StartSession::class,
32 | \Illuminate\View\Middleware\ShareErrorsFromSession::class,
33 | \App\Http\Middleware\VerifyCsrfToken::class,
34 | \Illuminate\Routing\Middleware\SubstituteBindings::class,
35 | ],
36 |
37 | 'api' => [
38 | 'throttle:60,1',
39 | 'bindings',
40 | ],
41 | ];
42 |
43 | /**
44 | * The application's route middleware.
45 | *
46 | * These middleware may be assigned to groups or used individually.
47 | *
48 | * @var array
49 | */
50 | protected $routeMiddleware = [
51 | 'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
52 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
53 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
54 | 'can' => \Illuminate\Auth\Middleware\Authorize::class,
55 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
56 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
57 |
58 | 'jwt.auth' => \Tymon\JWTAuth\Http\Middleware\Authenticate::class,
59 | 'jwt.refresh' => RefreshToken::class,
60 | 'checkadmin' => \App\Http\Middleware\checkadmin::class
61 | ];
62 | }
63 |
--------------------------------------------------------------------------------
/laravel/config/logging.php:
--------------------------------------------------------------------------------
1 | env('LOG_CHANNEL', 'stack'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Log Channels
21 | |--------------------------------------------------------------------------
22 | |
23 | | Here you may configure the log channels for your application. Out of
24 | | the box, Laravel uses the Monolog PHP logging library. This gives
25 | | you a variety of powerful log handlers / formatters to utilize.
26 | |
27 | | Available Drivers: "single", "daily", "slack", "syslog",
28 | | "errorlog", "custom", "stack"
29 | |
30 | */
31 |
32 | 'channels' => [
33 | 'stack' => [
34 | 'driver' => 'stack',
35 | 'channels' => ['single'],
36 | ],
37 |
38 | 'single' => [
39 | 'driver' => 'single',
40 | 'path' => storage_path('logs/laravel.log'),
41 | 'level' => 'debug',
42 | ],
43 |
44 | 'daily' => [
45 | 'driver' => 'daily',
46 | 'path' => storage_path('logs/laravel.log'),
47 | 'level' => 'debug',
48 | 'days' => 7,
49 | ],
50 |
51 | 'slack' => [
52 | 'driver' => 'slack',
53 | 'url' => env('LOG_SLACK_WEBHOOK_URL'),
54 | 'username' => 'Laravel Log',
55 | 'emoji' => ':boom:',
56 | 'level' => 'critical',
57 | ],
58 |
59 | 'syslog' => [
60 | 'driver' => 'syslog',
61 | 'level' => 'debug',
62 | ],
63 |
64 | 'errorlog' => [
65 | 'driver' => 'errorlog',
66 | 'level' => 'debug',
67 | ],
68 | ],
69 |
70 | ];
71 |
--------------------------------------------------------------------------------
/lavas/pages/Userdetail/_id.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
20 |
21 |
22 |
57 |
58 |
78 |
--------------------------------------------------------------------------------
/lavas/pages/Dashboard.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
20 |
21 |
22 |
57 |
58 |
78 |
--------------------------------------------------------------------------------
/lavas/assets/fonts/iconfont.eot:
--------------------------------------------------------------------------------
1 | � , � LP e1d i c o n f o n t R e g u l a r V e r s i o n 1 . 0 i c o n f o n t � 0GSUB���� 8 BOS/2V�H� | Vcmapϳl� � �glyf���� � �headh� � 6hhea�� � $hmtx��� � locan � �
2 | maxp ] name>T�} | mpost�i�� � = ��� \ �� d1e_<� �$�� �$������ � Q
3 |
4 | �
5 | , DFLT liga �� �� ��� � 2 PfEd @ x����� \� � � �� , h b ,
6 | h 6 x�<���� x�<���� 4 x x �<