first commit
This commit is contained in:
4
.gitignore
vendored
Executable file
4
.gitignore
vendored
Executable file
@@ -0,0 +1,4 @@
|
||||
.idea
|
||||
composer.lock
|
||||
*.log
|
||||
thinkphp
|
||||
42
.travis.yml
Executable file
42
.travis.yml
Executable file
@@ -0,0 +1,42 @@
|
||||
sudo: false
|
||||
|
||||
language: php
|
||||
|
||||
branches:
|
||||
only:
|
||||
- stable
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.composer/cache
|
||||
|
||||
before_install:
|
||||
- composer self-update
|
||||
|
||||
install:
|
||||
- composer install --no-dev --no-interaction --ignore-platform-reqs
|
||||
- zip -r --exclude='*.git*' --exclude='*.zip' --exclude='*.travis.yml' ThinkPHP_Core.zip .
|
||||
- composer require --update-no-dev --no-interaction "topthink/think-image:^1.0"
|
||||
- composer require --update-no-dev --no-interaction "topthink/think-migration:^1.0"
|
||||
- composer require --update-no-dev --no-interaction "topthink/think-captcha:^1.0"
|
||||
- composer require --update-no-dev --no-interaction "topthink/think-mongo:^1.0"
|
||||
- composer require --update-no-dev --no-interaction "topthink/think-worker:^1.0"
|
||||
- composer require --update-no-dev --no-interaction "topthink/think-helper:^1.0"
|
||||
- composer require --update-no-dev --no-interaction "topthink/think-queue:^1.0"
|
||||
- composer require --update-no-dev --no-interaction "topthink/think-angular:^1.0"
|
||||
- composer require --dev --update-no-dev --no-interaction "topthink/think-testing:^1.0"
|
||||
- zip -r --exclude='*.git*' --exclude='*.zip' --exclude='*.travis.yml' ThinkPHP_Full.zip .
|
||||
|
||||
script:
|
||||
- php think unit
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key:
|
||||
secure: TSF6bnl2JYN72UQOORAJYL+CqIryP2gHVKt6grfveQ7d9rleAEoxlq6PWxbvTI4jZ5nrPpUcBUpWIJHNgVcs+bzLFtyh5THaLqm39uCgBbrW7M8rI26L8sBh/6nsdtGgdeQrO/cLu31QoTzbwuz1WfAVoCdCkOSZeXyT/CclH99qV6RYyQYqaD2wpRjrhA5O4fSsEkiPVuk0GaOogFlrQHx+C+lHnf6pa1KxEoN1A0UxxVfGX6K4y5g4WQDO5zT4bLeubkWOXK0G51XSvACDOZVIyLdjApaOFTwamPcD3S1tfvuxRWWvsCD5ljFvb2kSmx5BIBNwN80MzuBmrGIC27XLGOxyMerwKxB6DskNUO9PflKHDPI61DRq0FTy1fv70SFMSiAtUv9aJRT41NQh9iJJ0vC8dl+xcxrWIjU1GG6+l/ZcRqVx9V1VuGQsLKndGhja7SQ+X1slHl76fRq223sMOql7MFCd0vvvxVQ2V39CcFKao/LB1aPH3VhODDEyxwx6aXoTznvC/QPepgWsHOWQzKj9ftsgDbsNiyFlXL4cu8DWUty6rQy8zT2b4O8b1xjcwSUCsy+auEjBamzQkMJFNlZAIUrukL/NbUhQU37TAbwsFyz7X0E/u/VMle/nBCNAzgkMwAUjiHM6FqrKKBRWFbPrSIixjfjkCnrMEPw=
|
||||
file:
|
||||
- ThinkPHP_Core.zip
|
||||
- ThinkPHP_Full.zip
|
||||
skip_cleanup: true
|
||||
on:
|
||||
tags: true
|
||||
16
404.html
Executable file
16
404.html
Executable file
@@ -0,0 +1,16 @@
|
||||
<html>
|
||||
<style>
|
||||
.btlink {
|
||||
color: #20a53a;
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
<meta charset="UTF-8">
|
||||
<html>
|
||||
<head><title>404 Not Found</title></head>
|
||||
<body>
|
||||
<center><h1>404 Not Found</h1></center>
|
||||
<hr>
|
||||
<div style="text-align: center;font-size: 15px" >Power by <a class="btlink" href="https://www.bt.cn/?from=404" target="_blank">堡塔 (免费,高效和安全的托管控制面板)</a></div>
|
||||
</body>
|
||||
</html>
|
||||
1236
CHANGELOG.md
Executable file
1236
CHANGELOG.md
Executable file
File diff suppressed because it is too large
Load Diff
32
LICENSE.txt
Executable file
32
LICENSE.txt
Executable file
@@ -0,0 +1,32 @@
|
||||
|
||||
ThinkPHP遵循Apache2开源协议发布,并提供免费使用。
|
||||
版权所有Copyright © 2006-2017 by ThinkPHP (http://thinkphp.cn)
|
||||
All rights reserved。
|
||||
ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。
|
||||
|
||||
Apache Licence是著名的非盈利开源组织Apache采用的协议。
|
||||
该协议和BSD类似,鼓励代码共享和尊重原作者的著作权,
|
||||
允许代码修改,再作为开源或商业软件发布。需要满足
|
||||
的条件:
|
||||
1. 需要给代码的用户一份Apache Licence ;
|
||||
2. 如果你修改了代码,需要在被修改的文件中说明;
|
||||
3. 在延伸的代码中(修改和有源代码衍生的代码中)需要
|
||||
带有原来代码中的协议,商标,专利声明和其他原来作者规
|
||||
定需要包含的说明;
|
||||
4. 如果再发布的产品中包含一个Notice文件,则在Notice文
|
||||
件中需要带有本协议内容。你可以在Notice中增加自己的
|
||||
许可,但不可以表现为对Apache Licence构成更改。
|
||||
具体的协议参考:http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
1
application/.htaccess
Executable file
1
application/.htaccess
Executable file
@@ -0,0 +1 @@
|
||||
deny from all
|
||||
1
application/admin/common.php
Normal file
1
application/admin/common.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
109
application/admin/common/Base.php
Normal file
109
application/admin/common/Base.php
Normal file
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
namespace app\admin\common;
|
||||
use think\Controller;
|
||||
use think\Session;
|
||||
// use think\Request;
|
||||
// use think\Db;
|
||||
use think\Response;
|
||||
|
||||
class Base extends Controller
|
||||
{
|
||||
protected function _initialize()
|
||||
{
|
||||
if(!session('admin_user_id')){//没有登录信息
|
||||
// $this->redirect('login/index');
|
||||
return $this->error('您还未登录',url('Login/logoutJump'));
|
||||
//Response::create(['status' => '0','msg'=> '还未登录,验证失败'], 'json')->send();
|
||||
exit;
|
||||
}else{
|
||||
//登录信息超时
|
||||
$log_time=session('admin_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/admin/config.php
Normal file
5
application/admin/config.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
//配置文件
|
||||
return [
|
||||
|
||||
];
|
||||
118
application/admin/controller/Files.php
Normal file
118
application/admin/controller/Files.php
Normal file
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use app\admin\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();
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
197
application/admin/controller/Index.php
Normal file
197
application/admin/controller/Index.php
Normal file
@@ -0,0 +1,197 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use app\admin\common\Base;
|
||||
use think\Request;
|
||||
use think\Db;
|
||||
use think\Log;
|
||||
header("Content-type: text/html; charset=utf-8");
|
||||
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/admin/controller/Login.php
Normal file
92
application/admin/controller/Login.php
Normal file
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
namespace app\admin\controller;
|
||||
|
||||
use app\admin\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('admin_user_id')){//没有登录信息
|
||||
return $this->view->fetch('login');
|
||||
}else{
|
||||
//登录信息超时
|
||||
$log_time=session('admin_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('admin_user_id',$infor['id']);
|
||||
//Session::set('admin_mechanism_id',$infor['mechanism_id']);
|
||||
$time_out=time()+3600;
|
||||
Session::set('admin_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/admin/controller/Menu.php
Normal file
325
application/admin/controller/Menu.php
Normal file
@@ -0,0 +1,325 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use app\admin\common\Base;
|
||||
use think\Request;
|
||||
use think\Db;
|
||||
use think\Log;
|
||||
header("Content-type: text/html; charset=utf-8");
|
||||
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/admin/controller/Wechatinfro.php
Normal file
105
application/admin/controller/Wechatinfro.php
Normal file
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use app\admin\common\Base;
|
||||
use think\Request;
|
||||
use think\Db;
|
||||
use think\Log;
|
||||
header("Content-type: text/html; charset=utf-8");
|
||||
|
||||
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('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/admin/controller/Wechatset.php
Normal file
182
application/admin/controller/Wechatset.php
Normal file
@@ -0,0 +1,182 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use app\admin\common\Base;
|
||||
use think\Request;
|
||||
use think\Db;
|
||||
use think\Log;
|
||||
header("Content-type: text/html; charset=utf-8");
|
||||
|
||||
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/admin/model/Permission.php
Normal file
11
application/admin/model/Permission.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
class Permission extends Model
|
||||
{
|
||||
// 设置完整的数据表(包含前缀)
|
||||
protected $table = 't_sys_menu';
|
||||
}
|
||||
11
application/admin/model/Role.php
Normal file
11
application/admin/model/Role.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
class Role extends Model
|
||||
{
|
||||
// 设置完整的数据表(包含前缀)
|
||||
protected $table = 't_sys_role';
|
||||
}
|
||||
1
application/admin/view/login/index1.html
Normal file
1
application/admin/view/login/index1.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/static/adminnv/favicon.ico"><title>女神卡后台管理系统</title><link href="/static/adminnv/css/app.d721f4c9.css" rel="preload" as="style"><link href="/static/adminnv/css/chunk-vendors.84bb20f7.css" rel="preload" as="style"><link href="/static/adminnv/js/app.def0bddb.js" rel="preload" as="script"><link href="/static/adminnv/js/chunk-vendors.71adc493.js" rel="preload" as="script"><link href="/static/adminnv/css/chunk-vendors.84bb20f7.css" rel="stylesheet"><link href="/static/adminnv/css/app.d721f4c9.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but project_atom doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/static/adminnv/js/chunk-vendors.71adc493.js"></script><script src="/static/adminnv/js/app.def0bddb.js"></script></body></html>
|
||||
143
application/admin/view/login/login.html
Normal file
143
application/admin/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/admin/css/style.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/static/admin/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/admin/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: "/admin/Login/login", // 服务器端脚本的 URL
|
||||
data: $(this).serialize(), // 自动序列化表单元素为字符串
|
||||
success: function(data) {
|
||||
if(data.status){
|
||||
//alert(data.msg);
|
||||
location.replace("/admin/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/admin/view/login/logoutJump.html
Normal file
28
application/admin/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/admin/layui/css/layui.css?t=1554901097999" media="all">
|
||||
<link rel="stylesheet" type="text/css" href="/static/admin/css/nav.css" />
|
||||
|
||||
|
||||
</head>
|
||||
<body class="parent_color">
|
||||
|
||||
|
||||
|
||||
<script src="/static/admin/js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/static/admin/layui/layui.all.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
top.location.href = '/admin/login';
|
||||
};
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
58
application/admin/view/login/nav.html
Normal file
58
application/admin/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/admin/layui/css/layui.css?t=1554901097999" media="all">
|
||||
<link rel="stylesheet" type="text/css" href="/static/admin/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/admin/js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/static/admin/layui/layui.all.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/static/admin/js/nav.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
743
application/admin/view/login/新建文件夹/index - 副本.html
Normal file
743
application/admin/view/login/新建文件夹/index - 副本.html
Normal file
@@ -0,0 +1,743 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta 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="Bookmark" href="/static/admin/favicon.ico">
|
||||
<link rel="Shortcut Icon" href="/static/admin/favicon.ico">
|
||||
<!--[if lt IE 9]>
|
||||
<script type="text/javascript" src="/static/admin/lib/html5shiv.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/lib/respond.min.js"></script>
|
||||
<![endif]--><link rel="stylesheet" type="text/css" href="/static/admin/h-ui/css/H-ui.min.css"><!--[if IE 6]>
|
||||
<script type="text/javascript" src="/static/admin/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
|
||||
<script>DD_belatedPNG.fix('*');</script>
|
||||
<![endif]-->
|
||||
<title>Hi,H-ui v4.0</title>
|
||||
<meta name="keywords" content="关键词,5个左右,单个8汉字以内">
|
||||
<meta name="description" content="网站描述,字数尽量空制在80个汉字,160个字符以内!">
|
||||
</head>
|
||||
<body ontouchstart>
|
||||
<div class="hui-side-box">
|
||||
<ul class="hui-nav pt-20">
|
||||
<li><a href="#">登录/注册</a></li>
|
||||
<li><a href="#">技术检索</a></li>
|
||||
<li><a href="#">关于我们</a></li>
|
||||
<li><a href="#">联系我们</a></li>
|
||||
<li><a href="#">隐私保护</a></li>
|
||||
<li><a href="#">免责声明</a></li>
|
||||
<li><a href="#">支付方式</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="hui-container-wrapper">
|
||||
<div class="hui-container-bg"></div>
|
||||
<header class="hui-nav-wrapper">
|
||||
<div class="hui-nav-bar hui-nav-black hui-nav-fixed-top">
|
||||
<div class="hui-layout-content clearfix">
|
||||
<a class="hui-logo hidden-xs" href="http://www.h-ui.net/aboutHui.shtml">H-ui前端框架</a>
|
||||
<a class="hui-logo visible-xs" href="http://www.h-ui.net/aboutHui.shtml">H-ui</a>
|
||||
<span class="hui-logo hui-slogan hidden-xs">简单 · 免费 · 适合中国网站</span>
|
||||
<a aria-hidden="false" class="hui-nav-toggle hui-iconfont visible-xs JS-nav-toggle" href="javascript:;"></a>
|
||||
<nav class="hui-nav hui-nav-collapse" style="float: left; display: flex; flex: 1 1 0%;">
|
||||
<ul class="clearfix">
|
||||
<li class="current"> <a href="http://www.h-ui.net/" target="_blank">首页</a> </li>
|
||||
<li><a href="http://www.h-ui.net/Hui-overview.shtml" target="_blank">核心</a></li>
|
||||
<li><a href="http://www.h-ui.net/lib/jQuery.cookie.js.shtml" target="_blank">脚本</a></li>
|
||||
<li class="hui-dropdown hui-dropdown-hover">
|
||||
<a href="javascript:;" class="hui-dropdown-link">工具 <i class="hui-iconfont"></i></a>
|
||||
<ul class="hui-menu hui-dropdown-menu radius box-shadow">
|
||||
<li class="hui-menu-item"><a href="http://www.h-ui.net/bug.shtml" target="_blank">Bug兼容性汇总</a></li>
|
||||
<li class="hui-menu-item"><a href="http://www.h-ui.net/websafecolors.shtml" target="_blank">web安全色</a></li>
|
||||
<li class="hui-menu-item"><a href="http://www.h-ui.net/hui-3.7-hui-iconfont.shtml" target="_blank">hui-iconfont</a></li>
|
||||
<li class="hui-menu-item">
|
||||
<a href="javascript:;">web工具箱<i class="arrow hui-iconfont"></i></a>
|
||||
<ul class="hui-menu">
|
||||
<li class="hui-menu-item"><a href="http://www.h-ui.net/tools/jsformat.shtml" target="_blank">JS/HTML格式化工具</a></li>
|
||||
<li class="hui-menu-item"><a href="http://www.h-ui.net/tools/HTMLtoJS.shtml" target="_blank">HTML/JS转换工具</a></li>
|
||||
<li class="hui-menu-item"><a href="http://www.h-ui.net/tools/cssformat.shtml" target="_blank">CSS代码格式化工具</a></li>
|
||||
<li class="hui-menu-item"><a href="http://www.h-ui.net/tools/daxiaoxie.shtml" target="_blank">字母大小写转换工具</a></li>
|
||||
<li class="hui-menu-item"><a href="http://www.h-ui.net/tools/fantizhuanhuan.shtml" target="_blank">繁体字、火星文转换</a></li>
|
||||
<li class="hui-menu-item">
|
||||
<a href="javascript:;">三级菜单<i class="arrow hui-iconfont"></i></a>
|
||||
<ul class="hui-menu">
|
||||
<li class="hui-menu-item"><a href="javascript:;">四级菜单</a></li>
|
||||
<li class="hui-menu-item"><a href="javascript:;">四级菜单</a></li>
|
||||
<li class="hui-menu-item"><a href="javascript:;">四级菜单</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="hui-menu-item"><a href="#">三级导航</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="hui-menu-item"><a href="#">二级导航</a></li>
|
||||
<li class="hui-menu-item disabled"><a href="javascript:;">二级菜单</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="http://h-ui.net/aboutHui.shtml" target="_blank">联系我们</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav class="hui-nav hidden-xs" style="float: right">
|
||||
<ul class="clearfix">
|
||||
<li><a href="#" target="_blank">登录</a></li>
|
||||
<li><a href="#" target="_blank">注册</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="hui-container-wap">
|
||||
<div id="hui-carousel-demo">
|
||||
<div class="hui-carousel">
|
||||
<div class="bd">
|
||||
<ul>
|
||||
<li><a href="http://www.h-ui.net/" target="_blank"><img src="h-ui/images/temp/banner-1.jpg"></a></li>
|
||||
<li><a href="http://www.h-ui.net/zhaoshang.shtml" target="_blank"><img src="h-ui/images/temp/banner-2.jpg"></a></li>
|
||||
<li><a href="http://h-ui.net/H-ui.admin.shtml" target="_blank"><img src="h-ui/images/temp/banner-3.jpg"></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<ol class="hd cl dots">
|
||||
<li>1</li>
|
||||
<li>2</li>
|
||||
<li>3</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<nav class="hui-breadcrumb">
|
||||
<div class="hui-layout-content">
|
||||
<i class="hui-iconfont"></i>
|
||||
<a href="/" class="c-primary">首页</a>
|
||||
<span class="c-gray en">></span>
|
||||
<a href="#">组件</a>
|
||||
<span class="c-gray en">></span>
|
||||
<span class="c-gray">当前页面</span>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="hui-layout-content ui-sortable">
|
||||
<h1>Hi,H-ui v4.0!</h1>
|
||||
<p class="f-14">开始全新的前端之旅!</p>
|
||||
<div class="hui-panel hui-panel-default">
|
||||
<div class="hui-panel-header">表单</div>
|
||||
<div class="hui-panel-body">
|
||||
<form action="" method="post" class="hui-form hui-form-horizontal responsive" id="demoform">
|
||||
<div class="hui-form-item hui-row clearfix">
|
||||
<label class="hui-form-item-label hui-col-xs-3">邮箱:</label>
|
||||
<div class="hui-form-item-control hui-col-xs-8">
|
||||
<input type="text" class="hui-input-text" placeholder="@" name="email" id="email" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-form-item hui-row clearfix">
|
||||
<label class="hui-form-item-label hui-col-xs-3">用户名:</label>
|
||||
<div class="hui-form-item-control hui-col-xs-8">
|
||||
<input type="text" class="hui-input-text" placeholder="4~16个字符,字母/中文/数字/下划线" name="username" id="username">
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-form-item hui-row clearfix">
|
||||
<label class="hui-form-item-label hui-col-xs-3">手机:</label>
|
||||
<div class="hui-form-item-control hui-col-xs-8">
|
||||
<input type="text" class="hui-input-text" autocomplete="off" placeholder="手机" name="telephone" id="telephone">
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-form-item hui-row clearfix">
|
||||
<label class="hui-form-item-label hui-col-xs-3">密码:</label>
|
||||
<div class="hui-form-item-control hui-col-xs-8">
|
||||
<input type="password" class="hui-input-text" autocomplete="off" placeholder="密码" name="password" id="password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-form-item hui-row clearfix">
|
||||
<label class="hui-form-item-label hui-col-xs-3">密码验证:</label>
|
||||
<div class="hui-form-item-control hui-col-xs-8">
|
||||
<input type="password" class="hui-input-text" autocomplete="off" placeholder="密码" name="password2" id="password2">
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-divider text-l">
|
||||
<div class="hui-divider-box">
|
||||
<span class="hui-divider-text">其他信息</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-form-item hui-row clearfix">
|
||||
<label class="hui-form-item-label hui-col-xs-3">单选框:</label>
|
||||
<div class="hui-form-item-control skin-minimal hui-col-xs-5">
|
||||
<div class="radio-box">
|
||||
<input type="radio" id="sex-1" name="sex" value="1">
|
||||
<label for="sex-1">男</label>
|
||||
</div>
|
||||
<div class="radio-box">
|
||||
<input type="radio" id="sex-2" name="sex" value="0">
|
||||
<label for="sex-2">女</label>
|
||||
</div>
|
||||
<div class="radio-box">
|
||||
<input type="radio" id="sex-3" name="sex" value="2">
|
||||
<label for="sex-3">保密</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-form-item hui-row clearfix">
|
||||
<label class="hui-form-item-label hui-col-xs-3">出生日期:</label>
|
||||
<div class="hui-form-item-control hui-col-xs-8">
|
||||
<input type="text" class="hui-input-text datetimepicker-input" value="" autocomplete="off" id="datetimepicker" name="datetimepicker">
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-form-item hui-row clearfix">
|
||||
<label class="hui-form-item-label hui-col-xs-3">爱好:</label>
|
||||
<div class="hui-form-item-control skin-minimal hui-col-xs-5">
|
||||
<div class="check-box">
|
||||
<input type="checkbox" id="checkbox-5" name="checkbox2" value="1">
|
||||
<label for="checkbox-5">上网</label>
|
||||
</div>
|
||||
<div class="check-box">
|
||||
<input type="checkbox" id="checkbox-6" name="checkbox2" value="2">
|
||||
<label for="checkbox-6">摄影</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-form-item hui-row clearfix">
|
||||
<label class="hui-form-item-label hui-col-xs-3">数量:</label>
|
||||
<div class="hui-form-item-control skin-minimal hui-col-xs-5">
|
||||
<div id="spinner-demo"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-form-item hui-row clearfix">
|
||||
<label class="hui-form-item-label hui-col-xs-3">附件:</label>
|
||||
<div class="hui-form-item-control hui-col-xs-8">
|
||||
<span class="hui-upload hui-form-group">
|
||||
<input class="hui-input-text upload-url" type="text" name="uploadfile-2" id="uploadfile-2" readonly="readonly" style="width:200px">
|
||||
<a href="javascript:void();" class="hui-btn hui-btn-primary upload-btn">
|
||||
<i class="hui-iconfont"></i>
|
||||
浏览文件
|
||||
</a>
|
||||
<input type="file" multiple="multiple" name="file-2" class="input-file">
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-form-item hui-row clearfix">
|
||||
<label class="hui-form-item-label hui-col-xs-3">所在城市:</label>
|
||||
<div class="hui-form-item-control hui-col-xs-8">
|
||||
<div class="hui-form-item hui-row clearfix" style="margin-top:0">
|
||||
<div class="hui-col-xs-6">
|
||||
<span class="hui-select-box">
|
||||
<select class="hui-select" size="1" name="city">
|
||||
<option value="" selected="selected">选择省份</option>
|
||||
<option value="1">北京</option>
|
||||
<option value="2">上海</option>
|
||||
<option value="3">广州</option>
|
||||
</select>
|
||||
</span>
|
||||
</div>
|
||||
<div class="hui-col-xs-6">
|
||||
<span class="hui-select-box">
|
||||
<select class="hui-select" size="1" name="city">
|
||||
<option value="" selected="selected">选择城市</option>
|
||||
<option value="1">北京</option>
|
||||
<option value="2">上海</option>
|
||||
<option value="3">广州</option>
|
||||
</select>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-form-item hui-row clearfix">
|
||||
<label class="hui-form-item-label hui-col-xs-3">网址:</label>
|
||||
<div class="hui-form-item-control hui-col-xs-8">
|
||||
<input type="text" class="hui-input-text" placeholder="http://" name="website" id="website">
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-form-item hui-row clearfix">
|
||||
<label class="hui-form-item-label hui-col-xs-3">备注:</label>
|
||||
<div class="hui-form-item-control hui-col-xs-8">
|
||||
<textarea class="hui-textarea" name="beizhu" id="beizhu" placeholder="说点什么...最少输入10个字符"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-form-item hui-row clearfix">
|
||||
<div class="hui-col-xs-8 hui-col-xs-offset-3">
|
||||
<input class="hui-btn hui-btn-primary" type="submit" value=" 提交 ">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-panel hui-panel-default mt-20">
|
||||
<div class="hui-panel-header">按钮</div>
|
||||
<div class="hui-panel-body">
|
||||
<table class="hui-table hui-table-border hui-table-bordered hui-table-striped hui-table-responsive mt-20 radius">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col1">button</th>
|
||||
<th class="col2">input</th>
|
||||
<th class="col3">a</th>
|
||||
<th class="col4">disabled状态</th>
|
||||
<th class="col5">空心</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td> <button class="hui-btn hui-btn-default radius" type="button">默认</button> </td>
|
||||
<td><input class="hui-btn hui-btn-default radius" type="button" value="默认"></td>
|
||||
<td><a href="#" class="hui-btn hui-btn-default radius">默认</a></td>
|
||||
<td><input class="hui-btn hui-btn-default radius disabled" type="button" value="不可点击"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><button class="hui-btn hui-btn-primary radius" type="button">主要</button></td>
|
||||
<td><input class="hui-btn hui-btn-primary radius" type="button" value="主要"></td>
|
||||
<td><a href="#" class="hui-btn hui-btn-primary radius">主要</a></td>
|
||||
<td><input class="hui-btn hui-btn-primary radius disabled" type="button" value="不可点击"></td>
|
||||
<td><input class="hui-btn hui-btn-primary-outline radius" type="button" value="主要"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><button class="hui-btn hui-btn-secondary radius" type="button">次要</button></td>
|
||||
<td><input class="hui-btn hui-btn-secondary radius" type="button" value="次要"></td>
|
||||
<td><a href="#" class="hui-btn hui-btn-secondary radius">次要</a></td>
|
||||
<td><input class="hui-btn hui-btn-secondary radius disabled" type="button" value="不可点击"></td>
|
||||
<td><input class="hui-btn radius btn-secondary-outline radius" type="button" value="次要"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><button class="hui-btn hui-btn-success radius" type="button">成功</button></td>
|
||||
<td><input class="hui-btn hui-btn-success radius" type="button" value="成功"></td>
|
||||
<td><a href="#" class="hui-btn hui-btn-success radius">成功</a></td>
|
||||
<td><input class="hui-btn hui-btn-success radius disabled" type="button" value="不可点击"></td>
|
||||
<td><input class="hui-btn hui-btn-success-outline radius" type="button" value="成功"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><button class="hui-btn hui-btn-warning radius" type="button">警告</button></td>
|
||||
<td><input class="hui-btn hui-btn-warning radius" type="button" value="警告"></td>
|
||||
<td><a href="#" class="hui-btn hui-btn-warning radius">警告</a></td>
|
||||
<td><input class="hui-btn hui-btn-warning radius disabled" type="button" value="不可点击"></td>
|
||||
<td><input class="hui-btn hui-btn-warning-outline radius" type="button" value="警告"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><button class="hui-btn hui-btn-danger radius" type="button">危险</button></td>
|
||||
<td><input class="hui-btn hui-btn-danger radius" type="button" value="危险"></td>
|
||||
<td><a href="#" class="hui-btn hui-btn-danger radius">危险</a></td>
|
||||
<td><input class="hui-btn hui-btn-danger radius disabled" type="button" value="不可点击"></td>
|
||||
<td><input class="hui-btn hui-btn-danger-outline radius" type="button" value="危险"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><button class="hui-btn hui-btn-link radius" type="button">链接</button></td>
|
||||
<td><input class="hui-btn hui-btn-link radius" type="button" value="链接"></td>
|
||||
<td><a href="#" class="hui-btn hui-btn-link radius">链接</a></td>
|
||||
<td><input class="hui-btn hui-btn-link radius disabled" type="button" value="不可点击"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><button class="hui-btn hui-btn-dashed radius" type="button">虚线</button></td>
|
||||
<td><input class="hui-btn hui-btn-dashed radius" type="button" value="虚线"></td>
|
||||
<td><a href="#" class="hui-btn hui-btn-dashed radius">虚线</a></td>
|
||||
<td><input class="hui-btn hui-btn-dashed radius disabled" type="button" value="不可点击"></td>
|
||||
<td></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>按钮大小</h3>
|
||||
<table class="hui-table hui-table-border hui-table-bordered hui-table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="30%">按钮</th>
|
||||
<th>class=""</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><input type="button" class="hui-btn hui-btn-primary size-XL radius" value="特大按钮"></td>
|
||||
<td><code>size-XL</code></td>
|
||||
</tr>
|
||||
<tr><td><input type="button" class="hui-btn hui-btn-primary size-L radius" value="大按钮"></td>
|
||||
<td><code>size-L</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="button" class="hui-btn hui-btn-primary radius" value="默认尺寸"></td>
|
||||
<td><code>size-M</code> 缺省值</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="button" class="hui-btn hui-btn-primary size-S radius" value="小按钮"></td>
|
||||
<td><code>size-S</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="button" class="hui-btn hui-btn-primary size-MINI radius" value="迷你按钮"></td>
|
||||
<td><code>size-MINI</code></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>按钮组</h3>
|
||||
<div class="hui-btn-group">
|
||||
<span class="hui-btn hui-btn-primary radius">左边按钮</span>
|
||||
<span class="hui-btn hui-btn-default radius">中间按钮</span>
|
||||
<span class="hui-btn hui-btn-default radius">中间按钮</span>
|
||||
<span class="hui-btn hui-btn-default radius">右边按钮</span>
|
||||
</div>
|
||||
<div class="clearfix mt-20">
|
||||
<div class="hui-btn-group f-l">
|
||||
<span class="hui-btn hui-btn-primary" title="源代码"><i class="hui-iconfont"></i></span>
|
||||
</div>
|
||||
<div class="hui-btn-group f-l ml-5">
|
||||
<span class="hui-btn hui-btn-primary" title="左对齐"><i class="hui-iconfont"></i></span>
|
||||
<span class="hui-btn hui-btn-primary" title="居中对齐"><i class="hui-iconfont"></i></span>
|
||||
<span class="hui-btn hui-btn-primary" title="右对齐"><i class="hui-iconfont"></i></span>
|
||||
<span class="hui-btn hui-btn-primary" title="两头对齐"><i class="hui-iconfont"></i></span>
|
||||
</div><div class="hui-btn-group f-l ml-5">
|
||||
<span class="hui-btn hui-btn-primary" title="字体"><i class="hui-iconfont"></i></span>
|
||||
<span class="hui-btn hui-btn-primary" title="加粗"><i class="hui-iconfont"></i></span>
|
||||
<span class="hui-btn hui-btn-primary" title="倾斜"><i class="hui-iconfont"></i></span>
|
||||
<span class="hui-btn hui-btn-primary" title="下划线"><i class="hui-iconfont"></i></span>
|
||||
<span class="hui-btn hui-btn-primary" title="行高"><i class="hui-iconfont"></i></span>
|
||||
<span class="hui-btn hui-btn-primary" title="行宽"><i class="hui-iconfont"></i></span>
|
||||
</div>
|
||||
<div class="hui-btn-group f-l ml-5">
|
||||
<span class="hui-btn hui-btn-primary" title="链接"><i class="hui-iconfont"></i></span>
|
||||
<span class="hui-btn hui-btn-primary" title="有序列表"><i class="hui-iconfont"></i></span>
|
||||
<span class="hui-btn hui-btn-primary" title="无序列表"><i class="hui-iconfont"></i></span>
|
||||
</div>
|
||||
<div class="hui-btn-group f-l ml-5">
|
||||
<span class="hui-btn hui-btn-primary" title="剪切"><i class="hui-iconfont"></i></span>
|
||||
<span class="hui-btn hui-btn-primary" title="复制"><i class="hui-iconfont"></i></span>
|
||||
<span class="hui-btn hui-btn-primary" title="粘贴"><i class="hui-iconfont"></i></span>
|
||||
</div></div></div></div>
|
||||
<div class="hui-panel hui-panel-default mt-20">
|
||||
<div class="hui-panel-header">列表</div>
|
||||
<div class="hui-panel-body">
|
||||
<ul class="hui-list hui-list-disc">
|
||||
<li class="hui-list-item">无序列表</li>
|
||||
<li class="hui-list-item">无序列表</li>
|
||||
<li class="hui-list-item">无序列表</li>
|
||||
</ul>
|
||||
<ol class="hui-list hui-list-decimal">
|
||||
<li class="hui-list-item">有序列表</li>
|
||||
<li class="hui-list-item">有序列表</li>
|
||||
<li class="hui-list-item">有序列表</li>
|
||||
</ol>
|
||||
<ol class="hui-list hui-list-top">
|
||||
<li class="hui-list-item"><span class="num">1</span>有序列表</li>
|
||||
<li class="hui-list-item"><span class="num">2</span>有序列表</li>
|
||||
<li class="hui-list-item"><span class="num">3</span>有序列表</li>
|
||||
</ol>
|
||||
</div></div>
|
||||
<div class="hui-panel hui-panel-default mt-20">
|
||||
<div class="hui-panel-header">图片</div>
|
||||
<div class="hui-panel-body">
|
||||
<p>
|
||||
<img width="140" height="140" src="data:image/=" alt="..." class="radius">
|
||||
<img width="140" height="140" src="data:image/=" alt="..." class="round">
|
||||
<img style="width:140px; height:140px" src="data:image/=" alt="..." class="hui-thumbnail">
|
||||
</p>
|
||||
<div class="hui-album" style="width:200px">
|
||||
<div class="hui-album-img">
|
||||
<img src="data:image/="></div>
|
||||
<div class="hui-album-title">《仙剑奇侠传》赵灵儿
|
||||
<span class="c-999">(20张)</span>
|
||||
</div>
|
||||
<div class="hui-album-bg">
|
||||
<div class="hui-album-bg-fir"></div>
|
||||
<div class="hui-album-bg-sec"></div></div></div>
|
||||
<div>
|
||||
<img src="h-ui/images/ucenter/avatar-default.jpg" class="hui-avatar radius size-MINI">
|
||||
<img src="h-ui/images/ucenter/avatar-default.jpg" class="hui-avatar radius size-S">
|
||||
<img src="h-ui/images/ucenter/avatar-default.jpg" class="hui-avatar radius size-M">
|
||||
<img src="h-ui/images/ucenter/avatar-default.jpg" class="hui-avatar radius size-L">
|
||||
<img src="h-ui/images/ucenter/avatar-default.jpg" class="hui-avatar radius size-XL">
|
||||
</div>
|
||||
<div class="hui-mask" style="width:300px; height:250px; border:solid 1px #ddd;">
|
||||
<img src="http://images.h-ui.net/www/AD-300x250.gif" width="300" height="250">
|
||||
<div class="mask-bar text-c">遮罩条</div></div></div></div>
|
||||
<div class="hui-panel hui-panel-default mt-20">
|
||||
<div class="hui-panel-header">表格</div>
|
||||
<div class="hui-panel-body">
|
||||
<table class="hui-table hui-table-border hui-table-bordered hui-table-striped mt-20">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col1">表头</th>
|
||||
<th class="col2">表头</th>
|
||||
<th class="col3">表头</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="col1">类别</th>
|
||||
<td class="col2">表格内容</td>
|
||||
<td class="col3">表格内容</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col1">类别</th>
|
||||
<td class="col2">表格内容</td>
|
||||
<td class="col3">表格内容</td>
|
||||
</tr>
|
||||
<tr><th class="col1">类别</th>
|
||||
<td class="col2">表格内容</td>
|
||||
<td class="col3">表格内容</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-panel hui-panel-default mt-20">
|
||||
<div class="hui-panel-header">选项卡</div>
|
||||
<div class="hui-panel-body">
|
||||
<div id="hui-tab-demo1" class="hui-tab">
|
||||
<div class="hui-tab-header clearfix">
|
||||
<span>选项卡一</span>
|
||||
<span>选项卡二</span>
|
||||
<span>自适应宽度</span>
|
||||
</div>
|
||||
<div class="hui-tab-content">内容一</div>
|
||||
<div class="hui-tab-content">内容二</div>
|
||||
<div class="hui-tab-content">内容三</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-panel hui-panel-default mt-20">
|
||||
<div class="hui-panel-header">便签与标号</div>
|
||||
<div class="hui-panel-body">
|
||||
<table class="hui-table hui-table-border hui-table-bordered hui-table-bg">
|
||||
<thead><tr><th>class=""</th><th>标签</th><th>标号</th><th>描述</th></tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>hui-label hui-label-default radius</code></td>
|
||||
<td><span class="hui-label hui-label-default radius">默认</span></td>
|
||||
<td><span class="hui-badge hui-badge-default">1</span></td>
|
||||
<td>默认</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>hui-label hui-label-primary radius</code></td>
|
||||
<td><span class="hui-label hui-label-primary radius">主要</span></td>
|
||||
<td><span class="hui-badge hui-badge-primary">2</span></td>
|
||||
<td>主要</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>hui-label hui-label-secondary radius</code></td>
|
||||
<td><span class="hui-label hui-label-secondary radius">次要</span></td>
|
||||
<td><span class="hui-badge hui-badge-secondary">3</span></td>
|
||||
<td>次要</td></tr><tr><td><code>hui-label hui-label-success radius</code></td>
|
||||
<td><span class="hui-label hui-label-success radius">成功</span></td>
|
||||
<td><span class="hui-badge hui-badge-success">4</span></td>
|
||||
<td>成功</td></tr><tr><td><code>hui-label hui-label-warning radius</code></td>
|
||||
<td><span class="hui-label hui-label-warning radius">警告</span></td>
|
||||
<td><span class="hui-badge hui-badge-warning">5</span></td>
|
||||
<td>警告</td></tr><tr><td><code>hui-label hui-label-danger radius</code></td>
|
||||
<td><span class="hui-label hui-label-danger radius">危险</span></td>
|
||||
<td><span class="hui-badge hui-badge-danger">6</span></td>
|
||||
<td>危险</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-panel hui-panel-default mt-20">
|
||||
<div class="hui-panel-header">警告</div>
|
||||
<div class="hui-panel-body">
|
||||
<div class="hui-alert hui-alert-success">
|
||||
<i class="hui-iconfont"></i>
|
||||
<div class="hui-alert-description">成功状态提示</div>
|
||||
</div>
|
||||
<div class="hui-alert hui-alert-danger"><i class="hui-iconfont"></i>
|
||||
<div class="hui-alert-description">危险状态提示</div>
|
||||
</div>
|
||||
<div class="hui-alert hui-alert-error">
|
||||
<i class="hui-iconfont"></i>
|
||||
<div class="hui-alert-description">错误状态提示</div>
|
||||
</div>
|
||||
<div class="hui-alert hui-alert-info">
|
||||
<i class="hui-iconfont"></i>
|
||||
<div class="hui-alert-description">信息状态提示</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-panel hui-panel-default mt-20">
|
||||
<div class="hui-panel-header">进度条</div>
|
||||
<div class="hui-panel-body">
|
||||
<div class="hui-progress radius">
|
||||
<div class="hui-progress-bar">
|
||||
<span class="sr-only" style="width:25%"></span>
|
||||
</div></div></div></div><div class="hui-panel hui-panel-default mt-20"><div class="hui-panel-header">弹出窗口</div><div class="hui-panel-body"><p class="mt-20">
|
||||
<button class="hui-btn hui-btn-primary" onclick="modaldemo()">弹出对话框</button>
|
||||
<button class="hui-btn hui-btn-primary ml-20" onclick="modalalertdemo()">消息框,2秒钟自动消失</button>
|
||||
</p></div></div><div class="hui-panel hui-panel-default mt-20"><div class="hui-panel-header">分享到</div>
|
||||
<div class="hui-panel-body">
|
||||
<section class="share clearfix"><div class="bdsharebuttonbox hui-share"><span class="share-text hui-iconfont"></span> <a href="#" class="bds_weixin hui-iconfont" data-cmd="weixin" title="分享到微信"></a> <a href="#" class="bds_qzone hui-iconfont" data-cmd="qzone" title="分享到QQ空间"></a> <a href="#" class="bds_sqq hui-iconfont" data-cmd="sqq" title="分享到QQ好友"></a> <a href="#" class="bds_tsina hui-iconfont" data-cmd="tsina" title="分享到新浪微博"></a> <a href="#" class="bds_tqq hui-iconfont" data-cmd="tqq" title="分享到腾讯微博"></a> <a href="#" class="bds_douban hui-iconfont" data-cmd="douban" title="分享到豆瓣网"></a></div></section></div></div><div class="hui-panel hui-panel-default mt-20"><div class="hui-panel-header">标签</div><div class="hui-panel-body"><div id="hui-tag-demo1"></div></div></div><div class="hui-panel hui-panel-default mt-20"><div class="hui-panel-header">星星评价</div><div class="hui-panel-body"><div class="clearfix"><span class="f-l f-15 va-m">描述相符:</span><div id="star-1" class="hui-star size-M f-l mr-10 va-m"></div><strong id="result-1" class="f-l va-m"></strong></div></div></div><div class="hui-panel hui-panel-default mt-20"><div class="hui-panel-header">tooltip效果</div><div class="hui-panel-body"><button class="hui-btn hui-btn-primary radius" data-toggle="tooltip" data-placement="right" title="右边显示">右边显示</button> <button class="hui-btn hui-btn-primary radius" data-toggle="tooltip" data-placement="top" title="上边显示">上边显示</button> <button class="hui-btn hui-btn-primary radius" data-toggle="tooltip" data-placement="bottom" title="下边显示">下边显示</button> <button class="hui-btn hui-btn-primary radius" data-toggle="tooltip" data-placement="left" title="左边显示">左边显示</button></div></div><div class="hui-panel hui-panel-default mt-20"><div class="hui-panel-header">popover效果</div><div class="hui-panel-body"><button type="button" class="hui-btn hui-btn-primary radius" title="标题" data-container="body" data-toggle="popover" data-placement="left" data-content="左侧的 Popover 中的一些内容">左侧的 Popover</button> <button type="button" class="hui-btn hui-btn-primary radius" title="标题" data-container="body" data-toggle="popover" data-placement="top" data-content="顶部的 Popover 中的一些内容">顶部的 Popover</button>
|
||||
<button type="button" class="hui-btn hui-btn-primary radius" title="标题" data-container="body" data-toggle="popover" data-placement="bottom" data-content="底部的 Popover 中的一些内容">底部的 Popover</button> <button type="button" class="hui-btn hui-btn-primary radius" title="标题" data-container="body" data-toggle="popover" data-placement="right" data-content="右侧的 Popover 中的一些内容">右侧的 Popover</button>
|
||||
</div></div><div class="hui-panel hui-panel-default mt-20"><div class="hui-panel-header clearfix"><span class="f-l">H-ui官方插件</span> <span class="f-r"></span></div><div class="hui-panel-body"><table class="hui-table hui-table-border hui-table-bordered hui-table-bg">
|
||||
<thead><tr><th width="30%">名称</th><th width="20%">版本号</th><th>描述</th></tr></thead>
|
||||
<tbody><tr><td><a href="lib/jQuery.Huihover.js.shtml" target="_blank">jQuery.Huihover.js</a></td><td>2.0</td><td>hover</td></tr><tr><td><a href="lib/jQuery.Huifocusblur.js.shtml" target="_blank">jQuery.Huifocusblur.js</a></td><td>2.0</td><td>得到失去焦点</td></tr><tr><td><a href="lib/jQuery.Huifold.js.shtml" target="_blank">jQuery.hui-fold.js</a></td><td>2.0</td><td>折叠</td></tr><tr><td><a href="lib/jQuery.Huipreview.js.shtml" target="_blank">jQuery.Huipreview.js</a></td><td>2.0</td><td>图片预览</td></tr><tr><td><a href="lib/jQuery.Huispinner.js.shtml" target="_blank">jQuery.Huispinner.js</a></td><td>2.0</td><td>微调器</td></tr><tr><td><a href="lib/jQuery.Huitab.js.shtml" target="_blank">jQuery.Huitab.js</a></td><td>2.0</td><td>选项卡</td></tr><tr><td><a href="lib/jQuery.Huitag.js.shtml" target="_blank">jQuery.Huitag.js</a></td><td>2.0</td><td>标签</td></tr><tr><td><a href="lib/jQuery.Huitextarealength.js.shtml" target="_blank">jQuery.Huitextarealength.js</a></td><td>2.0</td><td>字数限制</td></tr><tr><td><a href="lib/jQuery.HuitogglePassword.js.shtml" target="_blank">jQuery.HuitogglePassword.js</a></td><td>2.0</td><td>隐藏显示密码</td></tr><tr><td><a href="lib/jQuery.Huitotop.js.shtml" target="_blank">jQuery.Huitotop.js</a></td><td>2.0</td><td>返回顶部</td></tr></tbody></table></div></div><div class="hui-panel hui-panel-default mt-20"><div class="hui-panel-header clearfix"><span class="f-l">H-ui.js v3.0 整合的第三方插件<small>(引入了H-ui.js v3.0版本,无需再单独重复引用以下插件)</small></span>
|
||||
<span class="f-r">感谢以下插件!优秀的插件就像金子一样,处处发光</span></div><div class="hui-panel-body"><table class="hui-table hui-table-border hui-table-bordered hui-table-bg"><thead><tr><th width="30%">名称</th><th width="20%">版本号</th><th>描述</th></tr></thead>
|
||||
<tbody><tr><td><a href="lib/jQuery.cookie.js.shtml" target="_blank">jQuery.cookie.js</a></td><td>1.4.1</td><td>jQuery cookie插件。</td></tr><tr><td><a href="lib/jQuery.form.js.shtml" target="_blank">jQuery.form.js</a></td><td>3.51.0</td><td>jquey表单插件。</td></tr><tr><td><a href="lib/jQuery.lazyload.js.shtml" target="_blank">jQuery.lazyload.js</a></td><td>1.9.3</td><td>图片的延迟加载插件。</td></tr><tr><td>jQuery.responsive-nav.js</td><td>1.0.39</td><td>响应式导航插件。</td></tr><tr><td>jQuery.placeholder.js</td><td>1.0</td><td>IE浏览器支持placeholder。</td></tr><tr><td>jQuery.emailsuggest.js</td><td>1.0</td><td>邮箱域名自动提示填充插件。</td></tr><tr><td>jQuery.format.js</td><td>1.0</td><td>格式化字符串。</td></tr><tr><td>jQuery.iCheck.js</td><td>1.0</td><td>单选框,复选框美化插件。</td></tr><tr><td>jQuery.onePageNav.js</td><td>1.0</td><td>单页面滚动导航。</td></tr><tr><td>jQuery.stickUp.js</td><td>1.0</td><td>网页滚动,元素固定置顶插件。</td></tr><tr><td>jQuery.ColorPicker.js</td><td>1.0</td><td>颜色控件。</td></tr><tr><td>Bootstrap.modal.js</td><td>3.3.0</td><td>Bootstrap模态窗口,弹窗插件。</td></tr><tr><td>Bootstrap.dropdown.js</td><td>3.3.0</td><td>Bootstrap下拉框插件。</td></tr><tr><td>Bootstrap.transition.js</td><td>3.3.0</td><td>Bootstrap过渡效果(Transition)插件。</td></tr><tr><td>Bootstrap.tooltip.js</td><td>3.3.0</td><td>Bootstrap工具提示插件。</td></tr><tr><td>Bootstrap.popover.js</td><td>3.3.0</td><td>Bootstrap弹出框插件。</td></tr><tr><td>Bootstrap.alert.js</td><td>3.3.0</td><td>Bootstrap警告框插件。</td></tr><tr><td>Bootstrap.slider.js</td><td>1.0.1</td><td>Bootstrap滑动条插件。</td></tr><tr><td>Bootstrap.datetimepicker.js</td><td>1.0</td><td>Bootstrap日期插件。</td></tr><tr><td>Bootstrap.Switch.js</td><td>1.3</td><td>Bootstrap 开关控件。</td></tr></tbody></table></div></div><div class="hui-panel hui-panel-default mt-20"><div class="hui-panel-header clearfix"><span class="f-l">lib中的第三方插件</span> <span class="f-r">非必选插件,请有选择性的使用,用不上的可自行删除,减少框架体积</span></div><div class="hui-panel-body"><table class="hui-table hui-table-border hui-table-bordered hui-table-bg"><thead><tr><th width="30%">名称</th><th width="20%">版本号</th><th>描述</th></tr></thead><tbody><tr><td>jQuery.js</td><td>1.9.1</td><td>jQuery库,可自行下载新版本,替换现有版本。</td></tr><tr><td>jquery.SuperSlide</td><td>2.1.3</td><td>幻灯片组件</td></tr><tr><td>jquery.validation</td><td>1.14.0</td><td>表单验证插件</td></tr><tr><td>datatables</td><td>1.10.0</td><td>表格插件</td></tr><tr><td>nprogress</td><td>0.2.0</td><td>进度条插件</td></tr><tr><td>layer</td><td>3.1.1</td><td>layer弹出层插件</td></tr><tr><td>laypage</td><td>1.3</td><td>laypage 翻页插件</td></tr><tr><td>html5shiv.js</td><td>3.7.0</td><td>html5插件,让低版本IE支持html5元素</td></tr><tr><td>DD_belatedPNG_0.0.8a-min.js</td><td>0.0.8a</td><td>解决IE6png透明</td></tr><tr><td>swfobject.js</td><td>2.2</td><td>Flash插件</td></tr><tr><td>waterfall.min</td><td>0.1.6</td><td>瀑布流插件</td></tr></tbody></table></div></div></div><footer class="hui-footer mt-20"><div class="hui-layout-content"><nav class="hui-footer-nav"><a target="_blank" href="http://www.h-ui.net/aboutHui.shtml">关于H-ui</a> <span class="hui-pipe">|</span> <a target="_blank" href="http://www.h-ui.net/copyright.shtml">软件著作权</a> <span class="hui-pipe">|</span> <a target="_blank" href="http://www.h-ui.net/juanzeng.shtml">感谢捐赠</a></nav><p>Copyright ©2013-2022 H-ui.net All Rights Reserved.<br><a rel="nofollow" target="_blank" href="http://www.miitbeian.gov.cn/">豫ICP备19019279号-1</a><br>未经允许,禁止转载、抄袭、镜像<br>用心做站,做不一样的站</p></div></footer></div></div><!--普通弹出层--><div id="hui-modal-demo" class="hui-modal fade middle" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"><div class="hui-modal-dialog"><div class="hui-modal-content radius"><div class="hui-modal-header"><h3 class="hui-modal-title">对话框标题</h3><a class="hui-modal-close" data-dismiss="modal" aria-hidden="true" href="javascript:void();">×</a></div><div class="hui-modal-body"><p>对话框内容…</p></div>
|
||||
<div class="hui-modal-footer"><button class="hui-btn hui-btn-primary">确定</button> <button class="hui-btn" data-dismiss="modal" aria-hidden="true">关闭</button></div></div></div></div>
|
||||
<script type="text/javascript" src="/static/admin/lib/jquery/1.9.1/jquery.min.js"> </script>
|
||||
<script type="text/javascript" src="/static/admin/lib/jquery-ui/1.9.1/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/h-ui/js/H-ui.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/lib/jquery.SuperSlide/2.1.3/jquery.SuperSlide.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/lib/jquery.validation/1.14.0/validate-methods.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/lib/jquery.validation/1.14.0/messages_zh.js"></script>
|
||||
<script>//弹窗
|
||||
function modaldemo(){
|
||||
$("#hui-modal-demo").modal("show");
|
||||
}
|
||||
//消息框
|
||||
function modalalertdemo(){
|
||||
$("body").Huimodalalert({
|
||||
content: '我是消息框,2秒后我自动滚蛋!',
|
||||
speed: 2000,
|
||||
}, function () {
|
||||
alert("我已滚蛋");
|
||||
});
|
||||
}
|
||||
$(function(){
|
||||
$(".hui-input-text,.hui-textarea").Huifocusblur();
|
||||
|
||||
//幻灯片
|
||||
jQuery("#hui-carousel-demo .hui-carousel").slide({
|
||||
mainCell: ".bd ul",
|
||||
titCell: ".hd li",
|
||||
trigger: "click",
|
||||
effect: "leftLoop",
|
||||
autoPlay: true,
|
||||
delayTime: 700,
|
||||
interTime: 3000,
|
||||
pnLoop: false,
|
||||
titOnClassName: "active"
|
||||
});
|
||||
|
||||
$(".hui-panel").Huifold({
|
||||
titCell:'.hui-panel-header',
|
||||
mainCell:'.hui-panel-body',
|
||||
type:1,
|
||||
trigger:'click',
|
||||
className:"selected",
|
||||
speed:"first",
|
||||
});
|
||||
|
||||
//邮箱提示
|
||||
$("#email").emailsuggest();
|
||||
|
||||
//checkbox 美化
|
||||
$('.skin-minimal input').iCheck({
|
||||
checkboxClass: 'icheckbox-blue',
|
||||
radioClass: 'iradio-blue',
|
||||
increaseArea: '20%'
|
||||
});
|
||||
$('.skin-minimal input[name=checkbox2]').on('ifChecked', function(event) {
|
||||
console.log(event.type)
|
||||
$('.skin-minimal input[name=checkbox2]').each(function(e) {
|
||||
if($(this).is(":checked")) {
|
||||
console.log($(this).val());
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
//日期插件
|
||||
$("#datetimepicker").datetimepicker({
|
||||
language: 'zh-cn',
|
||||
format: 'yyyy-mm-dd',
|
||||
minView: "month",
|
||||
todayBtn: 1,
|
||||
autoclose: 1,
|
||||
endDate : new Date()
|
||||
}).on('hide',function(e) {
|
||||
//此处可以触发日期校验。
|
||||
});
|
||||
|
||||
/*+1 -1效果*/
|
||||
$("#spinner-demo").Huispinner({
|
||||
value:1,
|
||||
minValue:1,
|
||||
maxValue:99,
|
||||
dis:1
|
||||
});
|
||||
|
||||
$(".hui-textarea").Huitextarealength({
|
||||
minlength:10,
|
||||
maxlength:200.
|
||||
});
|
||||
|
||||
$("#demoform").validate({
|
||||
rules:{
|
||||
email:{
|
||||
required:true,
|
||||
email:true,
|
||||
},
|
||||
username:{
|
||||
required:true,
|
||||
minlength:4,
|
||||
maxlength:16
|
||||
},
|
||||
telephone:{
|
||||
required:true,
|
||||
isMobile:true,
|
||||
},
|
||||
password:{
|
||||
required:true,
|
||||
isPwd:true,
|
||||
},
|
||||
password2:{
|
||||
required:true,
|
||||
equalTo: "#password"
|
||||
},
|
||||
sex:{
|
||||
required:true,
|
||||
},
|
||||
datetimepicker:{
|
||||
required:true,
|
||||
},
|
||||
checkbox2:{
|
||||
required:true,
|
||||
},
|
||||
city:{
|
||||
required:true,
|
||||
},
|
||||
website:{
|
||||
required:true,
|
||||
url:true,
|
||||
},
|
||||
beizhu:{
|
||||
maxlength:500,
|
||||
}
|
||||
},
|
||||
onkeyup:false,
|
||||
focusCleanup:true,
|
||||
success:"valid",
|
||||
submitHandler: function(form){
|
||||
$("#modal-shenqing-success").modal("show");
|
||||
$(form).ajaxSubmit();
|
||||
}
|
||||
});
|
||||
|
||||
//选项卡
|
||||
$("#hui-tab-demo1").Huitab({
|
||||
index:0
|
||||
});
|
||||
|
||||
$("#hui-tag-demo1").Huitag();
|
||||
|
||||
//返回顶部
|
||||
$.Huitotop();
|
||||
|
||||
//hover效果
|
||||
$('.hui-mask').Huihover();
|
||||
|
||||
//星级评价
|
||||
$("#star-1").raty({
|
||||
hints: ['1','2', '3', '4', '5'],//自定义分数
|
||||
starOff: 'iconpic-star-S-default.png',//默认灰色星星
|
||||
starOn: 'iconpic-star-S.png',//黄色星星
|
||||
path: 'h-ui/images/star',//可以是相对路径
|
||||
number: 5,//星星数量,要和hints数组对应
|
||||
showHalf: true,
|
||||
targetKeep : true,
|
||||
click: function (score, evt) {//点击事件
|
||||
//第一种方式:直接取值
|
||||
$("#result-1").html('你的评分是'+score+'分');
|
||||
}
|
||||
});
|
||||
|
||||
var _bodyHeight = $(window).height();
|
||||
var _doch = $(document).height();
|
||||
$(".hui-container-wrapper").height(_bodyHeight);
|
||||
|
||||
/*左右滑动菜单*/
|
||||
$(".JS-nav-toggle").click(function() {
|
||||
$("body").addClass('hui-side-box-open');
|
||||
$(".hui-container-bg").height(_bodyHeight).show();
|
||||
});
|
||||
$(".hui-container-bg").click(function() {
|
||||
$(this).hide();
|
||||
$("body").removeClass('hui-side-box-open');
|
||||
});
|
||||
});</script></body></html><!--H-ui前端框架提供前端技术支持 h-ui.net @2022-04-26 -->
|
||||
112
application/admin/view/login/新建文件夹/index11.html
Normal file
112
application/admin/view/login/新建文件夹/index11.html
Normal file
@@ -0,0 +1,112 @@
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta 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="Bookmark" href="/static/admin/favicon.ico">
|
||||
<link rel="Shortcut Icon" href="/static/admin/favicon.ico">
|
||||
-->
|
||||
<!--[if lt IE 9]>
|
||||
<script type="text/javascript" src="/static/admin/lib/html5shiv.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/lib/respond.min.js"></script>
|
||||
<![endif]--><link rel="stylesheet" type="text/css" href="/static/admin/h-ui/css/H-ui.min.css"><!--[if IE 6]>
|
||||
<script type="text/javascript" src="/static/admin/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
|
||||
<script>DD_belatedPNG.fix('*');</script>
|
||||
<![endif]-->
|
||||
<title>瑞莱医疗</title>
|
||||
<meta name="keywords" content="关键词,5个左右,单个8汉字以内">
|
||||
<meta name="description" content="网站描述,字数尽量空制在80个汉字,160个字符以内!">
|
||||
</head>
|
||||
<body ontouchstart style="background-color:#e6e6e6;">
|
||||
|
||||
<div id="nav-container">
|
||||
<!-- 导航栏 -->
|
||||
{include file="menu/nav"}
|
||||
</div>
|
||||
|
||||
<div class="hui-container-wap" style="margin-top: 15%;" >
|
||||
<div class="hui-layout-content ui-sortable" style="width: 35%;" >
|
||||
<h1>瑞莱医疗后台登录</h1>
|
||||
<div class="hui-panel hui-panel-default" style="background-color:#ccc;border:0.1px solid #b5b3b3;" >
|
||||
<div class="hui-panel-body">
|
||||
<form action="" method="post" class="hui-form hui-form-horizontal responsive" id="demoform">
|
||||
<div class="hui-form-item hui-row clearfix">
|
||||
<label class="hui-form-item-label hui-col-xs-3">登录账号:</label>
|
||||
<div class="hui-form-item-control hui-col-xs-8">
|
||||
<input type="text" class="hui-input-text" autocomplete="off" placeholder="手机" name="telephone" id="telephone">
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-form-item hui-row clearfix">
|
||||
<label class="hui-form-item-label hui-col-xs-3">密码:</label>
|
||||
<div class="hui-form-item-control hui-col-xs-8">
|
||||
<input type="password" class="hui-input-text" autocomplete="off" placeholder="密码" name="password" id="password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-form-item hui-row clearfix">
|
||||
<div class="hui-col-xs-8 hui-col-xs-offset-3">
|
||||
<input class="hui-btn hui-btn-primary" type="submit" value=" 登录 ">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="/static/admin/lib/jquery/1.9.1/jquery.min.js"> </script>
|
||||
<script type="text/javascript" src="/static/admin/lib/jquery-ui/1.9.1/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/h-ui/js/H-ui.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/lib/jquery.SuperSlide/2.1.3/jquery.SuperSlide.min.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/lib/jquery.validation/1.14.0/validate-methods.js"></script>
|
||||
<script type="text/javascript" src="/static/admin/lib/jquery.validation/1.14.0/messages_zh.js"></script>
|
||||
<script>//弹窗
|
||||
$(document).ready(function(){
|
||||
//$("#nav-container").load("/application/admin/view/menu/nav.html");
|
||||
});
|
||||
|
||||
$(function(){
|
||||
|
||||
$("#demoform").validate({
|
||||
rules:{
|
||||
telephone:{
|
||||
required:true,
|
||||
isMobile:true,
|
||||
},
|
||||
password:{
|
||||
required:true,
|
||||
isPwd:false,
|
||||
}
|
||||
},
|
||||
onkeyup:false,
|
||||
focusCleanup:true,
|
||||
success:"valid",
|
||||
submitHandler: function(form){
|
||||
//alert(1111);
|
||||
$("#modal-shenqing-success").modal("show");
|
||||
$(form).ajaxSubmit({
|
||||
type: 'post', // 提交方式 get/post
|
||||
dataType: 'json',
|
||||
url:'/admin/Login/login',
|
||||
success: function(data) {
|
||||
if(data.status){
|
||||
alert(data.info);
|
||||
$(form).resetForm();
|
||||
} else {
|
||||
alert(data.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
// var _bodyHeight = $(window).height();
|
||||
// var _doch = $(document).height();
|
||||
// $(".hui-container-wrapper").height(_bodyHeight);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<!--H-ui前端框架提供前端技术支持 h-ui.net @2022-04-26 -->
|
||||
117
application/admin/view/login/新建文件夹/login.html
Normal file
117
application/admin/view/login/新建文件夹/login.html
Normal file
@@ -0,0 +1,117 @@
|
||||
<!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/admin/css/style.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/static/admin/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/admin/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();
|
||||
// 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);
|
||||
if(data.status){
|
||||
alert(data.info);
|
||||
// $(form).resetForm();
|
||||
} else {
|
||||
alert(data.msg);
|
||||
}
|
||||
}
|
||||
});*/
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
111
application/admin/view/login/新建文件夹/nav.html
Normal file
111
application/admin/view/login/新建文件夹/nav.html
Normal file
@@ -0,0 +1,111 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head lang="en">
|
||||
<meta charset="UTF-8">
|
||||
<title>蜂狐工厂后台</title>
|
||||
|
||||
<link rel="stylesheet" href="{S_URL}/templates/adminfactory/layui/css/layui.css?t=1554901097999" media="all">
|
||||
|
||||
<link rel="stylesheet" href="{S_URL}/templates/adminfactory/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;">
|
||||
<!-- <li class="layui-nav-item">
|
||||
<a href="javascript:;">工厂数据</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a href="javascript:;" data-url="/agent/goodsManage/goodsManage/req/warehouse">工厂数据</a></dd>
|
||||
|
||||
</dl>
|
||||
</li>
|
||||
<li class="layui-nav-item">
|
||||
<a href="javascript:;">人员管理</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a href="javascript:;" data-url="/factory/userManage/userManage/req/userList">人员管理</a></dd>
|
||||
|
||||
</dl>
|
||||
</li>
|
||||
<li class="layui-nav-item">
|
||||
<a href="javascript:;">资金明细</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a href="javascript:;" data-url="/factory/accDetails/accDetails/req/accDetailsList">资金明细</a></dd>
|
||||
|
||||
</dl>
|
||||
</li>
|
||||
<li class="layui-nav-item">
|
||||
<a href="javascript:;">引流工具</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd>
|
||||
<a href="javascript:;" data-url="/factory/drainageTool/assemble/req/lists">云拼团</a>
|
||||
</dd>
|
||||
<dd>
|
||||
<a data-url="/factory/drainageTool/fission/req/lists" href="javascript:;">云裂变</a>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li class="layui-nav-item">
|
||||
<a href="javascript:;" >代理管理</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a href="javascript:;" data-url="/factory/agentManage/agentManage/req/agentList">代理管理</a></dd>
|
||||
</dl>
|
||||
|
||||
</li> -->
|
||||
|
||||
|
||||
</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>
|
||||
<!-- /factory/drainageTool/shoppingMall/req/shoppingStyle -->
|
||||
<!-- /factory/drainageTool/shoppingMall/req/goodLists -->
|
||||
<!-- /factory/drainageTool/shoppingMall/req/productAdd -->
|
||||
|
||||
<!-- /factory/drainageTool/ldxCoupon/req/add -->
|
||||
<!-- /factory/drainageTool/ldxCoupon/req/lists -->
|
||||
<!-- /factory/drainageTool/fission/req/add -->
|
||||
<!-- /factory/userManage/userManage/req/userList -->
|
||||
<!-- /factory/userInfo/userInfo/req/userInfo -->
|
||||
<!-- 数据统计 /factory/drainageTool/assemble/req/statistics -->
|
||||
|
||||
<!-- 老带新设置 /factory/drainageTool/ldxCoupon/req/add -->
|
||||
<!-- 老带新优惠券列表 /factory/drainageTool/ldxCoupon/req/list -->
|
||||
|
||||
|
||||
<script src="{S_URL}/templates/adminfactory/js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="{S_URL}/templates/adminfactory/layui/layui.all.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="{S_URL}/templates/adminfactory/js/sys/nav.js?2020_8_28"></script>
|
||||
</body>
|
||||
</html>
|
||||
64
application/admin/view/wechatinfro/userList.html
Normal file
64
application/admin/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/admin/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="/static/admin/css/index.css"/>
|
||||
<link rel="stylesheet" href="/static/admin/css/activity.css"/>
|
||||
<style type="text/css">
|
||||
.layui-table-cell{
|
||||
height:auto!important;
|
||||
white-space:normal;
|
||||
}
|
||||
</style>
|
||||
<script src="/static/admin/js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/static/admin/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/admin/layui/layui.all.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<script src="/static/admin/js/wechatinfro/userList.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
60
application/admin/view/wechatinfro/wechatRecordList.html
Normal file
60
application/admin/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/admin/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="/static/admin/css/index.css"/>
|
||||
<link rel="stylesheet" href="/static/admin/css/activity.css"/>
|
||||
<style type="text/css">
|
||||
.layui-table-cell{
|
||||
height:auto!important;
|
||||
white-space:normal;
|
||||
}
|
||||
</style>
|
||||
<script src="/static/admin/js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/static/admin/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/admin/layui/layui.all.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<script src="/static/admin/js/wechatinfro/wechatRecordList.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
69
application/admin/view/wechatset/realTimeInfo.html
Normal file
69
application/admin/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/admin/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="/static/admin/css/index.css"/>
|
||||
<link rel="stylesheet" href="/static/admin/css/activity.css"/>
|
||||
<style type="text/css">
|
||||
.layui-table-cell{
|
||||
height:auto!important;
|
||||
white-space:normal;
|
||||
}
|
||||
</style>
|
||||
<script src="/static/admin/js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/static/admin/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/admin/layui/layui.all.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<script src="/static/admin/js/wechatset/wechatRealTimeInfoList.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
319
application/admin/view/wechatset/realTimeInfoAdd.html
Normal file
319
application/admin/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/admin/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="/static/admin/css/index.css"/>
|
||||
<link rel="stylesheet" href="/static/admin/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(/admin/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/admin/js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/static/admin/layui/layui.all.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/static/admin/js/common.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/static/admin/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: '/admin/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/admin/view/wechatset/realTimeInfoUpdate.html
Normal file
320
application/admin/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/admin/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="/static/admin/css/index.css"/>
|
||||
<link rel="stylesheet" href="/static/admin/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(/admin/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/admin/js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/static/admin/layui/layui.all.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/static/admin/js/common.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/static/admin/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: '/admin/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>
|
||||
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>
|
||||
340
application/app/controller/Base.php
Normal file
340
application/app/controller/Base.php
Normal file
@@ -0,0 +1,340 @@
|
||||
<?php
|
||||
namespace app\app\controller;
|
||||
use think\Controller;
|
||||
use think\Db;
|
||||
/**
|
||||
* 验证api是否正确
|
||||
*/
|
||||
class Base extends controller
|
||||
{
|
||||
|
||||
function __initialize()
|
||||
{
|
||||
|
||||
}
|
||||
/******************************* 小程序公用 ******************************************/
|
||||
/**
|
||||
* 检验数据的真实性,并且获取解密后的明文.
|
||||
* @param $encryptedData string 加密的用户数据
|
||||
* @param $iv string 与用户数据一同返回的初始向量
|
||||
* @param $data string 解密后的原文
|
||||
* @return int 成功0,失败返回对应的错误码
|
||||
*/
|
||||
public function decryptData($sessionKey,$appid,$encryptedData, $iv, &$data )
|
||||
{
|
||||
$OK = 0;
|
||||
$IllegalAesKey = -41001;
|
||||
$IllegalIv = -41002;
|
||||
$IllegalBuffer = -41003;
|
||||
$DecodeBase64Error = -41004;
|
||||
if (strlen($sessionKey) != 24) {
|
||||
return $IllegalAesKey;
|
||||
}
|
||||
$aesKey=base64_decode($sessionKey);
|
||||
|
||||
|
||||
if (strlen($iv) != 24) {
|
||||
return $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 $IllegalBuffer;
|
||||
}
|
||||
if( $dataObj->watermark->appid != $appid )
|
||||
{
|
||||
return $IllegalBuffer;
|
||||
}
|
||||
$data = $result;
|
||||
return $OK;
|
||||
}
|
||||
/**
|
||||
*GET方式请求
|
||||
*/
|
||||
function httpGet($url){
|
||||
$ch = curl_init();
|
||||
//设置选项,包括URL
|
||||
curl_setopt($ch, CURLOPT_URL, $url);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_HEADER, 0);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //不验证证书
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); //不验证证书
|
||||
//执行并获取HTML文档内容
|
||||
$output = curl_exec($ch);
|
||||
//释放curl句柄
|
||||
curl_close($ch);
|
||||
//$result = json_decode($output);
|
||||
//$result->subscribe
|
||||
return $output;
|
||||
}
|
||||
/**
|
||||
* post访问url
|
||||
*/
|
||||
function https_post($url,$data){
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch,CURLOPT_URL,$url);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //不验证证书
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); //不验证证书
|
||||
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
|
||||
curl_setopt($ch,CURLOPT_POST,1);
|
||||
curl_setopt($ch,CURLOPT_POSTFIELDS,$data);
|
||||
$output = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
return $output;
|
||||
}
|
||||
/*
|
||||
*加解密
|
||||
*函数authcode($string, $operation, $key, $expiry)中的$string:字符串,明文或密文;$operation:DECODE表示解密,其它表示加密;$key:密匙;$expiry:密文有效期。
|
||||
*/
|
||||
public function authcode($string, $operation = 'DECODE', $key = '', $expiry = 0) {
|
||||
// 动态密匙长度,相同的明文会生成不同密文就是依靠动态密匙
|
||||
$ckey_length = 4;
|
||||
|
||||
// 密匙
|
||||
$key = md5($key ? $key : '' ); //md5($key ? $key : $GLOBALS['discuz_auth_key']);
|
||||
|
||||
// 密匙a会参与加解密
|
||||
$keya = md5(substr($key, 0, 16));
|
||||
// 密匙b会用来做数据完整性验证
|
||||
$keyb = md5(substr($key, 16, 16));
|
||||
// 密匙c用于变化生成的密文
|
||||
$keyc = $ckey_length ? ($operation == 'DECODE' ? substr($string, 0, $ckey_length): substr(md5(microtime()), -$ckey_length)) : '';
|
||||
// 参与运算的密匙
|
||||
$cryptkey = $keya.md5($keya.$keyc);
|
||||
$key_length = strlen($cryptkey);
|
||||
// 明文,前10位用来保存时间戳,解密时验证数据有效性,10到26位用来保存$keyb(密匙b),
|
||||
//解密时会通过这个密匙验证数据完整性
|
||||
// 如果是解码的话,会从第$ckey_length位开始,因为密文前$ckey_length位保存 动态密匙,以保证解密正确
|
||||
$string = $operation == 'DECODE' ? base64_decode(substr($string, $ckey_length)) : sprintf('%010d', $expiry ? $expiry + time() : 0).substr(md5($string.$keyb), 0, 16).$string;
|
||||
$string_length = strlen($string);
|
||||
$result = '';
|
||||
$box = range(0, 255);
|
||||
$rndkey = array();
|
||||
// 产生密匙簿
|
||||
for($i = 0; $i <= 255; $i++) {
|
||||
$rndkey[$i] = ord($cryptkey[$i % $key_length]);
|
||||
}
|
||||
// 用固定的算法,打乱密匙簿,增加随机性,好像很复杂,实际上对并不会增加密文的强度
|
||||
for($j = $i = 0; $i < 256; $i++) {
|
||||
$j = ($j + $box[$i] + $rndkey[$i]) % 256;
|
||||
$tmp = $box[$i];
|
||||
$box[$i] = $box[$j];
|
||||
$box[$j] = $tmp;
|
||||
}
|
||||
// 核心加解密部分
|
||||
for($a = $j = $i = 0; $i < $string_length; $i++) {
|
||||
$a = ($a + 1) % 256;
|
||||
$j = ($j + $box[$a]) % 256;
|
||||
$tmp = $box[$a];
|
||||
$box[$a] = $box[$j];
|
||||
$box[$j] = $tmp;
|
||||
// 从密匙簿得出密匙进行异或,再转成字符
|
||||
$result .= chr(ord($string[$i]) ^ ($box[($box[$a] + $box[$j]) % 256]));
|
||||
}
|
||||
if($operation == 'DECODE') {
|
||||
// 验证数据有效性,请看未加密明文的格式
|
||||
if((substr($result, 0, 10) == 0 || substr($result, 0, 10) - time() > 0) && substr($result, 10, 16) == substr(md5(substr($result, 26).$keyb), 0, 16)) {
|
||||
return substr($result, 26);
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
} else {
|
||||
// 把动态密匙保存在密文里,这也是为什么同样的明文,生产不同密文后能解密的原因
|
||||
// 因为加密后的密文可能是一些特殊字符,复制过程可能会丢失,所以用base64编码
|
||||
return $keyc.str_replace('=', '', base64_encode($result));
|
||||
}
|
||||
}
|
||||
/**
|
||||
*微信提现,企业付款到零用钱
|
||||
*$openid 公众号下的用户openid
|
||||
*$mch_billno 订单号
|
||||
*$total_amount 提现的金额
|
||||
*$mark 备注
|
||||
*@return 错误 false ,成功
|
||||
*/
|
||||
function wxBusinessPay($openid,$mch_billno,$total_amount,$mark,$MCHID,$APPID,$Key){
|
||||
$nonce_str=$this->createNoncestr( $length = 32 );
|
||||
$sendarry=array();
|
||||
// 随机字符串
|
||||
$sendarry["nonce_str"]=$nonce_str;
|
||||
// 商户订单号
|
||||
$sendarry["partner_trade_no"]=$mch_billno;
|
||||
// 商户号
|
||||
$sendarry["mchid"]=$MCHID;
|
||||
// 公众账号appid
|
||||
$sendarry["mch_appid"]=$APPID;
|
||||
// 用户openid
|
||||
$sendarry["openid"]=$openid;
|
||||
// 付款金额
|
||||
$sendarry["amount"]=$total_amount*100;
|
||||
// 红包祝福语
|
||||
$sendarry["check_name"]='NO_CHECK';//不超过20字
|
||||
// Ip地址
|
||||
$sendarry["spbill_create_ip"]='62.234.183.107';
|
||||
// 备注
|
||||
$sendarry["desc"]=$mark;
|
||||
// 签名
|
||||
$sign=$this->getSign($sendarry,$Key);
|
||||
$sendarry["sign"]=$sign;
|
||||
//转换XML
|
||||
$sendxml=$this->arrayToXml($sendarry);
|
||||
// 调用的接口
|
||||
$url='https://api.mch.weixin.qq.com/mmpaymkttransfers/promotion/transfers';
|
||||
// 使用证书,以post方式提交xml到对应的接口url
|
||||
$data=$this->postXmlSSLCurl($sendxml,$url,$seconed=30);
|
||||
if($data == false){
|
||||
return false;
|
||||
}else{
|
||||
$obj = $this->xmlToArray($data);
|
||||
//发送成功
|
||||
if($obj['return_code'] == 'SUCCESS' && $obj['result_code'] == 'SUCCESS'){
|
||||
return true;
|
||||
//金额不足
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 作用:产生随机字符串,不长于32位
|
||||
*/
|
||||
public function createNoncestr( $length = 32 )
|
||||
{
|
||||
$chars = "abcdefghijklmnopqrstuvwxyz0123456789";
|
||||
$str ="";
|
||||
for ( $i = 0; $i < $length; $i++ ) {
|
||||
$str.= substr($chars, mt_rand(0, strlen($chars)-1), 1);
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
/**
|
||||
* 作用:格式化参数,签名过程需要使用
|
||||
*/
|
||||
function formatBizQueryParaMap($paraMap, $urlencode)
|
||||
{
|
||||
$buff = "";
|
||||
ksort($paraMap);
|
||||
foreach ($paraMap as $k => $v)
|
||||
{
|
||||
if($urlencode)
|
||||
{
|
||||
$v = urlencode($v);
|
||||
}
|
||||
//$buff .= strtolower($k) . "=" . $v . "&";
|
||||
$buff .= $k . "=" . $v . "&";
|
||||
}
|
||||
$reqPar;
|
||||
if (strlen($buff) > 0)
|
||||
{
|
||||
$reqPar = substr($buff, 0, strlen($buff)-1);
|
||||
}
|
||||
return $reqPar;
|
||||
}
|
||||
/**
|
||||
* 作用:生成签名
|
||||
*/
|
||||
public function getSign($Obj,$KEY)
|
||||
{
|
||||
foreach ($Obj as $k => $v)
|
||||
{
|
||||
$Parameters[$k] = $v;
|
||||
}
|
||||
//签名步骤一:按字典序排序参数
|
||||
ksort($Parameters);
|
||||
$String = $this->formatBizQueryParaMap($Parameters, false);
|
||||
//echo '【string1】'.$String.'</br>';
|
||||
//签名步骤二:在string后加入KEY
|
||||
$String = $String."&key=".$KEY;
|
||||
//echo "【string2】".$String."</br>";
|
||||
//签名步骤三:MD5加密
|
||||
$String = md5($String);
|
||||
//echo "【string3】 ".$String."</br>";
|
||||
//签名步骤四:所有字符转为大写
|
||||
$result_ = strtoupper($String);
|
||||
//echo "【result】 ".$result_."</br>";
|
||||
return $result_;
|
||||
}
|
||||
/**
|
||||
* 作用:array转xml
|
||||
*/
|
||||
function arrayToXml($arr)
|
||||
{
|
||||
$xml = "<xml>";
|
||||
foreach ($arr as $key=>$val)
|
||||
{
|
||||
if (is_numeric($val))
|
||||
{
|
||||
$xml.="<".$key.">".$val."</".$key.">";
|
||||
|
||||
}
|
||||
else
|
||||
$xml.="<".$key."><![CDATA[".$val."]]></".$key.">";
|
||||
}
|
||||
$xml.="</xml>";
|
||||
return $xml;
|
||||
}
|
||||
|
||||
/**
|
||||
* 作用:将xml转为array
|
||||
*/
|
||||
public function xmlToArray($xml)
|
||||
{
|
||||
//将XML转为array
|
||||
$array_data = json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)), true);
|
||||
return $array_data;
|
||||
}
|
||||
/**
|
||||
* 作用:使用证书,以post方式提交xml到对应的接口url
|
||||
*/
|
||||
function postXmlSSLCurl($xml,$url,$second=30)
|
||||
{
|
||||
$ch = curl_init();
|
||||
//超时时间
|
||||
curl_setopt($ch,CURLOPT_TIMEOUT,$second);
|
||||
//这里设置代理,如果有的话
|
||||
//curl_setopt($ch,CURLOPT_PROXY, '8.8.8.8');
|
||||
//curl_setopt($ch,CURLOPT_PROXYPORT, 8080);
|
||||
curl_setopt($ch,CURLOPT_URL, $url);
|
||||
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,FALSE);
|
||||
curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,FALSE);
|
||||
//设置header
|
||||
curl_setopt($ch,CURLOPT_HEADER,FALSE);
|
||||
//要求结果为字符串且输出到屏幕上
|
||||
curl_setopt($ch,CURLOPT_RETURNTRANSFER,TRUE);
|
||||
//设置证书
|
||||
//使用证书:cert 与 key 分别属于两个.pem文件
|
||||
//默认格式为PEM,可以注释
|
||||
curl_setopt($ch,CURLOPT_SSLCERTTYPE,'PEM');
|
||||
curl_setopt($ch,CURLOPT_SSLCERT, ROOT_PATH."/application/app/cacert/apiclient_cert.pem");
|
||||
//默认格式为PEM,可以注释
|
||||
curl_setopt($ch,CURLOPT_SSLKEYTYPE,'PEM');
|
||||
curl_setopt($ch,CURLOPT_SSLKEY, ROOT_PATH."/application/app/cacert/apiclient_key.pem");
|
||||
//post提交方式
|
||||
curl_setopt($ch,CURLOPT_POST, true);
|
||||
curl_setopt($ch,CURLOPT_POSTFIELDS,$xml);
|
||||
$data = curl_exec($ch);
|
||||
//返回结果
|
||||
if($data){
|
||||
curl_close($ch);
|
||||
return $data;
|
||||
}
|
||||
else {
|
||||
$error = curl_errno($ch);
|
||||
/* echo "curl出错,错误码:$error"."<br>";
|
||||
echo "<a href='http://curl.haxx.se/libcurl/c/libcurl-errors.html'>错误原因查询</a></br>";*/
|
||||
curl_close($ch);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/******************************* 小程序公用 ******************************************/
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
388
application/app/controller/Ghdwechat.php
Normal file
388
application/app/controller/Ghdwechat.php
Normal file
@@ -0,0 +1,388 @@
|
||||
<?php
|
||||
namespace app\app\controller;
|
||||
|
||||
use think\Request;
|
||||
use think\Db;
|
||||
/**
|
||||
*生长激素缺乏症小程序
|
||||
*/
|
||||
class Ghdwechat extends Base{
|
||||
//小程序appid
|
||||
private $Appid;
|
||||
//小程序秘钥
|
||||
private $Appsecret;
|
||||
//商户号
|
||||
//private $Mch_id;
|
||||
//商户key
|
||||
//private $Key;
|
||||
//访问令牌加密秘钥
|
||||
private $TokenKey;
|
||||
public function __construct(){
|
||||
$this->Appid='wxa75a76964ae7ce73';
|
||||
$this->Appsecret='e14af51b729cabdbb232147ce9ad8b30';
|
||||
// $this->Mch_id='1611903889';
|
||||
// $this->Key='b046hjZnS6ioMacttGA66ffae887e55f';
|
||||
$this->TokenKey='ghd340u20k4se309sa';
|
||||
}
|
||||
/********************************* 首页 *********************************/
|
||||
/**
|
||||
*查询资讯列表
|
||||
*/
|
||||
public function selectRealtimeInfoList(Request $request){
|
||||
$post=$request->param();
|
||||
/* if(!isset($post['uid']) || empty($post['uid']) ){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入用户id";
|
||||
return json_encode($result);
|
||||
}*/
|
||||
$page = isset($post['page']) && !empty($post['page']) ? $post['page'] : 1;//页数
|
||||
$page_size = isset($post['page_size']) && !empty($post['page_size']) ? $post['page_size'] : 20;//每页条数
|
||||
// 查询列表
|
||||
$res = Db::name('wechat_real_time_info')
|
||||
->field('title_plain,thumbnail,excerpt_plain,url')
|
||||
->order('create_time desc')
|
||||
->paginate($page_size,false,['page'=>$page]);
|
||||
|
||||
$result = array();
|
||||
$result['lists'] =$res->items();
|
||||
$result['lastPage'] = $res->lastPage();//总页数
|
||||
$result['currentPage'] = $res->currentPage();//当前页
|
||||
// $result['total'] = $res->total();//数据总条数
|
||||
$result['erro'] = 0;
|
||||
$result['msg'] = '查询成功';
|
||||
return json($result);
|
||||
}
|
||||
/********************************* 首页 *********************************/
|
||||
/********************************* 计算 *********************************/
|
||||
/***
|
||||
*计算
|
||||
**/
|
||||
public function calculate(Request $request){
|
||||
$post=$request->param();
|
||||
if(!isset($post['uid']) || empty($post['uid']) ){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入用户id";
|
||||
return json_encode($result);
|
||||
}
|
||||
if(!isset($post['name']) || empty($post['name']) ){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入姓名";
|
||||
return json_encode($result);
|
||||
}
|
||||
if(!isset($post['age']) || empty($post['age']) || !is_numeric($post['age'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入年龄";
|
||||
return json_encode($result);
|
||||
}
|
||||
if(!isset($post['height']) || empty($post['height']) || !is_numeric($post['height'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入身高";
|
||||
return json_encode($result);
|
||||
}
|
||||
if(!isset($post['bone_age']) || empty($post['bone_age']) || !is_numeric($post['bone_age'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入骨龄";
|
||||
return json_encode($result);
|
||||
}
|
||||
if(!isset($post['father_height']) || empty($post['father_height']) || !is_numeric($post['father_height'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入父亲身高";
|
||||
return json_encode($result);
|
||||
}
|
||||
if(!isset($post['mother_height']) || empty($post['mother_height']) || !is_numeric($post['mother_height'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入母亲身高";
|
||||
return json_encode($result);
|
||||
}
|
||||
if(!isset($post['LH']) || empty($post['LH']) || !is_numeric($post['LH'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入LH或数据格式不对";
|
||||
return json_encode($result);
|
||||
}
|
||||
if(!isset($post['IGF']) || empty($post['IGF']) || !is_numeric($post['IGF'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入IGF或数据格式不对";
|
||||
return json_encode($result);
|
||||
}
|
||||
//子宫厚度
|
||||
if(!isset($post['uterus_thickness']) || empty($post['uterus_thickness']) || !is_numeric($post['uterus_thickness'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入uterus_thickness或数据格式不对";
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
//计算
|
||||
//计算公式 P= (exp(-5.908+0.008*IGF-1+2.146*LH+0.286*子宫(厚)))/(1 + exp(-5.908+0.008*IGF-1+2.146*LH+0.286*子宫(厚)))
|
||||
$exp = exp(-5.908 + 0.008*$post['IGF'] + 2.146*$post['LH'] + 0.286*$post['uterus_thickness']);
|
||||
$probability = $exp / (1 + $exp);
|
||||
|
||||
//保存记录数据
|
||||
$data=[];
|
||||
$data['id']=md5(time().rand(100000,999999));
|
||||
$data['uid']=$post['uid'];
|
||||
$data['name']=$post['name'];
|
||||
$data['age']=$post['age'];
|
||||
$data['height']=$post['height'];
|
||||
$data['bone_age']=$post['bone_age'];
|
||||
$data['father_height']=$post['father_height'];
|
||||
$data['mother_height']=$post['mother_height'];
|
||||
$data['IGF']=$post['IGF'];
|
||||
$data['LH']=$post['LH'];
|
||||
$data['uterus_thickness']=$post['uterus_thickness'];
|
||||
$data['calculate_resutlt']=round($probability,3);
|
||||
$data['create_time']=date('Y-m-d H:i:s');
|
||||
$res=Db::name('wechat_calculate_record')->insert($data);
|
||||
if($res===false){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "计算失败";
|
||||
return json_encode($result);
|
||||
}else{
|
||||
$result['erro'] = 0;
|
||||
$result['msg'] = "计算成功";
|
||||
$result['calculate_resutlt'] = $data['calculate_resutlt'];
|
||||
return json_encode($result);
|
||||
}
|
||||
}
|
||||
/**
|
||||
*查询历史记录列表
|
||||
*/
|
||||
public function selectRecordList(Request $request){
|
||||
$post=$request->param();
|
||||
if(!isset($post['uid']) || empty($post['uid']) ){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入用户id";
|
||||
return json_encode($result);
|
||||
}
|
||||
$page = isset($post['page']) && !empty($post['page']) ? $post['page'] : 1;//页数
|
||||
$page_size = isset($post['page_size']) && !empty($post['page_size']) ? $post['page_size'] : 30;//每页条数
|
||||
// 查询列表
|
||||
$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('uid',$post['uid'])
|
||||
->order('create_time desc')
|
||||
->paginate($page_size,false,['page'=>$page]);
|
||||
|
||||
$result = array();
|
||||
$result['lists'] =$res->items();
|
||||
$result['lastPage'] = $res->lastPage();//总页数
|
||||
$result['currentPage'] = $res->currentPage();//当前页
|
||||
// $result['total'] = $res->total();//数据总条数
|
||||
$result['erro'] = 0;
|
||||
$result['msg'] = '查询成功';
|
||||
return json($result);
|
||||
}
|
||||
/**
|
||||
*删除历史记录
|
||||
*/
|
||||
public function deleteRecord(Request $request){
|
||||
$post=$request->param();
|
||||
if(!isset($post['uid']) || empty($post['uid']) ){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入用户id";
|
||||
return json($result);
|
||||
}
|
||||
if(!isset($post['id']) || empty($post['id']) ){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "请选择要删除的记录";
|
||||
return json($result);
|
||||
}
|
||||
$id=Db::name('wechat_calculate_record')->where('id',$post['id'])->where('uid',$post['uid'])->value('id');
|
||||
if(empty($id)){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "该记录异常,无法删除";
|
||||
return json($result);
|
||||
}
|
||||
$res=Db::name('wechat_calculate_record')->where('id',$id)->delete();
|
||||
if($res > 0){
|
||||
$result['erro'] = 0;
|
||||
$result['msg'] = '删除成功';
|
||||
}else{
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = '删除失败';
|
||||
}
|
||||
return json($result);
|
||||
}
|
||||
/********************************* 计算 *********************************/
|
||||
/********************************* 登录 *********************************/
|
||||
/**
|
||||
*小程序授权登录,获取微信用户信息
|
||||
* code: wx.login()获取到的code
|
||||
* encryptedData:wx.getUserInfo获取到的encryptedData
|
||||
* iv:wx.getUserInfo获取到的iv
|
||||
*/
|
||||
public function wechatLogin(Request $request){
|
||||
$post=$request->param();
|
||||
if(!isset($post['code']) || empty($post['code'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入code";
|
||||
return json_encode($result);
|
||||
}
|
||||
if(!isset($post['encryptedData']) || empty($post['encryptedData'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入encryptedData";
|
||||
return json_encode($result);
|
||||
}
|
||||
if(!isset($post['iv']) || empty($post['iv'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入iv";
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
$encryptedData =$post['encryptedData'];
|
||||
$iv = $post['iv'];
|
||||
$code=$post['code'];
|
||||
$URL = "https://api.weixin.qq.com/sns/jscode2session?appid=".$this->Appid."&secret=".$this->Appsecret."&js_code=$code&grant_type=authorization_code";
|
||||
$apiData=json_decode($this->httpGet($URL),true);
|
||||
// $apiData=['session_key'=>'dsQb6qITD2CZyBilb22dag==','openid'=>'oXcSb66vSO0_aGbL0NXJ_cxXnt5g'];
|
||||
// var_dump($apiData);
|
||||
if(!isset($apiData['errcode'])){
|
||||
$sessionKey =$apiData['session_key'];//$post['sessionKey'];//
|
||||
$errCode =$this->decryptData($sessionKey,$this->Appid,$encryptedData, $iv, $data );
|
||||
// LogUtils::error('小程序解析:'.$data, __METHOD__);
|
||||
if ($errCode == 0) {
|
||||
//保存用户信息
|
||||
$record=json_decode($data,true);
|
||||
$res=$this->saveUseInfor($record);
|
||||
return json_encode($res);
|
||||
} else {
|
||||
//LogUtils::error('解析数据错误:'.$errCode, __METHOD__);
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "解析接口返回数据失败,请重试!";
|
||||
return json_encode($result);
|
||||
}
|
||||
}else{
|
||||
// LogUtils::error('错误码:'.$apiData['errcode'].',错误信息:'.$apiData['errmsg'], __METHOD__);
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = $apiData['errmsg'];//'获取信息失败'
|
||||
return json_encode($result);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*保存用户的信息
|
||||
*/
|
||||
private function saveUseInfor($record){
|
||||
$data=array();
|
||||
//用户昵称
|
||||
$data['nickname']=$record['nickName'];
|
||||
//用户头像
|
||||
$data['headimg']=$record['avatarUrl'];
|
||||
//var_dump(strlen($data['headimg']));
|
||||
//是否已经保存信息
|
||||
$rec=Db::name('ghd_wechat_user')->field('uid')->where('openid',$record['openId'])->find();
|
||||
|
||||
if(empty($rec)){
|
||||
//用户openid
|
||||
$data['openid']=$record['openId'];
|
||||
//时间
|
||||
$data['create_time']=date('Y-m-d H:i:s');
|
||||
$res=Db::name('wechat_user')->insertGetId($data);
|
||||
$uid=$res;
|
||||
}else{
|
||||
$res=Db::name('wechat_user')->where('uid',$rec['uid'])->update($data);
|
||||
$uid=$rec['uid'];
|
||||
}
|
||||
if($res===false){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "保存信息失败";
|
||||
return $result;
|
||||
}else{
|
||||
$result['erro'] = 0;
|
||||
$result['msg'] = "登录成功";
|
||||
$result['uid'] = $uid;
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*获取访问令牌
|
||||
*/
|
||||
public function getToken(Request $request){
|
||||
$post=$request->param();
|
||||
if(!isset($post['uid']) || empty($post['uid'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传登录用户id";
|
||||
return json_encode($result);
|
||||
}
|
||||
if(!isset($post['phone']) || empty($post['phone'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传登录用户账号";
|
||||
return json_encode($result);
|
||||
}
|
||||
$arr=array();
|
||||
$arr['phone']=$post['phone'];
|
||||
$arr['status']=1;
|
||||
$res=Db::name('accounthosting')->where($arr)->value('id');
|
||||
if($res != $post['uid']){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "账号异常";
|
||||
return json_encode($result);
|
||||
}
|
||||
$result['erro'] = 0;
|
||||
$result['msg'] = "登录成功";
|
||||
$result['token']=$this->authcode($post['uid'].'_'.time(),'ENCODE',$this->TokenKey,60*60*3);
|
||||
return json_encode($result);
|
||||
}
|
||||
/**
|
||||
*检测令牌是否有效
|
||||
*/
|
||||
private function checkToken($token,$uid){
|
||||
$res=$this->authcode($token,'DECODE',$this->TokenKey,60*60*3);
|
||||
//失效过期
|
||||
if(empty($res)){
|
||||
return false;
|
||||
}else{
|
||||
$data=explode('_',$res);
|
||||
//不正确
|
||||
if($data[0] == $uid){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
/********************************* 登录 *********************************/
|
||||
/********************************* 我的 *********************************/
|
||||
/**
|
||||
*基本信息
|
||||
*/
|
||||
public function getUserBaseInfo(Request $request){
|
||||
$post=$request->param();
|
||||
if(!isset($post['version_number']) || empty($post['version_number'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入版本号";
|
||||
return json_encode($result);
|
||||
}
|
||||
switch($post['version_number']){
|
||||
case '1.0.0':
|
||||
return $this->getUserBaseInfo_1_0_0($post);
|
||||
break;
|
||||
default:
|
||||
return $this->getUserBaseInfo_1_0_0($post);
|
||||
break;
|
||||
}
|
||||
}
|
||||
private function getUserBaseInfo_1_0_0($post){
|
||||
if(!isset($post['uid']) || empty($post['uid'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入登录人id";
|
||||
return json_encode($result);
|
||||
}
|
||||
if(!isset($post['token']) || empty($post['token'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入token";
|
||||
return json_encode($result);
|
||||
}
|
||||
if($this->checkToken($post['token'],$post['uid']) === false){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "token异常";
|
||||
return json_encode($result);
|
||||
}
|
||||
$result['infor']=Db::name('accounthosting')->field('name,headimg,balance')->where('id',$post['uid'])->find();
|
||||
$result['erro'] = 0;
|
||||
$result['msg'] = "获取数据成功";
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
388
application/app/controller/Ruilaiwechat.php
Normal file
388
application/app/controller/Ruilaiwechat.php
Normal file
@@ -0,0 +1,388 @@
|
||||
<?php
|
||||
namespace app\app\controller;
|
||||
|
||||
use think\Request;
|
||||
use think\Db;
|
||||
/**
|
||||
*瑞莱医疗小程序
|
||||
*/
|
||||
class Ruilaiwechat extends Base{
|
||||
//小程序appid
|
||||
private $Appid;
|
||||
//小程序秘钥
|
||||
private $Appsecret;
|
||||
//商户号
|
||||
//private $Mch_id;
|
||||
//商户key
|
||||
//private $Key;
|
||||
//访问令牌加密秘钥
|
||||
private $TokenKey;
|
||||
public function __construct(){
|
||||
$this->Appid='wx0847525a15342a46';
|
||||
$this->Appsecret='71cf8c524580ba6b262e6dc52d44da4c';
|
||||
// $this->Mch_id='1611903889';
|
||||
// $this->Key='b046hjZnS6ioMacttGA66ffae887e55f';
|
||||
$this->TokenKey='ruilai340u20k4';
|
||||
}
|
||||
/********************************* 首页 *********************************/
|
||||
/**
|
||||
*查询资讯列表
|
||||
*/
|
||||
public function selectRealtimeInfoList(Request $request){
|
||||
$post=$request->param();
|
||||
/* if(!isset($post['uid']) || empty($post['uid']) ){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入用户id";
|
||||
return json_encode($result);
|
||||
}*/
|
||||
$page = isset($post['page']) && !empty($post['page']) ? $post['page'] : 1;//页数
|
||||
$page_size = isset($post['page_size']) && !empty($post['page_size']) ? $post['page_size'] : 20;//每页条数
|
||||
// 查询列表
|
||||
$res = Db::name('wechat_real_time_info')
|
||||
->field('title_plain,thumbnail,excerpt_plain,url')
|
||||
->order('create_time desc')
|
||||
->paginate($page_size,false,['page'=>$page]);
|
||||
|
||||
$result = array();
|
||||
$result['lists'] =$res->items();
|
||||
$result['lastPage'] = $res->lastPage();//总页数
|
||||
$result['currentPage'] = $res->currentPage();//当前页
|
||||
// $result['total'] = $res->total();//数据总条数
|
||||
$result['erro'] = 0;
|
||||
$result['msg'] = '查询成功';
|
||||
return json($result);
|
||||
}
|
||||
/********************************* 首页 *********************************/
|
||||
/********************************* 计算 *********************************/
|
||||
/***
|
||||
*计算
|
||||
**/
|
||||
public function calculate(Request $request){
|
||||
$post=$request->param();
|
||||
if(!isset($post['uid']) || empty($post['uid']) ){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入用户id";
|
||||
return json_encode($result);
|
||||
}
|
||||
if(!isset($post['name']) || empty($post['name']) ){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入姓名";
|
||||
return json_encode($result);
|
||||
}
|
||||
if(!isset($post['age']) || empty($post['age']) || !is_numeric($post['age'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入年龄";
|
||||
return json_encode($result);
|
||||
}
|
||||
if(!isset($post['height']) || empty($post['height']) || !is_numeric($post['height'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入身高";
|
||||
return json_encode($result);
|
||||
}
|
||||
if(!isset($post['bone_age']) || empty($post['bone_age']) || !is_numeric($post['bone_age'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入骨龄";
|
||||
return json_encode($result);
|
||||
}
|
||||
if(!isset($post['father_height']) || empty($post['father_height']) || !is_numeric($post['father_height'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入父亲身高";
|
||||
return json_encode($result);
|
||||
}
|
||||
if(!isset($post['mother_height']) || empty($post['mother_height']) || !is_numeric($post['mother_height'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入母亲身高";
|
||||
return json_encode($result);
|
||||
}
|
||||
if(!isset($post['LH']) || empty($post['LH']) || !is_numeric($post['LH'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入LH或数据格式不对";
|
||||
return json_encode($result);
|
||||
}
|
||||
if(!isset($post['IGF']) || empty($post['IGF']) || !is_numeric($post['IGF'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入IGF或数据格式不对";
|
||||
return json_encode($result);
|
||||
}
|
||||
//子宫厚度
|
||||
if(!isset($post['uterus_thickness']) || empty($post['uterus_thickness']) || !is_numeric($post['uterus_thickness'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入uterus_thickness或数据格式不对";
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
//计算
|
||||
//计算公式 P= (exp(-5.908+0.008*IGF-1+2.146*LH+0.286*子宫(厚)))/(1 + exp(-5.908+0.008*IGF-1+2.146*LH+0.286*子宫(厚)))
|
||||
$exp = exp(-5.908 + 0.008*$post['IGF'] + 2.146*$post['LH'] + 0.286*$post['uterus_thickness']);
|
||||
$probability = $exp / (1 + $exp);
|
||||
|
||||
//保存记录数据
|
||||
$data=[];
|
||||
$data['id']=md5(time().rand(100000,999999));
|
||||
$data['uid']=$post['uid'];
|
||||
$data['name']=$post['name'];
|
||||
$data['age']=$post['age'];
|
||||
$data['height']=$post['height'];
|
||||
$data['bone_age']=$post['bone_age'];
|
||||
$data['father_height']=$post['father_height'];
|
||||
$data['mother_height']=$post['mother_height'];
|
||||
$data['IGF']=$post['IGF'];
|
||||
$data['LH']=$post['LH'];
|
||||
$data['uterus_thickness']=$post['uterus_thickness'];
|
||||
$data['calculate_resutlt']=round($probability,3);
|
||||
$data['create_time']=date('Y-m-d H:i:s');
|
||||
$res=Db::name('wechat_calculate_record')->insert($data);
|
||||
if($res===false){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "计算失败";
|
||||
return json_encode($result);
|
||||
}else{
|
||||
$result['erro'] = 0;
|
||||
$result['msg'] = "计算成功";
|
||||
$result['calculate_resutlt'] = $data['calculate_resutlt'];
|
||||
return json_encode($result);
|
||||
}
|
||||
}
|
||||
/**
|
||||
*查询历史记录列表
|
||||
*/
|
||||
public function selectRecordList(Request $request){
|
||||
$post=$request->param();
|
||||
if(!isset($post['uid']) || empty($post['uid']) ){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入用户id";
|
||||
return json_encode($result);
|
||||
}
|
||||
$page = isset($post['page']) && !empty($post['page']) ? $post['page'] : 1;//页数
|
||||
$page_size = isset($post['page_size']) && !empty($post['page_size']) ? $post['page_size'] : 30;//每页条数
|
||||
// 查询列表
|
||||
$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('uid',$post['uid'])
|
||||
->order('create_time desc')
|
||||
->paginate($page_size,false,['page'=>$page]);
|
||||
|
||||
$result = array();
|
||||
$result['lists'] =$res->items();
|
||||
$result['lastPage'] = $res->lastPage();//总页数
|
||||
$result['currentPage'] = $res->currentPage();//当前页
|
||||
// $result['total'] = $res->total();//数据总条数
|
||||
$result['erro'] = 0;
|
||||
$result['msg'] = '查询成功';
|
||||
return json($result);
|
||||
}
|
||||
/**
|
||||
*删除历史记录
|
||||
*/
|
||||
public function deleteRecord(Request $request){
|
||||
$post=$request->param();
|
||||
if(!isset($post['uid']) || empty($post['uid']) ){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入用户id";
|
||||
return json($result);
|
||||
}
|
||||
if(!isset($post['id']) || empty($post['id']) ){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "请选择要删除的记录";
|
||||
return json($result);
|
||||
}
|
||||
$id=Db::name('wechat_calculate_record')->where('id',$post['id'])->where('uid',$post['uid'])->value('id');
|
||||
if(empty($id)){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "该记录异常,无法删除";
|
||||
return json($result);
|
||||
}
|
||||
$res=Db::name('wechat_calculate_record')->where('id',$id)->delete();
|
||||
if($res > 0){
|
||||
$result['erro'] = 0;
|
||||
$result['msg'] = '删除成功';
|
||||
}else{
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = '删除失败';
|
||||
}
|
||||
return json($result);
|
||||
}
|
||||
/********************************* 计算 *********************************/
|
||||
/********************************* 登录 *********************************/
|
||||
/**
|
||||
*小程序授权登录,获取微信用户信息
|
||||
* code: wx.login()获取到的code
|
||||
* encryptedData:wx.getUserInfo获取到的encryptedData
|
||||
* iv:wx.getUserInfo获取到的iv
|
||||
*/
|
||||
public function wechatLogin(Request $request){
|
||||
$post=$request->param();
|
||||
if(!isset($post['code']) || empty($post['code'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入code";
|
||||
return json_encode($result);
|
||||
}
|
||||
if(!isset($post['encryptedData']) || empty($post['encryptedData'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入encryptedData";
|
||||
return json_encode($result);
|
||||
}
|
||||
if(!isset($post['iv']) || empty($post['iv'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入iv";
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
$encryptedData =$post['encryptedData'];
|
||||
$iv = $post['iv'];
|
||||
$code=$post['code'];
|
||||
$URL = "https://api.weixin.qq.com/sns/jscode2session?appid=".$this->Appid."&secret=".$this->Appsecret."&js_code=$code&grant_type=authorization_code";
|
||||
$apiData=json_decode($this->httpGet($URL),true);
|
||||
// $apiData=['session_key'=>'dsQb6qITD2CZyBilb22dag==','openid'=>'oXcSb66vSO0_aGbL0NXJ_cxXnt5g'];
|
||||
// var_dump($apiData);
|
||||
if(!isset($apiData['errcode'])){
|
||||
$sessionKey =$apiData['session_key'];//$post['sessionKey'];//
|
||||
$errCode =$this->decryptData($sessionKey,$this->Appid,$encryptedData, $iv, $data );
|
||||
// LogUtils::error('小程序解析:'.$data, __METHOD__);
|
||||
if ($errCode == 0) {
|
||||
//保存用户信息
|
||||
$record=json_decode($data,true);
|
||||
$res=$this->saveUseInfor($record);
|
||||
return json_encode($res);
|
||||
} else {
|
||||
//LogUtils::error('解析数据错误:'.$errCode, __METHOD__);
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "解析接口返回数据失败,请重试!";
|
||||
return json_encode($result);
|
||||
}
|
||||
}else{
|
||||
// LogUtils::error('错误码:'.$apiData['errcode'].',错误信息:'.$apiData['errmsg'], __METHOD__);
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = $apiData['errmsg'];//'获取信息失败'
|
||||
return json_encode($result);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*保存用户的信息
|
||||
*/
|
||||
private function saveUseInfor($record){
|
||||
$data=array();
|
||||
//用户昵称
|
||||
$data['nickname']=$record['nickName'];
|
||||
//用户头像
|
||||
$data['headimg']=$record['avatarUrl'];
|
||||
//var_dump(strlen($data['headimg']));
|
||||
//是否已经保存信息
|
||||
$rec=Db::name('wechat_user')->field('uid')->where('openid',$record['openId'])->find();
|
||||
|
||||
if(empty($rec)){
|
||||
//用户openid
|
||||
$data['openid']=$record['openId'];
|
||||
//时间
|
||||
$data['create_time']=date('Y-m-d H:i:s');
|
||||
$res=Db::name('wechat_user')->insertGetId($data);
|
||||
$uid=$res;
|
||||
}else{
|
||||
$res=Db::name('wechat_user')->where('uid',$rec['uid'])->update($data);
|
||||
$uid=$rec['uid'];
|
||||
}
|
||||
if($res===false){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "保存信息失败";
|
||||
return $result;
|
||||
}else{
|
||||
$result['erro'] = 0;
|
||||
$result['msg'] = "登录成功";
|
||||
$result['uid'] = $uid;
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*获取访问令牌
|
||||
*/
|
||||
public function getToken(Request $request){
|
||||
$post=$request->param();
|
||||
if(!isset($post['uid']) || empty($post['uid'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传登录用户id";
|
||||
return json_encode($result);
|
||||
}
|
||||
if(!isset($post['phone']) || empty($post['phone'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传登录用户账号";
|
||||
return json_encode($result);
|
||||
}
|
||||
$arr=array();
|
||||
$arr['phone']=$post['phone'];
|
||||
$arr['status']=1;
|
||||
$res=Db::name('accounthosting')->where($arr)->value('id');
|
||||
if($res != $post['uid']){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "账号异常";
|
||||
return json_encode($result);
|
||||
}
|
||||
$result['erro'] = 0;
|
||||
$result['msg'] = "登录成功";
|
||||
$result['token']=$this->authcode($post['uid'].'_'.time(),'ENCODE',$this->TokenKey,60*60*3);
|
||||
return json_encode($result);
|
||||
}
|
||||
/**
|
||||
*检测令牌是否有效
|
||||
*/
|
||||
private function checkToken($token,$uid){
|
||||
$res=$this->authcode($token,'DECODE',$this->TokenKey,60*60*3);
|
||||
//失效过期
|
||||
if(empty($res)){
|
||||
return false;
|
||||
}else{
|
||||
$data=explode('_',$res);
|
||||
//不正确
|
||||
if($data[0] == $uid){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
/********************************* 登录 *********************************/
|
||||
/********************************* 我的 *********************************/
|
||||
/**
|
||||
*基本信息
|
||||
*/
|
||||
public function getUserBaseInfo(Request $request){
|
||||
$post=$request->param();
|
||||
if(!isset($post['version_number']) || empty($post['version_number'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入版本号";
|
||||
return json_encode($result);
|
||||
}
|
||||
switch($post['version_number']){
|
||||
case '1.0.0':
|
||||
return $this->getUserBaseInfo_1_0_0($post);
|
||||
break;
|
||||
default:
|
||||
return $this->getUserBaseInfo_1_0_0($post);
|
||||
break;
|
||||
}
|
||||
}
|
||||
private function getUserBaseInfo_1_0_0($post){
|
||||
if(!isset($post['uid']) || empty($post['uid'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入登录人id";
|
||||
return json_encode($result);
|
||||
}
|
||||
if(!isset($post['token']) || empty($post['token'])){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "未传入token";
|
||||
return json_encode($result);
|
||||
}
|
||||
if($this->checkToken($post['token'],$post['uid']) === false){
|
||||
$result['erro'] = -1;
|
||||
$result['msg'] = "token异常";
|
||||
return json_encode($result);
|
||||
}
|
||||
$result['infor']=Db::name('accounthosting')->field('name,headimg,balance')->where('id',$post['uid'])->find();
|
||||
$result['erro'] = 0;
|
||||
$result['msg'] = "获取数据成功";
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
12
application/command.php
Executable file
12
application/command.php
Executable file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: yunwuxin <448901948@qq.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return [];
|
||||
12
application/common.php
Executable file
12
application/common.php
Executable file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: 流年 <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
// 应用公共文件
|
||||
241
application/config.php
Executable file
241
application/config.php
Executable file
@@ -0,0 +1,241 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return [
|
||||
// +----------------------------------------------------------------------
|
||||
// | 应用设置
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
// 应用命名空间
|
||||
'app_namespace' => 'app',
|
||||
// 应用调试模式
|
||||
'app_debug' => true,
|
||||
// 应用Trace
|
||||
'app_trace' => false,
|
||||
// 应用模式状态
|
||||
'app_status' => '',
|
||||
// 是否支持多模块
|
||||
'app_multi_module' => true,
|
||||
// 入口自动绑定模块
|
||||
'auto_bind_module' => false,
|
||||
// 注册的根命名空间
|
||||
'root_namespace' => [],
|
||||
// 扩展函数文件
|
||||
'extra_file_list' => [THINK_PATH . 'helper' . EXT],
|
||||
// 默认输出类型
|
||||
'default_return_type' => 'html',
|
||||
// 默认AJAX 数据返回格式,可选json xml ...
|
||||
'default_ajax_return' => 'json',
|
||||
// 默认JSONP格式返回的处理方法
|
||||
'default_jsonp_handler' => 'jsonpReturn',
|
||||
// 默认JSONP处理方法
|
||||
'var_jsonp_handler' => 'callback',
|
||||
// 默认时区
|
||||
'default_timezone' => 'PRC',
|
||||
// 是否开启多语言
|
||||
'lang_switch_on' => false,
|
||||
// 默认全局过滤方法 用逗号分隔多个
|
||||
'default_filter' => '',
|
||||
// 默认语言
|
||||
'default_lang' => 'zh-cn',
|
||||
// 应用类库后缀
|
||||
'class_suffix' => false,
|
||||
// 控制器类后缀
|
||||
'controller_suffix' => false,
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | 模块设置
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
// 默认模块名
|
||||
'default_module' => 'index',
|
||||
// 禁止访问模块
|
||||
'deny_module_list' => ['common'],
|
||||
// 默认控制器名
|
||||
'default_controller' => 'Index',
|
||||
// 默认操作名
|
||||
'default_action' => 'index',
|
||||
// 默认验证器
|
||||
'default_validate' => '',
|
||||
// 默认的空控制器名
|
||||
'empty_controller' => 'Error',
|
||||
// 操作方法后缀
|
||||
'action_suffix' => '',
|
||||
// 自动搜索控制器
|
||||
'controller_auto_search' => false,
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | URL设置
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
// PATHINFO变量名 用于兼容模式
|
||||
'var_pathinfo' => 's',
|
||||
// 兼容PATH_INFO获取
|
||||
'pathinfo_fetch' => ['ORIG_PATH_INFO', 'REDIRECT_PATH_INFO', 'REDIRECT_URL'],
|
||||
// pathinfo分隔符
|
||||
'pathinfo_depr' => '/',
|
||||
// URL伪静态后缀
|
||||
'url_html_suffix' => 'html',
|
||||
// URL普通方式参数 用于自动生成
|
||||
'url_common_param' => false,
|
||||
// URL参数方式 0 按名称成对解析 1 按顺序解析
|
||||
'url_param_type' => 0,
|
||||
// 是否开启路由
|
||||
'url_route_on' => true,
|
||||
// 路由使用完整匹配
|
||||
'route_complete_match' => false,
|
||||
// 路由配置文件(支持配置多个)
|
||||
'route_config_file' => ['route'],
|
||||
// 是否强制使用路由
|
||||
'url_route_must' => false,
|
||||
// 域名部署
|
||||
'url_domain_deploy' => false,
|
||||
// 域名根,如thinkphp.cn
|
||||
'url_domain_root' => '',
|
||||
// 是否自动转换URL中的控制器和操作名
|
||||
'url_convert' => true,
|
||||
// 默认的访问控制器层
|
||||
'url_controller_layer' => 'controller',
|
||||
// 表单请求类型伪装变量
|
||||
'var_method' => '_method',
|
||||
// 表单ajax伪装变量
|
||||
'var_ajax' => '_ajax',
|
||||
// 表单pjax伪装变量
|
||||
'var_pjax' => '_pjax',
|
||||
// 是否开启请求缓存 true自动缓存 支持设置请求缓存规则
|
||||
'request_cache' => false,
|
||||
// 请求缓存有效期
|
||||
'request_cache_expire' => null,
|
||||
// 全局请求缓存排除规则
|
||||
'request_cache_except' => [],
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | 模板设置
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
'template' => [
|
||||
// 模板引擎类型 支持 php think 支持扩展
|
||||
'type' => 'Think',
|
||||
// 模板路径
|
||||
'view_path' => '',
|
||||
// 模板后缀
|
||||
'view_suffix' => 'html',
|
||||
// 模板文件名分隔符
|
||||
'view_depr' => DS,
|
||||
// 模板引擎普通标签开始标记
|
||||
'tpl_begin' => '{',
|
||||
// 模板引擎普通标签结束标记
|
||||
'tpl_end' => '}',
|
||||
// 标签库标签开始标记
|
||||
'taglib_begin' => '{',
|
||||
// 标签库标签结束标记
|
||||
'taglib_end' => '}',
|
||||
],
|
||||
|
||||
// 视图输出字符串内容替换
|
||||
'view_replace_str' => [],
|
||||
// 默认跳转页面对应的模板文件
|
||||
'dispatch_success_tmpl' => THINK_PATH . 'tpl' . DS . 'dispatch_jump.tpl',
|
||||
'dispatch_error_tmpl' => THINK_PATH . 'tpl' . DS . 'dispatch_jump.tpl',
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | 异常及错误设置
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
// 异常页面的模板文件
|
||||
'exception_tmpl' => THINK_PATH . 'tpl' . DS . 'think_exception.tpl',
|
||||
|
||||
// 错误显示信息,非调试模式有效
|
||||
'error_message' => '页面错误!请稍后再试~',
|
||||
// 显示错误信息
|
||||
'show_error_msg' => false,
|
||||
// 异常处理handle类 留空使用 \think\exception\Handle
|
||||
'exception_handle' => '',
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | 日志设置
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
'log' => [
|
||||
// 日志记录方式,内置 file socket 支持扩展
|
||||
'type' => 'File',
|
||||
// 日志保存目录
|
||||
'path' => LOG_PATH,
|
||||
// 日志记录级别
|
||||
'level' => [],
|
||||
],
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | Trace设置 开启 app_trace 后 有效
|
||||
// +----------------------------------------------------------------------
|
||||
'trace' => [
|
||||
// 内置Html Console 支持扩展
|
||||
'type' => 'Html',
|
||||
],
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | 缓存设置
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
'cache' => [
|
||||
// 驱动方式
|
||||
'type' => 'File',
|
||||
// 缓存保存目录
|
||||
'path' => CACHE_PATH,
|
||||
// 缓存前缀
|
||||
'prefix' => '',
|
||||
// 缓存有效期 0表示永久缓存
|
||||
'expire' => 0,
|
||||
],
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | 会话设置
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
'session' => [
|
||||
'id' => '',
|
||||
// SESSION_ID的提交变量,解决flash上传跨域
|
||||
'var_session_id' => '',
|
||||
// SESSION 前缀
|
||||
'prefix' => 'think',
|
||||
// 驱动方式 支持redis memcache memcached
|
||||
'type' => '',
|
||||
// 是否自动开启 SESSION
|
||||
'auto_start' => true,
|
||||
],
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | Cookie设置
|
||||
// +----------------------------------------------------------------------
|
||||
'cookie' => [
|
||||
// cookie 名称前缀
|
||||
'prefix' => '',
|
||||
// cookie 保存时间
|
||||
'expire' => 0,
|
||||
// cookie 保存路径
|
||||
'path' => '/',
|
||||
// cookie 有效域名
|
||||
'domain' => '',
|
||||
// cookie 启用安全传输
|
||||
'secure' => false,
|
||||
// httponly设置
|
||||
'httponly' => '',
|
||||
// 是否使用 setcookie
|
||||
'setcookie' => true,
|
||||
],
|
||||
|
||||
//分页配置
|
||||
'paginate' => [
|
||||
'type' => 'bootstrap',
|
||||
'var_page' => 'page',
|
||||
'list_rows' => 15,
|
||||
],
|
||||
];
|
||||
53
application/database.php
Executable file
53
application/database.php
Executable file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return [
|
||||
// 数据库类型
|
||||
'type' => 'mysql',
|
||||
// 服务器地址
|
||||
'hostname' => '127.0.0.1',
|
||||
// 数据库名
|
||||
'database' => 'ruilai',
|
||||
// 用户名
|
||||
'username' => 'rootrui',
|
||||
// 密码
|
||||
'password' => 'X2)jB+k%YH.p',
|
||||
// 端口
|
||||
'hostport' => '',
|
||||
// 连接dsn
|
||||
'dsn' => '',
|
||||
// 数据库连接参数
|
||||
'params' => [],
|
||||
// 数据库编码默认采用utf8
|
||||
'charset' => 'utf8',
|
||||
// 数据库表前缀
|
||||
'prefix' => 't_sys_',
|
||||
// 数据库调试模式
|
||||
'debug' => true,
|
||||
// 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
|
||||
'deploy' => 0,
|
||||
// 数据库读写是否分离 主从式有效
|
||||
'rw_separate' => false,
|
||||
// 读写分离后 主服务器数量
|
||||
'master_num' => 1,
|
||||
// 指定从服务器序号
|
||||
'slave_no' => '',
|
||||
// 是否严格检查字段是否存在
|
||||
'fields_strict' => true,
|
||||
// 数据集返回类型
|
||||
'resultset_type' => 'array',
|
||||
// 自动写入时间戳字段
|
||||
'auto_timestamp' => false,
|
||||
// 时间字段取出后的默认时间格式
|
||||
'datetime_format' => 'Y-m-d H:i:s',
|
||||
// 是否需要进行SQL性能分析
|
||||
'sql_explain' => false,
|
||||
];
|
||||
14
application/extra/queue.php
Executable file
14
application/extra/queue.php
Executable file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: yunwuxin <448901948@qq.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return [
|
||||
'connector' => 'Sync'
|
||||
];
|
||||
12
application/index/controller/Index.php
Executable file
12
application/index/controller/Index.php
Executable file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
namespace app\index\controller;
|
||||
|
||||
class Index
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
return view('index');
|
||||
//return '<style type="text/css">*{ padding: 0; margin: 0; } .think_default_text{ padding: 4px 48px;} a{color:#2E5CD5;cursor: pointer;text-decoration: none} a:hover{text-decoration:underline; } body{ background: #fff; font-family: "Century Gothic","Microsoft yahei"; color: #333;font-size:18px} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.6em; font-size: 42px }</style><div style="padding: 24px 48px;"> <h1>:)</h1><p> ThinkPHP V5<br/><span style="font-size:30px">十年磨一剑 - 为API开发设计的高性能框架</span></p><span style="font-size:22px;">[ V5.0 版本由 <a href="http://www.qiniu.com" target="qiniu">七牛云</a> 独家赞助发布 ]</span></div><script type="text/javascript" src="http://tajs.qq.com/stats?sId=9347272" charset="UTF-8"></script><script type="text/javascript" src="http://ad.topthink.com/Public/static/client.js"></script><thinkad id="ad_bd568ce7058a1091"></thinkad>';
|
||||
|
||||
}
|
||||
}
|
||||
11
application/index/controller/Privacy.php
Normal file
11
application/index/controller/Privacy.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace app\index\controller;
|
||||
|
||||
class Privacy
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
return view('privacy');
|
||||
|
||||
}
|
||||
}
|
||||
250
application/index/view/index/index.html
Normal file
250
application/index/view/index/index.html
Normal file
@@ -0,0 +1,250 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>西安瑞来兹软件科技有限公司 - 专注数字化转型解决方案</title>
|
||||
|
||||
<!-- 添加网站图标 -->
|
||||
<link rel="icon" type="image/jpeg" href="static/index/images/logo.jpg">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
|
||||
|
||||
<link rel="stylesheet" href="static/index/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<!-- 导航栏 -->
|
||||
<header class="fixed-header">
|
||||
<nav class="container">
|
||||
<div class="logo">
|
||||
<img src="static/index/images/logo.jpg" alt="西安瑞来兹软件科技有限公司logo">
|
||||
<span>西安瑞来兹软件科技有限公司</span>
|
||||
</div>
|
||||
<div class="menu-toggle">☰</div>
|
||||
<ul>
|
||||
<li><a href="#home">首页</a></li>
|
||||
<li><a href="#services">产品服务</a></li>
|
||||
<li><a href="#cases">成功案例</a></li>
|
||||
<li><a href="#about">关于我们</a></li>
|
||||
<li><a href="#contact">联系我们</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<!-- 轮播图 -->
|
||||
<section id="home" class="hero-section">
|
||||
<div class="fullscreen-carousel">
|
||||
<div class="carousel-track">
|
||||
<div class="carousel-item" style="background-image: url('static/index/banner_one.jpg');">
|
||||
<div class="carousel-content animate">
|
||||
<h2>欢迎来到我们的网站</h2>
|
||||
<p>我们提供专业的解决方案</p>
|
||||
<a href="#about" class="btn">了解更多</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item" style="background-image: url('static/index/banner_two.jpg');">
|
||||
<div class="carousel-content animate">
|
||||
<h2>创新驱动未来</h2>
|
||||
<p>探索我们的最新技术</p>
|
||||
<a href="#services" class="btn">查看服务</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-controls">
|
||||
<button class="carousel-prev">❮</button>
|
||||
<button class="carousel-next">❯</button>
|
||||
</div>
|
||||
<div class="carousel-dots">
|
||||
<span class="dot active"></span>
|
||||
<span class="dot"></span>
|
||||
</div>
|
||||
<div class="carousel-progress-bar"></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 关于我们 -->
|
||||
<section id="about" class="about-section">
|
||||
<div class="container">
|
||||
<div class="about-content">
|
||||
<div class="about-text animate">
|
||||
<h3>关于我们</h3>
|
||||
<p>我们是一家专注于数字化转型解决方案的科技公司,致力于为企业提供创新的技术服务和产品。</p>
|
||||
<div class="about-cards">
|
||||
<div class="about-card">
|
||||
<div class="card-number">10+</div>
|
||||
<div class="card-text">年行业经验</div>
|
||||
</div>
|
||||
<div class="about-card">
|
||||
<div class="card-number">200+</div>
|
||||
<div class="card-text">成功案例</div>
|
||||
</div>
|
||||
<div class="about-card">
|
||||
<div class="card-number">50+</div>
|
||||
<div class="card-text">专业团队</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 产品服务 -->
|
||||
<section id="services" class="services-section">
|
||||
<div class="container">
|
||||
<h3 class="animate">产品服务</h3>
|
||||
<div class="services-cards">
|
||||
<div class="service-card animate">
|
||||
<div class="card-icon">💻</div>
|
||||
<div class="card-content">
|
||||
<h4>网站开发</h4>
|
||||
<p>定制化网站开发服务</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="service-card animate">
|
||||
<div class="card-icon">📊</div>
|
||||
<div class="card-content">
|
||||
<h4>数据分析</h4>
|
||||
<p>专业的数据分析解决方案</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="service-card animate">
|
||||
<div class="card-icon">📱</div>
|
||||
<div class="card-content">
|
||||
<h4>移动应用开发</h4>
|
||||
<p>跨平台移动应用开发服务</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 成功案例 -->
|
||||
<section id="cases" class="cases-section">
|
||||
<div class="container">
|
||||
<h3 class="animate">成功案例</h3>
|
||||
<div class="cases-grid">
|
||||
<div class="case-card animate">
|
||||
<img src="static/index/case1.jpg" alt="案例1">
|
||||
<div class="case-content">
|
||||
<h4>案例1</h4>
|
||||
<p>案例描述...</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="case-card animate">
|
||||
<img src="static/index/case2.jpg" alt="案例2">
|
||||
<div class="case-content">
|
||||
<h4>案例2</h4>
|
||||
<p>案例描述...</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="case-card animate">
|
||||
<img src="static/index/case3.jpg" alt="案例2">
|
||||
<div class="case-content">
|
||||
<h4>案例2</h4>
|
||||
<p>案例描述...</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 新闻动态 -->
|
||||
<!-- <section id="news" class="news-section">
|
||||
<div class="container">
|
||||
<h3 class="animate">新闻动态</h3>
|
||||
<div class="news-list">
|
||||
<div class="news-item animate">
|
||||
<div class="news-date">2023-10-01</div>
|
||||
<h4>新闻标题1</h4>
|
||||
<p>新闻内容摘要...</p>
|
||||
<a href="#" class="read-more">阅读更多</a>
|
||||
</div>
|
||||
<div class="news-item animate">
|
||||
<div class="news-date">2023-09-25</div>
|
||||
<h4>新闻标题2</h4>
|
||||
<p>新闻内容摘要...</p>
|
||||
<a href="#" class="read-more">阅读更多</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section> -->
|
||||
|
||||
<!-- 联系我们 -->
|
||||
<section id="contact" class="contact-section">
|
||||
<div class="container">
|
||||
<h3 class="animate">联系我们</h3>
|
||||
<div class="contact-content">
|
||||
<div class="contact-info animate">
|
||||
<h4>联系方式</h4>
|
||||
<ul>
|
||||
<li><i class="fas fa-map-marker-alt"></i>地址:陕西省西安市高新区科技二路65号启迪科技园D座9楼10901号</li>
|
||||
<li><i class="fas fa-phone"></i>电话:18691577328</li>
|
||||
<li><i class="fas fa-envelope"></i>邮箱:info@example.com</li>
|
||||
</ul>
|
||||
<div class="social-links">
|
||||
<a href="#"><i class="fab fa-weixin"></i></a>
|
||||
<a href="#"><i class="fab fa-qq"></i></a>
|
||||
<a href="#"><i class="fab fa-weibo"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<form class="contact-form animate">
|
||||
<div class="form-group">
|
||||
<input type="text" name="name" placeholder="您的姓名" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="email" name="email" placeholder="您的邮箱" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<textarea name="message" placeholder="您的留言" required></textarea>
|
||||
</div>
|
||||
<button type="submit" class="btn">发送消息</button>
|
||||
<div class="form-message"></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 页脚 -->
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="footer-content">
|
||||
<div class="footer-section">
|
||||
<h4>关于我们</h4>
|
||||
<ul>
|
||||
<li><a href="#">公司简介</a></li>
|
||||
<li><a href="#">发展历程</a></li>
|
||||
<li><a href="#">企业文化</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer-section">
|
||||
<h4>产品服务</h4>
|
||||
<ul>
|
||||
<li><a href="#">网站开发</a></li>
|
||||
<li><a href="#">数据分析</a></li>
|
||||
<li><a href="#">技术支持</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer-section">
|
||||
<h4>联系我们</h4>
|
||||
<ul>
|
||||
<li><a href="#">联系方式</a></li>
|
||||
<li><a href="#">加入我们</a></li>
|
||||
<li><a href="#">意见反馈</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="copyright">
|
||||
<span class="copyright-text">
|
||||
<i class="far fa-copyright"></i> © 2023 西安瑞来兹软件科技有限公司. 保留所有权利.
|
||||
</span>
|
||||
<span class="separator">|</span>
|
||||
<a href="https://beian.miit.gov.cn/" target="_blank" style="color: #fff;">陕ICP备2023005856号-3</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="static/index/script.js"></script>
|
||||
<script src="https://kit.fontawesome.com/your-fontawesome-kit.js" crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
||||
89
application/index/view/privacy/privacy.html
Normal file
89
application/index/view/privacy/privacy.html
Normal file
@@ -0,0 +1,89 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||
<title>隐私协议</title>
|
||||
<link href="/static/js/yidongduan.js" rel="preload" as="script">
|
||||
<link href="/static/js/jquery.min.js" rel="preload" as="script">
|
||||
<style type="text/css">
|
||||
html,body,ul,li,ol{padding: 0;margin: 0;}
|
||||
body{
|
||||
width: 94%;
|
||||
margin-left: 3%;
|
||||
}
|
||||
li{list-style: none;text-indent: 2em;}
|
||||
li1{
|
||||
font-size: .28rem;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<ul>
|
||||
<li>女童成长发育预测尊重并保护所有使用服务用户的个人隐私权。为了给您提供更准确、更有个性化的服务,女童成长发育预测会按照本隐私权政策的规定使用和披露您的个人信息。但女童成长发育预测将以高度的勤勉、审慎义务对待这些信息。除本隐私权政策另有规定外,在未征得您事先许可的情况下,女童成长发育预测不会将这些信息对外披露或向第三方提供。女童成长发育预测会不时更新本隐私权政策。 您在同意女童成长发育预测服务使用协议之时,即视为您已经同意本隐私权政策全部内容。本隐私权政策属于女童成长发育预测服务使用协议不可分割的一部分。 </li>
|
||||
<li>
|
||||
<h5>1. 适用范围</h5>
|
||||
<ol>
|
||||
<li>(a) 在您注册女童成长发育预测帐号时,您根据女童成长发育预测要求提供的个人注册信息;</li>
|
||||
<li>(b) 在您使用女童成长发育预测网络服务,或访问女童成长发育预测平台网页时,女童成长发育预测自动接收并记录的您的浏览器和计算机上的信息,包括但不限于您的IP地址、浏览器的类型、使用的语言、访问日期和时间、软硬件特征信息及您需求的网页记录等数据;</li>
|
||||
<li>(c) 女童成长发育预测通过合法途径从商业伙伴处取得的用户个人数据。 </li>
|
||||
<li>您了解并同意,以下信息不适用本隐私权政策:</li>
|
||||
<li>(a) 您在使用女童成长发育预测平台提供的搜索服务时输入的关键字信息;</li>
|
||||
<li>(b) 女童成长发育预测收集到的您在女童成长发育预测发布的有关信息数据,包括但不限于参与活动、成交信息及评价详情;</li>
|
||||
<li>(c) 违反法律规定或违反女童成长发育预测规则行为及女童成长发育预测已对您采取的措施。</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>
|
||||
<h5>2. 信息使用</h5>
|
||||
<ol>
|
||||
<li>(a)女童成长发育预测不会向任何无关第三方提供、出售、出租、分享或交易您的个人信息,除非事先得到您的许可,或该第三方和女童成长发育预测(含女童成长发育预测关联公司)单独或共同为您提供服务,且在该服务结束后,其将被禁止访问包括其以前能够访问的所有这些资料。</li>
|
||||
<li>(b) 女童成长发育预测亦不允许任何第三方以任何手段收集、编辑、出售或者无偿传播您的个人信息。任何女童成长发育预测平台用户如从事上述活动,一经发现,女童成长发育预测有权立即终止与该用户的服务协议。</li>
|
||||
<li>(c) 为服务用户的目的,女童成长发育预测可能通过使用您的个人信息,向您提供您感兴趣的信息,包括但不限于向您发出产品和服务信息,或者与女童成长发育预测合作伙伴共享信息以便他们向您发送有关其产品和服务的信息(后者需要您的事先同意)。</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>
|
||||
<h5>3. 信息披露</h5>
|
||||
<ol>
|
||||
<li>在如下情况下,女童成长发育预测将依据您的个人意愿或法律的规定全部或部分的披露您的个人信息:</li>
|
||||
<li>(a) 经您事先同意,向第三方披露;</li>
|
||||
<li>(b)为提供您所要求的产品和服务,而必须和第三方分享您的个人信息;</li>
|
||||
<li>(c) 根据法律的有关规定,或者行政或司法机构的要求,向第三方或者行政、司法机构披露;</li>
|
||||
<li>(d) 如您出现违反中国有关法律、法规或者女童成长发育预测服务协议或相关规则的情况,需要向第三方披露;</li>
|
||||
<li>(e) 如您是适格的知识产权投诉人并已提起投诉,应被投诉人要求,向被投诉人披露,以便双方处理可能的权利纠纷;</li>
|
||||
<li>(f) 在女童成长发育预测平台上创建的某一交易中,如交易任何一方履行或部分履行了交易义务并提出信息披露请求的,女童成长发育预测有权决定向该用户提供其交易对方的联络方式等必要信息,以促成交易的完成或纠纷的解决。</li>
|
||||
<li>(g) 其它女童成长发育预测根据法律、法规或者网站政策认为合适的披露。</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>
|
||||
<h5>4. 信息存储和交换</h5>
|
||||
<ol>
|
||||
<li>女童成长发育预测收集的有关您的信息和资料将保存在女童成长发育预测及(或)其关联公司的服务器上,这些信息和资料可能传送至您所在国家、地区或女童成长发育预测收集信息和资料所在地的境外并在境外被访问、存储和展示。</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>
|
||||
<h5>5. Cookie的使用</h5>
|
||||
<ol>
|
||||
<li>(a) 在您未拒绝接受cookies的情况下,女童成长发育预测会在您的计算机上设定或取用cookies,以便您能登录或使用依赖于cookies的女童成长发育预测平台服务或功能。女童成长发育预测使用cookies可为您提供更加周到的个性化服务,包括推广服务。</li>
|
||||
<li>(b) 您有权选择接受或拒绝接受cookies。您可以通过修改浏览器设置的方式拒绝接受cookies。但如果您选择拒绝接受cookies,则您可能无法登录或使用依赖于cookies的女童成长发育预测网络服务或功能。</li>
|
||||
<li>(c) 通过女童成长发育预测所设cookies所取得的有关信息,将适用本政策。</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>
|
||||
<h5>6. 信息安全</h5>
|
||||
<ol>
|
||||
<li>(a) 女童成长发育预测帐号均有安全保护功能,请妥善保管您的用户名及密码信息。女童成长发育预测将通过对用户密码进行加密等安全措施确保您的信息不丢失,不被滥用和变造。尽管有前述安全措施,但同时也请您注意在信息网络上不存在“完善的安全措施”。</li>
|
||||
<li>(b) 在使用女童成长发育预测网络服务进行网上交易时,您不可避免的要向交易对方或潜在的交易对方披露自己的个人信息,如联络方式或者邮政地址。请您妥善保护自己的个人信息,仅在必要的情形下向他人提供。如您发现自己的个人信息泄密,尤其是女童成长发育预测用户名及密码发生泄露,请您立即联络女童成长发育预测客服,以便女童成长发育预测采取相应措施。</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>
|
||||
<h5>7.本隐私政策的更改</h5>
|
||||
<ol>
|
||||
<li>(a)如果决定更改隐私政策,我们会在本政策中、本公司网站中以及我们认为适当的位置发布这些更改,以便您了解我们如何收集、使用您的个人信息,哪些人可以访问这些信息,以及在什么情况下我们会透露这些信息。</li>
|
||||
<li>(b)本公司保留随时修改本政策的权利,因此请经常查看。如对本政策作出重大更改,本公司会通过网站通知的形式告知。方披露自己的个人信息,如联络方式或者邮政地址。请您妥善保护自己的个人信息,仅在必要的情形下向他人提供。如您发现自己的个人信息泄密,尤其是本应用用户名及密码发生泄露,请您立即联络本应用客服,以便本应用采取相应措施。</li>
|
||||
</ol>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
21
application/route.php
Executable file
21
application/route.php
Executable file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return [
|
||||
'__pattern__' => [
|
||||
'name' => '\w+',
|
||||
],
|
||||
'[hello]' => [
|
||||
':id' => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
|
||||
':name' => ['index/hello', ['method' => 'post']],
|
||||
],
|
||||
|
||||
];
|
||||
28
application/tags.php
Executable file
28
application/tags.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
// 应用行为扩展定义文件
|
||||
return [
|
||||
// 应用初始化
|
||||
'app_init' => [],
|
||||
// 应用开始
|
||||
'app_begin' => [],
|
||||
// 模块初始化
|
||||
'module_init' => [],
|
||||
// 操作开始执行
|
||||
'action_begin' => [],
|
||||
// 视图内容过滤
|
||||
'view_filter' => [],
|
||||
// 日志写入
|
||||
'log_write' => [],
|
||||
// 应用结束
|
||||
'app_end' => [],
|
||||
];
|
||||
25
build.php
Executable file
25
build.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return [
|
||||
// 生成应用公共文件
|
||||
'__file__' => ['common.php', 'config.php', 'database.php'],
|
||||
|
||||
// 定义demo模块的自动生成 (按照实际定义的文件名生成)
|
||||
'demo' => [
|
||||
'__file__' => ['common.php'],
|
||||
'__dir__' => ['behavior', 'controller', 'model', 'view'],
|
||||
'controller' => ['Index', 'Test', 'UserType'],
|
||||
'model' => ['User', 'UserType'],
|
||||
'view' => ['index/index'],
|
||||
],
|
||||
// 其他更多的模块定义
|
||||
];
|
||||
33
composer.json
Executable file
33
composer.json
Executable file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "topthink/think",
|
||||
"description": "the new thinkphp framework",
|
||||
"type": "project",
|
||||
"keywords": [
|
||||
"framework",
|
||||
"thinkphp",
|
||||
"ORM"
|
||||
],
|
||||
"homepage": "http://thinkphp.cn/",
|
||||
"license": "Apache-2.0",
|
||||
"authors": [
|
||||
{
|
||||
"name": "liu21st",
|
||||
"email": "liu21st@gmail.com"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.4.0",
|
||||
"topthink/framework": "5.0.*"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"app\\": "application"
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"think-path": "thinkphp"
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": "dist"
|
||||
}
|
||||
}
|
||||
2
extend/.gitignore
vendored
Executable file
2
extend/.gitignore
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
9
public/.htaccess
Executable file
9
public/.htaccess
Executable file
@@ -0,0 +1,9 @@
|
||||
<IfModule mod_rewrite.c>
|
||||
Options +FollowSymlinks -Multiviews
|
||||
RewriteEngine On
|
||||
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
#RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
|
||||
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
|
||||
</IfModule>
|
||||
1
public/.user.ini
Normal file
1
public/.user.ini
Normal file
@@ -0,0 +1 @@
|
||||
open_basedir=/www/wwwroot/code/:/tmp/
|
||||
BIN
public/favicon.ico
Executable file
BIN
public/favicon.ico
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
17
public/index.php
Executable file
17
public/index.php
Executable file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
// [ 应用入口文件 ]
|
||||
|
||||
// 定义应用目录
|
||||
define('APP_PATH', __DIR__ . '/../application/');
|
||||
// 加载框架引导文件
|
||||
require __DIR__ . '/../thinkphp/start.php';
|
||||
7
public/nginx.htaccess
Normal file
7
public/nginx.htaccess
Normal file
@@ -0,0 +1,7 @@
|
||||
try_files $uri $uri/ /index.php?$args; #去掉index.php
|
||||
location / {
|
||||
if (!-e $request_filename){
|
||||
rewrite ^/(.*)$ /index.php?s=/$1 last;
|
||||
}
|
||||
|
||||
}
|
||||
2
public/robots.txt
Executable file
2
public/robots.txt
Executable file
@@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Disallow:
|
||||
20
public/router.php
Executable file
20
public/router.php
Executable file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
// $Id$
|
||||
|
||||
if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["SCRIPT_NAME"])) {
|
||||
return false;
|
||||
} else {
|
||||
if (!isset($_SERVER['PATH_INFO'])) {
|
||||
$_SERVER['PATH_INFO'] = $_SERVER['REQUEST_URI'];
|
||||
}
|
||||
require __DIR__ . "/index.php";
|
||||
}
|
||||
2
public/static/.gitignore
vendored
Executable file
2
public/static/.gitignore
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
BIN
public/uploads/2024/06/04/171751114021497.jpg
Normal file
BIN
public/uploads/2024/06/04/171751114021497.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 129 KiB |
BIN
public/uploads/2024/06/04/171751137371153.jpg
Normal file
BIN
public/uploads/2024/06/04/171751137371153.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 129 KiB |
BIN
public/uploads/2024/06/04/171751144117605.jpg
Normal file
BIN
public/uploads/2024/06/04/171751144117605.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 129 KiB |
BIN
public/uploads/2024/06/10/171803135769789.png
Normal file
BIN
public/uploads/2024/06/10/171803135769789.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 45 KiB |
BIN
public/uploads/2025/03/15/174201503080418.jpeg
Normal file
BIN
public/uploads/2025/03/15/174201503080418.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 414 KiB |
2
runtime/.gitignore
vendored
Executable file
2
runtime/.gitignore
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
17
think
Executable file
17
think
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: yunwuxin <448901948@qq.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
// 定义项目路径
|
||||
define('APP_PATH', __DIR__ . '/application/');
|
||||
|
||||
// 加载框架引导文件
|
||||
require __DIR__.'/thinkphp/console.php';
|
||||
2
vendor/.gitignore
vendored
Executable file
2
vendor/.gitignore
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
Reference in New Issue
Block a user