|
|
@@ -23,40 +23,89 @@ |
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
down() {
|
|
|
|
let url = this.qrCodeUrl + '/customer/getQrCode?pageUrl=pages/mine/registerForm'
|
|
|
|
console.log(url)
|
|
|
|
uni.downloadFile({
|
|
|
|
url,
|
|
|
|
success: (res) => {
|
|
|
|
console.log(res)
|
|
|
|
uni.downloadFile({
|
|
|
|
url, //图片地址
|
|
|
|
success: (res) => {
|
|
|
|
console.log('downloadFile success', res)
|
|
|
|
if (res.statusCode === 200) {
|
|
|
|
console.log('downloadFile res.statusCode === 200', res)
|
|
|
|
uni.saveImageToPhotosAlbum({
|
|
|
|
filePath: res.tempFilePath,
|
|
|
|
success: function() {
|
|
|
|
uni.showToast({
|
|
|
|
title: "保存成功",
|
|
|
|
icon: "none"
|
|
|
|
})
|
|
|
|
},
|
|
|
|
fail: function() {
|
|
|
|
uni.showToast({
|
|
|
|
title: "保存失败",
|
|
|
|
icon: "none"
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
console.log('downloadFile res.statusCode !== 200', res)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
});
|
|
|
|
let url = this.qrCodeUrl+'/customer/getQrCode?page=pages/mine/registerForm&scene='+this.projectId
|
|
|
|
console.log(url) |
|
|
|
uni.getImageInfo({ |
|
|
|
src:url, |
|
|
|
success: (res) => { |
|
|
|
console.log(res) |
|
|
|
uni.saveImageToPhotosAlbum({ |
|
|
|
filePath:res.path, |
|
|
|
success: () => { |
|
|
|
uni.showToast({ |
|
|
|
title: "保存成功", |
|
|
|
icon: "none" |
|
|
|
}) |
|
|
|
}, |
|
|
|
fail: () => { |
|
|
|
uni.showToast({ |
|
|
|
title: "保存失败", |
|
|
|
icon: "none" |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
// uni.getSetting({ |
|
|
|
// success:(res)=> { |
|
|
|
// if(Object.keys(res.authSetting).length>0){ |
|
|
|
// if(res.authSetting['scope.writePhotosAlbum']==undefined){ |
|
|
|
// uni.openSetting({ |
|
|
|
// success: (res) => { |
|
|
|
// console.log("设置权限1",res.authSetting) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// }else{ |
|
|
|
// if(!res.authSetting['scope.writePhotosAlbum']){ |
|
|
|
// uni.openSetting({ |
|
|
|
// success: (res) => { |
|
|
|
// console.log("设置权限1",res.authSetting) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
|
|
|
|
// } |
|
|
|
// } |
|
|
|
// }else{ |
|
|
|
// return |
|
|
|
// } |
|
|
|
// } |
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
|
|
// uni.downloadFile({
|
|
|
|
// url,
|
|
|
|
// success: (res) => {
|
|
|
|
// console.log(res)
|
|
|
|
// uni.downloadFile({
|
|
|
|
// url, //图片地址
|
|
|
|
// success: (res) => {
|
|
|
|
// console.log('downloadFile success', res)
|
|
|
|
// if (res.statusCode === 200) {
|
|
|
|
// console.log('downloadFile res.statusCode === 200', res)
|
|
|
|
// uni.saveImageToPhotosAlbum({
|
|
|
|
// filePath: res.tempFilePath,
|
|
|
|
// success: function() {
|
|
|
|
// uni.showToast({
|
|
|
|
// title: "保存成功",
|
|
|
|
// icon: "none"
|
|
|
|
// })
|
|
|
|
// },
|
|
|
|
// fail: function() {
|
|
|
|
// uni.showToast({
|
|
|
|
// title: "保存失败",
|
|
|
|
// icon: "none"
|
|
|
|
// })
|
|
|
|
// }
|
|
|
|
// })
|
|
|
|
// } else {
|
|
|
|
// console.log('downloadFile res.statusCode !== 200', res)
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// })
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onLoad() {
|
|
|
|