微信图片点击调试

This commit is contained in:
yuanke 2016-09-20 15:14:48 +08:00
parent 4e29242579
commit 930acd382c
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@
module WechatsHelper module WechatsHelper
def include_wechat_jsfile def include_wechat_jsfile
# if Rails.env.production? # if Rails.env.production?
# javascript_include_tag '/javascripts/wechat/build/app.min.js' javascript_include_tag '/javascripts/wechat/build/app.min.js'
# else # else
wechat_path = File.join(Rails.root, "public", "javascripts", "wechat") wechat_path = File.join(Rails.root, "public", "javascripts", "wechat")
srcs = Rails.application.config.wechat_srcs srcs = Rails.application.config.wechat_srcs

View File

@ -12,7 +12,7 @@ app.directive('imgPreview',["$timeout",'wx',function(timer,wx){
if(item.src){ if(item.src){
srcList.push(item.src); srcList.push(item.src);
$(item).click(function(e){ $(item).click(function(e){
wx.previewImage(this.src,srcList); wx.previewImage({current:this.src,urls:srcList});
}); });
} }
}); });