|
@@ -31,6 +31,26 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
downloadImg(){
|
|
downloadImg(){
|
|
|
|
|
+ // #ifdef APP-PLUS
|
|
|
|
|
+ let platformType = uni.getSystemInfoSync().platform
|
|
|
|
|
+ if(platformType == 'android'){
|
|
|
|
|
+ let store = plus.navigator.checkPermission('android.permission.READ_EXTERNAL_STORAGE')
|
|
|
|
|
+ if(store != 'authorized'){
|
|
|
|
|
+ this.$util.confirmModal({content:'将申请您的存储权限,用于保存小程序码'},() => {
|
|
|
|
|
+ this.downloadImg2()
|
|
|
|
|
+ })
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.downloadImg2()
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.downloadImg2()
|
|
|
|
|
+ }
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
|
|
+ this.downloadImg2()
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ },
|
|
|
|
|
+ downloadImg2(){
|
|
|
uni.downloadFile({
|
|
uni.downloadFile({
|
|
|
url: this.imgUrl,
|
|
url: this.imgUrl,
|
|
|
success: (res) => {
|
|
success: (res) => {
|