更新记录

0.0.4(2024-06-03)

安卓端,新增 launchApp 方法,支持打开(带参)第三方app。

0.0.3(2024-05-21)

使用文档更新

0.0.2(2024-05-21)

1、新增根据 App 注册协议获取某一类 App 列表。

查看更多

平台兼容性

Vue2 Vue3
×
App 快应用 微信小程序 支付宝小程序 百度小程序 字节小程序 QQ小程序
HBuilderX 4.12,Android:5.0,iOS:不支持 × × × × × ×
钉钉小程序 快手小程序 飞书小程序 京东小程序
× × × ×
H5-Safari Android Browser 微信浏览器(Android) QQ浏览器(Android) Chrome IE Edge Firefox PC-Safari
× × × × × × × × ×

ux-getApps

使用文档

<template>
    <view class="content">
        <button @click="getApps('image/*')">获取可打开图片App列表</button>
        <button @click="getApps('application/pdf')">获取可打开 pdf App列表</button>
        <button @click="getOtherApps('geo:0,0?q=')">获取可打开地图App列表</button>
        <button @click="getOtherApps('weixin://')">获取微信App</button>
        <view class="" v-for="(item, index) in appList" :key="index">
            <image :src="'data:image/png;base64,'+item.icon" mode="widthFix" style="width: 100rpx;"></image>
            <text>{{item.name}}</text>
        </view>
    </view>
</template>

<script setup>
    import { getAppList, AppInfo, AppOptions } from '../../uni_modules/ux-getApps';
    const appList = ref<Array<AppInfo>>([])
    const getApps = (type: string) => {
        uni.showLoading({
            title: '读取中...'
        })
        const list = getAppList(type)
        appList.value = list as Array<AppInfo>
        uni.hideLoading();
    }
    const getOtherApps = (uri: string) => {
        uni.showLoading({
            title: '读取中...'
        })
        const list = getAppList('', {
            uri
        } as AppOptions)
        appList.value = list as Array<AppInfo>
        uni.hideLoading();
    }
</script>

<style>
    .content {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .logo {
        height: 200rpx;
        width: 200rpx;
        margin-top: 200rpx;
        margin-bottom: 50rpx;
    }

    .title {
        font-size: 36rpx;
        color: #8f8f94;
    }
</style>

隐私、权限声明

1. 本插件需要申请的系统权限列表:

android.permission.QUERY_ALL_PACKAGES

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

暂无用户评论。

使用中有什么不明白的地方,就向插件作者提问吧~ 我要提问