You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trustieforge/app/views/wechats/user_activities.html.erb

63 lines
2.5 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html ng-app="wechat">
<head>
<base href="/">
<title>Trustie平台</title>
<meta charset='utf-8' />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="apple-mobile-web-app-capable" content="no" />
<meta content='True' name='HandheldFriendly' />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<link type="text/css" rel="stylesheet" href="/stylesheets/weui/weui.min.css" />
<%= stylesheet_link_tag '/stylesheets/weui/weixin.css' %>
<script src="//res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript">
window.g_debug = false; //调试标志,如果在本地请置为true
window.apiUrl = '/api/v1/';
window.g_redirect_path = '<%= @path %>';
window.g_localhost = "<%= Setting.protocol %>"+ "://"+"<%= Setting.host_name%>";
window.g_appid = "<%= @appid %>";
<% if @course_id %>
window.g_courseid = <%= @course_id %>;
<% elsif @project_id %>
window.g_projectid = <%= @project_id %>;
<% end %>
//参考文档
//https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141115&token=&lang=zh_CN
<% 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 %>
wx.ready(function(){
console.log("wx ready");
});
wx.error(function(err){
console.log(err);
});
</script>
</head>
<body>
<div ng-view>
</div>
<!--<script src="https://dn-demotest.qbox.me/angular.all.min.js"></script>-->
<script src="/javascripts/wechat/build/angular.all.min.js"></script>
<%= include_wechat_jsfile %>
</body>
</html>