weixin_common.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516
  1. //切换发布版本 true:正式版,连接生产环境;false:测试版,连接测试环境。
  2. //var publish_version = true;
  3. var publish_version = false;
  4. if(publish_version){
  5. //正式环境(厦门i健康)
  6. var server = "http://www.xmtyw.cn/wlyy/";
  7. var appId = "wxad04e9c4c5255acf";
  8. var urlName = "wlyy";
  9. var weixinUrl = "www.xmtyw.cn";
  10. var agentName = "wlyyAgent";
  11. var agentName1 = "wlyyAgent1";
  12. var OpenidAgent = "OpenidAgent";
  13. var judgeAgent = "judgeAgent";
  14. var pageName = "pageurl";
  15. var wxurl = "http%3a%2f%2fwww.xmtyw.cn%2fwlyy%2fwx%2fhtml";
  16. var imurl="http://120.41.253.95:3000";
  17. var imurl="http://27.155.101.77:3000";
  18. var imgUrlDomain = 'http://www.xmtyw.cn/';
  19. }else{
  20. //测试环境(健康之路i厦门)
  21. //var server_jm = "http://ehr.yihu.com/wlyy_jm/";// 集美中医体检
  22. // var server = "http://ehr.yihu.com/wlyy/";
  23. var server = "http://172.19.103.88:9092/wlyy/";
  24. // var server = "http://192.168.131.243:8080/";//志南
  25. // var server = "http://192.168.131.154:8080/";//张丹
  26. // var server = "http://192.168.131.24:8080/";//仕杰
  27. // var server = "http://192.168.131.127:8060/";//逸祥
  28. // var server = "http://192.168.131.133:8080/";//文杰
  29. // var server = "http://192.168.131.113:8080/";//俊杰
  30. var appId = "wx1f129f7b51701428";
  31. var urlName = "wlyy";
  32. var weixinUrl = "ehr.yihu.com";
  33. var agentName = "wlyyAgent";
  34. var agentName1 = "wlyyAgent1";
  35. var OpenidAgent = "OpenidAgent";
  36. var judgeAgent = "judgeAgent";
  37. var pageName = "pageurl";
  38. var wxurl = "http%3a%2f%2fehr.yihu.com%2fwlyy%2fwx%2fhtml";
  39. var wsurl = 'ws://172.19.103.76:3030/netex';
  40. var imgUrlDomain = "http://172.19.103.54/";//添加图片服务器路径;
  41. var imurl="http://172.19.103.88:3000";
  42. var articleUrl = "http://172.19.103.87:9088"//健康教育文章详情
  43. // var imurl="http://192.168.131.24:3000";//仕杰
  44. //var imurl="http://192.168.131.127:3000";//逸祥
  45. //测试环境(健康之路当阳)
  46. //var server = "http://weixin.xmtyw.cn/wlyy-dev/";
  47. //var appId = "wxd03f859efdf0873d";
  48. //var urlName = "wlyy-dev";
  49. //var weixinUrl = "weixin.xmtyw.cn";
  50. //var agentName = "wlyyAgent_test";
  51. //var agentName1 = "wlyyAgent_test1";
  52. //var OpenidAgent = "OpenidAgent_test";
  53. //var judgeAgent = "judgeAgent_test";
  54. //var pageName = "pageurl_test";
  55. //var wxurl = "http%3a%2f%2fweixin.xmtyw.cn%2fwlyy-dev%2fwx%2fhtml";
  56. //var wsurl = 'ws://172.19.103.76:3030/netex';
  57. //var imurl="http://172.19.103.29:3008";
  58. }
  59. ////保存userAgent
  60. //function wxSaveUserAgent(id, uid, openid, token) {
  61. // if(window.localStorage.getItem(agentName)){
  62. // window.localStorage.removeItem(agentName);
  63. // }
  64. // var userAgent = "{\"id\":" + id + ",\"uid\":\"" + uid + "\",\"openid\":\"" + openid + "\",\"token\":\"" + token + "\",\"platform\":3}";
  65. // window.localStorage.setItem(agentName, userAgent);
  66. // return userAgent;
  67. //}
  68. //添加openid白名单,只有这个名单内的openid才可以在线支付
  69. var openidList = [];
  70. //设置变量,控制是否可以在线支付
  71. var canPayOnline = true;
  72. if(GetRequest().openid){
  73. checkCanPayOnline(GetRequest().openid);
  74. }
  75. //添加处方功能的openid白名单
  76. var prescriptionOpenidList = ['123456'];
  77. var canPrescription = true;
  78. if(GetRequest().openid){
  79. checkCanPrescription(GetRequest().openid);
  80. }
  81. //保存userAgent
  82. function wxSaveUserAgent(id, uid, openid, token,lastUid) {
  83. if(window.localStorage.getItem(agentName)){
  84. window.localStorage.removeItem(agentName);
  85. }
  86. var userAgent = {
  87. id: id,
  88. uid: uid,
  89. openid: openid,
  90. token: token,
  91. lastUid: (lastUid ? lastUid:""),
  92. platform: 3
  93. }
  94. userAgent = JSON.stringify(userAgent);
  95. // var userAgent = "{\"id\":" + id + ",\"uid\":\"" + uid + "\",\"openid\":\"" + openid + "\",\"token\":\"" + token + "\",\"lastUid\":\"" + (lastUid ? lastUid:"") + "\",\"platform\":3}";
  96. window.localStorage.setItem(agentName, userAgent);
  97. return userAgent;
  98. }
  99. //保存userAgent1
  100. function wxSaveUserAgent1(uid, name, photo) {
  101. if(window.localStorage.getItem(agentName1)){
  102. window.localStorage.removeItem(agentName1);
  103. }
  104. var userAgent = {
  105. uid: uid,
  106. name: name,
  107. photo: photo
  108. }
  109. userAgent = JSON.stringify(userAgent);
  110. // var userAgent = "{\"uid\":" + uid + ",\"name\":\"" + name + "\",\"photo\":\"" + photo + "\"}";
  111. window.localStorage.setItem(agentName1, userAgent);
  112. return userAgent;
  113. }
  114. //保存openid
  115. function saveAgentOpenid(openid){
  116. if(window.localStorage.getItem(OpenidAgent)){
  117. window.localStorage.removeItem(OpenidAgent);
  118. }
  119. var agentOpenid = "{\"openid\":\"" + openid + "\"}";
  120. window.localStorage.setItem(OpenidAgent, agentOpenid);
  121. }
  122. //保存页面跳转值
  123. function saveAgentJudge(judge){
  124. if(window.localStorage.getItem(judgeAgent)){
  125. window.localStorage.removeItem(judgeAgent);
  126. }
  127. var agentJudge = "{\"judge\":" + judge + "}";
  128. window.localStorage.setItem(judgeAgent, agentJudge);
  129. }
  130. //保存跳转页面到agent
  131. function saveAgentPage(pageurl){
  132. if(window.localStorage.getItem(pageName)){
  133. window.localStorage.removeItem(pageName);
  134. }
  135. var agentPage = "{\"pageurl\":\"" + pageurl + "\"}";
  136. window.localStorage.setItem(pageName, agentPage);
  137. //如果页面中有code这个参数,及微信授权返回的code,将这个code保存在storage中
  138. if(pageurl.indexOf("code=") > -1){
  139. var arr = pageurl.split("code=");
  140. var code = arr[1].split("&")[0];
  141. window.localStorage.setItem("weixinCode", code);
  142. }
  143. }
  144. //清空所有的agent
  145. function clearAgent(){
  146. if(window.localStorage.getItem(agentName)){
  147. window.localStorage.removeItem(agentName);
  148. }
  149. if(window.localStorage.getItem(agentName1)){
  150. window.localStorage.removeItem(agentName1);
  151. }
  152. window.localStorage.removeItem("weixinCode"); //清楚缓存的code
  153. // if(window.localStorage.getItem(OpenidAgent)){
  154. // window.localStorage.removeItem(OpenidAgent);
  155. // }
  156. }
  157. //获取链接上的参数
  158. function GetRequest() {
  159. var url = location.search; //获取url中"?"符后的字串
  160. var theRequest = new Object();
  161. if (url.indexOf("?") != -1) {
  162. var str = url.substr(1);
  163. strs = str.split("&");
  164. for(var i = 0; i < strs.length; i ++) {
  165. theRequest[strs[i].split("=")[0]]=(strs[i].split("=")[1]);
  166. }
  167. }
  168. //添加toName的信息
  169. if(theRequest.toName){
  170. localStorage.setItem("toName", theRequest.toName);
  171. }
  172. return theRequest;
  173. }
  174. //新的判断用户是否登录的方法,先校验openid是否一致
  175. function checkUserAgent(){
  176. var Request = new Object();
  177. Request = GetRequest();
  178. var code = Request["code"];
  179. var userAgent = window.localStorage.getItem(agentName);
  180. var agentCode = window.localStorage.getItem("weixinCode");
  181. if(code == "" || code == null || code == undefined){
  182. if(agentCode){
  183. //存在agentCode,说明一定获取openid成功过。
  184. if(!userAgent){
  185. var agentOpenids = window.localStorage.getItem(OpenidAgent);
  186. agentOpenids = JSON.parse(agentOpenids);
  187. window.location.href = "../../home/html/zhmm-login.html?type=" + pagetype + "&openid=" + agentOpenids.openid;
  188. }else{
  189. try{
  190. var agentOpenids = window.localStorage.getItem(OpenidAgent);
  191. if(agentOpenids){
  192. agentOpenids = JSON.parse(agentOpenids);
  193. checkCanPayOnline(agentOpenids.openid);
  194. checkCanPrescription(agentOpenids.openid);
  195. }
  196. queryInit();
  197. }catch(e){
  198. }
  199. }
  200. }else{
  201. if(!userAgent){
  202. d.close();
  203. // dialog({contentType:'tipsbox', skin:'bk-popup' , content:'授权失败',bottom:true}).show();
  204. //模板消息的情况,模板消息带上openid的值给页面
  205. var openid = Request['openid'];
  206. saveAgentOpenid(openid);
  207. window.location.href = "../../home/html/zhmm-login.html?type=" + pagetype + "&openid=" + openid;
  208. }else{
  209. try{
  210. checkCanPayOnline(Request['openid']);
  211. checkCanPrescription(Request['openid']);
  212. queryInit();
  213. }catch(e){
  214. }
  215. }
  216. }
  217. }
  218. else{
  219. //校验code与缓存中的code是否一致,一致的话则不再向后端获取openid,因为code只能使用一次
  220. if(agentCode && (code == agentCode)){
  221. try{
  222. var agentOpenids = window.localStorage.getItem(OpenidAgent);
  223. if(agentOpenids){
  224. agentOpenids = JSON.parse(agentOpenids);
  225. checkCanPayOnline(agentOpenids.openid);
  226. checkCanPrescription(agentOpenids.openid)
  227. }
  228. queryInit();
  229. }catch(e){
  230. }
  231. }else{
  232. //校验登录的openid是否与缓存中存在的一致
  233. d.show();
  234. sendPost('weixin/getOpenidByCode', {code: code}, 'json', 'post', openidFailed, function(res){
  235. if (res.status == 200) {
  236. d.close();
  237. localStorage.setItem("weixinCode", code);
  238. var openid = res.openid,
  239. agentOpenids = window.localStorage.getItem(OpenidAgent),
  240. agentOpenid = agentOpenids && JSON.parse(agentOpenids).openid;
  241. saveAgentOpenid(openid);
  242. if( agentOpenid == openid){
  243. if(!userAgent){
  244. window.location.href = "../../home/html/zhmm-login.html?type=" + pagetype + "&openid=" + openid;
  245. }else{
  246. try{
  247. checkCanPayOnline(openid);
  248. checkCanPrescription(openid);
  249. queryInit();
  250. }catch(e){
  251. }
  252. }
  253. }else{
  254. window.location.href = server + "wx/html/home/html/zhmm-login.html?type=" + pagetype + "&openid=" + openid;
  255. }
  256. } else {
  257. openidFailed(res);
  258. }
  259. });
  260. }
  261. }
  262. }
  263. //判断用户是否登录
  264. function checkUserAgent1(){
  265. var userAgent = window.localStorage.getItem(agentName);
  266. if(!userAgent){
  267. var agentOpenid = window.localStorage.getItem(OpenidAgent);
  268. if(!agentOpenid||agentOpenid=="undefined"){
  269. var Request = new Object();
  270. Request = GetRequest();
  271. var code = Request["code"];
  272. if(code == "" || code == null || code == undefined){
  273. d.close();
  274. dialog({contentType:'tipsbox', skin:'bk-popup' , content:'授权失败',bottom:true}).show();
  275. }
  276. else{
  277. d.show();
  278. var data = {};
  279. data.code = code;
  280. sendPost('weixin/getOpenidByCode', data, 'json', 'post', openidFailed, openidSuccess);
  281. }
  282. }
  283. else{
  284. var jsonstr = $.parseJSON(agentOpenid);
  285. var openid = jsonstr.openid;
  286. if((pagetype>=20&&pagetype<=27) || pagetype=='-1' || pagetype==3 || !pagetype){
  287. pagetype = 0;
  288. window.localStorage.setItem(pageName, JSON.stringify({pageurl: location.href}))
  289. }
  290. // window.location.href = server + "wx/html/home/html/zhmm-login.html?type=" + pagetype + "&openid=" + openid;
  291. window.location.href = "../../home/html/zhmm-login.html?type=" + pagetype //+ "&openid=" + openid;
  292. }
  293. }
  294. else{
  295. try{
  296. queryInit();
  297. }catch(e){
  298. }
  299. }
  300. }
  301. //判断openid是否在可以在线支付的白名单里面
  302. function checkCanPayOnline(id){
  303. if(id && openidList.indexOf(id)>-1){
  304. canPayOnline = true;
  305. }
  306. }
  307. //判断openid是否在可以开启处方功能的白名单中
  308. function checkCanPrescription(id){
  309. if(id && prescriptionOpenidList.indexOf(id)>-1){
  310. canPrescription = true;
  311. }
  312. }
  313. //成功
  314. function openidSuccess(res) {
  315. if (res.status == 200) {
  316. var openid = res.openid;
  317. saveAgentOpenid(openid);
  318. window.location.href = server + "wx/html/home/html/zhmm-login.html?type=" + pagetype + "&openid=" + openid;
  319. } else {
  320. openidFailed(res);
  321. }
  322. }
  323. //失败
  324. function openidFailed(res) {
  325. d.close();
  326. // if(window.localStorage.getItem(OpenidAgent)){
  327. // window.localStorage.removeItem(OpenidAgent);
  328. // }
  329. if (res && res.msg) {
  330. dialog({contentType:'tipsbox', skin:'bk-popup' , content:res.msg,bottom:true}).show();
  331. } else {
  332. dialog({contentType:'tipsbox', skin:'bk-popup' , content:'获取认证信息失败',bottom:true}).show();
  333. }
  334. }
  335. //判断用户是否有签约
  336. function checkSign(type){
  337. d.show();
  338. var userAgent = window.localStorage.getItem(agentName);
  339. if(userAgent){
  340. var data = {};
  341. $.ajax(server + "patient/is_sign", {
  342. data: data,
  343. type: 'POST',
  344. dataType: 'json',
  345. beforeSend: function(request) {
  346. request.setRequestHeader("userAgent", userAgent);
  347. },
  348. error: function(res) {
  349. d.close();
  350. if(res.status == 999 || res.status == 998 || res.status == 997){
  351. loginUrl(res.status);
  352. return;
  353. }
  354. dialog({contentType:'tipsbox', skin:'bk-popup' , content:'校验失败',bottom:true}).show();
  355. },
  356. success: function(res) {
  357. d.close();
  358. if(res.status == 999 || res.status == 998 || res.status == 997){
  359. loginUrl(res.status);
  360. }
  361. else if (res.status == 200) {
  362. var is_sign = res.data;//0未签约,1已签约
  363. if(is_sign == 0){
  364. dialog({
  365. title: '提示',
  366. content: '您还未签约,请先签约,谢谢!',
  367. okValue:'签约',
  368. ok: function (){
  369. window.location.href = server + "wx/html/ssgg/html/choose-region.html";
  370. },
  371. cancelValue: '不了',
  372. cancel: function () {
  373. return;
  374. }
  375. }).showModal();
  376. }else{
  377. if(type == 1){
  378. window.location.href = server + "wx/html/zxwz/html/teachers-consult-commit.html";
  379. }
  380. }
  381. } else {
  382. dialog({contentType:'tipsbox', skin:'bk-popup' , content:res.msg,bottom:true}).show();
  383. }
  384. }
  385. });
  386. }
  387. else{
  388. dialog({contentType:'tipsbox', skin:'bk-popup' , content:'用户信息错误',bottom:true}).show();
  389. }
  390. }
  391. var toUsers = localStorage.getItem("toUser");
  392. var curId = localStorage.getItem("id");
  393. var toName = localStorage.getItem("toName");
  394. var consultCode = localStorage.getItem("consultCode");
  395. var pageUrl = {
  396. /**通用跳转**/ 0:function(){
  397. var pageurl = "";
  398. var agentPage = window.localStorage.getItem(pageName);
  399. if(agentPage){
  400. var jsonstr = $.parseJSON(agentPage);
  401. pageurl = jsonstr.pageurl;
  402. }
  403. return pageurl;
  404. }(),
  405. /**签约管理首页**/ "-1":"../../qygl/html/signing-doctors.html",//签约管理首页
  406. /**医生咨询首页**/ 1:"../../yszx/html/doctor-consultation.html",
  407. /**医生指导首页**/ 3:"../../yszd/html/doctor-guidance.html",//医生指导首页
  408. /**疾病社区首页**/ 4:"../../jbsq/html/disease-community.html",//疾病社区首页
  409. /**健康记录首页**/ 5:"../../jkjl/html/health-record.html",//健康记录
  410. /**我的设备首页**/ 6:"../../wdsb/html/my-equipments.html",//我的设备
  411. /**我的资料首页**/ 11:"../../grzx/html/my-detail.html",
  412. /**我的设备首页**/ 15:"../../wdsb/html/my-equipments.html",
  413. /**签约选择医生**/ 16:"../../qygl/html/select-doctor.html",
  414. /**签约搜索医生**/ 17:"../../qygl/html/search-doctor.html",
  415. /**签约医生主页**/ 18:function(){
  416. var doctor = localStorage.getItem("doccode");
  417. return "../../ssgg/html/doctor-homepage-new.html?openid="+0+"&state="+doctor;
  418. }(),
  419. /**我的预约首页**/ 20:"../../wdyy/html/my-appointment.html",
  420. /**预约挂号提交**/ 21:"https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appId+"&redirect_uri="+wxurl+"%2fwdyy%2fhtml%2finfo-confirm.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect",
  421. 22:"../../jtgx/html/family.html",
  422. /**预约详情首页**/ 23:"../../wdyy/html/detail-appointment.html?openid="+0+"&toUser="+toUsers+"&id="+curId+"&toName="+toName,
  423. /**医生咨询详情**/ 24:"../../yszx/html/consulting-doctor.html?openid="+0+"&toUser="+toUsers+"&consult="+consultCode+"&toName="+toName,
  424. /**医生指导详情**/ 25:"../../yszd/html/guidance-detail.html?openid="+0+"&toUser="+toUsers+"&id="+curId+"&toName="+toName,
  425. /**健康教育**/ 26:"../../jkjy/html/article_list.html",
  426. /**健康详情**/ 27:function(){
  427. var artoUser = localStorage.getItem("toUser");
  428. var article = localStorage.getItem("article");
  429. return "../../jkjy/html/article.html?dataId="+article+"&toUser="+artoUser+"&toName="+toName;
  430. }(),
  431. /**新的健康详情**/ 50:function(){
  432. var artoUser = localStorage.getItem("toUser");
  433. var article = localStorage.getItem("article");
  434. return "../../jkjy/html/article2.html?dataId="+article+"&toUser="+artoUser+"&toName="+toName;
  435. }(),
  436. 28:"../../jkda/html/jiuzhenjilu.html",
  437. 29:"../../jkda/html/jianchajianyan.html",
  438. 30:"../../survey/html/survey_info.html?openid="+0+"&toUser="+toUsers+"&toName="+toName+"&survey_id="+localStorage.getItem("survey_id"),
  439. /**签约管理首页2**/ 31:"../../qygl/html/signing_management.html",//签约管理首页
  440. /*社区体检*/ 32: "../../jkda/html/jiankangtijian.html",
  441. /*续签页面*/ 33: "../../xuqian/html/information.html",
  442. /**意见反馈**/ 34:"../../yjfk/html/feedback.html",
  443. /**公共咨询**/ 36:"../../jbsq/html/public-consult-detail.html",
  444. /*处方记录 */ 38: "../../prescription/html/prescription_records.html",
  445. /*续方订单跟踪页*/ 41: '../../prescription/html/order_tracking.html?openid='+0+'&toUser='+toUsers+'&toName='+toName+'&code='+window.localStorage.getItem("prescriptionCode"),
  446. ///*续方记录页*/ 42: '../../prescription/html/re-prescription_info.html?openid='+0+'&toUser='+toUsers+'&toName='+toName+'&code='+window.localStorage.getItem("prescriptionCode"),
  447. /*孕检计划*/ 45: "../../fybj/html/yunjianjihua.html",
  448. /*免疫计划*/ 46: "../../fybj/html/mianyijihua.html",
  449. /*慢病管理修改*/ 47: "../../jbsq/html/slow-disease-manage.html",
  450. /**免疫预约首页**/ 48:"../../wdyy/html/immune-appointment.html",
  451. /**免疫预约详情页**/ 49:"../../wdyy/html/detail-immune-appointment.html",
  452. /**健康银行详情页**/ 51:"../../jkjf/html/index.html",
  453. /**健康存折详情页**/ 52:"../../jkjf/html/passbook.html",
  454. /**我的健康存折**/ 53:"../../jkjf/html/my-passbook.html",
  455. /**我的 活动**/ 54:"../../jkjf/html/my-activities.html",
  456. /**活动广场**/ 55:"../../jkjf/html/activity-square.html",
  457. /**活动详情**/ 56:"../../jkjf/html/activity-detail.html",
  458. /**健康银行默认缺省页**/ 57:"../../jkjf/html/unopened.html"
  459. }
  460. Date.prototype.Format = function(formatStr)
  461. {
  462. var str = formatStr;
  463. var Week = ['日','一','二','三','四','五','六'];
  464. str=str.replace(/yyyy|YYYY/,this.getFullYear());
  465. str=str.replace(/yy|YY/,(this.getYear() % 100)>9?(this.getYear() % 100).toString():'0' + (this.getYear() % 100));
  466. str=str.replace(/MM/,this.getMonth()>8?(this.getMonth()+1).toString():'0' + (this.getMonth()+1));
  467. str=str.replace(/M/g,this.getMonth()+1);
  468. str=str.replace(/w|W/g,Week[this.getDay()]);
  469. str=str.replace(/dd|DD/,this.getDate()>9?this.getDate().toString():'0' + this.getDate());
  470. str=str.replace(/d|D/g,this.getDate());
  471. str=str.replace(/hh|HH/,this.getHours()>9?this.getHours().toString():'0' + this.getHours());
  472. str=str.replace(/h|H/g,this.getHours());
  473. str=str.replace(/mm/,this.getMinutes()>9?this.getMinutes().toString():'0' + this.getMinutes());
  474. str=str.replace(/m/g,this.getMinutes());
  475. str=str.replace(/ss|SS/,this.getSeconds()>9?this.getSeconds().toString():'0' + this.getSeconds());
  476. str=str.replace(/s|S/g,this.getSeconds());
  477. return str;
  478. }
  479. var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");
  480. //document.write(unescape("%3Cspan style='display:none' id='cnzz_stat_icon_1265315380'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s22.cnzz.com/z_stat.php%3Fid%3D1265315380' type='text/javascript'%3E%3C/script%3E"));