提交 8f781dfa 编写于 作者: D DCloud_LXH

feat: 升级 uni-upgrade-center-app、uts-progressNotification 插件

上级 242fab22
## 0.7.6(2023-12-21)
- 修复 iOS使用升级中心云打包时报错(使用新版的 [uts-progressNotification](https://ext.dcloud.net.cn/plugin?name=uts-progressNotification) 插件,如果之前下载过请删除 `uts-progressNotification\utssdk\app-ios` 文件夹)
## 0.7.5(2023-12-12) ## 0.7.5(2023-12-12)
- 新增 通知栏进度条使用 uts-progressNotification 插件 - 新增 通知栏进度条使用 uts-progressNotification 插件
- 新增 依赖 uni-installApk、uts-progressNotification。使用前要安装插件三方依赖 - 新增 依赖 uni-installApk、uts-progressNotification。使用前要安装插件三方依赖
......
{ {
"id": "uni-upgrade-center-app", "id": "uni-upgrade-center-app",
"displayName": "升级中心 uni-upgrade-center - App", "displayName": "升级中心 uni-upgrade-center - App",
"version": "0.7.5", "version": "0.7.6",
"description": "uni升级中心 - 客户端检查更新", "description": "uni升级中心 - 客户端检查更新",
"keywords": [ "keywords": [
"uniCloud", "uniCloud",
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
], ],
"repository": "https://gitee.com/dcloud/uni-upgrade-center/tree/master/uni_modules/uni-upgrade-center-app", "repository": "https://gitee.com/dcloud/uni-upgrade-center/tree/master/uni_modules/uni-upgrade-center-app",
"engines": { "engines": {
"HBuilderX": "^3.2.14" "HBuilderX": "^3.97"
}, },
"dcloudext": { "dcloudext": {
"sale": { "sale": {
......
...@@ -64,7 +64,9 @@ ...@@ -64,7 +64,9 @@
</template> </template>
<script> <script>
// #ifdef APP
import { createNotificationProgress, cancelNotificationProgress, finishNotificationProgress } from '@/uni_modules/uts-progressNotification' import { createNotificationProgress, cancelNotificationProgress, finishNotificationProgress } from '@/uni_modules/uts-progressNotification'
// #endif
const localFilePathKey = 'UNI_ADMIN_UPGRADE_CENTER_LOCAL_FILE_PATH' const localFilePathKey = 'UNI_ADMIN_UPGRADE_CENTER_LOCAL_FILE_PATH'
const platform_iOS = 'iOS'; const platform_iOS = 'iOS';
const platform_Android = 'Android'; const platform_Android = 'Android';
...@@ -187,16 +189,16 @@ ...@@ -187,16 +189,16 @@
return this.type === 'wgt' return this.type === 'wgt'
}, },
isiOS() { isiOS() {
return !this.isWGT ? this.platform.includes(platform_iOS) : false; return !this.isWGT ? this.platform.indexOf(platform_iOS) !== -1 : false;
}, },
isAndroid() { isAndroid() {
return this.platform.includes(platform_Android) return this.platform.indexOf(platform_Android) !== -1
}, },
isAppStore() { isAppStore() {
return this.isiOS || (!this.isiOS && !this.isWGT && this.url.indexOf('.apk') === -1) return this.isiOS || (!this.isiOS && !this.isWGT && this.url.indexOf('.apk') === -1)
}, },
needNotificationProgress() { needNotificationProgress() {
return this.isAndroid && !this.is_mandatory return this.platform.indexOf(platform_iOS) === -1 && !this.is_mandatory
} }
}, },
methods: { methods: {
......
## 1.0.8(2023-12-21)
去除app-ios目录
## 1.0.7(2023-12-11) ## 1.0.7(2023-12-11)
去除无用代码 去除无用代码
## 1.0.6(2023-12-11) ## 1.0.6(2023-12-11)
......
{ {
"id": "uts-progressNotification", "id": "uts-progressNotification",
"displayName": "uts-progressNotification", "displayName": "uts-progressNotification",
"version": "1.0.7", "version": "1.0.8",
"description": "uts-progressNotification", "description": "uts-progressNotification",
"keywords": [ "keywords": [
"uts-progressNotification" "uts-progressNotification"
......
{
"deploymentTarget": "9"
}
\ No newline at end of file
/**
* 引用 iOS 系统库,示例如下:
* import { UIDevice } from "UIKit";
* [可选实现,按需引入]
*/
/* 引入 interface.uts 文件中定义的变量 */
import { MyApiOptions, MyApiResult, MyApi, MyApiSync } from '../interface.uts';
/* 引入 unierror.uts 文件中定义的变量 */
import { MyApiFailImpl } from '../unierror';
/**
* 引入三方库
* [可选实现,按需引入]
*
* 在 iOS 平台引入三方库有以下两种方式:
* 1、通过引入三方库framework 或者.a 等方式,需要将 .framework 放到 ./Frameworks 目录下,将.a 放到 ./Libs 目录下。更多信息[详见](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html#ios-平台原生配置)
* 2、通过 cocoaPods 方式引入,将要引入的 pod 信息配置到 config.json 文件下的 dependencies-pods 字段下。详细配置方式[详见](https://uniapp.dcloud.net.cn/plugin/uts-ios-cocoapods.html)
*
* 在通过上述任意方式依赖三方库后,使用时需要在文件中 import:
* 示例:import { LottieLoopMode } from 'Lottie'
*/
/**
* UTSiOS 为平台内置对象,不需要 import 可直接调用其API,[详见](https://uniapp.dcloud.net.cn/uts/utsios.html)
*/
/**
* 异步方法
*
* uni-app项目中(vue/nvue)调用示例:
* 1、引入方法声明 import { myApi } from "@/uni_modules/uts-api"
* 2、方法调用
* myApi({
* paramA: false,
* complete: (res) => {
* console.log(res)
* }
* });
*
*/
export const myApi : MyApi = function (options : MyApiOptions) {
if (options.paramA == true) {
// 返回数据
const res : MyApiResult = {
fieldA: 85,
fieldB: true,
fieldC: 'some message'
};
options.success?.(res);
options.complete?.(res);
} else {
// 返回错误
let failResult = new MyApiFailImpl(9010001);
options.fail?.(failResult)
options.complete?.(failResult)
}
}
/**
* 同步方法
*
* uni-app项目中(vue/nvue)调用示例:
* 1、引入方法声明 import { myApiSync } from "@/uni_modules/uts-api"
* 2、方法调用
* myApiSync(true);
*
*/
export const myApiSync : MyApiSync = function (paramA : boolean) : MyApiResult {
// 返回数据,根据插件功能获取实际的返回值
const res : MyApiResult = {
fieldA: 85,
fieldB: paramA,
fieldC: 'some message'
};
return res;
}
/**
* 更多插件开发的信息详见:https://uniapp.dcloud.net.cn/plugin/uts-plugin.html
*/
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册