终版初始化

master
wangxinglong 2021-12-14 17:34:27 +08:00
parent a776f4c445
commit 6a99ae542b
15 changed files with 352 additions and 86 deletions

View File

@ -872,4 +872,14 @@ if (!function_exists('encodeCouponCycle')) {
}
}
if (!function_exists('is_mobile')) {
/**
* 判断手机号
* @param string $num 要验证的手机号
* @return bool
*/
function is_mobile($num)
{
return preg_match("/^1(3|4|5|6|7|8|9)\d{9}$/", $num);
}
}

View File

@ -9,6 +9,7 @@ use app\model\CouponMain;
use app\model\Deduction;
use app\model\Redpack;
use app\model\Score;
use app\model\UsingRule;
use app\repository\AccountRepository;
use app\repository\BusinessRepository;
use app\repository\CouponRepository;
@ -194,7 +195,7 @@ class Coupon extends Base
try {
//检查是否可以领取 0可领取 1已领取
AccountRepository::getInstance()->getCouponReceiveStatusText($account->user_code,$couponMain);//领取状态
AccountRepository::getInstance()->getCouponReceiveStatusText($account,$couponMain);//领取状态
}catch (RepositoryException $e){
return $this->json(4001,$e->getMessage());
}
@ -224,6 +225,7 @@ class Coupon extends Base
"is_verificated" => couponMain::COMMON_OFF,//版本 未知作用
];
CouponRepository::getInstance()->receiveCoupon($data);
$couponMain->save(["received_count"=>Db::raw("received_count + 1")]);
Db::commit();
return $this->json();
}catch (RepositoryException $e){
@ -260,7 +262,7 @@ class Coupon extends Base
}
$coupon = CouponRepository::getInstance()->findById($couponId,[],function ($q){
return $q->with(["couponMain"]);
return $q->with(["couponMain","redpack"]);
});
if($coupon->consumer_code != $account->user_code ){
@ -276,14 +278,27 @@ class Coupon extends Base
if($coupon->on_shelf != CouponMain::on_shelf_on){
return $this->json(4001, "优惠券下架");
}
if(strtotime($coupon->end_time) < $time){
if(!isset($coupon->couponMain) || empty($coupon->couponMain)){
return $this->json(4001, "商家优惠券信息错误");
}
$usingRule = UsingRule::findOne(["coupon_id"=>$coupon->couponMain->id]);
if(empty($usingRule)){
return $this->json(4001, "商家优惠券使用规则信息错误");
}
if(strtotime($coupon->couponMain->end_time) < $time){
return $this->json(4001, "优惠券已过期");
}
if(!isset($coupon->couponMain)||empty($coupon->couponMain)){
return $this->json(4001, "商家优惠券信息错误");
//一天的开始时间
if(strtotime(date("Y-m-d " . $usingRule->day_start_time)) > $time){
return $this->json(4001, "请在当天{$usingRule->day_start_time}-{$usingRule->day_start_time}使用");
}
//一天的结束时间
if(strtotime(date("Y-m-d ".$usingRule->day_end_time)) < $time){
return $this->json(4001, "请在当天{$usingRule->day_start_time}-{$usingRule->day_start_time}使用");
}
$business = BusinessRepository::getInstance()->getModel()->with(["agency"])->where(["code"=>$coupon->couponMain->business_code])->lock(true)->find();
if(empty($business)){
return $this->json(4001, "商家不存在");
@ -298,90 +313,111 @@ class Coupon extends Base
try {
// 1. 修改优惠券状态
$coupon->save([
"is_verificated"=>CouponModel::is_verificated_on,
"used_time"=>date("Y-m-d H:i:s" ,$time),
"verificate_time"=>date("Y-m-d H:i:s" ,$time)
"is_verificated" => CouponModel::is_verificated_on,
"used_time" => date("Y-m-d H:i:s" ,$time),
"verificate_time" => date("Y-m-d H:i:s" ,$time),
]);
$coupon->couponMain->save([
"verification_count" => Db::raw("verification_count + 1"),//已验证数量+1
"using_count" => Db::raw("using_count - 1"),//进行中数量-1
]);
//可分配金额
$deductionMoney = $coupon->couponMain->deduction_money;
$agencyMoney = ($deductionMoney/100) * $coupon->couponMain->commission_agency;
$adminMoney = ($deductionMoney/100) * $coupon->couponMain->commission_admin;
$consumerMoney = ($deductionMoney/100) * $coupon->couponMain->commission_consumer;
$agencyMoney = (($deductionMoney/100) * $coupon->couponMain->commission_agency);
$adminMoney = (($deductionMoney/100) * $coupon->couponMain->commission_admin);
$consumerMoney = (($deductionMoney/100) * $coupon->couponMain->commission_consumer);
$agencyMoney = round($agencyMoney,2); //四舍五入 精确到分
$adminMoney = round($adminMoney,2); //四舍五入 精确到分
$consumerMoney = round($consumerMoney,2); //四舍五入 精确到分
// 2. 写入优惠券流水
$couponBillData = [
"coupon_main_id"=>$coupon->couponMain->id,
"coupon_id"=>$coupon->id,
"user_code"=>$account->user_code,
"agency_code"=>$business->agency_code,
"commission_agency"=>$coupon->couponMain->commission_agency,
"commission_admin"=>$coupon->couponMain->commission_admin,
"commission_consumer"=>$coupon->couponMain->commission_consumer,
"money"=>$coupon->couponMain->money,
"agency_money"=>$agencyMoney,
"admin_money"=>$adminMoney,
"consumer_money"=>$consumerMoney,
"lat"=>$lat,
"lng"=>$lng,
"coupon_main_id" =>$coupon->couponMain->id,
"coupon_id" =>$coupon->id,
"user_code" =>$account->user_code,
"agency_code" =>$business->agency_code,
"commission_agency" =>$coupon->couponMain->commission_agency,
"commission_admin" =>$coupon->couponMain->commission_admin,
"commission_consumer" =>$coupon->couponMain->commission_consumer,
"money" =>$coupon->couponMain->money,
"agency_money" =>$agencyMoney,
"admin_money" =>$adminMoney,
"consumer_money" =>$consumerMoney,
"lat" =>$lat,
"lng" =>$lng,
];
$couponBill = CouponBill::create($couponBillData);
// 3. 写入商家扣费记录
$deductionData = [
"money"=>$deductionMoney,
"business_code"=>$business->code,
"business_name"=>$business->business_name,
"balance"=>$business->balance - $deductionMoney,
"reason"=> sprintf("[%s]验证优惠券[%s]扣除[%s]",$account->nick_name, $coupon->couponMain->name,$deductionMoney),
"coupon_main_id"=> $coupon->couponMain->id,
"coupon_id"=> $coupon->id,
"bill_id"=> $couponBill->id,
"create_time"=> date("Y-m-d H:i:s",$time),
"money" => $deductionMoney,
"business_code" => $business->code,
"business_name" => $business->business_name,
"balance" => $business->balance - $deductionMoney,
"reason" => sprintf("[%s]验证优惠券[%s]扣除[%s]",$account->nick_name, $coupon->couponMain->name,$deductionMoney),
"coupon_main_id" => $coupon->couponMain->id,
"coupon_id" => $coupon->id,
"bill_id" => $couponBill->id,
"create_time" => date("Y-m-d H:i:s",$time),
];
Deduction::create($deductionData);
//4. 商家扣钱
$business->save(["balance"=>$business->balance - $deductionMoney]);
$business->save(["balance"=>Db::raw("balance - {$deductionMoney}")]);
//5. 渠道商加钱
if(isset($business->agency)&&$business->agency){
if(isset($business->agency) && $business->agency){
$business->agency->inc("balance",$agencyMoney)->update();
}
//6. 用户提现到零钱
$RedpackData =[
"mch_billno"=>createUuid(),
"openid"=>$account->open_id,
"user_code"=>$account->user_code,
"money"=>$consumerMoney*100,
];
$redpackModelData = Redpack::create($RedpackData);
//6. 用户提现到零钱 写入红包记录
if($consumerMoney > 0){
$payment = WechatPay::getInstance();
$redpack = $payment->redpack;
$res = $redpackData = [
'mch_billno' => $time.randomStr(0,10),
'send_name' => '红包',
're_openid' => $redpackModelData->openid,
'total_num' => 1, //固定为1可不传
'total_amount' => $redpackModelData->money, //单位为分不小于100
'wishing' => '恭喜发财',
'client_ip' => $this->request->ip(), //可不传,不传则由 SDK 取当前客户端 IP
'act_name' => '验证优惠券得红包',
'remark' => '验证优惠券得红包',//测试备注
// ...
//如果付款过一次了 就查询付款状态
if(isset($coupon->redpack)&&$coupon->redpack){
$result = $payment->transfer->queryBalanceOrder($coupon->redpack->mch_billno);
//var_dump($result);
//企业付款成功
if(isset($result["status"])&&$result["status"]=="SUCCESS"){
Db::commit();
return $this->json();
}
Log::info("查询企业付款失败:".json_encode($result,JSON_UNESCAPED_UNICODE));
}else{
$mch_billno = createUuid();
$amount = $consumerMoney*100;
$toBalanceData = [
'partner_trade_no' =>$mch_billno,// 商户订单号,需保持唯一性(只能是字母或者数字,不能包含有符号)
'openid' => $account->open_id,
'check_name' => 'NO_CHECK',// NO_CHECK不校验真实姓名, FORCE_CHECK强校验真实姓名
'amount' => $amount, //单位为分不小于100
'desc' => '验证优惠券签到',
];
$result = $payment->transfer->toBalance($toBalanceData);
//var_dump($result);
$result = $redpack->sendNormal($redpackData);
var_dump($result);
//付款成功才提交
if(isset($result['payment_no'])){
Db::commit();
return $this->json();
}
Log::info("企业发起付款失败:".json_encode($result,JSON_UNESCAPED_UNICODE));
}
//默认回滚
Db::rollback();
return $this->json(5001, "验证失败,发放红包失败");
}
Db::commit();
return $this->json();
}catch (RepositoryException $e){
Db::rollback();
return $this->json(5001, "服务器错误");
return $this->json(5001, "Repository服务器错误");
}catch (\Exception $e){
echo $e->getMessage();
//echo $e->getMessage();
Db::rollback();
return $this->json(5002, "服务器错误");
}
@ -462,7 +498,10 @@ class Coupon extends Base
$couponMain['money'] = floor($couponMain['money'] * 100) / 100;
$totalMoney = $couponMain['money'] * $couponMain['count'];
if ($account->business["balance"] < $totalMoney) {
//未领取的优惠券
$NotClaimedMoney = CouponRepository::getInstance()->getBusinessNotClaimedCoupon($account->business["code"]);
if ($account->business["balance"] < ($totalMoney + $NotClaimedMoney)) {
return $this->json(4001, '商家余额不足');
}
@ -706,4 +745,50 @@ class Coupon extends Base
return $this->json(0,"success",$couponMain->toArray());
}
/**
* 已使用优惠券 评分
* */
public function score()
{
$accountId = $this->request->user['user_id'] ?? 0;
$couponId = input("couponId/d",0);
$score = input("score/d",5);
if($score > 5|| $score <= 0){
return $this->json(4001, "参数错误");
}
$account = AccountRepository::getInstance()->findById($accountId, [], function ($q) {
return $q->with(['business', 'parent']);
});
if(empty($account)){
return $this->json(6001,"无效的用户");
}
$coupon = CouponRepository::getInstance()->findById($couponId,[],function ($q){
return $q->with(["scoreModel"]);
});
if($coupon->consumer_code != $account->user_code ){
return $this->json(4001, "参数错误");
}
if(isset($score->scoreModel) && $score->scoreModel){
return $this->json(4001, "已经评论过了");
}
try {
$coupon->scoreModel()->save([
"user_code"=>$account->user_code,
"business_code"=>$coupon->business_code,
"score"=>$score,
"coupon_id"=>$coupon->id,
"create_time"=>date("Y-m-d H:i:s"),
]);
return $this->json();
}catch (RepositoryException| \Exception $e){
return $this->json(4001, "评分失败");
}
}
}

View File

@ -8,11 +8,13 @@ use app\repository\BusinessRepository;
use app\repository\CouponRepository;
use app\service\File;
use app\service\Jwt;
use app\service\Tool;
use app\service\wx\WechatApplets;
use app\validate\User as UserValidate;
use EasyWeChat\Kernel\Exceptions\InvalidConfigException;
use Exception;
use think\exception\ValidateException;
use think\facade\Config;
use think\response\Json;
/**
@ -24,7 +26,7 @@ use think\response\Json;
class User extends Base
{
protected $noNeedLogin = [
'login',
'login','checkNewAccount',"decodeMobile"
];
/**
@ -40,6 +42,8 @@ class User extends Base
'nick_name' => $this->request->param('nickName', ''),
'avatar_url' => $this->request->param('avatarUrl', ''),
'gender' => $this->request->param('gender', 0),
'real_name' => $this->request->param('real_name/s', '',"trim"),
'mobile' => $this->request->param('mobile/s', ''),
];
$validate = new UserValidate();
@ -69,6 +73,12 @@ class User extends Base
$nowDate = date('Y-m-d H:i:s');
if (!$account) {
if(empty($params['real_name'])){
return $this->json(4001, '真实姓名不能为空');
}
if(!is_mobile($params['mobile'])){
return $this->json(4001, '手机号格式错误');
}
// 自动注册
$account = $repo->create([
'user_code' => createUuid(), // 用户UUID
@ -79,6 +89,8 @@ class User extends Base
'nick_name' => $params['nick_name'] ?: generateDefaultNickName(),
'avatar_url' => $params['avatar_url'] ?: Account::DEFAULT_AVATAR,
'gender' => $params['gender'],
'real_name' => $params['real_name'],
'mobile' => $params['mobile'],
]);
} else {
@ -226,4 +238,61 @@ class User extends Base
}
}
//检查是新用户还是老用户
public function checkNewAccount()
{
Config::load('extra/wechat', 'wechat');
$config = config('wechat');
$code = $this->request->param('code/s');
$appId = $config["applets_appId"]??'';//appid
$appSecret = $config["applets_appSecret"]??'';//appsecret
$url = 'https://api.weixin.qq.com/sns/jscode2session?appid='
. $appId
. '&secret='
. $appSecret
. '&js_code='
. $code
. '&grant_type=authorization_code';
$data = json_decode(Tool::httpRequest($url, "get"), true);
//返回状态
if (isset($data["openid"])) {
$account = AccountRepository::getInstance()->findByOpenID($data["openid"]);
if(empty($account)){
return $this->json(0, "fail",["isNewAccount"=>true,"session_key"=>$data["session_key"]]);
}
return $this->json(0, "fail",["isNewAccount"=>false,"session_key"=>$data["session_key"]]);
}
return $this->json(0, "fail",["isNewAccount"=>true]);
}
/**
* 解密手机号
* */
public function decodeMobile()
{
$params = input('post.');
$rules = [
'encryptedData|加密数据' => 'require',
'iv|IV' => 'require',
'session_key|会话标识' => 'require',
];
$validate = $this->validateByApi($params, $rules);
if ($validate !== true) {
return $validate;
}
// 解密手机相关数据
$minApp = WechatApplets::getInstance();
$sessionKey = $params['session_key'] ?? '';
$decryptData = $minApp->encryptor->decryptData($sessionKey, $params['iv'], $params['encryptedData']);
$phone = $decryptData['phoneNumber'] ?? ''; // 通过iv和加密数据 解密出手机号
if ($phone) {
return $this->json(0,"success",["mobile"=>$phone]);
}
return $this->json(5001,"获取手机号失败");
}
}

View File

@ -225,7 +225,11 @@ class Coupon extends Base
$data['money'] = floor($data['money'] * 100) / 100;
$totalMoney = $data['money'] * $data['count'];
if ($business["balance"] < $totalMoney) {
//未领取的优惠券
$NotClaimedMoney = CouponRepository::getInstance()->getBusinessNotClaimedCoupon($account->business["code"]);
if ($business["balance"] < ($totalMoney + $NotClaimedMoney)) {
return $this->json(4001, '商家余额不足');
}

View File

@ -41,4 +41,8 @@ class Coupon extends Base
{
return $this->hasOne(Score::class, 'coupon_id', 'id');
}
public function redpack()
{
return $this->hasOne(Redpack::class, 'coupon_id', 'id');
}
}

View File

@ -32,11 +32,13 @@ class CouponMain extends Base
{
return $this->hasOne(UsingRule::class, 'coupon_id',"id");
}
//创建完成之后
public static function onAfterInsert( $obj)
{
$obj->sort = $obj->id;
$obj->using_count = $obj->count;
$obj->received_count = 0;
$obj->verification_count = 0;
$obj->save();
}
}

View File

@ -79,7 +79,7 @@ class CouponRepository extends Repository
//创建优惠券使用规则
$usingRule["coupon_id"] = $couponMain->id;
UsingRule::create($usingRule);
Business::where("code", $data["business_code"])->dec("balance", $totalMoney)->update();
//Business::where("code", $data["business_code"])->dec("balance", $totalMoney)->update();
}
/**

View File

@ -174,6 +174,7 @@ class DictionaryRepository extends Repository
}
return "<div class='disPaperList'><div class='circleOrange'>●</div>该优惠券可以在" . encodeCouponCycle($usingRule->cycle) . "进行使用</div>
<div class='disPaperList'><div class='circleOrange'></div>该优惠券可以在每天的" . $usingRule->day_start_time ."" .$usingRule->day_end_time ."进行使用</div>
<div class='disPaperList'><div class='circleOrange'></div>该优惠券每天一共可以领取". $usingRule->day_total ."</div>
<div class='disPaperList'><div class='circleOrange'></div>该优惠券每天每人可以领取". $usingRule->person_day_total ."</div>
<div class='disPaperList'><div class='circleOrange'></div>该优惠券每人总共可以领取". $usingRule->person_total ."</div>";
}

View File

@ -50,4 +50,60 @@ class Tool
{
return str_replace(' ', '', trim($str));
}
/**
* CURL请求
* @param $url 请求url地址
* @param $method 请求方法 get post
* @param null $postfields post数据数组
* @param array $headers 请求header信息
* @param bool|false $debug 调试开启 默认false
* @return mixed
*/
static function httpRequest($url, $method = "post", $postfields = null, $headers = array(), $debug = false)
{
$method = strtoupper($method);
$ci = curl_init();
/* Curl settings */
curl_setopt($ci, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
curl_setopt($ci, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0");
curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, 60); /* 在发起连接前等待的时间如果设置为0则无限等待 */
curl_setopt($ci, CURLOPT_TIMEOUT, 7); /* 设置cURL允许执行的最长秒数 */
curl_setopt($ci, CURLOPT_RETURNTRANSFER, true);
switch ($method) {
case "POST":
curl_setopt($ci, CURLOPT_POST, true);
if (!empty($postfields)) {
$tmpdatastr = is_array($postfields) ? http_build_query($postfields) : $postfields;
curl_setopt($ci, CURLOPT_POSTFIELDS, $tmpdatastr);
}
break;
default:
curl_setopt($ci, CURLOPT_CUSTOMREQUEST, $method); /* //设置请求方式 */
break;
}
$ssl = preg_match('/^https:\/\//i', $url) ? TRUE : FALSE;
curl_setopt($ci, CURLOPT_URL, $url);
if ($ssl) {
curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, FALSE); // https请求 不验证证书和hosts
curl_setopt($ci, CURLOPT_SSL_VERIFYHOST, FALSE); // 不从证书中检查SSL加密算法是否存在
}
curl_setopt($ci, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ci, CURLOPT_MAXREDIRS, 2);/*指定最多的HTTP重定向的数量这个选项是和CURLOPT_FOLLOWLOCATION一起使用的*/
curl_setopt($ci, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ci, CURLINFO_HEADER_OUT, true);
$response = curl_exec($ci);
$requestinfo = curl_getinfo($ci);
if ($debug) {
echo "=====post data======\r\n";
var_dump($postfields);
echo "=====info===== \r\n";
print_r($requestinfo);
echo "=====response=====\r\n";
print_r($response);
}
curl_close($ci);
return $response;
}
}

View File

@ -49,4 +49,28 @@ trait CouponMainTrait
->where("is_verificated",Coupon::is_verificated_on)
->count();
}
/**
* 获取商户没有被领取的优惠券 需要扣除多少钱
* */
public function getBusinessNotClaimedCoupon($businessCode)
{
$date = date("Y-m-d");
$totalDeductionMoney = 0;
$couponMain = CouponMain::where("business_code", $businessCode)
->where("status", CouponMain::status_on)
->where("on_shelf", CouponMain::on_shelf_on)
->whereTime("start_time", "<=", $date)
->whereTime("end_time", ">=", $date)
->whereRaw(" verification_count < count ")
->field("id,(deduction_money * (count - verification_count)) as total_deduction_money")
->select()
->toArray();
foreach ($couponMain as $item) {
$totalDeductionMoney += $item["total_deduction_money"];
}
return $totalDeductionMoney;
}
}

View File

@ -3,6 +3,7 @@
namespace app\traits;
use app\exception\RepositoryException;
use app\model\Account;
use app\model\CouponMain;
use app\model\UsingRule;
use think\Model;
@ -102,7 +103,7 @@ trait CouponTrait
/**
* 查看某个优惠券的是否可以领取 0 可以领取 1 已领取不能再领取
* @param $accountCode
* @param Account $account
* @param CouponMain $couponMain
* @return void
* @throws RepositoryException
@ -110,11 +111,11 @@ trait CouponTrait
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function getCouponReceiveStatusText($accountCode,CouponMain $couponMain )
public function getCouponReceiveStatusText(Account $account,CouponMain $couponMain )
{
//没有领取记录就可以领取
$ReceiveCount = Coupon::where("coupon_id",$couponMain->id)
->where("consumer_code",$accountCode)->count();
->where("consumer_code",$account->user_code)->count();
//确定使用规则
@ -135,7 +136,7 @@ trait CouponTrait
//单人日限量
$todayReceivesCount = Coupon::where("coupon_id",$couponMain->id)
->where("consumer_code",$accountCode)
->where("consumer_code",$account->user_code)
->whereTime("received_time","between",[date("Y-m-d 00:00:00"),date("Y-m-d 23:59:59")])
->count();
if($todayReceivesCount >= $usingRule->person_day_total ){
@ -147,10 +148,20 @@ trait CouponTrait
throw new RepositoryException("单人总限量达到上限");
}
//白名单
if(!empty($couponMain->white_list)){
if (empty($account->real_name) || empty($account->mobile)) {
throw new RepositoryException("请先授权手机号和真实姓名");
}
if (false === strpos($couponMain->white_list, $account->mobile . "-" . $account->real_name)) {
throw new RepositoryException("您没有在该优惠券白名单内");
}
}
//领取不做限制 使用才做限制
return;
$time = time();
//一天的开始时间
if(strtotime(date("Y-m-d " . $usingRule->day_start_time)) > $time){

View File

@ -16,7 +16,7 @@ class CouponRelease extends Validate
'end_time|结束时间' => 'require|date|checkEndTime',
'name|优惠券名称' => 'require|length:3,32',
'money|金额' => 'require|>:0|<:5000',
// 'deduction_money|扣除金额' => 'require|>=:0|<:5000',
'deduction_money|扣除金额' => 'require|>=:0.1|<:5000',
//'image_url|预览图' => '',
//'using_rule|使用规则' => '',
//'punishing_rule|处罚规则' => '',

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -1,6 +1,6 @@
{layout name="manager/layout" /}
<div class="layui-bg-gray" style="padding: 30px;">
<div class="layui-row layui-col-space15">
<div class="layui-row layui-col-space15 layui-hide">
<div class="layui-col-md3">
<div class="layui-panel" style="border-radius: 8px;">
<div class="layui-row layui-col-space20">
@ -68,7 +68,7 @@
</div>
</div>
<div>
<div class="layui-hide">
<br>
<blockquote class="layui-elem-quote" style="padding: 5px;">分销排行榜
<a class="pull-right" href="javascript:;" layuimini-content-href="/manager/appointment" data-title="客户分析">查看全部</a>
@ -84,31 +84,31 @@
<div class="layui-col-md7">
<div class="layui-row">
<div class="layui-col-md2" style="text-align: center; padding: 40px 20px">
<a href="javascript:;" layuimini-content-href="manager/account" data-title="用户管理">
<a href="javascript:;" layuimini-content-href="/manager/consumer/index" data-title="用户管理">
<i class="fa fa-user-circle-o" style="font-size: 500%;"></i>
</a>
<div><span>用户管理</span></div>
<div><span>消费者管理</span></div>
</div>
<div class="layui-col-md2" style="text-align: center; padding: 40px 20px">
<div class="layui-col-md2 layui-hide" style="text-align: center; padding: 40px 20px">
<a href="javascript:;" layuimini-content-href="manager/channel" data-title="渠道管理">
<i class="fa fa-road" style="font-size: 500%;"></i>
</a>
<div><span>渠道管理</span></div>
</div>
<div class="layui-col-md2" style="text-align: center; padding: 40px 20px">
<div class="layui-col-md2 layui-hide" style="text-align: center; padding: 40px 20px">
<a href="javascript:;" layuimini-content-href="manager/appointment" data-title="预约列表">
<i class="fa fa-american-sign-language-interpreting" style="font-size: 500%;"></i>
</a>
<div><span>预约管理</span></div>
</div>
<div class="layui-col-md2" style="text-align: center; padding: 40px 20px">
<div class="layui-col-md2 layui-hide" style="text-align: center; padding: 40px 20px">
<a href="javascript:;" data-title="报告管理">
<i class="fa fa-newspaper-o" style="font-size: 500%;"></i>
</a>
<div><span>报告管理</span></div>
</div>
<div class="layui-col-md2" style="text-align: center; padding: 40px 20px">
<div class="layui-col-md2 layui-hide" style="text-align: center; padding: 40px 20px">
<a href="javascript:;" layuimini-content-href="manager/overview/customer" data-title="分销排行榜">
<i class="fa fa-bar-chart-o" style="font-size: 500%;"></i>
</a>