语言包和Msg提示消息优化
This commit is contained in:
parent
58f0f27af8
commit
aa1aa01b5d
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | 状态提示
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
namespace app\common\controller;
|
namespace app\common\controller;
|
||||||
|
|
||||||
use think\facade\Cookie;
|
use think\facade\Cookie;
|
||||||
|
@ -1,58 +1,104 @@
|
|||||||
<?php
|
<?php
|
||||||
// +----------------------------------------------------------------------
|
declare (strict_types = 1);
|
||||||
// | 状态提示
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
namespace app\common\lib;
|
namespace app\common\lib;
|
||||||
|
|
||||||
use think\facade\Lang;
|
use think\facade\Lang;
|
||||||
|
|
||||||
class Msg
|
class Msg
|
||||||
{
|
{
|
||||||
public static function getCode($strCode){
|
static protected $res = [];
|
||||||
//状态配置
|
|
||||||
$res = [
|
/**
|
||||||
'success' => 1,
|
* 设置状态吗
|
||||||
'error' => 0,
|
* @return array
|
||||||
|
*/
|
||||||
];
|
public static function setCodes()
|
||||||
|
{
|
||||||
foreach($res as $k => $v){
|
return $res = [
|
||||||
|
'success' => 0,
|
||||||
|
'error' => 1,
|
||||||
|
'add_success' => Lang::get('add success'),
|
||||||
|
'add_error' => Lang::get('add error'),
|
||||||
|
'edit_success' => Lang::get('edit success'),
|
||||||
|
'edit_error' => Lang::get('edit error'),
|
||||||
|
'delete_success' => Lang::get('delete success'),
|
||||||
|
'delete_error' => Lang::get('delete error'),
|
||||||
|
'upload_success' => Lang::get('upload success'),
|
||||||
|
'upload_error' => Lang::get('upload error'),
|
||||||
|
'upgrade_success' => Lang::get('upgrade success'),
|
||||||
|
'upgrade_error' => Lang::get('upgrade error'),
|
||||||
|
'illegal_request' => Lang::get('illegal request'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取返回码
|
||||||
|
* @param string $strCode
|
||||||
|
* @return mixed string
|
||||||
|
*/
|
||||||
|
public static function getCode(string $strCode){
|
||||||
|
foreach(self::setCodes() as $k => $v){
|
||||||
if($k == $strCode){
|
if($k == $strCode){
|
||||||
return $res = $v;
|
return $v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//return $res;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getMsg($strMsg){
|
/**
|
||||||
//状态配置
|
* 获取返回信息 如果不存在返回自身
|
||||||
$res = [
|
* @param string $strMsg
|
||||||
'add_success' => Lang::get('add success'),
|
* @return mixed string
|
||||||
'add_error' => Lang::get('add error'),
|
*/
|
||||||
'edit_success' => Lang::get('edit success'),
|
public static function getMsg(string $strMsg){
|
||||||
'edit_error' => Lang::get('edit error'),
|
foreach(self::setCodes() as $k => $v){
|
||||||
'illegal_request' => Lang::get('illegal request'),
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
foreach($res as $k => $v){
|
|
||||||
if($k == $strMsg){
|
if($k == $strMsg){
|
||||||
return $res = $v;
|
return $v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//$res;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function show($strCode,$strMsg,$url)
|
/**
|
||||||
{
|
* 成功提示
|
||||||
$res = [
|
* @param string $strMsg
|
||||||
'code' => self::getCode($strCode),
|
* @param string|null $url
|
||||||
'msg' => self::getMsg($strMsg),
|
* @param string $data
|
||||||
'url' => $url,
|
* @return string|\think\response\Json
|
||||||
];
|
*/
|
||||||
|
public static function success(string $strMsg,string $url = null, $data = ''){
|
||||||
return json($res);
|
if(empty($strMsg)){
|
||||||
|
return '不能返回为空消息';
|
||||||
|
}
|
||||||
|
$result = [
|
||||||
|
'code' => self::getCode('success'),
|
||||||
|
'msg' => self::getMsg($strMsg),
|
||||||
|
'url' => $url,
|
||||||
|
'data' => $data
|
||||||
|
];
|
||||||
|
return json($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 失败提示
|
||||||
|
* @param string $strMsg 消息提示码
|
||||||
|
* @param string|null $url 跳转地址
|
||||||
|
* @param string $data 返回数据
|
||||||
|
* @return string|\think\response\Json
|
||||||
|
*/
|
||||||
|
public static function error(string $strMsg,string $url = null, $data = ''){
|
||||||
|
if(empty($strMsg)){
|
||||||
|
return '不能返回为空消息';
|
||||||
|
}
|
||||||
|
$result = [
|
||||||
|
'code' => self::getCode('error'),
|
||||||
|
'msg' => self::getMsg($strMsg),
|
||||||
|
'url' => $url,
|
||||||
|
'data' => $data
|
||||||
|
];
|
||||||
|
|
||||||
|
return json($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ class Article extends Model
|
|||||||
if($result) {
|
if($result) {
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
return '文章添加失败!';
|
return 'add_error';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ class Article extends Model
|
|||||||
if($result) {
|
if($result) {
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
return '文章修改失败!';
|
return 'edit_error';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,9 +11,6 @@ use app\common\model\Comment;
|
|||||||
use app\common\model\Article as ArticleModel;
|
use app\common\model\Article as ArticleModel;
|
||||||
use think\exception\ValidateException;
|
use think\exception\ValidateException;
|
||||||
use taoler\com\Message;
|
use taoler\com\Message;
|
||||||
use app\common\model\Cate;
|
|
||||||
use app\common\model\User;
|
|
||||||
use app\common\model\Collection;
|
|
||||||
use think\facade\Lang;
|
use think\facade\Lang;
|
||||||
use app\common\lib\Msg;
|
use app\common\lib\Msg;
|
||||||
|
|
||||||
@ -236,108 +233,68 @@ class Article extends BaseController
|
|||||||
return json($res);
|
return json($res);
|
||||||
}
|
}
|
||||||
|
|
||||||
//添加文章
|
/**
|
||||||
|
* 添加帖子文章
|
||||||
|
* @return string|\think\Response|\think\response\Json|void
|
||||||
|
*/
|
||||||
public function add()
|
public function add()
|
||||||
{
|
{
|
||||||
if(Request::isAjax()){
|
if (Request::isAjax()) {
|
||||||
$data = Request::only(['cate_id','title','title_color','user_id','content','upzip','tags','captcha']);
|
$data = Request::only(['cate_id', 'title', 'title_color', 'user_id', 'content', 'upzip', 'tags', 'captcha']);
|
||||||
$validate = new \app\common\validate\Article; //调用验证器
|
$validate = new \app\common\validate\Article; //调用验证器
|
||||||
$result = $validate->scene('Artadd')->check($data); //进行数据验证
|
$result = $validate->scene('Artadd')->check($data); //进行数据验证
|
||||||
if(true !==$result){
|
if (true !== $result) {
|
||||||
return $this->error($validate->getError());
|
return Msg::error($validate->getError());
|
||||||
} else {
|
}
|
||||||
$article = new \app\common\model\Article;
|
$result = ArticleModel::add($data);
|
||||||
$result = $article->add($data);
|
if ($result == 1) {
|
||||||
if($result == 1) {
|
$aid = Db::name('article')->max('id');
|
||||||
$aid = Db::name('article')->max('id');
|
$link = (string)url('article/detail', ['id' => $aid]);
|
||||||
$link = (string) url('article/detail',['id'=> $aid]);
|
//清除文章tag缓存
|
||||||
//清除文章tag缓存
|
Cache::tag('tagArtDetail')->clear();
|
||||||
Cache::tag('tagArtDetail')->clear();
|
$res = Msg::success('add_success', $link);
|
||||||
|
} else {
|
||||||
//return json(['code'=>1,'msg'=>'发布成功','url'=> $link]);
|
$res = Msg::error('add_error');
|
||||||
return json(['code'=>Msg::getCode('success'),'msg'=>Msg::getMsg('add_success'),'url'=> $link]);
|
}
|
||||||
} else {
|
return $res;
|
||||||
$this->error($result);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return View::fetch();
|
|
||||||
}
|
|
||||||
|
|
||||||
//上传附件
|
|
||||||
public function upzip()
|
|
||||||
{
|
|
||||||
$file = request()->file('file');
|
|
||||||
try {
|
|
||||||
validate(['file'=>'fileSize:1024000|fileExt:jpg,zip'])
|
|
||||||
->check(['file'=>$file]);
|
|
||||||
$savename = \think\facade\Filesystem::disk('public')->putFile('article_zip',$file);
|
|
||||||
} catch (ValidateException $e) {
|
|
||||||
return json(['status'=>-1,'msg'=>$e->getMessage()]);
|
|
||||||
}
|
|
||||||
$upload = Config::get('filesystem.disks.public.url');
|
|
||||||
|
|
||||||
if($savename){
|
|
||||||
$name_path =str_replace('\\',"/",$upload.'/'.$savename);
|
|
||||||
$res = ['status'=>0,'msg'=>'上传成功','url'=> $name_path];
|
|
||||||
}else{
|
|
||||||
$res = ['status'=>-1,'msg'=>'上传错误'];
|
|
||||||
}
|
}
|
||||||
return json($res);
|
return View::fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
//附件下载
|
|
||||||
public function download($id)
|
|
||||||
{
|
|
||||||
$zipdir = Db::name('article')->where('id',$id)->value('upzip');
|
|
||||||
$zip = substr($zipdir,1);
|
|
||||||
return download($zip,'my');
|
|
||||||
}
|
|
||||||
|
|
||||||
//添加tag
|
|
||||||
public function tags()
|
|
||||||
{
|
|
||||||
$data = Request::only(['tags']);
|
|
||||||
$att = explode(',',$data['tags']);
|
|
||||||
$tags = [];
|
|
||||||
foreach($att as $v){
|
|
||||||
if ($v !='') {
|
|
||||||
$tags[] = $v;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return json(['code'=>0,'data'=>$tags]);
|
|
||||||
}
|
|
||||||
|
|
||||||
//编辑文章
|
/**
|
||||||
|
* 编辑文章
|
||||||
|
* @param $id
|
||||||
|
* @return string|\think\Response|\think\response\Json|void
|
||||||
|
* @throws \think\db\exception\DataNotFoundException
|
||||||
|
* @throws \think\db\exception\DbException
|
||||||
|
* @throws \think\db\exception\ModelNotFoundException
|
||||||
|
*/
|
||||||
public function edit($id)
|
public function edit($id)
|
||||||
{
|
{
|
||||||
$article = Db::name('article')->find($id);
|
$article = ArticleModel::find($id);
|
||||||
|
//编辑
|
||||||
if(Request::isAjax()){
|
if(Request::isAjax()){
|
||||||
$data = Request::only(['id','cate_id','title','title_color','user_id','content','upzip','tags','captcha']);
|
$data = Request::only(['id','cate_id','title','title_color','user_id','content','upzip','tags','captcha']);
|
||||||
$validate = new \app\common\validate\Article(); //调用验证器
|
$validate = new \app\common\validate\Article(); //调用验证器
|
||||||
$res = $validate->scene('Artadd')->check($data); //进行数据验证
|
$res = $validate->scene('Artadd')->check($data); //进行数据验证
|
||||||
|
|
||||||
if(true !==$res){
|
if(true !==$res){
|
||||||
return $this->error($validate->getError());
|
return Msg::error($validate->getError());
|
||||||
} else {
|
} else {
|
||||||
$article = new \app\common\model\Article;
|
|
||||||
$result = $article->edit($data);
|
$result = $article->edit($data);
|
||||||
if($result == 1) {
|
if($result == 1) {
|
||||||
//删除缓存显示编辑后内容
|
//删除原有缓存显示编辑后内容
|
||||||
Cache::delete('article_'.$id);
|
Cache::delete('article_'.$id);
|
||||||
$link = (string) url('article/detail',['id'=> $id]);
|
$link = (string) url('article/detail',['id'=> $id]);
|
||||||
//return json(['code'=>0,'msg'=>'修改成功','url'=> $link]);
|
$editRes = Msg::success('edit_success',$link);
|
||||||
return Msg::show('error','edit_success',$link);
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$this->error($result);
|
$editRes = Msg::error($result);
|
||||||
}
|
}
|
||||||
|
return $editRes;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//查询标签
|
||||||
$tag = Db::name('article')->where('id',$id)->value('tags');
|
$tag = $article->tags;
|
||||||
$attr = explode(',',$tag);
|
$attr = explode(',',$tag);
|
||||||
$tags = [];
|
$tags = [];
|
||||||
foreach($attr as $key=>$v){
|
foreach($attr as $key=>$v){
|
||||||
@ -390,6 +347,49 @@ class Article extends BaseController
|
|||||||
return json($res);
|
return json($res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//上传附件
|
||||||
|
public function upzip()
|
||||||
|
{
|
||||||
|
$file = request()->file('file');
|
||||||
|
try {
|
||||||
|
validate(['file'=>'fileSize:1024000|fileExt:jpg,zip'])
|
||||||
|
->check(['file'=>$file]);
|
||||||
|
$savename = \think\facade\Filesystem::disk('public')->putFile('article_zip',$file);
|
||||||
|
} catch (ValidateException $e) {
|
||||||
|
return json(['status'=>-1,'msg'=>$e->getMessage()]);
|
||||||
|
}
|
||||||
|
$upload = Config::get('filesystem.disks.public.url');
|
||||||
|
|
||||||
|
if($savename){
|
||||||
|
$name_path =str_replace('\\',"/",$upload.'/'.$savename);
|
||||||
|
$res = ['status'=>0,'msg'=>'上传成功','url'=> $name_path];
|
||||||
|
}else{
|
||||||
|
$res = ['status'=>-1,'msg'=>'上传错误'];
|
||||||
|
}
|
||||||
|
return json($res);
|
||||||
|
}
|
||||||
|
|
||||||
|
//附件下载
|
||||||
|
public function download($id)
|
||||||
|
{
|
||||||
|
$zipdir = Db::name('article')->where('id',$id)->value('upzip');
|
||||||
|
$zip = substr($zipdir,1);
|
||||||
|
return download($zip,'my');
|
||||||
|
}
|
||||||
|
|
||||||
|
//添加tag
|
||||||
|
public function tags()
|
||||||
|
{
|
||||||
|
$data = Request::only(['tags']);
|
||||||
|
$att = explode(',',$data['tags']);
|
||||||
|
$tags = [];
|
||||||
|
foreach($att as $v){
|
||||||
|
if ($v !='') {
|
||||||
|
$tags[] = $v;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return json(['code'=>0,'data'=>$tags]);
|
||||||
|
}
|
||||||
|
|
||||||
//文章置顶,状态
|
//文章置顶,状态
|
||||||
public function jieset(){
|
public function jieset(){
|
||||||
|
@ -171,9 +171,10 @@ class Index extends BaseController
|
|||||||
$lang = $language->select(input('language'));
|
$lang = $language->select(input('language'));
|
||||||
if($lang){
|
if($lang){
|
||||||
return json(['code'=>0,'msg'=>'']);
|
return json(['code'=>0,'msg'=>'']);
|
||||||
|
//return Msg::success('')
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
return json(['code'=>Msg::get('error'),'msg'=>Msg::getMsg('illegal_request')]);
|
return Msg::error('illegal_request');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ class Login extends BaseController
|
|||||||
$url = '/';
|
$url = '/';
|
||||||
}
|
}
|
||||||
Cookie::set('url',$url);
|
Cookie::set('url',$url);
|
||||||
|
|
||||||
if(Request::isAjax()) {
|
if(Request::isAjax()) {
|
||||||
$data = Request::param();
|
$data = Request::param();
|
||||||
|
|
||||||
|
119
app/index/controller/Msg.php
Normal file
119
app/index/controller/Msg.php
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
<?php
|
||||||
|
declare (strict_types = 1);
|
||||||
|
|
||||||
|
namespace app\index\controller;
|
||||||
|
|
||||||
|
use think\facade\Lang;
|
||||||
|
|
||||||
|
class Msg
|
||||||
|
{
|
||||||
|
static protected $res = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置状态吗
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public static function setCodes()
|
||||||
|
{
|
||||||
|
return $res = [
|
||||||
|
'success' => 0,
|
||||||
|
'error' => 1,
|
||||||
|
'add_success' => Lang::get('add success'),
|
||||||
|
'add_error' => Lang::get('add error'),
|
||||||
|
'edit_success' => Lang::get('编辑成功1'),
|
||||||
|
'edit_error' => Lang::get('edit error'),
|
||||||
|
'delete_success' => Lang::get('delete success'),
|
||||||
|
'delete_error' => Lang::get('delete error'),
|
||||||
|
'uploade_success' => Lang::get('uploade success'),
|
||||||
|
'uploade_error' => Lang::get('uploade error'),
|
||||||
|
'upgrade_success' => Lang::get('upgrade success'),
|
||||||
|
'upgrade_error' => Lang::get('upgrade error'),
|
||||||
|
'illegal_request' => Lang::get('illegal request'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取返回码
|
||||||
|
* @param string $strCode
|
||||||
|
* @return mixed string
|
||||||
|
*/
|
||||||
|
public static function getCode(string $strCode){
|
||||||
|
foreach(self::setCodes() as $k => $v){
|
||||||
|
if($k == $strCode){
|
||||||
|
return $v;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取返回信息 如果不存在返回自身
|
||||||
|
* @param string $strMsg
|
||||||
|
* @return mixed string
|
||||||
|
*/
|
||||||
|
public static function getMsg(string $strMsg){
|
||||||
|
$res = [
|
||||||
|
'success' => 0,
|
||||||
|
'error' => 1,
|
||||||
|
'add_success' => Lang::get('add success'),
|
||||||
|
'add_error' => Lang::get('add error'),
|
||||||
|
'edit_success' => Lang::get('edit success'),
|
||||||
|
'edit_error' => Lang::get('edit error'),
|
||||||
|
'delete_success' => Lang::get('delete success'),
|
||||||
|
'delete_error' => Lang::get('delete error'),
|
||||||
|
'uploade_success' => Lang::get('uploade success'),
|
||||||
|
'uploade_error' => Lang::get('uploade error'),
|
||||||
|
'upgrade_success' => Lang::get('upgrade success'),
|
||||||
|
'upgrade_error' => Lang::get('upgrade error'),
|
||||||
|
'illegal_request' => Lang::get('illegal request'),
|
||||||
|
];
|
||||||
|
foreach($res as $k => $v){
|
||||||
|
if($k == $strMsg){
|
||||||
|
return $v;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成功提示
|
||||||
|
* @param string $strMsg
|
||||||
|
* @param string|null $url
|
||||||
|
* @param string $data
|
||||||
|
* @return string|\think\response\Json
|
||||||
|
*/
|
||||||
|
public static function success(string $strMsg,string $url = null, $data = ''){
|
||||||
|
if(empty($strMsg)){
|
||||||
|
return '不能返回为空消息';
|
||||||
|
}
|
||||||
|
$result = [
|
||||||
|
'code' => self::getCode('success'),
|
||||||
|
'msg' => self::getMsg($strMsg),
|
||||||
|
'url' => $url,
|
||||||
|
'data' => $data
|
||||||
|
];
|
||||||
|
return json($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 失败提示
|
||||||
|
* @param string $strMsg 消息提示码
|
||||||
|
* @param string|null $url 跳转地址
|
||||||
|
* @param string $data 返回数据
|
||||||
|
* @return string|\think\response\Json
|
||||||
|
*/
|
||||||
|
public static function error(string $strMsg,string $url = null, $data = ''){
|
||||||
|
if(empty($strMsg)){
|
||||||
|
return '不能返回为空消息';
|
||||||
|
}
|
||||||
|
$result = [
|
||||||
|
'code' => self::getCode('error'),
|
||||||
|
'msg' => self::getMsg($strMsg),
|
||||||
|
'url' => $url,
|
||||||
|
'data' => $data
|
||||||
|
];
|
||||||
|
|
||||||
|
return json($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -2,108 +2,121 @@
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
//语言
|
//语言
|
||||||
'language' => 'language',
|
'language' => 'language',
|
||||||
'chinese' => '中文简体',
|
'chinese' => '中文简体',
|
||||||
'english' => 'English',
|
'english' => 'English',
|
||||||
|
|
||||||
|
//message
|
||||||
|
'add' => 'add',
|
||||||
|
'delete' => 'delete',
|
||||||
|
'edit' => 'edit',
|
||||||
|
'uploads' => 'Upload',
|
||||||
|
'add success' => 'add success!',
|
||||||
|
'add error' => 'add error',
|
||||||
|
'edit success' => 'edit success',
|
||||||
|
'edit error' => 'edit error',
|
||||||
|
'delete success' => 'delete success',
|
||||||
|
'delete error' => 'delete error',
|
||||||
|
'upload success' => 'upload success',
|
||||||
|
'upload error' => 'upload error',
|
||||||
|
'upgrade success' => 'upgrade success',
|
||||||
|
'upgrade error' => 'upgrade error',
|
||||||
|
'illegal request' => 'illegal request',
|
||||||
|
|
||||||
//menu
|
//menu
|
||||||
'index' => 'Index',
|
'index' => 'Index',
|
||||||
'home page' => 'Home',
|
'home page' => 'Home',
|
||||||
'user center' => 'Center',
|
'user center' => 'Center',
|
||||||
'set info' => 'Set info',
|
'set info' => 'Set info',
|
||||||
'my message' => 'Message',
|
'my message' => 'Message',
|
||||||
'my page' => 'My page',
|
'my page' => 'My page',
|
||||||
|
|
||||||
'login' => 'Login',
|
'login' => 'Login',
|
||||||
'logout' => 'Logout',
|
'logout' => 'Logout',
|
||||||
'sign in' => 'Sign in',
|
'sign in' => 'Sign in',
|
||||||
'sign up' => 'Sign up',
|
'sign up' => 'Sign up',
|
||||||
'register' => 'Register',
|
'register' => 'Register',
|
||||||
'discuss' => 'Discuss',
|
'discuss' => 'Discuss',
|
||||||
'case' => 'Case',
|
'case' => 'Case',
|
||||||
'timeline' => 'Timeline',
|
'timeline' => 'Timeline',
|
||||||
|
|
||||||
//帖子
|
//article/post
|
||||||
'poster' => 'poster',
|
'poster' => 'poster',
|
||||||
'title color' => 'Title color',
|
'title' => 'Title',
|
||||||
'add_post' => 'Add post',
|
'title color' => 'Title color',
|
||||||
'collection' => 'collection',
|
'add post' => 'Add post',
|
||||||
'my collection' => 'My collection',
|
'edit post' => 'Edit post',
|
||||||
'cancel collection' => 'cancel collection',
|
'delete post' => 'Delete post',
|
||||||
'all' => 'All',
|
'post now' => 'Post now',
|
||||||
'finished' => 'Finished',
|
'collection' => 'collection',
|
||||||
'end' => 'End',
|
'my collection' => 'My collection',
|
||||||
'no finished' => 'no finished',
|
'cancel collection' => 'cancel collection',
|
||||||
'hot' => 'Hot',
|
'all' => 'All',
|
||||||
'top' => 'Top',
|
'finished' => 'Finished',
|
||||||
'cancel hoting' => 'Cancel hoting',
|
'end' => 'End',
|
||||||
'cancel topping' => 'Cancel topping',
|
'no finished' => 'no finished',
|
||||||
'go sign' => 'Go sign',
|
'hot' => 'Hot',
|
||||||
'more post' => 'more post',
|
'top' => 'Top',
|
||||||
'friendly link' => 'Friendly link',
|
'cancel hoting' => 'Cancel hoting',
|
||||||
'reviewers list' => 'Reviewers list',
|
'cancel topping' => 'Cancel topping',
|
||||||
'hot post list' => 'Hot post list',
|
'go sign' => 'Go sign',
|
||||||
'links list' => 'Links list',
|
'more post' => 'more post',
|
||||||
'statement' => 'Statement',
|
'friendly link' => 'Friendly link',
|
||||||
'trends' => 'Trends',
|
'reviewers list' => 'Reviewers list',
|
||||||
'sponsor' => 'Super sponsor',
|
'hot post list' => 'Hot post list',
|
||||||
'i want to join' => 'i want to join',
|
'links list' => 'Links list',
|
||||||
'official products' => 'Official products',
|
'statement' => 'Statement',
|
||||||
'no comments' => 'No comments',
|
'trends' => 'Trends',
|
||||||
'submit comments' => 'Submit comments',
|
'sponsor' => 'Super sponsor',
|
||||||
'reply' => 'reply',
|
'i want to join' => 'i want to join',
|
||||||
'replies' => 'replies',
|
'official products' => 'Official products',
|
||||||
'accept' => 'accept',
|
'no comments' => 'No comments',
|
||||||
'please input the content' => 'please input the content',
|
'submit comments' => 'Submit comments',
|
||||||
'ads area' => 'Ads area',
|
'reply' => 'reply',
|
||||||
'enclosure' => 'enclosure',
|
'replies' => 'replies',
|
||||||
'download files' => 'Download files',
|
'accept' => 'accept',
|
||||||
|
'please input the content' => 'please input the content',
|
||||||
//message
|
'ads area' => 'Ads area',
|
||||||
'add' => 'add',
|
'enclosure' => 'Enclosure',
|
||||||
'delete' => 'delete',
|
'add attachment' => 'Add attachment',
|
||||||
'edit' => 'edit',
|
'download files' => 'Download files',
|
||||||
'add success' => 'add success!',
|
'special column' => 'Columns',
|
||||||
'add error' => 'add error',
|
|
||||||
'edit success' => 'articel edit success',
|
|
||||||
'edit error' => 'articel edit error',
|
|
||||||
'illegal_request' => 'illegal request',
|
|
||||||
|
|
||||||
//Sign in/up
|
//Sign in/up
|
||||||
'username' => 'Username',
|
'username' => 'Username',
|
||||||
'password' => 'Password',
|
'password' => 'Password',
|
||||||
'new password' => 'New Password',
|
'new password' => 'New Password',
|
||||||
'reset password' => 'Reset password',
|
'reset password' => 'Reset password',
|
||||||
'retrieve password' => 'Retrieve password',
|
'retrieve password' => 'Retrieve password',
|
||||||
'email' => 'Email',
|
'email' => 'Email',
|
||||||
'confirm password' => 'Confirm password',
|
'confirm password' => 'Confirm password',
|
||||||
'captcha' => 'Captcha',
|
'captcha' => 'Captcha',
|
||||||
'remember password' => 'Remember password',
|
'remember password' => 'Remember password',
|
||||||
'forget password' => 'Forget password',
|
'forget password' => 'Forget password',
|
||||||
'login now' => 'Login now',
|
'login now' => 'Login now',
|
||||||
'submit' => 'Submit',
|
'submit' => 'Submit',
|
||||||
'go back' => 'Go back',
|
'go back' => 'Go back',
|
||||||
'register now' => 'Register now',
|
'register now' => 'Register now',
|
||||||
'mail/username' => 'mail/username',
|
'mail/username' => 'mail/username',
|
||||||
'6-16 characters' => '6-16 characters',
|
'6-16 characters' => '6-16 characters',
|
||||||
'strong type encryption' => 'Strong type encryption',
|
'strong type encryption' => 'Strong type encryption',
|
||||||
'it cannot be changed' => 'It cannot be changed',
|
'it cannot be changed' => 'It cannot be changed',
|
||||||
'the only way to get back your password' => 'The only way to get back your password',
|
'the only way to get back your password' => 'The only way to get back your password',
|
||||||
'please input the password' => 'Please input the password',
|
'please input the password' => 'Please input the password',
|
||||||
'please confirm the password' => 'Please confirm the password',
|
'please confirm the password' => 'Please confirm the password',
|
||||||
'please input the captcha' => 'Please input the captcha',
|
'please input the captcha' => 'Please input the captcha',
|
||||||
|
|
||||||
//user
|
//user
|
||||||
'add friends' => 'Add friends',
|
'add friends' => 'Add friends',
|
||||||
'start a chat' => 'Start a chat',
|
'start a chat' => 'Start a chat',
|
||||||
'authentication information' => 'Authentication information',
|
'authentication information' => 'Authentication information',
|
||||||
'it is not signed yet' => 'It is not signed yet',
|
'it is not signed yet' => 'It is not signed yet',
|
||||||
'log in to view' => 'Log in to view',
|
'log in to view' => 'Log in to view',
|
||||||
'join' => 'Join',
|
'join' => 'Join',
|
||||||
'recent statements' => 'Recent statements',
|
'recent statements' => 'Recent statements',
|
||||||
'recent answers' => 'Recent answers',
|
'recent answers' => 'Recent answers',
|
||||||
'browses' => 'Browses',
|
'browses' => 'Browses',
|
||||||
'in' => 'in',
|
'in' => 'in',
|
||||||
'accumulate points' => 'Accumulate points',
|
'accumulate points' => 'Accumulate points',
|
||||||
'my post' => 'My post',
|
'my post' => 'My post',
|
||||||
];
|
];
|
@ -2,18 +2,35 @@
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
//语言
|
//语言
|
||||||
'language' => 'language',
|
'language' => 'language',
|
||||||
'chinese' => '中文简体',
|
'chinese' => '中文简体',
|
||||||
'english' => 'english',
|
'english' => 'english',
|
||||||
|
|
||||||
//menu
|
//弹窗提示消息
|
||||||
|
'add' => '添加',
|
||||||
|
'delete' => '删除',
|
||||||
|
'edit' => '编辑',
|
||||||
|
'uploads' => '上传',
|
||||||
|
'add success' => '添加成功!',
|
||||||
|
'add error' => '添加失败',
|
||||||
|
'edit success' => '修改成功',
|
||||||
|
'edit error' => '修改失败',
|
||||||
|
'delete success' => '删除成功',
|
||||||
|
'delete error' => '删除失败',
|
||||||
|
'upload success' => '上传成功',
|
||||||
|
'upload error' => '上传失败',
|
||||||
|
'upgrade success' => '升级成功',
|
||||||
|
'upgrade error' => '升级失败',
|
||||||
|
'illegal request' => '非法请求',
|
||||||
|
|
||||||
|
//菜单
|
||||||
'index' => 'index',
|
'index' => 'index',
|
||||||
'home page' => '首页',
|
'home page' => '首页',
|
||||||
'user center' => '用户中心',
|
'user center' => '用户中心',
|
||||||
'set info' => '设置',
|
'set info' => '设置',
|
||||||
'my message' => '我的消息',
|
'my message' => '我的消息',
|
||||||
'my page' => '我的主页',
|
'my page' => '我的主页',
|
||||||
|
|
||||||
'login' => '登录',
|
'login' => '登录',
|
||||||
'logout' => '退出',
|
'logout' => '退出',
|
||||||
'sign in' => '签到',
|
'sign in' => '签到',
|
||||||
@ -22,51 +39,50 @@ return [
|
|||||||
'discuss' => '讨论',
|
'discuss' => '讨论',
|
||||||
'case' => '案例',
|
'case' => '案例',
|
||||||
'timeline' => '框架日志',
|
'timeline' => '框架日志',
|
||||||
|
|
||||||
//帖子
|
//帖子
|
||||||
'poster' => '贴主',
|
'poster' => '贴主',
|
||||||
'title color' => '颜色',
|
'title' => '标题',
|
||||||
'add_post' => '添加帖子',
|
'title color' => '颜色',
|
||||||
'my collection' => '我的收藏',
|
'add post' => '添加帖子',
|
||||||
'cancel collection' => '取消收藏',
|
'edit post' => '编辑帖子',
|
||||||
'all' => '综合',
|
'delete post' => '删除帖子',
|
||||||
'finished' => '已结',
|
'post now' => '立即发布',
|
||||||
'end' => '已结',
|
'my collection' => '我的收藏',
|
||||||
'no finished' => '未结',
|
'cancel collection' => '取消收藏',
|
||||||
'hot' => '热贴',
|
'all' => '综合',
|
||||||
'top' => '精贴',
|
'finished' => '已结',
|
||||||
'cancel hoting' => '取消精贴',
|
'end' => '已结',
|
||||||
'cancel topping' => '取消置顶',
|
'no finished' => '未结',
|
||||||
'go sign' => '去签到',
|
'hot' => '热贴',
|
||||||
'more post' => '更多帖子',
|
'top' => '精贴',
|
||||||
'friendly link' => '友情链接',
|
'cancel hoting' => '取消精贴',
|
||||||
'reviewers list' => '回帖热榜',
|
'cancel topping' => '取消置顶',
|
||||||
'hot post list' => '本周热议',
|
'go sign' => '去签到',
|
||||||
'links list' => '温馨通道',
|
'more post' => '更多帖子',
|
||||||
'statement' => '说明',
|
'friendly link' => '友情链接',
|
||||||
'trends' => '动态',
|
'reviewers list' => '回帖热榜',
|
||||||
'sponsor' => '钻级赞助商',
|
'hot post list' => '本周热议',
|
||||||
'i want to join' => '我要加入',
|
'links list' => '温馨通道',
|
||||||
'official products' => '官方产品',
|
'statement' => '说明',
|
||||||
'no comments' => '暂时还没有评论',
|
'trends' => '动态',
|
||||||
'submit comments' => '提交评论',
|
'sponsor' => '钻级赞助商',
|
||||||
'reply' => '回复',
|
'i want to join' => '我要加入',
|
||||||
'replies' => '次回复',
|
'official products' => '官方产品',
|
||||||
'accept' => '采纳',
|
'no comments' => '暂时还没有评论',
|
||||||
'please input the content' => '请输入内容',
|
'submit comments' => '提交评论',
|
||||||
'ads area' => '广告区',
|
'reply' => '回复',
|
||||||
'enclosure' => '附件',
|
'replies' => '次回复',
|
||||||
'download files' => '下载文件',
|
'accept' => '采纳',
|
||||||
|
'please input the content' => '请输入内容',
|
||||||
//message
|
'ads area' => '广告区',
|
||||||
'add' => '添加',
|
'enclosure' => '附件',
|
||||||
'delete' => '删除',
|
'add attachment' => '添加附件',
|
||||||
'add success' => '添加成功!',
|
'download files' => '下载文件',
|
||||||
'add error' => '添加失败',
|
'special column' => '选择专栏',
|
||||||
'edit success' => '修改成功',
|
'tags' => '标签',
|
||||||
'edit error' => '修改失败',
|
'add tags' => '添加标签',
|
||||||
'illegal request' => '非法请求',
|
|
||||||
|
|
||||||
//Sign in/up
|
//Sign in/up
|
||||||
'username' => '用户',
|
'username' => '用户',
|
||||||
'password' => '密码',
|
'password' => '密码',
|
||||||
@ -90,7 +106,7 @@ return [
|
|||||||
'please input the password' => '请输入密码',
|
'please input the password' => '请输入密码',
|
||||||
'please confirm the password' => '请确认密码',
|
'please confirm the password' => '请确认密码',
|
||||||
'please input the captcha' => '请输入验证码',
|
'please input the captcha' => '请输入验证码',
|
||||||
|
|
||||||
//user
|
//user
|
||||||
'add friends' => '添加为好友',
|
'add friends' => '添加为好友',
|
||||||
'start a chat' => '开始会话',
|
'start a chat' => '开始会话',
|
||||||
@ -99,11 +115,11 @@ return [
|
|||||||
'log in to view' => '登录查看',
|
'log in to view' => '登录查看',
|
||||||
'join' => '加入',
|
'join' => '加入',
|
||||||
'recent statements' => '最近发帖',
|
'recent statements' => '最近发帖',
|
||||||
'recent answers' => '最近回贴',
|
'recent answers' => '最近回贴',
|
||||||
'browses' => '浏览',
|
'browses' => '浏览',
|
||||||
'in' => '在',
|
'in' => '在',
|
||||||
'accumulate points' => '积分',
|
'accumulate points' => '积分',
|
||||||
'my post' => '我的帖子',
|
'my post' => '我的帖子',
|
||||||
|
|
||||||
|
|
||||||
];
|
];
|
@ -8,25 +8,25 @@
|
|||||||
<div class="layui-form layui-form-pane">
|
<div class="layui-form layui-form-pane">
|
||||||
<div class="layui-tab layui-tab-brief" lay-filter="user">
|
<div class="layui-tab layui-tab-brief" lay-filter="user">
|
||||||
<ul class="layui-tab-title">
|
<ul class="layui-tab-title">
|
||||||
<li class="layui-this">发表新帖<!-- 编辑帖子 --></li>
|
<li class="layui-this">{:lang('add post')}<!-- 编辑帖子 --></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="layui-tab-content" id="LAY_ucm" style="padding: 20px 0;">
|
<div class="layui-tab-content" id="LAY_ucm" style="padding: 20px 0;">
|
||||||
<div class="layui-tab-item layui-show">
|
<div class="layui-tab-item layui-show">
|
||||||
|
|
||||||
<div class="layui-row layui-col-space15 layui-form-item">
|
<div class="layui-row layui-col-space15 layui-form-item">
|
||||||
<div class="layui-col-md3">
|
<div class="layui-col-md3">
|
||||||
<label class="layui-form-label">所在专栏</label>
|
<label class="layui-form-label">{:lang('special column')}</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<select lay-verify="required" name="cate_id" lay-filter="column">
|
<select lay-verify="required" name="cate_id" lay-filter="column">
|
||||||
<option></option>
|
<option></option>
|
||||||
{volist name="cateList" id="cate"}
|
{volist name="cateList" id="cate"}
|
||||||
<option value="{$cate.id}">{$cate.catename}</option>
|
<option value="{$cate.id}">{:cookie('think_lang') == 'en-us' ? $cate.ename : $cate.catename}</option>
|
||||||
{/volist}
|
{/volist}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-col-md8">
|
<div class="layui-col-md8">
|
||||||
<label for="L_title" class="layui-form-label">标题</label>
|
<label for="L_title" class="layui-form-label">{:lang('title')}</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" id="L_title" name="title" required lay-verify="required" autocomplete="off" class="layui-input">
|
<input type="text" id="L_title" name="title" required lay-verify="required" autocomplete="off" class="layui-input">
|
||||||
<input type="hidden" id="L_title_color" name="title_color" autocomplete="off" class="layui-input">
|
<input type="hidden" id="L_title_color" name="title_color" autocomplete="off" class="layui-input">
|
||||||
@ -68,26 +68,26 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item layui-form-text">
|
<div class="layui-form-item layui-form-text">
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<textarea id="L_content" name="content" required lay-verify="required" placeholder="详细描述" class="layui-textarea fly-editor" style="height: 260px;"></textarea>
|
<textarea id="L_content" name="content" required lay-verify="required" placeholder="{:lang('please input the content')}" class="layui-textarea fly-editor" style="height: 260px;"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<label class="layui-form-label">上传附件</label>
|
<label class="layui-form-label">{:lang('enclosure')}</label>
|
||||||
<div class="layui-input-inline" style="width: 190px;">
|
<div class="layui-input-inline" style="width: 190px;">
|
||||||
<input type="text" class="layui-input" name="upzip" value="" placeholder="zip,jpg格式" title="上传附件"/>
|
<input type="text" class="layui-input" name="upzip" value="" placeholder="zip,jpg格式" title="上传附件"/>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" class="layui-btn" id="zip-button"><i class="layui-icon"></i>上传文件</button>
|
<button type="button" class="layui-btn" id="zip-button"><i class="layui-icon"></i>{:lang('uploads')}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<label class="layui-form-label">添加标签</label>
|
<label class="layui-form-label">{:lang('add tags')}</label>
|
||||||
<div class="layui-input-inline" style="width: 190px;">
|
<div class="layui-input-inline" style="width: 190px;">
|
||||||
<input type="text" class="layui-input" name="tags" placeholder="多个标签用,号隔开" title="添加标签"/>
|
<input type="text" class="layui-input" name="tags" placeholder="多个标签用,号隔开" title="添加标签"/>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" class="layui-btn" id="article-tags-button">添加</button>
|
<button type="button" class="layui-btn" id="article-tags-button">{:lang('add')}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
@ -111,16 +111,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div-->
|
</div-->
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label for="L_vercode" class="layui-form-label">验证码</label>
|
<label for="L_vercode" class="layui-form-label">{:lang('captcha')}</label>
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<input type="text" id="L_vercode" name="captcha" required lay-verify="required" placeholder="请输入验证码" autocomplete="off" class="layui-input">
|
<input type="text" id="L_vercode" name="captcha" required lay-verify="required" placeholder="{:lang('please input the captcha')}" autocomplete="off" class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
<div >
|
<div >
|
||||||
<span style="color: #c00;"><img id="captcha" src="{:captcha_src()}" onclick="this.src='{:captcha_src()}?'+Math.random();" style="float:left; cursor:pointer;" alt="captcha" /></span>
|
<span style="color: #c00;"><img id="captcha" src="{:captcha_src()}" onclick="this.src='{:captcha_src()}?'+Math.random();" style="float:left; cursor:pointer;" alt="captcha" /></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<button type="submit" class="layui-btn" lay-filter="article-add" lay-submit id="add">立即发布</button>
|
<button type="submit" class="layui-btn" lay-filter="article-add" lay-submit id="add">{:lang('post now')}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -210,7 +210,7 @@
|
|||||||
data:{"cate_id":field.cate_id,"title":field.title,"title_color":field.title_color,"user_id":field.user_id,"content":field.content,"upzip":field.upzip,"tags":tags,"captcha":field.captcha},
|
data:{"cate_id":field.cate_id,"title":field.title,"title_color":field.title_color,"user_id":field.user_id,"content":field.content,"upzip":field.upzip,"tags":tags,"captcha":field.captcha},
|
||||||
dataType:"json",
|
dataType:"json",
|
||||||
success:function (data){
|
success:function (data){
|
||||||
if (data.code == 1) {
|
if (data.code == 0) {
|
||||||
layer.msg(data.msg,{
|
layer.msg(data.msg,{
|
||||||
icon:6,
|
icon:6,
|
||||||
time:2000
|
time:2000
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<div class="layui-form layui-form-pane">
|
<div class="layui-form layui-form-pane">
|
||||||
<div class="layui-tab layui-tab-brief" lay-filter="user">
|
<div class="layui-tab layui-tab-brief" lay-filter="user">
|
||||||
<ul class="layui-tab-title">
|
<ul class="layui-tab-title">
|
||||||
<li class="layui-this">编辑帖子</li>
|
<li class="layui-this">{:lang('edit post')}</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="layui-form layui-tab-content" id="LAY_ucm" style="padding: 20px 0;">
|
<div class="layui-form layui-tab-content" id="LAY_ucm" style="padding: 20px 0;">
|
||||||
<div class="layui-tab-item layui-show">
|
<div class="layui-tab-item layui-show">
|
||||||
@ -16,19 +16,19 @@
|
|||||||
<input type="hidden" name="id" value="{$article.id}">
|
<input type="hidden" name="id" value="{$article.id}">
|
||||||
<div class="layui-row layui-col-space15 layui-form-item">
|
<div class="layui-row layui-col-space15 layui-form-item">
|
||||||
<div class="layui-col-md3">
|
<div class="layui-col-md3">
|
||||||
<label class="layui-form-label">所在专栏</label>
|
<label class="layui-form-label">{:lang('special column')}</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<select lay-verify="required" name="cate_id" lay-filter="column">
|
<select lay-verify="required" name="cate_id" lay-filter="column">
|
||||||
<option></option>
|
<option></option>
|
||||||
|
|
||||||
{volist name="cateList" id="cate"}
|
{volist name="cateList" id="cate"}
|
||||||
<option value="{$cate.id}" {if $article.cate_id == $cate.id}selected{/if}>{$cate.catename}</option>
|
<option value="{$cate.id}" {if $article.cate_id == $cate.id}selected{/if}>{:cookie('think_lang') == 'en-us' ? $cate.ename : $cate.catename}</option>
|
||||||
{/volist}
|
{/volist}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-col-md8">
|
<div class="layui-col-md8">
|
||||||
<label for="L_title" class="layui-form-label">标题</label>
|
<label for="L_title" class="layui-form-label">{:lang('title')}</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" id="L_title" name="title" required lay-verify="required" autocomplete="off" class="layui-input" value="{$article.title}">
|
<input type="text" id="L_title" name="title" required lay-verify="required" autocomplete="off" class="layui-input" value="{$article.title}">
|
||||||
<input type="hidden" id="L_title_color" name="title_color" autocomplete="off" class="layui-input" value="{$article.title_color}">
|
<input type="hidden" id="L_title_color" name="title_color" autocomplete="off" class="layui-input" value="{$article.title_color}">
|
||||||
@ -91,7 +91,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<label class="layui-form-label">上传附件</label>
|
<label class="layui-form-label">{:lang('enclosure')}</label>
|
||||||
<div class="layui-input-inline" style="width: 190px;">
|
<div class="layui-input-inline" style="width: 190px;">
|
||||||
<input type="text" class="layui-input" name="upzip" value="{$article.upzip}" placeholder="zip,jpg格式" title="上传附件"/>
|
<input type="text" class="layui-input" name="upzip" value="{$article.upzip}" placeholder="zip,jpg格式" title="上传附件"/>
|
||||||
</div>
|
</div>
|
||||||
@ -101,11 +101,11 @@
|
|||||||
|
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<label class="layui-form-label">添加标签</label>
|
<label class="layui-form-label">{:lang('add tags')}</label>
|
||||||
<div class="layui-input-inline" style="width: 190px;">
|
<div class="layui-input-inline" style="width: 190px;">
|
||||||
<input type="text" class="layui-input" name="tags" placeholder="多个标签用,号隔开" title="添加标签"/>
|
<input type="text" class="layui-input" name="tags" placeholder="多个标签用,号隔开" title="添加标签"/>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" class="layui-btn" id="article-tags-button">添加</button>
|
<button type="button" class="layui-btn" id="article-tags-button">{:lang('add')}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
@ -116,16 +116,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label for="L_vercode" class="layui-form-label">验证码</label>
|
<label for="L_vercode" class="layui-form-label">{:lang('captcha')}</label>
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<input type="text" id="L_vercode" name="captcha" required lay-verify="required" placeholder="请输入验证码" autocomplete="off" class="layui-input">
|
<input type="text" id="L_vercode" name="captcha" required lay-verify="required" placeholder="{:lang('please input the captcha')}" autocomplete="off" class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-mid">
|
<div class="layui-form-mid">
|
||||||
<span style="color: #c00;"><img id="captcha" src="{:captcha_src()}" onclick="this.src='{:captcha_src()}?'+Math.random();" style="float:left; cursor:pointer;" alt="captcha" /></span>
|
<span style="color: #c00;"><img id="captcha" src="{:captcha_src()}" onclick="this.src='{:captcha_src()}?'+Math.random();" style="float:left; cursor:pointer;" alt="captcha" /></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<button type="submit" class="layui-btn" lay-filter="article-edit" lay-submit id="edit">立即发布</button>
|
<button type="submit" class="layui-btn" lay-filter="article-edit" lay-submit id="edit">{:lang('post now')}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -185,7 +185,6 @@
|
|||||||
} else {
|
} else {
|
||||||
layer.msg(res.msg);
|
layer.msg(res.msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user