This commit is contained in:
parent
a33039406a
commit
c59b7bf460
|
|
@ -82,6 +82,7 @@ class ShopConfigController extends Controller
|
|||
ShopConfig::set('withdraw', 'min_withdraw', $param['min_withdraw']);
|
||||
ShopConfig::set('withdraw', 'max_withdraw', $param['max_withdraw']);
|
||||
ShopConfig::set('withdraw', 'poundage', $param['poundage']);
|
||||
ShopConfig::set('withdraw', 'poundage_type', $param['poundage_type']);
|
||||
$url = URL_RELOAD;
|
||||
return success('添加成功',$url);
|
||||
}
|
||||
|
|
@ -89,6 +90,7 @@ class ShopConfigController extends Controller
|
|||
'min_withdraw' => ShopConfig::get('withdraw', 'min_withdraw'),
|
||||
'max_withdraw' => ShopConfig::get('withdraw', 'max_withdraw'),
|
||||
'poundage' => ShopConfig::get('withdraw', 'poundage'),
|
||||
'poundage_type' => ShopConfig::get('withdraw', 'poundage_type'),
|
||||
];
|
||||
$this->assign([
|
||||
'config' => $config,
|
||||
|
|
@ -122,4 +124,28 @@ class ShopConfigController extends Controller
|
|||
]);
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
//网站设置
|
||||
public function website(Request $request, ShopConfig $model, ShopConfigValidate $validate)
|
||||
{
|
||||
if ($request->isPost()) {
|
||||
$param = $request->param();
|
||||
ShopConfig::set('website', 'APPID', $param['APPID']);
|
||||
ShopConfig::set('website', 'APPSECRET', $param['APPSECRET']);
|
||||
ShopConfig::set('website', 'img_url', $param['img_url']);
|
||||
ShopConfig::set('website', 'tel', $param['tel']);
|
||||
$url = URL_RELOAD;
|
||||
return success('添加成功',$url);
|
||||
}
|
||||
$config = [
|
||||
'APPID' => ShopConfig::get('website', 'APPID'),
|
||||
'APPSECRET' => ShopConfig::get('website', 'APPSECRET'),
|
||||
'img_url' => ShopConfig::get('website', 'img_url'),
|
||||
'tel' => ShopConfig::get('website', 'tel'),
|
||||
];
|
||||
$this->assign([
|
||||
'config' => $config,
|
||||
]);
|
||||
return $this->fetch();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,15 +40,6 @@ class SlideController extends Controller
|
|||
if (!$validate_result) {
|
||||
return error($validate->getError());
|
||||
}
|
||||
//处理图片上传
|
||||
$attachment_img = new \app\common\model\Attachment;
|
||||
$file_img = $attachment_img->upload('img');
|
||||
if ($file_img) {
|
||||
$param['img'] = $file_img->url;
|
||||
} else {
|
||||
return error($attachment_img->getError());
|
||||
}
|
||||
|
||||
|
||||
$result = $model::create($param);
|
||||
|
||||
|
|
@ -62,6 +53,7 @@ class SlideController extends Controller
|
|||
|
||||
$this->assign([
|
||||
'jump_type' => $model->jumpType,
|
||||
'banner_list' => $model->BannerList,
|
||||
]);
|
||||
|
||||
return $this->fetch();
|
||||
|
|
@ -78,16 +70,6 @@ class SlideController extends Controller
|
|||
if (!$validate_result) {
|
||||
return error($validate->getError());
|
||||
}
|
||||
//处理图片上传
|
||||
if (!empty($_FILES['img']['name'])) {
|
||||
$attachment_img = new \app\common\model\Attachment;
|
||||
$file_img = $attachment_img->upload('img');
|
||||
if ($file_img) {
|
||||
$param['img'] = $file_img->url;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$result = $data->save($param);
|
||||
return $result ? success() : error();
|
||||
}
|
||||
|
|
@ -95,6 +77,7 @@ class SlideController extends Controller
|
|||
$this->assign([
|
||||
'data' => $data,
|
||||
'jump_type' => $model->jumpType,
|
||||
'banner_list' => $model->BannerList,
|
||||
|
||||
]);
|
||||
return $this->fetch('add');
|
||||
|
|
|
|||
|
|
@ -0,0 +1,84 @@
|
|||
{extend name='public/base' /}
|
||||
{block name='content'}
|
||||
{include file='public/content_header' /}
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-primary">
|
||||
<!-- 表单 -->
|
||||
<form id="dataForm" class="form-horizontal dataForm" action="" method="post" enctype="multipart/form-data">
|
||||
<!-- 表单字段区域 -->
|
||||
<div class="box-body" style="height: 500px;">
|
||||
<div class="form-group">
|
||||
<label for="APPID" class="col-sm-2 control-label">AppID</label>
|
||||
<div class="col-sm-10 col-md-4">
|
||||
<input id="APPID" name="APPID" value="{$config.APPID|default=''}" placeholder="请输入AppID" type="text" class="form-control field-text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="APPSECRET" class="col-sm-2 control-label">AppSecret</label>
|
||||
<div class="col-sm-10 col-md-4">
|
||||
<input id="APPSECRET" name="APPSECRET" value="{$config.APPSECRET|default=''}" placeholder="请输入AppSecret" type="text" class="form-control field-text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="img_url" class="col-sm-2 control-label">图片访问地址</label>
|
||||
<div class="col-sm-10 col-md-4">
|
||||
<input id="img_url" name="img_url" value="{$config.img_url|default=''}" placeholder="请输入图片访问地址" type="text" class="form-control field-text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tel" class="col-sm-2 control-label">联系电话</label>
|
||||
<div class="col-sm-10 col-md-4">
|
||||
<input id="tel" name="tel" value="{$config.tel|default=''}" placeholder="请输入联系电话" type="text" class="form-control field-text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 表单底部 -->
|
||||
<div class="box-footer">
|
||||
{:token()}
|
||||
<div class="col-sm-2">
|
||||
</div>
|
||||
<div class="col-sm-10 col-md-4">
|
||||
<div class="btn-group">
|
||||
<button type="submit" class="btn flat btn-info dataFormSubmit">
|
||||
保存
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<script>
|
||||
/** 表单验证 **/
|
||||
$('#dataForm').validate({
|
||||
rules: {
|
||||
'type': {
|
||||
required: true,
|
||||
},
|
||||
'name': {
|
||||
required: true,
|
||||
},
|
||||
'value': {
|
||||
required: true,
|
||||
},
|
||||
|
||||
},
|
||||
messages: {
|
||||
'type': {
|
||||
required: "类型不能为空",
|
||||
},
|
||||
'name': {
|
||||
required: "名称不能为空",
|
||||
},
|
||||
'value': {
|
||||
required: "值不能为空",
|
||||
},
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
|
|
@ -25,13 +25,20 @@
|
|||
</div>
|
||||
<label for="name" class="control-label">元</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="poundage_type" class="col-sm-2 control-label">手续费类型</label>
|
||||
<div class="col-sm-10 col-md-4 layui-form">
|
||||
<input type="radio" name="poundage_type" class="poundage_type" value="1" title="固定" {if isset($config.poundage_type) && $config.poundage_type=='1'}checked{/if}>
|
||||
<input type="radio" name="poundage_type" class="poundage_type" value="2" title="百分比" {if isset($config.poundage_type) && $config.poundage_type=='2'}checked{/if}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="poundage" class="col-sm-2 control-label">提现手续费</label>
|
||||
<div class="col-sm-10 col-md-4">
|
||||
<input id="poundage" name="poundage" value="{$config.poundage|default=''}" placeholder="请输入提现手续费" type="text" class="form-control field-text">
|
||||
<span id="min_withdraw-error" class="help-block">会员提现时收取的手续费占比。</span>
|
||||
<span id="min_withdraw-error" class="help-block">会员提现时收取的手续费。</span>
|
||||
</div>
|
||||
<label for="name" class="control-label">%</label>
|
||||
<label for="name" class="control-label"></label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 表单底部 -->
|
||||
|
|
@ -55,5 +62,9 @@
|
|||
<script>
|
||||
/** 表单验证 **/
|
||||
$('#dataForm').validate();
|
||||
layui.use('form', function(){
|
||||
var form = layui.form;
|
||||
form.render();
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
|
|
@ -80,7 +80,24 @@ ul.albums li a.btn-fm_z{
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="img" class="col-sm-2 control-label">头像</label>
|
||||
<label for="alias" class="col-sm-2 control-label">广告位置</label>
|
||||
<div class="col-sm-10 col-md-4">
|
||||
<select name="alias" id="alias" class="form-control field-select"
|
||||
data-placeholder="请选择广告位置">
|
||||
<option value=""></option>
|
||||
{foreach name='banner_list' id='item'}
|
||||
<option value="{$item.bm}" {if isset($data) &&
|
||||
$data.alias==$item.bm}selected{/if}>{$item.name}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('#alias').select2();
|
||||
</script>
|
||||
<div class="form-group">
|
||||
<label for="img" class="col-sm-2 control-label">图片</label>
|
||||
<ul class="albums" id="albums">
|
||||
<li id="nophoto" ><img src="{if isset($data.img)}{$data.img}{else}/static/admin/images/nophoto_100x100.png{/if}" style="width: 100px;height: 100px;"></li>
|
||||
<input type="hidden" name="img" id="img" value="{$data.img|default=''}">
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@
|
|||
<tr>
|
||||
<tr>
|
||||
<th>
|
||||
<div class="layui-table-cell" style="width:100px;text-align:center;">提现单号</div>
|
||||
<div class="layui-table-cell" style="width:200px;text-align:center;">提现单号</div>
|
||||
</th>
|
||||
<th>
|
||||
<div style="width:380px;text-align:center;">用户信息</div>
|
||||
|
|
@ -137,7 +137,7 @@
|
|||
{foreach name="data" item="item"}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="layui-table-cell" style="width:100px;text-align:center;">{$item.sn}</div>
|
||||
<div class="layui-table-cell" style="width:200px;text-align:center;">{$item.sn}</div>
|
||||
</td>
|
||||
<td class="layui-table-col-special">
|
||||
<div class="layui-table-cell laytable-cell-1-0-2">
|
||||
|
|
@ -157,7 +157,6 @@
|
|||
<p>提现手机:{$item.real_tel}</p>
|
||||
<p>提现账户:{$item.account}</p>
|
||||
{if $item.type eq 3}
|
||||
<p>提现银行:{$item.bank}</p>
|
||||
<p>提现开户:{$item.subbank}</p>
|
||||
{/if}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
<?php
|
||||
|
||||
use think\response\Json;
|
||||
|
||||
use app\common\model\Slide;
|
||||
use app\common\model\ShopConfig;
|
||||
use tools\Crypt;
|
||||
if(!function_exists('success')){
|
||||
/**
|
||||
* 操作成功
|
||||
|
|
@ -113,3 +115,31 @@ if(!function_exists('error_404')){
|
|||
return result($msg, $data, $code);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('get_ad')) {
|
||||
/**
|
||||
* 广告列表
|
||||
* @param string $alias 广告别名
|
||||
* @param string $num。显示数量
|
||||
* @return li
|
||||
*/
|
||||
function get_ad($alias, $num = '999')
|
||||
{
|
||||
$_malladviceModel = new Slide();
|
||||
$where = 'alias="'.$alias.'"';
|
||||
$malladvice_list = $_malladviceModel->where($where)->limit($num)->order('sort_number desc')->select();
|
||||
$ad = array();
|
||||
$web_url = ShopConfig::get('website', 'img_url');
|
||||
foreach ($malladvice_list as $key => $row) {
|
||||
$ad[$key]['id'] = $row['id'];
|
||||
if($row['jump_type']==1){
|
||||
$ad[$key]['unionid'] = Crypt::encrypt($row['jump_target']);
|
||||
}else{
|
||||
$ad[$key]['url'] = $row['jump_target'];
|
||||
}
|
||||
$ad[$key]['type'] = $row['jump_type'];
|
||||
$ad[$key]['img'] = $web_url . $row['img'];
|
||||
}
|
||||
return $ad;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,14 +4,18 @@
|
|||
namespace app\api\controller;
|
||||
|
||||
use app\common\model\User;
|
||||
use app\common\validate\UserValidate;
|
||||
use app\common\model\ShopConfig;
|
||||
use Exception;
|
||||
use think\Request;
|
||||
use think\response\Json;
|
||||
use tools\Crypt;
|
||||
use tools\WXBizDataCrypt;
|
||||
|
||||
class AuthController extends Controller
|
||||
{
|
||||
|
||||
protected $authExcept = [
|
||||
'login'
|
||||
];
|
||||
|
||||
/**d
|
||||
* 登录并发放token
|
||||
|
|
@ -20,25 +24,86 @@ class AuthController extends Controller
|
|||
* @param UserValidate $validate
|
||||
* @return Json|void
|
||||
*/
|
||||
public function login(Request $request, User $model, UserValidate $validate)
|
||||
public function login(Request $request,User $fumodel)
|
||||
{
|
||||
$param = $request->param();
|
||||
//数据验证
|
||||
$validate_result = $validate->scene('login')->check($param);
|
||||
if (!$validate_result) {
|
||||
return error($validate->getError());
|
||||
$avatar =$param['avatar']??'';
|
||||
$nickname =$param['nickname']??'';
|
||||
$code =$param['code']??'';
|
||||
$distribution_code =$param['distribution_code']??'';
|
||||
$encryptedData =$param['encryptedData']??'';
|
||||
$iv =$param['iv']??'';
|
||||
if(!$avatar || !$nickname || !$code){
|
||||
return error('参数不足');
|
||||
}
|
||||
$user_info = $this->get_openid($code,$encryptedData,$iv);
|
||||
if (!$user_info['openid']) {
|
||||
return error('授权失败');
|
||||
}
|
||||
$where['mobile'] = array('EQ',$user_info['tel']);
|
||||
$userinfo = $fumodel->field('id,avatar,nickname,openid')->where($where)->find();
|
||||
if($userinfo && !$userinfo['openid']){
|
||||
$data_login['login_ip']=$request->ip();
|
||||
$data_login['login_time']=time();
|
||||
$data_login['openid']=$user_info['openid'];
|
||||
$fumodel->where('id', $userinfo['id'])->update($data_login);
|
||||
$token = $this->getToken($userinfo['id']);
|
||||
$uid=Crypt::encrypt($userinfo['id']);
|
||||
return success(['token' => $token,'uid'=>$uid], '登录成功');
|
||||
}else if($userinfo && $userinfo['openid']){
|
||||
$data_login['login_ip']=$request->ip();
|
||||
$data_login['login_time']=time();
|
||||
$fumodel->where('id', $userinfo['id'])->update($data_login);
|
||||
$token = $this->getToken($userinfo['id']);
|
||||
$uid=Crypt::encrypt($userinfo['id']);
|
||||
return success(['token' => $token,'uid'=>$uid], '登录成功');
|
||||
}
|
||||
|
||||
//登录逻辑
|
||||
// 启动事务
|
||||
$fumodel->startTrans();
|
||||
try {
|
||||
$user = $model::login($param);
|
||||
$token = $this->getToken($user->id);
|
||||
$res['sn'] =create_user_sn();
|
||||
$res['distribution_code'] =generate_invite_code();
|
||||
$res['nickname']=$nickname;
|
||||
$res['username'] = '用户'.$res['sn'];
|
||||
$res['avatar'] = $avatar;
|
||||
$res['openid'] = $user_info['openid'];
|
||||
$res['mobile'] = $user_info['tel'];
|
||||
$res['create_time'] = time();
|
||||
$res['login_ip']=$request->ip();
|
||||
$res['login_time']=time();
|
||||
$fumodel::create($res);
|
||||
$uid=$fumodel->getLastInsID();
|
||||
//分销
|
||||
if($distribution_code){
|
||||
$fumodel->code($distribution_code,$uid);
|
||||
}
|
||||
$fumodel->commit();
|
||||
} catch (Exception $e) {
|
||||
return error($e->getMessage());
|
||||
$fumodel->rollback();
|
||||
return client_error($e->getMessage());
|
||||
}
|
||||
|
||||
$uid=Crypt::encrypt($uid);
|
||||
$token = $this->getToken($uid);
|
||||
//返回数据
|
||||
return success(['token' => $token], '登录成功');
|
||||
return success(['token' => $token,'uid'=>$uid], '注册成功');
|
||||
}
|
||||
|
||||
//获取用户临时code 用来去获取openid
|
||||
public function get_openid($code,$encryptedData,$iv)
|
||||
{
|
||||
|
||||
$APPID =ShopConfig::get('website', 'APPID');
|
||||
$APPSECRET=ShopConfig::get('website', 'APPSECRET');
|
||||
$url = 'https://api.weixin.qq.com/sns/jscode2session?appid=' . $APPID. '&secret=' . $APPSECRET. '&js_code=' . $code . '&grant_type=authorization_code';
|
||||
$val = curl_request($url);
|
||||
$user_info = json_decode($val,true);
|
||||
$encryptedData=urldecode($encryptedData);
|
||||
$iv = urldecode($iv);
|
||||
$pc = new WXBizDataCrypt($APPID['value'],$user_info['session_key']);
|
||||
$errCode = $pc->decryptData($encryptedData,$iv,$data);
|
||||
$data1 = json_decode($data, true);
|
||||
$user_info['tel']=$data1['purePhoneNumber'];
|
||||
return $user_info;
|
||||
}
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@ namespace app\api\controller;
|
|||
|
||||
use think\Request;
|
||||
use app\api\traits\ApiAuth;
|
||||
|
||||
use app\common\model\ShopConfig;
|
||||
class Controller
|
||||
{
|
||||
use ApiAuth;
|
||||
|
|
@ -49,6 +49,7 @@ class Controller
|
|||
$this->page = $this->param['page'] ?? 1;
|
||||
$this->limit = $this->param['limit'] ?? 10;
|
||||
$this->id = $this->param['id'] ?? 0;
|
||||
$this->img_url=ShopConfig::get('website', 'img_url');
|
||||
|
||||
//limit防止过大处理
|
||||
$this->limit = $this->limit <= 100 ? $this->limit : 100;
|
||||
|
|
|
|||
|
|
@ -5,17 +5,204 @@
|
|||
*/
|
||||
|
||||
namespace app\api\controller;
|
||||
use app\common\model\User;
|
||||
use app\common\model\AccountLog;
|
||||
use app\common\model\Goods;
|
||||
use app\common\model\Order;
|
||||
use app\common\model\MallImage;
|
||||
use app\common\model\GoodsCategory;
|
||||
|
||||
use app\common\model\ShopConfig;
|
||||
use tools\Crypt;
|
||||
use think\Request;
|
||||
class IndexController extends Controller
|
||||
{
|
||||
|
||||
protected $authExcept = [
|
||||
'index'
|
||||
'home','recommend_goods','goods_info','goods_list','category_list'
|
||||
];
|
||||
|
||||
public function index()
|
||||
public function home(Request $request,AccountLog $almodel,Goods $gmodel,Order $omodel,User $umodel)
|
||||
{
|
||||
return success('index');
|
||||
|
||||
echo $token = $this->getToken(1).'|';
|
||||
// echo $uid=Crypt::encrypt(1);
|
||||
|
||||
$param = $request->param();
|
||||
$uid = $param['uid']?Crypt::decrypt($param['uid']):'';
|
||||
//首页轮播
|
||||
$carousel = get_ad('carousel',6);
|
||||
|
||||
//精品推荐
|
||||
$merchant = get_ad('merchant',6);
|
||||
|
||||
//每日收益
|
||||
$profit_num=ShopConfig::get('shouyi', 'num');
|
||||
//弹窗配置
|
||||
$goods_config=array();
|
||||
$amount_today='0.00';
|
||||
$amount_yesterday='0.00';
|
||||
$amount_tuiguang='0.00';
|
||||
if($uid){
|
||||
$where[]=array('source_type','in','100,110,120');
|
||||
$where[]=array('user_id','eq',$uid);
|
||||
//今日收益
|
||||
$amount_today = $almodel
|
||||
->where($where)
|
||||
->whereTime('create_time', 'today')
|
||||
->sum('change_amount');
|
||||
//昨天收益
|
||||
$amount_yesterday = $almodel
|
||||
->where($where)
|
||||
->whereTime('create_time', 'yesterday')
|
||||
->sum('change_amount');
|
||||
//推广收益
|
||||
$amount_tuiguang = $almodel
|
||||
->where(['source_type' =>100,'user_id'=>$uid])
|
||||
->sum('change_amount');
|
||||
|
||||
$goods_config['is_open']=ShopConfig::get('goods', 'is_open');
|
||||
$is_first=ShopConfig::get('goods', 'is_first');
|
||||
$goods_id=ShopConfig::get('goods', 'goods_id');
|
||||
if($is_first==1){
|
||||
$user_count=$umodel->where(array('user_level_id'=>1))->count();
|
||||
if($user_count==0){
|
||||
$goods_config['is_open']=0;
|
||||
}
|
||||
}
|
||||
$ty_count=$omodel->where(array('order_type'=>2,'goods_id'=>$goods_id))->count();
|
||||
if($ty_count>0){
|
||||
$goods_config['is_open']=0;
|
||||
}
|
||||
$goods_config['day']=ShopConfig::get('goods', 'day');
|
||||
if($goods_id){
|
||||
$goods_info= $gmodel
|
||||
->alias('g')
|
||||
->field("mi.thumb_image as img, g.name")
|
||||
->join('mall_image mi', 'mi.union_id= g.id and is_cover=1 and mi.type=1', 'LEFT')
|
||||
->where(array('g.id'=>$goods_id))
|
||||
->find();
|
||||
$goods_info['img']=$this->img_url.$goods_info['img'];
|
||||
$goods_config['goods_info'] =$goods_info;
|
||||
}
|
||||
}
|
||||
$data = [
|
||||
'carousel' =>$carousel,//首页轮播
|
||||
'merchant' => $merchant,//精品推荐
|
||||
'profit_num'=>$profit_num,//每日收益
|
||||
'amount_today'=>$amount_today,//今日收益
|
||||
'amount_yesterday'=>$amount_yesterday,//昨天收益
|
||||
'amount_tuiguang'=>$amount_tuiguang,//推广收益
|
||||
'goods_config'=>$goods_config,//弹窗配置
|
||||
];
|
||||
return success($data);
|
||||
}
|
||||
|
||||
//精品推荐
|
||||
public function recommend_goods(Request $request,Goods $model)
|
||||
{
|
||||
$param = $request->param();
|
||||
$size=$param['size']>0?$param['size']:12;
|
||||
$page_l=$param['page']>1?$param['page']:1;
|
||||
$page=$size * ($page_l - 1);
|
||||
$goods_count = $model
|
||||
->alias('g')
|
||||
->where(array('is_recommend'=>1))
|
||||
->join('mall_image mi', 'mi.union_id= g.id and is_cover=1 and mi.type=1', 'LEFT')
|
||||
->count();
|
||||
$totalPages = ceil($goods_count / $size);
|
||||
$goods_list = $model
|
||||
->alias('g')
|
||||
->field("mi.thumb_image as img, g.name,g.attr,g.price,g.order_num,g.id as goods_id")
|
||||
->join('mall_image mi', 'mi.union_id= g.id and is_cover=1 and mi.type=1', 'LEFT')
|
||||
->where(array('is_recommend'=>1))
|
||||
->limit($page, $size)
|
||||
->order('g.sort_number ASC')
|
||||
->select();
|
||||
if (!$goods_list) {
|
||||
return client_error('暂无数据');
|
||||
}
|
||||
foreach ($goods_list as $k1 => $v1) {
|
||||
$goods_list[$k1]['img'] =$this->img_url.$v1['img'];
|
||||
$goods_list[$k1]['goods_id'] = Crypt::encrypt($v1['goods_id']);
|
||||
}
|
||||
$page=array(
|
||||
'count'=>$goods_count,
|
||||
'num'=>$page_l,
|
||||
'size'=>$size,
|
||||
'page'=>$totalPages
|
||||
);
|
||||
return success(array('list'=>$goods_list,'page'=>$page));
|
||||
}
|
||||
|
||||
//商品列表
|
||||
public function goods_list(Request $request,Goods $model)
|
||||
{
|
||||
$param = $request->param();
|
||||
$size=$param['size']>0?$param['size']:12;
|
||||
$page_l=$param['page']>1?$param['page']:1;
|
||||
$page=$size * ($page_l - 1);
|
||||
$where[]=array('status','=',1);
|
||||
$cid = $param['cid']?Crypt::decrypt($param['cid']):'';
|
||||
if($cid){
|
||||
$where[]=array('goods_category_id','=',$cid);
|
||||
}
|
||||
$goods_count = $model
|
||||
->alias('g')
|
||||
->where($where)
|
||||
->join('mall_image mi', 'mi.union_id= g.id and is_cover=1 and mi.type=1', 'LEFT')
|
||||
->count();
|
||||
$totalPages = ceil($goods_count / $size);
|
||||
$goods_list = $model
|
||||
->alias('g')
|
||||
->field("mi.thumb_image as img,g.name,g.attr,g.price,g.order_num,g.id as goods_id")
|
||||
->join('mall_image mi', 'mi.union_id= g.id and is_cover=1 and mi.type=1', 'LEFT')
|
||||
->where($where)
|
||||
->limit($page, $size)
|
||||
->order('g.sort_number ASC')
|
||||
->select();
|
||||
if (!$goods_list) {
|
||||
return client_error('暂无数据');
|
||||
}
|
||||
foreach ($goods_list as $k1 => $v1) {
|
||||
$goods_list[$k1]['img'] =$this->img_url.$v1['img'];
|
||||
$goods_list[$k1]['goods_id'] = Crypt::encrypt($v1['goods_id']);
|
||||
}
|
||||
$page=array(
|
||||
'count'=>$goods_count,
|
||||
'num'=>$page_l,
|
||||
'size'=>$size,
|
||||
'page'=>$totalPages
|
||||
);
|
||||
return success(array('list'=>$goods_list,'page'=>$page));
|
||||
}
|
||||
|
||||
//商品详情
|
||||
public function goods_info(Request $request,Goods $model,MallImage $mimodel)
|
||||
{
|
||||
$param = $request->param();
|
||||
$gid = $param['gid']?Crypt::decrypt($param['gid']):'';
|
||||
if(!$gid){
|
||||
return client_error('暂无数据');
|
||||
}
|
||||
$goods_info=$model->field('name,attr,price,order_num,id as goods_id,detail')->where(array('id'=>$gid,'status'=>1))->find();
|
||||
$goods_info['goods_id'] = Crypt::encrypt($goods_info['goods_id']);
|
||||
$img_list=$mimodel->field('thumb_image,ori_image')->where(array('union_id'=>$gid,'type'=>1))->select();
|
||||
foreach ($img_list as $key => $value) {
|
||||
$img_list[$key]['thumb_image'] =$this->img_url.$value['thumb_image'];
|
||||
$img_list[$key]['ori_image'] =$this->img_url.$value['ori_image'];
|
||||
}
|
||||
return success(array('info'=>$goods_info,'img_list'=>$img_list));
|
||||
}
|
||||
|
||||
//商品分类
|
||||
public function category_list(Request $request,GoodsCategory $gcmodel)
|
||||
{
|
||||
$category_list=$gcmodel->field('name,id as cid')->select();
|
||||
foreach ($category_list as $k1 => $v1) {
|
||||
$category_list[$k1]['cid'] = Crypt::encrypt($v1['cid']);
|
||||
}
|
||||
return success($category_list);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -3,77 +3,403 @@
|
|||
namespace app\api\controller;
|
||||
|
||||
use app\common\model\User;
|
||||
use app\common\validate\UserValidate;
|
||||
use app\common\model\Order;
|
||||
use app\common\validate\WithdrawAccountValidate;
|
||||
use app\common\model\ShopConfig;
|
||||
use app\common\model\AccountLog;
|
||||
use app\common\model\WithdrawApply;
|
||||
use app\common\model\WithdrawAccount;
|
||||
use think\Request;
|
||||
use tools\Crypt;
|
||||
|
||||
class UserController extends Controller
|
||||
{
|
||||
|
||||
//列表
|
||||
public function index(User $model)
|
||||
//我的设备
|
||||
public function equipment(Request $request,Order $model)
|
||||
{
|
||||
$data = $model->field('id,nickname,avatar')->page($this->page, $this->limit)->select();
|
||||
$param = $request->param();
|
||||
$uid = $param['uid']?Crypt::decrypt($param['uid']):'';
|
||||
if(!$uid){
|
||||
return unauthorized('请先授权');
|
||||
}
|
||||
$size=$param['size']>0?$param['size']:12;
|
||||
$page_l=$param['page']>1?$param['page']:1;
|
||||
$page=$size * ($page_l - 1);
|
||||
$order_count = $model
|
||||
->alias('o')
|
||||
->where(array('o.user_id'=>$uid))
|
||||
->join('mall_image mi', 'mi.union_id= o.goods_id and is_cover=1 and mi.type=1', 'LEFT')
|
||||
->count();
|
||||
$totalPages = ceil($order_count / $size);
|
||||
$order_list = $model
|
||||
->alias('o')
|
||||
->field("mi.thumb_image as img, o.goods_name,o.attr,o.order_price,number,o.id as order_id,o.create_time,o.end_time")
|
||||
->where(array('o.user_id'=>$uid))
|
||||
->join('mall_image mi', 'mi.union_id= o.goods_id and is_cover=1 and mi.type=1', 'LEFT')
|
||||
->limit($page, $size)
|
||||
->order('o.create_time DESC')
|
||||
->select();
|
||||
if (!$order_list) {
|
||||
return client_error('暂无数据');
|
||||
}
|
||||
foreach ($order_list as $k1 => $v1) {
|
||||
$order_list[$k1]['img'] =$this->img_url.$v1['img'];
|
||||
$order_list[$k1]['order_id'] = Crypt::encrypt($v1['order_id']);
|
||||
}
|
||||
$page=array(
|
||||
'count'=>$order_count,
|
||||
'num'=>$page_l,
|
||||
'size'=>$size,
|
||||
'page'=>$totalPages
|
||||
);
|
||||
return success(array('list'=>$order_list,'page'=>$page));
|
||||
}
|
||||
|
||||
//收益统计
|
||||
public function profit_census(Request $request,AccountLog $almodel,WithdrawApply $wamodel,User $umodel)
|
||||
{
|
||||
$param = $request->param();
|
||||
$uid = $param['uid']?Crypt::decrypt($param['uid']):'';
|
||||
if(!$uid){
|
||||
return unauthorized('请先授权');
|
||||
}
|
||||
$type = $param['type']??'1';
|
||||
|
||||
//积分规则
|
||||
$integral_rule =ShopConfig::get('policy', 'integral_rule');
|
||||
|
||||
//个人收益
|
||||
if($type==1){
|
||||
$where[]=array('source_type','in','100,110,120');
|
||||
$where[]=array('user_id','eq',$uid);
|
||||
//今日收益
|
||||
$amount_today = $almodel
|
||||
->where($where)
|
||||
->whereTime('create_time', 'today')
|
||||
->sum('change_amount');
|
||||
//已提现金额
|
||||
$amount_ytx = $wamodel->where(array('user_id'=>$uid,'status'=>2))->sum('money');
|
||||
//可提现金额
|
||||
$amount_ktx = $umodel->where(array('id'=>$uid))->value('integral');
|
||||
$data=array(
|
||||
'amount_today'=>$amount_today,
|
||||
'amount_ytx'=>$amount_ytx,
|
||||
'amount_ktx'=>$amount_ktx,
|
||||
'integral_rule'=>$integral_rule,
|
||||
);
|
||||
return success($data);
|
||||
}
|
||||
|
||||
if($type==2){
|
||||
$where[]=array('user_id','eq',$uid);
|
||||
//今日收益
|
||||
$amount_today = $almodel
|
||||
->where($where)
|
||||
->where(array('source_type'=>100))
|
||||
->whereTime('create_time', 'today')
|
||||
->sum('change_amount');
|
||||
//累计收益
|
||||
$amount_sum = $almodel
|
||||
->where($where)
|
||||
->where(array('source_type'=>100))
|
||||
->sum('change_amount');
|
||||
//推广人数
|
||||
$user_fans =$umodel->where([['first_leader|second_leader', '=', $uid]])->count();
|
||||
$data=array(
|
||||
'amount_today'=>$amount_today,
|
||||
'amount_sum'=>$amount_sum,
|
||||
'user_fans'=>$user_fans,
|
||||
'integral_rule'=>$integral_rule,
|
||||
);
|
||||
return success($data);
|
||||
}
|
||||
}
|
||||
|
||||
//提现记录
|
||||
public function withdraw(Request $request,WithdrawApply $wamodel)
|
||||
{
|
||||
$param = $request->param();
|
||||
$uid = $param['uid']?Crypt::decrypt($param['uid']):'';
|
||||
if(!$uid){
|
||||
return unauthorized('请先授权');
|
||||
}
|
||||
$size=$param['size']>0?$param['size']:12;
|
||||
$page_l=$param['page']>1?$param['page']:1;
|
||||
$page=$size * ($page_l - 1);
|
||||
$withdraw_count = $wamodel
|
||||
->where(array('user_id'=>$uid))
|
||||
->count();
|
||||
$totalPages = ceil($withdraw_count / $size);
|
||||
$withdraw_list = $wamodel
|
||||
->field("money,create_time,poundage,status")
|
||||
->where(array('user_id'=>$uid))
|
||||
->limit($page, $size)
|
||||
->order('create_time DESC')
|
||||
->select();
|
||||
if (!$withdraw_list) {
|
||||
return client_error('暂无数据');
|
||||
}
|
||||
foreach ($withdraw_list as $key => $value) {
|
||||
$withdraw_list[$key]['status_text'] =$wamodel->STATUS_TYPE[$value['status']];
|
||||
}
|
||||
$page=array(
|
||||
'count'=>$withdraw_count,
|
||||
'num'=>$page_l,
|
||||
'size'=>$size,
|
||||
'page'=>$totalPages
|
||||
);
|
||||
return success(array('list'=>$withdraw_list,'page'=>$page));
|
||||
}
|
||||
|
||||
//收益记录
|
||||
public function account_log(Request $request,AccountLog $almodel)
|
||||
{
|
||||
$param = $request->param();
|
||||
$uid = $param['uid']?Crypt::decrypt($param['uid']):'';
|
||||
if(!$uid){
|
||||
return unauthorized('请先授权');
|
||||
}
|
||||
$size=$param['size']>0?$param['size']:12;
|
||||
$page_l=$param['page']>1?$param['page']:1;
|
||||
$page=$size * ($page_l - 1);
|
||||
$where[]=array('user_id','=',$uid);
|
||||
$type = $param['type']??'';
|
||||
if($type){
|
||||
$where[]=array('source_type','=',$type);
|
||||
}
|
||||
$accountlog_count = $almodel
|
||||
->alias('al')
|
||||
->where($where)
|
||||
->join('user u', 'u.id= al.user_id')
|
||||
->count();
|
||||
$totalPages = ceil($accountlog_count / $size);
|
||||
$accountlog_list = $almodel
|
||||
->alias('al')
|
||||
->field("change_amount,al.create_time,source_type,avatar,nickname")
|
||||
->where($where)
|
||||
->join('user u', 'u.id= al.user_id')
|
||||
->limit($page, $size)
|
||||
->order('create_time DESC')
|
||||
->select();
|
||||
if (!$accountlog_list) {
|
||||
return client_error('暂无数据');
|
||||
}
|
||||
foreach ($accountlog_list as $key => $value) {
|
||||
$accountlog_list[$key]['avatar'] =$this->img_url.$value['avatar'];
|
||||
$accountlog_list[$key]['source_type_text'] =$almodel->SOURCE_TYPE[$value['source_type']];
|
||||
}
|
||||
$amount_sum = $almodel
|
||||
->where($where)
|
||||
->sum('change_amount');
|
||||
$page=array(
|
||||
'count'=>$accountlog_count,
|
||||
'num'=>$page_l,
|
||||
'size'=>$size,
|
||||
'page'=>$totalPages
|
||||
);
|
||||
return success(array('list'=>$accountlog_list,'page'=>$page,'amount_sum'=>$amount_sum));
|
||||
}
|
||||
|
||||
//邀请明细
|
||||
public function invitation_user(Request $request,User $umodel)
|
||||
{
|
||||
$param = $request->param();
|
||||
$uid = $param['uid']?Crypt::decrypt($param['uid']):'';
|
||||
if(!$uid){
|
||||
return unauthorized('请先授权');
|
||||
}
|
||||
$size=$param['size']>0?$param['size']:12;
|
||||
$page_l=$param['page']>1?$param['page']:1;
|
||||
$page=$size * ($page_l - 1);
|
||||
$user_count = $umodel
|
||||
->where([['first_leader|second_leader', '=', $uid]])
|
||||
->count();
|
||||
$totalPages = ceil($user_count / $size);
|
||||
$user_list = $umodel
|
||||
->field("create_time,avatar,nickname")
|
||||
->where([['first_leader|second_leader', '=', $uid]])
|
||||
->limit($page, $size)
|
||||
->order('create_time DESC')
|
||||
->select();
|
||||
if (!$user_list) {
|
||||
return client_error('暂无数据');
|
||||
}
|
||||
foreach ($user_list as $key => $value) {
|
||||
$user_list[$key]['avatar'] =$this->img_url.$value['avatar'];
|
||||
}
|
||||
$page=array(
|
||||
'count'=>$user_count,
|
||||
'num'=>$page_l,
|
||||
'size'=>$size,
|
||||
'page'=>$totalPages
|
||||
);
|
||||
return success(array('list'=>$user_list,'page'=>$page));
|
||||
}
|
||||
|
||||
//用户中心
|
||||
public function userhome(Request $request,User $umodel,Order $omodel)
|
||||
{
|
||||
$param = $request->param();
|
||||
$uid = $param['uid']?Crypt::decrypt($param['uid']):'';
|
||||
if(!$uid){
|
||||
return unauthorized('请先授权');
|
||||
}
|
||||
$user_info=$umodel->field('avatar,nickname,user_level_id as level,integral,mobile')->where(array('id'=>$uid))->find();
|
||||
if($user_info['level']==2){
|
||||
$time=time();
|
||||
$order_count=$omodel->where('end_time>='.$time.' and user_id='.$uid)->count();
|
||||
if($order_count==0){
|
||||
$user_info['level']=1;
|
||||
}
|
||||
}
|
||||
$user_info['avatar'] =$this->img_url.$user_info['avatar'];
|
||||
//联系电话
|
||||
$tel =ShopConfig::get('website', 'tel');
|
||||
$data=array(
|
||||
'user_info'=>$user_info,
|
||||
'tel'=>$tel
|
||||
);
|
||||
return success($data);
|
||||
}
|
||||
|
||||
//新增
|
||||
public function save(Request $request, User $model, UserValidate $validate)
|
||||
|
||||
//提现账户列表
|
||||
public function account_list(Request $request,WithdrawAccount $wamodel)
|
||||
{
|
||||
$param = $request->param();
|
||||
$param = $request->param();
|
||||
$uid = $param['uid']?Crypt::decrypt($param['uid']):'';
|
||||
if(!$uid){
|
||||
return unauthorized('请先授权');
|
||||
}
|
||||
$account_list=$wamodel->field('real_name,real_tel,account,subbank,type,id')->where(array('user_id'=>$uid))->select();
|
||||
foreach ($account_list as $key => $value) {
|
||||
$account_list[$key]['id'] = Crypt::encrypt($value['id']);
|
||||
}
|
||||
return success($account_list);
|
||||
}
|
||||
|
||||
|
||||
//添加提现账户
|
||||
public function account_add(Request $request,WithdrawAccount $wamodel, WithdrawAccountValidate $validate)
|
||||
{
|
||||
$param = $request->param();
|
||||
$param['user_id'] = $param['uid']?Crypt::decrypt($param['uid']):'';
|
||||
if(!$param['user_id']){
|
||||
return unauthorized('请先授权');
|
||||
}
|
||||
$validate_result = $validate->scene('add')->check($param);
|
||||
if (!$validate_result) {
|
||||
return error($validate->getError());
|
||||
return client_error($validate->getError());
|
||||
}
|
||||
$result = $model::create($param);
|
||||
return $result ? success() : error();
|
||||
// 启动事务
|
||||
$wamodel->startTrans();
|
||||
try{
|
||||
$wamodel::create($param);
|
||||
// 提交事务
|
||||
$wamodel->commit();
|
||||
}catch(\Exception $e){
|
||||
// 回滚事务
|
||||
$wamodel->rollback();
|
||||
return client_error($e->getMessage());
|
||||
}
|
||||
return success('','添加成功');
|
||||
}
|
||||
|
||||
|
||||
//查看
|
||||
public function read($id, User $model)
|
||||
//删除提现账户
|
||||
public function account_dal(Request $request,WithdrawAccount $wamodel)
|
||||
{
|
||||
$data = $model::get(function ($query) use ($id) {
|
||||
$query->where('id', $id)->field('id,nickname,avatar');
|
||||
});
|
||||
|
||||
return success($data);
|
||||
$param = $request->param();
|
||||
$param['user_id'] = $param['uid']?Crypt::decrypt($param['uid']):'';
|
||||
if(!$param['user_id']){
|
||||
return unauthorized('请先授权');
|
||||
}
|
||||
$param['id'] = $param['id']?Crypt::decrypt($param['id']):'';
|
||||
if (!$param['id']) {
|
||||
return client_error('账户不存在');
|
||||
}
|
||||
$result = $wamodel->whereIn('id', $param['id'])->delete();
|
||||
return $result ? success('','删除成功') : client_error('删除失败');
|
||||
}
|
||||
|
||||
|
||||
//更新
|
||||
public function update($id, Request $request, User $model, UserValidate $validate)
|
||||
//提现操作
|
||||
public function wthdrawal(Request $request,WithdrawAccount $wamodel,WithdrawApply $waymodel,AccountLog $almodel,User $umodel)
|
||||
{
|
||||
$data = $model::get($id);
|
||||
$param = $request->param();
|
||||
$validate_result = $validate->scene('edit')->check($param);
|
||||
if (!$validate_result) {
|
||||
return error($validate->getError());
|
||||
$param = $request->param();
|
||||
$uid = $param['uid']?Crypt::decrypt($param['uid']):'';
|
||||
if(!$uid){
|
||||
return unauthorized('请先授权');
|
||||
}
|
||||
//提现积分
|
||||
$integral = $param['integral']??'0';
|
||||
//提现账户
|
||||
$account_id = $param['account_id']?Crypt::decrypt($param['account_id']):'';
|
||||
if(!$account_id){
|
||||
return client_error('请选择提现账户');
|
||||
}
|
||||
$account_info=$wamodel->where(array('id'=>$account_id))->find();
|
||||
if(!$account_info){
|
||||
return client_error('请选择提现账户');
|
||||
}
|
||||
$umodel_info=$umodel->field('integral')->where(array('id'=>$uid))->find();
|
||||
if($umodel_info['integral']<$integral){
|
||||
return client_error('积分不足,无法提现');
|
||||
}
|
||||
$min_withdraw =ShopConfig::get('withdraw', 'min_withdraw');//最低提现
|
||||
$max_withdraw =ShopConfig::get('withdraw', 'max_withdraw');//最高提现积分
|
||||
$poundage_type =ShopConfig::get('withdraw', 'poundage_type');//手续费类型 1固定 2比例
|
||||
$poundage =ShopConfig::get('withdraw', 'poundage');//手续费
|
||||
if($integral<$min_withdraw){
|
||||
return client_error('最少提现积分数'.$min_withdraw.',无法提现');
|
||||
}
|
||||
if($integral>$max_withdraw){
|
||||
return client_error('最多提现积分数'.$max_withdraw.',无法提现');
|
||||
}
|
||||
if($poundage_type==2){
|
||||
$poundage=$integral*($poundage/100);
|
||||
}
|
||||
// 启动事务
|
||||
$waymodel->startTrans();
|
||||
try{
|
||||
|
||||
$data = [
|
||||
'sn' => createSn('withdraw_apply', 'sn'),
|
||||
'user_id' => $uid,
|
||||
'type' => $account_info['type'],
|
||||
'account' => $account_info['account'] ?? '',
|
||||
'real_name' => $account_info['real_name'] ?? '',
|
||||
'real_tel' => $account_info['real_tel'] ?? '',
|
||||
'money' => $integral,
|
||||
'left_money' => $integral - $poundage,
|
||||
'money_qr_code' => '',
|
||||
'subbank' => $account_info['subbank'] ?? '',
|
||||
'poundage' => $poundage,
|
||||
'status' => 1, // 待提现
|
||||
'create_time' => time(),
|
||||
];
|
||||
$withdraw_id = $waymodel->insertGetId($data);
|
||||
//提交申请后,扣减用户的积分
|
||||
$user = User::get($uid);
|
||||
$user->integral = ['dec', $integral];
|
||||
$user->save();
|
||||
|
||||
$result = $data->save($param);
|
||||
return $result ? success() : error();
|
||||
}
|
||||
|
||||
|
||||
//删除
|
||||
public function delete($id, User $model)
|
||||
{
|
||||
if (count($model->noDeletionId) > 0) {
|
||||
if (is_array($id)) {
|
||||
if (array_intersect($model->noDeletionId, $id)) {
|
||||
return error('ID为' . implode(',', $model->noDeletionId) . '的数据无法删除');
|
||||
}
|
||||
} else if (in_array($id, $model->noDeletionId)) {
|
||||
return error('ID为' . $id . '的数据无法删除');
|
||||
}
|
||||
}
|
||||
|
||||
if ($model->softDelete) {
|
||||
$result = $model->whereIn('id', $id)->useSoftDelete('delete_time', time())->delete();
|
||||
} else {
|
||||
$result = $model->whereIn('id', $id)->delete();
|
||||
}
|
||||
|
||||
return $result ? success('删除成功') : error('删除失败');
|
||||
//增加佣金变动记录
|
||||
$almodel->AccountRecord(
|
||||
$uid,
|
||||
$integral,
|
||||
2,
|
||||
140,
|
||||
'',
|
||||
$withdraw_id,
|
||||
$data['sn']
|
||||
);
|
||||
// 提交事务
|
||||
$waymodel->commit();
|
||||
}catch(\Exception $e){
|
||||
// 回滚事务
|
||||
$waymodel->rollback();
|
||||
return client_error($e->getMessage());
|
||||
}
|
||||
return success('','提交提现申请成功,等待审核打款');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
// +----------------------------------------------------------------------
|
||||
use think\facade\Env;
|
||||
use app\common\model\Order;
|
||||
use think\db;
|
||||
|
||||
// 应用公共文件
|
||||
|
||||
|
|
@ -119,3 +120,49 @@ function createSn($table, $field, $prefix = '', $rand_suffix_length = 4, $pool =
|
|||
}
|
||||
return $sn;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成会员码
|
||||
* @return 会员码
|
||||
*/
|
||||
function create_user_sn($prefix = '', $length = 8)
|
||||
{
|
||||
$rand_str = '';
|
||||
for ($i = 0; $i < $length; $i++) {
|
||||
$rand_str .= mt_rand(0, 9);
|
||||
}
|
||||
$sn = $prefix . $rand_str;
|
||||
if (Db::name('user')->where(['sn' => $sn])->find()) {
|
||||
return create_user_sn($prefix, $length);
|
||||
}
|
||||
return $sn;
|
||||
}
|
||||
|
||||
//生成用户邀请码
|
||||
function generate_invite_code()
|
||||
{
|
||||
|
||||
$letter_all = range('A', 'Z');
|
||||
shuffle($letter_all);
|
||||
//排除I、O字母
|
||||
$letter_array = array_diff($letter_all, ['I', 'O', 'D']);
|
||||
//排除1、0
|
||||
$num_array = range('2', '9');
|
||||
shuffle($num_array);
|
||||
|
||||
$pattern = array_merge($num_array, $letter_array, $num_array);
|
||||
shuffle($pattern);
|
||||
$pattern = array_values($pattern);
|
||||
|
||||
$code = '';
|
||||
for ($i = 0; $i < 6; $i++) {
|
||||
$code .= $pattern[mt_rand(0, count($pattern) - 1)];
|
||||
}
|
||||
|
||||
$code = strtoupper($code);
|
||||
$check = Db::name('user')->where('distribution_code', $code)->find();
|
||||
if ($check) {
|
||||
return generate_invite_code();
|
||||
}
|
||||
return $code;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ class AccountLog extends Model
|
|||
'110' =>'个人收益',
|
||||
'120' =>'体验收益',
|
||||
'130' =>'提现退回',
|
||||
'140' =>'提现扣除',
|
||||
];
|
||||
|
||||
public function getSourceTypeTextAttr($value, $data)
|
||||
|
|
|
|||
|
|
@ -22,6 +22,11 @@ class Slide extends Model
|
|||
['id' => 3, 'name' => '网址'],
|
||||
];
|
||||
|
||||
public $BannerList = [
|
||||
['bm' => 'carousel', 'name' => '首页轮播图','cc'=>'750*500'],
|
||||
['bm' => 'merchant', 'name' => '首页精品推荐','cc'=>'710*289'],
|
||||
];
|
||||
|
||||
|
||||
public function getJumpTypeTextAttr($value, $data)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
namespace app\common\model;
|
||||
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
use think\db;
|
||||
class User extends Model
|
||||
{
|
||||
use SoftDelete;
|
||||
|
|
@ -44,6 +44,57 @@ class User extends Model
|
|||
return $user;
|
||||
}
|
||||
|
||||
/**
|
||||
* 填写邀请码
|
||||
* @param $code
|
||||
* @param $my_id
|
||||
* @return bool|string
|
||||
*/
|
||||
public static function code($code, $my_id)
|
||||
{
|
||||
$my_leader = Db::name('user')
|
||||
->field(['id', 'first_leader', 'second_leader', 'ancestor_relation'])
|
||||
->where(['distribution_code' => $code])
|
||||
->find();
|
||||
|
||||
//更新我的第一上级、第二上级、关系链
|
||||
$my_leader_id = $my_leader['id'];
|
||||
$my_first_leader = $my_leader['first_leader'];
|
||||
$my_leader['ancestor_relation'] = boolval($my_leader['ancestor_relation']) ? $my_leader['ancestor_relation'] : '';
|
||||
$my_ancestor_relation = trim("{$my_leader_id},{$my_leader['ancestor_relation']}", ',');
|
||||
|
||||
$user = User::findOrEmpty($my_id);
|
||||
// 旧关系链
|
||||
if (!empty($user->ancestor_relation)) {
|
||||
$old_ancestor_relation = $user->id . ',' .$user->ancestor_relation;
|
||||
} else {
|
||||
$old_ancestor_relation = $user->id;
|
||||
}
|
||||
|
||||
$data = [
|
||||
'first_leader' => $my_leader_id,
|
||||
'second_leader' => $my_first_leader,
|
||||
'ancestor_relation' => $my_ancestor_relation,
|
||||
];
|
||||
Db::name('user')
|
||||
->where(['id' => $my_id])
|
||||
->update($data);
|
||||
|
||||
//更新我向下一级的第二上级
|
||||
$data = [
|
||||
'second_leader' => $my_leader_id,
|
||||
];
|
||||
Db::name('user')
|
||||
->where(['first_leader' => $my_id])
|
||||
->update($data);
|
||||
|
||||
//更新与我相关的所有关系链
|
||||
Db::name('user')
|
||||
->where("find_in_set({$my_id},ancestor_relation)")
|
||||
->exp('ancestor_relation', "replace(ancestor_relation,'{$old_ancestor_relation}','" . trim("{$my_id},{$my_ancestor_relation}", ',') . "')")
|
||||
->update();
|
||||
}
|
||||
|
||||
|
||||
//用户登录
|
||||
public static function login($param)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
/**
|
||||
* 提现账户记录表
|
||||
*/
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
class WithdrawAccount extends Model
|
||||
{
|
||||
protected $name = 'withdraw_account';
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
/**
|
||||
* 提现账户验证器
|
||||
*/
|
||||
|
||||
namespace app\common\validate;
|
||||
|
||||
class WithdrawAccountValidate extends Validate
|
||||
{
|
||||
protected $rule = [
|
||||
'real_name|真实姓名' => 'require',
|
||||
'real_tel|手机号' => 'require',
|
||||
'account|账号' => 'require',
|
||||
'type|类型' => 'require',
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
'real_name.require' => '真实姓名不能为空',
|
||||
'real_tel.require' => '手机号不能为空',
|
||||
'account.require' => '账号不能为空',
|
||||
'type.require' => '类型不能为空',
|
||||
];
|
||||
|
||||
protected $scene = [
|
||||
'add' => ['real_name', 'real_tel', 'account', 'type',],
|
||||
];
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -17,7 +17,7 @@ class Crypt
|
|||
* @param int $expiry 过期时间,单位:秒
|
||||
* @return string
|
||||
*/
|
||||
public static function encrypt($string, $key = '', $expiry = 0){
|
||||
public static function encrypt($string, $key = 'lisong', $expiry = 0){
|
||||
return self::cryptStr($string,'ENCODE',$key,$expiry);
|
||||
}
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ class Crypt
|
|||
* @param string $key 密钥
|
||||
* @return string
|
||||
*/
|
||||
public static function decrypt($string, $key){
|
||||
public static function decrypt($string, $key='lisong'){
|
||||
return self::cryptStr($string,'DECODE',$key);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,69 @@
|
|||
<?php
|
||||
namespace tools;
|
||||
/**
|
||||
* 对微信小程序用户加密数据的解密示例代码.
|
||||
*
|
||||
* @copyright Copyright (c) 1998-2014 Tencent Inc.
|
||||
*/
|
||||
|
||||
|
||||
include_once "errorCode.php";
|
||||
|
||||
use think\facade\Log;
|
||||
class WXBizDataCrypt
|
||||
{
|
||||
private $appid;
|
||||
private $sessionKey;
|
||||
|
||||
|
||||
/**
|
||||
* 构造函数
|
||||
* @param $sessionKey string 用户在小程序登录后获取的会话密钥
|
||||
* @param $appid string 小程序的appid
|
||||
*/
|
||||
public function __construct($appid, $sessionKey)
|
||||
{
|
||||
$this->sessionKey = $sessionKey;
|
||||
$this->appid = $appid;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 检验数据的真实性,并且获取解密后的明文.
|
||||
* @param $encryptedData string 加密的用户数据
|
||||
* @param $iv string 与用户数据一同返回的初始向量
|
||||
* @param $data string 解密后的原文
|
||||
*
|
||||
* @return int 成功0,失败返回对应的错误码
|
||||
*/
|
||||
public function decryptData($encryptedData, $iv, &$data)
|
||||
{
|
||||
// Log::write('encryptedData:'.var_export($encryptedData, true));
|
||||
// Log::write('iv:'.var_export($iv, true));
|
||||
// Log::write('sessionKey:'.var_export($this->sessionKey, true));
|
||||
// Log::write('appid:'.var_export($this->appid, true));
|
||||
if (strlen($this->sessionKey) != 24) {
|
||||
return ErrorCode::$IllegalAesKey;
|
||||
}
|
||||
$aesKey=base64_decode($this->sessionKey);
|
||||
if (strlen($iv) != 24) {
|
||||
return ErrorCode::$IllegalIv;
|
||||
}
|
||||
$aesIV=base64_decode($iv);
|
||||
$aesCipher=base64_decode($encryptedData);
|
||||
$result=openssl_decrypt($aesCipher, "AES-128-CBC", $aesKey, 1, $aesIV);
|
||||
$dataObj=json_decode($result);
|
||||
if( $dataObj == NULL )
|
||||
{
|
||||
return ErrorCode::$IllegalBuffer;
|
||||
}
|
||||
if( $dataObj->watermark->appid != $this->appid)
|
||||
{
|
||||
return ErrorCode::$IllegalBuffer;
|
||||
}
|
||||
$data = $result;
|
||||
return ErrorCode::$OK;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
namespace tools;
|
||||
/**
|
||||
* error code 说明.
|
||||
* <ul>
|
||||
|
||||
* <li>-41001: encodingAesKey 非法</li>
|
||||
* <li>-41003: aes 解密失败</li>
|
||||
* <li>-41004: 解密后得到的buffer非法</li>
|
||||
* <li>-41005: base64加密失败</li>
|
||||
* <li>-41016: base64解密失败</li>
|
||||
* </ul>
|
||||
*/
|
||||
class ErrorCode
|
||||
{
|
||||
public static $OK = 0;
|
||||
public static $IllegalAesKey = -41001;
|
||||
public static $IllegalIv = -41002;
|
||||
public static $IllegalBuffer = -41003;
|
||||
public static $DecodeBase64Error = -41004;
|
||||
}
|
||||
|
||||
?>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 145 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 145 KiB |
|
|
@ -13,10 +13,43 @@
|
|||
use think\facade\Route;
|
||||
|
||||
//api模块路由
|
||||
Route::group('api', function () {
|
||||
Route::domain('dgg-myyc-api', function () {
|
||||
|
||||
//自带示例,上线务必删除
|
||||
Route::resource('user','api/User') ->only(['index','save', 'read', 'update','delete']);
|
||||
//首页
|
||||
Route::rule('home','api/index/home');
|
||||
//精品推荐
|
||||
Route::rule('recommend_goods','api/index/recommend_goods');
|
||||
|
||||
//商品分类
|
||||
Route::rule('category_list','api/index/category_list');
|
||||
//商品列表
|
||||
Route::rule('goods_list','api/index/goods_list');
|
||||
//商品详情
|
||||
Route::rule('goods_info','api/index/goods_info');
|
||||
|
||||
//授权登陆
|
||||
Route::rule('login','api/auth/login');
|
||||
|
||||
//我的设备
|
||||
Route::rule('u-equipment','api/user/equipment');
|
||||
//收益统计
|
||||
Route::rule('u-profit_census','api/user/profit_census');
|
||||
//提现记录
|
||||
Route::rule('u-withdraw','api/user/withdraw');
|
||||
//积分记录
|
||||
Route::rule('u-accountlog','api/user/account_log');
|
||||
//邀请记录
|
||||
Route::rule('u-invitation_user','api/user/invitation_user');
|
||||
//用户中心
|
||||
Route::rule('u-userhome','api/user/userhome');
|
||||
//账户列表
|
||||
Route::rule('u-account_list','api/user/account_list');
|
||||
//添加账户
|
||||
Route::rule('u-account_add','api/user/account_add');
|
||||
//删除账户
|
||||
Route::rule('u-account_dal','api/user/account_dal');
|
||||
//提现申请
|
||||
Route::rule('u-wthdrawal','api/user/wthdrawal');
|
||||
|
||||
//miss路由
|
||||
Route::miss(function (){
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
<?php
|
||||
//000001190456
|
||||
exit();?>
|
||||
1638438004
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<?php
|
||||
//000001192802
|
||||
exit();?>
|
||||
1638361065
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<?php
|
||||
//000001196281
|
||||
exit();?>
|
||||
1638451652
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<?php
|
||||
//000001154743
|
||||
exit();?>
|
||||
1638418631
|
||||
|
|
@ -12350,3 +12350,92 @@
|
|||
[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` [ RunTime:0.082174s ]
|
||||
[ sql ] [ SQL ] SELECT `url` FROM `admin_role` WHERE `id` = 2 AND `status` = 1 [ RunTime:0.081241s ]
|
||||
[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `id` IN (1,75,76,77,78,19,20,21,22,23,24,25,117,33,46,47,48,49,50,51,52,53,58,59,107,108,109,110,111,112,113,114,115,116,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18) AND `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.144198s ]
|
||||
---------------------------------------------------------------
|
||||
|
||||
[2021-11-30T16:46:50+08:00] 127.0.0.1 GET dgg-myyc-api.dggmyyc.com/
|
||||
[运行时间:0.235467s] [吞吐率:4.25req/s] [内存消耗:2,165.96kb] [文件加载:134]
|
||||
[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggmyyc/thinkphp/lang/zh-cn.php
|
||||
[ info ] [ ROUTE ] array (
|
||||
'rule' => '',
|
||||
'route' =>
|
||||
Closure::__set_state(array(
|
||||
)),
|
||||
'option' =>
|
||||
array (
|
||||
'merge_rule_regex' => false,
|
||||
),
|
||||
'var' =>
|
||||
array (
|
||||
),
|
||||
)
|
||||
[ info ] [ HEADER ] array (
|
||||
'host' => 'dgg-myyc-api.dggmyyc.com',
|
||||
'connection' => 'keep-alive',
|
||||
'upgrade-insecure-requests' => '1',
|
||||
'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36',
|
||||
'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
|
||||
'accept-encoding' => 'gzip, deflate',
|
||||
'accept-language' => 'zh-CN,zh;q=0.9',
|
||||
)
|
||||
[ info ] [ PARAM ] array (
|
||||
)
|
||||
---------------------------------------------------------------
|
||||
|
||||
[2021-11-30T16:46:57+08:00] 127.0.0.1 GET dgg-myyc-api.dggmyyc.com/
|
||||
[运行时间:0.030952s] [吞吐率:32.31req/s] [内存消耗:2,166.04kb] [文件加载:134]
|
||||
[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggmyyc/thinkphp/lang/zh-cn.php
|
||||
[ info ] [ ROUTE ] array (
|
||||
'rule' => '',
|
||||
'route' =>
|
||||
Closure::__set_state(array(
|
||||
)),
|
||||
'option' =>
|
||||
array (
|
||||
'merge_rule_regex' => false,
|
||||
),
|
||||
'var' =>
|
||||
array (
|
||||
),
|
||||
)
|
||||
[ info ] [ HEADER ] array (
|
||||
'host' => 'dgg-myyc-api.dggmyyc.com',
|
||||
'connection' => 'keep-alive',
|
||||
'cache-control' => 'max-age=0',
|
||||
'upgrade-insecure-requests' => '1',
|
||||
'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36',
|
||||
'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
|
||||
'accept-encoding' => 'gzip, deflate',
|
||||
'accept-language' => 'zh-CN,zh;q=0.9',
|
||||
)
|
||||
[ info ] [ PARAM ] array (
|
||||
)
|
||||
---------------------------------------------------------------
|
||||
|
||||
[2021-11-30T16:46:58+08:00] 127.0.0.1 GET dgg-myyc-api.dggmyyc.com/
|
||||
[运行时间:0.031423s] [吞吐率:31.82req/s] [内存消耗:2,166.04kb] [文件加载:134]
|
||||
[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggmyyc/thinkphp/lang/zh-cn.php
|
||||
[ info ] [ ROUTE ] array (
|
||||
'rule' => '',
|
||||
'route' =>
|
||||
Closure::__set_state(array(
|
||||
)),
|
||||
'option' =>
|
||||
array (
|
||||
'merge_rule_regex' => false,
|
||||
),
|
||||
'var' =>
|
||||
array (
|
||||
),
|
||||
)
|
||||
[ info ] [ HEADER ] array (
|
||||
'host' => 'dgg-myyc-api.dggmyyc.com',
|
||||
'connection' => 'keep-alive',
|
||||
'cache-control' => 'max-age=0',
|
||||
'upgrade-insecure-requests' => '1',
|
||||
'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36',
|
||||
'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
|
||||
'accept-encoding' => 'gzip, deflate',
|
||||
'accept-language' => 'zh-CN,zh;q=0.9',
|
||||
)
|
||||
[ info ] [ PARAM ] array (
|
||||
)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,4 +1,4 @@
|
|||
<?php /*a:9:{s:96:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/shop_config/withdraw.html";i:1637750040;s:87:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/base.html";i:1637830212;s:91:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/head_css.html";i:1586528064;s:90:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/head_js.html";i:1637749387;s:89:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/header.html";i:1586528064;s:90:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/sidebar.html";i:1586528064;s:97:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/content_header.html";i:1586528064;s:89:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/footer.html";i:1592550718;s:98:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/control_sidebar.html";i:1586528064;}*/ ?>
|
||||
<?php /*a:9:{s:96:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/shop_config/withdraw.html";i:1638453377;s:87:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/base.html";i:1637830212;s:91:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/head_css.html";i:1586528064;s:90:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/head_js.html";i:1637749387;s:89:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/header.html";i:1586528064;s:90:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/sidebar.html";i:1586528064;s:97:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/content_header.html";i:1586528064;s:89:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/footer.html";i:1592550718;s:98:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/control_sidebar.html";i:1586528064;}*/ ?>
|
||||
<?php if(!$admin['pjax']): ?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
|
@ -238,13 +238,20 @@
|
|||
</div>
|
||||
<label for="name" class="control-label">元</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="poundage_type" class="col-sm-2 control-label">手续费类型</label>
|
||||
<div class="col-sm-10 col-md-4 layui-form">
|
||||
<input type="radio" name="poundage_type" class="poundage_type" value="1" title="固定" <?php if(isset($config['poundage_type']) && $config['poundage_type']=='1'): ?>checked<?php endif; ?>>
|
||||
<input type="radio" name="poundage_type" class="poundage_type" value="2" title="百分比" <?php if(isset($config['poundage_type']) && $config['poundage_type']=='2'): ?>checked<?php endif; ?>>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="poundage" class="col-sm-2 control-label">提现手续费</label>
|
||||
<div class="col-sm-10 col-md-4">
|
||||
<input id="poundage" name="poundage" value="<?php echo htmlentities((isset($config['poundage']) && ($config['poundage'] !== '')?$config['poundage']:'')); ?>" placeholder="请输入提现手续费" type="text" class="form-control field-text">
|
||||
<span id="min_withdraw-error" class="help-block">会员提现时收取的手续费占比。</span>
|
||||
<span id="min_withdraw-error" class="help-block">会员提现时收取的手续费。</span>
|
||||
</div>
|
||||
<label for="name" class="control-label">%</label>
|
||||
<label for="name" class="control-label"></label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 表单底部 -->
|
||||
|
|
@ -268,6 +275,10 @@
|
|||
<script>
|
||||
/** 表单验证 **/
|
||||
$('#dataForm').validate();
|
||||
layui.use('form', function(){
|
||||
var form = layui.form;
|
||||
form.render();
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php /*a:9:{s:85:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/slide/add.html";i:1638259382;s:87:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/base.html";i:1637830212;s:91:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/head_css.html";i:1586528064;s:90:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/head_js.html";i:1637749387;s:89:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/header.html";i:1586528064;s:90:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/sidebar.html";i:1586528064;s:97:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/content_header.html";i:1586528064;s:89:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/footer.html";i:1592550718;s:98:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/control_sidebar.html";i:1586528064;}*/ ?>
|
||||
<?php /*a:9:{s:85:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/slide/add.html";i:1638325115;s:87:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/base.html";i:1637830212;s:91:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/head_css.html";i:1586528064;s:90:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/head_js.html";i:1637749387;s:89:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/header.html";i:1586528064;s:90:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/sidebar.html";i:1586528064;s:97:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/content_header.html";i:1586528064;s:89:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/footer.html";i:1592550718;s:98:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/control_sidebar.html";i:1586528064;}*/ ?>
|
||||
<?php if(!$admin['pjax']): ?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
|
@ -293,7 +293,24 @@ ul.albums li a.btn-fm_z{
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="img" class="col-sm-2 control-label">头像</label>
|
||||
<label for="alias" class="col-sm-2 control-label">广告位置</label>
|
||||
<div class="col-sm-10 col-md-4">
|
||||
<select name="alias" id="alias" class="form-control field-select"
|
||||
data-placeholder="请选择广告位置">
|
||||
<option value=""></option>
|
||||
<?php if(is_array($banner_list) || $banner_list instanceof \think\Collection || $banner_list instanceof \think\Paginator): if( count($banner_list)==0 ) : echo "" ;else: foreach($banner_list as $key=>$item): ?>
|
||||
<option value="<?php echo htmlentities($item['bm']); ?>" <?php if(isset($data) &&
|
||||
$data['alias']==$item['bm']): ?>selected<?php endif; ?>><?php echo htmlentities($item['name']); ?>
|
||||
</option>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('#alias').select2();
|
||||
</script>
|
||||
<div class="form-group">
|
||||
<label for="img" class="col-sm-2 control-label">图片</label>
|
||||
<ul class="albums" id="albums">
|
||||
<li id="nophoto" ><img src="<?php if(isset($data['img'])): ?><?php echo htmlentities($data['img']); else: ?>/static/admin/images/nophoto_100x100.png<?php endif; ?>" style="width: 100px;height: 100px;"></li>
|
||||
<input type="hidden" name="img" id="img" value="<?php echo htmlentities((isset($data['img']) && ($data['img'] !== '')?$data['img']:'')); ?>">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,329 @@
|
|||
<?php /*a:9:{s:95:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/shop_config/website.html";i:1638436901;s:87:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/base.html";i:1637830212;s:91:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/head_css.html";i:1586528064;s:90:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/head_js.html";i:1637749387;s:89:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/header.html";i:1586528064;s:90:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/sidebar.html";i:1586528064;s:97:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/content_header.html";i:1586528064;s:89:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/footer.html";i:1592550718;s:98:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/control_sidebar.html";i:1586528064;}*/ ?>
|
||||
<?php if(!$admin['pjax']): ?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="renderer" content="webkit">
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<title><?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?></title>
|
||||
|
||||
|
||||
|
||||
<?php if(!$admin['pjax']): ?>
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<!--头部css-->
|
||||
<link rel="stylesheet" type="text/css" href="/static/admin/plugins/bootstrap/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/static/admin/plugins/bootstrap-switch/css/bootstrap-switch.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/static/admin/plugins/font-awesome/css/font-awesome.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/static/admin/plugins/iconpicker/css/iconpicker.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/static/admin/plugins/select2/css/select2.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/static/admin/plugins/fileinput/css/fileinput.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/static/admin/css/AdminLTE.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/static/admin/css/admin.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/static/admin/css/_all-skins.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/static/admin/css/skins.css" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/static/admin/plugins/nprogress/nprogress.css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<!--头部js-->
|
||||
<?php if(!$admin['pjax']): ?>
|
||||
<script type="text/javascript" src="/static/admin/plugins/js-cookie/js.cookie-2.2.0.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/plugins/jquery/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/plugins/jquery-ui/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/plugins/layer/layer.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/plugins/laydate/laydate.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/plugins/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/plugins/jquery-slimscroll/jquery.slimscroll.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/plugins/jquery-validation/jquery.validate.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/plugins/jquery-validation/localization/messages_zh.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/plugins/bootstrap-switch/js/bootstrap-switch.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/plugins/bootstrap-number/bootstrap-number.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/plugins/fastclick/fastclick.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/plugins/select2/js/select2.full.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/plugins/nprogress/nprogress.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/plugins/iconpicker/js/iconpicker.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/plugins/ueditor/ueditor.config.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/plugins/ueditor/ueditor.all.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/plugins/ueditor/lang/zh-cn/zh-cn.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/plugins/clipboard/clipboard.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/plugins/viewer/viewer.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/plugins/viewer/jquery-viewer.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/js/tag/jquery.tag-editor.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/static/admin/js/tag/jquery.tag-editor.css" />
|
||||
<script src="https://www.layuicdn.com/layui/layui.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="https://www.layuicdn.com/layui/css/layui.css">
|
||||
<!--勿必把地图api key更换成自己的-->
|
||||
<script type="text/javascript" src='//webapi.amap.com/maps?v=1.4.15&key=cccf8ea926e153be0a013d55edd47c11&plugin=AMap.ToolBar'></script>
|
||||
<!-- UI组件库 1.0 -->
|
||||
<script src="//webapi.amap.com/ui/1.0/main.js?v=1.0.11"></script>
|
||||
<script>
|
||||
//是否为debug模式
|
||||
var adminDebug = <?php echo htmlentities($debug); ?>;
|
||||
//cookie前缀
|
||||
var cookiePrefix = '<?php echo htmlentities($cookie_prefix); ?>';
|
||||
//UEditor server地址
|
||||
var UEServer = "<?php echo url('editor/server'); ?>";
|
||||
//列表页当前选择的ID
|
||||
var dataSelectIds = [];
|
||||
</script>
|
||||
<script type="text/javascript" src="/static/admin/js/adminlte.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/js/jquery.pjax.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/js/admin.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/js/demo.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/js/app.js"></script>
|
||||
|
||||
<?php endif; ?>
|
||||
</head>
|
||||
<body class="hold-transition skin-blue sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- 顶部 -->
|
||||
|
||||
<!--网页头部-->
|
||||
<?php if(!$admin['pjax']): ?>
|
||||
<header class="main-header">
|
||||
<a class="logo">
|
||||
<span class="logo-mini"><?php echo htmlentities((isset($admin['short_name']) && ($admin['short_name'] !== '')?$admin['short_name']:'Backend')); ?></span>
|
||||
<span class="logo-lg"><?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Backend')); ?></span>
|
||||
</a>
|
||||
<nav class="navbar navbar-static-top">
|
||||
<a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</a>
|
||||
<div class="navbar-custom-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li class="dropdown messages-menu">
|
||||
<a href="#" class="dropdown-toggle ReloadButton" title="刷新页面" data-toggle="dropdown">
|
||||
<i class="fa fa-refresh"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="dropdown user user-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<img src="<?php echo htmlentities((isset($admin['user']['avatar']) && ($admin['user']['avatar'] !== '')?$admin['user']['avatar']:'/static/admin/images/avatar.png')); ?>" class="user-image" alt="用户头像">
|
||||
<span class="hidden-xs"><?php echo htmlentities((isset($admin['user']['nickname']) && ($admin['user']['nickname'] !== '')?$admin['user']['nickname']:'')); ?></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="user-header">
|
||||
<img src="<?php echo htmlentities((isset($admin['user']['avatar']) && ($admin['user']['avatar'] !== '')?$admin['user']['avatar']:'/static/admin/images/avatar.png')); ?>" class="img-circle" alt="用户头像">
|
||||
<p>
|
||||
<?php echo htmlentities((isset($admin['user']['nickname']) && ($admin['user']['nickname'] !== '')?$admin['user']['nickname']:'')); ?>
|
||||
<small><?php echo htmlentities((isset($admin['user']['username']) && ($admin['user']['username'] !== '')?$admin['user']['username']:'')); ?></small>
|
||||
</p>
|
||||
</li>
|
||||
<li class="user-footer">
|
||||
<div class="pull-left">
|
||||
<a href="<?php echo url('admin_user/profile'); ?>" class="btn btn-default btn-flat">个人资料</a>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a href="<?php echo url('auth/logout'); ?>" class="btn btn-default btn-flat">退出</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<!-- 左侧 -->
|
||||
|
||||
<!--左侧菜单-->
|
||||
<?php if(!$admin['pjax']): ?>
|
||||
<aside class="main-sidebar">
|
||||
<section class="sidebar">
|
||||
<div class="user-panel">
|
||||
<div class="pull-left image">
|
||||
<img src="<?php echo htmlentities((isset($admin['user']['avatar']) && ($admin['user']['avatar'] !== '')?$admin['user']['avatar']:'__BACKEND_IMAGES__/avatar.png')); ?>" class="img-circle" alt="用户头像">
|
||||
</div>
|
||||
<div class="pull-left info">
|
||||
<p><?php echo htmlentities((isset($admin['user']['nickname']) && ($admin['user']['nickname'] !== '')?$admin['user']['nickname']:'')); ?></p>
|
||||
<a><i class="fa fa-circle text-success"></i> 在线</a>
|
||||
</div>
|
||||
</div>
|
||||
<form method="get" class="sidebar-form" id="sidebar-form">
|
||||
<div class="input-group">
|
||||
<input type="text" name="q" class="form-control" placeholder="搜索菜单" id="search-input">
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" name="search" id="search-btn" class="btn btn-flat">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
<ul class="sidebar-menu" data-widget="tree">
|
||||
<li class="header">导航菜单</li>
|
||||
<?php echo (isset($admin['menu']) && ($admin['menu'] !== '')?$admin['menu']:''); ?>
|
||||
</ul>
|
||||
</section>
|
||||
</aside>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- 内容 -->
|
||||
<div class="content-wrapper" id="pjax-container">
|
||||
|
||||
<!--内容头部-->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<?php echo (isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'admin'); ?>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo url('index/index'); ?>"><i class="fa fa-dashboard"></i> 主页</a></li>
|
||||
<li class="active"><?php echo (isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin'); ?></li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<?php if(app('session')->get('error_message')): ?>
|
||||
<!--如果有错误或者成功的消息-->
|
||||
<script>
|
||||
layer.msg('<?php echo htmlentities(app('session')->get('error_message')); ?>',{icon:2});
|
||||
$.pjax({
|
||||
url: "<?php echo htmlentities(app('session')->get('url')); ?>",
|
||||
container: '#pjax-container'
|
||||
});
|
||||
</script>
|
||||
<?php endif; if(app('session')->get('success_message')): ?>
|
||||
<script>
|
||||
layer.msg('<?php echo htmlentities(app('session')->get('success_message')); ?>',{icon:1});
|
||||
$.pjax({
|
||||
url: '<?php echo htmlentities(app('session')->get('url')); ?>',
|
||||
container: '#pjax-container'
|
||||
});
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-primary">
|
||||
<!-- 表单 -->
|
||||
<form id="dataForm" class="form-horizontal dataForm" action="" method="post" enctype="multipart/form-data">
|
||||
<!-- 表单字段区域 -->
|
||||
<div class="box-body" style="height: 500px;">
|
||||
<div class="form-group">
|
||||
<label for="APPID" class="col-sm-2 control-label">AppID</label>
|
||||
<div class="col-sm-10 col-md-4">
|
||||
<input id="APPID" name="APPID" value="<?php echo htmlentities((isset($config['APPID']) && ($config['APPID'] !== '')?$config['APPID']:'')); ?>" placeholder="请输入AppID" type="text" class="form-control field-text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="APPSECRET" class="col-sm-2 control-label">AppSecret</label>
|
||||
<div class="col-sm-10 col-md-4">
|
||||
<input id="APPSECRET" name="APPSECRET" value="<?php echo htmlentities((isset($config['APPSECRET']) && ($config['APPSECRET'] !== '')?$config['APPSECRET']:'')); ?>" placeholder="请输入AppSecret" type="text" class="form-control field-text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="img_url" class="col-sm-2 control-label">图片访问地址</label>
|
||||
<div class="col-sm-10 col-md-4">
|
||||
<input id="img_url" name="img_url" value="<?php echo htmlentities((isset($config['img_url']) && ($config['img_url'] !== '')?$config['img_url']:'')); ?>" placeholder="请输入图片访问地址" type="text" class="form-control field-text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tel" class="col-sm-2 control-label">联系电话</label>
|
||||
<div class="col-sm-10 col-md-4">
|
||||
<input id="tel" name="tel" value="<?php echo htmlentities((isset($config['tel']) && ($config['tel'] !== '')?$config['tel']:'')); ?>" placeholder="请输入联系电话" type="text" class="form-control field-text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 表单底部 -->
|
||||
<div class="box-footer">
|
||||
<?php echo token(); ?>
|
||||
<div class="col-sm-2">
|
||||
</div>
|
||||
<div class="col-sm-10 col-md-4">
|
||||
<div class="btn-group">
|
||||
<button type="submit" class="btn flat btn-info dataFormSubmit">
|
||||
保存
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<script>
|
||||
/** 表单验证 **/
|
||||
$('#dataForm').validate({
|
||||
rules: {
|
||||
'type': {
|
||||
required: true,
|
||||
},
|
||||
'name': {
|
||||
required: true,
|
||||
},
|
||||
'value': {
|
||||
required: true,
|
||||
},
|
||||
|
||||
},
|
||||
messages: {
|
||||
'type': {
|
||||
required: "类型不能为空",
|
||||
},
|
||||
'name': {
|
||||
required: "名称不能为空",
|
||||
},
|
||||
'value': {
|
||||
required: "值不能为空",
|
||||
},
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
||||
<!--页面底部-->
|
||||
<?php if(!$admin['pjax']): ?>
|
||||
<footer class="main-footer">
|
||||
<div class="pull-right hidden-xs">
|
||||
<b>Version</b> <?php echo htmlentities((isset($admin['version']) && ($admin['version'] !== '')?$admin['version']:'1.0')); ?>
|
||||
</div>
|
||||
<strong>Copyright © 2020 <a href="<?php echo htmlentities((isset($admin['link']) && ($admin['link'] !== '')?$admin['link']:'#')); ?>"><?php echo htmlentities((isset($admin['author']) && ($admin['author'] !== '')?$admin['author']:'admin')); ?></a>.</strong> All rights
|
||||
reserved.
|
||||
</footer>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
<!--侧边栏-->
|
||||
<?php if(!$admin['pjax']): ?>
|
||||
<aside class="control-sidebar control-sidebar-dark">
|
||||
<ul class="nav nav-tabs nav-justified control-sidebar-tabs">
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane" id="control-sidebar-home-tab">
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
<div class="control-sidebar-bg"></div>
|
||||
<?php endif; if(!$admin['pjax']): ?>
|
||||
</div>
|
||||
<?php endif; if(!$admin['pjax']): ?>
|
||||
</body>
|
||||
</html>
|
||||
<?php endif; ?>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<?php /*a:9:{s:90:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/withdraw/lists.html";i:1638242478;s:87:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/base.html";i:1637830212;s:91:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/head_css.html";i:1586528064;s:90:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/head_js.html";i:1637749387;s:89:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/header.html";i:1586528064;s:90:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/sidebar.html";i:1586528064;s:97:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/content_header.html";i:1586528064;s:89:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/footer.html";i:1592550718;s:98:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/control_sidebar.html";i:1586528064;}*/ ?>
|
||||
<?php /*a:9:{s:90:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/withdraw/lists.html";i:1638455766;s:87:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/base.html";i:1637830212;s:91:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/head_css.html";i:1586528064;s:90:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/head_js.html";i:1637749387;s:89:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/header.html";i:1586528064;s:90:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/sidebar.html";i:1586528064;s:97:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/content_header.html";i:1586528064;s:89:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/footer.html";i:1592550718;s:98:"/Library/WebServer/Documents/dggxiangmu/dggmyyc/application/admin/view/public/control_sidebar.html";i:1586528064;}*/ ?>
|
||||
<?php if(!$admin['pjax']): ?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
|
@ -329,7 +329,7 @@
|
|||
<tr>
|
||||
<tr>
|
||||
<th>
|
||||
<div class="layui-table-cell" style="width:100px;text-align:center;">提现单号</div>
|
||||
<div class="layui-table-cell" style="width:200px;text-align:center;">提现单号</div>
|
||||
</th>
|
||||
<th>
|
||||
<div style="width:380px;text-align:center;">用户信息</div>
|
||||
|
|
@ -350,7 +350,7 @@
|
|||
<?php if(is_array($data) || $data instanceof \think\Collection || $data instanceof \think\Paginator): if( count($data)==0 ) : echo "" ;else: foreach($data as $key=>$item): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="layui-table-cell" style="width:100px;text-align:center;"><?php echo htmlentities($item['sn']); ?></div>
|
||||
<div class="layui-table-cell" style="width:200px;text-align:center;"><?php echo htmlentities($item['sn']); ?></div>
|
||||
</td>
|
||||
<td class="layui-table-col-special">
|
||||
<div class="layui-table-cell laytable-cell-1-0-2">
|
||||
|
|
@ -370,7 +370,6 @@
|
|||
<p>提现手机:<?php echo htmlentities($item['real_tel']); ?></p>
|
||||
<p>提现账户:<?php echo htmlentities($item['account']); ?></p>
|
||||
<?php if($item['type'] == 3): ?>
|
||||
<p>提现银行:<?php echo htmlentities($item['bank']); ?></p>
|
||||
<p>提现开户:<?php echo htmlentities($item['subbank']); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue