uni-app icon indicating copy to clipboard operation
uni-app copied to clipboard

button编译open-type="getUserExtendInfo"时有问题

Open qiluogede opened this issue 10 months ago • 2 comments

示例代码 `

`

bug描述: 下面open-type="getPhoneNumber"可以 使用上面的open-type="getUserExtendInfo"就不行了 然后看快手编辑器 两个类型按钮的写法不一样 hbuilderx的打包代码里也没有搜到对getUserExtendInfo的处理 只搜到了getPhoneNumber

qiluogede avatar Apr 15 '24 01:04 qiluogede

button编译open-type="getUserExtendInfo"问题 快手小程序平台

qiluogede avatar Apr 15 '24 01:04 qiluogede

感谢反馈,问题已确认,会再未来的版本中修复这个问题,可暂时通过替换文件的方式解决 如果是用hbuilderX开发,需要替换hbuilderx安装目录下的 /HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-mp-kuaishou/dist/uni.compiler.js 文件 cli项目替换 node_modules/@dcloudio/uni-mp-kuaishou/dist/uni.compiler.js 文件 第112行 增加 || name === 'getuserextendinfo'

const transformOn = uniCliShared.createTransformOn(uniMpCompiler.transformOn, {
    match: (name, node, context) => {
        if (name === 'getphonenumber' || name === 'getuserextendinfo')
            return true;
        if (name === 'input' && (node.tag === 'input' || node.tag === 'textarea')) {
            return true;
        }
        return uniCliShared.matchTransformOn(name, node, context);
    },
});

wangjinxin613 avatar Apr 15 '24 07:04 wangjinxin613