作者 wangzhi

跨域请求

... ... @@ -39,8 +39,18 @@ class Index extends Api
public function MapAddressList()
{
$arr = Db::name('dangaddress')->select();
if (empty($arr)) {
$arr = [];
$arr = [];
if (!empty($arr)) foreach ($arr as $k => $v) {
if ($v['images'] = '') {
$arr[$k]['images'] = [];
} else {
if (strstr($v['images'], ',')) $arr[$k]['images'] = explode(',', $v['images']);
else $arr[$k]['images'] = explode(' ', $v['images']);
foreach ($arr[$k]['images'] as $k1 => $v1) {
$arr[$k]['images'][$k1] = cdnurl($v1);
}
}
}
$this->success('成功', $arr);
}
... ...
... ... @@ -9,7 +9,7 @@ return [
/**
* CDN地址
*/
'cdnurl' => '',
'cdnurl' => 'http://1.117.216.123',
/**
* 文件保存格式
*/
... ...