This commit is contained in:
周中平 2020-04-25 22:34:57 +08:00
parent 33f8230b50
commit 7aa0520c71
37 changed files with 686 additions and 596 deletions

View File

@ -10,6 +10,26 @@
## 更新日志 ## 更新日志
### v1.1.39
```
优化:后台菜单超出显示滚动条
优化取消收集formid
优化:后台门店管理添加筛选条件
优化:回退余额时判断用户是否存在
优化:小程序端授权登录流程
优化超管后台新增商城ID错误
修复:优惠券和积分叠加计算错误
修复:后台选择门店未显示全部
修复:数据统计权限问题报错
修复:订单支付成功短信提醒
修复:砍价商品列表价格排序报错
修复:小程序端订单页未支付提示
--------------------------------
注:本次更新须重新发布小程序
```
### v1.1.38 ### v1.1.38
``` ```

View File

@ -4063,6 +4063,7 @@ INSERT INTO `yoshop_region` VALUES ('4014', '3999', '屯门区', '屯门区', '
INSERT INTO `yoshop_region` VALUES ('4015', '3999', '大埔区', '大埔区', '中国,香港特别行政区,大埔区', '3', 'dapu', null, null, null, null, null); INSERT INTO `yoshop_region` VALUES ('4015', '3999', '大埔区', '大埔区', '中国,香港特别行政区,大埔区', '3', 'dapu', null, null, null, null, null);
INSERT INTO `yoshop_region` VALUES ('4016', '3999', '荃湾区', '荃湾区', '中国,香港特别行政区,荃湾区', '3', 'quanwan', null, null, null, null, null); INSERT INTO `yoshop_region` VALUES ('4016', '3999', '荃湾区', '荃湾区', '中国,香港特别行政区,荃湾区', '3', 'quanwan', null, null, null, null, null);
INSERT INTO `yoshop_region` VALUES ('4017', '3999', '元朗区', '元朗区', '中国,香港特别行政区,元朗区', '3', 'yuanlang', null, null, null, null, null); INSERT INTO `yoshop_region` VALUES ('4017', '3999', '元朗区', '元朗区', '中国,香港特别行政区,元朗区', '3', 'yuanlang', null, null, null, null, null);
INSERT INTO `yoshop_region` (`id`, `pid`, `shortname`, `name`, `merger_name`, `level`, `pinyin`, `code`, `zip_code`, `first`) VALUES ('4018', '2291', '儋州', '儋州市', '中国,海南省,儋州市', '2', 'danzhou', '0898', '571700', 'D');
CREATE TABLE `yoshop_setting` ( CREATE TABLE `yoshop_setting` (
`key` varchar(30) NOT NULL COMMENT '设置项标示', `key` varchar(30) NOT NULL COMMENT '设置项标示',
@ -4254,7 +4255,7 @@ CREATE TABLE `yoshop_wxapp_page` (
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间', `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`page_id`), PRIMARY KEY (`page_id`),
KEY `wxapp_id` (`wxapp_id`) KEY `wxapp_id` (`wxapp_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10004 DEFAULT CHARSET=utf8 COMMENT='微信小程序diy页面表'; ) ENGINE=InnoDB AUTO_INCREMENT=10002 DEFAULT CHARSET=utf8 COMMENT='微信小程序diy页面表';
INSERT INTO `yoshop_wxapp_page` VALUES ('10001', '10', '小程序首页', '{\"items\":{\"page\":{\"id\":\"page\",\"type\":\"page\",\"name\":\"\\u9875\\u9762\\u8bbe\\u7f6e\",\"params\":{\"name\":\"\\u9875\\u9762\\u540d\\u79f0\",\"title\":\"\\u8424\\u706b\\u5c0f\\u7a0b\\u5e8f\\u5546\\u57ce\"},\"style\":{\"titleTextColor\":\"white\",\"titleBackgroundColor\":\"#ff8000\"}},\"n50214144672381\":{\"id\":\"n50214144672381\",\"type\":\"search\",\"name\":\"\\u641c\\u7d22\\u6846\",\"params\":{\"placeholder\":\"\\u8bf7\\u8f93\\u5165\\u5173\\u952e\\u5b57\\u8fdb\\u884c\\u641c\\u7d22\"},\"style\":{\"textAlign\":\"left\",\"searchStyle\":\"\"}},\"n33356112682143\":{\"id\":\"n33356112682143\",\"type\":\"coupon\",\"name\":\"\\u4f18\\u60e0\\u5238\\u7ec4\",\"style\":{\"paddingTop\":\"10\",\"background\":\"#ffffff\"},\"params\":{\"limit\":\"5\"},\"data\":{\"n214578430230592\":{\"color\":\"red\",\"reduce_price\":\"10\",\"min_price\":\"100.00\"},\"n818030369705776\":{\"color\":\"violet\",\"reduce_price\":\"10\",\"min_price\":\"100.00\"}}}}}', '10001', 0, '1536197290', '1536197290'); INSERT INTO `yoshop_wxapp_page` VALUES ('10001', '10', '小程序首页', '{\"items\":{\"page\":{\"id\":\"page\",\"type\":\"page\",\"name\":\"\\u9875\\u9762\\u8bbe\\u7f6e\",\"params\":{\"name\":\"\\u9875\\u9762\\u540d\\u79f0\",\"title\":\"\\u8424\\u706b\\u5c0f\\u7a0b\\u5e8f\\u5546\\u57ce\"},\"style\":{\"titleTextColor\":\"white\",\"titleBackgroundColor\":\"#ff8000\"}},\"n50214144672381\":{\"id\":\"n50214144672381\",\"type\":\"search\",\"name\":\"\\u641c\\u7d22\\u6846\",\"params\":{\"placeholder\":\"\\u8bf7\\u8f93\\u5165\\u5173\\u952e\\u5b57\\u8fdb\\u884c\\u641c\\u7d22\"},\"style\":{\"textAlign\":\"left\",\"searchStyle\":\"\"}},\"n33356112682143\":{\"id\":\"n33356112682143\",\"type\":\"coupon\",\"name\":\"\\u4f18\\u60e0\\u5238\\u7ec4\",\"style\":{\"paddingTop\":\"10\",\"background\":\"#ffffff\"},\"params\":{\"limit\":\"5\"},\"data\":{\"n214578430230592\":{\"color\":\"red\",\"reduce_price\":\"10\",\"min_price\":\"100.00\"},\"n818030369705776\":{\"color\":\"violet\",\"reduce_price\":\"10\",\"min_price\":\"100.00\"}}}}}', '10001', 0, '1536197290', '1536197290');
@ -4288,7 +4289,7 @@ CREATE TABLE `yoshop_wxapp_prepay_id` (
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间', `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `order_id` (`order_id`) KEY `order_id` (`order_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='小程序prepay_id记录'; ) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='小程序prepay_id记录(已废弃)';
# 分销商申请记录表 # 分销商申请记录表
@ -4428,7 +4429,7 @@ CREATE TABLE `yoshop_wxapp_formid` (
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间', `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `user_id` (`user_id`) KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='小程序form_id记录表'; ) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='小程序form_id记录表(已废弃)';
# 超管用户记录表 # 超管用户记录表

View File

@ -0,0 +1,13 @@
INSERT INTO `yoshop_region` (`id`, `pid`, `shortname`, `name`, `merger_name`, `level`, `pinyin`, `code`, `zip_code`, `first`)
VALUES ('4018', '2291', '儋州', '儋州市', '中国,海南省,儋州市', '2', 'danzhou', '0898', '571700', 'D');
ALTER TABLE `yoshop_wxapp_formid`
COMMENT='小程序form_id记录表(已废弃)';
ALTER TABLE `yoshop_wxapp_prepay_id`
COMMENT='小程序prepay_id记录(已废弃)';

View File

@ -1,4 +1,22 @@
 
### v1.1.39 更新日志 ###
优化:后台菜单超出显示滚动条
优化取消收集formid
优化:后台门店管理添加筛选条件
优化:回退余额时判断用户是否存在
优化:小程序端授权登录流程
优化超管后台新增商城ID错误
修复:优惠券和积分叠加计算错误
修复:后台选择门店未显示全部
修复:数据统计权限问题报错
修复:订单支付成功短信提醒
修复:砍价商品列表价格排序报错
修复:小程序端订单页未支付提示
--------------------------------
注:本次更新须重新发布小程序
### v1.1.38 更新日志 ### ### v1.1.38 更新日志 ###
修复:订单确认页收货地址提示 修复:订单确认页收货地址提示

View File

@ -45,8 +45,7 @@ class Wxapp extends WxappModel
/** /**
* 新增记录 * 新增记录
* @param $data * @param $data
* @return bool * @return bool|mixed
* @throws \think\exception\PDOException
*/ */
public function add($data) public function add($data)
{ {
@ -54,31 +53,25 @@ class Wxapp extends WxappModel
$this->error = '确认密码不正确'; $this->error = '确认密码不正确';
return false; return false;
} }
$this->startTrans(); if (StoreUser::checkExist($data['store_name'])) {
try { $this->error = '商家用户名已存在';
return false;
}
return $this->transaction(function () use ($data) {
// 添加小程序记录 // 添加小程序记录
$this->allowField(true)->save($data); $this->allowField(true)->save($data);
// 商城默认设置 // 商城默认设置
(new Setting)->insertDefault($this['wxapp_id'], $data['store_name']); (new Setting)->insertDefault($this['wxapp_id'], $data['store_name']);
// 新增商家用户信息 // 新增商家用户信息
$StoreUser = new StoreUser; (new StoreUser)->add($this['wxapp_id'], $data);
if (!$StoreUser->add($this['wxapp_id'], $data)) {
$this->error = $StoreUser->error;
return false;
}
// 新增小程序默认帮助 // 新增小程序默认帮助
(new WxappHelp)->insertDefault($this['wxapp_id']); (new WxappHelp)->insertDefault($this['wxapp_id']);
// 新增小程序diy配置 // 新增小程序diy配置
(new WxappPage)->insertDefault($this['wxapp_id']); (new WxappPage)->insertDefault($this['wxapp_id']);
// 新增小程序分类页模板 // 新增小程序分类页模板
(new WxappCategory)->insertDefault($this['wxapp_id']); (new WxappCategory)->insertDefault($this['wxapp_id']);
$this->commit();
return true; return true;
} catch (\Exception $e) { });
$this->error = $e->getMessage();
$this->rollback();
return false;
}
} }
/** /**

View File

@ -19,10 +19,6 @@ class User extends StoreUserModel
*/ */
public function add($wxapp_id, $data) public function add($wxapp_id, $data)
{ {
if (self::checkExist($data['user_name'])) {
$this->error = '商家用户名已存在';
return false;
}
return $this->save([ return $this->save([
'user_name' => $data['user_name'], 'user_name' => $data['user_name'],
'password' => yoshop_hash($data['password']), 'password' => yoshop_hash($data['password']),

View File

@ -14,6 +14,7 @@ class Formid extends Controller
{ {
/** /**
* 新增form_id * 新增form_id
* (因微信模板消息已下线所以formId取消不再收集)
* @param $formId * @param $formId
* @return array * @return array
* @throws \app\common\exception\BaseException * @throws \app\common\exception\BaseException
@ -21,13 +22,15 @@ class Formid extends Controller
*/ */
public function save($formId) public function save($formId)
{ {
if (!$user = $this->getUser(false)) { return $this->renderSuccess();
return $this->renderSuccess();
} // if (!$user = $this->getUser(false)) {
if (FormidModel::add($user['user_id'], $formId)) { // return $this->renderSuccess();
return $this->renderSuccess(); // }
} // if (FormidModel::add($user['user_id'], $formId)) {
return $this->renderError(); // return $this->renderSuccess();
// }
// return $this->renderError();
} }
} }

View File

@ -95,6 +95,7 @@ class Active extends ActiveModel
$params = array_merge([ $params = array_merge([
'status' => 1, // 商品状态 'status' => 1, // 商品状态
'sortType' => 'all', // 排序类型 'sortType' => 'all', // 排序类型
'sortPrice' => false, // 价格排序 高低
'listRows' => 15, // 每页数量 'listRows' => 15, // 每页数量
], $param); ], $param);
// 排序规则 // 排序规则

View File

@ -3,7 +3,7 @@
namespace app\api\service; namespace app\api\service;
use app\api\model\Wxapp as WxappModel; use app\api\model\Wxapp as WxappModel;
use app\api\model\WxappPrepayId as WxappPrepayIdModel; //use app\api\model\WxappPrepayId as WxappPrepayIdModel;
use app\common\library\wechat\WxPay; use app\common\library\wechat\WxPay;
use app\common\enum\OrderType as OrderTypeEnum; use app\common\enum\OrderType as OrderTypeEnum;
@ -57,9 +57,9 @@ class Payment
$wxConfig = WxappModel::getWxappCache($user['wxapp_id']); $wxConfig = WxappModel::getWxappCache($user['wxapp_id']);
$WxPay = new WxPay($wxConfig); $WxPay = new WxPay($wxConfig);
$payment = $WxPay->unifiedorder($orderNo, $user['open_id'], $payPrice, $orderType); $payment = $WxPay->unifiedorder($orderNo, $user['open_id'], $payPrice, $orderType);
// 记录prepay_id // // 记录prepay_id
$model = new WxappPrepayIdModel; // $model = new WxappPrepayIdModel;
$model->add($payment['prepay_id'], $orderId, $user['user_id'], $orderType); // $model->add($payment['prepay_id'], $orderId, $user['user_id'], $orderType);
return $payment; return $payment;
} }

View File

@ -181,12 +181,12 @@ class Checkout
$this->setOrderGoodsGradeMoney(); $this->setOrderGoodsGradeMoney();
// 设置订单商品总金额(不含优惠折扣) // 设置订单商品总金额(不含优惠折扣)
$this->setOrderTotalPrice(); $this->setOrderTotalPrice();
// 计算可用积分抵扣
$this->setOrderPoints();
// 当前用户可用的优惠券列表 // 当前用户可用的优惠券列表
$couponList = $this->getUserCouponList($this->orderData['order_total_price']); $couponList = $this->getUserCouponList($this->orderData['order_total_price']);
// 计算优惠券抵扣 // 计算优惠券抵扣
$this->setOrderCouponMoney($couponList, $this->param['coupon_id']); $this->setOrderCouponMoney($couponList, $this->param['coupon_id']);
// 计算可用积分抵扣
$this->setOrderPoints();
// 计算订单商品的实际付款金额 // 计算订单商品的实际付款金额
$this->setOrderGoodsPayPrice(); $this->setOrderGoodsPayPrice();
// 设置默认配送方式 // 设置默认配送方式
@ -265,7 +265,10 @@ class Checkout
// 积分抵扣比例 // 积分抵扣比例
$deductionRatio = helper::bcdiv($setting['discount']['max_money_ratio'], 100); $deductionRatio = helper::bcdiv($setting['discount']['max_money_ratio'], 100);
// 最多可抵扣的金额 // 最多可抵扣的金额
$maxPointsMoney = helper::bcmul($goods['total_price'], $deductionRatio); // !!!: 此处应该是优惠券打折后的价格
// bug: $totalPayPrice = $goods['total_price'];
$totalPayPrice = helper::bcsub($goods['total_price'], $goods['coupon_money']);
$maxPointsMoney = helper::bcmul($totalPayPrice, $deductionRatio);
// 最多可抵扣的积分数量 // 最多可抵扣的积分数量
$goods['max_points_num'] = helper::bcdiv($maxPointsMoney, $setting['discount']['discount_ratio'], 0); $goods['max_points_num'] = helper::bcdiv($maxPointsMoney, $setting['discount']['discount_ratio'], 0);
} }

View File

@ -6,7 +6,7 @@ use think\Hook;
use app\api\service\Basics; use app\api\service\Basics;
use app\api\model\User as UserModel; use app\api\model\User as UserModel;
use app\api\model\Order as OrderModel; use app\api\model\Order as OrderModel;
use app\api\model\WxappPrepayId as WxappPrepayIdModel; //use app\api\model\WxappPrepayId as WxappPrepayIdModel;
use app\api\model\user\BalanceLog as BalanceLogModel; use app\api\model\user\BalanceLog as BalanceLogModel;
use app\common\service\goods\source\Factory as StockFactory; use app\common\service\goods\source\Factory as StockFactory;
use app\common\enum\OrderType as OrderTypeEnum; use app\common\enum\OrderType as OrderTypeEnum;
@ -143,7 +143,7 @@ class PaySuccess extends Basics
// 微信支付 // 微信支付
if ($payType == PayTypeEnum::WECHAT) { if ($payType == PayTypeEnum::WECHAT) {
// 更新prepay_id记录 // 更新prepay_id记录
WxappPrepayIdModel::updatePayStatus($this->model['order_id'], OrderTypeEnum::MASTER); // WxappPrepayIdModel::updatePayStatus($this->model['order_id'], OrderTypeEnum::MASTER);
} }
} }

View File

@ -5,10 +5,10 @@ namespace app\api\service\recharge;
use app\api\service\Basics; use app\api\service\Basics;
use app\api\model\User as UserModel; use app\api\model\User as UserModel;
use app\api\model\recharge\Order as OrderModel; use app\api\model\recharge\Order as OrderModel;
use app\api\model\WxappPrepayId as WxappPrepayIdModel; //use app\api\model\WxappPrepayId as WxappPrepayIdModel;
use app\api\model\user\BalanceLog as BalanceLogModel; use app\api\model\user\BalanceLog as BalanceLogModel;
use app\common\enum\OrderType as OrderTypeEnum; //use app\common\enum\OrderType as OrderTypeEnum;
use app\common\enum\order\PayType as PayTypeEnum; use app\common\enum\order\PayType as PayTypeEnum;
use app\common\enum\user\balanceLog\Scene as SceneEnum; use app\common\enum\user\balanceLog\Scene as SceneEnum;
use app\common\enum\recharge\order\PayStatus as PayStatusEnum; use app\common\enum\recharge\order\PayStatus as PayStatusEnum;
@ -70,7 +70,7 @@ class PaySuccess extends Basics
], ['order_no' => $this->model['order_no']]); ], ['order_no' => $this->model['order_no']]);
// 更新prepay_id记录 // 更新prepay_id记录
if ($payType == PayTypeEnum::WECHAT) { if ($payType == PayTypeEnum::WECHAT) {
WxappPrepayIdModel::updatePayStatus($this->model['order_id'], OrderTypeEnum::RECHARGE); // WxappPrepayIdModel::updatePayStatus($this->model['order_id'], OrderTypeEnum::RECHARGE);
} }
return true; return true;
}); });

View File

@ -180,12 +180,12 @@ class Checkout
$this->setOrderGoodsGradeMoney(); $this->setOrderGoodsGradeMoney();
// 设置订单商品总金额(不含优惠折扣) // 设置订单商品总金额(不含优惠折扣)
$this->setOrderTotalPrice(); $this->setOrderTotalPrice();
// 计算可用积分抵扣
$this->setOrderPoints();
// 当前用户可用的优惠券列表 // 当前用户可用的优惠券列表
$couponList = $this->getUserCouponList($this->orderData['order_total_price']); $couponList = $this->getUserCouponList($this->orderData['order_total_price']);
// 计算优惠券抵扣 // 计算优惠券抵扣
$this->setOrderCouponMoney($couponList, $this->param['coupon_id']); $this->setOrderCouponMoney($couponList, $this->param['coupon_id']);
// 计算可用积分抵扣
$this->setOrderPoints();
// 计算订单商品的实际付款金额 // 计算订单商品的实际付款金额
$this->setOrderGoodsPayPrice(); $this->setOrderGoodsPayPrice();
// 设置默认配送方式 // 设置默认配送方式
@ -264,7 +264,10 @@ class Checkout
// 积分抵扣比例 // 积分抵扣比例
$deductionRatio = helper::bcdiv($setting['discount']['max_money_ratio'], 100); $deductionRatio = helper::bcdiv($setting['discount']['max_money_ratio'], 100);
// 最多可抵扣的金额 // 最多可抵扣的金额
$maxPointsMoney = helper::bcmul($goods['total_price'], $deductionRatio); // !!!: 此处应该是优惠券打折后的价格
// bug: $totalPayPrice = $goods['total_price'];
$totalPayPrice = helper::bcsub($goods['total_price'], $goods['coupon_money']);
$maxPointsMoney = helper::bcmul($totalPayPrice, $deductionRatio);
// 最多可抵扣的积分数量 // 最多可抵扣的积分数量
$goods['max_points_num'] = helper::bcdiv($maxPointsMoney, $setting['discount']['discount_ratio'], 0); $goods['max_points_num'] = helper::bcdiv($maxPointsMoney, $setting['discount']['discount_ratio'], 0);
} }

View File

@ -9,7 +9,7 @@ use app\api\model\sharing\Order as OrderModel;
use app\api\model\sharing\Goods as GoodsModel; use app\api\model\sharing\Goods as GoodsModel;
use app\api\model\sharing\Active as ActiveModel; use app\api\model\sharing\Active as ActiveModel;
use app\api\model\user\BalanceLog as BalanceLogModel; use app\api\model\user\BalanceLog as BalanceLogModel;
use app\api\model\WxappPrepayId as WxappPrepayIdModel; //use app\api\model\WxappPrepayId as WxappPrepayIdModel;
use app\common\enum\user\balanceLog\Scene as SceneEnum; use app\common\enum\user\balanceLog\Scene as SceneEnum;
use app\common\enum\order\PayType as PayTypeEnum; use app\common\enum\order\PayType as PayTypeEnum;
@ -116,7 +116,7 @@ class PaySuccess extends Basics
// 微信支付 // 微信支付
if ($payType == PayTypeEnum::WECHAT) { if ($payType == PayTypeEnum::WECHAT) {
// 更新prepay_id记录 // 更新prepay_id记录
WxappPrepayIdModel::updatePayStatus($this->model['order_id'], OrderTypeEnum::SHARING); // WxappPrepayIdModel::updatePayStatus($this->model['order_id'], OrderTypeEnum::SHARING);
} }
}); });
return true; return true;

View File

@ -27,7 +27,7 @@ class Region extends BaseModel
]; ];
// 当前数据版本号 // 当前数据版本号
private static $version = '1.2.3'; private static $version = '1.2.4';
// 县级市别名 (兼容微信端命名) // 县级市别名 (兼容微信端命名)
private static $county = [ private static $county = [

View File

@ -2,9 +2,8 @@
namespace app\common\model; namespace app\common\model;
use app\common\exception\BaseException;
use think\Cache; use think\Cache;
use think\Db; use app\common\exception\BaseException;
/** /**
* 微信小程序模型 * 微信小程序模型
@ -15,15 +14,6 @@ class Wxapp extends BaseModel
{ {
protected $name = 'wxapp'; protected $name = 'wxapp';
/**
* 小程序导航
* @return \think\model\relation\HasOne
*/
public function navbar()
{
return $this->hasOne('WxappNavbar');
}
/** /**
* 小程序页面 * 小程序页面
* @return \think\model\relation\HasOne * @return \think\model\relation\HasOne

View File

@ -35,13 +35,13 @@ class User extends BaseModel
/** /**
* 验证用户名是否重复 * 验证用户名是否重复
* @param $user_name * @param $userName
* @return bool * @return bool
*/ */
public static function checkExist($user_name) public static function checkExist($userName)
{ {
return !!static::useGlobalScope(false) return !!static::useGlobalScope(false)
->where('user_name', '=', $user_name) ->where('user_name', '=', $userName)
->where('is_delete', '=', 0) ->where('is_delete', '=', 0)
->value('store_user_id'); ->value('store_user_id');
} }

View File

@ -2,12 +2,12 @@
namespace app\common\service; namespace app\common\service;
use app\common\model\User as UserModel; //use app\common\model\User as UserModel;
use app\common\model\Wxapp as WxappModel; use app\common\model\Wxapp as WxappModel;
use app\common\model\Setting as SettingModel; use app\common\model\Setting as SettingModel;
use app\common\model\dealer\Setting as DealerSettingModel; //use app\common\model\dealer\Setting as DealerSettingModel;
use app\common\model\sharing\Setting as SharingSettingModel; //use app\common\model\sharing\Setting as SharingSettingModel;
use app\common\service\wxapp\FormId as FormIdService; //use app\common\service\wxapp\FormId as FormIdService;
use app\common\enum\OrderType as OrderTypeEnum; use app\common\enum\OrderType as OrderTypeEnum;
use app\common\library\wechat\WxTplMsg; use app\common\library\wechat\WxTplMsg;
use app\common\library\sms\Driver as SmsDriver; use app\common\library\sms\Driver as SmsDriver;
@ -24,45 +24,46 @@ class Message
* @param \think\Model $order * @param \think\Model $order
* @param int $orderType 订单类型 (10商城订单 20拼团订单) * @param int $orderType 订单类型 (10商城订单 20拼团订单)
* @return bool * @return bool
* @throws \app\common\exception\BaseException // * @throws \app\common\exception\BaseException
* @throws \think\Exception * @throws \think\Exception
* @throws \think\exception\DbException // * @throws \think\exception\DbException
*/ */
public function payment($order, $orderType = OrderTypeEnum::MASTER) public function payment($order, $orderType = OrderTypeEnum::MASTER)
{ {
// 1. 微信模板消息 // // 1. 微信模板消息
$template = SettingModel::getItem('tplMsg', $order['wxapp_id'])['payment']; // $template = SettingModel::getItem('tplMsg', $order['wxapp_id'])['payment'];
if (!$template['is_enable'] || empty($template['template_id'])) { // if (!$template['is_enable'] || empty($template['template_id'])) {
return false; // return false;
} // }
// 获取可用的formid // // 获取可用的formid
if (!$formId = FormIdService::getAvailableFormId($order['user_id'])) { // if (!$formId = FormIdService::getAvailableFormId($order['user_id'])) {
return false; // return false;
} // }
// 页面链接 // // 页面链接
$urls = [ // $urls = [
OrderTypeEnum::MASTER => 'pages/order/detail', // OrderTypeEnum::MASTER => 'pages/order/detail',
OrderTypeEnum::SHARING => 'pages/sharing/order/detail/detail', // OrderTypeEnum::SHARING => 'pages/sharing/order/detail/detail',
]; // ];
// 发送模板消息 // // 发送模板消息
$status = $this->sendTemplateMessage($order['wxapp_id'], [ // $status = $this->sendTemplateMessage($order['wxapp_id'], [
'touser' => $order['user']['open_id'], // 'touser' => $order['user']['open_id'],
'template_id' => $template['template_id'], // 'template_id' => $template['template_id'],
'page' => $urls[$orderType] . '?order_id=' . $order['order_id'], // 'page' => $urls[$orderType] . '?order_id=' . $order['order_id'],
'form_id' => $formId['form_id'], // 'form_id' => $formId['form_id'],
'data' => [ // 'data' => [
// 订单编号 // // 订单编号
'keyword1' => $order['order_no'], // 'keyword1' => $order['order_no'],
// 支付时间 // // 支付时间
'keyword2' => date('Y-m-d H:i:s', $order['pay_time']), // 'keyword2' => date('Y-m-d H:i:s', $order['pay_time']),
// 订单金额 // // 订单金额
'keyword3' => $order['pay_price'], // 'keyword3' => $order['pay_price'],
// 商品名称 // // 商品名称
'keyword4' => $this->formatGoodsName($order['goods']), // 'keyword4' => $this->formatGoodsName($order['goods']),
] // ]
]); // ]);
// 标记formid已使用 // // 标记formid已使用
$status === true && FormIdService::setIsUsed($formId['id']); // $status === true && FormIdService::setIsUsed($formId['id']);
// 2. 商家短信通知 // 2. 商家短信通知
$smsConfig = SettingModel::getItem('sms', $order['wxapp_id']); $smsConfig = SettingModel::getItem('sms', $order['wxapp_id']);
$SmsDriver = new SmsDriver($smsConfig); $SmsDriver = new SmsDriver($smsConfig);
@ -74,50 +75,51 @@ class Message
* @param \think\Model $order * @param \think\Model $order
* @param int $orderType 订单类型 (10商城订单 20拼团订单) * @param int $orderType 订单类型 (10商城订单 20拼团订单)
* @return bool * @return bool
* @throws \app\common\exception\BaseException // * @throws \app\common\exception\BaseException
* @throws \think\Exception // * @throws \think\Exception
* @throws \think\exception\DbException // * @throws \think\exception\DbException
*/ */
public function delivery($order, $orderType = OrderTypeEnum::MASTER) public function delivery($order, $orderType = OrderTypeEnum::MASTER)
{ {
// 微信模板消息 return true;
$template = SettingModel::getItem('tplMsg', $order['wxapp_id'])['delivery']; // // 微信模板消息
if (!$template['is_enable'] || empty($template['template_id'])) { // $template = SettingModel::getItem('tplMsg', $order['wxapp_id'])['delivery'];
return false; // if (!$template['is_enable'] || empty($template['template_id'])) {
} // return false;
// 获取可用的formid // }
if (!$formId = FormIdService::getAvailableFormId($order['user_id'])) { // // 获取可用的formid
return false; // if (!$formId = FormIdService::getAvailableFormId($order['user_id'])) {
} // return false;
// 页面链接 // }
$urls = [ // // 页面链接
OrderTypeEnum::MASTER => 'pages/order/detail', // $urls = [
OrderTypeEnum::SHARING => 'pages/sharing/order/detail/detail', // OrderTypeEnum::MASTER => 'pages/order/detail',
]; // OrderTypeEnum::SHARING => 'pages/sharing/order/detail/detail',
// 发送模板消息 // ];
$status = $this->sendTemplateMessage($order['wxapp_id'], [ // // 发送模板消息
'touser' => $order['user']['open_id'], // $status = $this->sendTemplateMessage($order['wxapp_id'], [
'template_id' => $template['template_id'], // 'touser' => $order['user']['open_id'],
'page' => $urls[$orderType] . '?order_id=' . $order['order_id'], // 'template_id' => $template['template_id'],
'form_id' => $formId['form_id'], // 'page' => $urls[$orderType] . '?order_id=' . $order['order_id'],
'data' => [ // 'form_id' => $formId['form_id'],
// 订单编号 // 'data' => [
'keyword1' => $order['order_no'], // // 订单编号
// 商品信息 // 'keyword1' => $order['order_no'],
'keyword2' => $this->formatGoodsName($order['goods']), // // 商品信息
// 收货人 // 'keyword2' => $this->formatGoodsName($order['goods']),
'keyword3' => $order['address']['name'], // // 收货人
// 收货地址 // 'keyword3' => $order['address']['name'],
'keyword4' => implode('', $order['address']['region']) . $order['address']['detail'], // // 收货地址
// 物流公司 // 'keyword4' => implode('', $order['address']['region']) . $order['address']['detail'],
'keyword5' => $order['express']['express_name'], // // 物流公司
// 物流单号 // 'keyword5' => $order['express']['express_name'],
'keyword6' => $order['express_no'], // // 物流单号
] // 'keyword6' => $order['express_no'],
]); // ]
// 标记formid已使用 // ]);
$status === true && FormIdService::setIsUsed($formId['id']); // // 标记formid已使用
return $status; // $status === true && FormIdService::setIsUsed($formId['id']);
// return $status;
} }
/** /**
@ -126,50 +128,51 @@ class Message
* @param $order_no * @param $order_no
* @param int $orderType 订单类型 (10商城订单 20拼团订单) * @param int $orderType 订单类型 (10商城订单 20拼团订单)
* @return bool * @return bool
* @throws \app\common\exception\BaseException // * @throws \app\common\exception\BaseException
* @throws \think\Exception // * @throws \think\Exception
* @throws \think\exception\DbException // * @throws \think\exception\DbException
*/ */
public function refund($refund, $order_no, $orderType = OrderTypeEnum::MASTER) public function refund($refund, $order_no, $orderType = OrderTypeEnum::MASTER)
{ {
// 微信模板消息 return true;
$template = SettingModel::getItem('tplMsg', $refund['wxapp_id'])['refund']; // // 微信模板消息
if (!$template['is_enable'] || empty($template['template_id'])) { // $template = SettingModel::getItem('tplMsg', $refund['wxapp_id'])['refund'];
return false; // if (!$template['is_enable'] || empty($template['template_id'])) {
} // return false;
// 获取可用的formid // }
if (!$formId = FormIdService::getAvailableFormId($refund['user_id'])) { // // 获取可用的formid
return false; // if (!$formId = FormIdService::getAvailableFormId($refund['user_id'])) {
} // return false;
// 页面链接 // }
$urls = [ // // 页面链接
OrderTypeEnum::MASTER => 'pages/order/refund/index', // $urls = [
OrderTypeEnum::SHARING => 'pages/sharing/order/refund/index', // OrderTypeEnum::MASTER => 'pages/order/refund/index',
]; // OrderTypeEnum::SHARING => 'pages/sharing/order/refund/index',
// 发送模板消息 // ];
$status = $this->sendTemplateMessage($refund['wxapp_id'], [ // // 发送模板消息
'touser' => $refund['user']['open_id'], // $status = $this->sendTemplateMessage($refund['wxapp_id'], [
'template_id' => $template['template_id'], // 'touser' => $refund['user']['open_id'],
'page' => $urls[$orderType], // 'template_id' => $template['template_id'],
'form_id' => $formId['form_id'], // 'page' => $urls[$orderType],
'data' => [ // 'form_id' => $formId['form_id'],
// 售后类型 // 'data' => [
'keyword1' => $refund['type']['text'], // // 售后类型
// 状态 // 'keyword1' => $refund['type']['text'],
'keyword2' => $refund['status']['text'], // // 状态
// 订单号 // 'keyword2' => $refund['status']['text'],
'keyword3' => $order_no, // // 订单号
// 商品名称 // 'keyword3' => $order_no,
'keyword4' => $refund['order_goods']['goods_name'], // // 商品名称
// 申请时间 // 'keyword4' => $refund['order_goods']['goods_name'],
'keyword5' => $refund['create_time'], // // 申请时间
// 申请原因 // 'keyword5' => $refund['create_time'],
'keyword6' => $refund['apply_desc'], // // 申请原因
] // 'keyword6' => $refund['apply_desc'],
]); // ]
// 标记formid已使用 // ]);
FormIdService::setIsUsed($formId['id']); // // 标记formid已使用
return $status; // FormIdService::setIsUsed($formId['id']);
// return $status;
} }
/** /**
@ -177,140 +180,143 @@ class Message
* @param \app\common\model\sharing\Active $active * @param \app\common\model\sharing\Active $active
* @param string $status_text * @param string $status_text
* @return bool * @return bool
* @throws \app\common\exception\BaseException // * @throws \app\common\exception\BaseException
* @throws \think\exception\DbException // * @throws \think\exception\DbException
*/ */
public function sharingActive($active, $status_text) public function sharingActive($active, $status_text)
{ {
// 微信模板消息
$config = SharingSettingModel::getItem('basic', $active['wxapp_id']);
if (empty($config['tpl_msg_id'])) {
return false;
}
foreach ($active['users'] as $item) {
// 获取可用的formid
if (!$formId = FormIdService::getAvailableFormId($item['user']['user_id'])) {
continue;
}
// 发送模板消息
$this->sendTemplateMessage($active['wxapp_id'], [
'touser' => $item['user']['open_id'],
'template_id' => $config['tpl_msg_id'],
'page' => 'pages/sharing/active/index?active_id=' . $active['active_id'],
'form_id' => $formId['form_id'],
'data' => [
// 订单编号
'keyword1' => $item['sharing_order']['order_no'],
// 商品名称
'keyword2' => $active['goods']['goods_name'],
// 拼团价格
'keyword3' => $item['sharing_order']['pay_price'],
// 拼团人数
'keyword4' => $active['people'],
// 拼团时间
'keyword5' => $item['create_time'],
// 拼团结果
'keyword6' => $status_text,
]
]);
// 标记formid已使用
FormIdService::setIsUsed($formId['id']);
}
return true; return true;
// // 微信模板消息
// $config = SharingSettingModel::getItem('basic', $active['wxapp_id']);
// if (empty($config['tpl_msg_id'])) {
// return false;
// }
// foreach ($active['users'] as $item) {
// // 获取可用的formid
// if (!$formId = FormIdService::getAvailableFormId($item['user']['user_id'])) {
// continue;
// }
// // 发送模板消息
// $this->sendTemplateMessage($active['wxapp_id'], [
// 'touser' => $item['user']['open_id'],
// 'template_id' => $config['tpl_msg_id'],
// 'page' => 'pages/sharing/active/index?active_id=' . $active['active_id'],
// 'form_id' => $formId['form_id'],
// 'data' => [
// // 订单编号
// 'keyword1' => $item['sharing_order']['order_no'],
// // 商品名称
// 'keyword2' => $active['goods']['goods_name'],
// // 拼团价格
// 'keyword3' => $item['sharing_order']['pay_price'],
// // 拼团人数
// 'keyword4' => $active['people'],
// // 拼团时间
// 'keyword5' => $item['create_time'],
// // 拼团结果
// 'keyword6' => $status_text,
// ]
// ]);
// // 标记formid已使用
// FormIdService::setIsUsed($formId['id']);
// }
// return true;
} }
/** /**
* 分销商提现审核通知 * 分销商提现审核通知
* @param \app\common\model\dealer\Withdraw $withdraw * @param \app\common\model\dealer\Withdraw $withdraw
* @return bool * @return bool
* @throws \app\common\exception\BaseException // * @throws \app\common\exception\BaseException
* @throws \think\exception\DbException // * @throws \think\exception\DbException
*/ */
public function withdraw($withdraw) public function withdraw($withdraw)
{ {
// 模板消息id return true;
$template = DealerSettingModel::getItem('template_msg', $withdraw['wxapp_id']); // // 模板消息id
if (empty($template['withdraw_tpl'])) { // $template = DealerSettingModel::getItem('template_msg', $withdraw['wxapp_id']);
return false; // if (empty($template['withdraw_tpl'])) {
} // return false;
// 获取可用的formid // }
if (!$formId = FormIdService::getAvailableFormId($withdraw['user_id'])) { // // 获取可用的formid
return false; // if (!$formId = FormIdService::getAvailableFormId($withdraw['user_id'])) {
} // return false;
// 获取用户信息 // }
$user = UserModel::detail($withdraw['user_id']); // // 获取用户信息
// 发送模板消息 // $user = UserModel::detail($withdraw['user_id']);
$remark = '无'; // // 发送模板消息
if ($withdraw['apply_status'] == 30) { // $remark = '无';
$remark = $withdraw['reject_reason']; // if ($withdraw['apply_status'] == 30) {
} // $remark = $withdraw['reject_reason'];
$status = $this->sendTemplateMessage($withdraw['wxapp_id'], [ // }
'touser' => $user['open_id'], // $status = $this->sendTemplateMessage($withdraw['wxapp_id'], [
'template_id' => $template['withdraw_tpl'], // 'touser' => $user['open_id'],
'page' => 'pages/dealer/withdraw/list/list', // 'template_id' => $template['withdraw_tpl'],
'form_id' => $formId['form_id'], // 'page' => 'pages/dealer/withdraw/list/list',
'data' => [ // 'form_id' => $formId['form_id'],
// 提现时间 // 'data' => [
'keyword1' => $withdraw['create_time'], // // 提现时间
// 提现方式 // 'keyword1' => $withdraw['create_time'],
'keyword2' => $withdraw['pay_type']['text'], // // 提现方式
// 提现金额 // 'keyword2' => $withdraw['pay_type']['text'],
'keyword3' => $withdraw['money'], // // 提现金额
// 提现状态 // 'keyword3' => $withdraw['money'],
'keyword4' => $withdraw->applyStatus[$withdraw['apply_status']], // // 提现状态
// 备注 // 'keyword4' => $withdraw->applyStatus[$withdraw['apply_status']],
'keyword5' => $remark, // // 备注
] // 'keyword5' => $remark,
]); // ]
// 标记formid已使用 // ]);
FormIdService::setIsUsed($formId['id']); // // 标记formid已使用
return $status; // FormIdService::setIsUsed($formId['id']);
// return $status;
} }
/** /**
* 分销商入驻审核通知 * 分销商入驻审核通知
* @param \app\common\model\dealer\Apply $dealer * @param \app\common\model\dealer\Apply $dealer
* @return bool * @return bool
* @throws \app\common\exception\BaseException // * @throws \app\common\exception\BaseException
* @throws \think\exception\DbException // * @throws \think\exception\DbException
*/ */
public function dealer($dealer) public function dealer($dealer)
{ {
// 模板消息id return true;
$template = DealerSettingModel::getItem('template_msg', $dealer['wxapp_id']); // // 模板消息id
if (empty($template['apply_tpl'])) { // $template = DealerSettingModel::getItem('template_msg', $dealer['wxapp_id']);
return false; // if (empty($template['apply_tpl'])) {
} // return false;
// 获取可用的formid // }
if (!$formId = FormIdService::getAvailableFormId($dealer['user_id'])) { // // 获取可用的formid
return false; // if (!$formId = FormIdService::getAvailableFormId($dealer['user_id'])) {
} // return false;
// 获取用户信息 // }
$user = UserModel::detail($dealer['user_id']); // // 获取用户信息
// 发送模板消息 // $user = UserModel::detail($dealer['user_id']);
$remark = '分销商入驻审核通知'; // // 发送模板消息
if ($dealer['apply_status'] == 30) { // $remark = '分销商入驻审核通知';
$remark .= "\n\n驳回原因:" . $dealer['reject_reason']; // if ($dealer['apply_status'] == 30) {
} // $remark .= "\n\n驳回原因" . $dealer['reject_reason'];
$status = $this->sendTemplateMessage($dealer['wxapp_id'], [ // }
'touser' => $user['open_id'], // $status = $this->sendTemplateMessage($dealer['wxapp_id'], [
'template_id' => $template['apply_tpl'], // 'touser' => $user['open_id'],
'page' => 'pages/dealer/index/index', // 'template_id' => $template['apply_tpl'],
'form_id' => $formId['form_id'], // 'page' => 'pages/dealer/index/index',
'data' => [ // 'form_id' => $formId['form_id'],
// 申请时间 // 'data' => [
'keyword1' => $dealer['apply_time'], // // 申请时间
// 审核状态 // 'keyword1' => $dealer['apply_time'],
'keyword2' => $dealer->applyStatus[$dealer['apply_status']], // // 审核状态
// 审核时间 // 'keyword2' => $dealer->applyStatus[$dealer['apply_status']],
'keyword3' => $dealer['audit_time'], // // 审核时间
// 备注信息 // 'keyword3' => $dealer['audit_time'],
'keyword4' => $remark, // // 备注信息
] // 'keyword4' => $remark,
]); // ]
// 标记formid已使用 // ]);
FormIdService::setIsUsed($formId['id']); // // 标记formid已使用
return $status; // FormIdService::setIsUsed($formId['id']);
// return $status;
} }
/** /**

View File

@ -52,6 +52,7 @@ class Refund
{ {
// 回退用户余额 // 回退用户余额
$user = UserModel::detail($order['user_id']); $user = UserModel::detail($order['user_id']);
if (empty($user)) return false;
$user->setInc('balance', $money); $user->setInc('balance', $money);
// 记录余额明细 // 记录余额明细
BalanceLogModel::add(SceneEnum::REFUND, [ BalanceLogModel::add(SceneEnum::REFUND, [

View File

@ -19,7 +19,7 @@ class Shop extends Controller
public function index() public function index()
{ {
$model = new ShopModel; $model = new ShopModel;
$list = $model->getList(); $list = $model->getList($this->request->get());
return $this->fetch('index', compact('list')); return $this->fetch('index', compact('list'));
} }

View File

@ -3,7 +3,6 @@
namespace app\store\controller; namespace app\store\controller;
use app\store\model\Wxapp as WxappModel; use app\store\model\Wxapp as WxappModel;
use app\store\model\WxappNavbar as WxappNavbarModel;
/** /**
* 小程序管理 * 小程序管理
@ -31,22 +30,4 @@ class Wxapp extends Controller
return $this->renderError($model->getError() ?: '更新失败'); return $this->renderError($model->getError() ?: '更新失败');
} }
/**
* 导航栏设置
* @return array|mixed
* @throws \think\exception\DbException
*/
public function tabbar()
{
$model = WxappNavbarModel::detail();
if (!$this->request->isAjax()) {
return $this->fetch('tabbar', compact('model'));
}
$data = $this->postData('tabbar');
if (!$model->edit($data)) {
return $this->renderError('更新失败');
}
return $this->renderSuccess('更新成功');
}
} }

View File

@ -26,13 +26,12 @@ class Shop extends Controller
/** /**
* 门店列表 * 门店列表
* @param null $status
* @return mixed * @return mixed
* @throws \think\exception\DbException * @throws \think\exception\DbException
*/ */
public function lists($status = null) public function lists()
{ {
$list = $this->model->getList($status); $list = $this->model->getList($this->request->get());
return $this->fetch('list', compact('list')); return $this->fetch('list', compact('list'));
} }

View File

@ -26,7 +26,7 @@ class Clerk extends Controller
$model = new ClerkModel; $model = new ClerkModel;
$list = $model->getList(-1, $shop_id, $search); $list = $model->getList(-1, $shop_id, $search);
// 门店列表 // 门店列表
$shopList = (new ShopModel)->getList(); $shopList = ShopModel::getAllList();
return $this->fetch('index', compact('list', 'shopList')); return $this->fetch('index', compact('list', 'shopList'));
} }
@ -40,7 +40,7 @@ class Clerk extends Controller
$model = new ClerkModel; $model = new ClerkModel;
if (!$this->request->isAjax()) { if (!$this->request->isAjax()) {
// 门店列表 // 门店列表
$shopList = (new ShopModel)->getList(); $shopList = ShopModel::getAllList();
return $this->fetch('add', compact('shopList')); return $this->fetch('add', compact('shopList'));
} }
// 新增记录 // 新增记录
@ -62,7 +62,7 @@ class Clerk extends Controller
$model = ClerkModel::detail($clerk_id); $model = ClerkModel::detail($clerk_id);
if (!$this->request->isAjax()) { if (!$this->request->isAjax()) {
// 门店列表 // 门店列表
$shopList = (new ShopModel)->getList(); $shopList = ShopModel::getAllList();
return $this->fetch('edit', compact('model', 'shopList')); return $this->fetch('edit', compact('model', 'shopList'));
} }
// 新增记录 // 新增记录

View File

@ -26,7 +26,7 @@ class Order extends Controller
$model = new OrderModel; $model = new OrderModel;
$list = $model->getList($shop_id, $search); $list = $model->getList($shop_id, $search);
// 门店列表 // 门店列表
$shopList = (new ShopModel)->getList(); $shopList = ShopModel::getAllList();
return $this->fetch('index', compact('list', 'shopList')); return $this->fetch('index', compact('list', 'shopList'));
} }

View File

@ -14,15 +14,14 @@ class Shop extends ShopModel
{ {
/** /**
* 获取列表数据 * 获取列表数据
* @param null $status * @param array $param
* @return \think\Paginator * @return \think\Paginator
* @throws \think\exception\DbException * @throws \think\exception\DbException
*/ */
public function getList($status = null) public function getList($param = [])
{ {
!is_null($status) && $this->where('status', '=', (int)$status); // 查询列表数据
return $this->where('is_delete', '=', '0') return $this->setListQueryWhere($param)
->order(['sort' => 'asc', 'create_time' => 'desc'])
->paginate(15, false, [ ->paginate(15, false, [
'query' => \request()->request() 'query' => \request()->request()
]); ]);
@ -30,16 +29,27 @@ class Shop extends ShopModel
/** /**
* 获取所有门店列表 * 获取所有门店列表
* @param array $param
* @return false|\PDOStatement|string|\think\Collection * @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/ */
public static function getAllList() public static function getAllList($param = [])
{ {
return (new self)->where('is_delete', '=', '0') return (new static)->setListQueryWhere($param)->select();
->order(['sort' => 'asc', 'create_time' => 'desc']) }
->select();
/**
* 设置列表查询条件
* @param array $param
* @return $this
*/
private function setListQueryWhere($param = [])
{
// 查询参数
$param = array_merge(['is_check' => '', 'search' => '', 'status' => null,], $param);
is_numeric($param['is_check']) && $param['is_check'] > -1 && $this->where('is_check', '=', (int)$param['is_check']);
!empty($param['search']) && $this->where('shop_name|linkman|phone', 'like', "%{$param['search']}%");
is_numeric($param['status']) && $this->where('status', '=', (int)$param['status']);
return $this->where('is_delete', '=', '0')->order(['sort' => 'asc', 'create_time' => 'desc']);
} }
/** /**

View File

@ -50,6 +50,8 @@ class Auth
'setting.help/*', 'setting.help/*',
// 腾讯地图坐标选取器 // 腾讯地图坐标选取器
'shop/getpoint', 'shop/getpoint',
// 数据统计
'statistics.data/survey',
]; ];
/** @var array $accessUrls 商家用户权限url */ /** @var array $accessUrls 商家用户权限url */

View File

@ -37,6 +37,7 @@ class Message
} }
/** /**
* 执行发送
* @param $data * @param $data
* @return bool * @return bool
* @throws \app\common\exception\BaseException * @throws \app\common\exception\BaseException

View File

@ -11,6 +11,49 @@
<title>门店列表</title> <title>门店列表</title>
</head> </head>
<body class="select-data"> <body class="select-data">
<!-- 工具栏 -->
<div class="page_toolbar am-u-sm-12 am-margin-bottom-xs am-cf">
<form class="toolbar-form" action="">
<input type="hidden" name="s" value="/<?= $request->pathinfo() ?>">
<div class="am-u-sm-12 am-u-md-3">
<div class="am-form-group">
<?php if (checkPrivilege('shop/add')): ?>
<div class="am-btn-group am-btn-group-xs">
<a class="am-btn am-btn-default am-btn-success"
href="<?= url('shop/add') ?>">
<span class="am-icon-plus"></span> 新增
</a>
</div>
<?php endif; ?>
</div>
</div>
<div class="am-u-sm-12 am-u-md-9">
<div class="am fr">
<div class="am-form-group am-fl">
<?php $isCheck = $request->get('is_check'); ?>
<select name="is_check"
data-am-selected="{btnSize: 'sm', placeholder: '自提核销'}">
<option value=""></option>
<option value="-1" <?= $isCheck === '-1' ? 'selected' : '' ?>>全部</option>
<option value="1" <?= $isCheck === '1' ? 'selected' : '' ?>>支持</option>
<option value="0"<?= $isCheck === '0' ? 'selected' : '' ?>>不支持</option>
</select>
</div>
<div class="am-form-group am-fl">
<div class="am-input-group am-input-group-sm tpl-form-border-form">
<input type="text" class="am-form-field" name="search"
placeholder="请输入门店名称/联系人/电话"
value="<?= $request->get('search') ?>">
<div class="am-input-group-btn">
<button class="am-btn am-btn-default am-icon-search"
type="submit"></button>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
<div class="am-scrollable-horizontal am-u-sm-12"> <div class="am-scrollable-horizontal am-u-sm-12">
<table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black am-text-nowrap"> <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black am-text-nowrap">
<thead> <thead>
@ -23,8 +66,9 @@
<th>门店ID</th> <th>门店ID</th>
<th>门店logo</th> <th>门店logo</th>
<th>门店名称</th> <th>门店名称</th>
<th>门店地址</th>
<th>自提核销</th> <th>自提核销</th>
<th>门店状态</th>
<th>创建时间</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -49,19 +93,21 @@
</a> </a>
</td> </td>
<td class="am-text-middle"><?= $item['shop_name'] ?></td> <td class="am-text-middle"><?= $item['shop_name'] ?></td>
<td class="am-text-middle">
<?= $item['region']['province'] ?> <?= $item['region']['city'] ?> <?= $item['region']['region'] ?>
<?= $item['address'] ?>
</td>
<td class="am-text-middle"> <td class="am-text-middle">
<span class="am-badge am-badge-<?= $item['is_check'] ? 'success' : 'warning' ?>"> <span class="am-badge am-badge-<?= $item['is_check'] ? 'success' : 'warning' ?>">
<?= $item['is_check'] ? '支持' : '不支持' ?> <?= $item['is_check'] ? '支持' : '不支持' ?>
</span> </span>
</td> </td>
<td class="am-text-middle">
<span class="am-badge am-badge-<?= $item['status'] ? 'success' : 'warning' ?>">
<?= $item['status'] ? '启用' : '禁用' ?>
</span>
</td>
<td class="am-text-middle"><?= $item['create_time'] ?></td>
</tr> </tr>
<?php endforeach; else: ?> <?php endforeach; else: ?>
<tr> <tr>
<td colspan="6" class="am-text-center">暂无记录</td> <td colspan="7" class="am-text-center">暂无记录</td>
</tr> </tr>
<?php endif; ?> <?php endif; ?>
</tbody> </tbody>

View File

@ -57,61 +57,65 @@
<div class="left-sidebar dis-flex"> <div class="left-sidebar dis-flex">
<?php $menus = $menus ?: []; ?> <?php $menus = $menus ?: []; ?>
<?php $group = $group ?: 0; ?> <?php $group = $group ?: 0; ?>
<!-- 一级菜单 --> <div class="sidebar-scroll">
<ul class="sidebar-nav"> <!-- 一级菜单 -->
<li class="sidebar-nav-heading"><?= $setting['store']['values']['name'] ?></li> <ul class="sidebar-nav">
<?php foreach ($menus as $key => $item): ?> <li class="sidebar-nav-heading"><?= $setting['store']['values']['name'] ?></li>
<li class="sidebar-nav-link"> <?php foreach ($menus as $key => $item): ?>
<a href="<?= isset($item['index']) ? url($item['index']) : 'javascript:void(0);' ?>" <li class="sidebar-nav-link">
class="<?= $item['active'] ? 'active' : '' ?>"> <a href="<?= isset($item['index']) ? url($item['index']) : 'javascript:void(0);' ?>"
<?php if (isset($item['is_svg']) && $item['is_svg'] == true): ?> class="<?= $item['active'] ? 'active' : '' ?>">
<svg class="icon sidebar-nav-link-logo" aria-hidden="true"> <?php if (isset($item['is_svg']) && $item['is_svg'] == true): ?>
<use xlink:href="#<?= $item['icon'] ?>"></use> <svg class="icon sidebar-nav-link-logo" aria-hidden="true">
</svg> <use xlink:href="#<?= $item['icon'] ?>"></use>
<?php else: ?> </svg>
<i class="iconfont sidebar-nav-link-logo <?= $item['icon'] ?>" <?php else: ?>
style="<?= isset($item['color']) ? "color:{$item['color']};" : '' ?>"></i> <i class="iconfont sidebar-nav-link-logo <?= $item['icon'] ?>"
<?php endif; ?> style="<?= isset($item['color']) ? "color:{$item['color']};" : '' ?>"></i>
<?= $item['name'] ?> <?php endif; ?>
</a> <?= $item['name'] ?>
</li> </a>
<?php endforeach; ?> </li>
</ul> <?php endforeach; ?>
</ul>
</div>
<!-- 子级菜单--> <!-- 子级菜单-->
<?php $second = isset($menus[$group]['submenu']) ? $menus[$group]['submenu'] : []; ?> <?php $second = isset($menus[$group]['submenu']) ? $menus[$group]['submenu'] : []; ?>
<?php if (!empty($second)) : ?> <?php if (!empty($second)) : ?>
<ul class="left-sidebar-second"> <div class="sidebar-second-scroll">
<li class="sidebar-second-title"><?= $menus[$group]['name'] ?></li> <ul class="left-sidebar-second">
<li class="sidebar-second-item"> <li class="sidebar-second-title"><?= $menus[$group]['name'] ?></li>
<?php foreach ($second as $item) : ?> <li class="sidebar-second-item">
<?php if (!isset($item['submenu'])): ?> <?php foreach ($second as $item) : ?>
<!-- 二级菜单--> <?php if (!isset($item['submenu'])): ?>
<a href="<?= url($item['index']) ?>" <!-- 二级菜单-->
class="<?= (isset($item['active']) && $item['active']) ? 'active' : '' ?>"> <a href="<?= url($item['index']) ?>"
<?= $item['name']; ?> class="<?= (isset($item['active']) && $item['active']) ? 'active' : '' ?>">
</a>
<?php else: ?>
<!-- 三级菜单-->
<div class="sidebar-third-item">
<a href="javascript:void(0);"
class="sidebar-nav-sub-title <?= $item['active'] ? 'active' : '' ?>">
<i class="iconfont icon-caret"></i>
<?= $item['name']; ?> <?= $item['name']; ?>
</a> </a>
<ul class="sidebar-third-nav-sub"> <?php else: ?>
<?php foreach ($item['submenu'] as $third) : ?> <!-- 三级菜单-->
<li> <div class="sidebar-third-item">
<a class="<?= $third['active'] ? 'active' : '' ?>" <a href="javascript:void(0);"
href="<?= url($third['index']) ?>"> class="sidebar-nav-sub-title <?= $item['active'] ? 'active' : '' ?>">
<?= $third['name']; ?></a> <i class="iconfont icon-caret"></i>
</li> <?= $item['name']; ?>
<?php endforeach; ?> </a>
</ul> <ul class="sidebar-third-nav-sub">
</div> <?php foreach ($item['submenu'] as $third) : ?>
<?php endif; ?> <li>
<?php endforeach; ?> <a class="<?= $third['active'] ? 'active' : '' ?>"
</li> href="<?= url($third['index']) ?>">
</ul> <?= $third['name']; ?></a>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<?php endforeach; ?>
</li>
</ul>
</div>
<?php endif; ?> <?php endif; ?>
</div> </div>

View File

@ -28,7 +28,7 @@
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 所属门店 </label> <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 所属门店 </label>
<div class="am-u-sm-9 am-u-end"> <div class="am-u-sm-9 am-u-end">
<select name="clerk[shop_id]" <select name="clerk[shop_id]"
data-am-selected="{ btnSize: 'sm', placeholder:'请选择', maxHeight: 400}" data-am-selected="{searchBox: 1, btnSize: 'sm', placeholder:'请选择', maxHeight: 400}"
required> required>
<option value=""></option> <option value=""></option>
<?php if (isset($shopList) && !$shopList->isEmpty()): <?php if (isset($shopList) && !$shopList->isEmpty()):

View File

@ -12,7 +12,7 @@
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 所属门店 </label> <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 所属门店 </label>
<div class="am-u-sm-9 am-u-end"> <div class="am-u-sm-9 am-u-end">
<select name="clerk[shop_id]" <select name="clerk[shop_id]"
data-am-selected="{ btnSize: 'sm', placeholder:'请选择', maxHeight: 400}" data-am-selected="{searchBox: 1, btnSize: 'sm', placeholder:'请选择', maxHeight: 400}"
required> required>
<option value=""></option> <option value=""></option>
<?php if (isset($shopList) && !$shopList->isEmpty()): <?php if (isset($shopList) && !$shopList->isEmpty()):

View File

@ -26,7 +26,7 @@
<div class="am fr"> <div class="am fr">
<div class="am-form-group am-fl"> <div class="am-form-group am-fl">
<select name="shop_id" <select name="shop_id"
data-am-selected="{btnSize: 'sm', placeholder: '所属门店'}"> data-am-selected="{searchBox: 1, btnSize: 'sm', placeholder: '所属门店', maxHeight: 400}">
<option value=""></option> <option value=""></option>
<?php if (isset($shopList)): foreach ($shopList as $shop): ?> <?php if (isset($shopList)): foreach ($shopList as $shop): ?>
<option value="<?= $shop['shop_id'] ?>" <option value="<?= $shop['shop_id'] ?>"

View File

@ -7,17 +7,47 @@
</div> </div>
<div class="widget-body am-fr"> <div class="widget-body am-fr">
<!-- 工具栏 --> <!-- 工具栏 -->
<div class="page_toolbar am-margin-bottom-xs am-cf"> <div class="page_toolbar am-margin-bottom am-cf">
<div class="am-form-group"> <form class="toolbar-form" action="">
<?php if (checkPrivilege('shop/add')): ?> <input type="hidden" name="s" value="/<?= $request->pathinfo() ?>">
<div class="am-btn-group am-btn-group-xs"> <div class="am-u-sm-12 am-u-md-3">
<a class="am-btn am-btn-default am-btn-success" <div class="am-form-group">
href="<?= url('shop/add') ?>"> <?php if (checkPrivilege('shop/add')): ?>
<span class="am-icon-plus"></span> 新增 <div class="am-btn-group am-btn-group-xs">
</a> <a class="am-btn am-btn-default am-btn-success"
href="<?= url('shop/add') ?>">
<span class="am-icon-plus"></span> 新增
</a>
</div>
<?php endif; ?>
</div> </div>
<?php endif; ?> </div>
</div> <div class="am-u-sm-12 am-u-md-9">
<div class="am fr">
<div class="am-form-group am-fl">
<?php $isCheck = $request->get('is_check'); ?>
<select name="is_check"
data-am-selected="{btnSize: 'sm', placeholder: '自提核销'}">
<option value=""></option>
<option value="-1" <?= $isCheck === '-1' ? 'selected' : '' ?>>全部</option>
<option value="1" <?= $isCheck === '1' ? 'selected' : '' ?>>支持</option>
<option value="0"<?= $isCheck === '0' ? 'selected' : '' ?>>不支持</option>
</select>
</div>
<div class="am-form-group am-fl">
<div class="am-input-group am-input-group-sm tpl-form-border-form">
<input type="text" class="am-form-field" name="search"
placeholder="请输入门店名称/联系人/电话"
value="<?= $request->get('search') ?>">
<div class="am-input-group-btn">
<button class="am-btn am-btn-default am-icon-search"
type="submit"></button>
</div>
</div>
</div>
</div>
</div>
</form>
</div> </div>
<div class="am-scrollable-horizontal am-u-sm-12"> <div class="am-scrollable-horizontal am-u-sm-12">
<table width="100%" class="am-table am-table-compact am-table-striped <table width="100%" class="am-table am-table-compact am-table-striped
@ -84,7 +114,7 @@
</tr> </tr>
<?php endforeach; else: ?> <?php endforeach; else: ?>
<tr> <tr>
<td colspan="9" class="am-text-center">暂无记录</td> <td colspan="11" class="am-text-center">暂无记录</td>
</tr> </tr>
<?php endif; ?> <?php endif; ?>
</tbody> </tbody>

View File

@ -1,3 +1,3 @@
{ {
"version": "1.1.38" "version": "1.1.39"
} }

View File

@ -41,74 +41,6 @@ a:focus {
fill: currentColor; fill: currentColor;
overflow: hidden; } overflow: hidden; }
.tpl-header {
z-index: 1000;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
position: fixed;
top: 0;
width: 100%;
transition: all 0.4s ease-in-out;
padding-left: 160px;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none; }
.tpl-header-logo {
width: 240px;
height: 57px;
display: table;
text-align: center;
position: relative;
z-index: 1300; }
.tpl-header-logo a {
display: table-cell;
vertical-align: middle; }
.tpl-header-logo img {
width: 170px; }
.tpl-header-fluid {
height: 50px;
padding-left: 20px;
padding-right: 20px;
background: #fff; }
.tpl-header-button {
float: left;
color: #333;
margin: 0 0 0 -20px;
border: 0;
border-radius: 0;
padding: 0 22px;
line-height: 50px;
background: #fff;
cursor: pointer; }
.tpl-header-button:hover {
background: #fff;
color: #999;
outline: none; }
.tpl-header-navbar {
color: #fff; }
.tpl-header-navbar li {
float: left; }
.tpl-header-navbar a {
line-height: 50px;
display: block;
padding: 0 16px;
position: relative;
color: #333;
-webkit-transition: all .3s;
transition: all .3s; }
.tpl-header-navbar a:hover {
background: rgba(0, 0, 0, 0.025); }
.tpl-header-navbar a .item-feed-badge {
position: absolute;
top: 8px;
left: 25px;
padding: .25em .42em; }
ul.tpl-dropdown-content { ul.tpl-dropdown-content {
padding: 10px; padding: 10px;
margin-top: 0; margin-top: 0;
@ -214,16 +146,76 @@ ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .menu-messages-content
.am-datepicker-dropdown { .am-datepicker-dropdown {
z-index: 1400; } z-index: 1400; }
.left-sidebar { .tpl-layout {
transition: all 0.4s ease-in-out; position: relative; }
height: 100%;
.tpl-header {
z-index: 1000;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
position: fixed; position: fixed;
z-index: 10;
top: 0; top: 0;
left: 0; } width: 100%;
transition: all 0.4s ease-in-out;
padding-left: 160px;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none; }
.tpl-header.active {
padding-left: 0; }
.tpl-header .tpl-header-fluid {
height: 50px;
padding-left: 20px;
padding-right: 20px;
background: #fff; }
.tpl-header .tpl-header-fluid .tpl-header-navbar {
color: #fff; }
.tpl-header .tpl-header-fluid .tpl-header-navbar li {
float: left; }
.tpl-header .tpl-header-fluid .tpl-header-navbar a {
line-height: 50px;
display: block;
padding: 0 16px;
position: relative;
color: #333;
-webkit-transition: all .3s;
transition: all .3s; }
.tpl-header .tpl-header-fluid .tpl-header-navbar a:hover {
background: rgba(0, 0, 0, 0.025); }
.tpl-header .tpl-header-fluid .tpl-header-navbar a .item-feed-badge {
position: absolute;
top: 8px;
left: 25px;
padding: .25em .42em; }
.tpl-header .tpl-header-fluid .tpl-header-button {
float: left;
color: #333;
margin: 0 0 0 -20px;
border: 0;
border-radius: 0;
padding: 0 22px;
line-height: 50px;
background: #fff;
cursor: pointer; }
.tpl-header .tpl-header-fluid .tpl-header-button:hover {
background: #fff;
color: #999;
outline: none; }
.left-sidebar {
position: fixed;
top: 0;
bottom: 0;
left: 0;
z-index: 10;
height: 100%;
transition: all 0.4s ease-in-out;
background-color: #20222a; }
.left-sidebar .sidebar-scroll {
overflow-x: hidden; }
.left-sidebar .sidebar-nav { .left-sidebar .sidebar-nav {
width: 160px; width: 160px;
background-color: #20222a;
-webkit-box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35); -webkit-box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35); } box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35); }
.left-sidebar .sidebar-nav .sidebar-nav-heading { .left-sidebar .sidebar-nav .sidebar-nav-heading {
@ -262,6 +254,9 @@ ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .menu-messages-content
.left-sidebar .sidebar-nav .sidebar-nav-link a:hover { .left-sidebar .sidebar-nav .sidebar-nav-link a:hover {
color: #fff; color: #fff;
border-left: #1686ef 3px solid; } border-left: #1686ef 3px solid; }
.left-sidebar .sidebar-second-scroll {
overflow-x: hidden;
background: #fff; }
.left-sidebar .left-sidebar-second { .left-sidebar .left-sidebar-second {
width: 120px; width: 120px;
min-height: 100%; min-height: 100%;
@ -593,10 +588,6 @@ ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .menu-messages-content
.fc button { .fc button {
display: block; } display: block; }
.tpl-header-search-box:hover,
.tpl-header-search-box:active .tpl-error-title {
color: #848c90; }
.tpl-error-title-info { .tpl-error-title-info {
line-height: 30px; line-height: 30px;
font-size: 21px; font-size: 21px;
@ -945,13 +936,6 @@ ul.tpl-dropdown-content .tpl-dropdown-menu-notifications-item .tpl-dropdown-menu
ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .tpl-dropdown-menu-notifications-time { ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .tpl-dropdown-menu-notifications-time {
color: #999; } color: #999; }
.tpl-header.active {
padding-left: 0; }
.tpl-header-logo {
background: #fff;
border-bottom: 1px solid #eee; }
.widget-color-green { .widget-color-green {
border: 1px solid #32c5d2; border: 1px solid #32c5d2;
border-top: 2px solid #32c5d2; border-top: 2px solid #32c5d2;
@ -994,9 +978,6 @@ ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .tpl-dropdown-menu-noti
width: 86%; width: 86%;
padding: 22px 30px 25px; } padding: 22px 30px 25px; }
.tpl-header-search {
display: none; }
ul.tpl-dropdown-content { ul.tpl-dropdown-content {
position: fixed; position: fixed;
width: 100%; width: 100%;

View File

@ -230,7 +230,7 @@
onSelectShop: function (item) { onSelectShop: function (item) {
$.selectData({ $.selectData({
title: '选择门店', title: '选择门店',
uri: 'shop/lists&status=1', uri: 'shop/lists',
duplicate: false, duplicate: false,
dataIndex: 'shop_id', dataIndex: 'shop_id',
done: function (data) { done: function (data) {

View File

@ -60,86 +60,6 @@ a {
overflow: hidden; overflow: hidden;
} }
.tpl-header {
z-index: 1000;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
position: fixed;
top: 0;
width: 100%;
transition: all 0.4s ease-in-out;
padding-left: 160px;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.tpl-header-logo {
width: 240px;
height: 57px;
display: table;
text-align: center;
position: relative;
z-index: 1300;
a {
display: table-cell;
vertical-align: middle;
}
img {
width: 170px;
}
}
.tpl-header-fluid {
height: 50px;
padding-left: 20px;
padding-right: 20px;
background: #fff;
}
.tpl-header-button {
float: left;
color: #333;
margin: 0 0 0 -20px;
border: 0;
border-radius: 0;
padding: 0 22px;
line-height: 50px;
background: #fff;
cursor: pointer;
&:hover {
background: #fff;
color: #999;
outline: none;
}
}
.tpl-header-navbar {
color: #fff;
li {
float: left;
}
a {
line-height: 50px;
display: block;
padding: 0 16px;
position: relative;
color: #333;
-webkit-transition: all .3s;
transition: all .3s;
&:hover {
background: rgba(0, 0, 0, .025);
}
.item-feed-badge {
position: absolute;
top: 8px;
left: 25px;
padding: .25em .42em;
}
}
}
ul { ul {
&.tpl-dropdown-content { &.tpl-dropdown-content {
padding: 10px; padding: 10px;
@ -280,18 +200,100 @@ ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .menu-messages-content
z-index: 1400; z-index: 1400;
} }
// 容器
.tpl-layout {
position: relative;
}
// 顶部状态栏
.tpl-header {
z-index: 1000;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
position: fixed;
top: 0;
width: 100%;
transition: all 0.4s ease-in-out;
padding-left: 160px;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
&.active {
padding-left: 0;
}
.tpl-header-fluid {
height: 50px;
padding-left: 20px;
padding-right: 20px;
background: #fff;
.tpl-header-navbar {
color: #fff;
li {
float: left;
}
a {
line-height: 50px;
display: block;
padding: 0 16px;
position: relative;
color: #333;
-webkit-transition: all .3s;
transition: all .3s;
&:hover {
background: rgba(0, 0, 0, .025);
}
.item-feed-badge {
position: absolute;
top: 8px;
left: 25px;
padding: .25em .42em;
}
}
}
.tpl-header-button {
float: left;
color: #333;
margin: 0 0 0 -20px;
border: 0;
border-radius: 0;
padding: 0 22px;
line-height: 50px;
background: #fff;
cursor: pointer;
&:hover {
background: #fff;
color: #999;
outline: none;
}
}
}
}
// 左侧菜单栏 // 左侧菜单栏
.left-sidebar { .left-sidebar {
transition: all 0.4s ease-in-out;
height: 100%;
position: fixed; position: fixed;
z-index: 10;
top: 0; top: 0;
bottom: 0;
left: 0; left: 0;
z-index: 10;
height: 100%;
transition: all 0.4s ease-in-out;
background-color: #20222a;
.sidebar-scroll {
overflow-x: hidden;
}
// 一级菜单 // 一级菜单
.sidebar-nav { .sidebar-nav {
width: 160px; width: 160px;
background-color: #20222a;
-webkit-box-shadow: 2px 0 6px rgba(0, 21, 41, .35); -webkit-box-shadow: 2px 0 6px rgba(0, 21, 41, .35);
box-shadow: 2px 0 6px rgba(0, 21, 41, .35); box-shadow: 2px 0 6px rgba(0, 21, 41, .35);
@ -346,6 +348,11 @@ ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .menu-messages-content
} }
// 二级菜单 // 二级菜单
.sidebar-second-scroll {
overflow-x: hidden;
background: #fff;
}
.left-sidebar-second { .left-sidebar-second {
width: 120px; width: 120px;
min-height: 100%; min-height: 100%;
@ -794,11 +801,6 @@ ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .menu-messages-content
display: block; display: block;
} }
.tpl-header-search-box:hover,
.tpl-header-search-box:active .tpl-error-title {
color: #848c90;
}
.tpl-error-title-info { .tpl-error-title-info {
line-height: 30px; line-height: 30px;
font-size: 21px; font-size: 21px;
@ -1251,17 +1253,6 @@ ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .tpl-dropdown-menu-noti
color: #999; color: #999;
} }
.tpl-header {
&.active {
padding-left: 0;
}
}
.tpl-header-logo {
background: #fff;
border-bottom: 1px solid #eee;
}
.widget-color-green { .widget-color-green {
border: 1px solid #32c5d2; border: 1px solid #32c5d2;
border-top: 2px solid #32c5d2; border-top: 2px solid #32c5d2;
@ -1318,9 +1309,6 @@ ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .tpl-dropdown-menu-noti
width: 86%; width: 86%;
padding: 22px 30px 25px; padding: 22px 30px 25px;
} }
.tpl-header-search {
display: none;
}
ul.tpl-dropdown-content { ul.tpl-dropdown-content {
position: fixed; position: fixed;
width: 100%; width: 100%;