我想问一下,扫码未开启相机权限 提示‘未获取相机权限’,这个提示可以换成日语吗
自定义代码如下:
created() {
var statusBarHeight = uni.getSystemInfoSync().statusBarHeight; //状态栏
var height = statusBarHeight + 44 + 104 + 'px';
var pages = getCurrentPages();
var page = pages[pages.length - 1];
// #ifdef APP-PLUS
var currentWebview = page.$getAppWebview();
this.barcode = plus.barcode.create('barcode', this.barcode, {
top: '0',
bottom: '0',
left: '0px',
width: '100%',
//height: height,//这里可以设置扫码框的高度
scanbarColor: '#0962EA',
position: 'static',
frameColor: '#0962EA'
});
// 创建返回原生按钮
var backVew = new plus.nativeObj.View('backVew', {
top: '0px',
left: '0px',
height: '40px',
width: '100%'
},
[{
tag: 'img',
id: 'backBar',
src: 'static/imgs/arrow-back.png',
position: {
top: '12px',
left: '20px',
width: '8px',
height: '15px'
}
}]);
// 创建展示类内容组件
var content = new plus.nativeObj.View('content', {
top: '0px',
left: '0px',
height: '100%',
width: '100%'  
            },  
            [{  
                    tag: 'img',  
                    id: 'backBar',  
                    src: 'static/imgs/arrow-back.png',  
                    position: {  
                        top: '12px',  
                        left: '20px',  
                        width: '8px',  
                        height: '15px'  
                    }  
                }, {  
                    tag: 'font',  
                    id: 'scanTitle',  
                    text: 'スキャン',  
                    textStyles: {  
                        size: '18px',  
                        color: '#ffffff'  
                    },  
                    position: {  
                        top: '0px',  
                        left: '0px',  
                        width: '100%',  
                        height: '40px'  
                    }  
                },  
                {  
                    tag: 'font',  
                    id: 'scanTips',  
                    text: 'QRコードに向けてください',  
                    textStyles: {  
                        size: '12px',  
                        color: '#F0F1F3',  
                        whiteSpace: 'normal'  
                    },  
                    position: {  
                        top: '70%',  
                        left: '10%',  
                        width: '80%',  
                        height: 'wrap_content'  
                    }  
                }  
            ]);  
        this.barcode.onmarked = this.onmarked;  
        currentWebview.append(this.barcode);  
        currentWebview.append(content);  
        currentWebview.append(backVew);  
        const res = uni.getSystemInfoSync();  
        // if(res.platform == 'android'){//安卓机  
        this.barcode.start();  
        // }  
        backVew.addEventListener("click", function(e) { //返回按钮  
            uni.navigateBack({  
                delta: 1  
            })  
            barcode.close();  
            plus.navigator.setFullscreen(false);  
        }, false);  
        // #endif  
    }, 
             
             
             
			 
                                        
                                     
                                                                                                                                                                                 
                                                                    