Showing
16 changed files
with
20 additions
and
429 deletions
sight_harmony/.ohpmrc
deleted
100644 → 0
| 1 | -@mpaas:registry=https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/meta |
| 1 | -import { expect } from '@ohos/hypium'; | ||
| 2 | - | ||
| 3 | export { Logger } from './src/main/ets/utils/Logger' | 1 | export { Logger } from './src/main/ets/utils/Logger' |
| 4 | 2 | ||
| 5 | export { ResourcesUtils } from './src/main/ets/utils/ResourcesUtils' | 3 | export { ResourcesUtils } from './src/main/ets/utils/ResourcesUtils' |
| @@ -51,7 +49,3 @@ export { NetworkUtil } from './src/main/ets/utils/NetworkUtil' | @@ -51,7 +49,3 @@ export { NetworkUtil } from './src/main/ets/utils/NetworkUtil' | ||
| 51 | export { NetworkManager } from './src/main/ets/network/NetworkManager' | 49 | export { NetworkManager } from './src/main/ets/network/NetworkManager' |
| 52 | 50 | ||
| 53 | export { NetworkType } from './src/main/ets/network/NetworkType' | 51 | export { NetworkType } from './src/main/ets/network/NetworkType' |
| 54 | - | ||
| 55 | -export { MpaasUtils } from './src/main/ets/mpaas/MpaasUtils' | ||
| 56 | - | ||
| 57 | -export { MpaasUpgradeCheck, UpgradeTipContent } from './src/main/ets/mpaas/MpaasUpgradeCheck' |
| @@ -6,6 +6,5 @@ | @@ -6,6 +6,5 @@ | ||
| 6 | "description": "Please describe the basic information.", | 6 | "description": "Please describe the basic information.", |
| 7 | "main": "Index.ets", | 7 | "main": "Index.ets", |
| 8 | "version": "1.0.0", | 8 | "version": "1.0.0", |
| 9 | - "dependencies": { | ||
| 10 | - } | 9 | + "dependencies": {} |
| 11 | } | 10 | } |
| 1 | -import { MPUpgradeService } from '@mpaas/upgrade' | ||
| 2 | -import { upgradeRes } from '@mpaas/upgrade/src/main/ets/t4/a' | ||
| 3 | -import { AppUtils } from '../utils/AppUtils' | ||
| 4 | -import { SPHelper } from '../utils/SPHelper' | ||
| 5 | - | ||
| 6 | -export interface UpgradeTipContent { | ||
| 7 | - | ||
| 8 | - content: string | ||
| 9 | - newVersion: string | ||
| 10 | - downloadUrl: string | ||
| 11 | - forceUpgrade: boolean | ||
| 12 | -} | ||
| 13 | - | ||
| 14 | -export class MpaasUpgradeCheck { | ||
| 15 | - | ||
| 16 | - /// 默认提示框 | ||
| 17 | - checkNewVersionAndShow() { | ||
| 18 | - try { | ||
| 19 | - MPUpgradeService.checkNewVersionAndShow() | ||
| 20 | - } catch (error) { | ||
| 21 | - console.log("mpaas upgrade fail", JSON.stringify(error)) | ||
| 22 | - } | ||
| 23 | - } | ||
| 24 | - | ||
| 25 | - checkNewVersion(): Promise<UpgradeTipContent | null> { | ||
| 26 | - | ||
| 27 | - return new Promise((resolve, fail) => { | ||
| 28 | - MPUpgradeService.checkNewVersion().then((response)=>{ | ||
| 29 | - let str = JSON.stringify(response) | ||
| 30 | - console.log("mpaas upgrade check", str) | ||
| 31 | - | ||
| 32 | - /* | ||
| 33 | - { | ||
| 34 | - "android64FileSize": 0, | ||
| 35 | - "downloadURL": "https://appgallery.huawei.com/#/app", | ||
| 36 | - "fileSize": 0, | ||
| 37 | - "fullMd5": "no md5", | ||
| 38 | - "guideMemo": "欢迎使用新版本", | ||
| 39 | - "isWifi": 0, | ||
| 40 | - "netType": "ALL", | ||
| 41 | - "newestVersion": "1.0.1", | ||
| 42 | - "resultStatus": 204, | ||
| 43 | - "silentType": 0, | ||
| 44 | - "upgradeVersion": "1.0.1" | ||
| 45 | - }*/ | ||
| 46 | - | ||
| 47 | - let res = response as upgradeRes | ||
| 48 | - | ||
| 49 | - // AliUpgradeNewVersion = 201, /*当前使用的已是最新版本*/ | ||
| 50 | - // AliUpgradeOneTime = 202, /*客户端已有新版本,单次提醒*/ | ||
| 51 | - // AliUpgradeForceUpdate = 203, /*客户端已有新版本,强制升级(已废弃)*/ | ||
| 52 | - // AliUpgradeEveryTime = 204, /*客户端已有新版本,多次提醒*/ | ||
| 53 | - // AliUpgradeRejectLogin = 205, /*限制登录(已废弃)*/ | ||
| 54 | - // AliUpgradeForceUpdateWithLogin = 206 /*客户端已有新版本,强制升级*/ | ||
| 55 | - | ||
| 56 | - const currentAppVersoin = AppUtils.getAppVersionName() | ||
| 57 | - | ||
| 58 | - if (res.resultStatus == 201) { | ||
| 59 | - resolve(null) | ||
| 60 | - return | ||
| 61 | - } | ||
| 62 | - | ||
| 63 | - // 单次升级控制 | ||
| 64 | - if (res.resultStatus == 202) { | ||
| 65 | - const oldOnceValue = SPHelper.default.getSync("upgradeOnceKey", false) as boolean | ||
| 66 | - if (true == oldOnceValue) { | ||
| 67 | - resolve(null) | ||
| 68 | - return | ||
| 69 | - } | ||
| 70 | - SPHelper.default.save("upgradeOnceKey", true) | ||
| 71 | - } else { | ||
| 72 | - SPHelper.default.save("upgradeOnceKey", false) | ||
| 73 | - } | ||
| 74 | - | ||
| 75 | - if (res.resultStatus == 202 || res.resultStatus == 204 || res.resultStatus == 206) { | ||
| 76 | - let content: UpgradeTipContent = { | ||
| 77 | - content: res.guideMemo, | ||
| 78 | - newVersion: res.upgradeVersion, | ||
| 79 | - downloadUrl: res.downloadURL, | ||
| 80 | - forceUpgrade: res.resultStatus == 206 | ||
| 81 | - } | ||
| 82 | - resolve(content) | ||
| 83 | - return | ||
| 84 | - } | ||
| 85 | - | ||
| 86 | - resolve(null) | ||
| 87 | - }).catch((error: Error) => { | ||
| 88 | - console.log("mpaas upgrade fail", `name: ${error.name}, message: ${error.message}, \nstack: ${error.stack}`) | ||
| 89 | - fail("检测升级失败") | ||
| 90 | - }) | ||
| 91 | - }) | ||
| 92 | - } | ||
| 93 | -} |
| 1 | -import { MPFramework } from '@mpaas/framework' | ||
| 2 | -import { common } from '@kit.AbilityKit'; | ||
| 3 | - | ||
| 4 | -/* | ||
| 5 | -对接mpaas注意: | ||
| 6 | -* 1、后台创建mpaas.config,需要包名。放到rawfile目录 | ||
| 7 | -* 2、网关加密hs_1222.png图片,放到rawfile目录 | ||
| 8 | -* 3. 配置和加密图片,需要包名和签名对应,否则无法使用 | ||
| 9 | - * */ | ||
| 10 | - | ||
| 11 | -export class MpaasUtils { | ||
| 12 | - | ||
| 13 | - // 启动时onCreate()方法调用 | ||
| 14 | - static initApp(context: common.UIAbilityContext) { | ||
| 15 | - MPFramework.create(context); | ||
| 16 | - } | ||
| 17 | - | ||
| 18 | - // 获取mPaaS utdid | ||
| 19 | - static async mpaasUtdid() { | ||
| 20 | - let utdid = await MPFramework.instance.udid | ||
| 21 | - return utdid | ||
| 22 | - } | ||
| 23 | - | ||
| 24 | - // 登录和退出登录调用,用来管理白名单用 | ||
| 25 | - static setupUserId(userId?: string) { | ||
| 26 | - MPFramework.instance.userId = userId | ||
| 27 | - } | ||
| 28 | -} |
| @@ -53,16 +53,5 @@ export class AppUtils { | @@ -53,16 +53,5 @@ export class AppUtils { | ||
| 53 | } | 53 | } |
| 54 | return ''; | 54 | return ''; |
| 55 | } | 55 | } |
| 56 | - | ||
| 57 | - static getFingerprint(): string { | ||
| 58 | - try { | ||
| 59 | - let bundleInfo = | ||
| 60 | - bundleManager.getBundleInfoForSelfSync(bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_SIGNATURE_INFO); | ||
| 61 | - let finger = bundleInfo.signatureInfo.fingerprint; | ||
| 62 | - } catch (e) { | ||
| 63 | - Logger.warn(TAG, 'get app signatureinfo error:' + e?.message); | ||
| 64 | - } | ||
| 65 | - return ''; | ||
| 66 | - } | ||
| 67 | } | 56 | } |
| 68 | 57 |
| @@ -2,7 +2,7 @@ import { Action, ContentDTO, Params, PhotoListBean, commentInfo } from 'wdBean'; | @@ -2,7 +2,7 @@ import { Action, ContentDTO, Params, PhotoListBean, commentInfo } from 'wdBean'; | ||
| 2 | import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'; | 2 | import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'; |
| 3 | import { Logger } from 'wdKit'; | 3 | import { Logger } from 'wdKit'; |
| 4 | import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils'; | 4 | import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils'; |
| 5 | -import { WDRouterRule } from '../router/WDRouterRule'; | 5 | +import { WDRouterRule, WDRouterPage } from '../../../../Index'; |
| 6 | import { ContentConstants } from 'wdConstant'; | 6 | import { ContentConstants } from 'wdConstant'; |
| 7 | import { common, Want } from '@kit.AbilityKit'; | 7 | import { common, Want } from '@kit.AbilityKit'; |
| 8 | import { BusinessError } from '@kit.BasicServicesKit'; | 8 | import { BusinessError } from '@kit.BasicServicesKit'; |
| @@ -398,4 +398,14 @@ export class ProcessUtils { | @@ -398,4 +398,14 @@ export class ProcessUtils { | ||
| 398 | public static jumpChannelTab(channelId: string, pageId: string) { | 398 | public static jumpChannelTab(channelId: string, pageId: string) { |
| 399 | HomeChannelUtils.jumpChannelTab(channelId, pageId) | 399 | HomeChannelUtils.jumpChannelTab(channelId, pageId) |
| 400 | } | 400 | } |
| 401 | + | ||
| 402 | + /** | ||
| 403 | + * 跳转人民号主页 | ||
| 404 | + *@params creatorId 创作者id | ||
| 405 | + */ | ||
| 406 | + public static gotoPeopleShipHomePage(creatorId: string) { | ||
| 407 | + let params = {'creatorId': creatorId} as Record<string, string>; | ||
| 408 | + WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params) | ||
| 409 | + } | ||
| 410 | + | ||
| 401 | } | 411 | } |
| @@ -145,6 +145,10 @@ function handleJsCallAppInnerLinkMethod(data: Message) { | @@ -145,6 +145,10 @@ function handleJsCallAppInnerLinkMethod(data: Message) { | ||
| 145 | content.objectType = ContentConstants.TYPE_FOURTEEN | 145 | content.objectType = ContentConstants.TYPE_FOURTEEN |
| 146 | ProcessUtils.processPage(content) | 146 | ProcessUtils.processPage(content) |
| 147 | break; | 147 | break; |
| 148 | + case 'owner_page': | ||
| 149 | + let creatorId = urlParams.get('creatorId') || '' | ||
| 150 | + ProcessUtils.gotoPeopleShipHomePage(creatorId) | ||
| 151 | + break; | ||
| 148 | default: | 152 | default: |
| 149 | break; | 153 | break; |
| 150 | } | 154 | } |
| @@ -5,161 +5,10 @@ | @@ -5,161 +5,10 @@ | ||
| 5 | "lockfileVersion": 3, | 5 | "lockfileVersion": 3, |
| 6 | "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | 6 | "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", |
| 7 | "specifiers": { | 7 | "specifiers": { |
| 8 | - "@mpaas/compress@^1.0.0": "@mpaas/compress@1.0.0", | ||
| 9 | - "@mpaas/fake-island@^1.0.0": "@mpaas/fake-island@1.0.0", | ||
| 10 | - "@mpaas/framework@0.0.2": "@mpaas/framework@0.0.2", | ||
| 11 | - "@mpaas/framework@^0.0.2": "@mpaas/framework@0.0.2", | ||
| 12 | - "@mpaas/fs-ext@^1.0.0": "@mpaas/fs-ext@1.0.0", | ||
| 13 | - "@mpaas/lang@^1.0.0": "@mpaas/lang@1.0.0", | ||
| 14 | - "@mpaas/path@^1.0.0": "@mpaas/path@1.0.0", | ||
| 15 | - "@mpaas/rpc@^0.0.2": "@mpaas/rpc@0.0.2", | ||
| 16 | - "@mpaas/shuckle@^1.0.0": "@mpaas/shuckle@1.0.0", | ||
| 17 | - "@mpaas/trace-log@^0.0.2": "@mpaas/trace-log@0.0.2", | ||
| 18 | - "@mpaas/transport_build@^0.0.2": "@mpaas/transport_build@0.0.2", | ||
| 19 | - "@mpaas/udid@0.0.2": "@mpaas/udid@0.0.2", | ||
| 20 | - "@mpaas/upgrade@0.0.2": "@mpaas/upgrade@0.0.2", | ||
| 21 | - "@ohos/crypto-js@^2.0.2": "@ohos/crypto-js@2.0.3", | ||
| 22 | "@ohos/hypium@1.0.16": "@ohos/hypium@1.0.16", | 8 | "@ohos/hypium@1.0.16": "@ohos/hypium@1.0.16", |
| 23 | - "@ohos/pulltorefresh@^2.0.5": "@ohos/pulltorefresh@2.0.5", | ||
| 24 | - "dayjs@^1.11.7": "dayjs@1.11.7", | ||
| 25 | - "libcompress.so@oh_modules/.ohpm/@mpaas+compress@1.0.0/oh_modules/@mpaas/compress/src/main/cpp/types/libcompress": "libcompress.so@oh_modules/.ohpm/@mpaas+compress@1.0.0/oh_modules/@mpaas/compress/src/main/cpp/types/libcompress", | ||
| 26 | - "libframework_api.so@oh_modules/.ohpm/@mpaas+framework@0.0.2/oh_modules/@mpaas/framework/src/main/cpp/types/libframework_api": "libframework_api.so@oh_modules/.ohpm/@mpaas+framework@0.0.2/oh_modules/@mpaas/framework/src/main/cpp/types/libframework_api", | ||
| 27 | - "libgwcli.so@oh_modules/.ohpm/@mpaas+fake-island@1.0.0/oh_modules/@mpaas/fake-island/types": "libgwcli.so@oh_modules/.ohpm/@mpaas+fake-island@1.0.0/oh_modules/@mpaas/fake-island/types", | ||
| 28 | - "liblang.so@oh_modules/.ohpm/@mpaas+lang@1.0.0/oh_modules/@mpaas/lang/types": "liblang.so@oh_modules/.ohpm/@mpaas+lang@1.0.0/oh_modules/@mpaas/lang/types", | ||
| 29 | - "libmplog.so@oh_modules/.ohpm/@mpaas+trace-log@0.0.2/oh_modules/@mpaas/trace-log/types": "libmplog.so@oh_modules/.ohpm/@mpaas+trace-log@0.0.2/oh_modules/@mpaas/trace-log/types", | ||
| 30 | - "libshuckle.so@oh_modules/.ohpm/@mpaas+shuckle@1.0.0/oh_modules/@mpaas/shuckle/src/main/cpp/types/libshuckle": "libshuckle.so@oh_modules/.ohpm/@mpaas+shuckle@1.0.0/oh_modules/@mpaas/shuckle/src/main/cpp/types/libshuckle", | ||
| 31 | - "long@^5.2.1": "long@5.2.1", | ||
| 32 | - "pako@^2.1.0": "pako@2.1.0" | 9 | + "@ohos/pulltorefresh@^2.0.5": "@ohos/pulltorefresh@2.0.5" |
| 33 | }, | 10 | }, |
| 34 | "packages": { | 11 | "packages": { |
| 35 | - "@mpaas/compress@1.0.0": { | ||
| 36 | - "name": "@mpaas/compress", | ||
| 37 | - "integrity": "sha512-x/aUK/zKjoUnd4kYGNAI1JMcEY2n4N6Rn+F+zcIYs8WLgobY6kFXTphLJ/NlSgjJklc2009U8zeStvtjon1zaQ==", | ||
| 38 | - "resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/compress/compress-1.0.0.har", | ||
| 39 | - "registryType": "ohpm", | ||
| 40 | - "dependencies": { | ||
| 41 | - "libcompress.so": "file:./src/main/cpp/types/libcompress" | ||
| 42 | - } | ||
| 43 | - }, | ||
| 44 | - "@mpaas/fake-island@1.0.0": { | ||
| 45 | - "name": "@mpaas/fake-island", | ||
| 46 | - "integrity": "sha512-cEt0Zsie0rwfvnYmqA+6pa93L6NLkJKwiqJCoE9Z2hFjhk9s4RSz7F0AUuj4WobrpdElXuipoCNFPXWLb4ZBlA==", | ||
| 47 | - "resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/fake-island/fake-island-1.0.0.har", | ||
| 48 | - "registryType": "ohpm", | ||
| 49 | - "dependencies": { | ||
| 50 | - "libgwcli.so": "file:./types" | ||
| 51 | - } | ||
| 52 | - }, | ||
| 53 | - "@mpaas/framework@0.0.2": { | ||
| 54 | - "name": "@mpaas/framework", | ||
| 55 | - "integrity": "sha512-nNpCI44zvg4fN9GNM5m31LdqfLrej9mMo/+BMny8QK+/Jvc3m/itE45bWZZ7unfflq40H2t4YOgtNAIW3m8MaA==", | ||
| 56 | - "resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/framework/framework-0.0.2.har", | ||
| 57 | - "registryType": "ohpm", | ||
| 58 | - "dependencies": { | ||
| 59 | - "libframework_api.so": "file:./src/main/cpp/types/libframework_api", | ||
| 60 | - "@mpaas/udid": "0.0.2" | ||
| 61 | - } | ||
| 62 | - }, | ||
| 63 | - "@mpaas/fs-ext@1.0.0": { | ||
| 64 | - "name": "@mpaas/fs-ext", | ||
| 65 | - "integrity": "sha512-4TGUdrkmVSFktp1NcRdcs4uLYH6GvN1aTkMD2z8TJLztz5Hq5fMrvuznsmwTsSaRxGfGuyHPER8enMQo8wcfKA==", | ||
| 66 | - "resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/fs-ext/fs-ext-1.0.0.har", | ||
| 67 | - "registryType": "ohpm", | ||
| 68 | - "dependencies": { | ||
| 69 | - "@mpaas/path": "^1.0.0" | ||
| 70 | - } | ||
| 71 | - }, | ||
| 72 | - "@mpaas/lang@1.0.0": { | ||
| 73 | - "name": "@mpaas/lang", | ||
| 74 | - "integrity": "sha512-dcQ2QPrvwZgBhoGUjAbSFfkReDkwqEPMTzy/Xk05dhIB9VVznpLPahlQLVi0Am1FPATCT8J7DDrko9aJLOba+w==", | ||
| 75 | - "resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/lang/lang-1.0.0.har", | ||
| 76 | - "registryType": "ohpm", | ||
| 77 | - "dependencies": { | ||
| 78 | - "liblang.so": "file:./types" | ||
| 79 | - } | ||
| 80 | - }, | ||
| 81 | - "@mpaas/path@1.0.0": { | ||
| 82 | - "name": "@mpaas/path", | ||
| 83 | - "integrity": "sha512-TNjPaVOiq4DTiNFexSeI9isxeJ1H4q9Vieh3Bnv66o0U/e7rwV1qjEUtMvihX3MlsX0VKVkT0Xyf/wm18l4XYw==", | ||
| 84 | - "resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/path/path-1.0.0.har", | ||
| 85 | - "registryType": "ohpm" | ||
| 86 | - }, | ||
| 87 | - "@mpaas/rpc@0.0.2": { | ||
| 88 | - "name": "@mpaas/rpc", | ||
| 89 | - "integrity": "sha512-BeiXDHW77CpZF5x4nuQc+3A7MfhFfU3+Wc73gac/ZRhIPuAAzfLmlzm5alqdm6oiWAw17ERQydUSG4SQSCHQ4g==", | ||
| 90 | - "resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/rpc/rpc-0.0.2.har", | ||
| 91 | - "registryType": "ohpm", | ||
| 92 | - "dependencies": { | ||
| 93 | - "@mpaas/transport_build": "^0.0.2", | ||
| 94 | - "@mpaas/lang": "^1.0.0", | ||
| 95 | - "@mpaas/framework": "^0.0.2" | ||
| 96 | - } | ||
| 97 | - }, | ||
| 98 | - "@mpaas/shuckle@1.0.0": { | ||
| 99 | - "name": "@mpaas/shuckle", | ||
| 100 | - "integrity": "sha512-B0MhrNzwG9pIoPxYVBldyenQWtWfTv5twd/0Ur1LbMpbp09AQ5wrZjKgDoeUtsIls9gzL9T8ngDZU6mRn8SYgQ==", | ||
| 101 | - "resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/shuckle/shuckle-1.0.0.har", | ||
| 102 | - "registryType": "ohpm", | ||
| 103 | - "dependencies": { | ||
| 104 | - "libshuckle.so": "file:./src/main/cpp/types/libshuckle", | ||
| 105 | - "@mpaas/framework": "^0.0.2" | ||
| 106 | - } | ||
| 107 | - }, | ||
| 108 | - "@mpaas/trace-log@0.0.2": { | ||
| 109 | - "name": "@mpaas/trace-log", | ||
| 110 | - "integrity": "sha512-Llsdnx3L2tJJDg9vwJY01YsK4IOSmCo4SmAIW9yFHTzylrzFSWdFefRhJbNlkQQilXdYygEkBByXVvT1wFSmAg==", | ||
| 111 | - "resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/trace-log/trace-log-0.0.2.har", | ||
| 112 | - "registryType": "ohpm", | ||
| 113 | - "dependencies": { | ||
| 114 | - "@mpaas/lang": "^1.0.0", | ||
| 115 | - "@mpaas/fs-ext": "^1.0.0", | ||
| 116 | - "@mpaas/path": "^1.0.0", | ||
| 117 | - "@mpaas/framework": "0.0.2", | ||
| 118 | - "libmplog.so": "file:types", | ||
| 119 | - "dayjs": "^1.11.7" | ||
| 120 | - } | ||
| 121 | - }, | ||
| 122 | - "@mpaas/transport_build@0.0.2": { | ||
| 123 | - "name": "@mpaas/transport_build", | ||
| 124 | - "integrity": "sha512-utz9C/cKIWbYrNiTBjk1gUhPH4/M73G64hWlrYKDpkfJHJmdYcQmmYV3v7Jit1z7Qg7hhu0aOaZzShqdQdC7rg==", | ||
| 125 | - "resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/transport_build/transport_build-0.0.2.har", | ||
| 126 | - "registryType": "ohpm", | ||
| 127 | - "dependencies": { | ||
| 128 | - "@ohos/crypto-js": "^2.0.2", | ||
| 129 | - "dayjs": "^1.11.7", | ||
| 130 | - "pako": "^2.1.0", | ||
| 131 | - "@mpaas/fake-island": "^1.0.0", | ||
| 132 | - "long": "^5.2.1", | ||
| 133 | - "@mpaas/framework": "^0.0.2", | ||
| 134 | - "@mpaas/shuckle": "^1.0.0", | ||
| 135 | - "@mpaas/compress": "^1.0.0" | ||
| 136 | - } | ||
| 137 | - }, | ||
| 138 | - "@mpaas/udid@0.0.2": { | ||
| 139 | - "name": "@mpaas/udid", | ||
| 140 | - "integrity": "sha512-YFLSgBOrIjjmcFm4Cn2BB1tspHKHdB4qipVl4MUhHHDfiUYbLIVuv7x5xB9xPuPf0gKO8rx0yqUuzkaNDoNsAw==", | ||
| 141 | - "resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/udid/udid-0.0.2.har", | ||
| 142 | - "registryType": "ohpm" | ||
| 143 | - }, | ||
| 144 | - "@mpaas/upgrade@0.0.2": { | ||
| 145 | - "name": "@mpaas/upgrade", | ||
| 146 | - "integrity": "sha512-VWamULIoJPA6nxUADwwNXd3uOspZeYAsRh05pApVilIdum5ktIMXIFl71jAKsChs3jtrhs9y5EShoZD4MZrGsA==", | ||
| 147 | - "resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/upgrade/upgrade-0.0.2.har", | ||
| 148 | - "registryType": "ohpm", | ||
| 149 | - "dependencies": { | ||
| 150 | - "@mpaas/framework": "^0.0.2", | ||
| 151 | - "@mpaas/rpc": "^0.0.2", | ||
| 152 | - "@mpaas/lang": "^1.0.0", | ||
| 153 | - "@mpaas/transport_build": "^0.0.2", | ||
| 154 | - "@mpaas/trace-log": "^0.0.2" | ||
| 155 | - } | ||
| 156 | - }, | ||
| 157 | - "@ohos/crypto-js@2.0.3": { | ||
| 158 | - "name": "@ohos/crypto-js", | ||
| 159 | - "integrity": "sha512-LuHaR1kD5PxnOXnuR1fWvPwGtbed9Q/QGzk6JOh8y5Wdzvi8brPesODZiaWf9scOVRHsbTPOtZw91vWB35p1vQ==", | ||
| 160 | - "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/crypto-js/-/crypto-js-2.0.3.har", | ||
| 161 | - "registryType": "ohpm" | ||
| 162 | - }, | ||
| 163 | "@ohos/hypium@1.0.16": { | 12 | "@ohos/hypium@1.0.16": { |
| 164 | "name": "@ohos/hypium", | 13 | "name": "@ohos/hypium", |
| 165 | "integrity": "sha512-PC3jpwKERg68V+4dmKU+SLjNps9i5JcQH57rQriaTsh62NBgVZs4SceMmNOtrIOyldbEJ5mXSwoZwiG/nkRmTw==", | 14 | "integrity": "sha512-PC3jpwKERg68V+4dmKU+SLjNps9i5JcQH57rQriaTsh62NBgVZs4SceMmNOtrIOyldbEJ5mXSwoZwiG/nkRmTw==", |
| @@ -171,60 +20,6 @@ | @@ -171,60 +20,6 @@ | ||
| 171 | "integrity": "sha512-mgBvJ6Ga70LmAoPKTOEPLFJluHUEAaBt2+7wF7R6223Vw6UEbZrof1MyvVOLEHk8Uc64ASIMW/TNQ8AHraTV5A==", | 20 | "integrity": "sha512-mgBvJ6Ga70LmAoPKTOEPLFJluHUEAaBt2+7wF7R6223Vw6UEbZrof1MyvVOLEHk8Uc64ASIMW/TNQ8AHraTV5A==", |
| 172 | "resolved": "https://repo.harmonyos.com/ohpm/@ohos/pulltorefresh/-/pulltorefresh-2.0.5.har", | 21 | "resolved": "https://repo.harmonyos.com/ohpm/@ohos/pulltorefresh/-/pulltorefresh-2.0.5.har", |
| 173 | "registryType": "ohpm" | 22 | "registryType": "ohpm" |
| 174 | - }, | ||
| 175 | - "dayjs@1.11.7": { | ||
| 176 | - "name": "dayjs", | ||
| 177 | - "integrity": "sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ==", | ||
| 178 | - "resolved": "https://ohpm.openharmony.cn/ohpm/dayjs/-/dayjs-1.11.7.tgz", | ||
| 179 | - "shasum": "4b296922642f70999544d1144a2c25730fce63e2", | ||
| 180 | - "registryType": "ohpm" | ||
| 181 | - }, | ||
| 182 | - "libcompress.so@oh_modules/.ohpm/@mpaas+compress@1.0.0/oh_modules/@mpaas/compress/src/main/cpp/types/libcompress": { | ||
| 183 | - "name": "libcompress.so", | ||
| 184 | - "resolved": "oh_modules/.ohpm/@mpaas+compress@1.0.0/oh_modules/@mpaas/compress/src/main/cpp/types/libcompress", | ||
| 185 | - "registryType": "local" | ||
| 186 | - }, | ||
| 187 | - "libframework_api.so@oh_modules/.ohpm/@mpaas+framework@0.0.2/oh_modules/@mpaas/framework/src/main/cpp/types/libframework_api": { | ||
| 188 | - "name": "libframework_api.so", | ||
| 189 | - "resolved": "oh_modules/.ohpm/@mpaas+framework@0.0.2/oh_modules/@mpaas/framework/src/main/cpp/types/libframework_api", | ||
| 190 | - "registryType": "local" | ||
| 191 | - }, | ||
| 192 | - "libgwcli.so@oh_modules/.ohpm/@mpaas+fake-island@1.0.0/oh_modules/@mpaas/fake-island/types": { | ||
| 193 | - "name": "libgwcli.so", | ||
| 194 | - "resolved": "oh_modules/.ohpm/@mpaas+fake-island@1.0.0/oh_modules/@mpaas/fake-island/types", | ||
| 195 | - "registryType": "local" | ||
| 196 | - }, | ||
| 197 | - "liblang.so@oh_modules/.ohpm/@mpaas+lang@1.0.0/oh_modules/@mpaas/lang/types": { | ||
| 198 | - "name": "liblang.so", | ||
| 199 | - "resolved": "oh_modules/.ohpm/@mpaas+lang@1.0.0/oh_modules/@mpaas/lang/types", | ||
| 200 | - "registryType": "local" | ||
| 201 | - }, | ||
| 202 | - "libmplog.so@oh_modules/.ohpm/@mpaas+trace-log@0.0.2/oh_modules/@mpaas/trace-log/types": { | ||
| 203 | - "name": "libmplog.so", | ||
| 204 | - "resolved": "oh_modules/.ohpm/@mpaas+trace-log@0.0.2/oh_modules/@mpaas/trace-log/types", | ||
| 205 | - "registryType": "local" | ||
| 206 | - }, | ||
| 207 | - "libshuckle.so@oh_modules/.ohpm/@mpaas+shuckle@1.0.0/oh_modules/@mpaas/shuckle/src/main/cpp/types/libshuckle": { | ||
| 208 | - "name": "lishuckle.so", | ||
| 209 | - "resolved": "oh_modules/.ohpm/@mpaas+shuckle@1.0.0/oh_modules/@mpaas/shuckle/src/main/cpp/types/libshuckle", | ||
| 210 | - "registryType": "local", | ||
| 211 | - "dependencies": { | ||
| 212 | - "@mpaas/framework": "^0.0.2" | ||
| 213 | - } | ||
| 214 | - }, | ||
| 215 | - "long@5.2.1": { | ||
| 216 | - "name": "long", | ||
| 217 | - "integrity": "sha512-GKSNGeNAtw8IryjjkhZxuKB3JzlcLTwjtiQCHKvqQet81I93kXslhDQruGI/QsddO83mcDToBVy7GqGS/zYf/A==", | ||
| 218 | - "resolved": "https://ohpm.openharmony.cn/ohpm/long/-/long-5.2.1.tgz", | ||
| 219 | - "shasum": "e27595d0083d103d2fa2c20c7699f8e0c92b897f", | ||
| 220 | - "registryType": "ohpm" | ||
| 221 | - }, | ||
| 222 | - "pako@2.1.0": { | ||
| 223 | - "name": "pako", | ||
| 224 | - "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==", | ||
| 225 | - "resolved": "https://ohpm.openharmony.cn/ohpm/pako/-/pako-2.1.0.tgz", | ||
| 226 | - "shasum": "266cc37f98c7d883545d11335c00fbd4062c9a86", | ||
| 227 | - "registryType": "ohpm" | ||
| 228 | } | 23 | } |
| 229 | } | 24 | } |
| 230 | } | 25 | } |
| @@ -9,10 +9,7 @@ | @@ -9,10 +9,7 @@ | ||
| 9 | "main": "", | 9 | "main": "", |
| 10 | "version": "1.0.0", | 10 | "version": "1.0.0", |
| 11 | "dependencies": { | 11 | "dependencies": { |
| 12 | - "@ohos/pulltorefresh": "^2.0.5", | ||
| 13 | - "@mpaas/udid": "0.0.2", | ||
| 14 | - "@mpaas/upgrade": "0.0.2", | ||
| 15 | - "@mpaas/framework": "0.0.2" | 12 | + "@ohos/pulltorefresh": "^2.0.5" |
| 16 | }, | 13 | }, |
| 17 | "dynamicDependencies": {} | 14 | "dynamicDependencies": {} |
| 18 | } | 15 | } |
sight_harmony/products/phone/.ohpmrc
deleted
100644 → 0
| 1 | -@mpaas:registry=https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/meta |
| @@ -8,7 +8,6 @@ import { | @@ -8,7 +8,6 @@ import { | ||
| 8 | EmitterEventId, | 8 | EmitterEventId, |
| 9 | EmitterUtils, | 9 | EmitterUtils, |
| 10 | Logger, | 10 | Logger, |
| 11 | - MpaasUtils, | ||
| 12 | NetworkManager, | 11 | NetworkManager, |
| 13 | NetworkType, | 12 | NetworkType, |
| 14 | SPHelper, | 13 | SPHelper, |
| @@ -21,10 +20,6 @@ export default class EntryAbility extends UIAbility { | @@ -21,10 +20,6 @@ export default class EntryAbility extends UIAbility { | ||
| 21 | onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { | 20 | onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { |
| 22 | SPHelper.init(this.context); | 21 | SPHelper.init(this.context); |
| 23 | hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); | 22 | hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); |
| 24 | - | ||
| 25 | - // mPaaS 初始化 | ||
| 26 | - MpaasUtils.initApp(this.context) | ||
| 27 | - | ||
| 28 | registerRouter(); | 23 | registerRouter(); |
| 29 | NetworkManager.getInstance().init() | 24 | NetworkManager.getInstance().init() |
| 30 | WDHttp.initHttpHeader() | 25 | WDHttp.initHttpHeader() |
| 1 | import { BottomNavigationComponent, LogoutViewModel } from 'wdComponent'; | 1 | import { BottomNavigationComponent, LogoutViewModel } from 'wdComponent'; |
| 2 | import { BreakpointConstants } from 'wdConstant'; | 2 | import { BreakpointConstants } from 'wdConstant'; |
| 3 | 3 | ||
| 4 | -import { BreakpointSystem, EmitterEventId, EmitterUtils, Logger, MpaasUpgradeCheck } from 'wdKit'; | 4 | +import { BreakpointSystem, EmitterEventId, EmitterUtils, Logger } from 'wdKit'; |
| 5 | import router from '@ohos.router'; | 5 | import router from '@ohos.router'; |
| 6 | import { promptAction } from '@kit.ArkUI'; | 6 | import { promptAction } from '@kit.ArkUI'; |
| 7 | import { HWLocationUtils } from 'wdHwAbility/Index'; | 7 | import { HWLocationUtils } from 'wdHwAbility/Index'; |
| 8 | -import { UpgradeTipDialog } from "./upgradePage/UpgradeTipDialog" | 8 | + |
| 9 | 9 | ||
| 10 | const TAG = 'MainPage'; | 10 | const TAG = 'MainPage'; |
| 11 | 11 | ||
| @@ -16,7 +16,6 @@ struct MainPage { | @@ -16,7 +16,6 @@ struct MainPage { | ||
| 16 | @Provide pageHide: number = -1 | 16 | @Provide pageHide: number = -1 |
| 17 | private breakpointSystem: BreakpointSystem = new BreakpointSystem() | 17 | private breakpointSystem: BreakpointSystem = new BreakpointSystem() |
| 18 | @StorageLink('currentBreakpoint') @Watch('watchCurrentBreakpoint') currentBreakpoint: string = BreakpointConstants.BREAKPOINT_XS; | 18 | @StorageLink('currentBreakpoint') @Watch('watchCurrentBreakpoint') currentBreakpoint: string = BreakpointConstants.BREAKPOINT_XS; |
| 19 | - upgradeDialogController?: CustomDialogController | ||
| 20 | 19 | ||
| 21 | watchCurrentBreakpoint() { | 20 | watchCurrentBreakpoint() { |
| 22 | Logger.info(TAG, `watchCurrentBreakpoint, this.currentBreakpoint: ${this.currentBreakpoint}`); | 21 | Logger.info(TAG, `watchCurrentBreakpoint, this.currentBreakpoint: ${this.currentBreakpoint}`); |
| @@ -44,26 +43,6 @@ struct MainPage { | @@ -44,26 +43,6 @@ struct MainPage { | ||
| 44 | onPageShow() { | 43 | onPageShow() { |
| 45 | Logger.info(TAG, 'onPageShow'); | 44 | Logger.info(TAG, 'onPageShow'); |
| 46 | this.pageShow = Math.random() | 45 | this.pageShow = Math.random() |
| 47 | - | ||
| 48 | - // TODO: 升级检查,暂时不开放 | ||
| 49 | - // this.upgradeCheck() | ||
| 50 | - } | ||
| 51 | - | ||
| 52 | - upgradeCheck() { | ||
| 53 | - const mpaas = new MpaasUpgradeCheck() | ||
| 54 | - mpaas.checkNewVersion().then((data) => { | ||
| 55 | - if (data != null) { | ||
| 56 | - | ||
| 57 | - this.upgradeDialogController = new CustomDialogController({ | ||
| 58 | - builder: UpgradeTipDialog({ | ||
| 59 | - tipContent:data | ||
| 60 | - }) | ||
| 61 | - }) | ||
| 62 | - this.upgradeDialogController?.open() | ||
| 63 | - } | ||
| 64 | - }).catch(() => { | ||
| 65 | - | ||
| 66 | - }) | ||
| 67 | } | 46 | } |
| 68 | 47 | ||
| 69 | onBackPress() { | 48 | onBackPress() { |
| 1 | -import { UpgradeTipContent } from 'wdKit/Index' | ||
| 2 | - | ||
| 3 | -@Preview | ||
| 4 | -@CustomDialog | ||
| 5 | -export struct UpgradeTipDialog { | ||
| 6 | - private tipContent: UpgradeTipContent = {} as UpgradeTipContent | ||
| 7 | - cancel?: () => void | ||
| 8 | - confirm?: () => void | ||
| 9 | - controller: CustomDialogController | ||
| 10 | - | ||
| 11 | - build() { | ||
| 12 | - Column() { | ||
| 13 | - Text(this.tipContent.content).fontSize(20).margin({ top: 10, bottom: 10 }) | ||
| 14 | - Flex({ justifyContent: FlexAlign.SpaceAround }) { | ||
| 15 | - Button('cancel') | ||
| 16 | - .onClick(() => { | ||
| 17 | - this.controller.close() | ||
| 18 | - if (this.cancel) { | ||
| 19 | - this.cancel() | ||
| 20 | - } | ||
| 21 | - }).backgroundColor(0xffffff).fontColor(Color.Black) | ||
| 22 | - Button('立即升级') | ||
| 23 | - .onClick(() => { | ||
| 24 | - this.controller.close() | ||
| 25 | - if (this.confirm) { | ||
| 26 | - this.confirm() | ||
| 27 | - } | ||
| 28 | - }).backgroundColor(0xffffff).fontColor(Color.Red) | ||
| 29 | - }.margin({ bottom: 10 }) | ||
| 30 | - } | ||
| 31 | - } | ||
| 32 | - | ||
| 33 | - | ||
| 34 | -} |
1.16 KB
| 1 | -{ | ||
| 2 | - "absBase64Code":"", | ||
| 3 | - "appId":"PRI2B87143171150", | ||
| 4 | - "appKey":"PRI2B87143171150_HARMONY", | ||
| 5 | - "base64Code":"", | ||
| 6 | - "v6Base64Code":"", | ||
| 7 | - "workspaceId":"default", | ||
| 8 | - "rpcGW":"http://123.56.249.180/mgw.htm", | ||
| 9 | - "mpaasapi":"http://123.56.249.180/mgw.htm", | ||
| 10 | - "pushPort":"", | ||
| 11 | - "pushGW":"", | ||
| 12 | - "logGW":"", | ||
| 13 | - "mvetAppWS":"10.250.12.199" | ||
| 14 | -} |
-
Please register or login to post a comment