This commit is contained in:
lisong 2021-12-13 22:20:38 +08:00
parent f6543722ff
commit 4d411a2419
450 changed files with 72743 additions and 94870 deletions

View File

@ -0,0 +1,438 @@
<?php
/**
* 寄卖订单控制器
*/
namespace app\admin\controller;
use think\Request;
use app\common\model\Goods;
use app\common\model\ConsignmentOrder;
use app\common\model\ConsignmentOrderGoods;
use app\common\model\ConsignmentOrderLog;
use app\common\model\Notice;
use app\common\model\MallImage;
use app\common\validate\OrderValidate;
use app\common\validate\ConsignmentOrderValidate;
class ConsignmentOrderController extends Controller
{
//列表
public function index(Request $request, ConsignmentOrder $model)
{
$param = $request->param();
$where = [];
//订单搜素
if (!empty($param['search_key']) && !empty($param['keyword'])) {
$keyword = $param['keyword'];
switch ($param['search_key']) {
case 'order_sn':
$where[] = ['o.order_sn', 'like', '%' . $keyword . '%'];
break;
case 'user_sn':
$where[] = ['u.sn', 'like', '%' . $keyword . '%'];
break;
case 'nickname':
$where[] = ['u.nickname', 'like', '%' . $keyword . '%'];
break;
case 'user_mobile':
$where[] = ['u.mobile', 'like', '%' . $keyword . '%'];
break;
}
}
//商品名称
if (isset($param['goods_name']) && $param['goods_name'] != '') {
$where[] = ['g.goods_name', 'like', '%' . $param['goods_name'] . '%'];
}
//订单类型
if (isset($param['order_type']) && $param['order_type'] != '') {
$where[] = ['o.order_status', '=', $param['order_type']];
}
//下单时间
if (isset($param['start_time']) && $param['start_time'] != '') {
$where[] = ['o.create_time', '>=', strtotime($param['start_time'])];
}
if (isset($param['end_time']) && $param['end_time'] != '') {
$where[] = ['o.create_time', '<=', strtotime($param['end_time'])];
}
$model = $model
->alias('o')
->field('o.*,u.mobile,u.nickname,u.sn,u.avatar')
->join('user u', 'u.id = o.user_id')
->join('consignment_order_goods g', 'g.order_id = o.id')
->with(['consignment_order_goods'])
->append(['delivery_address'])
->where($where)
->order('o.id desc')
->group('o.id')
->scope('where', $param);
$data = $model->paginate($this->admin['per_page'], false, ['query'=>$request->get()]);
//关键词,排序等赋值
$this->assign($request->get());
$this->assign([
'data' => $data,
'page' => $data->render(),
'total' => $data->total(),
]);
return $this->fetch();
}
/**
* Desc: 订单详情
*/
public function detail($id, Request $request, ConsignmentOrder $model, MallImage $mimodel)
{
$order = new ConsignmentOrder();
$data = $order
->with(['user', 'consignment_order_goods','logs'])
->where('id', $id)
->find();
foreach ($data['consignment_order_goods'] as &$consignment_order_goods){
$mi_list=$mimodel->where(array('union_id'=>$consignment_order_goods['id'],'type'=>2))->select();
$consignment_order_goods['img_list']=$mi_list;
}
$this->assign([
'detail' => $data,
]);
return $this->fetch();
}
/**
* Desc: 订单审核
*/
public function examine($id, Request $request, ConsignmentOrder $model, MallImage $mimodel)
{
$order = new ConsignmentOrder();
$data = $order
->with(['user', 'consignment_order_goods','logs'])
->where('id', $id)
->find();
foreach ($data['consignment_order_goods'] as &$consignment_order_goods){
$mi_list=$mimodel->where(array('union_id'=>$consignment_order_goods['id'],'type'=>2))->select();
$consignment_order_goods['img_list']=$mi_list;
}
$this->assign([
'detail' => $data,
]);
return $this->fetch();
}
/**
* Desc: 同意
*/
public function agree(Request $request)
{
if ($this->request->isAjax()) {
$param = $request->param();
// 启动事务
ConsignmentOrderGoods::startTrans();
try{
$order_goods = ConsignmentOrderGoods::get(['id' => $param['id']]);
$order_goods->refund_status = 1;
$order_goods->evaluation_price =$param['evaluation_price'];
$order_goods->save();
$goods_count=ConsignmentOrderGoods::where(array('order_id'=>$order_goods['order_id'],'refund_status'=>0))->count();
$quanbu=0;
if($goods_count==0){
$order = ConsignmentOrder::get(['id' =>$order_goods['order_id']]);
$order->order_status = 3;
$order->total_amount =$order['total_amount']+$param['evaluation_price'];
$order->update_time = time();
$order->save();
//记录日志
ConsignmentOrderLog::record(
$order['id'],
'平台已估价'
);
$data_info=[
'user_id' => $order['user_id'],
'jm_order_id' => $order['id'],
'scene' =>102,
'time' => date('Y-m-d H:i:s')
];
Notice::noticeByScene($order['user_id'],$data_info);
$quanbu=1;
}
// 提交事务
ConsignmentOrderGoods::commit();
}catch(\Exception $e){
// 回滚事务
ConsignmentOrderGoods::rollback();
return error($e->getMessage());
}
return success('操作成功','',$quanbu);
}
}
/**
* Desc: 拒绝
*/
public function refuse(Request $request, ConsignmentOrder $model)
{
if ($this->request->isAjax()) {
$param = $request->param();
// 启动事务
ConsignmentOrderGoods::startTrans();
try{
$order_goods = ConsignmentOrderGoods::get(['id' => $param['id']]);
$order_goods->refund_status = 2;
$order_goods->refund_remarks =$param['remark'];
$order_goods->save();
$goods_count=ConsignmentOrderGoods::where(array('order_id'=>$order_goods['order_id'],'refund_status'=>0))->count();
$quanbu=0;
if($goods_count==0){
$order = ConsignmentOrder::get(['id' =>$order_goods['order_id']]);
$order->order_status = 1;
$order->update_time = time();
$order->save();
//记录日志
ConsignmentOrderLog::record(
$order['id'],
'平台已估价'
);
$data_info=[
'user_id' => $order['user_id'],
'jm_order_id' => $order['id'],
'scene' =>102,
'time' => date('Y-m-d H:i:s')
];
Notice::noticeByScene($order['user_id'],$data_info);
$quanbu=1;
}
// 提交事务
ConsignmentOrderGoods::commit();
}catch(\Exception $e){
// 回滚事务
ConsignmentOrderGoods::rollback();
return error($e->getMessage());
}
return success('操作成功','',$quanbu);
}
}
/**
* Desc: 订单取货
*/
public function pickup($id, Request $request, ConsignmentOrder $model, MallImage $mimodel)
{
$order = new ConsignmentOrder();
$data = $order
->with(['user', 'consignment_order_goods','logs'])
->where('id', $id)
->find();
foreach ($data['consignment_order_goods'] as &$consignment_order_goods){
$mi_list=$mimodel->where(array('union_id'=>$consignment_order_goods['id'],'type'=>2))->select();
$consignment_order_goods['img_list']=$mi_list;
}
$this->assign([
'detail' => $data,
]);
return $this->fetch();
}
/**
* Desc: 取货操作
*/
public function pickuphandle(Request $request, ConsignmentOrder $model, OrderValidate $validate)
{
if ($request->isAjax()) {
$param = $request->param();
$validate_result = $validate->scene('hansle')->check($param);
if (!$validate_result) {
return error($validate->getError());
}
$order_id = $param['order_id'];
$order = ConsignmentOrder::get(['id' => $order_id]);
if ($order['order_status']!='4'){
return error('该订单状态下,无法进行取货操作');
}
// 启动事务
ConsignmentOrder::startTrans();
try{
//更新订单下商品的发货状态
$order->update_time = time();
$order->order_status = 5;
$order->save();
//记录日志
ConsignmentOrderLog::record(
$order['id'],
'平台安排取货',
'物流公司:'.$param['invoice_name'].',物流单号:'.$param['invoice_no']
);
$data_info=[
'user_id' => $order['user_id'],
'jm_order_id' => $order['id'],
'scene' =>103,
'shipping_name' => $param['invoice_name'],
'invoice_no' => $param['invoice_no'],
'time' => date('Y-m-d H:i:s')
];
Notice::noticeByScene($order['user_id'],$data_info);
// 提交事务
ConsignmentOrder::commit();
}catch(\Exception $e){
// 回滚事务
ConsignmentOrder::rollback();
return error($e->getMessage());
}
return success('操作成功');
}
}
/**
* Desc: 订单商品退回
*/
public function return($id, Request $request, ConsignmentOrder $model, MallImage $mimodel)
{
$order = new ConsignmentOrder();
$data = $order
->with(['user', 'consignment_order_goods','logs'])
->where('id', $id)
->find();
foreach ($data['consignment_order_goods'] as &$consignment_order_goods){
$mi_list=$mimodel->where(array('union_id'=>$consignment_order_goods['id'],'type'=>2))->select();
$consignment_order_goods['img_list']=$mi_list;
}
$this->assign([
'detail' => $data,
]);
return $this->fetch();
}
/**
* Desc: 退回操作
*/
public function returnhandle(Request $request)
{
if ($this->request->isAjax()) {
$param = $request->param();
// 启动事务
ConsignmentOrderGoods::startTrans();
try{
$order_goods = ConsignmentOrderGoods::get(['id' => $param['id']]);
$order_goods->refund_status = 3;
$order_goods->refund_remarks ='物流公司:'.$param['invoice_name'].',物流单号:'.$param['invoice_no'];
$order_goods->save();
$goods_count=ConsignmentOrderGoods::where(array('order_id'=>$order_goods['order_id'],'refund_status'=>1))->count();
$order = ConsignmentOrder::get(['id' =>$order_goods['order_id']]);
$order->order_status = 6;
$quanbu=0;
if($goods_count==0){
$quanbu=1;
$order->order_status = 7;
}
$order->total_amount =$order['total_amount']-$order_goods['evaluation_price'];
$order->update_time = time();
$order->save();
//记录日志
ConsignmentOrderLog::record(
$order['id'],
'平台退回商品',
'商品名称:'.$order_goods['goods_name'].',物流公司:'.$param['invoice_name'].',物流单号:'.$param['invoice_no']
);
$data_info=[
'user_id' => $order['user_id'],
'jm_order_id' => $order['id'],
'scene' =>104,
'shipping_name' => $param['invoice_name'],
'invoice_no' => $param['invoice_no'],
'time' => date('Y-m-d H:i:s')
];
Notice::noticeByScene($order['user_id'],$data_info);
// 提交事务
ConsignmentOrderGoods::commit();
}catch(\Exception $e){
// 回滚事务
ConsignmentOrderGoods::rollback();
return error($e->getMessage());
}
return success('操作成功','',$quanbu);
}
}
/**
* Desc: 订单商品上架
*/
public function shelves($id, Request $request, ConsignmentOrder $model, MallImage $mimodel)
{
$order = new ConsignmentOrder();
$data = $order
->with(['user', 'consignment_order_goods','logs'])
->where('id', $id)
->find();
foreach ($data['consignment_order_goods'] as &$consignment_order_goods){
$mi_list=$mimodel->where(array('union_id'=>$consignment_order_goods['id'],'type'=>2))->select();
$consignment_order_goods['img_list']=$mi_list;
}
$this->assign([
'detail' => $data,
]);
return $this->fetch();
}
/**
* Desc: 上架操作
*/
public function shelveshandle(Request $request)
{
if ($this->request->isAjax()) {
$param = $request->param();
$order_goods = ConsignmentOrderGoods::get(['id' => $param['id']]);
$goods = Goods::get(['code' =>$param['goods_sn']]);
if(!$goods){
return error('该商品未上架,无法找到给商品信息');
}
$goods_l_count=ConsignmentOrderGoods::where(array('goods_id'=>$goods['id']))->count();
if($goods_l_count>0){
return error('该商品已上架,无需重复上架该商品');
}
// 启动事务
ConsignmentOrderGoods::startTrans();
try{
$order_goods->refund_status = 4;
$order_goods->goods_id =$goods['id'];
$order_goods->save();
$goods_count=ConsignmentOrderGoods::where(array('order_id'=>$order_goods['order_id'],'refund_status'=>1))->count();
$order = ConsignmentOrder::get(['id' =>$order_goods['order_id']]);
$quanbu=0;
if($goods_count==0){
$quanbu=1;
$order->order_status = 2;
$order->update_time = time();
$order->save();
}
//记录日志
ConsignmentOrderLog::record(
$order['id'],
'平台上架商品',
'商品名称:'.$order_goods['goods_name']
);
$data_info=[
'user_id' => $order['user_id'],
'jm_order_id' => $order['id'],
'scene' =>105,
'time' => date('Y-m-d H:i:s')
];
Notice::noticeByScene($order['user_id'],$data_info);
// 提交事务
ConsignmentOrderGoods::commit();
}catch(\Exception $e){
// 回滚事务
ConsignmentOrderGoods::rollback();
return error($e->getMessage());
}
return success('操作成功','',$quanbu);
}
}
}

View File

@ -50,8 +50,9 @@ class GoodsBrandController extends Controller
return $result ? success('添加成功',$url) : error();
}
$this->assign([
'capital' => range('A','Z'),
]);
return $this->fetch();
}
@ -74,7 +75,7 @@ class GoodsBrandController extends Controller
$this->assign([
'data' => $data,
'capital' => range('A','Z'),
]);
return $this->fetch('add');

View File

@ -9,8 +9,10 @@ use think\Request;
use app\common\model\Goods;
use app\common\model\MallImage;
use app\common\model\GoodsCategory;
use app\common\model\Brand;
use app\common\model\GoodsBrand;
use app\common\model\GoodsAttrCategory;
use app\common\model\ShopConfig;
use app\common\model\GoodsItem;
use app\common\validate\GoodsValidate;
@ -36,7 +38,7 @@ class GoodsController extends Controller
}
//添加
public function add(Request $request, Goods $model,MallImage $mimode, GoodsValidate $validate)
public function add(Request $request, Goods $model,MallImage $mimode,GoodsItem $gimode, GoodsValidate $validate)
{
if ($request->isPost()) {
$param = $request->param();
@ -44,14 +46,22 @@ class GoodsController extends Controller
if (!$validate_result) {
return error($validate->getError());
}
$goods_ids=$param['goods_ids'];
$field_data = array();
foreach ($goods_ids as $key => $value) {
if($param['goods_ids'][$key][0]){
$field_data[] =$param['goods_ids'][$key][0];
}
}
$param['collocation_goods']=json_encode(array_unique($field_data));
$param['detail'] = $request->param(false)['detail'];
// 启动事务
$model->startTrans();
try{
$model::create($param);
$goods_id=$model->getLastInsID();
goods_imgs_upload($goods_id,1,$param['ori_img'],$param['thumb_img'],$param['ori_fm_img'],$param['thumb_img_f']);
$gimode->goods_item_upload($goods_id,$param);
// 提交事务
$model->commit();
}catch(\Exception $e){
@ -67,16 +77,26 @@ class GoodsController extends Controller
return success('添加成功',$url);
}
$size_list=ShopConfig::get('website', 'size');
$size_list=explode(',',$size_list);
foreach ($size_list as $key => $value) {
$size[$key]['size']=$value;
$size[$key]['num']=0;
}
$this->assign([
'goods_category_list' => $this->getSelectList(new GoodsCategory),
'brand_list' =>GoodsBrand::all(),
'imgurl_list'=>array(),
'number'=>0,
'collocation_goods'=>array(),
'size_list' =>$size,
'goods_list' => Goods::all()
]);
return $this->fetch();
}
//修改
public function edit($id, Request $request, Goods $model ,MallImage $mimode, GoodsValidate $validate)
public function edit($id, Request $request, Goods $model ,MallImage $mimode,GoodsItem $gimode, GoodsValidate $validate)
{
$data = $model::get($id);
@ -86,14 +106,21 @@ class GoodsController extends Controller
if (!$validate_result) {
return error($validate->getError());
}
$param['detail'] = $request->param(false)['detail'];
$goods_ids=$param['goods_ids'];
$field_data = array();
foreach ($goods_ids as $key => $value) {
if($param['goods_ids'][$key][0]){
$field_data[] =$param['goods_ids'][$key][0];
}
}
$param['collocation_goods']=json_encode(array_unique($field_data));
// 启动事务
$model->startTrans();
try{
$data->save($param);
$MallImage=$mimode->where(array('type'=>1,'union_id'=>$id))->select();
goods_imgs_upload($id,1,$param['ori_img'],$param['thumb_img'],$param['ori_fm_img'],$param['thumb_img_f'],$MallImage);
$gimode->goods_item_upload($id,$param);
// 提交事务
$model->commit();
}catch(\Exception $e){
@ -113,12 +140,30 @@ class GoodsController extends Controller
$thumb_img = $v['thumb_image'];
}
}
$collocation_goods=json_decode($data['collocation_goods']);
$goods_item_list=GoodsItem::where(array('goods_id'=>$id))->select();
$goods_item=array();
foreach ($goods_item_list as $key => $value) {
$goods_item[$value['spec_value']]=$value['stock'];
}
$size_list=ShopConfig::get('website', 'size');
$size_list=explode(',',$size_list);
foreach ($size_list as $key => $value) {
$size[$key]['size']=$value;
$num=$goods_item[$value]??'0';
$size[$key]['num']=$num;
}
$this->assign([
'data' => $data,
'goods_category_list' => $this->getSelectList(new GoodsCategory, $data->goods_category_id),
'brand_list' =>GoodsBrand::all(),
'ori_img'=>$ori_img,
'thumb_img'=>$thumb_img,
'imgurl_list'=>$imgurl_list,
'number'=>count($collocation_goods),
'collocation_goods'=>$collocation_goods,
'size_list' =>$size,
'goods_list' => Goods::all()
]);
return $this->fetch('add');

View File

@ -0,0 +1,131 @@
<?php
/**
* 首页栏目商品控制器
*/
namespace app\admin\controller;
use think\Request;
use app\common\model\GoodsIndex;
use app\common\model\Goods;
use app\common\validate\GoodsIndexValidate;
class GoodsIndexController extends Controller
{
//列表
public function index(Request $request, GoodsIndex $model)
{
$param = $request->param();
$model = $model->scope('where', $param);
$data = $model->paginate($this->admin['per_page'], false, ['query'=>$request->get()]);
//关键词,排序等赋值
$this->assign($request->get());
$this->assign([
'data' => $data,
'page' => $data->render(),
'total' => $data->total(),
]);
return $this->fetch();
}
//添加
public function add(Request $request, GoodsIndex $model, GoodsIndexValidate $validate)
{
if ($request->isPost()) {
$param = $request->param();
$validate_result = $validate->scene('add')->check($param);
if (!$validate_result) {
return error($validate->getError());
}
$goods_ids=$param['goods_id'];
$field_data = array();
foreach ($goods_ids as $key => $value) {
if($param['goods_id'][$key][0]){
$field_data[] =$param['goods_id'][$key][0];
}
}
if(count($field_data)=='0'){
return error('请选择商品');
}
$param['goods_ids']=json_encode(array_unique($field_data));
$result = $model::create($param);
$url = URL_BACK;
if(isset($param['_create']) && $param['_create']==1){
$url = URL_RELOAD;
}
return $result ? success('添加成功',$url) : error();
}
$this->assign([
'goods_list' => Goods::all(),
'number'=>0,
'goods_ids'=>array()
]);
return $this->fetch();
}
//修改
public function edit($id, Request $request, GoodsIndex $model, GoodsIndexValidate $validate)
{
$data = $model::get($id);
if ($request->isPost()) {
$param = $request->param();
$validate_result = $validate->scene('edit')->check($param);
if (!$validate_result) {
return error($validate->getError());
}
$goods_ids=$param['goods_id'];
$field_data = array();
foreach ($goods_ids as $key => $value) {
if($param['goods_id'][$key][0]){
$field_data[] =$param['goods_id'][$key][0];
}
}
if(count($field_data)=='0'){
return error('请选择商品');
}
$param['goods_ids']=json_encode(array_unique($field_data));
$result = $data->save($param);
return $result ? success() : error();
}
$goods_ids=json_decode($data['goods_ids']);
$this->assign([
'data' => $data,
'number'=>count($goods_ids),
'goods_list' => Goods::all(),
'goods_ids'=>$goods_ids
]);
return $this->fetch('add');
}
//删除
public function del($id, GoodsIndex $model)
{
if (count($model->noDeletionId) > 0) {
if (is_array($id)) {
if (array_intersect($model->noDeletionId, $id)) {
return error('ID为' . implode(',', $model->noDeletionId) . '的数据无法删除');
}
} else if (in_array($id, $model->noDeletionId)) {
return error('ID为' . $id . '的数据无法删除');
}
}
if ($model->softDelete) {
$result = $model->whereIn('id', $id)->useSoftDelete('delete_time', time())->delete();
} else {
$result = $model->whereIn('id', $id)->delete();
}
return $result ? success('操作成功', URL_RELOAD) : error();
}
}

View File

@ -24,12 +24,12 @@ class IndexController extends Controller
$time = date('Y-m-d H:i:s', time());
//今日成交订单
$order_num_today = Db::name('order')
->where(['order_type' =>1])
->where(['order_status' =>1])
->whereTime('create_time', 'today')
->count();
//昨日
$order_num_yesterday = Db::name('order')
->where(['order_type' =>1])
->where(['order_status' =>1])
->whereTime('create_time', 'yesterday')
->count();
//变化
@ -39,22 +39,22 @@ class IndexController extends Controller
}
//总
$order_num_all = Db::name('order')
->where(['order_type' =>1])
->where(['order_status' =>1])
->count();
//今日销售金额(元)
$order_amount_today = Db::name('order')
->where(['order_type' =>1])
->where(['order_status' =>1])
->whereTime('create_time', 'today')
->sum('order_price');
->sum('total_amount');
//昨日
$order_amount_yesterday = Db::name('order')
->where(['order_type' =>1])
->where(['order_status' =>1])
->whereTime('create_time', 'yesterday')
->sum('order_price');
->sum('total_amount');
//总
$order_amount_all = Db::name('order')
->where(['order_type' =>1])
->sum('order_price');
->where(['order_status' =>1])
->sum('total_amount');
//变化
$order_amount_change = $order_amount_today - $order_amount_yesterday;
if ($order_amount_change >= 0) {

View File

@ -7,6 +7,7 @@ namespace app\admin\controller;
use think\Request;
use app\common\model\Order;
use app\common\model\MallImage;
use app\common\validate\OrderValidate;
@ -14,7 +15,7 @@ class OrderController extends Controller
{
//列表
public function index(Request $request, Order $model)
public function index(Request $request, Order $model, MallImage $mimodel)
{
$param = $request->param();
$where = [];
@ -39,7 +40,7 @@ class OrderController extends Controller
//商品名称
if (isset($param['goods_name']) && $param['goods_name'] != '') {
$where[] = ['o.goods_name', 'like', '%' . $param['goods_name'] . '%'];
$where[] = ['g.goods_name', 'like', '%' . $param['goods_name'] . '%'];
}
//订单类型
@ -58,12 +59,21 @@ class OrderController extends Controller
->alias('o')
->field('o.*,u.mobile,u.nickname,u.sn,u.avatar')
->join('user u', 'u.id = o.user_id')
->join('order_goods g', 'g.order_id = o.id')
->with(['order_goods'])
->append(['delivery_address'])
->where($where)
->order('o.id desc')
->group('o.id')
->scope('where', $param);
$data = $model->paginate($this->admin['per_page'], false, ['query'=>$request->get()]);
foreach ($data as $key => $value) {
foreach ($value['order_goods'] as &$order_goods){
$mi_info=$mimodel->where(array('union_id'=>$order_goods['goods_id'],'type'=>1,'is_cover'=>1))->find();
$order_goods['img']=$mi_info['thumb_image'];
}
}
//关键词,排序等赋值
$this->assign($request->get());
@ -74,4 +84,78 @@ class OrderController extends Controller
]);
return $this->fetch();
}
/**
* Desc: 订单详情
*/
public function detail($id, Request $request, Order $model, MallImage $mimodel)
{
$order = new Order();
$data = $order
->with(['user', 'order_goods'])
->where('id', $id)
->append(['delivery_address'])
->find();
foreach ($data['order_goods'] as &$order_goods){
$mi_info=$mimodel->where(array('union_id'=>$order_goods['goods_id'],'type'=>1,'is_cover'=>1))->find();
$order_goods['img']=$mi_info['thumb_image'];
}
$this->assign([
'detail' => $data,
]);
return $this->fetch();
}
/**
* Desc: 订单详情
*/
public function delivery($id, Request $request, Order $model, MallImage $mimodel)
{
$order = new Order();
$data = $order
->with(['user', 'order_goods'])
->where('id', $id)
->append(['delivery_address'])
->find();
foreach ($data['order_goods'] as &$order_goods){
$mi_info=$mimodel->where(array('union_id'=>$order_goods['goods_id'],'type'=>1,'is_cover'=>1))->find();
$order_goods['img']=$mi_info['thumb_image'];
}
$this->assign([
'detail' => $data,
]);
return $this->fetch();
}
/**
* Desc: 发货操作
*/
public function deliveryHandle(Request $request, Order $model, OrderValidate $validate)
{
if ($request->isAjax()) {
$param = $request->param();
$validate_result = $validate->scene('hansle')->check($param);
if (!$validate_result) {
return error($validate->getError());
}
$model->delivery_handle($param);
return success('发货成功');
}
}
/**
* Desc: 确认收货
*/
public function confirm(Request $request, Order $model)
{
if ($this->request->isAjax()) {
$param = $request->param();
$order = Order::get(['id' => $param['order_id']]);
$order->order_status = 3;
$order->update_time = time();
$order->confirm_take_time = time();
$order->save();
return success('确认成功');
}
}
}

View File

@ -0,0 +1,106 @@
<?php
/**
* 品相配置控制器
*/
namespace app\admin\controller;
use think\Request;
use app\common\model\PhaseConfig;
use app\common\validate\PhaseConfigValidate;
class PhaseConfigController extends Controller
{
//列表
public function index(Request $request, PhaseConfig $model)
{
$param = $request->param();
$model = $model->scope('where', $param);
$data = $model->paginate($this->admin['per_page'], false, ['query'=>$request->get()]);
//关键词,排序等赋值
$this->assign($request->get());
$this->assign([
'data' => $data,
'page' => $data->render(),
'total' => $data->total(),
]);
return $this->fetch();
}
//添加
public function add(Request $request, PhaseConfig $model, PhaseConfigValidate $validate)
{
if ($request->isPost()) {
$param = $request->param();
$validate_result = $validate->scene('add')->check($param);
if (!$validate_result) {
return error($validate->getError());
}
$result = $model::create($param);
$url = URL_BACK;
if(isset($param['_create']) && $param['_create']==1){
$url = URL_RELOAD;
}
return $result ? success('添加成功',$url) : error();
}
return $this->fetch();
}
//修改
public function edit($id, Request $request, PhaseConfig $model, PhaseConfigValidate $validate)
{
$data = $model::get($id);
if ($request->isPost()) {
$param = $request->param();
$validate_result = $validate->scene('edit')->check($param);
if (!$validate_result) {
return error($validate->getError());
}
$result = $data->save($param);
return $result ? success() : error();
}
$this->assign([
'data' => $data,
]);
return $this->fetch('add');
}
//删除
public function del($id, PhaseConfig $model)
{
if (count($model->noDeletionId) > 0) {
if (is_array($id)) {
if (array_intersect($model->noDeletionId, $id)) {
return error('ID为' . implode(',', $model->noDeletionId) . '的数据无法删除');
}
} else if (in_array($id, $model->noDeletionId)) {
return error('ID为' . $id . '的数据无法删除');
}
}
if ($model->softDelete) {
$result = $model->whereIn('id', $id)->useSoftDelete('delete_time', time())->delete();
} else {
$result = $model->whereIn('id', $id)->delete();
}
return $result ? success('操作成功', URL_RELOAD) : error();
}
}

View File

@ -14,59 +14,19 @@ use app\common\validate\ShopConfigValidate;
class ShopConfigController extends Controller
{
//每日收益
public function shouyi(Request $request, ShopConfig $model, ShopConfigValidate $validate)
{
if ($request->isPost()) {
$param = $request->param();
ShopConfig::set('shouyi', 'time', $param['time']);
ShopConfig::set('shouyi', 'num', $param['num']);
$url = URL_RELOAD;
return success('添加成功',$url);
}
$config = [
'time' => ShopConfig::get('shouyi', 'time'),
'num' => ShopConfig::get('shouyi', 'num'),
];
$this->assign([
'config' => $config,
]);
return $this->fetch();
}
//分销管理
public function fenxiao(Request $request, ShopConfig $model, ShopConfigValidate $validate)
{
if ($request->isPost()) {
$param = $request->param();
ShopConfig::set('fenxiao', 'first_ratio', $param['first_ratio']);
ShopConfig::set('fenxiao', 'second_ratio', $param['second_ratio']);
ShopConfig::set('fenxiao', 'number', $param['number']);
$url = URL_RELOAD;
return success('添加成功',$url);
}
$config = [
'first_ratio' => ShopConfig::get('fenxiao', 'first_ratio'),
'second_ratio' => ShopConfig::get('fenxiao', 'second_ratio'),
'number' => ShopConfig::get('fenxiao', 'number'),
];
$this->assign([
'config' => $config,
]);
return $this->fetch();
}
//政策协议
public function policy(Request $request, ShopConfig $model, ShopConfigValidate $validate)
{
if ($request->isPost()) {
$param = $request->param();
ShopConfig::set('policy', 'integral_rule', $param['integral_rule']);
ShopConfig::set('policy', 'procedure', $param['procedure']);
ShopConfig::set('policy', 'rule', $param['rule']);
$url = URL_RELOAD;
return success('添加成功',$url);
}
$config = [
'integral_rule' => ShopConfig::get('policy', 'integral_rule'),
'procedure' => ShopConfig::get('policy', 'procedure'),
'rule' => ShopConfig::get('policy', 'rule'),
];
$this->assign([
'config' => $config,
@ -98,33 +58,6 @@ class ShopConfigController extends Controller
return $this->fetch();
}
//试用设备设置
public function goods(Request $request, Goods $gmodel, ShopConfigValidate $validate)
{
if ($request->isPost()) {
$param = $request->param();
ShopConfig::set('goods', 'goods_id', $param['goods_id']);
ShopConfig::set('goods', 'day', $param['day']);
ShopConfig::set('goods', 'is_withdraw', $param['is_withdraw']);
ShopConfig::set('goods', 'is_first', $param['is_first']);
ShopConfig::set('goods', 'is_open', $param['is_open']);
$url = URL_RELOAD;
return success('添加成功',$url);
}
$config = [
'goods_id' => ShopConfig::get('goods', 'goods_id'),
'day' => ShopConfig::get('goods', 'day'),
'is_withdraw' => ShopConfig::get('goods', 'is_withdraw'),
'is_first' => ShopConfig::get('goods', 'is_first'),
'is_open' => ShopConfig::get('goods', 'is_open'),
'goods_list'=>Goods::all(),
];
$this->assign([
'config' => $config,
]);
return $this->fetch();
}
//网站设置
public function website(Request $request, ShopConfig $model, ShopConfigValidate $validate)
{
@ -133,7 +66,9 @@ class ShopConfigController extends Controller
ShopConfig::set('website', 'APPID', $param['APPID']);
ShopConfig::set('website', 'APPSECRET', $param['APPSECRET']);
ShopConfig::set('website', 'img_url', $param['img_url']);
ShopConfig::set('website', 'tel', $param['tel']);
ShopConfig::set('website', 'size', $param['size']);
ShopConfig::set('website', 'size_img', $param['size_img']);
ShopConfig::set('website', 'channel', $param['channel']);
$url = URL_RELOAD;
return success('添加成功',$url);
}
@ -141,7 +76,9 @@ class ShopConfigController extends Controller
'APPID' => ShopConfig::get('website', 'APPID'),
'APPSECRET' => ShopConfig::get('website', 'APPSECRET'),
'img_url' => ShopConfig::get('website', 'img_url'),
'tel' => ShopConfig::get('website', 'tel'),
'size' => ShopConfig::get('website', 'size'),
'size_img' => ShopConfig::get('website', 'size_img'),
'channel' => ShopConfig::get('website', 'channel'),
];
$this->assign([
'config' => $config,

View File

@ -9,6 +9,7 @@ use think\Request;
use app\common\model\User;
use app\common\model\Order;
use app\common\model\Goods;
use app\common\model\AccountLog;
use app\common\validate\UserValidate;
use app\common\validate\OrderValidate;
@ -31,10 +32,10 @@ class UserController extends Controller
}
//提现积分
if(isset($param['integral_start']) && $param['integral_start']){
$where[] = ['integral','>=',$param['integral_start']];
$where[] = ['user_money','>=',$param['integral_start']];
}
if(isset($param['integral_end']) && $param['integral_end']){
$where[] = ['integral','<=',$param['integral_end']];
$where[] = ['user_money','<=',$param['integral_end']];
}
//注册时间
if(isset($param['start_time']) && $param['start_time']!=''){
@ -169,46 +170,44 @@ class UserController extends Controller
return $result ? success('操作成功', URL_RELOAD) : error();
}
//分配设备
public function equipmentadd(Request $request,Order $omodel)
//账户调整
public function adjust_account($id, Request $request, User $model)
{
$data = $model::get($id);
if ($request->isPost()) {
$param = $request->param();
$goods_ids=$param['goods_id'];
if(count($goods_ids)==0){
return error('请选择设备信息');
}
$field_data = array();
foreach ($goods_ids as $key => $value) {
if($param['goods_id'][$key][0] && $param['number'][$key][0] && $param['end_time'][$key][0]){
$goods_info=Goods::where(array('id'=>$param['goods_id'][$key][0]))->find()->toArray();
$field_data[] = [
'order_no'=>get_order_sn(),
'goods_id' => $param['goods_id'][$key][0],
'number' => $param['number'][$key][0],
'end_time' => strtotime($param['end_time'][$key][0]),
'user_id' => $param['id'],
'goods_name' => $goods_info['name'],
'attr' => $goods_info['attr'],
'order_price' => $goods_info['price']*$param['number'][$key][0],
'create_time'=>time(),
];
$post_data = $request->param();
User::startTrans();
try {
$number = $post_data['money'];
$change_type = 1;
$money_sql = User::raw('user_money + ' . $post_data['money']);
if ($post_data['money_handle'] == 0) {
$change_type = 2;
$money_sql = User::raw('user_money - ' . $post_data['money']);
}
$update_data['user_money'] = $money_sql;
User::where('id', $post_data['id'])->update($update_data);
//账户变动记录
AccountLog::AccountRecord(
$post_data['id'],
$post_data['money'],
$change_type,
100,
$post_data['money_remark']
);
User::commit();
} catch (Exception $e) {
User::rollback();
return error($e->getMessage());
}
if(count($field_data)==0){
return error('请检查设备信息是否填写完整');
}
$result = $omodel->insertAll($field_data);
$url = URL_BACK;
if (isset($param['_create']) && $param['_create'] == 1) {
$url = URL_RELOAD;
}
return $result ? success('添加成功', $url) : error();
return success('调整成功');
}
$this->assign([
'goods_list' => Goods::all(),
'info' => $data,
]);
return $this->fetch();
}
}

View File

@ -0,0 +1,270 @@
{extend name="layout1" /}
{block name='content'}
<style>
.layui-form-label{
width:180px;
}
.div-flex {
display: flex;
align-items: center;
justify-content: left;
}
.width-160 {
width: 200px;
float: left;
display: block;
padding: 9px 15px;
font-weight: 400;
}
.layui-table th {
text-align: center;
}
.table-margin{
margin-left: 50px;
margin-right: 50px;
text-align: center;
}
.image{
height:50px;
width: 50px;
}
.mt50{
margin-left: 50px;
}
</style>
<div class="layui-card-body" >
<!--基本信息-->
<div class="layui-form" lay-filter="layuiadmin-form-order" id="layuiadmin-form-order" >
<input type="hidden" class="order_id" name="order_id" value="{$detail.id}">
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>订单信息</legend>
</fieldset>
</div>
<div class="layui-form-item div-flex">
<label class="layui-form-label ">订单编号:</label>
<div class="width-160">{$detail.order_sn}</div>
<label class="layui-form-label ">订单状态:</label>
<div class="width-160">{$detail.order_status_text}</div>
<label class="layui-form-label ">下单时间:</label>
<div class="width-160">{$detail.create_time}</div>
</div>
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>会员信息</legend>
</fieldset>
</div>
<div class="layui-form-item div-flex">
<label class="layui-form-label ">会员编号:</label>
<div class="width-160">{$detail.user.sn}</div>
<label class="layui-form-label ">会员昵称:</label>
<div class="width-160">{$detail.user.nickname}</div>
<label class="layui-form-label ">手机号码:</label>
<div class="width-160">{$detail.user.mobile}</div>
<label class="layui-form-label ">注册时间:</label>
<div class="width-160">{$detail.user.create_time}</div>
</div>
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>取货信息</legend>
</fieldset>
</div>
<div class="layui-form-item div-flex">
<label class="layui-form-label ">取货人:</label>
<div class="width-160">{$detail.consignee}</div>
<label class="layui-form-label ">手机号:</label>
<div class="width-160">{$detail.mobile}</div>
<label class="layui-form-label ">取货地址:</label>
<div class="width-160">{$detail.address}</div>
</div>
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>退货信息</legend>
</fieldset>
</div>
{eq name="$detail.is_return" value="1"}
<div class="layui-form-item div-flex">
<label class="layui-form-label ">退货人:</label>
<div class="width-160">{$detail.consignee}</div>
<label class="layui-form-label ">手机号:</label>
<div class="width-160">{$detail.mobile}</div>
<label class="layui-form-label ">退货地址:</label>
<div class="width-160">{$detail.address}</div>
</div>
{else/}
<div class="layui-form-item div-flex">
<label class="layui-form-label"></label>
<div class="width-160">无需退回</div>
</div>
{/eq}
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>商品信息</legend>
</fieldset>
</div>
<div class="layui-form-item table-margin">
<table class="layui-table">
<colgroup>
<col width="250">
<col width="200">
<col width="200">
<col width="100">
<col width="200">
<col width="100">
</colgroup>
<thead>
<tr>
<th>图片</th>
<th>商品名称</th>
<th>商品信息</th>
<th>估计</th>
<th>备注</th>
<th>状态</th>
</tr>
</thead>
<tbody>
{foreach $detail.consignment_order_goods as $k => $goods}
<tr>
<td>
<div style="text-align: left">
{foreach $goods.img_list as $k1 => $img}
<div style="float:left; margin-right: 10px;">
<img src="{$img.ori_image}" class="image-show image" >
</div>
{/foreach}
</div>
</td>
<td>
<div style="text-align: left">
{$goods.goods_name}
</div>
</td>
<td>
<div style="text-align: left">
<div class="layui-col-md9">
<p style="margin-top: 10px">购买价格:{$goods.goods_price}</p>
<p>尺寸:{$goods.item_value}</p>
<p>品牌:{$goods.item_value}</p>
<p>品类:{$goods.item_value}</p>
<p>品相:{$goods.item_value}</p>
<p>购买渠道:{$goods.item_value}</p>
</div>
</div>
</td>
<td>
<div style="text-align: left">
¥{$goods.evaluation_price}
</div>
</td>
<td>
<div style="text-align: left">
{$goods.refund_remarks}
</div>
</td>
<td>
<div style="text-align: left">
{$goods.refund_status_text}
</div>
</td>
</tr>
{/foreach}
<tr>
<td colspan="6" style="text-align: right;">
<p>商品总估计金额:¥{$detail.total_amount}</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>订单操作</legend>
</fieldset>
</div>
<div class="layui-form-item div-flex ">
<div class="layui-input-block ">
{eq name="$detail.order_status" value="0"}
<button type="submit" class="layui-btn layui-btn-sm layui-btn-normal width_160 " id="examine">审核</button>
{/eq}
<button type="button" class="layui-btn layui-btn-sm layui-btn-primary width_160 " id="back">返回</button>
</div>
</div>
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>订单流程</legend>
</fieldset>
</div>
<div class="layui-form-item div-flex">
<div class="layui-input-block ">
<ul class="layui-timeline">
{volist name="$detail.logs" id="vo"}
<li class="layui-timeline-item">
<i class="layui-icon layui-timeline-axis"></i>
<div class="layui-timeline-content layui-text">
<h3 class="layui-timeline-title">{$vo.remark}({$vo.create_time})</h3>
<!--日志备注-->
{notempty name="$vo.extra"}
<h4>{$vo.extra}</h4>
{/notempty}
</div>
</li>
{/volist}
</ul>
</div>
</div>
</div>
</div>
<script type="text/javascript">
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
layui.config({
version:"2.6.6.20211117",
base: '/static/layui-admin/dist/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'element', 'jquery', 'like'], function () {
var $ = layui.$;
var like = layui.like;
//主图放大
$(document).on('click', '.image-show', function () {
var src = $(this).attr('src');
like.showImg(src,400);
});
$('#back').click(function () {
var index=parent.layer.getFrameIndex(window.name); //获取当前窗口的name
parent.layer.close(index);
parent.layui.table.reload('order-lists');
return true;
});
//发货
$('#examine').click(function () {
var id = $('.order_id').val();
layer.open({
type: 2
,title: '订单审核'
,content: '{:url("consignment_order/examine")}?id='+id
,area: ['90%', '90%']
,yes: function(index, layero){
}
})
});
});
</script>
{/block}

View File

@ -0,0 +1,244 @@
{extend name="layout1" /}
{block name='content'}
<style>
.layui-form-label{
width:180px;
}
.div-flex {
display: flex;
align-items: center;
justify-content: left;
}
.width-160 {
width: 200px;
float: left;
display: block;
padding: 9px 15px;
font-weight: 400;
}
.layui-table th {
text-align: center;
}
.table-margin{
margin-left: 50px;
margin-right: 50px;
text-align: center;
}
.image{
height:50px;
width: 50px;
}
.mt50{
margin-left: 50px;
}
</style>
<div class="layui-card-body" >
<!--基本信息-->
<div class="layui-form" lay-filter="layuiadmin-form-order" id="layuiadmin-form-order" >
<input type="hidden" class="order_id" name="order_id" value="{$detail.id}">
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>取货信息</legend>
</fieldset>
</div>
<div class="layui-form-item div-flex">
<label class="layui-form-label ">取货人:</label>
<div class="width-160">{$detail.consignee}</div>
<label class="layui-form-label ">手机号:</label>
<div class="width-160">{$detail.mobile}</div>
<label class="layui-form-label ">取货地址:</label>
<div class="width-160">{$detail.address}</div>
</div>
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>退货信息</legend>
</fieldset>
</div>
{eq name="$detail.is_return" value="1"}
<div class="layui-form-item div-flex">
<label class="layui-form-label ">退货人:</label>
<div class="width-160">{$detail.consignee}</div>
<label class="layui-form-label ">手机号:</label>
<div class="width-160">{$detail.mobile}</div>
<label class="layui-form-label ">退货地址:</label>
<div class="width-160">{$detail.address}</div>
</div>
{else/}
<div class="layui-form-item div-flex">
<label class="layui-form-label"></label>
<div class="width-160">无需退回</div>
</div>
{/eq}
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>商品信息</legend>
</fieldset>
</div>
<div class="layui-form-item table-margin">
<table class="layui-table">
<colgroup>
<col width="250">
<col width="200">
<col width="200">
<col width="100">
</colgroup>
<thead>
<tr>
<th>图片</th>
<th>商品名称</th>
<th>商品信息</th>
<th>操作</th>
</tr>
</thead>
<tbody>
{foreach $detail.consignment_order_goods as $k => $goods}
<tr>
<td>
<div style="text-align: left">
{foreach $goods.img_list as $k1 => $img}
<div style="float:left; margin-right: 10px;">
<img src="{$img.ori_image}" class="image-show image" >
</div>
{/foreach}
</div>
</td>
<td>
<div style="text-align: left">
{$goods.goods_name}
</div>
</td>
<td>
<div style="text-align: left">
<div class="layui-col-md9">
<p style="margin-top: 10px">购买价格:{$goods.goods_price}</p>
<p>尺寸:{$goods.item_value}</p>
<p>品牌:{$goods.item_value}</p>
<p>品类:{$goods.item_value}</p>
<p>品相:{$goods.item_value}</p>
<p>购买渠道:{$goods.item_value}</p>
</div>
</div>
</td>
<td>
{if condition="$goods.refund_status=='0'"}
<button type="submit" class="layui-btn layui-btn-sm layui-btn-normal width_160 agree" goods_id="{$goods.id}">同意</button>
<button type="submit" class="layui-btn layui-btn-sm layui-btn-danger width_160 refuse" goods_id="{$goods.id}">拒绝</button>
{/if}
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
<script type="text/javascript">
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
layui.config({
version:"2.6.6.20211117",
base: '/static/layui-admin/dist/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'element', 'jquery', 'like'], function () {
var $ = layui.$;
var like = layui.like;
//主图放大
$(document).on('click', '.image-show', function () {
var src = $(this).attr('src');
like.showImg(src,400);
});
//商家同意
$('.agree').click(function () {
var id=$(this).attr('goods_id');
layer.confirm(
"商品估价:"+"<input type=‘text’ name=‘evaluation_price’ id='evaluation_price' placeholder='请输入估价' autocomplete=‘off’ class=‘layui-input’ style='height:40px'>", {
btn: ['确认','取消'] //按钮
}, function(){
var evaluation_price = $('#evaluation_price').val();
if (evaluation_price == null || evaluation_price == undefined || evaluation_price == ''){
layer.msg('请填写估价!');
return false;
}
like.ajax({
url: '{:url("consignment_order/agree")}'
, data: {'id': id,'evaluation_price':evaluation_price}
, type: 'post'
, success: function (res) {
if (res.code == 1) {
layui.layer.msg(res.msg, {
offset: '15px'
, icon: 1
, time: 1000
},function () {
if(res.data==1){
var index = parent.layer.getFrameIndex(window.name);
parent.location.reload();
parent.layer.close(index);
}else{
location.reload();
}
});
}else{
layui.layer.msg(res.msg, {
offset: '15px'
, icon: 2
, time: 1000
})
}
}
});
return false;
});
});
//商家拒绝
$('.refuse').click(function () {
var id=$(this).attr('goods_id');
layer.confirm(
"拒绝原因:"+"<textarea id='remark' name='remark' class='layui-textarea' type='text' style='height:100px'></textarea>", {
btn: ['确认','取消'] //按钮
}, function(){
var remark = $('#remark').val();
if (remark == null || remark == undefined || remark == ''){
layer.msg('请填写拒绝原因!');
return false;
}
like.ajax({
url: '{:url("consignment_order/refuse")}'
, data: {'id': id,'remark':remark}
, type: 'post'
, success: function (res) {
if (res.code == 1) {
layui.layer.msg(res.msg, {
offset: '15px'
, icon: 1
, time: 1000
},function () {
if(res.data==1){
var index = parent.layer.getFrameIndex(window.name);
parent.location.reload();
parent.layer.close(index);
}else{
location.reload();
}
});
}else{
layui.layer.msg(res.msg, {
offset: '15px'
, icon: 2
, time: 1000
})
}
}
});
return false;
});
});
});
</script>
{/block}

View File

@ -0,0 +1,335 @@
{extend name="public/base" /}
{block name='content'}
{include file='public/content_header' /}
<style type="text/css">
.layui-table-cell {
height: auto;
white-space: normal;
}
.layui-card-header.layuiadmin-card-header-auto {
padding-top: 15px;
padding-bottom: 15px;
height: auto;
}
.layui-form-label{ width:100px; }
</style>
<!--数据列表页面-->
<section class="content">
<!--顶部搜索筛选-->
<div class="row">
<div class="col-md-12">
<div class="box">
<div class="box-body">
<form class="form-inline searchForm" id="searchForm" action="{:url('index')}" method="GET">
<div class="layui-form layui-card-header layuiadmin-card-header-auto">
<div class="layui-form-item">
<div class="layui-row">
<div class="layui-inline">
<label class="layui-form-label">订单搜索:</label>
<div class="layui-input-block">
<select name="search_key">
<option value="order_sn" {if isset($search_key) && $search_key=='order_sn'}selected{/if}>订单编号</option>
<option value="nickname" {if isset($search_key) && $search_key=='nickname'}selected{/if}>会员昵称</option>
<option value="user_mobile" {if isset($search_key) && $search_key=='user_mobile'}selected{/if}>会员手机号码</option>
<option value="user_sn" {if isset($search_key) && $search_key=='user_sn'}selected{/if}>会员编号</option>
</select>
</div>
</div>
<div class="layui-inline">
<input type="text" name="keyword" id="keyword" value="{$keyword?$keyword:'';}" placeholder="请输入搜索内容"
autocomplete="off" class="layui-input">
</div>
<div class="layui-inline">
<label class="layui-form-label">商品名称:</label>
<div class="layui-input-block">
<input type="text" name="goods_name" id="goods_name" value="{$goods_name?$goods_name:'';}" placeholder="请输入商品名称"
autocomplete="off" class="layui-input">
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-inline">
<label class="layui-form-label">订单类型:</label>
<div class="layui-input-block">
<select name="order_type" id="order_type">
<option value="">全部</option>
<option value="0" {if isset($order_type) && $order_type=='0'}selected{/if}>审核中</option>
<option value="1" {if isset($order_type) && $order_type=='1'}selected{/if}>待上架</option>
<option value="2" {if isset($order_type) && $order_type=='2'}selected{/if}>已上架</option>
<option value="3" {if isset($order_type) && $order_type=='3'}selected{/if}>待客户确认</option>
<option value="4" {if isset($order_type) && $order_type=='4'}selected{/if}>客户已确认</option>
<option value="5" {if isset($order_type) && $order_type=='5'}selected{/if}>已取货</option>
<option value="6" {if isset($order_type) && $order_type=='6'}selected{/if}>部分退回</option>
<option value="7" {if isset($order_type) && $order_type=='7'}selected{/if}>全部退回</option>
</select>
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">下单时间:</label>
<div class="layui-input-inline">
<div class="layui-input-inline">
<input type="text" name="start_time" class="layui-input" id="start_time"
placeholder="" autocomplete="off" value="{$start_time?$start_time:'';}">
</div>
</div>
<div class="layui-input-inline" style="margin-right: 5px;width: 20px;">
<label class="layui-form-mid">至</label>
</div>
<div class="layui-input-inline">
<input type="text" name="end_time" class="layui-input" id="end_time"
placeholder="" autocomplete="off" value="{$end_time?$end_time:'';}">
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<button class="btn btn-success btn-sm" type="submit" >查询</button>
</div>
<div class="layui-inline">
<button onclick="clearSearchForm()" class="btn btn-sm btn-default" type="button"><i
class="fa fa-eraser"></i> 清空查询
</button>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="box">
<div class="box-body table-responsive">
<table class="table table-hover table-bordered datatable" width="100%">
<thead>
<tr>
<th>
<div class="layui-table-cell" style="width:240px;text-align:center;">订单信息</div>
</th>
<th>
<div style="width:400px;text-align:center;">用户信息</div>
</th>
<th>
<div style="width:300px;text-align:center;">商品信息</div>
</th>
<th>
<div style="width:200px;text-align:center;">取货信息</div>
</th>
<th>
<div style="width:200px;text-align:center;">退货信息</div>
</th>
<th><div class="layui-table-cell" style="width:280px;text-align:center;">操作</div></th>
</tr>
</thead>
<tbody>
{foreach name="data" item="item"}
<tr>
<td class="layui-table-col-special">
<div class="layui-table-cell laytable-cell-1-0-2">
<div class="layui-input-inline" style="text-align:left;width: 240px;">
<p>订单编号:{$item.order_sn}</p>
<p>订单状态:{$item.order_status_text}</p>
<p>订单金额:{$item.total_amount}</p>
<p>下单时间:{$item.create_time}</p>
</div>
</div>
</td>
<td class="layui-table-col-special">
<div class="layui-table-cell laytable-cell-1-0-2">
<img src="{$item.avatar}" style="height:80px;width: 80px;margin-right: 10px;" class="image-show">
<div class="layui-input-inline" style="text-align:left;width: 240px;">
<p>用户编号:{$item.sn}</p>
<p>用户昵称:{$item.nickname}</p>
<p>用户手机:{$item.mobile}</p>
</div>
</div>
</td>
<td class="layui-table-col-special">
{foreach name="item.consignment_order_goods" item="item1"}
<div style="text-align: left; width:300px" class="goods-data">
<div class="layui-input-inline layui-col-md8">
<span class="layui-col-md7 goods_name_hide">{$item1.goods_name}</span>
<span class="layui-col-md5">¥{$item1.goods_price}</span>
<br>
<span class="layui-col-md7 goods_name_hide">{$item1.item_value}</span>
</div>
</div>
{/foreach}
</td>
<td class="layui-table-col-special">
<div class="layui-table-cell laytable-cell-1-0-2">
<div class="layui-input-inline" style="text-align:left;width: 200px;">
<p>取货人:{$item.consignee}</p>
<p>手机号码:{$item.mobile}</p>
<p>取货地址:{$item.address}</p>
</div>
</div>
</td>
<td class="layui-table-col-special">
{eq name="$item.is_return" value="1"}
<div class="layui-table-cell laytable-cell-1-0-2">
<div class="layui-input-inline" style="text-align:left;width: 200px;">
<p>退货人:{$item.th_consignee}</p>
<p>手机号码:{$item.th_mobile}</p>
<p>退货地址:{$item.th_address}</p>
</div>
</div>
{else}
无需退回
{/eq}
</td>
<td>
<div class="layui-table-cell" style="width: 280px;">
<button type="submit" class="layui-btn layui-btn-sm layui-btn-primary width_160 detail" order_id="{$item.id}">查看详情</button>
{eq name="$item.order_status" value="0"}
<button type="submit" class="layui-btn layui-btn-sm layui-btn-normal width_160 examine" order_id="{$item.id}">审核</button>
{/eq}
{if condition="$item.order_status=='4'"}
<button type="submit" class="layui-btn layui-btn-sm layui-btn-normal width_160 pickup" order_id="{$item.id}">取货</button>
{/if}
{if condition="($item.order_status=='5' || $item.order_status=='6') && $item.is_return=='1'"}
<button type="submit" class="layui-btn layui-btn-sm layui-btn-normal width_160 return" order_id="{$item.id}">退回</button>
{/if}
{if condition="$item.order_status=='5' || $item.order_status=='6'"}
<button type="submit" class="layui-btn layui-btn-sm layui-btn-normal width_160 shelves" order_id="{$item.id}">上架</button>
{/if}
</div>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
<!-- 数据列表底部 -->
<div class="box-footer">
{$page|raw}
<label class="control-label pull-right" style="margin-right: 10px; font-weight: 100;">
<small>共{$total}条记录</small>&nbsp;
<small>每页显示</small>
&nbsp;
<select class="input-sm" onchange="changePerPage(this)">
<option value="10" {if $admin.per_page==10}selected{/if}>10</option>
<option value="20" {if $admin.per_page==20}selected{/if}>20</option>
<option value="30" {if $admin.per_page==30}selected{/if}>30</option>
<option value="50" {if $admin.per_page==50}selected{/if}>50</option>
<option value="100" {if $admin.per_page==100}selected{/if}>100</option>
</select>
&nbsp;
<small>条记录</small>
</label>
</div>
</div>
</div>
</div>
</section>
<script>
layui.use('form', function(){
var form = layui.form;
form.render('select');
});
//日期时间范围
laydate.render({
elem: '#start_time'
,type: 'datetime'
,trigger: 'click'
});
//日期时间范围
laydate.render({
elem: '#end_time'
,type: 'datetime'
,trigger: 'click'
});
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
layui.config({
version:"2.6.6.20211117",
base: '/static/layui-admin/dist/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'element', 'jquery', 'like'], function () {
var $ = layui.$;
var like = layui.like;
//主图放大
$(document).on('click', '.image-show', function () {
var src = $(this).attr('src');
like.showImg(src,600);
});
//查看详情
$('.detail').click(function () {
var id = $(this).attr('order_id');
layer.open({
type: 2
,title: '订单详情'
,content: '{:url("consignment_order/detail")}?id='+id
,area: ['90%', '90%']
,yes: function(index, layero){
}
})
});
//审核
$('.examine').click(function () {
var id = $(this).attr('order_id');
layer.open({
type: 2
,title: '订单审核'
,content: '{:url("consignment_order/examine")}?id='+id
,area: ['90%', '90%']
,yes: function(index, layero){
}
})
});
//取货
$('.pickup').click(function () {
var id = $(this).attr('order_id');
layer.open({
type: 2
,title: '订单取货'
,content: '{:url("consignment_order/pickup")}?id='+id
,area: ['90%', '90%']
,yes: function(index, layero){
}
})
});
//退回
$('.return').click(function () {
var id = $(this).attr('order_id');
layer.open({
type: 2
,title: '订单商品退回'
,content: '{:url("consignment_order/return")}?id='+id
,area: ['90%', '90%']
,yes: function(index, layero){
}
})
});
//上架
$('.shelves').click(function () {
var id = $(this).attr('order_id');
layer.open({
type: 2
,title: '订单商品上架'
,content: '{:url("consignment_order/shelves")}?id='+id
,area: ['90%', '90%']
,yes: function(index, layero){
}
})
});
});
</script>
{/block}

View File

@ -0,0 +1,234 @@
{extend name="layout1" /}
{block name='content'}
<style>
.layui-form-label{
width:180px;
}
.div-flex {
display: flex;
align-items: center;
justify-content: left;
}
.width-160 {
width: 200px;
float: left;
display: block;
padding: 9px 15px;
font-weight: 400;
}
.layui-table th {
text-align: center;
}
.table-margin{
margin-left: 50px;
margin-right: 50px;
text-align: center;
}
.image{
height:50px;
width: 50px;
}
.mt50{
margin-left: 50px;
}
</style>
<div class="layui-card-body" >
<!--基本信息-->
<div class="layui-form" lay-filter="layuiadmin-form-express" id="layuiadmin-form-express" >
<input type="hidden" class="order_id" name="order_id" value="{$detail.id}">
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>取货信息</legend>
</fieldset>
</div>
<div class="layui-form-item div-flex">
<label class="layui-form-label ">取货人:</label>
<div class="width-160">{$detail.consignee}</div>
<label class="layui-form-label ">手机号:</label>
<div class="width-160">{$detail.mobile}</div>
<label class="layui-form-label ">取货地址:</label>
<div class="width-160">{$detail.address}</div>
</div>
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>退货信息</legend>
</fieldset>
</div>
{eq name="$detail.is_return" value="1"}
<div class="layui-form-item div-flex">
<label class="layui-form-label ">退货人:</label>
<div class="width-160">{$detail.consignee}</div>
<label class="layui-form-label ">手机号:</label>
<div class="width-160">{$detail.mobile}</div>
<label class="layui-form-label ">退货地址:</label>
<div class="width-160">{$detail.address}</div>
</div>
{else/}
<div class="layui-form-item div-flex">
<label class="layui-form-label"></label>
<div class="width-160">无需退回</div>
</div>
{/eq}
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>商品信息</legend>
</fieldset>
</div>
<div class="layui-form-item table-margin">
<table class="layui-table">
<colgroup>
<col width="250">
<col width="200">
<col width="200">
<col width="100">
</colgroup>
<thead>
<tr>
<th>图片</th>
<th>商品名称</th>
<th>商品信息</th>
<th>估价</th>
</tr>
</thead>
<tbody>
{foreach $detail.consignment_order_goods as $k => $goods}
<tr>
<td>
<div style="text-align: left">
{foreach $goods.img_list as $k1 => $img}
<div style="float:left; margin-right: 10px;">
<img src="{$img.ori_image}" class="image-show image" >
</div>
{/foreach}
</div>
</td>
<td>
<div style="text-align: left">
{$goods.goods_name}
</div>
</td>
<td>
<div style="text-align: left">
<div class="layui-col-md9">
<p style="margin-top: 10px">购买价格:{$goods.goods_price}</p>
<p>尺寸:{$goods.item_value}</p>
<p>品牌:{$goods.item_value}</p>
<p>品类:{$goods.item_value}</p>
<p>品相:{$goods.item_value}</p>
<p>购买渠道:{$goods.item_value}</p>
</div>
</div>
</td>
<td>
{if condition="$goods.refund_status=='0'"}
<div style="text-align: left">
审核中
</div>
{elseif condition="$goods.refund_status=='1'"/}
<div style="text-align: left">
商品估计:¥{$goods.evaluation_price}
</div>
{else condition="$goods.refund_status=='2'"/}
<div style="text-align: left">
{$goods.refund_remarks}
</div>
{/if}
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>取货物流</legend>
</fieldset>
</div>
<div class="layui-form-item div-flex select-express">
<label class="layui-form-label ">快递公司:</label>
<div>
<input type="text" name="invoice_name" placeholder="请输入快递公司" autocomplete="off"
class="layui-input">
</div>
</div>
<div class="layui-form-item div-flex select-express" >
<label class="layui-form-label ">快递单号:</label>
<div>
<input type="text" name="invoice_no" placeholder="请输入快递单号" autocomplete="off"
class="layui-input">
</div>
</div>
<div class="layui-form-item div-flex ">
<div class="layui-input-block ">
<input type="button" class="layui-btn layui-btn-sm layui-btn-normal width_160" lay-submit lay-filter="send" id="send" value="取货">
<button type="button" class="layui-btn layui-btn-sm layui-btn-primary width_160 " id="back">返回</button>
</div>
</div>
</div>
</div>
<script type="text/javascript">
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
layui.config({
version:"2.6.6.20211117",
base: '/static/layui-admin/dist/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'element', 'jquery', 'like', 'form'], function () {
var $ = layui.$
, form = layui.form;
var like = layui.like;
//主图放大
$(document).on('click', '.image-show', function () {
var src = $(this).attr('src');
like.showImg(src,600);
});
$('#back').click(function () {
var index=parent.layer.getFrameIndex(window.name); //获取当前窗口的name
parent.layer.close(index);
parent.layui.table.reload('order-lists');
return true;
});
//发货
form.on('submit(send)', function (data) {
var field = data.field;
like.ajax({
url: '{:url("consignment_order/pickuphandle")}'
, data: field
, type: 'post'
, success: function (res) {
if (res.code == 1) {
layui.layer.msg(res.msg, {
offset: '15px'
, icon: 1
, time: 1000
},function () {
var index = parent.layer.getFrameIndex(window.name);
parent.location.reload();
parent.layer.close(index);
});
}else{
layui.layer.msg(res.msg, {
offset: '15px'
, icon: 2
, time: 1000
});
}
},
});
})
});
</script>
{/block}

View File

@ -0,0 +1,206 @@
{extend name="layout1" /}
{block name='content'}
<style>
.layui-form-label{
width:180px;
}
.div-flex {
display: flex;
align-items: center;
justify-content: left;
}
.width-160 {
width: 200px;
float: left;
display: block;
padding: 9px 15px;
font-weight: 400;
}
.layui-table th {
text-align: center;
}
.table-margin{
margin-left: 50px;
margin-right: 50px;
text-align: center;
}
.image{
height:50px;
width: 50px;
}
.mt50{
margin-left: 50px;
}
</style>
<div class="layui-card-body" >
<!--基本信息-->
<div class="layui-form" lay-filter="layuiadmin-form-order" id="layuiadmin-form-order" >
<input type="hidden" class="order_id" name="order_id" value="{$detail.id}">
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>取货信息</legend>
</fieldset>
</div>
<div class="layui-form-item div-flex">
<label class="layui-form-label ">取货人:</label>
<div class="width-160">{$detail.consignee}</div>
<label class="layui-form-label ">手机号:</label>
<div class="width-160">{$detail.mobile}</div>
<label class="layui-form-label ">取货地址:</label>
<div class="width-160">{$detail.address}</div>
</div>
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>退货信息</legend>
</fieldset>
</div>
{eq name="$detail.is_return" value="1"}
<div class="layui-form-item div-flex">
<label class="layui-form-label ">退货人:</label>
<div class="width-160">{$detail.consignee}</div>
<label class="layui-form-label ">手机号:</label>
<div class="width-160">{$detail.mobile}</div>
<label class="layui-form-label ">退货地址:</label>
<div class="width-160">{$detail.address}</div>
</div>
{else/}
<div class="layui-form-item div-flex">
<label class="layui-form-label"></label>
<div class="width-160">无需退回</div>
</div>
{/eq}
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>商品信息</legend>
</fieldset>
</div>
<div class="layui-form-item table-margin">
<table class="layui-table">
<colgroup>
<col width="250">
<col width="200">
<col width="200">
<col width="100">
</colgroup>
<thead>
<tr>
<th>图片</th>
<th>商品名称</th>
<th>商品信息</th>
<th>操作</th>
</tr>
</thead>
<tbody>
{foreach $detail.consignment_order_goods as $k => $goods}
<tr>
<td>
<div style="text-align: left">
{foreach $goods.img_list as $k1 => $img}
<div style="float:left; margin-right: 10px;">
<img src="{$img.ori_image}" class="image-show image" >
</div>
{/foreach}
</div>
</td>
<td>
<div style="text-align: left">
{$goods.goods_name}
</div>
</td>
<td>
<div style="text-align: left">
<div class="layui-col-md9">
<p style="margin-top: 10px">购买价格:{$goods.goods_price}</p>
<p>尺寸:{$goods.item_value}</p>
<p>品牌:{$goods.item_value}</p>
<p>品类:{$goods.item_value}</p>
<p>品相:{$goods.item_value}</p>
<p>购买渠道:{$goods.item_value}</p>
</div>
</div>
</td>
<td>
{if condition="$goods.refund_status=='1'"}
<button type="submit" class="layui-btn layui-btn-sm layui-btn-normal width_160 return" goods_id="{$goods.id}">退回</button>
{/if}
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
<script type="text/javascript">
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
layui.config({
version:"2.6.6.20211117",
base: '/static/layui-admin/dist/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'element', 'jquery', 'like'], function () {
var $ = layui.$;
var like = layui.like;
//主图放大
$(document).on('click', '.image-show', function () {
var src = $(this).attr('src');
like.showImg(src,400);
});
//退回
$('.return').click(function () {
var id=$(this).attr('goods_id');
layer.confirm(
"物流公司:"+"<input type=‘text’ name=invoice_name id='invoice_name' placeholder='请输入物流公司' autocomplete=‘off’ class=‘layui-input’ style='height:30px'><br><br>"+
"物流单号:"+"<input type=‘text’ name=invoice_no id='invoice_no' placeholder='请输入物流单号' autocomplete=‘off’ class=‘layui-input’ style='height:30px'>", {
btn: ['确认','取消'] //按钮
}, function(){
var invoice_name = $('#invoice_name').val();
if (invoice_name == null || invoice_name == undefined || invoice_name == ''){
layer.msg('请填写物流公司!');
return false;
}
var invoice_no = $('#invoice_no').val();
if (invoice_no == null || invoice_no == undefined || invoice_no == ''){
layer.msg('请填写物流单号!');
return false;
}
like.ajax({
url: '{:url("consignment_order/returnhandle")}'
, data: {'id': id,'invoice_name':invoice_name,'invoice_no':invoice_no}
, type: 'post'
, success: function (res) {
if (res.code == 1) {
layui.layer.msg(res.msg, {
offset: '15px'
, icon: 1
, time: 1000
},function () {
if(res.data==1){
var index = parent.layer.getFrameIndex(window.name);
parent.location.reload();
parent.layer.close(index);
}else{
location.reload();
}
});
}else{
layui.layer.msg(res.msg, {
offset: '15px'
, icon: 2
, time: 1000
})
}
}
});
return false;
});
});
});
</script>
{/block}

View File

@ -0,0 +1,167 @@
{extend name="layout1" /}
{block name='content'}
<style>
.layui-form-label{
width:180px;
}
.div-flex {
display: flex;
align-items: center;
justify-content: left;
}
.width-160 {
width: 200px;
float: left;
display: block;
padding: 9px 15px;
font-weight: 400;
}
.layui-table th {
text-align: center;
}
.table-margin{
margin-left: 50px;
margin-right: 50px;
text-align: center;
}
.image{
height:50px;
width: 50px;
}
.mt50{
margin-left: 50px;
}
</style>
<div class="layui-card-body" >
<!--基本信息-->
<div class="layui-form" lay-filter="layuiadmin-form-order" id="layuiadmin-form-order" >
<input type="hidden" class="order_id" name="order_id" value="{$detail.id}">
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>商品信息</legend>
</fieldset>
</div>
<div class="layui-form-item table-margin">
<table class="layui-table">
<colgroup>
<col width="250">
<col width="200">
<col width="200">
<col width="100">
</colgroup>
<thead>
<tr>
<th>图片</th>
<th>商品名称</th>
<th>商品信息</th>
<th>操作</th>
</tr>
</thead>
<tbody>
{foreach $detail.consignment_order_goods as $k => $goods}
<tr>
<td>
<div style="text-align: left">
{foreach $goods.img_list as $k1 => $img}
<div style="float:left; margin-right: 10px;">
<img src="{$img.ori_image}" class="image-show image" >
</div>
{/foreach}
</div>
</td>
<td>
<div style="text-align: left">
{$goods.goods_name}
</div>
</td>
<td>
<div style="text-align: left">
<div class="layui-col-md9">
<p style="margin-top: 10px">购买价格:{$goods.goods_price}</p>
<p>尺寸:{$goods.item_value}</p>
<p>品牌:{$goods.item_value}</p>
<p>品类:{$goods.item_value}</p>
<p>品相:{$goods.item_value}</p>
<p>购买渠道:{$goods.item_value}</p>
</div>
</div>
</td>
<td>
{if condition="$goods.refund_status=='1'"}
<button type="submit" class="layui-btn layui-btn-sm layui-btn-normal width_160 shelves" goods_id="{$goods.id}">上架</button>
{/if}
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
<script type="text/javascript">
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
layui.config({
version:"2.6.6.20211117",
base: '/static/layui-admin/dist/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'element', 'jquery', 'like'], function () {
var $ = layui.$;
var like = layui.like;
//主图放大
$(document).on('click', '.image-show', function () {
var src = $(this).attr('src');
like.showImg(src,400);
});
//上架
$('.shelves').click(function () {
var id=$(this).attr('goods_id');
layer.confirm(
"商品编号:"+"<input type=‘text’ name='goods_sn' id='goods_sn' placeholder='请输入商品编号' autocomplete=‘off’ class=‘layui-input’ style='height:30px'>", {
btn: ['确认','取消'] //按钮
}, function(){
var goods_sn = $('#goods_sn').val();
if (goods_sn == null || goods_sn == undefined || goods_sn == ''){
layer.msg('请填写商品编号!');
return false;
}
like.ajax({
url: '{:url("consignment_order/shelveshandle")}'
, data: {'id': id,'goods_sn':goods_sn}
, type: 'post'
, success: function (res) {
if (res.code == 1) {
layui.layer.msg(res.msg, {
offset: '15px'
, icon: 1
, time: 1000
},function () {
if(res.data==1){
var index = parent.layer.getFrameIndex(window.name);
parent.location.reload();
parent.layer.close(index);
}else{
location.reload();
}
});
}else{
layui.layer.msg(res.msg, {
offset: '15px'
, icon: 2
, time: 1000
})
}
}
});
return false;
});
});
});
</script>
{/block}

View File

@ -72,11 +72,13 @@ ul.albums li a.btn-fm_z{
<!-- 表单 -->
<form id="dataForm" class="form-horizontal dataForm" action="" method="post"
enctype="multipart/form-data">
<div class="box-body" style="height: 725px;">
<div class="box-body" style="min-height: 600px;">
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
<ul class="layui-tab-title">
<li class="layui-this">基本设置</li>
<li>尺码库存</li>
<li>商品详情</li>
<li>精品搭配</li>
</ul>
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
@ -86,6 +88,12 @@ ul.albums li a.btn-fm_z{
<input id="name" name="name" value="{$data.name|default=''}" placeholder="请输入商品名称" type="text" class="form-control field-text">
</div>
</div>
<div class="form-group">
<label for="code" class="col-sm-2 control-label">商品编号</label>
<div class="col-sm-10 col-md-4">
<input id="code" name="code" value="{$data.code|default=''}" placeholder="请输入商品编号" type="text" class="form-control field-text">
</div>
</div>
<div class="form-group">
<label for="goods_category_id" class="col-sm-2 control-label">所属分类</label>
<div class="col-sm-10 col-md-4">
@ -99,6 +107,24 @@ ul.albums li a.btn-fm_z{
<script>
$('#goods_category_id').select2();
</script>
<div class="form-group">
<label for="brand_id" class="col-sm-2 control-label">所属品牌</label>
<div class="col-sm-10 col-md-4">
<select name="brand_id" id="brand_id"
class="form-control field-select" data-placeholder="请选择所属分类">
<option value=""></option>
{foreach name='brand_list' id='item'}
<option value="{$item.id}" {if isset($data.brand_id) &&
$data.brand_id==$item.id}selected{/if}>
{$item.name}
</option>
{/foreach}
</select>
</div>
</div>
<script>
$('#brand_id').select2();
</script>
<div class="form-group">
<label for="img" class="col-sm-2 control-label">上传图片</label>
<ul class="albums" id="albums">
@ -127,7 +153,7 @@ ul.albums li a.btn-fm_z{
upload.render({
elem: '#nophoto' //绑定元素
,url: "{:url('file/icon')}" //接口url
,data:{type:1,width:750,heigh:461}
,data:{type:1,width:370,heigh:478}
,field:'image'
,multiple: true
,done: function(res){
@ -176,6 +202,13 @@ ul.albums li a.btn-fm_z{
$(obj).siblings('.btn-fm_z').css('display','block');
}
</script>
<div class="form-group">
<label for="original_price" class="col-sm-2 control-label">原价</label>
<div class="col-sm-10 col-md-4">
<input id="original_price" name="original_price" value="{$data.original_price|default='0.00'}"
placeholder="请输入原价" type="number" class="form-control field-number">
</div>
</div>
<div class="form-group">
<label for="price" class="col-sm-2 control-label">售价</label>
<div class="col-sm-10 col-md-4">
@ -183,29 +216,6 @@ ul.albums li a.btn-fm_z{
placeholder="请输入售价" type="number" class="form-control field-number">
</div>
</div>
<div class="form-group">
<label for="attr" class="col-sm-2 control-label">规格</label>
<div class="col-sm-10 col-md-4">
<input id="attr" name="attr" value="{$data.attr|default=''}"
placeholder="请输入规格" type="text" class="form-control field-number">
</div>
</div>
<div class="form-group">
<label for="stock" class="col-sm-2 control-label">库存</label>
<div class="col-sm-10 col-md-4">
<input id="stock" name="stock" value="{$data.stock|default='100'}"
placeholder="请输入库存" type="number" class="form-control field-number">
</div>
</div>
<script>
$('#stock')
.bootstrapNumber({
upClass: 'success',
downClass: 'primary',
center: true
});
</script>
<div class="form-group">
<label for="status" class="col-sm-2 control-label">是否上架</label>
<div class="col-sm-10 col-md-4">
@ -226,26 +236,6 @@ ul.albums li a.btn-fm_z{
}
});
</script>
<div class="form-group">
<label for="is_recommend" class="col-sm-2 control-label">热门推荐</label>
<div class="col-sm-10 col-md-4">
<input class="input-switch" id="is_recommend" value="1" {if(!isset($data)
||$data.is_recommend==1)}checked{/if} type="checkbox"/>
<input class="switch field-switch" placeholder="是否上架" name="is_recommend"
value="{$data.is_recommend|default='1'}" hidden/>
</div>
</div>
<script>
$('#is_recommend').bootstrapSwitch({
onText: "是",
offText: "否",
onColor: "success",
offColor: "danger",
onSwitchChange: function (event, state) {
$(event.target).closest('.bootstrap-switch').next().val(state ? '1' : '0').change();
}
});
</script>
<div class="form-group">
<label for="sort_number" class="col-sm-2 control-label">排序(升序)</label>
<div class="col-sm-10 col-md-4">
@ -264,20 +254,91 @@ ul.albums li a.btn-fm_z{
</div>
<div class="layui-tab-item">
<div class="form-group">
<label for="detail" class="col-sm-2 control-label">商品详情</label>
<div class="col-sm-10">
<script id="detail" name="detail" type="text/plain">{$data.detail|raw|default=''}</script>
<table class="table table-hover table-bordered datatable" width="100%">
<thead>
<tr class="input-type">
<th>尺码</th>
<th>库存</th>
</tr>
</thead>
<tbody>
{foreach name='size_list' key='k' id='item1'}
<tr>
<td>
<label>
<input class="form-control field-type" value="{$item1.size}" name="size[{$k}][]" placeholder="请输入数量" readonly="readonly">
</label>
</td>
<td>
<label>
<input class="form-control field-type" value="{$item1.num}" name="number[{$k}][]" placeholder="请输入数量">
</label>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
<div class="layui-tab-item">
<div class="form-group">
<label for="detail" class="col-sm-2 control-label">单品信息</label>
<div class="col-sm-10 col-md-4">
<textarea id="detail" name="detail" class="form-control" rows="3" placeholder="请输入描述">{$data.detail|default=''}</textarea>
</div>
</div>
<div class="form-group">
<label for="model" class="col-sm-2 control-label">模特信息</label>
<div class="col-sm-10 col-md-4">
<input id="model" name="model" value="{$data.model|default=''}"
placeholder="请输入模特信息" type="text" class="form-control field-number">
</div>
</div>
<div class="form-group">
<label for="goods_size" class="col-sm-2 control-label">尺码信息</label>
<div class="col-sm-10 col-md-4">
<textarea id="goods_size" name="goods_size" class="form-control" rows="3" placeholder="请输入尺码信息">{$data.goods_size|default=''}</textarea>
</div>
</div>
</div>
<div class="layui-tab-item">
<div class="form-group">
<div class="col-sm-10">
<table id="dataList" class="table table-hover table-bordered datatable" width="100%">
<thead>
<tr class="input-type">
<th>商品名称</th>
<th>操作</th>
</tr>
</thead>
<tbody id="dataBody">
{foreach name='collocation_goods' key='k' id='item1'}
<tr>
<td>
<label>
<select style="min-width: 380px;width: 420px;" name="goods_ids[{$k}][]" class="select2" data-live-search="true" tabindex="-98">
{foreach name='goods_list' id='item'}
<option value="{$item.id}" {if isset($item1) &&
$item1==$item.id}selected{/if}>
{$item.name}
</option>
{/foreach}
</select>
</label>
</td>
<td>
<!-- <a class="btn btn-xs btn-primary" onclick="addNewField(this,1)">插入</a> -->
<a class="btn btn-xs btn-success" onclick="addNewField(this,2)">追加</a>
<a class="btn btn-xs btn-danger" onclick="delThisField(this,1)">删除</a>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
<script>
UE.delEditor('detail');
var ue = UE.getEditor('detail',{
serverUrl :UEServer,
});
ue.ready(function() {
ue.setHeight(500); //设置高度
});
</script>
</div>
</div>
</div>
@ -312,6 +373,28 @@ ul.albums li a.btn-fm_z{
</div>
</div>
</section>
<table>
<tbody id="data-template" style="display: none">
<tr>
<td>
<label>
<select name="goods_idsFORM_INDEX[]" style="min-width: 380px;width: 420px;" class="form-control field-select select2" data-placeholder="请选择商品">
<option value=""></option>
{foreach name='goods_list' id='item'}
<option value="{$item.id}">
{$item.name}
</option>
{/foreach}
</select>
</label>
</td>
<td>
<a class="btn btn-xs btn-success" onclick="addNewField(this,2)">追加</a>
<a class="btn btn-xs btn-danger" onclick="delThisField(this,1)">删除</a>
</td>
</tr>
</tbody>
</table>
<script>
/** 表单验证 **/
$('#dataForm').validate({
@ -388,5 +471,51 @@ ul.albums li a.btn-fm_z{
}
});
//------------------------------------精选配置开始-------------------------------//
//表单索引
var formIndex ='{$number}';
//添加新的字段
function addNewField(obj, type) {
formIndex++;
let template = $("#data-template").html().replace(/FORM_INDEX/g, '[' + formIndex + ']').replace(/INDEX_ID/g, formIndex);
if (obj == null) {
$("#dataBody").append(template);
} else {
if (type === 1) {
$(obj).parent().parent().before(template);
} else {
$(obj).parent().parent().after(template);
}
}
laydate.render({
elem: '#end_time'+formIndex
,type: 'datetime'
});
//刷新 dataBody DOM后的操作
dataBodyRefreshed();
}
$(function () {
//默认添加一行空的字段
if(formIndex==0){
addNewField(null, 1);
}else{
dataBodyRefreshed();
}
});
//删除当前字段
function delThisField(obj) {
layer.confirm('您确认删除本行吗?', {title: '删除确认', closeBtn: 1, icon: 3}, function () {
$(obj).parent().parent().remove();
layer.closeAll();
});
}
//列表刷新后的操作
function dataBodyRefreshed() {
$('[data-toggle="tooltip"]').tooltip();
$('#dataBody .select2').select2();
}
//------------------------------------精选配置结束-------------------------------//
</script>
{/block}

View File

@ -96,8 +96,7 @@
<th>名称</th>
<th>所属分类</th>
<th>售价</th>
<th>规格</th>
<th>库存</th>
<th>总库存</th>
<th>排序(升序)</th>
<th>是否上架</th>
<th>创建时间</th>
@ -116,7 +115,6 @@
<td>{$item.name}</td>
<td>{$item.goods_category.name|default=''}</td>
<td>{$item.price}</td>
<td>{$item.attr}</td>
<td>{$item.stock}</td>
<td>{$item.sort_number}</td>
<td>{$item.status_text}</td>

View File

@ -29,7 +29,11 @@
<div class="col-sm-10 col-md-4">
<select name="initial" id="initial" class="form-control field-select" data-placeholder="请选择品牌首字母">
<option value=""></option>
{foreach name='capital' id='item'}
<option value="{$item}" {if isset($data) &&
$data.initial==$item}selected{/if}>{$item}
</option>
{/foreach}
</select>
</div>
</div>
@ -37,7 +41,7 @@
$('#initial').select2();
</script>
<div class="form-group">
<label for="is_show" class="col-sm-2 control-label">是否显示:1-是.0-否</label>
<label for="is_show" class="col-sm-2 control-label">是否显示</label>
<div class="col-sm-10 col-md-4">
<input class="input-switch" id="is_show" value="1" {if(!isset($data) ||$data.is_show==1)}checked{/if} type="checkbox" />
<input class="switch field-switch" placeholder="是否显示:1-是.0-否" name="is_show" value="{$data.is_show|default='1'}" hidden />

View File

@ -63,7 +63,7 @@
</th>
<th>品牌名称</th>
<th>品牌首字母</th>
<th>是否显示:1-是.0-否</th>
<th>是否显示</th>
<th>排序</th>
<th>创建时间</th>

View File

@ -0,0 +1,227 @@
{extend name='public/base' /}
{block name='content'}
{include file='public/content_header' /}
<section class="content">
<div class="row">
<div class="col-md-12">
<div class="box box-primary">
<!-- 表单头部 -->
<div class="box-header with-border">
<div class="btn-group">
<a class="btn flat btn-sm btn-default BackButton">
<i class="fa fa-arrow-left"></i>
返回
</a>
</div>
</div>
<!-- 表单 -->
<form id="dataForm" class="form-horizontal dataForm" action="" method="post" enctype="multipart/form-data">
<!-- 表单字段区域 -->
<div class="box-body">
<div class="form-group">
<label for="name" class="col-sm-2 control-label">栏目名称</label>
<div class="col-sm-10 col-md-4">
<input id="name" name="name" value="{$data.name|default=''}" placeholder="请输入栏目名称" type="text" class="form-control field-text">
</div>
</div>
<div class="form-group">
<label for="type" class="col-sm-2 control-label">显示模式</label>
<div class="col-sm-10 col-md-4 layui-form">
<input type="radio" name="type" value="1" title="模式一" {if isset($data.type) && $data.type=='1'}checked{/if}>
<input type="radio" name="type" value="2" title="模式二" {if isset($data.type) && $data.type=='2'}checked{/if}>
<input type="radio" name="type" value="3" title="模式三" {if isset($data.type) && $data.type=='3'}checked{/if}>
</div>
</div>
<div class="form-group">
<label for="goods_ids" class="col-sm-2 control-label">商品列表</label>
<div class="col-sm-10">
<table id="dataList" class="table table-hover table-bordered datatable" width="100%">
<thead>
<tr class="input-type">
<th>商品名称</th>
<th>操作</th>
</tr>
</thead>
<tbody id="dataBody">
{foreach name='goods_ids' key='k' id='item1'}
<tr>
<td>
<label>
<select style="min-width: 380px;width: 420px;" name="goods_id[{$k}][]" class="select2" data-live-search="true" tabindex="-98">
{foreach name='goods_list' id='item'}
<option value="{$item.id}" {if isset($item1) &&
$item1==$item.id}selected{/if}>
{$item.name}
</option>
{/foreach}
</select>
</label>
</td>
<td>
<!-- <a class="btn btn-xs btn-primary" onclick="addNewField(this,1)">插入</a> -->
<a class="btn btn-xs btn-success" onclick="addNewField(this,2)">追加</a>
<a class="btn btn-xs btn-danger" onclick="delThisField(this,1)">删除</a>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
<div class="form-group">
<label for="sort_number" class="col-sm-2 control-label">排序(升序)</label>
<div class="col-sm-10 col-md-4">
<input id="sort_number" name="sort_number" value="{$data.sort_number|default='1000'}" placeholder="请输入排序(升序)" type="text" class="form-control field-text">
</div>
</div>
<div class="form-group">
<label for="status" class="col-sm-2 control-label">是否显示</label>
<div class="col-sm-10 col-md-4">
<input class="input-switch" id="status" value="1" {if(!isset($data) ||$data.status==1)}checked{/if} type="checkbox" />
<input class="switch field-switch" placeholder="是否显示" name="status" value="{$data.status|default='1'}" hidden />
</div>
</div>
<script>
$('#status').bootstrapSwitch({
onText: "是",
offText: "否",
onColor: "success",
offColor: "danger",
onSwitchChange: function (event, state) {
$(event.target).closest('.bootstrap-switch').next().val(state ? '1' : '0').change();
}
});
</script>
</div>
<!-- 表单底部 -->
<div class="box-footer">
{:token()}
<div class="col-sm-2">
</div>
<div class="col-sm-10 col-md-4">
{if !isset($data)}
<div class="btn-group pull-right">
<label class="createContinue">
<input type="checkbox" value="1" id="_create" name="_create"
title="继续添加数据">继续添加</label>
</div>
{/if}
<div class="btn-group">
<button type="submit" class="btn flat btn-info dataFormSubmit">
保存
</button>
</div>
<div class="btn-group">
<button type="reset" class="btn flat btn-default dataFormReset">
重置
</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<table>
<tbody id="data-template" style="display: none">
<tr>
<td>
<label>
<select name="goods_idFORM_INDEX[]" style="min-width: 380px;width: 420px;" class="form-control field-select select2" data-placeholder="请选择商品">
<option value=""></option>
{foreach name='goods_list' id='item'}
<option value="{$item.id}">
{$item.name}
</option>
{/foreach}
</select>
</label>
</td>
<td>
<a class="btn btn-xs btn-success" onclick="addNewField(this,2)">追加</a>
<a class="btn btn-xs btn-danger" onclick="delThisField(this,1)">删除</a>
</td>
</tr>
</tbody>
</table>
<script>
/** 表单验证 **/
$('#dataForm').validate({
rules: {
'name': {
required: true,
},
'sort_number': {
required: true,
},
'status': {
required: true,
},
},
messages: {
'name': {
required: "栏目名称不能为空",
},
'sort_number': {
required: "排序(升序)不能为空",
},
'status': {
required: "是否上架不能为空",
},
}
});
//表单索引
var formIndex ='{$number}';
//添加新的字段
function addNewField(obj, type) {
formIndex++;
let template = $("#data-template").html().replace(/FORM_INDEX/g, '[' + formIndex + ']').replace(/INDEX_ID/g, formIndex);
if (obj == null) {
$("#dataBody").append(template);
} else {
if (type === 1) {
$(obj).parent().parent().before(template);
} else {
$(obj).parent().parent().after(template);
}
}
laydate.render({
elem: '#end_time'+formIndex
,type: 'datetime'
});
//刷新 dataBody DOM后的操作
dataBodyRefreshed();
}
$(function () {
//默认添加一行空的字段
if(formIndex==0){
addNewField(null, 1);
}else{
dataBodyRefreshed();
}
});
//删除当前字段
function delThisField(obj) {
layer.confirm('您确认删除本行吗?', {title: '删除确认', closeBtn: 1, icon: 3}, function () {
$(obj).parent().parent().remove();
layer.closeAll();
});
}
//列表刷新后的操作
function dataBodyRefreshed() {
$('[data-toggle="tooltip"]').tooltip();
$('#dataBody .select2').select2();
}
layui.use('form', function(){
var form = layui.form;
form.render();
});
</script>
{/block}

View File

@ -0,0 +1,124 @@
{extend name="public/base" /}
{block name='content'}
{include file='public/content_header' /}
<!--数据列表页面-->
<section class="content">
<!--顶部搜索筛选-->
<div class="row">
<div class="col-md-12">
<div class="box">
<div class="box-body">
<form class="form-inline searchForm" id="searchForm" action="{:url('index')}" method="GET">
<div class="form-group">
<input value="{$_keywords ? $_keywords : '' ;}"
name="_keywords" id="_keywords" class="form-control input-sm" placeholder="栏目名称">
</div>
<div class="form-group">
<button class="btn btn-sm btn-primary" type="submit"><i class="fa fa-search"></i> 查询
</button>
</div>
<div class="form-group">
<button onclick="clearSearchForm()" class="btn btn-sm btn-default" type="button"><i
class="fa fa-eraser"></i> 清空查询
</button>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="box">
<!--数据列表顶部-->
<div class="box-header">
<div>
<a title="添加" data-toggle="tooltip" class="btn btn-primary btn-sm " href="{:url('add')}">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-danger btn-sm AjaxButton" data-toggle="tooltip" title="删除选中数据" data-confirm-title="删除确认" data-confirm-content="您确定要删除选中的数据吗?" data-id="checked" data-url="{:url('del')}">
<i class="fa fa-trash"></i> 删除
</a>
<a class="btn btn-success btn-sm ReloadButton" data-toggle="tooltip" title="刷新">
<i class="fa fa-refresh"></i> 刷新
</a>
</div>
</div>
<div class="box-body table-responsive">
<table class="table table-hover table-bordered datatable" width="100%">
<thead>
<tr>
<th>
<input id="dataCheckAll" type="checkbox" onclick="checkAll(this)" class="checkbox" placeholder="全选/取消">
</th>
<th>栏目名称</th>
<th>排序(升序)</th>
<th>是否上架</th>
<th>创建时间</th>
<th>操作</th>
</tr>
</thead>
<tbody>
{foreach name="data" item="item"}
<tr>
<td>
<input type="checkbox" onclick="checkThis(this)" name="data-checkbox" data-id="{$item.id}" class="checkbox data-list-check" value="{$item.id}" placeholder="选择/取消">
</td>
<td>{$item.name}</td>
<td>{$item.sort_number}</td>
<td>{$item.status_text}</td>
<td>{$item.create_time}</td>
<td class="td-do">
<a href="{:url('edit',['id'=>$item.id])}"
class="btn btn-primary btn-xs" title="修改" data-toggle="tooltip">
<i class="fa fa-pencil"></i>
</a>
<a class="btn btn-danger btn-xs AjaxButton" data-toggle="tooltip" title="删除" data-id="{$item.id}" data-confirm-title="删除确认" data-confirm-content='您确定要删除ID为 <span class="text-red">{$item.id}</span> 的数据吗' data-url="{:url('del')}">
<i class="fa fa-trash"></i>
</a>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
<!-- 数据列表底部 -->
<div class="box-footer">
{$page|raw}
<label class="control-label pull-right" style="margin-right: 10px; font-weight: 100;">
<small>共{$total}条记录</small>&nbsp;
<small>每页显示</small>
&nbsp;
<select class="input-sm" onchange="changePerPage(this)">
<option value="10" {if $admin.per_page==10}selected{/if}>10</option>
<option value="20" {if $admin.per_page==20}selected{/if}>20</option>
<option value="30" {if $admin.per_page==30}selected{/if}>30</option>
<option value="50" {if $admin.per_page==50}selected{/if}>50</option>
<option value="100" {if $admin.per_page==100}selected{/if}>100</option>
</select>
&nbsp;
<small>条记录</small>
</label>
</div>
</div>
</div>
</div>
</section>
{/block}

View File

@ -11,8 +11,9 @@
{/block}
{if !$admin.pjax}
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
{include file='public/head_css' /}
{include file='public/head_js' /}
<link rel="stylesheet" href="/static/layui-admin/dist/layuiadmin/layui/css/layui.css?v=2.6.6.20211117" media="all">
<link rel="stylesheet" href="/static/layui-admin/dist/layuiadmin/style/like.css?v=2.6.6.20211117" media="all">
<script src="/static/layui-admin/dist/layuiadmin/layui/layui.js?v=2.6.6.20211117"></script>
</head>
<body class="hold-transition skin-blue sidebar-mini">
{/if}

View File

@ -0,0 +1,191 @@
{extend name="layout1" /}
{block name='content'}
<style>
.div-flex {
display: flex;
align-items: center;
justify-content: left;
}
.layui-form-label {
width: 100px;
}
.width-160 {
width: 200px;
}
.layui-table th {
text-align: center;
}
.table-margin {
margin-left: 50px;
margin-right: 50px;
text-align: center;
}
.image {
height: 80px;
width: 80px;
}
</style>
<div class="layui-card-body" >
<!--基本信息-->
<div class="layui-form" lay-filter="layuiadmin-form-express" id="layuiadmin-form-express" >
<input type="hidden" name="order_id" value="{$detail.id}">
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>收货信息</legend>
</fieldset>
</div>
<div class="layui-form-item div-flex">
<label class="layui-form-label ">收货人:</label>
<div class="width-160">{$detail.consignee}</div>
<label class="layui-form-label ">手机号:</label>
<div class="width-160">{$detail.mobile}</div>
<label class="layui-form-label ">收货地址:</label>
<div class="width-160">{$detail.delivery_address}</div>
</div>
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>商品信息</legend>
</fieldset>
</div>
<div class="layui-form-item table-margin">
<table class="layui-table">
<colgroup>
<col width="250">
<col width="100">
<col width="100">
<col width="100">
</colgroup>
<thead>
<tr>
<th>商品信息</th>
<th>价格(元)</th>
<th>数量</th>
</tr>
</thead>
<tbody>
{foreach $detail.order_goods as $k => $goods}
<tr>
<td>
<div style="text-align: left">
<div class="layui-col-md3">
<img src="{$goods.img}" class="image-show image">
</div>
<div class="layui-col-md9">
<p style="margin-top: 10px">{$goods.goods_name}</p>
<br>
<p>{$goods.item_value}</p>
</div>
</div>
</td>
<td>¥{$goods.goods_price}</td>
<td>{$goods.goods_num}</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>快递配送</legend>
</fieldset>
</div>
<div class="layui-form-item div-flex select-express">
<label class="layui-form-label ">快递公司:</label>
<div>
<input type="text" name="invoice_name" placeholder="请输入快递公司" autocomplete="off"
class="layui-input">
</div>
</div>
<div class="layui-form-item div-flex select-express" >
<label class="layui-form-label ">快递单号:</label>
<div>
<input type="text" name="invoice_no" placeholder="请输入快递单号" autocomplete="off"
class="layui-input">
</div>
</div>
<div class="layui-form-item div-flex ">
<div class="layui-input-block ">
<input type="button" class="layui-btn layui-btn-sm layui-btn-normal width_160" lay-submit lay-filter="send" id="send" value="发货">
<button type="button" class="layui-btn layui-btn-sm layui-btn-primary width_160 " id="back">返回</button>
</div>
</div>
</div>
</div>
<script type="text/javascript">
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
layui.config({
version:"2.6.6.20211117",
base: '/static/layui-admin/dist/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'element', 'jquery', 'like', 'form'], function () {
var $ = layui.$
, form = layui.form;
var like = layui.like;
//主图放大
$(document).on('click', '.image-show', function () {
var src = $(this).attr('src');
like.showImg(src,600);
});
$('#back').click(function () {
var index=parent.layer.getFrameIndex(window.name); //获取当前窗口的name
parent.layer.close(index);
parent.layui.table.reload('order-lists');
return true;
});
//发货
form.on('submit(send)', function (data) {
var field = data.field;
like.ajax({
url: '{:url("order/deliveryHandle")}'
, data: field
, type: 'post'
, success: function (res) {
if (res.code == 1) {
layui.layer.msg(res.msg, {
offset: '15px'
, icon: 1
, time: 1000
},function () {
var index = parent.layer.getFrameIndex(window.name);
parent.location.reload();
parent.layer.close(index);
});
}else{
layui.layer.msg(res.msg, {
offset: '15px'
, icon: 2
, time: 1000
});
}
},
});
})
});
</script>
{/block}

View File

@ -0,0 +1,276 @@
{extend name="layout1" /}
{block name='content'}
<style>
.layui-form-label{
width:180px;
}
.div-flex {
display: flex;
align-items: center;
justify-content: left;
}
.width-160 {
width: 200px;
float: left;
display: block;
padding: 9px 15px;
font-weight: 400;
}
.layui-table th {
text-align: center;
}
.table-margin{
margin-left: 50px;
margin-right: 50px;
text-align: center;
}
.image{
height:80px;
width: 80px;
}
.mt50{
margin-left: 50px;
}
</style>
<div class="layui-card-body" >
<!--基本信息-->
<div class="layui-form" lay-filter="layuiadmin-form-order" id="layuiadmin-form-order" >
<input type="hidden" class="order_id" name="order_id" value="{$detail.id}">
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>订单信息</legend>
</fieldset>
</div>
<div class="layui-form-item div-flex">
<label class="layui-form-label ">订单编号:</label>
<div class="width-160">{$detail.order_sn}</div>
<label class="layui-form-label ">订单状态:</label>
<div class="width-160">{$detail.order_status_text}</div>
<label class="layui-form-label ">下单时间:</label>
<div class="width-160">{$detail.create_time}</div>
<label class="layui-form-label ">支付时间:</label>
<div class="width-160">{$detail.pay_time}</div>
</div>
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>会员信息</legend>
</fieldset>
</div>
<div class="layui-form-item div-flex">
<label class="layui-form-label ">会员编号:</label>
<div class="width-160">{$detail.user.sn}</div>
<label class="layui-form-label ">会员昵称:</label>
<div class="width-160">{$detail.user.nickname}</div>
<label class="layui-form-label ">手机号码:</label>
<div class="width-160">{$detail.user.mobile}</div>
<label class="layui-form-label ">注册时间:</label>
<div class="width-160">{$detail.user.create_time}</div>
</div>
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>收货信息</legend>
</fieldset>
</div>
<div class="layui-form-item div-flex">
<label class="layui-form-label ">收货人:</label>
<div class="width-160">{$detail.consignee}</div>
<label class="layui-form-label ">手机号:</label>
<div class="width-160">{$detail.mobile}</div>
<label class="layui-form-label ">收货地址:</label>
<div class="width-160">{$detail.delivery_address}</div>
</div>
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>快递信息</legend>
</fieldset>
</div>
{empty name="$detail.invoice_no"}
<div class="layui-form-item div-flex">
<label class="layui-form-label"></label>
<div class="width-160">暂无物流信息</div>
</div>
{else/}
<div class="layui-form-item div-flex">
<label class="layui-form-label ">发货时间:</label>
<div class="width-160">{$detail.shipping_time | default= "未知"}</div>
<label class="layui-form-label ">快递公司:</label>
<div class="width-160">{$detail.invoice_name | default="未知"}</div>
<label class="layui-form-label ">快递单号:</label>
<div class="width-160">{$detail.invoice_no | default= "未知"}</div>
</div>
{/empty}
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>商品信息</legend>
</fieldset>
</div>
<div class="layui-form-item table-margin">
<table class="layui-table">
<colgroup>
<col width="250">
<col width="100">
<col width="100">
<col width="100">
</colgroup>
<thead>
<tr>
<th>商品信息</th>
<th>价格(元)</th>
<th>数量</th>
</tr>
</thead>
<tbody>
{foreach $detail.order_goods as $k => $goods}
<tr>
<td>
<div style="text-align: left">
<div class="layui-col-md3">
<img src="{$goods.img}" class="image-show image" >
</div>
<div class="layui-col-md9">
<p style="margin-top: 10px">{$goods.goods_name}</p>
<br>
<p>{$goods.item_value}</p>
</div>
</div>
</td>
<td>¥{$goods.goods_price}</td>
<td>{$goods.goods_num}</td>
</tr>
{/foreach}
<tr>
<td colspan="2"></td>
<td style="text-align: left">
<p>商品金额:¥{$detail.goods_price}</p>
<p>应付金额:¥{$detail.order_amount}</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>订单操作</legend>
</fieldset>
</div>
<div class="layui-form-item div-flex ">
<div class="layui-input-block ">
{eq name="$detail.order_status" value="1"}
<!-- <button type="submit" class="layui-btn layui-btn-normal width_160 " id="refund">退款</button>-->
<button type="submit" class="layui-btn layui-btn-sm layui-btn-normal width_160 " id="delivery">发货</button>
{/eq}
{eq name="$detail.order_status" value="2"}
<button type="submit" class="layui-btn layui-btn-sm layui-btn-normal width_160 " id="confirm">确认收货</button>
{/eq}
<button type="button" class="layui-btn layui-btn-sm layui-btn-primary width_160 " id="back">返回</button>
</div>
</div>
</div>
</div>
<script type="text/javascript">
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
layui.config({
version:"2.6.6.20211117",
base: '/static/layui-admin/dist/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'element', 'jquery', 'like'], function () {
var $ = layui.$;
var like = layui.like;
//主图放大
$(document).on('click', '.image-show', function () {
var src = $(this).attr('src');
like.showImg(src,600);
});
$('#back').click(function () {
var index=parent.layer.getFrameIndex(window.name); //获取当前窗口的name
parent.layer.close(index);
parent.layui.table.reload('order-lists');
return true;
});
//取消订单
$('#cancel').click(function () {
var order_id = $('.order_id').val();
layer.confirm('确认取消订单吗?', {
btn: ['确认','取消'] //按钮
}, function(){
like.ajax({
url: '{:url("order/cancel")}'
, data: {'order_id': order_id}
, type: 'post'
, success: function (res) {
if (res.code == 1) {
layui.layer.msg(res.msg, {
offset: '15px'
, icon: 1
, time: 1000
},function () {
location.reload();
});
}
}
});
});
});
//发货
$('#delivery').click(function () {
var id = $('.order_id').val();
layer.open({
type: 2
,title: '订单发货'
,content: '{:url("order/delivery")}?id='+id
,area: ['90%', '90%']
,yes: function(index, layero){
}
})
});
//确认收货
$('#confirm').click(function () {
var id = $('.order_id').val();
layer.confirm('确认订单商品已收货吗??', {
btn: ['确认','取消'] //按钮
}, function(){
like.ajax({
url: '{:url("order/confirm")}'
, data: {'order_id': id}
, type: 'post'
, success: function (res) {
if (res.code == 1) {
layui.layer.msg(res.msg, {
offset: '15px'
, icon: 1
, time: 1000
},function () {
location.reload();
});
}
},
});
});
});
});
</script>
{/block}

View File

@ -56,8 +56,10 @@
<div class="layui-input-block">
<select name="order_type" id="order_type">
<option value="">全部</option>
<option value="1" {if isset($order_type) && $order_type=='1'}selected{/if}>正式订单</option>
<option value="2" {if isset($order_type) && $order_type=='2'}selected{/if}>体验订单</option>
<option value="0" {if isset($order_type) && $order_type=='0'}selected{/if}>待付款</option>
<option value="1" {if isset($order_type) && $order_type=='1'}selected{/if}>待发货</option>
<option value="2" {if isset($order_type) && $order_type=='2'}selected{/if}>待收货</option>
<option value="3" {if isset($order_type) && $order_type=='3'}selected{/if}>已完成</option>
</select>
</div>
</div>
@ -105,23 +107,33 @@
<thead>
<tr>
<th>
<div style="width:380px;text-align:center;">用户信息</div>
<div class="layui-table-cell" style="width:240px;text-align:center;">订单信息</div>
</th>
<th>
<div class="layui-table-cell" style="width:380px;text-align:center;">订单信息</div>
<div style="width:400px;text-align:center;">用户信息</div>
</th>
<th>
<div class="layui-table-cell" style="width:380px;text-align:center;">商品信息</div>
<div style="width:380px;text-align:center;">商品信息</div>
</th>
<th><div class="layui-table-cell" style="width:100px;text-align:center;">购买数量</div></th>
<th><div class="layui-table-cell" style="width:200px;text-align:center;">结束时间</div></th>
<th><div class="layui-table-cell" style="width:100px;text-align:center;">产生收益</div></th>
<th><div class="layui-table-cell" style="width:200px;text-align:center;">创建时间</div></th>
<th>
<div style="width:200px;text-align:center;">收货信息</div>
</th>
<th><div class="layui-table-cell" style="width:200px;text-align:center;">操作</div></th>
</tr>
</thead>
<tbody>
{foreach name="data" item="item"}
<tr>
<td class="layui-table-col-special">
<div class="layui-table-cell laytable-cell-1-0-2">
<div class="layui-input-inline" style="text-align:left;width: 240px;">
<p>订单编号:{$item.order_sn}</p>
<p>订单状态:{$item.order_status_text}</p>
<p>订单金额:{$item.total_amount}</p>
<p>下单时间:{$item.create_time}</p>
</div>
</div>
</td>
<td class="layui-table-col-special">
<div class="layui-table-cell laytable-cell-1-0-2">
<img src="{$item.avatar}" style="height:80px;width: 80px;margin-right: 10px;" class="image-show">
@ -133,33 +145,39 @@
</div>
</td>
<td class="layui-table-col-special">
<div class="layui-table-cell laytable-cell-1-0-2">
<div class="layui-input-inline" style="text-align:left;width: 240px;">
<p>订单编号:{$item.order_no}</p>
<p>订单类型:{$item.order_type_text}</p>
<p>订单金额:{$item.order_price}</p>
{foreach name="item.order_goods" item="item1"}
<div style="text-align: left; width:380px; overflow: hidden;" class="goods-data">
<img src="{$item1.img}" style="height:80px;width: 80px" class="image-show layui-col-md4">
<div class="layui-input-inline layui-col-md8">
<span class="layui-col-md7 goods_name_hide">{$item1.goods_name}</span>
<span class="layui-col-md5">¥{$item1.goods_price}</span>
<br>
<span class="layui-col-md7 goods_name_hide">{$item1.item_value}</span>
<span class="layui-col-md5">{$item1.goods_num}件</span>
</div>
</div>
{/foreach}
</td>
<td class="layui-table-col-special">
<div class="layui-table-cell laytable-cell-1-0-2">
<div class="layui-input-inline" style="text-align:left;width: 240px;">
<p>设备名称:{$item.goods_name}</p>
<p>设备规格:{$item.attr}M</p>
<div class="layui-input-inline" style="text-align:left;width: 200px;">
<p>收货人:{$item.consignee}</p>
<p>手机号码:{$item.mobile}</p>
<p>收货地址:{$item.delivery_address}</p>
</div>
</div>
</td>
<td>
<div class="layui-table-cell" style="width:100px;text-align:center;">{$item.number}</div>
</td>
<td>
<div class="layui-table-cell" style="width:200px;text-align:center;">{$item.end_time}</div>
</td>
<td>
<div class="layui-table-cell" style="width:100px;text-align:center;">{$item.profit}</div>
</td>
<td>
<div class="layui-table-cell" style="width:200px;text-align:center;">{$item.create_time}</div>
<div class="layui-table-cell" style="width: 200px;">
<button type="submit" class="layui-btn layui-btn-sm layui-btn-primary width_160 detail" order_id="{$item.id}">查看详情</button>
{eq name="$item.order_status" value="1"}
<button type="submit" class="layui-btn layui-btn-sm layui-btn-normal width_160 delivery" order_id="{$item.id}">发货</button>
{/eq}
{eq name="$item.order_status" value="2"}
<button type="submit" class="layui-btn layui-btn-sm layui-btn-normal width_160 confirm" order_id="{$item.id}">确认收货</button>
{/eq}
</div>
</td>
</tr>
{/foreach}
@ -208,6 +226,75 @@ laydate.render({
,type: 'datetime'
,trigger: 'click'
});
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
layui.config({
version:"2.6.6.20211117",
base: '/static/layui-admin/dist/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'element', 'jquery', 'like'], function () {
var $ = layui.$;
var like = layui.like;
//主图放大
$(document).on('click', '.image-show', function () {
var src = $(this).attr('src');
like.showImg(src,600);
});
//查看详情
$('.detail').click(function () {
var id = $(this).attr('order_id');
layer.open({
type: 2
,title: '订单详情'
,content: '{:url("order/detail")}?id='+id
,area: ['90%', '90%']
,yes: function(index, layero){
}
})
});
//发货
$('.delivery').click(function () {
var id = $(this).attr('order_id');
layer.open({
type: 2
,title: '订单发货'
,content: '{:url("order/delivery")}?id='+id
,area: ['90%', '90%']
,yes: function(index, layero){
}
})
});
//确认收货
$('.confirm').click(function () {
var id = $(this).attr('order_id');
layer.confirm('确认订单商品已收货吗??', {
btn: ['确认','取消'] //按钮
}, function(){
like.ajax({
url: '{:url("order/confirm")}'
, data: {'order_id': id}
, type: 'post'
, success: function (res) {
if (res.code == 1) {
layui.layer.msg(res.msg, {
offset: '15px'
, icon: 1
, time: 1000
},function () {
location.reload();
});
}
},
});
});
});
});
</script>
{/block}

View File

@ -0,0 +1,88 @@
{extend name='public/base' /}
{block name='content'}
{include file='public/content_header' /}
<section class="content">
<div class="row">
<div class="col-md-12">
<div class="box box-primary">
<!-- 表单头部 -->
<div class="box-header with-border">
<div class="btn-group">
<a class="btn flat btn-sm btn-default BackButton">
<i class="fa fa-arrow-left"></i>
返回
</a>
</div>
</div>
<!-- 表单 -->
<form id="dataForm" class="form-horizontal dataForm" action="" method="post" enctype="multipart/form-data">
<!-- 表单字段区域 -->
<div class="box-body">
<div class="form-group">
<label for="name" class="col-sm-2 control-label">名称</label>
<div class="col-sm-10 col-md-4">
<input id="name" name="name" value="{$data.name|default=''}" placeholder="请输入名称" type="text" class="form-control field-text">
</div>
</div>
<div class="form-group">
<label for="describe" class="col-sm-2 control-label">描述</label>
<div class="col-sm-10 col-md-4">
<textarea id="describe" name="describe" class="form-control" rows="3" placeholder="请输入描述">{$data.describe|default=''}</textarea>
</div>
</div>
</div>
<!-- 表单底部 -->
<div class="box-footer">
{:token()}
<div class="col-sm-2">
</div>
<div class="col-sm-10 col-md-4">
{if !isset($data)}
<div class="btn-group pull-right">
<label class="createContinue">
<input type="checkbox" value="1" id="_create" name="_create"
title="继续添加数据">继续添加</label>
</div>
{/if}
<div class="btn-group">
<button type="submit" class="btn flat btn-info dataFormSubmit">
保存
</button>
</div>
<div class="btn-group">
<button type="reset" class="btn flat btn-default dataFormReset">
重置
</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<script>
/** 表单验证 **/
$('#dataForm').validate({
rules: {
'name': {
required: true,
},
'describe': {
required: true,
},
},
messages: {
'name': {
required: "名称不能为空",
},
'describe': {
required: "描述不能为空",
},
}
});
</script>
{/block}

View File

@ -0,0 +1,122 @@
{extend name="public/base" /}
{block name='content'}
{include file='public/content_header' /}
<!--数据列表页面-->
<section class="content">
<!--顶部搜索筛选-->
<div class="row">
<div class="col-md-12">
<div class="box">
<div class="box-body">
<form class="form-inline searchForm" id="searchForm" action="{:url('index')}" method="GET">
<div class="form-group">
<input value="{$_keywords ? $_keywords : '' ;}"
name="_keywords" id="_keywords" class="form-control input-sm" placeholder="名称/描述">
</div>
<div class="form-group">
<button class="btn btn-sm btn-primary" type="submit"><i class="fa fa-search"></i> 查询
</button>
</div>
<div class="form-group">
<button onclick="clearSearchForm()" class="btn btn-sm btn-default" type="button"><i
class="fa fa-eraser"></i> 清空查询
</button>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="box">
<!--数据列表顶部-->
<div class="box-header">
<div>
<a title="添加" data-toggle="tooltip" class="btn btn-primary btn-sm " href="{:url('add')}">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-danger btn-sm AjaxButton" data-toggle="tooltip" title="删除选中数据" data-confirm-title="删除确认" data-confirm-content="您确定要删除选中的数据吗?" data-id="checked" data-url="{:url('del')}">
<i class="fa fa-trash"></i> 删除
</a>
<a class="btn btn-success btn-sm ReloadButton" data-toggle="tooltip" title="刷新">
<i class="fa fa-refresh"></i> 刷新
</a>
</div>
</div>
<div class="box-body table-responsive">
<table class="table table-hover table-bordered datatable" width="100%">
<thead>
<tr>
<th>
<input id="dataCheckAll" type="checkbox" onclick="checkAll(this)" class="checkbox" placeholder="全选/取消">
</th>
<th>名称</th>
<th>描述</th>
<th>添加时间</th>
<th>操作</th>
</tr>
</thead>
<tbody>
{foreach name="data" item="item"}
<tr>
<td>
<input type="checkbox" onclick="checkThis(this)" name="data-checkbox" data-id="{$item.id}" class="checkbox data-list-check" value="{$item.id}" placeholder="选择/取消">
</td>
<td>{$item.name}</td>
<td>{$item.describe}</td>
<td>{$item.create_time}</td>
<td class="td-do">
<a href="{:url('edit',['id'=>$item.id])}"
class="btn btn-primary btn-xs" title="修改" data-toggle="tooltip">
<i class="fa fa-pencil"></i>
</a>
<a class="btn btn-danger btn-xs AjaxButton" data-toggle="tooltip" title="删除" data-id="{$item.id}" data-confirm-title="删除确认" data-confirm-content='您确定要删除ID为 <span class="text-red">{$item.id}</span> 的数据吗' data-url="{:url('del')}">
<i class="fa fa-trash"></i>
</a>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
<!-- 数据列表底部 -->
<div class="box-footer">
{$page|raw}
<label class="control-label pull-right" style="margin-right: 10px; font-weight: 100;">
<small>共{$total}条记录</small>&nbsp;
<small>每页显示</small>
&nbsp;
<select class="input-sm" onchange="changePerPage(this)">
<option value="10" {if $admin.per_page==10}selected{/if}>10</option>
<option value="20" {if $admin.per_page==20}selected{/if}>20</option>
<option value="30" {if $admin.per_page==30}selected{/if}>30</option>
<option value="50" {if $admin.per_page==50}selected{/if}>50</option>
<option value="100" {if $admin.per_page==100}selected{/if}>100</option>
</select>
&nbsp;
<small>条记录</small>
</label>
</div>
</div>
</div>
</div>
</section>
{/block}

View File

@ -1,81 +0,0 @@
{extend name='public/base' /}
{block name='content'}
{include file='public/content_header' /}
<section class="content">
<div class="row">
<div class="col-md-12">
<div class="box box-primary">
<!-- 表单 -->
<form id="dataForm" class="form-horizontal dataForm" action="" method="post" enctype="multipart/form-data">
<!-- 表单字段区域 -->
<div class="box-body" style="height: 500px;">
<div class="form-group">
<label for="first_ratio" class="col-sm-2 control-label">一级分销比例</label>
<div class="col-sm-10 col-md-4">
<input id="first_ratio" name="first_ratio" value="{$config.first_ratio|default=''}" placeholder="请输入一级分销比例" type="text" class="form-control field-text">
</div>
<label for="name" class="control-label">%</label>
</div>
<div class="form-group">
<label for="second_ratio" class="col-sm-2 control-label">二级分销比例</label>
<div class="col-sm-10 col-md-4">
<input id="second_ratio" name="second_ratio" value="{$config.second_ratio|default=''}" placeholder="请输入二级分销比例" type="text" class="form-control field-text">
</div>
<label for="name" class="control-label">%</label>
</div>
<div class="form-group">
<label for="number" class="col-sm-2 control-label">升级人数</label>
<div class="col-sm-10 col-md-4">
<input id="number" name="number" value="{$config.number|default=''}" placeholder="请输入升级人数" type="text" class="form-control field-text">
</div>
<label for="name" class="control-label">人</label>
</div>
</div>
<!-- 表单底部 -->
<div class="box-footer">
{:token()}
<div class="col-sm-2">
</div>
<div class="col-sm-10 col-md-4">
<div class="btn-group">
<button type="submit" class="btn flat btn-info dataFormSubmit">
保存
</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<script>
/** 表单验证 **/
$('#dataForm').validate({
rules: {
'type': {
required: true,
},
'name': {
required: true,
},
'value': {
required: true,
},
},
messages: {
'type': {
required: "类型不能为空",
},
'name': {
required: "名称不能为空",
},
'value': {
required: "值不能为空",
},
}
});
</script>
{/block}

View File

@ -1,114 +0,0 @@
{extend name='public/base' /}
{block name='content'}
{include file='public/content_header' /}
<section class="content">
<div class="row">
<div class="col-md-12">
<div class="box box-primary">
<!-- 表单 -->
<form id="dataForm" class="form-horizontal dataForm" action="" method="post" enctype="multipart/form-data">
<!-- 表单字段区域 -->
<div class="box-body">
<div class="form-group">
<label for="goods_id" class="col-sm-2 control-label">体验设备</label>
<div class="col-sm-10 col-md-4">
<select name="goods_id" id="goods_id" class="form-control field-select"
data-placeholder="请选择体验设备">
<option value=""></option>
{foreach name='config.goods_list' id='item'}
<option value="{$item.id}" {if isset($config) &&
$config.goods_id==$item.id}selected{/if}>
{$item.name}
</option>
{/foreach}
</select>
</div>
</div>
<script>
$('#goods_id').select2();
</script>
<div class="form-group">
<label for="day" class="col-sm-2 control-label">体验天数</label>
<div class="col-sm-10 col-md-4">
<input id="day" name="day" value="{$config.day|default=''}" placeholder="请输入体验天数" type="number" class="form-control field-number">
</div>
<label for="name" class="control-label">天</label>
</div>
<div class="form-group">
<label for="is_withdraw" class="col-sm-2 control-label">是否可提现</label>
<div class="col-sm-10 col-md-4">
<input class="input-switch" id="is_withdraw" value="1" {if(!isset($config) ||$config.is_withdraw==1)}checked{/if} type="checkbox" />
<input class="switch field-switch" placeholder="是否可提现" name="is_withdraw" value="{$config.is_withdraw|default=''}" hidden />
</div>
</div>
<script>
$('#is_withdraw').bootstrapSwitch({
onText: "是",
offText: "否",
onColor: "success",
offColor: "danger",
onSwitchChange: function (event, state) {
$(event.target).closest('.bootstrap-switch').next().val(state ? '1' : '0').change();
}
});
</script>
<div class="form-group">
<label for="is_first" class="col-sm-2 control-label">是否新用户领取</label>
<div class="col-sm-10 col-md-4">
<input class="input-switch" id="is_first" value="1" {if(!isset($config) ||$config.is_first==1)}checked{/if} type="checkbox" />
<input class="switch field-switch" placeholder="是否新用户领取" name="is_first" value="{$config.is_first|default=''}" hidden />
</div>
</div>
<script>
$('#is_first').bootstrapSwitch({
onText: "是",
offText: "否",
onColor: "success",
offColor: "danger",
onSwitchChange: function (event, state) {
$(event.target).closest('.bootstrap-switch').next().val(state ? '1' : '0').change();
}
});
</script>
<div class="form-group">
<label for="is_open" class="col-sm-2 control-label">是否开启</label>
<div class="col-sm-10 col-md-4">
<input class="input-switch" id="is_open" value="1" {if(!isset($config) ||$config.is_open==1)}checked{/if} type="checkbox" />
<input class="switch field-switch" placeholder="是否开启" name="is_open" value="{$config.is_open|default=''}" hidden />
</div>
</div>
<script>
$('#is_open').bootstrapSwitch({
onText: "是",
offText: "否",
onColor: "success",
offColor: "danger",
onSwitchChange: function (event, state) {
$(event.target).closest('.bootstrap-switch').next().val(state ? '1' : '0').change();
}
});
</script>
</div>
<!-- 表单底部 -->
<div class="box-footer">
{:token()}
<div class="col-sm-2">
</div>
<div class="col-sm-10 col-md-4">
<div class="btn-group">
<button type="submit" class="btn flat btn-info dataFormSubmit">
保存
</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<script>
/** 表单验证 **/
$('#dataForm').validate();
</script>
{/block}

View File

@ -11,18 +11,35 @@
<div class="box-body" style="height: 550px;">
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
<ul class="layui-tab-title">
<li class="layui-this">积分规则</li>
<li class="layui-this">寄卖流程</li>
<li>寄卖规则</li>
</ul>
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
<div class="form-group">
<div class="col-sm-10">
<script id="integral_rule" name="integral_rule" type="text/plain">{$config.integral_rule|raw|default=''}</script>
<script id="procedure" name="procedure" type="text/plain">{$config.procedure|raw|default=''}</script>
</div>
</div>
<script>
UE.delEditor('integral_rule');
var ue = UE.getEditor('integral_rule',{
UE.delEditor('procedure');
var ue1 = UE.getEditor('procedure',{
serverUrl :UEServer,
});
ue1.ready(function() {
ue1.setHeight(250); //设置高度
});
</script>
</div>
<div class="layui-tab-item">
<div class="form-group">
<div class="col-sm-10">
<script id="rule" name="rule" type="text/plain">{$config.rule|raw|default=''}</script>
</div>
</div>
<script>
UE.delEditor('rule');
var ue = UE.getEditor('rule',{
serverUrl :UEServer,
});
ue.ready(function() {

View File

@ -1,102 +0,0 @@
{extend name='public/base' /}
{block name='content'}
{include file='public/content_header' /}
<style>
.layui-form-label {
color: #6a6f6c;
width: 100px;
}
.layui-input-block {
margin-left: 130px;
}
.tips{
color: red;
}
.layui-laydate-content>.layui-laydate-list {
padding-bottom: 0px;
overflow: hidden;
}
.layui-laydate-content>.layui-laydate-list>li{
width: 100%;
}
.merge-box .scrollbox .merge-list {
padding-bottom: 5px;
}
</style>
<section class="content">
<div class="row">
<div class="col-md-12">
<div class="box box-primary">
<!-- 表单 -->
<form id="dataForm" class="form-horizontal dataForm" action="" method="post" enctype="multipart/form-data">
<!-- 表单字段区域 -->
<div class="box-body" style="height: 500px;">
<div class="form-group">
<label for="time" class="col-sm-2 control-label">结算时间</label>
<div class="col-sm-10 col-md-4">
<input id="time" name="time" value="{$config.time|default=''}" placeholder="请输入类型" type="text" class="form-control field-text">
</div>
</div>
<div class="form-group">
<label for="num" class="col-sm-2 control-label">实时收益</label>
<div class="col-sm-10 col-md-4">
<input id="num" name="num" value="{$config.num|default=''}" placeholder="请输入名称" type="text" class="form-control field-text">
</div>
<label for="name" class="control-label">/M</label>
</div>
</div>
<!-- 表单底部 -->
<div class="box-footer">
{:token()}
<div class="col-sm-2">
</div>
<div class="col-sm-10 col-md-4">
<div class="btn-group">
<button type="submit" class="btn flat btn-info dataFormSubmit">
保存
</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<script>
/** 表单验证 **/
$('#dataForm').validate({
rules: {
'type': {
required: true,
},
'name': {
required: true,
},
'value': {
required: true,
},
},
messages: {
'type': {
required: "类型不能为空",
},
'name': {
required: "名称不能为空",
},
'value': {
required: "值不能为空",
},
}
});
laydate.render({
elem :'#time',
trigger : 'click',
type: 'time',
format: 'HH',
});
</script>
{/block}

View File

@ -1,6 +1,59 @@
{extend name='public/base' /}
{block name='content'}
{include file='public/content_header' /}
<style type="text/css">
/* 图片展示
----------------------------------------------- */
ul.albums {
display: block;
min-height: 1px;
height: auto;
overflow: hidden;
padding: 5px 0;
margin: 0 15px;
}
ul.albums li {
position: relative;
display: inline-block;
padding: 5px;
border: 1px solid #e5e5e5;
margin: 5px 0 0 20px;
cursor: pointer;
}
ul.albums li a.btn-close {
display: block;
position: absolute;
z-index: 2;
top: -8px;
right: -10px;
width: 20px;
height: 20px;
}
ul.albums li a.btn-fm{width: 100px;
display:none;
height: 100px;
border: 0px;
opacity: 0.5;
background-color: #000;
line-height: 100px;
text-align: center;
color: #fff;
position: absolute;}
ul.albums li:hover a.btn-fm{ display: block; }
ul.albums li a.btn-fm_z{
display:none;
color: #ccc;
border: 0px;
background-color: #000;
position: absolute;
bottom: 5px;
left: 5px;
opacity: 0.6;
width: 40px;
text-align: center;
}
</style>
<section class="content">
<div class="row">
<div class="col-md-12">
@ -28,11 +81,48 @@
</div>
</div>
<div class="form-group">
<label for="tel" class="col-sm-2 control-label">联系电话</label>
<label for="channel" class="col-sm-2 control-label">购买渠道</label>
<div class="col-sm-10 col-md-4">
<input id="tel" name="tel" value="{$config.tel|default=''}" placeholder="请输入联系电话" type="text" class="form-control field-text">
<input id="channel" name="channel" value="{$config.channel|default=''}" placeholder="购买渠道" type="text" class="form-control field-text">
<span id="min_withdraw-error" class="help-block">多个购买渠道请用英文逗号分隔</span>
</div>
</div>
<div class="form-group">
<label for="size" class="col-sm-2 control-label">尺码</label>
<div class="col-sm-10 col-md-4">
<input id="size" name="size" value="{$config.size|default=''}" placeholder="尺码" type="text" class="form-control field-text">
<span id="min_withdraw-error" class="help-block">多个尺寸请用英文逗号分隔</span>
</div>
</div>
<div class="form-group">
<label for="img" class="col-sm-2 control-label">尺码表图片</label>
<ul class="albums" id="albums">
<li id="nophoto" ><img src="{if isset($config.size_img)}{$config.size_img}{else}/static/admin/images/nophoto_100x100.png{/if}" style="width: 100px;height: 100px;"></li>
<input type="hidden" name="size_img" id="size_img" value="{$config.size_img|default=''}">
</ul>
</div>
<script type="text/javascript">
layui.use(['upload','laydate','form'], function(){
var form = layui.form;
var upload = layui.upload;
//执行实例
upload.render({
elem: '#nophoto' //绑定元素
,url: "{:url('file/icon')}" //接口url
,data:{type:0}
,field:'image'
,multiple: true
,done: function(res){
$(".albums img").attr('src',res.data.avatar_logo);
$("#size_img").val(res.data.avatar_logo);
}
,error: function(){
layer.tips('图片错误', '#btn');
return false;
}
});
});
</script>
</div>
<!-- 表单底部 -->
<div class="box-footer">

View File

@ -79,6 +79,12 @@ ul.albums li a.btn-fm_z{
type="text" class="form-control field-text">
</div>
</div>
<div class="form-group">
<label for="describe" class="col-sm-2 control-label">描述</label>
<div class="col-sm-10 col-md-4">
<textarea id="describe" name="describe" class="form-control" rows="3" placeholder="请输入描述">{$data.describe|default=''}</textarea>
</div>
</div>
<div class="form-group">
<label for="alias" class="col-sm-2 control-label">广告位置</label>
<div class="col-sm-10 col-md-4">

View File

@ -0,0 +1,113 @@
{extend name="layout1" /}
{block name='content'}
<style>
.layui-form-label{
width: 90px;
}
</style>
<div class="layui-form" lay-filter="layuiadmin-form-user" id="layuiadmin-form-user" style="padding: 20px 30px 0 0;">
<input type="hidden" value="{$info.id}" name="id" id="user_id">
<div class="layui-fluid">
<div class="layui-card">
<div class="layui-tab layui-tab-card">
<ul class="layui-tab-title">
<li class="layui-this">余额调整</li>
</ul>
<div class="layui-tab-content" >
<div class="layui-tab-item layui-show " >
<div class="layui-form-item">
<label class="layui-form-label">当前余额:</label>
<div class="layui-input-inline">
<label class="layui-form-mid">{$info.user_money}</label>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">余额增减:</label>
<div class="layui-input-block">
<input type="radio" name="money_handle" value="1" title="增加余额">
<input type="radio" name="money_handle" value="0" title="扣减余额">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">调整余额:</label>
<div class="layui-input-inline">
<input type="text" name="money" value="" lay-verify="" lay-vertype="tips" placeholder="" autocomplete="off" class="layui-input">
<label class="layui-form-mid layui-word-aux">请输入调整的余额金额</label>
</div>
<label class="layui-form-mid">元</label>
</div>
<div class="layui-form-item">
<label class="layui-form-label">备注:</label>
<div class="layui-input-block">
<textarea type="text" name="money_remark" autocomplete="off" class="layui-textarea" style="width: 30%;"></textarea>
<label class="layui-form-mid layui-word-aux" style="margin-left: 10px;">不超过100字</label>
</div>
</div>
<div class="layui-form-item div-flex ">
<div class="layui-input-block ">
<button type="submit" class="layui-btn layui-btn-sm layui-btn-normal width_160 " id="adjust_account">确定</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
layui.config({
version:"2.6.6.20211117",
base: '/static/layui-admin/dist/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'element', 'jquery', 'like', 'form'], function () {
var $ = layui.$
, form = layui.form;
var like = layui.like;
//确认收货
$('#adjust_account').click(function () {
var id = $('#user_id').val();
layer.confirm('确认调整该账户资金信息吗??', {
btn: ['确认','取消'] //按钮
}, function(){
var money_handle = $("input[name='money_handle']:checked").val();
if (money_handle == null || money_handle == undefined || money_handle == ''){
layer.msg('请选择调整类型!');
return false;
}
var money = $("input[name='money']").val();
if (money == null || money == undefined || money == ''){
layer.msg('请输入调整金额!');
return false;
}
var money_remark = $("textarea[name='money_remark']").val();
like.ajax({
url: '{:url("user/adjust_account")}'
, data: {'id': id,'money_handle': money_handle,'money': money,'money_remark': money_remark}
, type: 'post'
, success: function (res) {
if (res.code == 1) {
layui.layer.msg(res.msg, {
offset: '15px'
, icon: 1
, time: 1000
},function () {
var index = parent.layer.getFrameIndex(window.name);
parent.location.reload();
parent.layer.close(index);
});
}else{
layui.layer.msg(res.msg, {
offset: '15px'
, icon: 2
, time: 1000
})
}
},
});
});
});
})
</script>
{/block}

View File

@ -1,141 +0,0 @@
{extend name='public/base' /}
{block name='content'}
{include file='public/content_header' /}
<section class="content">
<div class="row">
<div class="col-md-12">
<div class="box box-primary">
<!-- 表单头部 -->
<div class="box-header with-border">
<div class="btn-group">
<a class="btn flat btn-sm btn-default BackButton">
<i class="fa fa-arrow-left"></i>
返回
</a>
</div>
</div>
<!-- 表单 -->
<form id="dataForm" class="form-horizontal dataForm" action="" method="post"
enctype="multipart/form-data">
<!-- 表单字段区域 -->
<div class="box-body">
<div class="form-group">
<div class="col-sm-10 col-md-12">
<table id="dataList" class="table table-hover table-bordered datatable" width="100%">
<thead>
<tr class="input-type">
<th>操作</th>
<th>设备产品</th>
<th>数量</th>
<th>到期时间</th>
</tr>
</thead>
<tbody id="dataBody"></tbody>
</table>
</div>
</div>
</div>
<!-- 表单底部 -->
<div class="box-footer">
{:token()}
<div class="col-sm-2">
</div>
<div class="col-sm-10 col-md-4">
{if !isset($data)}
<div class="btn-group pull-right">
<label class="createContinue">
<input type="checkbox" value="1" id="_create" name="_create"
title="继续添加数据">继续分配</label>
</div>
{/if}
<div class="btn-group">
<button type="submit" class="btn flat btn-info dataFormSubmit">
保存
</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<table>
<tbody id="data-template" style="display: none">
<tr>
<td>
<a class="btn btn-xs btn-success" onclick="addNewField(this,2)">追加</a>
<a class="btn btn-xs btn-danger" onclick="delThisField(this,1)">删除</a>
</td>
<td>
<label>
<select name="goods_idFORM_INDEX[]" style="min-width: 380px;width: 420px;" class="form-control field-select select2" data-placeholder="请选择设备商品">
<option value=""></option>
{foreach name='goods_list' id='item'}
<option value="{$item.id}">
{$item.name}
</option>
{/foreach}
</select>
</label>
</td>
<td>
<label>
<input class="form-control field-type" value="" name="numberFORM_INDEX[]" placeholder="请输入数量">
</label>
</td>
<td>
<label>
<input class="form-control field-type" id="end_timeINDEX_ID" value="" name="end_timeFORM_INDEX[]" placeholder="请输入到期时间">
</label>
</td>
</tr>
</tbody>
</table>
</section>
<script>
/** 表单验证 **/
$('#dataForm').validate();
//表单索引
var formIndex =0;
addNewField(null, 1);
//添加新的字段
function addNewField(obj, type) {
formIndex++;
let template = $("#data-template").html().replace(/FORM_INDEX/g, '[' + formIndex + ']').replace(/INDEX_ID/g, formIndex);
if (obj == null) {
$("#dataBody").append(template);
} else {
if (type === 1) {
$(obj).parent().parent().before(template);
} else {
$(obj).parent().parent().after(template);
}
}
laydate.render({
elem: '#end_time'+formIndex
,type: 'datetime'
});
//刷新 dataBody DOM后的操作
dataBodyRefreshed();
}
$(function () {
dataBodyRefreshed();
});
//删除当前字段
function delThisField(obj) {
layer.confirm('您确认删除本行吗?', {title: '删除确认', closeBtn: 1, icon: 3}, function () {
$(obj).parent().parent().remove();
layer.closeAll();
});
}
//列表刷新后的操作
function dataBodyRefreshed() {
$('[data-toggle="tooltip"]').tooltip();
$('#dataBody .select2').select2();
}
</script>
{/block}

View File

@ -43,15 +43,14 @@
<select id="level" name="level" style="height:80px;width: 80px" >
<option value="" selected>全部</option>
<option value="0" {if isset($level) && $level=='0'}selected{/if}>无等级</option>
<option value="1" {if isset($level) && $level=='1'}selected{/if}>体验会员</option>
<option value="2" {if isset($level) && $level=='2'}selected{/if}>正式会员</option>
<option value="1" {if isset($level) && $level=='1'}selected{/if}>普通会员</option>
</select>
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">提现积分:</label>
<label class="layui-form-label">提现金额:</label>
<div class="layui-input-inline">
<input type="text" class="layui-input" name="integral_start" value="{$integral_start?$integral_start:'';}" autocomplete="off">
</div>
@ -130,15 +129,11 @@
<div class="layui-table-cell" style="width:100px;text-align:center;">用户等级</div>
</th>
<th>
<div class="layui-table-cell" style="width:100px;text-align:center;">可提现积分</div>
<div class="layui-table-cell" style="width:100px;text-align:center;">可提现金额</div>
</th>
<th>
<div class="layui-table-cell" style="width:100px;text-align:center;">设备数量</div>
</th>
<th>
<div style="width:380px;text-align:center;">上级推荐人</div>
</th>
<th><div class="layui-table-cell" style="width:120px;text-align:center;">推荐下级人数</div></th>
<th><div class="layui-table-cell" style="width:200px;text-align:center;">注册时间</div></th>
<th>
<div class="layui-table-cell" style="width:200px;text-align:center;">操作</div>
@ -167,28 +162,7 @@
<div class="layui-table-cell" style="width:100px;text-align:center;">{$item.user_level_id_text}</div>
</td>
<td>
<div class="layui-table-cell" style="width:100px;text-align:center;">{$item.integral}</div>
</td>
<td>
<div class="layui-table-cell" style="width:100px;text-align:center;">{$item.sb_num}</div>
</td>
<td>
<div class="layui-table-cell laytable-cell-1-0-2">
{if $item.first_leader_info != '系统'}
<img src="{$item.first_leader_info.avatar}" style="height:80px;width: 80px;margin-right: 10px;">
<div class="layui-input-inline" style="text-align:left;width: 240px;">
<p>用户编号:{$item.first_leader_info.sn}</p>
<p>用户昵称:{$item.first_leader_info.nickname}</p>
<p>用户手机:{$item.first_leader_info.mobile}</p>
</div>
{else}
<div class="layui-table-cell" style="width:380px;text-align:center;">{$item.first_leader_info}</div>
{/if}
</div>
</td>
<td>
<div class="layui-table-cell" style="width:120px;text-align:center;">{$item.fans}</div>
<div class="layui-table-cell" style="width:100px;text-align:center;">{$item.user_money}</div>
</td>
<td>
<div class="layui-table-cell" style="width:200px;text-align:center;">{$item.create_time}</div>
@ -198,9 +172,9 @@
class="btn btn-primary btn-xs" title="修改" data-toggle="tooltip">
修改
</a>
<a href="{:url('equipmentadd',['id'=>$item.id])}"
class="btn btn-primary btn-xs" title="分配设备" data-toggle="tooltip">
分配设备
<a href="javascript:;"
class="btn btn-primary btn-xs adjust_user" title="账户调整" data-toggle="tooltip" user_id='{$item.id}'>
账户调整
</a>
{if $item.status==1}
<a class="btn btn-warning btn-xs AjaxButton" data-toggle="tooltip" title="禁用"
@ -249,10 +223,6 @@
</div>
</section>
<script>
layui.use('form', function(){
var form = layui.form;
form.render('select');
});
//日期时间范围
laydate.render({
elem: '#start_time'
@ -266,6 +236,35 @@ laydate.render({
,type: 'datetime'
,trigger: 'click'
});
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
layui.config({
version:"2.6.6.20211117",
base: '/static/layui-admin/dist/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'element', 'jquery', 'like'], function () {
var $ = layui.$;
var like = layui.like;
//主图放大
$(document).on('click', '.image-show', function () {
var src = $(this).attr('src');
like.showImg(src,600);
});
//账户调整
$('.adjust_user').click(function () {
var id = $(this).attr('user_id');
layer.open({
type: 2
,title: '账户调整'
,content: '{:url("user/adjust_account")}?id='+id
,area: ['90%', '90%']
,yes: function(index, layero){
}
})
});
});
</script>
{/block}

View File

@ -37,14 +37,16 @@
</div>
<script>
layui.use(['index','table','like'], function(){
layui.config({
version:"2.6.6.20211117",
base: '/static/layui-admin/dist/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index','table','like'], function(){
var $ = layui.$
,form = layui.form
,table = layui.table
,like = layui.like;
// 确认
form.on('submit(confirm)', function(data){
console.log(data.field)

View File

@ -138,6 +138,8 @@ if (!function_exists('get_ad')) {
$ad[$key]['url'] = $row['jump_target'];
}
$ad[$key]['type'] = $row['jump_type'];
$ad[$key]['name'] = $row['name'];
$ad[$key]['describe'] = $row['describe'];
$ad[$key]['img'] = $web_url . $row['img'];
}
return $ad;
@ -180,3 +182,20 @@ if(!function_exists('curl_request')){
}
}
}
//分类递归
if(!function_exists('getSubs')){
function getSubs($categorys,$catId=0,$level=1){
$subs=array();
foreach($categorys as $item){
if($item['parent_id']==$catId){
$item['son'] = getSubs($categorys, $item['cid']);
if(empty($item['son'])) {
unset($item['son']);
}
array_push($subs, $item);
}
}
return $subs;
}
}

View File

@ -5,122 +5,97 @@
*/
namespace app\api\controller;
use app\common\model\User;
use app\common\model\AccountLog;
use app\common\model\Goodsindex;
use app\common\model\Goods;
use app\common\model\Order;
use app\common\model\MallImage;
use app\common\model\GoodsBrand;
use app\common\model\GoodsItem;
use app\common\model\GoodsCategory;
use app\common\model\MallImage;
use app\common\model\ShopConfig;
use app\common\model\PhaseConfig;
use tools\Crypt;
use think\Request;
class IndexController extends Controller
{
protected $authExcept = [
'home','recommend_goods','goods_info','goods_list','category_list'
'home','pattern_goods','goods_info','goods_list','category_list'
];
public function home(Request $request,AccountLog $almodel,Goods $gmodel,Order $omodel,User $umodel)
public function home(Request $request,Goods $gmodel,Goodsindex $gimodel)
{
//echo $token = $this->getToken(1).'|';
//echo $uid=Crypt::encrypt(1);
$param = $request->param();
$uid = $param['uid']?Crypt::decrypt($param['uid']):'';
//首页轮播
$carousel = get_ad('carousel',6);
//精品推荐
$merchant = get_ad('merchant',6);
//每日收益
$profit_num=ShopConfig::get('shouyi', 'num');
//弹窗配置
$goods_config=array();
$amount_today='0.00';
$amount_yesterday='0.00';
$amount_tuiguang='0.00';
if($uid){
$where[]=array('source_type','in','100,110,120');
$where[]=array('user_id','eq',$uid);
//今日收益
$amount_today = $almodel
->where($where)
->whereTime('create_time', 'today')
->sum('change_amount');
//昨天收益
$amount_yesterday = $almodel
->where($where)
->whereTime('create_time', 'yesterday')
->sum('change_amount');
//推广收益
$amount_tuiguang = $almodel
->where(['source_type' =>100,'user_id'=>$uid])
->sum('change_amount');
$goods_config['is_open']=ShopConfig::get('goods', 'is_open');
$is_first=ShopConfig::get('goods', 'is_first');
$goods_id=ShopConfig::get('goods', 'goods_id');
if($is_first==1){
$user_count=$umodel->where(array('user_level_id'=>1))->count();
if($user_count==0){
$goods_config['is_open']=0;
}
}
$ty_count=$omodel->where(array('order_type'=>2,'goods_id'=>$goods_id))->count();
if($ty_count>0){
$goods_config['is_open']=0;
}
$goods_config['day']=ShopConfig::get('goods', 'day');
if($goods_id){
$goods_info= $gmodel
->alias('g')
->field("mi.thumb_image as img, g.name")
->join('mall_image mi', 'mi.union_id= g.id and is_cover=1 and mi.type=1', 'LEFT')
->where(array('g.id'=>$goods_id))
->find();
$goods_info['img']=$this->img_url.$goods_info['img'];
$goods_config['goods_info'] =$goods_info;
}
$goodsindex_list=$gimodel->where(array('status'=>1))->order('sort_number ASC')->select();
$goodsindex=array();
foreach ($goodsindex_list as $key => $value) {
$goodsindex[$key]['id'] = Crypt::encrypt($value['id']);
$goodsindex[$key]['name']=$value['name'];
$goodsindex[$key]['type']=$value['type'];
$goods_ids=json_decode($value['goods_ids']);
$where[]=array('g.id','in',$goods_ids);
$goods_list=$gmodel
->alias('g')
->field("mi.thumb_image as img, g.name,g.price,g.id as goods_id,gb.name as brand_name")
->join('goods_brand gb', 'gb.id= g.brand_id')
->join('mall_image mi', 'mi.union_id= g.id and is_cover=1 and mi.type=1', 'LEFT')
->where($where)->select();
foreach ($goods_list as $k1 => $v1) {
$goods_list[$k1]['img'] =$this->img_url.$v1['img'];
$goods_list[$k1]['goods_id'] = Crypt::encrypt($v1['goods_id']);
}
$goodsindex[$key]['goods_list']=$goods_list;
}
$data = [
'carousel' =>$carousel,//首页轮播
'merchant' => $merchant,//精品推荐
'profit_num'=>$profit_num,//每日收益
'amount_today'=>$amount_today,//今日收益
'amount_yesterday'=>$amount_yesterday,//昨天收益
'amount_tuiguang'=>$amount_tuiguang,//推广收益
'goods_config'=>$goods_config,//弹窗配置
'goodsindex' => $goodsindex,//模式板块
];
return success($data);
}
//精品推荐
public function recommend_goods(Request $request,Goods $model)
//模式商品
public function pattern_goods(Request $request,Goods $model,Goodsindex $gimodel)
{
$param = $request->param();
$id = $param['id']?Crypt::decrypt($param['id']):'';
if(!$id){
return success(array('list'=>[]));
}
$goodsindex_info=$gimodel->where(array('status'=>1,'id'=>$id))->find();
if(!$goodsindex_info){
return success(array('list'=>[]));
}
$id = $param['id']?Crypt::decrypt($param['id']):'';
$goods_ids=json_decode($goodsindex_info['goods_ids']);
$where[]=array('g.id','in',$goods_ids);
$sort=$param['sort']??'asc';
$order=$param['order']??'g.sort_number';
$size=$param['size']>0?$param['size']:12;
$page_l=$param['page']>1?$param['page']:1;
$page=$size * ($page_l - 1);
$goods_count = $model
->alias('g')
->where(array('is_recommend'=>1))
->where($where)
->join('goods_brand gb', 'gb.id= g.brand_id')
->join('mall_image mi', 'mi.union_id= g.id and is_cover=1 and mi.type=1', 'LEFT')
->count();
$totalPages = ceil($goods_count / $size);
$goods_list = $model
->alias('g')
->field("mi.thumb_image as img, g.name,g.attr,g.price,g.order_num,g.id as goods_id")
->field("mi.thumb_image as img, g.name,g.price,g.id as goods_id,gb.name as brand_name")
->join('goods_brand gb', 'gb.id= g.brand_id')
->join('mall_image mi', 'mi.union_id= g.id and is_cover=1 and mi.type=1', 'LEFT')
->where(array('is_recommend'=>1))
->where($where)
->limit($page, $size)
->order('g.sort_number ASC')
->order($order.' '.$sort)
->select();
if (!$goods_list) {
return client_error('暂无数据');
return success(array('list'=>[]));
}
foreach ($goods_list as $k1 => $v1) {
$goods_list[$k1]['img'] =$this->img_url.$v1['img'];
@ -143,26 +118,43 @@ class IndexController extends Controller
$page_l=$param['page']>1?$param['page']:1;
$page=$size * ($page_l - 1);
$where[]=array('status','=',1);
$cid = $param['cid']?Crypt::decrypt($param['cid']):'';
if($cid){
$where[]=array('goods_category_id','=',$cid);
$where[]=array('gi.stock','>',0);
$keyword = $param['keyword']??'';
$where1='';
if($keyword){
foreach ($keyword as $v1) {
$where1.="( `spec_value` LIKE '%".$v1."%' OR `gb`.`name` LIKE '%".$v1."%' OR `gc`.`name` LIKE '%".$v1."%') or";
}
$where1=rtrim($where1,'or');
}
$sort=$param['sort']??'asc';
$order=$param['order']??'g.sort_number';
$goods_count = $model
->alias('g')
->where($where)
->where($where1)
->join('mall_image mi', 'mi.union_id= g.id and is_cover=1 and mi.type=1', 'LEFT')
->join('goods_brand gb', 'gb.id = g.brand_id')
->join('goods_item gi', 'gi.goods_id = g.id')
->join('goods_category gc', 'gc.id = g.goods_category_id')
->group('g.id')
->count();
$totalPages = ceil($goods_count / $size);
$goods_list = $model
->alias('g')
->field("mi.thumb_image as img,g.name,g.attr,g.price,g.order_num,g.id as goods_id")
->field("mi.thumb_image as img, g.name,g.price,g.id as goods_id,gb.name as brand_name")
->join('mall_image mi', 'mi.union_id= g.id and is_cover=1 and mi.type=1', 'LEFT')
->join('goods_brand gb', 'gb.id = g.brand_id')
->join('goods_item gi', 'gi.goods_id = g.id')
->join('goods_category gc', 'gc.id = g.goods_category_id')
->where($where)
->where($where1)
->limit($page, $size)
->order('g.sort_number ASC')
->group('g.id')
->order($order.' '.$sort)
->select();
if (!$goods_list) {
return client_error('暂无数据');
return success(array('list'=>[]));
}
foreach ($goods_list as $k1 => $v1) {
$goods_list[$k1]['img'] =$this->img_url.$v1['img'];
@ -178,33 +170,71 @@ class IndexController extends Controller
}
//商品详情
public function goods_info(Request $request,Goods $model,MallImage $mimodel)
public function goods_info(Request $request,Goods $model,MallImage $mimodel,GoodsItem $gimodel,PhaseConfig $pcmodel)
{
$param = $request->param();
$gid = $param['gid']?Crypt::decrypt($param['gid']):'';
if(!$gid){
return client_error('暂无数据');
}
$goods_info=$model->field('name,attr,price,order_num,id as goods_id,detail')->where(array('id'=>$gid,'status'=>1))->find();
$goods_info['goods_id'] = Crypt::encrypt($goods_info['goods_id']);
//商品信息
$goods_info=$model
->alias('g')
->field('g.name as goods_name,price,g.id as goods_id,detail,gb.name as brand_name,model,collocation_goods,original_price,goods_size,pc.name as phase_name')
->join('goods_brand gb', 'gb.id = g.brand_id')
->join('phase_config pc', 'pc.id= g.phase_id', 'LEFT')
->where(array('g.id'=>$gid,'status'=>1))->find();
//精选配置
$collocation_goods=json_decode($goods_info['collocation_goods']);
$where[]=array('g.id','in',$collocation_goods);
$goods_info['collocation_goods'] =$model
->alias('g')
->field("mi.thumb_image as img, g.name,g.price,g.id as goods_id,gb.name as brand_name")
->join('goods_brand gb', 'gb.id= g.brand_id')
->join('mall_image mi', 'mi.union_id= g.id and is_cover=1 and mi.type=1', 'LEFT')
->where($where)
->select();
foreach ($goods_info['collocation_goods'] as $k1 => $v1) {
$goods_info['collocation_goods'][$k1]['img'] =$this->img_url.$v1['img'];
$goods_info['collocation_goods'][$k1]['goods_id'] = Crypt::encrypt($v1['goods_id']);
}
$goods_info['goods_size']=explode("\r\n",$goods_info['goods_size']);
$img_list=$mimodel->field('thumb_image,ori_image')->where(array('union_id'=>$gid,'type'=>1))->select();
foreach ($img_list as $key => $value) {
$img_list[$key]['thumb_image'] =$this->img_url.$value['thumb_image'];
$img_list[$key]['ori_image'] =$this->img_url.$value['ori_image'];
}
return success(array('info'=>$goods_info,'img_list'=>$img_list));
//尺寸图片
$size_img=$this->img_url.ShopConfig::get('website', 'size_img');
//商品尺码
$goodsitem_list=$gimodel->field("id,spec_value,stock")->where(array('goods_id'=>$goods_info['goods_id']))->select();
foreach ($goodsitem_list as $key => $value) {
$goodsitem_list[$key]['id']=Crypt::encrypt($value['id']);
}
//品相列表
$phaseconfig_list=$pcmodel->field("name,describe")->all();
$goods_info['goods_id'] = Crypt::encrypt($goods_info['goods_id']);
return success(array('info'=>$goods_info,'img_list'=>$img_list,'size_img'=>$size_img,'goodsitem_list'=>$goodsitem_list,'phaseconfig_list'=>$phaseconfig_list));
}
//商品分类
public function category_list(Request $request,GoodsCategory $gcmodel)
//商品筛选
public function category_list(Request $request,GoodsCategory $gcmodel,GoodsBrand $gbmodel)
{
$category_list=$gcmodel->field('name,id as cid')->select();
foreach ($category_list as $k1 => $v1) {
$category_list[$k1]['cid'] = Crypt::encrypt($v1['cid']);
}
//广告
$ad = get_ad('goods',1);
return success(array('list'=>$category_list,'ad'=>$ad));
$brand_list=$gbmodel->field('name,initial')->where(array('is_show'=>1))->select();
$category_list=$gcmodel->field('name,id as cid,parent_id')->select();
$category=getSubs($category_list,0);
$size_list=ShopConfig::get('website', 'size');
$size_list=explode(',',$size_list);
$data=array(
'brand_list'=>$brand_list,
'category_list'=>$category,
'size_list'=>$size_list,
);
return success($data);
}
}

View File

@ -16,11 +16,9 @@ class AccountLog extends Model
//withdraw
public $SOURCE_TYPE = [
'100' =>'推广收益',
'110' =>'个人收益',
'120' =>'体验收益',
'130' =>'提现退回',
'140' =>'提现扣除',
'100' =>'系统操作',
'110' =>'提现退回',
'120' =>'提现扣除',
];
public function getSourceTypeTextAttr($value, $data)
@ -55,7 +53,7 @@ class AccountLog extends Model
$account_log->source_id = $source_id;
$account_log->source_sn = $source_sn;
$account_log->change_amount = $amount;
$account_log->left_amount = $user->integral;
$account_log->left_amount = $user->user_money;
$account_log->remark = $remark;
$account_log->extra = $extra;
$account_log->change_type = $change_type;

View File

@ -0,0 +1,17 @@
<?php
/**
* 购物车模型
*/
namespace app\common\model;
use think\model\concern\SoftDelete;
class Cart extends Model
{
use SoftDelete;
public $softDelete = true;
protected $name = 'cart';
protected $autoWriteTimestamp = true;
}

View File

@ -0,0 +1,59 @@
<?php
/**
* 寄卖订单模型
*/
namespace app\common\model;
use think\model\concern\SoftDelete;
use think\db;
class ConsignmentOrder extends Model
{
use SoftDelete;
public $softDelete = true;
protected $name = 'consignment_order';
protected $autoWriteTimestamp = true;
//可搜索字段
protected $searchField = ['mobile',];
//订单状态
public function getOrderStatusTextAttr($value, $data)
{
return self::JMORDER_TEXT[$data['order_status']];
}
//是否退回获取器
public function getIsReturnTextAttr($value, $data)
{
return self::BOOLEAN_TEXT[$data['is_return']];
}//订单取消时间获取器
public function getCancelTimeAttr($value)
{
return date('Y-m-d H:i:s',$value);
}
//订单取消时间修改器
public function setCancelTimeAttr($value)
{
return strtotime($value);
}
//订单关联商品
public function consignmentOrderGoods()
{
return $this->hasMany('consignment_order_goods', 'order_id', 'id');
}
//订单用户
public function user()
{
return $this->hasOne('user', 'id', 'user_id')
->field('id,sn,nickname,avatar,mobile,create_time');
}
//订单流程
public function logs()
{
return $this->hasMany('consignment_order_log', 'order_id', 'id')->order('id desc');
}
}

View File

@ -0,0 +1,29 @@
<?php
/**
* 订单商品表模型
*/
namespace app\common\model;
use think\model\concern\SoftDelete;
class ConsignmentOrderGoods extends Model
{
use SoftDelete;
public $softDelete = true;
protected $name = 'consignment_order_goods';
protected $autoWriteTimestamp = true;
//可搜索字段
protected $searchField = [];
//商品订单状态
public function getRefundStatusTextAttr($value, $data)
{
return self::JMORDER_GOODS_TEXT[$data['refund_status']];
}
}

View File

@ -0,0 +1,32 @@
<?php
/**
* 订单流程表模型
*/
namespace app\common\model;
use think\model\concern\SoftDelete;
class ConsignmentOrderLog extends Model
{
protected $name = 'consignment_order_log';
protected $autoWriteTimestamp = true;
//可搜索字段
protected $searchField = [];
//写入订单流程日志
public static function record($order_id, $remark, $extra = '')
{
if (empty($remark)) {
return true;
}
$log = new ConsignmentOrderLog();
$log->order_id = $order_id;
$log->remark = $remark;
$log->extra = $extra;
$log->create_time = time();
$log->save();
}
}

View File

@ -28,4 +28,16 @@ class Goods extends Model
{
return $this->belongsTo(GoodsCategory::class);
}
//关联商品尺寸
public function goodsItem()
{
return $this->hasMany('goods_item', 'goods_id', 'id');
}
//关联品牌
public function goodsBrand()
{
return $this->hasOne('goods_brand','id','brand_id')->field('id,name');
}
}

View File

@ -18,22 +18,18 @@ class GoodsBrand extends Model
protected $searchField = ['name',];
//是否显示:1-是.0-否获取器
public function getIsShowTextAttr($value, $data)
{
return self::BOOLEAN_TEXT[$data['is_show']];
}//删除时间获取器
public function getDeleteTimeAttr($value)
{
return date('Y-m-d H:i:s',$value);
}
//删除时间修改器
public function setDeleteTimeAttr($value)
{
return strtotime($value);
}
public function getIsShowTextAttr($value, $data)
{
return self::BOOLEAN_TEXT[$data['is_show']];
}//删除时间获取器
public function getDeleteTimeAttr($value)
{
return date('Y-m-d H:i:s',$value);
}
//删除时间修改器
public function setDeleteTimeAttr($value)
{
return strtotime($value);
}
}

View File

@ -0,0 +1,29 @@
<?php
/**
* 首页栏目商品模型
*/
namespace app\common\model;
use think\model\concern\SoftDelete;
class GoodsIndex extends Model
{
use SoftDelete;
public $softDelete = true;
protected $name = 'goods_index';
protected $autoWriteTimestamp = true;
//可搜索字段
protected $searchField = ['name',];
//是否上架获取器
public function getStatusTextAttr($value, $data)
{
return self::BOOLEAN_TEXT[$data['status']];
}
}

View File

@ -0,0 +1,33 @@
<?php
/**
* 商品的SKU模型
*/
namespace app\common\model;
use think\model\concern\SoftDelete;
class GoodsItem extends Model
{
protected $name = 'goods_item';
protected $autoWriteTimestamp = true;
/**
* Desc: 设置配置值
*/
public static function goods_item_upload($goods_id, $param)
{
$size=$param['size'];
$field_data = array();
foreach ($size as $key => $value) {
$data = self::where(['spec_value' => $param['size'][$key][0], 'goods_id' => $goods_id])->find();
if (empty($data)) {
self::insert(['spec_value' => $param['size'][$key][0], 'goods_id' => $goods_id, 'stock' => $param['number'][$key][0]]);
} else {
self::where(['spec_value' => $param['size'][$key][0], 'goods_id' => $goods_id])
->update(['stock' =>$param['number'][$key][0]]);
}
}
}
}

View File

@ -13,9 +13,13 @@ class Model extends \think\Model
//是否字段,使用场景:用户的是否冻结,文章是否为热门等等。
const BOOLEAN_TEXT = [0 => '否', 1 => '是'];
//用户等级
const LEVL_TEXT = [1 => '体验会员', 2=> '正式会员'];
//订单类型
const ORDER_TEXT = [1 => '正式订单', 2=> '体验订单'];
const LEVL_TEXT = [1 => '普通会员'];
//订单状态
const ORDER_TEXT = [0 => '待付款', 1=> '待发货',2=> '待收货',3=> '已完成'];
//寄卖状态
const JMORDER_TEXT = [0 => '审核中', 1=> '待上架',2=> '已上架',3=> '待客户确认',4=> '客户已确认',5=> '已取货',6=> '部分退回','7'=>'全部退回'];
//寄卖商品信息
const JMORDER_GOODS_TEXT = [0 => '审核中', 1=> '同意',2=> '驳回',3=> '退还','4'=>'上架'];
//是否为软删除
public $softDelete = true;

View File

@ -0,0 +1,182 @@
<?php
/**
* 消息模型
*/
namespace app\common\model;
use think\model\concern\SoftDelete;
use think\db;
use tools\Crypt;
class Notice extends Model
{
use SoftDelete;
public $softDelete = true;
protected $name = 'notice';
protected $autoWriteTimestamp = true;
/**
* Notes: 根据各个场景发送通知
* @param $user_id
* @param $params
*/
public static function noticeByScene($user_id, $params)
{
$scene_info = NoticeSetting::where('scene', $params['scene'])->find();
if (empty($scene_info)) {
throw new Exception('信息错误');
}
$scene_info['system_notice']=json_decode($scene_info['system_notice'],true);
$scene_info['sms_notice']=json_decode($scene_info['sms_notice'],true);
$scene_info['oa_notice']=json_decode($scene_info['oa_notice'],true);
$scene_info['mnp_notice']=json_decode($scene_info['mnp_notice'],true);
$params = self::mergeParams($params);
//发送系统消息
if (isset($scene_info['system_notice']['status']) && $scene_info['system_notice']['status'] == 1) {
$content = self::contentFormat($scene_info['system_notice']['content'], $params);
self::addNoticeLog($params, $scene_info,1, $content);
}
//发送短信记录
if (isset($scene_info['sms_notice']['status']) && $scene_info['sms_notice']['status'] == 1) {
}
//发送公众号记录
if (isset($scene_info['oa_notice']['status']) && $scene_info['oa_notice']['status'] == 1) {
//(new WxMessageServer($user_id,Client_::oa))->send($params);
}
//发送小程序记录
if (isset($scene_info['mnp_notice']['status']) && $scene_info['mnp_notice']['status'] == 1) {
//echo 22;
//(new WxMessageServer($user_id, Client_::mnp))->send($params);
}
}
/**
* Notes: 拼装额外参数
* @param $params
* @author 段誉(2021/4/28 18:21)
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public static function mergeParams($params)
{
//订单相关信息
if (!empty($params['order_id'])) {
$order = Db::name('order')->where(['id' => $params['order_id']])->find();
$order_goods = Db::name('order_goods')->alias('og')
->field('g.name')
->join('goods g', 'og.goods_id = g.id')
->where('og.order_id', $params['order_id'])
->find();
$goods_name = $order_goods['name'] ?? '商品';
if (mb_strlen($goods_name) > 8 ) {
$goods_name = mb_substr($goods_name,0,8) . '..';
}
$params['goods_name'] = $goods_name;
$params['order_sn'] = $order['order_sn'];
$params['time'] = date('Y-m-d H:i', $order['create_time']);
$params['total_num'] = $order['total_num'];
$params['order_amount'] = $order['order_amount'];
$order_id=Crypt::encrypt($params['order_id']);
}
//寄卖订单相关信息
if (!empty($params['jm_order_id'])) {
$order = Db::name('consignment_order')->where(['id' => $params['jm_order_id']])->find();
$order_goods = Db::name('consignment_order_goods')
->field('goods_name')
->where('order_id', $params['jm_order_id'])
->find();
$goods_name = $order_goods['goods_name'] ?? '商品';
if (mb_strlen($goods_name) > 8 ) {
$goods_name = mb_substr($goods_name,0,8) . '..';
}
$params['goods_name'] = $goods_name;
$params['order_sn'] = $order['order_sn'];
$params['time'] = date('Y-m-d H:i', $order['create_time']);
$order_id=Crypt::encrypt($params['jm_order_id']);
}
//用户相关信息
if (!empty($params['user_id'])) {
$user = Db::name('user')->where('id', $params['user_id'])->find();
$params['nickname'] = $user['nickname'];
}
//跳转路径
$jump_path = NoticeSetting::getPathByScene($params['scene'], $order_id ?? 0);
$params['url'] = $jump_path['url'];
$params['page'] = $jump_path['page'];
return $params;
}
//格式化消息内容(替换文本)
public static function contentFormat($content, $params)
{
foreach ($params as $k => $v) {
$search_replace = '{'.$k.'}';
$content = str_replace($search_replace, $v, $content);
}
return $content;
}
//添加通知记录
public static function addNoticeLog($params, $scene_info, $send_type, $content, $extra = '')
{
return Db::name('notice')->insertGetId([
'user_id' => $params['user_id'] ?? 0,
'title' => self::getTitleByScene($send_type, $scene_info),
'content' => $content,
'scene' => $params['scene'],
'receive_type' => self::getReceiveTypeByScene($params['scene']),
'send_type' => $send_type,
'extra' => $extra,
'create_time' => time()
]);
}
//根据不同发送类型获取标题
public static function getTitleByScene($send_type, $scene_info)
{
$title = '';
switch ($send_type) {
case NoticeSetting::SYSTEM_NOTICE:
$title = $scene_info['system_notice']['title'] ?? '';
break;
case NoticeSetting::SMS_NOTICE:
$title = '';
break;
case NoticeSetting::OA_NOTICE:
$title = $scene_info['oa_notice']['name'] ?? '';
break;
case NoticeSetting::MNP_NOTICE:
$title = $scene_info['mnp_notice']['name'] ?? '';
break;
}
return $title;
}
//根据场景返回当前接收对象
public static function getReceiveTypeByScene($scene)
{
if (in_array($scene, NoticeSetting::NOTICE_PLATFORM_SCENE)) {
return NoticeSetting::NOTICE_PLATFORM;
}
if (in_array($scene, NoticeSetting::NOTICE_USER_SCENE)) {
return NoticeSetting::NOTICE_USER;
}
if (in_array($scene, NoticeSetting::NOTICE_OTHER_SCENE)) {
return NoticeSetting::NOTICE_OTHER;
}
}
}

View File

@ -0,0 +1,112 @@
<?php
/**
* 消息模版模型
*/
namespace app\common\model;
use think\model\concern\SoftDelete;
class NoticeSetting extends Model
{
protected $name = 'notice_setting';
protected $autoWriteTimestamp = true;
//通知类型
const SYSTEM_NOTICE = 1;
const SMS_NOTICE = 2;
const OA_NOTICE = 3;
const MNP_NOTICE = 4;
//通知对象
const NOTICE_PLATFORM = 1; //通知平台
const NOTICE_USER = 2; //通知会员
const NOTICE_OTHER = 3; //通知游客(如新用户注册)
//通知会员
const ORDER_PAY_NOTICE = 100;//订单已支付
const ORDER_DELIVERY_NOTICE = 101;//订单已发货
const PLATFORM_PASS_REFUND_NOTICE = 102;//平台通过售后退款通知
const PLATFORM_REFUSE_REFUND_NOTICE = 103;//平台订单取货
const REGISTER_NOTICE = 104;//订单商品退回
const CHANGE_MOBILE_NOTICE = 105;//会员订单商品上架
const GET_BACK_MOBILE_NOTICE = 106;//重置密码短信通知
const REGISTER_SUCCESS_NOTICE = 107;//注册成功
const INVITE_SUCCESS_NOTICE = 108;//邀请成功
const GET_EARNINGS_NOTICE = 109;//获得收益
const GET_GODE_LOGIN_NOTICE = 110;//验证码登录
const BIND_MOBILE_NOTICE = 111;//绑定手机号
const GET_BACK_PAY_CODE_NOTICE = 112;//找回支付密码
//通知平台
const USER_PAID_NOTICE_PLATFORM = 200;//会员支付下单通知平台
const AFTER_SALE_NOTICE_PLATFORM = 201;//会员发起售后退款通知
//订单相关场景
const ORDER_SCENE = [
self::ORDER_PAY_NOTICE,
self::ORDER_DELIVERY_NOTICE,
self::PLATFORM_PASS_REFUND_NOTICE,
self::PLATFORM_REFUSE_REFUND_NOTICE,
self::REGISTER_NOTICE,
];
//通知平台的场景
const NOTICE_PLATFORM_SCENE = [
self::USER_PAID_NOTICE_PLATFORM,
self::AFTER_SALE_NOTICE_PLATFORM,
];
//通知会员的场景
const NOTICE_USER_SCENE = [
self::ORDER_PAY_NOTICE,
self::ORDER_DELIVERY_NOTICE,
self::PLATFORM_PASS_REFUND_NOTICE,
self::PLATFORM_REFUSE_REFUND_NOTICE,
self::CHANGE_MOBILE_NOTICE,
self::GET_BACK_MOBILE_NOTICE,
self::REGISTER_SUCCESS_NOTICE,
self::INVITE_SUCCESS_NOTICE,
self::GET_EARNINGS_NOTICE,
];
//通知游客(还不存在当前系统的人)
const NOTICE_OTHER_SCENE = [
self::REGISTER_NOTICE
];
//验证码的场景
const NOTICE_NEED_CODE = [
self::REGISTER_NOTICE,
self::CHANGE_MOBILE_NOTICE,
self::GET_BACK_MOBILE_NOTICE,
self::GET_GODE_LOGIN_NOTICE,
self::BIND_MOBILE_NOTICE,
self::GET_BACK_PAY_CODE_NOTICE,
];
/**
* Notes: 根据场景获取跳转地址
*/
public static function getPathByScene($scene, $extra_id)
{
$page = '/pages/index/index'; // 小程序主页路径
$url = '/mobile/pages/index/index'; // 公众号主页路径
if (in_array($scene, self::ORDER_SCENE)) {
$url = '/mobile/pages/order_details/order_details?id='.$extra_id;
$page = '/pages/order_details/order_details?id='.$extra_id;
}
return ['url' => $url, 'page' => $page];
}
}

View File

@ -6,7 +6,7 @@
namespace app\common\model;
use think\model\concern\SoftDelete;
use think\db;
class Order extends Model
{
use SoftDelete;
@ -17,23 +17,70 @@ class Order extends Model
//可搜索字段
protected $searchField = [];
//结束时间获取器
public function getEndTimeAttr($value)
{
return date('Y-m-d H:i:s',$value);
}
//结束时间修改器
public function setEndTimeAttr($value)
{
return strtotime($value);
}
//订单类型
public function getOrderTypeTextAttr($value, $data)
//发货时间获取器
public function getShippingTimeAttr($value)
{
return self::ORDER_TEXT[$data['order_type']];
return date('Y-m-d H:i:s',$value);
}
//订单状态
public function getOrderStatusTextAttr($value, $data)
{
return self::ORDER_TEXT[$data['order_status']];
}
//订单关联商品
public function orderGoods()
{
return $this->hasMany(OrderGoods::class, 'order_id', 'id');
}
//订单用户
public function user()
{
return $this->hasOne('user', 'id', 'user_id')
->field('id,sn,nickname,avatar,mobile,create_time');
}
//收货地址
public function getDeliveryAddressAttr($value, $data)
{
$region = Db::name('dev_region')
->where('id', 'IN', [$data['province'], $data['city'], $data['district']])
->order('level asc')
->column('name');
$region_desc = implode('', $region);
return $region_desc . $data['address'];
}
/**
* Notes: 发货操作
* @param $data
*/
public static function delivery_handle($data)
{
$order_id = $data['order_id'];
$order = Order::get(['id' => $order_id], ['order_goods']);
if ($order['invoice_no']){
return true;
}
//更新订单下商品的发货状态
$order->update_time = time();
$order->shipping_time = time();
$order->order_status = 2;
$order->invoice_name = $data['invoice_name'];
$order->invoice_no = $data['invoice_no'];
$order->save();
$data_info=[
'user_id' => $order['user_id'],
'order_id' => $order['id'],
'scene' =>101,
'shipping_name' => $data['invoice_name'],
'invoice_no' => $data['invoice_no'],
'time' => date('Y-m-d H:i:s')
];
Notice::noticeByScene($order['user_id'],$data_info);
}
}

View File

@ -0,0 +1,16 @@
<?php
/**
* 订单商品模型
*/
namespace app\common\model;
use think\model\concern\SoftDelete;
class OrderGoods extends Model
{
use SoftDelete;
public $softDelete = true;
protected $name = 'order_goods';
protected $autoWriteTimestamp = true;
}

View File

@ -0,0 +1,25 @@
<?php
/**
* 品相配置模型
*/
namespace app\common\model;
use think\model\concern\SoftDelete;
class PhaseConfig extends Model
{
use SoftDelete;
public $softDelete = true;
protected $name = 'phase_config';
protected $autoWriteTimestamp = true;
//可搜索字段
protected $searchField = ['name','describe',];
}

View File

@ -0,0 +1,48 @@
<?php
/**
* 寄卖订单验证器
*/
namespace app\common\validate;
class ConsignmentOrderValidate extends Validate
{
protected $rule = [
'order_sn|订单编号' => 'require',
'user_id|用户id' => 'require',
'order_status|订单状态;0-审核中;1-待上架;2-已上架;3-已取消' => 'require',
'is_return|是否退回' => 'require',
'consignee|收货人' => 'require',
'address|地址' => 'require',
'mobile|手机' => 'require',
'th_consignee|退回收货人' => 'require',
'th_address|退回地址' => 'require',
'th_mobile|退回电话' => 'require',
'goods_price|订单商品总价' => 'require',
];
protected $message = [
'order_sn.require' => '订单编号不能为空',
'user_id.require' => '用户id不能为空',
'order_status.require' => '订单状态;0-审核中;1-待上架;2-已上架;3-已取消不能为空',
'is_return.require' => '是否退回不能为空',
'consignee.require' => '收货人不能为空',
'address.require' => '地址不能为空',
'mobile.require' => '手机不能为空',
'th_consignee.require' => '退回收货人不能为空',
'th_address.require' => '退回地址不能为空',
'th_mobile.require' => '退回电话不能为空',
'goods_price.require' => '订单商品总价不能为空',
];
protected $scene = [
'add' => ['order_sn','user_id','order_status','is_return','consignee','address','mobile','th_consignee','th_address','th_mobile','goods_price',],
'edit' => ['order_sn','user_id','order_status','is_return','consignee','address','mobile','th_consignee','th_address','th_mobile','goods_price',],
];
}

View File

@ -0,0 +1,34 @@
<?php
/**
* 首页栏目商品验证器
*/
namespace app\common\validate;
class GoodsIndexValidate extends Validate
{
protected $rule = [
'name|栏目名称' => 'require',
'goods_ids|商品id组' => 'require',
'sort_number|排序(升序)' => 'require',
'status|是否上架' => 'require',
];
protected $message = [
'name.require' => '栏目名称不能为空',
'goods_ids.require' => '商品id组不能为空',
'sort_number.require' => '排序(升序)不能为空',
'status.require' => '是否上架不能为空',
];
protected $scene = [
'add' => ['name','sort_number','status',],
'edit' => ['name','sort_number','status',],
];
}

View File

@ -10,8 +10,9 @@ class GoodsValidate extends Validate
protected $rule = [
'goods_category_id|所属分类' => 'require',
'name|名称' => 'require',
'code|编码' => 'require',
'price|售价' => 'require',
'attr|规格' => 'require',
'brand_id|品牌' => 'require',
'detail|详情' => 'require',
'stock|库存' => 'require',
'sort_number|排序(升序' => 'require',
@ -22,8 +23,9 @@ class GoodsValidate extends Validate
protected $message = [
'goods_category_id.require' => '所属分类不能为空',
'name.require' => '名称不能为空',
'code.require' => '商品编号不能为空',
'price.require' => '售价不能为空',
'attr.require' => '规格不能为空',
'brand_id.require' => '品牌不能为空',
'detail.require' => '详情不能为空',
'stock.require' => '库存不能为空',
'sort_number.require' => '排序(升序不能为空',
@ -32,8 +34,8 @@ class GoodsValidate extends Validate
];
protected $scene = [
'add' => ['goods_category_id', 'name', 'price', 'attr', 'detail', 'stock', 'sort_number', 'status',],
'edit' => ['goods_category_id', 'name', 'price', 'attr', 'detail', 'stock', 'sort_number', 'status',],
'add' => ['goods_category_id', 'name','code', 'price', 'brand_id', 'detail', 'sort_number', 'status',],
'edit' => ['goods_category_id', 'name','code', 'price', 'brand_id', 'detail', 'sort_number', 'status',],
];

View File

@ -8,34 +8,18 @@ namespace app\common\validate;
class OrderValidate extends Validate
{
protected $rule = [
'order_no|订单编号' => 'require',
'user_id|下单用户' => 'require',
'order_price|订单金额' => 'require',
'end_time|结束时间' => 'require',
'goods_id|商品id' => 'require',
'goods_name|商品名称' => 'require',
'attr|规格' => 'require',
'number|数量' => 'require',
'profit|产生收益' => 'require',
'invoice_name|物流公司' => 'require',
'invoice_no|物流单号' => 'require',
];
protected $message = [
'order_no.require' => '订单编号不能为空',
'user_id.require' => '下单用户不能为空',
'order_price.require' => '订单金额不能为空',
'end_time.require' => '结束时间不能为空',
'goods_id.require' => '商品id不能为空',
'goods_name.require' => '商品名称不能为空',
'attr.require' => '规格不能为空',
'number.require' => '数量不能为空',
'profit.require' => '产生收益不能为空',
'invoice_name.require' => '物流公司不能为空',
'invoice_no.require' => '物流单号不能为空',
];
protected $scene = [
'add' => ['order_no','user_id','order_price','end_time','goods_id','goods_name','attr','number','profit',],
'edit' => ['order_no','user_id','order_price','end_time','goods_id','goods_name','attr','number','profit',],
'hansle'=>['invoice_name','invoice_no']
];

View File

@ -0,0 +1,30 @@
<?php
/**
* 品相配置验证器
*/
namespace app\common\validate;
class PhaseConfigValidate extends Validate
{
protected $rule = [
'name|名称' => 'require',
'describe|描述' => 'require',
];
protected $message = [
'name.require' => '名称不能为空',
'describe.require' => '描述不能为空',
];
protected $scene = [
'add' => ['name','describe',],
'edit' => ['name','describe',],
];
}

View File

@ -0,0 +1,128 @@
/**
@Name:layuiAdmin iframe版全局配置
@Author:贤心
@Site:http://www.layui.com/admin/
@License:LPPL(layui付费产品协议)
*/
layui.define(['laytpl', 'layer', 'element', 'util'], function(exports){
exports('setter', {
container: 'LAY_app' //容器ID
,base: layui.cache.base //记录静态资源所在路径
,views: layui.cache.base + 'tpl/' //动态模板所在目录
,entry: 'index' //默认视图文件名
,engine: '.html' //视图文件后缀名
,pageTabs: true //是否开启页面选项卡功能。iframe版推荐开启
,name: 'layuiAdmin'
,tableName: ( typeof theme_tag !== 'undefined' && theme_tag === 2)?'layuiAdmin2':'layuiAdmin'
,MOD_NAME: 'admin' //模块事件名
,debug: true //是否开启调试模式。如开启,接口异常时会抛出异常 URL 等信息
//自定义请求字段
,request: {
tokenName: false //自动携带 token 的字段名(如:access_token)。可设置 false 不携带。
}
//自定义响应字段
,response: {
statusName: 'code' //数据状态的字段名称
,statusCode: {
ok: 1 //数据状态一切正常的状态码
,logout: 1001 //登录状态失效的状态码
}
,msgName: 'msg' //状态信息的字段名称
,dataName: 'data' //数据详情的字段名称
}
//扩展的第三方模块
,extend: [
'echarts', //echarts 核心包
'echartsTheme' //echarts 主题
]
//主题配置
,theme: {
//内置主题配色方案
color: [{
main: '#20222A' //主题色
,selected: '#009688' //选中色
,alias: 'default' //默认别名
},{
main: '#03152A'
,selected: '#3B91FF'
,alias: 'dark-blue' //藏蓝
},{
main: '#2E241B'
,selected: '#A48566'
,alias: 'coffee' //咖啡
},{
main: '#50314F'
,selected: '#7A4D7B'
,alias: 'purple-red' //紫红
},{
main: '#344058'
,logo: '#1E9FFF'
,selected: '#1E9FFF'
,alias: 'ocean' //海洋
},{
main: '#3A3D49'
,logo: '#2F9688'
,selected: '#5FB878'
,alias: 'green' //墨绿
},{
main: '#20222A'
,logo: '#F78400'
,selected: '#F78400'
,alias: 'red' //橙色
},{
main: '#28333E'
,logo: '#AA3130'
,selected: '#AA3130'
,alias: 'fashion-red' //时尚红
},{
main: '#24262F'
,logo: '#3A3D49'
,selected: '#009688'
,alias: 'classic-black' //经典黑
},{
logo: '#226A62'
,header: '#2F9688'
,alias: 'green-header' //墨绿头
},{
main: '#344058'
,logo: '#0085E8'
,selected: '#1E9FFF'
,header: '#1E9FFF'
,alias: 'ocean-header' //海洋头
},{
header: '#393D49'
,alias: 'classic-black-header' //经典黑头
},{
main: '#50314F'
,logo: '#50314F'
,selected: '#7A4D7B'
,header: '#50314F'
,alias: 'purple-red-header' //紫红头
},{
main: '#28333E'
,logo: '#28333E'
,selected: '#AA3130'
,header: '#AA3130'
,alias: 'fashion-red-header' //时尚红头
},{
main: '#28333E'
,logo: '#009688'
,selected: '#009688'
,header: '#009688'
,alias: 'green-header' //墨绿头
}]
//初始的颜色索引,对应上面的配色方案数组索引
//如果本地已经有主题色记录,则以本地记录为优先,除非请求本地数据(localStorage)
,initColorIndex: 1
}
});
});

View File

@ -0,0 +1,36 @@
{
"code": 1
,"msg": ""
,"count": "100"
,"data": [{
"prograss": "开会"
,"time": "一小时"
,"complete": "已完成"
,"LAY_CHECKED": true
},{
"prograss": "项目开发"
,"time": "两小时"
,"complete": "进行中"
,"LAY_CHECKED": true
},{
"prograss": "陪吃饭"
,"time": "一小时"
,"complete": "未完成"
},{
"prograss": "修改小bug"
,"time": "半小时"
,"complete": "未完成"
},{
"prograss": "修改大bug"
,"time": "两小时"
,"complete": "未完成"
},{
"prograss": "修改小bug"
,"time": "半小时"
,"complete": "未完成"
},{
"prograss": "修改大bug"
,"time": "两小时"
,"complete": "未完成"
}]
}

View File

@ -0,0 +1,76 @@
{
"code": 1
,"msg": ""
,"count": "100"
,"data": [{
"id": 111
,"title": "社区开始接受 “赞助商广告” 投放"
,"username": "贤心"
,"channel": "公告"
,"href": "http://fly.layui.com/jie/15697/"
,"crt": 61632
},{
"id": 222
,"title": "layui 一周年"
,"username": "猫吃"
,"channel": "讨论"
,"href": "http://fly.layui.com/jie/16622/"
,"crt": 61632
},{
"id": 333
,"title": "四个月的前端"
,"username": "fd"
,"channel": "分享"
,"href": "http://fly.layui.com/jie/16651/"
,"crt": 61632
},{
"id": 333
,"title": "如何评价LayUI和他的作者闲心"
,"username": "纸飞机"
,"channel": "提问"
,"href": "http://fly.layui.com/jie/9352/"
,"crt": 61632
},{
"id": 333
,"title": "如何评价LayUI和他的作者闲心"
,"username": "纸飞机"
,"channel": "提问"
,"href": "http://fly.layui.com/jie/9352/"
,"crt": 61632
},{
"id": 333
,"title": "如何评价LayUI和他的作者闲心"
,"username": "纸飞机"
,"channel": "提问"
,"href": "http://fly.layui.com/jie/9352/"
,"crt": 61632
},{
"id": 333
,"title": "如何评价LayUI和他的作者闲心"
,"username": "纸飞机"
,"channel": "提问"
,"href": "http://fly.layui.com/jie/9352/"
,"crt": 61632
},{
"id": 333
,"title": "如何评价LayUI和他的作者闲心"
,"username": "纸飞机"
,"channel": "提问"
,"href": "http://fly.layui.com/jie/9352/"
,"crt": 61632
},{
"id": 333
,"title": "如何评价LayUI和他的作者闲心"
,"username": "纸飞机"
,"channel": "提问"
,"href": "http://fly.layui.com/jie/9352/"
,"crt": 61632
},{
"id": 333
,"title": "如何评价LayUI和他的作者闲心"
,"username": "纸飞机"
,"channel": "提问"
,"href": "http://fly.layui.com/jie/9352/"
,"crt": 61632
}]
}

View File

@ -0,0 +1,46 @@
{
"code": 1
,"msg": ""
,"count": "100"
,"data": [{
"keywords": "贤心是男是女"
,"frequency": 8520
,"userNums": 2216
},{
"keywords": "Java程序员能找到女朋友吗"
,"frequency": 666
,"userNums": 333
},{
"keywords": "此表格是静态模拟数据"
,"frequency": 666
,"userNums": 333
},{
"keywords": "layui官方教程"
,"frequency": 666
,"userNums": 333
},{
"keywords": "layui官方教程"
,"frequency": 666
,"userNums": 333
},{
"keywords": "layui官方教程"
,"frequency": 666
,"userNums": 333
},{
"keywords": "layui官方教程"
,"frequency": 666
,"userNums": 333
},{
"keywords": "layui官方教程"
,"frequency": 666
,"userNums": 333
},{
"keywords": "layui官方教程"
,"frequency": 666
,"userNums": 333
},{
"keywords": "layui官方教程"
,"frequency": 666
,"userNums": 333
}]
}

View File

@ -0,0 +1,56 @@
{
"code": 1
,"msg": ""
,"count": "100"
,"data": [{
"id": "001"
,"reviewers": "赵"
,"content": "我又爱上编程了"
,"commtime": 20160312
},{
"id": "002"
,"reviewers": "钱"
,"content": "女生出门要小心"
,"commtime": 20160821
},{
"id": "003"
,"reviewers": "孙"
,"content": "框架就用layui"
,"commtime": 20161212
},{
"id": "004"
,"reviewers": "李"
,"content": "心姐么么哒"
,"commtime": 20170311
},{
"id": "005"
,"reviewers": "周"
,"content": "希望明天是个好天气"
,"commtime": 20170612
},{
"id": "006"
,"reviewers": "吴"
,"content": "我又爱上编程了"
,"commtime": 20171112
},{
"id": "007"
,"reviewers": "郑"
,"content": "女生出门要小心"
,"commtime": 20171230
},{
"id": "008"
,"reviewers": "王"
,"content": "框架就用layui"
,"commtime": 20180112
},{
"id": "009"
,"reviewers": "冯"
,"content": "心姐么么哒"
,"commtime": 20180221
},{
"id": "010"
,"reviewers": "陈"
,"content": "希望明天是个好天气"
,"commtime": 20180312
}]
}

View File

@ -0,0 +1,62 @@
{
"code": 1
,"msg": ""
,"count": "100"
,"data": [{
"id": "001"
,"label": "美食"
,"title": "舌尖上的中国第一季"
,"author": "作者-1"
,"content": "通过中华美食的多个侧面,来展现食物给中国人生活带来的仪式、伦理等方面的文化;见识中国特色食材以及与食物相关、构成中国美食特有气质的一系列元素;了解中华饮食文化的精致和源远流长"
,"uploadtime": 20121204
,"status": true
},{
"id": "002"
,"label": "美食"
,"title": "舌尖上的中国第二季"
,"author": "作者-2"
,"content": "以食物为窗口,读懂中国——通过美食,使人们可以有滋有味地认知这个古老的东方国度。“一方水土一方人”,本片将通过展示人们日常生活中与美食相关的多重侧面,描绘与感知中国人的文化传统、家族观念、生活态度与故土难离。人们收获、保存、烹饪、生产美食,并在其过程中留存和传承食物所承载的味觉记忆、饮食习俗、文化样态与家常情感。"
,"uploadtime": 20141204
,"status": false
},{
"id": "003"
,"label": "美食"
,"title": "舌尖上的中国第三季"
,"author": "作者-3"
,"content": "以食物为窗口,读懂中国——通过美食,使人们可以有滋有味地认知这个古老的东方国度。“一方水土一方人”,本片将通过展示人们日常生活中与美食相关的多重侧面,描绘与感知中国人的文化传统、家族观念、生活态度与故土难离。人们收获、保存、烹饪、生产美食,并在其过程中留存和传承食物所承载的味觉记忆、饮食习俗、文化样态与家常情感将世界美食和中国美食进行比照。春耕、夏耘、秋收、冬藏,天人合一的东方哲学让中国饮食依时而变,智慧灵动,中医营养摄生学说创造了食材运用的新天地,儒家人伦道德则把心意和家的味道端上我们的餐桌。淘洗历史,糅合时光,一代又一代的中国人在天地间升起烟火,用至精至诚的心意烹制食物,一餐一食之间,中国人展示个性,确认归属,构建文明,理解和把握着世界的奥妙。"
,"uploadtime": 20161204
,"status": false
},{
"id": "004"
,"label": "历史"
,"title": "诸葛亮骂王朗"
,"author": "作者-1"
,"content": "皓首匹夫!苍髯老贼!你即将命归于九泉之下,届时,有何面目见汉朝二十四代先帝?二臣贼子!你枉活七十有六,一生未立寸功,只会摇唇舞舌,助曹为虐!一条断脊之犬,还敢在我军阵前狺狺狂吠!我从未见过如此厚颜无耻之人!!!"
,"uploadtime": 20180201
,"status": false
},{
"id": "005"
,"label": "新闻"
,"title": "新时代特色中国梦"
,"author": "作者-1"
,"content": "今天,我们比历史上任何时期都更接近、更有信心和能力实现中华民族伟大复兴的目标。新时代已经到来,蓝图已经绘就,中国梦离我们越来越近了。"
,"uploadtime": 20180512
,"status": false
},{
"id": "006"
,"label": "新闻"
,"title": "新时代特色中国梦"
,"author": "作者-2"
,"content": "梦想不会主动走向我们,只有我们去主动实现梦想。行百里者半九十。虽然中国梦离我们越来越近了,但是要实现中国梦,还要靠我们以永不懈怠的精神状态、功在不舍的坚强意志,不忘初心,继续前进。"
,"uploadtime": 20180514
,"status": false
},{
"id": "007"
,"label": "体育"
,"title": "皇马大战利物浦"
,"author": "作者-3"
,"content": "对欧足联而言,更想要产生个新冠军。连续三年都是同一个冠军队,这会毁掉欧冠……”格里姆表态,“皇马有梦幻般的阵容,但从促进竞争的角度而言,另一支球队获胜会更好。"
,"uploadtime": 20180515
,"status": false
}]
}

View File

@ -0,0 +1,21 @@
{
"code": 1
,"msg": ""
,"count": "100"
,"data": [{
"id": "001"
,"tags": "美食"
},{
"id": "002"
,"tags": "新闻"
},{
"id": "003"
,"tags": "八卦"
},{
"id": "004"
,"tags": "体育"
},{
"id": "005"
,"tags": "音乐"
}]
}

View File

@ -0,0 +1,62 @@
{
"code": 1
,"msg": ""
,"count": "100"
,"data": [{
"id": "1001"
,"poster": "赵"
,"avatar": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg"
,"content": "为什么花儿这么么红"
,"posttime": 20160805
,"top": false
},{
"id": "1002"
,"poster": "钱"
,"avatar": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg"
,"content": "喜欢胡歌,赞赞赞"
,"posttime": 20161205
,"top": true
},{
"id": "1003"
,"poster": "孙"
,"avatar": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg"
,"content": "明天就要考试了,好紧张,求保佑"
,"posttime": 20170405
,"top": false
},{
"id": "1004"
,"poster": "李"
,"avatar": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg"
,"content": "希望明天是个好天气"
,"posttime": 20171005
,"top": false
},{
"id": "1005"
,"poster": "周"
,"avatar": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg"
,"content": "女追男隔层纱,是不是真的"
,"posttime": 20180205
,"top": false
},{
"id": "1006"
,"poster": "吴"
,"avatar": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg"
,"content": "竟然有人跳楼,年轻人想不开啊!"
,"posttime": 20180512
,"top": false
},{
"id": "1007"
,"poster": "郑"
,"avatar": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg"
,"content": "大家一定不能学那个年轻人,珍爱生命啊"
,"posttime": 20180512
,"top": false
},{
"id": "1008"
,"poster": "王"
,"avatar": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg"
,"content": "想知道南昌哪里有好吃的西安肉夹馍"
,"posttime": 20180514
,"top": false
}]
}

View File

@ -0,0 +1,69 @@
{
"code": 1
,"msg": ""
,"count": "100"
,"data": [{
"id": "001"
,"replyer": "吴"
,"cardid": "1002"
,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg"
,"content": "有眼光,我也喜欢胡歌!"
,"replytime": 20161205
},{
"id": "002"
,"replyer": "郑"
,"cardid": "1002"
,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg"
,"content": "同上同上。"
,"replytime": 20161205
},{
"id": "003"
,"replyer": "王"
,"cardid": "1003"
,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg"
,"content": "能过一定过,不能过紧张也没用"
,"replytime": 20170405
},{
"id": "004"
,"replyer": "冯"
,"cardid": "1001"
,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg"
,"content": "可能因为你流鼻血了。"
,"replytime": 20170405
},{
"id": "005"
,"replyer": "陈"
,"cardid": "1003"
,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg"
,"content": "加油加油,看好你"
,"replytime": 20170405
},{
"id": "006"
,"replyer": "褚"
,"cardid": "1005"
,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg"
,"content": "纯属放屁"
,"replytime": 20180207
},{
"id": "007"
,"replyer": "卫"
,"cardid": "1005"
,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg"
,"content": "可以试试"
,"replytime": 20180207
},{
"id": "006"
,"replyer": "蒋"
,"cardid": "1006"
,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg"
,"content": "是啊是啊,太恐怖了。"
,"replytime": 20180512
},{
"id": "007"
,"replyer": "沈"
,"cardid": "1008"
,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg"
,"content": "魏家凉皮的凉皮就很不错奥。"
,"replytime": 20180515
}]
}

View File

@ -0,0 +1,39 @@
{
"code": 1,
"msg": "",
"title": "JSON请求的相册",
"id": 8,
"start": 0,
"data": [
{
"alt": "layer",
"pid": 109,
"src": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg",
"thumb": ""
},
{
"alt": "说好的,一起Fly",
"pid": 110,
"src": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4kebemcj20ga09saa1.jpg",
"thumb": ""
},
{
"alt": "佟丽娅女神",
"pid": 111,
"src": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg",
"thumb": ""
},
{
"alt": "凤姐是个好人",
"pid": 112,
"src": "https://wx3.sinaimg.cn/mw690/5db11ff4gy1fmx4kec9vuj20b20dwmyk.jpg",
"thumb": ""
},
{
"alt": "星空如此深邃",
"pid": 113,
"src": "https://wx3.sinaimg.cn/mw690/5db11ff4gy1fmx4keca8ag208g06iglw.gif",
"thumb": ""
}
]
}

View File

@ -0,0 +1,96 @@
{
"code": 1
,"msg": ""
,"data": {
"mine": {
"username": "纸飞机"
,"id": "100000"
,"status": "online"
,"sign": "在深邃的编码世界,做一枚轻盈的纸飞机"
,"avatar": "//res.layui.com/images/fly/avatar/00.jpg"
}
,"friend": [{
"groupname": "知名人物"
,"id": 0
,"list": [{
"username": "贤心"
,"id": "100001"
,"avatar": "//tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg"
,"sign": "这些都是测试数据,实际使用请严格按照该格式返回"
,"status": "online"
},{
"username": "刘涛tamia"
,"id": "100001222"
,"sign": "如约而至,不负姊妹欢乐颂"
,"avatar": "//tva4.sinaimg.cn/crop.0.1.1125.1125.180/475bb144jw8f9nwebnuhkj20v90vbwh9.jpg"
},{
"username": "谢楠"
,"id": "10034001"
,"avatar": "//tva2.sinaimg.cn/crop.1.0.747.747.180/633f068fjw8f9h040n951j20ku0kr74t.jpg"
,"sign": ""
},{
"username": "马小云"
,"id": "168168"
,"avatar": "//tva1.sinaimg.cn/crop.0.0.180.180.180/7fde8b93jw1e8qgp5bmzyj2050050aa8.jpg"
,"sign": "让天下没有难写的代码"
},{
"username": "徐小峥"
,"id": "666666"
,"avatar": "//tva1.sinaimg.cn/crop.0.0.512.512.180/6a4acad5jw8eqi6yaholjj20e80e8t9f.jpg"
,"sign": "代码在囧途,也要写到底"
}]
},{
"groupname": "网红声优"
,"id": 1
,"list": [{
"username": "罗玉凤"
,"id": "121286"
,"avatar": "//tva4.sinaimg.cn/crop.0.0.640.640.180/4a02849cjw8fc8vn18vktj20hs0hs75v.jpg"
,"sign": "在自己实力不济的时候,不要去相信什么媒体和记者。他们不是善良的人,有时候候他们的采访对当事人而言就是陷阱"
},{
"username": "Z_子晴"
,"id": "108101"
,"avatar": "//tva1.sinaimg.cn/crop.0.23.1242.1242.180/8693225ajw8fbimjimpjwj20yi0zs77l.jpg"
,"sign": "微电商达人"
},{
"username": "大鱼_MsYuyu"
,"id": "12123454"
,"avatar": "//tva2.sinaimg.cn/crop.0.0.512.512.180/005LMAegjw8f2bp9qg4mrj30e80e8dg5.jpg"
,"sign": "我瘋了!這也太準了吧 超級笑點低"
},{
"username": "醋醋cucu"
,"id": "102101"
,"avatar": "//tva2.sinaimg.cn/crop.0.0.640.640.180/648fbe5ejw8ethmg0u9egj20hs0ht0tn.jpg"
,"sign": ""
},{
"username": "柏雪近在它香"
,"id": "3435343"
,"avatar": "//tva2.sinaimg.cn/crop.0.8.751.751.180/961a9be5jw8fczq7q98i7j20kv0lcwfn.jpg"
,"sign": ""
}]
},{
"groupname": "女神艺人"
,"id": 2
,"list": [{
"username": "王祖贤"
,"id": "76543"
,"avatar": "//wx2.sinaimg.cn/mw690/5db11ff4gy1flxmew7edlj203d03wt8n.jpg"
,"sign": "我爱贤心"
},{
"username": "佟丽娅"
,"id": "4803920"
,"avatar": "//tva3.sinaimg.cn/crop.0.0.750.750.180/5033b6dbjw8etqysyifpkj20ku0kuwfw.jpg"
,"sign": "我也爱贤心吖吖啊"
}]
}]
,"group": [{
"groupname": "前端群"
,"id": "101"
,"avatar": "//tva1.sinaimg.cn/crop.0.0.200.200.50/006q8Q6bjw8f20zsdem2mj305k05kdfw.jpg"
},{
"groupname": "Fly社区官方群"
,"id": "102"
,"avatar": "//tva2.sinaimg.cn/crop.0.0.199.199.180/005Zseqhjw1eplix1brxxj305k05kjrf.jpg"
}]
}
}

View File

@ -0,0 +1,67 @@
{
"code": 1
,"msg": ""
,"data": {
"list": [{
"username": "贤心"
,"id": "100001"
,"avatar": "//tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg"
,"sign": "这些都是测试数据,实际使用请严格按照该格式返回"
},{
"username": "Z_子晴"
,"id": "108101"
,"avatar": "//tva1.sinaimg.cn/crop.0.23.1242.1242.180/8693225ajw8fbimjimpjwj20yi0zs77l.jpg"
,"sign": "微电商达人"
},{
"username": "Lemon_CC"
,"id": "102101"
,"avatar": "//tva4.sinaimg.cn/crop.0.0.180.180.180/6d424ea5jw1e8qgp5bmzyj2050050aa8.jpg"
,"sign": ""
},{
"username": "马小云"
,"id": "168168"
,"avatar": "//tva1.sinaimg.cn/crop.0.0.180.180.180/7fde8b93jw1e8qgp5bmzyj2050050aa8.jpg"
,"sign": "让天下没有难写的代码"
},{
"username": "徐小峥"
,"id": "666666"
,"avatar": "//tva1.sinaimg.cn/crop.0.0.512.512.180/6a4acad5jw8eqi6yaholjj20e80e8t9f.jpg"
,"sign": "代码在囧途,也要写到底"
},{
"username": "罗玉凤"
,"id": "121286"
,"avatar": "//tva4.sinaimg.cn/crop.0.0.640.640.180/4a02849cjw8fc8vn18vktj20hs0hs75v.jpg"
,"sign": "在自己实力不济的时候,不要去相信什么媒体和记者。他们不是善良的人,有时候候他们的采访对当事人而言就是陷阱"
},{
"username": "刘涛tamia"
,"id": "100001222"
,"avatar": "//tva4.sinaimg.cn/crop.0.1.1125.1125.180/475bb144jw8f9nwebnuhkj20v90vbwh9.jpg"
,"sign": "如约而至,不负姊妹欢乐颂"
},{
"username": "大鱼_MsYuyu"
,"id": "12123454"
,"avatar": "//tva2.sinaimg.cn/crop.0.0.512.512.180/005LMAegjw8f2bp9qg4mrj30e80e8dg5.jpg"
,"sign": "我瘋了!這也太準了吧 超級笑點低"
},{
"username": "谢楠"
,"id": "10034001"
,"avatar": "//tva2.sinaimg.cn/crop.1.0.747.747.180/633f068fjw8f9h040n951j20ku0kr74t.jpg"
,"sign": ""
},{
"username": "柏雪近在它香"
,"id": "3435343"
,"avatar": "//tva2.sinaimg.cn/crop.0.8.751.751.180/961a9be5jw8fczq7q98i7j20kv0lcwfn.jpg"
,"sign": ""
},{
"username": "林心如"
,"id": "76543"
,"avatar": "//tva3.sinaimg.cn/crop.0.0.512.512.180/48f122e6jw8fcmi072lkyj20e80e8t9i.jpg"
,"sign": "我爱贤心"
},{
"username": "佟丽娅"
,"id": "4803920"
,"avatar": "//tva3.sinaimg.cn/crop.0.0.750.750.180/5033b6dbjw8etqysyifpkj20ku0kuwfw.jpg"
,"sign": "我也爱贤心吖吖啊"
}]
}
}

View File

@ -0,0 +1,42 @@
{
"code": 1
,"msg": ""
,"count": "100"
,"data": [{
"invoice": "X123565541"
,"username": "张小三"
,"orderDate": "2017-11-10"
,"amount": 800
,"status": 1
},{
"invoice": "X123565542"
,"username": "李小四"
,"orderDate": "2017-11-10"
,"amount": 800
,"status": 0
},{
"invoice": "X123565543"
,"username": "王老五"
,"orderDate": "2017-11-10"
,"amount": 800
,"status": 1
},{
"invoice": "X123565544"
,"username": "赵小六"
,"orderDate": "2017-11-09"
,"amount": 1600
,"status": 1
},{
"invoice": "X123565545"
,"username": "孙小七"
,"orderDate": "2017-11-09"
,"amount": 1600
,"status": -1
},{
"invoice": "X123565546"
,"username": "周小八"
,"orderDate": "2017-11-08"
,"amount": 2600
,"status": 1
}]
}

View File

@ -0,0 +1,227 @@
{
"code": 1
,"msg": ""
,"data": [{
"name": "component"
,"title": "组件"
,"icon": "layui-icon-component"
,"list": [{
"name": "grid"
,"title": "栅格"
,"list": [{
"name": "list"
,"title": "等比例列表排列"
},{
"name": "mobile"
,"title": "按移动端排列"
},{
"name": "mobile-pc"
,"title": "移动桌面端组合"
},{
"name": "all"
,"title": "全端复杂组合"
},{
"name": "stack"
,"title": "低于桌面堆叠排列"
},{
"name": "speed-dial"
,"title": "九宫格"
}]
}, {
"name": "button"
,"title": "按钮"
}, {
"name": "form"
,"title": "表单"
,"list": [{
"name": "element"
,"title": "表单元素"
},{
"name": "group"
,"title": "表单组合"
}]
}, {
"name": "nav"
,"title": "导航"
}, {
"name": "tabs"
,"title": "选项卡"
}, {
"name": "progress"
,"title": "进度条"
}, {
"name": "panel"
,"title": "面板"
}, {
"name": "badge"
,"title": "徽章"
}, {
"name": "timeline"
,"title": "时间线"
}, {
"name": "anim"
,"title": "动画"
}, {
"name": "auxiliar"
,"title": "辅助"
}, {
"name": "layer"
,"title": "通用弹层"
,"list": [{
"name": "list"
,"title": "功能演示"
},{
"name": "special-demo"
,"title": "特殊示例"
},{
"name": "theme"
,"title": "风格定制"
}]
}, {
"name": "laydate"
,"title": "日期时间"
}, {
"name": "table"
,"title": "表格"
}, {
"name": "laypage"
,"title": "分页"
}, {
"name": "upload"
,"title": "上传"
}, {
"name": "carousel"
,"title": "轮播"
}, {
"name": "laytpl"
,"title": "模板引擎"
}, {
"name": "flow"
,"title": "流加载"
}, {
"name": "util"
,"title": "工具"
}, {
"name": "code"
,"title": "代码修饰"
}, {
"name": "layim"
,"title": "即时聊天"
,"jump": "senior/im/"
}]
}, {
"name": "template"
,"title": "模板"
,"icon": "layui-icon-template"
,"list": [{
"name": "user"
,"title": "用户相关"
,"spread": true
,"list": [{
"name": "reg"
,"title": "注册"
,"jump": "user/reg"
},{
"name": "login"
,"title": "登入"
,"jump": "user/login"
},{
"name": "forget"
,"title": "忘记密码"
,"jump": "user/forget"
}]
}, {
"name": "tips"
,"title": "提示页面"
,"spread": true
,"list": [{
"name": "404"
,"title": "404"
},{
"name": "error"
,"title": "错误提示"
}]
}, {
"name": ""
,"title": "内嵌页面"
,"spread": true
,"list": [{
"name": ""
,"title": "百度一下"
,"jump": "/iframe/link/baidu"
}, {
"name": ""
,"title": "layui官网"
,"jump": "/iframe/link/layui"
}, {
"name": ""
,"title": "layuiAdmin官网"
,"jump": "/iframe/link/layuiAdmin"
}]
}]
}, {
"name": "app"
,"title": "应用"
,"icon": "layui-icon-app"
,"list": [{
"name": "message"
,"title": "消息中心"
}]
}, {
"name": "senior"
,"title": "高级"
,"icon": "layui-icon-senior"
,"list": [{
"name": "im"
,"title": "通讯系统"
}]
}, {
"name": "user"
,"title": "用户"
,"icon": "layui-icon-user"
,"list": [{
"name": "user"
,"title": "用户"
,"spread": true
,"list": [{
"name": "list"
,"title": "用户列表"
}]
},{
"name": "administrators"
,"title": "后台管理组"
,"spread": true
,"list": [{
"name": "list"
,"title": "管理员列表"
},{
"name": "role"
,"title": "角色管理"
}]
}]
}, {
"name": "set"
,"title": "设置"
,"icon": "layui-icon-set"
,"list": [{
"name": "base"
,"title": "基本设置"
,"spread": true
,"list": [{
"name": "website"
,"title": "系统设置"
},{
"name": "email"
,"title": "邮件服务"
}]
},{
"name": "security"
,"title": "安全设置"
}]
}, {
"name": "get"
,"title": "授权"
,"icon": "layui-icon-auz"
,"jump": "system/get"
}]
}

View File

@ -0,0 +1,46 @@
{
"code": 1
,"msg": ""
,"count": 60
,"data": [{
"id": 123
,"title": "你好新朋友,感谢使用 layuiAdmin"
,"time": 1510363800000
}, {
"id": 111
,"title": "贤心发来了一段私信"
,"time": 1510212370000
}, {
"id": 111
,"title": "贤心发来了一段私信"
,"time": 1510212370000
}, {
"id": 111
,"title": "贤心发来了一段私信"
,"time": 1510212370000
}, {
"id": 111
,"title": "贤心发来了一段私信"
,"time": 1510212370000
}, {
"id": 111
,"title": "贤心发来了一段私信"
,"time": 1510212370000
}, {
"id": 111
,"title": "贤心发来了一段私信"
,"time": 1510212370000
}, {
"id": 111
,"title": "贤心发来了一段私信"
,"time": 1510212370000
}, {
"id": 111
,"title": "贤心发来了一段私信"
,"time": 1510212370000
}, {
"id": 111
,"title": "贤心发来了一段私信"
,"time": 1507447570000
}]
}

View File

@ -0,0 +1,10 @@
{
"code": 1
,"msg": ""
,"data": {
"id": 111
,"title": "你好新朋友,感谢使用 layuiAdmin"
,"content": "<p>一直以来,layui 秉承无偿开源的初心,虔诚致力于服务各层次前后端 Web 开发者,在商业横飞的当今时代,这一信念从未动摇。即便身单力薄,仍然重拾决心,埋头造轮,以尽可能地填补产品本身的缺口。在过去的一段的时间,我一直在寻求持久之道,已维持你眼前所见的一切。而 layuiAdmin 是我们尝试解决的手段之一。我相信真正有爱于 layui 生态的你,定然不会错过这一拥抱吧。</p><p>子曰:君子不用防,小人防不住。请务必通过官网正规渠道,获得 <a href=\"http://www.layui.com/admin/\" target=\"_blank\">layuiAdmin</a>!</p><p>—— 贤心(<a href=\"http://www.layui.com/\" target=\"_blank\">layui.com</a>)</p>"
,"time": 1510363800000
}
}

View File

@ -0,0 +1,46 @@
{
"code": 1
,"msg": ""
,"count": 60
,"data": [{
"id": 123
,"title": "贤心发来了一段私信"
,"time": 1510363800000
}, {
"id": 111
,"title": "贤心发来了一段私信"
,"time": 1510212370000
}, {
"id": 111
,"title": "贤心发来了一段私信"
,"time": 1510212370000
}, {
"id": 111
,"title": "贤心发来了一段私信"
,"time": 1510212370000
}, {
"id": 111
,"title": "贤心发来了一段私信"
,"time": 1510212370000
}, {
"id": 111
,"title": "贤心发来了一段私信"
,"time": 1510212370000
}, {
"id": 111
,"title": "贤心发来了一段私信"
,"time": 1510212370000
}, {
"id": 111
,"title": "贤心发来了一段私信"
,"time": 1510212370000
}, {
"id": 111
,"title": "贤心发来了一段私信"
,"time": 1510212370000
}, {
"id": 111
,"title": "贤心发来了一段私信"
,"time": 1507447570000
}]
}

View File

@ -0,0 +1,7 @@
{
"code": 1
,"msg": ""
,"data": {
"newmsg": 3
}
}

View File

@ -0,0 +1,46 @@
{
"code": 1
,"msg": ""
,"count": 60
,"data": [{
"id": 123
,"title": "你好新朋友,感谢使用 layuiAdmin"
,"time": 1510363800000
}, {
"id": 111
,"title": "你好新朋友,感谢使用 layuiAdmin"
,"time": 1510212370000
}, {
"id": 111
,"title": "你好新朋友,感谢使用 layuiAdmin"
,"time": 1510212370000
}, {
"id": 111
,"title": "你好新朋友,感谢使用 layuiAdmin"
,"time": 1510212370000
}, {
"id": 111
,"title": "你好新朋友,感谢使用 layuiAdmin"
,"time": 1510212370000
}, {
"id": 111
,"title": "你好新朋友,感谢使用 layuiAdmin"
,"time": 1510212370000
}, {
"id": 111
,"title": "你好新朋友,感谢使用 layuiAdmin"
,"time": 1510212370000
}, {
"id": 111
,"title": "你好新朋友,感谢使用 layuiAdmin"
,"time": 1510212370000
}, {
"id": 111
,"title": "你好新朋友,感谢使用 layuiAdmin"
,"time": 1510212370000
}, {
"id": 111
,"title": "你好新朋友,感谢使用 layuiAdmin"
,"time": 1507447570000
}]
}

View File

@ -0,0 +1,96 @@
{
"code": 1
,"msg": ""
,"count": 3000000
,"data": [{
"id": "10001"
,"username": "杜甫"
,"email": "xianxin@layui.com"
,"sex": "男"
,"city": "浙江杭州"
,"sign": "点击此处,显示更多。当内容超出时,点击单元格会自动显示更多内容。"
,"experience": "116"
,"ip": "192.168.0.8"
,"logins": "108"
,"joinTime": "2016-10-14"
}, {
"id": "10002"
,"username": "李白"
,"email": "xianxin@layui.com"
,"sex": "男"
,"city": "浙江杭州"
,"sign": "君不见,黄河之水天上来,奔流到海不复回。 君不见,高堂明镜悲白发,朝如青丝暮成雪。 人生得意须尽欢,莫使金樽空对月。 天生我材必有用,千金散尽还复来。 烹羊宰牛且为乐,会须一饮三百杯。 岑夫子,丹丘生,将进酒,杯莫停。 与君歌一曲,请君为我倾耳听。(倾耳听 一作:侧耳听) 钟鼓馔玉不足贵,但愿长醉不复醒。(不足贵 一作:何足贵;不复醒 一作:不愿醒/不用醒) 古来圣贤皆寂寞,惟有饮者留其名。(古来 一作:自古;惟 通:唯) 陈王昔时宴平乐,斗酒十千恣欢谑。 主人何为言少钱,径须沽取对君酌。 五花马,千金裘,呼儿将出换美酒,与尔同销万古愁。"
,"experience": "12"
,"ip": "192.168.0.8"
,"logins": "106"
,"joinTime": "2016-10-14"
,"LAY_CHECKED": true
}, {
"id": "10003"
,"username": "王勃"
,"email": "xianxin@layui.com"
,"sex": "男"
,"city": "浙江杭州"
,"sign": "人生恰似一场修行"
,"experience": "65"
,"ip": "192.168.0.8"
,"logins": "106"
,"joinTime": "2016-10-14"
}, {
"id": "10004"
,"username": "李清照"
,"email": "xianxin@layui.com"
,"sex": "女"
,"city": "浙江杭州"
,"sign": "人生恰似一场修行"
,"experience": "666"
,"ip": "192.168.0.8"
,"logins": "106"
,"joinTime": "2016-10-14"
}, {
"id": "10005"
,"username": "冰心"
,"email": "xianxin@layui.com"
,"sex": "女"
,"city": "浙江杭州"
,"sign": "人生恰似一场修行"
,"experience": "86"
,"ip": "192.168.0.8"
,"logins": "106"
,"joinTime": "2016-10-14"
}, {
"id": "10006"
,"username": "贤心"
,"email": "xianxin@layui.com"
,"sex": "男"
,"city": "浙江杭州"
,"sign": "人生恰似一场修行"
,"experience": "12"
,"ip": "192.168.0.8"
,"logins": "106"
,"joinTime": "2016-10-14"
}, {
"id": "10007"
,"username": "贤心"
,"email": "xianxin@layui.com"
,"sex": "男"
,"city": "浙江杭州"
,"sign": "人生恰似一场修行"
,"experience": "16"
,"ip": "192.168.0.8"
,"logins": "106"
,"joinTime": "2016-10-14"
}, {
"id": "10008"
,"username": "贤心"
,"email": "xianxin@layui.com"
,"sex": "男"
,"city": "浙江杭州"
,"sign": "人生恰似一场修行"
,"experience": "106"
,"ip": "192.168.0.8"
,"logins": "106"
,"joinTime": "2016-10-14"
}]
}

View File

@ -0,0 +1,61 @@
{
"code": 1
,"msg": ""
,"count": 66
,"data": [{
"username": "张小三"
,"amount": 18
,"province": "浙江"
,"city": "杭州"
,"zone": "西湖区"
,"street": "西溪街道"
,"address": "西溪花园"
,"house": "30栋1单元"
}, {
"username": "李小四"
,"amount": 39
,"province": "江苏"
,"city": "苏州"
,"zone": "姑苏区"
,"street": "丝绸路"
,"address": "天墅之城"
,"house": "9幢2单元"
}, {
"username": "王小五"
,"amount": 8
,"province": "江西"
,"city": "南昌"
,"zone": "青山湖区"
,"street": "艾溪湖办事处"
,"address": "中兴和园"
,"house": "1幢3单元"
}, {
"username": "赵小六"
,"amount": 16
,"province": "福建"
,"city": "泉州"
,"zone": "丰泽区"
,"street": "南洋街道"
,"address": "南洋村"
,"house": "6幢1单元"
}, {
"username": "孙小七"
,"amount": 12
,"province": "湖北"
,"city": "武汉"
,"zone": "武昌区"
,"street": "武昌大道"
,"address": "两湖花园"
,"house": "16幢2单元"
}, {
"username": "周小八"
,"amount": 11
,"province": "安徽"
,"city": "黄山"
,"zone": "黄山区"
,"street": "汤口镇"
,"address": "温泉村"
,"house": "21号"
}]
}

View File

@ -0,0 +1,96 @@
{
"status": 200
,"message": ""
,"total": 8
,"rows": {
"item": [{
"id": "10001"
,"username": "杜甫"
,"email": "xianxin@layui.com"
,"sex": "男"
,"city": "浙江杭州"
,"sign": "点击此处,显示更多。当内容超出时,点击单元格会自动显示更多内容。"
,"experience": "116"
,"ip": "192.168.0.8"
,"logins": "108"
,"joinTime": "2016-10-14"
}, {
"id": "10002"
,"username": "李白"
,"email": "xianxin@layui.com"
,"sex": "男"
,"city": "浙江杭州"
,"sign": "君不见,黄河之水天上来,奔流到海不复回。 君不见,高堂明镜悲白发,朝如青丝暮成雪。 人生得意须尽欢,莫使金樽空对月。 天生我材必有用,千金散尽还复来。 烹羊宰牛且为乐,会须一饮三百杯。 岑夫子,丹丘生,将进酒,杯莫停。 与君歌一曲,请君为我倾耳听。(倾耳听 一作:侧耳听) 钟鼓馔玉不足贵,但愿长醉不复醒。(不足贵 一作:何足贵;不复醒 一作:不愿醒/不用醒) 古来圣贤皆寂寞,惟有饮者留其名。(古来 一作:自古;惟 通:唯) 陈王昔时宴平乐,斗酒十千恣欢谑。 主人何为言少钱,径须沽取对君酌。 五花马,千金裘,呼儿将出换美酒,与尔同销万古愁。"
,"experience": "12"
,"ip": "192.168.0.8"
,"logins": "106"
,"joinTime": "2016-10-14"
}, {
"id": "10003"
,"username": "王勃"
,"email": "xianxin@layui.com"
,"sex": "男"
,"city": "浙江杭州"
,"sign": "人生恰似一场修行"
,"experience": "65"
,"ip": "192.168.0.8"
,"logins": "106"
,"joinTime": "2016-10-14"
}, {
"id": "10004"
,"username": "李清照"
,"email": "xianxin@layui.com"
,"sex": "女"
,"city": "浙江杭州"
,"sign": "人生恰似一场修行"
,"experience": "666"
,"ip": "192.168.0.8"
,"logins": "106"
,"joinTime": "2016-10-14"
}, {
"id": "10005"
,"username": "冰心"
,"email": "xianxin@layui.com"
,"sex": "女"
,"city": "浙江杭州"
,"sign": "人生恰似一场修行"
,"experience": "86"
,"ip": "192.168.0.8"
,"logins": "106"
,"joinTime": "2016-10-14"
}, {
"id": "10006"
,"username": "贤心"
,"email": "xianxin@layui.com"
,"sex": "男"
,"city": "浙江杭州"
,"sign": "人生恰似一场修行"
,"experience": "12"
,"ip": "192.168.0.8"
,"logins": "106"
,"joinTime": "2016-10-14"
}, {
"id": "10007"
,"username": "贤心"
,"email": "xianxin@layui.com"
,"sex": "男"
,"city": "浙江杭州"
,"sign": "人生恰似一场修行"
,"experience": "16"
,"ip": "192.168.0.8"
,"logins": "106"
,"joinTime": "2016-10-14"
}, {
"id": "10008"
,"username": "贤心"
,"email": "xianxin@layui.com"
,"sex": "男"
,"city": "浙江杭州"
,"sign": "人生恰似一场修行"
,"experience": "106"
,"ip": "192.168.0.8"
,"logins": "106"
,"joinTime": "2016-10-14"
}]
}
}

View File

@ -0,0 +1,2 @@
{"code":0,"msg":"","count":1000,"data":[{"id":10000,"username":"user-0","sex":"女","city":"城市-0","sign":"签名-0","experience":255,"logins":24,"wealth":82830700,"classify":"作家","score":57},{"id":10001,"username":"user-1","sex":"男","city":"城市-1","sign":"签名-1","experience":884,"logins":58,"wealth":64928690,"classify":"词人","score":27},{"id":10002,"username":"user-2","sex":"女","city":"城市-2","sign":"签名-2","experience":650,"logins":77,"wealth":6298078,"classify":"酱油","score":31},{"id":10003,"username":"user-3","sex":"女","city":"城市-3","sign":"签名-3","experience":362,"logins":157,"wealth":37117017,"classify":"诗人","score":68},{"id":10004,"username":"user-4","sex":"男","city":"城市-4","sign":"签名-4","experience":807,"logins":51,"wealth":76263262,"classify":"作家","score":6},{"id":10005,"username":"user-5","sex":"女","city":"城市-5","sign":"签名-5","experience":173,"logins":68,"wealth":60344147,"classify":"作家","score":87},{"id":10006,"username":"user-6","sex":"女","city":"城市-6","sign":"签名-6","experience":982,"logins":37,"wealth":57768166,"classify":"作家","score":34},{"id":10007,"username":"user-7","sex":"男","city":"城市-7","sign":"签名-7","experience":727,"logins":150,"wealth":82030578,"classify":"作家","score":28},{"id":10008,"username":"user-8","sex":"男","city":"城市-8","sign":"签名-8","experience":951,"logins":133,"wealth":16503371,"classify":"词人","score":14},{"id":10009,"username":"user-9","sex":"女","city":"城市-9","sign":"签名-9","experience":484,"logins":25,"wealth":86801934,"classify":"词人","score":75}]}

View File

@ -0,0 +1,2 @@
{"code":0,"msg":"","count":1000,"data":[{"id":10000,"username":"user-0","sex":"女","city":"城市-0","sign":"签名-0","experience":255,"logins":24,"wealth":82830700,"classify":"作家","score":57},{"id":10001,"username":"user-1","sex":"男","city":"城市-1","sign":"签名-1","experience":884,"logins":58,"wealth":64928690,"classify":"词人","score":27},{"id":10002,"username":"user-2","sex":"女","city":"城市-2","sign":"签名-2","experience":650,"logins":77,"wealth":6298078,"classify":"酱油","score":31},{"id":10003,"username":"user-3","sex":"女","city":"城市-3","sign":"签名-3","experience":362,"logins":157,"wealth":37117017,"classify":"诗人","score":68},{"id":10004,"username":"user-4","sex":"男","city":"城市-4","sign":"签名-4","experience":807,"logins":51,"wealth":76263262,"classify":"作家","score":6},{"id":10005,"username":"user-5","sex":"女","city":"城市-5","sign":"签名-5","experience":173,"logins":68,"wealth":60344147,"classify":"作家","score":87},{"id":10006,"username":"user-6","sex":"女","city":"城市-6","sign":"签名-6","experience":982,"logins":37,"wealth":57768166,"classify":"作家","score":34},{"id":10007,"username":"user-7","sex":"男","city":"城市-7","sign":"签名-7","experience":727,"logins":150,"wealth":82030578,"classify":"作家","score":28},{"id":10008,"username":"user-8","sex":"男","city":"城市-8","sign":"签名-8","experience":951,"logins":133,"wealth":16503371,"classify":"词人","score":14},{"id":10009,"username":"user-9","sex":"女","city":"城市-9","sign":"签名-9","experience":484,"logins":25,"wealth":86801934,"classify":"词人","score":75},{"id":10010,"username":"user-10","sex":"女","city":"城市-10","sign":"签名-10","experience":1016,"logins":182,"wealth":71294671,"classify":"诗人","score":34},{"id":10011,"username":"user-11","sex":"女","city":"城市-11","sign":"签名-11","experience":492,"logins":107,"wealth":8062783,"classify":"诗人","score":6},{"id":10012,"username":"user-12","sex":"女","city":"城市-12","sign":"签名-12","experience":106,"logins":176,"wealth":42622704,"classify":"词人","score":54},{"id":10013,"username":"user-13","sex":"男","city":"城市-13","sign":"签名-13","experience":1047,"logins":94,"wealth":59508583,"classify":"诗人","score":63},{"id":10014,"username":"user-14","sex":"男","city":"城市-14","sign":"签名-14","experience":873,"logins":116,"wealth":72549912,"classify":"词人","score":8},{"id":10015,"username":"user-15","sex":"女","city":"城市-15","sign":"签名-15","experience":1068,"logins":27,"wealth":52737025,"classify":"作家","score":28},{"id":10016,"username":"user-16","sex":"女","city":"城市-16","sign":"签名-16","experience":862,"logins":168,"wealth":37069775,"classify":"酱油","score":86},{"id":10017,"username":"user-17","sex":"女","city":"城市-17","sign":"签名-17","experience":1060,"logins":187,"wealth":66099525,"classify":"作家","score":69},{"id":10018,"username":"user-18","sex":"女","city":"城市-18","sign":"签名-18","experience":866,"logins":88,"wealth":81722326,"classify":"词人","score":74},{"id":10019,"username":"user-19","sex":"女","city":"城市-19","sign":"签名-19","experience":682,"logins":106,"wealth":68647362,"classify":"词人","score":51},{"id":10020,"username":"user-20","sex":"男","city":"城市-20","sign":"签名-20","experience":770,"logins":24,"wealth":92420248,"classify":"诗人","score":87},{"id":10021,"username":"user-21","sex":"男","city":"城市-21","sign":"签名-21","experience":184,"logins":131,"wealth":71566045,"classify":"词人","score":99},{"id":10022,"username":"user-22","sex":"男","city":"城市-22","sign":"签名-22","experience":739,"logins":152,"wealth":60907929,"classify":"作家","score":18},{"id":10023,"username":"user-23","sex":"女","city":"城市-23","sign":"签名-23","experience":127,"logins":82,"wealth":14765943,"classify":"作家","score":30},{"id":10024,"username":"user-24","sex":"女","city":"城市-24","sign":"签名-24","experience":212,"logins":133,"wealth":59011052,"classify":"词人","score":76},{"id":10025,"username":"user-25","sex":"女","city":"城市-25","sign":"签名-25","experience":938,"logins":182,"wealth":91183097,"classify":"作家","score":69},{"id":10026,"username":"user-26","sex":"男","city":"城市-26","sign":"签名-26","experience":978,"logins":7,"wealth":48008413,"classify":"作家","score":65},{"id":10027,"username":"user-27","sex":"女","city":"城市-27","sign":"签名-27","experience":371,"logins":44,"wealth":64419691,"classify":"诗人","score":60},{"id":10028,"username":"user-28","sex":"女","city":"城市-28","sign":"签名-28","experience":977,"logins":21,"wealth":75935022,"classify":"作家","score":37},{"id":10029,"username":"user-29","sex":"男","city":"城市-29","sign":"签名-29","experience":647,"logins":107,"wealth":97450636,"classify":"酱油","score":27}]}

View File

@ -0,0 +1,7 @@
{
"code": 1,
"msg": "",
"data": {
"src": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg"
}
}

View File

@ -0,0 +1,7 @@
{
"code": 1
,"msg": "注册成功"
,"data": {
}
}

View File

@ -0,0 +1,7 @@
{
"code": 1
,"msg": "登入成功"
,"data": {
"access_token": "c262e61cd13ad99fc650e6908c7e5e65b63d2f32185ecfed6b801ee3fbdd5c0a"
}
}

View File

@ -0,0 +1,5 @@
{
"code": 1
,"msg": "退出成功"
,"data": null
}

View File

@ -0,0 +1,7 @@
{
"code": 1
,"msg": "注册成功"
,"data": {
}
}

View File

@ -0,0 +1,7 @@
{
"code": 1
,"msg": "注册成功"
,"data": {
}
}

View File

@ -0,0 +1,9 @@
{
"code": 1
,"msg": ""
,"data": {
"username": "贤心"
,"sex": "男"
,"role": 1
}
}

View File

@ -0,0 +1,7 @@
{
"code": 1
,"msg": "注册成功"
,"data": {
}
}

View File

@ -0,0 +1,78 @@
{
"code": 1
,"msg": ""
,"count": "100"
,"data": [{
"id": "1001"
,"loginname": "admin"
,"telphone": "11111111111"
,"email": "111@qq.com"
,"role": "超级管理员"
,"jointime": "20150217"
,"check": true
},{
"id": "1002"
,"loginname": "common-1"
,"telphone": "22222222222"
,"email": "222@qq.com"
,"role": "管理员"
,"jointime": "20160217"
,"check": false
},{
"id": "1003"
,"loginname": "common-2"
,"telphone": "33333333333"
,"email": "333@qq.com"
,"role": "管理员"
,"jointime": "20161012"
,"check": false
},{
"id": "1004"
,"loginname": "common-3"
,"telphone": "44444444444"
,"email": "444@qq.com"
,"role": "管理员"
,"jointime": "20170518"
,"check": true
},{
"id": "1005"
,"loginname": "common-4"
,"telphone": "55555555555"
,"email": "555@qq.com"
,"role": "管理员"
,"jointime": "20180101"
,"check": false
},{
"id": "1006"
,"loginname": "common-5"
,"telphone": "66666666666"
,"email": "666@qq.com"
,"role": "管理员"
,"jointime": "20160217"
,"check": false
},{
"id": "1007"
,"loginname": "common-6"
,"telphone": "77777777777"
,"email": "777@qq.com"
,"role": "管理员"
,"jointime": "20161012"
,"check": false
},{
"id": "1008"
,"loginname": "common-7"
,"telphone": "88888888888"
,"email": "888@qq.com"
,"role": "管理员"
,"jointime": "20170518"
,"check": true
},{
"id": "1009"
,"loginname": "common-8"
,"telphone": "99999999999"
,"email": "999@qq.com"
,"role": "管理员"
,"jointime": "20180101"
,"check": false
}]
}

View File

@ -0,0 +1,54 @@
{
"code": 1
,"msg": ""
,"count": "100"
,"data": [{
"id": "1"
,"rolename": "超级管理员"
,"limits": "管理所有的管理员"
,"descr": "拥有至高无上的权利"
,"check": true
},{
"id": "2"
,"rolename": "管理员"
,"limits": "所有列表的管理"
,"descr": "事情很多,权力很大"
,"check": true
},{
"id": "3"
,"rolename": "文章撰写员"
,"limits": "负责文章的编写"
,"descr": "文采第一的人才集合"
,"check": false
},{
"id": "4"
,"rolename": "纠错员"
,"limits": "负责文章内容的修改"
,"descr": "暂无"
,"check": false
},{
"id": "5"
,"rolename": "统计人员"
,"limits": "对数据进行统计"
,"descr": "暂无"
,"check": false
},{
"id": "6"
,"rolename": "评估员"
,"limits": "对统计数据进行评估"
,"descr": "及时捕捉市场发展动态"
,"check": false
},{
"id": "7"
,"rolename": "采购员"
,"limits": "负责员工的伙食"
,"descr": "暂无"
,"check": false
},{
"id": "8"
,"rolename": "推销员"
,"limits": "介绍销售公司产品"
,"descr": "暂无"
,"check": false
}]
}

View File

@ -0,0 +1,143 @@
{
"code": 1
,"msg": ""
,"count": "100"
,"data": [{
"id": "001"
,"username": "用户-1"
,"avatar": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg"
,"phone": 12345678901
,"email": "11111@qq.com"
,"sex": "男"
,"ip": "1111111"
,"jointime": 20171204
},{
"id": "002"
,"username": "用户-2"
,"avatar": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg"
,"phone": 12345678901
,"email": "11111@qq.com"
,"sex": "男"
,"ip": "1111111"
,"jointime": 20171204
},{
"id": "003"
,"username": "用户-3"
,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg"
,"phone": 12345678901
,"email": "11111@qq.com"
,"sex": "女"
,"ip": "1111111"
,"jointime": 20171011
,"LAY_CHECKED": true
},{
"id": "004"
,"username": "用户-4"
,"avatar": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg"
,"phone": 12345678901
,"email": "11111@qq.com"
,"sex": "男"
,"ip": "1111111"
,"jointime": 20160505
},{
"id": "005"
,"username": "用户-5"
,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg"
,"phone": 12345678901
,"email": "11111@qq.com"
,"sex": "男"
,"ip": "1111111"
,"jointime": 20171204
},{
"id": "006"
,"username": "用户-6"
,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg"
,"phone": 12345678901
,"email": "11111@qq.com"
,"sex": "男"
,"ip": "1111111"
,"jointime": 20171204
},{
"id": "007"
,"username": "用户-7"
,"avatar": "https://wx3.sinaimg.cn/mw690/5db11ff4gy1fmx4keca8ag208g06iglw.gif"
,"phone": 12345678901
,"email": "11111@qq.com"
,"sex": "男"
,"ip": "1111111"
,"jointime": 20180210
},{
"id": "008"
,"username": "用户-8"
,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg"
,"phone": 12345678901
,"email": "11111@qq.com"
,"sex": "女"
,"ip": "1111111"
,"jointime": 20171204
},{
"id": "009"
,"username": "用户-9"
,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg"
,"phone": 12345678901
,"email": "11111@qq.com"
,"sex": "女"
,"ip": "1111111"
,"jointime": 20171204
},{
"id": "010"
,"username": "用户-10"
,"avatar": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg"
,"phone": 12345678901
,"email": "11111@qq.com"
,"sex": "男"
,"ip": "1111111"
,"jointime": 20170719
},{
"id": "011"
,"username": "用户-11"
,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg"
,"phone": 12345678901
,"email": "11111@qq.com"
,"sex": "男"
,"ip": "1111111"
,"jointime": 20171204
},{
"id": "012"
,"username": "用户-12"
,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg"
,"phone": 12345678901
,"email": "11111@qq.com"
,"sex": "女"
,"ip": "1111111"
,"jointime": 20171204
},{
"id": "013"
,"username": "用户-13"
,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg"
,"phone": 12345678901
,"email": "11111@qq.com"
,"sex": "女"
,"ip": "1111111"
,"jointime": 20171204
,"LAY_CHECKED": true
},{
"id": "014"
,"username": "用户-14"
,"avatar": "https://wx3.sinaimg.cn/mw690/5db11ff4gy1fmx4keca8ag208g06iglw.gif"
,"phone": 12345678901
,"email": "11111@qq.com"
,"sex": "男"
,"ip": "1111111"
,"jointime": 20171204
},{
"id": "015"
,"username": "用户-15"
,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg"
,"phone": 12345678901
,"email": "11111@qq.com"
,"sex": "男"
,"ip": "1111111"
,"jointime": 20171204
}]
}

View File

@ -0,0 +1,78 @@
{
"code": 1
,"msg": ""
,"count": "100"
,"data": [{
"orderid": 111
,"title": "移动支付踏入马来西亚,聚合支付紧随其后"
,"attr": "公告"
,"progress": "25%"
,"submit": "贤心"
,"accept": "员工-1"
,"state": "处理中"
},{
"orderid": 222
,"title": "凡科拖拽式免费建站神器,享双重优惠!"
,"attr": "讨论"
,"progress": "100%"
,"submit": "猫吃"
,"accept": "员工-1"
,"state": "已处理"
},{
"orderid": 333
,"title": "看着别人的老板给员工送汽车有感"
,"attr": "分享"
,"progress": "0%"
,"submit": "纸飞机"
,"accept": ""
,"state": "未分配"
},{
"orderid": 444
,"title": "DISCUZ的云平台应该彻底完了"
,"attr": "提问"
,"progress": "0%"
,"submit": "纸飞机"
,"accept": ""
,"state": "未分配"
},{
"orderid": 555
,"title": "现在个人网站还有必要长期坚持下去吗?"
,"attr": "提问"
,"progress": "50%"
,"submit": "纸飞机"
,"accept": "员工-2"
,"state": "处理中"
},{
"orderid": 666
,"title": "向北京公安局投诉了京东商城"
,"attr": "公告"
,"progress": "25%"
,"submit": "纸飞机"
,"accept": "员工-3"
,"state": "处理中"
},{
"orderid": 777
,"title": "游戏 网页美工,一个月多少工资才正常?"
,"attr": "提问"
,"progress": "100%"
,"submit": "纸飞机"
,"accept": "员工-1"
,"state": "已处理"
},{
"orderid": 888
,"title": "几年没来了,蓝色理想帖子这么少了啊"
,"attr": "提问"
,"progress": "0%"
,"submit": "纸飞机"
,"accept": ""
,"state": "未分配"
},{
"orderid": 999
,"title": "我的天,求推荐靠谱的学习网站"
,"attr": "提问"
,"progress": "50%"
,"submit": "纸飞机"
,"accept": "员工-2"
,"state": "处理中"
}]
}

View File

@ -0,0 +1,3 @@
注意:这里是模拟的数据。
实际应用时,请在模板文件(.html)中的 lay-url="" 和其它相关接口的 url 设置成你真实的接口地址

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
/** layui-v2.5.6 MIT License By https://www.layui.com */
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More