first commit
This commit is contained in:
1
application/adminghd/common.php
Normal file
1
application/adminghd/common.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
110
application/adminghd/common/Base.php
Normal file
110
application/adminghd/common/Base.php
Normal file
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
namespace app\adminghd\common;
|
||||
use think\Controller;
|
||||
use think\Session;
|
||||
// use think\Request;
|
||||
// use think\Db;
|
||||
use think\Response;
|
||||
|
||||
class Base extends Controller
|
||||
{
|
||||
protected function _initialize()
|
||||
{var_dump(1111);exit;
|
||||
if(!session('adminghd_user_id')){//没有登录信息
|
||||
// $this->redirect('login/index');
|
||||
var_dump(url('Login/logoutJump'));exit;
|
||||
return $this->error('您还未登录',url('Login/logoutJump'));
|
||||
//Response::create(['status' => '0','msg'=> '还未登录,验证失败'], 'json')->send();
|
||||
exit;
|
||||
}else{
|
||||
//登录信息超时
|
||||
$log_time=session('adminghd_user_login_time')-time();
|
||||
if($log_time < 0){
|
||||
Session::clear();
|
||||
//Response::create(['status' => '0','msg'=> '登录超时,需重新登陆'], 'json')->send();
|
||||
return $this->error('登录超时',url('Login/logoutJump'));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
//简单的token生成函数
|
||||
/* protected function create_token()
|
||||
{
|
||||
$str = md5(uniqid(md5(microtime(true)), true)); //生成一个不会重复的字符串
|
||||
$str = sha1($str); //加密
|
||||
return $str;
|
||||
}
|
||||
//验证Token
|
||||
public function checkToken($token)
|
||||
{
|
||||
$user = Db::name('user')->where('token', $token)->find();
|
||||
if (empty($user)) {
|
||||
return ['status'=>0,'msg'=>'token错误,验证失败'];
|
||||
}else{
|
||||
if (time() - $user['time_out'] > 0) {
|
||||
return ['status'=>0,'msg'=>'token长时间未使用而过期,需重新登陆'];
|
||||
}
|
||||
return ['status'=>1,'msg'=>'成功!','data'=>$user];
|
||||
}
|
||||
}
|
||||
//通过分组id获取分组名称
|
||||
public function getGroupName($id){
|
||||
$res = Db::name('group')->field('group_name')->where('group_id',$id)->find();
|
||||
if($res){
|
||||
return $res['group_name'];
|
||||
}else{
|
||||
// return json_encode(['status'=>0,'msg'=>'分组匹配不到']);
|
||||
return '';
|
||||
}
|
||||
}
|
||||
//通过城市id获取城市名称
|
||||
public function getCityName($id){
|
||||
$res = Db::name('city')->field('city_name')->where('city_id',$id)->find();
|
||||
if($res){
|
||||
return $res['city_name'];
|
||||
}else{
|
||||
// return json_encode(['status'=>0,'msg'=>'城市匹配不到']);
|
||||
return '';
|
||||
}
|
||||
}
|
||||
//通过工厂id获取工厂名称
|
||||
public function getFirmName($id){
|
||||
$res = Db::name('firm')->field('firm_name')->where('firm_id',$id)->find();
|
||||
if($res){
|
||||
return $res['firm_name'];
|
||||
}else{
|
||||
// return json_encode(['status'=>0,'msg'=>'工厂匹配不到']);
|
||||
return '';
|
||||
}
|
||||
}
|
||||
//通过品牌id获取品牌名称
|
||||
public function getBrandName($id){
|
||||
$res = Db::name('brand')->field('brand_name')->where('brand_id',$id)->find();
|
||||
if($res){
|
||||
return $res['brand_name'];
|
||||
}else{
|
||||
// return json_encode(['status'=>0,'msg'=>'品牌匹配不到']);
|
||||
return '';
|
||||
}
|
||||
}
|
||||
//通过代理商id获取代理商名称
|
||||
public function getVenderName($id){
|
||||
$res = Db::name('vender')->field('vender_name')->where('vender_id',$id)->find();
|
||||
if($res){
|
||||
return $res['vender_name'];
|
||||
}else{
|
||||
// return json_encode(['status'=>0,'msg'=>'代理商匹配不到']);
|
||||
return '';
|
||||
}
|
||||
}
|
||||
//通过角色id获取角色名称
|
||||
public function getRoleName($id){
|
||||
$res = Db::name('role')->field('role_name')->where('role_id',$id)->find();
|
||||
if($res){
|
||||
return $res['role_name'];
|
||||
}else{
|
||||
// return json_encode(['status'=>0,'msg'=>'角色匹配不到']);
|
||||
return '';
|
||||
}
|
||||
}*/
|
||||
}
|
||||
5
application/adminghd/config.php
Normal file
5
application/adminghd/config.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
//配置文件
|
||||
return [
|
||||
|
||||
];
|
||||
118
application/adminghd/controller/Files.php
Normal file
118
application/adminghd/controller/Files.php
Normal file
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
|
||||
namespace app\adminghd\controller;
|
||||
|
||||
use app\adminghd\common\Base;
|
||||
use think\Request;
|
||||
//use think\Db;
|
||||
//use think\Log;
|
||||
//use think\Image;
|
||||
use think\Response;
|
||||
/**
|
||||
*上传文件
|
||||
*/
|
||||
class Files extends Base
|
||||
{
|
||||
/**
|
||||
*上传图片
|
||||
*@param
|
||||
*/
|
||||
public function uploadImg(Request $request)
|
||||
{
|
||||
$typeArr = array("jpg","png",'jpeg');//图片类型
|
||||
$path = "uploads/" . date('Y/m/d/');//上传路径
|
||||
if(!file_exists($path)){
|
||||
//创建文件
|
||||
mkdir($path,0777,true);
|
||||
}
|
||||
if ($_FILES) {
|
||||
$name = $_FILES['file']['name'];
|
||||
$size = $_FILES['file']['size'];
|
||||
$name_tmp = $_FILES['file']['tmp_name'];
|
||||
if (empty($name)) {
|
||||
return json(array("status"=>"-1","error"=>"图片不能为空"));
|
||||
exit;
|
||||
}
|
||||
$type = strtolower(substr(strrchr($name, '.'), 1)); //获取文件类型
|
||||
|
||||
if (!in_array($type, $typeArr)) {
|
||||
return json(array("status"=>"-1","error"=>"请上传jpg,png,或jpeg类型的文件!"));//mov,webm
|
||||
exit;
|
||||
}
|
||||
if ($size > (2 * 1024 * 1024)) {
|
||||
return json(array("status"=>"-1","error"=>"文件大小已超过2MB!"));
|
||||
exit;
|
||||
}
|
||||
|
||||
/* if($_GET['type'] == 'cx'){
|
||||
$imageType = 'cx';
|
||||
}*/
|
||||
$imageType='';
|
||||
$pic_name = $imageType.time() . rand(10000, 99999) . "." . $type;//图片名称
|
||||
$pic_url =$path . $pic_name;//上传后图片路径+名称
|
||||
|
||||
if (move_uploaded_file($name_tmp, $pic_url)) { //临时文件转移到目标文件夹
|
||||
/* $_POST['name'] = $pic_name;
|
||||
$_POST['topic'] = $imageType;
|
||||
$_POST['albumPath'] = $pic_url;*/
|
||||
return json(array("status"=>"0","file_name"=>$pic_name,"file_path"=>$request->domain().'/'.$pic_url));
|
||||
die();
|
||||
} else {
|
||||
return json(array("status"=>"-1","error"=>"上传有误,请检查服务器配置!"));
|
||||
die();
|
||||
}
|
||||
}else{
|
||||
return json(array("status"=>"-1","error"=>"系统错误!"));
|
||||
die();
|
||||
}
|
||||
}
|
||||
/**
|
||||
*上传视频
|
||||
*/
|
||||
public function uploadVideo(Request $request){
|
||||
$typeArr = array("mp4","wkv");//官方推荐 mp4
|
||||
$path = "uploadnv/" . date('Y/m/d/');//上传路径
|
||||
if(!file_exists($path)){
|
||||
//创建文件
|
||||
mkdir($path,0777,true);
|
||||
}
|
||||
// if ($_FILES) {
|
||||
$name = $_FILES['file']['name'];
|
||||
$size = $_FILES['file']['size'];
|
||||
$name_tmp = $_FILES['file']['tmp_name'];
|
||||
if (empty($name)) {
|
||||
// return json_encode(['status'=>0,'msg'=>'查询失败']);
|
||||
echo json_encode(array("error"=>"您还未选择文件"));
|
||||
exit;
|
||||
}
|
||||
$type = strtolower(substr(strrchr($name, '.'), 1)); //获取文件类型
|
||||
|
||||
if (!in_array($type, $typeArr)) {
|
||||
echo json_encode(array("error"=>"请上传mp4,wkv类型的文件!"));//mov,webm
|
||||
exit;
|
||||
}
|
||||
if ($size > (15 * 1024 * 1024)) {
|
||||
echo json_encode(array("error"=>"文件大小已超过30MB!"));
|
||||
exit;
|
||||
}
|
||||
|
||||
/* if($_GET['type'] == 'cx'){
|
||||
$imageType = 'cx';
|
||||
}*/
|
||||
$imageType='';
|
||||
$pic_name = $imageType.time() . rand(10000, 99999) . "." . $type;//图片名称
|
||||
$pic_url =$path . $pic_name;//上传后图片路径+名称
|
||||
|
||||
if (move_uploaded_file($name_tmp, $pic_url)) { //临时文件转移到目标文件夹
|
||||
/* $_POST['name'] = $pic_name;
|
||||
$_POST['topic'] = $imageType;
|
||||
$_POST['albumPath'] = $pic_url;*/
|
||||
echo json_encode(array("status"=>"0","file_name"=>$pic_name,"file_path"=>$request->domain().'/'.$pic_url));
|
||||
die();
|
||||
} else {
|
||||
echo json_encode(array("error"=>"上传有误,请检查服务器配置!"));
|
||||
die();
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
196
application/adminghd/controller/Index.php
Normal file
196
application/adminghd/controller/Index.php
Normal file
@@ -0,0 +1,196 @@
|
||||
<?php
|
||||
|
||||
namespace app\adminghd\controller;
|
||||
|
||||
use app\adminghd\common\Base;
|
||||
use think\Request;
|
||||
use think\Db;
|
||||
//use think\Log;
|
||||
class Menu extends Base
|
||||
{
|
||||
/**
|
||||
*初始化
|
||||
*/
|
||||
protected function _initialize(){
|
||||
parent::_initialize();
|
||||
if(session('admin_user_type') != 1){
|
||||
$result['erro']=-1;
|
||||
$result['msg']='权限不足';
|
||||
Response::create($result,'json')->send();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 获取菜单列表
|
||||
* @author hjc
|
||||
* @date 2024-05-14
|
||||
*/
|
||||
public function getMenuList(Request $request){
|
||||
$data=$request->param();
|
||||
// $this->checkToken($data['Token']);
|
||||
//升序获取菜单列表
|
||||
$result = Db::name('menu')
|
||||
->field('id,pid,menu_name,url,seq_on,menu_icon')
|
||||
->order('seq_on')
|
||||
->select();
|
||||
//找二级菜单
|
||||
$second=[];
|
||||
foreach ($result as $key => $value) {
|
||||
if($value['pid'] != ''){
|
||||
//二级
|
||||
$second[]=$value;
|
||||
unset($result[$key]);
|
||||
}
|
||||
}
|
||||
//二级组装到一级
|
||||
$result=array_values($result);
|
||||
foreach ($result as $key => $value) {
|
||||
$result[$key]['type']=1;
|
||||
$result[$key]['No']=$key+1;
|
||||
foreach ($second as $k => $v) {
|
||||
if($value['menu_id']==$v['pid']){
|
||||
$v['type']=2;
|
||||
$result[$key]['children'][]=$v;
|
||||
}
|
||||
}
|
||||
}
|
||||
if($result){
|
||||
$status=1;
|
||||
$msg="获取数据成功!!";
|
||||
}
|
||||
else{
|
||||
$status=0;
|
||||
$msg="获取数据失败!!";
|
||||
}
|
||||
return json_encode(['status'=>$status,'msg'=>$msg,'data'=>$result]);
|
||||
}
|
||||
/**
|
||||
* 权限菜单列表
|
||||
* @author hjc
|
||||
* @date 2024-05-14
|
||||
*/
|
||||
public function getPermissionMenu(Request $request){
|
||||
$data=$request->param();
|
||||
//$this->checkToken($data['Token']);
|
||||
//升序获取菜单列表
|
||||
$result=Db::name('menu')->field('id,pid,menu_name,url,seq_on,menu_icon')->order('seq_on')->select();
|
||||
//找二级三级菜单
|
||||
$second=[];
|
||||
foreach ($result as $key => $value) {
|
||||
if($value['pid'] != ''){
|
||||
$second[]=$value;
|
||||
unset($result[$key]);
|
||||
}
|
||||
}
|
||||
//二级组装到一级
|
||||
foreach ($result as $key => $value) {
|
||||
$result[$key]['type']=1;
|
||||
foreach ($second as $k => $v) {
|
||||
if($value['menu_id']==$v['pid']){
|
||||
$v['type']=2;
|
||||
$result[$key]['second'][]=$v;
|
||||
}
|
||||
}
|
||||
}
|
||||
if($result){
|
||||
$status=1;
|
||||
$msg="获取数据成功!!";
|
||||
}
|
||||
else{
|
||||
$status=0;
|
||||
$msg="获取数据失败!!";
|
||||
}
|
||||
return json_encode(['status'=>$status,'msg'=>$msg,'data'=>$result]);
|
||||
}
|
||||
|
||||
public function getMenuOption(Request $request){
|
||||
$data=$request->param();
|
||||
// $this->checkToken($data['Token']);
|
||||
//升序获取菜单列表
|
||||
$result = Db::name('menu')
|
||||
->field('id,pid,menu_name')
|
||||
//->where('status',0)
|
||||
->order('seq_on')
|
||||
->select();
|
||||
//找二级三级菜单
|
||||
$second=[];
|
||||
// $third=[];
|
||||
foreach ($result as $key => $value) {
|
||||
if($value['pid'] != ''){
|
||||
//二级
|
||||
$second[$key]['value']=$value['id'];
|
||||
$second[$key]['label']=$value['menu_name'];
|
||||
$second[$key]['pid']=$value['pid'];
|
||||
unset($result[$key]);
|
||||
}
|
||||
}
|
||||
//二级组装到一级
|
||||
$first=[];
|
||||
foreach ($result as $key => $value) {
|
||||
$first[$key]['value']=$value['id'];
|
||||
$first[$key]['label']=$value['menu_name'];
|
||||
foreach ($second as $k => $v) {
|
||||
if($value['menu_id']==$v['pid']){
|
||||
unset($v['pid']);
|
||||
$first[$key]['children'][]=$v;
|
||||
}
|
||||
}
|
||||
}
|
||||
if($first){
|
||||
$status=1;
|
||||
$msg="获取数据成功!!";
|
||||
}
|
||||
else{
|
||||
$status=0;
|
||||
$msg="获取数据失败!!";
|
||||
}
|
||||
return json_encode(['status'=>$status,'msg'=>$msg,'data'=>$first]);
|
||||
}
|
||||
//获取当前菜单最大序号
|
||||
public function getMaxSeq($map){
|
||||
$result=Db::name('menu')->field('seq_on')->where($map)->order('seq_on','desc')->find();
|
||||
if($result){
|
||||
return $result['seq_on']+1;
|
||||
}else{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
//添加菜单
|
||||
public function doaddMenu(Request $request){
|
||||
//获取一下表单提交的数据,并保存在变量中
|
||||
$data=$request->param();
|
||||
// $this->checkToken($data['Token']);
|
||||
unset($data['Token']);
|
||||
$menu_id=md5(uniqid(''));//一级菜单id
|
||||
$create_time=date('Y-m-d H:i:s');//插入时间
|
||||
$data1=[];
|
||||
//添加一级菜单
|
||||
if(empty($data['father'])){
|
||||
$map['pid']='';
|
||||
}else{
|
||||
$map['pid']=$data['father'];
|
||||
}
|
||||
//获取一级菜单最大序号
|
||||
$seq_on=$this->getMaxSeq($map);
|
||||
$data1=$map;
|
||||
if(!empty($data['urs'])){
|
||||
$data1['url']=$data['url'];
|
||||
}
|
||||
if(!empty($data['menu_icon'])){
|
||||
$data1['menu_icon']=$data['menu_icon'];
|
||||
}
|
||||
$data1['id']=$menu_id;
|
||||
$data1['menu_name']=$data['title'];
|
||||
$data1['seq_on']=$seq_on;
|
||||
$data1['create_time']=$create_time;
|
||||
$res=Db::name('menu')->insert($data1);
|
||||
if($res){
|
||||
$status=1;
|
||||
$msg='添加菜单成功!!';
|
||||
}else{
|
||||
$status=0;
|
||||
$msg='添加菜单失败!!';
|
||||
}
|
||||
return json_encode(['status'=>$status,'msg'=>$msg]);
|
||||
}
|
||||
}
|
||||
92
application/adminghd/controller/Login.php
Normal file
92
application/adminghd/controller/Login.php
Normal file
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
namespace app\adminghd\controller;
|
||||
|
||||
use app\adminghd\common\Base;
|
||||
use think\Request;
|
||||
// use app\admin\model\Admin;
|
||||
use think\Session;
|
||||
use think\Db;
|
||||
use think\Controller;
|
||||
|
||||
class Login extends Controller{
|
||||
/**
|
||||
* 渲染登陆界面
|
||||
*
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
if(!session('adminghd_user_id')){//没有登录信息
|
||||
return $this->view->fetch('login');
|
||||
}else{
|
||||
//登录信息超时
|
||||
$log_time=session('adminghd_user_login_time')-time();
|
||||
if($log_time < 0){
|
||||
return $this->view->fetch('login');
|
||||
}
|
||||
}
|
||||
return $this->view->fetch('nav');
|
||||
}
|
||||
/**
|
||||
* 验证用户身份.
|
||||
*
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function login(Request $request)
|
||||
{
|
||||
//判断是否是post方法发送的数据:如果是则开始登陆
|
||||
if(Request::instance()->isPost()){
|
||||
$user_name=Request::instance()->param("username");
|
||||
$password=Request::instance()->param('password');
|
||||
if(empty($user_name) || empty($password)){
|
||||
$result=['status'=>0,'msg'=>'用户名或密码为空'];
|
||||
return json($result);
|
||||
}
|
||||
//数据查询
|
||||
$infor=Db::name("user")
|
||||
->field('id,user_name,user_head')
|
||||
->where('phone',$user_name)
|
||||
->where('password',md5($password))
|
||||
->where("status",1)
|
||||
->where('type',1)
|
||||
->find();
|
||||
if(empty($infor)){
|
||||
$result=['status'=>0,'msg'=>'用户不存在或密码不正确'];
|
||||
}else{
|
||||
//Session::set('admin_user_type',$infor['role_id']);
|
||||
Session::set('adminghd_user_id',$infor['id']);
|
||||
//Session::set('admin_mechanism_id',$infor['mechanism_id']);
|
||||
$time_out=time()+3600;
|
||||
Session::set('adminghd_user_login_time',$time_out);
|
||||
$result=['status'=>1,'msg'=>'登录成功','token'=>1];
|
||||
}
|
||||
return json($result);
|
||||
}
|
||||
//如果不是post,则返回登陆界面
|
||||
else{
|
||||
$result=['status'=>0,'msg'=>'未获取到参数'];
|
||||
return json($result);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 退出登录
|
||||
*
|
||||
* @param \think\Request $request
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function logout(Request $request)
|
||||
{
|
||||
Session::clear();
|
||||
return json(['status'=>1,'msg'=>'退出成功']);
|
||||
}
|
||||
/**
|
||||
* 超时登录推出跳转页面
|
||||
*
|
||||
* @param \think\Request $request
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function logoutJump(Request $request)
|
||||
{
|
||||
return $this->view->fetch('logoutJump');
|
||||
}
|
||||
}
|
||||
325
application/adminghd/controller/Menu.php
Normal file
325
application/adminghd/controller/Menu.php
Normal file
@@ -0,0 +1,325 @@
|
||||
<?php
|
||||
|
||||
namespace app\adminghd\controller;
|
||||
|
||||
use app\adminghd\common\Base;
|
||||
use think\Request;
|
||||
use think\Db;
|
||||
//use think\Log;
|
||||
|
||||
class Menu extends Base
|
||||
{
|
||||
/**
|
||||
*初始化
|
||||
*/
|
||||
protected function _initialize(){
|
||||
/* parent::_initialize();
|
||||
if(session('admin_user_type') != 1){
|
||||
$result['erro']=-1;
|
||||
$result['msg']='权限不足';
|
||||
Response::create($result,'json')->send();
|
||||
exit;
|
||||
}*/
|
||||
}
|
||||
public function index()
|
||||
{
|
||||
// $this->alreadyLogin();
|
||||
return $this->view->fetch('index');
|
||||
}
|
||||
public function nav()
|
||||
{
|
||||
// $this->alreadyLogin();
|
||||
return $this->view->fetch('nav');
|
||||
}
|
||||
public function getUserInfor(){
|
||||
$data=Db::name("user")
|
||||
->field('user_name,user_head')
|
||||
->where('id',session('admin_user_id'))
|
||||
->find();
|
||||
$result=['status'=>1,'msg'=>'查询成功','infro'=>$data];
|
||||
return json($result);
|
||||
}
|
||||
/**
|
||||
* 获取菜单列表
|
||||
* @author hjc
|
||||
* @date 2024-05-14
|
||||
*/
|
||||
public function getMenuList(Request $request){
|
||||
$data=$request->param();
|
||||
// $this->checkToken($data['Token']);
|
||||
//升序获取菜单列表
|
||||
$result = Db::name('menu')
|
||||
->field('id,pid,menu_name,url,seq_on,menu_icon')
|
||||
->order('seq_on')
|
||||
->select();
|
||||
//找二级菜单
|
||||
$second=[];
|
||||
foreach ($result as $key => $value) {
|
||||
if($value['pid'] != '' && $value['pid'] != 0){
|
||||
//二级
|
||||
$value['grade']="二级菜单";
|
||||
$second[]=$value;
|
||||
unset($result[$key]);
|
||||
}else{
|
||||
$result[$key]['grade']="一级菜单";
|
||||
}
|
||||
}
|
||||
//二级组装到一级
|
||||
$result=array_values($result);
|
||||
foreach ($result as $key => $value) {
|
||||
$result[$key]['type']=1;
|
||||
$result[$key]['No']=$key+1;
|
||||
foreach ($second as $k => $v) {
|
||||
if($value['id']==$v['pid']){
|
||||
$v['type']=2;
|
||||
$result[$key]['children'][]=$v;
|
||||
}
|
||||
}
|
||||
}
|
||||
if($result){
|
||||
$status=1;
|
||||
$msg="获取数据成功!!";
|
||||
}
|
||||
else{
|
||||
$status=0;
|
||||
$msg="获取数据失败!!";
|
||||
}
|
||||
return json(['status'=>$status,'msg'=>$msg,'data'=>$result]);
|
||||
}
|
||||
/**
|
||||
* 权限菜单列表
|
||||
* @author hjc
|
||||
* @date 2024-05-14
|
||||
*/
|
||||
public function getPermissionMenu(Request $request){
|
||||
$data=$request->param();
|
||||
//$this->checkToken($data['Token']);
|
||||
//升序获取菜单列表
|
||||
$result=Db::name('menu')->field('id,pid,menu_name,url,seq_on,menu_icon')->order('seq_on')->select();
|
||||
//找二级三级菜单
|
||||
$second=[];
|
||||
foreach ($result as $key => $value) {
|
||||
if($value['pid'] != ''){
|
||||
$second[]=$value;
|
||||
unset($result[$key]);
|
||||
}
|
||||
}
|
||||
//二级组装到一级
|
||||
foreach ($result as $key => $value) {
|
||||
$result[$key]['type']=1;
|
||||
foreach ($second as $k => $v) {
|
||||
if($value['menu_id']==$v['pid']){
|
||||
$v['type']=2;
|
||||
$result[$key]['second'][]=$v;
|
||||
}
|
||||
}
|
||||
}
|
||||
if($result){
|
||||
$status=1;
|
||||
$msg="获取数据成功!!";
|
||||
}
|
||||
else{
|
||||
$status=0;
|
||||
$msg="获取数据失败!!";
|
||||
}
|
||||
return json(['status'=>$status,'msg'=>$msg,'data'=>$result]);
|
||||
}
|
||||
|
||||
public function getMenuOption(Request $request){
|
||||
$data=$request->param();
|
||||
// $this->checkToken($data['Token']);
|
||||
//升序获取菜单列表
|
||||
$result = Db::name('menu')
|
||||
->field('id,pid,menu_name')
|
||||
//->where('status',0)
|
||||
->order('seq_on')
|
||||
->select();
|
||||
//找二级三级菜单
|
||||
$second=[];
|
||||
// $third=[];
|
||||
foreach ($result as $key => $value) {
|
||||
if($value['pid'] != ''){
|
||||
//二级
|
||||
$second[$key]['value']=$value['id'];
|
||||
$second[$key]['label']=$value['menu_name'];
|
||||
$second[$key]['pid']=$value['pid'];
|
||||
unset($result[$key]);
|
||||
}
|
||||
}
|
||||
//二级组装到一级
|
||||
$first=[];
|
||||
foreach ($result as $key => $value) {
|
||||
$first[$key]['value']=$value['id'];
|
||||
$first[$key]['label']=$value['menu_name'];
|
||||
foreach ($second as $k => $v) {
|
||||
if($value['menu_id']==$v['pid']){
|
||||
unset($v['pid']);
|
||||
$first[$key]['children'][]=$v;
|
||||
}
|
||||
}
|
||||
}
|
||||
if($first){
|
||||
$status=1;
|
||||
$msg="获取数据成功!!";
|
||||
}
|
||||
else{
|
||||
$status=0;
|
||||
$msg="获取数据失败!!";
|
||||
}
|
||||
return json(['status'=>$status,'msg'=>$msg,'data'=>$first]);
|
||||
}
|
||||
//获取当前菜单最大序号
|
||||
public function getMaxSeq($map){
|
||||
$result=Db::name('menu')->field('seq_on')->where($map)->order('seq_on','desc')->find();
|
||||
if($result){
|
||||
return $result['seq_on']+1;
|
||||
}else{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
//添加菜单
|
||||
public function doaddMenu(Request $request){
|
||||
//获取一下表单提交的数据,并保存在变量中
|
||||
$data=$request->param();
|
||||
// $this->checkToken($data['Token']);
|
||||
unset($data['Token']);
|
||||
$menu_id=md5(uniqid(''));//一级菜单id
|
||||
$create_time=date('Y-m-d H:i:s');//插入时间
|
||||
$data1=[];
|
||||
//添加一级菜单
|
||||
if(empty($data['father'])){
|
||||
$map['pid']='';
|
||||
}else{
|
||||
$map['pid']=$data['father'];
|
||||
}
|
||||
//获取一级菜单最大序号
|
||||
$seq_on=$this->getMaxSeq($map);
|
||||
$data1=$map;
|
||||
if(!empty($data['urs'])){
|
||||
$data1['url']=$data['url'];
|
||||
}
|
||||
if(!empty($data['menu_icon'])){
|
||||
$data1['menu_icon']=$data['menu_icon'];
|
||||
}
|
||||
$data1['id']=$menu_id;
|
||||
$data1['menu_name']=$data['title'];
|
||||
$data1['seq_on']=$seq_on;
|
||||
$data1['create_time']=$create_time;
|
||||
$res=Db::name('menu')->insert($data1);
|
||||
if($res){
|
||||
$status=1;
|
||||
$msg='添加菜单成功!!';
|
||||
}else{
|
||||
$status=0;
|
||||
$msg='添加菜单失败!!';
|
||||
}
|
||||
return json(['status'=>$status,'msg'=>$msg]);
|
||||
}
|
||||
/**
|
||||
* 修改菜单详情
|
||||
* @param $data 菜单id(一级菜单、二级菜单)
|
||||
* @param $data 菜单详情
|
||||
* @author hjc
|
||||
* @date 2024-05-14
|
||||
*/
|
||||
public function updMenu(Request $request){
|
||||
$data=$request->param();
|
||||
$result=Db::name('menu')->field('id,pid,menu_name,url,menu_icon')->where('menu_id',$data['menu_id'])->find();
|
||||
$result['type']=1;
|
||||
if(!empty($result['pid'])){
|
||||
$result['type']=2;
|
||||
$result['father']=$result['pid'];
|
||||
}
|
||||
unset($result['pid']);
|
||||
if($result){
|
||||
$status=1;
|
||||
$msg="获取数据成功!!";
|
||||
}else{
|
||||
$status=0;
|
||||
$msg="获取数据失败!!";
|
||||
}
|
||||
return json_encode(['status'=>$status,'msg'=>$msg,'data'=>$result]);
|
||||
}
|
||||
public function doupdMenu(Request $request){
|
||||
$data=$request->param();
|
||||
$data1=[];
|
||||
//添加一级菜单
|
||||
if(empty($data['father'])){
|
||||
$data1['pid']='';
|
||||
if(!empty($data['menu_icon'])){
|
||||
$data1['menu_icon']=$data['menu_icon'];
|
||||
}
|
||||
}else{
|
||||
$data1['pid']=$data['father'];
|
||||
//获取一级菜单最大序号
|
||||
if(!empty($data['url'])){
|
||||
$data1['url']=$data['url'];
|
||||
}
|
||||
}
|
||||
$data1['menu_name']=$data['menu_name'];
|
||||
$res=Db::name('menu')->where('id',$data['id'])->update($data1);
|
||||
if($res){
|
||||
$status=1;
|
||||
$msg='修改菜单成功!!';
|
||||
}else{
|
||||
$status=0;
|
||||
$msg='修改菜单失败!!';
|
||||
}
|
||||
return json_encode(['status'=>$status,'msg'=>$msg]);
|
||||
}
|
||||
/**
|
||||
* 设置菜单状态
|
||||
* @param $data 一级菜单id、二级菜单id
|
||||
* @author hjc
|
||||
* @date 2024-05-14
|
||||
*/
|
||||
public function setMenuStatus(Request $request){
|
||||
$data=$request->param();
|
||||
$this->checkToken($data['Token']);
|
||||
$res=Db::name('menu')->where('id',$data['id'])->update(['status'=>$data['status']]);
|
||||
if($res){
|
||||
$status=1;
|
||||
$msg='设置成功!!';
|
||||
}else{
|
||||
$status=0;
|
||||
$msg='设置失败!!';
|
||||
}
|
||||
return json_encode(['status'=>$status,'msg'=>$msg]);
|
||||
}
|
||||
/**
|
||||
* 删除菜单
|
||||
* @param $data 一级菜单id、二级菜单id
|
||||
*@author hjc
|
||||
* @date 2024-05-14
|
||||
*/
|
||||
public function delMenu(Request $request){
|
||||
$data=$request->param();
|
||||
$res=Db::name('menu')->where('id',$data['id'])->find();
|
||||
//一级菜单
|
||||
if($res['pid']==''){
|
||||
$map1['id|pid']=$data['id'];
|
||||
$map2['id']=['in',[$data['id'],$res['pid']]];
|
||||
}else{
|
||||
$map1['id']=$data['id'];
|
||||
$map2['id']=$data['id'];
|
||||
}
|
||||
// 启动事务
|
||||
Db::startTrans();
|
||||
try{
|
||||
//删除二级菜单
|
||||
Db::name('menu')->where($map1)->delete();
|
||||
// Db::table('t_nv_role_menu')->where($map2)->delete();
|
||||
// 提交事务
|
||||
Db::commit();
|
||||
$status=1;
|
||||
$msg='删除菜单成功!!';
|
||||
} catch (\Exception $e) {
|
||||
Log::record($e->getMessage(),'error');
|
||||
// 回滚事务
|
||||
Db::rollback();
|
||||
$status=0;
|
||||
$msg='删除菜单失败!!';
|
||||
}
|
||||
return json_encode(['status'=>$status,'msg'=>$msg]);
|
||||
}
|
||||
}
|
||||
105
application/adminghd/controller/Wechatinfro.php
Normal file
105
application/adminghd/controller/Wechatinfro.php
Normal file
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
|
||||
namespace app\adminghd\controller;
|
||||
|
||||
use app\adminghd\common\Base;
|
||||
use think\Request;
|
||||
use think\Db;
|
||||
//use think\Log;
|
||||
|
||||
|
||||
class Wechatinfro extends Base
|
||||
{
|
||||
/**
|
||||
*初始化
|
||||
*/
|
||||
protected function _initialize(){
|
||||
parent::_initialize();
|
||||
/*if(session('admin_user_type') != 1){
|
||||
$result['erro']=-1;
|
||||
$result['msg']='权限不足';
|
||||
Response::create($result,'json')->send();
|
||||
exit;
|
||||
}*/
|
||||
}
|
||||
public function wechatUserList()
|
||||
{
|
||||
return $this->view->fetch('userList');
|
||||
}
|
||||
/**
|
||||
* 查看小程序注册用户信息
|
||||
* @author hjc
|
||||
* @date 2024-05-14
|
||||
*/
|
||||
public function getWechatUserList(Request $request){
|
||||
$post=$request->param();
|
||||
|
||||
$page = isset($post['page']) && !empty($post['page']) ? $post['page'] : 1;//页数
|
||||
$page_size = isset($post['page_size']) && !empty($post['page_size']) ? $post['page_size'] : 30;//每页条数
|
||||
//搜索
|
||||
$where=[];
|
||||
if(isset($post['title']) && !empty($post['title'])){
|
||||
$where['nickname']=['like','%'.$post['title'].'%'];
|
||||
}
|
||||
//升序获取菜单列表
|
||||
$res = Db::name('ghd_wechat_user')
|
||||
->field('uid,nickname,headimg,create_time')
|
||||
->where($where)
|
||||
->order('create_time desc')
|
||||
->paginate($page_size,false,['page'=>$page]);
|
||||
|
||||
$lists=$res->items();
|
||||
$start=($page-1)*$page_size;
|
||||
foreach($lists as $k=>$v){
|
||||
$start+=1;
|
||||
$lists[$k]['no_id']=$start;
|
||||
}
|
||||
$result['lists'] =$lists;
|
||||
$result['lastPage'] = $res->lastPage();//总页数
|
||||
$result['currentPage'] = $res->currentPage();//当前页
|
||||
// $result['total'] = $res->total();//数据总条数
|
||||
$result['erro'] = 0;
|
||||
$result['msg'] = '查询成功';
|
||||
return json($result);
|
||||
}
|
||||
public function wechatRecordList()
|
||||
{
|
||||
return $this->view->fetch('wechatRecordList');
|
||||
}
|
||||
/**
|
||||
* 查看小程序记录
|
||||
* @author hjc
|
||||
* @date 2024-05-14
|
||||
*/
|
||||
public function getWechatRecordList(Request $request){
|
||||
$post=$request->param();
|
||||
|
||||
$page = isset($post['page']) && !empty($post['page']) ? $post['page'] : 1;//页数
|
||||
$page_size = isset($post['page_size']) && !empty($post['page_size']) ? $post['page_size'] : 30;//每页条数
|
||||
//搜索
|
||||
$where=[];
|
||||
if(isset($post['title']) && !empty($post['title'])){
|
||||
$where['name']=['like','%'.$post['title'].'%'];
|
||||
}
|
||||
// 查询列表
|
||||
$res = Db::name('wechat_calculate_record')
|
||||
->field('id,name,age,height,bone_age,father_height,mother_height,IGF,LH,uterus_thickness,calculate_resutlt,create_time')
|
||||
->where($where)
|
||||
->order('create_time desc')
|
||||
->paginate($page_size,false,['page'=>$page]);
|
||||
$lists=$res->items();
|
||||
$start=($page-1)*$page_size;
|
||||
foreach($lists as $k=>$v){
|
||||
$start+=1;
|
||||
$lists[$k]['no_id']=$start;
|
||||
}
|
||||
$result = array();
|
||||
$result['lists'] =$lists;
|
||||
$result['lastPage'] = $res->lastPage();//总页数
|
||||
$result['currentPage'] = $res->currentPage();//当前页
|
||||
// $result['total'] = $res->total();//数据总条数
|
||||
$result['erro'] = 0;
|
||||
$result['msg'] = '查询成功';
|
||||
return json($result);
|
||||
}
|
||||
}
|
||||
182
application/adminghd/controller/Wechatset.php
Normal file
182
application/adminghd/controller/Wechatset.php
Normal file
@@ -0,0 +1,182 @@
|
||||
<?php
|
||||
|
||||
namespace app\adminghd\controller;
|
||||
|
||||
use app\adminghd\common\Base;
|
||||
use think\Request;
|
||||
use think\Db;
|
||||
//use think\Log;
|
||||
|
||||
|
||||
class Wechatset extends Base
|
||||
{
|
||||
/**
|
||||
*初始化
|
||||
*/
|
||||
protected function _initialize(){
|
||||
parent::_initialize();
|
||||
/*if(session('admin_user_type') != 1){
|
||||
$result['erro']=-1;
|
||||
$result['msg']='权限不足';
|
||||
Response::create($result,'json')->send();
|
||||
exit;
|
||||
}*/
|
||||
}
|
||||
/**
|
||||
* 小程序资讯信息页面
|
||||
*/
|
||||
public function wechatRealTimeInfo()
|
||||
{
|
||||
return $this->view->fetch('realTimeInfo');
|
||||
}
|
||||
/**
|
||||
* 小程序添加资讯信息页面
|
||||
*/
|
||||
public function wechatRealTimeInfoAdd()
|
||||
{
|
||||
return $this->view->fetch('realTimeInfoAdd');
|
||||
}
|
||||
/**
|
||||
* 小程序添加资讯信息页面
|
||||
*/
|
||||
public function wechatRealTimeInfoUpdate(Request $request)
|
||||
{
|
||||
$id=$request->get('id');
|
||||
$this->assign('id',$id);
|
||||
return $this->view->fetch('realTimeInfoUpdate');
|
||||
}
|
||||
/**
|
||||
* 查询小程序资讯信息
|
||||
* @author hjc
|
||||
* @date 2024-05-14
|
||||
*/
|
||||
public function getWechatRealTimeInfoList(Request $request){
|
||||
$post=$request->param();
|
||||
|
||||
$page = isset($post['page']) && !empty($post['page']) ? $post['page'] : 1;//页数
|
||||
$page_size = isset($post['page_size']) && !empty($post['page_size']) ? $post['page_size'] : 30;//每页条数
|
||||
//搜索
|
||||
$where=[];
|
||||
if(isset($post['title']) && !empty($post['title'])){
|
||||
$where['title_plain']=['like','%'.$post['title'].'%'];
|
||||
}
|
||||
//升序获取菜单列表
|
||||
$res = Db::name('wechat_real_time_info')
|
||||
->field('id,title_plain,thumbnail,excerpt_plain,url,create_time')
|
||||
->where($where)
|
||||
->order('create_time desc')
|
||||
->paginate($page_size,false,['page'=>$page]);
|
||||
$lists=$res->items();
|
||||
$start=($page-1)*$page_size;
|
||||
foreach($lists as $k=>$v){
|
||||
$start+=1;
|
||||
$lists[$k]['no_id']=$start;
|
||||
}
|
||||
$result['lists'] =$lists;
|
||||
$result['lastPage'] = $res->lastPage();//总页数
|
||||
$result['currentPage'] = $res->currentPage();//当前页
|
||||
// $result['total'] = $res->total();//数据总条数
|
||||
$result['erro'] = 0;
|
||||
$result['msg'] = '查询成功';
|
||||
return json($result);
|
||||
}
|
||||
public function wechatRecordList()
|
||||
{
|
||||
return $this->view->fetch('wechatRecordList');
|
||||
}
|
||||
/**
|
||||
* 删除小程序资讯信息
|
||||
* @author hjc
|
||||
* @date 2024-05-14
|
||||
*/
|
||||
public function delWechatRealTimeInfo(Request $request){
|
||||
$post=$request->param();
|
||||
if(!isset($post['id']) || empty($post['id']) ){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "请选择要删除的记录";
|
||||
return json($result);
|
||||
}
|
||||
$id=Db::name('wechat_real_time_info')->where('id',$post['id'])->value('id');
|
||||
if(empty($id)){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "该记录异常,无法删除";
|
||||
return json($result);
|
||||
}
|
||||
$res=Db::name('wechat_real_time_info')->where('id',$id)->delete();
|
||||
if($res > 0){
|
||||
$result['erro'] = 0;
|
||||
$result['msg'] = '删除成功';
|
||||
}else{
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = '删除失败';
|
||||
}
|
||||
return json($result);
|
||||
}
|
||||
/***
|
||||
*保存小程序资讯信息
|
||||
**/
|
||||
public function saveWechatRealTimeInfo(Request $request){
|
||||
$post=$request->param();
|
||||
|
||||
if(!isset($post['title_plain']) || empty($post['title_plain']) ){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入标题";
|
||||
return json($result);
|
||||
}
|
||||
if(!isset($post['thumbnail']) || empty($post['thumbnail']) ){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入图片";
|
||||
return json($result);
|
||||
}
|
||||
if(!isset($post['excerpt_plain']) || empty($post['excerpt_plain']) ){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入简介";
|
||||
return json($result);
|
||||
}
|
||||
if(!isset($post['url']) || empty($post['url'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入资讯跳转链接";
|
||||
return json($result);
|
||||
}
|
||||
//提交数据
|
||||
$data=[];
|
||||
$data['title_plain']=$post['title_plain'];//标题
|
||||
$data['thumbnail']=$post['thumbnail'];//图片
|
||||
$data['excerpt_plain']=$post['excerpt_plain'];//介绍
|
||||
$data['url']=$post['url'];//跳转连接
|
||||
if(isset($post['id']) && !empty($post['id'])){
|
||||
//修改数据
|
||||
$res=Db::name('wechat_real_time_info')->where('id',$post['id'])->update($data);
|
||||
}else{
|
||||
//保存记录数据
|
||||
$data['id']=md5(time().rand(100000,999999));
|
||||
$data['create_time']=date('Y-m-d H:i:s');
|
||||
$res=Db::name('wechat_real_time_info')->insert($data);
|
||||
}
|
||||
if($res===false){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "添加失败";
|
||||
return json($result);
|
||||
}else{
|
||||
$result['erro'] = 0;
|
||||
$result['msg'] = "添加成功";
|
||||
return json($result);
|
||||
}
|
||||
}
|
||||
/**
|
||||
*查询资讯信息详情
|
||||
*/
|
||||
public function getRealTimeInfoDetail(Request $request){
|
||||
$post=$request->param();
|
||||
if(!isset($post['id']) || empty($post['id'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入资讯id";
|
||||
return json($result);
|
||||
}
|
||||
//修改数据
|
||||
$result['infro']=Db::name('wechat_real_time_info')->where('id',$post['id'])->find();
|
||||
$result['erro'] = 0;
|
||||
$result['msg'] = "查询成功";
|
||||
return json($result);
|
||||
}
|
||||
}
|
||||
11
application/adminghd/model/Permission.php
Normal file
11
application/adminghd/model/Permission.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace app\adminghd\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
class Permission extends Model
|
||||
{
|
||||
// 设置完整的数据表(包含前缀)
|
||||
protected $table = 't_sys_menu';
|
||||
}
|
||||
11
application/adminghd/model/Role.php
Normal file
11
application/adminghd/model/Role.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace app\adminghd\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
class Role extends Model
|
||||
{
|
||||
// 设置完整的数据表(包含前缀)
|
||||
protected $table = 't_sys_role';
|
||||
}
|
||||
143
application/adminghd/view/login/login.html
Normal file
143
application/adminghd/view/login/login.html
Normal file
@@ -0,0 +1,143 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="renderer" content="webkit|ie-comp|ie-stand">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
|
||||
<meta http-equiv="Cache-Control" content="no-siteapp">
|
||||
<title>用户登录</title>
|
||||
<link rel="stylesheet" type="text/css" href="/static/adminghd/css/style.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/static/adminghd/css/login.css" />
|
||||
</head>
|
||||
<style>
|
||||
.login-top .tbb{ font-size:18px; font-weight:bold; position:absolute; bottom:0; left:195px; color:#FFD200;}
|
||||
</style>
|
||||
<body style='min-width:1235px'>
|
||||
<div style='height:100px;'></div>
|
||||
<div style='background:#e3e3e3;height:450px;width:100%;position:relative;'>
|
||||
<div style='width:350px;height:400px;background:#EDF1F5;float:right;margin-right:20%;margin-top:1.5%;box-shadow:#666 0px 0px 20px;'>
|
||||
<div class="login-top" style="padding-bottom:0;">
|
||||
<div style='color:#453A3E;margin:30px auto 10px auto;width:150px;font-size:18px;font-weight:bold;text-align:center;'>瑞莱医疗</div>
|
||||
</div>
|
||||
<div style='height:1px;width:100%;background:#DEDCDD;'>
|
||||
<div style='background:#e3e3e3;height:3px;width:80%;margin:0px auto 0 auto;'></div>
|
||||
</div>
|
||||
<form method="post" id="agent_login" name="login">
|
||||
<div class="login-content">
|
||||
<ul class="user-logn">
|
||||
<li class="user-jobnum" style='width:100%;margin-bottom:0px;'>
|
||||
<div class="li-bg error" style='width:100%;'>
|
||||
<label></label>
|
||||
<input type="text" id="username" name="username" placeholder="请输入账号" value="" validate="" validatename="工号" class="phonecode" style='width:83%;padding-right:0px;background:#EDF1F5;height:40px;border:2px solid balck;border-radius:4px;'/>
|
||||
<span id="checkusername" class="warning"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li class="pwd" style='width:100%;margin-bottom:0px;'>
|
||||
<div class="li-bg " style='width:100%;'>
|
||||
<label></label>
|
||||
<input type="password" style="width: 0;height: 0;border: none;" name="">
|
||||
<input type="password" autocomplete="off" id="admin_password" name="password" class="pwd" placeholder="请输入密码" validate="" validatename="密码" style='border:2px solid balck;width:83%;padding-right:0px;background:#EDF1F5;height:40px;border-radius:4px;'>
|
||||
<span id="checkpassword" class="warning"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li style="margin-top:40px;width:100%;">
|
||||
<button type="submit" name="dologinbtn" style='background:#afaeb2;border-radius:4px;height:35px;width:100%;' class="actLogin" onclick="return checklogin(this.form);">立即登录</button>
|
||||
<input type="hidden" name="loginsubmit" value="true" />
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="cover" class="modal">身份获取中。。。</div>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript" src="/static/adminghd/js/jquery.js"></script>
|
||||
<script>
|
||||
var _login_time = -1;
|
||||
var _user_type = '';
|
||||
|
||||
function checklogin(form){
|
||||
var username = $('username').value;
|
||||
var pwd = $('password').value;
|
||||
var phonenumFlg = true;
|
||||
var pwdFlg = true;
|
||||
//var codeFlg = true;
|
||||
if(form.username.value == null || form.username.value == ""){
|
||||
$('#checkusername').empty();
|
||||
$('#checkusername').append(' 账号不能为空!');
|
||||
$('#checkusername').addClass("warning");
|
||||
phonenumFlg = false;
|
||||
return phonenumFlg;
|
||||
}else{
|
||||
$('#checkusername').empty();
|
||||
// $('#checkusername').append('<img src="/images/base/check_right.gif" width="13" height="13">');
|
||||
$('#checkusername').addClass("warning");
|
||||
}
|
||||
if(form.password.value == null || form.password.value == ""){
|
||||
$('#checkpassword').empty();
|
||||
$('#checkpassword').append(' 密码不能为空!');
|
||||
$('#checkpassword').addClass("warning");
|
||||
pwdFlg = false;
|
||||
return pwdFlg;
|
||||
}else{
|
||||
$('#checkpassword').empty();
|
||||
// $('#checkpassword').append('<img src="/images/base/check_right.gif" width="13" height="13">');
|
||||
$('#checkpassword').addClass("warning");
|
||||
}
|
||||
if(phonenumFlg == true && pwdFlg == true){
|
||||
// alert(11);
|
||||
$("#agent_login").submit(function(event) {
|
||||
event.preventDefault(); // 阻止表单默认提交行为
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/adminghd/Login/login", // 服务器端脚本的 URL
|
||||
data: $(this).serialize(), // 自动序列化表单元素为字符串
|
||||
success: function(data) {
|
||||
if(data.status){
|
||||
//alert(data.msg);
|
||||
location.replace("/adminghd/login");
|
||||
// location.reload();
|
||||
} else {
|
||||
alert(data.msg);
|
||||
return ;
|
||||
}
|
||||
console.log(response); // 处理服务器响应
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
console.error("Error submitting form: " + textStatus);
|
||||
}
|
||||
});
|
||||
});
|
||||
// $('#agent_login').submit();
|
||||
// ajaxpost('registerform', 'register');
|
||||
// $('#agent_login').ajaxSubmit({
|
||||
/* $.ajax({
|
||||
url:'/admin/Login/login',
|
||||
dataType:'json',
|
||||
type:'post',
|
||||
data:{
|
||||
"username":username,
|
||||
"password":pwd
|
||||
},
|
||||
success:function(data){
|
||||
alert(222);
|
||||
alert(data.msg);
|
||||
return false;
|
||||
if(data.status){
|
||||
alert(data.msg);
|
||||
// $(form).resetForm();
|
||||
} else {
|
||||
alert(data.msg);
|
||||
return ;
|
||||
}
|
||||
}
|
||||
}) */
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
28
application/adminghd/view/login/logoutJump.html
Normal file
28
application/adminghd/view/login/logoutJump.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="renderer" content="webkit|ie-comp|ie-stand">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
|
||||
<meta http-equiv="Cache-Control" content="no-siteapp">
|
||||
<title></title>
|
||||
|
||||
<link rel="stylesheet" href="/static/adminghd/layui/css/layui.css?t=1554901097999" media="all">
|
||||
<link rel="stylesheet" type="text/css" href="/static/adminghd/css/nav.css" />
|
||||
|
||||
|
||||
</head>
|
||||
<body class="parent_color">
|
||||
|
||||
|
||||
|
||||
<script src="/static/adminghd/js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/static/adminghd/layui/layui.all.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
top.location.href = '/adminghd/login';
|
||||
};
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
58
application/adminghd/view/login/nav.html
Normal file
58
application/adminghd/view/login/nav.html
Normal file
@@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="renderer" content="webkit|ie-comp|ie-stand">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
|
||||
<meta http-equiv="Cache-Control" content="no-siteapp">
|
||||
<title>瑞莱医疗后台</title>
|
||||
|
||||
<link rel="stylesheet" href="/static/adminghd/layui/css/layui.css?t=1554901097999" media="all">
|
||||
<link rel="stylesheet" type="text/css" href="/static/adminghd/css/nav.css" />
|
||||
<style>
|
||||
iframe{
|
||||
/*border: 1px solid red;*/
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body data-id="0" class="parent_color">
|
||||
|
||||
|
||||
<!--左侧导航-->
|
||||
<!-- <span class="unfold" id="packBtn">
|
||||
<i class="curr"></i>
|
||||
<b>全部展开</b>
|
||||
</span> -->
|
||||
<div class="layui-side layui-bg-black">
|
||||
<div class="layui-side-scroll">
|
||||
<ul id="nav" class="layui-nav layui-nav-tree site-demo-nav" lay-filter="demo" style="margin-right: 10px;">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!--顶部-->
|
||||
<div class="top_right">
|
||||
<a href="javascript:void(0)" class="logo">
|
||||
<!-- <img id="packBtn" src="{S_URL}/templates/adminfactory/img/logo.png">-->
|
||||
</a>
|
||||
<b></b>
|
||||
<div class="user_right">
|
||||
<a href="javascript:;" id="user" style="position: absolute;left: 100px;top: 4px;font-size: 16px;"></a>
|
||||
<span id="inform">
|
||||
<!-- 您好!工厂
|
||||
<img id="u_headimg" src="{S_URL}/templates/adminfactory/img/logo.png" alt="">
|
||||
<i>荣麟</i> -->
|
||||
</span>
|
||||
<b class="out" id="sign_out">退出</b>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_content">
|
||||
<iframe id="iframeId" src="" frameborder="0"></iframe>
|
||||
</div>
|
||||
|
||||
<script src="/static/adminghd/js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/static/adminghd/layui/layui.all.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/static/adminghd/js/nav.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
64
application/adminghd/view/wechatinfro/userList.html
Normal file
64
application/adminghd/view/wechatinfro/userList.html
Normal file
@@ -0,0 +1,64 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="renderer" content="webkit|ie-comp|ie-stand">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
|
||||
<meta http-equiv="Cache-Control" content="no-siteapp">
|
||||
|
||||
<link rel="stylesheet" href="/static/adminghd/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="/static/adminghd/css/index.css"/>
|
||||
<link rel="stylesheet" href="/static/adminghd/css/activity.css"/>
|
||||
<style type="text/css">
|
||||
.layui-table-cell{
|
||||
height:auto!important;
|
||||
white-space:normal;
|
||||
}
|
||||
</style>
|
||||
<script src="/static/adminghd/js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/static/adminghd/js/common.js" type="text/javascript" charset="utf-8"></script>
|
||||
<title>用户管理</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="main">
|
||||
<ul class="layui-nav" lay-filter="">
|
||||
<li class="layui-nav-item layui-this"><a href="#">用户注册列表</a></li>
|
||||
</ul>
|
||||
<div class="main_top">
|
||||
<div class="head">
|
||||
<form class="layui-form" action="">
|
||||
<div class="layui-form-item">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">搜索:</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="searchBox" name="title" lay-verify="title" autocomplete="off" placeholder="请输入用户昵称" class="layui-input">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<button id="search" type="button" class="layui-btn layui-btn-normal">查询</button>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
<table class="layui-hide" id="test" lay-filter="test"></table>
|
||||
<script type="text/html" id="imgTpl">
|
||||
<!--图片设置 -->
|
||||
<img src="{{ d.headimg }}" width="50px" height="50px">
|
||||
</script>
|
||||
<!-- <div class="table_page" id="page"></div> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/static/adminghd/layui/layui.all.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<script src="/static/adminghd/js/wechatinfro/userList.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
60
application/adminghd/view/wechatinfro/wechatRecordList.html
Normal file
60
application/adminghd/view/wechatinfro/wechatRecordList.html
Normal file
@@ -0,0 +1,60 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="renderer" content="webkit|ie-comp|ie-stand">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
|
||||
<meta http-equiv="Cache-Control" content="no-siteapp">
|
||||
|
||||
<link rel="stylesheet" href="/static/adminghd/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="/static/adminghd/css/index.css"/>
|
||||
<link rel="stylesheet" href="/static/adminghd/css/activity.css"/>
|
||||
<style type="text/css">
|
||||
.layui-table-cell{
|
||||
height:auto!important;
|
||||
white-space:normal;
|
||||
}
|
||||
</style>
|
||||
<script src="/static/adminghd/js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/static/adminghd/js/common.js" type="text/javascript" charset="utf-8"></script>
|
||||
<title>计算结果</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="main">
|
||||
<ul class="layui-nav" lay-filter="">
|
||||
<li class="layui-nav-item layui-this"><a href="#">计算结果列表</a></li>
|
||||
</ul>
|
||||
<div class="main_top">
|
||||
<div class="head">
|
||||
<form class="layui-form" action="">
|
||||
<div class="layui-form-item">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">搜索:</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="searchBox" name="title" lay-verify="title" autocomplete="off" placeholder="请输入姓名" class="layui-input">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<button id="search" type="button" class="layui-btn layui-btn-normal">查询</button>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
<table class="layui-hide" id="test" lay-filter="test"></table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/static/adminghd/layui/layui.all.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<script src="/static/adminghd/js/wechatinfro/wechatRecordList.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
69
application/adminghd/view/wechatset/realTimeInfo.html
Normal file
69
application/adminghd/view/wechatset/realTimeInfo.html
Normal file
@@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="renderer" content="webkit|ie-comp|ie-stand">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
|
||||
<meta http-equiv="Cache-Control" content="no-siteapp">
|
||||
|
||||
<link rel="stylesheet" href="/static/adminghd/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="/static/adminghd/css/index.css"/>
|
||||
<link rel="stylesheet" href="/static/adminghd/css/activity.css"/>
|
||||
<style type="text/css">
|
||||
.layui-table-cell{
|
||||
height:auto!important;
|
||||
white-space:normal;
|
||||
}
|
||||
</style>
|
||||
<script src="/static/adminghd/js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/static/adminghd/js/common.js" type="text/javascript" charset="utf-8"></script>
|
||||
<title>用户管理</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="main">
|
||||
<ul class="layui-nav" lay-filter="">
|
||||
<li class="layui-nav-item layui-this"><a href="#">首页资讯列表</a></li>
|
||||
</ul>
|
||||
<div class="main_top">
|
||||
<div class="head">
|
||||
<form class="layui-form" action="">
|
||||
<div class="layui-form-item">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">搜索:</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="searchBox" name="title" lay-verify="title" autocomplete="off" placeholder="请输入标题" class="layui-input">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<button id="search" type="button" class="layui-btn layui-btn-normal">查询</button>
|
||||
<div class="head_right">
|
||||
<i class="layui-btn" id="add" onclick="skip()">+ 新增</i>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
<table class="layui-hide" id="test" lay-filter="test"></table>
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-xs tab_edit" lay-event="edit">编辑</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs tab_delete" lay-event="del">删除</a>
|
||||
</script>
|
||||
<script type="text/html" id="imgTpl">
|
||||
<!--图片设置 -->
|
||||
<img src="{{ d.thumbnail }}" width="50px" height="50px">
|
||||
</script>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/static/adminghd/layui/layui.all.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<script src="/static/adminghd/js/wechatset/wechatRealTimeInfoList.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
319
application/adminghd/view/wechatset/realTimeInfoAdd.html
Normal file
319
application/adminghd/view/wechatset/realTimeInfoAdd.html
Normal file
@@ -0,0 +1,319 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="renderer" content="webkit|ie-comp|ie-stand">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
|
||||
<meta http-equiv="Cache-Control" content="no-siteapp">
|
||||
<title>新建编辑</title>
|
||||
<link rel="stylesheet" href="/static/adminghd/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="/static/adminghd/css/index.css"/>
|
||||
<link rel="stylesheet" href="/static/adminghd/css/activity.css"/>
|
||||
<style>
|
||||
.upload_pic_left .poster{
|
||||
width: 112px;
|
||||
height: 112px;
|
||||
position: relative;
|
||||
}
|
||||
.popup >div{
|
||||
display: none;
|
||||
width: 400px;
|
||||
background: #fff;
|
||||
position: absolute;
|
||||
top: 46%;
|
||||
left: 50%;
|
||||
transform:translate(-50%,-50%);
|
||||
-ms-transform:translate(-50%,-50%); /* IE 9 */
|
||||
-webkit-transform:translate(-50%,-50%); /* Safari and Chrome */
|
||||
text-align: center;
|
||||
}
|
||||
.popup >div h3{
|
||||
padding: 7px 0;
|
||||
border-bottom: 1px solid #A4A4A4;
|
||||
}
|
||||
.popup >div input{
|
||||
padding-left: 10px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #bfbfbf;
|
||||
width: 210px;
|
||||
height: 34px;
|
||||
margin: 8px 0 ;
|
||||
}
|
||||
.activity_time {
|
||||
padding: 0px;
|
||||
}
|
||||
.popup .btn{
|
||||
margin: 15px 0 25px 0;
|
||||
padding: 0 10px;
|
||||
display: flex;
|
||||
display: -webkit-flex; /* Safari */
|
||||
display: -moz-box;
|
||||
display: -ms-flexbox;
|
||||
justify-content: space-around;
|
||||
-webkit-justify-content: space-around;
|
||||
-moz-justify-content: space-around;
|
||||
-ms-justify-content: space-around;
|
||||
}
|
||||
.popup .btn a {
|
||||
float: left;
|
||||
width: 130px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
color: #333333;
|
||||
background: #fff;
|
||||
border: #f8c619 solid 1px;
|
||||
}
|
||||
.popup p .curr{
|
||||
background: #f8c619;
|
||||
}
|
||||
.upload_pic_left{
|
||||
width: 815px;
|
||||
}
|
||||
.title_content .title {
|
||||
padding-left: 13px;
|
||||
font-size: 14px;
|
||||
margin: 10px;
|
||||
}
|
||||
.upload_pic_left .title_content input {
|
||||
width: 700px;
|
||||
border: 1px solid #bfbfbf;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
margin-left: 27px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
.upload_pic_left .title_content {
|
||||
position: relative;
|
||||
height: 70px;
|
||||
}
|
||||
.upload_pic_left .title_content span {
|
||||
left: 713px;
|
||||
bottom: 10px;
|
||||
position: absolute;
|
||||
right: 43px;
|
||||
bottom: 0;
|
||||
color: #bfbfbf;
|
||||
}
|
||||
.upload_pic_left .upload_pic{
|
||||
margin-left: 27px;
|
||||
}
|
||||
.product_table {
|
||||
min-width: 1570px;
|
||||
}
|
||||
.upload_pic{
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.wrap {
|
||||
background: none;
|
||||
}
|
||||
.upload_pic_left{
|
||||
height: auto;
|
||||
}
|
||||
.activity_list_add{
|
||||
overflow: visible;
|
||||
}
|
||||
.poster {
|
||||
width: 347px;
|
||||
height: 180px;
|
||||
position: relative;
|
||||
}
|
||||
.upload_pic {
|
||||
width: 284px;
|
||||
height: 176px;
|
||||
border: 1px solid #bfbfbf;
|
||||
position: relative;
|
||||
font-size: 80px;
|
||||
color: #bfbfbf;
|
||||
background: url(/adminghd/img/upload.png) no-repeat;
|
||||
background-size: 60px;
|
||||
background-position: center;
|
||||
cursor: pointer;
|
||||
margin-bottom: 30px;
|
||||
margin-left: 27px;
|
||||
display: inline-block;
|
||||
}
|
||||
.poster img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.layout {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0,0,0,0.6);
|
||||
z-index: 999;
|
||||
display: none;
|
||||
overflow: auto;
|
||||
}
|
||||
.popup >div {
|
||||
display: none;
|
||||
width: 400px;
|
||||
background: #fff;
|
||||
position: absolute;
|
||||
top: 46%;
|
||||
left: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
-ms-transform: translate(-50%,-50%);
|
||||
-webkit-transform: translate(-50%,-50%);
|
||||
text-align: center;
|
||||
}
|
||||
.popup {
|
||||
width: 544px;
|
||||
}
|
||||
.popup >div h3 {
|
||||
padding: 7px 0;
|
||||
border-bottom: 1px solid #A4A4A4;
|
||||
}
|
||||
.popup .btn {
|
||||
margin: 15px 0 25px 0;
|
||||
padding: 0 10px;
|
||||
display: flex;
|
||||
display: -webkit-flex;
|
||||
display: -moz-box;
|
||||
display: -ms-flexbox;
|
||||
justify-content: space-around;
|
||||
-webkit-justify-content: space-around;
|
||||
-moz-justify-content: space-around;
|
||||
-ms-justify-content: space-around;
|
||||
}
|
||||
.popup .btn a {
|
||||
float: left;
|
||||
width: 130px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
color: #333333;
|
||||
background: #fff;
|
||||
border: #f8c619 solid 1px;
|
||||
}
|
||||
.popup p .curr {
|
||||
background: #f8c619;
|
||||
}
|
||||
.popup .activity_product {
|
||||
width: 1239px;
|
||||
height: 640px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="main">
|
||||
<ul class="layui-nav" lay-filter="">
|
||||
<span onclick="lists()">< 返回</span>
|
||||
<li class="layui-nav-item layui-this"><a href="#">新建活动</a></li>
|
||||
</ul>
|
||||
<div class="main_top">
|
||||
<div class="head">
|
||||
|
||||
<div class="head_right">
|
||||
<i id="save" class="layui-btn yellow" >保存</i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="product_table activity_list_add" >
|
||||
<!-- 左侧上传图片-->
|
||||
<div class="upload_pic_left">
|
||||
<p class="title">
|
||||
<i>*</i>
|
||||
请输入标题:
|
||||
</p>
|
||||
<div class="title_content">
|
||||
<input type="text" id="title" name="title" placeholder="建议标题字数在45个字以内"/>
|
||||
<span>
|
||||
<i class="i_leng">0</i>/
|
||||
<em>30</em>
|
||||
</span>
|
||||
</div>
|
||||
<p class="title">
|
||||
<i>*</i>
|
||||
请输入介绍:
|
||||
</p>
|
||||
<div class="title_content">
|
||||
<input type="text" id="excerpt_plain" name="title" placeholder="请输入资讯介绍"/>
|
||||
</div>
|
||||
<p class="title">
|
||||
<i>*</i>
|
||||
请输入资讯跳转链接:
|
||||
</p>
|
||||
<div class="title_content">
|
||||
<input type="text" id="url" name="title" placeholder="请输入资讯跳转链接"/>
|
||||
</div>
|
||||
<p class="title">
|
||||
<i>*</i>请上传资讯图片:
|
||||
<span></span>
|
||||
</p>
|
||||
<div class="img_cont" id="img_cont">
|
||||
<div class="upload_pic poster" id="poster">
|
||||
<img src="" alt="" id="Upload_img2"/>
|
||||
<input id="goodsUpload" hidden type="file" name="file2" />
|
||||
<!-- <i>①</i> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="layout popup" >
|
||||
<!-- 特价商品 -->
|
||||
<div id="specials" class="activity_product">
|
||||
<p class="btn">
|
||||
<a href="#" id="special_cancel" class="btncancel">取消</a>
|
||||
<a href="#" id="special_deter" class="curr" >确定</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script src="/static/adminghd/js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/static/adminghd/layui/layui.all.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/static/adminghd/js/common.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/static/adminghd/js/wechatset/wechatRealTimeInfoAdd.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script>
|
||||
layui.use('upload', function(){
|
||||
var upload = layui.upload;
|
||||
|
||||
//图片上传接口
|
||||
upload.render({
|
||||
elem: '#Upload_img2'
|
||||
,url: '/adminghd/Files/uploadImg' //改成你的图片上传接口
|
||||
,multiple: true
|
||||
,before: function(obj){
|
||||
//do something
|
||||
}
|
||||
,done: function(res){
|
||||
//上传完毕回调
|
||||
if(res.status == 0){ //假设成功返回的code为0
|
||||
$('#Upload_img2').attr("src",res.file_path);
|
||||
//do something
|
||||
}
|
||||
}
|
||||
,error: function(){
|
||||
//请求出错处理
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
320
application/adminghd/view/wechatset/realTimeInfoUpdate.html
Normal file
320
application/adminghd/view/wechatset/realTimeInfoUpdate.html
Normal file
@@ -0,0 +1,320 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="renderer" content="webkit|ie-comp|ie-stand">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
|
||||
<meta http-equiv="Cache-Control" content="no-siteapp">
|
||||
<title>新建编辑</title>
|
||||
<link rel="stylesheet" href="/static/adminghd/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="/static/adminghd/css/index.css"/>
|
||||
<link rel="stylesheet" href="/static/adminghd/css/activity.css"/>
|
||||
<style>
|
||||
|
||||
.upload_pic_left .poster{
|
||||
width: 112px;
|
||||
height: 112px;
|
||||
position: relative;
|
||||
}
|
||||
.popup >div{
|
||||
display: none;
|
||||
width: 400px;
|
||||
background: #fff;
|
||||
position: absolute;
|
||||
top: 46%;
|
||||
left: 50%;
|
||||
transform:translate(-50%,-50%);
|
||||
-ms-transform:translate(-50%,-50%); /* IE 9 */
|
||||
-webkit-transform:translate(-50%,-50%); /* Safari and Chrome */
|
||||
text-align: center;
|
||||
}
|
||||
.popup >div h3{
|
||||
padding: 7px 0;
|
||||
border-bottom: 1px solid #A4A4A4;
|
||||
}
|
||||
.popup >div input{
|
||||
padding-left: 10px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #bfbfbf;
|
||||
width: 210px;
|
||||
height: 34px;
|
||||
margin: 8px 0 ;
|
||||
}
|
||||
.activity_time {
|
||||
padding: 0px;
|
||||
}
|
||||
.popup .btn{
|
||||
margin: 15px 0 25px 0;
|
||||
padding: 0 10px;
|
||||
display: flex;
|
||||
display: -webkit-flex; /* Safari */
|
||||
display: -moz-box;
|
||||
display: -ms-flexbox;
|
||||
justify-content: space-around;
|
||||
-webkit-justify-content: space-around;
|
||||
-moz-justify-content: space-around;
|
||||
-ms-justify-content: space-around;
|
||||
}
|
||||
.popup .btn a {
|
||||
float: left;
|
||||
width: 130px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
color: #333333;
|
||||
background: #fff;
|
||||
border: #f8c619 solid 1px;
|
||||
}
|
||||
.popup p .curr{
|
||||
background: #f8c619;
|
||||
}
|
||||
.upload_pic_left{
|
||||
width: 815px;
|
||||
}
|
||||
.title_content .title {
|
||||
padding-left: 13px;
|
||||
font-size: 14px;
|
||||
margin: 10px;
|
||||
}
|
||||
.upload_pic_left .title_content input {
|
||||
width: 700px;
|
||||
border: 1px solid #bfbfbf;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
margin-left: 27px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
.upload_pic_left .title_content {
|
||||
position: relative;
|
||||
height: 70px;
|
||||
}
|
||||
.upload_pic_left .title_content span {
|
||||
left: 713px;
|
||||
bottom: 10px;
|
||||
position: absolute;
|
||||
right: 43px;
|
||||
bottom: 0;
|
||||
color: #bfbfbf;
|
||||
}
|
||||
.upload_pic_left .upload_pic{
|
||||
margin-left: 27px;
|
||||
}
|
||||
.product_table {
|
||||
min-width: 1570px;
|
||||
}
|
||||
.upload_pic{
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.wrap {
|
||||
background: none;
|
||||
}
|
||||
.upload_pic_left{
|
||||
height: auto;
|
||||
}
|
||||
.activity_list_add{
|
||||
overflow: visible;
|
||||
}
|
||||
.poster {
|
||||
width: 347px;
|
||||
height: 180px;
|
||||
position: relative;
|
||||
}
|
||||
.upload_pic {
|
||||
width: 284px;
|
||||
height: 176px;
|
||||
border: 1px solid #bfbfbf;
|
||||
position: relative;
|
||||
font-size: 80px;
|
||||
color: #bfbfbf;
|
||||
background: url(/adminghd/img/upload.png) no-repeat;
|
||||
background-size: 60px;
|
||||
background-position: center;
|
||||
cursor: pointer;
|
||||
margin-bottom: 30px;
|
||||
margin-left: 27px;
|
||||
display: inline-block;
|
||||
}
|
||||
.poster img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.layout {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0,0,0,0.6);
|
||||
z-index: 999;
|
||||
display: none;
|
||||
overflow: auto;
|
||||
}
|
||||
.popup >div {
|
||||
display: none;
|
||||
width: 400px;
|
||||
background: #fff;
|
||||
position: absolute;
|
||||
top: 46%;
|
||||
left: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
-ms-transform: translate(-50%,-50%);
|
||||
-webkit-transform: translate(-50%,-50%);
|
||||
text-align: center;
|
||||
}
|
||||
.popup {
|
||||
width: 544px;
|
||||
}
|
||||
.popup >div h3 {
|
||||
padding: 7px 0;
|
||||
border-bottom: 1px solid #A4A4A4;
|
||||
}
|
||||
.popup .btn {
|
||||
margin: 15px 0 25px 0;
|
||||
padding: 0 10px;
|
||||
display: flex;
|
||||
display: -webkit-flex;
|
||||
display: -moz-box;
|
||||
display: -ms-flexbox;
|
||||
justify-content: space-around;
|
||||
-webkit-justify-content: space-around;
|
||||
-moz-justify-content: space-around;
|
||||
-ms-justify-content: space-around;
|
||||
}
|
||||
.popup .btn a {
|
||||
float: left;
|
||||
width: 130px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
color: #333333;
|
||||
background: #fff;
|
||||
border: #f8c619 solid 1px;
|
||||
}
|
||||
.popup p .curr {
|
||||
background: #f8c619;
|
||||
}
|
||||
.popup .activity_product {
|
||||
width: 1239px;
|
||||
height: 640px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
<body data-idd="71">
|
||||
<div class="main">
|
||||
<ul class="layui-nav" lay-filter="">
|
||||
<span onclick="lists()">< 返回</span>
|
||||
<li class="layui-nav-item layui-this"><a href="#">新建活动</a></li>
|
||||
</ul>
|
||||
<div class="main_top">
|
||||
<div class="head">
|
||||
<div class="head_right">
|
||||
<i id="save" class="layui-btn yellow" >保存</i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="product_table activity_list_add" >
|
||||
<input type="hidden" id="id" name="title" value="{$id}"/>
|
||||
<!-- 左侧上传图片-->
|
||||
<div class="upload_pic_left">
|
||||
<p class="title">
|
||||
<i>*</i>
|
||||
请输入标题:
|
||||
</p>
|
||||
<div class="title_content">
|
||||
<input type="text" id="title" name="title" placeholder="建议标题字数在45个字以内"/>
|
||||
<span>
|
||||
<i class="i_leng">0</i>/
|
||||
<em>30</em>
|
||||
</span>
|
||||
</div>
|
||||
<p class="title">
|
||||
<i>*</i>
|
||||
请输入介绍:
|
||||
</p>
|
||||
<div class="title_content">
|
||||
<input type="text" id="excerpt_plain" name="title" placeholder="请输入资讯介绍"/>
|
||||
</div>
|
||||
<p class="title">
|
||||
<i>*</i>
|
||||
请输入资讯跳转链接:
|
||||
</p>
|
||||
<div class="title_content">
|
||||
<input type="text" id="url" name="title" placeholder="请输入资讯跳转链接"/>
|
||||
</div>
|
||||
<p class="title">
|
||||
<i>*</i>请上传资讯图片:
|
||||
<span></span>
|
||||
</p>
|
||||
<div class="img_cont" id="img_cont">
|
||||
<div class="upload_pic poster" id="poster">
|
||||
<img src="" alt="" id="Upload_img2"/>
|
||||
<input id="goodsUpload" hidden type="file" name="file2" />
|
||||
<!-- <i>①</i> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="layout popup" >
|
||||
<!-- 特价商品 -->
|
||||
<div id="specials" class="activity_product">
|
||||
<p class="btn">
|
||||
<a href="#" id="special_cancel" class="btncancel">取消</a>
|
||||
<a href="#" id="special_deter" class="curr" >确定</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script src="/static/adminghd/js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/static/adminghd/layui/layui.all.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/static/adminghd/js/common.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/static/adminghd/js/wechatset/wechatRealTimeInfoUpdate.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script>
|
||||
layui.use('upload', function(){
|
||||
var upload = layui.upload;
|
||||
|
||||
//图片上传接口
|
||||
upload.render({
|
||||
elem: '#Upload_img2'
|
||||
,url: '/adminghd/Files/uploadImg' //改成你的图片上传接口
|
||||
,multiple: true
|
||||
,before: function(obj){
|
||||
//do something
|
||||
}
|
||||
,done: function(res){
|
||||
//上传完毕回调
|
||||
if(res.status == 0){ //假设成功返回的code为0
|
||||
$('#Upload_img2').attr("src",res.file_path);
|
||||
//do something
|
||||
}
|
||||
}
|
||||
,error: function(){
|
||||
//请求出错处理
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user