|
@@ -21,6 +21,26 @@ function pushHistory() {
|
|
|
};
|
|
|
window.history.replaceState(state, "", "#");
|
|
|
};
|
|
|
+(function() {
|
|
|
+ if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
|
|
|
+ handleFontSize();
|
|
|
+ } else {
|
|
|
+ if (document.addEventListener) {
|
|
|
+ document.addEventListener("WeixinJSBridgeReady", handleFontSize, false);
|
|
|
+ } else if (document.attachEvent) {
|
|
|
+ //IE浏览器,非W3C规范
|
|
|
+ document.attachEvent("onWeixinJSBridgeReady", handleFontSize);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function handleFontSize() {
|
|
|
+ // 设置网页字体为默认大小
|
|
|
+ WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize' : 0 });
|
|
|
+ // 重写设置网页字体大小的事件
|
|
|
+ WeixinJSBridge.on('menu:setfont', function() {
|
|
|
+ WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize' : 0 });
|
|
|
+ });
|
|
|
+ }
|
|
|
+})();
|
|
|
$(document).ready(function () {
|
|
|
if(window.history.length<2){
|
|
|
//$(".mui-action-back").hide();
|
|
@@ -45,15 +65,17 @@ function addLog(){
|
|
|
shareUser = sessionStorage.getItem("shareUser");
|
|
|
}
|
|
|
var url = location.href.replace('#','');
|
|
|
- if(url.indexOf("?")!=-1){
|
|
|
- if(url.indexOf("shareUser")!=-1){
|
|
|
- url = mobile.changeUrlParam(url,"shareUser",user.openid);
|
|
|
+ if (user){
|
|
|
+ if(url.indexOf("?")!=-1){
|
|
|
+ if(url.indexOf("shareUser")!=-1){
|
|
|
+ url = mobile.changeUrlParam(url,"shareUser",user.openid);
|
|
|
+ }else{
|
|
|
+ url+="&shareUser="+user.openid;
|
|
|
+ }
|
|
|
}else{
|
|
|
- url+="&shareUser="+user.openid;
|
|
|
+ url+="?shareUser="+user.openid;
|
|
|
}
|
|
|
- }else{
|
|
|
- url+="?shareUser="+user.openid;
|
|
|
- }
|
|
|
+ }
|
|
|
if(company){
|
|
|
if(url.indexOf("?")!=-1){
|
|
|
url+="&company="+company;
|