Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 455a860

Browse files
author
mr.z
committed
merge develop
2 parents 965614a + a03545e commit 455a860

File tree

162 files changed

+7303
-3475
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+7303
-3475
lines changed

Func.php

Lines changed: 374 additions & 263 deletions
Large diffs are not rendered by default.

README.MD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@
129129
创建模块
130130

131131
`php artisan smart:install 模块名`
132+
133+
> 创建模块后,需要在 **.env** 文件中将模块加入到 *MODULE_EXT* 配置中,以逗号分隔
132134
133135
执行上面命令后,会在app目录下生成对应模块
134136

composer.json

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
{
2-
"name": "dominator88/laravel-smart",
2+
"name": "dominator88/laravel-smart",
33
"description": "后台管理系统.能快速度进行移动端开发.集成多个常见工具包.",
4-
"keywords": ["admin", "laravel" ,"grid" ,"api" ],
4+
"keywords": ["admin", "laravel", "grid", "api"],
55
"homepage": "https://github.com/dominator88/laravel-smart",
66
"license": "MIT",
7-
"authors": [
8-
{
9-
"name": "mr.z",
10-
"email": "[email protected]"
11-
}
12-
],
7+
"authors": [{
8+
"name": "mr.z",
9+
"email": "[email protected]"
10+
}],
1311
"type": "library",
1412
"require": {
1513
"php": ">=7.0.0",
@@ -20,8 +18,8 @@
2018
"guzzlehttp/guzzle": "^6.2@dev",
2119
"toplan/laravel-sms": "~2.6",
2220
"intervention/image": "^2.3@dev",
23-
"laravel/dusk": "^2.0@dev"
24-
21+
"laravel/dusk": "^2.0@dev",
22+
"overtrue/easy-sms": "1.1.*"
2523
},
2624
"require-dev": {
2725
"phpunit/phpunit": "~6.0"
@@ -35,7 +33,8 @@
3533
"psr-4": {
3634
"Smart\\": "src/"
3735

38-
},"files": [
36+
},
37+
"files": [
3938
"Func.php"
4039
]
4140
},
@@ -44,14 +43,13 @@
4443

4544

4645
},
47-
"classmap":[
46+
"classmap": [
4847
"tests/TestCase.php"
4948

5049
]
5150
},
5251
"extra": {
53-
54-
"laravel":{
52+
"laravel": {
5553
"providers": [
5654
"Smart\\SmartServiceProvider",
5755
"Intervention\\Image\\ImageServiceProvider"
@@ -64,4 +62,4 @@
6462

6563
}
6664

67-
}
65+
}

config/backend.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,20 @@
66
* Time: 11:07
77
*/
88
return [
9+
'version' => '2.0',
10+
911
'baseUri' => '/',
12+
13+
/*
14+
|--------------------------------------------------------------------------
15+
| Access via `https`
16+
|--------------------------------------------------------------------------
17+
|
18+
| 后台是否使用https
19+
|
20+
*/
21+
22+
'https' => env('BACKEND_HTTPS',false),
1023

1124
'projectName' => 'laravel-smart',
1225

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
use Illuminate\Support\Facades\Schema;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Database\Migrations\Migration;
6+
7+
class CreateUsersTable extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::create('users', function (Blueprint $table) {
17+
$table->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+
}

database/migrations/2017_10_20_100853_create_sys_func_table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function up()
1717
$table->increments('id');
1818
$table->integer('pid')->default(0);
1919
$table->tinyInteger('sort')->default(1);
20-
$table->enum('module' , ['backend' , 'mp']);
20+
$table->string('module',40);
2121
$table->tinyInteger('is_menu')->default(0);
2222
$table->tinyInteger('is_func')->default(0);
2323
$table->string('color')->nullable();
Lines changed: 36 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,42 @@
11
<?php
22

3-
use Illuminate\Support\Facades\Schema;
4-
use Illuminate\Database\Schema\Blueprint;
53
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
66

7-
class CreateSysUserTable extends Migration
8-
{
9-
/**
10-
* Run the migrations.
11-
*
12-
* @return void
13-
*/
14-
public function up()
15-
{
16-
Schema::create('sys_user' , function(Blueprint $table){
17-
$table->increments('id');
18-
$table->string('module')->default('backend');
19-
$table->string('username');
20-
$table->string('password');
21-
$table->string('icon')->nullable();
22-
$table->string('email')->nullable();
23-
$table->string('phone')->nullable();
24-
$table->tinyInteger('status')->default(1);
25-
$table->string('api_token')->nullable();
26-
$table->timestamps();
27-
$table->dateTime('signed_at')->nullable();
28-
$table->ipAddress('signed_ip')->nullable();
29-
$table->rememberToken()->nullable();
30-
$table->string('name')->nullable();
31-
$table->unique('email')->nullable();
32-
$table->unique('username')->nullable();
33-
});
34-
}
7+
class CreateSysUserTable extends Migration {
8+
/**
9+
* Run the migrations.
10+
*
11+
* @return void
12+
*/
13+
public function up() {
14+
Schema::create('sys_user', function (Blueprint $table) {
15+
$table->increments('id');
16+
$table->string('module')->default('backend');
17+
$table->string('username');
18+
$table->string('password');
19+
$table->string('icon')->nullable();
20+
$table->string('email')->nullable();
21+
$table->string('phone')->nullable();
22+
$table->tinyInteger('status')->default(1);
23+
$table->string('api_token', 64)->nullable();
24+
$table->timestamps();
25+
$table->dateTime('signed_at')->nullable();
26+
$table->ipAddress('signed_ip')->nullable();
27+
$table->rememberToken()->nullable();
28+
$table->string('name')->nullable();
29+
$table->unique('email')->nullable();
30+
$table->unique('username')->nullable();
31+
});
32+
}
3533

36-
/**
37-
* Reverse the migrations.
38-
*
39-
* @return void
40-
*/
41-
public function down()
42-
{
43-
Schema::dropIfExists('sys_user');
44-
}
34+
/**
35+
* Reverse the migrations.
36+
*
37+
* @return void
38+
*/
39+
public function down() {
40+
Schema::dropIfExists('sys_user');
41+
}
4542
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
6+
7+
class CreateSysUserDeviceTable extends Migration {
8+
/**
9+
* Run the migrations.
10+
*
11+
* @return void
12+
*/
13+
public function up() {
14+
Schema::create('sys_user_device', function (Blueprint $table) {
15+
$table->increments('id');
16+
$table->integer('user_id');
17+
18+
$table->enum('device', ['iphone', 'ipad', 'android', 'pc', 'mac', 'unknow'])->nullable();
19+
$table->string('device_os_version', 20)->nullable();
20+
$table->string('app_version', 20)->nullable();
21+
$table->string('api_version', 20)->nullable();
22+
$table->string('registration_id', 50)->nullable();
23+
$table->tinyInteger('for_test')->default(0)->comment('是否测试账户');
24+
$table->timestamps();
25+
});
26+
}
27+
28+
/**
29+
* Reverse the migrations.
30+
*
31+
* @return void
32+
*/
33+
public function down() {
34+
Schema::dropIfExists('sys_user_device');
35+
}
36+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
3+
use Illuminate\Support\Facades\Schema;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Database\Migrations\Migration;
6+
7+
class CreateMerUserAddressTable extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::create('mer_user_address', function (Blueprint $table) {
17+
18+
$table->increments('uid');
19+
$table->integer('user_id');
20+
$table->string('name' , 200)->nullable();
21+
$table->string('phone' , 20)->nullable();
22+
$table->integer('area_id');
23+
$table->string('address' , 500)->nullable();
24+
$table->string('postcode' , 10)->nullable();
25+
$table->tinyInteger('status' )->default(1);
26+
$table->tinyInteger('is_default' )->default(0);
27+
$table->timestamps();
28+
29+
});
30+
}
31+
32+
/**
33+
* Reverse the migrations.
34+
*
35+
* @return void
36+
*/
37+
public function down()
38+
{
39+
Schema::dropIfExists('mer_user_address');
40+
}
41+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<?php
2+
3+
use Illuminate\Support\Facades\Schema;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Database\Migrations\Migration;
6+
7+
class CreateMerGoodsTable extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::create('mer_goods', function (Blueprint $table) {
17+
$table->increments('id');
18+
$table->integer('sys_goods_id')->nullable();
19+
$table->integer('sys_goods_pid')->nullable();
20+
$table->integer('mer_id')->nullable();
21+
$table->integer('pid')->default(0);
22+
$table->integer('sort')->default(999);
23+
$table->string('sku' , 50)->nullable()->unique();
24+
$table->string('name' , 200)->unique();
25+
$table->integer('catalog_id')->default(0);
26+
$table->text('highlight' ,400)->nullable();
27+
$table->string('icon' ,200)->nullable();
28+
$table->string('desc' , 200)->nullable();
29+
$table->string('tags' , 300)->nullable();
30+
$table->dateTime('start_time')->nullable();
31+
$table->dateTime('end_time')->nullable();
32+
$table->enum('currency' , ['cny' , 'points'])->default('cny');
33+
$table->decimal('price_market',8,2)->default('0.00');
34+
$table->decimal('price',8,2)->default('0.00');
35+
$table->integer('points')->default(0);
36+
$table->tinyInteger('status')->default(1);
37+
$table->string('meta_title' , 100)->nullable();
38+
$table->string('meta_keywords' , 1000)->nullable();
39+
$table->string('meta_description' , 1000)->nullable();
40+
$table->tinyInteger('recommend' )->default(0);
41+
$table->tinyInteger('hot')->default(0);
42+
$table->tinyInteger('cheap')->default(0);
43+
$table->integer('sales')->default(0);
44+
$table->integer('comments')->default(0);
45+
$table->integer('pv')->default(0);
46+
47+
48+
$table->timestamps();
49+
});
50+
}
51+
52+
/**
53+
* Reverse the migrations.
54+
*
55+
* @return void
56+
*/
57+
public function down()
58+
{
59+
Schema::dropIfExists('mer_goods');
60+
}
61+
}

0 commit comments

Comments
 (0)