|
@@ -256,19 +256,19 @@
|
|
|
// if(this.seedItem){
|
|
|
// this.title = this.seedItem.seedText;
|
|
|
// }
|
|
|
- wx.checkJsApi({
|
|
|
- jsApiList: ['previewImage'], // 需要检测的JS接口列表,所有JS接口列表见附录2,
|
|
|
- success: function(res) {
|
|
|
- // 以键值对的形式返回,可用的api值true,不可用为false
|
|
|
- // 如:{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"}
|
|
|
- console.warn("checkJsApi",res)
|
|
|
- // alert('su'+ JSON.stringify(res))
|
|
|
- },
|
|
|
- fail:(err)=>{
|
|
|
- console.warn("checkJsApi-err",err)
|
|
|
- // alert('err'+ JSON.stringify(err) )
|
|
|
- }
|
|
|
- })
|
|
|
+ // wx.checkJsApi({
|
|
|
+ // jsApiList: ['previewImage'], // 需要检测的JS接口列表,所有JS接口列表见附录2,
|
|
|
+ // success: function(res) {
|
|
|
+ // // 以键值对的形式返回,可用的api值true,不可用为false
|
|
|
+ // // 如:{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"}
|
|
|
+ // console.warn("checkJsApi",res)
|
|
|
+ // // alert('su'+ JSON.stringify(res))
|
|
|
+ // },
|
|
|
+ // fail:(err)=>{
|
|
|
+ // console.warn("checkJsApi-err",err)
|
|
|
+ // // alert('err'+ JSON.stringify(err) )
|
|
|
+ // }
|
|
|
+ // })
|
|
|
this.screenWidth = window.screen.width;
|
|
|
this.screenHeight = window.screen.height;
|
|
|
if(window.innerWidth && window.screen.width){
|
|
@@ -466,7 +466,7 @@
|
|
|
},
|
|
|
//预览图片-使用微信自带的预览功能,即H5中不可用
|
|
|
previewAction() {
|
|
|
- if(window.__wxjs_environment === 'miniprogram'){
|
|
|
+ if(wx && typeof(wx.previewImage)=='function'){
|
|
|
let imglist = this.aiImagesList.map(it=>it.image);
|
|
|
wx.previewImage({
|
|
|
current: this.currentIndex,
|