function showGallery(){
if (arguments.length==2){
var gid=arguments[0];
var image=arguments[1];
}
else{
if(!event.target.hasAttribute("data-image")){return}
var image=event.target.attributes["data-image"].value;
var gid=event.target.attributes["data-gid"].value;
}
var glr = document.getElementById(gid);
var images=glr.attributes["data-images"];
var ary =images.value.split("|");
var index=-1;
for(var idx=0;idx<ary.length;idx++){
if(ary[idx]==image || ary[idx]=="\'"+image +"\'"){
index=idx;
break;
}
}
if (index>=0){
var gimg = glr.getElementsByClassName("weui-gallery__img")[0];
if(ary[idx]=="\'"+image +"\'"){
gimg.style.backgroundImage=document.getElementById(image).style.backgroundImage;
}
else{
gimg.style.backgroundImage="url("+ary[index] +")";
}
glr.index=index;
window.location.href=ary[index] ; //加了这句,注释了下局
//show(gid);
}
}