|
@@ -122,9 +122,6 @@ export default {
|
|
|
created() {
|
|
created() {
|
|
|
// 授权
|
|
// 授权
|
|
|
getTicketFun(['downloadImage']).then(() => {
|
|
getTicketFun(['downloadImage']).then(() => {
|
|
|
- if (!wx || !wx.downloadImage) {
|
|
|
|
|
- console.error('wx.downloadImage 不存在或未初始化');
|
|
|
|
|
- }
|
|
|
|
|
this.imgArr = [];
|
|
this.imgArr = [];
|
|
|
// <!-- 0=企业微信,1=H5相机 -->
|
|
// <!-- 0=企业微信,1=H5相机 -->
|
|
|
if (this.formData) {
|
|
if (this.formData) {
|
|
@@ -150,15 +147,15 @@ export default {
|
|
|
downloadImage(mediaInfos) {
|
|
downloadImage(mediaInfos) {
|
|
|
console.log('mediaInfos:', mediaInfos);
|
|
console.log('mediaInfos:', mediaInfos);
|
|
|
if (!mediaInfos.length) {
|
|
if (!mediaInfos.length) {
|
|
|
- console.log('this.imgArr1:', this.imgArr);
|
|
|
|
|
return;
|
|
return;
|
|
|
} else {
|
|
} else {
|
|
|
let mediaitem = mediaInfos.pop();
|
|
let mediaitem = mediaInfos.pop();
|
|
|
|
|
+ console.log('mediaitem:', mediaitem);
|
|
|
wx.downloadImage({
|
|
wx.downloadImage({
|
|
|
serverId: mediaitem.mediaId,
|
|
serverId: mediaitem.mediaId,
|
|
|
isShowProgressTips: 0, // 默认为1,显示进度提示
|
|
isShowProgressTips: 0, // 默认为1,显示进度提示
|
|
|
success: (res) => {
|
|
success: (res) => {
|
|
|
- console.log('res.localData:', res.localData);
|
|
|
|
|
|
|
+ console.log('res.localData:', res);
|
|
|
this.imgArr.push({
|
|
this.imgArr.push({
|
|
|
mediaId: mediaitem.mediaId,
|
|
mediaId: mediaitem.mediaId,
|
|
|
fileUrl: res.localData,
|
|
fileUrl: res.localData,
|