init
This commit is contained in:
78
application/index/controller/Ajax.php
Normal file
78
application/index/controller/Ajax.php
Normal file
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
|
||||
namespace app\index\controller;
|
||||
|
||||
use app\common\controller\Frontend;
|
||||
use think\Lang;
|
||||
use think\Loader;
|
||||
use think\Response;
|
||||
|
||||
/**
|
||||
* Ajax异步请求接口
|
||||
* @internal
|
||||
*/
|
||||
class Ajax extends Frontend
|
||||
{
|
||||
|
||||
protected $noNeedLogin = ['lang', 'upload'];
|
||||
protected $noNeedRight = ['*'];
|
||||
protected $layout = '';
|
||||
|
||||
/**
|
||||
* 加载语言包
|
||||
*/
|
||||
public function lang()
|
||||
{
|
||||
$this->request->get(['callback' => 'define']);
|
||||
$header = ['Content-Type' => 'application/javascript'];
|
||||
if (!config('app_debug')) {
|
||||
$offset = 30 * 60 * 60 * 24; // 缓存一个月
|
||||
$header['Cache-Control'] = 'public';
|
||||
$header['Pragma'] = 'cache';
|
||||
$header['Expires'] = gmdate("D, d M Y H:i:s", time() + $offset) . " GMT";
|
||||
}
|
||||
|
||||
$controllername = $this->request->get('controllername');
|
||||
$lang = $this->request->get('lang');
|
||||
if (!$lang || !in_array($lang, config('allow_lang_list')) || !$controllername || !preg_match("/^[a-z0-9_\.]+$/i", $controllername)) {
|
||||
return jsonp(['errmsg' => '参数错误'], 200, [], ['json_encode_param' => JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE]);
|
||||
}
|
||||
|
||||
$controllername = input("controllername");
|
||||
$className = Loader::parseClass($this->request->module(), 'controller', $controllername, false);
|
||||
|
||||
//存在对应的类才加载
|
||||
if (class_exists($className)) {
|
||||
$this->loadlang($controllername);
|
||||
}
|
||||
|
||||
//强制输出JSON Object
|
||||
return jsonp(Lang::get(), 200, $header, ['json_encode_param' => JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成后缀图标
|
||||
*/
|
||||
public function icon()
|
||||
{
|
||||
$suffix = $this->request->request("suffix");
|
||||
$suffix = $suffix ? $suffix : "FILE";
|
||||
$data = build_suffix_image($suffix);
|
||||
$header = ['Content-Type' => 'image/svg+xml'];
|
||||
$offset = 30 * 60 * 60 * 24; // 缓存一个月
|
||||
$header['Cache-Control'] = 'public';
|
||||
$header['Pragma'] = 'cache';
|
||||
$header['Expires'] = gmdate("D, d M Y H:i:s", time() + $offset) . " GMT";
|
||||
$response = Response::create($data, '', 200, $header);
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
*/
|
||||
public function upload()
|
||||
{
|
||||
return action('api/common/upload');
|
||||
}
|
||||
|
||||
}
|
||||
93
application/index/controller/Datav.php
Normal file
93
application/index/controller/Datav.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
|
||||
namespace app\index\controller;
|
||||
|
||||
use app\common\controller\Frontend;
|
||||
|
||||
class Datav extends Frontend
|
||||
{
|
||||
|
||||
protected $noNeedLogin = '*';
|
||||
protected $noNeedRight = '*';
|
||||
protected $layout = '';
|
||||
|
||||
//总览
|
||||
public function index()
|
||||
{
|
||||
return $this->view->fetch('jingmen/index');
|
||||
}
|
||||
|
||||
public function map_video()
|
||||
{
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
//监管系统大屏
|
||||
public function clm()
|
||||
{
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
//车辆码
|
||||
public function i_clm()
|
||||
{
|
||||
return $this->view->fetch('jingmen/i_clm');
|
||||
}
|
||||
|
||||
|
||||
//车辆动态
|
||||
public function cldt()
|
||||
{
|
||||
return $this->view->fetch('jingmen/cldt');
|
||||
}
|
||||
|
||||
// 运单动态
|
||||
public function yddt()
|
||||
{
|
||||
return $this->view->fetch('jingmen/yddt');
|
||||
}
|
||||
|
||||
// 报警列表
|
||||
public function bjlist()
|
||||
{
|
||||
|
||||
return $this->view->fetch('car/bjlist');
|
||||
|
||||
}
|
||||
|
||||
//车辆详情
|
||||
public function car_detail()
|
||||
{
|
||||
return $this->view->fetch('car/car_detail');
|
||||
}
|
||||
|
||||
//入园记录
|
||||
public function park_list()
|
||||
{
|
||||
return $this->view->fetch('car/park_list');
|
||||
}
|
||||
|
||||
//运单记录
|
||||
public function waybill_list()
|
||||
{
|
||||
return $this->view->fetch('car/waybill_list');
|
||||
}
|
||||
|
||||
//车辆轨迹
|
||||
public function vehicle_history()
|
||||
{
|
||||
// 支持通过车辆ID或车牌号查询
|
||||
$vehicleNoInput = input('id');
|
||||
if (is_numeric($vehicleNoInput)) {
|
||||
// 如果是数字,当作车辆ID处理
|
||||
$vehicleNo = \app\admin\model\yq\driver\Vehicle::where('id', $vehicleNoInput)->value('license');
|
||||
} else {
|
||||
// 如果是字符串,当作车牌号处理
|
||||
$vehicleNo = $vehicleNoInput;
|
||||
}
|
||||
$this->assign('vehicleNo', $vehicleNo);
|
||||
return $this->view->fetch('car/vehicle_history');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
100
application/index/controller/Index.php
Normal file
100
application/index/controller/Index.php
Normal file
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
|
||||
namespace app\index\controller;
|
||||
|
||||
use app\common\controller\Frontend;
|
||||
|
||||
class Index extends Frontend
|
||||
{
|
||||
|
||||
protected $noNeedLogin = '*';
|
||||
protected $noNeedRight = '*';
|
||||
protected $layout = '';
|
||||
private $iv = 'XAkVMV0l4Dk4tsqs';// iv的长度要根据加密方式和模式来定,aes-128-cbc偏移量的是16位
|
||||
|
||||
private $key = 'VlHFhskOPV1vrYTo12';
|
||||
|
||||
public function mb_str_splits($string, $split_length = 1, $encoding = 'UTF-8') {
|
||||
$result = [];
|
||||
$length = mb_strlen($string, $encoding);
|
||||
for ($i = 0; $i < $length; $i += $split_length) {
|
||||
$result[] = mb_substr($string, $i, $split_length, $encoding);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
//模拟AI回复文本输出
|
||||
public function outText($message)
|
||||
{
|
||||
if (ob_get_level() > 0) {
|
||||
ob_end_clean();
|
||||
}
|
||||
header('Content-Type: text/event-stream');
|
||||
header('Cache-Control: no-cache');
|
||||
header('Connection: keep-alive');
|
||||
header('X-Accel-Buffering: no');
|
||||
// 确保没有输出缓冲区阻止我们立即发送内容
|
||||
while (ob_get_level() > 0) {
|
||||
ob_end_flush();
|
||||
}
|
||||
ob_start();
|
||||
// 要显示的消息
|
||||
$msg = $this->mb_str_splits($message);
|
||||
foreach ($msg as $char) {
|
||||
|
||||
$data = ['choices' =>[['delta' =>['content' => $char]]]];
|
||||
echo 'data: ' . json_encode($data, JSON_UNESCAPED_UNICODE). PHP_EOL;
|
||||
ob_flush();
|
||||
flush();
|
||||
usleep(25000);
|
||||
}
|
||||
echo '[回答完毕]';
|
||||
ob_flush();
|
||||
flush();
|
||||
ob_end_flush();
|
||||
}
|
||||
|
||||
|
||||
public function index()
|
||||
{
|
||||
|
||||
// //获取园区坐标
|
||||
// $perimeter = (new Perimeter)->select();
|
||||
//
|
||||
// $str = '107.024924,29.817815;107.033335,29.822283;107.03591,29.823028;107.037455,29.825113;107.041918,29.826304;107.041918,29.829283;107.044836,29.830325;107.04621,29.827793;107.051531,29.825411;107.055651,29.821985;107.058226,29.820347;107.057539,29.817666;107.054793,29.816177;107.042605,29.810219;107.037798,29.805453;107.035567,29.800388;107.035223,29.796962;107.025954,29.788024;107.02561,29.784448;107.025439,29.783405;107.020975,29.781021;107.022349,29.779681;107.015311,29.77685;107.019259,29.771039;107.020804,29.769549;107.026125,29.774913;107.030417,29.779979;107.035738,29.786534;107.044493,29.798154;107.051188,29.805453;107.056509,29.809028;107.062174,29.8059;107.068011,29.802474;107.069384,29.80158;107.057711,29.786981;107.048785,29.775807;107.039515,29.766866;107.030588,29.759267;107.028872,29.75882;107.022349,29.763141;107.015654,29.770741;107.011706,29.77685;107.001234,29.774168;106.995055,29.773274;106.988703,29.783852;106.982695,29.786832;106.97497,29.788322;106.970679,29.786832;106.967074,29.786832;106.96364,29.79145;106.963812,29.794877;106.969134,29.802325;106.97291,29.805751;106.972395,29.813198;106.967245,29.81722;106.962954,29.820943;106.965872,29.827645;106.968619,29.832112;106.973082,29.839557;106.97909,29.848342;106.984583,29.855638;106.985785,29.856829;106.996599,29.85266;107.001234,29.861593;107.003638,29.864868;107.012736,29.864272;107.0184,29.862337;107.014109,29.850725;107.011362,29.845662;107.010847,29.842089;107.012736,29.837026;107.017199,29.830623;107.017371,29.830325;107.019945,29.829878;107.021319,29.826453;107.02355,29.821092;107.024752,29.818113';
|
||||
// $arr = explode(';', $str);
|
||||
// $lat_str = [];
|
||||
// foreach ($arr as $key => $value) {
|
||||
// $lat_lag = explode(',', $value);
|
||||
// $lat_str [] = [
|
||||
// 'lat' => $lat_lag[1],
|
||||
// 'lon' => $lat_lag[0],
|
||||
// ];
|
||||
// }
|
||||
// print_r(json_encode($lat_str));
|
||||
// die();
|
||||
|
||||
// 手机号 密码 加密
|
||||
// 单独加一个(对应)字段来存储验证 现在手机号和之前保存手机号
|
||||
// return $this->view->fetch('datav/index');
|
||||
// return $this->view->fetch();
|
||||
return $this->view->fetch('jingmen/index');
|
||||
|
||||
}
|
||||
|
||||
public function h5()
|
||||
{
|
||||
return $this->view->fetch('/index/h5');
|
||||
}
|
||||
|
||||
|
||||
public function encrypt($input)
|
||||
{
|
||||
return base64_encode(openssl_encrypt($input, 'AES-128-CBC', $this->key, OPENSSL_RAW_DATA, $this->iv));
|
||||
}
|
||||
|
||||
public function decrypt($input)
|
||||
{
|
||||
return openssl_decrypt(base64_decode($input), 'AES-128-CBC', $this->key, OPENSSL_RAW_DATA, $this->iv);
|
||||
}
|
||||
}
|
||||
|
||||
333
application/index/controller/User.php
Normal file
333
application/index/controller/User.php
Normal file
@@ -0,0 +1,333 @@
|
||||
<?php
|
||||
|
||||
namespace app\index\controller;
|
||||
|
||||
use addons\wechat\model\WechatCaptcha;
|
||||
use app\common\controller\Frontend;
|
||||
use app\common\library\Ems;
|
||||
use app\common\library\Sms;
|
||||
use app\common\model\Attachment;
|
||||
use think\Config;
|
||||
use think\Cookie;
|
||||
use think\Hook;
|
||||
use think\Session;
|
||||
use think\Validate;
|
||||
|
||||
/**
|
||||
* 会员中心
|
||||
*/
|
||||
class User extends Frontend
|
||||
{
|
||||
protected $layout = 'default';
|
||||
protected $noNeedLogin = ['login', 'register', 'third'];
|
||||
protected $noNeedRight = ['*'];
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
$auth = $this->auth;
|
||||
|
||||
if (!Config::get('fastadmin.usercenter')) {
|
||||
$this->error(__('User center already closed'), '/');
|
||||
}
|
||||
|
||||
//监听注册登录退出的事件
|
||||
Hook::add('user_login_successed', function ($user) use ($auth) {
|
||||
$expire = input('post.keeplogin') ? 30 * 86400 : 0;
|
||||
Cookie::set('uid', $user->id, $expire);
|
||||
Cookie::set('token', $auth->getToken(), $expire);
|
||||
});
|
||||
Hook::add('user_register_successed', function ($user) use ($auth) {
|
||||
Cookie::set('uid', $user->id);
|
||||
Cookie::set('token', $auth->getToken());
|
||||
});
|
||||
Hook::add('user_delete_successed', function ($user) use ($auth) {
|
||||
Cookie::delete('uid');
|
||||
Cookie::delete('token');
|
||||
});
|
||||
Hook::add('user_logout_successed', function ($user) use ($auth) {
|
||||
Cookie::delete('uid');
|
||||
Cookie::delete('token');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员中心
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->view->assign('title', __('User center'));
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册会员
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$url = $this->request->request('url', '', 'url_clean');
|
||||
if ($this->auth->id) {
|
||||
$this->success(__('You\'ve logged in, do not login again'), $url ? $url : url('user/index'));
|
||||
}
|
||||
if ($this->request->isPost()) {
|
||||
$username = $this->request->post('username');
|
||||
$password = $this->request->post('password', '', null);
|
||||
$email = $this->request->post('email');
|
||||
$mobile = $this->request->post('mobile', '');
|
||||
$captcha = $this->request->post('captcha');
|
||||
$token = $this->request->post('__token__');
|
||||
$rule = [
|
||||
'username' => 'require|length:3,30',
|
||||
'password' => 'require|length:6,30',
|
||||
'email' => 'require|email',
|
||||
'mobile' => 'regex:/^1\d{10}$/',
|
||||
'__token__' => 'require|token',
|
||||
];
|
||||
|
||||
$msg = [
|
||||
'username.require' => 'Username can not be empty',
|
||||
'username.length' => 'Username must be 3 to 30 characters',
|
||||
'password.require' => 'Password can not be empty',
|
||||
'password.length' => 'Password must be 6 to 30 characters',
|
||||
'email' => 'Email is incorrect',
|
||||
'mobile' => 'Mobile is incorrect',
|
||||
];
|
||||
$data = [
|
||||
'username' => $username,
|
||||
'password' => $password,
|
||||
'email' => $email,
|
||||
'mobile' => $mobile,
|
||||
'__token__' => $token,
|
||||
];
|
||||
//验证码
|
||||
$captchaResult = true;
|
||||
$captchaType = config("fastadmin.user_register_captcha");
|
||||
if ($captchaType) {
|
||||
if ($captchaType == 'mobile') {
|
||||
$captchaResult = Sms::check($mobile, $captcha, 'register');
|
||||
} elseif ($captchaType == 'email') {
|
||||
$captchaResult = Ems::check($email, $captcha, 'register');
|
||||
} elseif ($captchaType == 'wechat') {
|
||||
$captchaResult = WechatCaptcha::check($captcha, 'register');
|
||||
} elseif ($captchaType == 'text') {
|
||||
$captchaResult = \think\Validate::is($captcha, 'captcha');
|
||||
}
|
||||
}
|
||||
if (!$captchaResult) {
|
||||
$this->error(__('Captcha is incorrect'));
|
||||
}
|
||||
$validate = new Validate($rule, $msg);
|
||||
$result = $validate->check($data);
|
||||
if (!$result) {
|
||||
$this->error(__($validate->getError()), null, ['token' => $this->request->token()]);
|
||||
}
|
||||
if ($this->auth->register($username, $password, $email, $mobile)) {
|
||||
$this->success(__('Sign up successful'), $url ? $url : url('user/index'));
|
||||
} else {
|
||||
$this->error($this->auth->getError(), null, ['token' => $this->request->token()]);
|
||||
}
|
||||
}
|
||||
//判断来源
|
||||
$referer = $this->request->server('HTTP_REFERER', '', 'url_clean');
|
||||
if (!$url && $referer && !preg_match("/(user\/login|user\/register|user\/logout)/i", $referer)) {
|
||||
$url = $referer;
|
||||
}
|
||||
$this->view->assign('captchaType', config('fastadmin.user_register_captcha'));
|
||||
$this->view->assign('url', $url);
|
||||
$this->view->assign('title', __('Register'));
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员登录
|
||||
*/
|
||||
public function login()
|
||||
{
|
||||
$url = $this->request->request('url', '', 'url_clean');
|
||||
if ($this->auth->id) {
|
||||
$this->success(__('You\'ve logged in, do not login again'), $url ?: url('user/index'));
|
||||
}
|
||||
if ($this->request->isPost()) {
|
||||
$account = $this->request->post('account');
|
||||
$password = $this->request->post('password', '', null);
|
||||
$keeplogin = (int)$this->request->post('keeplogin');
|
||||
$token = $this->request->post('__token__');
|
||||
$rule = [
|
||||
'account' => 'require|length:3,50',
|
||||
'password' => 'require|length:6,30',
|
||||
'__token__' => 'require|token',
|
||||
];
|
||||
|
||||
$msg = [
|
||||
'account.require' => 'Account can not be empty',
|
||||
'account.length' => 'Account must be 3 to 50 characters',
|
||||
'password.require' => 'Password can not be empty',
|
||||
'password.length' => 'Password must be 6 to 30 characters',
|
||||
];
|
||||
$data = [
|
||||
'account' => $account,
|
||||
'password' => $password,
|
||||
'__token__' => $token,
|
||||
];
|
||||
$validate = new Validate($rule, $msg);
|
||||
$result = $validate->check($data);
|
||||
if (!$result) {
|
||||
$this->error(__($validate->getError()), null, ['token' => $this->request->token()]);
|
||||
}
|
||||
if ($this->auth->login($account, $password)) {
|
||||
$this->success(__('Logged in successful'), $url ? $url : url('user/index'));
|
||||
} else {
|
||||
$this->error($this->auth->getError(), null, ['token' => $this->request->token()]);
|
||||
}
|
||||
}
|
||||
//判断来源
|
||||
$referer = $this->request->server('HTTP_REFERER', '', 'url_clean');
|
||||
if (!$url && $referer && !preg_match("/(user\/login|user\/register|user\/logout)/i", $referer)) {
|
||||
$url = $referer;
|
||||
}
|
||||
$this->view->assign('url', $url);
|
||||
$this->view->assign('title', __('Login'));
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* 退出登录
|
||||
*/
|
||||
public function logout()
|
||||
{
|
||||
if ($this->request->isPost()) {
|
||||
$this->token();
|
||||
//退出本站
|
||||
$this->auth->logout();
|
||||
$this->success(__('Logout successful'), url('user/index'));
|
||||
}
|
||||
$html = "<form id='logout_submit' name='logout_submit' action='' method='post'>" . token() . "<input type='submit' value='ok' style='display:none;'></form>";
|
||||
$html .= "<script>document.forms['logout_submit'].submit();</script>";
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* 个人信息
|
||||
*/
|
||||
public function profile()
|
||||
{
|
||||
$this->view->assign('title', __('Profile'));
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改密码
|
||||
*/
|
||||
public function changepwd()
|
||||
{
|
||||
if ($this->request->isPost()) {
|
||||
$oldpassword = $this->request->post("oldpassword", '', null);
|
||||
$newpassword = $this->request->post("newpassword", '', null);
|
||||
$renewpassword = $this->request->post("renewpassword", '', null);
|
||||
$token = $this->request->post('__token__');
|
||||
$rule = [
|
||||
'oldpassword' => 'require|regex:\S{6,30}',
|
||||
'newpassword' => 'require|regex:\S{6,30}',
|
||||
'renewpassword' => 'require|regex:\S{6,30}|confirm:newpassword',
|
||||
'__token__' => 'token',
|
||||
];
|
||||
|
||||
$msg = [
|
||||
'renewpassword.confirm' => __('Password and confirm password don\'t match')
|
||||
];
|
||||
$data = [
|
||||
'oldpassword' => $oldpassword,
|
||||
'newpassword' => $newpassword,
|
||||
'renewpassword' => $renewpassword,
|
||||
'__token__' => $token,
|
||||
];
|
||||
$field = [
|
||||
'oldpassword' => __('Old password'),
|
||||
'newpassword' => __('New password'),
|
||||
'renewpassword' => __('Renew password')
|
||||
];
|
||||
$validate = new Validate($rule, $msg, $field);
|
||||
$result = $validate->check($data);
|
||||
if (!$result) {
|
||||
$this->error(__($validate->getError()), null, ['token' => $this->request->token()]);
|
||||
}
|
||||
|
||||
$ret = $this->auth->changepwd($newpassword, $oldpassword);
|
||||
if ($ret) {
|
||||
$this->success(__('Reset password successful'), url('user/login'));
|
||||
} else {
|
||||
$this->error($this->auth->getError(), null, ['token' => $this->request->token()]);
|
||||
}
|
||||
}
|
||||
$this->view->assign('title', __('Change password'));
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
public function attachment()
|
||||
{
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags']);
|
||||
if ($this->request->isAjax()) {
|
||||
$mimetypeQuery = [];
|
||||
$where = [];
|
||||
$filter = $this->request->request('filter');
|
||||
$filterArr = (array)json_decode($filter, true);
|
||||
if (isset($filterArr['mimetype']) && preg_match("/(\/|\,|\*)/", $filterArr['mimetype'])) {
|
||||
$this->request->get(['filter' => json_encode(array_diff_key($filterArr, ['mimetype' => '']))]);
|
||||
$mimetypeQuery = function ($query) use ($filterArr) {
|
||||
$mimetypeArr = array_filter(explode(',', $filterArr['mimetype']));
|
||||
foreach ($mimetypeArr as $index => $item) {
|
||||
$query->whereOr('mimetype', 'like', '%' . str_replace("/*", "/", $item) . '%');
|
||||
}
|
||||
};
|
||||
} elseif (isset($filterArr['mimetype'])) {
|
||||
$where['mimetype'] = ['like', '%' . $filterArr['mimetype'] . '%'];
|
||||
}
|
||||
|
||||
if (isset($filterArr['filename'])) {
|
||||
$where['filename'] = ['like', '%' . $filterArr['filename'] . '%'];
|
||||
}
|
||||
|
||||
if (isset($filterArr['createtime'])) {
|
||||
$timeArr = explode(' - ', $filterArr['createtime']);
|
||||
$where['createtime'] = ['between', [strtotime($timeArr[0]), strtotime($timeArr[1])]];
|
||||
}
|
||||
$search = $this->request->get('search');
|
||||
if ($search) {
|
||||
$where['filename'] = ['like', '%' . $search . '%'];
|
||||
}
|
||||
|
||||
$model = new Attachment();
|
||||
$offset = $this->request->get("offset", 0);
|
||||
$limit = $this->request->get("limit", 0);
|
||||
$total = $model
|
||||
->where($where)
|
||||
->where($mimetypeQuery)
|
||||
->where('user_id', $this->auth->id)
|
||||
->order("id", "DESC")
|
||||
->count();
|
||||
|
||||
$list = $model
|
||||
->where($where)
|
||||
->where($mimetypeQuery)
|
||||
->where('user_id', $this->auth->id)
|
||||
->order("id", "DESC")
|
||||
->limit($offset, $limit)
|
||||
->select();
|
||||
$cdnurl = preg_replace("/\/(\w+)\.php$/i", '', $this->request->root());
|
||||
foreach ($list as $k => &$v) {
|
||||
$v['fullurl'] = ($v['storage'] == 'local' ? $cdnurl : $this->view->config['upload']['cdnurl']) . $v['url'];
|
||||
}
|
||||
unset($v);
|
||||
$result = array("total" => $total, "rows" => $list);
|
||||
|
||||
return json($result);
|
||||
}
|
||||
$mimetype = $this->request->get('mimetype', '');
|
||||
$mimetype = substr($mimetype, -1) === '/' ? $mimetype . '*' : $mimetype;
|
||||
$this->view->assign('mimetype', $mimetype);
|
||||
$this->view->assign("mimetypeList", \app\common\model\Attachment::getMimetypeList());
|
||||
return $this->view->fetch();
|
||||
}
|
||||
}
|
||||
5
application/index/lang/en/index.php
Normal file
5
application/index/lang/en/index.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
];
|
||||
142
application/index/lang/zh-cn.php
Normal file
142
application/index/lang/zh-cn.php
Normal file
@@ -0,0 +1,142 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'Keep login' => '保持会话',
|
||||
'Forgot password' => '忘记密码?',
|
||||
'Username' => '用户名',
|
||||
'User id' => '会员ID',
|
||||
'Nickname' => '昵称',
|
||||
'Password' => '密码',
|
||||
'Sign up' => '注 册',
|
||||
'Sign in' => '登 录',
|
||||
'Sign out' => '退 出',
|
||||
'Guest' => '游客',
|
||||
'Welcome' => '%s,你好!',
|
||||
'Add' => '添加',
|
||||
'Edit' => '编辑',
|
||||
'Delete' => '删除',
|
||||
'Move' => '移动',
|
||||
'Name' => '名称',
|
||||
'Status' => '状态',
|
||||
'Weigh' => '权重',
|
||||
'Operate' => '操作',
|
||||
'Warning' => '温馨提示',
|
||||
'Default' => '默认',
|
||||
'Article' => '文章',
|
||||
'Page' => '单页',
|
||||
'OK' => '确定',
|
||||
'Cancel' => '取消',
|
||||
'Loading' => '加载中',
|
||||
'Money' => '余额',
|
||||
'Score' => '积分',
|
||||
'More' => '更多',
|
||||
'Normal' => '正常',
|
||||
'Hidden' => '隐藏',
|
||||
'Submit' => '提交',
|
||||
'Reset' => '重置',
|
||||
'Execute' => '执行',
|
||||
'Close' => '关闭',
|
||||
'Search' => '搜索',
|
||||
'Refresh' => '刷新',
|
||||
'First' => '首页',
|
||||
'Previous' => '上一页',
|
||||
'Next' => '下一页',
|
||||
'Last' => '末页',
|
||||
'None' => '无',
|
||||
'Online' => '在线',
|
||||
'Logout' => '退出',
|
||||
'Profile' => '个人资料',
|
||||
'Index' => '首页',
|
||||
'Hot' => '热门',
|
||||
'Recommend' => '推荐',
|
||||
'Dashboard' => '控制台',
|
||||
'Code' => '编号',
|
||||
'Message' => '内容',
|
||||
'Line' => '行号',
|
||||
'File' => '文件',
|
||||
'Menu' => '菜单',
|
||||
'Type' => '类型',
|
||||
'Title' => '标题',
|
||||
'Content' => '内容',
|
||||
'Apply' => '应用',
|
||||
'Clear' => '清空',
|
||||
'Custom Range' => '自定义',
|
||||
'Today' => '今天',
|
||||
'Yesterday' => '昨天',
|
||||
'Last 7 days' => '最近7天',
|
||||
'Last 30 days' => '最近30天',
|
||||
'Last month' => '上月',
|
||||
'This month' => '本月',
|
||||
'Choose' => '选择',
|
||||
'Append' => '追加',
|
||||
'Upload' => '上传',
|
||||
'Memo' => '备注',
|
||||
'Parent' => '父级',
|
||||
'Params' => '参数',
|
||||
'Permission' => '权限',
|
||||
'Go back' => '返回上一页',
|
||||
'Jump now' => '立即跳转',
|
||||
'Advance search' => '高级搜索',
|
||||
'Check all' => '选中全部',
|
||||
'Expand all' => '展开全部',
|
||||
'Begin time' => '开始时间',
|
||||
'End time' => '结束时间',
|
||||
'Create time' => '创建时间',
|
||||
'Flag' => '标志',
|
||||
'Gitee' => '码云',
|
||||
'Github' => 'Github',
|
||||
'QQ group' => 'QQ群',
|
||||
'Member center' => '会员中心',
|
||||
'Copyrights' => '版权所有',
|
||||
'Responsive' => '响应式开发',
|
||||
'Languages' => '多语言',
|
||||
'Module' => '模块化开发',
|
||||
'Extension' => '自由可扩展',
|
||||
'Auth' => '权限管理',
|
||||
'The fastest framework based on ThinkPHP5 and Bootstrap' => '基于ThinkPHP5和Bootstrap的极速后台开发框架',
|
||||
'Features' => '功能特性',
|
||||
'Home' => '首页',
|
||||
'Store' => '插件市场',
|
||||
'Wxapp' => '小程序',
|
||||
'Services' => '服务',
|
||||
'Download' => '下载',
|
||||
'Demo' => '演示',
|
||||
'Donation' => '捐赠',
|
||||
'Forum' => '社区',
|
||||
'Docs' => '文档',
|
||||
'User center' => '会员中心',
|
||||
'Change password' => '修改密码',
|
||||
'Please login first' => '请登录后再操作',
|
||||
'Uploaded successful' => '上传成功',
|
||||
'You can upload up to %d file%s' => '你最多还可以上传%d个文件',
|
||||
'You can choose up to %d file%s' => '你最多还可以选择%d个文件',
|
||||
'Chunk file write error' => '分片写入失败',
|
||||
'Chunk file info error' => '分片文件错误',
|
||||
'Chunk file merge error' => '分片合并错误',
|
||||
'Chunk file disabled' => '未开启分片上传功能',
|
||||
'Cancel upload' => '取消上传',
|
||||
'Upload canceled' => '上传已取消',
|
||||
'No file upload or server upload limit exceeded' => '未上传文件或超出服务器上传限制',
|
||||
'Uploaded file format is limited' => '上传文件格式受限制',
|
||||
'Uploaded file is not a valid image' => '上传文件不是有效的图片文件',
|
||||
'Are you sure you want to cancel this upload?' => '确定取消上传?',
|
||||
'Remove file' => '移除文件',
|
||||
'You can only upload a maximum of %s files' => '你最多允许上传 %s 个文件',
|
||||
'You can\'t upload files of this type' => '不允许上传的文件类型',
|
||||
'Server responded with %s code' => '服务端响应(Code:%s)',
|
||||
'File is too big (%sMiB), Max filesize: %sMiB' => '当前上传(%sM),最大允许上传文件大小:%sM',
|
||||
'Send verification code' => '发送验证码',
|
||||
'Redirect now' => '立即跳转',
|
||||
'Operation completed' => '操作成功!',
|
||||
'Operation failed' => '操作失败!',
|
||||
'Unknown data format' => '未知的数据格式!',
|
||||
'Network error' => '网络错误!',
|
||||
'Advanced search' => '高级搜索',
|
||||
'Invalid parameters' => '未知参数',
|
||||
'No results were found' => '记录未找到',
|
||||
'Parameter %s can not be empty' => '参数%s不能为空',
|
||||
'Token verification error' => 'Token验证错误!',
|
||||
'You have no permission' => '你没有权限访问',
|
||||
'An unexpected error occurred' => '发生了一个意外错误,程序猿正在紧急处理中',
|
||||
'This page will be re-directed in %s seconds' => '页面将在 %s 秒后自动跳转',
|
||||
];
|
||||
3
application/index/lang/zh-cn/ajax.php
Normal file
3
application/index/lang/zh-cn/ajax.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
|
||||
return [];
|
||||
5
application/index/lang/zh-cn/index.php
Normal file
5
application/index/lang/zh-cn/index.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
];
|
||||
89
application/index/lang/zh-cn/user.php
Normal file
89
application/index/lang/zh-cn/user.php
Normal file
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'User center' => '会员中心',
|
||||
'Register' => '注册',
|
||||
'Login' => '登录',
|
||||
'Account' => '账号',
|
||||
'Mobile' => '手机号',
|
||||
'Email' => '邮箱',
|
||||
'Captcha' => '验证码',
|
||||
'Lv' => 'Lv',
|
||||
'Score' => '积分',
|
||||
'Day' => '天',
|
||||
'Intro' => '个人介绍',
|
||||
'Successions' => '连续登录',
|
||||
'Maxsuccessions' => '最长连续登录',
|
||||
'Logintime' => '登录时间',
|
||||
'Prevtime' => '最后登录',
|
||||
'Change' => '修改',
|
||||
'Click to edit' => '点击编辑',
|
||||
'Email/Mobile/Username' => '邮箱/手机/用户名',
|
||||
'Sign up successful' => '注册成功',
|
||||
'Email active successful' => '邮箱激活成功',
|
||||
'Username can not be empty' => '用户名不能为空',
|
||||
'Username must be 3 to 30 characters' => '用户名必须3-30个字符',
|
||||
'Username must be 6 to 30 characters' => '用户名必须6-30个字符',
|
||||
'Account must be 3 to 50 characters' => '账户必须3-50个字符',
|
||||
'Password can not be empty' => '密码不能为空',
|
||||
'Password must be 6 to 30 characters' => '密码必须6-30个字符',
|
||||
'Email is incorrect' => '邮箱格式不正确',
|
||||
'Mobile is incorrect' => '手机格式不正确',
|
||||
'Username already exist' => '用户名已经存在',
|
||||
'Nickname already exist' => '昵称已经存在',
|
||||
'Email already exist' => '邮箱已经存在',
|
||||
'Mobile already exist' => '手机号已经存在',
|
||||
'Username is incorrect' => '用户名不正确',
|
||||
'Reset password' => '修改密码',
|
||||
'Reset password by email' => '通过邮箱',
|
||||
'Reset password by mobile' => '通过手机重置',
|
||||
'Reset password successful' => '修改密码成功',
|
||||
'Account is locked' => '账户已经被锁定',
|
||||
'Password is incorrect' => '密码不正确',
|
||||
'Account is incorrect' => '账户不正确',
|
||||
'Account not exist' => '账户不存在',
|
||||
'Account can not be empty' => '账户不能为空',
|
||||
'Username or password is incorrect' => '用户名或密码不正确',
|
||||
'You are not logged in' => '你当前还未登录',
|
||||
'You\'ve logged in, do not login again' => '你已经登录,请不要重复登录',
|
||||
'This guy hasn\'t written anything yet' => '这个人很懒,啥也没写',
|
||||
'Profile' => '个人资料',
|
||||
'Old password' => '旧密码',
|
||||
'New password' => '新密码',
|
||||
'Renew password' => '确认新密码',
|
||||
'Change password' => '修改密码',
|
||||
'New email' => '新邮箱',
|
||||
'New mobile' => '新手机号',
|
||||
'Change password successful' => '修改密码成功',
|
||||
'Password and confirm password don\'t match' => '两次输入的密码不一致',
|
||||
'Captcha is incorrect' => '验证码不正确',
|
||||
'Please try again after 1 day' => '请于1天后再尝试登录',
|
||||
'Logged in successful' => '登录成功',
|
||||
'Logout successful' => '退出成功',
|
||||
'User center already closed' => '会员中心已经关闭',
|
||||
'Don\'t have an account? Sign up' => '还没有账号?点击注册',
|
||||
'Already have an account? Sign in' => '已经有账号?点击登录',
|
||||
'Operation failed' => '操作失败',
|
||||
'Invalid parameters' => '参数不正确',
|
||||
'Change password failure' => '修改密码失败',
|
||||
'All' => '全部',
|
||||
'Url' => '物理路径',
|
||||
'Imagewidth' => '宽度',
|
||||
'Imageheight' => '高度',
|
||||
'Imagetype' => '图片类型',
|
||||
'Imageframes' => '图片帧数',
|
||||
'Preview' => '预览',
|
||||
'Filename' => '文件名',
|
||||
'Filesize' => '文件大小',
|
||||
'Mimetype' => 'Mime类型',
|
||||
'Image' => '图片',
|
||||
'Audio' => '音频',
|
||||
'Video' => '视频',
|
||||
'Text' => '文档',
|
||||
'Application' => '应用',
|
||||
'Zip' => '压缩包',
|
||||
'Extparam' => '透传数据',
|
||||
'Createtime' => '创建日期',
|
||||
'Uploadtime' => '上传时间',
|
||||
'Storage' => '存储引擎',
|
||||
];
|
||||
144
application/index/view/car/bjlist.html
Normal file
144
application/index/view/car/bjlist.html
Normal file
@@ -0,0 +1,144 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<script src="__CDN__/web/static/js/jquery-1.11.3.js" type=text/javascript charset=utf-8></script>
|
||||
<script src="__CDN__/web/static/js/xlPaging.js"></script>
|
||||
<!-- <script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.9.1/jquery.min.js"></script> -->
|
||||
|
||||
<title>查看报警</title>
|
||||
<style type="text/css">
|
||||
/**************分页*******************/
|
||||
#page {
|
||||
margin: 20px auto;
|
||||
color: #666;
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#page li {
|
||||
display: inline-block;
|
||||
min-width: 30px;
|
||||
height: 28px;
|
||||
cursor: pointer;
|
||||
color: #666;
|
||||
font-size: 13px;
|
||||
line-height: 28px;
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid #dce0e0;
|
||||
text-align: center;
|
||||
margin: 0 4px;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
.xl-nextPage,
|
||||
.xl-prevPage {
|
||||
width: 60px;
|
||||
color: #0073A9;
|
||||
height: 28px;
|
||||
}
|
||||
.swiper-container{
|
||||
margin-top: .7rem;
|
||||
z-index: -1;
|
||||
}
|
||||
#page li.xl-disabled {
|
||||
opacity: .5;
|
||||
cursor: no-drop;
|
||||
}
|
||||
|
||||
#page li.xl-active {
|
||||
background-color: #0073A9;
|
||||
border-color: #0073A9;
|
||||
color: #FFF
|
||||
}
|
||||
tr td{
|
||||
border: 1px solid #eee;
|
||||
height:40px;
|
||||
}
|
||||
tr th{
|
||||
border: 1px solid #eee;
|
||||
height:40px;
|
||||
background: #EEEEEE;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table border="0" cellspacing="0" cellpadding="0" width="100%" class="ids" style="border: 1px solid #eee;text-align: center;">
|
||||
</table>
|
||||
<div id="page"></div>
|
||||
</body>
|
||||
|
||||
<script type="text/javascript">
|
||||
var page=1,pages=1, cph='';
|
||||
function GetRequest() {
|
||||
var url = location.search; //获取url中"?"符后的字串
|
||||
var theRequest = new Object();
|
||||
if(url.indexOf("?") != -1) {
|
||||
var str = url.substr(1);
|
||||
strs = str.split("&");
|
||||
for(var i = 0; i < strs.length; i++) {
|
||||
theRequest[strs[i].split("=")[0]] = (strs[i].split("=")[1]);
|
||||
|
||||
}
|
||||
}
|
||||
return theRequest;
|
||||
}
|
||||
function getlist(cph){
|
||||
let _this=this;
|
||||
$.ajax({
|
||||
dataType: "json",
|
||||
type: "post",
|
||||
url:'/api/Yq_screen/vehicle_alarm_list',
|
||||
data: {
|
||||
action:'Screen/vehicle_alarm_list',
|
||||
page:page,
|
||||
limit:20,
|
||||
vehicleNo:cph
|
||||
},
|
||||
success: function(res) {
|
||||
if (res.code == 1) {
|
||||
var list =res.data.list;
|
||||
pages=res.data.pages;
|
||||
var title='<tr>'+'<th>'+'序号'+'</th>'+'<th>'+'车牌号'+'</th>'+'<th>'+'事件名称'+'</th>'+'<th>'+'触发类型'+'</th>'+'<th>'+'报警时间'+'</th>'+'<th>'+'是否处理'+'</th>'+'</tr>';
|
||||
var ht='';
|
||||
for(var i=0;i<list.length;i++){
|
||||
if(list[i].trigger_type==1){
|
||||
list[i].trigger_type='自动触发'
|
||||
}else{
|
||||
list[i].trigger_type='自主上报'
|
||||
}
|
||||
if(list[i].is_reset==0){
|
||||
list[i].is_reset='未处理'
|
||||
}else{
|
||||
list[i].is_reset='已处理'
|
||||
}
|
||||
ht+=
|
||||
'<tr>'+'<td>'+Number((page-1)*20+(i+1))+'</td>'+'<td>'+list[i].license+'</td>'+'<td>'+list[i].name+'</td>'+'<td>'+list[i].trigger_type+'</td>'+'<td>'+list[i].create_time+'</td>'+'<td>'+list[i].is_reset+'</td>'+'</tr>'
|
||||
}
|
||||
var html=title+ht;
|
||||
$('table').append(html);
|
||||
$("#page").paging({
|
||||
nowPage: page, // 当前页码
|
||||
pageNum:pages, // 总页码
|
||||
buttonNum:5, //要展示的页码数量
|
||||
callback: function (num) { //回调函数
|
||||
$('table').html('');
|
||||
page=num;
|
||||
getlist(cph);
|
||||
},
|
||||
});
|
||||
} else {
|
||||
}
|
||||
|
||||
},
|
||||
});
|
||||
}
|
||||
window.onload=function(){
|
||||
var obj=GetRequest();
|
||||
cph=decodeURI(obj.id);
|
||||
getlist(cph);
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
94
application/index/view/car/car_detail.html
Normal file
94
application/index/view/car/car_detail.html
Normal file
@@ -0,0 +1,94 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<script src="__CDN__/web/static/js/jquery-1.11.3.js" type=text/javascript charset=utf-8></script>
|
||||
<title>车辆信息</title>
|
||||
<style type="text/css">
|
||||
.content{
|
||||
width: 800px;
|
||||
margin: auto;
|
||||
}
|
||||
h2{
|
||||
text-align: center;
|
||||
margin: 40px 0;
|
||||
}
|
||||
.content>div>p{
|
||||
margin: 30px 0;
|
||||
}
|
||||
.content>div>p>span{
|
||||
display: inline-block;
|
||||
}
|
||||
.content>div>p>span:nth-child(1){
|
||||
width: 200px;
|
||||
float: left;
|
||||
}
|
||||
.content>div>p>span:nth-child(2){
|
||||
width: 600px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<h2>车辆信息</h2>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function GetRequest() {
|
||||
var url = location.search; //获取url中"?"符后的字串
|
||||
var theRequest = new Object();
|
||||
if(url.indexOf("?") != -1) {
|
||||
var str = url.substr(1);
|
||||
strs = str.split("&");
|
||||
for(var i = 0; i < strs.length; i++) {
|
||||
theRequest[strs[i].split("=")[0]] = (strs[i].split("=")[1]);
|
||||
}
|
||||
}
|
||||
return theRequest;
|
||||
}
|
||||
function getdata(id){
|
||||
let _this=this;
|
||||
// 如果id为空,显示提示
|
||||
if (!id) {
|
||||
$('.content').append('<div style="text-align:center;color:#999;margin-top:50px;">未找到车辆信息</div>');
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
dataType: "json",
|
||||
type: "post",
|
||||
url:'/api/Yq_screen/vehicle_detail',
|
||||
data: {
|
||||
action:'Screen/vehicle_detail',
|
||||
id:id,
|
||||
},
|
||||
success: function(res) {
|
||||
if (res.code == 1) {
|
||||
var data=res.data;
|
||||
$('.content').append(
|
||||
'<div>'+
|
||||
'<p>'+'<span>车牌号:</span>'+'<span>'+data.vehicleNo+'</span>'+'</p>'+
|
||||
'<p>'+'<span>承运商:</span>'+'<span>'+data.ownerName+'</span>'+'</p>'+
|
||||
'<p>'+'<span>经营范围:</span>'+'<span>'+data.businessScopeName+'</span>'+'</p>'+
|
||||
'<p>'+'<span>运输证号:</span>'+'<span>'+data.transCertificateCode+'</span>'+'</p>'+
|
||||
'<p>'+'<span>期限开始日期:</span>'+'<span>'+data.certificateEffdate+'</span>'+'</p>'+
|
||||
'<p>'+'<span>期限结束日期:</span>'+'<span>'+data.certificateExpdate+'</span>'+'</p>'+
|
||||
'<p>'+'<span>发证机关:</span>'+'<span>'+data.licenseIssueOrganCode+'</span>'+'</p>'+
|
||||
'</div>'
|
||||
)
|
||||
} else {
|
||||
$('.content').append('<div style="text-align:center;color:#999;margin-top:50px;">' + (res.msg || '获取车辆信息失败') + '</div>');
|
||||
}
|
||||
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
$('.content').append('<div style="text-align:center;color:#999;margin-top:50px;">请求失败,请稍后重试</div>');
|
||||
}
|
||||
});
|
||||
};
|
||||
window.onload=function(){
|
||||
var obj=GetRequest();
|
||||
id=decodeURI(obj.id);
|
||||
getdata(id);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
159
application/index/view/car/park_list.html
Normal file
159
application/index/view/car/park_list.html
Normal file
@@ -0,0 +1,159 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<script src="__CDN__/web/static/js/jquery-1.11.3.js" type=text/javascript charset=utf-8></script>
|
||||
<script src="__CDN__/web/static/js/xlPaging.js"></script>
|
||||
<!-- <script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.9.1/jquery.min.js"></script> -->
|
||||
|
||||
<title>入园记录</title>
|
||||
<style type="text/css">
|
||||
/**************分页*******************/
|
||||
#page {
|
||||
margin: 20px auto;
|
||||
color: #666;
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#page li {
|
||||
display: inline-block;
|
||||
min-width: 30px;
|
||||
height: 28px;
|
||||
cursor: pointer;
|
||||
color: #666;
|
||||
font-size: 13px;
|
||||
line-height: 28px;
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid #dce0e0;
|
||||
text-align: center;
|
||||
margin: 0 4px;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
.xl-nextPage,
|
||||
.xl-prevPage {
|
||||
width: 60px;
|
||||
color: #0073A9;
|
||||
height: 28px;
|
||||
}
|
||||
.swiper-container{
|
||||
margin-top: .7rem;
|
||||
z-index: -1;
|
||||
}
|
||||
#page li.xl-disabled {
|
||||
opacity: .5;
|
||||
cursor: no-drop;
|
||||
}
|
||||
|
||||
#page li.xl-active {
|
||||
background-color: #0073A9;
|
||||
border-color: #0073A9;
|
||||
color: #FFF
|
||||
}
|
||||
tr td{
|
||||
border: 1px solid #eee;
|
||||
height:40px;
|
||||
}
|
||||
tr th{
|
||||
border: 1px solid #eee;
|
||||
height:40px;
|
||||
background: #EEEEEE;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table border="0" cellspacing="0" cellpadding="0" width="100%" class="ids" style="border: 1px solid #eee;text-align: center;">
|
||||
</table>
|
||||
<div id="page"></div>
|
||||
</body>
|
||||
|
||||
<script type="text/javascript">
|
||||
var page=1,pages=1, cph='';
|
||||
function GetRequest() {
|
||||
var url = location.search; //获取url中"?"符后的字串
|
||||
var theRequest = new Object();
|
||||
if(url.indexOf("?") != -1) {
|
||||
var str = url.substr(1);
|
||||
strs = str.split("&");
|
||||
for(var i = 0; i < strs.length; i++) {
|
||||
theRequest[strs[i].split("=")[0]] = (strs[i].split("=")[1]);
|
||||
|
||||
}
|
||||
}
|
||||
return theRequest;
|
||||
}
|
||||
function getlist(cph){
|
||||
let _this=this;
|
||||
$.ajax({
|
||||
dataType: "json",
|
||||
type: "post",
|
||||
url:'/api/Yq_screen/vehicle_park_list',
|
||||
data: {
|
||||
action:'Screen/vehicle_park_list',
|
||||
page:page,
|
||||
limit:20,
|
||||
vehicleNo:cph
|
||||
},
|
||||
success: function(res) {
|
||||
if (res.code == 1) {
|
||||
var list =res.data.list;
|
||||
var title='<tr>'+'<th>'+'序号'+'</th>'+'<th>'+'车牌号'+'</th>'+'<th>'+'入园目的'+'</th>'+'<th>'+'审核状态'+'</th>'+'<th>'+'申请时间'+'</th>'+'</tr>';
|
||||
var ht='';
|
||||
pages=res.data.pages;
|
||||
for(var i=0;i<list.length;i++){
|
||||
if(list[i].mission==1){
|
||||
list[i].mudi='转货/卸货'
|
||||
}else if(list[i].mission==2){
|
||||
list[i].mudi='维修/洗车/停车'
|
||||
}else if(list[i].mission==3){
|
||||
list[i].mudi='常驻'
|
||||
}else if(list[i].mission==4){
|
||||
list[i].mudi='维修'
|
||||
}else if(list[i].mission==5){
|
||||
list[i].mudi='洗车'
|
||||
}else if(list[i].mission==6){
|
||||
list[i].mudi='停车'
|
||||
}else if(list[i].mission==7){
|
||||
list[i].mudi='检测'
|
||||
}else if(list[i].mission==8){
|
||||
list[i].mudi='洗罐'
|
||||
}
|
||||
if(list[i].status==1){
|
||||
list[i].pass='已通过'
|
||||
}else if(list[i].status==0){
|
||||
list[i].pass='审核中'
|
||||
}else{
|
||||
list[i].pass='已驳回'
|
||||
}
|
||||
ht+=
|
||||
'<tr>'+'<td>'+Number((page-1)*20+(i+1))+'</td>'+'<td>'+list[i].tractor_license+'</td>'+'<td>'+list[i].mudi+'</td>'+'<td>'+list[i].pass+'</td>'+'<td>'+list[i].create_time+'</td>'+'</tr>'
|
||||
}
|
||||
var html=title+ht;
|
||||
$('table').append(html);
|
||||
$("#page").paging({
|
||||
nowPage: page, // 当前页码
|
||||
pageNum:pages, // 总页码
|
||||
buttonNum:5, //要展示的页码数量
|
||||
callback: function (num) { //回调函数
|
||||
$('table').html('');
|
||||
page=num;
|
||||
getlist(cph);
|
||||
},
|
||||
});
|
||||
|
||||
} else {
|
||||
}
|
||||
|
||||
},
|
||||
});
|
||||
}
|
||||
window.onload=function(){
|
||||
var obj=GetRequest();
|
||||
cph=decodeURI(obj.id);
|
||||
getlist(cph);
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
210
application/index/view/car/vehicle_history.html
Normal file
210
application/index/view/car/vehicle_history.html
Normal file
@@ -0,0 +1,210 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
|
||||
<title>行驶记录</title>
|
||||
|
||||
<link rel="stylesheet" href="https://a.amap.com/jsapi_demos/static/demo-center/css/demo-center.css"/>
|
||||
<script src="__CDN__/web/static/js/jquery-1.11.3.js" type=text/javascript charset=utf-8></script>
|
||||
<script src="__CDN__/web/static/js/laydate/laydate.js"></script>
|
||||
<style>
|
||||
html, body, #container {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.input-card{
|
||||
top: 1rem;
|
||||
height:8rem;
|
||||
right: 3rem;
|
||||
width: 30rem;
|
||||
}
|
||||
.input-card .btn{
|
||||
margin-right: 1.2rem;
|
||||
width: 14rem;
|
||||
}
|
||||
|
||||
.input-card .btn:last-child{
|
||||
margin-right: 0;
|
||||
}
|
||||
.animate{
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
right: 10px;
|
||||
}
|
||||
.animate input{
|
||||
width: 100px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container"></div>
|
||||
<div class="input-card">
|
||||
<h4>时间筛选(按天查询)</h4>
|
||||
<input type="text" class="demo-input" placeholder="请选择日期" id="test1">
|
||||
</div>
|
||||
<div class="animate">
|
||||
<div class="input-item">
|
||||
<input type="button" class="btn" value="开始动画" id="start" onclick="startAnimation(2000)"/>
|
||||
<input type="button" class="btn" value="暂停动画" id="pause" onclick="pauseAnimation()"/>
|
||||
<input type="button" class="btn" value="继续动画" id="resume" onclick="resumeAnimation()"/>
|
||||
</div>
|
||||
<div class="input-item">
|
||||
<input type="button" class="btn" value="正常" onclick="startAnimation(2000)"/>
|
||||
<input type="button" class="btn" value="4倍速" onclick="startAnimation(8000)"/>
|
||||
<input type="button" class="btn" value="16倍速" onclick="startAnimation(20000)"/>
|
||||
<!--<input type="button" class="btn" value="停止动画" id="stop" onclick="stopAnimation()"/>-->
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="vehicleNo" value="{$vehicleNo}">
|
||||
<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=4a7c7c92504e8d8afa2abf377159280a"></script>
|
||||
<script>
|
||||
function GetRequest() {
|
||||
var url = location.search; //获取url中"?"符后的字串
|
||||
var theRequest = new Object();
|
||||
if(url.indexOf("?") != -1) {
|
||||
var str = url.substr(1);
|
||||
strs = str.split("&");
|
||||
for(var i = 0; i < strs.length; i++) {
|
||||
theRequest[strs[i].split("=")[0]] = (strs[i].split("=")[1]);
|
||||
|
||||
}
|
||||
}
|
||||
return theRequest;
|
||||
}
|
||||
var reservation ='',cph='';
|
||||
window.onload=function(){
|
||||
// 优先使用隐藏字段中的 vehicleNo,如果没有则从 URL 参数获取
|
||||
var vehicleNoFromHidden = $('input[name=vehicleNo]').val();
|
||||
if (vehicleNoFromHidden) {
|
||||
cph = vehicleNoFromHidden;
|
||||
} else {
|
||||
var obj=GetRequest();
|
||||
cph=decodeURI(obj.id);
|
||||
}
|
||||
getdata(cph,reservation);
|
||||
}
|
||||
|
||||
// var reservation = '';
|
||||
function getdata(cph,reservation) {
|
||||
$.ajax({
|
||||
dataType: "json",
|
||||
type: "post",
|
||||
url: "/api/Yq_screen/vehicle_history",
|
||||
data: {
|
||||
action:'Screen/vehicle_history',
|
||||
vehicleNo:cph,
|
||||
reservation:reservation,
|
||||
},
|
||||
success: function(res) {
|
||||
if(res.code==1){
|
||||
// str = res.data;
|
||||
if (res.data && res.data.coordinate == '106.964108,29.793287'){
|
||||
alert('当天未查询到该车轨迹,请重新选择日期');
|
||||
return;
|
||||
}
|
||||
if (res.data && res.data.coordinate) {
|
||||
history(res.data.coordinate);
|
||||
} else {
|
||||
alert('当天未查询到该车轨迹,请重新选择日期');
|
||||
}
|
||||
} else {
|
||||
alert('查询失败:' + (res.msg || '未知错误'));
|
||||
}
|
||||
},
|
||||
error: function(res) {
|
||||
alert('请求失败,请稍后重试');
|
||||
}
|
||||
});
|
||||
}
|
||||
var marker= '';
|
||||
var lineArr='';
|
||||
function history(info) {
|
||||
var vehicleNo = $('input[name=vehicleNo]').val();
|
||||
var reservation = '';
|
||||
const MAP_KEY = "4a7c7c92504e8d8afa2abf377159280a",
|
||||
{
|
||||
LngLat
|
||||
} = AMap;
|
||||
// var str="108.01527,29.895601;106.997876,29.89281;106.991391,29.887939;106.985853,29.880405;106.981835,29.871026;106.960543,29.849142;106.950737,29.83564;106.945862,29.824089;106.943563,29.814148;106.945054,29.799754;106.942764,29.783607;106.970332,29.766519;106.983273,29.751322;107.017612,29.737776;107.050425,29.734115;107.064458,29.737683;107.064744,29.739318;107.058942,29.748447;107.055205,29.762378;107.071581,29.77504;107.086248,29.789923;107.088111,29.796775;107.084106,29.807387;107.080959,29.81142;107.068298,29.813474;107.06422,29.813406;107.060435,29.82112;107.050628,29.827207;107.04726,29.828623;107.046543,29.829966;107.04701,29.830878;107.04712,29.834263;107.044827,29.838826;107.053757,29.842875;107.056479,29.849047;107.057124,29.85153;107.056802,29.853468;107.060415,29.86047;107.061665,29.864841;107.054919,29.881592;107.052508,29.894119;107.040451,29.898403;107.028579,29.89536;107.014946,29.895825;106.997804,29.89278";
|
||||
// var marker1, lineArr1 = [[116.478935,39.997761],[116.478939,39.997825],[116.478912,39.998549],[116.478912,39.998549],[116.478998,39.998555],[116.478998,39.998555],[116.479282,39.99856],[116.479658,39.998528],[116.480151,39.998453],[116.480784,39.998302],[116.480784,39.998302],[116.481149,39.998184],[116.481573,39.997997],[116.481863,39.997846],[116.482072,39.997718],[116.482362,39.997718],[116.483633,39.998935],[116.48367,39.998968],[116.484648,39.999861]];
|
||||
|
||||
lineArr = strToLL(info);
|
||||
lay('#version').html('-v'+ laydate.v);
|
||||
laydate.render({
|
||||
elem: '#test1',
|
||||
min: -4,
|
||||
max: 0,
|
||||
// type: 'datetime',
|
||||
// range: true, //或 range: '~' 来自定义分割字符
|
||||
done:function(value,date,endDate){
|
||||
console.log(value); //得到日期生成的值,如:2017-08-18
|
||||
// reservation=value;
|
||||
getdata(cph,value);
|
||||
}
|
||||
});
|
||||
var map = new AMap.Map("container", {
|
||||
resizeEnable: true,
|
||||
center: lineArr[0],
|
||||
zoom: 17
|
||||
});
|
||||
function strToLL(str) {
|
||||
return str.split(';').map(i => new LngLat(...i.split(',').map(j => +j)))
|
||||
}
|
||||
marker = new AMap.Marker({
|
||||
map: map,
|
||||
position: lineArr[0],
|
||||
icon: "https://webapi.amap.com/images/car.png",
|
||||
offset: new AMap.Pixel(-26, -13),
|
||||
autoRotation: true,
|
||||
angle:-90,
|
||||
});
|
||||
|
||||
// 绘制轨迹
|
||||
var polyline = new AMap.Polyline({
|
||||
map: map,
|
||||
path: lineArr,
|
||||
showDir:true,
|
||||
strokeColor: "#28F", //线颜色
|
||||
// strokeOpacity: 1, //线透明度
|
||||
strokeWeight: 6, //线宽
|
||||
// strokeStyle: "solid" //线样式
|
||||
});
|
||||
|
||||
var passedPolyline = new AMap.Polyline({
|
||||
map: map,
|
||||
// path: lineArr,
|
||||
strokeColor: "#AF5", //线颜色
|
||||
// strokeOpacity: 1, //线透明度
|
||||
strokeWeight: 6, //线宽
|
||||
// strokeStyle: "solid" //线样式
|
||||
});
|
||||
|
||||
|
||||
marker.on('moving', function (e) {
|
||||
passedPolyline.setPath(e.passedPath);
|
||||
});
|
||||
|
||||
map.setFitView();
|
||||
}
|
||||
|
||||
|
||||
function startAnimation (time=2000) {
|
||||
marker.moveAlong(lineArr, time);
|
||||
}
|
||||
|
||||
function pauseAnimation () {
|
||||
marker.pauseMove();
|
||||
}
|
||||
|
||||
function resumeAnimation () {
|
||||
marker.resumeMove();
|
||||
}
|
||||
|
||||
function stopAnimation () {
|
||||
marker.stopMove();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
150
application/index/view/car/waybill_list.html
Normal file
150
application/index/view/car/waybill_list.html
Normal file
@@ -0,0 +1,150 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<script src="__CDN__/web/static/js/jquery-1.11.3.js" type=text/javascript charset=utf-8></script>
|
||||
<script src="__CDN__/web/static/js/xlPaging.js"></script>
|
||||
<!-- <script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.9.1/jquery.min.js"></script> -->
|
||||
|
||||
<title>运单记录</title>
|
||||
<style type="text/css">
|
||||
/**************分页*******************/
|
||||
#page {
|
||||
margin: 20px auto;
|
||||
color: #666;
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#page li {
|
||||
display: inline-block;
|
||||
min-width: 30px;
|
||||
height: 28px;
|
||||
cursor: pointer;
|
||||
color: #666;
|
||||
font-size: 13px;
|
||||
line-height: 28px;
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid #dce0e0;
|
||||
text-align: center;
|
||||
margin: 0 4px;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
.xl-nextPage,
|
||||
.xl-prevPage {
|
||||
width: 60px;
|
||||
color: #0073A9;
|
||||
height: 28px;
|
||||
}
|
||||
.swiper-container{
|
||||
margin-top: .7rem;
|
||||
z-index: -1;
|
||||
}
|
||||
#page li.xl-disabled {
|
||||
opacity: .5;
|
||||
cursor: no-drop;
|
||||
}
|
||||
|
||||
#page li.xl-active {
|
||||
background-color: #0073A9;
|
||||
border-color: #0073A9;
|
||||
color: #FFF
|
||||
}
|
||||
tr td{
|
||||
border: 1px solid #eee;
|
||||
height:40px;
|
||||
}
|
||||
tr th{
|
||||
border: 1px solid #eee;
|
||||
height:40px;
|
||||
background: #EEEEEE;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table border="0" cellspacing="0" cellpadding="0" width="100%" class="ids" style="border: 1px solid #eee;text-align: center;">
|
||||
</table>
|
||||
<div id="page"></div>
|
||||
</body>
|
||||
|
||||
<script type="text/javascript">
|
||||
var page=1,pages=1, cph='';
|
||||
function GetRequest() {
|
||||
var url = location.search; //获取url中"?"符后的字串
|
||||
var theRequest = new Object();
|
||||
if(url.indexOf("?") != -1) {
|
||||
var str = url.substr(1);
|
||||
strs = str.split("&");
|
||||
for(var i = 0; i < strs.length; i++) {
|
||||
theRequest[strs[i].split("=")[0]] = (strs[i].split("=")[1]);
|
||||
|
||||
}
|
||||
}
|
||||
return theRequest;
|
||||
}
|
||||
function getlist(cph){
|
||||
let _this=this;
|
||||
$.ajax({
|
||||
dataType: "json",
|
||||
type: "post",
|
||||
url:'/api/Yq_screen/vehicle_waybill_list',
|
||||
data: {
|
||||
action:'Screen/vehicle_waybill_list',
|
||||
page:page,
|
||||
limit:20,
|
||||
vehicleNo:cph,
|
||||
mission:''
|
||||
},
|
||||
success: function(res) {
|
||||
if (res.code == 1) {
|
||||
var list =res.data.list;
|
||||
pages=res.data.pages;
|
||||
var title='<tr>'+'<th>'+'序号'+'</th>'+'<th>'+'运单号'+'</th>'+'<th>'+'牵引车牌号'+'</th>'+'<th>'+'挂车车牌号'+'</th>'+'<th>'+'司机姓名'+
|
||||
'</th>'+'<th>'+'司机电话'+'</th>'+'<th>'+'装/卸'+'</th>'+'<th>'+'产品名称'+
|
||||
'</th>'+'<th>'+'装货单位'+'</th>'+'<th>'+'卸货单位'+'</th>'+'<th>'+'查验结果'+'</th>'+'<th>'+'查验企业'+
|
||||
'</th>'+'<th>'+'提单时间'+'</th>'+'<th>'+'提交时间'+'</th>'+'</tr>';
|
||||
var ht='';
|
||||
for(var i=0;i<list.length;i++){
|
||||
if(list[i].check_status_record==1){
|
||||
list[i].check='通过'
|
||||
}else{
|
||||
list[i].check='未处理'
|
||||
}
|
||||
ht+=
|
||||
'<tr>'+'<td>'+Number((page-1)*20+(i+1))+'</td>'+
|
||||
'<td>'+list[i].waybill_order+'</td>'+'<td>'+list[i].tow_license+'</td>'+
|
||||
'<td>'+list[i].mount_license+'</td>'+'<td>'+list[i].waybill_name+'</td>'+
|
||||
'<td>'+list[i].driver_tel+'</td>'+'<td>'+list[i].w_mission+'</td>'+
|
||||
'<td>'+list[i].sale_product+'</td>'+'<td>'+list[i].waybill_loading+'</td>'+
|
||||
'<td>'+list[i].waybill_unloading+'</td>'+'<td>'+list[i].check+'</td>'+
|
||||
'<td>'+list[i].check_name+'</td>'+'<td>'+list[i].waybill_date+'</td>'+
|
||||
'<td>'+list[i].create_time+'</td>'+'</tr>'
|
||||
}
|
||||
var html=title+ht;
|
||||
$('table').append(html);
|
||||
$("#page").paging({
|
||||
nowPage: page, // 当前页码
|
||||
pageNum:pages, // 总页码
|
||||
buttonNum:5, //要展示的页码数量
|
||||
callback: function (num) { //回调函数
|
||||
$('table').html('');
|
||||
page=num;
|
||||
getlist(cph);
|
||||
},
|
||||
});
|
||||
} else {
|
||||
}
|
||||
|
||||
},
|
||||
});
|
||||
}
|
||||
window.onload=function(){
|
||||
var obj=GetRequest();
|
||||
cph=decodeURI(obj.id);
|
||||
getlist(cph);
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
27
application/index/view/common/captcha.html
Normal file
27
application/index/view/common/captcha.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<!--@formatter:off-->
|
||||
{if "[type]" == 'email'}
|
||||
<input type="text" name="captcha" class="form-control" data-rule="required;length({$Think.config.captcha.length});digits;remote({:url('api/validate/check_ems_correct')}, event=[event], email:#email)" />
|
||||
<span class="input-group-btn" style="padding:0;border:none;">
|
||||
<a href="javascript:;" class="btn btn-info btn-captcha" data-url="{:url('api/ems/send')}" data-type="email" data-event="[event]">发送验证码</a>
|
||||
</span>
|
||||
{elseif "[type]" == 'mobile'/}
|
||||
<input type="text" name="captcha" class="form-control" data-rule="required;length({$Think.config.captcha.length});digits;remote({:url('api/validate/check_sms_correct')}, event=[event], mobile:#mobile)" />
|
||||
<span class="input-group-btn" style="padding:0;border:none;">
|
||||
<a href="javascript:;" class="btn btn-info btn-captcha" data-url="{:url('api/sms/send')}" data-type="mobile" data-event="[event]">发送验证码</a>
|
||||
</span>
|
||||
{elseif "[type]" == 'wechat'/}
|
||||
{if get_addon_info('wechat')}
|
||||
<input type="text" name="captcha" class="form-control" data-rule="required;length({$Think.config.captcha.length});remote({:addon_url('wechat/captcha/check')}, event=[event])" />
|
||||
<span class="input-group-btn" style="padding:0;border:none;">
|
||||
<a href="javascript:;" class="btn btn-info btn-captcha" data-url="{:addon_url('wechat/captcha/send')}" data-type="wechat" data-event="[event]">获取验证码</a>
|
||||
</span>
|
||||
{else/}
|
||||
请在后台插件管理中安装《微信管理插件》
|
||||
{/if}
|
||||
{elseif "[type]" == 'text' /}
|
||||
<input type="text" name="captcha" class="form-control" data-rule="required;length({$Think.config.captcha.length})" />
|
||||
<span class="input-group-btn" style="padding:0;border:none;">
|
||||
<img src="{:captcha_src()}" width="100" height="32" onclick="this.src = '{:captcha_src()}?r=' + Math.random();"/>
|
||||
</span>
|
||||
{/if}
|
||||
<!--@formatter:on-->
|
||||
26
application/index/view/common/meta.html
Normal file
26
application/index/view/common/meta.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<meta charset="utf-8">
|
||||
<title>{$title|default=''|htmlentities} – {$site.name|htmlentities}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
|
||||
<meta name="renderer" content="webkit">
|
||||
|
||||
{if isset($keywords)}
|
||||
<meta name="keywords" content="{$keywords|htmlentities}">
|
||||
{/if}
|
||||
{if isset($description)}
|
||||
<meta name="description" content="{$description|htmlentities}">
|
||||
{/if}
|
||||
|
||||
<link rel="shortcut icon" href="__CDN__/assets/img/favicon.ico" />
|
||||
|
||||
<link href="__CDN__/assets/css/frontend{$Think.config.app_debug?'':'.min'}.css?v={$Think.config.site.version|htmlentities}" rel="stylesheet">
|
||||
|
||||
<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="__CDN__/assets/js/html5shiv.js"></script>
|
||||
<script src="__CDN__/assets/js/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<script type="text/javascript">
|
||||
var require = {
|
||||
config: {$config|json_encode}
|
||||
};
|
||||
</script>
|
||||
1
application/index/view/common/script.html
Normal file
1
application/index/view/common/script.html
Normal file
@@ -0,0 +1 @@
|
||||
<script src="__CDN__/assets/js/require{$Think.config.app_debug?'':'.min'}.js" data-main="__CDN__/assets/js/require-frontend{$Think.config.app_debug?'':'.min'}.js?v={$site.version|htmlentities}"></script>
|
||||
12
application/index/view/common/sidenav.html
Normal file
12
application/index/view/common/sidenav.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<div class="sidebar-toggle"><i class="fa fa-bars"></i></div>
|
||||
<div class="sidenav" id="sidebar-nav">
|
||||
{:hook('user_sidenav_before')}
|
||||
<ul class="list-group">
|
||||
<li class="list-group-heading">{:__('Member center')}</li>
|
||||
<li class="list-group-item {:check_nav_active('user/index')}"> <a href="{:url('user/index')}"><i class="fa fa-user-circle fa-fw"></i> {:__('User center')}</a> </li>
|
||||
<li class="list-group-item {:check_nav_active('user/profile')}"> <a href="{:url('user/profile')}"><i class="fa fa-user-o fa-fw"></i> {:__('Profile')}</a> </li>
|
||||
<li class="list-group-item {:check_nav_active('user/changepwd')}"> <a href="{:url('user/changepwd')}"><i class="fa fa-key fa-fw"></i> {:__('Change password')}</a> </li>
|
||||
<li class="list-group-item {:check_nav_active('user/logout')}"> <a href="{:url('user/logout')}"><i class="fa fa-sign-out fa-fw"></i> {:__('Sign out')}</a> </li>
|
||||
</ul>
|
||||
{:hook('user_sidenav_after')}
|
||||
</div>
|
||||
2179
application/index/view/jingmen/cldt.html
Normal file
2179
application/index/view/jingmen/cldt.html
Normal file
File diff suppressed because one or more lines are too long
1887
application/index/view/jingmen/i_clm.html
Normal file
1887
application/index/view/jingmen/i_clm.html
Normal file
File diff suppressed because one or more lines are too long
1836
application/index/view/jingmen/index.html
Normal file
1836
application/index/view/jingmen/index.html
Normal file
File diff suppressed because one or more lines are too long
1835
application/index/view/jingmen/yddt.html
Normal file
1835
application/index/view/jingmen/yddt.html
Normal file
File diff suppressed because one or more lines are too long
63
application/index/view/layout/default.html
Normal file
63
application/index/view/layout/default.html
Normal file
@@ -0,0 +1,63 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
{include file="common/meta" /}
|
||||
<link href="__CDN__/assets/css/user.css?v={$Think.config.site.version|htmlentities}" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<nav class="navbar navbar-white navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#header-navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{:url('/')}">{$site.name|htmlentities}</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="header-navbar">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a href="{:url('/')}">{:__('Home')}</a></li>
|
||||
<li class="dropdown">
|
||||
{if $user}
|
||||
<a href="{:url('user/index')}" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="avatar-img"><img src="{$user.avatar|htmlentities|cdnurl}" alt=""></span>
|
||||
<span class="visible-xs-inline-block" style="padding:5px;">{$user.nickname} <b class="caret"></b></span>
|
||||
</a>
|
||||
{else /}
|
||||
<a href="{:url('user/index')}" class="dropdown-toggle" data-toggle="dropdown">{:__('Member center')} <b class="caret"></b></a>
|
||||
{/if}
|
||||
<ul class="dropdown-menu">
|
||||
{if $user}
|
||||
<li><a href="{:url('user/index')}"><i class="fa fa-user-circle fa-fw"></i>{:__('User center')}</a></li>
|
||||
<li><a href="{:url('user/profile')}"><i class="fa fa-user-o fa-fw"></i>{:__('Profile')}</a></li>
|
||||
<li><a href="{:url('user/changepwd')}"><i class="fa fa-key fa-fw"></i>{:__('Change password')}</a></li>
|
||||
<li><a href="{:url('user/logout')}"><i class="fa fa-sign-out fa-fw"></i>{:__('Sign out')}</a></li>
|
||||
{else /}
|
||||
<li><a href="{:url('user/login')}"><i class="fa fa-sign-in fa-fw"></i> {:__('Sign in')}</a></li>
|
||||
<li><a href="{:url('user/register')}"><i class="fa fa-user-o fa-fw"></i> {:__('Sign up')}</a></li>
|
||||
{/if}
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main class="content">
|
||||
{__CONTENT__}
|
||||
</main>
|
||||
|
||||
<footer class="footer" style="clear:both">
|
||||
<p class="copyright">Copyright © {:date("Y")} {$site.name|htmlentities} All Rights Reserved <a href="https://beian.miit.gov.cn" target="_blank">{$site.beian|htmlentities}</a></p>
|
||||
</footer>
|
||||
|
||||
{include file="common/script" /}
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
61
application/index/view/user/attachment.html
Normal file
61
application/index/view/user/attachment.html
Normal file
@@ -0,0 +1,61 @@
|
||||
<link rel="stylesheet" href="__CDN__/assets/libs/bootstrap-table/dist/bootstrap-table.min.css">
|
||||
{if $Think.get.dialog}
|
||||
<style>
|
||||
body {
|
||||
padding-top: 0;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
nav.navbar-fixed-top, footer.footer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
main.content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.fixed-table-container {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.panel-heading .nav-tabs {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.panel-heading .nav-tabs li {
|
||||
font-size: 14px;
|
||||
}
|
||||
</style>
|
||||
{/if}
|
||||
<div class="panel panel-default panel-intro" style="padding:0;">
|
||||
{if !$Think.get.mimetype||$Think.get.mimetype=='*'}
|
||||
<div class="panel-heading">
|
||||
<ul class="nav nav-tabs" data-field="mimetype">
|
||||
<li class="active"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
|
||||
{foreach name="mimetypeList" item="vo"}
|
||||
<li><a href="#t-{$key}" data-value="{$key}" data-toggle="tab">{$vo}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="panel-body">
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
<div id="toolbar" class="toolbar">
|
||||
<a href="javascript:;" class="btn btn-primary btn-refresh" title="刷新"><i class="fa fa-refresh"></i> </a>
|
||||
<span><button type="button" id="faupload-image" class="btn btn-success faupload" data-mimetype="{$mimetype|default=''|htmlentities}" data-multiple="true"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||
{if request()->get('multiple') == 'true'}
|
||||
<a class="btn btn-danger btn-choose-multi"><i class="fa fa-check"></i> {:__('Choose')}</a>
|
||||
{/if}
|
||||
</div>
|
||||
<table id="table" class="table table-bordered table-hover" width="100%">
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
43
application/index/view/user/changepwd.html
Normal file
43
application/index/view/user/changepwd.html
Normal file
@@ -0,0 +1,43 @@
|
||||
<div id="content-container" class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
{include file="common/sidenav" /}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<h2 class="page-header">{:__('Change password')}</h2>
|
||||
<form id="changepwd-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||
{:token()}
|
||||
<div class="form-group">
|
||||
<label for="oldpassword" class="control-label col-xs-12 col-sm-2">{:__('Old password')}:</label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<input type="password" class="form-control" id="oldpassword" name="oldpassword" value="" data-rule="required;password" placeholder="{:__('Old password')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="newpassword" class="control-label col-xs-12 col-sm-2">{:__('New password')}:</label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<input type="password" class="form-control" id="newpassword" name="newpassword" value="" data-rule="required;password" placeholder="{:__('New password')}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="renewpassword" class="control-label col-xs-12 col-sm-2">{:__('Renew password')}:</label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<input type="password" class="form-control" id="renewpassword" name="renewpassword" value="" data-rule="required;password" placeholder="{:__('Renew password')}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group normal-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('Submit')}</button>
|
||||
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
69
application/index/view/user/index.html
Normal file
69
application/index/view/user/index.html
Normal file
@@ -0,0 +1,69 @@
|
||||
<style>
|
||||
.basicinfo {
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.basicinfo .row > .col-xs-4 {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.basicinfo .row > div {
|
||||
margin: 5px 0;
|
||||
}
|
||||
</style>
|
||||
<div id="content-container" class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
{include file="common/sidenav" /}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<h2 class="page-header">
|
||||
{:__('Member center')}
|
||||
<a href="{:url('user/profile')}" class="btn btn-primary pull-right"><i class="fa fa-pencil"></i> {:__('Profile')}</a>
|
||||
</h2>
|
||||
<div class="row user-baseinfo">
|
||||
<div class="col-md-3 col-sm-3 col-xs-3 text-center user-center">
|
||||
<a href="{:url('user/profile')}" title="{:__('Click to edit')}">
|
||||
<span class="avatar-img"><img src="{$user.avatar|htmlentities|cdnurl}" alt=""></span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-9 col-sm-9 col-xs-9">
|
||||
<div class="ui-content">
|
||||
<h4><a href="{:url('user/profile')}">{$user.nickname|htmlentities}</a></h4>
|
||||
<p class="text-muted">
|
||||
{$user.bio|default=__("This guy hasn't written anything yet")|htmlentities}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-9 col-sm-9 col-xs-12">
|
||||
<div class="ui-content">
|
||||
<div class="basicinfo">
|
||||
<div class="row">
|
||||
<div class="col-xs-4 col-md-2">{:__('Money')}</div>
|
||||
<div class="col-xs-8 col-md-4">
|
||||
<a href="javascript:;" class="viewmoney">{$user.money}</a>
|
||||
</div>
|
||||
<div class="col-xs-4 col-md-2">{:__('Score')}</div>
|
||||
<div class="col-xs-8 col-md-4">
|
||||
<a href="javascript:;" class="viewscore">{$user.score}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-4 col-md-2">{:__('Logintime')}</div>
|
||||
<div class="col-xs-8 col-md-4">{$user.logintime|date="Y-m-d H:i:s",###}</div>
|
||||
<div class="col-xs-4 col-md-2">{:__('Prevtime')}</div>
|
||||
<div class="col-xs-8 col-md-4">{$user.prevtime|date="Y-m-d H:i:s",###}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
94
application/index/view/user/login.html
Normal file
94
application/index/view/user/login.html
Normal file
@@ -0,0 +1,94 @@
|
||||
<div id="content-container" class="container">
|
||||
<div class="user-section login-section">
|
||||
<div class="logon-tab clearfix"><a class="active">{:__('Sign in')}</a> <a href="{:url('user/register')}?url={$url|urlencode|htmlentities}">{:__('Sign up')}</a></div>
|
||||
<div class="login-main">
|
||||
<form name="form" id="login-form" class="form-vertical" method="POST" action="">
|
||||
<!--@IndexLoginFormBegin-->
|
||||
<input type="hidden" name="url" value="{$url|htmlentities}"/>
|
||||
{:token()}
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="account">{:__('Account')}</label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="account" type="text" name="account" value="" data-rule="required" placeholder="{:__('Email/Mobile/Username')}" autocomplete="off">
|
||||
<div class="help-block"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="password">{:__('Password')}</label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="password" type="password" name="password" data-rule="required;password" placeholder="{:__('Password')}" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="controls">
|
||||
<div class="checkbox inline">
|
||||
<label>
|
||||
<input type="checkbox" name="keeplogin" checked="checked" value="1"> {:__('Keep login')}
|
||||
</label>
|
||||
</div>
|
||||
<div class="pull-right"><a href="javascript:;" class="btn-forgot">{:__('Forgot password')}</a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-lg btn-block">{:__('Sign in')}</button>
|
||||
<a href="{:url('user/register')}?url={$url|urlencode|htmlentities}" class="btn btn-default btn-lg btn-block mt-3 no-border">{:__("Don't have an account? Sign up")}</a>
|
||||
</div>
|
||||
<!--@IndexLoginFormEnd-->
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/html" id="resetpwdtpl">
|
||||
<form id="resetpwd-form" class="form-horizontal form-layer" method="POST" action="{:url('api/user/resetpwd')}">
|
||||
<div class="form-body">
|
||||
<input type="hidden" name="action" value="resetpwd"/>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-3">{:__('Type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="radio">
|
||||
<label for="type-email"><input id="type-email" checked="checked" name="type" data-send-url="{:url('api/ems/send')}" data-check-url="{:url('api/validate/check_ems_correct')}" type="radio" value="email"> {:__('Reset password by email')}</label>
|
||||
<label for="type-mobile"><input id="type-mobile" name="type" type="radio" data-send-url="{:url('api/sms/send')}" data-check-url="{:url('api/validate/check_sms_correct')}" value="mobile"> {:__('Reset password by mobile')}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" data-type="email">
|
||||
<label for="email" class="control-label col-xs-12 col-sm-3">{:__('Email')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input type="text" class="form-control" id="email" name="email" value="" data-rule="required(#type-email:checked);email;remote({:url('api/validate/check_email_exist')}, event=resetpwd, id=0)" placeholder="">
|
||||
<span class="msg-box"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group hide" data-type="mobile">
|
||||
<label for="mobile" class="control-label col-xs-12 col-sm-3">{:__('Mobile')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input type="text" class="form-control" id="mobile" name="mobile" value="" data-rule="required(#type-mobile:checked);mobile;remote({:url('api/validate/check_mobile_exist')}, event=resetpwd, id=0)" placeholder="">
|
||||
<span class="msg-box"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="captcha" class="control-label col-xs-12 col-sm-3">{:__('Captcha')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="input-group">
|
||||
<input type="text" name="captcha" class="form-control" data-rule="required;length({$Think.config.captcha.length});digits;remote({:url('api/validate/check_ems_correct')}, event=resetpwd, email:#email)"/>
|
||||
<span class="input-group-btn" style="padding:0;border:none;">
|
||||
<a href="javascript:;" class="btn btn-primary btn-captcha" data-url="{:url('api/ems/send')}" data-type="email" data-event="resetpwd">{:__('Send verification code')}</a>
|
||||
</span>
|
||||
</div>
|
||||
<span class="msg-box"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="newpassword" class="control-label col-xs-12 col-sm-3">{:__('New password')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input type="password" class="form-control" id="newpassword" name="newpassword" value="" data-rule="required;password" placeholder="">
|
||||
<span class="msg-box"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-footer">
|
||||
<div class="col-xs-12 col-sm-8 col-sm-offset-3">
|
||||
<button type="submit" class="btn btn-md btn-primary">{:__('Ok')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</script>
|
||||
200
application/index/view/user/profile.html
Normal file
200
application/index/view/user/profile.html
Normal file
@@ -0,0 +1,200 @@
|
||||
<style>
|
||||
.profile-avatar-container {
|
||||
position:relative;
|
||||
width:100px;
|
||||
}
|
||||
.profile-avatar-container .profile-user-img{
|
||||
width:100px;
|
||||
height:100px;
|
||||
}
|
||||
.profile-avatar-container .profile-avatar-text {
|
||||
display:none;
|
||||
}
|
||||
.profile-avatar-container:hover .profile-avatar-text {
|
||||
display:block;
|
||||
position:absolute;
|
||||
height:100px;
|
||||
width:100px;
|
||||
background:#444;
|
||||
opacity: .6;
|
||||
color: #fff;
|
||||
top:0;
|
||||
left:0;
|
||||
line-height: 100px;
|
||||
text-align: center;
|
||||
}
|
||||
.profile-avatar-container button{
|
||||
position:absolute;
|
||||
top:0;left:0;width:100px;height:100px;opacity: 0;
|
||||
}
|
||||
</style>
|
||||
<div id="content-container" class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
{include file="common/sidenav" /}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<h2 class="page-header">{:__('Profile')}</h2>
|
||||
<form id="profile-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('api/user/profile')}">
|
||||
{:token()}
|
||||
<input type="hidden" name="avatar" id="c-avatar" value="{:$user->getData('avatar')}" />
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<div class="profile-avatar-container">
|
||||
<img class="profile-user-img img-responsive img-circle" src="{$user.avatar|htmlentities|cdnurl}" alt="">
|
||||
<div class="profile-avatar-text img-circle">{:__('Click to edit')}</div>
|
||||
<button type="button" id="faupload-avatar" class="faupload" data-mimetype="png,jpg,jpeg,gif" data-input-id="c-avatar"><i class="fa fa-upload"></i> {:__('Upload')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Username')}:</label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<input type="text" class="form-control" id="username" name="username" value="{$user.username|htmlentities}" data-rule="required;username;remote({:url('api/validate/check_username_available')}, id={$user.id})" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Nickname')}:</label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<input type="text" class="form-control" id="nickname" name="nickname" value="{$user.nickname|htmlentities}" data-rule="required;remote({:url('api/validate/check_nickname_available')}, id={$user.id})" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-bio" class="control-label col-xs-12 col-sm-2">{:__('Intro')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-bio" data-rule="" data-tip="一句话介绍一下你自己" class="form-control" name="bio" type="text" value="{$user.bio|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-email" class="control-label col-xs-12 col-sm-2">{:__('Email')}:</label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="c-email" name="email" value="{$user.email|htmlentities}" disabled placeholder="">
|
||||
<span class="input-group-btn" style="padding:0;border:none;">
|
||||
<a href="javascript:;" class="btn btn-info btn-change" data-type="email">{:__('Change')}</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-mobile" class="control-label col-xs-12 col-sm-2">{:__('Mobile')}:</label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="c-mobile" name="mobile" value="{$user.mobile|htmlentities}" disabled placeholder="">
|
||||
<span class="input-group-btn" style="padding:0;border:none;">
|
||||
<a href="javascript:;" class="btn btn-info btn-change" data-type="mobile">{:__('Change')}</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group normal-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('Ok')}</button>
|
||||
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="emailtpl">
|
||||
<form id="email-form" class="form-horizontal form-layer" method="POST" action="{:url('api/user/changeemail')}">
|
||||
<div class="form-body">
|
||||
<input type="hidden" name="action" value="changeemail" />
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-3">{:__('New Email')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input type="text" class="form-control" id="email" name="email" value="" data-rule="required;email;remote({:url('api/validate/check_email_available')}, event=changeemail, id={$user.id})" placeholder="{:__('New email')}">
|
||||
<span class="msg-box"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-3">{:__('Captcha')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="input-group">
|
||||
<input type="text" name="captcha" id="email-captcha" class="form-control" data-rule="required;length({$Think.config.captcha.length});digits;remote({:url('api/validate/check_ems_correct')}, event=changeemail, email:#email)" />
|
||||
<span class="input-group-btn" style="padding:0;border:none;">
|
||||
<a href="javascript:;" class="btn btn-info btn-captcha" data-url="{:url('api/ems/send')}" data-type="email" data-event="changeemail">获取验证码</a>
|
||||
</span>
|
||||
</div>
|
||||
<span class="msg-box"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-footer">
|
||||
<div class="form-group" style="margin-bottom:0;">
|
||||
<div class="col-xs-12 col-sm-8 col-sm-offset-3">
|
||||
<button type="submit" class="btn btn-md btn-primary">{:__('Submit')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</script>
|
||||
<script type="text/html" id="mobiletpl">
|
||||
<form id="mobile-form" class="form-horizontal form-layer" method="POST" action="{:url('api/user/changemobile')}">
|
||||
<div class="form-body">
|
||||
<input type="hidden" name="action" value="changemobile" />
|
||||
<div class="form-group">
|
||||
<label for="c-mobile" class="control-label col-xs-12 col-sm-3">{:__('New mobile')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input type="text" class="form-control" id="mobile" name="mobile" value="" data-rule="required;mobile;remote({:url('api/validate/check_mobile_available')}, event=changemobile, id={$user.id})" placeholder="{:__('New mobile')}">
|
||||
<span class="msg-box"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mobile-captcha" class="control-label col-xs-12 col-sm-3">{:__('Captcha')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="input-group">
|
||||
<input type="text" name="captcha" id="mobile-captcha" class="form-control" data-rule="required;length({$Think.config.captcha.length});digits;remote({:url('api/validate/check_sms_correct')}, event=changemobile, mobile:#mobile)" />
|
||||
<span class="input-group-btn" style="padding:0;border:none;">
|
||||
<a href="javascript:;" class="btn btn-info btn-captcha" data-url="{:url('api/sms/send')}" data-type="mobile" data-event="changemobile">获取验证码</a>
|
||||
</span>
|
||||
</div>
|
||||
<span class="msg-box"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-footer">
|
||||
<div class="form-group" style="margin-bottom:0;">
|
||||
<div class="col-xs-12 col-sm-8 col-sm-offset-3">
|
||||
<button type="submit" class="btn btn-md btn-primary">{:__('Submit')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</script>
|
||||
<style>
|
||||
.form-layer {height:100%;min-height:150px;min-width:300px;}
|
||||
.form-body {
|
||||
width:100%;
|
||||
overflow:auto;
|
||||
top:0;
|
||||
position:absolute;
|
||||
z-index:10;
|
||||
bottom:50px;
|
||||
padding:15px;
|
||||
}
|
||||
.form-layer .form-footer {
|
||||
height:50px;
|
||||
line-height:50px;
|
||||
background-color: #ecf0f1;
|
||||
width:100%;
|
||||
position:absolute;
|
||||
z-index:200;
|
||||
bottom:0;
|
||||
margin:0;
|
||||
}
|
||||
.form-footer .form-group{
|
||||
margin-left:0;
|
||||
margin-right:0;
|
||||
}
|
||||
</style>
|
||||
61
application/index/view/user/register.html
Normal file
61
application/index/view/user/register.html
Normal file
@@ -0,0 +1,61 @@
|
||||
<div id="content-container" class="container">
|
||||
<div class="user-section login-section">
|
||||
<div class="logon-tab clearfix"><a href="{:url('user/login')}?url={$url|urlencode|htmlentities}">{:__('Sign in')}</a> <a class="active">{:__('Sign up')}</a></div>
|
||||
<div class="login-main">
|
||||
<form name="form1" id="register-form" class="form-vertical" method="POST" action="">
|
||||
<!--@IndexRegisterFormBegin-->
|
||||
<input type="hidden" name="invite_user_id" value="0"/>
|
||||
<input type="hidden" name="url" value="{$url|htmlentities}"/>
|
||||
{:token()}
|
||||
<div class="form-group">
|
||||
<label class="control-label required">{:__('Email')}<span class="text-success"></span></label>
|
||||
<div class="controls">
|
||||
<input type="text" name="email" id="email" data-rule="required;email" class="form-control" placeholder="{:__('Email')}">
|
||||
<p class="help-block"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">{:__('Username')}</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="username" name="username" data-rule="required;username" class="form-control" placeholder="{:__('Username must be 3 to 30 characters')}">
|
||||
<p class="help-block"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">{:__('Password')}</label>
|
||||
<div class="controls">
|
||||
<input type="password" id="password" name="password" data-rule="required;password" class="form-control" placeholder="{:__('Password must be 6 to 30 characters')}">
|
||||
<p class="help-block"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">{:__('Mobile')}</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="mobile" name="mobile" data-rule="required;mobile" class="form-control" placeholder="{:__('Mobile')}">
|
||||
<p class="help-block"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--@CaptchaBegin-->
|
||||
{if $captchaType}
|
||||
<div class="form-group">
|
||||
<label class="control-label">{:__('Captcha')}</label>
|
||||
<div class="controls">
|
||||
<div class="input-group">
|
||||
{include file="common/captcha" event="register" type="$captchaType" /}
|
||||
</div>
|
||||
<p class="help-block"></p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<!--@CaptchaEnd-->
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-lg btn-block">{:__('Sign up')}</button>
|
||||
<a href="{:url('user/login')}?url={$url|urlencode|htmlentities}" class="btn btn-default btn-lg btn-block mt-3 no-border">{:__('Already have an account? Sign in')}</a>
|
||||
</div>
|
||||
<!--@IndexRegisterFormEnd-->
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user