[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"getwebinfo":3,"userInfo":32,"news-item-28":35},{"dwo_Aentrance":4,"dwo_Uentrance":5,"dwo_WebTitle":6,"dwo_WebKeys":7,"dwo_WebDesc":8,"dwo_WebLogo":9,"dwo_WebIco":10,"dwo_WebIcp":11,"dwo_Copyright":12,"dwo_UploadImageSuffix":13,"dwo_UploadFileSuffix":14,"dwo_UploadImageSize":15,"dwo_UploadFileSize":16,"dwo_UploadStatus":17,"dwo_WebGx":18,"dwo_NotifyFeedBack":19,"dwo_NotifyList":19,"dwo_NotifyDeposit":19,"dwo_NotifyEmail":20,"dwo_WebBack":21,"dwo_Adkey":22,"dwo_AdOff":22,"dwo_Adcallkey":22,"c_apideftimage":23,"dwo_payprovider":24,"dwo_paymethod_switch":25,"dwo_payenabled":26,"dwo_redis_enabled":17,"dwo_redis_host":27,"dwo_redis_port":28,"dwo_redis_password":29,"dwo_redis_database":30,"dwo_redis_timeout":30,"EmailOff":17,"c_qrlist":31},"admin","default","小渡API | FAFE Pro - 公益免费API聚合平台","小渡API,FAFE Pro,小小数据API,公益API,免费API,API聚合平台,聚合数据,API开放平台,免费接口调用平台,高并发API,开发者工具,api.dwo.cc","小渡API（FAFE Pro）是公益性API聚合平台，免费提供稳定高并发的数据接口服务。性能Pro稳定Max，聚合多家优质API资源，助力超多企业及开发者共建生态","https:\u002F\u002Fcdn.heylie.cn\u002Ftb\u002Fxiaodu_x.png","https:\u002F\u002Fcdn.heylie.cn\u002Ftb\u002Fxd.ico","赣ICP备2023002241号-2","小渡API","jpg,jpeg,png,gif,ico,webp","apk,zip,rar,7z,ipa,jpg,jpeg,png,gif,mp4",53,50,"1","赣公网安备36012102000605号","2","2092115940@qq.com","https:\u002F\u002Foss4liview.moji.com\u002Fthd_file\u002F2025\u002F08\u002F18\u002Fce6874143a024cf3d1380394497fd311.png",null,"https:\u002F\u002Foss4liview.moji.com\u002Fthd_file\u002F2025\u002F12\u002F13\u002F9cc11bcd504ac19696f8ed3c86302979.png","alipay","{\"alipay\":true,\"wxpay\":false,\"qqpay\":false}",0,"127.0.0.1","6379","","0",[],{"code":33,"msg":34,"data":29,"total":26},401,"权限不足或TOKEN失效，请重新登录",{"classListRes":-1,"articleRes":36},{"code":37,"msg":22,"data":38,"total":22},200,{"id":39,"dwo_html":40,"dwo_name":41,"dwo_image":42,"dwo_time":43,"dwo_brief":41,"dwo_keywords":44,"dwo_cid":45,"dwo_show":17,"dwo_uid":46,"dwo_status":47,"dwo_comment_count":48,"dwo_status_reason":22,"dwo_status_time":22,"status_text":49},28,"\u003Cp>\u003Cbr>\u003C\u002Fp>\u003Cblockquote> 功能特性\u003C\u002Fblockquote>\u003Cp>\u003Cbr>\u003C\u002Fp>\u003Cdiv data-w-e-type=\"todo\">\u003Cinput type=\"checkbox\" disabled > 实时天气显示（自动定位IP城市）\u003C\u002Fdiv>\u003Cdiv data-w-e-type=\"todo\">\u003Cinput type=\"checkbox\" disabled checked>每日一言（侧边栏）\u003C\u002Fdiv>\u003Cdiv data-w-e-type=\"todo\">\u003Cinput type=\"checkbox\" disabled checked>博主栏座右铭动态一言\u003C\u002Fdiv>\u003Cdiv data-w-e-type=\"todo\">\u003Cinput type=\"checkbox\" disabled checked>\u003Cstrong>API Key 后端代理隐藏\u003C\u002Fstrong>（防泄漏）\u003C\u002Fdiv>\u003Cdiv data-w-e-type=\"todo\">\u003Cinput type=\"checkbox\" disabled checked>只需配置一个 Key，三功能通用\u003C\u002Fdiv>\u003Cp>---\u003C\u002Fp>\u003Ch2>第一步：修改后台配置\u003C\u002Fh2>\u003Cul>\u003Cli>文件：functions.php\u003C\u002Fli>\u003Cli>位置：第 569-596 行（侧栏设置区域）\u003C\u002Fli>\u003Cli>操作：替换原有的天气配置为新的通用配置\u003C\u002Fli>\u003C\u002Ful>\u003Cpre>\u003Ccode class=\"language-php\">\u002F* --------------------------------------- *\u002F\n$JDwoApiKey = new Typecho_Widget_Helper_Form_Element_Text(\n  'JDwoApiKey',\n  NULL,\n  NULL,\n  '小渡API Key - 通用',\n  '介绍：用于天气栏和一言功能的小渡API密钥 &lt;br\u002F&gt;\n   注意：填写时务必填写正确！不填写则不会显示天气和一言&lt;br \u002F&gt;\n   免费申请地址：&lt;a href=\"https:\u002F\u002Fopenapi.dwo.cc\u002F\" target=\"_blank\"&gt;openapi.dwo.cc&lt;\u002Fa&gt;&lt;br \u002F&gt;\n   说明：此Key同时用于天气查询、一言接口和博主栏座右铭，只需要配置这一个即可'\n);\n$JDwoApiKey-&gt;setAttribute('class', 'joe_content joe_aside');\n$form-&gt;addInput($JDwoApiKey);\n\u002F* --------------------------------------- *\u002F\n$JAside_Weather_Status = new Typecho_Widget_Helper_Form_Element_Select(\n  'JAside_Weather_Status',\n  array(\n    'off' =&gt; '关闭（默认）',\n    'on' =&gt; '开启'\n  ),\n  'off',\n  '是否开启实时天气栏 - PC',\n  '介绍：用于控制是否显示实时天气栏 &lt;br \u002F&gt;\n   注意：需要先填写上方的小渡API Key才会生效'\n);\n$JAside_Weather_Status-&gt;setAttribute('class', 'joe_content joe_aside');\n$form-&gt;addInput($JAside_Weather_Status-&gt;multiMode());\n\u002F* --------------------------------------- *\u002F\n$JAside_Yiyan_Status = new Typecho_Widget_Helper_Form_Element_Select(\n  'JAside_Yiyan_Status',\n  array(\n    'off' =&gt; '关闭（默认）',\n    'on' =&gt; '开启'\n  ),\n  'off',\n  '是否开启一言栏 - PC',\n  '介绍：用于控制是否显示一言（每日一句）栏 &lt;br \u002F&gt;\n   注意：需要先填写上方的小渡API Key才会生效'\n);\n$JAside_Yiyan_Status-&gt;setAttribute('class', 'joe_content joe_aside');\n$form-&gt;addInput($JAside_Yiyan_Status-&gt;multiMode());\u003C\u002Fcode>\u003C\u002Fpre>\u003Cul>\u003Cli>同时修改博主栏座右铭说明（第 488-500 行）：\u003C\u002Fli>\u003C\u002Ful>\u003Cpre>\u003Ccode class=\"language-php\">$JAside_Author_Motto = new Typecho_Widget_Helper_Form_Element_Textarea(\n  'JAside_Author_Motto',\n  NULL,\n  \"有钱终成眷属，没钱亲眼目睹\",\n  '博主栏座右铭（一言）- PC\u002FWAP',\n  '介绍：用于修改博主栏的座右铭（一言） &lt;br \u002F&gt;\n   注意：如果配置了上方的小渡API Key，此项将失效，自动使用小渡API获取动态一言 &lt;br \u002F&gt;\n   格式：可以填写多行也可以填写一行，填写多行时，每次随机显示其中的某一条 &lt;br \u002F&gt;\n   其他：未配置小渡API Key时，将显示此处设置的内容'\n);\u003C\u002Fcode>\u003C\u002Fpre>\u003Ch2>第二步：添加后端代理接口\u003C\u002Fh2>\u003Cul>\u003Cli>文件：core\u002Froute.php\u003C\u002Fli>\u003Cli>位置：文件末尾（第 413 行后）\u003C\u002Fli>\u003Cli>操作：添加以下 3 个代理函数\u003C\u002Fli>\u003C\u002Ful>\u003Cpre>\u003Ccode class=\"language-php\">\u002F* 小渡API代理 - 获取一言 *\u002F\nfunction _getDwoYiyan($self)\n{\n    $self-&gt;response-&gt;setStatus(200);\n    $apiKey = Helper::options()-&gt;JDwoApiKey;\n    \n    if (empty($apiKey)) {\n        return $self-&gt;response-&gt;throwJson(array(\"error\" =&gt; \"未配置API Key\"));\n    }\n    \n    $url = \"https:\u002F\u002Fopenapi.dwo.cc\u002Fapi\u002Fyi?type=json&ckey=\" . urlencode($apiKey);\n    \n    $ch = curl_init();\n    curl_setopt($ch, CURLOPT_URL, $url);\n    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n    curl_setopt($ch, CURLOPT_TIMEOUT, 10);\n    \n    $response = curl_exec($ch);\n    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n    curl_close($ch);\n    \n    if ($httpCode == 200 && $response) {\n        $self-&gt;response-&gt;throwJson(json_decode($response, true));\n    } else {\n        $self-&gt;response-&gt;throwJson(array(\"error\" =&gt; \"请求失败\", \"content\" =&gt; \"生活不止眼前的苟且，还有诗和远方。\"));\n    }\n}\n\n\u002F* 小渡API代理 - 获取IP定位 *\u002F\nfunction _getDwoIp($self)\n{\n    $self-&gt;response-&gt;setStatus(200);\n    $apiKey = Helper::options()-&gt;JDwoApiKey;\n    $ip = $self-&gt;request-&gt;ip;\n    \n    if (empty($apiKey)) {\n        return $self-&gt;response-&gt;throwJson(array(\"error\" =&gt; \"未配置API Key\"));\n    }\n    \n    \u002F\u002F 判断IPv6\n    $isIPv6 = strpos($ip, ':') !== false;\n    $apiUrl = $isIPv6 ? \n        \"https:\u002F\u002Fopenapi.dwo.cc\u002Fapi\u002Fipv6?ip=\" . urlencode($ip) . \"&ckey=\" . urlencode($apiKey) :\n        \"https:\u002F\u002Fopenapi.dwo.cc\u002Fapi\u002Fip?ip=\" . urlencode($ip) . \"&ckey=\" . urlencode($apiKey);\n    \n    $ch = curl_init();\n    curl_setopt($ch, CURLOPT_URL, $apiUrl);\n    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n    curl_setopt($ch, CURLOPT_TIMEOUT, 10);\n    \n    $response = curl_exec($ch);\n    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n    curl_close($ch);\n    \n    if ($httpCode == 200 && $response) {\n        $data = json_decode($response, true);\n        \n        \u002F\u002F 统一返回格式：提取城市名称（处理IPv4和IPv6不同格式）\n        $cityName = '未知';\n        if ($isIPv6) {\n            \u002F\u002F IPv6 格式：data.city\n            if (!empty($data['data']['city'])) {\n                $cityName = $data['data']['city'];\n            }\n        } else {\n            \u002F\u002F IPv4 格式：data.data.city_name\n            if (!empty($data['data']['data']['city_name'])) {\n                $cityName = $data['data']['data']['city_name'];\n            }\n        }\n        \n        \u002F\u002F 移除\"市\"后缀，天气API可能不需要\n        $cityName = str_replace(['市', '县', '区'], '', $cityName);\n        \n        $self-&gt;response-&gt;throwJson(array(\n            \"success\" =&gt; true,\n            \"city_name\" =&gt; $cityName,\n            \"is_ipv6\" =&gt; $isIPv6,\n            \"raw_data\" =&gt; $data\n        ));\n    } else {\n        $self-&gt;response-&gt;throwJson(array(\"error\" =&gt; \"请求失败\", \"city_name\" =&gt; \"未知\"));\n    }\n}\n\n\u002F* 小渡API代理 - 获取天气 *\u002F\nfunction _getDwoWeather($self)\n{\n    $self-&gt;response-&gt;setStatus(200);\n    $apiKey = Helper::options()-&gt;JDwoApiKey;\n    $location = $self-&gt;request-&gt;location;\n    \n    if (empty($apiKey)) {\n        return $self-&gt;response-&gt;throwJson(array(\"error\" =&gt; \"未配置API Key\"));\n    }\n    \n    if (empty($location)) {\n        return $self-&gt;response-&gt;throwJson(array(\"error\" =&gt; \"缺少城市参数\"));\n    }\n    \n    $url = \"https:\u002F\u002Fopenapi.dwo.cc\u002Fapi\u002Fweather_xz?location=\" . urlencode($location) . \"&language=zh-Hans&unit=c&ckey=\" . urlencode($apiKey);\n    \n    $ch = curl_init();\n    curl_setopt($ch, CURLOPT_URL, $url);\n    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n    curl_setopt($ch, CURLOPT_TIMEOUT, 10);\n    \n    $response = curl_exec($ch);\n    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n    curl_close($ch);\n    \n    if ($httpCode == 200 && $response) {\n        $self-&gt;response-&gt;throwJson(json_decode($response, true));\n    } else {\n        $self-&gt;response-&gt;throwJson(array(\"error\" =&gt; \"请求失败\"));\n    }\n}\u003C\u002Fcode>\u003C\u002Fpre>\u003Ch2 style=\"text-align: start;\">第三步：注册路由\u003C\u002Fh2>\u003Cul>\u003Cli>文件：core\u002Fcore.php\u003C\u002Fli>\u003Cli>位置：第 69-72 行（在 article_filing case 后面）\u003C\u002Fli>\u003Cli>操作：添加路由注册\u003C\u002Fli>\u003C\u002Ful>\u003Cpre>\u003Ccode class=\"language-php\">      case 'article_filing':\n        _getArticleFiling($self);\n        break;\n      case 'dwo_yiyan':\n        _getDwoYiyan($self);\n        break;\n      case 'dwo_ip':\n        _getDwoIp($self);\n        break;\n      case 'dwo_weather':\n        _getDwoWeather($self);\n        break;\n    };\u003C\u002Fcode>\u003C\u002Fpre>\u003Ch2>第四步：修改侧边栏显示\u003C\u002Fh2>\u003Cp>\u003Cstrong>文件：public\u002Faside.php\u003C\u002Fstrong>\u003C\u002Fp>\u003Ch3>4.1 修改博主栏座右铭部分（第 7 行）\u003C\u002Fh3>\u003Cul>\u003Cli>替换为：\u003C\u002Fli>\u003C\u002Ful>\u003Cpre>\u003Ccode class=\"language-php\">      &lt;p class=\"motto joe_motto\"&gt;\n        &lt;?php if (!empty($this-&gt;options-&gt;JDwoApiKey)) : ?&gt;\n          &lt;span class=\"dwo-motto\"&gt;加载中...&lt;\u002Fspan&gt;\n        &lt;?php else : ?&gt;\n          &lt;?php echo $this-&gt;options-&gt;JAside_Author_Motto ? $this-&gt;options-&gt;JAside_Author_Motto() : '有钱终成眷属，没钱亲眼目睹'; ?&gt;\n        &lt;?php endif; ?&gt;\n      &lt;\u002Fp&gt;\u003C\u002Fcode>\u003C\u002Fpre>\u003Ch3 style=\"text-align: start;\">4.2 替换天气模块（第 181-195 行）\u003C\u002Fh3>\u003Cul>\u003Cli>替换为：\u003C\u002Fli>\u003C\u002Ful>\u003Cpre>\u003Ccode class=\"language-php\">  &lt;?php if (!empty($this-&gt;options-&gt;JDwoApiKey)) : ?&gt;\n    &lt;style&gt;\n    .joe-dwo-weather, .joe-dwo-yiyan {\n      background: var(--background) !important;\n      backdrop-filter: none !important;\n    }\n    .joe-dwo-weather .weather-item {\n      display: flex;\n      justify-content: space-between;\n      padding: 10px 0;\n      border-bottom: 1px solid var(--classA);\n      font-size: 14px;\n      color: var(--theme);\n    }\n    .joe-dwo-weather .weather-item:last-child {\n      border-bottom: none;\n    }\n    .joe-dwo-weather .weather-item span {\n      color: var(--minor);\n      font-weight: 500;\n    }\n    .joe-dwo-weather .loading, .joe-dwo-yiyan .loading {\n      color: var(--minor);\n      font-size: 14px;\n      text-align: center;\n      padding: 15px 0;\n    }\n    .joe-dwo-yiyan .yiyan-content {\n      font-size: 14px;\n      line-height: 1.8;\n      text-align: center;\n      padding: 15px 10px;\n      font-style: italic;\n      color: var(--theme);\n      font-weight: 500;\n    }\n    &lt;\u002Fstyle&gt;\n    \n    &lt;?php if ($this-&gt;options-&gt;JAside_Weather_Status == 'on') : ?&gt;\n    &lt;section class=\"joe_aside__item joe-dwo-weather\"&gt;\n      &lt;div class=\"joe_aside__item-title\"&gt;\n        &lt;svg class=\"icon\" viewBox=\"0 0 1024 1024\" xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" width=\"18\" height=\"18\"&gt;\n          &lt;path d=\"M773.12 757.76h-79.872c-15.36 0-29.696-15.36-29.696-29.696s15.36-29.696 29.696-29.696h79.872c100.352 0 180.224-79.872 180.224-180.224S873.472 337.92 773.12 337.92c-25.6 0-50.176 5.12-74.752 15.36-10.24 5.12-20.48 5.12-25.6 0-10.24-5.12-15.36-15.36-15.36-20.48-15.36-100.352-100.352-175.104-200.704-175.104C346.112 155.648 256 245.76 250.88 356.352c0 15.36-10.24 29.696-29.696 29.696-79.872 5.12-145.408 74.752-145.408 160.768 0 90.112 70.656 160.768 160.768 160.768h75.776c15.36 0 29.696 15.36 29.696 29.696S326.656 768 311.296 768h-79.872C110.592 757.76 10.24 662.528 10.24 541.696c0-105.472 75.776-195.584 175.104-216.064 15.36-130.048 130.048-235.52 266.24-235.52 120.832 0 225.28 79.872 256 195.584 20.48-5.12 45.056-10.24 65.536-10.24 135.168 1.024 240.64 111.616 240.64 241.664S903.168 757.76 773.12 757.76z\" \u002F&gt;\n          &lt;path d=\"M437.248 933.888c-10.24 0-15.36-5.12-20.48-10.24-10.24-10.24-10.24-29.696 0-45.056l79.872-79.872h-60.416c-10.24 0-25.6-5.12-29.696-20.48-5.12-10.24 0-24.576 5.12-34.816l130.048-130.048c10.24-10.24 29.696-10.24 45.056 0 10.24 10.24 10.24 29.696 0 45.056L512 742.4h55.296c10.24 0 24.576 5.12 29.696 20.48 5.12 10.24 0 24.576-5.12 34.816L461.824 928.768c-10.24 5.12-20.48 5.12-24.576 5.12z\" \u002F&gt;\n        &lt;\u002Fsvg&gt;\n        &lt;span class=\"text\"&gt;实时天气&lt;\u002Fspan&gt;\n        &lt;span class=\"line\"&gt;&lt;\u002Fspan&gt;\n      &lt;\u002Fdiv&gt;\n      &lt;div class=\"joe_aside__item-contain\" id=\"dwo-weather-content\"&gt;\n        &lt;div class=\"loading\"&gt;加载中...&lt;\u002Fdiv&gt;\n      &lt;\u002Fdiv&gt;\n    &lt;\u002Fsection&gt;\n    &lt;?php endif; ?&gt;\n    \n    &lt;?php if ($this-&gt;options-&gt;JAside_Yiyan_Status == 'on') : ?&gt;\n    &lt;section class=\"joe_aside__item joe-dwo-yiyan\"&gt;\n      &lt;div class=\"joe_aside__item-title\"&gt;\n        &lt;svg class=\"icon\" viewBox=\"0 0 1024 1024\" xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" width=\"18\" height=\"18\"&gt;\n          &lt;path d=\"M512 938.667A426.667 426.667 0 0 1 85.333 512a421.12 421.12 0 0 1 131.2-306.133 58.88 58.88 0 0 1 42.667-16.64c33.28 1.066 58.027 28.16 84.267 56.96 7.893 8.533 19.626 21.333 28.373 29.013a542.933 542.933 0 0 0 24.533-61.867c18.134-52.266 35.414-101.76 75.307-121.6 55.04-27.733 111.573 37.974 183.253 121.6 16.214 18.774 38.614 44.8 53.547 59.52 1.707-4.48 3.2-8.96 4.48-12.373 8.533-24.32 18.987-54.613 51.2-61.653a57.813 57.813 0 0 1 55.68 20.053A426.667 426.667 0 0 1 512 938.667zM260.693 282.453A336.64 336.64 0 0 0 170.667 512a341.333 341.333 0 1 0 614.826-203.733 90.24 90.24 0 0 1-42.666 50.56 68.267 68.267 0 0 1-53.547 1.706c-25.6-9.173-51.627-38.4-99.2-93.226a826.667 826.667 0 0 0-87.253-91.734 507.733 507.733 0 0 0-26.24 64c-18.134 52.267-35.414 101.76-75.947 119.254-48.853 21.333-88.32-21.334-120.107-56.96-5.76-4.694-13.226-13.014-19.84-19.414z\" \u002F&gt;\n        &lt;\u002Fsvg&gt;\n        &lt;span class=\"text\"&gt;每日一言&lt;\u002Fspan&gt;\n        &lt;span class=\"line\"&gt;&lt;\u002Fspan&gt;\n      &lt;\u002Fdiv&gt;\n      &lt;div class=\"joe_aside__item-contain\" id=\"dwo-yiyan-content\"&gt;\n        &lt;div class=\"loading\"&gt;加载中...&lt;\u002Fdiv&gt;\n      &lt;\u002Fdiv&gt;\n    &lt;\u002Fsection&gt;\n    &lt;?php endif; ?&gt;\n    \n    &lt;script&gt;\n    (function() {\n      const PROXY_API = '&lt;?php echo Helper::options()-&gt;index; ?&gt;\u002Fjoe\u002Fapi';\n      \n      function getClientIp() {\n        return fetch('https:\u002F\u002Fipapi.co\u002Fjson\u002F').then(r =&gt; r.json());\n      }\n      \n      &lt;?php if ($this-&gt;options-&gt;JAside_Weather_Status == 'on') : ?&gt;\n      async function loadWeather() {\n        const dom = document.getElementById('dwo-weather-content');\n        if (!dom) return;\n        try {\n          const ipData = await getClientIp();\n          const clientIp = ipData.ip;\n          \n          const locRes = await fetch(PROXY_API + '?routeType=dwo_ip&ip=' + encodeURIComponent(clientIp));\n          const locData = await locRes.json();\n          const cityName = locData.city_name ? locData.city_name : '未知';\n          \n          const weatherRes = await fetch(PROXY_API + '?routeType=dwo_weather&location=' + encodeURIComponent(cityName));\n          const result = await weatherRes.json();\n          \n          if (result.results && result.results[0] && result.results[0].now) {\n            const now = result.results[0].now;\n            dom.innerHTML = `\n              &lt;div class=\"weather-item\"&gt;&lt;span&gt;城市&lt;\u002Fspan&gt;${cityName}&lt;\u002Fdiv&gt;\n              &lt;div class=\"weather-item\"&gt;&lt;span&gt;天气&lt;\u002Fspan&gt;${now.text}&lt;\u002Fdiv&gt;\n              &lt;div class=\"weather-item\"&gt;&lt;span&gt;温度&lt;\u002Fspan&gt;${now.temperature}℃&lt;\u002Fdiv&gt;\n            `;\n          } else {\n            dom.innerHTML = '&lt;div class=\"loading\"&gt;暂无天气数据&lt;\u002Fdiv&gt;';\n          }\n        } catch (e) {\n          console.error('天气加载失败:', e);\n          dom.innerHTML = '&lt;div class=\"loading\"&gt;加载失败&lt;\u002Fdiv&gt;';\n        }\n      }\n      &lt;?php endif; ?&gt;\n      \n      &lt;?php if ($this-&gt;options-&gt;JAside_Yiyan_Status == 'on') : ?&gt;\n      async function loadYiyan() {\n        const dom = document.getElementById('dwo-yiyan-content');\n        if (!dom) return;\n        try {\n          const res = await fetch(PROXY_API + '?routeType=dwo_yiyan');\n          const result = await res.json();\n          \n          if (result.data && result.data.content) {\n            dom.innerHTML = '&lt;div class=\"yiyan-content\"&gt;' + result.data.content + '&lt;\u002Fdiv&gt;';\n          } else if (result.content) {\n            dom.innerHTML = '&lt;div class=\"yiyan-content\"&gt;' + result.content + '&lt;\u002Fdiv&gt;';\n          } else {\n            dom.innerHTML = '&lt;div class=\"yiyan-content\"&gt;生活不止眼前的苟且，还有诗和远方。&lt;\u002Fdiv&gt;';\n          }\n        } catch (e) {\n          console.error('一言加载失败:', e);\n          dom.innerHTML = '&lt;div class=\"yiyan-content\"&gt;生活不止眼前的苟且，还有诗和远方。&lt;\u002Fdiv&gt;';\n        }\n      }\n      &lt;?php endif; ?&gt;\n      \n      async function loadMottoYiyan() {\n        const mottoDom = document.querySelector('.dwo-motto');\n        if (!mottoDom) return;\n        try {\n          const res = await fetch(PROXY_API + '?routeType=dwo_yiyan');\n          const result = await res.json();\n          \n          if (result.data && result.data.content) {\n            mottoDom.textContent = result.data.content;\n          } else if (result.content) {\n            mottoDom.textContent = result.content;\n          } else {\n            mottoDom.textContent = '生活不止眼前的苟且，还有诗和远方。';\n          }\n        } catch (e) {\n          console.error('座右铭一言加载失败:', e);\n          mottoDom.textContent = '生活不止眼前的苟且，还有诗和远方。';\n        }\n      }\n      \n      if (document.readyState === 'loading') {\n        document.addEventListener('DOMContentLoaded', function() {\n          loadMottoYiyan();\n          &lt;?php if ($this-&gt;options-&gt;JAside_Weather_Status == 'on') : ?&gt;loadWeather();&lt;?php endif; ?&gt;\n          &lt;?php if ($this-&gt;options-&gt;JAside_Yiyan_Status == 'on') : ?&gt;loadYiyan();&lt;?php endif; ?&gt;\n        });\n      } else {\n        loadMottoYiyan();\n        &lt;?php if ($this-&gt;options-&gt;JAside_Weather_Status == 'on') : ?&gt;loadWeather();&lt;?php endif; ?&gt;\n        &lt;?php if ($this-&gt;options-&gt;JAside_Yiyan_Status == 'on') : ?&gt;loadYiyan();&lt;?php endif; ?&gt;\n      }\n    })();\n    &lt;\u002Fscript&gt;\n  &lt;?php endif; ?&gt;\u003C\u002Fcode>\u003C\u002Fpre>\u003Ch2>第五步：使用方法\u003C\u002Fh2>\u003Ch3>1. 申请小渡 API Key\u003C\u002Fh3>\u003Cp>\u003Cstrong>访问\u003C\u002Fstrong>\u003Ca href=\" https:\u002F\u002Fapi.dwo.cc\u002F\" target=\"_blank\">\u003Cstrong> https:\u002F\u002Fapi.dwo.cc\u002F\u003C\u002Fstrong>\u003C\u002Fa>\u003Cstrong>注册账号并申请免费 API Key\u003C\u002Fstrong>\u003C\u002Fp>\u003Ch3>2. 后台配置\u003C\u002Fh3>\u003Cul>\u003Cli>\u003Cstrong>进入 Typecho 后台 → 控制台 → 外观设置 → 侧栏设置\u003C\u002Fstrong>\u003C\u002Fli>\u003Cli>\u003Cstrong>填写「小渡 API Key - 通用」\u003C\u002Fstrong>\u003C\u002Fli>\u003Cli>\u003Cstrong>开启「实时天气栏」和 \u002F 或「一言栏」\u003C\u002Fstrong>\u003C\u002Fli>\u003Cli>\u003Cstrong>保存设置\u003C\u002Fstrong>\u003C\u002Fli>\u003C\u002Ful>\u003Ch3>3. 查看效果\u003C\u002Fh3>\u003Cul>\u003Cli>\u003Cstrong>刷新博客页面侧边栏会显示实时天气和每日一言\u003C\u002Fstrong>\u003C\u002Fli>\u003Cli>\u003Cstrong>博主栏座右铭自动显示动态一言API \u003C\u002Fstrong>\u003C\u002Fli>\u003Cli>\u003Cstrong>Key 完全隐藏，不会出现在前端请求中\u003C\u002Fstrong>\u003C\u002Fli>\u003C\u002Ful>\u003Ch2>\u003Cstrong>文件修改清单\u003C\u002Fstrong>\u003C\u002Fh2>\u003Ctable style=\"width: auto;\">\u003Ctbody>\u003Ctr>\u003Cth colSpan=\"1\" rowSpan=\"1\" width=\"auto\">文件路径\u003C\u002Fth>\u003Cth colSpan=\"1\" rowSpan=\"1\" width=\"auto\">修改类型\u003C\u002Fth>\u003Cth colSpan=\"1\" rowSpan=\"1\" width=\"auto\">说明\u003C\u002Fth>\u003C\u002Ftr>\u003Ctr>\u003Ctd colSpan=\"1\" rowSpan=\"1\" width=\"auto\">\u003Cstrong>functions.php\u003C\u002Fstrong>\u003C\u002Ftd>\u003Ctd colSpan=\"1\" rowSpan=\"1\" width=\"auto\">修改\u003C\u002Ftd>\u003Ctd colSpan=\"1\" rowSpan=\"1\" width=\"auto\">\u003Cstrong>替换天气配置为通用小渡 API 配置\u003C\u002Fstrong>\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd colSpan=\"1\" rowSpan=\"1\" width=\"auto\">\u003Cstrong>core\u002Froute.php\u003C\u002Fstrong>\u003C\u002Ftd>\u003Ctd colSpan=\"1\" rowSpan=\"1\" width=\"auto\">新增\u003C\u002Ftd>\u003Ctd colSpan=\"1\" rowSpan=\"1\" width=\"auto\">\u003Cstrong>添加 3 个代理接口函数\u003C\u002Fstrong>\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd colSpan=\"1\" rowSpan=\"1\" width=\"auto\">\u003Cstrong>core\u002Fcore.php\u003C\u002Fstrong>\u003C\u002Ftd>\u003Ctd colSpan=\"1\" rowSpan=\"1\" width=\"auto\">新增\u003C\u002Ftd>\u003Ctd colSpan=\"1\" rowSpan=\"1\" width=\"auto\">\u003Cstrong>注册代理路由\u003C\u002Fstrong>\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd colSpan=\"1\" rowSpan=\"1\" width=\"auto\">\u003Cstrong>public\u002Faside.php\u003C\u002Fstrong>\u003C\u002Ftd>\u003Ctd colSpan=\"1\" rowSpan=\"1\" width=\"auto\">修改\u003C\u002Ftd>\u003Ctd colSpan=\"1\" rowSpan=\"1\" width=\"auto\">\u003Cstrong>替换天气 \u002F 一言显示代码\u003C\u002Fstrong>\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003Cblockquote>好了就这点文字您慢慢看\u003C\u002Fblockquote>","Joe主题集成小渡API（天气+一言）完整教程","https:\u002F\u002Fweather-real.oss-cn-shanghai.aliyuncs.com\u002Fweather\u002F2025-06-17\u002F1750091570711NV9TYw.jpg","2026-03-13 22:00:19","joe,typecho,小渡API",4,16,1,3,"已上架"]