Commit e12ee918 authored by clone's avatar clone

版本号和banner地址凭借

parent 4f9b1a6b
......@@ -4,8 +4,9 @@ error_reporting(E_ERROR | E_PARSE);
define('PAGESIZE', 15); //分页每页条数
define('ADMIN_URL_TL','https://admin.tonglianjituan.com/'); //B端网址
define('CURRENT_URL', 'https://'.$_SERVER['HTTP_HOST'].DS); //取当前域名地址
define('CURRENT_URL', 'http://'.$_SERVER['HTTP_HOST'].DS); //取当前域名地址
define('HEADERIMGURL', CURRENT_URL . 'static'. DS . 'head_portrait/'); //头像地址
define('CK_IMG_URL', CURRENT_URL . '/resource/lib/Attachments/'); //ck 资源文件
return [
'jwt_key' => 'tonglian+123',
......
......@@ -13,6 +13,7 @@ namespace app\api\controller;
use app\api\extend\Basic;
use app\model\BannerModel;
use think\Request;
//use app\api\untils\JwtUntils;
class Banner extends Basic
{
......@@ -30,7 +31,7 @@ class Banner extends Basic
*/
public function getBannerList()
{
$field = "id,title,pic_path,url,sort,is_show,create_time,update_time";
$field = "id,title,CONCAT('".CK_IMG_URL."' , pic_path) as pic_path, url, sort,is_show,create_time,update_time";
$params['is_show'] = array( "eq", 0 );
$result = $this->bannerModel
->getBannerList(1, 15, "sort desc", $field, $params);
......
......@@ -22,7 +22,7 @@ class AppVersion extends Model
$type = $type == 'android' ? 1 : 0;
$param["type"] = $type;
$param["is_del"] = 0;
return $this->field("id,version_no,type,create_time,intro,app_path")
return $this->field("id,version_no,type,create_time,intro,CONCAT('".CK_IMG_URL."' , app_path) as app_path")
->where($param)
->order("id desc")
->limit(1)
......
......@@ -10,36 +10,6 @@
// +----------------------------------------------------------------------
use think\Route;
// 注册路由到index模块的News控制器的read操作
/*Route::get(['/', '/:d'], 'index/index');
Route::get(['/well', '/w'], 'index/wellCome');
Route::get('/s', 'index/wellCome');*/
//推荐这种风格 注明控制器
/*IndexController*/
/*Route::rule([
'/' => 'index/index',
'/well' => 'index/wellCome',
'/re' => 'index/read'
], '', 'GET|POST');
// 检测路由规则仅GET请求有效
Route::any('new/:id','News/read',['method'=>'get']);
// 检测路由规则仅GET和POST请求有效
Route::any('new/:id','News/read',['method'=>'get|post']);
Route::get('/he/:id', 'index/hello');
/*StoreController
Route::rule([
'/saveStore' => 'store/save'
], '', 'GET');
/*Error
Route::rule(['/city/:name' => 'error/index'] , '' ,'GET');*/
Route::group('app', [
'index' => [ 'app/index/index', [ 'method' => 'get' ] ],
'agent_detail' => [ 'app/index/agent_detail', [ 'method' => 'get' ] ],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment