英语词典小程序

基于英语词典小程序插件 - 提供开源地址

项目地址

英语词典小程序插件: 微信小程序 词典 真题基础服务插件(gitee.com)

功能特色

  • [x] 全面详实的经典词库,详细释义覆盖约1.2w词,精简释义覆盖基本全部词汇
  • [x] 提供多语言识别翻译功能接口
  • [x] 不断完善的例句库,涵盖四六级和考研英语例句
  • [x] 详实的单词分类,针对不同需求,提供单词记背需要
  • [x] 单词例句以组件形式呈现,方便小程序引入使用
  • [x] 提供第三方插件API供调用,可自定义展现形式

功能预览

插件提供部分可以直接调用的组件或功能页

单词册 & 单词详情

顶部栏查词组件 & 英汉互译功能

插件使用文档


申请权限

  • 请在小程序后台搜索本插件(AppID=wx2facb7b57eedf7e6) 设置-第三方服务-添加插件英语词典

调用限制

  • 插件无调用限制
  • API需要发邮件申请 kindear@foxmail.com(暂未开放)

调用方式

插件最新版本为 1.8.1

全局app.json配置

"plugins": {
"edict-plugin": {
"version": "1.8.1",
"provider": "wx2facb7b57eedf7e6"
}
}

功能页

单词册

需要携带参数userId,一般为用户openid

wx.navigateTo({
url: 'plugin://edict-plugin/index?userId=xxxxxxxxx',
})

词句详情页

需要携带参数word

wx.navigateTo({
url: 'plugin://edict-plugin/word?word=xxxxxxx',
})

英汉互译页

wx.navigateTo({
url: 'plugin://edict-plugin/en-zh',
})

组件

插件提供了对外暴露的组件,可以由外部页面直接引入使用

顶部查词栏

引入方式

{
"usingComponents": {
"nav-search":"plugin://edict-plugin/nav-search"
}
}

使用方式

  • Props
参数 说明 类型
navshow 是否展示该组件 Boolean
  • Events
参数 说明 类型
wordselect 单词选择事件,可与词句功能页组合使用 Event
<nav-search navshow="true" bind:wordselect="wordselect"></nav-search>

单词盒子

引入方式

{
"usingComponents": {
"word-box":"plugin://edict-plugin/word-box"
}
}

使用方式

参数 说明 类型
word 传入单词 string
<word-box word="equal"></word-box>

例句盒子

引入方式

{
"usingComponents": {
"sentence-box":"plugin://edict-plugin/sentence-box"
}
}

使用方式

参数 说明 类型
word 传入单词 string
<sentence-box word="mindful"></sentence-box>

接口

使用插件内部接口需要在页面引入插件

var plugin = requirePlugin("edict-plugin");

单词前缀匹配

参数 说明 类型
prefix 单词前缀 string
plugin.preMatchWord(prefix).then(res=>{
console.log(res)
})

英汉互译(自动检测)

参数 说明 类型
sentence 待翻译句子 string
plugin.translationEnZh(sentence).then(res=>{
console.log(res)
})

定向翻译(自动检测源语言)

参数 说明 类型
target 目标语言代码,详见底部附录语言对照表Code string
sentence 待翻译句子 string
plugin.translationTo(target, sentence).then(res=>{
console.log(res)
})

单词查询

参数 说明 类型
word 待查询单词 string
plugin.wordQuery(word).then(res=>{
console.log(res)
})

例句查询

参数 说明 类型
word 待查询单词 string
plugin.sentenceQuery(word).then(res=>{
console.log(res)
})

获取用户收藏列表

参数 说明 类型
openId 用户唯一openId string
plugin.getFavorWord(openId).then(res=>{
console.log(res)
})

判断用户是否收藏单词

参数 说明 类型
openId 用户唯一openId string
word 待查询单词 string
plugin.isFavor(openId,word).then(res=>{
console.log(res)
})

用户新增收藏单词

参数 说明 类型
openId 用户唯一openId string
word 待查询单词 string
plugin.addFavor(openId,word).then(res=>{
console.log(res)
})

用户移除收藏单词

参数 说明 类型
openId 用户唯一openId string
word 待查询单词 string
plugin.pullFavor(openId,word).then(res=>{
console.log(res)
})

更新日志

1.8.1

发布时间:2021-07-26

  1. 使用云开发CloudBase 重构项目
  2. 提供第三方访问API

1.7.0

发布时间: 2021-04-20

  1. 请求重定向整合,优化了数据获取速度
  2. 缓存数据获取 bug fixed
  3. 提供了几个可供小程序调用的接口

1.6.1

发布时间:2021-03-15

  1. 部分单词查询 404 情况的处理 bug fixed
  2. 调整了API接口规则

1.6.0

发布时间:2021-03-08

  1. 此后的接口地址为长期维护,不会废弃(LTS)

1.5.2(接口已废弃)

发布时间:2021-03-02

1.5.1(接口已废弃)

发布时间:2021-03-01

  1. 初始版本

交流群

小程序开发/插件开发交流群: 625756936

附录

语言参数对照表

Language Code
Afrikaans af
Albanian sq
Amharic am
Arabic ar
Armenian hy
Azeerbaijani az
Basque eu
Belarusian be
Bengali bn
Bosnian bs
Bulgarian bg
Catalan ca
Cebuano ceb
Chinese (Simplified) zh-CN
Chinese (Traditional) zh-TW
Corsican co
Croatian hr
Czech cs
Danish da
Dutch nl
English en
Esperanto eo
Estonian et
Finnish fi
French fr
Frisian fy
Galician gl
Georgian ka
German de
Greek el
Gujarati gu
Haitian Creole ht
Hausa ha
Hawaiian haw (ISO-639-2)
Hebrew iw
Hindi hi
Hmong hmn (ISO-639-2)
Hungarian hu
Icelandic is
Igbo ig
Indonesian id
Irish ga
Italian it
Japanese ja
Javanese jw
Kannada kn
Kazakh kk
Khmer km
Korean ko
Kurdish ku
Kyrgyz ky
Lao lo
Latin la
Latvian lv
Lithuanian lt
Luxembourgish lb
Macedonian mk
Malagasy mg
Malay ms
Malayalam ml
Maltese mt
Maori mi
Marathi mr
Mongolian mn
Myanmar (Burmese) my
Nepali ne
Norwegian no
Nyanja (Chichewa) ny
Pashto ps
Persian fa
Polish pl
Portuguese (Portugal, Brazil) pt
Punjabi pa
Romanian ro
Russian ru
Samoan sm
Scots Gaelic gd
Serbian sr
Sesotho st
Shona sn
Sindhi sd
Sinhala (Sinhalese) si
Slovak sk
Slovenian sl
Somali so
Spanish es
Sundanese su
Swahili sw
Swedish sv
Tagalog (Filipino) tl
Tajik tg
Tamil ta
Telugu te
Thai th
Turkish tr
Ukrainian uk
Urdu ur
Uzbek uz
Vietnamese vi
Welsh cy
Xhosa xh
Yiddish yi
Yoruba yo
Zulu zu

微信小程序 -- 英语词典 (小程序插件)的更多相关文章

  1. 英语单词小程序插件 - EdictPlugin-LTS

    1.插件引入 全局app.json配置 "plugins": { "edict-plugin": { "version": "1. ...

  2. 详解封装微信小程序组件及小程序坑(附带解决方案)

    一.序 上一篇介绍了如何从零开发微信小程序,博客园审核变智障了,每次代码都不算篇幅,好好滴一篇原创,不到3分钟从首页移出来了.这篇介绍一下组件封装和我的踩坑历程. 二.封装微信小程序可复用组件 首先模 ...

  3. 微信小程序转百度小程序修改

    百度小程序对比微信小程序(最初版):[设备]项里没有内存监控.iBeacon.wifi.蓝牙.用户截屏.手机联系人.NFC[位置]项里没有打开地图选择位置[界面]项里没有绘图功能.没有节点信息获取功能 ...

  4. 微信小程序跳一跳辅助程序(手动版)

    最近,微信官方推出了demo小程序游戏<跳一跳>,这个游戏操作简单,容易上手,却又不容易获得高分,受到很多人的喜爱(emm...这游戏有毒).自己也尝试了玩了几次,作为一个手残+脑残的资深 ...

  5. 微信小程序基础之在微信上显示和体验小程序?

    随着小程序正式上线,用户现在可以通过二维码.搜索等方式体验到开发者们开发的小程序了. 用户只要将微信更新至最新版本,体验过小程序后,便可在发现页面看到小程序TAB,但微信并不会通过这个地方向用户推荐小 ...

  6. 微信小程序代码大全 - 小程序开发福利

    小程序QQ交流群:131894955 小程序开发文档(Wepy) 小程序商城源码下载(weixin-app-shop) 小程序官网源码下载(weixin-app-cms) 微信管家平台JAVA版开源下 ...

  7. 微信小程序生命周期——小程序的生命周期及页面的生命周期。

    最近在做微信小程序开发,也发现一些坑,分享一下自己踩过的坑. 生命周期是指一个小程序从创建到销毁的一系列过程. 在小程序中 ,通过App()来注册一个小程序 ,通过Page()来注册一个页面. 首先来 ...

  8. 微信小程序-通知滚动小提示

    代码地址如下:http://www.demodashi.com/demo/14044.html 一.前期准备工作 软件环境:微信开发者工具 官方下载地址:https://mp.weixin.qq.co ...

  9. 微信小程序转换为百度小程序

    据粗略预估,微信小程序和百度小程序,有至少90%以上的相似代码,而且api的参数和返回的数据都是一致的,有一些不一致的将做如下介绍:.wxml文件,改成后辍名.swan.wxss文件,改成后辍名为.c ...

随机推荐

  1. 一次性讲清楚spring中bean的生命周期之二:FactoryBean的前世今生

    前言 在<spring中FactoryBean是什么bean>一文中,带着小伙伴学习了spring中的FactoryBean,了解了到了FactoryBean其实是一种生产Bean的bea ...

  2. 温故知新,使用ASP.NET Core创建Web API,永远第一次

    ASP.NET Core简介 ASP.NET Core是一个跨平台的高性能开源框架,用于生成启用云且连接Internet的新式应用. 使用ASP.NET Core,您可以: 生成Web应用和服务.物联 ...

  3. ABP Framework V4.4 RC 新增功能介绍

    目录 新增功能概述 启动模板删除 EntityFrameworkCore.DbMigrations 项目 CMS-Kit 动态菜单管理 Razor引擎对文本模板的支持 DbContext/Entiti ...

  4. 无向图(邻接表实现)DFS_AND_BFS

    数据结构选择TreeSet的原因:通过自定义的Compare方法,保证了点元素的唯一性,有序性(方便检验): 传入Set和Map中的元素类似于C中的指针操作,即共享地址,改变其中一个中的元素,与之相关 ...

  5. 增强采样软件PLUMED的安装与使用

    技术背景 增强采样(Enhanced Sampling)是一种在分子动力学模拟中常用的技术,其作用是帮助我们更加快速的在时间轴上找到尽可能多的体系结构及其对应的能量.比如一个氢气的燃烧反应,在中间过程 ...

  6. Defense:MS08067漏洞攻防渗透实验

    实验环境 Windows XP SP3 IP:172.16.211.129 百度网盘:https://pan.baidu.com/s/1dbBGdkM6aDzXcKajV47zBw     靶机环境 ...

  7. 资源:CentOS下载地址资源

    新版本系统镜像下载(当前最新是CentOS 7.4版本) CentOS官网 官网地址 http://isoredirect.centos.org/centos/7.4.1708/isos/x86_64 ...

  8. PHP严格类型检查模式

    前言 PHP默认情况下是弱类型校验模式,在php7下declare新增了strict_types指令,通过设置strict_types的值(1或者0),1表示严格类型校验模式,作用于函数调用和返回语句 ...

  9. 解决pip安装时出现报错TypeError unsupported operand type(s) for -= 'Retry' and 'int'

    1.参考 https://stackoverflow.com/questions/42610545/typeerror-unsupported-operand-types-for-retry-and- ...

  10. leetcode 数组分成和相等的三个部分

    题目: 给你一个整数数组 A,只有可以将其划分为三个和相等的非空部分时才返回 true,否则返回 false. 形式上,如果可以找出索引 i+1 < j 且满足 (A[0] + A[1] + . ...