selectPic(){
if(!this.approvalIdentity){
if(this.lifeCommonService.isWeiXin()){
const t = this;
wx.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: function (res) {
this.localId = res.localIds[0];
const THIS = t;
wx.uploadImage({
localId: this.localId,
isShowProgressTips: 1,
success: function (response) {
THIS.serverId = response.serverId;
const m = {
mediaId: response.serverId,
origin: 'ydLife'
};
THIS.myService.mediaGet(m).subscribe(async e => {
if (e['success']) {
THIS.vxUrl = e['data']['imgUrl'];
THIS.changeDetectorRef.markForCheck();
THIS.changeDetectorRef.detectChanges();
} else {
alert(e['message']);
}
});
}
});
}
});
}else{
this.openPopInfo('请在微信端操作!')
}
}
}
你好,给下微信版本号和复现链接