socialforge/app/views/wechats/user_activities.html.erb

63 lines
2.5 KiB
Plaintext
Raw Normal View History

2016-05-31 20:19:45 +08:00
<!DOCTYPE html>
<html ng-app="wechat">
<head>
2016-06-07 16:47:06 +08:00
<base href="/">
2016-06-28 11:30:06 +08:00
<title>Trustie平台</title>
2016-05-31 20:19:45 +08:00
<meta charset='utf-8' />
<meta name="keywords" content="" />
<meta name="description" content="" />
2016-06-12 15:05:45 +08:00
<meta name="apple-mobile-web-app-capable" content="no" />
2016-05-31 20:19:45 +08:00
<meta content='True' name='HandheldFriendly' />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
2016-06-20 16:09:04 +08:00
<link type="text/css" rel="stylesheet" href="/stylesheets/weui/weui.min.css" />
2016-07-17 00:49:35 +08:00
<%= stylesheet_link_tag '/stylesheets/weui/weixin.css' %>
2016-06-12 15:05:45 +08:00
2016-08-02 17:01:10 +08:00
<script src="//res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
2016-05-31 20:19:45 +08:00
<script type="text/javascript">
window.g_debug = false; //调试标志,如果在本地请置为true
window.apiUrl = '/api/v1/';
window.g_redirect_path = '<%= @path %>';
2016-08-13 11:37:37 +08:00
window.g_localhost = "<%= Setting.protocol %>"+ "://"+"<%= Setting.host_name%>";
2016-08-11 17:30:06 +08:00
window.g_appid = "<%= @appid %>";
2016-06-24 09:01:12 +08:00
<% if @course_id %>
window.g_courseid = <%= @course_id %>;
<% elsif @project_id %>
window.g_projectid = <%= @project_id %>;
2016-06-24 09:01:12 +08:00
<% end %>
2016-08-02 17:01:10 +08:00
2016-08-02 17:27:40 +08:00
//参考文档
//https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141115&token=&lang=zh_CN
2016-08-03 10:56:55 +08:00
<% unless @sign_params.nil? %>
wx.config({
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来若要查看传入的参数可以在pc端打开参数信息会通过log打出仅在pc端时才会打印。
appId: '<%= @appid %>', // 必填,公众号的唯一标识
timestamp: <%= @sign_params[:timestamp] %>, // 必填,生成签名的时间戳
nonceStr: '<%= @sign_params[:noncestr] %>', // 必填,生成签名的随机串
signature: '<%= @sign_params[:signature] %>',// 必填签名见附录1
jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'onMenuShareQZone',
'hideOptionMenu','showOptionMenu','showMenuItems', 'hideMenuItems',
'hideAllNonBaseMenuItem','showAllNonBaseMenuItem','closeWindow', 'scanQRCode'] // 必填需要使用的JS接口列表所有JS接口列表见附录2
});
<% end %>
2016-08-02 17:01:10 +08:00
wx.ready(function(){
console.log("wx ready");
});
wx.error(function(err){
console.log(err);
});
2016-05-31 20:19:45 +08:00
</script>
2016-06-12 15:05:45 +08:00
2016-05-31 20:19:45 +08:00
</head>
<body>
<div ng-view>
</div>
2016-07-13 10:09:47 +08:00
<!--<script src="https://dn-demotest.qbox.me/angular.all.min.js"></script>-->
2016-07-15 14:49:23 +08:00
<script src="/javascripts/wechat/build/angular.all.min.js"></script>
2016-07-17 00:49:35 +08:00
<%= include_wechat_jsfile %>
2016-05-31 20:19:45 +08:00
</body>
2016-07-07 15:03:45 +08:00
</html>