邪恶酒剑仙
邪恶酒剑仙
  • 发布:2025-04-16 10:48
  • 更新:2025-04-16 11:13
  • 阅读:188

uniappX 导入微信ios sdk现在要吊起小程序 但是现在只吊起了微信 调起小程序没有反应

分类:uni-app x

uniappX 导入微信ios sdk现在要吊起小程序 但是现在只吊起了微信 调起小程序没有反应 下面是demo 哪个大哥 给看看呗 不知道哪里有问题 项目太大了 我就把插件那部分弄出来了

2025-04-16 10:48 负责人:无 分享
已邀请:
DCloud_UNI_yuhe

DCloud_UNI_yuhe

hello , 我看你这个光是个插件,你是怎么调用的,调用的参数是啥,提供一下代码看一下

  • 邪恶酒剑仙 (作者)

    就写了两个按钮 触发的掉用了一下 在index.uvue里 下面是代码

    <template>

    <view>

    <button @tap="kotlinMemGetTest">通过kotlin获取内存(同步)</button>

    <button @tap="kotlinMemListenTest">kotlin监听内存并持续回调UTS</button>

    <button @tap="openMiniWXApp">打开微信小程序</button>

    <button @tap="getMyNameAction">注册微信</button>

    <text>{{memInfo}}</text>

    </view>

    </template>


    <script setup>


    import { offMemoryInfoChange,onMemoryInfoChange,getMemoryInfo,getMyNameCCC,zhuceWxAppAction,dakaiXiaoChengxuAction} from "@/uni_modules/uni-MemoryInfo";  

    const memInfo = ref('')

    function kotlinMemGetTest() {
    let array = getMemoryInfo()
    memInfo.value = "可用内存:" + array[0] + "MB--整体内存:" + array[1] + "MB"
    }
    function kotlinMemListenTest() {
    onMemoryInfoChange((res: Array<number>) => {
    memInfo.value = "可用内存:" + res[0] + "MB--整体内存:" + res[1] + "MB"
    })
    }

    function kotlinStopMemListenTest() {
    offMemoryInfoChange()
    memInfo.value = "已暂停"
    }
    function getMyNameAction() {
    zhuceWxAppAction()
    }
    function openMiniWXApp() {
    dakaiXiaoChengxuAction()
    }

    </script>

    2025-04-16 12:09

  • 邪恶酒剑仙 (作者)

    配置的参数 我都写到插件里了 外面就直接用方法调用的

    2025-04-16 12:12

  • 邪恶酒剑仙 (作者)

    这工程有点大 我就传了这个插件部分 如果方便的话 加个微信 我给您发

    2025-04-16 12:14

  • 态度是心的面具

    回复 邪恶酒剑仙: 方便微信吗,我也想看看,哈哈

    2025-04-16 12:25

  • 邪恶酒剑仙 (作者)

    回复 态度是心的面具: 行啊 15004524808 我的微信

    2025-04-16 12:37

要回复问题请先登录注册