作者 景龙
1 个管道 的构建 通过 耗费 10 秒

修改集中域名

... ... @@ -9,6 +9,7 @@ use think\Cache;
use think\Config;
use think\Db;
use think\Lang;
use app\admin\model\User;
/**
* Ajax异步请求接口
... ... @@ -105,7 +106,7 @@ class Ajax extends Backend
$imagewidth = isset($imgInfo[0]) ? $imgInfo[0] : $imagewidth;
$imageheight = isset($imgInfo[1]) ? $imgInfo[1] : $imageheight;
}
$url = 'http://feipin.w.brotop.cn'.$uploadDir . $splInfo->getSaveName();
$url = User::DOMAIN.$uploadDir . $splInfo->getSaveName();
$params = array(
'admin_id' => (int)$this->auth->id,
'user_id' => 0,
... ...
... ... @@ -2,6 +2,7 @@
namespace app\admin\library\traits;
use app\admin\model\User;
trait Backend
{
... ... @@ -73,7 +74,7 @@ trait Backend
{
if ($this->request->isPost()) {
$params = $this->request->post("row/a");
$host = 'http://feipin.w.brotop.cn';
$host = User::DOMAIN;
if(isset($params['image']) && !empty($params['image'])){
$params['image'] = $host.$params['image'];
}
... ... @@ -130,7 +131,7 @@ trait Backend
if ($this->request->isPost()) {
$params = $this->request->post("row/a");
if ($params) {
$host = 'http://feipin.w.brotop.cn';
$host = User::DOMAIN;
if(isset($params['image']) && !empty($params['image'])){
if(strpos($params['image'],$host) !== false){
//true
... ...
... ... @@ -15,6 +15,9 @@ class User extends Model
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
//设置域名
CONST DOMAIN = 'http://feipin.w.brotop.cn';
// 追加属性
protected $append = [
'prevtime_text',
... ...
... ... @@ -148,7 +148,7 @@ class Person extends Api
$this->error('最多上传9张图片');
}
$date = date('Ymd',time());
$host = config('site.hostUrl');
$host = \app\admin\model\User::DOMAIN;
$images = '';
foreach($files as $file){
//移动到框架应用根目录/public/uploads/ 目录下
... ...
... ... @@ -62,8 +62,8 @@ return array (
//设置积分规则(分享购买,分享卖废品)
//'share_purchase' => 150,
//'share_sell' => 50,
//域名
'hostUrl' => 'http://feipin.w.brotop.cn',
// //域名
// 'hostUrl' => 'http://feipin.w.brotop.cn',
//验证规则
'user_id' => [
'rule' => [
... ...