├── imgs ├── 1.png ├── 2.png ├── 3.png ├── 4.png ├── 5.png └── 6.png ├── src ├── icon.png ├── info.json └── main.js ├── .gitignore ├── .github └── workflows │ └── release.yaml ├── release.sh ├── README.md ├── LICENSE └── appcast.json /imgs/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhaowin/wordbook-bob-plugin/HEAD/imgs/1.png -------------------------------------------------------------------------------- /imgs/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhaowin/wordbook-bob-plugin/HEAD/imgs/2.png -------------------------------------------------------------------------------- /imgs/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhaowin/wordbook-bob-plugin/HEAD/imgs/3.png -------------------------------------------------------------------------------- /imgs/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhaowin/wordbook-bob-plugin/HEAD/imgs/4.png -------------------------------------------------------------------------------- /imgs/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhaowin/wordbook-bob-plugin/HEAD/imgs/5.png -------------------------------------------------------------------------------- /imgs/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhaowin/wordbook-bob-plugin/HEAD/imgs/6.png -------------------------------------------------------------------------------- /src/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhaowin/wordbook-bob-plugin/HEAD/src/icon.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | 3 | /node_modules 4 | /.pnp 5 | .pnp.js 6 | 7 | # testing 8 | /coverage 9 | 10 | # production 11 | /build 12 | /release 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | 25 | .vercel 26 | -------------------------------------------------------------------------------- /.github/workflows/release.yaml: -------------------------------------------------------------------------------- 1 | name: release 2 | 3 | on: 4 | push: 5 | tags: 6 | - 'v*' 7 | workflow_dispatch: 8 | 9 | jobs: 10 | Build: 11 | if: startsWith(github.ref, 'refs/tags/v') 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: checkout 15 | uses: actions/checkout@v4 16 | - name: build 17 | run: bash release.sh ${{ github.ref }} 18 | - name: release 19 | uses: softprops/action-gh-release@v2 20 | with: 21 | draft: false 22 | files: | 23 | dist/*.bobplugin 24 | - name: clean up 25 | run: rm -rf dist 26 | - name: commit 27 | uses: stefanzweifel/git-auto-commit-action@v4 28 | with: 29 | branch: main 30 | commit_message: new release! 31 | -------------------------------------------------------------------------------- /release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | version=${1#refs/tags/v} 4 | 5 | zip -r -j wordbook-bob-plugin-v$version.bobplugin src/* 6 | 7 | sha256_wordbook=$(sha256sum wordbook-bob-plugin-v$version.bobplugin | cut -d ' ' -f 1) 8 | echo $sha256_wordbook 9 | 10 | download_link="https://github.com/yuhaowin/wordbook-bob-plugin/releases/download/v$version/wordbook-bob-plugin-v$version.bobplugin" 11 | 12 | new_version="{\"version\": \"$version\", \"desc\": \"https://github.com/yuhaowin/wordbook-bob-plugin/releases/tag/v$version\", \"sha256\": \"$sha256_wordbook\", \"url\": \"$download_link\", \"minBobVersion\": \"1.12.0\"}" 13 | 14 | json_file='appcast.json' 15 | json_data=$(cat $json_file) 16 | 17 | updated_json=$(echo $json_data | jq --argjson new_version "$new_version" '.versions += [$new_version]') 18 | 19 | echo $updated_json | jq . >$json_file 20 | mkdir dist 21 | mv *.bobplugin dist 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # wordbook-bob-plugin 2 | 3 | 这是一个 [Bob](https://github.com/ripperhe/Bob) 的翻译插件,但是该插件不对输入的文本进行翻译,听起来不可思议,但的确如。该插件主要是将输入的英文单词或短语通过接口的方式同步到 `有道词典` 、`欧路词典` 4 | 的单词本中,以方便对查询过的单词进行集中复习。 5 | 6 | ## 特性 7 | 8 | 1、`有道词典` 仅实现了通过 cookie 的方式添加单词到单词本;无法使用账号登录,[因为 Bob 提供的 API 无法获取到请求返回的 9 | cookie](https://github.com/ripperhe/Bob/issues/115)。 10 | 11 | 2、`欧路词典` 是通过开放 api 添加到指导单词本,但是需要指定单词本的 id,可以通过 api 获取单词本 id。 12 | 13 | 3、`扇贝单词` 是通过 api 添加到指导单词本,需要登录后从网页获取 auth_token 14 | ## 设置 15 | 16 | ![](imgs/1.png) 17 | 18 | ## 有道词典获取 cookie 19 | 20 | 1、[登录有道词典](https://dict.youdao.com/) 21 | 22 | 2、如下图操作: 23 | 24 | ![](imgs/2.png) 25 | 26 | 3、在控制台执行 `document.cookie` 获取到 cookie 27 | 28 | ## 欧路词典获取 token 29 | 30 | 1、[登录欧路词典](https://dict.eudic.net/) 31 | 32 | 2、在右上角「账户管理」获取授权 33 | 34 | ![](imgs/3.png) 35 | 36 | 3、获取单词本 id 37 | > 如果不知道单词本 id,可以先不填写单词本 id, 输入任意单词查询后,会返回所有的单词本 id,选择其中你需要的 id 填入即可。 38 | 39 | ![](imgs/4.png) 40 | 41 | ## 扇贝单词获取 auth_token 42 | 1、[登录扇贝](https://www.shanbay.com/) 43 | 44 | 3、随便点击一个页面,获取 cookie 中的 auth_token,确保 auth_token 正确 45 | 46 | ![](imgs/6.png) 47 | ## 效果 48 | 49 | ![](imgs/5.png) 50 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 yuhaowin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "identifier": "wordbook-bob-plugin", 3 | "version": "0.2.3", 4 | "category": "translate", 5 | "name": "单词本插件", 6 | "summary": "word book plugin, add word to youdao/eudic/shanday word book", 7 | "icon": "", 8 | "author": "Eric_余浩", 9 | "homepage": "https://blog.yuhaowin.com/2021-01-03-wordbook-bob-plugin", 10 | "appcast": "https://raw.githubusercontent.com/yuhaowin/wordbook-bob-plugin/main/appcast.json", 11 | "minBobVersion": "1.12.0", 12 | "options": [ 13 | { 14 | "identifier": "dict_type", 15 | "type": "menu", 16 | "title": "词典类型", 17 | "defaultValue": "1", 18 | "menuValues": [ 19 | { 20 | "title": "有道词典", 21 | "value": "1" 22 | }, 23 | { 24 | "title": "欧路词典", 25 | "value": "2" 26 | }, 27 | { 28 | "title": "扇贝单词", 29 | "value": "3" 30 | } 31 | ] 32 | }, 33 | { 34 | "identifier": "authorization", 35 | "type": "text", 36 | "title": "认证信息", 37 | "textConfig": { 38 | "type": "secure", 39 | "placeholderText": "填写 api token" 40 | } 41 | }, 42 | { 43 | "identifier": "word_only", 44 | "type": "menu", 45 | "title": "仅保存单词", 46 | "desc": "是否仅保存「单词」或「词组」。", 47 | "defaultValue": "1", 48 | "menuValues": [ 49 | { 50 | "title": "是", 51 | "value": "1" 52 | }, 53 | { 54 | "title": "否", 55 | "value": "0" 56 | } 57 | ] 58 | }, 59 | { 60 | "identifier": "wordbook_id", 61 | "type": "text", 62 | "title": "欧路单词本 id", 63 | "desc": "仅词典类型为「欧路词典」时需要填写。", 64 | "textConfig": { 65 | "type": "visible", 66 | "placeholderText": "点击「验证」获取已有单词本 id,填入后再次点击「验证」确认是否正确。" 67 | } 68 | } 69 | ] 70 | } 71 | -------------------------------------------------------------------------------- /appcast.json: -------------------------------------------------------------------------------- 1 | { 2 | "identifier": "wordbook-bob-plugin", 3 | "versions": [ 4 | { 5 | "version": "0.1.0", 6 | "desc": "https://github.com/yuhaowin/youdao-wordbook-bob-plugin/releases/tag/v0.1.0", 7 | "sha256": "26d0fd4e5ac32af3767ebb47437a927209c5bfe4c9c44aabaa00dae6a2a97d48", 8 | "url": "https://github.com/yuhaowin/youdao-wordbook-bob-plugin/releases/download/v0.1.0/youdao-wordbook-bob-plugin-v0.1.0.bobplugin", 9 | "minBobVersion": "0.5.4" 10 | }, 11 | { 12 | "version": "0.1.1", 13 | "desc": "https://github.com/yuhaowin/youdao-wordbook-bob-plugin/releases/tag/v0.1.1", 14 | "sha256": "aadf5188c05aad613889849c35e04fdd28048196e492660ed85ed31407f13ea1", 15 | "url": "https://github.com/yuhaowin/youdao-wordbook-bob-plugin/releases/download/v0.1.1/youdao-wordbook-bob-plugin-v0.1.1.bobplugin", 16 | "minBobVersion": "0.5.4" 17 | }, 18 | { 19 | "version": "0.1.2", 20 | "desc": "https://github.com/yuhaowin/youdao-wordbook-bob-plugin/releases/tag/v0.1.2", 21 | "sha256": "67a6240d58557907f4bfa739c15d24a638cd597f236776a544aae3a35e8fbbc9", 22 | "url": "https://github.com/yuhaowin/youdao-wordbook-bob-plugin/releases/download/v0.1.2/youdao-wordbook-bob-plugin-v0.1.2.bobplugin", 23 | "minBobVersion": "0.5.4" 24 | }, 25 | { 26 | "version": "0.1.3", 27 | "desc": "https://github.com/yuhaowin/youdao-wordbook-bob-plugin/releases/tag/v0.1.3", 28 | "sha256": "8ba656bfb4081ee08e1cbb0a2a8c226ac411ca074d194326f6b3f095d5c176d3", 29 | "url": "https://github.com/yuhaowin/youdao-wordbook-bob-plugin/releases/download/v0.1.3/youdao-wordbook-bob-plugin-v0.1.3.bobplugin", 30 | "minBobVersion": "0.5.4" 31 | }, 32 | { 33 | "version": "0.1.4", 34 | "desc": "https://github.com/yuhaowin/youdao-wordbook-bob-plugin/releases/tag/v0.1.4", 35 | "sha256": "9cc63f7a054bf66b8e8138c04f33c3c382288b3671f0998f5bbfff2881565087", 36 | "url": "https://github.com/yuhaowin/youdao-wordbook-bob-plugin/releases/download/v0.1.4/youdao-wordbook-bob-plugin-v0.1.4.bobplugin", 37 | "minBobVersion": "0.5.4" 38 | }, 39 | { 40 | "version": "0.1.5", 41 | "desc": "https://github.com/yuhaowin/wordbook-bob-plugin/releases/tag/v0.1.5", 42 | "sha256": "55bca4fa159d37096aee8fbef2cd02ffc72e66d40c2d4db9bd3f71953ee6c4e5", 43 | "url": "https://github.com/yuhaowin/wordbook-bob-plugin/releases/download/v0.1.5/wordbook-bob-plugin-v0.1.5.bobplugin", 44 | "minBobVersion": "0.5.4" 45 | }, 46 | { 47 | "version": "0.1.6", 48 | "desc": "https://github.com/yuhaowin/wordbook-bob-plugin/releases/tag/v0.1.6", 49 | "sha256": "e030b33c99716946b45c685641a4660dd263f74b309dcc3bd1a82653441b41f3", 50 | "url": "https://github.com/yuhaowin/wordbook-bob-plugin/releases/download/v0.1.6/wordbook-bob-plugin-v0.1.6.bobplugin", 51 | "minBobVersion": "0.5.4" 52 | }, 53 | { 54 | "version": "0.1.7", 55 | "desc": "https://github.com/yuhaowin/wordbook-bob-plugin/releases/tag/v0.1.7", 56 | "sha256": "a8208859e02a571dd3e0597b61a2a84a67de7f56953bf28a99aafc23e1caf5c6", 57 | "url": "https://github.com/yuhaowin/wordbook-bob-plugin/releases/download/v0.1.7/wordbook-bob-plugin-v0.1.7.bobplugin", 58 | "minBobVersion": "0.5.4" 59 | }, 60 | { 61 | "version": "0.1.8", 62 | "desc": "https://github.com/yuhaowin/wordbook-bob-plugin/releases/tag/v0.1.8", 63 | "sha256": "9653645f46b47af69b65de165f2ea87e07eb5ba82e46044b90baaf3907a03d36", 64 | "url": "https://github.com/yuhaowin/wordbook-bob-plugin/releases/download/v0.1.8/wordbook-bob-plugin-v0.1.8.bobplugin", 65 | "minBobVersion": "0.5.4" 66 | }, 67 | { 68 | "version": "0.1.9", 69 | "desc": "https://github.com/yuhaowin/wordbook-bob-plugin/releases/tag/v0.1.9", 70 | "sha256": "bdc2a32c20c38bc04330bbe60b47c3b52bb9295d2335b8734cf0932598349eaa", 71 | "url": "https://github.com/yuhaowin/wordbook-bob-plugin/releases/download/v0.1.9/wordbook-bob-plugin-v0.1.9.bobplugin", 72 | "minBobVersion": "0.5.4" 73 | }, 74 | { 75 | "version": "0.2.2", 76 | "desc": "https://github.com/yuhaowin/wordbook-bob-plugin/releases/tag/v0.2.2", 77 | "sha256": "e147964c7d54d14676c22d700c98a4e95d160a72889f0d54732797ac6deab7d6", 78 | "url": "https://github.com/yuhaowin/wordbook-bob-plugin/releases/download/v0.2.2/wordbook-bob-plugin-v0.2.2.bobplugin", 79 | "minBobVersion": "1.12.0" 80 | }, 81 | { 82 | "version": "0.2.3", 83 | "desc": "https://github.com/yuhaowin/wordbook-bob-plugin/releases/tag/v0.2.3", 84 | "sha256": "06947d9407eb9fb6ea67d4a054de42e4ed9497f70338f26829ea8ee3dd1776b8", 85 | "url": "https://github.com/yuhaowin/wordbook-bob-plugin/releases/download/v0.2.3/wordbook-bob-plugin-v0.2.3.bobplugin", 86 | "minBobVersion": "1.12.0" 87 | } 88 | ] 89 | } 90 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 单词本插件 3 | */ 4 | 5 | // 有道单词本 6 | var YOUDAO_ADD_WORD_URL = "https://dict.youdao.com/wordbook/webapi/v2/ajax/add?lan=en&word="; 7 | 8 | // 扇贝单词本 9 | var SHANBAY_ADD_WORD_URL = "https://apiv3.shanbay.com/wordscollection/words_bulk_upload" 10 | 11 | // 欧路单词本 12 | var EUDIC_ADD_WORD_URL = "https://api.frdic.com/api/open/v1/studylist/words"; 13 | var EUDIC_BOOK_LIST_URL = "https://api.frdic.com/api/open/v1/studylist/category?language=en"; 14 | 15 | function buildResult(res) { 16 | var result = { 17 | "from": "en", 18 | "to": "zh-Hans", 19 | "toParagraphs": [res], 20 | "fromParagraphs": [ 21 | "success add to word book" 22 | ] 23 | } 24 | return result; 25 | } 26 | 27 | function buildError(res) { 28 | var result = { 29 | 'type': 'param', 30 | 'message': res, 31 | 'addtion': '无' 32 | } 33 | return result; 34 | } 35 | 36 | // override 37 | function supportLanguages() { 38 | return ['zh-Hans', 'en']; 39 | } 40 | 41 | // override 42 | function pluginValidate(completion) { 43 | var selected_dict = $option.dict_type; 44 | var authorization = $option.authorization; 45 | if (authorization) { 46 | doValidate(selected_dict, authorization, completion); 47 | } else { 48 | completion({ 49 | result: false, 50 | error: { 51 | type: "secretKey", 52 | message: "未设置认证信息。", 53 | troubleshootingLink: "https://github.com/yuhaowin/wordbook-bob-plugin" 54 | } 55 | }); 56 | } 57 | } 58 | 59 | function doValidate(selected_dict, authorization, completion) { 60 | 61 | // 验证欧路词典配置参数 62 | if (selected_dict == 2) { 63 | var wordbook_id = $option.wordbook_id 64 | if (!wordbook_id) { 65 | queryEudicWordbookIds(authorization, completion) 66 | } else { 67 | addWordEudic(authorization, 'test', wordbook_id, function (res) { 68 | if (201 === res.response.statusCode) { 69 | completion({result: true}); 70 | } else { 71 | queryEudicWordbookIds(authorization, completion) 72 | } 73 | }); 74 | } 75 | } 76 | } 77 | 78 | function queryEudicWordbookIds(token, completion) { 79 | $http.get({ 80 | url: EUDIC_BOOK_LIST_URL, 81 | header: { 82 | 'Authorization': token, 83 | 'Content-Type': 'application/json', 84 | 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36' 85 | }, 86 | handler: function (res) { 87 | var statusCode = res.response.statusCode; 88 | if (statusCode === 200) { 89 | var data = res.data.data; 90 | completion({ 91 | result: false, 92 | error: { 93 | type: "param", 94 | message: "请选择欧路词典单词本 id : \r\n" + JSON.stringify(data, null, 4) 95 | } 96 | }); 97 | } else { 98 | completion({ 99 | result: false, 100 | error: { 101 | type: "param", 102 | message: "欧路词典 token 错误或过期,请重新填写。", 103 | troubleshootingLink: "https://github.com/yuhaowin/wordbook-bob-plugin" 104 | } 105 | }); 106 | $log.info('接口返回值 data : ' + JSON.stringify(data)); 107 | } 108 | } 109 | }); 110 | } 111 | 112 | // override 113 | function translate(query, completion) { 114 | var text = query.text; 115 | var from_language = query.detectFrom; 116 | var selected_dict = $option.dict_type; 117 | var word_only = $option.word_only; 118 | var authorization = $option.authorization; 119 | var need_save = (word_only == 0 || text.search(' ') < 1); 120 | if (from_language != 'en' || !need_save) { 121 | completion({'result': buildResult("中文、非英语单词无需添加单词本")}); 122 | return; 123 | } 124 | if (authorization) { 125 | addWord(selected_dict, authorization, text, completion); 126 | } else { 127 | completion({'error': buildError('「认证信息」缺失')}); 128 | } 129 | } 130 | 131 | function addWord(selected_dict, authorization, word, completion) { 132 | if (selected_dict == 1) { // 保存有道单词本 133 | addWordYoudao(authorization, word, completion); 134 | } 135 | if (selected_dict == 2) { // 保存欧路单词本 136 | var wordbook_id = $option.wordbook_id; 137 | addWordEudic(authorization, word, wordbook_id, function (res) { 138 | if (201 === res.response.statusCode) { 139 | completion({'result': buildResult("添加单词成功")}); 140 | } else { 141 | completion({'error': buildError('欧路词典 token 错误或过期,请重新填写。')}); 142 | $log.info('addWord 接口返回值 data : ' + JSON.stringify(res.data)); 143 | } 144 | }); 145 | } 146 | if (selected_dict == 3) { // 保存扇贝单词本 147 | addWordShanbay(authorization, word, completion); 148 | } 149 | } 150 | 151 | function addWordYoudao(cookie, word, completion) { 152 | $http.get({ 153 | url: YOUDAO_ADD_WORD_URL + encodeURIComponent(word), 154 | header: { 155 | 'Cookie': cookie, 156 | 'Host': 'dict.youdao.com', 157 | 'Upgrade-Insecure-Requests': 1, 158 | 'Accept-Encoding': 'gzip, deflate', 159 | 'Accept-Language': 'zh-CN,zh;q=0.9', 160 | 'Accept': 'application/json, text/plain, */*', 161 | 'Referer': 'https://dict.youdao.com', 162 | 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36' 163 | }, 164 | handler: function (res) { 165 | var data = res.data; 166 | if (data.code === 0) { 167 | completion({'result': buildResult("添加单词成功")}); 168 | } else { 169 | completion({'error': buildError('有道词典 cookie 错误或过期,请重新填写。')}); 170 | $log.info('addWord 接口返回值 data : ' + JSON.stringify(data)); 171 | } 172 | } 173 | }); 174 | } 175 | 176 | function addWordEudic(token, word, wordbook_id, handler) { 177 | $http.post({ 178 | url: EUDIC_ADD_WORD_URL, 179 | header: { 180 | 'Authorization': token, 181 | 'Content-Type': 'application/json', 182 | 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36' 183 | }, 184 | body: { 185 | "id": wordbook_id, // 单词本 id 186 | "language": "en", 187 | "words": [ 188 | word 189 | ] 190 | }, 191 | handler: handler 192 | }); 193 | } 194 | 195 | function addWordShanbay(token, word, completion) { 196 | $http.post({ 197 | url: SHANBAY_ADD_WORD_URL, 198 | header: { 199 | "Cookie": `auth_token=${token}`, 200 | 'Content-Type': 'application/json', 201 | 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36' 202 | }, 203 | body: { 204 | "business_id": 6, 205 | "words": [ 206 | word 207 | ] 208 | }, 209 | handler: function (res) { 210 | if (res.response.statusCode === 200) { 211 | completion({'result': buildResult("添加单词本成功")}); 212 | } else { 213 | completion({'error': buildError('扇贝词典 auth_token 错误或过期,请重新填写。')}); 214 | $log.info('接口返回值 data : ' + JSON.stringify(data)); 215 | } 216 | } 217 | }); 218 | } 219 | --------------------------------------------------------------------------------