Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
300 changed files
with
39,879 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ | |
!/slimkit-plus-music | ||
!/slimkit-plus-news | ||
!/slimkit-plus-socialite | ||
!/zhiyicx-plus-pc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"presets": [ | ||
["env", { | ||
"targets": { | ||
"node": "6.10", | ||
"browsers": [ | ||
"last 2 versions", | ||
"not ie <= 8" | ||
] | ||
} | ||
}], | ||
"stage-2" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.yml] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.{js,vue}] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/.vscode | ||
vendor | ||
composer.lock | ||
node_modules | ||
yarn.lock | ||
.idea/ | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
<p align="center"><img src="https://github.com/slimkit/thinksns-plus/raw/master/public/plus.png"></p> | ||
|
||
## 说明 | ||
该程序为[ThinkSNS Plus](https://github.com/slimkit/thinksns-plus/)的Web应用拓展包 | ||
|
||
## 技术要求 | ||
- Laravel Blade | ||
- HTML5 + CSS3 | ||
- JavaScript | ||
- jQuery | ||
- Lodash | ||
- Axios | ||
- Dexie | ||
|
||
## 目录结构 | ||
根目录 | ||
- `config` | ||
- `database` | ||
- `resources` | ||
- `routes ` | ||
- `src` | ||
|
||
`database` 目录 | ||
|
||
存放数据库迁移文件 | ||
|
||
`resources` 目录 | ||
|
||
assets目录包含前后台的静态资源文件,views目录包含所有的Blade模板文件 | ||
|
||
`routes` 目录 | ||
|
||
包含前后台的路由定义文件 | ||
|
||
`src` 目录 | ||
|
||
包含前后台控制器,模型,视图Composer文件 | ||
|
||
## 安装 | ||
1. 首先需要安装[ThinkSNS Plus](https://github.com/slimkit/thinksns-plus/)主程序 | ||
2. 克隆代码到主程序packages目录 | ||
3. 编辑主程序根目录下的composer.json,找到json对象中的「repositories」属性,新增PC信息,找到「require」属性,新增PC依赖 | ||
``` | ||
{ | ||
"type": "path", | ||
"url": "packages/plus-componet-pc", | ||
"options": { | ||
"symlink": true, | ||
"plus-soft": true | ||
} | ||
} | ||
``` | ||
|
||
``` | ||
{ | ||
... | ||
"require": { | ||
... | ||
"zhiyicx/plus-component-pc": "^3.0.0" | ||
} | ||
``` | ||
} | ||
|
||
4. 修改PC包中的composer.json, 新增version版本号 | ||
``` | ||
{ | ||
... | ||
"require": { | ||
"overtrue/socialite": "^2.0", | ||
"gregwar/captcha": "1.*" | ||
}, | ||
"version": "3.0.1" | ||
} | ||
``` | ||
5. 主程序根目录执行composer update | ||
6. 执行PC包命令 | ||
``` | ||
php artisan package:handle pc install | ||
``` | ||
7. 若需要经常修改静态资源,建议执行软链命令 | ||
``` | ||
php artisan package:handle pc link | ||
``` | ||
|
||
## 注意事项 | ||
1. PC拓展包数据均通过内部请求调用[ThinkSNS Plus](https://slimkit.github.io/docs/api-v2-overview.html)接口获得,不涉及相关业务逻辑,若需修改,请到接口对应程序位置。 | ||
2. 若需要修改js插件源码,需要修改后执行yarn prod命令进行编译,生成新的js文件,详见webpack.mix.js。 | ||
3. 若需要使用三方登录功能,需要后台PC管理-三方登录配置相关信息。 | ||
4. 若修改后台配置后,必须根目录执行`php artisan cache:clear`或前往后台PC管理点击清除缓存。 | ||
5. 图标采用的是阿里云的[iconfont](http://www.iconfont.cn/),若需要修改图片,请联系我们将您拉进图标库后,自行创建仓库导入后新增修改。 | ||
6. 三方配置回调域: | ||
~~~ | ||
网站回调域:绑定域名/socialite/qq/callback | ||
如:http://tsplus.zhibocloud.cn/socialite/qq/callback | ||
微信开放平台 | ||
授权回调域:绑定域名即可 | ||
如:tsplus.zhibocloud.cn | ||
微博开放平台 | ||
应用地址:绑定域名 | ||
如:http://tsplus.zhibocloud.cn | ||
安全域名:可填写多个,必须把绑定域名填写在其中,去掉http://或者https:// | ||
如:tsplus.zhibocloud.cn | ||
~~~ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "zhiyicx/plus-pc", | ||
"authors": [ | ||
{ | ||
"name": "Foreach", | ||
"email": "missu082500@163.com", | ||
"role": "Developer" | ||
} | ||
], | ||
"autoload": { | ||
"classmap": [ | ||
"database/seeds/" | ||
], | ||
"files": [ | ||
"src/helpers.php" | ||
], | ||
"psr-4": { | ||
"Zhiyi\\Component\\ZhiyiPlus\\PlusComponentPc\\": "src/" | ||
} | ||
}, | ||
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"Zhiyi\\Component\\ZhiyiPlus\\PlusComponentPc\\PcServiceProvider" | ||
] | ||
} | ||
}, | ||
"require": { | ||
"overtrue/socialite": "^2.0", | ||
"gregwar/captcha": "1.*" | ||
}, | ||
"version": "2.0.4" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
return [ | ||
'stats_code' => '', | ||
'installed' => true, | ||
'routeName' => 'pc:feeds', | ||
'status' => 1, | ||
'logo' => null, | ||
'loginbg' => null, | ||
'site_name' => 'Plus (ThinkSNS+)', | ||
'site_copyright' => 'Copyright © 2018 Chengdu ZhiYiChuangXiang Technology Co., Ltd. All rights reserved.', | ||
'site_technical' => 'ThinkSNS', | ||
'weibo' => [ | ||
'client_id' => null, | ||
'client_secret' => null, | ||
], | ||
'wechat' => [ | ||
'client_id' => null, | ||
'client_secret' => null, | ||
], | ||
'qq' => [ | ||
'client_id' => null, | ||
'client_secret' => null, | ||
], | ||
]; |
39 changes: 39 additions & 0 deletions
39
packages/zhiyicx-plus-pc/database/migrations/2017_09_12_021811_create_navigation_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
class CreateNavigationTable extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::create('navigation', function (Blueprint $table) { | ||
$table->increments('id'); | ||
$table->string('name')->nullable()->default('')->comment('导航名称'); | ||
$table->string('app_name')->nullable()->default('')->comment('英文名'); | ||
$table->string('url')->nullable()->default('')->comment('跳转链接'); | ||
$table->string('target')->nullable()->default('')->comment('打开方式'); | ||
$table->tinyInteger('status')->nullable()->default(1)->unsigned()->comment('状态 0-关闭 1-开启'); | ||
$table->tinyInteger('position')->nullable()->default(0)->unsigned()->comment('导航位置 0-顶部 1-底部'); | ||
$table->integer('parent_id')->nullable()->default(0)->unsigned()->comment('pid'); | ||
$table->integer('order_sort')->nullable()->default(0)->unsigned()->comment('排序'); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::drop('navigation'); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
packages/zhiyicx-plus-pc/database/seeds/PcDatabaseSeeder.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Seeder; | ||
|
||
class PcDatabaseSeeder extends Seeder | ||
{ | ||
/** | ||
* Run the database seeds. | ||
* | ||
* @return void | ||
*/ | ||
public function run() | ||
{ | ||
$this->call(PcTableSeeder::class); | ||
} | ||
} |
Oops, something went wrong.