1、page外全局定义开关变量
var a
;
Page
({})
2、onshow事件中:
if
(a
)
{
a
=
false
;
return
;
}
3、在你需要调用 preivewImage 之前,将这个开关变量设置为 true
a
=
true
wx
.previewImage
({
})