<barcode id='1' autostart='true' class="barcode" ref="barcode" background="rgb(0,0,0)" frameColor="#1C86EE"
scanbarColor="#1C86EE" @marked="success1" @error="fail1"></barcode>
setPhoto() {
let _this = this;
if (!_this.fils) {
_this.fils = true
} else {
_this.fils = false
}
uni.chooseImage({
count: 1, //默认9
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album'], //从相册选择
success: function(res) {
console.log(JSON.stringify(res.tempFilePaths));
},
complete: function(res) {
_this.fils = false;
// _this.toStart();
}
});
},
2 个回复
微风需要竹林 (作者)
每次返回都没有调用到相机权限应该是这个问题
微风需要竹林 (作者)
这个问题我新建一个hello uniapp的项目也是一样可以复现,每次都将hbuilderx的缓存给清除就都可以复现