diff --git a/app/helpers/wechats_helper.rb b/app/helpers/wechats_helper.rb
new file mode 100644
index 000000000..5c6b3da8c
--- /dev/null
+++ b/app/helpers/wechats_helper.rb
@@ -0,0 +1,20 @@
+#coding=utf-8
+#
+
+module WechatsHelper
+ def include_wechat_jsfile
+ if Rails.env.production?
+ javascript_include_tag '/javascripts/wechat/build/app.min.js'
+ else
+ wechat_path = File.join(Rails.root, "public", "javascripts", "wechat")
+ srcs = Rails.application.config.wechat_srcs
+ paths = []
+ srcs.each do |src|
+ Dir.glob(wechat_path+ "/#{src}" ) do |path|
+ paths << path[File.join(Rails.root, "public").to_s.size, path.size]
+ end
+ end
+ javascript_include_tag *paths
+ end
+ end
+end
diff --git a/app/views/wechats/user_activities.html.erb b/app/views/wechats/user_activities.html.erb
index 6c3da9cf4..d21449648 100644
--- a/app/views/wechats/user_activities.html.erb
+++ b/app/views/wechats/user_activities.html.erb
@@ -10,7 +10,7 @@
-
+ <%= stylesheet_link_tag '/stylesheets/weui/weixin.css' %>
-->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<%= include_wechat_jsfile %>