作者 lyh

ggx

... ... @@ -14,7 +14,9 @@ use App\Http\Controllers\Bside\BaseController;
use App\Http\Logic\Bside\Setting\WebSettingLogic;
use App\Models\Com\UpdateNotify;
use App\Models\Com\UpdateProgress;
use App\Models\Project\Country as CountryModel;
use App\Models\RouteMap\RouteMap;
use App\Models\WebSetting\WebSettingCountry;
use Illuminate\Http\Request;
/**
... ... @@ -184,4 +186,28 @@ class CNoticeController extends BaseController
$string = http_build_query($param);
return $this->user['domain'].'api/updateHtmlNotify/?' . $string;
}
/**
* @remark :获取当前项目选中的语种
* @name :getCountry
* @author :lyh
* @method :post
* @time :2023/9/12 15:20
*/
public function getCountry(){
$countryModel = new CountryModel();
$info = $countryModel->read(['project_id'=>$this->user['project_id']],['id','country_lists']);
$ids = [];
if($info !== false){
$ids = explode(',',$info['country_lists']);
}
$webSettingCountryModel = new WebSettingCountry();
$lists = $webSettingCountryModel->list(['id',['in',$ids]],'id',['id','name','country_img']);
if (!empty($lists)){
foreach ($lists as $k => $v){
$lists[$k]['image_link'] = url('upload/country/' . $v['country_img']);
}
}
$this->response('success',Code::SUCCESS,$lists);
}
}
... ...
... ... @@ -122,7 +122,8 @@ Route::middleware(['bloginauth'])->group(function () {
Route::any('/save', [\App\Http\Controllers\Bside\Setting\WebSettingController::class, 'save'])->name('web_setting_save');
//通知
Route::any('/sendNotify', [\App\Http\Controllers\Bside\BCom\CNoticeController::class, 'sendNotify'])->name('web_setting_sendNotify');
//已选择的国家
Route::any('/getCountry', [\App\Http\Controllers\Bside\BCom\CNoticeController::class, 'getCountry'])->name('web_setting_getCountry');
//第三方代码获取与设置
Route::prefix('html')->group(function () {
Route::any('/', [\App\Http\Controllers\Bside\Setting\WebSettingHtmlController::class, 'save'])->name('web_setting_html_save');
... ...