Bladeren bron

更新后台代码

liaofei 6 jaren geleden
bovenliggende
commit
24c45cd79e
76 gewijzigde bestanden met toevoegingen van 1456 en 511 verwijderingen
  1. 15 0
      application/admin/common.php
  2. 5 5
      application/admin/controller/Index.php
  3. 1 1
      application/admin/controller/agent/AgentManage.php
  4. 1 1
      application/admin/controller/article/Article.php
  5. 4 2
      application/admin/controller/finance/UserRecharge.php
  6. 2 2
      application/admin/controller/order/StoreOrder.php
  7. 11 37
      application/admin/controller/setting/SystemGroupData.php
  8. 12 2
      application/admin/controller/store/StoreProduct.php
  9. 26 0
      application/admin/controller/store/StoreProductReply.php
  10. 0 3
      application/admin/controller/system/SystemAttachment.php
  11. 6 2
      application/admin/controller/system/SystemCleardata.php
  12. 1 1
      application/admin/controller/system/SystemDatabackup.php
  13. 5 5
      application/admin/controller/ump/StoreCoupon.php
  14. 3 0
      application/admin/controller/ump/UserPoint.php
  15. 1 1
      application/admin/controller/wechat/Menus.php
  16. 1 0
      application/admin/controller/wechat/Reply.php
  17. 2 2
      application/admin/controller/wechat/WechatNewsCategory.php
  18. 1 1
      application/admin/controller/wechat/WechatTemplate.php
  19. 21 8
      application/admin/controller/wechat/WechatUser.php
  20. 6 7
      application/admin/model/article/Article.php
  21. 1 1
      application/admin/model/finance/FinanceModel.php
  22. 101 95
      application/admin/model/order/StoreOrder.php
  23. 1 1
      application/admin/model/record/StoreStatistics.php
  24. 1 1
      application/admin/model/routine/RoutineFormId.php
  25. 3 1
      application/admin/model/store/StoreCategory.php
  26. 8 0
      application/admin/model/store/StoreProductAttrValue.php
  27. 45 0
      application/admin/model/store/StoreProductReply.php
  28. 1 1
      application/admin/model/system/Express.php
  29. 1 1
      application/admin/model/system/SystemConfig.php
  30. 3 29
      application/admin/model/system/SystemGroupData.php
  31. 2 2
      application/admin/model/ump/StoreCouponIssue.php
  32. 8 1
      application/admin/model/user/User.php
  33. 1 1
      application/admin/model/user/UserExtract.php
  34. 10 3
      application/admin/model/user/UserRecharge.php
  35. 1 1
      application/admin/model/wechat/WechatQrcode.php
  36. 2 2
      application/admin/model/wechat/WechatReply.php
  37. 3 3
      application/admin/model/wechat/WechatUser.php
  38. 4 0
      application/admin/view/agent/agent_manage/index.php
  39. 1 1
      application/admin/view/finance/finance/bill.php
  40. 2 2
      application/admin/view/finance/finance/content_info.php
  41. 4 2
      application/admin/view/index/index.php
  42. 16 15
      application/admin/view/order/store_order/index.php
  43. 1 2
      application/admin/view/public/container.php
  44. 6 13
      application/admin/view/public/form-builder.php
  45. 0 1
      application/admin/view/public/frame_head.php
  46. 1 1
      application/admin/view/public/head.php
  47. 54 21
      application/admin/view/record/record/chart_bargain.php
  48. 48 4
      application/admin/view/record/record/chart_cash.php
  49. 48 0
      application/admin/view/record/record/chart_combination.php
  50. 14 0
      application/admin/view/record/record/chart_coupon.php
  51. 52 2
      application/admin/view/record/record/chart_order.php
  52. 48 4
      application/admin/view/record/record/chart_product.php
  53. 52 4
      application/admin/view/record/record/chart_rebate.php
  54. 48 4
      application/admin/view/record/record/chart_recharge.php
  55. 14 0
      application/admin/view/record/record/chart_score.php
  56. 48 0
      application/admin/view/record/record/chart_seckill.php
  57. 15 0
      application/admin/view/record/record/product_info.php
  58. 48 4
      application/admin/view/record/record/user_attr.php
  59. 48 0
      application/admin/view/record/record/user_business_chart.php
  60. 74 0
      application/admin/view/record/record/user_chart.php
  61. 48 0
      application/admin/view/record/record/user_distribution_chart.php
  62. 1 0
      application/admin/view/setting/system_group/create.php
  63. 17 0
      application/admin/view/setting/system_role/index.php
  64. 1 1
      application/admin/view/store/store_product/attr.php
  65. 2 2
      application/admin/view/store/store_product/statistics.php
  66. 279 122
      application/admin/view/store/store_product_reply/index.php
  67. 1 3
      application/admin/view/system/system_file/openfile.php
  68. 7 15
      application/admin/view/system/system_upgradeclient/index.php
  69. 1 1
      application/admin/view/ump/store_coupon/grant.php
  70. 13 12
      application/admin/view/user/user/index.php
  71. 8 2
      application/admin/view/wechat/menus/index.php
  72. 3 1
      application/admin/view/wechat/wechat_news_category/append.php
  73. 1 21
      application/admin/view/wechat/wechat_news_category/create.php
  74. 1 20
      application/admin/view/wechat/wechat_news_category/edit.php
  75. 110 1
      application/admin/view/wechat/wechat_news_category/index.php
  76. 1 7
      application/admin/view/widget/icon.php

+ 15 - 0
application/admin/common.php

@@ -102,3 +102,18 @@ function clearfile($path,$ext = '*.log')
     }
     return true;
 }
+/**获取当前类方法
+ * @param $class
+ * @return array
+ */
+function get_this_class_methods($class,$array4 = []) {
+    $array1 = get_class_methods($class);
+    if ($parent_class = get_parent_class($class)) {
+        $array2 = get_class_methods($parent_class);
+        $array3 = array_diff($array1, $array2);//去除父级的
+    } else {
+        $array3 = $array1;
+    }
+    $array5 = array_diff($array3, $array4);//去除无用的
+    return $array5;
+}

+ 5 - 5
application/admin/controller/Index.php

@@ -62,8 +62,8 @@ class Index extends AuthController
         $topData['treatedExtract'] = UserExtractModel::where('status',0)->count();
 
 
-        //订单数->日
-        $now_day_order_p = StoreOrderModel::where('paid',1)->where('pay_time','gt',$now_day)->count();
+        //订单数->
+        $now_day_order_p = StoreOrderModel::where('paid',1)->whereTime('pay_time','yesterday')->count();
         $pre_day_order_p = StoreOrderModel::where('paid',1)->where('pay_time','gt',$pre_day)->where('pay_time','lt',$now_day)->count();
         $first_line['d_num'] = [
             'data' => $now_day_order_p ? $now_day_order_p : 0,
@@ -72,8 +72,8 @@ class Index extends AuthController
         ];
 
         //交易额->昨天
-        $now_month_order_p = StoreOrderModel::where('paid',1)->where('pay_time','gt',$pre_day)->value('sum(pay_price)');
-        $pre_month_order_p = StoreOrderModel::where('paid',1)->where('pay_time','gt',$beforyester_day)->where('pay_time','lt',$pre_day)->value('sum(pay_price)');
+        $now_month_order_p = StoreOrderModel::where('paid',1)->whereTime('pay_time','yesterday')->sum('pay_price');
+        $pre_month_order_p = StoreOrderModel::where('paid',1)->where('pay_time','gt',$beforyester_day)->where('pay_time','lt',$pre_day)->sum('pay_price');
         $first_line['d_price'] = [
             'data' => $now_month_order_p > 0 ? $now_month_order_p : 0,
             'percent' => abs($now_month_order_p - $pre_month_order_p),
@@ -81,7 +81,7 @@ class Index extends AuthController
         ];
 
         //交易额->月
-        $now_month_order_p = StoreOrderModel::where('paid',1)->where('pay_time','gt',$now_month)->value('sum(pay_price)');
+        $now_month_order_p = StoreOrderModel::where('paid',1)->whereTime('pay_time','month')->sum('pay_price');
         $pre_month_order_p = StoreOrderModel::where('paid',1)->where('pay_time','gt',$pre_month)->where('pay_time','lt',$now_month)->value('sum(pay_price)');
         $first_line['m_price'] = [
             'data' => $now_month_order_p > 0 ? $now_month_order_p : 0,

+ 1 - 1
application/admin/controller/agent/AgentManage.php

@@ -7,7 +7,7 @@ use app\admin\model\order\StoreOrder;
 use app\admin\model\user\User;
 use app\admin\model\wechat\WechatUser as UserModel;
 use app\admin\library\FormBuilder;
-use app\wap\model\user\UserBill;
+use app\core\model\user\UserBill;
 use service\UtilService as Util;
 
 /**

+ 1 - 1
application/admin/controller/article/Article.php

@@ -159,7 +159,7 @@ class Article extends AuthController
             if($res)
                 return Json::successful('修改图文成功!',$id);
             else
-                return Json::fail('修改图文失败!',$id);
+                return Json::fail('修改图文失败,您并没有修改什么!',$id);
         }else{
             $data['add_time'] = time();
             $data['admin_id'] = $this->adminId;

+ 4 - 2
application/admin/controller/finance/UserRecharge.php

@@ -2,7 +2,7 @@
 namespace app\admin\controller\finance;
 use app\admin\controller\AuthController;
 use app\admin\model\user\UserRecharge as UserRechargeModel;
-use app\wap\model\user\UserBill;
+use app\core\model\user\UserBill;
 use service\UtilService as Util;
 use service\JsonService as Json;
 use think\Url;
@@ -10,7 +10,7 @@ use service\FormBuilder as Form;
 use think\Request;
 use service\HookService;
 use behavior\wechat\PaymentBehavior;
-use service\WechatTemplateService;
+use app\core\util\WechatTemplateService;
 use app\wap\model\user\WechatUser as WechatUserWap;
 /**
  * 微信充值记录
@@ -69,6 +69,8 @@ class UserRecharge extends AuthController
         if($bj < 0) return Json::fail('退款金额大于支付金额,请修改退款金额');
         $refund_data['pay_price'] = $UserRecharge['price'];
         $refund_data['refund_price'] = $refund_price;
+//        $refund_data['refund_account']='REFUND_SOURCE_RECHARGE_FUNDS';
+
         try{
             HookService::listen('user_recharge_refund',$UserRecharge['order_id'],$refund_data,true,PaymentBehavior::class);
         }catch(\Exception $e){

+ 2 - 2
application/admin/controller/order/StoreOrder.php

@@ -20,7 +20,7 @@ use EasyWeChat\Core\Exception;
 use service\CacheService;
 use service\HookService;
 use service\JsonService;
-use service\SystemConfigService;
+use app\core\util\SystemConfigService;
 use service\UtilService as Util;
 use service\JsonService as Json;
 use think\Db;
@@ -39,7 +39,6 @@ class StoreOrder extends AuthController
      */
     public function index()
     {
-        $config = SystemConfigService::more(['pay_routine_appid','pay_routine_appsecret','pay_routine_mchid','pay_routine_key','pay_routine_client_cert','pay_routine_client_key']);
         $this->assign([
             'year'=>getMonth('y'),
             'real_name'=>$this->request->get('real_name',''),
@@ -376,6 +375,7 @@ class StoreOrder extends AuthController
             if($data['type'] == 1)  StorePink::setRefundPink($id);
             HookService::afterListen('store_product_order_refund_y',$data,$id,false,OrderBehavior::class);
             StoreOrderStatus::setStatus($id,'refund_price','退款给用户'.$refund_price.'元');
+            ModelBasic::commitTrans();
             return Json::successful('修改成功!');
         }else{
             StoreOrderStatus::setStatus($id,'refund_price','退款给用户'.$refund_price.'元失败');

+ 11 - 37
application/admin/controller/setting/SystemGroupData.php

@@ -53,13 +53,14 @@ class SystemGroupData extends AuthController
                 if(is_array($params) && !empty($params)){
                     foreach ($params as $index => $v) {
                         $vl = explode('=>',$v);
-                        if(isset($vl[0]) && isset($vl[1]) && count($vl)){
+                        if(isset($vl[0]) && isset($vl[1])){
                             $info[$index]["value"] = $vl[0];
                             $info[$index]["label"] = $vl[1];
                         }
                     }
                 }
             }
+
             switch ($value["type"]){
                 case 'input':
                     $f[] = Form::input($value["title"],$value["name"]);
@@ -108,23 +109,17 @@ class SystemGroupData extends AuthController
         foreach ($params as $key => $param) {
             foreach ($Fields['fields'] as $index => $field) {
                 if($key == $field["title"]){
-                  if($field['type'] == 'radio'){
-                      $radioParam = explode("\n",$field["param"]);
-                      if(is_array($radioParam) && !empty($radioParam)){
-                          foreach ($radioParam as $radioIndex => &$radioItem) {
-                              $radioItemCut = explode('=>',$radioItem);
-                              if(isset($radioItemCut[0]) && isset($radioItemCut[1]) && $radioItemCut[0] == $param) $param = $radioItemCut[1];
-                          }
-                      }
-                  }
-                  if($param == "") return Json::fail($field["name"]."不能为空!");
-                  else{
-                    $value[$key]["type"] = $field["type"];
-                    $value[$key]["value"] = $param;
-                  }
+//                    if($param == "" || count($param) == 0)
+                    if($param == "")
+                        return Json::fail($field["name"]."不能为空!");
+                    else{
+                        $value[$key]["type"] = $field["type"];
+                        $value[$key]["value"] = $param;
+                    }
                 }
             }
         }
+
         $data = array("gid"=>$gid,"add_time"=>time(),"value"=>json_encode($value),"sort"=>$params["sort"],"status"=>$params["status"]);
         GroupDataModel::set($data);
         return Json::successful('添加数据成功!');
@@ -168,19 +163,7 @@ class SystemGroupData extends AuthController
                     }
                 }
             }
-            if(isset($value['type']) && $value['type'] == 'radio'){
-                if(count($info)){
-                    foreach ($info as $radioKey=>&$radioItem){
-                        if(is_array($radioItem) &&
-                            count($radioItem) == 2 &&
-                            isset($GroupDataValue[$value['title']]['value']) &&
-                            strlen(trim($GroupDataValue[$value['title']]['value'])) &&
-                            $radioItem['label'] === $GroupDataValue[$value['title']]['value']){
-                            $fvalue = $radioItem['value'];
-                        }
-                    }
-                }
-            }else $fvalue = isset($GroupDataValue[$value['title']]['value'])?$GroupDataValue[$value['title']]['value']:'';
+            $fvalue = isset($GroupDataValue[$value['title']]['value'])?$GroupDataValue[$value['title']]['value']:'';
             switch ($value['type']){
                 case 'input':
                     $f[] = Form::input($value['title'],$value['name'],$fvalue);
@@ -238,15 +221,6 @@ class SystemGroupData extends AuthController
         foreach ($params as $key => $param) {
             foreach ($Fields['fields'] as $index => $field) {
                 if($key == $field["title"]){
-                    if($field['type'] == 'radio'){
-                        $radioParam = explode("\n",$field["param"]);
-                        if(is_array($radioParam) && !empty($radioParam)){
-                            foreach ($radioParam as $radioIndex => &$radioItem) {
-                                $radioItemCut = explode('=>',$radioItem);
-                                if(isset($radioItemCut[0]) && isset($radioItemCut[1]) && $radioItemCut[0] == $param) $param = $radioItemCut[1];
-                            }
-                        }
-                    }
                     if(!$param)
                         return Json::fail($field["name"]."不能为空!");
                     else{

+ 12 - 2
application/admin/controller/store/StoreProduct.php

@@ -9,6 +9,7 @@ use app\admin\model\store\StoreProductAttrResult;
 use app\admin\model\store\StoreProductRelation;
 use app\admin\model\system\SystemConfig;
 use service\JsonService;
+use think\Db;
 use traits\CurdControllerTrait;
 use service\UtilService as Util;
 use service\JsonService as Json;
@@ -218,6 +219,7 @@ class StoreProduct extends AuthController
             ['is_postage',0],
         ],$request);
         if(count($data['cate_id']) < 1) return Json::fail('请选择产品分类');
+        $cate_id=$data['cate_id'];
         $data['cate_id'] = implode(',',$data['cate_id']);
         if(!$data['store_name']) return Json::fail('请输入产品名称');
         if(count($data['image'])<1) return Json::fail('请上传产品图片');
@@ -229,7 +231,10 @@ class StoreProduct extends AuthController
         $data['slider_image'] = json_encode($data['slider_image']);
         $data['add_time'] = time();
         $data['description'] = '';
-        ProductModel::set($data);
+        $res=ProductModel::set($data);
+        foreach ($cate_id as $cid){
+            Db::name('store_product_cate')->insert(['product_id'=>$res['id'],'cate_id'=>$cid,'add_time'=>time()]);
+        }
         return Json::successful('添加产品成功!');
     }
 
@@ -271,7 +276,7 @@ class StoreProduct extends AuthController
             Form::input('keyword','产品关键字',$product->getData('keyword'))->placeholder('多个用英文状态下的逗号隔开'),
             Form::input('unit_name','产品单位',$product->getData('unit_name')),
             Form::frameImageOne('image','产品主图片(305*305px)',Url::build('admin/widget.images/index',array('fodder'=>'image')),$product->getData('image'))->icon('image')->width('100%')->height('500px'),
-            Form::frameImages('slider_image','产品轮播图(640*640px)',Url::build('admin/widget.images/index',array('fodder'=>'slider_image')),json_decode($product->getData('slider_image'),1))->maxLength(5)->icon('images')->width('100%')->height('500px'),
+            Form::frameImages('slider_image','产品轮播图(640*640px)',Url::build('admin/widget.images/index',array('fodder'=>'slider_image')),json_decode($product->getData('slider_image'),1) ? : [])->maxLength(5)->icon('images')->width('100%')->height('500px'),
             Form::number('price','产品售价',$product->getData('price'))->min(0)->precision(2)->col(8),
             Form::number('ot_price','产品市场价',$product->getData('ot_price'))->min(0)->col(8),
             Form::number('give_integral','赠送积分',$product->getData('give_integral'))->min(0)->precision(0)->col(8),
@@ -329,6 +334,7 @@ class StoreProduct extends AuthController
             ['is_postage',0],
         ],$request);
         if(count($data['cate_id']) < 1) return Json::fail('请选择产品分类');
+        $cate_id=$data['cate_id'];
         $data['cate_id'] = implode(',',$data['cate_id']);
         if(!$data['store_name']) return Json::fail('请输入产品名称');
         if(count($data['image'])<1) return Json::fail('请上传产品图片');
@@ -340,6 +346,10 @@ class StoreProduct extends AuthController
         $data['image'] = $data['image'][0];
         $data['slider_image'] = json_encode($data['slider_image']);
         ProductModel::edit($data,$id);
+        Db::name('store_product_cate')->where('product_id',$id)->delete();
+        foreach ($cate_id as $cid){
+            Db::name('store_product_cate')->insert(['product_id'=>$id,'cate_id'=>$cid,'add_time'=>time()]);
+        }
         return Json::successful('修改成功!');
     }
 

+ 26 - 0
application/admin/controller/store/StoreProductReply.php

@@ -3,6 +3,8 @@
 namespace app\admin\controller\store;
 
 use app\admin\controller\AuthController;
+use service\JsonService;
+use service\UtilService;
 use traits\CurdControllerTrait;
 use service\UtilService as Util;
 use service\JsonService as Json;
@@ -38,10 +40,34 @@ class StoreProductReply extends AuthController
         else
             $where['product_id'] =  0;
         $this->assign('where',$where);
+        $this->assign('is_layui',true);
         $this->assign(ProductReplyModel::systemPage($where));
         return $this->fetch();
     }
 
+    public function get_product_imaes_list()
+    {
+        $where=UtilService::getMore([
+            ['page',1],
+            ['limit',10],
+            ['title',''],
+            ['is_reply',''],
+        ]);
+        return JsonService::successful(ProductReplyModel::getProductImaesList($where));
+    }
+
+    public function get_product_reply_list()
+    {
+        $where=UtilService::getMore([
+            ['limit',10],
+            ['title',''],
+            ['is_reply',''],
+            ['message_page',1],
+            ['producr_id',0],
+        ]);
+        return JsonService::successful(ProductReplyModel::getProductReplyList($where));
+    }
+
     /**
      * @param $id
      * @return \think\response\Json|void

+ 0 - 3
application/admin/controller/system/SystemAttachment.php

@@ -21,9 +21,6 @@ class SystemAttachment extends AuthController
     public function upload()
     {
         $res = Upload::image('upfile','editor/'.date('Ymd'));
-        if($res->status==false && $res->error){
-            exit(json_encode(['state'=>$res->error]));
-        }
         //产品图片上传记录
         $fileInfo = $res->fileInfo->getinfo();
         $thumbPath = Upload::thumb($res->dir);

+ 6 - 2
application/admin/controller/system/SystemCleardata.php

@@ -44,6 +44,11 @@ class SystemclearData  extends AuthController
         self::clearData('store_product_reply',1);
         self::clearData('routine_qrcode',1);
         self::clearData('routine_form_id',1);
+        self::clearData('user_sign',1);
+        self::clearData('user_task_finish',1);
+        self::clearData('user_level',1);
+        self::clearData('token',1);
+        self::clearData('user_group',1);
         $this->delDirAndFile('./public/uploads/store/comment');
         self::clearData('store_product_relation',1);
         return Json::successful('清除数据成功!');
@@ -103,8 +108,7 @@ class SystemclearData  extends AuthController
     public function uploadData(){
         self::clearData('system_attachment',1);
         self::clearData('system_attachment_category',1);
-        $this->delDirAndFile('./public/uploads/attach/');
-        $this->delDirAndFile('./public/uploads/editor/');
+        $this->delDirAndFile('./public/uploads/');
         return Json::successful('清除上传文件成功!');
     }
     //清除微信用户

+ 1 - 1
application/admin/controller/system/SystemDatabackup.php

@@ -19,7 +19,7 @@ class SystemDatabackup extends AuthController
     public function _initialize()
     {
         $config = array(
-            'path' => '.'.PUBILC_PATH.'/backup/data/',
+            'path' => '.'.PUBILC_PATH.'backup/data/',
             //数据库备份路径
             'part' => 20971520,
             //数据库备份卷大小

+ 5 - 5
application/admin/controller/ump/StoreCoupon.php

@@ -42,14 +42,14 @@ class StoreCoupon extends AuthController
     public function create()
     {
         $f = array();
-        $f[] = Form::input('title','优惠券名称')->required();
+        $f[] = Form::input('title','优惠券名称');
         $f[] = Form::number('coupon_price','优惠券面值',0)->min(0);
         $f[] = Form::number('use_min_price','优惠券最低消费')->min(0);
         $f[] = Form::number('coupon_time','优惠券有效期限')->min(0);
         $f[] = Form::number('sort','排序');
         $f[] = Form::radio('status','状态',0)->options([['label'=>'开启','value'=>1],['label'=>'关闭','value'=>0]]);
 
-        $form = Form::make_post_form('添加优惠券',$f,Url::build('save'));//->setSuccessScript('<script>formCreate.formSuccess = function(form,$r){$r.closeModal();};</script>');
+        $form = Form::make_post_form('添加优惠券',$f,Url::build('save'));
         $this->assign(compact('form'));
         return $this->fetch('public/form-builder');
     }
@@ -227,8 +227,8 @@ class StoreCoupon extends AuthController
 
     public function update_issue(Request $request,$id)
     {
-        list($_id,$rangeTime,$count,$status) = UtilService::postMore([
-            'id',['range_date',['','']],['count',0],['status',0]
+        list($_id,$rangeTime,$count,$status,$is_permanent) = UtilService::postMore([
+            'id',['range_date',['','']],['count',0],['status',0],['is_permanent',0]
         ],$request,true);
         if($_id != $id) return JsonService::fail('操作失败,信息不对称');
         if(!$count) $count = 0;
@@ -241,7 +241,7 @@ class StoreCoupon extends AuthController
         if(!$endTime) $endTime = 0;
         if(!$startTime && $endTime) return JsonService::fail('请选择正确的开始时间');
         if($startTime && !$endTime) return JsonService::fail('请选择正确的结束时间');
-        if(StoreCouponIssue::setIssue($id,$count,strtotime($startTime),strtotime($endTime),$count,$status))
+        if(StoreCouponIssue::setIssue($id,$count,strtotime($startTime),strtotime($endTime),$count,$status,$is_permanent))
             return JsonService::successful('发布优惠劵成功!');
         else
             return JsonService::fail('发布优惠劵失败!');

+ 3 - 0
application/admin/controller/ump/UserPoint.php

@@ -23,6 +23,9 @@ class UserPoint extends AuthController
     public function index()
     {
         $this->assign([
+//            'sum_point'=>UserBill::where(['category'=>'integral','type'=>'system_add'])->sum('number'),
+//            'count'=>UserBill::where(['category'=>'integral','type'=>'sign'])->group('uid')->count(),
+//            'song_point'=>UserBill::where(['category'=>'integral','type'=>'sign'])->group('uid')->sum('number'),
             'is_layui'=>true,
             'year'=>getMonth('y'),
         ]);

+ 1 - 1
application/admin/controller/wechat/Menus.php

@@ -2,7 +2,7 @@
 namespace app\admin\controller\wechat;
 
 use app\admin\controller\AuthController;
-use service\WechatService;
+use app\core\util\WechatService;
 use think\Cache;
 use think\Db;
 use think\Request;

+ 1 - 0
application/admin/controller/wechat/Reply.php

@@ -35,6 +35,7 @@ class Reply extends AuthController
                 $title = '编辑关键字回复';
                 break;
         }
+
         $replay = WechatReply::getDataByKey($key);
         $this->assign('replay_arr',json_encode($replay));
         $this->assign('key',$key);

+ 2 - 2
application/admin/controller/wechat/WechatNewsCategory.php

@@ -14,7 +14,7 @@ use service\UtilService;
 use think\Db;
 use think\Request;
 use think\Url;
-use service\WechatService;
+use app\core\util\WechatService;
 use \app\admin\model\wechat\WechatNewsCategory as WechatNewsCategoryModel;
 use app\admin\model\article\Article as ArticleModel;
 /**
@@ -235,8 +235,8 @@ class WechatNewsCategory extends AuthController
             if($v['author'] == '') return JsonService::fail('作者不能为空');
             if($v['content'] == '') return JsonService::fail('正文不能为空');
             if($v['synopsis'] == '') return JsonService::fail('摘要不能为空');
-            $v['add_time'] = time();
             $v['status'] = 1;
+            $v['add_time'] = time();
             if($v['id']){
                 $idC = $v['id'];
                 unset($v['id']);

+ 1 - 1
application/admin/controller/wechat/WechatTemplate.php

@@ -6,7 +6,7 @@ use app\admin\controller\AuthController;
 use service\FormBuilder as Form;
 use service\UtilService as Util;
 use service\JsonService as Json;
-use service\WechatTemplateService;
+use app\core\util\WechatTemplateService;
 use think\Cache;
 use think\Request;
 use think\Url;

+ 21 - 8
application/admin/controller/wechat/WechatUser.php

@@ -6,10 +6,10 @@ use app\admin\controller\AuthController;
 use service\FormBuilder as Form;
 use app\admin\model\user\User;
 use app\admin\model\wechat\WechatUser as UserModel;
-use app\wap\model\user\UserBill;
+use app\core\model\user\UserBill;
 use service\JsonService;
 use service\UtilService as Util;
-use service\WechatService;
+use app\core\util\WechatService;
 use think\Collection;
 use think\Request;
 use think\Url;
@@ -50,11 +50,18 @@ class WechatUser extends AuthController
         }
         $tagidList = array_unique($tagidList);
         $where['tagid_list'] = implode(',',$tagidList);
+        try{
+            $groupList=UserModel::getUserGroup();
+            $tagList=UserModel::getUserTag();
+        }catch (\Exception $e){
+            $groupList=[];
+            $tagList=[];
+        }
         $this->assign([
-                'where'=>$where,
-                'groupList'=>UserModel::getUserGroup(),
-                'tagList'=>UserModel::getUserTag()
-            ]);
+            'where'=>$where,
+            'groupList'=>$groupList,
+            'tagList'=>$tagList
+        ]);
         $limitTimeList = [
             'today'=>implode(' - ',[date('Y/m/d'),date('Y/m/d',strtotime('+1 day'))]),
             'week'=>implode(' - ',[
@@ -150,11 +157,14 @@ class WechatUser extends AuthController
      */
     public function tag($refresh = 0)
     {
+        $list=[];
         if($refresh == 1) {
             UserModel::clearUserTag();
             $this->redirect(Url::build('tag'));
         }
-        $list = UserModel::getUserTag();
+        try{
+            $list = UserModel::getUserTag();
+        }catch (\Exception $e){}
         $this->assign(compact('list'));
         return $this->fetch();
     }
@@ -243,11 +253,14 @@ class WechatUser extends AuthController
 
     public function group($refresh = 0)
     {
+        $list=[];
         if($refresh == 1) {
             UserModel::clearUserGroup();
             $this->redirect(Url::build('group'));
         }
-        $list = UserModel::getUserGroup();
+        try{
+            $list = UserModel::getUserGroup();
+        }catch (\Exception $e){}
         $this->assign(compact('list'));
         return $this->fetch();
     }

+ 6 - 7
application/admin/model/article/Article.php

@@ -36,14 +36,13 @@ class Article extends ModelBasic {
 //        if($where['status'] !== '') $model = $model->where('status',$where['status']);
 //        if($where['access'] !== '') $model = $model->where('access',$where['access']);
         if($where['title'] !== '') $model = $model->where('title','LIKE',"%$where[title]%");
-        if($where['cid'] !== '') {
-//            $model = $model->where("CONCAT(',',cid,',')  LIKE '%,$where[cid],%'");
+        if($where['cid'] !== '')
             $model = $model->where('cid','in',$where['cid']);
-        }
-        if($where['cid'] == ''){
-            if(!$where['merchant']) $model = $model->where('mer_id',0);
-            if($where['merchant']) $model = $model->where('mer_id','GT',0);
-        }
+        else
+            if($where['merchant'])
+                $model = $model->where('mer_id','GT',0);
+            else
+                $model = $model->where('mer_id',0);
         $model = $model->where('status',1)->where('hide',0);
         return self::page($model,function($item){
             if(!$item['mer_id']) $item['admin_name'] = '总后台管理员---》'.SystemAdmin::where('id',$item['admin_id'])->value('real_name');

+ 1 - 1
application/admin/model/finance/FinanceModel.php

@@ -10,7 +10,7 @@ namespace app\admin\model\finance;
 use traits\ModelTrait;
 use basic\ModelBasic;
 use service\ExportService;
-use app\wap\model\user\UserBill;
+use app\core\model\user\UserBill;
 use app\admin\model\user\User;
 use service\PHPExcelService;
 /*数据统计处理*/

+ 101 - 95
application/admin/model/order/StoreOrder.php

@@ -14,13 +14,12 @@ use app\admin\model\ump\StorePink;
 use app\admin\model\order\StoreOrderCartInfo;
 use app\admin\model\store\StoreProduct;
 use app\admin\model\routine\RoutineFormId;
-use app\routine\model\routine\RoutineTemplate;
+use app\core\model\routine\RoutineTemplate;
 use service\ProgramTemplateService;
 use service\PHPExcelService;
 use traits\ModelTrait;
 use basic\ModelBasic;
-use service\WechatTemplateService;
-use service\RoutineTemplateService;
+use app\core\util\WechatTemplateService;
 use think\Url;
 use think\Db;
 use app\admin\model\user\User;
@@ -371,16 +370,14 @@ HTML;
      */
     public static function refundRoutineTemplate($oid){
         $order = self::where('id',$oid)->find();
-        $formId = RoutineFormId::getFormIdOne($order['uid']);
-        $data['keyword1']['value'] =  $order['order_id'];
-        $data['keyword2']['value'] =  date('Y-m-d H:i:s',time());
-        $data['keyword3']['value'] =  $order['pay_price'];
-        if($order['pay_type'] == 'yue') $data['keyword4']['value'] =  '余额支付';
-        else if($order['pay_type'] == 'weixin') $data['keyword4']['value'] =  '微信支付';
-        else if($order['pay_type'] == 'offline') $data['keyword4']['value'] =  '线下支付';
-        $data['keyword5']['value'] = '已成功退款';
-        RoutineFormId::delFormIdOne($formId);
-        return RoutineTemplateService::sendTemplate(WechatUser::uidToRoutineOpenid($order['uid']),RoutineTemplateService::setTemplateId(RoutineTemplateService::ORDER_REFUND_SUCCESS),'',$data,$formId);
+        $data['keyword1'] =  $order['order_id'];
+        $data['keyword2'] =  date('Y-m-d H:i:s',time());
+        $data['keyword3'] =  $order['pay_price'];
+        if($order['pay_type'] == 'yue') $data['keyword4'] =  '余额支付';
+        else if($order['pay_type'] == 'weixin') $data['keyword4'] =  '微信支付';
+        else if($order['pay_type'] == 'offline') $data['keyword4'] =  '线下支付';
+        $data['keyword5'] = '已成功退款';
+        return RoutineTemplate::sendOut('ORDER_REFUND_SUCCESS',$order['uid'],$data);
     }
 
     /**
@@ -520,23 +517,32 @@ HTML;
         $price['back_integral'] = 0;//退积分总数
         $price['deduction_price'] = 0;//抵扣金额
         $price['total_num'] = 0; //商品总数
-        $model = self::getOrderWhere($where,$model);
-        $list = $model->where('is_del',0)->select()->toArray();
+        $sumNumber =self::getOrderWhere($where,$model)->where('is_del',0)->field([
+            'sum(total_num) as sum_total_num',
+            'sum(pay_price) as sum_pay_price',
+            'sum(refund_price) as sum_refund_price',
+            'sum(use_integral) as sum_use_integral',
+            'sum(back_integral) as sum_back_integral',
+            'sum(deduction_price) as sum_deduction_price'
+        ])->find();
+        if($sumNumber) {
+            $price['total_num'] = $sumNumber['sum_total_num'];
+            $price['pay_price'] = $sumNumber['sum_pay_price'];
+            $price['refund_price'] = $sumNumber['sum_refund_price'];
+            $price['use_integral'] = $sumNumber['sum_use_integral'];
+            $price['back_integral'] = $sumNumber['sum_back_integral'];
+            $price['deduction_price'] = $sumNumber['sum_deduction_price'];
+        }
+        $list=self::getOrderWhere($where,$model)->where('is_del',0)->group('pay_type')->field(['sum(pay_price) as sum_pay_price','pay_type'])->select();
         foreach ($list as $v){
-            $price['total_num'] = bcadd($price['total_num'],$v['total_num'],0);
-            $price['pay_price'] = bcadd($price['pay_price'],$v['pay_price'],2);
-            $price['refund_price'] = bcadd($price['refund_price'],$v['refund_price'],2);
-            $price['use_integral'] = bcadd($price['use_integral'],$v['use_integral'],2);
-            $price['back_integral'] = bcadd($price['back_integral'],$v['back_integral'],2);
-            $price['deduction_price'] = bcadd($price['deduction_price'],$v['deduction_price'],2);
             if ($v['pay_type'] == 'weixin'){
-                $price['pay_price_wx'] = bcadd($price['pay_price_wx'],$v['pay_price'],2);
+                $price['pay_price_wx'] = $v['sum_pay_price'];
             }elseif($v['pay_type'] == 'yue'){
-                $price['pay_price_yue'] = bcadd($price['pay_price_yue'],$v['pay_price'],2);
+                $price['pay_price_yue'] = $v['sum_pay_price'];
             }elseif($v['pay_type'] == 'offline'){
-                $price['pay_price_offline'] = bcadd($price['pay_price_offline'],$v['pay_price'],2);
+                $price['pay_price_offline'] = $v['sum_pay_price'];
             }else{
-                $price['pay_price_other'] = bcadd($price['pay_price_other'],$v['pay_price'],2);
+                $price['pay_price_other'] = $v['sum_pay_price'];
             }
         }
         return $price;
@@ -797,26 +803,6 @@ HTML;
 
     public static function getOrderBadge($where){
         return [
-            [
-                'name'=>'拼团订单数量',
-                'field'=>'个',
-                'count'=>self::setEchatWhere($where,2)->count(),
-                'content'=>'拼团总订单数量',
-                'background_color'=>'layui-bg-cyan',
-                'sum'=>self::setEchatWhere($where,2,true)->count(),
-                'class'=>'fa fa-line-chart',
-                'col'=>2
-            ],
-            [
-                'name'=>'砍价订单数量',
-                'field'=>'个',
-                'count'=>self::setEchatWhere($where,4)->count(),
-                'content'=>'砍价总订单数量',
-                'background_color'=>'layui-bg-cyan',
-                'sum'=>self::setEchatWhere($where,4,true)->count(),
-                'class'=>'fa fa-line-chart',
-                'col'=>2
-            ],
             [
                 'name'=>'秒杀订单数量',
                 'field'=>'个',
@@ -926,8 +912,8 @@ HTML;
      */
     public static function orderPostageAfter($oid,$postageData = [])
     {
+
         $order = self::where('id',$oid)->find();
-        $openid = WechatUser::uidToOpenid($order['uid']);
         $url = Url::build('wap/My/order',['uni'=>$order['order_id']],true,true);
         $group = [
             'first'=>'亲,您的订单已发货,请注意查收',
@@ -939,6 +925,7 @@ HTML;
                 //小程序送货模版消息
                 RoutineTemplate::sendOrderPostage($order);
             }else{//公众号
+                $openid = WechatUser::where('uid',$order['uid'])->value('openid');
                 $group = array_merge($group,[
                     'keyword1'=>$goodsName,
                     'keyword2'=>$order['pay_type'] == 'offline' ? '线下支付' : date('Y/m/d H:i',$order['pay_time']),
@@ -951,8 +938,9 @@ HTML;
         }else if($postageData['delivery_type'] == 'express') {//发货
             if ($order['is_channel']) {
                 //小程序发货模版消息
-                RoutineTemplate::sendOrderPostage($order);
+                RoutineTemplate::sendOrderPostage($order,1);
             } else {//公众号
+                $openid = WechatUser::where('uid',$order['uid'])->value('openid');
                 $group = array_merge($group, [
                     'keyword1' => $order['order_id'],
                     'keyword2' => $postageData['delivery_name'],
@@ -961,6 +949,7 @@ HTML;
                 WechatTemplateService::sendTemplate($openid, WechatTemplateService::ORDER_POSTAGE_SUCCESS, $group, $url);
             }
         }
+
     }
     /**
      * 小程序 订单发货提醒
@@ -974,38 +963,76 @@ HTML;
         $routine_openid = WechatUser::uidToRoutineOpenid($order['uid']);
         if(!$routine_openid) return true;
         if($postageData['delivery_type'] == 'send'){//送货
-            $data['keyword1']['value'] =  $order['order_id'];
-            $data['keyword2']['value'] =  $order['delivery_name'];
-            $data['keyword3']['value'] =  $order['delivery_id'];
-            $data['keyword4']['value'] =  date('Y-m-d H:i:s',time());
-            $data['keyword5']['value'] =  '您的商品已经发货请注意查收';
-            $formId = RoutineFormId::getFormIdOne($order['uid']);
-            if($formId){
-                RoutineFormId::delFormIdOne($formId);
-                RoutineTemplateService::sendTemplate($routine_openid,
-                    RoutineTemplateService::setTemplateId(RoutineTemplateService::ORDER_DELIVER_SUCCESS),
-                    '',
-                    $data,
-                    $formId);
-            }
+            RoutineTemplate::sendOrderPostage($order);
         }else if($postageData['delivery_type'] == 'express'){//发货
-            $data['keyword1']['value'] =  $order['order_id'];
-            $data['keyword2']['value'] =  $order['delivery_name'];
-            $data['keyword3']['value'] =  $order['delivery_id'];
-            $data['keyword4']['value'] =  date('Y-m-d H:i:s',time());
-            $data['keyword5']['value'] =  '您的商品已经发货请注意查收';
-            $formId = RoutineFormId::getFormIdOne($order['uid']);
-            if($formId){
-                RoutineFormId::delFormIdOne($formId);
-                RoutineTemplateService::sendTemplate($routine_openid,
-                    RoutineTemplateService::setTemplateId(RoutineTemplateService::ORDER_POSTAGE_SUCCESS),
-                    '',
-                    $data,
-                    $formId);
+            RoutineTemplate::sendOrderPostage($order,1);
+        }
+    }
+
+    /** 收货后发送模版消息
+     * @param $order
+     */
+    public static function orderTakeAfter($order)
+    {
+        if($order['is_channel']){//小程序
+            RoutineTemplate::sendOut('OREDER_TAKEVER',$order['uid'],[
+                'keyword1'=>$order['order_id'],
+                'keyword2'=>self::getDb('store_cart')->alias('a')->join('__STORE_PRODUCT__ P','a.product_id=p.id')->where('a.id','in',$order['cart_id'])->value('p.title'),
+                'keyword3'=>$order['pay_price'],
+                'keyword4'=>date('Y-m-d H:i:s',time()),
+            ]);
+        }else{
+             $openid = WechatUser::where('uid',$order['uid'])->value('openid');
+            $title='';
+            $cartInfo = self::getDb('StoreOrderCartInfo')->where('oid', $order['id'])->column('product_id') ?: [];
+            foreach ($cartInfo as $k => $productId) {
+                $store_name=self::getDb('store_product')->where('id',$productId)->value('store_name');
+                $title.=$store_name.',';
             }
+            WechatTemplateService::sendTemplate($openid,WechatTemplateService::ORDER_TAKE_SUCCESS,[
+                'first'=>'亲,您的订单已收货',
+                'keyword1'=>$order['order_id'],
+                'keyword2'=>'已收货',
+                'keyword3'=>date('Y-m-d H:i:s',time()),
+                'keyword4'=>$title,
+                'remark'=>'感谢您的光临!'
+            ]);
         }
     }
 
+    /*
+     * 不退款发送模板消息
+     * @param int $id 订单id
+     * @param array $data 退款详情
+     * */
+    public static function refundNoPrieTemplate($id,$data)
+    {
+        $order=self::get($id);
+        if($order) return false;
+        //小程序模板消息
+        $cartInfo = self::getDb('StoreOrderCartInfo')->where('oid', $order['id'])->column('product_id') ?: [];
+        $title='';
+        foreach ($cartInfo as $k => $productId) {
+            $store_name=self::getDb('store_product')->where('id',$productId)->value('store_name');
+            $title.=$store_name.',';
+        }
+        if($order->is_channel){
+            RoutineTemplate::sendOut('ORDER_REFUND_FILE',$order->uid,[
+                'keyword1'=>$order->order_id,
+                'keyword2'=>$title,
+                'keyword3'=>$order->pay_price,
+                'keyword4'=>$data,
+            ]);
+        }else{
+            WechatTemplateService::sendTemplate(WechatUser::where(['uid'=>$order->uid])->value('openid'),WechatTemplateService::ORDER_REFUND_STATUS,[
+                'first'=>'很抱歉您的订单退款失败,失败原因:'.$data,
+                'keyword1'=>$order->order_id,
+                'keyword2'=>$order->pay_price,
+                'keyword3'=>date('Y-m-d H:i:s',time()),
+                'remark'=>'给您带来的不便,请谅解!'
+            ]);
+        }
+    }
 
     /**
      * 获取订单总数
@@ -1052,27 +1079,6 @@ HTML;
         return true;
     }
 
-    /** 收货后发送模版消息
-     * @param $order
-     */
-    public static function orderTakeAfter($order)
-    {
-        if($order['is_channel']){//小程序
-
-        }else{
-
-        }
-//        $openid = WechatUser::getOpenId($order['uid']);
-//        RoutineTemplateService::sendTemplate($openid,RoutineTemplateService::ORDER_TAKE_SUCCESS,[
-//            'first'=>'亲,您的订单已成功签收,快去评价一下吧',
-//            'keyword1'=>$order['order_id'],
-//            'keyword2'=>'已收货',
-//            'keyword3'=>date('Y/m/d H:i',time()),
-//            'keyword4'=>implode(',',StoreOrderCartInfo::getProductNameList($order['id'])),
-//            'remark'=>'点击查看订单详情'
-//        ],Url::build('My/order',['uni'=>$order['order_id']],true,true));
-    }
-
     public static function integralBack($id){
         $order = self::get($id)->toArray();
         if(!(float)bcsub($order['use_integral'],0,2) && !$order['back_integral']) return true;

+ 1 - 1
application/admin/model/record/StoreStatistics.php

@@ -10,7 +10,7 @@ namespace app\admin\model\record;
 use traits\ModelTrait;
 use basic\ModelBasic;
 use service\ExportService;
-use app\wap\model\user\UserBill;
+use app\core\model\user\UserBill;
 use app\admin\model\user\User;
 use service\PHPExcelService;
 class StoreStatistics extends ModelBasic

+ 1 - 1
application/admin/model/routine/RoutineFormId.php

@@ -7,7 +7,7 @@ use traits\ModelTrait;
 /**
  * 表单ID表
  * Class RoutineFormId
- * @package app\routine\model\routine
+ * @package app\admin\model\routine
  */
 class RoutineFormId extends ModelBasic {
 

+ 3 - 1
application/admin/model/store/StoreCategory.php

@@ -49,6 +49,8 @@ class StoreCategory extends ModelBasic
         if($isAjax===true){
             if(isset($where['order']) && $where['order']!=''){
                 $model=$model->order(self::setOrder($where['order']));
+            }else{
+                $model=$model->order('sort desc,id desc');
             }
             return $model;
         }
@@ -78,7 +80,7 @@ class StoreCategory extends ModelBasic
     public static function getTierList($model = null)
     {
         if($model === null) $model = new self();
-        return UtilService::sortListTier($model->select()->toArray());
+        return UtilService::sortListTier($model->order('sort desc,id desc')->select()->toArray());
     }
 
     public static function delCategory($id){

+ 8 - 0
application/admin/model/store/StoreProductAttrValue.php

@@ -28,6 +28,14 @@ class StoreProductAttrValue extends ModelBasic
         return self::uniqueId($data['product_id'].$data['suk'].uniqid(true));
     }
 
+    /*
+     * 减少销量增加库存
+     * */
+    public static function incProductAttrStock($productId,$unique,$num)
+    {
+        return false !== self::where('product_id',$productId)->where('unique',$unique)->inc('stock',$num)->dec('sales',$num)->update();
+    }
+
     public static function decProductAttrStock($productId,$unique,$num)
     {
         return false !== self::where('product_id',$productId)->where('unique',$unique)

+ 45 - 0
application/admin/model/store/StoreProductReply.php

@@ -23,6 +23,51 @@ class StoreProductReply extends ModelBasic
     {
         return json_decode($value,true);
     }
+    /*
+     * 设置where条件
+     * @param array $where
+     * @param string $alias
+     * @param object $model
+     * */
+    public static function valiWhere($where,$alias='',$model=null)
+    {
+        $model=is_null($model) ? new self() : $model;
+        if($alias){
+            $model=$model->alias($alias);
+            $alias.='.';
+        }
+        if(isset($where['title']) && $where['title']!='') $model=$model->where("{$alias}comment",'LIKE',"%$where[title]%");
+        if(isset($where['is_reply']) && $where['is_reply']!='') $model= $where['is_reply'] >= 0 ? $model->where("{$alias}is_reply",$where['is_reply']) : $model->where("{$alias}is_reply",'GT',0);
+        if(isset($where['producr_id']) && $where['producr_id']!=0) $model=$model->where('product_id',$where['producr_id']);
+        return $model->where("{$alias}is_del",0);
+    }
+
+    public static function getProductImaesList($where)
+    {
+        $list=self::valiWhere($where,'a')->group('p.id')->join('__WECHAT_USER__ u','u.uid=a.uid')->join("__STORE_PRODUCT__ p",'a.product_id=p.id')->field(['p.id','p.image','p.store_name','p.price'])->page($where['page'],$where['limit'])->select();
+        $list=count($list) ? $list->toArray() : [];
+        foreach ($list as &$item){
+            $item['store_name']=self::getSubstrUTf8($item['store_name'],10,'UTF-8','');
+        }
+
+        return $list;
+    }
+
+    public static function getProductReplyList($where)
+    {
+        $data=self::valiWhere($where,'a')->join("__STORE_PRODUCT__ p",'a.product_id=p.id')
+            ->join('__WECHAT_USER__ u','u.uid=a.uid')
+            ->order('a.add_time desc,a.is_reply asc')
+            ->field('a.*,u.nickname,u.headimgurl as avatar')
+            ->page((int)$where['message_page'],(int)$where['limit'])
+            ->select();
+        $data=count($data) ? $data->toArray() : [];
+        foreach ($data as &$item){
+            $item['time']=\service\UtilService::timeTran($item['add_time']);
+        }
+        $count=self::valiWhere($where,'a')->join('__WECHAT_USER__ u','u.uid=a.uid')->join("__STORE_PRODUCT__ p",'a.product_id=p.id')->count();
+        return ['list'=>$data,'count'=>$count];
+    }
     /**
      * @param $where
      * @return array

+ 1 - 1
application/admin/model/system/Express.php

@@ -11,7 +11,7 @@ use traits\ModelTrait;
 use basic\ModelBasic;
 
 /**
- * Class SystemAdmin
+ * Class Express
  * @package app\admin\model\system
  */
 class Express extends ModelBasic

+ 1 - 1
application/admin/model/system/SystemConfig.php

@@ -157,7 +157,7 @@ class SystemConfig extends ModelBasic {
      * */
     public static function getAll($id){
         $where['config_tab_id'] = $id;
-        $where['status'] = 1;
+//        $where['status'] = 1;
         return self::where($where)->order('sort desc,id asc')->select();
     }
 

+ 3 - 29
application/admin/model/system/SystemGroupData.php

@@ -75,14 +75,12 @@ class SystemGroupData extends ModelBasic
         $data = [];
         $result = $model->select();
         if(!$result) return $data;
-        $result = $result->toArray();
         foreach ($result as $key => $value) {
             $data[$key]["id"] = $value["id"];
             $fields = json_decode($value["value"],true);
             foreach ($fields as $index => $field) {
-                if($field['type'] === 'radio') {
-                    $data[$key][$index] = self::getGroupRadioValue($value['gid'],$field["value"]);
-                }else $data[$key][$index] = $field["value"];
+//                $data[$key][$index] = $field['type'] == 'upload' ? (isset($field["value"][0]) ? $field["value"][0]: ''):$field["value"];
+                $data[$key][$index] = $field["value"];
             }
         }
         return $data;
@@ -113,32 +111,8 @@ class SystemGroupData extends ModelBasic
         $data["id"] = $value["id"];
         $fields = json_decode($value["value"],true);
         foreach ($fields as $index => $field) {
-            if($field['type'] === 'radio') {
-                $data[$index] = self::getGroupRadioValue($value['gid'],$field["value"]);
-            }else $data[$index] = $field["value"];
+            $data[$index] = $field["value"];
         }
         return $data;
     }
-
-    /**
-     * TODO radio 根据值获取参数
-     * @param $id
-     * @param $value
-     * @return mixed
-     */
-    public static function getGroupRadioValue($id,$value){
-        $groupData = SystemGroup::getField($id);
-        foreach ($groupData['fields'] as $key=>&$item){
-           if($item['type'] == 'radio'){
-               $params = explode("\n",$item["param"]);
-               if(is_array($params) && !empty($params)){
-                   foreach ($params as $index => &$v) {
-                       $vl = explode('=>',$v);
-                       if(isset($vl[0]) && isset($vl[1]) && count($vl) && $vl[1] === $value) return $vl[0];
-                   }
-               }
-           }
-        }
-        return $value;
-    }
 }

+ 2 - 2
application/admin/model/ump/StoreCouponIssue.php

@@ -33,8 +33,8 @@ class StoreCouponIssue extends ModelBasic
         return time();
     }
 
-    public static function setIssue($cid,$total_count = 0,$start_time = 0,$end_time = 0,$remain_count = 0,$status = 0)
+    public static function setIssue($cid,$total_count = 0,$start_time = 0,$end_time = 0,$remain_count = 0,$status = 0,$is_permanent=0)
     {
-        return self::set(compact('cid','start_time','end_time','total_count','remain_count','status'));
+        return self::set(compact('cid','start_time','end_time','total_count','remain_count','status','is_permanent'));
     }
 }

+ 8 - 1
application/admin/model/user/User.php

@@ -6,13 +6,14 @@
  */
 namespace app\admin\model\user;
 use app\admin\model\order\StoreOrder;
+use app\admin\model\system\SystemUserLevel;
 use traits\ModelTrait;
 use app\admin\model\user\UserBill;
 use basic\ModelBasic;
 use app\admin\model\wechat\WechatUser;
 use app\admin\model\store\StoreCouponUser;
 use app\admin\model\user\UserExtract;
-use service\SystemConfigService;
+use app\core\util\SystemConfigService;
 use think\Db;
 /**
  * 用户管理 model
@@ -115,6 +116,12 @@ class User extends ModelBasic
                 }else if($item['sex'] == 2){
                     $item['sex']='女';
                 }else $item['sex']='保密';
+                $item['vip_name']=false;
+                $levelinfo=UserLevel::where(['uid'=>$item['uid'],'is_del'=>0])->order('grade desc')->field(['level_id','is_forever','valid_time'])->find();
+                if($levelinfo){
+                    if($levelinfo['is_forever']) $item['vip_name']=SystemUserLevel::where('id',$levelinfo['level_id'])->value('name');
+                    else if(time() > $levelinfo['valid_time']) $item['vip_name']=SystemUserLevel::where('id',$levelinfo['level_id'])->value('name');
+                }
             });//->toArray();
         $count=self::setWherePage(self::setWhere($where),$where,['w.sex','w.province','w.city','u.status','u.is_promoter'],['u.nickname','u.uid'])->alias('u')->join('WechatUser w','u.uid=w.uid')->count();
         return ['count'=>$count,'data'=>$list];

+ 1 - 1
application/admin/model/user/UserExtract.php

@@ -14,7 +14,7 @@ use app\admin\model\wechat\WechatUser;
 use think\Url;
 use traits\ModelTrait;
 use basic\ModelBasic;
-use service\WechatTemplateService;
+use app\core\util\WechatTemplateService;
 /**
  * 用户提现管理 model
  * Class User

+ 10 - 3
application/admin/model/user/UserRecharge.php

@@ -1,12 +1,18 @@
 <?php
+/**
+ *
+ * @author: xaboy<365615158@qq.com>
+ * @day: 2017/11/28
+ */
+
 namespace app\admin\model\user;
 
+
 use traits\ModelTrait;
 use basic\ModelBasic;
-use app\admin\model\user\User;
 
 /**
- * 提现记录
+ * 用户充值记录
  * Class UserRecharge
  * @package app\admin\model\user
  */
@@ -19,8 +25,9 @@ use app\admin\model\user\User;
          $model = new self;
          $model = $model->alias('A');
          if($where['order_id'] != '') {
-             $model = $model->where('A.order_id|B.nickname','like',"%$where[order_id]%");
+             $model = $model->whereOr('A.order_id','like',"%$where[order_id]%");
              $model = $model->whereOr('A.id',(int)$where['order_id']);
+             $model = $model->whereOr('B.nickname','like',"%$where[order_id]%");
          }
          $model = $model->where('A.recharge_type','weixin');
          $model = $model->where('A.paid',1);

+ 1 - 1
application/admin/model/wechat/WechatQrcode.php

@@ -10,7 +10,7 @@ namespace app\admin\model\wechat;
 
 use traits\ModelTrait;
 use basic\ModelBasic;
-use service\WechatService;
+use app\core\util\WechatService;
 
 /**
  * 获取二维码

+ 2 - 2
application/admin/model/wechat/WechatReply.php

@@ -12,7 +12,7 @@ use traits\ModelTrait;
 use basic\ModelBasic;
 use service\HookService;
 use service\UtilService;
-use service\WechatService;
+use app\core\util\WechatService;
 use think\Url;
 
 /**
@@ -30,7 +30,7 @@ class WechatReply extends ModelBasic
      * @param $key
      */
     public static function getDataByKey($key){
-        $resdata = [];
+        $resdata = ['data'=>''];
         $resdata = self::where('key',$key)->find();
         $resdata['data'] = json_decode($resdata['data'],true);
         return $resdata;

+ 3 - 3
application/admin/model/wechat/WechatUser.php

@@ -12,14 +12,14 @@ use app\admin\model\order\StoreOrder;
 use app\admin\model\user\User;
 use app\admin\model\user\UserExtract;
 use service\ExportService;
-use service\QrcodeService;
+use app\core\util\QrcodeService;
 use think\Cache;
 use think\Config;
 use traits\ModelTrait;
 use basic\ModelBasic;
-use service\WechatService;
+use app\core\util\WechatService;
 use service\PHPExcelService;
-use service\SystemConfigService;
+use app\core\util\SystemConfigService;
 
 /**
  * 微信用户 model

+ 4 - 0
application/admin/view/agent/agent_manage/index.php

@@ -387,7 +387,11 @@
                                         {if condition="$vo['user_type'] eq 'routine'"}
                                            暂无
                                         {else/}
+                                        {if isset($vo.qr_code.url)}
                                            <img src="{$vo.qr_code.url}" alt="{$vo.nickname}" title="{$vo.nickname}" style="width:50px;height: 50px;cursor: pointer;" class="head_image" data-image="{$vo.qr_code.url}">
+                                        {else}
+                                            暂无
+                                        {/if}
                                         {/if}
                                     </td>
                                     <td class="text-center">

+ 1 - 1
application/admin/view/finance/finance/bill.php

@@ -93,7 +93,7 @@
                 return;
             }
         }
-        layList.reload(where);
+        layList.reload(where,true);
     });
     layList.search('export',function(where){
         location.href=layList.U({a:'save_bell_export',q:{type:where.type,start_time:where.start_time,end_time:where.end_time,nickname:where.nickname}});

+ 2 - 2
application/admin/view/finance/finance/content_info.php

@@ -99,7 +99,7 @@
                         {/if}
                         <li class="layui-col-xs4">
                             <div class="backlog-body">
-                                <h3>佣金总入</h3>
+                                <h3>佣金总入</h3>
                                 <p><cite>{$userinfo.number}</cite></p>
                             </div>
                         </li>
@@ -166,7 +166,7 @@
                 return;
             }
         }
-        layList.reload(where);
+        layList.reload(where,true);
     });
 </script>
 {/block}

+ 4 - 2
application/admin/view/index/index.php

@@ -14,6 +14,9 @@
     <link href="{__FRAME_PATH}css/font-awesome.min.css" rel="stylesheet">
     <link href="{__FRAME_PATH}css/animate.min.css" rel="stylesheet">
     <link href="{__FRAME_PATH}css/style.min.css" rel="stylesheet">
+    <style>
+        .swal2-container{z-index: 100000000000!important;}
+    </style>
 </head>
 <body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
 <div id="wrapper">
@@ -279,7 +282,6 @@
     $(function() {
         function getnotice() {
             $.getJSON("{:Url('Jnotice')}",function(res){
-                console.log(res);
                 var info = eval("("+res+")");
                 var data = info.data;
                 $('#msgcount').html(data.msgcount);
@@ -290,7 +292,7 @@
             });
         }
         getnotice();
-        setInterval(getnotice, 3000);
+        setInterval(getnotice, 600000);
     });
 
 </script>

+ 16 - 15
application/admin/view/order/store_order/index.php

@@ -132,7 +132,7 @@
                         <button type="button" class="layui-btn layui-btn-xs" onclick="dropdown(this)">操作 <span class="caret"></span></button>
                         <ul class="layui-nav-child layui-anim layui-anim-upbit">
                             <li>
-                                <a href="javascript:void(0);" onclick="$eb.createModalFrame('{{d.nickname}}-订单详情','{:Url('order_info')}?oid={{d.id}}')">
+                                <a href="javascript:void(0);" lay-event='order_info'>
                                     <i class="fa fa-file-text"></i> 订单详情
                                 </a>
                             </li>
@@ -158,7 +158,7 @@
                         <button type="button" class="layui-btn layui-btn-xs" onclick="dropdown(this)">操作 <span class="caret"></span></button>
                         <ul class="layui-nav-child layui-anim layui-anim-upbit">
                             <li>
-                                <a href="javascript:void(0);" onclick="$eb.createModalFrame('{{d.nickname}}-订单详情','{:Url('order_info')}?oid={{d.id}}')">
+                                <a href="javascript:void(0);" lay-event='order_info'>
                                     <i class="fa fa-file-text"></i> 订单详情
                                 </a>
                             </li>
@@ -172,7 +172,7 @@
                                     <i class="fa fa-paste"></i> 订单备注
                                 </a>
                             </li>
-                            {{#  if(Math.floor(d.pay_price) > Math.floor(d.refund_price)){ }}
+                            {{#  if(parseFloat(d.pay_price) > parseFloat(d.refund_price)){ }}
                             <li>
                                 <a href="javascript:void(0);" onclick="$eb.createModalFrame('退款','{:Url('refund_y')}?id={{d.id}}',{w:400,h:300})">
                                     <i class="fa fa-history"></i> 立即退款
@@ -195,7 +195,7 @@
                         <button type="button" class="layui-btn layui-btn-xs" onclick="dropdown(this)">操作 <span class="caret"></span></button>
                         <ul class="layui-nav-child layui-anim layui-anim-upbit">
                             <li>
-                                <a href="javascript:void(0);" onclick="$eb.createModalFrame('{{d.nickname}}-订单详情','{:Url('order_info')}?oid={{d.id}}')">
+                                <a href="javascript:void(0);" lay-event='order_info'>
                                     <i class="fa fa-file-text"></i> 订单详情
                                 </a>
                             </li>
@@ -216,7 +216,7 @@
                                 </a>
                             </li>
                             {{#  };}}
-                            {{# if(Math.floor(d.pay_price) > Math.floor(d.refund_price)){ }}
+                            {{# if(parseFloat(d.pay_price) > parseFloat(d.refund_price)){ }}
                             <li>
                                 <a href="javascript:void(0);" onclick="$eb.createModalFrame('退款','{:Url('refund_y')}?id={{d.id}}',{w:400,h:300})">
                                     <i class="fa fa-history"></i>立即退款
@@ -240,7 +240,7 @@
                         <button type="button" class="layui-btn layui-btn-xs" onclick="dropdown(this)">操作 <span class="caret"></span></button>
                         <ul class="layui-nav-child layui-anim layui-anim-upbit">
                             <li>
-                                <a href="javascript:void(0);" onclick="$eb.createModalFrame('{{d.nickname}}-订单详情','{:Url('order_info')}?oid={{d.id}}')">
+                                <a href="javascript:void(0);" lay-event='order_info'>
                                     <i class="fa fa-file-text"></i> 订单详情
                                 </a>
                             </li>
@@ -254,7 +254,7 @@
                                     <i class="fa fa-cart-arrow-down"></i> 已收货
                                 </a>
                             </li>
-                            {{#  if(Math.floor(d.pay_price) > Math.floor(d.refund_price)){ }}
+                            {{#  if(parseFloat(d.pay_price) > parseFloat(d.refund_price)){ }}
                             <li>
                                 <a href="javascript:void(0);" onclick="$eb.createModalFrame('退款','{:Url('refund_y')}?id={{d.id}}')">
                                     <i class="fa fa-history"></i> 立即退款
@@ -277,7 +277,7 @@
                         <button type="button" class="layui-btn layui-btn-xs" onclick="dropdown(this)">操作 <span class="caret"></span></button>
                         <ul class="layui-nav-child layui-anim layui-anim-upbit">
                             <li>
-                                <a href="javascript:void(0);" onclick="$eb.createModalFrame('{{d.nickname}}-订单详情','{:Url('order_info')}?oid={{d.id}}')">
+                                <a href="javascript:void(0);" lay-event='order_info'>
                                     <i class="fa fa-file-text"></i> 订单详情
                                 </a>
                             </li>
@@ -286,7 +286,7 @@
                                     <i class="fa fa-paste"></i> 订单备注
                                 </a>
                             </li>
-                            {{#  if(Math.floor(d.pay_price) > Math.floor(d.refund_price)){ }}
+                            {{#  if(parseFloat(d.pay_price) > parseFloat(d.refund_price)){ }}
                             <li>
                                 <a href="javascript:void(0);" onclick="$eb.createModalFrame('退款','{:Url('refund_y')}?id={{d.id}}')">
                                     <i class="fa fa-history"></i> 立即退款
@@ -310,7 +310,7 @@
                         <button type="button" class="layui-btn layui-btn-xs" onclick="dropdown(this)">操作 <span class="caret"></span></button>
                         <ul class="layui-nav-child layui-anim layui-anim-upbit">
                             <li>
-                                <a href="javascript:void(0);" onclick="$eb.createModalFrame('{{d.nickname}}-订单详情','{:Url('order_info')}?oid={{d.id}}')">
+                                <a href="javascript:void(0);" lay-event='order_info'>
                                     <i class="fa fa-file-text"></i> 订单详情
                                 </a>
                             </li>
@@ -319,7 +319,7 @@
                                     <i class="fa fa-paste"></i> 订单备注
                                 </a>
                             </li>
-                            {{#  if(Math.floor(d.pay_price) > Math.floor(d.refund_price)){ }}
+                            {{#  if(parseFloat(d.pay_price) > parseFloat(d.refund_price)){ }}
                             <li>
                                 <a href="javascript:void(0);" onclick="$eb.createModalFrame('退款','{:Url('refund_y')}?id={{d.id}}')">
                                     <i class="fa fa-history"></i> 立即退款
@@ -401,6 +401,9 @@
                     });
                 },{'title':'您确定要修改收货状态吗?','text':'修改后将无法恢复,请谨慎操作!','confirm':'是的,我要修改'})
                 break;
+            case 'order_info':
+                $eb.createModalFrame(data.nickname+'订单详情',layList.U({a:'order_info',q:{oid:data.id}}));
+                break;
         }
     })
     //下拉框
@@ -444,9 +447,7 @@
                 orderType: [
                     {name: '全部', value: ''},
                     {name: '普通订单', value: 1,count:orderCount.general},
-                    {name: '拼团订单', value: 2,count:orderCount.pink},
-                    {name: '秒杀订单', value: 3,count:orderCount.seckill},
-                    {name: '砍价订单', value: 4,count:orderCount.bargain},
+                    {name: '秒杀订单', value: 3,count:orderCount.seckill}
                 ],
                 orderStatus: [
                     {name: '全部', value: ''},
@@ -499,7 +500,7 @@
                 search:function () {
                     this.where.excel=0;
                     this.getBadge();
-                    layList.reload(this.where);
+                    layList.reload(this.where,true);
                 },
                 refresh:function () {
                     layList.reload();

+ 1 - 2
application/admin/view/public/container.php

@@ -8,8 +8,7 @@
     {block name="head"}{/block}
 </head>
 <body class="gray-bg">
-<!--演示地址https://daneden.github.io/animate.css/?-->
-<div class="wrapper wrapper-content animated ">
+<div class="wrapper wrapper-content">
 {block name="content"}{/block}
 {block name="foot"}{/block}
 {block name="script"}{/block}

+ 6 - 13
application/admin/view/public/form-builder.php

@@ -3,19 +3,12 @@
 <head>
 	<meta charset="UTF-8">
 	<title><?=$form->getTitle()?></title>
-    <script src="https://unpkg.com/jquery@3.3.1/dist/jquery.min.js"></script>
-    <script src="https://unpkg.com/vue@2.5.13/dist/vue.min.js"></script>
-    <link href="https://unpkg.com/iview@2.14.3/dist/styles/iview.css" rel="stylesheet">
-    <script src="https://unpkg.com/iview@2.14.3/dist/iview.min.js"></script>
-    <script src="https://unpkg.com/form-create@1.5.5/dist/form-create.min.js"></script>
-    <script src="https://unpkg.com/form-create@1.5.5/district/province_city.js"></script>
-    <script src="https://unpkg.com/form-create@1.5.5/district/province_city_area.js"></script>
-<!--    <script src="{__PLUG_PATH}vue/dist/vue.min.js"></script>-->
-<!--    <link href="{__PLUG_PATH}iview/dist/styles/iview.css" rel="stylesheet">-->
-<!--    <script src="{__PLUG_PATH}iview/dist/iview.min.js"></script>-->
-<!--    <script src="{__PLUG_PATH}jquery/jquery.min.js"></script>-->
-<!--    <script src="{__PLUG_PATH}form-create/province_city.js"></script>-->
-<!--    <script src="{__PLUG_PATH}form-create/form-create.min.js"></script>-->
+    <script src="{__PLUG_PATH}vue/dist/vue.min.js"></script>
+    <link href="{__PLUG_PATH}iview/dist/styles/iview.css" rel="stylesheet">
+    <script src="{__PLUG_PATH}iview/dist/iview.min.js"></script>
+    <script src="{__PLUG_PATH}jquery/jquery.min.js"></script>
+    <script src="{__PLUG_PATH}form-create/province_city.js"></script>
+    <script src="{__PLUG_PATH}form-create/form-create.min.js"></script>
     <style>
         /*弹框样式修改*/
         .ivu-modal-body{padding: 5;}

+ 0 - 1
application/admin/view/public/frame_head.php

@@ -14,7 +14,6 @@
     <script src="{__PLUG_PATH}layui/layui.all.js"></script>
     <script>
         $eb = parent._mpApi;
-        // if(!$eb) top.location.reload();
         window.controlle="<?php echo strtolower(trim(preg_replace("/[A-Z]/", "_\\0", think\Request::instance()->controller()), "_"));?>";
         window.module="<?php echo think\Request::instance()->module();?>";
     </script>

+ 1 - 1
application/admin/view/public/head.php

@@ -5,5 +5,5 @@
 {include file="public/style"}
 <script>
     $eb = parent._mpApi;
-    if(!$eb) top.location.reload();
+//    if(!$eb) top.location.reload();
 </script>

+ 54 - 21
application/admin/view/record/record/chart_bargain.php

@@ -1,5 +1,53 @@
 {extend name="public/container"}
 {block name="head_top"}
+<style>
+    .layui-input-block button{
+        border: 1px solid rgba(0,0,0,0.1);
+    }
+    .layui-card-body{
+        padding-left: 10px;
+        padding-right: 10px;
+    }
+    .layui-card-body p.layuiadmin-big-font {
+        font-size: 36px;
+        color: #666;
+        line-height: 36px;
+        padding: 5px 0 10px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        word-break: break-all;
+        white-space: nowrap;
+    }
+    .layuiadmin-badge, .layuiadmin-btn-group, .layuiadmin-span-color {
+        position: absolute;
+        right: 15px;
+    }
+    .layuiadmin-badge {
+        top: 50%;
+        margin-top: -9px;
+        color: #01AAED;
+    }
+    .layuiadmin-span-color i {
+        padding-left: 5px;
+    }
+    .block-rigit{
+        text-align: right;
+    }
+    .block-rigit button{
+        width: 100px;
+        letter-spacing: .5em;
+        line-height: 28px;
+    }
+    .layuiadmin-card-list{
+        padding: 1.6px;
+    }
+    .layuiadmin-card-list p.layuiadmin-normal-font {
+        padding-bottom: 10px;
+        font-size: 20px;
+        color: #666;
+        line-height: 24px;
+    }
+</style>
 <script src="{__PLUG_PATH}echarts.common.min.js"></script>
 {/block}
 {block name="content"}
@@ -176,7 +224,7 @@
                 info:function(){
                     var that=this;
                     var index=layList.layer.load(2,{shade: [0.3,'#fff']});
-                    layList.baseGet(layList.Url({c:'auth_api',a:'get_echarts_product',q:{type:this.status,data:this.data}}),function (res){
+                    layList.baseGet(layList.Url({c:'record.record',a:'get_mark_echarts_product',q:{type:this.status,data:this.data}}),function (res){
                         layList.layer.close(index);
                         that.badge=res.data.badge;
                         that.count=res.data.count;
@@ -191,26 +239,26 @@
                 },
                 getSalesList:function(){
                     var that=this;
-                    layList.baseGet(layList.Url({c:'auth_api',a:'get_echarts_maxlist',q:{data:this.data}}),function (rem) {
+                    layList.baseGet(layList.Url({c:'record.record',a:'get_mark_echarts_maxlist',q:{data:this.data}}),function (rem) {
                         that.SalesList=rem.data;
                     });
                 },
                 getProfityList:function(){
                     var that=this;
-                    layList.baseGet(layList.Url({c:'auth_api',a:'get_echarts_profity',q:{data:this.data}}),function (rem) {
+                    layList.baseGet(layList.Url({c:'record.record',a:'get_mark_echarts_profity',q:{data:this.data}}),function (rem) {
                         that.ProfityList=rem.data;
                     });
                 },
                 getTuiPriesList:function(){
                     var that=this;
-                    layList.baseGet(layList.Url({c:'auth_api',a:'get_bargain_refund_list'}),function (rem) {
+                    layList.baseGet(layList.Url({c:'record.record',a:'get_mark_bargain_refund_list'}),function (rem) {
                         that.TuiPriesList=rem.data;
                     });
                 },/*待补货*/
                 getLackList:function(){
                     var that=layList;
                     var data={
-                        url:that.U({c:'auth_api',a:'getLackList'}),
+                        url:that.U({c:'record.record',a:'get_mark_lack_list'}),
                         limit:10
                     };
                     layList.tables('PhList',data,[
@@ -219,21 +267,6 @@
                         {field: 'stock', title: '库存',edit:'stock'},
                         {field: 'right', title: '操作',align:'center',toolbar:'#bar'},
                     ]);
-                    that.table.on('edit(PhList)',function (obj) {
-                        var value = obj.value //得到修改后的值
-                            ,data = obj.data //得到所在行所有键值
-                            ,field = obj.field; //得到字段
-                        switch (field){
-                            case 'stock':
-                                that.basePost(that.U({c:'auth_api',a:'editField',p:{id:obj.data.id}}),{stock:obj.value},function (rem) {
-                                    that.msg(rem.msg);
-                                });
-                                break;
-                            default:
-                                console.log('未检测到指定字段'+name);
-                                break;
-                        }
-                    });
                     that.table.on('tool(PhList)', function (obj) {
                         var data = obj.data, layEvent = obj.event;
                             switch (layEvent) {
@@ -248,7 +281,7 @@
                 },/*获取砍价产品的评论*/
                 getnegativeList:function(){
                     var that=this;
-                    layList.baseGet(layList.Url({c:'auth_api',a:'getnegativelist'}),function(rem) {
+                    layList.baseGet(layList.Url({c:'record.record',a:'get_mark_negative_list'}),function(rem) {
                         that.negativeList=rem.data.data;
                     });
                 },

+ 48 - 4
application/admin/view/record/record/chart_cash.php

@@ -1,5 +1,53 @@
 {extend name="public/container"}
 {block name="head_top"}
+<style>
+    .layui-input-block button{
+        border: 1px solid rgba(0,0,0,0.1);
+    }
+    .layui-card-body{
+        padding-left: 10px;
+        padding-right: 10px;
+    }
+    .layui-card-body p.layuiadmin-big-font {
+        font-size: 36px;
+        color: #666;
+        line-height: 36px;
+        padding: 5px 0 10px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        word-break: break-all;
+        white-space: nowrap;
+    }
+    .layuiadmin-badge, .layuiadmin-btn-group, .layuiadmin-span-color {
+        position: absolute;
+        right: 15px;
+    }
+    .layuiadmin-badge {
+        top: 50%;
+        margin-top: -9px;
+        color: #01AAED;
+    }
+    .layuiadmin-span-color i {
+        padding-left: 5px;
+    }
+    .block-rigit{
+        text-align: right;
+    }
+    .block-rigit button{
+        width: 100px;
+        letter-spacing: .5em;
+        line-height: 28px;
+    }
+    .layuiadmin-card-list{
+        padding: 1.6px;
+    }
+    .layuiadmin-card-list p.layuiadmin-normal-font {
+        padding-bottom: 10px;
+        font-size: 20px;
+        color: #666;
+        line-height: 24px;
+    }
+</style>
 <script src="{__PLUG_PATH}echarts.common.min.js"></script>
 {/block}
 {block name="content"}
@@ -160,15 +208,11 @@
                 this.setChart(this.$refs.echarts_price,'price');
                 this.getBadgeList();
                 this.getExtractData();
-                var that=this;
                 layList.laydate.render({
                     elem:this.$refs.date_time,
                     trigger:'click',
                     eventElem:this.$refs.time,
                     range:true,
-                    change:function (value) {
-                        that.data=value;
-                    }
                 });
             }
         })

+ 48 - 0
application/admin/view/record/record/chart_combination.php

@@ -1,5 +1,53 @@
 {extend name="public/container"}
 {block name="head_top"}
+<style>
+    .layui-input-block button{
+        border: 1px solid rgba(0,0,0,0.1);
+    }
+    .layui-card-body{
+        padding-left: 10px;
+        padding-right: 10px;
+    }
+    .layui-card-body p.layuiadmin-big-font {
+        font-size: 36px;
+        color: #666;
+        line-height: 36px;
+        padding: 5px 0 10px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        word-break: break-all;
+        white-space: nowrap;
+    }
+    .layuiadmin-badge, .layuiadmin-btn-group, .layuiadmin-span-color {
+        position: absolute;
+        right: 15px;
+    }
+    .layuiadmin-badge {
+        top: 50%;
+        margin-top: -9px;
+        color: #01AAED;
+    }
+    .layuiadmin-span-color i {
+        padding-left: 5px;
+    }
+    .block-rigit{
+        text-align: right;
+    }
+    .block-rigit button{
+        width: 100px;
+        letter-spacing: .5em;
+        line-height: 28px;
+    }
+    .layuiadmin-card-list{
+        padding: 1.6px;
+    }
+    .layuiadmin-card-list p.layuiadmin-normal-font {
+        padding-bottom: 10px;
+        font-size: 20px;
+        color: #666;
+        line-height: 24px;
+    }
+</style>
 <script src="{__PLUG_PATH}echarts.common.min.js"></script>
 {/block}
 {block name="content"}

+ 14 - 0
application/admin/view/record/record/chart_coupon.php

@@ -1,5 +1,19 @@
 {extend name="public/container"}
 {block name="head_top"}
+<style>
+    .layui-input-block button{
+        border: 1px solid rgba(0,0,0,0.1);
+    }
+    .layuiadmin-badge, .layuiadmin-btn-group, .layuiadmin-span-color {
+        position: absolute;
+        right: 15px;
+    }
+    .layuiadmin-badge {
+        top: 50%;
+        margin-top: -9px;
+        color: #01AAED;
+    }
+</style>
 <script src="{__PLUG_PATH}echarts.common.min.js"></script>
 {/block}
 {block name="content"}

+ 52 - 2
application/admin/view/record/record/chart_order.php

@@ -1,5 +1,53 @@
 {extend name="public/container"}
 {block name="head_top"}
+<style>
+    .layui-input-block button{
+        border: 1px solid rgba(0,0,0,0.1);
+    }
+    .layui-card-body{
+        padding-left: 10px;
+        padding-right: 10px;
+    }
+    .layui-card-body p.layuiadmin-big-font {
+        font-size: 36px;
+        color: #666;
+        line-height: 36px;
+        padding: 5px 0 10px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        word-break: break-all;
+        white-space: nowrap;
+    }
+    .layuiadmin-badge, .layuiadmin-btn-group, .layuiadmin-span-color {
+        position: absolute;
+        right: 15px;
+    }
+    .layuiadmin-badge {
+        top: 50%;
+        margin-top: -9px;
+        color: #01AAED;
+    }
+    .layuiadmin-span-color i {
+        padding-left: 5px;
+    }
+    .block-rigit{
+        text-align: right;
+    }
+    .block-rigit button{
+        width: 100px;
+        letter-spacing: .5em;
+        line-height: 28px;
+    }
+    .layuiadmin-card-list{
+        padding: 1.6px;
+    }
+    .layuiadmin-card-list p.layuiadmin-normal-font {
+        padding-bottom: 10px;
+        font-size: 20px;
+        color: #666;
+        line-height: 24px;
+    }
+</style>
 <script src="{__PLUG_PATH}echarts.common.min.js"></script>
 {/block}
 {block name="content"}
@@ -116,8 +164,6 @@
                 typeList:[
                     {name:'全部',value:''},
                     {name:'普通',value:1},
-                    {name:'拼团',value:2},
-                    {name:'砍价',value:3},
                     {name:'秒杀',value:4},
                 ],
                 status:'',
@@ -162,6 +208,7 @@
                 setoption:function(seriesdata,xdata,legend,title,type,Zoom){
                     var _type=type || 'line';
                     var _title=title || '订单数据统计图';
+
                     switch (_type){
                         case 'line':
                             this.option={
@@ -204,6 +251,9 @@
                             };
                             break;
                     }
+                    this.option.grid = {
+                        x: 50,x2: 40,y: 60,y2: 50
+                    };
                     if(Zoom!='' && Zoom!=undefined){
                         this.option.dataZoom=[{startValue:Zoom},{type:'inside'}];
                     }

+ 48 - 4
application/admin/view/record/record/chart_product.php

@@ -1,5 +1,53 @@
 {extend name="public/container"}
 {block name="head_top"}
+<style>
+    .layui-input-block button{
+        border: 1px solid rgba(0,0,0,0.1);
+    }
+    .layui-card-body{
+        padding-left: 10px;
+        padding-right: 10px;
+    }
+    .layui-card-body p.layuiadmin-big-font {
+        font-size: 36px;
+        color: #666;
+        line-height: 36px;
+        padding: 5px 0 10px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        word-break: break-all;
+        white-space: nowrap;
+    }
+    .layuiadmin-badge, .layuiadmin-btn-group, .layuiadmin-span-color {
+        position: absolute;
+        right: 15px;
+    }
+    .layuiadmin-badge {
+        top: 50%;
+        margin-top: -9px;
+        color: #01AAED;
+    }
+    .layuiadmin-span-color i {
+        padding-left: 5px;
+    }
+    .block-rigit{
+        text-align: right;
+    }
+    .block-rigit button{
+        width: 100px;
+        letter-spacing: .5em;
+        line-height: 28px;
+    }
+    .layuiadmin-card-list{
+        padding: 1.6px;
+    }
+    .layuiadmin-card-list p.layuiadmin-normal-font {
+        padding-bottom: 10px;
+        font-size: 20px;
+        color: #666;
+        line-height: 24px;
+    }
+</style>
 <script src="{__PLUG_PATH}echarts.common.min.js"></script>
 {/block}
 {block name="content"}
@@ -333,15 +381,11 @@
                 this.getLackList();
                 this.getnegativeList();
                 this.getTuiPriesList();
-                var that=this;
                 layList.laydate.render({
                     elem:this.$refs.date_time,
                     trigger:'click',
                     eventElem:this.$refs.time,
                     range:true,
-                    change:function (value) {
-                        that.data=value;
-                    }
                 });
             }
         });

+ 52 - 4
application/admin/view/record/record/chart_rebate.php

@@ -1,5 +1,56 @@
 {extend name="public/container"}
 {block name="head_top"}
+<style>
+    .layui-input-block button{
+        border: 1px solid rgba(0,0,0,0.1);
+    }
+    .layui-card-body{
+        padding-left: 10px;
+        padding-right: 10px;
+    }
+    .layui-card-body p.layuiadmin-big-font {
+        font-size: 36px;
+        color: #666;
+        line-height: 36px;
+        padding: 5px 0 10px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        word-break: break-all;
+        white-space: nowrap;
+    }
+    .layuiadmin-badge, .layuiadmin-btn-group, .layuiadmin-span-color {
+        position: absolute;
+        right: 15px;
+    }
+    .layuiadmin-badge {
+        top: 50%;
+        margin-top: -9px;
+        color: #01AAED;
+    }
+    .layuiadmin-span-color i {
+        padding-left: 5px;
+    }
+    .block-rigit{
+        text-align: right;
+    }
+    .block-rigit button{
+        width: 100px;
+        letter-spacing: .5em;
+        line-height: 28px;
+    }
+    .layuiadmin-card-list{
+        padding: 1.6px;
+    }
+    .layuiadmin-card-list p.layuiadmin-normal-font {
+        padding-bottom: 10px;
+        font-size: 20px;
+        color: #666;
+        line-height: 24px;
+    }
+    .layadmin-text-center{
+        text-align: center;
+    }
+</style>
 <script src="{__PLUG_PATH}echarts.common.min.js"></script>
 {/block}
 {block name="content"}
@@ -236,15 +287,11 @@
                 this.getEchartsData();
                 this.getbadge();
                 this.getFanList();
-                var that=this;
                 layList.laydate.render({
                     elem:this.$refs.date_time,
                     trigger:'click',
                     eventElem:this.$refs.time,
                     range:true,
-                    change:function (value) {
-                        that.data=value;
-                    }
                 });
                 var that=this;
                 layList.baseGet(layList.U({a:'getFanCount'}),function (rem) {
@@ -259,6 +306,7 @@
                         }
                     });
                 });
+
             }
         })
     })

+ 48 - 4
application/admin/view/record/record/chart_recharge.php

@@ -1,5 +1,53 @@
 {extend name="public/container"}
 {block name="head_top"}
+<style>
+    .layui-input-block button{
+        border: 1px solid rgba(0,0,0,0.1);
+    }
+    .layui-card-body{
+        padding-left: 10px;
+        padding-right: 10px;
+    }
+    .layui-card-body p.layuiadmin-big-font {
+        font-size: 36px;
+        color: #666;
+        line-height: 36px;
+        padding: 5px 0 10px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        word-break: break-all;
+        white-space: nowrap;
+    }
+    .layuiadmin-badge, .layuiadmin-btn-group, .layuiadmin-span-color {
+        position: absolute;
+        right: 15px;
+    }
+    .layuiadmin-badge {
+        top: 50%;
+        margin-top: -9px;
+        color: #01AAED;
+    }
+    .layuiadmin-span-color i {
+        padding-left: 5px;
+    }
+    .block-rigit{
+        text-align: right;
+    }
+    .block-rigit button{
+        width: 100px;
+        letter-spacing: .5em;
+        line-height: 28px;
+    }
+    .layuiadmin-card-list{
+        padding: 1.6px;
+    }
+    .layuiadmin-card-list p.layuiadmin-normal-font {
+        padding-bottom: 10px;
+        font-size: 20px;
+        color: #666;
+        line-height: 24px;
+    }
+</style>
 <script src="{__PLUG_PATH}echarts.common.min.js"></script>
 {/block}
 {block name="content"}
@@ -149,15 +197,11 @@
                 this.setChart(this.$refs.echarts_list,'list');
                 this.setChart(this.$refs.echarts_price,'price');
                 this.getEchartsRecharge();
-                var that=this;
                 layList.laydate.render({
                     elem:this.$refs.date_time,
                     trigger:'click',
                     eventElem:this.$refs.time,
                     range:true,
-                    change:function (value) {
-                        that.data=value;
-                    }
                 });
             }
         })

+ 14 - 0
application/admin/view/record/record/chart_score.php

@@ -1,5 +1,19 @@
 {extend name="public/container"}
 {block name="head_top"}
+<style>
+    .layui-input-block button{
+        border: 1px solid rgba(0,0,0,0.1);
+    }
+    .layuiadmin-badge, .layuiadmin-btn-group, .layuiadmin-span-color {
+        position: absolute;
+        right: 15px;
+    }
+    .layuiadmin-badge {
+        top: 50%;
+        margin-top: -9px;
+        color: #01AAED;
+    }
+</style>
 <script src="{__PLUG_PATH}echarts.common.min.js"></script>
 {/block}
 {block name="content"}

+ 48 - 0
application/admin/view/record/record/chart_seckill.php

@@ -1,5 +1,53 @@
 {extend name="public/container"}
 {block name="head_top"}
+<style>
+    .layui-input-block button{
+        border: 1px solid rgba(0,0,0,0.1);
+    }
+    .layui-card-body{
+        padding-left: 10px;
+        padding-right: 10px;
+    }
+    .layui-card-body p.layuiadmin-big-font {
+        font-size: 36px;
+        color: #666;
+        line-height: 36px;
+        padding: 5px 0 10px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        word-break: break-all;
+        white-space: nowrap;
+    }
+    .layuiadmin-badge, .layuiadmin-btn-group, .layuiadmin-span-color {
+        position: absolute;
+        right: 15px;
+    }
+    .layuiadmin-badge {
+        top: 50%;
+        margin-top: -9px;
+        color: #01AAED;
+    }
+    .layuiadmin-span-color i {
+        padding-left: 5px;
+    }
+    .block-rigit{
+        text-align: right;
+    }
+    .block-rigit button{
+        width: 100px;
+        letter-spacing: .5em;
+        line-height: 28px;
+    }
+    .layuiadmin-card-list{
+        padding: 1.6px;
+    }
+    .layuiadmin-card-list p.layuiadmin-normal-font {
+        padding-bottom: 10px;
+        font-size: 20px;
+        color: #666;
+        line-height: 24px;
+    }
+</style>
 <script src="{__PLUG_PATH}echarts.common.min.js"></script>
 {/block}
 {block name="content"}

+ 15 - 0
application/admin/view/record/record/product_info.php

@@ -1,5 +1,20 @@
 {extend name="public/container"}
 {block name="head_top"}
+<style>
+    .layui-input-block button{
+        border: 1px solid rgba(0,0,0,0.1);
+        margin-bottom: 10px;
+    }
+    .layuiadmin-badge, .layuiadmin-btn-group, .layuiadmin-span-color {
+        position: absolute;
+        right: 15px;
+    }
+    .layuiadmin-badge {
+        top: 50%;
+        margin-top: -9px;
+        color: #01AAED;
+    }
+</style>
 <script src="{__PLUG_PATH}echarts.common.min.js"></script>
 {/block}
 {block name="content"}

+ 48 - 4
application/admin/view/record/record/user_attr.php

@@ -1,5 +1,53 @@
 {extend name="public/container"}
 {block name="head_top"}
+<style>
+    .layui-input-block button{
+        border: 1px solid rgba(0,0,0,0.1);
+    }
+    .layui-card-body{
+        padding-left: 10px;
+        padding-right: 10px;
+    }
+    .layui-card-body p.layuiadmin-big-font {
+        font-size: 36px;
+        color: #666;
+        line-height: 36px;
+        padding: 5px 0 10px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        word-break: break-all;
+        white-space: nowrap;
+    }
+    .layuiadmin-badge, .layuiadmin-btn-group, .layuiadmin-span-color {
+        position: absolute;
+        right: 15px;
+    }
+    .layuiadmin-badge {
+        top: 50%;
+        margin-top: -9px;
+        color: #01AAED;
+    }
+    .layuiadmin-span-color i {
+        padding-left: 5px;
+    }
+    .block-rigit{
+        text-align: right;
+    }
+    .block-rigit button{
+        width: 100px;
+        letter-spacing: .5em;
+        line-height: 28px;
+    }
+    .layuiadmin-card-list{
+        padding: 1.6px;
+    }
+    .layuiadmin-card-list p.layuiadmin-normal-font {
+        padding-bottom: 10px;
+        font-size: 20px;
+        color: #666;
+        line-height: 24px;
+    }
+</style>
 <script src="{__PLUG_PATH}echarts.common.min.js"></script>
 {/block}
 {block name="content"}
@@ -142,15 +190,11 @@
                 this.setChart(this.$refs.echarts_list,'list');
                 this.setChart(this.$refs.echarts_list_sex,'sex');
                 this.getEchartsData();
-                var that=this;
                 layList.laydate.render({
                     elem:this.$refs.date_time,
                     trigger:'click',
                     eventElem:this.$refs.time,
                     range:true,
-                    change:function (value) {
-                        that.data=value;
-                    }
                 });
             }
         })

+ 48 - 0
application/admin/view/record/record/user_business_chart.php

@@ -1,5 +1,53 @@
 {extend name="public/container"}
 {block name="head_top"}
+<style>
+    .layui-input-block button{
+        border: 1px solid rgba(0,0,0,0.1);
+    }
+    .layui-card-body{
+        padding-left: 10px;
+        padding-right: 10px;
+    }
+    .layui-card-body p.layuiadmin-big-font {
+        font-size: 36px;
+        color: #666;
+        line-height: 36px;
+        padding: 5px 0 10px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        word-break: break-all;
+        white-space: nowrap;
+    }
+    .layuiadmin-badge, .layuiadmin-btn-group, .layuiadmin-span-color {
+        position: absolute;
+        right: 15px;
+    }
+    .layuiadmin-badge {
+        top: 50%;
+        margin-top: -9px;
+        color: #01AAED;
+    }
+    .layuiadmin-span-color i {
+        padding-left: 5px;
+    }
+    .block-rigit{
+        text-align: right;
+    }
+    .block-rigit button{
+        width: 100px;
+        letter-spacing: .5em;
+        line-height: 28px;
+    }
+    .layuiadmin-card-list{
+        padding: 1.6px;
+    }
+    .layuiadmin-card-list p.layuiadmin-normal-font {
+        padding-bottom: 10px;
+        font-size: 20px;
+        color: #666;
+        line-height: 24px;
+    }
+</style>
 <script src="{__PLUG_PATH}echarts.common.min.js"></script>
 {/block}
 {block name="content"}

+ 74 - 0
application/admin/view/record/record/user_chart.php

@@ -1,5 +1,53 @@
 {extend name="public/container"}
 {block name="head_top"}
+<style>
+    .layui-input-block button{
+        border: 1px solid rgba(0,0,0,0.1);
+    }
+    .layui-card-body{
+        padding-left: 10px;
+        padding-right: 10px;
+    }
+    .layui-card-body p.layuiadmin-big-font {
+        font-size: 36px;
+        color: #666;
+        line-height: 36px;
+        padding: 5px 0 10px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        word-break: break-all;
+        white-space: nowrap;
+    }
+    .layuiadmin-badge, .layuiadmin-btn-group, .layuiadmin-span-color {
+        position: absolute;
+        right: 15px;
+    }
+    .layuiadmin-badge {
+        top: 50%;
+        margin-top: -9px;
+        color: #01AAED;
+    }
+    .layuiadmin-span-color i {
+        padding-left: 5px;
+    }
+    .block-rigit{
+        text-align: right;
+    }
+    .block-rigit button{
+        width: 100px;
+        letter-spacing: .5em;
+        line-height: 28px;
+    }
+    .layuiadmin-card-list{
+        padding: 1.6px;
+    }
+    .layuiadmin-card-list p.layuiadmin-normal-font {
+        padding-bottom: 10px;
+        font-size: 20px;
+        color: #666;
+        line-height: 24px;
+    }
+</style>
 <script src="{__PLUG_PATH}echarts.common.min.js"></script>
 {/block}
 {block name="content"}
@@ -71,6 +119,26 @@
                 </div>
             </div>
         </div>
+        <div class="layui-col-md6">
+            <div class="layui-card">
+                <div class="layui-card-header">分销商数量饼状图</div>
+                <div class="layui-card-body layui-row">
+                    <div class="layui-col-md12">
+                        <div class="layui-btn-container" ref="echarts_fenxiao" style="height:400px"></div>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div class="layui-col-md6">
+            <div class="layui-card">
+                <div class="layui-card-header">多次购物会员数量饼状图</div>
+                <div class="layui-card-body layui-row">
+                    <div class="layui-col-md12">
+                        <div class="layui-btn-container" ref="echarts_shop" style="height:400px"></div>
+                    </div>
+                </div>
+            </div>
+        </div>
     </div>
 </div>
 <script src="{__ADMIN_PATH}js/layuiList.js"></script>
@@ -118,6 +186,10 @@
                         var option=that.setoption(rem.data.seriesdata,rem.data.xdata,rem.data.Zoom);
                         console.log(option);
                         that.myChart.list.setOption(option);
+                        var fenxiao=that.setoption(rem.data.fenbu_data,rem.data.fenbu_xdata,'','分销商分布','pic');
+                        that.myChart.fenxiao.setOption(fenxiao);
+                        var shop=that.setoption(rem.data.shop_data,rem.data.shop_xdata,'','购物会员分布','pic');
+                        that.myChart.shop.setOption(shop);
                     });
                 },
                 setoption:function(seriesdata,xdata,Zoom,title,type){
@@ -187,6 +259,8 @@
             },
             mounted:function () {
                 this.setChart(this.$refs.echarts_list,'list');
+                this.setChart(this.$refs.echarts_fenxiao,'fenxiao');
+                this.setChart(this.$refs.echarts_shop,'shop');
                 this.getBadgeList();
                 this.getUserChart();
                 var that=this;

+ 48 - 0
application/admin/view/record/record/user_distribution_chart.php

@@ -1,5 +1,53 @@
 {extend name="public/container"}
 {block name="head_top"}
+<style>
+    .layui-input-block button{
+        border: 1px solid rgba(0,0,0,0.1);
+    }
+    .layui-card-body{
+        padding-left: 10px;
+        padding-right: 10px;
+    }
+    .layui-card-body p.layuiadmin-big-font {
+        font-size: 36px;
+        color: #666;
+        line-height: 36px;
+        padding: 5px 0 10px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        word-break: break-all;
+        white-space: nowrap;
+    }
+    .layuiadmin-badge, .layuiadmin-btn-group, .layuiadmin-span-color {
+        position: absolute;
+        right: 15px;
+    }
+    .layuiadmin-badge {
+        top: 50%;
+        margin-top: -9px;
+        color: #01AAED;
+    }
+    .layuiadmin-span-color i {
+        padding-left: 5px;
+    }
+    .block-rigit{
+        text-align: right;
+    }
+    .block-rigit button{
+        width: 100px;
+        letter-spacing: .5em;
+        line-height: 28px;
+    }
+    .layuiadmin-card-list{
+        padding: 1.6px;
+    }
+    .layuiadmin-card-list p.layuiadmin-normal-font {
+        padding-bottom: 10px;
+        font-size: 20px;
+        color: #666;
+        line-height: 24px;
+    }
+</style>
 <script src="{__PLUG_PATH}echarts.common.min.js"></script>
 {/block}
 {block name="content"}

+ 1 - 0
application/admin/view/setting/system_group/create.php

@@ -1,4 +1,5 @@
 <!DOCTYPE html>
+<!--suppress JSAnnotator -->
 <html lang="zh-CN">
 <head>
     {include file="public/head"}

+ 17 - 0
application/admin/view/setting/system_role/index.php

@@ -12,6 +12,23 @@
             <div class="ibox-content">
                 <div class="row">
                     <div class="m-b m-l">
+                        <?php /*  <form action="" class="form-inline">
+                              <i class="fa fa-search" style="margin-right: 10px;"></i>
+                              <select name="is_show" aria-controls="editable" class="form-control input-sm">
+                                  <option value="">是否显示</option>
+                                  <option value="1" {eq name="params.is_show" value="1"}selected="selected"{/eq}>显示</option>
+                                  <option value="0" {eq name="params.is_show" value="0"}selected="selected"{/eq}>不显示</option>
+                              </select>
+                              <select name="access" aria-controls="editable" class="form-control input-sm">
+                                  <option value="">子管理员是否可用</option>
+                                  <option value="1" {eq name="params.access" value="1"}selected="selected"{/eq}>可用</option>
+                                  <option value="0" {eq name="params.access" value="0"}selected="selected"{/eq}>不可用</option>
+                              </select>
+                          <div class="input-group">
+                              <input type="text" name="keyword" value="{$params.keyword}" placeholder="请输入关键词" class="input-sm form-control"> <span class="input-group-btn">
+                                      <button type="submit" class="btn btn-sm btn-primary"> 搜索</button> </span>
+                          </div>
+                          </form>  */ ?>
                         <form action="" class="form-inline">
 
                             <select name="status" aria-controls="editable" class="form-control input-sm">

+ 1 - 1
application/admin/view/store/store_product/attr.php

@@ -197,7 +197,7 @@
             },
             methods: {
                 getAttrPic(index){
-                    this.createFrame('选择图片','{:Url('widget.images/index')}?fodder='+index);
+                    this.createFrame('选择图片','/admin/widget.images/index/fodder/'+index+'.html');
                 },
                 createFrame:function(title,src,opt){
                     opt === undefined && (opt = {});

+ 2 - 2
application/admin/view/store/store_product/statistics.php

@@ -340,8 +340,8 @@
     });
     $('.search-item-value').each(function(){
         var that = $(this),name = that.attr('name'), value = that.val(),dom = $('.search-item[data-name="'+name+'"] .btn[data-value="'+value+'"]');
-        dom.eq(0).removeClass('btn-outline btn-link').addClass('btn-primary btn-sm')
-            .siblings().addClass('btn-outline btn-link').removeClass('btn-primary btn-sm')
+        dom.eq(0).removeClass('btn-outline btn-link').addClass('btn-primary')
+            .siblings().addClass('btn-outline btn-link').removeClass('btn-primary')
     });
     $(".btn").mouseover(function (event){
             $(this).closest('table').find("tr:eq(1)").find("td:eq(3)").find("button:eq(0)").removeClass('btn-info');

+ 279 - 122
application/admin/view/store/store_product_reply/index.php

@@ -1,147 +1,304 @@
 {extend name="public/container"}
 {block name="head_top"}
+<style>
+    .message-content .media-body {margin-bottom: 60px;}
+    .layadmin-homepage-list-imgtxt .media-body {width: auto;display: block;overflow: hidden;}
+    .layadmin-message-fluid .layui-col-md12 {background: #fff;height: auto;padding-bottom: 50px;}
+    .message-content {padding: 0 40px;}
+    .message-content .media-left {float: left;margin-right: 10px;}
+    .message-content .media-body{margin-top:10px;}
+    .message-content .media-body .pad-btm {padding-bottom: 0;}
+    .message-content .media-left img {border-radius: 50%;}
+    .layadmin-homepage-list-imgtxt .media-body .pad-btm p:first-child {padding-bottom: 5px;}
+    .layadmin-homepage-list-imgtxt .media-body .pad-btm .fontColor a {font-weight: 600;color: #337ab7;}
+    .layadmin-homepage-list-imgtxt .media-body .min-font {margin-bottom: 10px;}
+    .layui-breadcrumb {visibility: hidden;font-size: 0;}
+    .layadmin-homepage-list-imgtxt .media-body .min-font .layui-breadcrumb a {font-size: 11px;}
+    .layui-breadcrumb a {color: #999!important;}
+    .media-body .message-text {padding-top: 10px;padding-bottom: 10px;border-bottom: 1px solid #e0e0e0;}
+    .media-body .message-text .image-box{margin-top: 10px;}
+    .media-body .message-text .image-box img{max-width: 300px;max-height: 200px;margin-right: 10px;margin-bottom: 10px}
+    .message-content-btn {text-align: center;padding: 10px 0;}
+    .media-body .message-but{margin-top: 10px;}
+    .message-content .message-content-btn .layui-btn {height: auto;line-height: 26px;padding: 5px 30px;font-size: 16px;}
+    .message-content .homepage-bottom .layadmin-privateletterlist-item .meida-left img{width: 151px;height: 81px;}
+    .message-content .homepage-bottom .layadmin-privateletterlist-item{border: 1px solid #e0e0e0;margin-bottom: 10px;cursor:pointer;}
+    .message-content .homepage-bottom .layadmin-privateletterlist-item .meida-right{padding: 10px;}
+    .message-content .homepage-bottom .layadmin-privateletterlist-item.on{border: 1px solid #0092DC!important;}
+    .message-content .homepage-bottom .layadmin-privateletterlist-item .meida-right .meida-store_name{font-size: 20px;}
+    .message-content .homepage-bottom .layadmin-privateletterlist-item .centent{text-align: center;}
+    .clearfix:after {  content: "."; display: block; height: 0; clear: both; visibility: hidden;  }
+    .message-content .homepage-bottom .producr-load{text-align: center;margin-bottom: 10px}
+    .message-content .homepage-bottom .producr-load .layui-btn{margin-bottom: 10px}
+</style>
 <script src="{__PLUG_PATH}sweetalert2/sweetalert2.all.min.js"></script>
 {/block}
 {block name="content"}
-<div class="row">
-    <div class="col-sm-12">
-        <div class="ibox">
-            <div class="ibox-content">
-                <div class="row">
-                    <div class="m-b m-l">
-                        <form action="" class="form-inline">
-                            <select name="is_reply" aria-controls="editable" class="form-control input-sm">
-                                <option value="">评论状态</option>
-                                <option value="0" {eq name="where.is_reply" value="0"}selected="selected"{/eq}>未回复</option>
-                                <option value="2" {eq name="where.is_reply" value="2"}selected="selected"{/eq}>已回复</option>
-                            </select>
-                            <div class="input-group">
-                                <input type="text" name="comment" value="{$where.comment}" placeholder="请输入评论内容" class="input-sm form-control" size="38"> <span class="input-group-btn">
-                                    <button type="submit" class="btn btn-sm btn-primary"> 搜索</button> </span>
+<div class="layui-fluid">
+    <div class="layui-row layui-col-space15"  id="app">
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">搜索条件</div>
+                <div class="layui-card-body">
+                    <form class="layui-form layui-form-pane" action="">
+                        <div class="layui-form-item">
+                            <div class="layui-inline">
+                                <label class="layui-form-label">内容</label>
+                                <div class="layui-input-block">
+                                    <input type="text" name="title" class="layui-input">
+                                </div>
                             </div>
-                        </form>
-                    </div>
-                </div>
-                <div class="ibox">
-                    {volist name="list" id="vo"}
-                    <div class="col-sm-12">
-                        <div class="social-feed-box">
-                            <div class="pull-right social-action dropdown">
-                                <button data-toggle="dropdown" class="dropdown-toggle btn-white" aria-expanded="false">
-                                    <i class="fa fa-angle-down"></i>
-                                </button>
-                                <ul class="dropdown-menu m-t-xs">
-                                    {if condition="$vo['is_reply'] eq 2"}
-                                    <li><a href="#" class="reply_update"  data-url="{:Url('set_reply')}"  data-content="{$vo['merchant_reply_content']}" data-id="{$vo['id']}">编辑</a></li>
-                                    {else/}
-                                    <li><a href="#" class="reply"  data-url="{:Url('set_reply')}" data-id="{$vo['id']}">回复</a></li>
-                                    {/if}
-                                    <li><a href="#" class="delete" data-url="{:Url('delete',array('id'=>$vo['id']))}">删除</a></li>
-                                </ul>
+                            <div class="layui-inline">
+                                <label class="layui-form-label">筛选类型</label>
+                                <div class="layui-input-block">
+                                    <select name="is_reply">
+                                        <option value="">全部</option>
+                                        <option value="2">已回复</option>
+                                        <option value="0">未回复</option>
+                                    </select>
+                                </div>
                             </div>
-                                <div class="social-avatar">
-                                    <a href="" class="pull-left">
-                                        <img alt="image" src="{$vo.headimgurl}">
-                                    </a>
-                                    <div class="media-body">
-                                        <a href="#">
-                                            {$vo.nickname}
-                                        </a>
-                                        <small class="text-muted">{$vo.add_time|date='Y-m-d H:i:s',###} 来自产品: {$vo.store_name}</small>
-                                    </div>
+                            <div class="layui-inline">
+                                <div class="layui-input-inline">
+                                    <button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="search" lay-filter="search">
+                                        <i class="layui-icon layui-icon-search"></i>搜索</button>
                                 </div>
-                                <div class="social-body">
-                                    <div class="well">
-                                        {$vo.comment}
-                                        <br/>
-                                        <?php  if(!empty($vo['pics'])) $image = explode(",",$vo['pics'][0]); else $image = [];?>
-                                        {if condition="$image"}
-                                            {volist name="image" id="v"}
-                                            <img src="{$v}"  class="open_image m-t-sm" data-image="{$v}" style="width: 50px;height: 50px;cursor: pointer;">
-                                            {/volist}
-                                        {/if}
-                                    </div>
-
-                                        <p class="text-right">
-                                        <div class="btn-group">
-                                            {if condition="$vo['is_reply'] eq 2"}
-                                            <button class="btn btn-info btn-xs reply_update"  data-url="{:Url('set_reply')}"  data-content="{$vo['merchant_reply_content']}" data-id="{$vo['id']}"><i class="fa fa-paste"></i> 编辑</button>
-                                            {else/}
-                                            <button class="btn btn-primary btn-xs reply"  data-url="{:Url('set_reply')}" data-id="{$vo['id']}"><i class="fa fa-comments"></i> 回复</button>
-                                            {/if}
-                                            <button class="btn btn-warning btn-xs delete" data-url="{:Url('delete',array('id'=>$vo['id']))}"><i class="fa fa-times"></i> 删除</button>
+                            </div>
+                        </div>
+                    </form>
+                </div>
+            </div>
+        </div>
+        <div class="message-box" id="app" v-cloak="">
+            <div class="layui-col-md3" style="padding: 0 10px 0 0">
+                <div class="layui-card">
+                    <div class="layui-card-header">评论产品</div>
+                    <div class="layui-card-body layadmin-homepage-list-imgtxt message-content" ref="producr">
+                        <div class="grid-demo">
+                            <div class="layui-card homepage-bottom">
+                                <div class="layui-card-body clearfix">
+                                    <div class="layadmin-privateletterlist-item" :class="where.producr_id==0 ? 'on':'' " @click="where.producr_id=0">
+                                        <div class="meida-right centent">
+                                            <mdall class="meida-store_name">全部评论商品</mdall>
                                         </div>
-                                        </p>
-
-
-                                </div>
-                                {if condition="$vo['merchant_reply_content']"}
-                                <div class="social-footer">
-                                    <div class="social-comment">
-                                        <div class="media-body">回复时间:<small class="text-muted">{$vo.merchant_reply_time|date='Y-m-d H:i:s',###}</small></div>
                                     </div>
-                                        <div class="well m">
-                                            <p>{$vo['merchant_reply_content']}</p>
+                                    <div class="layadmin-privateletterlist-item layui-col-md6 layui-col-xs6 layui-col-lg6" :class="where.producr_id==item.id ? 'on':'' " v-for="item in productImaesList" @click="where.producr_id=item.id">
+                                        <div class="meida-left">
+                                            <img :src="item.image" @click="lockImage(item.image)">
                                         </div>
-
+                                        <div class="meida-right">
+                                            <p>¥{{item.price}}</p>
+                                            <mdall v-text="item.store_name"></mdall>
+                                        </div>
+                                    </div>
                                 </div>
-                                {/if}
+                                <div class="layui-row producr-load clearfix">
+                                    <a href="javascript:;" class="layui-btn" v-text="product.loadTitle" @click="loadList(0)">更多</a>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="layui-col-md9">
+                <div class="layui-card">
+                    <div class="layui-card-header">评论列表</div>
+                    <div class="layui-card-body layadmin-homepage-list-imgtxt message-content">
+                        <div class="media-body" v-for="(item,index) in messageList">
+                            <a href="javascript:;" class="media-left" style="float: left;">
+                                <img :src="item.avatar" height="46px" width="46px">
+                            </a>
+                            <div class="pad-btm">
+                                <p class="fontColor"><a href="javascript:;" v-text="item.nickname"></a></p>
+                                <p class="min-font">
+                                  <span class="layui-breadcrumb" style="visibility: visible;">
+                                    <a href="javascript:;" v-text="item.time"></a>
+                                  </span>
+                                </p>
+                            </div>
+                            <div class="message-text">
+                                <p v-text="item.comment"></p>
+                                <div class="image-box" v-if="item.pics.length">
+                                    <img :src="pic" alt="" v-for="pic in item.pics" @click="lockImage(pic)">
+                                </div>
+                            </div>
+                            <div class="message-but">
+                                <div class="layui-btn-group">
+                                    <button class="layui-btn layui-btn-normal layui-btn-sm" @click="edit(item,index)">{{item.merchant_reply_time ? "编辑":"回复"}}</button>
+                                    <button class="layui-btn layui-btn-danger layui-btn-sm" @click="delReply(item,index)">删除</button>
+                                </div>
+                            </div>
+                            <fieldset class="layui-elem-field" style="margin-top: 10px" v-if="item.merchant_reply_time">
+                                <legend style="font-size: 15px">回复</legend>
+                                <div class="layui-field-box" v-text="item.merchant_reply_content"></div>
+                            </fieldset>
+                        </div>
+                        <div class="layui-row message-content-btn">
+                            <div id="message"></div>
                         </div>
                     </div>
-                    {/volist}
                 </div>
-                {include file="public/inner_page"}
             </div>
         </div>
     </div>
 </div>
+<script src="{__ADMIN_PATH}js/layuiList.js"></script>
 {/block}
 {block name="script"}
-<script>
-    $('.delete').on('click',function(){
-        window.t = $(this);
-        var _this = $(this),url =_this.data('url');
-        $eb.$swal('delete',function(){
-            $eb.axios.get(url).then(function(res){
-                console.log(res);
-                if(res.status == 200 && res.data.code == 200) {
-                    $eb.$swal('success',res.data.msg);
-                    _this.parents('tr').remove();
-                }else
-                    return Promise.reject(res.data.msg || '删除失败')
-            }).catch(function(err){
-                $eb.$swal('error',err);
-            });
-        })
-    });
-    $(".open_image").on('click',function (e) {
-        var image = $(this).data('image');
-        $eb.openImage(image);
-    })
-    $('.reply').on('click',function(){
-        window.t = $(this);
-        var _this = $(this),url =_this.data('url'),rid =_this.data('id');
-        $eb.$alert('textarea',{'title':'请输入回复内容','value':''},function(result){
-            $eb.axios.post(url,{content:result,id:rid}).then(function(res){
-                if(res.status == 200 && res.data.code == 200) {
-                    $eb.swal(res.data.msg);
-                }else
-                    $eb.swal(res.data.msg);
-            });
-        })
-    });
-    $('.reply_update').on('click',function (e) {
-        window.t = $(this);
-        var _this = $(this),url =_this.data('url'),rid =_this.data('id'),content =_this.data('content');
-        $eb.$alert('textarea',{'title':'请输入回复内容','value':content},function(result){
-            $eb.axios.post(url,{content:result,id:rid}).then(function(res){
-                if(res.status == 200 && res.data.code == 200) {
-                    $eb.swal(res.data.msg);
-                }else{
-                    $eb.swal(res.data.msg);
+<script type="text/javascript">
+    require(['vue'],function(Vue) {
+        new Vue({
+            el: "#app",
+            data: {
+                productImaesList:[],
+                where:{
+                    page:1,
+                    title:'',
+                    is_reply:'',
+                    limit:10,
+                    producr_id:0,
+                    message_page:1,
+                },
+                product:{
+                    loading:false,
+                    loadend:false,
+                    loadTitle:'加载更多',
+                },
+                messageList:[],
+                message:{
+                    loading:false,
+                    loadend:false,
+                    loadTitle:'加载更多',
+                },
+                count:0,
+            },
+            watch:{
+                'where.producr_id':function (n) {
+                    this.message.loadend=false;
+                    this.where.message_page=1;
+                    this.$set(this,'messageList',[]);
+                    this.getMessageList();
+                },
+                'where.message_page':function () {
+                    this.getMessageList(true);
+                }
+            },
+            methods:{
+                delReply:function(item,index){
+                    var url = layList.U({a:'delete',p:{id:item.id}}),that=this;
+                    $eb.$swal('delete',function(){
+                        $eb.axios.get(url).then(function(res){
+                            if(res.status == 200 && res.data.code == 200) {
+                                $eb.$swal('success',res.data.msg);
+                                that.messageList.splice(index,1);
+                                that.$set(that,'messageList',that.messageList);
+                            }else
+                                return Promise.reject(res.data.msg || '删除失败')
+                        }).catch(function(err){
+                            $eb.$swal('error',err);
+                        });
+                    })
+                },
+                edit:function(item,index){
+                    var url=layList.U({a:'set_reply'}),rid=item.id;
+                    $eb.$alert('textarea',{'title':'请输入回复内容','value':item.merchant_reply_content},function(result){
+                        $eb.axios.post(url,{content:result,id:rid}).then(function(res){
+                            if(res.status == 200 && res.data.code == 200) {
+                                item.merchant_reply_time=1;
+                                item.merchant_reply_content=result;
+                                $eb.swal(res.data.msg);
+                            }else
+                                $eb.swal(res.data.msg);
+                        });
+                    })
+                },
+                loadList:function(){
+                    this.getProductImaesList();
+                },
+                lockImage:function(href){
+                    return layList.layer.open({
+                        type: 1,
+                        title: false,
+                        closeBtn: 0,
+                        shadeClose: true,
+                        content: '<img src="'+href+'" style="display: block;width: 100%;" />'
+                    });
+                },
+                getProductImaesList:function () {
+                    var that=this;
+                    if(that.product.loading) return;
+                    if(that.product.loadend) return;
+                    that.product.loadTitle='加载中';
+                    layList.baseGet(layList.U({a:'get_product_imaes_list',q:that.where}),function (res) {
+                        var list=res.data;
+                        var loadend=list.length < that.where.limit;
+                        that.where.page=that.where.page+1;
+                        that.product.loading=false;
+                        that.product.loadend=loadend;
+                        that.product.loadTitle=loadend ? '已全部加载' : '加载更多';
+                        that.productImaesList.push.apply(that.productImaesList,list);
+                        that.$set(that,'productImaesList',that.productImaesList);
+                        that.slitherMonitor();
+                    },function (res) {
+                        that.product.loading=false;
+                        that.product.loadTitle='加载更多';
+                    });
+                },
+                getMessageList:function (isFa) {
+                    var that=this;
+                    if(that.message.loading) return;
+                    if(that.message.loadend) return;
+                    that.message.loadTitle='加载中';
+                    var index=layList.layer.load(1, {shade: [0.1,'#fff'] });
+                    layList.baseGet(layList.U({a:'get_product_reply_list',q:that.where}),function (res) {
+                        var list=res.data.list;
+                        var loadend=list.length < that.where.limit;
+                        that.message.loading=false;
+                        that.message.loadend=loadend;
+                        that.count=res.data.count;
+                        that.message.loadTitle=loadend ? '已全部加载' : '加载更多';
+                        that.$set(that,'messageList',list);
+                        layList.layer.close(index);
+                        isFa || that.initPage();
+                    },function (res) {
+                        that.message.loading=false;
+                        that.message.loadTitle='加载更多';
+                        layList.layer.close(index);
+                    });
+                },
+                slitherMonitor:function () {
+                    var clientHeight=document.documentElement.clientHeight;
+                    if(this.$refs.producr.offsetHeight >= clientHeight) this.$refs.producr.style.overflowX='scroll';
+                    else this.$refs.producr.style.overflow='hidden';
+                },
+                initPage:function () {
+                    var that=this;
+                    layList.laypage.render({
+                        elem: 'message'
+                        ,count: that.count
+                        ,limit:10
+                        ,jump: function(obj){
+                            that.where.message_page=obj.curr;
+                        }
+                    });
                 }
-            });
+            },
+            mounted:function () {
+                layList.form.render();
+                this.getProductImaesList();
+                this.getMessageList();
+                //查询
+                var that=this;
+                layList.search('search',function(where){
+                    if(that.where.title==where.title && that.where.is_reply==where.is_reply) return false;
+                    that.where.title=where.title;
+                    that.where.is_reply=where.is_reply;
+                    that.where.message_page=1;
+                    that.message.loadend=false;
+                    that.getMessageList();
+                });
+            }
         })
-    });
+    })
 </script>
 {/block}

+ 1 - 3
application/admin/view/system/system_file/openfile.php

@@ -77,9 +77,7 @@
     reiframesize();//设置编辑框的尺寸
     $("#savefile").click(function(){
         $.post("{:Url('savefile')}",{comment:editor.getValue(),filepath:'{$filepath}'},function (res) {
-            if(res.code == 200) {
-                $eb.message('success',res.msg);
-            }
+             $eb.message('success',res.msg);
         },'json');
     });
     $("#undo").click(function(){

+ 7 - 15
application/admin/view/system/system_upgradeclient/index.php

@@ -2,23 +2,18 @@
 {block name="content"}
 <style>
     .code{
-        color: #97824B;
-        font-size: 3em;
-        border: 2px solid #ccc;
-        padding: 10px;
-        width: 50%;
+        color: #298dff;
+        font-size: 1.4em;
+        border: 1px solid #298dff;
+        padding: 20px 10px;
+        width: 30%;
         margin: 0 auto;
-        font-weight: 700;
-        font-family: 'Raleway', sans-serif;
         visibility: visible;
         animation-duration: 1000ms;
         animation-delay: 500ms;
         text-align: center;
-        -webkit-box-shadow:0 0 10px #000;
-        -moz-box-shadow:0 0 10px #000;
-        box-shadow:0 0 10px #000;
         cursor: pointer;
-        border-radius: 2%;
+        border-radius: .3em;
     }
     .colore{
         background-color: #CCCCCC;
@@ -154,14 +149,11 @@
                 auto_upgrad:function () {
                     var that=this;
                     if(this.count<=0) return;
-                     that.content='正在升级中请勿关闭浏览器或者页面';
                     axios.post("{:Url('auto_upgrad')}",{id:this.version_code}).then(function (rem) {
-                        if(rem.data.code==200){
+                        if(rem.data.code=200){
                             that.version_code=rem.data.data.code;
                             that.version=rem.data.data.version;
                             that.count=0;
-                        }else{
-                            that.content=rem.data.msg;
                         }
                     })
                 },

+ 1 - 1
application/admin/view/ump/store_coupon/grant.php

@@ -46,7 +46,7 @@
                                 {$vo.coupon_time}天
                             </td>
                             <td class="text-center">
-                                <button class="btn btn-primary btn-xs grant" data-url="{:Url('store.storeCouponUser/grant',array('id'=>$vo['id'],'uid'=>$uid))}" type="button"><i class="fa  fa-arrow-circle-o-right"></i> 发放
+                                <button class="btn btn-primary btn-xs grant" data-url="{:Url('ump.storeCouponUser/grant',array('id'=>$vo['id'],'uid'=>$uid))}" type="button"><i class="fa  fa-arrow-circle-o-right"></i> 发放
                                 </button>
                             </td>
                         </tr>

+ 13 - 12
application/admin/view/user/user/index.php

@@ -53,10 +53,10 @@
                 </div>
             </div>
             <div class="ibox-content" style="display: block;">
-                <div class="alert alert-success alert-dismissable">
-                    <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
-                    目前拥有{$count_user}个会员
-                </div>
+<!--                <div class="alert alert-success alert-dismissable">-->
+<!--                    <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>-->
+<!--                    目前拥有{$count_user}个会员-->
+<!--                </div>-->
                 <form class="layui-form">
                     <div class="layui-form-item">
                         <div class="layui-inline">
@@ -191,11 +191,12 @@
                         <button class="layui-btn layui-btn-sm layui-btn-normal" type="button" data-type="set_info"><i class="fa fa-check-circle-o"></i>发送站内消息</button>
                         <button class="layui-btn layui-btn-sm layui-btn-normal" type="button" data-type="refresh"><i class="layui-icon layui-icon-refresh" ></i>刷新</button>
                     </div>
-                    <table class="layui-hide" id="userList" lay-filter="userList">
-
-                    </table>
-                    <script type="text/html" id="user_type">
-                        <button type="button" class="layui-btn layui-btn-normal layui-btn-radius layui-btn-xs">{{d.user_type}}</button>
+                    <table class="layui-hide" id="userList" lay-filter="userList"></table>
+                    <script type="text/html" id="nickname">
+                        {{d.nickname}}
+                        {{# if(d.vip_name){ }}
+                        <p style="color:#dab176">{{d.vip_name}}</p>
+                        {{# } }}
                     </script>
                     <script type="text/html" id="checkboxstatus">
                         <input type='checkbox' name='status' lay-skin='switch' value="{{d.uid}}" lay-filter='status' lay-text='正常|禁止'  {{ d.status == 1 ? 'checked' : '' }}>
@@ -255,7 +256,7 @@
                 {type:'checkbox'},
                 {field: 'uid', title: '编号', width:'6%',event:'uid'},
                 {field: 'avatar', title: '头像', event:'open_image', width: '6%', templet: '<p><img class="avatar" style="cursor: pointer" class="open_image" data-image="{{d.avatar}}" src="{{d.avatar}}" alt="{{d.nickname}}"></p>'},
-                {field: 'nickname', title: '姓名'},
+                {field: 'nickname', title: '姓名',templet:'#nickname'},
                 {field: 'now_money', title: '余额',width:'6%',sort:true,event:'now_money'},
                 {field: 'pay_count', title: '购买次数',align:'center',width:'6%'},
                 {field: 'extract_count_price', title: '累计提现',align:'center',width:'6%'},
@@ -265,7 +266,7 @@
                 {field: 'add_time', title: '首次访问日期',align:'center',width:'12%'},
                 {field: 'last_time', title: '最近访问日期',align:'center',width:'12%'},
                 {field: 'status', title: '状态',templet:"#checkboxstatus",width:'6%'},
-                {field: 'user_type', title: '用户类型',templet:'#user_type',width:'6%'},
+                {field: 'user_type', title: '用户类型',width:'6%'},
                 {fixed: 'right', title: '操作', width: '10%', align: 'center', toolbar: '#barDemo'}
             ];
     });
@@ -319,7 +320,7 @@
     layList.search('search',function(where){
         if(where['user_time_type'] != '' && where['user_time'] == '') return layList.msg('请选择选择时间');
         if(where['user_time_type'] == '' && where['user_time'] != '') return layList.msg('请选择访问情况');
-        layList.reload(where);
+        layList.reload(where,true);
     });
 
     var action={

+ 8 - 2
application/admin/view/wechat/menus/index.php

@@ -38,14 +38,14 @@
                             <div class="menu-content control-body">
                                 <form action="">
                                     <div class="form-group clearfix">
-                                        <label for="" class="col-sm-3">菜单名称</label>
+                                        <label for="" class="col-sm-2">菜单名称</label>
                                         <div class="col-sm-9 group-item">
                                             <input type="text" placeholder="菜单名称" class="form-control" v-model="checkedMenu.name">
                                             <span>字数不超过13个汉字或40个字母</span>
                                         </div>
                                     </div>
                                     <div class="form-group clearfix">
-                                        <label class="col-sm-3 control-label tips" for="">规则状态</label>
+                                        <label class="col-sm-2 control-label tips" for="">规则状态</label>
                                         <div class="group-item col-sm-9">
                                             <select class="form-control m-b" name="" id="" v-model="checkedMenu.type">
                                                 <?php /*  <option value="text">文字消息</option>  */ ?>
@@ -72,6 +72,12 @@
                                         <div class="url item" :class="{show:checkedMenu.type=='view'}">
                                             <p>跳转地址</p>
                                             <input type="text" v-model="checkedMenu.url" placeholder="请输入跳转地址" class="form-control">
+                                            <p class="text-left"></p>
+                                            <div class="well well-lg">
+                                                    <span class="help-block m-b-none">首页:{$Request.domain}{:url('wap/index/index')}</span>
+                                                    <span class="help-block m-b-none">个人中心:{$Request.domain}{:url('wap/my/index')}</span>
+                                            </div>
+
                                         </div>
                                         <!-- 事件功能 -->
                                         <?php /*  <div class="feat-select item" :class="{show:type=='feat'}">

+ 3 - 1
application/admin/view/wechat/wechat_news_category/append.php

@@ -119,11 +119,13 @@
                             </div>
                         </div>
                     </form>
-                    <button type="button" class="btn btn-w-m btn-info" style="width: 100%;" @click="submit">提交保存图文</button>
                 </div>
             </div>
         </div>
     </div>
+    <div class="col-sm-8"  style="position: fixed;right:44px;bottom: 0;z-index: 999;text-align: right">
+        <button type="button" class="btn btn-w-m btn-info" style="width: 100%;" @click="submit">提交保存图文</button>
+    </div>
 </div>
 {/block}
 {block name="script"}

File diff suppressed because it is too large
+ 1 - 21
application/admin/view/wechat/wechat_news_category/create.php


File diff suppressed because it is too large
+ 1 - 20
application/admin/view/wechat/wechat_news_category/edit.php


File diff suppressed because it is too large
+ 110 - 1
application/admin/view/wechat/wechat_news_category/index.php


+ 1 - 7
application/admin/view/widget/icon.php

@@ -24,7 +24,7 @@
         }
         .form-control{
             display: inline-block;
-            width: 85%;
+            width: 75%;
         }
     </style>
 </head>
@@ -33,7 +33,6 @@
     <div class="form-group">
         <input type="email" class="form-control" id="search" placeholder="输入关键词搜索:注意全是英文">
         <button id="qingkong" class="btn btn-default">清空选择</button>
-<!--        <button id="close" class="btn btn-default">关闭</button>-->
     </div>
     <div>
         <h5> v4.3.0新增图标 </h5>
@@ -794,11 +793,6 @@
                 parent.$f.closeModal();
 
             });
-//            //close
-//            $('#close').on('click', function () {
-//                parent.$f.closeModal();
-//
-//            });
 
             //搜索图标
             $("#search").on('input',function () {