2025年8月
谷歌字体库切片字体本地化
首先,确保你的 Node.js 版本为 12 或更高。然后使用 npm 全局安装 google-font-splitter:
npm install -g google-font-splitter
找一个空文件夹,并执行如下命令(字体下载会自动生成css文件)
google-font-splitter "https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@200;400;700&display=swap" //100~900 思源黑体
google-font-splitter "https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;500;700&display=swap" //200~900思源宋体
google-font-splitter "https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng:wght@400&display=swap"
google-font-splitter "https://fonts.googleapis.com/css2?family=WDXL+Lubrifont+SC:wght@400&display=swap"
google-font-splitter "https://fonts.googleapis.com/css2?family=ZCOOL+XiaoWei:wght@400&display=swap"
google-font-splitter "https://fonts.googleapis.com/css2?family=Zhi+Mang+Xing:wght@400&display=swap"
google-font-splitter "https://fonts.googleapis.com/css2?family=Long+Cang:wght@400&display=swap"
google-font-splitter "https://fonts.googleapis.com/css2?family=Liu+Jian+Mao+Cao:wght@400&display=swap" 极致cms更新数据接口
function view(){
if($_POST){
$id = $this->frparam('tid',1);
if($id){
$view_time = time();
$view_key = getRandChar(8);
$res = M('classtype')->update(['id'=>$id],['view_key'=>$view_key,'view_time'=>$view_time]);
if($res){
JsonReturn(['code'=>0,'msg'=>'链接生成!','url'=>'http://u.upic.top/case.html?key='.$view_key]);
}else{
JsonReturn(['code'=>1,'msg'=>'链接生成失败!']);
}
}
else{
JsonReturn(['code'=>1,'msg'=>'参数错误!']);
}
}
} 上交所股票数据PHP接口代理
function http_request($url, $data = null)
{
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
if (!empty($data)) {
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_POSTFIELDS,$data);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json'
));
}
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
$output = curl_exec($curl);
curl_close($curl);
return $output;
exit();
}
function stock(){
if($_POST){
$code = $this->frparam('code',1,'603906');
$url = "http://yunhq.sse.com.cn:32041//v1/sh1/snap/".$code;
$info = $this->http_request($url);
// JsonReturn(['code'=>1,'msg'=>$info]);
if(strpos($info,'nginx')){
JsonReturn(['code'=>1,'msg'=>'code Error!']);
}else{
$info = json_decode($info);
$dt = $info->date;
$tm = $info->time;
$dt = substr($dt,0,4).'.'. substr($dt,4,2).'.'. substr($dt,6,2);
$tm = substr($tm,0,2).':'. substr($tm,2,2);
$update=$tm.' '.$dt;
$data = $info->snap;
JsonReturn(['code'=>0,'time'=>$update,stp=>$data[5], de=>$data[6], dep=>$data[7],'info'=>$info]);
}
}else{
JsonReturn(['code'=>1,'msg'=>'Request method "GET" not supported']);
}
}