微信图片点击调试
This commit is contained in:
parent
4e29242579
commit
930acd382c
|
@ -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
|
||||||
|
|
|
@ -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});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue