dyjh %!s(int64=6) %!d(string=hai) anos
pai
achega
08fc717c40
Modificáronse 100 ficheiros con 4471 adicións e 1627 borrados
  1. 22 11
      app/Helper/functions.inc.php
  2. 6 86
      app/Http/Controllers/Admin/Album/AgentController.php
  3. 73 57
      app/Http/Controllers/Admin/Album/CatController.php
  4. 122 10
      app/Http/Controllers/Admin/Album/ManufacturerController.php
  5. 2 0
      app/Http/Controllers/Admin/Album/OrderController.php
  6. 15 0
      app/Http/Controllers/Admin/Album/PosterController.php
  7. 8 2
      app/Http/Controllers/Admin/Album/Product/PriceController.php
  8. 205 85
      app/Http/Controllers/Admin/Album/ProductController.php
  9. 1 2
      app/Http/Controllers/Admin/Auth/LoginController.php
  10. 1 0
      app/Http/Controllers/Admin/Base/ClassController.php
  11. 32 6
      app/Http/Controllers/Admin/Base/PhotosController.php
  12. 0 1
      app/Http/Controllers/Admin/Base/UserController.php
  13. 4 4
      app/Http/Controllers/Admin/Controller.php
  14. 554 83
      app/Http/Controllers/Api/V1/AlbumBossController.php
  15. 310 271
      app/Http/Controllers/Api/V1/AlbumController.php
  16. 4 4
      app/Http/Controllers/Api/V1/AlbumPosterController.php
  17. 1 1
      app/Http/Controllers/Api/V1/Controller.php
  18. 43 31
      app/Http/Controllers/Web/AuthController.php
  19. 6 0
      app/Models/ClassModel.php
  20. 17 9
      app/Widget/Tools/FileUpload.php
  21. 41 21
      app/Widget/Tools/ImgUpload.php
  22. 43 0
      database/migrations/2018_04_20_145600_add_user_id_to_card_setting.php
  23. 30 0
      database/migrations/2018_04_24_133950_change_userid_to_appid_card_banner.php
  24. 32 0
      database/migrations/2018_04_24_134033_change_userid_to_appid_card_setting.php
  25. 32 0
      database/migrations/2018_04_24_134117_change_userid_to_appid_card__user_honor.php
  26. 32 0
      database/migrations/2018_04_24_134143_change_userid_to_appid_card__user_info.php
  27. 32 0
      database/migrations/2018_04_24_134224_change_userid_to_appid_card_user_progress.php
  28. 32 0
      database/migrations/2018_04_24_134300_change_userid_to_appid_card_user_project.php
  29. 32 0
      database/migrations/2018_04_24_134329_change_userid_to_appid_card_user_trend.php
  30. 35 0
      database/migrations/2018_04_25_151042_add_icon_to_card_settings.php
  31. 32 0
      database/migrations/2018_04_26_113259_change_copyright_to_null_card_setting.php
  32. 32 0
      database/migrations/2018_05_03_163426_alter_detail_card_user_project_table.php
  33. 32 0
      database/migrations/2018_05_03_163536_alter_content_card_user_trend_table.php
  34. 34 0
      database/migrations/2018_05_10_101204_alter_user_app_account_table.php
  35. 32 0
      database/migrations/2018_05_10_132729_alter_card_banner_table.php
  36. 32 0
      database/migrations/2018_05_10_132820_alter_card_setting_table.php
  37. 32 0
      database/migrations/2018_05_10_133236_alter_card_user_honor_table.php
  38. 32 0
      database/migrations/2018_05_10_133316_alter_card_user_info_table.php
  39. 32 0
      database/migrations/2018_05_10_133358_alter_card_user_progress_table.php
  40. 32 0
      database/migrations/2018_05_10_133439_alter_card_user_project_table.php
  41. 32 0
      database/migrations/2018_05_10_133950_alter_card_user_trend_table.php
  42. 32 0
      database/migrations/2018_05_10_134122_alter_cp_company_info.php
  43. 33 0
      database/migrations/2018_05_11_155844_rename_user_app_account_table.php
  44. 34 0
      database/migrations/2018_05_22_110850_add_account_to_user_info.php
  45. 33 0
      database/migrations/2018_05_22_121047_edit_val_base_dictionary_option.php
  46. 32 0
      database/migrations/2018_07_10_111857_add_role_to_user_info.php
  47. 33 0
      database/migrations/2019_04_15_104944_add_store_id_to_base_attachment.php
  48. 34 0
      database/migrations/2019_04_16_183629_add_column_cat_id_to_album_product_price.php
  49. 35 0
      database/migrations/2019_04_16_201403_add_st_column_to_album_agent.php
  50. 33 0
      database/migrations/2019_04_17_092129_add_column_share_to_album_agent.php
  51. 33 0
      database/migrations/2019_04_17_110528_change_customer_cat_record.php
  52. 33 0
      database/migrations/2019_04_18_151500_delete_level_in_album_cat.php
  53. 34 0
      database/migrations/2019_04_18_195425_add_interactive_to_album_agent.php
  54. 33 0
      database/migrations/2019_04_19_160637_add_store_id_to_classes.php
  55. 34 0
      database/migrations/2019_04_24_104213_add_template_id_to_album_manufacturer.php
  56. 33 0
      database/migrations/2019_04_26_105614_edit_agent_to_store_at_agent_banner.php
  57. 33 0
      database/migrations/2019_04_26_152722_add_upload_video_to_album_product.php
  58. 0 1
      public/.well-known/pki-validation/fileauth.txt
  59. 3 71
      resources/views/admin/album/agent/edit.blade.php
  60. 28 28
      resources/views/admin/album/agent/index.blade.php
  61. 14 9
      resources/views/admin/album/banner/edit.blade.php
  62. 8 27
      resources/views/admin/album/banner/index.blade.php
  63. 29 41
      resources/views/admin/album/cat/edit.blade.php
  64. 64 72
      resources/views/admin/album/cat/index.blade.php
  65. 1 8
      resources/views/admin/album/cat/view.blade.php
  66. 8 22
      resources/views/admin/album/comments/index.blade.php
  67. 5 17
      resources/views/admin/album/info/cat/index.blade.php
  68. 8 24
      resources/views/admin/album/information/index.blade.php
  69. 639 0
      resources/views/admin/album/manufacturer/edit-all.blade.php
  70. 373 0
      resources/views/admin/album/manufacturer/edit-furniture.blade.php
  71. 105 172
      resources/views/admin/album/manufacturer/edit.blade.php
  72. 10 14
      resources/views/admin/album/manufacturer/index.blade.php
  73. 11 11
      resources/views/admin/album/nav/edit.blade.php
  74. 8 22
      resources/views/admin/album/nav/index.blade.php
  75. 2 2
      resources/views/admin/album/news/edit.blade.php
  76. 8 22
      resources/views/admin/album/news/index.blade.php
  77. 1 1
      resources/views/admin/album/news/view.blade.php
  78. 10 10
      resources/views/admin/album/order/check.blade.php
  79. 1 8
      resources/views/admin/album/order/edit.blade.php
  80. 26 12
      resources/views/admin/album/order/index.blade.php
  81. 10 10
      resources/views/admin/album/order/view.blade.php
  82. 3 0
      resources/views/admin/album/poster/edit.blade.php
  83. 15 0
      resources/views/admin/album/poster/view.blade.php
  84. 8 25
      resources/views/admin/album/product/attr/index.blade.php
  85. 233 170
      resources/views/admin/album/product/edit.blade.php
  86. 10 28
      resources/views/admin/album/product/index.blade.php
  87. 80 11
      resources/views/admin/album/product/price/index.blade.php
  88. 7 1
      resources/views/admin/album/review/index.blade.php
  89. 32 32
      resources/views/admin/album/user/index.blade.php
  90. 6 6
      resources/views/admin/auth/albumlogin.blade.php
  91. 9 9
      resources/views/admin/auth/login.blade.php
  92. 1 1
      resources/views/admin/base/actionlog/index.blade.php
  93. 7 7
      resources/views/admin/base/index/welcome.blade.php
  94. 1 1
      resources/views/admin/base/menus/index.blade.php
  95. 6 6
      resources/views/admin/base/resources/manage.blade.php
  96. 3 3
      resources/views/admin/base/role/auth.blade.php
  97. 5 5
      resources/views/admin/base/tool/alimanage.blade.php
  98. 1 1
      resources/views/admin/base/user/edit.blade.php
  99. 12 10
      resources/views/admin/furniture/goods/category/edit.blade.php
  100. 7 23
      resources/views/admin/furniture/goods/category/index.blade.php

+ 22 - 11
app/Helper/functions.inc.php

xqd xqd xqd xqd xqd xqd xqd
@@ -48,7 +48,7 @@ if (! function_exists('getUrlImage')) {
         readfile($url);//输出图片文件
         $img = ob_get_contents();//得到浏览器输出
         ob_end_clean();//清除输出并关闭
-      //  $size = strlen($img);//得到图片大小
+        //  $size = strlen($img);//得到图片大小
         $fp2 = @fopen($filename, "a");
         fwrite($fp2, $img);//向当前目录写入图片文件,并重新命名
         fclose($fp2);
@@ -69,7 +69,7 @@ if (! function_exists('imageToCircle')) {
     function imageToCircle($url)
     {
         $ext = pathinfo($url);
-       // dd($ext);
+        // dd($ext);
         $src_img = null;
         switch ($ext['extension']) {
             case 'jpg':
@@ -194,6 +194,14 @@ if( ! function_exists('pairList'))
  */
 function U ($url, $query = [])
 {
+    $is_we7 = session()->get('is_we7');
+    if($is_we7 == 'true'){
+        $adminUri = '?route=';
+        $string = '&';
+    }else if ($is_we7 == 'false') {
+        $adminUri = '';
+        $string = '?';
+    }
     $url = ltrim($url, '/');
     $urlInfo = parse_url($url);
     $aQuery = [];
@@ -203,14 +211,16 @@ function U ($url, $query = [])
     }
     $queryString = http_build_query(array_merge($aQuery, $query));
     if(isset($urlInfo['host'])) {
-        $url = $urlInfo['scheme'] . '://' . $urlInfo['host'].'/admin/';
+        $url = $urlInfo['scheme'] . '://' . $urlInfo['host'].'/' . $adminUri . 'admin/';
     }else{
-        $url = request()->root() . '/admin/';
+        $url = request()->root() . '/' . $adminUri . 'admin/';
     }
     $url .= isset($urlInfo['path']) ? $urlInfo['path'] : '';
-    $url .= $queryString === '' ? '' : ('?'.$queryString);
+    $url .= $queryString === '' ? '' : ($string . $queryString);
     return $url;
 }
+
+
 /**
  * 验证角色菜单权限
  *
@@ -612,6 +622,7 @@ function formPost($url, $post_data=array(), $timeout=60, $userpwd = null)
  * @return string
  */
 function editor($textareaid = 'content', $getParam = array(), $options = array()) {
+    $strUri = session()->get('is_we7')=='true'?'/addons/furniture/public':'';
     $getParam['_token']     = csrf_token();
     $getParam['elementid']  = isset($getParam['elementid'])?$getParam['elementid']:'elementid';
     $getParam['KindEditor'] = isset($getParam['KindEditor'])?$getParam['KindEditor']:true;
@@ -632,9 +643,9 @@ function editor($textareaid = 'content', $getParam = array(), $options = array()
     $_csrf_token = csrf_token();
 
     $editer = <<<HTML
-        <link rel="stylesheet" href="/base/kindeditor-4.1.10/themes/default/default.css" />
-        <script charset="utf-8" src="/base/kindeditor-4.1.10/kindeditor-min.js"></script>
-        <script charset="utf-8" src="/base/kindeditor-4.1.10/lang/zh_CN.js"></script>
+        <link rel="stylesheet" href="$strUri/base/kindeditor-4.1.10/themes/default/default.css" />
+        <script charset="utf-8" src="$strUri/base/kindeditor-4.1.10/kindeditor-min.js"></script>
+        <script charset="utf-8" src="$strUri/base/kindeditor-4.1.10/lang/zh_CN.js"></script>
         <script>
             var editor_{$textareaid};
             var options = '{$options}';
@@ -654,12 +665,12 @@ HTML;
 }
 
 function ueditor() {
-
+    $strUri = session()->get('is_we7')=='true'?'/addons/furniture/public':'';
     $editer = <<<HTML
     <!-- 配置文件 -->
-    <script type="text/javascript" src="/base/neditor-1.5.3/neditor.config.js"></script>
+    <script type="text/javascript" src="$strUri/base/neditor-1.5.3/neditor.config.js"></script>
     <!-- 编辑器源码文件 -->
-    <script type="text/javascript" src="/base/neditor-1.5.3/neditor.all.js"></script>
+    <script type="text/javascript" src="$strUri/base/neditor-1.5.3/neditor.all.js"></script>
     <!-- 实例化编辑器 -->
     <script type="text/javascript">
         var ue = UE.getEditor('container',{

+ 6 - 86
app/Http/Controllers/Admin/Album/AgentController.php

xqd xqd xqd xqd
@@ -51,6 +51,9 @@ class AgentController extends Controller
             }else{
                 $item->status = '已审核';
             }
+            $user = AlbumUserModel::where('id', $item->user_id)->first();
+            $item->nickname = $user->username;
+            $item->role = $user->role;
         }
         return view('admin.album.agent.index',compact('list'));
     }
@@ -85,17 +88,6 @@ class AgentController extends Controller
      */
     private function _createSave(){
         $data = (array) request('data');
-        $agent_banner = $data['banner_agent']['url'];
-        unset($data['banner_agent']);
-        if($agent_banner){
-            foreach($agent_banner as $key=>$val){
-                $add['url'] = $this->formatImgUrl($val);
-                $add['agent_id'] = request('id');
-                $add['type'] = 0;
-
-                AgentBannerModel::create($add);
-            }
-        }
         $id = $this->repository->create($data);
         if($id) {
             $url[] = array('url'=>U( 'Album/Agent/index'),'title'=>'返回列表');
@@ -118,54 +110,16 @@ class AgentController extends Controller
             return $this->_updateSave();
         }
         $data = $this->repository->find($request->get('id'));
-        $banner = AgentBannerModel::where([['agent_id',$data['id']],['type',0]])->get();
-        $imgs = array();
-        foreach($banner as $key=>$val){
-            $imgs[] = $val['url'];
-        }
-        $data->agent_banner = $imgs;
-        $video = AgentBannerModel::where([['agent_id',$request->get('id')],['type',1]])->first();
-        return view('admin.album.agent.edit',compact('data','video'));
-    }
 
-    public function videoDel(Request $request)
-    {
-        $check = AgentBannerModel::find($request->get('id'));
-        if($check) $osskey = $check->oss_key;
-        if(!$check) return  $this->showWarning("操作失败");
-        $bool = AgentBannerModel::where('id',$request->get('id'))->delete();
-        if($bool) {
-            OSS::publicDeleteObject(config('alioss.BucketName'),$osskey);
-            return  $this->showMessage('操作成功');
-        }else{
-            return  $this->showWarning("操作失败");
-        }
+        return view('admin.album.agent.edit',compact('data'));
     }
+
+
     /**
      * 保存修改
      */
     private function _updateSave() {
         $data = (array) request('data');//dd($data);
-        $id = request('id');
-        $banner = AgentBannerModel::where([['agent_id',$id],['type',0]])->get();
-        if($banner){
-            foreach ($banner as $key=>$val){
-                $url = str_replace(env('APP_URL'),public_path(),$val['url']);
-                if(file_exists($url)) unlink($url);
-
-            }
-        }
-        AgentBannerModel::where([['agent_id',$id],['type',0]])->delete();
-        if(!empty($data['agent_banner']['url'])){
-            foreach($data['agent_banner']['url'] as $key=>$val){
-                $add['url'] = $this->formatImgUrl($val);
-                $add['agent_id'] = $id;
-                $add['type'] = 0;
-                AgentBannerModel::create($add);
-            }
-
-        }
-        unset($data['agent_banner']);
         $ok = $this->repository->update(request('id'),$data);
         if($ok) {
             $urls[] = array('url'=>U( 'Album/Agent/index'),'title'=>'返回列表');
@@ -219,39 +173,5 @@ class AgentController extends Controller
     }
 
 
-    public function uploadVideo(Request $request)
-    {
-        $video = $request->file('video');
-// 判断图片有效性
-        if (!$video) {
-            return back()->withErrors('上传视频无效..');
-        }
-        $agentid = $request->input('agent_id');
-        $check = AgentBannerModel::where([['agent_id',$agentid],['type',1]])->first();
-        if($check) OSS::publicDeleteObject(config('alioss.BucketName'),$check->oss_key);
-// 获取图片在临时文件中的地址
-        $videoPath = $video->getRealPath();
-
-// 制作文件名
-        $ex = $video->getClientOriginalExtension();
-        $key = time() . rand(10000, 99999999) . '.' . $ex;
-
-//阿里 OSS 文件上传
-        $result = OSS::publicUpload(config('alioss.BucketName'),$key, $videoPath);
-        if ($result) {
-            $data['name'] = $video->getClientOriginalName();
-            $data['type'] = 1;
-            $data['agent_id'] = $agentid;
-            $data['oss_key'] =  $key;
-            $data['url'] = config('alioss.FileUrl').$key;
-            $video = AgentBannerModel::create($data);
-            if(!$video){
-                return back()->withErrors('上传视频失败..');
-            }
-            return  $this->showMessage('上传成功');
 
-        } else {
-            return back()->withErrors('上传视频失败..');
-        }
-    }
 }

+ 73 - 57
app/Http/Controllers/Admin/Album/CatController.php

xqd xqd xqd xqd xqd xqd
@@ -20,39 +20,49 @@ class CatController extends Controller
 {
     private $repository;
 
-    public function __construct(CatRepository $repository) {
-        if(!$this->repository) $this->repository = $repository;
+    public function __construct(CatRepository $repository)
+    {
+        if (!$this->repository) {
+            $this->repository = $repository;
+        }
     }
 
-    function index(Request $request) {
-        //AlbumCatModel::where()->get();
+    /**
+     * @param Request $request
+     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
+     */
+    function index(Request $request)
+    {
         $search['keyword'] = $request->input('keyword');
-        $query = $this->repository->pushCriteria(new CatWhere($search,0,$this->getStoreId()));
+        $query = $this->repository->pushCriteria(new CatWhere($search, 0, $this->getStoreId()));
 
-        if(isset($request['sort_field']) && $request['sort_field'] && isset($request['sort_field_by'])) {
-            $query = $query->pushCriteria(new OrderBy($request['sort_field'],$request['sort_field_by']));
-        }else{
-            $query = $query->pushCriteria(new OrderBy('id','DESC'));
+        if (isset($request['sort_field']) && $request['sort_field'] && isset($request['sort_field_by'])) {
+            $query = $query->pushCriteria(new OrderBy($request['sort_field'], $request['sort_field_by']));
+        } else {
+            $query = $query->pushCriteria(new OrderBy('sort', 'DESC'));
         }
         $list = $query->paginate();
         foreach ($list as $key => $item) {
             //dump($item);
-            $item->sonlist = AlbumCatModel::where('parent_id',$item->id)->get();
+            $item->sonlist = AlbumCatModel::where([['parent_id',$item->id],['store_id',$this->getStoreId()]])->orderByDesc('sort')->get();
         }
-//        dump($list);
-        return view('admin.album.cat.index',compact('list'));
+        return view('admin.album.cat.index', compact('list'));
     }
 
-
-    function check(Request $request) {
+    /**
+     * @param Request $request
+     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
+     */
+    function check(Request $request)
+    {
         $request = $request->all();
         $search['keyword'] = $request->input('keyword');
         $orderby = array();
-        if(isset($request['sort_field']) && $request['sort_field'] && isset($request['sort_field_by'])) {
+        if (isset($request['sort_field']) && $request['sort_field'] && isset($request['sort_field_by'])) {
             $orderby[$request['sort_field']] = $request['sort_field_by'];
         }
-        $list = $this->repository->search($search,$orderby);
-        return view('admin.album.cat.check',compact('list'));
+        $list = $this->repository->search($search, $orderby);
+        return view('admin.album.cat.check', compact('list'));
     }
 
 
@@ -62,12 +72,12 @@ class CatController extends Controller
      */
     public function create(Request $request)
     {
-        if($request->method() == 'POST') {
+        if ($request->method() == 'POST') {
             return $this->_createSave();
         }
-        $cat = AlbumCatModel::where('parent_id',0)->get();
+        $cat = AlbumCatModel::where([['parent_id', 0],['store_id',$this->getStoreId()]])->get();
         $data['parent_id'] = null;
-        return view('admin.album.cat.edit',compact('data','cat'));
+        return view('admin.album.cat.edit', compact('data', 'cat'));
     }
 
     /**
@@ -76,17 +86,18 @@ class CatController extends Controller
     private function _createSave(){
         $data = (array) request('data');
         $data['store_id'] = $this->getStoreId();
-        if(!empty($data['pic_url']))
-        $data['pic_url'] = $this->formatImgUrl($data['pic_url']);
+        if (!empty($data['pic_url'])) {
+            $data['pic_url'] = $this->formatImgUrl($data['pic_url']);
+        }
 
         $id = $this->repository->create($data);
-        if($id) {
-            $url[] = array('url'=>U( 'Album/Cat/index'),'title'=>'返回列表');
-            $url[] = array('url'=>U( 'Album/Cat/create'),'title'=>'继续添加');
-            $this->showMessage('添加成功',$url);
-        }else{
-            $url[] = array('url'=>U( 'Album/Cat/index'),'title'=>'返回列表');
-            return $this->showWarning('添加失败',$url);
+        if ($id) {
+            $url[] = array('url' => U('Album/Cat/index'), 'title' => '返回列表');
+            $url[] = array('url' => U('Album/Cat/create'), 'title' => '继续添加');
+            $this->showMessage('添加成功', $url);
+        } else {
+            $url[] = array('url' => U('Album/Cat/index'), 'title' => '返回列表');
+            return $this->showWarning('添加失败', $url);
         }
     }
     
@@ -96,36 +107,41 @@ class CatController extends Controller
      * 
      * 
      */
-    public function update(Request $request) {
-        if($request->method() == 'POST') {
+    public function update(Request $request)
+    {
+        if ($request->method() == 'POST') {
             return $this->_updateSave();
         }
         $data = $this->repository->find($request->get('id'));
-        $cat = AlbumCatModel::where('parent_id',0)->get();
+        $cat = AlbumCatModel::where([['parent_id',0],['store_id',$this->getStoreId()]])->get();
 
-        return view('admin.album.cat.edit',compact('data','cat'));
+        return view('admin.album.cat.edit', compact('data', 'cat'));
     }
 
     /**
      * 保存修改
      */
-    private function _updateSave() {
+    private function _updateSave()
+    {
         $data = (array) request('data');
-        if(!empty($data['pic_url']))
-        $data['pic_url'] = $this->formatImgUrl($data['pic_url']);
-        $ok = $this->repository->update(request('id'),$data);
-        if($ok) {
-            $url[] = array('url'=>U( 'Album/Cat/index'),'title'=>'返回列表');
-            return $this->showMessage('操作成功',urldecode(request('_referer')));
-        }else{
-            $url[] = array('url'=>U( 'Album/Cat/index'),'title'=>'返回列表');
-            return $this->showWarning('操作失败',$url);
+        if (!empty($data['pic_url'])) {
+            $data['pic_url'] = $this->formatImgUrl($data['pic_url']);
+        }
+
+        $ok = $this->repository->update(request('id'), $data);
+        if ($ok) {
+            $url[] = array('url' => U('Album/Cat/index'), 'title' => '返回列表');
+            return $this->showMessage('操作成功', urldecode(request('_referer')));
+        } else {
+            $url[] = array('url' => U('Album/Cat/index'), 'title' => '返回列表');
+            return $this->showWarning('操作失败', $url);
         }
     }
 
-    public function view(Request $request) {
+    public function view(Request $request)
+    {
         $data = $this->repository->find(request('id'));
-        return view('admin.album.cat.view',compact('data'));
+        return view('admin.album.cat.view', compact('data'));
     }
 
 
@@ -134,12 +150,12 @@ class CatController extends Controller
      * 状态改变
      *
      */
-    public function status(Request $request) {
-
-        $ok = $this->repository->updateStatus(request('id'),request('status'));
-        if($ok) {
+    public function status(Request $request)
+    {
+        $ok = $this->repository->updateStatus(request('id'), request('status'));
+        if ($ok) {
             return $this->showMessage('操作成功');
-        }else{
+        } else {
             return $this->showWarning('操作失败');
         }
     }
@@ -147,17 +163,17 @@ class CatController extends Controller
     /**
      * 删除
      */
-    public function destroy(Request $request) {
-        //$bool = $this->repository->destroy($request->get('id'));
+    public function destroy(Request $request)
+    {
         $cat = AlbumCatModel::find($request->get('id'));
-        $son_cat = AlbumCatModel::where('parent_id',$cat->id)->delete();
-        if($son_cat){
-            //$son_cat->delete();
+        $son_cat = AlbumCatModel::where('parent_id', $cat->id)->delete();
+        if ($son_cat) {
+            $son_cat->delete();
         }
         $ok = $cat->delete();
-        if($ok) {
+        if ($ok) {
             return  $this->showMessage('操作成功');
-        }else{
+        } else {
             return  $this->showWarning("操作失败");
         }
     }

+ 122 - 10
app/Http/Controllers/Admin/Album/ManufacturerController.php

xqd xqd xqd xqd xqd xqd xqd
@@ -8,8 +8,10 @@
  */
 namespace App\Http\Controllers\Admin\Album;
 use App\Http\Controllers\Admin\Controller;
+use App\Models\AgentBannerModel;
 use App\Models\AlbumManufacturerModel;
 use App\Models\AlbumUserModel;
+use App\Services\OSS;
 use Illuminate\Http\Request;
 use App\Repositories\Base\Criteria\OrderBy;
 use App\Repositories\Album\Criteria\MultiWhere;
@@ -36,20 +38,46 @@ class ManufacturerController extends Controller
     }
 
     function index(Request $request) {
-        if($request->method() == 'POST') {
-            $iscreate = AlbumManufacturerModel::where('store_id',$this->getStoreId())->first();
-            if($iscreate){
+        if ($request->method() == 'POST') {
+            $iscreate = AlbumManufacturerModel::where('store_id', $this->getStoreId())->first();
+            if ($iscreate) {
                 return $this->_updateSave();
-            }else{
+            } else {
                 return $this->_createSave();
             }
 
         }
-        $data = AlbumManufacturerModel::where('store_id',$this->getStoreId())->first();
+
+        $data = AlbumManufacturerModel::where('store_id', $this->getStoreId())->first();
         if ($data) {
             $data['banner'] = json_decode($data['banner'], true);
         }
-        return view('admin.album.manufacturer.edit',compact('data'));
+        $banner = AgentBannerModel::where([['store_id',$this->getStoreId()],['type',0]])->get();
+        $imgs = array();
+        foreach ($banner as $key => $val) {
+            $imgs[] = $val['url'];
+        }
+        $data['agent_banner'] = $imgs;
+        $video = AgentBannerModel::where([['store_id',$this->getStoreId()],['type',1]])->first();
+        return view('admin.album.manufacturer.edit', compact('data', 'video'));
+    }
+
+    function indexFurniture(Request $request) {
+        if ($request->method() == 'POST') {
+            $iscreate = AlbumManufacturerModel::where('store_id', $this->getStoreId())->first();
+            if ($iscreate) {
+                return $this->_updateSave();
+            } else {
+                return $this->_createSave();
+            }
+
+        }
+
+        $data = AlbumManufacturerModel::where('store_id', $this->getStoreId())->first();
+        if ($data) {
+            $data['banner'] = json_decode($data['banner'], true);
+        }
+        return view('admin.album.manufacturer.edit-furniture', compact('data'));
     }
 
     function create(Request $request)
@@ -57,7 +85,8 @@ class ManufacturerController extends Controller
         if ($request->method() == 'POST') {
             return $this->_createSave();
         }
-        return view('admin.album.manufacturer.edit');
+
+        return view('admin.album.manufacturer.edit-all');
     }
 
     /**
@@ -65,13 +94,29 @@ class ManufacturerController extends Controller
      */
     private function _createSave(){
         $data = (array) request('data');
-        $data['store_id'] =$this->getStoreId();
+        $ma = AlbumManufacturerModel::where('id','!=',0)->orderByDesc('id')->first();
+
+        $data['store_id'] =$ma->id+1;
         if (!empty($data['banner']['url'])) {
             foreach ($data['banner']['url'] as $key => $val) {
                 $data['banner']['url'][$key] = $this->formatImgUrl($val);
             }
             $data['banner'] = json_encode($data['banner']['url']);
         }
+        if (isset($data['banner_agent']['url'])) {
+            $agent_banner = $data['banner_agent']['url'];
+            unset($data['banner_agent']);
+            if ($agent_banner) {
+                foreach($agent_banner as $key => $val){
+                    $add['url'] = $this->formatImgUrl($val);
+                    $add['agent_id'] = request('id');
+                    $add['type'] = 0;
+
+                    AgentBannerModel::create($add);
+                }
+            }
+        }
+
         if(!empty($data['avatar']))
             $data['avatar'] = $this->formatImgUrl($data['avatar']);
         if (!empty($data['logo'])) {
@@ -88,9 +133,9 @@ class ManufacturerController extends Controller
             $data['furniture_ads_pic'] = $this->formatImgUrl($data['furniture_ads_pic']);
 
         $id = $this->repository->create($data);
-        if($id) {
+        if ($id) {
             $this->showMessage('添加成功');
-        }else{
+        } else {
             return $this->showWarning('添加失败');
         }
     }
@@ -105,6 +150,26 @@ class ManufacturerController extends Controller
             $data['avatar'] = $this->formatImgUrl($data['avatar']);
             //$this->deleteUrl($saveData->avatar);
         }
+
+        $banner = AgentBannerModel::where([['store_id',$this->getStoreId()],['type',0]])->get();
+        if($banner){
+            foreach ($banner as $key=>$val){
+                $url = str_replace(env('APP_URL'),public_path(),$val['url']);
+                if(file_exists($url)) unlink($url);
+
+            }
+        }
+        AgentBannerModel::where([['store_id',$this->getStoreId()],['type',0]])->delete();
+        if(!empty($data['agent_banner']['url'])){
+            foreach($data['agent_banner']['url'] as $key=>$val){
+                $add['url'] = $this->formatImgUrl($val);
+                $add['store_id'] = $this->getStoreId();
+                $add['type'] = 0;
+                AgentBannerModel::create($add);
+            }
+
+        }
+        unset($data['agent_banner']);
         if (!empty($data['logo'])) {
             $data['logo'] = $this->formatImgUrl($data['logo']);
         }
@@ -178,4 +243,51 @@ class ManufacturerController extends Controller
             return  $this->showWarning("操作失败");
         }
     }
+
+    public function uploadVideo(Request $request)
+    {
+        $video = $request->file('video');
+// 判断图片有效性
+        if (!$video) {
+            return back()->withErrors('上传视频无效..');
+        }
+        $check = AgentBannerModel::where([['store_id',$this->getStoreId()],['type',1]])->first();
+        if($check) OSS::publicDeleteObject(config('alioss.BucketName'),$check->oss_key);
+// 获取图片在临时文件中的地址
+        $videoPath = $video->getRealPath();
+
+// 制作文件名
+        $ex = $video->getClientOriginalExtension();
+        $key = time() . rand(10000, 99999999) . '.' . $ex;
+//阿里 OSS 文件上传
+        $result = OSS::publicUpload(config('alioss.BucketName'), $key, $videoPath);
+        if ($result) {
+            $data['name'] = $video->getClientOriginalName();
+            $data['type'] = 1;
+            $data['store_id'] = $this->getStoreId();
+            $data['oss_key'] =  $key;
+            $data['url'] = config('alioss.FileUrl') . $key;
+            $video = AgentBannerModel::create($data);
+            if (!$video) {
+                return back()->withErrors('上传视频失败..');
+            }
+            return  $this->showMessage('上传成功');
+
+        } else {
+            return back()->withErrors('上传视频失败..');
+        }
+    }
+    public function videoDel(Request $request)
+    {
+        $check = AgentBannerModel::find($request->get('id'));
+        if($check) $osskey = $check->oss_key;
+        if(!$check) return  $this->showWarning("操作失败");
+        $bool = AgentBannerModel::where('id',$request->get('id'))->delete();
+        if($bool) {
+            OSS::publicDeleteObject(config('alioss.BucketName'),$osskey);
+            return  $this->showMessage('操作成功');
+        }else{
+            return  $this->showWarning("操作失败");
+        }
+    }
 }

+ 2 - 0
app/Http/Controllers/Admin/Album/OrderController.php

xqd
@@ -37,6 +37,8 @@ class OrderController extends Controller
         $search['keyword'] = $request->input('keyword');
         $search['status'] = $request->input('status');
         $search['expected'] = $request->input('expected');
+        $search['start'] = $request->input('start');
+        $search['end'] = $request->input('end');
         $search['storeid'] = $this->getStoreId();
 
         $order = array();

+ 15 - 0
app/Http/Controllers/Admin/Album/PosterController.php

xqd xqd
@@ -53,6 +53,9 @@ class PosterController extends Controller
             }
             $data['posters'] = json_encode($data['posters']['url']);
         }
+        if (empty($data['share']) || empty($data['qrcode'])) {
+            return $this->showMessage('分享海报或者二维码不能为空!');
+        }
         $data['share'] = $this->formatImgUrl($data['share']);
         $data['qrcode'] = $this->formatImgUrl($data['qrcode']);
         if (!empty($data['words'])) {
@@ -72,4 +75,16 @@ class PosterController extends Controller
         }
     }
 
+
+    public function viewPoster(Request $request)
+    {
+        $img = '/base/img/poster.jpg';
+        return view('admin.album.poster.view', compact('img'));
+    }
+
+    public function viewShare(Request $request)
+    {
+        $img = '/base/img/share.jpg';
+        return view('admin.album.poster.view', compact('img'));
+    }
 }

+ 8 - 2
app/Http/Controllers/Admin/Album/Product/PriceController.php

xqd xqd xqd
@@ -8,6 +8,7 @@
  */
 namespace App\Http\Controllers\Admin\Album\Product;
 use App\Http\Controllers\Admin\Controller;
+use App\Models\AlbumCatModel;
 use App\Models\AlbumProductModel;
 use App\Models\AlbumProductPriceModel;
 use App\Repositories\Album\Criteria\PriceWhere;
@@ -28,7 +29,8 @@ class PriceController extends Controller
         $agent_id = $request->input('id');
         //dd($agent_id);die;
         $search['keyword'] = $request->input('keyword');
-        $query = $this->repository->pushCriteria(new PriceWhere($search,$this->getStoreId(),$agent_id));
+        $search['cat_id'] = $request->input('cat_id');
+        $query = $this->repository->pushCriteria(new PriceWhere($search, $this->getStoreId(), $agent_id));
 
         if(isset($request['sort_field']) && $request['sort_field'] && isset($request['sort_field_by'])) {
         $query = $query->pushCriteria(new OrderBy($request['sort_field'],$request['sort_field_by']));
@@ -39,9 +41,13 @@ class PriceController extends Controller
         foreach ($list as $item){
             $product = AlbumProductModel::where([['id',$item->product_id],['store_id',$this->getStoreId()]])->first();
             $item->product_name = $product['name'];
+            $cat = AlbumCatModel::where('id', $product['cat_id'])->first();
+            $item->product_cat = $cat->name;
+            $item->product_ma_price_comment = $product['ma_price_comment'];
             $item->product_pic = $product['cover_pic'];
         }
-        return view('admin.album.product.price.index',compact('list'));
+        $cat = AlbumCatModel::where([['store_id',$this->getStoreId()],['parent_id',0]])->get();
+        return view('admin.album.product.price.index',compact('list', 'cat'));
     }
 
 

+ 205 - 85
app/Http/Controllers/Admin/Album/ProductController.php

xqd xqd xqd xqd
@@ -10,8 +10,10 @@ namespace App\Http\Controllers\Admin\Album;
 use App\Http\Controllers\Admin\Controller;
 use App\Models\AlbumCatModel;
 use App\Models\AlbumProductModel;
+use App\Models\AlbumProductPriceModel;
 use App\Models\AlbumProductStyleModel;
 use App\Repositories\Album\Criteria\ProductWhere;
+use App\Services\OSS;
 use Illuminate\Http\Request;
 use App\Repositories\Base\Criteria\OrderBy;
 use App\Repositories\Album\Criteria\MultiWhere;
@@ -21,25 +23,36 @@ class ProductController extends Controller
 {
     private $repository;
 
-    public function __construct(ProductRepository $repository) {
-        if(!$this->repository) $this->repository = $repository;
+    /**
+     * ProductController constructor.
+     * @param ProductRepository $repository
+     */
+    public function __construct(ProductRepository $repository)
+    {
+        if (!$this->repository) {
+            $this->repository = $repository;
+        }
     }
 
-    function index(Request $request) {
+    function index(Request $request)
+    {
         $search['keyword'] = $request->input('keyword');
-        $query = $this->repository->pushCriteria(new ProductWhere($search,$this->getStoreId()));
+        $query = $this->repository->pushCriteria(new ProductWhere($search, $this->getStoreId()));
+
 
-        if(isset($request['sort_field']) && $request['sort_field'] && isset($request['sort_field_by'])) {
-        $query = $query->pushCriteria(new OrderBy($request['sort_field'],$request['sort_field_by']));
-        }else{
-            $query = $query->pushCriteria(new OrderBy('id','DESC'));
+        if (isset($request['sort_field']) && $request['sort_field'] && isset($request['sort_field_by'])) {
+            $query = $query->pushCriteria(new OrderBy($request['sort_field'], $request['sort_field_by']));
+        } else {
+            $query = $query->pushCriteria(new OrderBy('id', 'DESC'));
         }
         $list = $query->paginate();
         foreach ($list as $key => $item) {
-            $cat = AlbumCatModel::where('id',$item->cat_id)->first();
-            $style = AlbumProductStyleModel::where('id',$item->style)->first();
-            $item->cat_name = $cat['name'];
-            $item->style_name = $style['name'];
+            $cat = AlbumCatModel::where('id', $item->cat_id)->first();
+            if ($cat) {
+                $catParent = AlbumCatModel::where('id', $cat->parent_id)->first();
+            }
+
+            $item->cat_name = ($catParent->name ?? '暂无') . '>' . ($cat->name ?? '暂无');
             $upload_img = json_decode($item->upload_img);
             $attr = json_decode($item->attr);
             $detail = json_decode($item->detail);
@@ -48,144 +61,249 @@ class ProductController extends Controller
             $list[$key]['detail'] = $detail[0];
         }
         //dd($list);
-        return view('admin.album.product.index',compact('list'));
+        return view('admin.album.product.index', compact('list'));
     }
 
-
-    function check(Request $request) {
+    /**
+     * @param Request $request
+     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
+     */
+    function check(Request $request)
+    {
         $request = $request->all();
         $search['keyword'] = $request->input('keyword');
         $orderby = array();
-        if(isset($request['sort_field']) && $request['sort_field'] && isset($request['sort_field_by'])) {
+        if (isset($request['sort_field']) && $request['sort_field'] && isset($request['sort_field_by'])) {
             $orderby[$request['sort_field']] = $request['sort_field_by'];
         }
-        $list = $this->repository->search($search,$orderby);
-        return view('admin.album.product.check',compact('list'));
+        $list = $this->repository->search($search, $orderby);
+        return view('admin.album.product.check', compact('list'));
     }
 
+    /**
+     * @param Request $request
+     * @return \Illuminate\Http\JsonResponse
+     */
+    public function getSecondCategory(Request $request)
+    {
+        $cat_id = $request->input('cat_id');
+        if (!$cat_id) {
+            return response()->json(['message' => '参数不合法', 'code' => 1]);
+        }
+        $cat = AlbumCatModel::where([
+            ['parent_id',$cat_id],['store_id',$this->getStoreId()]
+        ])->orderByDesc('sort')->get()->toArray();
+        if (empty($cat)) {
+            $cat[] = [
+                'name' => '请先添加二级分类!',
+                'id'   => 0
+            ];
+        }
+
+        return response()->json([
+            'data' => $cat,
+            'code' => 0
+        ]);
+    }
 
     /**
      * 添加
-     * 
+     *
      */
     public function create(Request $request)
     {
-        if($request->method() == 'POST') {
+        if ($request->method() == 'POST') {
             return $this->_createSave();
         }
-        $cat = AlbumCatModel::where([['store_id',$this->getStoreId()],['parent_id',0]])->get();
-        $style = AlbumProductStyleModel::Where('store_id',$this->getStoreId())->get();
-        $data['cat_id']=null;
-        return view('admin.album.product.edit',compact('data','cat','style'));
+        $cat = AlbumCatModel::where([['store_id',$this->getStoreId()],['parent_id', 0]])->get();
+        foreach ($cat as $key => $val) {
+            $son = AlbumCatModel::where([['store_id',$this->getStoreId()],['parent_id', $val['id']]])->get();
+            $category[] = [
+                'id' => 0,
+                'name' => $val['name'],
+                'son' => $son
+            ];
+        }
+        $data['cat_id'] = null;
+        return view('admin.album.product.edit', compact('data', 'category', 'style'));
     }
 
     /**
      * 保存修改
      */
-    private function _createSave(){
+    private function _createSave()
+    {
         $data = (array) request('data');
+      //  dd($data);
+        if (isset($data['upload_video'])) {
+            $data['upload_video'] = $this->uploadVideo($data['upload_video'], '');
+        }
+
         $data['store_id'] = $this->getStoreId();
-        if(!empty($data['specifications_img']['url'])) {
-            foreach ($data['specifications_img']['url'] as $key=>$val) {
+        if (!empty($data['specifications_img']['url'])) {
+            foreach ($data['specifications_img']['url'] as $key => $val) {
                 $data['specifications_img']['url'][$key] = $this->formatImgUrl($val);
             }
             $data['specifications_img'] = json_encode($data['specifications_img']['url']);
         }
-        if(!empty($data['install_img']['url'])){
-            foreach ($data['install_img']['url'] as $key=>$val) {
+        if (!empty($data['install_img']['url'])) {
+            foreach ($data['install_img']['url'] as $key => $val) {
                 $data['install_img']['url'][$key] = $this->formatImgUrl($val);
             }
             $data['install_img'] = json_encode($data['install_img']['url']);
         }
-        if(!empty($data['cover_pic']))
+        if (!empty($data['cover_pic'])) {
             $data['cover_pic'] = $this->formatImgUrl($data['cover_pic']);
-        if(!empty($data['thumb']))
+        }
+
+        if (!empty($data['thumb'])) {
             $data['thumb'] = $this->formatImgUrl($data['thumb']);
-        if(!empty($data['detail']['url'])) {
-            foreach ($data['detail']['url'] as $key=>$val) {
+        }
+
+        if (!empty($data['detail']['url'])) {
+            foreach ($data['detail']['url'] as $key => $val) {
                 $data['detail']['url'][$key] = $this->formatImgUrl($val);
             }
             $data['detail'] = json_encode($data['detail']['url']);
         }
-        if(!empty($data['detail_pic']))
+        if (!empty($data['detail_pic'])) {
             $data['detail_pic'] = $this->formatImgUrl($data['detail_pic']);
+        }
+
         $id = $this->repository->create($data);
-        if($id) {
-            $url[] = array('url'=>U( 'Album/Product/index'),'title'=>'返回列表');
-            $url[] = array('url'=>U( 'Album/Product/create'),'title'=>'继续添加');
-            $this->showMessage('添加成功',$url);
-        }else{
-            $url[] = array('url'=>U( 'Album/Product/index'),'title'=>'返回列表');
-            return $this->showWarning('添加失败',$url);
+        if ($id) {
+            $url[] = array('url' => U('Album/Product/index'), 'title' => '返回列表');
+            $url[] = array('url' => U('Album/Product/create'), 'title' => '继续添加');
+            $this->showMessage('添加成功', $url);
+        } else {
+            $url[] = array('url' => U('Album/Product/index'), 'title' => '返回列表');
+            return $this->showWarning('添加失败', $url);
+        }
+    }
+
+    public function uploadVideo($video,$id)
+    {
+       // dd($video);
+// 判断图片有效性
+        if (!$video) {
+            return back()->withErrors('上传视频无效..');
+        }
+        if ($id) {
+            $check = AlbumProductModel::where([['id',$id]])->first();
+            if ($check) {
+                $res = json_decode($check->upload_video, true);
+                OSS::publicDeleteObject(config('alioss.BucketName'), $res['oss_key']);
+            }
+        }
+
+// 获取图片在临时文件中的地址
+        $videoPath = $video->getRealPath();
+//       / dd($video);
+// 制作文件名
+        $ex = $video->getClientOriginalExtension();
+        $key = time() . rand(10000, 99999999) . '.' . $ex;
+//阿里 OSS 文件上传
+
+        $result = OSS::publicUpload(config('alioss.BucketName'), $key, $videoPath);
+        if ($result) {
+            $data['oss_key'] =  $key;
+            $data['url'] = config('alioss.FileUrl') . $key;
+            $data = json_encode($data);
+            return $data;
+        } else {
+            return false;
         }
     }
-    
+
     /**
-     * 
+     *
      * 修改
-     * 
-     * 
+     *
+     *
      */
-    public function update(Request $request) {
-        if($request->method() == 'POST') {
+    public function update(Request $request)
+    {
+        if ($request->method() == 'POST') {
             return $this->_updateSave();
         }
-        $cat = AlbumCatModel::where([['store_id',$this->getStoreId()],['parent_id',0]])->get();
-        $style = AlbumProductStyleModel::Where('store_id',$this->getStoreId())->get();
+        $cat = AlbumCatModel::where([['store_id',$this->getStoreId()],['parent_id', 0]])->get();
+        foreach ($cat as $key => $val) {
+            $son = AlbumCatModel::where([['store_id',$this->getStoreId()],['parent_id', $val['id']]])->get();
+            $category[] = [
+                'id' => 0,
+                'name' => $val['name'],
+                'son' => $son
+            ];
+        }
         $data = $this->repository->find($request->get('id'));
-
-
-            $data['install_img'] = json_decode($data['install_img']);
-            $data['specifications_img'] = json_decode($data['specifications_img']);
-            $data['detail'] = json_decode($data['detail']);
-
-
-        return view('admin.album.product.edit',compact('data','cat','style'));
+        $data['install_img'] = json_decode($data['install_img']);
+        $data['specifications_img'] = json_decode($data['specifications_img']);
+        $data['detail'] = json_decode($data['detail']);
+        $data['upload_video'] = json_decode($data['upload_video'], true);
+        $data['upload_video'] = $data['upload_video']['url'];
+        return view('admin.album.product.edit', compact('data', 'category', 'parent'));
     }
 
     /**
      * 保存修改
      */
-    private function _updateSave() {
+    private function _updateSave()
+    {
         $data = (array) request('data');
-        if(!empty($data['specifications_img']['url'])) {
-            foreach ($data['specifications_img']['url'] as $key=>$val) {
+        if (isset($data['upload_video'])) {
+            $data['upload_video'] = $this->uploadVideo($data['upload_video'], request('id'));
+        }
+
+        if (!empty($data['specifications_img']['url'])) {
+            foreach ($data['specifications_img']['url'] as $key => $val) {
                 $data['specifications_img']['url'][$key] = $this->formatImgUrl($val);
             }
             $data['specifications_img'] = json_encode($data['specifications_img']['url']);
         }
-        if(!empty($data['install_img']['url'])){
-            foreach ($data['install_img']['url'] as $key=>$val) {
+        if (!empty($data['install_img']['url'])) {
+            foreach ($data['install_img']['url'] as $key => $val) {
                 $data['install_img']['url'][$key] = $this->formatImgUrl($val);
             }
             $data['install_img'] = json_encode($data['install_img']['url']);
         }
-        if(!empty($data['cover_pic']))
+        if (!empty($data['cover_pic'])) {
             $data['cover_pic'] = $this->formatImgUrl($data['cover_pic']);
-        if(!empty($data['thumb']))
+        }
+        if (!empty($data['thumb'])) {
             $data['thumb'] = $this->formatImgUrl($data['thumb']);
-        if(!empty($data['detail']['url'])) {
-            foreach ($data['detail']['url'] as $key=>$val) {
+        }
+
+        if (!empty($data['detail']['url'])) {
+            foreach ($data['detail']['url'] as $key => $val) {
                 $data['detail']['url'][$key] = $this->formatImgUrl($val);
             }
             $data['detail'] = json_encode($data['detail']['url']);
         }
-        if(!empty($data['detail_pic']))
+        if (!empty($data['detail_pic'])) {
             $data['detail_pic'] = $this->formatImgUrl($data['detail_pic']);
-       // dd($data);
-        $ok = $this->repository->update(request('id'),$data);
-        if($ok) {
-            $url[] = array('url'=>U( 'Album/Product/index'),'title'=>'返回列表');
-            return $this->showMessage('操作成功',urldecode(request('_referer')));
-        }else{
-            $url[] = array('url'=>U( 'Album/Product/index'),'title'=>'返回列表');
-            return $this->showWarning('操作失败',$url);
+
+        }
+
+        $price = AlbumProductPriceModel::where('product_id', request('id'))->get();
+        foreach ($price as $p) {
+            $p->cat_id = $data['cat_id'];
+            $p->name = $data['name'];
+        }
+        $ok = $this->repository->update(request('id'), $data);
+        if ($ok) {
+            $url[] = array('url' => U('Album/Product/index'), 'title' => '返回列表');
+            return $this->showMessage('操作成功', urldecode(request('_referer')));
+        } else {
+            $url[] = array('url' => U('Album/Product/index'), 'title' => '返回列表');
+            return $this->showWarning('操作失败', $url);
+
         }
     }
 
-    public function view(Request $request) {
+    public function view(Request $request)
+    {
         $data = $this->repository->find(request('id'));
-        return view('admin.album.product.view',compact('data'));
+        return view('admin.album.product.view', compact('data'));
     }
 
 
@@ -194,25 +312,27 @@ class ProductController extends Controller
      * 状态改变
      *
      */
-    public function status(Request $request) {
-        $ok = $this->repository->updateStatus(request('id'),request('status'));
-        if($ok) {
+    public function status(Request $request)
+    {
+        $ok = $this->repository->updateStatus(request('id'), request('status'));
+        if ($ok) {
             return $this->showMessage('操作成功');
-        }else{
+        } else {
             return $this->showWarning('操作失败');
         }
     }
-    
+
     /**
      * 删除
      */
-    public function destroy(Request $request) {
+    public function destroy(Request $request)
+    {
         //$bool = $this->repository->destroy($request->get('id'));
         $cat = AlbumProductModel::find($request->get('id'));
         $ok = $cat->delete();
-        if($ok) {
+        if ($ok) {
             return  $this->showMessage('操作成功');
-        }else{
+        } else {
             return  $this->showWarning("操作失败");
         }
     }

+ 1 - 2
app/Http/Controllers/Admin/Auth/LoginController.php

xqd xqd
@@ -84,7 +84,7 @@ class LoginController extends Controller
             $createUser['admin_role_id'] = 4;
             $res = AdminUserModel::create($createUser);
         }
-        //dd(Auth::loginUsingId($res->id));
+
         if (Auth::guard('admin')->loginUsingId($res->id)) {
 
             $userAuth = Auth::guard('admin')->user();
@@ -113,7 +113,6 @@ class LoginController extends Controller
         }
         $res = $this->_service->login($request->name, $request->password);
         if($res) {
-            session()->put('is_we7','true');
             redirect('/admin/login');
         }else{
             $msg = $this->_service->getMsg();

+ 1 - 0
app/Http/Controllers/Admin/Base/ClassController.php

xqd
@@ -26,6 +26,7 @@ class ClassController extends Controller
     	
     	$class = new ClassModel;
     	$class->class = $request->input('class');
+    	$class->store_id = $this->getStoreId();
     	if(! $class->save()) {
     		$validator->errors()->add('my-error', '添加分类失败!');
     		return back()->withErrors($validator)->withInput();

+ 32 - 6
app/Http/Controllers/Admin/Base/PhotosController.php

xqd xqd
@@ -11,6 +11,7 @@ use Illuminate\Http\Request as HttpRequest;
 use Request;
 use Storage;
 use File;
+use Auth;
 
 class PhotosController extends Controller
 {
@@ -23,20 +24,45 @@ class PhotosController extends Controller
 
     public function index(HttpRequest $request)
     {
+        $userAuth = Auth::guard('admin')->user();
         $classes = ClassModel::all();
         $a_class = $request->has('class') ? $request->input('class') : null;
-        if(($a_class = ClassModel::find($a_class)) == null) {
-            $a_class = ClassModel::first();
+
+        if ($userAuth->is_root == 1) {
+            if (($a_class = ClassModel::find($a_class)) == null || empty(($a_class = ClassModel::find($a_class))->item)) {
+                $a_class = ClassModel::first();
+            }
+        } else {
+            $a_class['store_id'] = $this->getStoreId();
+            if (($a_class = ClassModel::find($a_class)) == null || empty(($a_class = ClassModel::find($a_class))->item)) {
+                $a_class = ClassModel::where('store_id', $this->getStoreId())->first();
+            }
         }
         $photos = null;
         $status = 'normal';
-        if($request->has('search')) {
+
+        if ($request->has('search')) {
             $name = '%' . $request->input('search') . '%';
-            $photos = BaseAttachmentModel::where('name', 'like', $name)->paginate(24);
+            if ($userAuth->is_root == 1) {
+                $photos = BaseAttachmentModel::where([['name', 'like', $name]])->paginate(24);
+            } else {
+                $photos = BaseAttachmentModel::where([['name', 'like', $name],['store_id', $this->getStoreId()]])->paginate(24);
+            }
+
             $status = 'search';
         } else {
-            if($a_class){
-                $photos = BaseAttachmentModel::where('class', $a_class->class)->paginate(24);
+
+            if ($a_class) {
+                if ($userAuth->is_root == 1) {
+                    $photos = BaseAttachmentModel::where([['class', $a_class->class]])->paginate(24);
+                } else {
+                    $photos = BaseAttachmentModel::where([['class', $a_class->class],['store_id', $this->getStoreId()]])->paginate(24);
+                }
+            } else {
+                $save['store_id'] = $this->getStoreId();
+                $save['class'] = '未分类';
+                ClassModel::create($save);
+                $a_class = ClassModel::where('store_id', $this->getStoreId())->first();
             }
         }
 

+ 0 - 1
app/Http/Controllers/Admin/Base/UserController.php

xqd
@@ -56,7 +56,6 @@ class UserController extends Controller
             if ($store) {
                 $item->store = $store->name;
             }
-
         }
         $roles = pairList($this->_getRoles(), 'id', 'name');
         return view('admin.base.user.index', compact('list', 'roles'));

+ 4 - 4
app/Http/Controllers/Admin/Controller.php

xqd
@@ -159,16 +159,16 @@ abstract class Controller extends BaseController
             }
             $urlHtml .= '&nbsp;<a  class="btn btn-primary"  href="' . $u . '" >' . $url['title'] . '</a>';
         }
-
+        $u = session()->get("is_we7")=="true"?"/addons/furniture/public":"";
         $html ='<!DOCTYPE html>
                 <html>
                 <head>
                     <meta name="viewport" content="width=device-width, initial-scale=1.0">
                     <meta name="renderer" content="webkit">
                     <title>' . $titleHtml .'</title>
-                    <link href="/base/css/bootstrap.min.css?v=3.4.0.css"  rel="stylesheet">
-                    <link href="/base/css/font-awesome.min.css?v=4.3.0.css"  rel="stylesheet">
-                    <link href="/base/css/style.min.css?v=3.0.0.css"  rel="stylesheet">
+                    <link href="' . $u  .'/base/css/bootstrap.min.css?v=3.4.0.css"  rel="stylesheet">
+                    <link href="' . $u  .'/base/css/font-awesome.min.css?v=4.3.0.css"  rel="stylesheet">
+                    <link href="' . $u  .'/base/css/style.min.css?v=3.0.0.css"  rel="stylesheet">
                     <script type="text/javascript">
                             setTimeout(function(){
                                 var url = "' . $urls[0]['url'] . '";

+ 554 - 83
app/Http/Controllers/Api/V1/AlbumBossController.php

xqd xqd xqd xqd xqd xqd xqd xqd
@@ -9,9 +9,11 @@
 namespace App\Http\Controllers\Api\V1;
 
 use App\Models\AlbumAgentModel;
+use App\Models\AlbumCatModel;
 use App\Models\AlbumProductModel;
 use App\Models\AlbumUserModel;
 use App\Models\AlbumWatchRecord;
+use App\Models\CustomerCatRecordModel;
 use App\Models\CustomerDetailsModel;
 use Illuminate\Http\Request;
 use Validator, Response,Auth;
@@ -76,7 +78,7 @@ class AlbumBossController extends Controller
         $store_id = $request->input('store_id');
         $agentData = AlbumAgentModel::where('store_id', $store_id)->orderByDesc('get_count')->paginate(20);
         foreach ($agentData as $value) {
-            $user = AlbumUserModel::where([['id', $value->user_id], ['store_id', $store_id]])->get(['avatar']);
+            $user = AlbumUserModel::where([['id', $value->user_id], ['store_id', $store_id]])->first(['avatar']);
             $value->avatar = $user->avatar;
         }
 
@@ -91,6 +93,7 @@ class AlbumBossController extends Controller
      * @apiVersion 0.1.0
      * @apiParam {int}    [store_id]  商户id
      * @apiParam {int}    [agent_id]  经销商id
+     * @apiParam {int}    [pageNum]   分页
      * @apiSuccessExample {json} Success-Response:
      * HTTP/1.1 200 OK
      * {
@@ -161,20 +164,31 @@ class AlbumBossController extends Controller
         ])->groupBy('open_id')->get();
         $i = 0;
         foreach ($userCount as $value) {
-            if ($i >= (($data['pageNum'] + 1) * 20)) {
-                break;
-            }
-            if ($i >= ($data['pageNum'] * 20) && $i < (($data['pageNum'] + 1) * 20)) {
+            if ($i >= (($data['pageNum'] - 1) * 20) && $i < ($data['pageNum'] * 20)) {
                 $user = AlbumUserModel::where('open_id', $value->open_id)->first(['avatar', 'username', 'address']);
                 $userComment = CustomerDetailsModel::where('open_id', $value->open_id)->first(['comment']);
-                $customer[] = [
-                    'name' => $userComment->comment,
-                    'avatar' => $user->avatar,
-                    'username' => $user->username,
-                    'address' => $user->address
-                ];
-                $i++;
+                if (empty($user->phone)) {
+                    $phone = '暂无';
+                } else {
+                    $phone = $user->phone;
+                }
+                if (!$userComment) {
+                    $customer[] = [
+                        'name' => '暂无',
+                        'avatar' => $user->avatar,
+                        'username' => $user->username,
+                        'phone' => $phone
+                    ];
+                } else {
+                    $customer[] = [
+                        'name' => $userComment->comment,
+                        'avatar' => $user->avatar,
+                        'username' => $user->username,
+                        'phone' => $phone
+                    ];
+                }
             }
+            $i++;
         }
 
         return $this->api(compact('agent', 'customer'), 0, 'success');
@@ -282,19 +296,96 @@ class AlbumBossController extends Controller
             ['updated_at','<=',$end]
         ])->orderByDesc('id')->count();
 
-        $totalCustomerCount = AlbumWatchRecord::where([
+        $totalCustomer = AlbumWatchRecord::where([
             ['agent_id', $data['agent_id']],
             ['store_id', $data['store_id']],
             ['updated_at','>=',$start],
             ['updated_at','<=',$end]
-        ])->orderByDesc('id')->groupBy('open_id')->count();
+        ])->orderByDesc('id')->groupBy('open_id')->get();
+        $totalCustomerCount = count($totalCustomer);
 
         return $this->api(compact('shareCount', 'totalCustomerCount', 'newCustomerCount', 'downloadCount', 'favoriteCount'));
     }
 
     /**
-     * @api {post} /api/album_boss/agent_overview 经销商总览(agent_overview)
-     * @apiDescription 经销商总览(agent_overview)
+     * @api {post} /api/album_boss/agent_overview_active 经销商总览活跃客户(agent_overview_active)
+     * @apiDescription 经销商总览活跃客户(agent_overview_active)
+     * @apiGroup Boss
+     * @apiPermission none
+     * @apiVersion 0.1.0
+     * @apiParam {int}    [store_id]  商户id
+     * @apiSuccessExample {json} Success-Response:
+     * HTTP/1.1 200 OK
+     * {
+     *     "status": true,
+     *     "status_code": 0,
+     *     "message": "",
+     *     "data": {
+     *         "activeCustomers": [
+     *              {
+     *                  "day" : 03/25,
+     *                  "num" : 111
+     *              }
+     *          ],
+     *     }
+     * }
+     * @apiErrorExample {json} Error-Response:
+     * HTTP/1.1 400 Bad Request
+     * {
+     *     "state": false,
+     *     "code": 1000,
+     *     "message": "传入参数不正确",
+     *     "data": null or []
+     * }
+     * 可能出现的错误代码:
+     *    1000    CLIENT_WRONG_PARAMS             传入参数不正确
+     */
+    public function albumOverviewActive(Request $request)
+    {
+
+        $userAuth = Auth('api')->user();
+        if (!$userAuth) {
+            return $this->error(ErrorCode::ERROR_POWER, '登陆过期!');
+        }
+        $validator = Validator::make($request->all(), [
+            'store_id' => 'required',
+        ], [
+            'store_id.required' => '缺少商户参数',
+        ]);
+
+        if ($userAuth->role != 4) {
+            return $this->error(ErrorCode::NOT_BOSS, '该用户没有Boss权限');
+        }
+
+        if ($validator->fails()) {
+            return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '传入参数不正确!', $validator->messages());
+        }
+
+        $store_id = $request->input('store_id');
+
+        $activeCustomers = array();
+        for ($d = 0; $d < 15; $d++) {
+            $StartO = mktime(0, 0, 0, date('m'), date('d'), date('y')) - 86400 * $d;
+            $EndO = $StartO + 86400;
+            $End = date('Y-m-d H:i:s', $EndO);
+            $Start = date('Y-m-d H:i:s', $StartO);
+            $customerNum = AlbumWatchRecord::where([
+                ['store_id', $store_id],
+                ['updated_at','>=',$Start],
+                ['updated_at','<=',$End]
+            ])->orderByDesc('id')->groupBy('open_id')->count();
+            $activeCustomers[] = [
+                'day' => date('m', $StartO) . '-' . date('d', $EndO),
+                'num' => $customerNum
+            ];
+        }
+        return $this->api($activeCustomers);
+    }
+
+
+    /**
+     * @api {post} /api/album_boss/agent_overview_left 经销商总览左侧(agent_overview_left)
+     * @apiDescription 经销商总览左侧(agent_overview_left)
      * @apiGroup Boss
      * @apiPermission none
      * @apiVersion 0.1.0
@@ -313,18 +404,249 @@ class AlbumBossController extends Controller
      *         "shareCount":11,
      *         "newCustomerCount":11,
      *         "totalCustomerCount":11,
-     *         "activeCustomers": [
-     *              {
-     *                  "day" : 03/25,
-     *                  "num" : 111
-     *              }
-     *          ],
-     *          "newCustomers": [
+     *     }
+     * }
+     * @apiErrorExample {json} Error-Response:
+     * HTTP/1.1 400 Bad Request
+     * {
+     *     "state": false,
+     *     "code": 1000,
+     *     "message": "传入参数不正确",
+     *     "data": null or []
+     * }
+     * 可能出现的错误代码:
+     *    1000    CLIENT_WRONG_PARAMS             传入参数不正确
+     */
+    public function albumOverviewLeft(Request $request)
+    {
+
+        $userAuth = Auth('api')->user();
+        if (!$userAuth) {
+            return $this->error(ErrorCode::ERROR_POWER, '登陆过期!');
+        }
+        $validator = Validator::make($request->all(), [
+            'store_id' => 'required',
+        ], [
+            'store_id.required' => '缺少商户参数',
+        ]);
+
+        if ($userAuth->role != 4) {
+            return $this->error(ErrorCode::NOT_BOSS, '该用户没有Boss权限');
+        }
+
+        if ($validator->fails()) {
+            return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '传入参数不正确!', $validator->messages());
+        }
+
+        $end = $request->input('end');
+        $start = $request->input('start');
+        $store_id = $request->input('store_id');
+        if (!$end) {
+            $end = time();
+        }
+        if (!$start) {
+            $start = 0;
+        }
+        $end = date('Y-m-d H:i:s', $end);
+        $start = date('Y-m-d H:i:s', $start);
+
+        $customerFollow = CustomerDetailsModel::where([
+            ['store_id', $store_id],
+            ['updated_at','>=',$start],
+            ['updated_at','<=',$end]
+            ])->count();
+        $downloadCount = AlbumWatchRecord::where([
+            ['store_id', $store_id],
+            ['action', 9],
+            ['updated_at','>=',$start],
+            ['updated_at','<=',$end]
+        ])->orderByDesc('id')->count();
+
+        $shareCount = AlbumWatchRecord::where([
+            ['store_id', $store_id],
+            ['action', 8],
+            ['updated_at','>=',$start],
+            ['updated_at','<=',$end]
+        ])->orderByDesc('id')->count();
+
+        $newCustomerCount = AlbumWatchRecord::where([
+            ['store_id', $store_id],
+            ['is_new', 1],
+            ['updated_at','>=',$start],
+            ['updated_at','<=',$end]
+        ])->orderByDesc('id')->count();
+
+        $totalCustomer = AlbumWatchRecord::where([
+            ['store_id', $store_id],
+            ['updated_at','>=',$start],
+            ['updated_at','<=',$end]
+        ])->orderByDesc('id')->groupBy('open_id')->get()->toArray();
+        $totalCustomerCount = count($totalCustomer);
+        return $this->api(compact('totalCustomerCount', 'newCustomerCount', 'shareCount', 'downloadCount', 'customerFollow'));
+    }
+
+    /**
+     * @api {post} /api/album_boss/agent_overview_funnel 经销商总览漏斗(agent_overview_funnel)
+     * @apiDescription 经销商总览漏斗(agent_overview_funnel)
+     * @apiGroup Boss
+     * @apiPermission none
+     * @apiVersion 0.1.0
+     * @apiParam {int}    [store_id]  商户id
+     * @apiSuccessExample {json} Success-Response:
+     * HTTP/1.1 200 OK
+     * {
+     *     "status": true,
+     *     "status_code": 0,
+     *     "message": "",
+     *     "data": {
+     *         "customerFollow":11,
+     *         "shareCount":11,
+     *         "totalCustomerCount":11,
+     *     }
+     * }
+     * @apiErrorExample {json} Error-Response:
+     * HTTP/1.1 400 Bad Request
+     * {
+     *     "state": false,
+     *     "code": 1000,
+     *     "message": "传入参数不正确",
+     *     "data": null or []
+     * }
+     * 可能出现的错误代码:
+     *    1000    CLIENT_WRONG_PARAMS             传入参数不正确
+     */
+    public function albumOverviewFunnel(Request $request)
+    {
+
+        $userAuth = Auth('api')->user();
+        if (!$userAuth) {
+            return $this->error(ErrorCode::ERROR_POWER, '登陆过期!');
+        }
+        $validator = Validator::make($request->all(), [
+            'store_id' => 'required',
+        ], [
+            'store_id.required' => '缺少商户参数',
+        ]);
+
+        if ($userAuth->role != 4) {
+            return $this->error(ErrorCode::NOT_BOSS, '该用户没有Boss权限');
+        }
+
+        if ($validator->fails()) {
+            return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '传入参数不正确!', $validator->messages());
+        }
+
+        $store_id = $request->input('store_id');
+
+        $customerFollow = CustomerDetailsModel::where('store_id', $store_id)->count();
+        $shareCount = AlbumWatchRecord::where([
+            ['store_id', $store_id],
+            ['action', 8],
+        ])->orderByDesc('id')->count();
+
+        $totalCustomer = AlbumWatchRecord::where([
+            ['store_id', $store_id],
+        ])->orderByDesc('id')->groupBy('open_id')->get()->toArray();
+        $totalCustomerCount = count($totalCustomer);
+        return $this->api(compact('totalCustomerCount', 'shareCount', 'customerFollow'));
+    }
+
+    /**
+     * @api {post} /api/album_boss/agent_overview_call 经销商总览咨询(agent_overview_call)
+     * @apiDescription 经销商总览咨询(agent_overview_call)
+     * @apiGroup Boss
+     * @apiPermission none
+     * @apiVersion 0.1.0
+     * @apiParam {int}    [store_id]  商户id
+     * @apiParam {int}    [day]     天数
+     * @apiSuccessExample {json} Success-Response:
+     * HTTP/1.1 200 OK
+     * {
+     *     "status": true,
+     *     "status_code": 0,
+     *     "message": "",
+     *     "data": {
+     *          "callCustomers": [
      *              {
      *                  "day" : 03/25,
      *                  "num" : 111
      *              }
      *          ]
+     *     }
+     * }
+     * @apiErrorExample {json} Error-Response:
+     * HTTP/1.1 400 Bad Request
+     * {
+     *     "state": false,
+     *     "code": 1000,
+     *     "message": "传入参数不正确",
+     *     "data": null or []
+     * }
+     * 可能出现的错误代码:
+     *    1000    CLIENT_WRONG_PARAMS             传入参数不正确
+     */
+    public function albumOverviewCall(Request $request)
+    {
+
+        $userAuth = Auth('api')->user();
+        if (!$userAuth) {
+            return $this->error(ErrorCode::ERROR_POWER, '登陆过期!');
+        }
+        $validator = Validator::make($request->all(), [
+            'store_id' => 'required',
+        ], [
+            'store_id.required' => '缺少商户参数',
+        ]);
+
+        if ($userAuth->role != 4) {
+            return $this->error(ErrorCode::NOT_BOSS, '该用户没有Boss权限');
+        }
+
+        if ($validator->fails()) {
+            return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '传入参数不正确!', $validator->messages());
+        }
+
+        $store_id = $request->input('store_id');
+        $day = $request->input('day');
+        $callCustomers = array();
+        for ($d = 0; $d < $day; $d++) {
+            $StartO = mktime(0, 0, 0, date('m'), date('d'), date('y')) - 86400 * $d;
+            $EndO = $StartO + 86400;
+            $End = date('Y-m-d H:i:s', $EndO);
+            $Start = date('Y-m-d H:i:s', $StartO);
+            $callCustomer = AlbumWatchRecord::where([
+                ['store_id', $store_id],
+                ['action', 7],
+                ['updated_at','>=',$Start],
+                ['updated_at','<=',$End]
+            ])->orderByDesc('id')->count();
+            $callCustomers[] = [
+                'day' => date('m', $StartO) . '-' . date('d', $EndO),
+                'num' => $callCustomer
+            ];
+        }
+
+
+        return $this->api($callCustomers);
+    }
+
+    /**
+     * @api {post} /api/album_boss/agent_overview_favorite 经销商总览兴趣占比(agent_overview_favorite)
+     * @apiDescription 经销商总览兴趣占比(agent_overview_favorite)
+     * @apiGroup Boss
+     * @apiPermission none
+     * @apiVersion 0.1.0
+     * @apiParam {int}    [store_id]  商户id
+     * @apiParam {int}    [parent_id]  商户id
+     * @apiParam {int}    [start]     开始时间
+     * @apiParam {int}    [end]       结束时间
+     * @apiSuccessExample {json} Success-Response:
+     * HTTP/1.1 200 OK
+     * {
+     *     "status": true,
+     *     "status_code": 0,
+     *     "message": "",
+     *     "data": {
      *          "arrFavorite": [
      *              {
      *                  'name':'asdawd',
@@ -345,7 +667,7 @@ class AlbumBossController extends Controller
      * 可能出现的错误代码:
      *    1000    CLIENT_WRONG_PARAMS             传入参数不正确
      */
-    public function albumOverview(Request $request)
+    public function albumOverviewFavorite(Request $request)
     {
 
         $userAuth = Auth('api')->user();
@@ -377,82 +699,231 @@ class AlbumBossController extends Controller
         }
         $end = date('Y-m-d H:i:s', $end);
         $start = date('Y-m-d H:i:s', $start);
-        $resGoods = AlbumWatchRecord::where([
-            ['store_id',$store_id],['action',3],['updated_at','>=',$start],
-            ['updated_at','<=',$end]
-        ])->get();
-        $arrFavorite = array();
+        $parent_id = $request->input('parent_id');
+        $cat = AlbumCatModel::where([['store_id',$store_id],['parent_id', $parent_id]])->get(['name','id'])->toArray();
         $total = 0;
-
-        foreach ($resGoods as $key => $val) {
-            $goods_data = json_decode($val->detail, true);
-            $goods_id = $goods_data['goods_id'];
-            $goods = AlbumProductModel::find($goods_id);
-            if (!$goods) {
-                continue;
-            }
-            if (isset($arr[$goods->id])) {
-                $arrFavorite[$goods->id]['num']++;
+        foreach ($cat as $key => $val) {
+            $count = CustomerCatRecordModel::where([
+                ['store_id',$store_id],
+                ['cat_id',$val['id']],
+                ['updated_at','>=',$start],
+                ['updated_at','<=',$end]
+            ])->count();
+            $total += $count;
+            $cat[$key]['num'] = $count;
+        }
+        foreach ($cat as $key => $val) {
+            if ($val['num'] == 0 || $total == 0) {
+                $cat[$key]['point'] = 0;
             } else {
-                $arrFavorite[$goods->id]['num'] = 1;
-                $arrFavorite[$goods->id]['name'] = $goods->name;
+                $cat[$key]['point'] = ($val['num'] / $total * 100) . '%';
             }
-            $total++;
         }
-        $activeCustomers = array();
+
+        return $this->api($cat);
+    }
+
+    /**
+     * @api {post} /api/album_boss/agent_overview_new 经销商总览新增客户(agent_overview_new)
+     * @apiDescription 经销商总览新增客户(agent_overview_new)
+     * @apiGroup Boss
+     * @apiPermission none
+     * @apiVersion 0.1.0
+     * @apiParam {int}    [store_id]  商户id
+     * @apiParam {int}    [day]  天数
+     * @apiSuccessExample {json} Success-Response:
+     * HTTP/1.1 200 OK
+     * {
+     *     "status": true,
+     *     "status_code": 0,
+     *     "message": "",
+     *     "data": {
+     *          "newCustomers": [
+     *              {
+     *                  "day" : 03/25,
+     *                  "num" : 111
+     *              }
+     *          ]
+     *     }
+     * }
+     * @apiErrorExample {json} Error-Response:
+     * HTTP/1.1 400 Bad Request
+     * {
+     *     "state": false,
+     *     "code": 1000,
+     *     "message": "传入参数不正确",
+     *     "data": null or []
+     * }
+     * 可能出现的错误代码:
+     *    1000    CLIENT_WRONG_PARAMS             传入参数不正确
+     */
+    public function albumOverviewNew(Request $request)
+    {
+
+        $userAuth = Auth('api')->user();
+        if (!$userAuth) {
+            return $this->error(ErrorCode::ERROR_POWER, '登陆过期!');
+        }
+        $validator = Validator::make($request->all(), [
+            'store_id' => 'required',
+        ], [
+            'store_id.required' => '缺少商户参数',
+        ]);
+
+        if ($userAuth->role != 4) {
+            return $this->error(ErrorCode::NOT_BOSS, '该用户没有Boss权限');
+        }
+
+        if ($validator->fails()) {
+            return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '传入参数不正确!', $validator->messages());
+        }
+
+        $store_id = $request->input('store_id');
+        $day = $request->input('day');
         $newCustomers = array();
-        for ($d = 0; $d < 15; $d++) {
-            $Start = mktime(0, 0, 0, date('m'), date('d'), date('y')) + 86400 * $d;
-            $End = $Start + 86400;
-            $End = date('Y-m-d H:i:s', $End);
-            $Start = date('Y-m-d H:i:s', $Start);
-            $customerNum = AlbumWatchRecord::where([
-                ['store_id', $store_id],
-                ['updated_at','>=',$Start],
-                ['updated_at','<=',$End]
-            ])->orderByDesc('id')->groupBy('open_id')->count();
+        for ($d = 0; $d < $day; $d++) {
+            $StartO = mktime(0, 0, 0, date('m'), date('d'), date('y')) - 86400 * $d;
+            $EndO = $StartO + 86400;
+            $End = date('Y-m-d H:i:s', $EndO);
+            $Start = date('Y-m-d H:i:s', $StartO);
             $newCustomer = AlbumWatchRecord::where([
                 ['store_id', $store_id],
                 ['is_new', 1],
                 ['updated_at','>=',$Start],
                 ['updated_at','<=',$End]
             ])->orderByDesc('id')->count();
-            $activeCustomers[] = [
-                'day' => date('m', $Start) . '-' . date('d', $End),
-                'num' => $customerNum
-            ];
             $newCustomers[] = [
-                'day' => date('m', $Start) . '-' . date('d', $End),
+                'day' => date('m', $StartO) . '-' . date('d', $EndO),
                 'num' => $newCustomer
             ];
         }
-        $customerFollow = CustomerDetailsModel::where('store_id', $store_id)->count();
-        $downloadCount = AlbumWatchRecord::where([
-            ['store_id', $store_id],
-            ['action', 9],
-            ['updated_at','>=',$start],
-            ['updated_at','<=',$end]
-        ])->orderByDesc('id')->count();
 
-        $shareCount = AlbumWatchRecord::where([
-            ['store_id', $store_id],
-            ['action', 8],
-            ['updated_at','>=',$start],
-            ['updated_at','<=',$end]
-        ])->orderByDesc('id')->count();
+        return $this->api($newCustomers);
+    }
 
-        $newCustomerCount = AlbumWatchRecord::where([
-            ['store_id', $store_id],
-            ['is_new', 1],
-            ['updated_at','>=',$start],
-            ['updated_at','<=',$end]
-        ])->orderByDesc('id')->count();
+    /**
+     * @api {post} /api/album_boss/agent_analysis 经销商分析(agent_analysis)
+     * @apiDescription 经销商分析(agent_analysis)
+     * @apiGroup Boss
+     * @apiPermission none
+     * @apiVersion 0.1.0
+     * @apiParam {int}    [store_id]  商户id
+     * @apiSuccessExample {json} Success-Response:
+     * HTTP/1.1 200 OK
+     * {
+     *     "status": true,
+     *     "status_code": 0,
+     *     "message": "",
+     *     "data": [
+     *         {
+     *             "realname" : 释迦摩尼,
+     *             "pointCount" : 111
+     *             "callCount" : 111
+     *             "favoriteCount" : 111
+     *             "get_count" : 111
+     *             "share_times" : 111
+     *             "newCount" : 111
+     *         }
+     *     ]
+     * }
+     * @apiErrorExample {json} Error-Response:
+     * HTTP/1.1 400 Bad Request
+     * {
+     *     "state": false,
+     *     "code": 1000,
+     *     "message": "传入参数不正确",
+     *     "data": null or []
+     * }
+     * 可能出现的错误代码:
+     *    1000    CLIENT_WRONG_PARAMS             传入参数不正确
+     */
+    public function agentAnalysis(Request $request)
+    {
+        $userAuth = Auth('api')->user();
+        if (!$userAuth) {
+            return $this->error(ErrorCode::ERROR_POWER, '登陆过期!');
+        }
+        $validator = Validator::make($request->all(), [
+            'store_id' => 'required',
+        ], [
+            'store_id.required' => '缺少商户参数',
+        ]);
+        if ($userAuth->role != 4) {
+            return $this->error(ErrorCode::NOT_BOSS, '该用户没有Boss权限');
+        }
+        if ($validator->fails()) {
+            return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '传入参数不正确!', $validator->messages());
+        }
+        $store_id = $request->input('store_id');
 
-        $totalCustomerCount = AlbumWatchRecord::where([
-            ['store_id', $store_id],
-            ['updated_at','>=',$start],
-            ['updated_at','<=',$end]
-        ])->orderByDesc('id')->groupBy('open_id')->count();
-        return $this->api(compact('totalCustomerCount', 'newCustomerCount', 'shareCount', 'downloadCount', 'customerFollow', 'newCustomers', 'activeCustomers', 'arrFavorite'));
+        $agent = AlbumAgentModel::where('store_id', $store_id)->orderByDesc('newCount')->paginate(12);
+        foreach ($agent as $value) {
+            $user = AlbumUserModel::where([['id', $value->user_id], ['store_id', $store_id]])->first(['avatar']);
+            $value->avatar = $user->avatar;
+        }
+        return $this->api($agent);
+    }
+
+
+    /**
+     * @api {get} /api/album_boss/boss_interactive 经销商互动排名(boss_interactive)
+     * @apiDescription 经销商互动排名(boss_interactive)
+     * @apiGroup Boss
+     * @apiPermission none
+     * @apiVersion 0.1.0
+     * @apiParam {int}    [store_id]  商户id
+     * @apiSuccessExample {json} Success-Response:
+     * HTTP/1.1 200 OK
+     * {
+     *     "status": true,
+     *     "status_code": 0,
+     *     "message": "",
+     *     "data": [
+     *         {
+     *             "realname" : 释迦摩尼,
+     *             "interactive" : 111
+     *             "avatar" : 111
+     *         }
+     *     ]
+     * }
+     * @apiErrorExample {json} Error-Response:
+     * HTTP/1.1 400 Bad Request
+     * {
+     *     "state": false,
+     *     "code": 1000,
+     *     "message": "传入参数不正确",
+     *     "data": null or []
+     * }
+     * 可能出现的错误代码:
+     *    1000    CLIENT_WRONG_PARAMS             传入参数不正确
+     */
+    public function BossInteractive(Request $request)
+    {
+        $userAuth = Auth('api')->user();
+        if (!$userAuth) {
+            return $this->error(ErrorCode::ERROR_POWER, '登陆过期!');
+        }
+        $validator = Validator::make($request->all(), [
+            'store_id' => 'required',
+        ], [
+            'store_id.required' => '缺少商户参数',
+        ]);
+        if ($userAuth->role != 4) {
+            return $this->error(ErrorCode::NOT_BOSS, '该用户没有Boss权限');
+        }
+
+        if ($validator->fails()) {
+            return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '传入参数不正确!', $validator->messages());
+        }
+
+        $store_id = $request->input('store_id');
+
+        $agent = AlbumAgentModel::where('store_id', $store_id)->orderByDesc('interactive')->paginate(20);
+        foreach ($agent as $value) {
+            $user = AlbumUserModel::where([['id', $value->user_id], ['store_id', $store_id]])->first(['avatar']);
+            $value->avatar = $user->avatar;
+
+        }
+        return $this->api($agent);
     }
 }

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 310 - 271
app/Http/Controllers/Api/V1/AlbumController.php


+ 4 - 4
app/Http/Controllers/Api/V1/AlbumPosterController.php

xqd
@@ -227,10 +227,10 @@ class AlbumPosterController extends Controller
             $add_record['store_id'] = $data['store_id'];
             $add_record['detail'] = '保存了图片';
             $user_agent = AlbumAgentModel::where('id', $userAuth->up_agent_id)->first();
-            $agent = AlbumUserModel::where('id', $user_agent->user_id)->first();
-
-            $album = new AlbumController();
-            $album->sendLogsMessage($data['store_id'], $agent->open_id, 9, $userAuth->username, $agent->g_open_id);
+            $user_agent->share_times++;
+            $user_agent->save();
+            //$album = new AlbumController();
+            //$album->sendLogsMessage($data['store_id'], $agent->open_id, 9, $userAuth->username, $agent->g_open_id);
 
             AlbumWatchRecord::create($add_record);
         }

+ 1 - 1
app/Http/Controllers/Api/V1/Controller.php

xqd
@@ -23,7 +23,7 @@ class Controller extends BaseController
             'except' => [
                 'upload', 'getCode', 'reset', 'login', 'get', 'register', 'alipayNotify', 'wechatpayNotify', 'get', 'area', 'get_province', 'get_city', 'get_county', 'albumStyle', 'test', 'index', 'companyInfo', 'shop2', 'cardIndex', 'cardUserInfo', 'cardUserProgress', 'cardUserHonor', 'cardUserProject', 'CardUserTrend', 'projectDetail', 'trendDetail', 'albumSetting', 'albumXyxLogin', 'albumCat', 'albumchecklogin', 'albumGoods', 'albumGoodsDetail', 'albumSetPrice', 'albumXcxLogin', 'albumContentList', 'albumSearchGoods','albumContentDetail','albumFavoriteList','albumAddFavorite','albumFavoriteDel','getAttr','getOrder','getProgress','getReviewCount', 'furnitureNewsDetail','furnitureSetting','furnitureXcxLogin','furnitureGoodsList','serviceLogin','getFurnitureAds','getPhoneNumber','getQrcode','orderCount','searchList','printOrder','saveFormId','furnitureNewsList','getMoreComments','addToLike','albumSavePhone','albumGetStatistical','test',
                 'albumGetWatchRecord','albumSetWatch','albumGetCartOfWatch','albumSaveFormId','albumAddAgent','albumGetBanner','albumGetDataGoods','newgoods_list','newgoods_index','albumGetAgentAdress','albumSetCustomer','albumGetCustomer','albumGetDataCat','albumCustomerGoods','albumCustomerGoodsDetail','albumGetDataCatSingle','albumGetCountOfFavorite','albumGetUserInfo','albumStatistical','posterInfo','createPoster','posterDel','albumAgentPriceSet', 'getTop', 'agentCustomer'
-                , 'agentStatistical', 'albumOverview'
+                , 'agentStatistical', 'albumOverviewActive', 'albumOverviewLeft', 'albumOverviewFavorite', 'albumOverviewNew', 'agentAnalysis', 'albumOverviewFunnel', 'albumOverviewCall', 'BossInteractive'
             ]
         ]);
 

+ 43 - 31
app/Http/Controllers/Web/AuthController.php

xqd xqd xqd
@@ -8,6 +8,7 @@
 
 namespace App\Http\Controllers\Web;
 
+use App\Models\AlbumAgentModel;
 use App\Models\AlbumManufacturerModel;
 use App\Models\AlbumUserModel;
 use Illuminate\Http\Request;
@@ -17,26 +18,45 @@ class AuthController extends Controller
 {
     public function bind(Request $request)
     {
-        $store_id = $request->input('store_id');
-        $weChatApp = AlbumManufacturerModel::where('store_id', $store_id)->first();
-        $config = [
-            'app_id' => $weChatApp->G_app_id,
-            'secret' => $weChatApp->G_app_secret,
-            'response_type' => 'array',
-            'oauth' => [
-                'scopes'   => ['snsapi_userinfo'],
-                'callback' => '/web/notify?store_id=' . $store_id,
-            ]
+        if ($request->isMethod('post')) {
+            $store_id = $request->input('store_id');
+            $phone = $request->input('phone');
+            $name = $request->input('name');
+            if (!$phone || !$name) {
+                $message = '请输入电话号码';
+                return view('web.auth.error', compact('message'));
+            } else {
+                $check = AlbumUserModel::where([['phone', $phone],['g_open_id', null],['is_dealer', 1]])->first();
+                if (!$check) {
+                    $message = '该经销商号码不存在或是已绑定';
+                    return view('web.auth.error', compact('message'));
+                }
 
-        ];
-        $app = Factory::officialAccount($config);
-        $response = $app->oauth
-            ->redirect();
-        return $response;
+            }
+            $weChatApp = AlbumManufacturerModel::where('store_id', $store_id)->first();
+            $config = [
+                'app_id' => $weChatApp->G_app_id,
+                'secret' => $weChatApp->G_app_secret,
+                'response_type' => 'array',
+                'oauth' => [
+                    'scopes'   => ['snsapi_userinfo'],
+                    'callback' => '/web/notify?store_id=' . $store_id . "&name=$name&phone=$phone",
+                ]
+
+            ];
+            $app = Factory::officialAccount($config);
+            $response = $app->oauth
+                ->redirect();
+            return $response;
+        } else {
+            return view('web.auth.bind');
+        }
     }
     public function notify(Request $request)
     {
         $store_id = $request->input('store_id');
+        $phone = $request->input('phone');
+        $name = $request->input('name');
         $weChatApp = AlbumManufacturerModel::where('store_id', $store_id)->first();
         $config = [
             'app_id' => $weChatApp->G_app_id,
@@ -51,22 +71,14 @@ class AuthController extends Controller
         $oauth = $app->oauth;
         $user = $oauth->user()->toArray();
         $check_user = AlbumUserModel::where([['store_id',$store_id],['wechat_union_id',$user['original']['unionid']]])->first();
-        if ($check_user) {
-            $check_user->g_open_id = $user['id'];
-            $check_user->save();
-        } else {
-            $data['username'] = $user['name'];
-            $data['wechat_union_id'] = $user['original']['unionid'];
-            $data['avatar'] = $user['avatar'];
-            $data['g_open_id'] = $user['id'];
-            $data['store_id'] = $store_id;
-            $data['is_dealer'] = 0;
-            $data['role'] = 0;
-            $data['model'] = 0;
-            $data['up_agent_id'] = 0;
-            AlbumUserModel::create($data);
-        }
-        return view('web.auth.bind');
+        $agent = AlbumAgentModel::where([['store_id', $store_id],['user_id', $check_user->id]])->first();
+        $agent->name = $name;
+        $agent->save();
+        $check_user->g_open_id = $user['id'];
+        $check_user->phone = $phone;
+        $check_user->save();
+
+        return view('web.auth.success');
     }
 
     public function notifyAccount(Request $request)

+ 6 - 0
app/Models/ClassModel.php

xqd
@@ -19,4 +19,10 @@ class ClassModel extends BaseModel
 
     //分页
     protected $perPage = PAGE_NUMS;
+
+
+    protected $fillable = [
+        'store_id',
+        'class'
+    ];
 }

+ 17 - 9
app/Widget/Tools/FileUpload.php

xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -19,6 +19,9 @@ class FileUpload {
      */
     public function single($folder, $id, $name = "data[file]", $file = "", $option = [], $param = [])
     {
+        $strUri = session()->get('is_we7')=='true'?'/addons/furniture/public':'';
+        $serverUri = session()->get('is_we7')=='true'?'/addons/furniture/public/?route=':'/';
+        $str_U = session()->get('is_we7')=='true'?'&':'?';
         $file_types = 'jpg|jpeg|gif|png|bmp|doc|docx|xls|xlsx|ppt|htm|html|php|txt|zip|rar|gz|bz2';
         $option['position'] = isset($option['position']) ? $option['position'] : "alioss";
         $option['placeholder'] = isset($option['placeholder']) ? $option['placeholder'] : "";
@@ -34,8 +37,8 @@ class FileUpload {
 
         $token = csrf_token();
         $html = <<<EOF
-         <link href="/base/webuploader/webuploader.css" rel="stylesheet">
-                        <script src="/base/webuploader/webuploader.min.js"></script>
+         <link href="$strUri/base/webuploader/webuploader.css" rel="stylesheet">
+                        <script src="$strUri/base/webuploader/webuploader.min.js"></script>
             <div class="WebUploader">
                 <div class="WebUploader_button">
                     <div class="input-group">
@@ -59,8 +62,8 @@ class FileUpload {
                             title: 'Files',
                             extensions: "{$file_types}",
                         },
-                        swf: "/base/webuploader/uploader.swf",
-                        server: "/api/attachment/webupload",
+                        swf: "{$strUri}/base/webuploader/uploader.swf",
+                        server: "{$serverUri}api/attachment/webupload",
                         fileNumLimit: 300,
                         fileSizeLimit: 20 * 1024 * 1024,
                         fileSingleSizeLimit: 10 * 1024 * 1024,
@@ -115,7 +118,9 @@ EOF;
 
     public function single2($folder, $id, $name="data", $file="", $option=[]){
         $folder = urlencode($folder);
-
+        $strUri = session()->get('is_we7')=='true'?'/addons/furniture/public':'';
+        $serverUri = session()->get('is_we7')=='true'?'/addons/furniture/public/?route=':'/';
+        $str_U = session()->get('is_we7')=='true'?'&':'?';
         $imgHtml =  "";
         $option['callback'] = isset($option['callback']) ? $option['callback'] : "";
         if(!$option['callback'] && !empty($file)) {
@@ -144,7 +149,7 @@ EOF;
         }
 
         $html = <<<EOF
-           <script type="text/javascript" src="/base/plugins/imguploader/uploader.js"></script>
+           <script type="text/javascript" src="$strUri/base/plugins/imguploader/uploader.js"></script>
             <div class="layout_upload">
                 <ul class="ullit">
                     $imgHtml
@@ -166,7 +171,7 @@ EOF;
                 UploaderPick:"#$id",
                 UploaderMax:0,
                 UploadHiddenField:"$name",
-                UploaderServer:"/api/attachment/webupload?elementid=&folder=$folder&_time=" + Math.random(),
+                UploaderServer:"{$serverUri}api/attachment/webupload{$str_U}elementid=&folder=$folder&_time=" + Math.random(),
                 UploaderSingle:true
             });
         </script>
@@ -175,6 +180,9 @@ EOF;
     }
 
     public function multi2($folder, $id, $name="data[image]", $files=[], $option=[]){
+        $strUri = session()->get('is_we7')=='true'?'/addons/furniture/public':'';
+        $serverUri = session()->get('is_we7')=='true'?'/addons/furniture/public/?route=':'/';
+        $str_U = session()->get('is_we7')=='true'?'&':'?';
         $folder = urlencode($folder);
         $imgHtml =  "";
         $option['callback'] = isset($option['callback']) ? $option['callback'] : "";
@@ -217,7 +225,7 @@ EOF;
         }
 
         $html = <<<EOF
-           <script type="text/javascript" src="/base/plugins/imguploader/uploader.js"></script>
+           <script type="text/javascript" src="$strUri/base/plugins/imguploader/uploader.js"></script>
             <div class="layout_upload">
                 <ul class="ullit">
                                     $imgHtml
@@ -239,7 +247,7 @@ EOF;
             new uploadFile({
                 UploaderPick:"#$id",
                 UploaderMax:{$option['max']},
-                UploaderServer:"/api/attachment/webupload?elementid=&folder=$folder&_time=" + Math.random(),
+                UploaderServer:"{$serverUri}api/attachment/webupload{$str_U}elementid=&folder=$folder&_time=" + Math.random(),
                 UploadHiddenField:"$name"
             });
         </script>

+ 41 - 21
app/Widget/Tools/ImgUpload.php

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -22,6 +22,9 @@ class ImgUpload {
      */
     public function single($id, $name = "data[image]", $file = '')
     {
+        $strUri = session()->get('is_we7')=='true'?'/addons/furniture/public':'';
+        $serverUri = session()->get('is_we7')=='true'?'/addons/furniture/public/?route=':'/';
+        $str_U = session()->get('is_we7')=='true'?'&':'?';
         $url = U("/Base/Photos/index");
         $imgHtml = "";
         if (!empty($file)) {
@@ -46,8 +49,8 @@ class ImgUpload {
             }
         }
         $html = <<<EOF
-                        <link href="/base/plugins/webuploader/webuploader.css" rel="stylesheet">
-                        <script src="/base/plugins/webuploader/webuploader.js"></script>
+                        <link href="$strUri/base/plugins/webuploader/webuploader.css" rel="stylesheet">
+                        <script src="$strUri/base/plugins/webuploader/webuploader.js"></script>
                             <div style="clear:both">
                             <div id="$id" class="layout_upload">
                                 <ul class="ullit">
@@ -98,6 +101,9 @@ EOF;
 
 
     public function single2($folder, $id, $name="data", $file="", $option=[]){
+        $strUri = session()->get('is_we7')=='true'?'/addons/furniture/public':'';
+        $serverUri = session()->get('is_we7')=='true'?'/addons/furniture/public/?route=':'/';
+        $str_U = session()->get('is_we7')=='true'?'&':'?';
         $folder = urlencode($folder);
         $imgHtml =  "";
         $option['callback'] = isset($option['callback']) ? $option['callback'] : "";
@@ -136,7 +142,7 @@ EOF;
         }
 
         $html = <<<EOF
-           <script type="text/javascript" src="/base/plugins/imguploader/uploader.js"></script>
+           <script type="text/javascript" src="$strUri/base/plugins/imguploader/uploader.js"></script>
             <div class="layout_upload">
                 <ul class="ullit">
                     $imgHtml
@@ -158,7 +164,7 @@ EOF;
                 UploaderPick:"#$id",
                 UploaderMax:0,
                 UploadHiddenField:"data[$name]",
-                UploaderServer:"/admin/Base/Attachment/webupload?elementid=&watermark={$option['watermark']}&sizex={$option['sizex']}&sizey={$option['sizey']}&folder=$folder&_time=" + Math.random(),
+                UploaderServer:"{$serverUri}admin/Base/Attachment/webupload{$str_U}elementid=&watermark={$option['watermark']}&sizex={$option['sizex']}&sizey={$option['sizey']}&folder=$folder&_time=" + Math.random(),
                 UploaderSingle:true
             });
         </script>
@@ -169,6 +175,9 @@ EOF;
 
     public function single3($text, $folder, $id, $option = [])
     {
+        $strUri = session()->get('is_we7')=='true'?'/addons/furniture/public':'';
+        $serverUri = session()->get('is_we7')=='true'?'/addons/furniture/public/?route=':'/';
+        $str_U = session()->get('is_we7')=='true'?'&':'?';
         $folder = urlencode($folder);
         $trigger = $id . '-trigger';
         $modal = $id . '-modal';
@@ -176,14 +185,14 @@ EOF;
         $upload_btn = $id . '-upload-btn';
         $uploader = $id . '_uploader';
         $url = isset($option['url']) ? $option['url'] : 'empty';
-        $upload_url = "/admin/Base/Attachment/webupload?folder=" . $folder;
+        $upload_url = "{$serverUri}admin/Base/Attachment/webupload{$str_U}folder=" . $folder;
         foreach($option as $key => $val) {
             $upload_url = $upload_url . '&' . $key . '=' . $val;
         }
 
         $html = <<<EOF
-<link rel="stylesheet" type="text/css" href="/base/plugins/webuploader/webuploader.css">
-<script type="text/javascript" src="/base/plugins/webuploader/webuploader.js"></script>
+<link rel="stylesheet" type="text/css" href="$strUri/base/plugins/webuploader/webuploader.css">
+<script type="text/javascript" src="$strUri/base/plugins/webuploader/webuploader.js"></script>
 <style type="text/css">
     .webuploader-pick {
         height: 34px
@@ -248,7 +257,7 @@ EOF;
             multiple: false,
         },
         server: "$upload_url",
-        swf: "/base/plugins/webuploader/Uploader.swf",
+        swf: "$strUri/base/plugins/webuploader/Uploader.swf",
         fileNumLimit: 1,
         accept: {
             title: 'Images',
@@ -325,6 +334,9 @@ EOF;
      */
     public function multi($id, $name = "data[image]", $imgs = [])
     {
+        $strUri = session()->get('is_we7')=='true'?'/addons/furniture/public':'';
+        $serverUri = session()->get('is_we7')=='true'?'/addons/furniture/public/?route=':'/';
+        $str_U = session()->get('is_we7')=='true'?'&':'?';
         $url = U("/Base/Photos/index");
         $imgHtml = "";
         if (!empty($imgs)) {
@@ -356,8 +368,8 @@ EOF;
 
 
         $html = <<<EOF
-                        <link href="/base/plugins/webuploader/webuploader.css" rel="stylesheet">
-                        <script src="/base/plugins/webuploader/webuploader.js"></script>
+                        <link href="$strUri/base/plugins/webuploader/webuploader.css" rel="stylesheet">
+                        <script src="$strUri/base/plugins/webuploader/webuploader.js"></script>
                             <div style="clear:both">
                             <div id="multi" class="layout_upload">
                                 <ul class="ullit">
@@ -405,7 +417,9 @@ EOF;
 
     public function multi2($folder, $id, $name="data[image]", $imgs=[], $option=[]){
         $folder = urlencode($folder);
-
+        $strUri = session()->get('is_we7')=='true'?'/addons/furniture/public':'';
+        $serverUri = session()->get('is_we7')=='true'?'/addons/furniture/public/?route=':'/';
+        $str_U = session()->get('is_we7')=='true'?'&':'?';
         $imgHtml =  "";
         $option['callback'] = isset($option['callback']) ? $option['callback'] : "";
         $option['max'] = isset($option['max']) ? $option['max'] : 200;
@@ -450,7 +464,7 @@ EOF;
         }
 
         $html = <<<EOF
-           <script type="text/javascript" src="/base/plugins/imguploader/uploader.js"></script>
+           <script type="text/javascript" src="$strUri/base/plugins/imguploader/uploader.js"></script>
             <div class="layout_upload">
                 <ul class="ullit">
                                     $imgHtml
@@ -472,7 +486,7 @@ EOF;
             new upload({
                 UploaderPick:"#$id",
                 UploaderMax:{$option['max']},
-                UploaderServer:"/admin/Base/Attachment/webupload?elementid=&watermark={$option['watermark']}&sizex={$option['sizex']}&sizey={$option['sizey']}&folder=$folder&class=$class&_time=" + Math.random(),
+                UploaderServer:"{$serverUri}admin/Base/Attachment/webupload{$str_U}elementid=&watermark={$option['watermark']}&sizex={$option['sizex']}&sizey={$option['sizey']}&folder=$folder&class=$class&_time=" + Math.random(),
                 UploadHiddenField:"$name"
             });
         </script>
@@ -489,6 +503,9 @@ EOF;
      */
     public function multi3($text, $folder, $id, $option = [])
     {
+        $strUri = session()->get('is_we7')=='true'?'/addons/furniture/public':'';
+        $serverUri = session()->get('is_we7')=='true'?'/addons/furniture/public/?route=':'/';
+        $str_U = session()->get('is_we7')=='true'?'&':'?';
         $folder = urlencode($folder);
         $trigger = $id . '-trigger';
         $modal = $id . '-modal';
@@ -496,14 +513,14 @@ EOF;
         $upload_btn = $id . '-upload-btn';
         $uploader = $id . '_uploader';
         $url = isset($option['url']) ? $option['url'] : 'empty';
-        $upload_url = "/admin/Base/Attachment/webupload?folder=" . $folder;
+        $upload_url = "{$serverUri}admin/Base/Attachment/webupload{$str_U}folder=" . $folder;
         foreach($option as $key => $val) {
             $upload_url = $upload_url . '&' . $key . '=' . $val;
         }
 
         $html = <<<EOF
-<link rel="stylesheet" type="text/css" href="/base/plugins/webuploader/webuploader.css">
-<script type="text/javascript" src="/base/plugins/webuploader/webuploader.js"></script>
+<link rel="stylesheet" type="text/css" href="$strUri/base/plugins/webuploader/webuploader.css">
+<script type="text/javascript" src="$strUri/base/plugins/webuploader/webuploader.js"></script>
 <style type="text/css">
     .webuploader-pick {
         height: 34px
@@ -568,7 +585,7 @@ EOF;
             id: "#$select_btn",
         },
         server: "$upload_url",
-        swf: "/base/plugins/webuploader/Uploader.swf",
+        swf: "$strUri/base/plugins/webuploader/Uploader.swf",
         accept: {
             title: 'Images',
             extensions: 'gif,jpg,jpeg,bmp,png',
@@ -639,6 +656,9 @@ EOF;
      */
     public function upload($text, $folder, $id, $option = [])
     {
+        $strUri = session()->get('is_we7')=='true'?'/addons/furniture/public':'';
+        $serverUri = session()->get('is_we7')=='true'?'/addons/furniture/public/?route=':'/';
+        $str_U = session()->get('is_we7')=='true'?'&':'?';
         $folder = urlencode($folder);
         $trigger = $id . '-trigger';
         $modal = $id . '-modal';
@@ -646,13 +666,13 @@ EOF;
         $upload_btn = $id . '-upload-btn';
         $uploader = $id . '_uploader';
         $url = isset($option['url']) ? $option['url'] : 'empty';
-        $upload_url = "/admin/Base/Attachment/webupload?folder=" . $folder;
+        $upload_url = "{$serverUri}admin/Base/Attachment/webupload{$str_U}folder=" . $folder;
         foreach ($option as $key => $val) {
             $upload_url = $upload_url . '&' . $key . '=' . $val;
         }
         $html = <<<EOF
-<link rel="stylesheet" type="text/css" href="/base/plugins/webuploader/webuploader.css">
-<script type="text/javascript" src="/base/plugins/webuploader/webuploader.js"></script>
+<link rel="stylesheet" type="text/css" href="$strUri/base/plugins/webuploader/webuploader.css">
+<script type="text/javascript" src="$strUri/base/plugins/webuploader/webuploader.js"></script>
 <style type="text/css">
     .webuploader-pick {
         height: 34px
@@ -717,7 +737,7 @@ EOF;
             id: "#$select_btn",
         },
         server: "$upload_url",
-        swf: "/base/plugins/webuploader/Uploader.swf",
+        swf: "$strUri/base/plugins/webuploader/Uploader.swf",
         accept: {
             title: 'Images',
             extensions: 'gif,jpg,jpeg,bmp,png',

+ 43 - 0
database/migrations/2018_04_20_145600_add_user_id_to_card_setting.php

xqd
@@ -0,0 +1,43 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddUserIdToCardSetting extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('card_setting', function (Blueprint $table) {
+            $table->string('user_id',255)->comment('用户ID');
+            $table->tinyInteger('banner_hide')->comment('是否隐藏轮播图');
+            $table->integer('banner_height')->comment('轮播图高度');
+            $table->tinyInteger('project_type')->comment('经营项目展示方式');
+            $table->tinyInteger('trend_type')->comment('个人动态展示方式');
+            $table->string('copyright')->comment('版权信息');
+            $table->tinyInteger('banner_sort')->comment('轮播图模块顺序');
+            $table->tinyInteger('menu_sort')->comment('Menu模块顺序');
+            $table->tinyInteger('project_sort')->comment('经营项目模块顺序');
+            $table->tinyInteger('trend_sort')->comment('个人动态模块顺序');
+            $table->tinyInteger('message_sort')->comment('个人信息模块顺序');
+            $table->tinyInteger('share_sort')->comment('分享模块顺序');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('card_setting', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 30 - 0
database/migrations/2018_04_24_133950_change_userid_to_appid_card_banner.php

xqd
@@ -0,0 +1,30 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class ChangeUseridToAppidCardBanner extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        DB::statement('ALTER TABLE card_banner CHANGE user_id appid varchar(255) ');
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('card_banner', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 32 - 0
database/migrations/2018_04_24_134033_change_userid_to_appid_card_setting.php

xqd
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class ChangeUseridToAppidCardSetting extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('card_setting', function (Blueprint $table) {
+            $table->renameColumn('user_id','appid');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('card_setting', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 32 - 0
database/migrations/2018_04_24_134117_change_userid_to_appid_card__user_honor.php

xqd
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class ChangeUseridToAppidCardUserHonor extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('card_user_honor', function (Blueprint $table) {
+            $table->renameColumn('user_id','appid');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('card_user_honor', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 32 - 0
database/migrations/2018_04_24_134143_change_userid_to_appid_card__user_info.php

xqd
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class ChangeUseridToAppidCardUserInfo extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('card_user_info', function (Blueprint $table) {
+            $table->renameColumn('user_id','appid');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('card_user_info', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 32 - 0
database/migrations/2018_04_24_134224_change_userid_to_appid_card_user_progress.php

xqd
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class ChangeUseridToAppidCardUserProgress extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('card_user_progress', function (Blueprint $table) {
+            $table->renameColumn('user_id','appid');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('card_user_progress', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 32 - 0
database/migrations/2018_04_24_134300_change_userid_to_appid_card_user_project.php

xqd
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class ChangeUseridToAppidCardUserProject extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('card_user_project', function (Blueprint $table) {
+            $table->renameColumn('user_id','appid');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('card_user_project', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 32 - 0
database/migrations/2018_04_24_134329_change_userid_to_appid_card_user_trend.php

xqd
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class ChangeUseridToAppidCardUserTrend extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('card_user_trend', function (Blueprint $table) {
+            $table->renameColumn('user_id','appid');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('card_user_trend', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 35 - 0
database/migrations/2018_04_25_151042_add_icon_to_card_settings.php

xqd
@@ -0,0 +1,35 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddIconToCardSettings extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('card_setting', function (Blueprint $table) {
+            $table->string('aboutme_icon',255)->comment('关于我图标');
+            $table->string('develo_icon',255)->comment('我的历程图标');
+            $table->string('we_icon',255)->comment('我的团队图标');
+            $table->string('honer_icon',255)->comment('我的荣誉图标');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('card_setting', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 32 - 0
database/migrations/2018_04_26_113259_change_copyright_to_null_card_setting.php

xqd
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class ChangeCopyrightToNullCardSetting extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('card_setting', function (Blueprint $table) {
+            $table->string('copyright',255)->nullable()->change();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('card_setting', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 32 - 0
database/migrations/2018_05_03_163426_alter_detail_card_user_project_table.php

xqd
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AlterDetailCardUserProjectTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('card_user_project', function (Blueprint $table) {
+            $table->text('detail')->nullable()->change();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('card_user_project', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 32 - 0
database/migrations/2018_05_03_163536_alter_content_card_user_trend_table.php

xqd
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AlterContentCardUserTrendTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('card_user_trend', function (Blueprint $table) {
+            $table->text('pic')->nullable()->change();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('card_user_trend', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 34 - 0
database/migrations/2018_05_10_101204_alter_user_app_account_table.php

xqd
@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AlterUserAppAccountTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('user_app_account', function (Blueprint $table) {
+            $table->dropColumn(['phone','app_user','name','wechat','wechat_id','qq_id','email','qq','address','nickname','avatar','openid','desc']);
+            $table->string('user_template_id',255)->after('password')->comment('用户id');
+            $table->tinyInteger('level')->default(0)->after('password')->comment('用户类型');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('user_app_account', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 32 - 0
database/migrations/2018_05_10_132729_alter_card_banner_table.php

xqd
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AlterCardBannerTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('card_banner', function (Blueprint $table) {
+            $table->string('user_template_id',255)->after('appid')->comment('用户id');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('card_banner', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 32 - 0
database/migrations/2018_05_10_132820_alter_card_setting_table.php

xqd
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AlterCardSettingTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('card_setting', function (Blueprint $table) {
+            $table->string('user_template_id',255)->after('appid')->comment('用户id');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('card_setting', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 32 - 0
database/migrations/2018_05_10_133236_alter_card_user_honor_table.php

xqd
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AlterCardUserHonorTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('card_user_honor', function (Blueprint $table) {
+            $table->string('user_template_id',255)->after('appid')->comment('用户id');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('card_user_honor', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 32 - 0
database/migrations/2018_05_10_133316_alter_card_user_info_table.php

xqd
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AlterCardUserInfoTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('card_user_info', function (Blueprint $table) {
+            $table->string('user_template_id',255)->after('appid')->comment('用户id');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('card_user_info', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 32 - 0
database/migrations/2018_05_10_133358_alter_card_user_progress_table.php

xqd
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AlterCardUserProgressTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('card_user_progress', function (Blueprint $table) {
+            $table->string('user_template_id',255)->after('appid')->comment('用户id');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('card_user_progress', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 32 - 0
database/migrations/2018_05_10_133439_alter_card_user_project_table.php

xqd
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AlterCardUserProjectTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('card_user_project', function (Blueprint $table) {
+            $table->string('user_template_id',255)->after('appid')->comment('用户id');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('card_user_project', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 32 - 0
database/migrations/2018_05_10_133950_alter_card_user_trend_table.php

xqd
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AlterCardUserTrendTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('card_user_trend', function (Blueprint $table) {
+            $table->string('user_template_id',255)->after('appid')->comment('用户id');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('card_user_trend', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 32 - 0
database/migrations/2018_05_10_134122_alter_cp_company_info.php

xqd
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AlterCpCompanyInfo extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('cp_company_info', function (Blueprint $table) {
+            $table->string('user_template_id',255)->after('appid')->comment('用户id');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('cp_company_info', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 33 - 0
database/migrations/2018_05_11_155844_rename_user_app_account_table.php

xqd
@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class RenameUserAppAccountTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::rename('user_app_account', 'app_account');
+        /*Schema::table('user_app_account', function (Blueprint $table) {
+            //
+        });*/
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('user_app_account', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 34 - 0
database/migrations/2018_05_22_110850_add_account_to_user_info.php

xqd
@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddAccountToUserInfo extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('user_info', function (Blueprint $table) {
+            $table->string('account',255)->after('phone')->comment('小程序后台临时账户');
+            $table->integer('user_template_id')->after('agent_id')->comment('小程序对应模板');
+            $table->string('menus',255)->after('api_token')->comment('后台临时账户菜单');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('user_info', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 33 - 0
database/migrations/2018_05_22_121047_edit_val_base_dictionary_option.php

xqd
@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class EditValBaseDictionaryOption extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('base_dictionary', function (Blueprint $table) {
+            //
+            $table->string('value','100')->change();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('base_dictionary', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 32 - 0
database/migrations/2018_07_10_111857_add_role_to_user_info.php

xqd
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddRoleToUserInfo extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('user_info', function (Blueprint $table) {
+            $table->tinyInteger('role')->nullable()->default(0)->comment('角色');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('user_info', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 33 - 0
database/migrations/2019_04_15_104944_add_store_id_to_base_attachment.php

xqd
@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddStoreIdToBaseAttachment extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('base_attachments', function (Blueprint $table) {
+            //
+            $table->unsignedInteger('store_id')->nullable()->default(0);
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('base_attachments', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 34 - 0
database/migrations/2019_04_16_183629_add_column_cat_id_to_album_product_price.php

xqd
@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddColumnCatIdToAlbumProductPrice extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('album_product_price', function (Blueprint $table) {
+            //
+            $table->unsignedInteger('cat_id')->default(0);
+            $table->string('name', 255)->nullable()->default(null);
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('album_product_price', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 35 - 0
database/migrations/2019_04_16_201403_add_st_column_to_album_agent.php

xqd
@@ -0,0 +1,35 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddStColumnToAlbumAgent extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('album_agent', function (Blueprint $table) {
+            //
+            $table->unsignedInteger('pointCount')->default(0);
+            $table->unsignedInteger('newCount')->default(0);
+            $table->unsignedInteger('callCount')->default(0);
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('album_agent', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 33 - 0
database/migrations/2019_04_17_092129_add_column_share_to_album_agent.php

xqd
@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddColumnShareToAlbumAgent extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('album_agent', function (Blueprint $table) {
+            //
+            $table->unsignedInteger('favoriteCount')->default(0);
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('album_agent', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 33 - 0
database/migrations/2019_04_17_110528_change_customer_cat_record.php

xqd
@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class ChangeCustomerCatRecord extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('customer_cat_record', function (Blueprint $table) {
+            //
+            $table->renameColumn('style_id', 'parent_id');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('customer_cat_record', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 33 - 0
database/migrations/2019_04_18_151500_delete_level_in_album_cat.php

xqd
@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class DeleteLevelInAlbumCat extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('album_cat', function (Blueprint $table) {
+            //
+            $table->dropColumn('level');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('album_cat', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 34 - 0
database/migrations/2019_04_18_195425_add_interactive_to_album_agent.php

xqd
@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddInteractiveToAlbumAgent extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('album_agent', function (Blueprint $table) {
+            //
+            $table->unsignedInteger('interactive')->default(0)->nullable();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('album_agent', function (Blueprint $table) {
+            //
+
+        });
+    }
+}

+ 33 - 0
database/migrations/2019_04_19_160637_add_store_id_to_classes.php

xqd
@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddStoreIdToClasses extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('classes', function (Blueprint $table) {
+            //
+            $table->unsignedInteger('store_id')->default(0)->nullable();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('classes', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 34 - 0
database/migrations/2019_04_24_104213_add_template_id_to_album_manufacturer.php

xqd
@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddTemplateIdToAlbumManufacturer extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('album_manufacturer', function (Blueprint $table) {
+            //
+            $table->string('wxFurniture_template_id', 255)->default(null)->nullable();
+            $table->string('wxaccount_template_id', 255)->default(null)->nullable();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('album_manufacturer', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 33 - 0
database/migrations/2019_04_26_105614_edit_agent_to_store_at_agent_banner.php

xqd
@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class EditAgentToStoreAtAgentBanner extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('agent_banner', function (Blueprint $table) {
+            //
+            $table->renameColumn('agent_id', 'store_id');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('agent_banner', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 33 - 0
database/migrations/2019_04_26_152722_add_upload_video_to_album_product.php

xqd
@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddUploadVideoToAlbumProduct extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('album_product', function (Blueprint $table) {
+            //
+            $table->longText('upload_video')->nullable()->default(null);
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('album_product', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 0 - 1
public/.well-known/pki-validation/fileauth.txt

xqd
@@ -1 +0,0 @@
-2019011300000048wq962s55v6d482g1gx8h5preya3e5vu8j7wksdz5egakvetr

+ 3 - 71
resources/views/admin/album/agent/edit.blade.php

xqd xqd xqd
@@ -1,10 +1,10 @@
 @extends('admin.layout')
 @section('header')
 
-    <link href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/css/fileinput.css" media="all" rel="stylesheet" type="text/css" />
+    <link href="/base/css/fileinput.css" media="all" rel="stylesheet" type="text/css" />
 
-    <script src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/fileinput.js" type="text/javascript"></script>
-    <script src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/fileinput_locale_zh.js" type="text/javascript"></script>
+    <script src="/base/js/fileinput.js" type="text/javascript"></script>
+    <script src="/base/js/fileinput_locale_zh.js" type="text/javascript"></script>
 
 @endsection
 @section('content')
@@ -83,13 +83,6 @@
                                     </div>
 
                                 </div>
-                <div class="form-group">
-                    <label class="control-label col-sm-3">经销商画报</label>
-                    <div class="col-sm-9">
-                        {{--     //{!! ueditor('') !!}--}}
-                        {!!  widget('Tools.ImgUpload')->multi2('/upload/agent_banner','agent_banner',"data[agent_banner]",  isset($data['agent_banner'])? $data['agent_banner'] : '') !!}
-                    </div>
-                </div>
                                 
                                 <div class="form-group">
                                     <label class="control-label col-sm-3">&nbsp;</label>
@@ -105,72 +98,11 @@
                         </div>
                         <!-- /.col-lg-10 -->
                     </div>
-                        <div class="row">
-                            <div class="col-sm-12">
-                                <div class="container kv-main">
-                                    <div class="page-header">
-                                        <h3 class="text-success">视频管理</h3>
-                                    </div>
-                                    <form enctype="multipart/form-data" method="post" action="{{ url('/admin/Album/Agent/uploadVideo') }}">
-                                        <div class="form-group">
-                                            <input id="file-0b" class="file" type="file" name="video">
-                                            <input name="agent_id" type="hidden" value="{{ $data['id'] or ''}}">
-                                        </div>
-                                        {{csrf_field()}}
-                                    </form>
-                                </div>
-                            </div>
-                        </div>
-
                     <!-- /.row -->
 				</div>
 			</div>
 		</div>
 	</div>
-    <div class="row">
-        <div class="col-sm-12">
-            <div class="ibox float-e-margins">
-                <div class="ibox-title">
-                    <h5>视频列表</h5>
-                </div>
-                <div class="ibox-content">
-
-                    <table class="table">
-                        <thead>
-                        <tr>
-                            <th>#</th>
-                            <th>链接</th>
-                            <th>文件名</th>
-                            <th>操作</th>
-                        </tr>
-                        </thead>
-                        <tbody>
-                        <tr>
-                            <td>{{ $video['id'] }}</td>
-                            <td>{{ $video['name'] }}</td>
-                            <td>{{ $video['url'] }}</td>
-                            <td>
-                                <div class="btn-group">
-                                    <button data-toggle="dropdown"
-                                            class="btn btn-warning btn-sm dropdown-toggle"
-                                            aria-expanded="false">
-                                        操作 <span class="caret"></span>
-                                    </button>
-                                    <ul class="dropdown-menu">
-                                        <li><a href="{{ U('Album/Agent/videoDel',['id'=>$video['id']])}}" onclick="return confirm('你确定执行删除操作?');">删除</a></li>
-                                    </ul>
-                                </div>
-
-
-                            </td>
-                        </tr>
-                        </tbody>
-                    </table>
-
-                </div>
-            </div>
-        </div>
-    </div>
 
     <div class="modal fade" id="myModal" tabindex="-1" role="dialog"
          aria-labelledby="myModalLabel" aria-hidden="true">

+ 28 - 28
resources/views/admin/album/agent/index.blade.php

xqd xqd
@@ -37,11 +37,12 @@
     						<tr>
 								
             <th class="sorting" data-sort="id"> ID </th>
-            <th class="sorting" data-sort="user_id"> 用户ID </th>
+            <th> 微信昵称 </th>
             <th class="sorting" data-sort="user_id"> 电话 </th>
             <th class="sorting" data-sort="address"> 地址 </th>
             <th class="sorting" data-sort="name"> 名称 </th>
             <th class="sorting" data-sort="status"> 状态 </th>
+								<th>是否为boss</th>
         						<th width="22%">相关操作</th>
         					</tr>
 						</thead>
@@ -50,42 +51,41 @@
 							@foreach($list as $key => $item)							<tr>
 								
             <td>{{ $item->id }}</td>
-            <td>{{ $item->user_id }}</td>
+            <td>{{ $item->nickname }}</td>
             <td>{{ $item->phone }}</td>
             <td>{{ $item->address }}</td>
             <td>{{ $item->name }}</td>
             <td>{{ $item->status }}</td>
+								@if($item->role !== 4)
+									<td>不是</td>
+								@else
+									<td>是</td>
+								@endif
 								<td>
-									<div class="btn-group">
-										<button data-toggle="dropdown"
-											class="btn btn-warning btn-sm dropdown-toggle"
-											aria-expanded="false">
-											操作 <span class="caret"></span>
-										</button>
-										<ul class="dropdown-menu">
-
-
-											@if(role('Album/Agent/update'))
-											<li><a href="{{ U('Album/Agent/update',['id'=>$item->id])}}" class="font-bold">修改</a></li>
-											@endif
-
-											@if($item->status == '待审核')
-												<li><a href="{{ U('Album/Agent/status',['id'=>$item->id,'status'=>1])}}" class="font-bold">通过审核</a></li>
+									<div class="pull-left">
+										@if(role('Album/User/role-boss'))
+											@if($item->role !== 4)
+												<a href="{{ U('Album/User/role',['id'=>$item->user_id,'role'=>4]) }}" class="btn btn-sm btn-default pull-right">设为Boss
+												</a>
 											@endif
+										@endif
 
-											@if(role('Album/Agent/destroy'))
-											<li class="divider"></li>
-											<li><a href="{{ U('Album/Agent/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');">删除</a></li>
-											@endif
+										@if(role('Album/Agent/update'))
+												<a href="{{ U('Album/Agent/update',['id'=>$item->id])}}" class="btn btn-sm btn-warning pull-right">修改</a>
+										@endif
+										@if(role('Album/Agent/status'))
+												@if($item->status == '待审核')
+													<a href="{{ U('Album/Agent/status',['id'=>$item->id,'status'=>1])}}" onclick="return confirm('你确定通过审核?');" class="btn btn-sm btn-success pull-right">通过审核</a>
+												@endif
+										@endif
+										@if(role('Album/Agent/destroy'))
+												<a href="{{ U('Album/Agent/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');" class="btn btn-sm btn-danger pull-right">删除</a>
+										@endif
+										@if(role('Album/Product/Price/index'))
+												<a href="{{ U('Album/Product/Price/index',['id'=>$item->id])}}" class="btn btn-sm btn-primary pull-right">查看报价</a>
+										@endif
 
-										</ul>
 									</div>
-								@if(role('Album/Agent/view'))
-
-										<div class="col-sm-3 pull-right">
-											<a href="{{ U('Album/Product/Price/index',['id'=>$item->id])}}" class="btn btn-sm btn-primary pull-right">查看报价</a>
-										</div>
-									@endif
 								</td>
 							</tr>
 							@endforeach

+ 14 - 9
resources/views/admin/album/banner/edit.blade.php

xqd
@@ -66,29 +66,34 @@
                                         </div>
 
                                     </div>
+
                                     <div class="form-group">
 
-                                        <label class="control-label col-sm-3">排序:越大越靠前</label>
+                                        <label class="control-label col-sm-3">类型</label>
 
                                         <div class="col-sm-9">
-                                            <input id="data_sort" name="data[sort]" class="form-control"
-                                                   value="{{ $data['sort'] or ''}}" required="" aria-required="true"
-                                                   placeholder="">
+                                            <label class="radio-inline">
+                                                <input type="radio" name="data[type]" value="1"
+                                                       @if(isset($data['type']) && $data['type'] == '1')checked="checked" @endif/>商城
+                                            </label>
+                                            <label class="radio-inline">
+                                                <input type="radio" name="data[type]" value="2"
+                                                       @if(isset($data['type']) && $data['type'] == '2')checked="checked" @endif/>拼团
+                                            </label>
                                         </div>
 
                                     </div>
                                     <div class="form-group">
 
-                                        <label class="control-label col-sm-3">类型 【1=> 商城,2=> 拼团】</label>
+                                        <label class="control-label col-sm-3">排序</label>
 
                                         <div class="col-sm-9">
-                                            <input id="data_type" name="data[type]" class="form-control"
-                                                   value="{{ $data['type'] or ''}}" required="" aria-required="true"
-                                                   placeholder="">
+                                            <input id="data_sort" name="data[sort]" class="form-control"
+                                                   value="{{ $data['sort'] or ''}}" required="" aria-required="true"
+                                                   placeholder="值越大越靠前">
                                         </div>
 
                                     </div>
-
                                     <div class="form-group">
                                         <label class="control-label col-sm-3">&nbsp;</label>
                                         <div class="col-sm-9">

+ 8 - 27
resources/views/admin/album/banner/index.blade.php

xqd xqd
@@ -18,7 +18,7 @@
 
                                 <div class="col-sm-4">
                                     <div class="input-group">
-                                        <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入关键词"
+                                        <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入ID/标题"
                                                name="keyword" class="input-sm form-control">
                                         <span class="input-group-btn">
 									<button type="submit" class="btn btn-sm btn-primary">搜索</button>
@@ -59,33 +59,14 @@
                                         <td>{{ $item->sort }}</td>
                                         <td>{{ $item->created_at }}</td>
                                         <td>
-                                            <div class="btn-group">
-                                                <button data-toggle="dropdown"
-                                                        class="btn btn-warning btn-sm dropdown-toggle"
-                                                        aria-expanded="false">
-                                                    操作 <span class="caret"></span>
-                                                </button>
-                                                <ul class="dropdown-menu">
-
-
-                                                    @if(role('Album/Banner/update'))
-                                                        <li><a href="{{ U('Album/Banner/update',['id'=>$item->id])}}"
-                                                               class="font-bold">修改</a></li>
-                                                    @endif
-
-                                                    @if(role('Album/Banner/destroy'))
-                                                        <li class="divider"></li>
-                                                        <li><a href="{{ U('Album/Banner/destroy',['id'=>$item->id])}}"
-                                                               onclick="return confirm('你确定执行删除操作?');">删除</a></li>
-                                                    @endif
-
-                                                </ul>
+                                            <div class="pull-left">
+                                                @if(role('Album/Banner/update'))
+                                                    <a href="{{ U('Album/Banner/update',['id'=>$item->id])}}" class="btn btn-sm btn-warning pull-right">修改</a>
+                                                @endif
+                                                @if(role('Album/Banner/destroy'))
+                                                    <a href="{{ U('Album/Banner/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');" class="btn btn-sm btn-danger pull-right">删除</a>
+                                                @endif
                                             </div>
-                                            @if(role('Album/Banner/view'))
-                                                <button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Album/Banner/view',['id'=>$item->id])}}'});"
-                                                        class="btn btn-primary ">查看
-                                                </button>
-                                            @endif
                                         </td>
                                     </tr>
                                 @endforeach

+ 29 - 41
resources/views/admin/album/cat/edit.blade.php

xqd xqd xqd xqd
@@ -2,7 +2,7 @@
 
 @section('content')
 
-<?php
+    <?php
     if(!isset($data)) $data = array();
     if(!$data && session("data")){
         $data = session("data");
@@ -10,6 +10,7 @@
     if(!$data && session('_old_input')){
         $data = session("_old_input");
     }
+
 ?>
 <div class="wrapper wrapper-content animated fadeInRight">
 	<div class="row">
@@ -35,6 +36,7 @@
                         <div class="col-lg-10">
                             <form name="form_product" id="form-validation" action="" class="form-horizontal form-validation" accept-charset="UTF-8" method="post">
 
+
                                     
                 <div class="form-group">
                                     
@@ -45,68 +47,54 @@
                     </div>
                                 
                 </div>
+
                 <div class="form-group">
-                    <label class="control-label col-sm-3">排序</label>
-                    <div class="col-sm-9">
-                        <input id="data_sort" name="data[sort]" class="form-control" value="{{ $data['sort'] or ''}}" required="" aria-required="true"  placeholder="">
-                    </div>
-                </div>
-                <div class="form-group" style="display: none">
                     <label class="control-label col-sm-3">父分类</label>
 
                     <div class="col-sm-9">
                         <select name="data[parent_id]" id="" class="form-control">
                             <option value="0">顶级</option>
-                            {{--@if(isset($cat))
+                            @if(isset($cat))
                                 @foreach($cat as $key=>$val)
                                             <option value="{{$val->id}}" @if($val['id'] == $data['parent_id'])selected @endif>{{$val->name}}</option>
                                 @endforeach
-                            @endif--}}
+                            @endif
                         </select>
                     </div>
-
                 </div>
                 <div class="form-group">
-                                    
-                 <label class="control-label col-sm-3">分类级别</label>
-                                    
-                   <div class="col-sm-9">
-                     <input id="data_level" name="data[level]" class="form-control" value="{{ $data['level'] or ''}}" required="" aria-required="true"  placeholder=""> 
-                    </div>
-                                
-                </div>    
-                <div class="form-group">
-                                    
-                 <label class="control-label col-sm-3">图片(270*200)</label>
-
+                    <label class="control-label col-sm-3">图片(300*300)</label>
                     <div class="col-sm-9">
-                        {!!  widget('Tools.ImgUpload')->single2('/upload/cat_pic_url','pic_url',"pic_url",  isset($data['pic_url'])? $data['pic_url'] : '',array("sizex"=>270,"sizey"=>200)) !!}
-
+                        {!!  widget('Tools.ImgUpload')->single2('/upload/cat_pic_url','pic_url',"pic_url",  isset($data['pic_url'])? $data['pic_url'] : '',array("sizex"=>300,"sizey"=>300)) !!}
                     </div>
-                                
                 </div>
 
-
-                                
                                 <div class="form-group">
-                                    <label class="control-label col-sm-3">&nbsp;</label>
+                                    <label class="control-label col-sm-3">排序</label>
                                     <div class="col-sm-9">
-                                        <input type="hidden" name="_referer" value="<?php echo urlencode(request()->server('HTTP_REFERER'));?>"/>
-                                        <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>"/>
-                                        <input type="submit" class="btn btn-success" style="margin-right:20px;">
-                                        <input type="reset" class="btn btn-default" >
+                                        <input id="data_sort" name="data[sort]" class="form-control" value="{{ $data['sort'] or ''}}" required="" aria-required="true"  placeholder="数值越大越靠前">
                                     </div>
                                 </div>
-        
-                            </form>
+
+                                    <div class="form-group">
+                                        <label class="control-label col-sm-3">&nbsp;</label>
+                                        <div class="col-sm-9">
+                                            <input type="hidden" name="_referer" value="<?php echo urlencode(request()->server('HTTP_REFERER'));?>"/>
+                                            <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>"/>
+                                            <input type="submit" class="btn btn-success" style="margin-right:20px;">
+                                            <input type="reset" class="btn btn-default" >
+                                        </div>
+                                    </div>
+
+                                </form>
+                            </div>
+                            <!-- /.col-lg-10 -->
                         </div>
-                        <!-- /.col-lg-10 -->
+                        <!-- /.row -->
                     </div>
-                    <!-- /.row -->
-				</div>
-			</div>
-		</div>
-	</div>
-</div>
+                </div>
+            </div>
+        </div>
+    </div>
 
 @endsection

+ 64 - 72
resources/views/admin/album/cat/index.blade.php

xqd xqd xqd xqd
@@ -1,12 +1,14 @@
-@extends('admin.layout') 
+@extends('admin.layout')
 
 @section('content')
+
+
 <div class="wrapper wrapper-content animated fadeInRight">
 	<div class="row">
 		<div class="col-sm-12">
 			<div class="ibox float-e-margins">
 				<div class="ibox-title">
-					<h5>产品分类</h5>
+					<h5>画册分类</h5>
 					<div class="ibox-tools">
 						<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
 						</a>
@@ -18,7 +20,7 @@
 
 				        <div class="col-sm-4">
 				            <div class="input-group">
-								<input type="text" value="{{Request::get('keyword')}}"	placeholder="请输入关键词" name="keyword"class="input-sm form-control"> 
+								<input type="text" value="{{Request::get('keyword')}}"	placeholder="请输入ID/分类名称" name="keyword" class="input-sm form-control">
 								<span class="input-group-btn">
 									<button type="submit" class="btn btn-sm btn-primary">搜索</button>
 								</span>
@@ -36,83 +38,59 @@
 						<thead>
     						<tr>
 								
-            <th class="sorting" data-sort="id"> ID </th>
-            <th class="sorting" data-sort="name"> 名称 </th>
-            <th class="sorting" data-sort="level"> 分类级别 </th>
-            <th class="sorting" data-sort="sort"> 排序 </th>
-            <th class="sorting" data-sort="pic_url"> 分类图标 </th>
-            <th class="sorting" data-sort="created_at"> 添加时间 </th>
+            <th class="sorting" data-sort="id" width="15%"> ID </th>
+            <th class="sorting" data-sort="name" width="20%"> 名称 </th>
+            <th class="sorting" data-sort="sort" width="10%"> 排序 </th>
+            <th class="sorting" data-sort="pic_url" width="15%"> 分类图标 </th>
+            <th class="sorting" data-sort="created_at" width="18%"> 添加时间 </th>
         						<th width="22%">相关操作</th>
         					</tr>
 						</thead>
 						<tbody>
-						@if(isset($list))
-						@foreach($list as $key => $item)
-							<tr style="background-color: white;">
-								<td>{{ $item->id }}</td>
-								<td>{{ $item->name }}</td>
-								<td>{{ $item->level }}</td>
-								<td>{{ $item->sort }}</td>
-								<td><img src="{{ $item->pic_url }}" width="50"/></td>
-								<td>{{ $item->created_at }}</td>
-								<td>
-									<div class="btn-group">
-										<button data-toggle="dropdown"
-											class="btn btn-warning btn-sm dropdown-toggle"
-											aria-expanded="false">
-											操作 <span class="caret"></span>
-										</button>
-										<ul class="dropdown-menu">
-
-
+							@if(isset($list))
+							@foreach($list as $key => $item)
+								<tr style="background-color: white;">
+									<td>{{ $item->id }}</td>
+									<td>{{ $item->name }}</td>
+									<td>{{ $item->sort }}</td>
+									<td><img src="{{ $item->pic_url }}" width="50"/></td>
+									<td>{{ $item->created_at }}</td>
+									<td>
+										<div class="pull-left">
 											@if(role('Album/Cat/update'))
-											<li><a href="{{ U('Album/Cat/update',['id'=>$item->id])}}" class="font-bold">修改</a></li>
+												<a href="{{ U('Album/Cat/update',['id'=>$item->id])}}" class="btn btn-sm btn-warning pull-right">修改</a>
 											@endif
-
 											@if(role('Album/Cat/destroy'))
-											<li class="divider"></li>
-											<li><a href="{{ U('Album/Cat/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');">删除</a></li>
+												<a href="{{ U('Album/Cat/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');" class="btn btn-sm btn-danger pull-right">删除</a>
 											@endif
-
-										</ul>
-									</div>
-								{{--@if(role('Album/Cat/view'))
-										<button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Album/Cat/view',['id'=>$item->id])}}'});"  class="btn btn-primary ">查看</button>
-									@endif--}}
-								</td>
-							</tr>
-							@if(isset($item->sonlist))
-								@foreach($item->sonlist as $k => $t)
-									<tr style="background-color: #f9f9f9;">
-										<td>{{ $t->id }}</td>
-										<td>{{ $t->name }}</td>
-										<td>{{ $t->level }}</td>
-										<td><img src="{{ $t->pic_url }}" width="50"/></td>
-										<td>{{ $t->created_at }}</td>
-										<td>
-											<div class="btn-group">
-												<button data-toggle="dropdown"
-														class="btn btn-warning btn-sm dropdown-toggle"
-														aria-expanded="false">
-													操作 <span class="caret"></span>
-												</button>
-												<ul class="dropdown-menu">
-
-
-													@if(role('Album/Cat/update'))
-														<li><a href="{{ U('Album/Cat/update',['id'=>$t->id])}}" class="font-bold">修改</a></li>
-													@endif
-
-													@if(role('Album/Cat/destroy'))
-														<li class="divider"></li>
-														<li><a href="{{ U('Album/Cat/destroy',['id'=>$t->id])}}" onclick="return confirm('你确定执行删除操作?');">删除</a></li>
-													@endif
-
-												</ul>
-											</div>
-										</td>
-									</tr>
-
+											@if(count($item->sonlist) > 0)
+												<a id="a{{ $item->id }}" onclick="showHidden({{ $item->id }})" class="btn btn-sm btn-default pull-right">查看</a>
+											@endif
+										</div>
+									{{--@if(role('Album/Cat/view'))
+											<button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Album/Cat/view',['id'=>$item->id])}}'});"  class="btn btn-primary ">查看</button>
+										@endif--}}
+									</td>
+								</tr>
+								@if(isset($item->sonlist))
+									@foreach($item->sonlist as $k => $t)
+											<tr style="background-color: #f9f9f9;display: none" class="son{{ $item->id }}">
+												<td>{{ $t->id }}</td>
+												<td>{{ $t->name }}</td>
+												<td>{{ $t->sort }}</td>
+												<td><img src="{{ $t->pic_url }}" width="50"/></td>
+												<td>{{ $t->created_at }}</td>
+												<td>
+													<div class="pull-left">
+														@if(role('Album/Cat/update'))
+															<a href="{{ U('Album/Cat/update',['id'=>$t->id])}}" class="btn btn-sm btn-warning pull-right">修改</a>
+														@endif
+														@if(role('Album/Cat/destroy'))
+															<a href="{{ U('Album/Cat/destroy',['id'=>$t->id])}}" onclick="return confirm('你确定执行删除操作?');" class="btn btn-sm btn-danger pull-right">删除</a>
+														@endif
+													</div>
+												</td>
+											</tr>
 									@endforeach
 									@endif
 							@endforeach
@@ -136,4 +114,18 @@
 		</div>
 	</div>
 </div>
+
+<script>
+	function showHidden(id){
+		var text = $("#a"+id).text();
+		if (text == '查看') {
+            $("#a"+id).text('隐藏');
+		} else {
+            $("#a"+id).text('查看');
+		}
+
+		$(".son"+id).slideToggle(1000);
+	}
+</script>
+
 @endsection

+ 1 - 8
resources/views/admin/album/cat/view.blade.php

xqd
@@ -25,14 +25,7 @@
                                                    
                    <p class="list-group-item-text"> {{ $data['parent_id'] or ''}}</p>
                                                  
-               </div>                     
-               <div class="list-group-item">
-                                                  
-                   <h3 class="list-group-item-heading">分类级别</h3>
-                                                   
-                   <p class="list-group-item-text"> {{ $data['level'] or ''}}</p>
-                                                 
-               </div>                     
+               </div>
                <div class="list-group-item">
                                                   
                    <h3 class="list-group-item-heading">图片url</h3>

+ 8 - 22
resources/views/admin/album/comments/index.blade.php

xqd xqd
@@ -18,7 +18,7 @@
 
                                 <div class="col-sm-4">
                                     <div class="input-group">
-                                        <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入关键词"
+                                        <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入ID/标题/用户ID/内容"
                                                name="keyword" class="input-sm form-control">
                                         <span class="input-group-btn">
 									<button type="submit" class="btn btn-sm btn-primary">搜索</button>
@@ -58,27 +58,13 @@
                                         <td style="overflow: hidden;">{{ $item->content }}</td>
                                         <td style="overflow: hidden;">{{ $item->sys_reply }}</td>
                                         <td>
-                                            <div class="btn-group">
-                                                <button data-toggle="dropdown"
-                                                        class="btn btn-warning btn-sm dropdown-toggle"
-                                                        aria-expanded="false">
-                                                    操作 <span class="caret"></span>
-                                                </button>
-                                                <ul class="dropdown-menu">
-
-
-                                                    @if(role('Album/Comments/update'))
-                                                        <li><a href="{{ U('Album/Comments/update',['id'=>$item->id])}}"
-                                                               class="font-bold">回复</a></li>
-                                                    @endif
-
-                                                    @if(role('Album/Comments/destroy'))
-                                                        <li class="divider"></li>
-                                                        <li><a href="{{ U('Album/Comments/destroy',['id'=>$item->id])}}"
-                                                               onclick="return confirm('你确定执行删除操作?');">删除</a></li>
-                                                    @endif
-
-                                                </ul>
+                                            <div class="pull-left">
+                                                @if(role('Album/Comments/update'))
+                                                    <a href="{{ U('Album/Comments/update',['id'=>$item->id])}}" class="btn btn-sm btn-warning pull-right">修改</a>
+                                                @endif
+                                                @if(role('Album/Comments/destroy'))
+                                                    <a href="{{ U('Album/Comments/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');" class="btn btn-sm btn-danger pull-right">删除</a>
+                                                @endif
                                             </div>
                                             @if(role('Album/Comments/view'))
                                                 <button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Album/Comments/view',['id'=>$item->id])}}'});"

+ 5 - 17
resources/views/admin/album/info/cat/index.blade.php

xqd xqd
@@ -18,7 +18,7 @@
 
 				        <div class="col-sm-4">
 				            <div class="input-group">
-								<input type="text" value="{{Request::get('keyword')}}"	placeholder="请输入关键词" name="keyword"class="input-sm form-control"> 
+								<input type="text" value="{{Request::get('keyword')}}"	placeholder="请输入ID/名称" name="keyword" class="input-sm form-control">
 								<span class="input-group-btn">
 									<button type="submit" class="btn btn-sm btn-primary">搜索</button>
 								</span>
@@ -49,26 +49,14 @@
             <td>{{ $item->name }}</td>
 								<td>
 									@if($item->id != 1)
-									<div class="btn-group">
-										<button data-toggle="dropdown"
-											class="btn btn-warning btn-sm dropdown-toggle"
-											aria-expanded="false">
-											操作 <span class="caret"></span>
-										</button>
-										<ul class="dropdown-menu">
-
-
+										<div class="pull-left">
 											@if(role('Album/Info/Cat/update'))
-											<li><a href="{{ U('Album/Info/Cat/update',['id'=>$item->id])}}" class="font-bold">修改</a></li>
+												<a href="{{ U('Album/Info/Cat/update',['id'=>$item->id])}}" class="btn btn-sm btn-warning pull-right">修改</a>
 											@endif
-
 											@if(role('Album/Info/Cat/destroy'))
-											<li class="divider"></li>
-											<li><a href="{{ U('Album/Info/Cat/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');">删除</a></li>
+												<a href="{{ U('Album/Info/Cat/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');" class="btn btn-sm btn-danger pull-right">删除</a>
 											@endif
-
-										</ul>
-									</div>
+										</div>
 								{{--@if(role('Album/Info/Cat/view'))
 										<button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Album/Info/Cat/view',['id'=>$item->id])}}'});"  class="btn btn-primary ">查看</button>
 									@endif--}}

+ 8 - 24
resources/views/admin/album/information/index.blade.php

xqd xqd
@@ -18,7 +18,7 @@
 
                                 <div class="col-sm-4">
                                     <div class="input-group">
-                                        <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入关键词"
+                                        <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入ID/标题/内容"
                                                name="keyword" class="input-sm form-control">
                                         <span class="input-group-btn">
 									<button type="submit" class="btn btn-sm btn-primary">搜索</button>
@@ -59,29 +59,13 @@
                                         <td><img style="width: 50px" src="{{ $item->thumb }}" alt=""></td>
                                         <td>{{ $item->created_at }}</td>
                                         <td>
-                                            <div class="btn-group">
-                                                <button data-toggle="dropdown"
-                                                        class="btn btn-warning btn-sm dropdown-toggle"
-                                                        aria-expanded="false">
-                                                    操作 <span class="caret"></span>
-                                                </button>
-                                                <ul class="dropdown-menu">
-
-
-                                                    @if(role('Album/Information/update'))
-                                                        <li>
-                                                            <a href="{{ U('Album/Information/update',['id'=>$item->id])}}"
-                                                               class="font-bold">修改</a></li>
-                                                    @endif
-
-                                                    @if(role('Album/Information/destroy'))
-                                                        <li class="divider"></li>
-                                                        <li>
-                                                            <a href="{{ U('Album/Information/destroy',['id'=>$item->id])}}"
-                                                               onclick="return confirm('你确定执行删除操作?');">删除</a></li>
-                                                    @endif
-
-                                                </ul>
+                                            <div class="pull-left">
+                                                @if(role('Album/Information/update'))
+                                                    <a href="{{ U('Album/Information/update',['id'=>$item->id])}}" class="btn btn-sm btn-warning pull-right">修改</a>
+                                                @endif
+                                                @if(role('Album/Information/destroy'))
+                                                    <a href="{{ U('Album/Information/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');" class="btn btn-sm btn-danger pull-right">删除</a>
+                                                @endif
                                             </div>
                                             @if(role('Album/Information/view'))
                                                 <button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Album/Information/view',['id'=>$item->id])}}'});"

+ 639 - 0
resources/views/admin/album/manufacturer/edit-all.blade.php

xqd
@@ -0,0 +1,639 @@
+@extends('admin.layout')
+@section('header')
+
+    <link href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/css/fileinput.css" media="all" rel="stylesheet" type="text/css" />
+
+    <script src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/fileinput.js" type="text/javascript"></script>
+    <script src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/fileinput_locale_zh.js" type="text/javascript"></script>
+
+@endsection
+@section('content')
+
+    <?php
+    if (!isset($data)) $data = array();
+    if (!$data && session("data")) {
+        $data = session("data");
+    }
+    if (!$data && session('_old_input')) {
+        $data = session("_old_input");
+    }
+    ?>
+    <div class="wrapper wrapper-content animated fadeInRight">
+        <div class="row">
+            <div class="col-sm-12">
+                <div class="ibox float-e-margins">
+                    <div class="ibox-title">
+                        <h5>系统设置</h5>
+                        <div class="ibox-tools">
+                            <a class="collapse-link"> <i class="fa fa-chevron-up"></i>
+                            </a>
+                        </div>
+                    </div>
+                    <div class="ibox-content">
+                        <div class="row">
+                            <div class="col-lg-10">
+                                <form name="form_product" id="form-validation" action=""
+                                      class="form-horizontal form-validation" accept-charset="UTF-8" method="post">
+
+
+                                        <div class="form-group">
+
+                                            <label class="control-label col-sm-3">电子画报名称</label>
+
+                                            <div class="col-sm-9">
+                                                <input id="data_illustrated_name" name="data[illustrated_name]"
+                                                       class="form-control" value="{{ $data['illustrated_name'] or ''}}"
+                                                       required="" aria-required="true" placeholder="">
+                                            </div>
+
+                                        </div>
+                                        <div class="form-group">
+
+                                            <label class="control-label col-sm-3">昵称</label>
+
+                                            <div class="col-sm-9">
+                                                <input id="data_name" name="data[name]" class="form-control"
+                                                       value="{{ $data['name'] or ''}}" required="" aria-required="true"
+                                                       placeholder="">
+                                            </div>
+
+                                        </div>
+                                        <div class="form-group">
+
+                                            <label class="control-label col-sm-3">头像</label>
+
+                                            <div class="col-sm-9">
+                                                {!!  widget('Tools.ImgUpload')->single('avatar',"data[avatar]", isset($data['avatar'])? $data['avatar'] : "") !!}
+
+                                            </div>
+
+                                        </div>
+
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">厂家LOGO(130*130)</label>
+                                        <div class="col-sm-9">
+                                            {!!  widget('Tools.ImgUpload')->single2('/upload/logo','logo',"logo",  isset($data['logo'])? $data['logo'] : '',array("sizex"=>130,"sizey"=>130)) !!}
+                                        </div>
+
+                                    </div>
+
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">公众号appID</label>
+
+                                        <div class="col-sm-9">
+                                            <input id="data_service_app_id" name="data[G_app_id]"
+                                                   class="form-control"
+                                                   value="{{ $data['G_app_id'] or ''}}" required=""
+                                                   aria-required="true"
+                                                   placeholder="">
+                                        </div>
+
+                                    </div>
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">公众号appSecret</label>
+
+                                        <div class="col-sm-9">
+                                            <input id="data_service_app_secret" name="data[G_app_secret]"
+                                                   class="form-control"
+                                                   value="{{ $data['G_app_secret'] or ''}}" required=""
+                                                   aria-required="true" placeholder="">
+                                        </div>
+
+                                    </div>
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">公众号TemplateID</label>
+
+                                        <div class="col-sm-9">
+                                            <input id="data_wxaccount_template_id" name="data[wxaccount_template_id]"
+                                                   class="form-control"
+                                                   value="{{ $data['wxaccount_template_id'] or ''}}" placeholder="">
+                                        </div>
+
+                                    </div>
+
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">是否获取手机号</label>
+
+                                        <div class="col-sm-9">
+                                            <label class="radio-inline">
+                                                <input type="radio" name="data[getPhone]" value="1"
+                                                       @if(isset($data['getPhone']) && $data['getPhone'] == '1')checked="checked" @endif/>是
+                                            </label>
+                                            <label class="radio-inline">
+                                                <input type="radio" name="data[getPhone]" value="0"
+                                                       @if(isset($data['getPhone']) && $data['getPhone'] == '0')checked="checked" @endif/>否
+                                            </label>
+                                        </div>
+
+                                    </div>
+
+
+
+                                      <hr/>
+                                   {{-- <div class="form-group">
+
+                                        <label class="control-label col-sm-3">画册appID</label>
+
+                                        <div class="col-sm-9">
+                                            <input id="data_app_id" name="data[app_id]" class="form-control"
+                                                   value="{{ $data['app_id'] or ''}}" required=""
+                                                   aria-required="true" placeholder="">
+                                        </div>
+
+                                    </div>
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">画册appSecret</label>
+
+                                        <div class="col-sm-9">
+                                            <input id="data_app_secret" name="data[app_secret]" class="form-control"
+                                                   value="{{ $data['app_secret'] or ''}}" required=""
+                                                   aria-required="true" placeholder="">
+                                        </div>
+
+                                    </div>--}}
+                                        <div class="form-group">
+
+                                            <label class="control-label col-sm-3">画册appID</label>
+
+                                            <div class="col-sm-9">
+                                                <input id="data_xyx_id" name="data[xyx_id]" class="form-control"
+                                                       value="{{ $data['xyx_id'] or ''}}" required=""
+                                                       aria-required="true" placeholder="">
+                                            </div>
+
+                                        </div>
+                                        <div class="form-group">
+
+                                            <label class="control-label col-sm-3">画册appSecret</label>
+
+                                            <div class="col-sm-9">
+                                                <input id="data_xyx_secret" name="data[xyx_secret]" class="form-control"
+                                                       value="{{ $data['xyx_secret'] or ''}}" required=""
+                                                       aria-required="true" placeholder="">
+                                            </div>
+
+                                        </div>
+                                        <div class="form-group">
+
+                                            <label class="control-label col-sm-3">画册TemplateId</label>
+
+                                            <div class="col-sm-9">
+                                                <input id="data_wxFurniture_template_id" name="data[wxFurniture_template_id]" class="form-control"
+                                                       value="{{ $data['wxFurniture_template_id'] or ''}}" placeholder="">
+                                            </div>
+
+                                        </div>
+                                        <div class="form-group">
+
+                                            <label class="control-label col-sm-3">电话</label>
+
+                                            <div class="col-sm-9">
+                                                <input id="data_phone" name="data[phone]" class="form-control"
+                                                       value="{{ $data['phone'] or ''}}" required=""
+                                                       aria-required="true"
+                                                       placeholder="">
+                                            </div>
+
+                                        </div>
+
+                                        <!--引入高德地图API-->
+                                        <script type="text/javascript"
+                                                src="https://webapi.amap.com/maps?v=1.3&key=533117702a063eae1dc26c183a1ac7bb&plugin=AMap.Autocomplete"></script>
+                                        <script type="text/javascript"
+                                                src="https://cache.amap.com/lbs/static/addToolbar.js"></script>
+                                        <div class="form-group">
+                                            <label class="control-label col-sm-3">地址<span
+                                                        style="color: red">*</span></label>
+                                            <div class="col-sm-9">
+                                                <input n name="data[address]" readonly="true"
+                                                       value="{{$data['address'] or ''}}" class="form-control" id="add"
+                                                       data-toggle="modal"
+                                                       data-target="#myModal">
+                                            </div>
+                                        </div>
+
+                                        <input type="hidden" name="lon" id="lon" value="{{$data['lon'] or ''}}">
+                                        <input type="hidden" name="lat" id="lat" value="{{$data['lat'] or ''}}">
+
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">画册广告图</label>
+                                        <div class="col-sm-9">
+                                            {!!  widget('Tools.ImgUpload')->multi2('/upload/banner','banner',"data[banner]", isset($data['banner'])? $data['banner'] : '',[]) !!}
+                                        </div>
+                                    </div>
+                                    <div class="form-group">
+                                        <label class="control-label col-sm-3">经销商画报</label>
+                                        <div class="col-sm-9">
+                                            {{--     //{!! ueditor('') !!}--}}
+                                            {!!  widget('Tools.ImgUpload')->multi2('/upload/agent_banner','agent_banner',"data[agent_banner]",  isset($data['agent_banner'])? $data['agent_banner'] : '') !!}
+                                        </div>
+                                    </div>
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">选择版本</label>
+
+                                        <div class="col-sm-9">
+                                            <label class="radio-inline">
+                                                <input type="radio" name="data[is_audit]" value="1"
+                                                       @if(isset($data['is_audit']) && $data['is_audit'] == '1')checked="checked" @endif/>过审版
+                                            </label>
+                                            <label class="radio-inline">
+                                                <input type="radio" name="data[is_audit]" value="0"
+                                                       @if(isset($data['is_audit']) && $data['is_audit'] == '0')checked="checked" @endif/>应用版
+                                            </label>
+                                        </div>
+
+                                    </div>
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">产品跳转小程序appID</label>
+
+                                        <div class="col-sm-9">
+                                            <input id="data_app_id" name="data[goods_app_id]" class="form-control"
+                                                   value="{{ $data['goods_app_id'] or ''}}" required=""
+                                                   aria-required="true"
+                                                   placeholder="">
+                                        </div>
+
+                                    </div>
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">产品跳转小程序的url</label>
+
+                                        <div class="col-sm-9">
+                                            <input id="data_app_path" name="data[goods_app_path]"
+                                                   class="form-control"
+                                                   value="{{ $data['goods_app_path'] or ''}}" required=""
+                                                   aria-required="true"
+                                                   placeholder="">
+                                        </div>
+
+                                    </div>
+
+
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">售后小程序appID</label>
+
+                                        <div class="col-sm-9">
+                                            <input id="data_service_app_id" name="data[service_app_id]"
+                                                   class="form-control"
+                                                   value="{{ $data['service_app_id'] or ''}}" required=""
+                                                   aria-required="true"
+                                                   placeholder="">
+                                        </div>
+
+                                    </div>
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">售后小程序appSecret</label>
+
+                                        <div class="col-sm-9">
+                                            <input id="data_service_app_secret" name="data[service_app_secret]"
+                                                   class="form-control"
+                                                   value="{{ $data['service_app_secret'] or ''}}" required=""
+                                                   aria-required="true" placeholder="">
+                                        </div>
+
+                                    </div>
+
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">打印机型号</label>
+
+                                        <div class="col-sm-9">
+                                            <label class="radio-inline">
+                                                <input type="radio" name="data[print_type]" value="1"
+                                                       @if(isset($data['print_type']) && $data['print_type'] == '1')checked="checked" @endif/>飞鹅
+                                            </label>
+                                            <label class="radio-inline">
+                                                <input type="radio" name="data[print_type]" value="2"
+                                                       @if(isset($data['print_type']) && $data['print_type'] == '2')checked="checked" @endif/>365
+                                            </label>
+                                        </div>
+
+                                    </div>
+
+
+
+
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">是否开启关注公众号</label>
+
+                                        <div class="col-sm-9">
+                                            <label class="radio-inline">
+                                                <input type="radio" name="data[getFocus]" value="1"
+                                                       @if(isset($data['getFocus']) && $data['getFocus'] == '1')checked="checked" @endif/>是
+                                            </label>
+                                            <label class="radio-inline">
+                                                <input type="radio" name="data[getFocus]" value="0"
+                                                       @if(isset($data['getFocus']) && $data['getFocus'] == '0')checked="checked" @endif/>否
+                                            </label>
+                                        </div>
+
+                                    </div>
+
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">打印机编号</label>
+
+                                        <div class="col-sm-9">
+                                            <input id="data_print_no" name="data[print_no]" class="form-control"
+                                                   value="{{ $data['print_no'] or ''}}" placeholder="">
+                                        </div>
+
+                                    </div>
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">打印机秘钥</label>
+
+                                        <div class="col-sm-9">
+                                            <input id="data_print_key" name="data[print_key]" class="form-control"
+                                                   value="{{ $data['print_key'] or ''}}" placeholder="">
+                                        </div>
+
+                                    </div>
+
+                                    {{--  <div class="form-group">
+
+                                          <label class="control-label col-sm-3">首页广告图片</label>
+
+                                          <div class="col-sm-9">
+                                              {!!  widget('Tools.ImgUpload')->single('advertising_pic',"data[advertising_pic]", isset($data['advertising_pic'])? $data['advertising_pic'] : "") !!}
+                                          </div>
+
+                                      </div>--}}
+
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">家具首页广告图片</label>
+
+                                        <div class="col-sm-9">
+                                            {!!  widget('Tools.ImgUpload')->single('furniture_ads_pic',"data[furniture_ads_pic]", isset($data['furniture_ads_pic'])? $data['furniture_ads_pic'] : "") !!}
+                                        </div>
+
+                                    </div>
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">公告(不超过100字)</label>
+
+                                        <div class="col-sm-9">
+                                            <input id="data_notice" name="data[notice]" class="form-control"
+                                                   value="{{ $data['notice'] or ''}}" required=""
+                                                   aria-required="true"
+                                                   placeholder="">
+                                        </div>
+
+                                    </div>
+
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">是否显示公告</label>
+                                        <div class="col-sm-9">
+                                            <label class="radio-inline">
+                                                <input type="radio" name="data[show_notice]" value="1"
+                                                       @if(isset($data['show_notice']) && $data['show_notice'] == '1')checked="checked" @endif/>显示
+                                            </label>
+                                            <label class="radio-inline">
+                                                <input type="radio" name="data[show_notice]" value="0"
+                                                       @if(isset($data['show_notice']) && $data['show_notice'] == '0')checked="checked" @endif/>不显示
+                                            </label>
+                                        </div>
+
+                                    </div>
+
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">公告图标(50*50)</label>
+                                        <div class="col-sm-9">
+                                            {!!  widget('Tools.ImgUpload')->single2('/upload/notice','notice_icon',"notice_icon",  isset($data['notice_icon'])? $data['notice_icon'] : '',array("sizex"=>50,"sizey"=>50)) !!}
+                                        </div>
+
+                                    </div>
+
+
+
+                                    <hr/>
+                                    {{-- <div class="form-group">
+
+                                         <label class="control-label col-sm-3">画册appID</label>
+
+                                         <div class="col-sm-9">
+                                             <input id="data_app_id" name="data[app_id]" class="form-control"
+                                                    value="{{ $data['app_id'] or ''}}" required=""
+                                                    aria-required="true" placeholder="">
+                                         </div>
+
+                                     </div>
+                                     <div class="form-group">
+
+                                         <label class="control-label col-sm-3">画册appSecret</label>
+
+                                         <div class="col-sm-9">
+                                             <input id="data_app_secret" name="data[app_secret]" class="form-control"
+                                                    value="{{ $data['app_secret'] or ''}}" required=""
+                                                    aria-required="true" placeholder="">
+                                         </div>
+
+                                     </div>--}}
+
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">画册广告图</label>
+                                        <div class="col-sm-9">
+                                            {!!  widget('Tools.ImgUpload')->multi2('/upload/banner','banner',"data[banner]", isset($data['banner'])? $data['banner'] : '',[]) !!}
+                                        </div>
+                                    </div>
+                                    <div class="form-group">
+                                        <label class="control-label col-sm-3">&nbsp;</label>
+                                        <div class="col-sm-9">
+                                            <input type="hidden" name="_referer"
+                                                   value="<?php echo urlencode(request()->server('HTTP_REFERER'));?>"/>
+                                            <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>"/>
+                                            <input type="submit" class="btn btn-success" style="margin-right:20px;">
+                                            <input type="reset" class="btn btn-default">
+                                        </div>
+                                    </div>
+
+                                </form>
+                            </div>
+                            <!-- /.col-lg-10 -->
+                        </div>
+                        <!-- /.row -->
+                    </div>
+                </div>
+            </div>
+        </div>
+
+        <div class="row">
+            <div class="col-sm-12">
+                <div class="ibox float-e-margins">
+                    <div class="ibox-title">
+                        <h5>视频列表</h5>
+                    </div>
+                    <div class="ibox-content">
+                        <form enctype="multipart/form-data" method="post" action="{{ url('/admin/Album/Manufacturer/uploadVideo') }}">
+                            <div class="form-group">
+                                <input id="file-0b" class="file" type="file" name="video">
+                            </div>
+                            {{csrf_field()}}
+                        </form>
+                        <table class="table">
+                            <thead>
+                            <tr>
+                                <th>#</th>
+                                <th>链接</th>
+                                <th>文件名</th>
+                                <th>操作</th>
+                            </tr>
+                            </thead>
+                            <tbody>
+                            @if(!empty($video))
+                                <tr>
+                                    <td>{{ $video['id'] }}</td>
+                                    <td>{{ $video['name'] }}</td>
+                                    <td>{{ $video['url'] }}</td>
+                                    <td>
+                                        <div class="btn-group">
+                                            <button data-toggle="dropdown"
+                                                    class="btn btn-warning btn-sm dropdown-toggle"
+                                                    aria-expanded="false">
+                                                操作 <span class="caret"></span>
+                                            </button>
+                                            <ul class="dropdown-menu">
+                                                <li><a href="{{ U('Album/Manufactuier/videoDel',['id'=>$video['id']])}}" onclick="return confirm('你确定执行删除操作?');">删除</a></li>
+                                            </ul>
+                                        </div>
+
+
+                                    </td>
+                                </tr>
+                            @else
+                                <tr>
+                                    <td colspan="4">暂无文件</td>
+                                </tr>
+                            @endif
+
+                            </tbody>
+                        </table>
+
+                    </div>
+                </div>
+            </div>
+        </div>
+
+        <div class="modal fade" id="myModal" tabindex="-1" role="dialog"
+             aria-labelledby="myModalLabel" aria-hidden="true">
+            <div class="modal-dialog" style="min-width:60%;">
+                <div class="modal-content">
+                    <div class="modal-header">
+                        <h4 class="modal-title" id="myModalLabel">
+                            选择坐标
+                        </h4>
+                    </div>
+                    <div class="modal-body">
+                        <div id="container" style="width: 100%;min-height: 400px;"></div>
+                        <div id="myPageTop">
+                            <table>
+                                <tr>
+                                    <td>
+                                        <label>按关键字搜索:</label>
+                                    </td>
+                                    <td>
+
+                                    </td>
+
+                                </tr>
+                                <tr>
+                                    <td>
+                                        <input style="margin-right: 10px;min-width:300px"
+                                               value="{{ isset($data['address'])?$data['address'] : "" }}" type="text"
+                                               placeholder="请输入关键字进行搜索" id="tipinput">
+                                    </td>
+                                    <td>
+                                        <div style="margin-right: 10px;" class="btn btn-sm btn-primary"
+                                             id="confirm">显示搜索点
+                                        </div>
+                                    </td>
+                                    <td class="column2">
+                                        <input type="hidden" readonly="true" id="lnglat">
+                                    </td>
+                                </tr>
+                            </table>
+                            <br>
+                            <button type="button" id="modal-close" class="btn btn-sm btn-primary text-center"
+                                    data-dismiss="modal">确认位置信息
+                            </button>
+                        </div>
+                        <div id="panel"></div>
+                    </div>
+
+                </div><!-- /.modal-content -->
+            </div><!-- /.modal -->
+        </div>
+    </div>
+
+
+    <script type="text/javascript">
+        var map = new AMap.Map("container", {
+            resizeEnable: true,
+            zoom: 10
+        });
+        $("#confirm").click(function () {
+            var val = $('#tipinput').val();
+            AMap.service(["AMap.PlaceSearch"], function () {
+                var placeSearch = new AMap.PlaceSearch({ //构造地点查询类
+                    pageSize: 5,
+                    pageIndex: 1,
+                    map: map,
+                    panel: "panel"
+                });
+                placeSearch.search(val);
+            });
+        });
+
+        //为地图注册click事件获取鼠标点击出的经纬度坐标
+        var clickEventListener = map.on('click', function (e) {
+            document.getElementById("lnglat").value = e.lnglat.getLng() + ',' + e.lnglat.getLat();
+        });
+
+        AMap.plugin('AMap.Geocoder', function () {
+            var geocoder = new AMap.Geocoder({});
+            var marker = new AMap.Marker({
+                map: map,
+                bubble: true
+            })
+            map.on('click', function (e) {
+                console.log(e);
+                marker.setPosition(e.lnglat);
+                $('#lon').val(e.lnglat.getLng());
+                $('#lat').val(e.lnglat.getLat());
+                geocoder.getAddress(e.lnglat, function (status, result) {
+                    if (status == 'complete') {
+                        console.log(result);
+                        document.getElementById('tipinput').value = result.regeocode.formattedAddress
+                    }
+                })
+            })
+
+        });
+        $("#modal-close").click(function () {
+            var b = ($('#tipinput').val());
+            console.log(b);
+            $('#map').val(b);
+            $('#add').val(b);
+        });
+        /*  $('.sg-datepicker').datepicker({
+              format: 'yyyy-mm-dd',
+              language: 'zh-CN'
+          });*/
+    </script>
+@endsection

+ 373 - 0
resources/views/admin/album/manufacturer/edit-furniture.blade.php

xqd
@@ -0,0 +1,373 @@
+@extends('admin.layout')
+@section('header')
+
+    <link href="/base/css/fileinput.css" media="all" rel="stylesheet" type="text/css" />
+
+    <script src="/base/js/fileinput.js" type="text/javascript"></script>
+    <script src="/base/js/fileinput_locale_zh.js" type="text/javascript"></script>
+
+@endsection
+@section('content')
+
+    <?php
+    if (!isset($data)) $data = array();
+    if (!$data && session("data")) {
+        $data = session("data");
+    }
+    if (!$data && session('_old_input')) {
+        $data = session("_old_input");
+    }
+    ?>
+    <div class="wrapper wrapper-content animated fadeInRight">
+        <div class="row">
+            <div class="col-sm-12">
+                <div class="ibox float-e-margins">
+                    <div class="ibox-title">
+                        <h5>系统设置</h5>
+                        <div class="ibox-tools">
+                            <a class="collapse-link"> <i class="fa fa-chevron-up"></i>
+                            </a>
+                        </div>
+                    </div>
+                    <div class="ibox-content">
+                        <div class="row">
+                            <div class="col-lg-10">
+                                <form name="form_product" id="form-validation" action=""
+                                      class="form-horizontal form-validation" accept-charset="UTF-8" method="post">
+
+
+
+
+
+
+                                        <div class="form-group">
+
+                                            <label class="control-label col-sm-3">产品跳转小程序appID</label>
+
+                                            <div class="col-sm-9">
+                                                <input id="data_app_id" name="data[goods_app_id]" class="form-control"
+                                                       value="{{ $data['goods_app_id'] or ''}}" required=""
+                                                       aria-required="true"
+                                                       placeholder="">
+                                            </div>
+
+                                        </div>
+                                        <div class="form-group">
+
+                                            <label class="control-label col-sm-3">产品跳转小程序的url</label>
+
+                                            <div class="col-sm-9">
+                                                <input id="data_app_path" name="data[goods_app_path]"
+                                                       class="form-control"
+                                                       value="{{ $data['goods_app_path'] or ''}}" required=""
+                                                       aria-required="true"
+                                                       placeholder="">
+                                            </div>
+
+                                        </div>
+
+
+                                        <div class="form-group">
+
+                                            <label class="control-label col-sm-3">售后小程序appID</label>
+
+                                            <div class="col-sm-9">
+                                                <input id="data_service_app_id" name="data[service_app_id]"
+                                                       class="form-control"
+                                                       value="{{ $data['service_app_id'] or ''}}" required=""
+                                                       aria-required="true"
+                                                       placeholder="">
+                                            </div>
+
+                                        </div>
+                                        <div class="form-group">
+
+                                            <label class="control-label col-sm-3">售后小程序appSecret</label>
+
+                                            <div class="col-sm-9">
+                                                <input id="data_service_app_secret" name="data[service_app_secret]"
+                                                       class="form-control"
+                                                       value="{{ $data['service_app_secret'] or ''}}" required=""
+                                                       aria-required="true" placeholder="">
+                                            </div>
+
+                                        </div>
+
+                                        <div class="form-group">
+
+                                            <label class="control-label col-sm-3">打印机型号</label>
+
+                                            <div class="col-sm-9">
+                                                <label class="radio-inline">
+                                                    <input type="radio" name="data[print_type]" value="1"
+                                                           @if(isset($data['print_type']) && $data['print_type'] == '1')checked="checked" @endif/>飞鹅
+                                                </label>
+                                                <label class="radio-inline">
+                                                    <input type="radio" name="data[print_type]" value="2"
+                                                           @if(isset($data['print_type']) && $data['print_type'] == '2')checked="checked" @endif/>365
+                                                </label>
+                                            </div>
+
+                                        </div>
+
+
+
+
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">是否开启关注公众号</label>
+
+                                        <div class="col-sm-9">
+                                            <label class="radio-inline">
+                                                <input type="radio" name="data[getFocus]" value="1"
+                                                       @if(isset($data['getFocus']) && $data['getFocus'] == '1')checked="checked" @endif/>是
+                                            </label>
+                                            <label class="radio-inline">
+                                                <input type="radio" name="data[getFocus]" value="0"
+                                                       @if(isset($data['getFocus']) && $data['getFocus'] == '0')checked="checked" @endif/>否
+                                            </label>
+                                        </div>
+
+                                    </div>
+
+                                        <div class="form-group">
+
+                                            <label class="control-label col-sm-3">打印机编号</label>
+
+                                            <div class="col-sm-9">
+                                                <input id="data_print_no" name="data[print_no]" class="form-control"
+                                                       value="{{ $data['print_no'] or ''}}" placeholder="">
+                                            </div>
+
+                                        </div>
+                                        <div class="form-group">
+
+                                            <label class="control-label col-sm-3">打印机秘钥</label>
+
+                                            <div class="col-sm-9">
+                                                <input id="data_print_key" name="data[print_key]" class="form-control"
+                                                       value="{{ $data['print_key'] or ''}}" placeholder="">
+                                            </div>
+
+                                        </div>
+
+                                      {{--  <div class="form-group">
+
+                                            <label class="control-label col-sm-3">首页广告图片</label>
+
+                                            <div class="col-sm-9">
+                                                {!!  widget('Tools.ImgUpload')->single('advertising_pic',"data[advertising_pic]", isset($data['advertising_pic'])? $data['advertising_pic'] : "") !!}
+                                            </div>
+
+                                        </div>--}}
+
+                                        <div class="form-group">
+
+                                            <label class="control-label col-sm-3">家具首页广告图片</label>
+
+                                            <div class="col-sm-9">
+                                                {!!  widget('Tools.ImgUpload')->single('furniture_ads_pic',"data[furniture_ads_pic]", isset($data['furniture_ads_pic'])? $data['furniture_ads_pic'] : "") !!}
+                                            </div>
+
+                                        </div>
+                                        <div class="form-group">
+
+                                            <label class="control-label col-sm-3">公告(不超过100字)</label>
+
+                                            <div class="col-sm-9">
+                                                <input id="data_notice" name="data[notice]" class="form-control"
+                                                       value="{{ $data['notice'] or ''}}" required=""
+                                                       aria-required="true"
+                                                       placeholder="">
+                                            </div>
+
+                                        </div>
+
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">是否显示公告</label>
+                                        <div class="col-sm-9">
+                                            <label class="radio-inline">
+                                                <input type="radio" name="data[show_notice]" value="1"
+                                                       @if(isset($data['show_notice']) && $data['show_notice'] == '1')checked="checked" @endif/>显示
+                                            </label>
+                                            <label class="radio-inline">
+                                                <input type="radio" name="data[show_notice]" value="0"
+                                                       @if(isset($data['show_notice']) && $data['show_notice'] == '0')checked="checked" @endif/>不显示
+                                            </label>
+                                        </div>
+
+                                    </div>
+
+                                        <div class="form-group">
+
+                                            <label class="control-label col-sm-3">公告图标(50*50)</label>
+                                            <div class="col-sm-9">
+                                                {!!  widget('Tools.ImgUpload')->single2('/upload/notice','notice_icon',"notice_icon",  isset($data['notice_icon'])? $data['notice_icon'] : '',array("sizex"=>50,"sizey"=>50)) !!}
+                                            </div>
+
+                                        </div>
+
+
+
+                                      <hr/>
+                                   {{-- <div class="form-group">
+
+                                        <label class="control-label col-sm-3">画册appID</label>
+
+                                        <div class="col-sm-9">
+                                            <input id="data_app_id" name="data[app_id]" class="form-control"
+                                                   value="{{ $data['app_id'] or ''}}" required=""
+                                                   aria-required="true" placeholder="">
+                                        </div>
+
+                                    </div>
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">画册appSecret</label>
+
+                                        <div class="col-sm-9">
+                                            <input id="data_app_secret" name="data[app_secret]" class="form-control"
+                                                   value="{{ $data['app_secret'] or ''}}" required=""
+                                                   aria-required="true" placeholder="">
+                                        </div>
+
+                                    </div>--}}
+
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">画册广告图</label>
+                                        <div class="col-sm-9">
+                                            {!!  widget('Tools.ImgUpload')->multi2('/upload/banner','banner',"data[banner]", isset($data['banner'])? $data['banner'] : '',[]) !!}
+                                        </div>
+                                    </div>
+
+                                    <div class="form-group">
+                                        <label class="control-label col-sm-3">&nbsp;</label>
+                                        <div class="col-sm-9">
+                                            <input type="hidden" name="_referer"
+                                                   value="<?php echo urlencode(request()->server('HTTP_REFERER'));?>"/>
+                                            <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>"/>
+                                            <input type="submit" class="btn btn-success" style="margin-right:20px;">
+                                            <input type="reset" class="btn btn-default">
+                                        </div>
+                                    </div>
+
+                                </form>
+                            </div>
+                            <!-- /.col-lg-10 -->
+                        </div>
+                        <!-- /.row -->
+                    </div>
+                </div>
+            </div>
+        </div>
+
+
+        <div class="modal fade" id="myModal" tabindex="-1" role="dialog"
+             aria-labelledby="myModalLabel" aria-hidden="true">
+            <div class="modal-dialog" style="min-width:60%;">
+                <div class="modal-content">
+                    <div class="modal-header">
+                        <h4 class="modal-title" id="myModalLabel">
+                            选择坐标
+                        </h4>
+                    </div>
+                    <div class="modal-body">
+                        <div id="container" style="width: 100%;min-height: 400px;"></div>
+                        <div id="myPageTop">
+                            <table>
+                                <tr>
+                                    <td>
+                                        <label>按关键字搜索:</label>
+                                    </td>
+                                    <td>
+
+                                    </td>
+
+                                </tr>
+                                <tr>
+                                    <td>
+                                        <input style="margin-right: 10px;min-width:300px"
+                                               value="{{ isset($data['address'])?$data['address'] : "" }}" type="text"
+                                               placeholder="请输入关键字进行搜索" id="tipinput">
+                                    </td>
+                                    <td>
+                                        <div style="margin-right: 10px;" class="btn btn-sm btn-primary"
+                                             id="confirm">显示搜索点
+                                        </div>
+                                    </td>
+                                    <td class="column2">
+                                        <input type="hidden" readonly="true" id="lnglat">
+                                    </td>
+                                </tr>
+                            </table>
+                            <br>
+                            <button type="button" id="modal-close" class="btn btn-sm btn-primary text-center"
+                                    data-dismiss="modal">确认位置信息
+                            </button>
+                        </div>
+                        <div id="panel"></div>
+                    </div>
+
+                </div><!-- /.modal-content -->
+            </div><!-- /.modal -->
+        </div>
+    </div>
+
+
+    <script type="text/javascript">
+        var map = new AMap.Map("container", {
+            resizeEnable: true,
+            zoom: 10
+        });
+        $("#confirm").click(function () {
+            var val = $('#tipinput').val();
+            AMap.service(["AMap.PlaceSearch"], function () {
+                var placeSearch = new AMap.PlaceSearch({ //构造地点查询类
+                    pageSize: 5,
+                    pageIndex: 1,
+                    map: map,
+                    panel: "panel"
+                });
+                placeSearch.search(val);
+            });
+        });
+
+        //为地图注册click事件获取鼠标点击出的经纬度坐标
+        var clickEventListener = map.on('click', function (e) {
+            document.getElementById("lnglat").value = e.lnglat.getLng() + ',' + e.lnglat.getLat();
+        });
+
+        AMap.plugin('AMap.Geocoder', function () {
+            var geocoder = new AMap.Geocoder({});
+            var marker = new AMap.Marker({
+                map: map,
+                bubble: true
+            })
+            map.on('click', function (e) {
+                console.log(e);
+                marker.setPosition(e.lnglat);
+                $('#lon').val(e.lnglat.getLng());
+                $('#lat').val(e.lnglat.getLat());
+                geocoder.getAddress(e.lnglat, function (status, result) {
+                    if (status == 'complete') {
+                        console.log(result);
+                        document.getElementById('tipinput').value = result.regeocode.formattedAddress
+                    }
+                })
+            })
+
+        });
+        $("#modal-close").click(function () {
+            var b = ($('#tipinput').val());
+            console.log(b);
+            $('#map').val(b);
+            $('#add').val(b);
+        });
+        /*  $('.sg-datepicker').datepicker({
+              format: 'yyyy-mm-dd',
+              language: 'zh-CN'
+          });*/
+    </script>
+@endsection

+ 105 - 172
resources/views/admin/album/manufacturer/edit.blade.php

xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -1,5 +1,12 @@
 @extends('admin.layout')
+@section('header')
 
+    <link href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/css/fileinput.css" media="all" rel="stylesheet" type="text/css" />
+
+    <script src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/fileinput.js" type="text/javascript"></script>
+    <script src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/fileinput_locale_zh.js" type="text/javascript"></script>
+
+@endsection
 @section('content')
 
     <?php
@@ -71,58 +78,6 @@
 
                                     </div>
 
-                                        <div class="form-group">
-
-                                            <label class="control-label col-sm-3">产品跳转小程序appID</label>
-
-                                            <div class="col-sm-9">
-                                                <input id="data_app_id" name="data[goods_app_id]" class="form-control"
-                                                       value="{{ $data['goods_app_id'] or ''}}" required=""
-                                                       aria-required="true"
-                                                       placeholder="">
-                                            </div>
-
-                                        </div>
-                                        <div class="form-group">
-
-                                            <label class="control-label col-sm-3">产品跳转小程序的url</label>
-
-                                            <div class="col-sm-9">
-                                                <input id="data_app_path" name="data[goods_app_path]"
-                                                       class="form-control"
-                                                       value="{{ $data['goods_app_path'] or ''}}" required=""
-                                                       aria-required="true"
-                                                       placeholder="">
-                                            </div>
-
-                                        </div>
-
-
-                                        <div class="form-group">
-
-                                            <label class="control-label col-sm-3">售后小程序appID</label>
-
-                                            <div class="col-sm-9">
-                                                <input id="data_service_app_id" name="data[service_app_id]"
-                                                       class="form-control"
-                                                       value="{{ $data['service_app_id'] or ''}}" required=""
-                                                       aria-required="true"
-                                                       placeholder="">
-                                            </div>
-
-                                        </div>
-                                        <div class="form-group">
-
-                                            <label class="control-label col-sm-3">售后小程序appSecret</label>
-
-                                            <div class="col-sm-9">
-                                                <input id="data_service_app_secret" name="data[service_app_secret]"
-                                                       class="form-control"
-                                                       value="{{ $data['service_app_secret'] or ''}}" required=""
-                                                       aria-required="true" placeholder="">
-                                            </div>
-
-                                        </div>
                                     <div class="form-group">
 
                                         <label class="control-label col-sm-3">公众号appID</label>
@@ -148,23 +103,17 @@
                                         </div>
 
                                     </div>
-                                        <div class="form-group">
+                                    <div class="form-group">
 
-                                            <label class="control-label col-sm-3">打印机型号</label>
-
-                                            <div class="col-sm-9">
-                                                <label class="radio-inline">
-                                                    <input type="radio" name="data[print_type]" value="1"
-                                                           @if(isset($data['print_type']) && $data['print_type'] == '1')checked="checked" @endif/>飞鹅
-                                                </label>
-                                                <label class="radio-inline">
-                                                    <input type="radio" name="data[print_type]" value="2"
-                                                           @if(isset($data['print_type']) && $data['print_type'] == '2')checked="checked" @endif/>365
-                                                </label>
-                                            </div>
+                                        <label class="control-label col-sm-3">公众号TemplateID</label>
 
+                                        <div class="col-sm-9">
+                                            <input id="data_wxaccount_template_id" name="data[wxaccount_template_id]"
+                                                   class="form-control"
+                                                   value="{{ $data['wxaccount_template_id'] or ''}}" placeholder="">
                                         </div>
 
+                                    </div>
 
                                     <div class="form-group">
 
@@ -183,111 +132,6 @@
 
                                     </div>
 
-                                    <div class="form-group">
-
-                                        <label class="control-label col-sm-3">是否开启关注公众号</label>
-
-                                        <div class="col-sm-9">
-                                            <label class="radio-inline">
-                                                <input type="radio" name="data[getFocus]" value="1"
-                                                       @if(isset($data['getFocus']) && $data['getFocus'] == '1')checked="checked" @endif/>是
-                                            </label>
-                                            <label class="radio-inline">
-                                                <input type="radio" name="data[getFocus]" value="0"
-                                                       @if(isset($data['getFocus']) && $data['getFocus'] == '0')checked="checked" @endif/>否
-                                            </label>
-                                        </div>
-
-                                    </div>
-                                    <div class="form-group">
-
-                                        <label class="control-label col-sm-3">选择版本</label>
-
-                                        <div class="col-sm-9">
-                                            <label class="radio-inline">
-                                                <input type="radio" name="data[is_audit]" value="1"
-                                                       @if(isset($data['is_audit']) && $data['is_audit'] == '1')checked="checked" @endif/>过审版
-                                            </label>
-                                            <label class="radio-inline">
-                                                <input type="radio" name="data[is_audit]" value="0"
-                                                       @if(isset($data['is_audit']) && $data['is_audit'] == '0')checked="checked" @endif/>应用版
-                                            </label>
-                                        </div>
-
-                                    </div>
-                                        <div class="form-group">
-
-                                            <label class="control-label col-sm-3">打印机编号</label>
-
-                                            <div class="col-sm-9">
-                                                <input id="data_print_no" name="data[print_no]" class="form-control"
-                                                       value="{{ $data['print_no'] or ''}}" placeholder="">
-                                            </div>
-
-                                        </div>
-                                        <div class="form-group">
-
-                                            <label class="control-label col-sm-3">打印机秘钥</label>
-
-                                            <div class="col-sm-9">
-                                                <input id="data_print_key" name="data[print_key]" class="form-control"
-                                                       value="{{ $data['print_key'] or ''}}" placeholder="">
-                                            </div>
-
-                                        </div>
-
-                                        <div class="form-group">
-
-                                            <label class="control-label col-sm-3">首页广告图片</label>
-
-                                            <div class="col-sm-9">
-                                                {!!  widget('Tools.ImgUpload')->single('advertising_pic',"data[advertising_pic]", isset($data['advertising_pic'])? $data['advertising_pic'] : "") !!}
-                                            </div>
-
-                                        </div>
-
-                                        <div class="form-group">
-
-                                            <label class="control-label col-sm-3">家具首页广告图片</label>
-
-                                            <div class="col-sm-9">
-                                                {!!  widget('Tools.ImgUpload')->single('furniture_ads_pic',"data[furniture_ads_pic]", isset($data['furniture_ads_pic'])? $data['furniture_ads_pic'] : "") !!}
-                                            </div>
-
-                                        </div>
-                                        <div class="form-group">
-
-                                            <label class="control-label col-sm-3">公告(不超过100字)</label>
-
-                                            <div class="col-sm-9">
-                                                <input id="data_notice" name="data[notice]" class="form-control"
-                                                       value="{{ $data['notice'] or ''}}" required=""
-                                                       aria-required="true"
-                                                       placeholder="">
-                                            </div>
-
-                                        </div>
-
-                                        <div class="form-group">
-
-                                            <label class="control-label col-sm-3">是否显示公告:1:显示;0:不显示</label>
-
-                                            <div class="col-sm-9">
-                                                <input id="data_notice" name="data[show_notice]" class="form-control"
-                                                       value="{{ $data['show_notice'] or ''}}" placeholder="">
-                                            </div>
-
-                                        </div>
-
-                                        <div class="form-group">
-
-                                            <label class="control-label col-sm-3">公告图标(50*50)</label>
-                                            <div class="col-sm-9">
-                                                {!!  widget('Tools.ImgUpload')->single2('/upload/notice','notice_icon',"notice_icon",  isset($data['notice_icon'])? $data['notice_icon'] : '',array("sizex"=>50,"sizey"=>50)) !!}
-                                            </div>
-
-                                        </div>
-
 
 
                                       <hr/>
@@ -315,7 +159,7 @@
                                     </div>--}}
                                         <div class="form-group">
 
-                                            <label class="control-label col-sm-3">画册小游戏appID</label>
+                                            <label class="control-label col-sm-3">画册appID</label>
 
                                             <div class="col-sm-9">
                                                 <input id="data_xyx_id" name="data[xyx_id]" class="form-control"
@@ -326,7 +170,7 @@
                                         </div>
                                         <div class="form-group">
 
-                                            <label class="control-label col-sm-3">画册小游戏appSecret</label>
+                                            <label class="control-label col-sm-3">画册appSecret</label>
 
                                             <div class="col-sm-9">
                                                 <input id="data_xyx_secret" name="data[xyx_secret]" class="form-control"
@@ -334,6 +178,16 @@
                                                        aria-required="true" placeholder="">
                                             </div>
 
+                                        </div>
+                                        <div class="form-group">
+
+                                            <label class="control-label col-sm-3">画册TemplateId</label>
+
+                                            <div class="col-sm-9">
+                                                <input id="data_wxFurniture_template_id" name="data[wxFurniture_template_id]" class="form-control"
+                                                       value="{{ $data['wxFurniture_template_id'] or ''}}" placeholder="">
+                                            </div>
+
                                         </div>
                                         <div class="form-group">
 
@@ -374,7 +228,29 @@
                                             {!!  widget('Tools.ImgUpload')->multi2('/upload/banner','banner',"data[banner]", isset($data['banner'])? $data['banner'] : '',[]) !!}
                                         </div>
                                     </div>
+                                    <div class="form-group">
+                                        <label class="control-label col-sm-3">经销商画报</label>
+                                        <div class="col-sm-9">
+                                            {{--     //{!! ueditor('') !!}--}}
+                                            {!!  widget('Tools.ImgUpload')->multi2('/upload/agent_banner','agent_banner',"data[agent_banner]",  isset($data['agent_banner'])? $data['agent_banner'] : '') !!}
+                                        </div>
+                                    </div>
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">选择版本</label>
+
+                                        <div class="col-sm-9">
+                                            <label class="radio-inline">
+                                                <input type="radio" name="data[is_audit]" value="1"
+                                                       @if(isset($data['is_audit']) && $data['is_audit'] == '1')checked="checked" @endif/>过审版
+                                            </label>
+                                            <label class="radio-inline">
+                                                <input type="radio" name="data[is_audit]" value="0"
+                                                       @if(isset($data['is_audit']) && $data['is_audit'] == '0')checked="checked" @endif/>应用版
+                                            </label>
+                                        </div>
 
+                                    </div>
                                     <div class="form-group">
                                         <label class="control-label col-sm-3">&nbsp;</label>
                                         <div class="col-sm-9">
@@ -396,6 +272,63 @@
             </div>
         </div>
 
+        <div class="row">
+            <div class="col-sm-12">
+                <div class="ibox float-e-margins">
+                    <div class="ibox-title">
+                        <h5>视频列表</h5>
+                    </div>
+                    <div class="ibox-content">
+                        <form enctype="multipart/form-data" method="post" action="{{ url('/admin/Album/Manufacturer/uploadVideo') }}">
+                            <div class="form-group">
+                                <input id="file-0b" class="file" type="file" name="video">
+                            </div>
+                            {{csrf_field()}}
+                        </form>
+                        <table class="table">
+                            <thead>
+                            <tr>
+                                <th>#</th>
+                                <th>链接</th>
+                                <th>文件名</th>
+                                <th>操作</th>
+                            </tr>
+                            </thead>
+                            <tbody>
+                            @if(!empty($video))
+                                <tr>
+                                    <td>{{ $video['id'] }}</td>
+                                    <td>{{ $video['name'] }}</td>
+                                    <td>{{ $video['url'] }}</td>
+                                    <td>
+                                        <div class="btn-group">
+                                            <button data-toggle="dropdown"
+                                                    class="btn btn-warning btn-sm dropdown-toggle"
+                                                    aria-expanded="false">
+                                                操作 <span class="caret"></span>
+                                            </button>
+                                            <ul class="dropdown-menu">
+                                                <li><a href="{{ U('Album/Manufactuier/videoDel',['id'=>$video['id']])}}" onclick="return confirm('你确定执行删除操作?');">删除</a></li>
+                                            </ul>
+                                        </div>
+
+
+                                    </td>
+                                </tr>
+                            @else
+                                <tr>
+                                    <td colspan="4">暂无文件</td>
+                                </tr>
+                            @endif
+
+                            </tbody>
+                        </table>
+
+                    </div>
+                </div>
+            </div>
+        </div>
+
         <div class="modal fade" id="myModal" tabindex="-1" role="dialog"
              aria-labelledby="myModalLabel" aria-hidden="true">
             <div class="modal-dialog" style="min-width:60%;">

+ 10 - 14
resources/views/admin/album/manufacturer/index.blade.php

xqd xqd
@@ -18,7 +18,7 @@
 
                                 <div class="col-sm-4">
                                     <div class="input-group">
-                                        <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入关键词"
+                                        <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入ID/商户ID/商户名"
                                                name="keyword" class="input-sm form-control">
                                         <span class="input-group-btn">
 									<button type="submit" class="btn btn-sm btn-primary">搜索</button>
@@ -63,20 +63,16 @@
                                         <td>{{ $item->phone }}</td>
                                         <td>{{ $item->address }}</td>
                                         <td>
-                                            <div class="btn-group">
-                                                <button onclick="window.open('{{ U('/Base/Index/welcome',['store_id'=>$item->store_id])}}','_blank')"
-                                                        class="btn btn-warning btn-sm "
-                                                        aria-expanded="false">
-                                                    进入
-                                                </button>
-                                                <ul class="dropdown-menu">
-                                                    @if(role('Album/Manufacturer/destroy'))
-                                                        <li class="divider"></li>
-                                                        <li><a href="{{ U('Album/Manufacturer/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作,该操作将会删除厂家所有数据?');">删除</a></li>
-                                                    @endif
-
-                                                </ul>
+                                            <div class="pull-left">
+                                                @if(role('Album/Manufacturer/destroy'))
+                                                    <a href="{{ U('Album/Manufacturer/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');" class="btn btn-sm btn-danger pull-right">删除</a>
+                                                @endif
                                             </div>
+                                            <button onclick="window.open('{{ U('/Base/Index/welcome',['store_id'=>$item->store_id])}}','_blank')"
+                                                    class="btn btn-warning btn-sm "
+                                                    aria-expanded="false">
+                                                进入
+                                            </button>
                                             @if(role('Album/Manufacturer/view'))
                                                 <button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Album/Manufacturer/view',['id'=>$item->id])}}'});"
                                                         class="btn btn-primary ">查看

+ 11 - 11
resources/views/admin/album/nav/edit.blade.php

xqd xqd
@@ -71,17 +71,6 @@
                                                    placeholder="">
                                         </div>
 
-                                    </div>
-                                    <div class="form-group">
-
-                                        <label class="control-label col-sm-3">排序</label>
-
-                                        <div class="col-sm-9">
-                                            <input id="data_sort" name="data[sort]" class="form-control"
-                                                   value="{{ $data['sort'] or '100'}}" required="" aria-required="true"
-                                                   placeholder="">
-                                        </div>
-
                                     </div>
                                     <div class="form-group">
 
@@ -186,6 +175,17 @@
 
                                     </div>
 
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">排序</label>
+
+                                        <div class="col-sm-9">
+                                            <input id="data_sort" name="data[sort]" class="form-control"
+                                                   value="{{ $data['sort'] or '100'}}" required="" aria-required="true"
+                                                   placeholder="数值越大越靠前">
+                                        </div>
+
+                                    </div>
                                     <div class="form-group">
                                         <label class="control-label col-sm-3">&nbsp;</label>
                                         <div class="col-sm-9">

+ 8 - 22
resources/views/admin/album/nav/index.blade.php

xqd xqd
@@ -18,7 +18,7 @@
 
                                 <div class="col-sm-4">
                                     <div class="input-group">
-                                        <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入关键词"
+                                        <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入ID/名称"
                                                name="keyword" class="input-sm form-control">
                                         <span class="input-group-btn">
 									<button type="submit" class="btn btn-sm btn-primary">搜索</button>
@@ -71,27 +71,13 @@
                                         <td><img src="{{ $item->pic_url }}" width="50"/></td>
                                         <td><img src="{{ $item->pic_url_active }}" width="50"/></td>
                                         <td>
-                                            <div class="btn-group">
-                                                <button data-toggle="dropdown"
-                                                        class="btn btn-warning btn-sm dropdown-toggle"
-                                                        aria-expanded="false">
-                                                    操作 <span class="caret"></span>
-                                                </button>
-                                                <ul class="dropdown-menu">
-
-
-                                                    @if(role('Album/Nav/update'))
-                                                        <li><a href="{{ U('Album/Nav/update',['id'=>$item->id])}}"
-                                                               class="font-bold">修改</a></li>
-                                                    @endif
-
-                                                    @if(role('Album/Nav/destroy'))
-                                                        <li class="divider"></li>
-                                                        <li><a href="{{ U('Album/Nav/destroy',['id'=>$item->id])}}"
-                                                               onclick="return confirm('你确定执行删除操作?');">删除</a></li>
-                                                    @endif
-
-                                                </ul>
+                                            <div class="pull-left">
+                                                @if(role('Album/Nav/update'))
+                                                    <a href="{{ U('Album/Nav/update',['id'=>$item->id])}}" class="btn btn-sm btn-warning pull-right">修改</a>
+                                                @endif
+                                                @if(role('Album/Nav/destroy'))
+                                                    <a href="{{ U('Album/Nav/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');" class="btn btn-sm btn-danger pull-right">删除</a>
+                                                @endif
                                             </div>
                                             {{--@if(role('Album/Nav/view'))
                                                     <button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Album/Nav/view',['id'=>$item->id])}}'});"  class="btn btn-primary ">查看</button>

+ 2 - 2
resources/views/admin/album/news/edit.blade.php

xqd
@@ -74,12 +74,12 @@
                                     </div>
                                     <div class="form-group">
 
-                                        <label class="control-label col-sm-3">排序:越大越靠前</label>
+                                        <label class="control-label col-sm-3">排序:</label>
 
                                         <div class="col-sm-9">
                                             <input id="data_sort" name="data[sort]" class="form-control"
                                                    value="{{ $data['sort'] or ''}}" required="" aria-required="true"
-                                                   placeholder="">
+                                                   placeholder="数值越大越靠前">
                                         </div>
 
                                     </div>

+ 8 - 22
resources/views/admin/album/news/index.blade.php

xqd xqd
@@ -18,7 +18,7 @@
 
                                 <div class="col-sm-4">
                                     <div class="input-group">
-                                        <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入关键词"
+                                        <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入ID/标题/内容"
                                                name="keyword" class="input-sm form-control">
                                         <span class="input-group-btn">
 									<button type="submit" class="btn btn-sm btn-primary">搜索</button>
@@ -57,27 +57,13 @@
                                         <td>{{ $item->created_at }}</td>
                                         <td>{{ $item->updated_at }}</td>
                                         <td>
-                                            <div class="btn-group">
-                                                <button data-toggle="dropdown"
-                                                        class="btn btn-warning btn-sm dropdown-toggle"
-                                                        aria-expanded="false">
-                                                    操作 <span class="caret"></span>
-                                                </button>
-                                                <ul class="dropdown-menu">
-
-
-                                                    @if(role('Album/News/update'))
-                                                        <li><a href="{{ U('Album/News/update',['id'=>$item->id])}}"
-                                                               class="font-bold">修改</a></li>
-                                                    @endif
-
-                                                    @if(role('Album/News/destroy'))
-                                                        <li class="divider"></li>
-                                                        <li><a href="{{ U('Album/News/destroy',['id'=>$item->id])}}"
-                                                               onclick="return confirm('你确定执行删除操作?');">删除</a></li>
-                                                    @endif
-
-                                                </ul>
+                                            <div class="pull-left">
+                                                @if(role('Album/News/update'))
+                                                    <a href="{{ U('Album/News/update',['id'=>$item->id])}}" class="btn btn-sm btn-warning pull-right">修改</a>
+                                                @endif
+                                                @if(role('Album/News/destroy'))
+                                                    <a href="{{ U('Album/News/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');" class="btn btn-sm btn-danger pull-right">删除</a>
+                                                @endif
                                             </div>
                                             @if(role('Album/News/view'))
                                                 <button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Album/News/view',['id'=>$item->id])}}'});"

+ 1 - 1
resources/views/admin/album/news/view.blade.php

xqd
@@ -35,7 +35,7 @@
                </div>                     
                <div class="list-group-item">
                                                   
-                   <h3 class="list-group-item-heading">排序:越大越靠前</h3>
+                   <h3 class="list-group-item-heading">排序</h3>
                                                    
                    <p class="list-group-item-text"> {{ $data['sort'] or ''}}</p>
                                                  

+ 10 - 10
resources/views/admin/album/order/check.blade.php

xqd
@@ -10,25 +10,25 @@
     <!-- CSRF Token -->
     <meta name="csrf-token" content="{{ csrf_token() }}">
 
-    <link href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/css/bootstrap.min.css?v=3.4.0.css" rel="stylesheet">
-    <link href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/css/font-awesome.min.css?v=4.3.0.css" rel="stylesheet">
+    <link href="/base/css/bootstrap.min.css?v=3.4.0.css" rel="stylesheet">
+    <link href="/base/css/font-awesome.min.css?v=4.3.0.css" rel="stylesheet">
 
     <!-- Data Tables -->
-    <link href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
+    <link href="/base/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
 
-    <link href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/css/animate.min.css?v={{config("sys.version")}}" rel="stylesheet">
-    <link href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/css/style.min.css?v={{config("sys.version")}}" rel="stylesheet">
+    <link href="/base/css/animate.min.css?v={{config("sys.version")}}" rel="stylesheet">
+    <link href="/base/css/style.min.css?v={{config("sys.version")}}" rel="stylesheet">
 
     <!-- fine-uploader -->
-    <!--     <link rel="stylesheet" href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/plugins/fine-uploader/fine-uploader-new.min.css"> -->
+    <!--     <link rel="stylesheet" href="/base/plugins/fine-uploader/fine-uploader-new.min.css"> -->
 
     <!-- cropperjs -->
-    <link rel="stylesheet" href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/plugins/cropperjs/cropper.min.css">
+    <link rel="stylesheet" href="/base/plugins/cropperjs/cropper.min.css">
 
     <!-- 全局js -->
-    <script src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/jquery-2.1.1.min.js?v={{config("sys.version")}}"></script>
-    <script src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/bootstrap.min.js?v=3.4.0"></script>
-    <script src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/layer/layer.js?v={{config("sys.version")}}"></script>
+    <script src="/base/js/jquery-2.1.1.min.js?v={{config("sys.version")}}"></script>
+    <script src="/base/js/bootstrap.min.js?v=3.4.0"></script>
+    <script src="/base/js/layer/layer.js?v={{config("sys.version")}}"></script>
 
     <script type="text/javascript">
         function doPrint() {

+ 1 - 8
resources/views/admin/album/order/edit.blade.php

xqd
@@ -23,14 +23,7 @@
                         </div>
                     </div>
                     <div class="ibox-content">
-                        @if(role('Album/Order/index'))
-                            <div class="row">
-                                <div class="col-sm-3 pull-right">
-                                    <a href="{{ U('Album/Order/index')}}"
-                                       class="btn btn-sm btn-primary pull-right">返回列表</a>
-                                </div>
-                            </div>
-                        @endif
+
 
                         <div class="row">
                             <div class="col-lg-10">

+ 26 - 12
resources/views/admin/album/order/index.blade.php

xqd xqd xqd xqd
@@ -1,8 +1,8 @@
 @extends('admin.layout')
 
 @section('content')
-    <link href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/css/time/jquery.datetimepicker.css" rel="stylesheet">
-    <link href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/css/time/jquery-ui-1.10.1.css" rel="stylesheet">
+    <link href="/base/css/time/jquery.datetimepicker.css" rel="stylesheet">
+    <link href="/base/css/time/jquery-ui-1.10.1.css" rel="stylesheet">
     <div class="wrapper wrapper-content animated fadeInRight">
         <div class="row">
             <div class="col-sm-12">
@@ -84,9 +84,14 @@
                                 @foreach($list as $key => $item)
                                     <tr>
                                         <td>{{ $item->sno }}</td>
-                                        <td><span style="cursor: pointer"
+                                        <td>
+                                            @if(role('Album/Order/getpic')))<span style="cursor: pointer"
                                                   onclick="layer.open({type: 2,area: ['80%', '90%'],title:'图片',content: '{{ U('Album/Order/picture',['id'=>$item->id])}}'});"
-                                                  class="label label-default">查看图片</span></td>
+                                                  class="label label-default">查看图片</span>
+                                            @else
+                                                <span style="cursor: pointer">暂无权限</span>
+                                            @endif
+                                        </td>
                                         <td>
                                             产品分类:{{ $item->category }}<br/>
                                             型 号:{{ $item->type }}<br/>
@@ -96,19 +101,28 @@
                                         <td>{{ $item->status() }}</td>
                                         @if(Request::get('expected'))
                                             <td>@if($item->expected_comment){{$item->expected_comment}}@else
+                                                    @if(role('Album/Order/addecomment'))
                                                     <button class="btn btn-warning myModal1" data-toggle="modal"
                                                             data-id="{{ $item->id }}" data-target="#myModal">添加备注
-                                                    </button>@endif</td>@endif
+                                                    </button>
+                                                    @endif
+                                                @endif
+                                            </td>
+                                        @endif
                                         <td>
                                             <div class="btn-group">
                                                 @if($item->status == 0)
-                                                    <button class="btn btn-success myModal" data-toggle="modal"
-                                                            data-id="{{ $item->id }}" data-target="#myModal2">通过审核
-                                                    </button>
+                                                    @if(role('Album/Order/status'))
+                                                        <button class="btn btn-success myModal" data-toggle="modal"
+                                                                data-id="{{ $item->id }}" data-target="#myModal2">通过审核
+                                                        </button>
+                                                    @endif
                                                 @else
-                                                    <button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Album/Order/check',['id'=>$item->id])}}'});"
-                                                            class="btn btn-success ">打印
-                                                    </button>
+                                                    @if(role('Album/Order/check'))
+                                                        <button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Album/Order/check',['id'=>$item->id])}}'});"
+                                                                class="btn btn-success ">打印
+                                                        </button>
+                                                    @endif
                                                 @endif
                                             </div>
                                             @if(role('Album/Order/view'))
@@ -290,7 +304,7 @@
         </small>
     </div>
     {{--时间插件--}}
-    <script src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/time/jquery-ui-1.10.1.min.js"></script>
+    <script src="/base/js/time/jquery-ui-1.10.1.min.js"></script>
     <script>
         //        时间选择js
         $(function () {

+ 10 - 10
resources/views/admin/album/order/view.blade.php

xqd
@@ -10,25 +10,25 @@
     <!-- CSRF Token -->
     <meta name="csrf-token" content="{{ csrf_token() }}">
 
-    <link href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/css/bootstrap.min.css?v=3.4.0.css" rel="stylesheet">
-    <link href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/css/font-awesome.min.css?v=4.3.0.css" rel="stylesheet">
+    <link href="/base/css/bootstrap.min.css?v=3.4.0.css" rel="stylesheet">
+    <link href="/base/css/font-awesome.min.css?v=4.3.0.css" rel="stylesheet">
 
     <!-- Data Tables -->
-    <link href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
+    <link href="/base/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
 
-    <link href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/css/animate.min.css?v={{config("sys.version")}}" rel="stylesheet">
-    <link href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/css/style.min.css?v={{config("sys.version")}}" rel="stylesheet">
+    <link href="/base/css/animate.min.css?v={{config("sys.version")}}" rel="stylesheet">
+    <link href="/base/css/style.min.css?v={{config("sys.version")}}" rel="stylesheet">
 
     <!-- fine-uploader -->
-    <!--     <link rel="stylesheet" href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/plugins/fine-uploader/fine-uploader-new.min.css"> -->
+    <!--     <link rel="stylesheet" href="/base/plugins/fine-uploader/fine-uploader-new.min.css"> -->
 
     <!-- cropperjs -->
-    <link rel="stylesheet" href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/plugins/cropperjs/cropper.min.css">
+    <link rel="stylesheet" href="/base/plugins/cropperjs/cropper.min.css">
 
     <!-- 全局js -->
-    <script src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/jquery-2.1.1.min.js?v={{config("sys.version")}}"></script>
-    <script src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/bootstrap.min.js?v=3.4.0"></script>
-    <script src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/layer/layer.js?v={{config("sys.version")}}"></script>
+    <script src="/base/js/jquery-2.1.1.min.js?v={{config("sys.version")}}"></script>
+    <script src="/base/js/bootstrap.min.js?v=3.4.0"></script>
+    <script src="/base/js/layer/layer.js?v={{config("sys.version")}}"></script>
 
     <script type="text/javascript">
         function doPrint() {

+ 3 - 0
resources/views/admin/album/poster/edit.blade.php

xqd xqd
@@ -34,7 +34,9 @@
                                     <label class="control-label col-sm-3">海报(440*440)</label>
                                     <div class="col-sm-9">
                                         {!!  widget('Tools.ImgUpload')->multi2('/upload/posters','posters',"data[posters]", isset($data['posters'])? $data['posters'] : '',array("sizex"=>440,"sizey"=>440)) !!}
+                                        <button type="button" onclick="layer.open({type: 2,area: ['80%', '65%'],content: '{{ U('Album/Poster/viewPoster')}}'});"  class="btn btn-primary col-sm-offset-3">查看示例</button>
                                     </div>
+
                                 </div>
                                 <div class="form-group">
 
@@ -78,6 +80,7 @@
                                     <div class="col-sm-9">
                                         {{--{!!  widget('Tools.ImgUpload')->single2('/upload/cover_pic','cover_pic',"cover_pic",  isset($data['cover_pic'])? $data['cover_pic'] : '',array("sizex"=>662,"sizey"=>510)) !!}--}}
                                         {!!  widget('Tools.ImgUpload')->single2('/upload/share','share',"share",  isset($data['share'])? $data['share'] : '',array("sizex"=>1080,"sizey"=>1080)) !!}
+                                        <button type="button" onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Album/Poster/viewShare')}}'});"  class="btn btn-primary col-sm-offset-3">查看示例</button>
                                     </div>
                                 </div>
                                 <div class="form-group">

+ 15 - 0
resources/views/admin/album/poster/view.blade.php

xqd
@@ -0,0 +1,15 @@
+@extends('admin.layout')
+
+@section('content')
+    <div class="row">
+        <div class="ibox-content">
+            <div class="list-group">
+
+                <div class="list-group-item">
+                    <img width="700px" src="{{ $img }}"/>
+                </div>
+
+            </div>
+        </div>
+    </div>
+@endsection

+ 8 - 25
resources/views/admin/album/product/attr/index.blade.php

xqd xqd
@@ -18,7 +18,7 @@
 
                                 <div class="col-sm-4">
                                     <div class="input-group">
-                                        <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入关键词"
+                                        <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入ID/名称"
                                                name="keyword" class="input-sm form-control">
                                         <span class="input-group-btn">
 									<button type="submit" class="btn btn-sm btn-primary">搜索</button>
@@ -50,36 +50,19 @@
                             @if(isset($list))
                                 @foreach($list as $key => $item)
                                     <tr>
-
                                         <td>{{ $item->id }}</td>
                                         <td>{{ $item->name }}</td>
                                         <td>{{ $item->pid() }}</td>
                                         <td>{{ $item->created_at }}</td>
                                         <td>{{ $item->updated_at }}</td>
                                         <td>
-                                            <div class="btn-group">
-                                                <button data-toggle="dropdown"
-                                                        class="btn btn-warning btn-sm dropdown-toggle"
-                                                        aria-expanded="false">
-                                                    操作 <span class="caret"></span>
-                                                </button>
-                                                <ul class="dropdown-menu">
-
-
-                                                    @if(role('Album/Product/Attr/update'))
-                                                        <li>
-                                                            <a href="{{ U('Album/Product/Attr/update',['id'=>$item->id])}}"
-                                                               class="font-bold">修改</a></li>
-                                                    @endif
-
-                                                    @if(role('Album/Product/Attr/destroy'))
-                                                        <li class="divider"></li>
-                                                        <li>
-                                                            <a href="{{ U('Album/Product/Attr/destroy',['id'=>$item->id])}}"
-                                                               onclick="return confirm('你确定执行删除操作?');">删除</a></li>
-                                                    @endif
-
-                                                </ul>
+                                            <div class="pull-left">
+                                                @if(role('Album/Product/Attr/update'))
+                                                    <a href="{{ U('Album/Product/Attr/update',['id'=>$item->id])}}" class="btn btn-sm btn-warning pull-right">修改</a>
+                                                @endif
+                                                @if(role('Album/Product/Attr/destroy'))
+                                                    <a href="{{ U('Album/Product/Attr/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');" class="btn btn-sm btn-danger pull-right">删除</a>
+                                                @endif
                                             </div>
                                         </td>
                                     </tr>

+ 233 - 170
resources/views/admin/album/product/edit.blade.php

xqd xqd
@@ -1,8 +1,15 @@
 @extends('admin.layout')
+@section('header')
 
+    <link href="/base/css/fileinput.css" media="all" rel="stylesheet" type="text/css" />
+
+    <script src="/base/js/fileinput.js" type="text/javascript"></script>
+    <script src="/base/js/fileinput_locale_zh.js" type="text/javascript"></script>
+
+@endsection
 @section('content')
 
-<?php
+    <?php
     if(!isset($data)) $data = array();
     if(!$data && session("data")){
         $data = session("data");
@@ -10,191 +17,247 @@
     if(!$data && session('_old_input')){
         $data = session("_old_input");
     }
-?>
-<div class="wrapper wrapper-content animated fadeInRight">
-	<div class="row">
-		<div class="col-sm-12">
-			<div class="ibox float-e-margins">
-				<div class="ibox-title">
-					<h5>产品列表</h5>
-					<div class="ibox-tools">
-						<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
-						</a>
-					</div>
-				</div>
-				<div class="ibox-content">
-                    @if(role('Album/Product/index'))
-				    <div class="row">
-    					<div class="col-sm-3 pull-right">
-    					   <a href="{{ U('Album/Product/index')}}" class="btn btn-sm btn-primary pull-right">返回列表</a>
-    					</div>
-					</div>
-                    @endif
-
-		            <div class="row">
-                        <div class="col-lg-10">
-                            <form name="form_product" id="form-validation" action="" class="form-horizontal form-validation" accept-charset="UTF-8" method="post">
-
-                                    
-                <div class="form-group">
-                                    
-                 <label class="control-label col-sm-3">产品名称</label>
-                                    
-                   <div class="col-sm-9">
-                     <input id="data_store_id" name="data[name]" class="form-control" value="{{ $data['name'] or ''}}" required="" aria-required="true"  placeholder="">
+    ?>
+    <div class="wrapper wrapper-content animated fadeInRight">
+        <div class="row">
+            <div class="col-sm-12">
+                <div class="ibox float-e-margins">
+                    <div class="ibox-title">
+                        <h5>产品列表</h5>
+                        <div class="ibox-tools">
+                            <a class="collapse-link"> <i class="fa fa-chevron-up"></i>
+                            </a>
+                        </div>
                     </div>
-                </div>    
-                <div class="form-group">
-                                    
-                 <label class="control-label col-sm-3">分类</label>
-                                    
-                   <div class="col-sm-9">
-                       <select name="data[cat_id]" id="data_cat_id" class="form-control"  required="" aria-required="true">
-                           @if(isset($cat))
-                               @foreach($cat as $key=>$val)
-                                       <option value="{{$val->id}}"  @if($val['id'] == (isset($data['cat_id'])? $data['cat_id']:''))selected @endif>{{$val->name}}</option>
-                               @endforeach
-                           @endif
-                       </select>
-                   </div>
+                    <div class="ibox-content">
+                        @if(role('Album/Product/index'))
+                            <div class="row">
+                                <div class="col-sm-3 pull-right">
+                                    <a href="{{ U('Album/Product/index')}}" class="btn btn-sm btn-primary pull-right">返回列表</a>
+                                </div>
+                            </div>
+                        @endif
+
+                        <div class="row">
+                            <div class="col-lg-10">
+                                <form name="form_product" id="form-validation" action="" class="form-horizontal form-validation" enctype="multipart/form-data" accept-charset="UTF-8" method="post" onsubmit="return checkLevel()">
 
-                </div>
-                                <div class="form-group">
 
-                                    <label class="control-label col-sm-3">默认价格</label>
+                                    <div class="form-group">
 
-                                    <div class="col-sm-9">
-                                        <input id="data_store_id" name="data[price_default]" type="number" class="form-control" value="{{ $data['price_default'] or ''}}" required="" aria-required="true"  placeholder="">
+                                        <label class="control-label col-sm-3">产品名称</label>
+
+                                        <div class="col-sm-9">
+                                            <input id="data_store_id" name="data[name]" class="form-control" value="{{ $data['name'] or ''}}" required="" aria-required="true"  placeholder="">
+                                        </div>
                                     </div>
-                                </div>
-                                <div class="form-group">
+                                    <div class="form-group">
 
-                                    <label class="control-label col-sm-3">出厂价</label>
+                                        <label class="control-label col-sm-3">分类</label>
 
-                                    <div class="col-sm-9">
-                                        <input id="data_ma_price" name="data[ma_price]" type="number" class="form-control" value="{{ $data['ma_price'] or ''}}" required="" aria-required="true"  placeholder="">
+                                        <div class="col-sm-3">
+                                            <select id="data_parent_id" class="form-control" name="data[cat_id]" >
+                                                @if(isset($category))
+                                                    @foreach($category as $key=>$val)
+                                                        <option value="0" disabled="disabled">|--{{$val['name']}}</option>
+                                                        @foreach($val['son'] as $index=>$item)
+                                                            <option value="{{$item->id}}"  @if($item['id'] == (isset($data['cat_id'])? $data['cat_id']:''))selected @endif>&nbsp&nbsp|-{{$item->name}}</option>
+                                                        @endforeach
+                                                    @endforeach
+                                                @endif
+                                            </select>
+                                        </div>
+                                        {{--<div class="col-sm-3" id="app">
+                                            <select name="data[cat_id]" id="data_cat_id" class="form-control"  required="" aria-required="true">
+                                                <option v-for="item in list.data" :value="item.id">@{{ item.name }}</option>
+                                            </select>
+                                        </div>--}}
                                     </div>
-                                </div>
-                                <div class="form-group">
+                                    <div class="form-group">
 
-                                    <label class="control-label col-sm-3">出厂价备注</label>
+                                        <label class="control-label col-sm-3">默认价格</label>
 
-                                    <div class="col-sm-9">
-                                        <input id="data_ma_price_comment" name="data[ma_price_comment]" class="form-control" value="{{ $data['ma_price_comment'] or ''}}"  placeholder="">
+                                        <div class="col-sm-9">
+                                            <input id="data_store_id" name="data[price_default]" type="number" class="form-control" value="{{ $data['price_default'] or ''}}" required="" aria-required="true"  placeholder="">
+                                        </div>
                                     </div>
-                                </div>
-                                <div class="form-group">
-                                    
-                 <label class="control-label col-sm-3">尺寸图片(1920*1080)</label>
-                    <div class="col-sm-9">
-                        {{--{!!  widget('Tools.ImgUpload')->single2('/upload/attr','attr',"attr",  isset($data['attr'])? $data['attr'] : '',array("sizex"=>1920,"sizey"=>1080)) !!}--}}
-                        {!!  widget('Tools.ImgUpload')->multi2('/upload/specifications_img','specifications_img',"data[specifications_img]",  isset($data['specifications_img'])? $data['specifications_img'] : '',array("sizex"=>1920,"sizey"=>1080)) !!}
-                    </div>
-                </div>
+                                    <div class="form-group">
 
-                <div class="form-group">
+                                        <label class="control-label col-sm-3">出厂价格</label>
 
-                    <label class="control-label col-sm-3">安装图片(1920*1080)</label>
-                    <div class="col-sm-9">
-                        {!!  widget('Tools.ImgUpload')->multi2('/upload/install_img','install_img',"data[install_img]",  isset($data['install_img'])? $data['install_img'] : '',array("sizex"=>1920,"sizey"=>1080)) !!}
-                    </div>
-                </div>
-                <div class="form-group">
-                                    
-                 <label class="control-label col-sm-3">风格</label>
-                    <div class="col-sm-9">
-                        <select name="data[style]" id="data_style" class="form-control"  required="" aria-required="true">
-                            @if(isset($style))
-                                @foreach($style as $key=>$val)
-                                    <option value="{{$val->id}}"  @if($val['id'] == (isset($data['style'])? $data['style']:''))selected @endif>{{$val->name}}</option>
-                                @endforeach
-                            @endif
-                        </select>
-                    </div>
-                </div>    
-                <div class="form-group">
-                                    
-                 <label class="control-label col-sm-3">排序</label>
-                                    
-                   <div class="col-sm-9">
-                     <input id="data_sort" name="data[sort]" class="form-control" value="{{ $data['sort'] or ''}}" required="" aria-required="true"  placeholder=""> 
-                    </div>
-                                
-                </div>    
-                <div class="form-group">
-                    <label class="control-label col-sm-3">封面图片(480*270)</label>
-                    <div class="col-sm-9">
-                        {{--{!!  widget('Tools.ImgUpload')->single2('/upload/cover_pic','cover_pic',"cover_pic",  isset($data['cover_pic'])? $data['cover_pic'] : '',array("sizex"=>662,"sizey"=>510)) !!}--}}
-                        {!!  widget('Tools.ImgUpload')->single2('/upload/thumb','thumb',"thumb",  isset($data['thumb'])? $data['thumb'] : '',array("sizex"=>480,"sizey"=>270)) !!}
-                    </div>
-                </div>
-                <div class="form-group">
-                    <label class="control-label col-sm-3">封面图片(高清1920*1080)</label>
-                    <div class="col-sm-9">
-                        {{--{!!  widget('Tools.ImgUpload')->single2('/upload/cover_pic','cover_pic',"cover_pic",  isset($data['cover_pic'])? $data['cover_pic'] : '',array("sizex"=>662,"sizey"=>510)) !!}--}}
-                        {!!  widget('Tools.ImgUpload')->single2('/upload/cover_pic','cover_pic',"cover_pic",  isset($data['cover_pic'])? $data['cover_pic'] : '',array("sizex"=>1920,"sizey"=>1080)) !!}
-                    </div>
-                </div>
-                <div class="form-group">
-                    <label class="control-label col-sm-3">搭配图片(1920*1080)</label>
-                    <div class="col-sm-9">
-                        {!!  widget('Tools.ImgUpload')->single2('/upload/detail_pic','detail_pic',"detail_pic",  isset($data['detail_pic'])? $data['detail_pic'] : '',array("sizex"=>1920,"sizey"=>1080)) !!}
-                    </div>
-                </div>
-                <div class="form-group">
-                 <label class="control-label col-sm-3">是否促销新品</label>
-                                    
-                   <div class="col-sm-9">
-                       @if(dict()->get('album','new') != null)
-                           @foreach(dict()->get('album','new') as $key=>$val)
-                               <label class="radio-inline">
-                                   <input type="radio" name="data[hot_cake]" value="{{$key}}" @if(isset($data['hot_cake']) && $data['hot_cake'] == $key)checked="checked" @endif/>{{$val}}
-                               </label>
-                           @endforeach
-                       @else
-                           <label class="radio-inline">
-                               <input type="radio" name="data[hot_cake]">
-                           </label>
-                       @endif
-                    </div>
-                                
-                </div>
-                <div class="form-group">
-                 <label class="control-label col-sm-3">产品详情</label>
-                   <div class="col-sm-9">
-                  {{--     //{!! ueditor('') !!}--}}
-                       {!!  widget('Tools.ImgUpload')->multi2('/upload/detail','detail',"data[detail]",  isset($data['detail'])? $data['detail'] : '') !!}
-                    </div>
-                </div>
-                                
-                                <div class="form-group">
-                                    <label class="control-label col-sm-3">&nbsp;</label>
-                                    <div class="col-sm-9">
-                                        <input type="hidden" name="_referer" value="<?php echo urlencode(request()->server('HTTP_REFERER'));?>"/>
-                                        <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>"/>
-                                        <input type="submit" class="btn btn-success" style="margin-right:20px;">
-                                        <input type="reset" class="btn btn-default" >
+                                        <div class="col-sm-9">
+                                            <input id="data_ma_price" name="data[ma_price]" type="number" class="form-control" value="{{ $data['ma_price'] or ''}}" required="" aria-required="true"  placeholder="">
+                                        </div>
                                     </div>
-                                </div>
-        
-                            </form>
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">出厂价备注</label>
+
+                                        <div class="col-sm-9">
+                                            <input id="data_ma_price_comment" name="data[ma_price_comment]" class="form-control" value="{{ $data['ma_price_comment'] or ''}}"  placeholder="">
+                                        </div>
+                                    </div>
+
+                                    <div class="form-group">
+                                        <label class="control-label col-sm-3">排序</label>
+                                        <div class="col-sm-9">
+                                            <input id="data_sort" name="data[sort]" class="form-control" value="{{ $data['sort'] or ''}}" required="" aria-required="true"  placeholder="数值越大越靠前">
+                                        </div>
+                                    </div>
+
+                                    <div class="form-group">
+                                        <label class="control-label col-sm-3">是否促销新品</label>
+
+                                        <div class="col-sm-9">
+                                            @if(dict()->get('album','new') != null)
+                                                @foreach(dict()->get('album','new') as $key=>$val)
+                                                    <label class="radio-inline">
+                                                        <input type="radio" name="data[hot_cake]" value="{{$key}}" @if(isset($data['hot_cake']) && $data['hot_cake'] == $key)checked="checked" @endif/>{{$val}}
+                                                    </label>
+                                                @endforeach
+                                            @else
+                                                <label class="radio-inline">
+                                                    <input type="radio" name="data[hot_cake]">
+                                                </label>
+                                            @endif
+                                        </div>
+
+                                    </div>
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">尺寸图片(1920*1080)</label>
+                                        <div class="col-sm-9">
+                                            {{--{!!  widget('Tools.ImgUpload')->single2('/upload/attr','attr',"attr",  isset($data['attr'])? $data['attr'] : '',array("sizex"=>1920,"sizey"=>1080)) !!}--}}
+                                            {!!  widget('Tools.ImgUpload')->multi2('/upload/specifications_img','specifications_img',"data[specifications_img]",  isset($data['specifications_img'])? $data['specifications_img'] : '',array("sizex"=>1920,"sizey"=>1080)) !!}
+                                        </div>
+                                    </div>
+
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">安装图片(1920*1080)</label>
+                                        <div class="col-sm-9">
+                                            {!!  widget('Tools.ImgUpload')->multi2('/upload/install_img','install_img',"data[install_img]",  isset($data['install_img'])? $data['install_img'] : '',array("sizex"=>1920,"sizey"=>1080)) !!}
+                                        </div>
+                                    </div>
+
+                                    <div class="form-group">
+                                        <label class="control-label col-sm-3">封面图片(480*270)</label>
+                                        <div class="col-sm-9">
+                                            {{--{!!  widget('Tools.ImgUpload')->single2('/upload/cover_pic','cover_pic',"cover_pic",  isset($data['cover_pic'])? $data['cover_pic'] : '',array("sizex"=>662,"sizey"=>510)) !!}--}}
+                                            {!!  widget('Tools.ImgUpload')->single2('/upload/thumb','thumb',"thumb",  isset($data['thumb'])? $data['thumb'] : '',array("sizex"=>480,"sizey"=>270)) !!}
+                                        </div>
+                                    </div>
+                                    <div class="form-group">
+                                        <label class="control-label col-sm-3">封面图片(高清1920*1080)</label>
+                                        <div class="col-sm-9">
+                                            {{--{!!  widget('Tools.ImgUpload')->single2('/upload/cover_pic','cover_pic',"cover_pic",  isset($data['cover_pic'])? $data['cover_pic'] : '',array("sizex"=>662,"sizey"=>510)) !!}--}}
+                                            {!!  widget('Tools.ImgUpload')->single2('/upload/cover_pic','cover_pic',"cover_pic",  isset($data['cover_pic'])? $data['cover_pic'] : '',array("sizex"=>1920,"sizey"=>1080)) !!}
+                                        </div>
+                                    </div>
+                                    <div class="form-group">
+                                        <label class="control-label col-sm-3">搭配图片(1920*1080)</label>
+                                        <div class="col-sm-9">
+                                            {!!  widget('Tools.ImgUpload')->single2('/upload/detail_pic','detail_pic',"detail_pic",  isset($data['detail_pic'])? $data['detail_pic'] : '',array("sizex"=>1920,"sizey"=>1080)) !!}
+                                        </div>
+                                    </div>
+
+                                    <div class="form-group">
+                                        <label class="control-label col-sm-3">产品详情</label>
+                                        <div class="col-sm-9">
+                                            {{--     //{!! ueditor('') !!}--}}
+                                            {!!  widget('Tools.ImgUpload')->multi2('/upload/detail','detail',"data[detail]",  isset($data['detail'])? $data['detail'] : '') !!}
+                                        </div>
+                                    </div>
+
+                                    <div class="form-group">
+                                        <label class="control-label col-sm-3">安装视频</label>
+                                        <div class="col-sm-9">
+                                            <div style="height: auto;width: 200px;">
+                                                <video controls width="100px" height="100px">
+                                                    <source src="{{$data['upload_video'] ?? ''}}" type="video/mp4">
+                                                </video>
+                                            </div>
+                                            <input id="file-0b" class="file" type="file" name="data[upload_video]" value="">
+                                        </div>
+                                    </div>
+
+
+                                    <div class="form-group">
+                                        <label class="control-label col-sm-3">&nbsp;</label>
+                                        <div class="col-sm-9">
+                                            <input type="hidden" name="_referer" value="<?php echo urlencode(request()->server('HTTP_REFERER'));?>"/>
+                                            <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>"/>
+                                            <input type="submit" class="btn btn-success" style="margin-right:20px;">
+                                            <input type="reset" class="btn btn-default" >
+                                        </div>
+                                    </div>
+
+                                </form>
+                            </div>
+                            <!-- /.col-lg-10 -->
                         </div>
-                        <!-- /.col-lg-10 -->
+                        <!-- /.row -->
                     </div>
-                    <!-- /.row -->
-				</div>
-			</div>
-		</div>
-	</div>
-</div>
-<script>
-    function check(){
-        //alert($('#data_cat_id').val());
-        if($('#data_cat_id').val() == '' || $('#data_cat_id').val() == null){
-
-            return false;
-        }
+                </div>
+            </div>
+        </div>
+    </div>
+    <script src="/base/js/vue.js"></script>
+    <link href="/base/css/plugins/toastr/toastr.min.css" rel="stylesheet">
+    <script src="/base/js/plugins/toastr/toastr.min.js"></script>
+    <script>
+        toastr.options.positionClass = 'toast-bottom-center';
+        toastr.options.timeOut = '4000';
+
+        /*  var level = new Vue({
+              el:"#app",
+              data:{
+                  list:{
+                      data:[
+                          {'id':0,'name':'请先选择一级类目'},
+                      ],
+                  },
+                  //      num:0
+              },
+              methods:{
+                  changeData:function (e) {
+                      Vue.set(this.list,'data',e)
+                  }
+              }
+          });
+
+          function getLevelSecondCategory(){
+              var first = $('#data_parent_id').val();
+              $.ajax({
+                  url: "{{--{{ U('Album/Product/getSecondCategory') }}--}}",
+            method: 'POST',
+            data: {
+                'cat_id':first,
+                '_token':"{{ csrf_token() }}"
+            },
+            dataType:'json',
+
+            success: function(data) {
+                if (data.code == 0) {
+                    level.changeData(data.data);
+                } else {
+                    toastr.error(data.message);
+                }
+            }
+        });
     }
 
-</script>
+
+        getLevelSecondCategory();*/
+
+
+        function checkLevel(){
+            var second = $('#data_cat_id').val();
+            if (second == 0) {
+                toastr.error('请选择二级分类!');
+                return false;
+            }
+            return true;
+        }
+    </script>
 @endsection

+ 10 - 28
resources/views/admin/album/product/index.blade.php

xqd xqd xqd
@@ -18,7 +18,7 @@
 
 				        <div class="col-sm-4">
 				            <div class="input-group">
-								<input type="text" value="{{Request::get('keyword')}}"	placeholder="请输入关键词" name="keyword"class="input-sm form-control"> 
+								<input type="text" value="{{Request::get('keyword')}}"	placeholder="请输入ID/商品名" name="keyword" class="input-sm form-control">
 								<span class="input-group-btn">
 									<button type="submit" class="btn btn-sm btn-primary">搜索</button>
 								</span>
@@ -40,9 +40,6 @@
             <th class="sorting" data-sort="name"> 名称 </th>
             <th class="sorting" data-sort="cat_id"> 分类 </th>
             <th class="sorting" data-sort="price_default"> 默认价格 </th>
-            <th class="sorting" data-sort="specifications_img"> 规格图片 </th>
-            <th class="sorting" data-sort="install_img"> 安装图片 </th>
-            <th class="sorting" data-sort="style"> 风格 </th>
             <th class="sorting" data-sort="sort"> 排序 </th>
             <th class="sorting" data-sort="cover_pic"> 封面图片 </th>
         						<th width="22%">相关操作</th>
@@ -56,35 +53,20 @@
             <td>{{ $item->name }}</td>
             <td>{{ $item->cat_name }}</td>
             <td>{{ $item->price_default }}</td>
-            <td><img src="{{ $item->specifications_img }}" width="50"/></td>
-            <td><img src="{{ $item->install_img }}" width="50"/></td>
-            <td>{{ $item->style_name }}</td>
             <td>{{ $item->sort }}</td>
             <td><img src="{{ $item->thumb }}" width="50"/></td>
 								<td>
-									<div class="btn-group">
-										<button data-toggle="dropdown"
-											class="btn btn-warning btn-sm dropdown-toggle"
-											aria-expanded="false">
-											操作 <span class="caret"></span>
-										</button>
-										<ul class="dropdown-menu">
-
-
-											@if(role('Album/Product/update'))
-											<li><a href="{{ U('Album/Product/update',['id'=>$item->id])}}" class="font-bold">修改</a></li>
-											@endif
-
-											@if(role('Album/Product/destroy'))
-											<li class="divider"></li>
-											<li><a href="{{ U('Album/Product/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');">删除</a></li>
-											@endif
-
-										</ul>
+									<div class="pull-left">
+										@if(role('Album/Product/update'))
+											<a href="{{ U('Album/Product/update',['id'=>$item->id])}}" class="btn btn-sm btn-warning pull-right">修改</a>
+										@endif
+										@if(role('Album/Product/destroy'))
+											<a href="{{ U('Album/Product/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');" class="btn btn-sm btn-danger pull-right">删除</a>
+										@endif
 									</div>
-								@if(role('Album/Product/view'))
+								{{--@if(role('Album/Product/view'))
 										<button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Album/Product/view',['id'=>$item->id])}}'});"  class="btn btn-primary ">查看大图</button>
-									@endif
+									@endif--}}
 								</td>
 							</tr>
 							@endforeach

+ 80 - 11
resources/views/admin/album/product/price/index.blade.php

xqd xqd xqd xqd
@@ -15,15 +15,29 @@
 				<div class="ibox-content">
 				    <div class="row">
 				        <form method="GET" action="" accept-charset="UTF-8">
-
-				        <div class="col-sm-4">
-				            <div class="input-group">
-								<input type="text" value="{{Request::get('keyword')}}"	placeholder="请输入关键词" name="keyword"class="input-sm form-control"> 
-								<span class="input-group-btn">
-									<button type="submit" class="btn btn-sm btn-primary">搜索</button>
-								</span>
-    						</div>
-				        </div>
+							<div class="col-sm-2">
+								<select id="data_parent_id" class="form-control" onchange="getLevelSecondCategory()">
+									<option value="0">全部</option>
+									@if(isset($cat))
+										@foreach($cat as $key=>$val)
+											<option value="{{$val->id}}" >{{$val->name}}</option>
+										@endforeach
+									@endif
+								</select>
+							</div>
+							<div class="col-sm-2" id="app">
+								<select name="cat_id" id="data_cat_id" class="form-control"  required="" aria-required="true">
+									<option v-for="item in list.data" :value="item.id">@{{ item.name }}</option>
+								</select>
+							</div>
+							<div class="col-sm-2">
+								<div class="input-group">
+									<input type="text" value="{{Request::get('keyword')}}"	placeholder="请输入关键词" name="keyword"class="input-sm form-control">
+									<span class="input-group-btn">
+										<button type="submit" class="btn btn-sm btn-primary">搜索</button>
+									</span>
+								</div>
+							</div>
 				        </form>
 						@if(role('Album/Product/Price/create'))
     					<div class="col-sm-3 pull-right">
@@ -37,10 +51,12 @@
     						<tr>
 								
             <th class="sorting" data-sort="id"> ID </th>
-            <th class="sorting" data-sort="product_name"> 商品名 </th>
-            <th class="sorting" data-sort="product_pic"> 商品图片 </th>
+            <th> 商品名 </th>
+            <th> 商品分类 </th>
+            <th> 商品图片 </th>
             <th class="sorting" data-sort="product_id"> 商品ID </th>
             <th class="sorting" data-sort="mobile"> 经销商电话 </th>
+            <th> 厂家价 </th>
             <th class="sorting" data-sort="price"> 价格 </th>
         						{{--<th width="22%">相关操作</th>--}}
         					</tr>
@@ -51,9 +67,11 @@
 								
             <td>{{ $item->id }}</td>
             <td>{{ $item->product_name }}</td>
+            <td>{{ $item->cat }}</td>
             <td><img src="{{ $item->product_pic }}" width="50"/></td>
             <td>{{ $item->product_id }}</td>
             <td>{{ $item->mobile }}</td>
+            <td>{{ $item->product_ma_price_comment }}</td>
             <td>{{ $item->price }}</td>
 								{{--<td>
 									<div class="btn-group">
@@ -102,4 +120,55 @@
 		</div>
 	</div>
 </div>
+<script src="/base/js/vue.js"></script>
+<link href="/base/css/plugins/toastr/toastr.min.css" rel="stylesheet">
+<script src="/base/js/plugins/toastr/toastr.min.js"></script>
+<script>
+    toastr.options.positionClass = 'toast-bottom-center';
+    toastr.options.timeOut = '4000';
+
+    var level = new Vue({
+        el:"#app",
+        data:{
+            list:{
+                data:[
+                    {'id':0,'name':'请先选择一级类目'},
+                ],
+            },
+            //      num:0
+        },
+        methods:{
+            changeData:function (e) {
+                Vue.set(this.list,'data',e)
+            }
+        }
+    });
+
+    function getLevelSecondCategory(){
+        var first = $('#data_parent_id').val();
+        if (first == 0) {
+            level.changeData([{'id':-1,'name':'全部'}]);
+            return;
+		}
+        $.ajax({
+            url: "{{ U('Album/Product/getSecondCategory') }}",
+            method: 'POST',
+            data: {
+                'cat_id':first,
+                '_token':"{{ csrf_token() }}"
+            },
+            dataType:'json',
+
+            success: function(data) {
+                if (data.code == 0) {
+                    level.changeData(data.data);
+                } else {
+                    toastr.error(data.message);
+                }
+            }
+        });
+    }
+    getLevelSecondCategory();
+
+</script>
 @endsection

+ 7 - 1
resources/views/admin/album/review/index.blade.php

xqd
@@ -31,7 +31,13 @@
                                     <tr>
 
                                         <td>{{ $item->id }}</td>
-                                        <td><span style="cursor: pointer" onclick="layer.open({type: 2,area: ['80%', '90%'],title:'图片',content: '{{ U('Album/Review/picture',['id'=>$item->id])}}'});" class="label label-default">查看图片</span></td>
+                                        <td>
+                                            @if(role('Album/Review/picture'))
+                                            <span style="cursor: pointer" onclick="layer.open({type: 2,area: ['80%', '90%'],title:'图片',content: '{{ U('Album/Review/picture',['id'=>$item->id])}}'});" class="label label-default">查看图片</span>
+                                            @else
+                                                <span style="cursor: pointer">暂无权限</span>
+                                            @endif
+                                        </td>
                                         <td>
                                             客户:{{ $item->order->customer_name }}<br/>
                                             订单号:{{ $item->order->sno }}<br/>

+ 32 - 32
resources/views/admin/album/user/index.blade.php

xqd xqd xqd
@@ -18,7 +18,7 @@
 
                                 <div class="col-sm-4">
                                     <div class="input-group">
-                                        <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入关键词"
+                                        <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入昵称/openid/电话"
                                                name="keyword" class="input-sm form-control">
                                         <span class="input-group-btn">
 									<button type="submit" class="btn btn-sm btn-primary">搜索</button>
@@ -33,7 +33,7 @@
                             <tr>
 
                                 <th class="sorting" data-sort="id">ID</th>
-                                <th class="sorting" data-sort="username"> 名称</th>
+                                <th class="sorting" data-sort="username"> 微信昵称 </th>
                                 <th class="sorting" data-sort="avatar"> 用户头像</th>
                                 <th class="sorting" data-sort="phone"> 电话</th>
                                 <th class="sorting" data-sort="is_dealer"> 用户类型</th>
@@ -49,47 +49,47 @@
 
                                         <td>{{ $item->id }}</td>
                                         <td>{{ $item->username }}</td>
-                                        <td><img src="{{ $item->avatar }}"/></td>
+                                        <td><img src="{{ $item->avatar }}" width="50px"/></td>
                                         <td>{{ $item->phone }}</td>
                                         @if($item['is_dealer'] == 1&&$item['model']==1)
                                             <td>画册经销商</td>
                                         @else
-                                            <td>{{ $item['model']==1?'画册':'家具' }}普通用户</td>
+                                            <td>普通用户</td>
                                         @endif
                                         <td>{{ $item->created_at }}</td>
                                         <td>{{ $item->role() }}</td>
                                         <td>
-                                            @if(!$item->is_dealer && $item['model']==1)
-                                                <button onclick="window.location.href='{{ U('Album/User/update',['id'=>$item->id]) }}'"
-                                                        class="btn btn-warning">添加经销商
-                                                </button>
-                                            @endif
-                                            @if($item->role !== 0)
-                                                <button onclick="window.location.href='{{ U('Album/User/role',['id'=>$item->id,'role'=>0]) }}'"
-                                                        class="btn btn-default">设为普通用户
-                                                </button>
+                                            @if(role('Album/User/update'))
+                                                @if($item->is_dealer != 1)
+                                                    <button onclick="window.location.href='{{ U('Album/User/update',['id'=>$item->id]) }}'"
+                                                            class="btn btn-warning">设为经销商
+                                                    </button>
+                                                @endif
                                             @endif
+                                            @if(role('Album/User/role'))
+                                                    @if($item->role !== 0)
+                                                        <button onclick="window.location.href='{{ U('Album/User/role',['id'=>$item->id,'role'=>0]) }}'"
+                                                                class="btn btn-default">设为普通用户
+                                                        </button>
+                                                    @endif
 
-                                            @if($item->role !== 1)
-                                                <button onclick="window.location.href='{{ U('Album/User/role',['id'=>$item->id,'role'=>1]) }}'"
-                                                        class="btn btn-primary">设为生产部
-                                                </button>
-                                            @endif
-                                            @if($item->role !== 2)
-                                                <button onclick="window.location.href='{{ U('Album/User/role',['id'=>$item->id,'role'=>2]) }}'"
-                                                        class="btn btn-info">设为包装部
-                                                </button>
-                                            @endif
-                                            @if($item->role !== 3)
-                                                <button onclick="window.location.href='{{ U('Album/User/role',['id'=>$item->id,'role'=>3]) }}'"
-                                                        class="btn btn-success">设为经理
-                                                </button>
-                                            @endif
-                                            @if($item->role !== 3)
-                                                <button onclick="window.location.href='{{ U('Album/User/role',['id'=>$item->id,'role'=>4]) }}'"
-                                                        class="btn btn-waring">设为Boss
-                                                </button>
+                                                    @if($item->role !== 1)
+                                                        <button onclick="window.location.href='{{ U('Album/User/role',['id'=>$item->id,'role'=>1]) }}'"
+                                                                class="btn btn-primary">设为生产部
+                                                        </button>
+                                                    @endif
+                                                    @if($item->role !== 2)
+                                                        <button onclick="window.location.href='{{ U('Album/User/role',['id'=>$item->id,'role'=>2]) }}'"
+                                                                class="btn btn-info">设为包装部
+                                                        </button>
+                                                    @endif
+                                                    @if($item->role !== 3)
+                                                        <button onclick="window.location.href='{{ U('Album/User/role',['id'=>$item->id,'role'=>3]) }}'"
+                                                                class="btn btn-success">设为经理
+                                                        </button>
+                                                    @endif
                                             @endif
+
                                         </td>
                                     </tr>
                                 @endforeach

+ 6 - 6
resources/views/admin/auth/albumlogin.blade.php

xqd xqd
@@ -6,10 +6,10 @@
     <meta name="renderer" content="webkit">
     <title>管理后台</title>
     <meta name="keywords" content="管理后台">
-    <link href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/css/bootstrap.min.css" rel="stylesheet">
-    <link href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/css/font-awesome.min.css"  rel="stylesheet">
-    <link href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/css/animate.min.css" rel="stylesheet">
-    <link href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/css/style.min.css"  rel="stylesheet">
+    <link href="/base/css/bootstrap.min.css" rel="stylesheet">
+    <link href="/base/css/font-awesome.min.css"  rel="stylesheet">
+    <link href="/base/css/animate.min.css" rel="stylesheet">
+    <link href="/base/css/style.min.css"  rel="stylesheet">
 </head>
 
 <body class="gray-bg">
@@ -37,8 +37,8 @@
     </div>
 
 <!-- 全局js -->
-<script src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/jquery-2.1.1.min.js" ></script>
-<script src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/bootstrap.min.js?v=3.4.0" ></script>
+<script src="/base/js/jquery-2.1.1.min.js" ></script>
+<script src="/base/js/bootstrap.min.js?v=3.4.0" ></script>
 
 
 <!--统计代码,可删除-->

+ 9 - 9
resources/views/admin/auth/login.blade.php

xqd xqd
@@ -6,23 +6,23 @@
     <meta name="renderer" content="webkit">
     <title>管理后台</title>
     <meta name="keywords" content="管理后台">
-    <link href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/css/bootstrap.min.css" rel="stylesheet">
-    <link href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/css/font-awesome.min.css"  rel="stylesheet">
-    <link href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/css/animate.min.css" rel="stylesheet">
-    <link href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/css/style.min.css"  rel="stylesheet">
+    <link href="/base/css/bootstrap.min.css" rel="stylesheet">
+    <link href="/base/css/font-awesome.min.css"  rel="stylesheet">
+    <link href="/base/css/animate.min.css" rel="stylesheet">
+    <link href="/base/css/style.min.css"  rel="stylesheet">
 </head>
 
 <body class="gray-bg">
 
     <div class="middle-box text-center loginscreen  animated fadeInDown">
-        <div>
+        <div style="margin-top: 45%">
             <div>
                 <div>
-                    <h1 class="logo-name">A+</h1>
+                    <h1 class="logo-name" style="letter-spacing: 5px !important;font-size: 62px;">在线画册</h1>
                 </div>
                 <h3>管理后台</h3>
             </div>
-            <form class="m-t" role="form" accept-charset="UTF-8" method="post" action="?route=Admin/Auth/Login/login">
+            <form class="m-t" role="form" accept-charset="UTF-8" method="post">
                 {{ csrf_field() }}
                 <div class="form-group">
                     <input name="name" class="form-control" placeholder="用户名" required="">
@@ -40,8 +40,8 @@
     </div>
 
 <!-- 全局js -->
-<script src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/jquery-2.1.1.min.js" ></script>
-<script src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/bootstrap.min.js?v=3.4.0" ></script>
+<script src="/base/js/jquery-2.1.1.min.js" ></script>
+<script src="/base/js/bootstrap.min.js?v=3.4.0" ></script>
 
 
 <!--统计代码,可删除-->

+ 1 - 1
resources/views/admin/base/actionlog/index.blade.php

xqd
@@ -7,7 +7,7 @@
 .footable-row-detail-inner{width: 100%;}
 </style>
 
-<link href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/css/plugins/footable/footable.core.css" rel="stylesheet">
+<link href="/base/css/plugins/footable/footable.core.css" rel="stylesheet">
 @endsection
 
 @section('content')

+ 7 - 7
resources/views/admin/base/index/welcome.blade.php

xqd
@@ -542,13 +542,13 @@
             tooltip: {
                 trigger: 'item'
             },
-         /* tooltip : {
-                trigger: 'item',
-                formatter: function(data){
-                    //console.log(data)
-                    return data.name+': '+data.value[2];
-                }
-            },*/
+            /* tooltip : {
+                   trigger: 'item',
+                   formatter: function(data){
+                       //console.log(data)
+                       return data.name+': '+data.value[2];
+                   }
+               },*/
             grid: {
                 right: 40,
                 top: 100,

+ 1 - 1
resources/views/admin/base/menus/index.blade.php

xqd
@@ -18,7 +18,7 @@
 						<div class="col-sm-4">
 							<form method="GET" action="" accept-charset="UTF-8">
 								<div class="input-group">
-									<input type="text" value="{{Request::get('keyword')}}" placeholder="请输入关键词" name="keyword" class="input-sm form-control"> <span class="input-group-btn">
+									<input type="text" value="{{Request::get('keyword')}}" placeholder="请输入关键词(名称,路径,备注)" name="keyword" class="input-sm form-control"> <span class="input-group-btn">
 										<button type="submit" class="btn btn-sm btn-primary">搜索</button>
 									</span>
 								</div>

+ 6 - 6
resources/views/admin/base/resources/manage.blade.php

xqd xqd
@@ -2,8 +2,8 @@
 
 @section('content')
 
-<link href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/swfupload/swfupload.css?v={{config("sys.version")}}" rel="stylesheet">
-<script type="text/javascript" src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/zclip/jquery.zclip.min.js?v={{config("sys.version")}}" ></script>
+<link href="/base/js/swfupload/swfupload.css?v={{config("sys.version")}}" rel="stylesheet">
+<script type="text/javascript" src="/base/js/zclip/jquery.zclip.min.js?v={{config("sys.version")}}" ></script>
 <style type="text/css">
 i,em{font-style:normal;}
 .upload_object {width:80px;}
@@ -158,10 +158,10 @@ i,em{font-style:normal;}
 </div>
 
 
-<script type="text/javascript" src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/swfupload/swfupload.js?v={{config("sys.version")}}" ></script>
-<script type="text/javascript" src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/swfupload/swfupload.queue.js?v={{config("sys.version")}}" ></script>
-<script type="text/javascript" src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/swfupload/fileprogress.js?v={{config("sys.version")}}" ></script>
-<script type="text/javascript" src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/swfupload/handlers.js?v={{config("sys.version")}}" ></script>
+<script type="text/javascript" src="/base/js/swfupload/swfupload.js?v={{config("sys.version")}}" ></script>
+<script type="text/javascript" src="/base/js/swfupload/swfupload.queue.js?v={{config("sys.version")}}" ></script>
+<script type="text/javascript" src="/base/js/swfupload/fileprogress.js?v={{config("sys.version")}}" ></script>
+<script type="text/javascript" src="/base/js/swfupload/handlers.js?v={{config("sys.version")}}" ></script>
 <script type="text/javascript">
 	var loadlayer;
 	var swfu = '';

+ 3 - 3
resources/views/admin/base/role/auth.blade.php

xqd
@@ -140,7 +140,7 @@
 @endsection
 @section('footer')
 	 <!-- ztree -->
-    <link rel="stylesheet" href="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/zTree_v3/css/zTreeStyle/zTreeStyle.css" type="text/css">
-    <script type="text/javascript" src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/zTree_v3/js/jquery.ztree.core-3.5.js?v={{config("sys.version")}}" ></script>
-    <script type="text/javascript" src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/zTree_v3/js/jquery.ztree.excheck-3.5.js?v={{config("sys.version")}}" ></script>
+    <link rel="stylesheet" href="/base/js/zTree_v3/css/zTreeStyle/zTreeStyle.css" type="text/css">
+    <script type="text/javascript" src="/base/js/zTree_v3/js/jquery.ztree.core-3.5.js?v={{config("sys.version")}}" ></script>
+    <script type="text/javascript" src="/base/js/zTree_v3/js/jquery.ztree.excheck-3.5.js?v={{config("sys.version")}}" ></script>
 @endsection

+ 5 - 5
resources/views/admin/base/tool/alimanage.blade.php

xqd xqd
@@ -2,7 +2,7 @@
 
 @section('content')
 
-<script type="text/javascript" src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/zclip/jquery.zclip.min.js?v={{config("sys.version")}}" ></script>
+<script type="text/javascript" src="/base/js/zclip/jquery.zclip.min.js?v={{config("sys.version")}}" ></script>
 <style type="text/css">
 #new-upload-btn { display:none; }
 #new-upload-btn .notice{position: relative; left: 8px; top: -9px; color: #1a7bb9;}
@@ -113,10 +113,10 @@
     </div>
 </div>
 
-<script type="text/javascript" src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/swfupload/swfupload.js?v={{config("sys.version")}}" ></script>
-<script type="text/javascript" src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/swfupload/swfupload.queue.js?v={{config("sys.version")}}" ></script>
-<script type="text/javascript" src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/swfupload/fileprogress.js?v={{config("sys.version")}}" ></script>
-<script type="text/javascript" src="{{ session()->get('is_we7')=='true'?'/addons/furniture/public':'' }}/base/js/swfupload/handlers.js?v={{config("sys.version")}}" ></script>
+<script type="text/javascript" src="/base/js/swfupload/swfupload.js?v={{config("sys.version")}}" ></script>
+<script type="text/javascript" src="/base/js/swfupload/swfupload.queue.js?v={{config("sys.version")}}" ></script>
+<script type="text/javascript" src="/base/js/swfupload/fileprogress.js?v={{config("sys.version")}}" ></script>
+<script type="text/javascript" src="/base/js/swfupload/handlers.js?v={{config("sys.version")}}" ></script>
 <script type="text/javascript">
 var loadlayer;
 var swfu = '';

+ 1 - 1
resources/views/admin/base/user/edit.blade.php

xqd
@@ -63,7 +63,7 @@
                                     </div>
 
                                     <div class="col-sm-3">
-                                        <button type="button" class="btn btn-w-m btn-primary" data-toggle="modal" data-target="#myModal5" @if(!empty($data['mobile'])) disabled="disabled" @endif>选择</button>
+                                        <button type="button" class="btn btn-w-m btn-primary" data-toggle="modal" data-target="#myModal5" onclick="SearchStore()" @if(!empty($data['mobile'])) disabled="disabled" @endif>选择</button>
                                     </div>
                                 </div>
                                 <div class="form-group">

+ 12 - 10
resources/views/admin/furniture/goods/category/edit.blade.php

xqd xqd
@@ -71,17 +71,7 @@
                                         </div>
 
                                     </div>
-                                    <div class="form-group">
-
-                                        <label class="control-label col-sm-3">排序,越大越靠前</label>
-
-                                        <div class="col-sm-9">
-                                            <input id="data_sort" name="data[sort]" class="form-control"
-                                                   value="{{ $data['sort'] or ''}}" required="" aria-required="true"
-                                                   placeholder="">
-                                        </div>
 
-                                    </div>
                                     <div class="form-group">
 
                                         <label class="control-label col-sm-3">状态</label>
@@ -99,6 +89,18 @@
 
                                     </div>
 
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">排序</label>
+
+                                        <div class="col-sm-9">
+                                            <input id="data_sort" name="data[sort]" class="form-control"
+                                                   value="{{ $data['sort'] or ''}}" required="" aria-required="true"
+                                                   placeholder="数值越大越靠前">
+                                        </div>
+
+                                    </div>
+
                                     <div class="form-group">
                                         <label class="control-label col-sm-3">&nbsp;</label>
                                         <div class="col-sm-9">

+ 7 - 23
resources/views/admin/furniture/goods/category/index.blade.php

xqd
@@ -59,29 +59,13 @@
                                         <td>{{ $item->created_at }}</td>
                                         <td>{{ $item->updated_at }}</td>
                                         <td>
-                                            <div class="btn-group">
-                                                <button data-toggle="dropdown"
-                                                        class="btn btn-warning btn-sm dropdown-toggle"
-                                                        aria-expanded="false">
-                                                    操作 <span class="caret"></span>
-                                                </button>
-                                                <ul class="dropdown-menu">
-
-
-                                                    @if(role('Furniture/Goods/Category/update'))
-                                                        <li>
-                                                            <a href="{{ U('Furniture/Goods/Category/update',['id'=>$item->id])}}"
-                                                               class="font-bold">修改</a></li>
-                                                    @endif
-
-                                                    @if(role('Furniture/Goods/Category/destroy'))
-                                                        <li class="divider"></li>
-                                                        <li>
-                                                            <a href="{{ U('Furniture/Goods/Category/destroy',['id'=>$item->id])}}"
-                                                               onclick="return confirm('你确定执行删除操作?');">删除</a></li>
-                                                    @endif
-
-                                                </ul>
+                                            <div class="pull-left">
+                                                @if(role('Furniture/Goods/Category/update'))
+                                                    <a href="{{ U('Furniture/Goods/Category/update',['id'=>$item->id])}}" class="btn btn-sm btn-warning pull-right">修改</a>
+                                                @endif
+                                                @if(role('Furniture/Goods/Category/destroy'))
+                                                    <a href="{{ U('Furniture/Goods/Category/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');" class="btn btn-sm btn-danger pull-right">删除</a>
+                                                @endif
                                             </div>
                                             @if(role('Furniture/Goods/Category/view'))
                                                 <button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Furniture/Goods/Category/view',['id'=>$item->id])}}'});"

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio