xiaoe_mp_npm 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -541,15 +541,32 @@ Component({
|
|
|
541
541
|
})
|
|
542
542
|
var self =this
|
|
543
543
|
// 如果是ios 需要先判断微信相册权限
|
|
544
|
-
if(!this.isAndroid) {
|
|
545
|
-
|
|
546
|
-
if(
|
|
547
|
-
|
|
544
|
+
if(!this.data.isAndroid) {
|
|
545
|
+
// 判断是否支持该api
|
|
546
|
+
if (wx.getAppAuthorizeSetting) {
|
|
547
|
+
const appAuthorizeSetting = wx.getAppAuthorizeSetting()
|
|
548
|
+
if(appAuthorizeSetting.albumAuthorized === 'denied') {
|
|
549
|
+
// toast提示
|
|
550
|
+
this.setData({
|
|
551
|
+
isShowUnauthorizedModal: true
|
|
552
|
+
})
|
|
553
|
+
wx.hideLoading()
|
|
554
|
+
return
|
|
555
|
+
}
|
|
556
|
+
} else {
|
|
557
|
+
wx.hideLoading()
|
|
558
|
+
// 提示升级微信
|
|
548
559
|
this.setData({
|
|
549
|
-
|
|
560
|
+
firstContent: '当前微信版本版本过低,请升级后再使用',
|
|
561
|
+
secondContent: '可先长按保存海报再进行分享~',
|
|
562
|
+
isShowSaveTip: true,
|
|
563
|
+
}, ()=>{
|
|
564
|
+
setTimeout(()=>{
|
|
565
|
+
this.setData({
|
|
566
|
+
isShowSaveTip: false
|
|
567
|
+
})
|
|
568
|
+
}, 2000)
|
|
550
569
|
})
|
|
551
|
-
wx.hideLoading()
|
|
552
|
-
return
|
|
553
570
|
}
|
|
554
571
|
}
|
|
555
572
|
wx.getSetting({
|
package/package.json
CHANGED
|
@@ -541,15 +541,32 @@ Component({
|
|
|
541
541
|
})
|
|
542
542
|
var self =this
|
|
543
543
|
// 如果是ios 需要先判断微信相册权限
|
|
544
|
-
if(!this.isAndroid) {
|
|
545
|
-
|
|
546
|
-
if(
|
|
547
|
-
|
|
544
|
+
if(!this.data.isAndroid) {
|
|
545
|
+
// 判断是否支持该api
|
|
546
|
+
if (wx.getAppAuthorizeSetting) {
|
|
547
|
+
const appAuthorizeSetting = wx.getAppAuthorizeSetting()
|
|
548
|
+
if(appAuthorizeSetting.albumAuthorized === 'denied') {
|
|
549
|
+
// toast提示
|
|
550
|
+
this.setData({
|
|
551
|
+
isShowUnauthorizedModal: true
|
|
552
|
+
})
|
|
553
|
+
wx.hideLoading()
|
|
554
|
+
return
|
|
555
|
+
}
|
|
556
|
+
} else {
|
|
557
|
+
wx.hideLoading()
|
|
558
|
+
// 提示升级微信
|
|
548
559
|
this.setData({
|
|
549
|
-
|
|
560
|
+
firstContent: '当前微信版本版本过低,请升级后再使用',
|
|
561
|
+
secondContent: '可先长按保存海报再进行分享~',
|
|
562
|
+
isShowSaveTip: true,
|
|
563
|
+
}, ()=>{
|
|
564
|
+
setTimeout(()=>{
|
|
565
|
+
this.setData({
|
|
566
|
+
isShowSaveTip: false
|
|
567
|
+
})
|
|
568
|
+
}, 2000)
|
|
550
569
|
})
|
|
551
|
-
wx.hideLoading()
|
|
552
|
-
return
|
|
553
570
|
}
|
|
554
571
|
}
|
|
555
572
|
wx.getSetting({
|