Intl is not defined
发布于 2 年前 作者 yuangang 9893 次浏览 来自 问答

Andriod 真机调 Intl 接口报 not defined 错误:

MiniProgramError
Intl is not defined
ReferenceError: Intl is not defined
at Intl (pages/pages/show/index.js:8:16)
at o.safeCallback (WASubContext.js:1:189299)
at o.call (WASubContext.js:1:189084)
at t (WASubContext.js:1:207485)
at f (WASubContext.js:1:207810)
at d.pretendAttached (WASubContext.js:1:219843)
at Module.ds (WASubContext.js:1:407003)
at (WASubContext.js:1:457213)
at (WASubContext.js:1:423016)
at (WASubContext.js:1:458602)
Page({
    data: {
        price: ''
    },
    onLoad() {
        let price = Intl.NumberFormat('zh', {style: 'currency', currency: 'CNY'}).format(9.90)
        this.setData({price})
    },
})

基出库:2.32.1

iOS、开发者工具均正常,就Android异常。

望修复。

1 回复

你好,我这边华为真机并没有复现,也没有报错能否提供一下报错机型

回到顶部