Merge branch 'v5.0.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v5.0.0dev

This commit is contained in:
liaofei 2023-04-04 15:21:04 +08:00
commit 2eabe41506
116 changed files with 2095 additions and 1683 deletions

View File

@ -60,7 +60,7 @@ class AgentManage extends AuthController
public function get_badge()
{
$where = $this->request->getMore([
['data', ''],
['data', '', '', 'time'],
['nickname', ''],
]);
return app('json')->success(['res' => $this->services->getSpreadBadge($where)]);

View File

@ -121,19 +121,24 @@ class Division extends AuthController
* 保存代理商
* @param UserServices $userServices
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function divisionAgentSave(UserServices $userServices)
{
$data = $this->request->postMore([
['division_id', 0],
['uid', 0],
['division_percent', 0],
['division_end_time', ''],
['division_status', 1],
['edit', 0],
]);
$userInfo = $userServices->get((int)$data['uid']);
$userInfo = $userServices->count(['uid' => (int)$data['uid']]);
if (!$userInfo) throw new AdminException(100100);
$data['division_id'] = $this->adminInfo['division_id'];
$divisionUserInfo = $userServices->count(['uid' => (int)$data['division_id'], 'is_division' => 1, 'division_id' => $data['division_id']]);
if (!$divisionUserInfo) throw new AdminException(100100);
$this->services->divisionAgentSave($data);
return app('json')->success(100000);
}

View File

@ -72,7 +72,8 @@ class ExportExcel extends AuthController
['label_id', ''],
['now_money', 'normal'],
['field_key', ''],
['isMember', '']
['isMember', ''],
['ids', []]
]);
return app('json')->success($this->service->exportUserList($where));
}

View File

@ -37,7 +37,11 @@ class UserLabel extends AuthController
/**
* 标签列表
* @param int $label_cate
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function index($label_cate = 0)
{
@ -60,8 +64,10 @@ class UserLabel extends AuthController
/**
* 保存标签表单数据
* @param int $id
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function save()
{

View File

@ -15,6 +15,7 @@ Route::group('product', function () {
Route::get('category', 'v1.product.StoreCategory/index')->option(['real_name' => '商品分类列表']);
//商品树形列表
Route::get('category/tree/:type', 'v1.product.StoreCategory/tree_list')->option(['real_name' => '商品分类树形列表']);
Route::get('category/cascader/:type', 'v1.product.StoreCategory/cascader_list')->option(['real_name' => '商品分类树形列表']);
//商品分类新增表单
Route::get('category/create', 'v1.product.StoreCategory/create')->option(['real_name' => '商品分类新增表单']);
//商品分类新增

View File

@ -657,4 +657,31 @@ class PublicController
{
return app('json')->success(app()->make(LangCodeServices::class)->getLangVersion());
}
/**
* 商城基础配置汇总接口
* @return \think\Response
* @author 吴汐
* @email 442384644@qq.com
* @date 2023/04/03
*/
public function getMallBasicConfig()
{
$data['site_name'] = sys_config('site_name');//网站名称
$data['site_url'] = sys_config('site_url');//网站地址
$data['wap_login_logo'] = sys_config('wap_login_logo');//移动端登录logo
$data['wap_login_logo'] = sys_config('wap_login_logo');//移动端登录logo
$data['record_No'] = sys_config('record_No');//备案号
$data['network_security'] = sys_config('network_security');//网安备案
$data['store_self_mention'] = sys_config('store_self_mention');//是否开启到店自提
$data['invoice_func_status'] = sys_config('invoice_func_status');//发票功能启用
$data['special_invoice_status'] = sys_config('special_invoice_status');//专用发票启用
$data['member_func_status'] = sys_config('member_func_status');//用户等级启用
$data['balance_func_status'] = sys_config('balance_func_status');//余额功能启用
$data['recharge_switch'] = sys_config('recharge_switch');//小程序充值开关
$data['member_card_status'] = sys_config('member_card_status');//是否开启付费会员
$data['member_price_status'] = sys_config('member_price_status');//商品会员折扣价展示启用
return app('json')->success($data);
}
}

View File

@ -238,7 +238,7 @@ class StoreOrderController
$start = $middle;
}
$space = bcsub($stop, $start, 0);//间隔时间段
$front = bcsub($start, $space, 0);//第一个时间段
$front = bcsub($start, $space, 0) - 1;//第一个时间段
/** @var StoreOrderServices $orderService */
$orderService = app()->make(StoreOrderServices::class);
$order_where = [
@ -246,10 +246,11 @@ class StoreOrderController
'paid' => 1,
'refund_status' => [0, 3],
'is_del' => 0,
'is_system_del' => 0];
'is_system_del' => 0
];
if ($type == 1) {//销售额
$frontPrice = $orderService->sum($order_where + ['time' => [$front, $start]], 'pay_price', true);
$frontPrice = $orderService->sum($order_where + ['time' => [$front, $start - 1]], 'pay_price', true);
$afterPrice = $orderService->sum($order_where + ['time' => [$start, $stop]], 'pay_price', true);
$chartInfo = $orderService->chartTimePrice($start, $stop);
$data['chart'] = $chartInfo;//营业额图表数据
@ -262,7 +263,7 @@ class StoreOrderController
$data['increase_time'] = abs($increase); //同比上个时间区间增长营业额
$data['increase_time_status'] = $increase >= 0 ? 1 : 2; //同比上个时间区间增长营业额增长 1 减少 2
} else {//订单数
$frontNumber = $orderService->count($order_where + ['time' => [$front, $start]]);
$frontNumber = $orderService->count($order_where + ['time' => [$front, $start - 1]]);
$afterNumber = $orderService->count($order_where + ['time' => [$start, $stop]]);
$chartInfo = $orderService->chartTimeNumber($start, $stop);
$data['chart'] = $chartInfo;//订单数图表数据

View File

@ -94,6 +94,10 @@ class StoreOrderController
* @param Request $request
* @param ShippingTemplatesServices $services
* @return mixed
* @throws \Psr\SimpleCache\InvalidArgumentException
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function confirm(Request $request, ShippingTemplatesServices $services)
{
@ -297,23 +301,6 @@ class StoreOrderController
}
}
/**
* TODO 支付宝单独支付 弃用
* @param OrderPayServices $payServices
* @param OtherOrderServices $services
* @param string $key
* @param string $quitUrl
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
// public function aliPay(OrderPayServices $payServices, OtherOrderServices $services, string $key, string $quitUrl)
// {
// $payInfo = $this->services->aliPayOrder($payServices, $services, $key, $quitUrl);
// return app('json')->success(['pay_content' => $payInfo]);
// }
/**
* 订单列表
* @param Request $request
@ -467,8 +454,14 @@ class StoreOrderController
/**
* 订单 查看物流
* @param Request $request
* @param StoreOrderCartInfoServices $services
* @param ExpressServices $expressServices
* @param $uni
* @param string $type
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function express(Request $request, StoreOrderCartInfoServices $services, ExpressServices $expressServices, $uni, $type = '')
{
@ -484,6 +477,7 @@ class StoreOrderController
foreach ($order['cart_info'] as $k => $cart) {
$cartNew['cart_num'] = $cart['cart_num'];
$cartNew['truePrice'] = $cart['truePrice'];
$cartNew['postage_price'] = $cart['postage_price'];
$cartNew['productInfo']['image'] = $cart['productInfo']['image'];
$cartNew['productInfo']['store_name'] = $cart['productInfo']['store_name'];
$cartNew['productInfo']['unit_name'] = $cart['productInfo']['unit_name'] ?? '';
@ -507,6 +501,7 @@ class StoreOrderController
$cart = json_decode($cart, true);
$cartNew['cart_num'] = $cart['cart_num'];
$cartNew['truePrice'] = $cart['truePrice'];
$cartNew['postage_price'] = $cart['postage_price'];
$cartNew['productInfo']['image'] = $cart['productInfo']['image'];
$cartNew['productInfo']['store_name'] = $cart['productInfo']['store_name'];
$cartNew['productInfo']['unit_name'] = $cart['productInfo']['unit_name'] ?? '';
@ -535,6 +530,7 @@ class StoreOrderController
* @param Request $request
* @param StoreOrderCartInfoServices $cartInfoServices
* @param StoreProductReplyServices $replyServices
* @return \think\Response|void
* @throws \Psr\SimpleCache\InvalidArgumentException
*/
public function comment(Request $request, StoreOrderCartInfoServices $cartInfoServices, StoreProductReplyServices $replyServices)
@ -728,37 +724,6 @@ class StoreOrderController
return app('json')->fail(100028);
}
/**
* 订单申请退款审核
* @param Request $request
* @param StoreOrderRefundServices $services
*/
public function refund_verify(Request $request, StoreOrderRefundServices $services)
{
// $data = $request->postMore([
// ['text', ''],
// ['refund_reason_wap_img', ''],
// ['refund_reason_wap_explain', ''],
// ['uni', ''],
// ['refund_type', 1],
// ['cart_id', 0],
// ['refund_num', 0]
// ]);
// $uni = $data['uni'];
// unset($data['uni']);
// if ($data['refund_reason_wap_img'] != '') {
// $data['refund_reason_wap_img'] = explode(',', $data['refund_reason_wap_img']);
// } else {
// $data['refund_reason_wap_img'] = [];
// }
// if (!$uni || $data['text'] == '' || $data['refund_num'] <= 0) return app('json')->fail('参数错误!');
// $res = $services->orderApplyRefund($this->services->getUserOrderDetail($uni, (int)$request->uid()), $data['text'], $data['refund_reason_wap_explain'], $data['refund_reason_wap_img'], $data['refund_type'], $data['cart_id'], $data['refund_num']);
// if ($res)
// return app('json')->success('提交申请成功');
// else
// return app('json')->fail('提交失败');
}
/**
* 用户退货提交快递单号
* @param Request $request

View File

@ -47,6 +47,7 @@ abstract class BaseDao
* 读取数据条数
* @param array $where
* @return int
* @throws \ReflectionException
*/
public function count(array $where = [])
{
@ -59,8 +60,10 @@ abstract class BaseDao
* @param string $field
* @param int $page
* @param int $limit
* @param string $order
* @param bool $search
* @return \think\Collection
* @throws \ReflectionException
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
@ -304,13 +307,14 @@ abstract class BaseDao
$with = [];
$otherWhere = [];
$responses = new \ReflectionClass($this->setModel());
foreach ($where as $key => $value) {
$method = 'search' . Str::studly($key) . 'Attr';
if ($responses->hasMethod($method)) {
$with[] = $key;
} else {
if ($key != 'timeKey') {
$otherWhere[] = $value;
if (!in_array($key, ['timeKey', 'store_stock', 'integral_time'])) {
$otherWhere[] = is_array($value) ? $value : [$key, '=', $value];
}
}
}
@ -320,6 +324,7 @@ abstract class BaseDao
/**
* 根据搜索器获取搜索内容
* @param $where
* @param $search
* @return BaseModel
* @throws \ReflectionException
* @author 吴汐
@ -378,6 +383,9 @@ abstract class BaseDao
* @param string|null $keyField
* @param int $acc
* @return bool
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function bcInc($key, string $incField, string $inc, string $keyField = null, int $acc = 2)
{
@ -392,6 +400,9 @@ abstract class BaseDao
* @param string|null $keyField
* @param int $acc
* @return bool
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function bcDec($key, string $decField, string $dec, string $keyField = null, int $acc = 2)
{
@ -458,18 +469,6 @@ abstract class BaseDao
})->dec($stock, $num)->inc($sales, $num)->update();
}
return false;
// $field = $isQuota ? [$stock, $sales, 'quota'] : [$stock, $sales];
// $info = $this->getModel()->where($where)->field($field)->find();
// if ($info) {
// if ($isQuota) {
// $info->quota = (int)$info->quota - $num;
// }
// $info->stock = (int)$info->stock - $num;
// $info->sales = (int)$info->sales + $num;
// return $info->save();
// } else {
// return false;
// }
}
/**
@ -500,22 +499,6 @@ abstract class BaseDao
})->inc($stock, $num)->dec($sales, $salesNum)->update();
}
return true;
// $field = $isQuota ? [$stock, $sales, 'quota'] : [$stock, $sales];
// $info = $this->getModel()->where($where)->field($field)->find();
// if ($info) {
// if ($isQuota) {
// $info->quota = (int)$info->quota + $num;
// }
// $info->stock = (int)$info->stock + $num;
// if ((int)$info->sales > $num) {
// $info->sales = (int)$info->sales - $num;
// } else {
// $info->sales = 0;
// }
// return $info->save();
// } else {
// return false;
// }
}
/**

View File

@ -104,8 +104,11 @@ class StoreBargainUserDao extends BaseDao
*/
public function bargainUserList($where, $page = 0, $limit = 0)
{
return $this->search($where)->with(['getBargain', 'getUser'])->when($page != 0, function ($query) use ($page, $limit) {
$query->page($page, $limit);
})->order('add_time desc')->select()->toArray();
return $this->search($where)->with(['getBargain', 'getUser'])
->when(isset($where['real_name']) && $where['real_name'] != '', function ($query) use ($where) {
$query->where('uid', $where['real_name']);
})->when($page != 0, function ($query) use ($page, $limit) {
$query->page($page, $limit);
})->order('add_time desc')->select()->toArray();
}
}

View File

@ -933,7 +933,7 @@ class StoreOrderDao extends BaseDao
return $this->search($where)->where('seckill_id', $id)
->when($page && $limit, function ($query) use ($page, $limit) {
$query->page($page, $limit);
})->field(['order_id', 'real_name', 'status', 'pay_price', 'total_num', 'add_time', 'pay_time', 'paid'])->select()->toArray();
})->field(['order_id', 'real_name', 'status', 'pay_price', 'total_num', 'add_time', 'pay_time', 'paid'])->order('add_time desc')->select()->toArray();
}
/**
@ -952,7 +952,7 @@ class StoreOrderDao extends BaseDao
return $this->search($where)->where('bargain_id', $id)
->when($page && $limit, function ($query) use ($page, $limit) {
$query->page($page, $limit);
})->field(['order_id', 'real_name', 'status', 'pay_price', 'total_num', 'add_time', 'pay_time', 'paid'])->select()->toArray();
})->field(['uid', 'order_id', 'real_name', 'status', 'pay_price', 'total_num', 'add_time', 'pay_time', 'paid'])->order('add_time desc')->select()->toArray();
}
/**
@ -968,7 +968,7 @@ class StoreOrderDao extends BaseDao
*/
public function combinationStatisticsOrder($id, $where, $page = 0, $limit = 0)
{
return $this->search($where)->where('combination_id', $id)->where('paid', 1)->whereIn('refund_type', [0, 3])->where('is_del', 0)
return $this->search($where)->where('combination_id', $id)
->when($page && $limit, function ($query) use ($page, $limit) {
$query->page($page, $limit);
})->field(['uid', 'order_id', 'real_name', 'status', 'pay_price', 'total_num', 'add_time', 'pay_time', 'paid'])->order('add_time desc')->select()->toArray();

View File

@ -45,7 +45,9 @@ class StoreCategoryDao extends BaseDao
/**
*
* @param array $where
* @param array $field
* @return array
* @throws \ReflectionException
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
@ -59,6 +61,7 @@ class StoreCategoryDao extends BaseDao
* 添加修改选择上级分类列表
* @param array $where
* @return array
* @throws \ReflectionException
*/
public function getMenus(array $where)
{

View File

@ -63,7 +63,9 @@ class StoreProductDao extends BaseDao
* @param array $where
* @param int $page
* @param int $limit
* @param string $order
* @return array
* @throws \ReflectionException
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
@ -71,7 +73,7 @@ class StoreProductDao extends BaseDao
public function getList(array $where, int $page = 0, int $limit = 0, string $order = '')
{
$prefix = Config::get('database.connections.' . Config::get('database.default') . '.prefix');
return $this->search($where)->order(($order ? $order . ' ,' : '') . 'sort desc,id desc')
return $this->search($where, false)->order(($order ? $order . ' ,' : '') . 'sort desc,id desc')
->when($page != 0 && $limit != 0, function ($query) use ($page, $limit) {
$query->page($page, $limit);
})->field([
@ -79,7 +81,6 @@ class StoreProductDao extends BaseDao
'(SELECT count(*) FROM `' . $prefix . 'store_product_relation` WHERE `product_id` = `' . $prefix . 'store_product`.`id` AND `type` = \'collect\') as collect',
'(SELECT count(*) FROM `' . $prefix . 'store_product_relation` WHERE `product_id` = `' . $prefix . 'store_product`.`id` AND `type` = \'like\') as likes',
'(SELECT SUM(stock) FROM `' . $prefix . 'store_product_attr_value` WHERE `product_id` = `' . $prefix . 'store_product`.`id` AND `type` = 0) as stock',
// '(SELECT SUM(sales) FROM `' . $prefix . 'store_product_attr_value` WHERE `product_id` = `' . $prefix . 'store_product`.`id` AND `type` = 0) as sales',
'(SELECT count(*) FROM `' . $prefix . 'store_visit` WHERE `product_id` = `' . $prefix . 'store_product`.`id` AND `product_type` = \'product\') as visitor',
])->select()->toArray();
}

View File

@ -176,6 +176,7 @@ class UserDao extends BaseDao
* 获取推广员ids
* @param array $where
* @return array
* @throws \ReflectionException
*/
public function getAgentUserIds(array $where)
{

View File

@ -244,6 +244,10 @@ class UserWechatUserDao extends BaseDao
if (isset($where['is_del'])) {
$model->where($userAlias . 'is_del', $where['is_del']);
}
if (isset($where['ids']) && count($where['ids'])) {
$model->whereIn($userAlias . 'uid', $where['ids']);
}
return $field ? $model->field($field) : $model;
}

View File

@ -326,8 +326,6 @@ class StoreProduct extends BaseModel
$query->whereIn('id', function ($query) use ($store_stock) {
$query->name('store_product_attr_value')->where('stock', '<', $store_stock)->where('stock', '>', 0)->where('type', 0)->field('product_id')->select();
});
// $query->where(['is_show' => 1, 'is_del' => 0])->where('stock', '<=', $store_stock)->where('stock', '>', 0);
} else {
$query->where(['is_show' => 1, 'is_del' => 0])->where('stock', '>', 0);
}

View File

@ -996,8 +996,8 @@ class StoreBargainServices extends BaseServices
$spread_count = $bargainUserHelp->count(['bargain_id' => $id, 'type' => 0]);
$start_count = $bargainUser->count(['bargain_id' => $id]);
$success_count = $bargainUser->count(['bargain_id' => $id, 'status' => 3]);
$pay_price = $orderServices->sum(['bargain_id' => $id, 'paid' => 1], 'pay_price', true);
$pay_count = $orderServices->count(['bargain_id' => $id, 'paid' => 1]);
$pay_price = $orderServices->sum([['bargain_id', '=', $id], ['paid', '=', 1], ['refund_type', 'in', [0, 3]], ['is_del', '=', 0]], 'pay_price', false);
$pay_count = $orderServices->getDistinctCount([['bargain_id', '=', $id], ['paid', '=', 1], ['refund_type', 'in', [0, 3]], ['is_del', '=', 0]], 'uid', false);
$pay_rate = $start_count > 0 ? bcmul(bcdiv((string)$pay_count, (string)$start_count, 2), '100', 2) : 0;
return compact('people_count', 'spread_count', 'start_count', 'success_count', 'pay_price', 'pay_count', 'pay_rate');
}
@ -1027,6 +1027,7 @@ class StoreBargainServices extends BaseServices
/** @var StoreOrderServices $orderServices */
$orderServices = app()->make(StoreOrderServices::class);
[$page, $limit] = $this->getPageValue();
$where = $where + ['paid' => 1, 'refund_status' => 0, 'is_del' => 0];
$list = $orderServices->bargainStatisticsOrder($id, $where, $page, $limit);
$where['bargain_id'] = $id;
$count = $orderServices->count($where);

View File

@ -234,6 +234,9 @@ class StoreBargainUserServices extends BaseServices
* 砍价列表
* @param $where
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function bargainUserList($where)
{

View File

@ -660,6 +660,7 @@ class StoreCombinationServices extends BaseServices
/** @var StoreOrderServices $orderServices */
$orderServices = app()->make(StoreOrderServices::class);
[$page, $limit] = $this->getPageValue();
$where = $where + ['paid' => 1, 'refund_status' => 0, 'is_del' => 0];
$list = $orderServices->combinationStatisticsOrder($id, $where, $page, $limit);
$where['combination_id'] = $id;
$count = $orderServices->count($where);

View File

@ -71,7 +71,7 @@ class StoreCouponService extends BaseServices
$f[] = Form::select('category_id', '选择品类')->setOptions(Form::setOptions($options))->filterable(1)->col(12);
break;
case 2://商品券
$f[] = Form::frameImages('image', '商品', Url::buildUrl('admin/store.StoreProduct/index', array('fodder' => 'image', 'type' => 'many')))->icon('ios-add')->width('950px')->height('505px')->modal(['footer-hide' => true])->props(['srcKey' => 'image']);
$f[] = Form::frameImages('image', '商品', Url::buildUrl(config('app.admin_prefix', 'admin') . '/store.StoreProduct/index', array('fodder' => 'image', 'type' => 'many')))->icon('ios-add')->width('950px')->height('505px')->modal(['footer-hide' => true])->props(['srcKey' => 'image']);
$f[] = Form::hidden('product_id', '');
break;
}

View File

@ -242,6 +242,7 @@ class LiveRoomServices extends BaseServices
/**
* 同步直播间状态
* @return bool
* @throws \Exception
*/
public function syncRoomStatus()
{
@ -249,7 +250,6 @@ class LiveRoomServices extends BaseServices
$limit = 50;
$data = $dataAll = [];
$rooms = $this->dao->getColumn([], 'id,room_id,live_status', 'room_id');
// if (!$rooms) return true;
do {
$wxRooms = MiniProgramService::getLiveInfo($start, $limit);
foreach ($wxRooms as $room) {

View File

@ -775,7 +775,7 @@ class StoreSeckillServices extends BaseServices
/** @var StoreOrderServices $orderServices */
$orderServices = app()->make(StoreOrderServices::class);
[$page, $limit] = $this->getPageValue();
$where['is_del'] = 0;
$where = $where + ['paid' => 1, 'refund_status' => 0, 'is_del' => 0];
$list = $orderServices->seckillOrder($id, $where, $page, $limit);
$where['seckill_id'] = $id;
$count = $orderServices->count($where);

View File

@ -222,9 +222,11 @@ class DivisionServices extends BaseServices
if ($uid && !$userInfo) throw new AdminException(400214);
$field = [];
if ($uid) {
$field[] = Form::number('division_id', '事业部UID', $userInfo['division_id'] ?? '')->disabled(true)->style(['width' => '173px']);
$field[] = Form::number('uid', '用户UID', $userInfo['uid'] ?? '')->disabled(true)->style(['width' => '173px']);
$field[] = Form::hidden('edit', 1);
} else {
$field[] = Form::number('division_id', '事业部UID')->style(['width' => '173px']);
$field[] = Form::number('uid', '用户UID')->style(['width' => '173px']);
$field[] = Form::hidden('edit', 0);
}
@ -238,20 +240,24 @@ class DivisionServices extends BaseServices
* 保存代理商
* @param $data
* @return bool
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function divisionAgentSave($data)
{
/** @var UserServices $userServices */
$userServices = app()->make(UserServices::class);
$uid = $data['uid'];
$userInfo = $userServices->getUserInfo($uid, 'is_division,division_id,agent_id');
$agentData = [
'division_id' => $data['division_id'],
'division_status' => $data['division_status'],
'division_percent' => $data['division_percent'],
'division_change_time' => time(),
'division_end_time' => strtotime($data['division_end_time']),
'division_type' => 2,
];
$division_info = $userServices->getUserInfo($userInfo['division_id'], 'division_end_time,division_percent');
$division_info = $userServices->getUserInfo($data['division_id'], 'division_end_time,division_percent');
if ($division_info) {
if ($agentData['division_percent'] > $division_info['division_percent']) throw new AdminException(400448);
if ($agentData['division_end_time'] > $division_info['division_end_time']) throw new AdminException(400449);

View File

@ -64,6 +64,7 @@ class LoginServices extends BaseServices
$token = $this->createToken($kefuInfo->id, 'kefu');
$kefuInfo->update_time = time();
$kefuInfo->ip = request()->ip();
$kefuInfo->online = 1;
$kefuInfo->save();
return [
'token' => $token['token'],

View File

@ -120,7 +120,7 @@ class StoreServiceLogServices extends BaseServices
foreach ($list as &$item) {
$item['_add_time'] = $item['add_time'];
$item['add_time'] = strtotime($item['_add_time']);
$item['productInfo'] = $item['orderInfo'] = [];
$item['productInfo'] = $item['orderInfo'] = null;
if ($item['msn_type'] == self::MSN_TYPE_GOODS && $item['msn']) {
$productIds[] = $item['msn'];
} elseif ($item['msn_type'] == self::MSN_TYPE_ORDER && $item['msn']) {
@ -155,7 +155,7 @@ class StoreServiceLogServices extends BaseServices
foreach ($list as &$item) {
if ($item['msn_type'] == self::MSN_TYPE_GOODS && $item['msn']) {
$item['productInfo'] = $productList[$item['msn']] ?? [];
$item['productInfo'] = $productList[$item['msn']] ?? null;
} elseif ($item['msn_type'] == self::MSN_TYPE_ORDER && $item['msn']) {
$order = $orderInfo[$item['msn']] ?? null;
if ($order) {
@ -164,7 +164,7 @@ class StoreServiceLogServices extends BaseServices
$order['add_time_h'] = date('H:i:s', $order['add_time']);
$item['orderInfo'] = $order;
} else {
$item['orderInfo'] = [];
$item['orderInfo'] = null;
}
}
$item['msn_type'] = (int)$item['msn_type'];

View File

@ -93,7 +93,7 @@ class StoreServiceServices extends BaseServices
if ($formData) {
$field[] = $this->builder->frameImage('avatar', '客服头像', $this->url(config('app.admin_prefix', 'admin') . '/widget.images/index', ['fodder' => 'avatar'], true), $formData['avatar'] ?? '')->icon('ios-add')->width('950px')->height('505px')->modal(['footer-hide' => true]);
} else {
$field[] = $this->builder->frameImage('image', '选择用户', $this->url('admin/system.user/list', ['fodder' => 'image'], true))->icon('ios-add')->width('950px')->height('505px')->modal(['footer-hide' => true])->Props(['srcKey' => 'image']);
$field[] = $this->builder->frameImage('image', '选择用户', $this->url(config('app.admin_prefix', 'admin') . '/system.user/list', ['fodder' => 'image'], true))->icon('ios-add')->width('950px')->height('505px')->modal(['footer-hide' => true])->Props(['srcKey' => 'image']);
$field[] = $this->builder->hidden('uid', 0);
$field[] = $this->builder->hidden('avatar', '');
}

View File

@ -82,7 +82,7 @@ class DeliveryServiceServices extends BaseServices
if ($formData) {
$field[] = $this->builder->frameImage('avatar', '配送员头像', $this->url(config('app.admin_prefix', 'admin') . '/widget.images/index', ['fodder' => 'avatar'], true), $formData['avatar'] ?? '')->icon('ios-add')->width('950px')->height('505px')->modal(['footer-hide' => true]);
} else {
$field[] = $this->builder->frameImage('image', '商城用户', $this->url('admin/system.user/list', ['fodder' => 'image'], true))->icon('ios-add')->width('950px')->height('505px')->modal(['footer-hide' => true])->Props(['srcKey' => 'image']);
$field[] = $this->builder->frameImage('image', '商城用户', $this->url(config('app.admin_prefix', 'admin') . '/system.user/list', ['fodder' => 'image'], true))->icon('ios-add')->width('950px')->height('505px')->modal(['footer-hide' => true])->Props(['srcKey' => 'image']);
$field[] = $this->builder->hidden('uid', 0);
$field[] = $this->builder->hidden('avatar', '');
}

View File

@ -245,7 +245,7 @@ class StoreOrderRefundServices extends BaseServices
$this->storeOrderServices->update($splitOrderInfo['id'], [
'status' => -2,
'refund_status' => 2,
'refund_type' => $orderRefundInfo['refund_type'],
'refund_type' => 6,
'refund_express' => $orderRefundInfo['refund_express'],
'refund_express_name' => $orderRefundInfo['refund_express_name'],
'refund_reason_wap_img' => $orderRefundInfo['refund_img'],

View File

@ -1420,10 +1420,17 @@ HTML;
return bcmul(bcdiv((bcsub($nowValue, $lastValue, 2)), $lastValue, 4), 100, 2);
}
/**
* 后台首页顶部统计
* @return array
* @author 吴汐
* @email 442384644@qq.com
* @date 2023/04/03
*/
public function homeStatics()
{
/** @var UserServices $uSercice */
$uSercice = app()->make(UserServices::class);
/** @var UserServices $userService */
$userService = app()->make(UserServices::class);
/** @var StoreProductLogServices $productLogServices */
$productLogServices = app()->make(StoreProductLogServices::class);
//TODO 销售额
@ -1433,22 +1440,12 @@ HTML;
$yesterday_sales = $this->dao->todaySales('yesterday');
//日同比
$sales_today_ratio = $this->growth($today_sales, $yesterday_sales);
// //周销售额
// //本周
// $this_week_sales = $this->dao->thisWeekSales('week');
// //上周
// $last_week_sales = $this->dao->thisWeekSales('last week');
// //周同比
// $sales_week_ratio = $this->growth($this_week_sales, $last_week_sales);
//总销售额
$total_sales = $this->dao->totalSales('month');
$sales = [
'today' => $today_sales,
'yesterday' => $yesterday_sales,
'today_ratio' => $sales_today_ratio,
// 'week' => $this_week_sales,
// 'last_week' => $last_week_sales,
// 'week_ratio' => $sales_week_ratio,
'total' => $total_sales . '元',
'date' => '今日'
];
@ -1459,21 +1456,12 @@ HTML;
$yesterday_visits = $productLogServices->count(['time' => 'yesterday', 'type' => 'visit']);
//日同比
$visits_today_ratio = $this->growth($today_visits, $yesterday_visits);
// //本周访问量
// $this_week_visits = $productLogServices->count(['time' => 'week', 'type' => 'visit']);
// //上周访问量
// $last_week_visits = $productLogServices->count(['time' => 'last week', 'type' => 'visit']);
// //周同比
// $visits_week_ratio = $this->growth($this_week_visits, $last_week_visits);
//总访问量
$total_visits = $productLogServices->count(['time' => 'month', 'type' => 'visit']);
$visits = [
'today' => $today_visits,
'yesterday' => $yesterday_visits,
'today_ratio' => $visits_today_ratio,
// 'week' => $this_week_visits,
// 'last_week' => $last_week_visits,
// 'week_ratio' => $visits_week_ratio,
'total' => $total_visits . 'Pv',
'date' => '今日'
];
@ -1484,46 +1472,28 @@ HTML;
$yesterday_order = $this->dao->todayOrderVisit('yesterday', 1);
//订单日同比
$order_today_ratio = $this->growth($today_order, $yesterday_order);
// //本周订单量
// $this_week_order = $this->dao->todayOrderVisit('week', 2);
// //上周订单量
// $last_week_order = $this->dao->todayOrderVisit('last week', 2);
// //订单周同比
// $order_week_ratio = $this->growth($this_week_order, $last_week_order);
//总订单量
$total_order = $this->dao->count(['time' => 'month', 'paid' => 1, 'refund_status' => 0, 'pid' => 0]);
$order = [
'today' => $today_order,
'yesterday' => $yesterday_order,
'today_ratio' => $order_today_ratio,
// 'week' => $this_week_order,
// 'last_week' => $last_week_order,
// 'week_ratio' => $order_week_ratio,
'total' => $total_order . '单',
'date' => '今日'
];
//TODO 用户
//今日新增用户
$today_user = $uSercice->todayAddVisits('today', 1);
$today_user = $userService->todayAddVisits('today', 1);
//昨日新增用户
$yesterday_user = $uSercice->todayAddVisits('yesterday', 1);
$yesterday_user = $userService->todayAddVisits('yesterday', 1);
//新增用户日同比
$user_today_ratio = $this->growth($today_user, $yesterday_user);
// //本周新增用户
// $this_week_user = $uSercice->todayAddVisits('week', 2);
// //上周新增用户
// $last_week_user = $uSercice->todayAddVisits('last week', 2);
// //新增用户周同比
// $user_week_ratio = $this->growth($this_week_user, $last_week_user);
//所有用户
$total_user = $uSercice->count(['time' => 'month']);
$total_user = $userService->count(['time' => 'month']);
$user = [
'today' => $today_user,
'yesterday' => $yesterday_user,
'today_ratio' => $user_today_ratio,
// 'week' => $this_week_user,
// 'last_week' => $last_week_user,
// 'week_ratio' => $user_week_ratio,
'total' => $total_user . '人',
'date' => '今日'
];
@ -2566,12 +2536,12 @@ HTML;
public function autoComment()
{
//自动评价天数
$systemCommentTime = (int)sys_config('system_comment_time', 0);
$systemCommentTime = sys_config('system_comment_time', 0);
//0为取消自动默认好评功能
if ($systemCommentTime == 0) {
return true;
}
$sevenDay = strtotime(date('Y-m-d H:i:s', strtotime('-' . $systemCommentTime . ' day')));
$sevenDay = bcsub((string)time(), bcmul((string)$systemCommentTime, '86400'));
/** @var StoreOrderStoreOrderStatusServices $service */
$service = app()->make(StoreOrderStoreOrderStatusServices::class);
$orderList = $service->getTakeOrderIds([
@ -2579,7 +2549,7 @@ HTML;
'is_del' => 0,
'paid' => 1,
'status' => 2,
'change_type' => ['take_delivery']
'change_type' => ['take_delivery','user_take_delivery']
], 30);
foreach ($orderList as $item) {
AutoCommentJob::dispatch([$item['id'], $item['cart_id']]);

View File

@ -522,12 +522,12 @@ class StoreOrderTakeServices extends BaseServices
public function autoTakeOrder()
{
//7天前时间戳
$systemDeliveryTime = (int)sys_config('system_delivery_time', 0);
$systemDeliveryTime = sys_config('system_delivery_time', 0);
//0为取消自动收货功能
if ($systemDeliveryTime == 0) {
return true;
}
$sevenDay = strtotime(date('Y-m-d H:i:s', strtotime('-' . $systemDeliveryTime . ' day')));
$sevenDay = bcsub((string)time(), bcmul((string)$systemDeliveryTime, '86400'));
/** @var StoreOrderStoreOrderStatusServices $service */
$service = app()->make(StoreOrderStoreOrderStatusServices::class);
$orderList = $service->getTakeOrderIds([

View File

@ -63,7 +63,7 @@ class StoreProductReplyServices extends BaseServices
public function createForm(int $product_id)
{
if ($product_id == 0) {
$field[] = Form::frameImage('image', '商品', Url::buildUrl('admin/store.StoreProduct/index', array('fodder' => 'image')))->icon('ios-add')->width('950px')->height('505px')->modal(['footer-hide' => true])->Props(['srcKey' => 'image']);
$field[] = Form::frameImage('image', '商品', Url::buildUrl(config('app.admin_prefix', 'admin') . '/store.StoreProduct/index', array('fodder' => 'image')))->icon('ios-add')->width('950px')->height('505px')->modal(['footer-hide' => true])->Props(['srcKey' => 'image']);
} else {
$field[] = Form::hidden('product_id', $product_id);
}

View File

@ -144,7 +144,7 @@ class SystemLangServices extends BaseServices
$field[] = Form::input('unique_auth', '权限标识', $formData['unique_auth'] ?? '')->placeholder('不填写则后台自动生成');
$params = $formData['params'] ?? '';
// $field[] = Form::input('params', '参数', is_array($params) ? '' : $params)->placeholder('举例:a/123/b/234');
$field[] = Form::frameInput('icon', '图标', $this->url('admin/widget.widgets/icon', ['fodder' => 'icon']), $formData['icon'] ?? '')->icon('md-add')->height('505px')->modal(['footer-hide' => true]);
$field[] = Form::frameInput('icon', '图标', $this->url(config('app.admin_prefix', 'admin') . '/widget.widgets/icon', ['fodder' => 'icon']), $formData['icon'] ?? '')->icon('md-add')->height('505px')->modal(['footer-hide' => true]);
$field[] = Form::number('sort', '排序', (int)($formData['sort'] ?? 0))->precision(0);
$field[] = Form::radio('auth_type', '类型', $formData['auth_type'] ?? 1)->options([['value' => 2, 'label' => '接口'], ['value' => 1, 'label' => '菜单(包含页面按钮)']]);
$field[] = Form::radio('is_show', '状态', $formData['is_show'] ?? 1)->options([['value' => 0, 'label' => '关闭'], ['value' => 1, 'label' => '开启']]);

View File

@ -149,7 +149,7 @@ class SystemMenusServices extends BaseServices
$field[] = Form::input('unique_auth', '权限标识', $formData['unique_auth'] ?? '')->placeholder('不填写则后台自动生成');
$params = $formData['params'] ?? '';
// $field[] = Form::input('params', '参数', is_array($params) ? '' : $params)->placeholder('举例:a/123/b/234');
$field[] = Form::frameInput('icon', '图标', $this->url('admin/widget.widgets/icon', ['fodder' => 'icon']), $formData['icon'] ?? '')->icon('md-add')->height('505px')->modal(['footer-hide' => true]);
$field[] = Form::frameInput('icon', '图标', $this->url(config('app.admin_prefix', 'admin') . '/widget.widgets/icon', ['fodder' => 'icon']), $formData['icon'] ?? '')->icon('md-add')->height('505px')->modal(['footer-hide' => true]);
$field[] = Form::number('sort', '排序', (int)($formData['sort'] ?? 0))->precision(0);
$field[] = Form::radio('auth_type', '类型', $formData['auth_type'] ?? 1)->options([['value' => 2, 'label' => '接口'], ['value' => 1, 'label' => '菜单(包含页面按钮)']]);
$field[] = Form::radio('is_show', '状态', $formData['is_show'] ?? 1)->options([['value' => 0, 'label' => '关闭'], ['value' => 1, 'label' => '开启']]);

View File

@ -102,7 +102,7 @@ class SystemConfigTabServices extends BaseServices
$form[] = Form::select('pid', '父级分类', isset($formData['pid']) ? (string)$formData['pid'] : '')->setOptions($this->getSelectForm())->filterable(true);
$form[] = Form::input('title', '分类名称', $formData['title'] ?? '');
$form[] = Form::input('eng_title', '分类字段英文', $formData['eng_title'] ?? '');
$form[] = Form::frameInput('icon', '图标', $this->url('admin/widget.widgets/icon', ['fodder' => 'icon'], true), $formData['icon'] ?? '')->icon('ios-ionic')->height('505px')->modal(['footer-hide' => true]);
$form[] = Form::frameInput('icon', '图标', $this->url(config('app.admin_prefix', 'admin') . '/widget.widgets/icon', ['fodder' => 'icon'], true), $formData['icon'] ?? '')->icon('ios-ionic')->height('505px')->modal(['footer-hide' => true]);
$form[] = Form::radio('type', '类型', $formData['type'] ?? 0)->options([
['value' => 0, 'label' => '系统'],
['value' => 3, 'label' => '其它']

View File

@ -103,7 +103,7 @@ class SystemStoreStaffServices extends BaseServices
if ($formData) {
$field[] = $this->builder->frameImage('image', '更换头像', $this->url(config('app.admin_prefix', 'admin') . '/widget.images/index', array('fodder' => 'image'),true), $formData['avatar'] ?? '')->icon('ios-add')->width('950px')->height('505px')->modal(['footer-hide' => true]);
} else {
$field[] = $this->builder->frameImage('image', '商城用户', $this->url('admin/system.User/list', ['fodder' => 'image'], true))->icon('ios-add')->width('950px')->height('505px')->modal(['footer-hide' => true])->Props(['srcKey' => 'image']);
$field[] = $this->builder->frameImage('image', '商城用户', $this->url(config('app.admin_prefix', 'admin') . '/system.User/list', ['fodder' => 'image'], true))->icon('ios-add')->width('950px')->height('505px')->modal(['footer-hide' => true])->Props(['srcKey' => 'image']);
}
$field[] = $this->builder->hidden('uid', $formData['uid'] ?? 0);
$field[] = $this->builder->hidden('avatar', $formData['avatar'] ?? '');

View File

@ -237,6 +237,7 @@ class UserServices extends BaseServices
* 获取分销员ids
* @param array $where
* @return array
* @throws \ReflectionException
*/
public function getAgentUserIds(array $where)
{

View File

@ -1 +1 @@
APP_DEBUG = true [APP] DEFAULT_TIMEZONE = Asia/Shanghai [DATABASE] TYPE = mysql HOSTNAME = #DB_HOST# HOSTPORT = #DB_PORT# USERNAME = #DB_USER# PASSWORD = '#DB_PWD#' DATABASE = #DB_NAME# PREFIX = #DB_PREFIX# CHARSET = utf8 DEBUG = true [LANG] default_lang = zh-cn [CACHE] DRIVER = #CACHE_TYPE# CACHE_PREFIX = #CACHE_PREFIX# CACHE_TAG_PREFIX = #CACHE_TAG_PREFIX# [REDIS] REDIS_HOSTNAME = #RB_HOST# PORT = #RB_PORT# REDIS_PASSWORD = '#RB_PWD#' SELECT = #RB_SELECT# [QUEUE] QUEUE_NAME = #QUEUE_NAME#
APP_DEBUG = true [APP] DEFAULT_TIMEZONE = Asia/Shanghai [DATABASE] TYPE = mysql HOSTNAME = #DB_HOST# HOSTPORT = #DB_PORT# USERNAME = #DB_USER# PASSWORD = '#DB_PWD#' DATABASE = #DB_NAME# PREFIX = #DB_PREFIX# CHARSET = utf8mb4 DEBUG = true [LANG] default_lang = zh-cn [CACHE] DRIVER = #CACHE_TYPE# CACHE_PREFIX = #CACHE_PREFIX# CACHE_TAG_PREFIX = #CACHE_TAG_PREFIX# [REDIS] REDIS_HOSTNAME = #RB_HOST# PORT = #RB_PORT# REDIS_PASSWORD = '#RB_PWD#' SELECT = #RB_SELECT# [QUEUE] QUEUE_NAME = #QUEUE_NAME#

View File

@ -33347,7 +33347,7 @@ INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config
(19, 'wechat_qrcode', 'upload', 'input', 2, '', 1, '', 0, 0, '\"\"', '公众号关注二维码', '引导关注公众号显示的公众号关注二维码', 76, 1),
(21, 'wechat_share_title', 'text', 'input', 70, '', 0, 'required:true', 100, 0, '\"CRMEB v4\\u6807\\u51c6\\u7248\"', '微信分享标题', '微信分享标题', 0, 1),
(22, 'wechat_share_synopsis', 'textarea', '', 70, '', 0, '', 100, 5, '\"\\u5b8c\\u5584\\u7684\\u6587\\u6863 \\u5168\\u201c\\u5fc3\\u201d\\u800c\\u6765\\uff01\"', '微信分享简介', '微信分享简介', 0, 1),
(25, 'pay_weixin_mchid', 'text', 'input', 4, '', 0, '', 100, 0, '\"\"', 'Mchid', '受理商ID,身份标识', 0, 1),
(25, 'pay_weixin_mchid', 'text', 'input', 4, '', 0, '', 100, 0, '\"\"', 'Mchid', '微信商户商户号,微信商户商户号', 0, 1),
(26, 'pay_weixin_client_cert', 'upload', 'input', 4, '', 3, '', 0, 0, '\"\"', '微信支付证书', '微信支付证书,在微信商家平台中可以下载!文件名一般为apiclient_cert.pem', 0, 1),
(27, 'pay_weixin_client_key', 'upload', 'input', 4, '', 3, '', 0, 0, '\"\"', '微信支付证书密钥', '微信支付证书密钥,在微信商家平台中可以下载!文件名一般为apiclient_key.pem', 0, 1),
(28, 'pay_weixin_key', 'text', 'input', 4, '', 0, '', 100, 0, '\"\"', 'Key', '商户支付密钥Key。审核通过后,在微信发送的邮件中查看。', 0, 1),

View File

@ -106,6 +106,16 @@ export function treeListApi(type) {
});
}
/**
* @description 商品管理-- 分类 new
*/
export function cascaderListApi(type) {
return request({
url: `product/category/cascader/${type}`,
method: 'get',
});
}
/**
* @description 商品管理-- 详情
*/

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB

View File

@ -4,11 +4,18 @@
<Row type="flex" :gutter="24">
<Col v-bind="grid" v-if="!liveStatus">
<FormItem label="商品分类:" label-for="pid">
<Select v-model="formValidate.cate_id" style="width: 200px" clearable @on-change="userSearchs">
<!-- <Select v-model="formValidate.cate_id" style="width: 200px" clearable @on-change="userSearchs">
<Option v-for="item in treeSelect" :value="item.id" :key="item.id"
>{{ item.html + item.cate_name }}
</Option>
</Select>
</Select> -->
<el-cascader
v-model="formValidate.cate_id"
size="small"
:options="treeSelect"
:props="{ emitPath: false }"
clearable
></el-cascader>
</FormItem>
</Col>
<Col v-bind="grid" v-if="!type && diy">
@ -61,7 +68,7 @@
<script>
import { mapState } from 'vuex';
import { treeListApi, changeListApi } from '@/api/product';
import { cascaderListApi, changeListApi } from '@/api/product';
import { liveGoods } from '@/api/live';
import { getProductList } from '@/api/diy';
export default {
@ -306,7 +313,7 @@ export default {
},
// 商品分类;
goodsCategory() {
treeListApi(1)
cascaderListApi(1)
.then((res) => {
this.treeSelect = res.data;
})
@ -335,17 +342,17 @@ export default {
let data = res.data;
if (this.selectIds.length) {
let arr = []
let arr = [];
this.selectIds.map((item) => {
data.list.map((i) => {
if (i.id == item) {
console.log(i);
i._checked = true;
arr.push(i)
arr.push(i);
}
});
});
this.changeCheckbox(arr)
this.changeCheckbox(arr);
}
this.tableList = data.list;
this.total = res.data.count;

View File

@ -30,7 +30,7 @@ export default {
props: {
uid: {
type: String | Number,
default: '',
default: 0,
},
only_get: {
default: false,
@ -64,7 +64,7 @@ export default {
},
methods: {
getList() {
getUserLabel(this.uid).then((res) => {
getUserLabel(this.uid || 0).then((res) => {
if (this.selectDataLabel && this.selectDataLabel.length) {
this.selectDataLabel.map((el) => {
res.data.map((re) => {

View File

@ -133,6 +133,7 @@ export default {
fourWartermarkText: 'Watermark copy',
fiveTitle: 'Other settings',
fiveTagsStyle: 'Tagsview style',
themeStyle: 'Theme',
fiveAnimation: 'page animation',
fiveColumnsAsideStyle: 'Column style',
fiveColumnsAsideLayout: 'Column layout',

View File

@ -121,18 +121,19 @@ export default {
threeLockScreenTime: '自动锁屏(s/秒)',
fourTitle: '界面显示',
fourIsShowLogo: '侧边栏 Logo',
fourIsBreadcrumb: '开启 面包屑',
fourIsBreadcrumbIcon: '开启 面包屑图标',
fourIsTagsview: '开启 历史菜单',
fourIsTagsviewIcon: '开启 历史菜单 图标',
fourIsFooter: '开启 Footer',
fourIsBreadcrumb: '面包屑',
fourIsBreadcrumbIcon: '面包屑图标',
fourIsTagsview: '历史菜单',
fourIsTagsviewIcon: '历史菜单 图标',
fourIsFooter: 'Footer',
fourIsGrayscale: '灰色模式',
fourIsInvert: '色弱模式',
fourIsDark: '深色模式',
fourIsWartermark: '开启水印',
fourWartermarkText: '水印文案',
fiveTitle: '其它设置',
fiveTagsStyle: 'Tagsview 风格',
fiveTagsStyle: '标签风格',
themeStyle: '主题',
fiveAnimation: '主页面切换动画',
fiveColumnsAsideStyle: '分栏高亮风格',
fiveColumnsAsideLayout: '分栏布局风格',

View File

@ -133,6 +133,7 @@ export default {
fourWartermarkText: '浮水印文案',
fiveTitle: '其它設定',
fiveTagsStyle: 'Tagsview 風格',
themeStyle: '主題',
fiveAnimation: '主頁面切換動畫',
fiveColumnsAsideStyle: '分欄高亮風格',
fiveColumnsAsideLayout: '分欄佈局風格',

View File

@ -1,6 +1,11 @@
<template>
<el-aside class="layout-aside" :class="setCollapseWidth" v-if="clientWidth > 1000">
<Logo v-if="setShowLogo && menuList.length" />
<Logo v-if="setShowLogo && menuList.length && getThemeConfig.layout !== 'columns'" />
<el-divider
v-if="menuList.length && !getThemeConfig.isCollapse && getThemeConfig.layout == 'columns'"
content-position="center"
>{{ catName }}</el-divider
>
<el-scrollbar class="flex-auto" ref="layoutAsideRef">
<Vertical :menuList="menuList" :class="setCollapseWidth" />
</el-scrollbar>
@ -25,10 +30,18 @@ export default {
return {
menuList: [],
clientWidth: '',
catName: '',
};
},
computed: {
// 设置左侧菜单的具体宽度
// menuList() {
// this.$store.state.menus.childMenuList.length > 0
// ? (this.$store.state.themeConfig.themeConfig.isCollapse = false)
// : (this.$store.state.themeConfig.themeConfig.isCollapse = true);
// console.log(this.$store.state.menus.childMenuList, 'this.$store.state.menus.childMenuList');
// return this.$store.state.menus.childMenuList;
// },
setCollapseWidth() {
let { layout, isCollapse } = this.$store.state.themeConfig.themeConfig;
let asideBrColor = '';
@ -61,6 +74,7 @@ export default {
},
},
created() {
console.log(this.$store.state.menus, 'this.$store.state.menus');
this.initMenuFixed(document.body.clientWidth);
this.setFilterRoutes();
this.bus.$on('setSendColumnsChildren', (res) => {
@ -73,6 +87,9 @@ export default {
this.bus.$on('layoutMobileResize', (res) => {
this.initMenuFixed(res.clientWidth);
});
this.bus.$on('oneCatName', (name) => {
this.catName = name;
});
// 菜单滚动条监听
this.bus.$on('updateElScrollBar', () => {
setTimeout(() => {

View File

@ -1,6 +1,7 @@
<template>
<div class="layout-columns-aside">
<el-scrollbar>
<Logo />
<ul>
<li
v-for="(v, k) in columnsAsideList"
@ -41,9 +42,11 @@
<script>
import { getMenuSider, getHeaderName } from '@/libs/system';
import Logo from '@/layout/logo/index.vue';
export default {
name: 'layoutColumnsAside',
components: { Logo },
data() {
return {
columnsAsideList: [],
@ -105,15 +108,19 @@ export default {
const resData = this.setSendChildren(getHeaderName(this.$route, this.columnsAsideList));
if (!resData.children) {
this.bus.$emit('setSendColumnsChildren', []);
this.$store.commit('menus/childMenuList', []);
this.$store.state.themeConfig.themeConfig.isCollapse = true;
return false;
}
this.bus.$emit('oneCatName', resData.item[0].title);
this.onColumnsAsideDown(resData.item[0].k);
// 刷新时,初始化一个路由设置自动收起菜单
resData.children.length > 0
? (this.$store.state.themeConfig.themeConfig.isCollapse = false)
: (this.$store.state.themeConfig.themeConfig.isCollapse = true);
this.bus.$emit('setSendColumnsChildren', resData?.children || []);
this.$store.commit('menus/childMenuList', resData?.children || []);
},
// 传送当前子级数据到菜单中
setSendChildren(path) {
@ -181,7 +188,9 @@ export default {
const resData = this.setSendChildren(HeadName);
if (resData.length <= 0) return false;
this.onColumnsAsideDown(resData.item[0].k);
this.bus.$emit('oneCatName', resData.item[0].title);
this.bus.$emit('setSendColumnsChildren', asideList || []);
this.$store.commit('menus/childMenuList', asideList || []);
},
deep: true,
},
@ -194,6 +203,7 @@ export default {
width: 70px;
height: 100%;
background: var(--prev-bg-columnsMenuBar);
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
ul {
position: relative;
li {
@ -235,12 +245,12 @@ export default {
}
.layout-columns-active,
.layout-columns-active a {
color: var(--prev-color-text-white);
color: var(--prev-bg-columnsMenuActiveColor);
transition: 0.3s ease-in-out;
}
.columns-round {
background: var(--prev-color-primary);
color: var(--prev-color-text-white);
// color: var(--prev-color-text-white);
position: absolute;
left: 50%;
top: 2px;

View File

@ -1,5 +1,9 @@
<template>
<div class="layout-logo" v-if="!$store.state.themeConfig.themeConfig.isCollapse" @click="onThemeConfigChange">
<div
class="layout-logo"
v-if="$store.state.themeConfig.themeConfig.layout !== 'columns' && !$store.state.themeConfig.themeConfig.isCollapse"
@click="onThemeConfigChange"
>
<img v-if="maxLogo" class="layout-logo-medium-img" :src="maxLogo" />
</div>
<div class="layout-logo-size" v-else @click="onThemeConfigChange">
@ -35,6 +39,12 @@ export default {
methods: {
// logo 点击实现菜单展开/收起
onThemeConfigChange() {
if (
this.$store.state.themeConfig.themeConfig.layout == 'columns' &&
!this.$store.state.menus.childMenuList.length &&
this.$store.state.themeConfig.themeConfig.isCollapse
)
return;
if (this.$store.state.themeConfig.themeConfig.layout === 'transverse') return false;
this.$store.state.themeConfig.themeConfig.isCollapse = !this.$store.state.themeConfig.themeConfig.isCollapse;
},
@ -55,7 +65,7 @@ export default {
display: flex;
align-items: center;
justify-content: center;
// box-shadow: 0px 1px 4px rgba(0, 21, 41, 2%);
// box-shadow: 0px 1px 4px rgba(0, 21, 41, 2%);
color: var(--prev-color-primary);
font-size: 16px;
cursor: pointer;
@ -74,12 +84,15 @@ export default {
}
}
.layout-logo-size {
width: 64px;
width: 50px;
height: 50px;
display: flex;
cursor: pointer;
margin: auto;
&-img {
width: 20px;
width: 50px;
height: 50px;
margin: auto;
animation: logoAnimation 0.3s ease-in-out;
}

View File

@ -1,12 +1,12 @@
<template>
<div class="layout-navbars-breadcrumb" :style="{ display: isShowBreadcrumb }">
<div class="layout-navbars-breadcrumb">
<!-- {{[...breadCrumbList,...crumbPast]}} -->
<i
class="layout-navbars-breadcrumb-icon"
:class="getThemeConfig.isCollapse ? 'el-icon-s-unfold' : 'el-icon-s-fold'"
@click="onThemeConfigChange"
></i>
<el-breadcrumb class="layout-navbars-breadcrumb-hide">
<el-breadcrumb class="layout-navbars-breadcrumb-hide" :style="{ display: isShowBreadcrumb }">
<transition-group name="breadcrumb" mode="out-in">
<el-breadcrumb-item v-for="(v, k) in [...breadCrumbList, ...crumbPast]" :key="v.path">
<span v-if="k == 1" class="layout-navbars-breadcrumb-span">
@ -101,6 +101,13 @@ export default {
},
// breadcrumb icon 点击菜单展开与收起
onThemeConfigChange() {
if (
this.$store.state.themeConfig.themeConfig.layout == 'columns' &&
!this.$store.state.menus.childMenuList.length &&
this.$store.state.themeConfig.themeConfig.isCollapse
) {
return;
}
this.$store.state.themeConfig.themeConfig.isCollapse = !this.$store.state.themeConfig.themeConfig.isCollapse;
this.setLocalThemeConfig();
},
@ -175,7 +182,7 @@ export default {
<style scoped lang="scss">
.layout-navbars-breadcrumb {
flex: 1;
// flex: 1;
height: inherit;
display: flex;
align-items: center;

View File

@ -1,16 +1,103 @@
<template>
<div class="layout-breadcrumb-seting">
<el-drawer
:title="$t('message.layout.configTitle')"
title="主题编辑"
:visible.sync="getThemeConfig.isDrawer"
direction="rtl"
destroy-on-close
size="240px"
size="300px"
@close="onDrawerClose"
>
<el-scrollbar class="layout-breadcrumb-seting-bar">
<!-- 布局切换 -->
<el-divider :content-position="contentPosotion">{{ $t('message.layout.sixTitle') }}</el-divider>
<div class="layout-drawer-content-flex">
<!-- defaults 布局 -->
<div
class="layout-drawer-content-item"
:class="{ 'drawer-layout-active': getThemeConfig.layout === 'defaults' }"
@click="onSetLayout('defaults')"
>
<section class="el-container el-circular">
<aside class="el-aside w10 mr5"></aside>
<section class="el-container is-vertical">
<header class="el-header mb5" style="height: 10px"></header>
<main class="el-main"></main>
</section>
</section>
<!-- <div class="layout-tips-warp" :class="{ 'layout-tips-warp-active': getThemeConfig.layout === 'defaults' }">
<div class="layout-tips-box">
<p class="layout-tips-txt">{{ $t('message.layout.sixDefaults') }}</p>
</div>
</div> -->
</div>
<!-- classic 布局 -->
<div
class="layout-drawer-content-item"
:class="{ 'drawer-layout-active': getThemeConfig.layout === 'classic' }"
@click="onSetLayout('classic')"
>
<section class="el-container is-vertical el-circular">
<header class="el-header mb5" style="height: 10px"></header>
<section class="el-container">
<aside class="el-aside mr5" style="width: 20px"></aside>
<section class="el-container is-vertical">
<main class="el-main"></main>
</section>
</section>
</section>
<!-- <div class="layout-tips-warp" :class="{ 'layout-tips-warp-active': getThemeConfig.layout === 'classic' }">
<div class="layout-tips-box">
<p class="layout-tips-txt">{{ $t('message.layout.sixClassic') }}</p>
</div>
</div> -->
</div>
<!-- transverse 布局 -->
<div
class="layout-drawer-content-item"
:class="{ 'drawer-layout-active': getThemeConfig.layout === 'transverse' }"
@click="onSetLayout('transverse')"
>
<section class="el-container is-vertical el-circular">
<header class="el-header mb5" style="height: 10px"></header>
<section class="el-container">
<section class="el-container is-vertical">
<main class="el-main"></main>
</section>
</section>
</section>
<!-- <div
class="layout-tips-warp"
:class="{ 'layout-tips-warp-active': getThemeConfig.layout === 'transverse' }"
>
<div class="layout-tips-box">
<p class="layout-tips-txt">{{ $t('message.layout.sixTransverse') }}</p>
</div>
</div> -->
</div>
<!-- columns 布局 -->
<div
class="layout-drawer-content-item"
:class="{ 'drawer-layout-active': getThemeConfig.layout === 'columns' }"
@click="onSetLayout('columns')"
>
<section class="el-container el-circular">
<aside class="el-aside-dark mr5" style="width: 10px"></aside>
<aside class="el-aside mr5" style="width: 17px"></aside>
<section class="el-container is-vertical">
<!-- <header class="el-header" style="height: 10px"></header> -->
<main class="el-main"></main>
</section>
</section>
<!-- <div class="layout-tips-warp" :class="{ 'layout-tips-warp-active': getThemeConfig.layout === 'columns' }">
<div class="layout-tips-box">
<p class="layout-tips-txt">{{ $t('message.layout.sixColumns') }}</p>
</div>
</div> -->
</div>
</div>
<!-- 全局主题 -->
<el-divider content-position="left">{{ $t('message.layout.oneTitle') }}</el-divider>
<!-- <el-divider :content-position="contentPosotion">{{ $t('message.layout.oneTitle') }}</el-divider>
<div class="layout-breadcrumb-seting-bar-flex">
<div class="layout-breadcrumb-seting-bar-flex-label">primary</div>
<div class="layout-breadcrumb-seting-bar-flex-value">
@ -30,10 +117,32 @@
<div class="layout-breadcrumb-seting-bar-flex-value">
<el-switch v-model="getThemeConfig.isIsDark" :width="35" @change="onAddDarkChange"></el-switch>
</div>
</div>
</div> -->
<!-- 界面设置 -->
<el-divider content-position="left">{{ $t('message.layout.threeTitle') }}</el-divider>
<el-divider :content-position="contentPosotion">{{ $t('message.layout.threeTitle') }}</el-divider>
<div class="layout-breadcrumb-seting-bar-flex mb10">
<div class="layout-breadcrumb-seting-bar-flex-label">{{ $t('message.layout.themeStyle') }}</div>
<div class="layout-breadcrumb-seting-bar-flex-value">
<el-select
v-model="getThemeConfig.themeStyle"
placeholder="请选择"
size="mini"
style="width: 90px"
@change="setLocalTheme"
>
<el-option label="蓝黑" value="theme-1"></el-option>
<el-option label="蓝白" value="theme-2"></el-option>
<el-option label="绿黑" value="theme-3"></el-option>
<el-option label="绿白" value="theme-4"></el-option>
<el-option label="紫黑" value="theme-5"></el-option>
<el-option label="紫白" value="theme-6"></el-option>
<el-option label="红黑" value="theme-7"></el-option>
<el-option label="红白" value="theme-8"></el-option>
<el-option label="渐变" value="theme-9"></el-option>
</el-select>
</div>
</div>
<div class="layout-breadcrumb-seting-bar-flex">
<div class="layout-breadcrumb-seting-bar-flex-label">{{ $t('message.layout.threeIsCollapse') }}</div>
<div class="layout-breadcrumb-seting-bar-flex-value">
@ -54,7 +163,7 @@
</div>
<!-- 界面显示 -->
<el-divider content-position="left">{{ $t('message.layout.fourTitle') }}</el-divider>
<el-divider :content-position="contentPosotion">{{ $t('message.layout.fourTitle') }}</el-divider>
<div class="layout-breadcrumb-seting-bar-flex">
<div class="layout-breadcrumb-seting-bar-flex-label">{{ $t('message.layout.fourIsShowLogo') }}</div>
<div class="layout-breadcrumb-seting-bar-flex-value">
@ -123,7 +232,7 @@
</div>
<!-- 其它设置 -->
<el-divider content-position="left">{{ $t('message.layout.fiveTitle') }}</el-divider>
<el-divider :content-position="contentPosotion">{{ $t('message.layout.fiveTitle') }}</el-divider>
<div class="layout-breadcrumb-seting-bar-flex mt15">
<div class="layout-breadcrumb-seting-bar-flex-label">{{ $t('message.layout.fiveTagsStyle') }}</div>
<div class="layout-breadcrumb-seting-bar-flex-value">
@ -143,134 +252,32 @@
<div class="layout-breadcrumb-seting-bar-flex mt15">
<div class="layout-breadcrumb-seting-bar-flex-label">{{ $t('message.layout.fiveAnimation') }}</div>
<div class="layout-breadcrumb-seting-bar-flex-value">
<el-select
v-model="getThemeConfig.animation"
placeholder="请选择"
size="mini"
style="width: 90px"
@change="setLocalThemeConfig"
>
<el-option label="slide-right" value="slide-right"></el-option>
<el-option label="slide-left" value="slide-left"></el-option>
<el-option label="opacitys" value="opacitys"></el-option>
</el-select>
<el-radio-group v-model="getThemeConfig.animation" size="mini" @change="setLocalThemeConfig">
<el-radio-button label="slide-right">右滑</el-radio-button>
<el-radio-button label="slide-left">左滑</el-radio-button>
<el-radio-button label="opacitys">透明</el-radio-button>
</el-radio-group>
</div>
</div>
<div class="layout-breadcrumb-seting-bar-flex mt15">
<div class="layout-breadcrumb-seting-bar-flex mt15" v-if="getThemeConfig.layout === 'columns'">
<div class="layout-breadcrumb-seting-bar-flex-label">{{ $t('message.layout.fiveColumnsAsideStyle') }}</div>
<div class="layout-breadcrumb-seting-bar-flex-value">
<el-select
v-model="getThemeConfig.columnsAsideStyle"
placeholder="请选择"
size="mini"
style="width: 90px"
@change="setLocalThemeConfig"
>
<el-option label="圆角" value="columns-round"></el-option>
<el-option label="卡片" value="columns-card"></el-option>
</el-select>
<el-radio-group v-model="getThemeConfig.columnsAsideStyle" size="mini" @change="setLocalThemeConfig">
<el-radio-button label="columns-round">圆角</el-radio-button>
<el-radio-button label="columns-card">卡片</el-radio-button>
</el-radio-group>
</div>
</div>
<div class="layout-breadcrumb-seting-bar-flex mt15 mb28">
<div class="layout-breadcrumb-seting-bar-flex mt15 mb28" v-if="getThemeConfig.layout === 'columns'">
<div class="layout-breadcrumb-seting-bar-flex-label">{{ $t('message.layout.fiveColumnsAsideLayout') }}</div>
<div class="layout-breadcrumb-seting-bar-flex-value">
<el-select
v-model="getThemeConfig.columnsAsideLayout"
placeholder="请选择"
size="mini"
style="width: 90px"
@change="setLocalThemeConfig"
>
<el-option label="水平" value="columns-horizontal"></el-option>
<el-option label="垂直" value="columns-vertical"></el-option>
</el-select>
<el-radio-group v-model="getThemeConfig.columnsAsideLayout" size="mini" @change="setLocalThemeConfig">
<el-radio-button label="columns-horizontal">水平</el-radio-button>
<el-radio-button label="columns-vertical">垂直</el-radio-button>
</el-radio-group>
</div>
</div>
<!-- 布局切换 -->
<el-divider content-position="left">{{ $t('message.layout.sixTitle') }}</el-divider>
<div class="layout-drawer-content-flex">
<!-- defaults 布局 -->
<div class="layout-drawer-content-item" @click="onSetLayout('defaults')">
<section
class="el-container el-circular"
:class="{ 'drawer-layout-active': getThemeConfig.layout === 'defaults' }"
>
<aside class="el-aside" style="width: 20px"></aside>
<section class="el-container is-vertical">
<header class="el-header" style="height: 10px"></header>
<main class="el-main"></main>
</section>
</section>
<div class="layout-tips-warp" :class="{ 'layout-tips-warp-active': getThemeConfig.layout === 'defaults' }">
<div class="layout-tips-box">
<p class="layout-tips-txt">{{ $t('message.layout.sixDefaults') }}</p>
</div>
</div>
</div>
<!-- classic 布局 -->
<div class="layout-drawer-content-item" @click="onSetLayout('classic')">
<section
class="el-container is-vertical el-circular"
:class="{ 'drawer-layout-active': getThemeConfig.layout === 'classic' }"
>
<header class="el-header" style="height: 10px"></header>
<section class="el-container">
<aside class="el-aside" style="width: 20px"></aside>
<section class="el-container is-vertical">
<main class="el-main"></main>
</section>
</section>
</section>
<div class="layout-tips-warp" :class="{ 'layout-tips-warp-active': getThemeConfig.layout === 'classic' }">
<div class="layout-tips-box">
<p class="layout-tips-txt">{{ $t('message.layout.sixClassic') }}</p>
</div>
</div>
</div>
<!-- transverse 布局 -->
<div class="layout-drawer-content-item" @click="onSetLayout('transverse')">
<section
class="el-container is-vertical el-circular"
:class="{ 'drawer-layout-active': getThemeConfig.layout === 'transverse' }"
>
<header class="el-header" style="height: 10px"></header>
<section class="el-container">
<section class="el-container is-vertical">
<main class="el-main"></main>
</section>
</section>
</section>
<div
class="layout-tips-warp"
:class="{ 'layout-tips-warp-active': getThemeConfig.layout === 'transverse' }"
>
<div class="layout-tips-box">
<p class="layout-tips-txt">{{ $t('message.layout.sixTransverse') }}</p>
</div>
</div>
</div>
<!-- columns 布局 -->
<div class="layout-drawer-content-item" @click="onSetLayout('columns')">
<section
class="el-container el-circular"
:class="{ 'drawer-layout-active': getThemeConfig.layout === 'columns' }"
>
<aside class="el-aside-dark" style="width: 10px"></aside>
<aside class="el-aside" style="width: 20px"></aside>
<section class="el-container is-vertical">
<header class="el-header" style="height: 10px"></header>
<main class="el-main"></main>
</section>
</section>
<div class="layout-tips-warp" :class="{ 'layout-tips-warp-active': getThemeConfig.layout === 'columns' }">
<div class="layout-tips-box">
<p class="layout-tips-txt">{{ $t('message.layout.sixColumns') }}</p>
</div>
</div>
</div>
</div>
<div class="copy-config">
<!-- <div class="copy-config">
<el-alert :title="$t('message.layout.tipText')" type="warning" :closable="false"> </el-alert>
<el-button
size="small"
@ -290,7 +297,7 @@
>
{{ $t('message.layout.resetText') }}
</el-button>
</div>
</div> -->
</el-scrollbar>
</el-drawer>
</div>
@ -301,6 +308,7 @@ import ClipboardJS from 'clipboard';
import { Local } from '@/utils/storage.js';
import { useChangeColor } from '@/utils/theme.js';
import config from '../../../../package.json';
import { themeList } from './theme';
export default {
name: 'layoutBreadcrumbSeting',
computed: {
@ -309,6 +317,11 @@ export default {
return this.$store.state.themeConfig.themeConfig;
},
},
data() {
return {
contentPosotion: 'center',
};
},
created() {
// 判断当前布局是否不相同,不相同则初始化当前布局的样式,防止监听窗口大小改变时,布局配置logo、菜单背景等部分布局失效问题
if (!Local.get('frequency')) this.initSetLayoutChange();
@ -321,6 +334,7 @@ export default {
this.$store.state.themeConfig.themeConfig.isCollapse = false;
this.initSetLayoutChange();
});
this.setLocalTheme(this.$store.state.themeConfig.themeConfig.themeStyle);
},
mounted() {
this.initLayoutConfig();
@ -330,7 +344,7 @@ export default {
onColorPickerChange() {
if (!this.getThemeConfig.primary) return;
// 颜色加深
document.documentElement.style.setProperty('--prev-color-primary', this.getThemeConfig.primary);
// document.documentElement.style.setProperty('--prev-color-primary', this.getThemeConfig.primary);
// 颜色变浅
for (let i = 1; i <= 9; i++) {
document.documentElement.style.setProperty(
@ -340,6 +354,87 @@ export default {
}
this.setLocalThemeConfig();
},
setLocalTheme(val) {
let themeSelect = themeList[val];
console.log(this.getThemeConfig.layout);
if (['theme-1', 'theme-3', 'theme-5', 'theme-7'].includes(val)) {
// 这几个为黑色背景主题
if (['classic', 'transverse'].includes(this.getThemeConfig.layout)) {
themeSelect['--prev-bg-topBar'] = '#282c34';
themeSelect['--prev-bg-topBarColor'] = '#fff';
themeSelect['--prev-bg-menuBarColor'] = '#fff';
themeSelect['--prev-MenuActiveColor'] = '#fff';
} else if (this.getThemeConfig.layout === 'columns') {
themeSelect['--prev-bg-topBar'] = '#fff';
themeSelect['--prev-bg-topBarColor'] = '#515a6e';
themeSelect['--prev-bg-menuBar'] = '#fff';
themeSelect['--prev-bg-menuBarColor'] = '#303133';
if (val == 'theme-1') {
themeSelect['--prev-bg-menu-hover-ba-color'] = '#e8f4ff';
themeSelect['--prev-color-primary'] = '#1890ff';
themeSelect['--prev-MenuActiveColor'] = '#1890ff';
} else if (val == 'theme-3') {
themeSelect['--prev-bg-menu-hover-ba-color'] = '#ecf8f3';
themeSelect['--prev-color-primary'] = '#41b584';
themeSelect['--prev-MenuActiveColor'] = '#41b584';
} else if (val == 'theme-5') {
themeSelect['--prev-bg-menu-hover-ba-color'] = '#f0eefe';
themeSelect['--prev-color-primary'] = '#6954f0';
themeSelect['--prev-MenuActiveColor'] = '#6954f0';
} else if (val == 'theme-7') {
themeSelect['--prev-bg-menu-hover-ba-color'] = '#feedeb';
themeSelect['--prev-color-primary'] = '#f34d37';
themeSelect['--prev-MenuActiveColor'] = '#f34d37';
}
} else {
if (val == 'theme-1') {
themeSelect['--prev-bg-menuBar'] = '#282c34';
themeSelect['--prev-bg-menu-hover-ba-color'] = '#1890ff';
themeSelect['--prev-color-primary'] = '#1890ff';
themeSelect['--prev-bg-topBarColor'] = '#282c34';
themeSelect['--prev-bg-topBar'] = '#fff';
themeSelect['--prev-bg-menuBarColor'] = '#fff';
themeSelect['--prev-MenuActiveColor'] = '#fff';
} else if (val == 'theme-3') {
themeSelect['--prev-bg-menuBar'] = '#282c34';
themeSelect['--prev-bg-menu-hover-ba-color'] = '#41b584';
themeSelect['--prev-color-primary'] = '#fff';
themeSelect['--prev-bg-topBar'] = '#fff';
themeSelect['--prev-bg-topBarColor'] = '#282c34';
themeSelect['--prev-bg-menuBarColor'] = '#fff';
themeSelect['--prev-MenuActiveColor'] = '#fff';
} else if (val == 'theme-5') {
themeSelect['--prev-bg-menuBar'] = '#282c34';
themeSelect['--prev-bg-menu-hover-ba-color'] = '#6954f0';
themeSelect['--prev-bg-topBarColor'] = '#282c34';
themeSelect['--prev-color-primary'] = '#fff';
themeSelect['--prev-bg-topBar'] = '#fff';
themeSelect['--prev-bg-menuBarColor'] = '#fff';
themeSelect['--prev-MenuActiveColor'] = '#fff';
} else if (val == 'theme-7') {
themeSelect['--prev-bg-menuBar'] = '#282c34';
themeSelect['--prev-bg-topBar'] = '#fff';
themeSelect['--prev-bg-topBarColor'] = '#282c34';
themeSelect['--prev-bg-menu-hover-ba-color'] = '#f34d37';
themeSelect['--prev-color-primary'] = '#fff';
themeSelect['--prev-bg-menuBarColor'] = '#fff';
themeSelect['--prev-MenuActiveColor'] = '#fff';
}
}
} else {
if (this.getThemeConfig.layout === 'columns') {
if (val == 'theme-4') {
// themeSelect['--prev-bg-menu-hover-ba-color'] = '#ecf8f3';
// themeSelect['--prev-color-primary'] = '#41b584';
}
}
}
for (let key in themeSelect) {
console.log(key, themeSelect[key]);
document.documentElement.style.setProperty(key, themeSelect[key]);
}
},
onMenuBgColorChange() {
if (!this.getThemeConfig.menuBgColor) return;
// 颜色加深
@ -411,33 +506,35 @@ export default {
if (this.$store.state.themeConfig.themeConfig.layout === layout) return false;
this.$store.state.themeConfig.themeConfig.layout = layout;
this.$store.state.themeConfig.themeConfig.isDrawer = false;
this.initSetLayoutChange();
// this.initSetLayoutChange();
this.setLocalTheme(this.$store.state.themeConfig.themeConfig.themeStyle);
},
// 设置布局切换,重置主题样式
initSetLayoutChange() {
console.log(this.$store.state.themeConfig.themeConfig.layout);
if (this.$store.state.themeConfig.themeConfig.layout === 'classic') {
this.onBgColorPickerChange('menuBar', '#282c34');
this.onBgColorPickerChange('menuBarColor', '#ffffff');
this.onBgColorPickerChange('topBar', '#282c34');
this.onBgColorPickerChange('topBarColor', '#ffffff');
} else if (this.$store.state.themeConfig.themeConfig.layout === 'transverse') {
this.onBgColorPickerChange('menuBarColor', '#ffffff');
this.onBgColorPickerChange('topBar', '#282c34');
this.onBgColorPickerChange('topBarColor', '#fff');
// this.onBgColorPickerChange('bgTopBarColor', '#ccc');
} else if (this.$store.state.themeConfig.themeConfig.layout === 'columns') {
this.onBgColorPickerChange('menuBar', '#282c34');
this.onBgColorPickerChange('menuBarColor', '#fff');
this.onBgColorPickerChange('topBar', '#ffffff');
this.onBgColorPickerChange('topBarColor', '#606266');
this.onBgColorPickerChange('columnsMenuBar', '#282c34');
} else {
this.onBgColorPickerChange('menuBar', '#282c34');
this.onBgColorPickerChange('menuBarColor', '#ffffff');
this.onBgColorPickerChange('topBar', '#ffffff');
this.onBgColorPickerChange('topBarColor', '#606266');
}
// if (this.$store.state.themeConfig.themeConfig.layout === 'classic') {
// this.onBgColorPickerChange('menuBar', '#282c34');
// this.onBgColorPickerChange('menuBarColor', '#ffffff');
// this.onBgColorPickerChange('topBar', '#282c34');
// this.onBgColorPickerChange('topBarColor', '#ffffff');
// } else if (this.$store.state.themeConfig.themeConfig.layout === 'transverse') {
// this.onBgColorPickerChange('menuBarColor', '#ffffff');
// this.onBgColorPickerChange('topBar', '#282c34');
// this.onBgColorPickerChange('topBarColor', '#fff');
// // this.onBgColorPickerChange('bgTopBarColor', '#ccc');
// } else if (this.$store.state.themeConfig.themeConfig.layout === 'columns') {
// this.onBgColorPickerChange('menuBar', '#282c34');
// this.onBgColorPickerChange('menuBarColor', '#fff');
// this.onBgColorPickerChange('topBar', '#ffffff');
// this.onBgColorPickerChange('topBarColor', '#606266');
// this.onBgColorPickerChange('columnsMenuBar', '#282c34');
// } else {
// this.onBgColorPickerChange('menuBar', '#282c34');
// this.onBgColorPickerChange('menuBarColor', '#ffffff');
// this.onBgColorPickerChange('topBar', '#ffffff');
// this.onBgColorPickerChange('topBarColor', '#606266');
// }
},
// 菜单 / 顶栏背景等
onBgColorPickerChange(bg, rgb) {
@ -470,6 +567,15 @@ export default {
</script>
<style scoped lang="scss">
.w10 {
width: 10px;
}
.mr5 {
margin-right: 5px;
}
/deep/ .el-radio-button--mini .el-radio-button__inner {
padding: 7px 8px;
}
.layout-breadcrumb-seting-bar {
height: calc(100vh - 50px);
padding: 0 15px;
@ -488,27 +594,49 @@ export default {
overflow: hidden;
display: flex;
flex-wrap: wrap;
align-content: flex-start;
align-content: center;
justify-content: center;
margin: 0 -5px;
.layout-drawer-content-item.drawer-layout-active {
border: 1px solid;
border-color: #2d8cf0;
}
.layout-drawer-content-item:hover {
transition: all 0.3s ease-in-out;
border: 1px solid;
border-color: #2d8cf0;
}
.layout-drawer-content-item {
width: 50%;
width: 107px;
height: 70px;
cursor: pointer;
border: 1px solid transparent;
border: 1px solid rgba(0, 0, 0, 0);
position: relative;
padding: 5px;
padding: 6px;
background: #ffffff;
box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.08);
border-radius: 6px;
opacity: 1;
margin: 10px;
.el-container {
height: 100%;
.el-aside-dark {
background-color: var(--prev-color-seting-header);
border-radius: 2px;
}
.el-aside {
background-color: var(--prev-color-seting-aside);
background-color: var(--prev-tag-active-color);
border-radius: 2px;
}
.el-header {
border-radius: 2px;
background-color: var(--prev-color-seting-header);
}
.el-main {
border-radius: 2px;
border: 1px dashed #2d8cf0;
padding: 0;
background-color: var(--prev-color-seting-main);
}
}
@ -518,10 +646,7 @@ export default {
border: 1px solid transparent;
transition: all 0.3s ease-in-out;
}
.drawer-layout-active {
border: 1px solid;
border-color: var(--prev-color-primary);
}
.layout-tips-warp,
.layout-tips-warp-active {
transition: all 0.3s ease-in-out;
@ -573,11 +698,6 @@ export default {
}
}
&:hover {
.el-circular {
transition: all 0.3s ease-in-out;
border: 1px solid;
border-color: var(--prev-color-primary);
}
.layout-tips-warp {
transition: all 0.3s ease-in-out;
border-color: var(--prev-color-primary);

View File

@ -0,0 +1,140 @@
export const themeList = {
'theme-1': {
'--prev-bg-menuBar': '#282c34',
'--prev-bg-menuBarColor': '#fff',
'--prev-color-primary': '#1890ff',
'--prev-color-text-white': '#fff',
'--prev-bg-menu-hover-ba-color': '#1890ff',
'--prev-bg-topBar': '#fff', //顶部菜单栏颜色
'--prev-bg-topBarColor': '#282c34',
'--prev-bg-columnsMenuBar': '#282c34',
'--prev-bg-columnsMenuBarColor': '#fff',
'--prev-MenuActiveColor': '#1890ff',
'--prev-tag-active-color': '#1890ff',
'--prev-color-primary-light-9': '#e8f4ff',
'--prev-bg-columnsMenuActiveColor': '#fff',
},
'theme-2': {
'--prev-bg-menuBar': '#ffffff',
'--prev-bg-menuBarColor': '#515a6e',
'--prev-color-primary': '#1890ff',
'--prev-color-text-white': '#fff',
'--prev-bg-menu-hover-ba-color': '#e8f4ff',
'--prev-bg-topBar': '#ffffff',
'--prev-bg-topBarColor': '#515a6e',
'--prev-bg-columnsMenuBar': '#fff',
'--prev-bg-columnsMenuBarColor': '#515a6e',
'--prev-bg-columnsMenuActiveColor': '#fff',
'--prev-MenuActiveColor': '#1890ff',
'--prev-bg-columnsMenuActiveBgColor': '#1890ff',
'--prev-tag-active-color': '#1890ff',
'--prev-color-primary-light-9': '#e8f4ff',
},
'theme-3': {
'--prev-bg-menuBar': '#282c34',
'--prev-bg-menuBarColor': '#fff',
'--prev-color-primary': '#41b584',
'--prev-color-text-white': '#fff',
'--prev-bg-menu-hover-ba-color': '#41b584', // 菜单选中背景色
'--prev-bg-topBar': '#fff', //顶部菜单栏颜色
'--prev-bg-topBarColor': '#282c34',
'--prev-bg-columnsMenuBar': '#282c34',
'--prev-bg-columnsMenuBarColor': '#fff',
'--prev-bg-columnsMenuActiveColor': '#fff',
'--prev-MenuActiveColor': '#41b584',
'--prev-color-primary-light-9': '#ecf8f3',
'--prev-tag-active-color': '#41b584',
'--prev-color-primary-light-9': '#ecf8f3',
},
'theme-4': {
'--prev-bg-menuBar': '#ffffff',
'--prev-bg-menuBarColor': '#515a6e',
'--prev-color-primary': '#41b584',
'--prev-color-text-white': '#fff',
'--prev-bg-menu-hover-ba-color': '#ecf8f3',
'--prev-bg-topBar': '#ffffff',
'--prev-bg-topBarColor': '#515a6e',
'--prev-bg-columnsMenuBar': '#fff',
'--prev-bg-columnsMenuBarColor': '#515a6e',
'--prev-bg-columnsMenuActiveColor': '#fff',
'--prev-MenuActiveColor': '#41b584',
'--prev-tag-active-color': '#41b584',
'--prev-color-primary-light-9': '#ecf8f3',
},
'theme-5': {
'--prev-bg-menuBar': '#282c34',
'--prev-bg-menuBarColor': '#fff',
'--prev-color-primary': '#6954f0',
'--prev-color-text-white': '#fff',
'--prev-bg-menu-hover-ba-color': '#6954f0', // 菜单选中背景色
'--prev-bg-topBar': '#fff', //顶部菜单栏颜色
'--prev-bg-topBarColor': '#282c34',
'--prev-bg-columnsMenuBar': '#282c34',
'--prev-bg-columnsMenuBarColor': '#fff',
'--prev-bg-columnsMenuActiveColor': '#fff',
'--prev-MenuActiveColor': '#6954f0',
'--prev-color-primary-light-9': '#f0eefe',
'--prev-tag-active-color': '#6954f0',
},
'theme-6': {
'--prev-bg-menuBar': '#ffffff',
'--prev-bg-menuBarColor': '#515a6e',
'--prev-color-primary': '#6954f0',
'--prev-color-text-white': '#fff',
'--prev-bg-menu-hover-ba-color': '#e8f4ff',
'--prev-bg-topBar': '#ffffff',
'--prev-bg-topBarColor': '#515a6e',
'--prev-bg-columnsMenuBar': '#fff',
'--prev-bg-columnsMenuBarColor': '#515a6e',
'--prev-bg-columnsMenuActiveColor': '#fff',
'--prev-MenuActiveColor': '#6954f0',
'--prev-color-primary-light-9': '#f0eefe',
'--prev-tag-active-color': '#6954f0',
},
'theme-7': {
'--prev-bg-menuBar': '#282c34',
'--prev-bg-menuBarColor': '#fff',
'--prev-color-primary': '#f34d37',
'--prev-color-text-white': '#fff',
'--prev-bg-menu-hover-ba-color': '#f34d37', // 菜单选中背景色
'--prev-bg-topBar': '#fff', //顶部菜单栏颜色
'--prev-bg-topBarColor': '#282c34',
'--prev-bg-columnsMenuBar': '#282c34',
'--prev-bg-columnsMenuBarColor': '#fff',
'--prev-bg-columnsMenuActiveColor': '#fff',
'--prev-MenuActiveColor': '#f34d37',
'--prev-tag-active-color': '#f34d37',
},
'theme-8': {
'--prev-bg-menuBar': '#ffffff',
'--prev-bg-menuBarColor': '#515a6e',
'--prev-color-primary': '#f34d37',
'--prev-color-text-white': '#fff',
'--prev-bg-menu-hover-ba-color': '#feedeb',
'--prev-bg-topBar': '#ffffff',
'--prev-bg-topBarColor': '#515a6e',
'--prev-bg-columnsMenuBar': '#fff',
'--prev-bg-columnsMenuBarColor': '#515a6e',
'--prev-bg-columnsMenuActiveColor': '#fff',
'--prev-color-primary-light-9': '#feedeb',
'--prev-MenuActiveColor': '#f34d37',
'--prev-tag-active-color': '#f34d37',
},
'theme-9': {
'--prev-bg-menuBar': '#ffffff',
'--prev-bg-menuBarColor': '#515a6e',
'--prev-color-primary': '#1890ff',
'--prev-color-text-white': '#fff',
'--prev-bg-menu-hover-ba-color': '#e8f4ff',
'--prev-bg-topBar': '#ffffff',
'--prev-bg-topBarColor': '#515a6e',
'--prev-bg-columnsMenuBar': 'linear-gradient(90deg,#006cff,#399efd)',
'--prev-bg-columnsMenuBarColor': '#fff',
'--prev-bg-columnsMenuActiveColor': '#fff',
'--prev-tag-active-color': '#1890ff',
'--prev-MenuActiveColor': '#1890ff',
'--prev-color-primary-light-9': '#e8f4ff',
},
};

View File

@ -47,9 +47,8 @@
</div>
<div class="layout-navbars-breadcrumb-user-icon mr10" @click="onScreenfullClick">
<i
class="iconfont"
:title="isScreenfull ? $t('message.user.title6') : $t('message.user.title5')"
:class="!isScreenfull ? 'icon-fullscreen' : 'icon-tuichuquanping'"
:class="!isScreenfull ? 'el-icon-full-screen' : 'el-icon-crop'"
></i>
</div>
<el-dropdown :show-timeout="70" :hide-timeout="50" @command="onDropdownCommand">
@ -198,22 +197,18 @@ export default {
if (action === 'confirm') {
instance.confirmButtonLoading = true;
instance.confirmButtonText = this.$t('message.user.logOutExit');
setTimeout(() => {
AccountLogout().then((res) => {
this.$Message.success('您已成功退出');
this.$router.replace({ path: `${settings.routePre}/login` });
removeCookies('token');
removeCookies('expires_time');
removeCookies('uuid');
// window.location.reload()
setTimeout(() => {
done();
setTimeout(() => {
instance.confirmButtonLoading = false;
}, 300);
}, 3000);
});
}, 700);
AccountLogout().then((res) => {
this.$Message.success('您已成功退出');
this.$router.replace({ path: `${settings.routePre}/login` });
removeCookies('token');
removeCookies('expires_time');
removeCookies('uuid');
// window.location.reload()
done();
setTimeout(() => {
instance.confirmButtonLoading = false;
}, 300);
});
} else {
done();
}

View File

@ -1,34 +1,35 @@
<template>
<div class="layout-navbars-container">
<BreadcrumbIndex />
<TagsView v-if="setShowTagsView" />
</div>
<div class="layout-navbars-container">
<BreadcrumbIndex />
<TagsView v-if="setShowTagsView" />
</div>
</template>
<script>
import BreadcrumbIndex from '@/layout/navBars/breadcrumb/index.vue';
import TagsView from '@/layout/navBars/tagsView/tagsView.vue';
export default {
name: 'layoutNavBars',
components: { BreadcrumbIndex, TagsView },
data() {
return {};
},
computed: {
// 设置是否显示 tagsView
setShowTagsView() {
let { layout, isTagsview } = this.$store.state.themeConfig.themeConfig;
return layout !== 'classic' && isTagsview;
},
},
name: 'layoutNavBars',
components: { BreadcrumbIndex, TagsView },
data() {
return {};
},
computed: {
// 设置是否显示 tagsView
setShowTagsView() {
let { layout, isTagsview } = this.$store.state.themeConfig.themeConfig;
return layout !== 'classic' && isTagsview;
},
},
};
</script>
<style scoped lang="scss">
.layout-navbars-container {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
}
</style>

View File

@ -363,7 +363,7 @@ export default {
right: 0;
bottom: 0;
left: 0;
background: var(--prev-color-primary);
background: var(--prev-tag-active-color);
z-index: -1;
opacity: 0;
transform: scale3d(0.7, 1, 1);
@ -371,7 +371,7 @@ export default {
transition-timing-function: cubic-bezier(0.2, 1, 0.3, 1);
}
&:hover {
color: var(--prev-color-text-white);
color: var(--prev-color-primary-light-9);
transition: all 0.3s cubic-bezier(0.2, 1, 0.3, 1);
border-color: transparent;
&::before {
@ -380,7 +380,8 @@ export default {
border-radius: 2px;
}
.is-tagsview-icon {
color: var(--prev-color-text-white);
color: var(--prev-color-primary-light-9);
transition: all 0.3s cubic-bezier(0.2, 1, 0.3, 1);
}
}
@ -388,7 +389,7 @@ export default {
position: relative;
left: -5px;
top: 1px;
color: var(--prev-color-text-white);
color: var(--prev-color-primary-light-9);
}
&-icon {
border-radius: 100%;
@ -405,7 +406,7 @@ export default {
}
}
.is-active {
color: var(--prev-color-text-white);
color: var(--prev-color-primary-light-9);
transition: all 0.3s cubic-bezier(0.2, 1, 0.3, 1);
border-color: transparent;
&::before {
@ -444,7 +445,7 @@ export default {
}
.is-active {
background: none !important;
color: #fff !important;
color: var(--prev-bg-menu-hover-ba-color) !important;
}
}
// 风格5
@ -481,7 +482,7 @@ export default {
.is-active {
@extend .tags-style-five-svg;
background: var(--prev-color-primary-light-9) !important;
color: var(--prev-color-primary) !important;
color: var(--prev-tag-active-color) !important;
z-index: 1;
}
}

View File

@ -10,14 +10,24 @@
<template v-for="val in menuList">
<el-submenu :index="val.path" v-if="val.children && val.children.length > 0" :key="val.path">
<template slot="title">
<Icon class="mr10" :type="val.icon ? val.icon : ''" />
<Icon
:class="
['defaults', 'classic'].includes(getThemeConfig.layout) && getThemeConfig.isCollapse ? 'center' : 'mr10'
"
:type="val.icon ? val.icon : ''"
/>
<span>{{ $t(val.title) }}</span>
</template>
<SubItem :chil="val.children" />
</el-submenu>
<template v-else>
<el-menu-item :index="val.path" :key="val.path">
<Icon class="mr10" :type="val.icon ? val.icon : ''" />
<Icon
:class="
['defaults', 'classic'].includes(getThemeConfig.layout) && getThemeConfig.isCollapse ? 'center' : 'mr10'
"
:type="val.icon ? val.icon : ''"
/>
<template slot="title" v-if="!val.isLink || (val.isLink && val.isIframe)">
<span>{{ $t(val.title) }}</span>
</template>
@ -74,3 +84,10 @@ export default {
},
};
</script>
<style scoped>
/deep/ .center {
text-align: center;
margin-right: 0 !important;
margin-left: 5px;
}
</style>

View File

@ -1,50 +1,48 @@
<template>
<div class="h100">
<transition :name="setTransitionName" mode="out-in">
<keep-alive :include="keepAliveNameList">
<router-view :key="refreshRouterViewKey" />
</keep-alive>
</transition>
</div>
<div class="h100">
<transition :name="setTransitionName" mode="out-in">
<keep-alive :include="keepAliveNameList">
<router-view :key="refreshRouterViewKey" />
</keep-alive>
</transition>
</div>
</template>
<script>
export default {
name: 'parent',
data() {
return {
refreshRouterViewKey: null,
keepAliveNameList: [],
keepAliveNameNewList: [],
};
},
created() {
// debugger
// 页面加载前,处理缓存,页面刷新时路由缓存处理
this.keepAliveNameList = this.getKeepAliveNames();
console.log(this.keepAliveNameList,'this.keepAliveNameList')
this.bus.$on('onTagsViewRefreshRouterView', (path) => {
console.log(path)
if (this.$route.path !== path) return false;
this.keepAliveNameList = this.getKeepAliveNames().filter((name) => this.$route.name !== name);
this.refreshRouterViewKey = this.$route.path;
this.$nextTick(() => {
this.refreshRouterViewKey = null;
this.keepAliveNameList = this.getKeepAliveNames();
});
});
},
computed: {
// 设置主界面切换动画
setTransitionName() {
return this.$store.state.themeConfig.themeConfig.animation;
},
},
methods: {
// 获取路由缓存列表(name),默认路由全部缓存
getKeepAliveNames() {
return this.$store.state.keepAliveNames.keepAliveNames;
},
},
name: 'parent',
data() {
return {
refreshRouterViewKey: null,
keepAliveNameList: [],
keepAliveNameNewList: [],
};
},
computed: {},
created() {
this.keepAliveNameList = this.getKeepAliveNames();
this.bus.$on('onTagsViewRefreshRouterView', (path) => {
console.log(path);
if (this.$route.path !== path) return false;
this.keepAliveNameList = this.getKeepAliveNames().filter((name) => this.$route.name !== name);
this.refreshRouterViewKey = this.$route.path;
this.$nextTick(() => {
this.refreshRouterViewKey = null;
this.keepAliveNameList = this.getKeepAliveNames();
});
});
},
computed: {
// 设置主界面切换动画
setTransitionName() {
return this.$store.state.themeConfig.themeConfig.animation;
},
},
methods: {
// 获取路由缓存列表(name),默认路由全部缓存
getKeepAliveNames() {
return this.$store.state.keepAliveNames.keepAliveNames;
},
},
};
</script>

View File

@ -211,7 +211,8 @@ export default {
this.$store.commit('menus/setopenMenus', []);
this.$store.commit('menus/getmenusNav', data.menus);
this.$store.dispatch('routesList/setRoutesList', data.menus);
let arr = this.formatFlatteningRoutes(this.$router.options.routes);
this.formatTwoStageRoutes(arr);
// 记录用户信息
this.$store.commit('userInfo/name', data.user_info.account);
this.$store.commit('userInfo/avatar', data.user_info.head_pic);
@ -257,15 +258,17 @@ export default {
},
formatTwoStageRoutes(arr) {
if (arr.length <= 0) return false;
console.log(arr, 'arr');
const newArr = [];
const cacheList = [];
arr.forEach((v) => {
if (v?.meta?.keepAlive) {
if (v && v.meta && v.meta.keepAlive) {
newArr.push({ ...v });
cacheList.push(v.name);
this.$store.dispatch('keepAliveNames/setCacheKeepAlive', cacheList);
}
});
console.log(newArr, 'newArr');
return newArr;
},
// 多级嵌套数组处理成一维数组

View File

@ -101,7 +101,7 @@ import relationList from './relation';
import { formatDate } from '@/utils/validate';
import goodsList from '@/components/goodsList/index';
export default {
name: 'addArticle',
name: 'cms_article',
data() {
return {
modalTitleSs: '',

View File

@ -27,6 +27,11 @@
<Card :bordered="false" dis-hover class="ivu-mt">
<Row class="ivu-mt box-wrapper">
<Col :xs="24" :sm="24" ref="rightBox">
<Row type="flex">
<Col v-bind="grid">
<Button type="primary" @click="groupAdd('0')" class="mr20">添加代理商</Button>
</Col>
</Row>
<Table
:columns="columns"
:data="userLists"
@ -179,11 +184,6 @@ export default {
slot: 'division_percent',
minWidth: 100,
},
{
title: '订单数量',
key: 'order_count',
minWidth: 100,
},
],
columns: [
{

View File

@ -179,24 +179,19 @@ export default {
slot: 'nickname',
minWidth: 150,
},
{
title: '邀请码',
key: 'division_invite',
minWidth: 150,
},
{
title: '分销比例',
slot: 'division_percent',
minWidth: 100,
},
{
title: '用户数量',
key: 'user_count',
minWidth: 100,
title: '到期时间',
key: 'division_end_time',
minWidth: 150,
},
{
title: '订单数量',
key: 'order_count',
title: '员工数量',
key: 'agent_count',
minWidth: 100,
},
],

View File

@ -548,7 +548,9 @@ a:link, a:visited, a:hover, a:active {
background-position: left top !important;
display: flex;
}
.wrapper-box .foot-box {
text-align: center !important;
}
.content {
display: none;
}

View File

@ -174,7 +174,7 @@ import {
import { scrollTop } from '@/libs/util';
export default {
name: 'index',
name: 'marketing_channel_code',
filters: {
typeFilter(status) {
const statusMap = {

View File

@ -24,7 +24,7 @@
<div class="box">
<div class="box-item" v-for="(item, index) in goodsList" :key="index">
<img :src="item.image" alt="" />
<Icon type="ios-close-circle" size="20" @click="bindDelete(index,item)" />
<Icon type="ios-close-circle" size="20" @click="bindDelete(index, item)" />
</div>
<div class="upload-box" @click="selectGoods">
<Icon type="ios-camera-outline" size="36" />
@ -155,7 +155,7 @@ export default {
this.selectIds = this.goodsList.map((i) => {
return i.product_id;
});
console.log(this.selectIds,this.goodsList)
console.log(this.selectIds, this.goodsList);
},
// 生成直播商品
liveGoods() {
@ -182,17 +182,21 @@ export default {
}, 300);
});
},
bindDelete(index,item) {
bindDelete(index, item) {
this.goodsList.splice(index, 1);
if (this.tabList.length) {
let i = this.tabList.findIndex((e) => e.id == item.product_id);
this.tabList.splice(i, 1);
let i = this.tabList.findIndex((e) => e.id == item.product_id);
this.tabList.splice(i, 1);
if (!this.goodsList.length) {
this.isShowBox = false;
}
},
del(row, index) {
this.tabList.splice(index, 1);
let i = this.goodsList.findIndex((e) => e.product_id == row.id);
this.goodsList.splice(i, 1);
if (!this.tabList.length) {
this.isShowBox = false;
}
},
// 提交
bindSub() {

View File

@ -66,7 +66,7 @@
</Col>
<Col span="24">
<div style="display: flex">
<FormItem label="分享图:">
<FormItem label="分享图:" prop="name">
<div @click="modalPicTap(1)" class="box">
<img :src="formValidate.share_img" alt="" v-if="formValidate.share_img" />
<div class="upload-box" v-else>

View File

@ -112,7 +112,7 @@ import { bargainListApi, bargainSetStatusApi, stroeBargainApi } from '@/api/mark
import { formatDate } from '@/utils/validate';
import { exportBargainList } from '@/api/export';
export default {
name: 'storeBargain',
name: 'marketing_storeBargain',
filters: {
formatDate(time) {
if (time !== 0) {

View File

@ -26,8 +26,7 @@
<Row type="flex" :gutter="24">
<Col span="6" v-if="type == 1">
<FormItem label="订单状态:" label-for="status">
<Select v-model="pagination.status" placeholder="请选择订单状态">
<Option value="">全部</Option>
<Select v-model="pagination.status" placeholder="请选择订单状态" clearable @on-change="searchList">
<Option value="0">未支付</Option>
<Option value="1">待发货</Option>
<Option value="2">待收货</Option>
@ -42,7 +41,7 @@
search
enter-button
v-model="pagination.real_name"
placeholder="请输入用户姓名|手机号|UID"
:placeholder="type == 1 ? '请输入用户姓名|订单号|UID' : '请输入用户UID'"
@on-search="searchList"
/>
</FormItem>

View File

@ -114,7 +114,7 @@ import { formatDate } from '@/utils/validate';
import { exportCombinationList } from '@/api/export.js';
export default {
name: 'index',
name: 'marketing_combinalist',
filters: {
formatDate(time) {
if (time !== 0) {

View File

@ -26,8 +26,7 @@
<Row type="flex" :gutter="24">
<Col span="6" v-if="type == 1">
<FormItem label="订单状态:" label-for="status">
<Select v-model="pagination.status" placeholder="请选择订单状态">
<Option value="">全部</Option>
<Select v-model="pagination.status" placeholder="请选择订单状态" clearable @on-change="searchList">
<Option value="0">未支付</Option>
<Option value="1">待发货</Option>
<Option value="2">待收货</Option>

View File

@ -28,7 +28,9 @@
<Radio :label="3">后台赠送</Radio>
<Radio :label="4">付费会员专享</Radio>
</RadioGroup>
<div class="tip">手动领取:用户需要手动领取优惠券;新用户自动发放:新注册的用户自动发放;后台赠送:后台发放制定用户或者添加到商品里面用户购买该商品获得;付费会员专享:仅付费会员可以领取和使用</div>
<div class="tip">
手动领取:用户需要手动领取优惠券;新用户自动发放:新注册的用户自动发放;后台赠送:后台发放制定用户或者添加到商品里面用户购买该商品获得;付费会员专享:仅付费会员可以领取和使用
</div>
</FormItem>
<FormItem label="优惠劵类型">
<RadioGroup v-model="formData.type">
@ -49,9 +51,17 @@
<div class="info">选择商品</div>
</FormItem>
<FormItem v-show="formData.type === 1">
<Select v-model="formData.category_id" style="width: 320px" multiple>
<!-- <Select v-model="formData.category_id" style="width: 320px" multiple>
<Option v-for="item in categoryList" :value="item.id" :key="item.id">{{ item.cate_name }}</Option>
</Select>
</Select> -->
<el-cascader
v-model="formData.category_id"
size="small"
:options="categoryList"
:props="{ multiple: true, emitPath: false }"
clearable
style="width: 320px"
></el-cascader>
<div class="info">选择商品的品类</div>
</FormItem>
<FormItem label="使用门槛">
@ -152,6 +162,7 @@
import { mapState } from 'vuex';
import goodsList from '@/components/goodsList/index';
import { couponCategoryApi, couponSaveApi, couponDetailApi } from '@/api/marketing';
import { cascaderListApi } from '@/api/product';
export default {
name: 'storeCouponCreate',
components: {
@ -201,10 +212,7 @@ export default {
methods: {
// 品类
getCategoryList() {
couponCategoryApi(1).then(async (res) => {
res.data.forEach((val) => {
val.cate_name = `${val.html}${val.cate_name}`;
});
cascaderListApi(1).then(async (res) => {
this.categoryList = res.data;
});
},

View File

@ -157,7 +157,7 @@ import {
} from '@/api/marketing';
import { formatDate } from '@/utils/validate';
export default {
name: 'storeCouponIssue',
name: 'marketing_storeCouponIssue',
filters: {
formatDate(time) {
if (time !== 0) {

View File

@ -131,7 +131,7 @@ import { mapState } from 'vuex';
import { integralProductListApi, integralIsShowApi, storeSeckillApi } from '@/api/marketing';
import { formatDate } from '@/utils/validate';
export default {
name: 'storeIntegral',
name: 'marketing_storeIntegral',
filters: {
formatDate(time) {
if (time !== 0) {

View File

@ -8,7 +8,7 @@
<Radio label="3">虚拟</Radio>
</RadioGroup>
</FormItem>
<FormItem v-show="formItem.type === '1' && export_open" label="发货类型:">
<FormItem v-show="formItem.type == '1' && export_open" label="发货类型:">
<RadioGroup v-model="formItem.express_record_type" @on-change="changeExpress">
<Radio label="1">手动填写</Radio>
<Radio label="2">电子面单打印</Radio>
@ -142,7 +142,7 @@ export default {
// ]
// },
temp: {},
export_open: true,
export_open: false,
};
},
methods: {

View File

@ -100,7 +100,7 @@ import { formatDate } from '@/utils/validate';
import { exportSeckillList } from '@/api/export.js';
export default {
name: 'storeSeckill',
name: 'marketing_storeSeckill',
filters: {
formatDate(time) {
if (time !== 0) {

View File

@ -8,8 +8,8 @@
<Col span="12">收货人:{{ orderDatalist.orderInfo.real_name }}</Col>
</Row>
<Row class="mb10">
<Col span="12">联系电话:{{ orderDatalist.orderInfo.user_phone }}</Col>
<Col span="12">收货地址:{{ orderDatalist.orderInfo.user_address }}</Col>
<Col span="12">联系电话:{{ orderDatalist.orderInfo.user_phone || '' }}</Col>
<Col span="12">收货地址:{{ orderDatalist.orderInfo.user_address || '' }}</Col>
</Row>
<Divider style="margin: 20px 0 !important" />
<div class="ivu-description-list-title">订单信息</div>
@ -18,7 +18,7 @@
<Col span="12" class="fontColor1"
>订单状态:{{ orderDatalist.orderInfo._status._title }}
{{
orderDatalist.orderInfo.refund.length
orderDatalist.orderInfo.refund && orderDatalist.orderInfo.refund.length
? orderDatalist.orderInfo.is_all_refund
? '退款中'
: '部分退款中'

View File

@ -567,15 +567,17 @@ export default {
getData(id) {
getDataInfoNew(id)
.then(async (res) => {
this.$refs.detailss.modals = true;
this.orderDatalist = res.data;
if (this.orderDatalist.orderInfo.refund_img) {
if (this.orderDatalist.orderInfo.refund_img.length) {
try {
this.orderDatalist.orderInfo.refund_img = JSON.parse(this.orderDatalist.orderInfo.refund_img);
} catch (e) {
this.orderDatalist.orderInfo.refund_img = [];
}
}
this.$nextTick((e) => {
this.$refs.detailss.modals = true;
});
})
.catch((res) => {
this.$Message.error(res.msg);
@ -668,7 +670,7 @@ export default {
position: relative;
}
.ivu-form-item{
}
.QRpic {
width: 180px;

View File

@ -1,7 +1,7 @@
<template>
<div class="" id="shopp-manager">
<div class="i-layout-page-header header-title">
<div class=" fl_header">
<div class="fl_header">
<router-link :to="{ path: $routeProStr + '/product/product_list' }"
><Button icon="ios-arrow-back" size="small" type="text">返回</Button></router-link
>
@ -46,11 +46,20 @@
</Col>
<Col span="24">
<FormItem label="商品分类:" prop="cate_id">
<!-- {{ formValidate.cate_id }}
<Select v-model="formValidate.cate_id" placeholder="请选择商品分类" multiple class="perW20">
<Option v-for="item in treeSelect" :disabled="item.pid === 0" :value="item.id" :key="item.id">{{
item.html + item.cate_name
}}</Option>
</Select>
{{ formValidate.cate_id }} -->
<el-cascader
v-model="formValidate.cate_id"
size="small"
:options="treeSelect"
:props="{ multiple: true, emitPath: false }"
clearable
></el-cascader>
<span class="addfont" @click="addCate">新增分类</span>
</FormItem>
</Col>
@ -1331,7 +1340,7 @@ import WangEditor from '@/components/wangEditor/index.vue';
import { userLabelAddApi } from '@/api/user';
import {
productInfoApi,
treeListApi,
cascaderListApi,
productAddApi,
generateAttrApi,
productGetRuleApi,
@ -2600,7 +2609,7 @@ export default {
},
// 商品分类;
goodsCategory() {
treeListApi(1)
cascaderListApi(1)
.then((res) => {
this.treeSelect = res.data;
})

View File

@ -6,9 +6,7 @@
<Col v-bind="grid">
<FormItem label="商品分类:" prop="pid" label-for="pid">
<Select v-model="artFrom.pid" placeholder="请选择商品分类" @on-change="userSearchs" clearable>
<Option v-for="item in treeSelect" :value="item.id" :key="item.id">{{
item.html + item.cate_name
}}</Option>
<Option v-for="item in treeSelect" :value="item.id" :key="item.id">{{ item.cate_name }}</Option>
</Select>
</FormItem>
</Col>

View File

@ -13,11 +13,18 @@
<Row type="flex" :gutter="24">
<Col v-bind="grid">
<FormItem label="商品分类:" label-for="pid">
<Select v-model="artFrom.cate_id" placeholder="请选择商品分类" clearable @on-change="userSearchs">
<!-- <Select v-model="artFrom.cate_id" placeholder="请选择商品分类" clearable @on-change="userSearchs">
<Option v-for="item in treeSelect" :value="item.id" :key="item.id">{{
item.html + item.cate_name
}}</Option>
</Select>
</Select> -->
<el-cascader
v-model="artFrom.cate_id"
size="small"
:options="treeSelect"
:props="{ emitPath: false }"
clearable
></el-cascader>
</FormItem>
</Col>
<Col v-bind="grid">
@ -165,11 +172,18 @@
<Col span="24" v-if="batchType == 1">
<Divider orientation="left">基础设置</Divider>
<FormItem label="商品分类:" prop="cate_id">
<Select v-model="batchFormData.cate_id" placeholder="请选择商品分类" multiple class="perW20">
<!-- <Select v-model="batchFormData.cate_id" placeholder="请选择商品分类" multiple class="perW20">
<Option v-for="item in treeSelect" :disabled="item.pid === 0" :value="item.id" :key="item.id">{{
item.html + item.cate_name
}}</Option>
</Select>
</Select> -->
<el-cascader
v-model="batchFormData.cate_id"
size="small"
:options="treeSelect"
:props="{ emitPath: false }"
clearable
></el-cascader>
</FormItem>
</Col>
<Col span="24" v-if="batchType == 2">
@ -277,7 +291,7 @@ import {
getGoodHeade,
getGoods,
PostgoodsIsShow,
treeListApi, // 分类列表
cascaderListApi, // 分类列表
productShowApi,
productUnshowApi,
storeProductApi,
@ -428,7 +442,7 @@ export default {
},
watch: {
$route() {
if (this.$route.fullPath === (this.$routeProStr + '/product/product_list?type=5')) {
if (this.$route.fullPath === this.$routeProStr + '/product/product_list?type=5') {
this.getPath();
}
},
@ -437,7 +451,7 @@ export default {
activated() {
this.goodHeade();
this.goodsCategory();
if (this.$route.fullPath === (this.$routeProStr + '/product/product_list?type=5')) {
if (this.$route.fullPath === this.$routeProStr + '/product/product_list?type=5') {
this.getPath();
} else {
this.getDataList();
@ -746,7 +760,7 @@ export default {
},
// 商品分类;
goodsCategory() {
treeListApi(1)
cascaderListApi(1)
.then((res) => {
this.treeSelect = res.data;
})

View File

@ -60,11 +60,18 @@
</Col>
<Col span="24">
<FormItem label="商品分类:" prop="cate_id">
<Select v-model="formValidate.cate_id" multiple>
<!-- <Select v-model="formValidate.cate_id" multiple>
<Option v-for="item in treeSelect" :disabled="item.pid === 0" :value="item.id" :key="item.id">{{
item.html + item.cate_name
}}</Option>
</Select>
</Select> -->
<el-cascader
v-model="formValidate.cate_id"
size="small"
:options="treeSelect"
:props="{ multiple: true, emitPath: false }"
clearable
></el-cascader>
</FormItem>
</Col>
<Col v-bind="grid">
@ -264,7 +271,7 @@
</template>
<script>
import { crawlFromApi, treeListApi, crawlSaveApi, productGetTemplateApi, copyConfigApi } from '@/api/product';
import { crawlFromApi, cascaderListApi, crawlSaveApi, productGetTemplateApi, copyConfigApi } from '@/api/product';
import uploadPictures from '@/components/uploadPictures';
import WangEditor from '@/components/wangEditor/index.vue';
@ -539,7 +546,7 @@ export default {
},
// 商品分类;
goodsCategory() {
treeListApi(1)
cascaderListApi(1)
.then((res) => {
this.treeSelect = res.data;
})

View File

@ -28,7 +28,7 @@ export default {
classList: [
{ image: require('@/assets/images/sort01.jpg'), name: '样式1' },
{ image: require('@/assets/images/sort02.jpg'), name: '样式2' },
{ image: require('@/assets/images/sort03.jpg'), name: '样式3' },
{ image: require('@/assets/images/sort03.png'), name: '样式3' },
],
activeStyle: '-1',
};

View File

@ -1048,6 +1048,9 @@ export default {
});
this.userFrom.label_id = activeIds.join(',');
}
if (this.ids.length) {
this.userFrom.ids = this.ids;
}
this.userFrom.user_type = this.userFrom.user_type || '';
this.userFrom.status = this.userFrom.status || '';
this.userFrom.sex = this.userFrom.sex || '';
@ -1335,14 +1338,15 @@ img {
color: #808695;
}
}
.demo-drawer-footer{
width: 100%;
position: absolute;
bottom: 0;
left: 0;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
background: #fff;
}
.demo-drawer-footer {
width: 100%;
position: absolute;
bottom: 0;
left: 0;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
background: #fff;
}
</style>

View File

@ -38,6 +38,7 @@ export default {
state.openMenus = openList;
},
childMenuList(state, list) {
console.log('bbbbb')
state.childMenuList = list;
},
},

View File

@ -3,121 +3,121 @@
* 修改一下配置时,需要每次都清理 `window.localStorage` 浏览器永久缓存,配置才会生效
*/
const themeConfigModule = {
namespaced: true,
state: {
themeConfig: {
// 是否开启布局配置抽屉
isDrawer: false,
namespaced: true,
state: {
themeConfig: {
// 是否开启布局配置抽屉
isDrawer: false,
/**
* 全局主题
*/
// 默认 primary 主题颜色
primary: '#409eff',
// 菜单背景色
menuBgColor: '#282c34',
// 是否开启深色模式
isIsDark: false,
/**
* 全局主题
*/
// 默认 primary 主题颜色
primary: '#409eff',
// 菜单背景色
menuBgColor: '#282c34',
// 是否开启深色模式
isIsDark: false,
themeStyle: 'theme-1',
/**
* 菜单 / 顶栏
* 请注意:
* 需要同时修改 `/@/theme/common/var.scss` 对应的值,
*/
// 默认顶栏导航背景颜色
topBar: '#ffffff',
// 默认顶栏导航字体颜色
topBarColor: '#606266',
// 默认菜单导航背景颜色
menuBar: '#282c34',
// 默认菜单导航字体颜色
menuBarColor: '#eaeaea',
// 默认分栏菜单背景颜色
columnsMenuBar: '#282c34',
// 默认分栏菜单字体颜色
columnsMenuBarColor: '#e6e6e6',
/**
* 菜单 / 顶栏
* 请注意:
* 需要同时修改 `/@/theme/common/var.scss` 对应的值,
*/
// 默认顶栏导航背景颜色
topBar: '#ffffff',
// 默认顶栏导航字体颜色
topBarColor: '#606266',
// 默认菜单导航背景颜色
menuBar: '#282c34',
// 默认菜单导航字体颜色
menuBarColor: '#eaeaea',
// 默认分栏菜单背景颜色
columnsMenuBar: '#282c34',
// 默认分栏菜单字体颜色
columnsMenuBarColor: '#e6e6e6',
/**
* 界面设置
*/
// 是否开启菜单水平折叠效果
isCollapse: false,
// 是否开启菜单手风琴效果
isUniqueOpened: false,
// 是否开启固定 Header
isFixedHeader: false,
/**
* 界面设置
*/
// 是否开启菜单水平折叠效果
isCollapse: false,
// 是否开启菜单手风琴效果
isUniqueOpened: false,
// 是否开启固定 Header
isFixedHeader: false,
/**
* 界面显示
*/
// 是否开启侧边栏 Logo
isShowLogo: true,
// 是否开启 Breadcrumb
isBreadcrumb: true,
// 是否开启 Breadcrumb 图标
isBreadcrumbIcon: false,
// 是否开启 Tagsview
isTagsview: true,
// 是否开启 Tagsview 图标
isTagsviewIcon: false,
// 是否开启 TagsView 缓存
isCacheTagsView: false,
// 是否开启 Footer 底部版权信息
isFooter: false,
// 是否开启灰色模式
isGrayscale: false,
// 是否开启色弱模式
isInvert: false,
/**
* 界面显示
*/
// 是否开启侧边栏 Logo
isShowLogo: true,
// 是否开启 Breadcrumb
isBreadcrumb: true,
// 是否开启 Breadcrumb 图标
isBreadcrumbIcon: false,
// 是否开启 Tagsview
isTagsview: true,
// 是否开启 Tagsview 图标
isTagsviewIcon: false,
// 是否开启 TagsView 缓存
isCacheTagsView: false,
// 是否开启 Footer 底部版权信息
isFooter: false,
// 是否开启灰色模式
isGrayscale: false,
// 是否开启色弱模式
isInvert: false,
/**
* 其它设置
*/
// 默认 Tagsview 风格,可选 1、 tags-style-one,自行扩展:
// 1、需修改 @/layout/navBars/breadcrumb/setings.vue `getThemeConfig.tagsStyle` el-option
// 2、需修改 @/layout/navBars/tagsView/tagsView.vue 代码最底部注释部分 css 样式
tagsStyle: 'tags-style-one',
// 主页面切换动画:可选值"<slide-right|slide-left|opacitys>",默认 slide-right
animation: 'slide-right',
// 分栏高亮风格:可选值"<columns-round|columns-card>",默认 columns-round
columnsAsideStyle: 'columns-round',
// 分栏布局风格:可ƒ选值"<columns-horizontal|columns-vertical>",默认 columns-horizontal
columnsAsideLayout: 'columns-vertical',
/**
* 其它设置
*/
// 默认 Tagsview 风格,可选 1、 tags-style-one,自行扩展:
// 1、需修改 @/layout/navBars/breadcrumb/setings.vue `getThemeConfig.tagsStyle` el-option
// 2、需修改 @/layout/navBars/tagsView/tagsView.vue 代码最底部注释部分 css 样式
tagsStyle: 'tags-style-one',
// 主页面切换动画:可选值"<slide-right|slide-left|opacitys>",默认 slide-right
animation: 'slide-right',
// 分栏高亮风格:可选值"<columns-round|columns-card>",默认 columns-round
columnsAsideStyle: 'columns-round',
// 分栏布局风格:可ƒ选值"<columns-horizontal|columns-vertical>",默认 columns-horizontal
columnsAsideLayout: 'columns-vertical',
/**
* 布局切换
* 注意:为了演示,切换布局时,颜色会被还原成默认,代码位置:/@/layout/navBars/breadcrumb/setings.vue
* 中的 `initSetLayoutChange(设置布局切换,重置主题样式)` 方法
*/
// 布局切换:可选值"<defaults|classic|transverse|columns>",默认 defaults
layout: 'defaults',
/**
* 布局切换
* 注意:为了演示,切换布局时,颜色会被还原成默认,代码位置:/@/layout/navBars/breadcrumb/setings.vue
* 中的 `initSetLayoutChange(设置布局切换,重置主题样式)` 方法
*/
// 布局切换:可选值"<defaults|classic|transverse|columns>",默认 defaults
layout: 'defaults',
/**
* 全局网站标题 / 副标题
*/
// 网站主标题(菜单导航、浏览器当前网页标题)
globalTitle: 'crmeb-admin',
// 网站副标题(登录页顶部文字)
globalViceTitle: 'SMALL@小柒',
// 网站描述(登录页顶部文字)
globalViceDes: 'vue2',
// 默认初始语言,可选值"<zh-cn|en|zh-tw>",默认 zh-cn
globalI18n: 'zh-cn',
// 默认全局组件大小,可选值"<|medium|small|mini>",默认 ''
globalComponentSize: '',
},
},
mutations: {
// 设置布局配置
getThemeConfig(state, data) {
state.themeConfig = data;
},
},
actions: {
// 设置布局配置
setThemeConfig({ commit }, data) {
commit('getThemeConfig', data);
},
},
/**
* 全局网站标题 / 副标题
*/
// 网站主标题(菜单导航、浏览器当前网页标题)
globalTitle: 'crmeb-admin',
// 网站副标题(登录页顶部文字)
globalViceTitle: 'SMALL@小柒',
// 网站描述(登录页顶部文字)
globalViceDes: 'vue2',
// 默认初始语言,可选值"<zh-cn|en|zh-tw>",默认 zh-cn
globalI18n: 'zh-cn',
// 默认全局组件大小,可选值"<|medium|small|mini>",默认 ''
globalComponentSize: '',
},
},
mutations: {
// 设置布局配置
getThemeConfig(state, data) {
state.themeConfig = data;
},
},
actions: {
// 设置布局配置
setThemeConfig({ commit }, data) {
commit('getThemeConfig', data);
},
},
};
export default themeConfigModule;

View File

@ -14,6 +14,7 @@
--prev-bg-topBarColor: #282c34;
--prev-bg-columnsMenuBar: #282c34;
--prev-bg-columnsMenuBarColor: #e6e6e6;
--prev-bg-columnsMenuActiveColor: #ffffff;
--prev-bg-menu-hover-ba-color: rgba(0, 0, 0, 0.2);
--prev-bg-menu-active-color: #409eff;
--prev-bg-main-color: #f8f8f8;
@ -35,6 +36,8 @@
--prev-border-color-light: #e4e7ed;
--prev-border-color-lighter: #ebeef5;
--prev-border-color-extra-light: #f2f6fc;
--prev-tag-active-color: #fff;
--prev-MenuActiveColor: #fff;
}
html,
@ -53,7 +56,7 @@ body,
height: 100%;
.layout-aside {
background: var(--prev-bg-menuBar);
box-shadow: 0px 0 1px rgba(0, 21, 41, 1%);
// box-shadow: 0px 0 1px rgba(0, 21, 41, 1%);
height: inherit;
position: relative;
z-index: 1;
@ -89,6 +92,7 @@ body,
.layout-aside-width-default {
width: 180px !important;
transition: width 0.3s ease;
box-shadow: 1px 1px 4px rgba(0,21,41,.08);
}
.layout-aside-width64 {
width: 64px !important;

View File

@ -117,7 +117,7 @@
.el-menu--horizontal > .el-submenu.is-active .el-submenu__title {
border-bottom: 3px solid !important;
border-bottom-color: var(--prev-color-primary) !important;
color: var(--prev-color-primary) !important;
// color: var(--prev-color-primary) !important;
}
.el-menu--horizontal .el-menu-item:not(.is-disabled):focus,
.el-menu--horizontal .el-menu-item:not(.is-disabled):hover,
@ -125,7 +125,7 @@
.el-menu--horizontal > .el-submenu:hover .el-submenu__title,
.el-menu--horizontal .el-menu .el-menu-item.is-active,
.el-menu--horizontal .el-menu .el-submenu.is-active > .el-submenu__title {
color: var(--prev-color-primary) !important;
color: var(--prev-MenuActiveColor) !important;
}
.el-menu.el-menu--horizontal {
border-bottom: none !important;
@ -151,10 +151,10 @@
// 默认 hover 时
.el-menu-item:hover,
.el-submenu__title:hover {
color: var(--prev-color-primary) !important;
color: var(--prev-MenuActiveColor) !important;
background-color: var(--prev-bg-menu-hover-ba-color) !important;
i {
color: var(--prev-color-primary) !important;
color: var(--prev-MenuActiveColor) !important;
}
}
// 鼠标 hover 时颜色
@ -163,8 +163,11 @@
}
// 高亮时
.el-menu-item.is-active {
color: var(--prev-color-primary) !important;
color: var(--prev-MenuActiveColor) !important;
// background-color: var(--prev-bg-menu-hover-ba-color) !important;
.el-submenu__title i {
color: var(--prev-MenuActiveColor) !important;
}
}
.el-menu-item.is-active,
.el-sub-menu.is-active .el-sub-menu__title,

View File

@ -304,8 +304,8 @@ $positions: 'top', 'right', 'bottom', 'left';
/* Switch 开关
------------------------------- */
.el-switch.is-checked .el-switch__core {
border-color: var(--prev-color-primary);
background-color: var(--prev-color-primary);
border-color: var(--prev-color-primary) !important;
background-color: var(--prev-color-primary) !important;
}
.el-switch__label.is-active {
color: var(--prev-color-primary);
@ -941,6 +941,7 @@ $positions: 'top', 'right', 'bottom', 'left';
}
.el-divider__text {
color: var(--prev-color-text-primary);
white-space: nowrap;
}
.el-drawer__close-btn:hover {
color: var(--prev-color-primary);

View File

@ -20,11 +20,11 @@
<view class='vip-money acea-row row-middle'
v-if="item.is_vip && item.vip_price && item.vip_price > 0">
{{$t(`¥`)}}{{item.vip_price || 0}}
<image src='../../static/images/vip.png'></image><text class='num'>{{$t(`已售`)}}
{{item.sales}}{{$t(item.unit_name)}}</text>
<image src='../../static/images/vip.png'></image><text class='num'>
{{$t(`已售`)}}{{item.sales}}{{$t(item.unit_name)}}</text>
</view>
<view class='vip-money acea-row row-middle' v-else><text class='num'>{{$t(`已售`)}}
{{item.sales}}{{$t(item.unit_name)}}</text></view>
<view class='vip-money acea-row row-middle' v-else><text class='num'>
{{$t(`已售`)}}{{item.sales}}{{$t(item.unit_name)}}</text></view>
</view>
</view>
<!-- <view class='iconfont icon-gouwuche cart-color acea-row row-center-wrapper'></view> -->
@ -148,6 +148,11 @@
color: #aaa;
font-weight: normal;
margin-top: -2rpx;
white-space: nowrap;
text {
white-space: nowrap;
}
~.num {
margin-left: 22rpx;

View File

@ -58,8 +58,7 @@
computed: mapGetters(['isLogin', 'cartNum', 'activityTab']),
watch: {
activityTab: {
handler(nVal, oVal) {
},
handler(nVal, oVal) {},
deep: true
},
configData: {
@ -83,6 +82,14 @@
let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
let curRoute = routes[routes.length - 1].route //获取当前页面路由
this.$store.commit('ACTIVITYTAB', '/' + curRoute);
uni.$on('uploadFooter', () => {
let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
let curRoute = routes[routes.length - 1].route //获取当前页面路由
this.$store.commit('ACTIVITYTAB', '/' + curRoute);
})
},
onShow() {
},
mounted() {
getNavigation().then(res => {
@ -97,7 +104,9 @@
this.getCartNum()
}
},
onHide() {
uni.$off(['uploadFooter'])
},
methods: {
goRouter(item) {
var pages = getCurrentPages();

View File

@ -13,8 +13,8 @@
<image :src='item.image'></image>
</view>
<view class='text acea-row row-column-around'>
<view class='name line1'>{{item.title}}</view>
<view class='num'><text class='iconfont icon-pintuan'></text>{{item.people}}{{$t(`人正在参与`)}}
<view class='name line1'>{{item.title || ''}}</view>
<view class='num'><text class='iconfont icon-pintuan'></text>{{item.people || ''}}{{$t(`人正在参与`)}}
</view>
<view class='money'>{{$t(`最低`)}} : {{$t(`¥`)}}<text class='price'>{{item.min_price}}</text>
</view>

View File

@ -1,7 +1,7 @@
<template>
<view style="background-color: var(--view-theme);padding-bottom: 50rpx;" :style="colorStyle">
<view class="bargain">
<!-- #ifndef APP-PLUS -->
<!-- #ifndef APP-PLUS || MP -->
<view class="iconfont icon-xiangzuo" v-if="retunTop" @tap="goBack" :style="'top:' + navH + 'px'"></view>
<!-- #endif -->
<view :style="'background-image: url('+(bargainUid != userInfo.uid ?picUrl.support:picUrl.barga)+');'"

View File

@ -30,7 +30,7 @@
<image src="../static/groupLine.png"></image>
</view>
</view>
<view class="list">
<view class="list" v-if="combinationList.length">
<view class="item acea-row row-between-wrapper" v-for="(item,index) in combinationList" :key='index'
@tap="openSubcribe(item)">
<view class="pictrue">

View File

@ -9,7 +9,7 @@
<view class='timeList'>
<block v-for="(item,index) in timeList" :key='index'>
<view @tap='settimeList(item,item.key)' class='item' :class="active == index + 1?'on':''">
<view class='time'><span>{{item.name}}</span></view>
<view class='time'><span>{{item.name || ''}}</span></view>
</view>
</block>
</view>
@ -21,10 +21,10 @@
<image :src='item.image'></image>
</view>
<view class='text acea-row row-column-around'>
<view class='name line2'>{{item.store_name}}</view>
<view class='name line2'>{{item.store_name || ''}}</view>
<view class='booking'>
<text v-if="item.presell_type != 0 && active != 1" class="count"
style="color: #999;">{{$t(`已预定`)}}{{item.sales ? item.sales : 0}}{{item.unit_name}}</text>
style="color: #999;">{{$t(`已预定`)}}{{item.sales ? item.sales : 0}}{{item.unit_name || ''}}</text>
<text v-else style="color: #999; font-size: 24rpx;">{{$t(`未开始`)}}</text>
</view>
<view v-if="item.coupon" class='coupon acea-row row-between-wrapper'

View File

@ -22,14 +22,14 @@
<view class="item acea-row row-between-wrapper">
<view>{{$t(`发货方式`)}}</view>
<view class="mode acea-row row-middle row-right">
<view class="goods" :class="active === item.key ? 'on' : ''" v-for="(item, index) in types"
<view class="goods" :class="active === index ? 'on' : ''" v-for="(item, index) in types"
:key="index" @click="changeType(item, index)">
{{ item.title }}<span class="iconfont icon-xuanzhong2"></span>
</view>
</view>
</view>
<block v-if="logistics.length>0">
<view class="list" v-show="active === 1">
<view class="list" v-show="active === 0">
<view class="item acea-row row-between-wrapper" v-if="delivery.config_export_open == 1">
<view>{{$t(`发货类型`)}}</view>
<view class="mode acea-row row-middle row-right">
@ -101,7 +101,7 @@
</view>
</block>
<view class="list" v-show="active === 2">
<view class="list" v-show="active === 1">
<view class="item acea-row row-between-wrapper">
<view>{{$t(`送货人`)}}</view>
<view class="select-box" v-if="postPeople.length>0">
@ -113,7 +113,7 @@
</view>
</view>
</view>
<textarea v-show="active === 3" v-model="fictitious_content" class="textarea" @blur="bindTextAreaBlur"
<textarea v-show="active === 2" v-model="fictitious_content" class="textarea" @blur="bindTextAreaBlur"
:placeholder="$t(`备注`)" :maxlength="500" auto-height />
</view>
<view style="height:1.2rem;"></view>
@ -143,7 +143,11 @@
title: this.$t(`发货`),
key: 1
},
{
type: "send",
title: this.$t(`送货`),
key: 2
},
{
type: "fictitious",
title: this.$t(`无需物流`),
@ -160,7 +164,7 @@
},
],
curExpress: 1,
active: 1,
active: 0,
order_id: "",
delivery: [],
logistics: [],
@ -235,14 +239,7 @@
// 获取配送员列表
geTorderOrderDelivery() {
orderOrderDelivery().then(res => {
if (res.data.length) {
this.postPeople = res.data
this.types.push({
type: "send",
title: this.$t(`送货`),
key: 2
})
}
this.postPeople = res.data
})
},
// 配送员选择
@ -255,7 +252,7 @@
this.getLogistics(index || '');
},
changeType: function(item, index) {
this.active = item.key;
this.active = index;
this.delivery_type = item.key;
},
getIndex: function() {

View File

@ -3,9 +3,9 @@
<view class="application-record" v-if="listData.length">
<view class="card-list" v-for="item in listData" :key="item.mer_intention_id">
<view class="card-top">
<view class="title">{{item.mer_name}}</view>
<view class="time">{{$t(`提交时间`)}}:{{item.create_time}}</view>
<view v-if="item.fail_msg" class="reason">{{$t(`原因`)}}:{{item.fail_msg}}</view>
<view class="title">{{item.mer_name || ''}}</view>
<view class="time">{{$t(`提交时间`)}}:{{item.create_time || ''}}</view>
<view v-if="item.fail_msg" class="reason">{{$t(`原因`)}}:{{item.fail_msg || ''}}</view>
</view>
<view class="line"></view>
<view class="card-bottom">

View File

@ -7,7 +7,7 @@
{{$t(`¥`)}}
<input v-model.number="money" class="input" name="money" type="digit" @input="inputChange" placeholder="0.00" />
</view>
<view v-if="payPrice && show" class="discount">{{$t(`会员优惠价`)}}:{{$t(`¥`)}}{{ payPrice }}</view>
<view v-if="payPrice && show" class="discount">{{$t(`会员优惠价`)}}:{{$t(`¥`)}}{{ payPrice || 0 }}</view>
</view>
</view>
<view class="radio-section">

View File

@ -22,8 +22,8 @@
<view v-for="item in memberRights" :key="item.id" class="acea-row row-middle item">
<image class="image" :src="item.pic"></image>
<view class="text">
<view class="name">{{item.title}}</view>
<view>{{item.explain}}</view>
<view class="name">{{item.title || ''}}</view>
<view>{{item.explain || ''}}</view>
</view>
</view>
</view>

View File

@ -1,6 +1,6 @@
<template>
<view>
<view class="title">{{agreement.title}}</view>
<view class="title">{{agreement.title || ''}}</view>
<view class="cont" v-html="agreement.content"></view>
</view>
</template>

View File

@ -4,19 +4,19 @@
<view class="acea-row row-middle">
<image class="image" :src="userInfo.avatar"></image>
<view class="text">
<view class="name line1">{{userInfo.nickname}}</view>
<view class="name line1">{{userInfo.nickname || ''}}</view>
<view v-if="userInfo.is_ever_level">{{$t(`永久SVIP会员`)}}</view>
<view v-else-if="userInfo.is_money_level">{{$t(`SVIP会员`)}} {{userInfo.overdue_time | dateFormat}}
{{$t(`到期`)}}
</view>
<view v-else>{{$t(`您与`)}} {{userInfo.shop_name}} {{$t(`商城的第`)}} {{userInfo.register_days}}
<view v-else>{{$t(`您与`)}} {{userInfo.shop_name || ''}} {{$t(`商城的第`)}} {{userInfo.register_days || ''}}
{{$t(`天.`)}}
</view>
</view>
</view>
<view class="acea-row row-between-wrapper info">
<view v-if="userInfo.is_money_level">{{$t(`已累积为您节省`)}} {{$t(`¥`)}}<text
class="num">{{userInfo.economize_money}}</text>
class="num">{{userInfo.economize_money || ''}}</text>
</view>
<view v-else>{{$t(`开通即享会员权益`)}}</view>
<view class="btn" @click="scrollToCard" v-if="!userInfo.is_ever_level">

View File

@ -1,49 +1,53 @@
<template>
<view v-if="shareInfoStatus" class="poster-first">
<view class="mask-share">
<image :src="imgHost + '/statics/images/share-info.png'" @click="shareInfoClose" @touchmove.stop.prevent="false"></image>
</view>
</view>
</template>
<script>
import {HTTP_REQUEST_URL} from '@/config/app';
export default {
props: {
shareInfoStatus: {
type: Boolean,
default:false,
}
},
data: function() {
return {
imgHost:HTTP_REQUEST_URL,
};
},
mounted: function() {},
methods: {
shareInfoClose: function() {
this.$emit("setShareInfoStatus");
}
}
};
</script>
<style scoped lang="scss">
.poster-first {
overscroll-behavior: contain;
}
.mask-share {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 99;
}
.mask-share image {
width: 100%;
height:100%;
}
<template>
<view v-if="shareInfoStatus" class="poster-first">
<view class="mask-share">
<image :src="imgHost + '/statics/images/share-info.png'" @click="shareInfoClose"
@touchmove.stop.prevent="false"></image>
</view>
</view>
</template>
<script>
import {
HTTP_REQUEST_URL
} from '@/config/app';
export default {
props: {
shareInfoStatus: {
type: Boolean,
default: false,
}
},
data: function() {
return {
imgHost: HTTP_REQUEST_URL,
};
},
mounted: function() {},
methods: {
shareInfoClose: function() {
this.$emit("setShareInfoStatus");
}
}
};
</script>
<style scoped lang="scss">
.poster-first {
overscroll-behavior: contain;
}
.mask-share {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 99;
}
.mask-share image {
width: 100%;
height: 100%;
}
</style>

View File

@ -80,7 +80,7 @@
</view>
</view>
<!-- 订单 -->
<view class="order-box" v-if="item.msn_type == 6 && item.orderInfo.length"
<view class="order-box" v-if="item.msn_type == 6 && item.orderInfo"
@click="goOrder(item)">
<view class="title">{{$t(`订单号`)}}: {{ item.orderInfo.order_id }}</view>
<view class="info">

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