|
@@ -256,6 +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) )
|
|
|
+ }
|
|
|
+ })
|
|
|
this.screenWidth = window.screen.width;
|
|
|
this.screenHeight = window.screen.height;
|
|
|
if(window.innerWidth && window.screen.width){
|
|
@@ -451,6 +464,22 @@
|
|
|
console.log("***leftScroll***",this.currentIndex,this.aiImagesList.length)
|
|
|
this.aiSubmit(2);//继续生成下一张
|
|
|
},
|
|
|
+ //预览图片-使用微信自带的预览功能,即H5中不可用
|
|
|
+ previewAction() {
|
|
|
+ if(window.__wxjs_environment === 'miniprogram'){
|
|
|
+ let imglist = this.aiImagesList.map(it=>it.image);
|
|
|
+ wx.previewImage({
|
|
|
+ current: this.currentIndex,
|
|
|
+ urls: imglist,
|
|
|
+ success: (res) => {
|
|
|
+ console.log('图片预览:', res);
|
|
|
+ },
|
|
|
+ fail:(err)=>{
|
|
|
+ console.warn('图片预览-err:', res);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
//返回上一页
|
|
|
goback(){
|
|
|
this.$router.go(-1);
|
|
@@ -940,7 +969,7 @@
|
|
|
console.warn("***single***",single.status,single.progress,this.count,single);
|
|
|
let self = this;
|
|
|
if(single.status=='starting'){//启动中的逻辑
|
|
|
- if(this.count>=1){
|
|
|
+ if(this.count>=20){
|
|
|
this.stopInterval();//停止轮询
|
|
|
// this.dialogAIVisible = true;
|
|
|
MessageBox.confirm('',{
|