From 915b0626ad7e6cfb0e1afd58af9068832d4737dc Mon Sep 17 00:00:00 2001 From: Coding Zhang <2291200076@qq.com> Date: Tue, 17 Aug 2021 22:22:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=86=85=E9=83=A8=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E2=86=92=E8=83=8CTa=E5=8D=95=E8=AF=8D=20=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E5=8D=87=E7=BA=A7=E5=90=91=E5=AF=BCApi=E6=96=87?= =?UTF-8?q?=E6=A1=A3=EF=BC=8C=E6=A0=B9=E6=8D=AE=E7=AE=A1=E5=B1=80=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E4=BF=AE=E6=94=B9=E9=A1=B5=E8=84=9A=E5=A4=87=E6=A1=88?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/_footer.md | 2 +- docs/_sidebar.md | 8 +- docs/manual/internal/deployment-wizard.md | 80 +++++++++++++++++++ .../{logo-specification => logo}/name.md | 0 .../{logo-specification => logo}/tavi.md | 0 5 files changed, 86 insertions(+), 4 deletions(-) create mode 100644 docs/manual/internal/deployment-wizard.md rename docs/manual/standard/{logo-specification => logo}/name.md (100%) rename docs/manual/standard/{logo-specification => logo}/tavi.md (100%) diff --git a/docs/_footer.md b/docs/_footer.md index 91a0fd8..8a9755d 100644 --- a/docs/_footer.md +++ b/docs/_footer.md @@ -2,7 +2,7 @@

- 鄂ICP备19016486号
+ 鄂ICP备19016486号-4
背Ta单词官方文档 | 背Ta团队
tawords offical document | tawords team

diff --git a/docs/_sidebar.md b/docs/_sidebar.md index f873474..07b88ef 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -37,8 +37,8 @@ - 标识规范 - - [名称规范](/manual/standard/logo-specification/name) - - [视觉形象系统](/manual/standard/logo-specification/tavi) + - [名称规范](/manual/standard/logo/name) + - [视觉形象系统](/manual/standard/logo/tavi) - [代码规范](/manual/standard/code-specification) @@ -82,10 +82,12 @@ - [服务条款](/manual/about/agreement/terms-of-use) - [隐私政策](/manual/about/agreement/privacy-policy) - - [使用的第三方接口](/manual/about/third-party-interface) + - [使用的第三方接口](/manual/about/third-party-interface) - **七、内部开发文档** + - [安装升级向导](/manual/internal/deployment-wizard) + - **八、其他** - [TODO](/manual/todo) diff --git a/docs/manual/internal/deployment-wizard.md b/docs/manual/internal/deployment-wizard.md new file mode 100644 index 0000000..12230ce --- /dev/null +++ b/docs/manual/internal/deployment-wizard.md @@ -0,0 +1,80 @@ +# 背Ta单词 安装升级向导 接口Api + + + +(X)假设现在本地是1.0.0开发版本,服务端是1.1.0正式版本 + + + +【版本号格式】一键安装程序版本号(x) 更新程序版本号(x) 网站版本号(x.x.x) 数据库版本号(x) + +网站版本分支分为 + +| 开发版 | 预览版 | 内测版 | 最终测试版 | 正式版 | +| ------- | ------ | ------ | ---------- | ------ | +| develop | alpha | beta | rc | stable | + +------ + +## 升级流程 + +以下所有操作,请求地址均为:https://api.tawords.com/v1/update.php + +**请注意,参数名及参数值请使用小写,否则可能返回错误。** + +### 1. 检查更新程序是否需要更新 + +本地向服务端发送GET请求,判断更新程序是否需要更新 + +请求参数列表 + +| 参数 | 类型 | 是否必填 | 可选值 | 说明 | +| -------- | ------ | -------- | --------------------- | -------------------------------------------- | +| platform | string | 否 | 【预留字段无需填写】 | 指明当前发起请求的平台,后期可能加入其他端。 | +| action | string | 是 | check_updater_version | | + +例如:https://api.tawords.com/v1/update.php?action=check_updater_version + +**返回结果** + +返回最新版本updater信息(新版版本号,url地址,是否被压缩,哈希值MD5),请本地自行判断更新程序是否需要更新 + + + +### 2. 获取最新版本信息 + +本地向服务端发送GET请求,获取最新版本信息以及下载地址 + +请求参数列表 + +| 参数 | 类型 | 是否必填 | 可选值 | 说明 | +| -------- | ------ | -------- | --------------------------------------- | ------------------------------------------------------------ | +| platform | string | 否 | 【预留字段无需填写】 | 指明当前发起请求的平台,后期可能加入其他端。 | +| action | string | 是 | get_info | | +| dist | string | 是 | develop(或dev)、alpha、beta、rc、stable | dist是distribution的缩写,指的是本地是哪个版本分支。
开发版为develop或dev,预览版alpha,内测版为beta,最终测试版为rc(release candidate的缩写),正式版为stable。 | +| type | string | 是 | update、initial | 类型,是初次安装、还是更新。
初次安装为initial,更新为update | +| version | string | 否 | <当前版本号,如1.0.0> | 只包含数字(0-9)和小数点(.),不包含其他任何字符,格式:x.x.x(如:1.2.10)。

如果该参数不传或传入为空,将返回当前所有版本的更新信息。

传入正确版本号将返回当前版本适用的所有可更新版本信息,没有可更新版本将返回。
传入其他格式将返回错误 | + +例如:https://api.tawords.com/v1/update.php?action=getinfo&dist=develop&type=update&version=1.0.0 + +返回JSON格式 + +**有更新时** + +更新版本分支 + +适合更新的所有版本信息(新版版本号、更新说明、重要提示(可选,如果有请务必醒目提示用户该信息)、更新包下载地址(备用下载地址),更新包哈希值MD5) + +获取之后,进行更新操作。 + +**无更新时** + +返回”已经是最新版本“ + +**请求错误时** + +返回错误信息 + + + +2. \ No newline at end of file diff --git a/docs/manual/standard/logo-specification/name.md b/docs/manual/standard/logo/name.md similarity index 100% rename from docs/manual/standard/logo-specification/name.md rename to docs/manual/standard/logo/name.md diff --git a/docs/manual/standard/logo-specification/tavi.md b/docs/manual/standard/logo/tavi.md similarity index 100% rename from docs/manual/standard/logo-specification/tavi.md rename to docs/manual/standard/logo/tavi.md