PageSourceSearch

https://etrade.citicbank.com/portalweb/script/util.js

js citicbank.com collected 2026-10-03 19:33:07 UTC 108,206 bytes, 3,549 lines download raw bytes

1/**
2 * 报文地址
3 */
4 + function($, undefined) {
5
6	$.citic.doUrl = $.citic.doUrl || {};
7
8	var URL = '';
9	var urlType = '.htm';
10	if ($.citic.readLocalFile) {
11		URL = '';
12	} else {
13		URL = $.citic.getContextPath() + "/";
14	}	
15	
16	/**
17	 * 报文配置
18	 */
19	$.extend($.citic.doUrl, {
20		
21		/*
22		 * cms地址配置
23		 * 
24		 */
25		CMS_SIT_URL:cmsSitUrl,	//cms
26		/*
27		 * 常量
28		 */			
29		APPLICATION_VIEW: URL + 'ei/applicationView' + urlType, //赴美缴费输出签证人信息list
30		AUS_PAY_LIST:URL+'mc/ausPaylist'+urlType, //赴澳列表查询
31		BANK_TO_PRE: URL + 'ei/bankToPre' + urlType, //确认订单页点上一步后获取签证人信息
32		CGI_CHECK: URL + 'vp/cgiCheck' + urlType, //赴美签证缴费CGI输入
33		CITY: URL + 'ot/city' + urlType, //查城市=
34		CHECK_VERIFY:URL + 'ot/checkVisitCount' + urlType, //忘记密码,注册判断verify
35		CHECK_VOUCHER:URL+ 'ot/checkVoucher'+urlType,//印章电子化
36		CHECK_VOUCHER_QR:URL+ 'ot/checkVoucherQR'+urlType,//印章电子化-微信
37		CHECK_SWITCH:URL+'uu/checkSwitch'+urlType,//手机号实名核验开关查询
38		CHECK_ASSETS_PROVE:URL+'qs/checkAssetsProve'+urlType, //资产证明核验
39		DELETE_US_PAY: URL+ 'vp/deleteUSPay' + urlType, //删除赴美缴费信息
40		DELETE_AUS_ORDER:URL+'mc/deleteAUSOrder'+urlType, //赴澳订单删除
41		GET_ACC_INFO: URL + 'ot/getAccInfo' + urlType, //获取账户信息
42		GET_MOBILE_CODE: URL + 'ot/getMobileCode' + urlType, //获取手机验证码
43		GET_MCRYPT_KEY: URL + 'ur/getMcryptKey' + urlType, //协商密钥
44		GET_PWD_FLAG: URL + 'ur/getPwdFlag' + urlType, //国密商密
45		GET_CERT_LIST: URL + 'ur/getCertList' + urlType, //获取证件类型
46		GET_EBANKM_MOBILE: URL + 'ei/getEbankMobile' + urlType, //获取接收 验证码的手机号码
47		HELP_LIST: URL + 'hp/helpList' + urlType, //帮助中心列表
48		HELP_DETAIL: URL + 'hp/helpDetail' + urlType, //帮助中心详情
49		HELP_BAR: URL + 'hp/helpBar' + urlType, //帮助中心左侧导航
50		HOT_WORD: URL + 'hp/hotWord' + urlType, //帮助中心热词
51		ISR_CHECK_BEFORE_PAY:URL+'vp/ISRCheckBeforePay'+urlType, //赴以色列缴费校验
52		ISR_DEL_ORDER:URL+'vp/ISRDelOrder'+urlType, //赴以色列缴费删除订单
53		ISR_PRE_PAY_INFO:URL+'vp/ISRPrePayInfo'+urlType, //赴以色列缴费生成订单
54		ISR_QRY_ORDER_INFO:URL+'vp/ISRQryOrderInfo'+urlType, //赴以色列缴费订单详情
55		ISR_QRY_ORDER_LIST:URL+'vp/ISRQryOrderList'+urlType, //赴以色列缴费订单列表
56		ISR_QRY_SERVICE_INFO:URL+'vp/ISRQryServiceInfo'+urlType, //赴以色列缴费查询服务
57		ISR_QRY_VISA_INFO:URL+'vp/ISRQryVisaInfo'+urlType, //赴以色列缴费查询签证中心和签证类型
58		ISR_CHECK_SERVICES:URL+'vp/ISRCheckServices'+urlType, //赴以色列选择服务验证
59		ISR_PAY_ORDER_LIST:URL+'vp/ISRPayOrderList'+urlType, //赴以列表缴费前查询
60		ISR_EBANK_PAY:URL+'vp/ISREbankPay'+urlType,	//赴以色列网银支付
61		ISR_UN_PAY:URL+'vp/ISRUnPay'+urlType,	//赴以色列网银支付
62		ISR_FINISHED_PAY:URL+'vp/ISRFinishedPay'+urlType,	//赴以色列缴费主动通知
63		ISR_ORDER_STATE:URL+'vp/ISROrderState'+urlType,	//赴以色列缴费轮询订单状态
64		ISR_SUC_PAGE_INFO:URL+'vp/ISRSucPageInfo'+urlType,	//赴以色列缴费成功页面查询
65		ISR_QUERY_VISA_PROG:URL+'vp/ISRQryVisaProg'+urlType,	//赴以色列缴费签证进度查询
66		ISR_INSERT_VAL:URL+'vp/insertVal'+urlType,//赴以缴费信息录入校验
67		LOGIN: URL + 'ur/login' + urlType, //登陆
68		// ORDER_STT: URL + 'vp/orderStt' + urlType, //赴美缴费-循环获取订单状态
69		ORDER_AUS_INFO:URL+'mc/orderAUSInfo'+urlType, //赴澳订单详情
70		PERSON_INFO: URL + 'mc/personInfo' + urlType, //个人信息   手机认证 是否实名
71		PAY_FROM_LIST: URL+'vp/payFromList'+urlType,	//赴美列表缴费
72		PAY_AUS_ORDER_LIST:URL+'mc/payAusOrderList'+urlType,//赴澳列表缴费
73		PUT_KEY_AND_JSON_TO_SERVERT: URL + 'ot/putKeyAndJsonToServer' + urlType, //存放的公共方法   入参:key,value
74		GET_SERVER_JSON_BY_KEY: URL + 'ot/getServerJsonByKey' + urlType, //获取存放的数据的公共方法    入参:key
75		QUERY_ALTER_PAY: URL+ 'mc/queryAlterPay' +urlType, //赴美记录修改查询
76		REGISTER: URL + 'uu/register' + urlType, //注册
77		RETURN_USER_INFO:URL+'mc/returnUserInfo'+urlType,//获取登录状态
78		RECEIVE_AUS_RECEIPT:URL+'mc/receiveAUSReceipt'+urlType, //赴澳重发收据号
79		SIGNIN_OUT: URL+ 'ur/sigInOut' + urlType, 	//登出
80		SIGNER_INFO: URL + 'ei/signerInfo' + urlType, //赴美缴费-签证信息登记
81		TO_BANK: URL + 'vp/toBank' + urlType, //赴美缴费-银联支付
82		USA_SUCC_PAGE:URL+ 'ei/usaSuccPage'+urlType,//赴美缴费成功页
83		VISA_US_PAY: URL + 'vp/visaUSPay' + urlType, //赴美缴费
84		VISA_US_DETAIL: URL + 'vp/visaUSDetail' + urlType, //赴美缴费详情	
85		VISA_CHECK: URL + 'vp/visaCheck' + urlType, //赴美签证缴费首页		
86		VISA_USER_INPUT: URL + 'vp/visaUserInput' + urlType, //赴美签证缴费订单确认
87		VISA_PAY_ALL: URL + 'vp/visaPayAll' + urlType, //赴美签证缴费-确认缴费
88		VISA_PAY_STT_QRY:URL+'vp/visaPaySttQry'+urlType,	//赴美缴费-获取支付状态
89		UU_PERSONAL_INFO:URL+'uu/personalInfo'+urlType,//中信通行证-个人资料反显
90		QUERY_MOBILE_STT:URL+'uu/queryMobileStt'+urlType, //中信通行证验证手机号
91		MOBILE_MODIFY:URL+'uu/mobileMod'+urlType, //中信通行证修改手机号提交
92		UPDATE_PERSONAL_INFO:URL+'uu/updatePersonalInfo'+urlType, //中信通行证修改个人资料提交
93		EMAIL_ISCAN_USE:URL+'uu/emailIsCanUse'+urlType, //中信通行证验证邮箱
94		EMAIL_MODIFY:URL+'uu/emailModify'+urlType, //中信通行证邮箱修改认证
95		EMAIL_UNBIND:URL+'uu/emailUnbind'+urlType, //中信通行证邮箱解绑
96		MODIFY_PWD:URL+'uu/modifyPwd'+urlType, //中信通行证修改密码强制建议改密
97		QUERY_SAFEAUTH_INFO:URL+'uu/querySafeAuthInfo'+urlType, //中信通行证安全认证
98		WHETHEROCCUPY:URL+'uu/whetheroccupy'+urlType, //中信通行证注册查询
99		SEND_DYN_PWD:URL+'uu/sendDynPwd'+urlType, //中信通行证根据方式发送验证码		
100		IS_NEED_PINCODE:URL+'uu/isNeedPinCode'+urlType, //中信通行证是否需要图形验证码
101		UU_QUERY_BINDCARD:URL+'uu/queryBindCard'+urlType,	//中信通行证绑定卡前查询
102		UNI_BINDCARD:URL+'uu/uniBindCard'+urlType,	//中信通行证绑卡
103		REAL_NAME_QUERY:URL+'uu/realNameQuery'+urlType, //中信通行证实名认证-三证
104		QUERY_ACCBAND_STT:URL+'uu/queryAccBandStt'+urlType, //中信通行证实名认证-查询签约状态
105		REAL_CHECK_PAYTYPE:URL+'uu/realCheckPayType'+urlType, //中信通行证实名认证-支付方式认证
106		QUERY_EVERY_CODE:URL+'ur/queryEveryCode'+urlType,	//中信通行证获取二维码
107		CHECK_UUSTATE:URL+'ur/checkUUState'+urlType,	//中信通行证迁移引导下一步查询
108		MOBILE_AUTH:URL+'ur/mobileAuth'+urlType,	//中信通行证补充手机认证
109		PWD_DELAY:URL+'uu/pwdDelay'+urlType, //中信通行证密码延期
110		QUERY_MOBILE_STT:URL+'uu/queryMobileStt'+urlType,	//中信通行证修改/补充手机前查询
111		RESET_PWD:URL+'ur/resetPwd'+urlType, //中信通行证重置密码
112		CHECK_SEC_MOBILE:URL+'uu/checkSecMobile'+urlType, //中信通行证补充手机认证前查询
113		GET_REAL_FLAG:URL + 'ia/getRealFlag' + urlType,		//电子账户开户是否实名用户
114		GET_EACCINFO_BY_ACCNO:URL + 'ia/getEaccInfoByAccNo' + urlType,		//查询电子账户信息
115		QUERY_COUNTRY_MP: URL + 'of/queryCountryMp' + urlType,	//全球签微信小程序获取首页相关信息
116		CHECK_TRANS_FLOW_PROOF:URL+'of/checkTransFlowProof'+urlType,	//交易流水证明真伪核验
117		PROVINCE_CITY:URL + 'am/provinceCity' + urlType, //取现预约-查询省(不登录状态可用)
118		GET_MICONV_PARAM: URL + 'ot/getMiconvParam' + urlType, //生僻字获取token接口
119		FZ_SERVER_DISPATCHER: URL + 'ot/fzServerDispatcher' + urlType, //生僻字获取token接口
120		REAL_CHECK_NOTICE: URL + 'uu/realCheckNotice' + urlType, //实名认证风控提示通知
121		BRANCH_SEARCH: URL + 'pq/branchSearch' + urlType, //地图网点查询接口
122		ATM_SEARCH: URL + 'pq/ATMSearch' + urlType, //自助设备查询接口
123		BRANCH_SEARCH_BY_WORDS: URL + 'pq/branchSearchByWords' + urlType, //按照关键字查询网点或自助设备
124		WAIT_NUM_SEARCH: URL + 'pq/waitNumSearch' + urlType, //查询网点排队人数
125		QUERY_FOREIGN_EXCHANGE: URL + 'pq/queryForeignExchange' + urlType, //查询网点外币兑换币种
126		INTELLIGENT_OR_PIN:URL + 'ot/intelligentOrPin'+urlType, //智能验证码开关
127		MOBILE_QR_CODE_URL: URL + 'pq/mobileQrcodeUrl' + urlType, //加密
128		MOBILE_REL_CHECK: URL + 'uu/mobileRelCheck' + urlType, //手机号实名核验
129		QRY_INTER_NATIONAL: URL + 'uu/qryInternational' + urlType, //查询国际手机区号
130		GET_PUBLIC_KEY: URL + 'ot/getPublicKey' + urlType, //查询SM2密钥
131		IS_MUST_LOGIN_CHECK: URL + 'uu/isMustLoginCheck' + urlType, //查询用户是否登录
132		MCTYPT_KEY: URL + 'ot/mcryptKey' + urlType, //获取随机数
133		PRE_SAFR_INFO_EDIT: URL + 'uu/preSafeInfoEdit' + urlType, //编辑预留防伪信息
134		PRE_FORM_INFO: URL + 'uu/preFormInfo' + urlType, //预填单录入信息查询
135		QUERY_PRO_FESSION: URL + 'uu/queryProfession' + urlType, //查询职业信息
136		QRY_AREA_INFO: URL + 'uu/qryAreaInfo' + urlType, //查询省市区
137		QUERY_HOUSE_PROVIDENT_FUND: URL + 'uu/queryHouseProvidentFund' + urlType, //查询公积金/社保/个税缴纳地
138		IN_COME_CURR: URL + 'uu/incomeCurr' + urlType, //收入来源币种信息查询
139		QUERY_IS_SIGN_FUND: URL + 'uu/queryIsSignFund' + urlType, //理财信息签约查询
140		QUERT_RISK_QUESION: URL + 'uu/queryRiskQuesion' + urlType, //风险评估题库查询
141		SUBMIT_PRE_FORM: URL + 'uu/submitPreForm' + urlType, // 预填单申请提交
142		USA_PAY_TIME_QRY: URL + 'vp/usaPayTimeQry' + urlType, //赴美签证缴费查询时间
143		COUNTRY_LIST_QRY: URL + 'vp/countryListQry' + urlType, //国家列表
144		BASE_DICT_QRY: URL + 'vp/baseDictqry' + urlType, //基础信息
145		SINGLE_USECST_INFO_QRY: URL + 'vp/singleUseCstInfoQry' + urlType, //一次性金融服务客户信息查询
146		SINGLE_USECST_INFO_SUBMIT: URL + 'vp/singleUseCstInfoSubmit' + urlType, //一次性金融服务客户信息提交
147		QUERY_PIC: URL + 'vp/queryPic' + urlType, //魔方数据请求
148		REAL_NAME_CHECK:URL+'uu/realNameOnlineChk'+urlType,//中信通行证-实名认证
149        AREA_INFO_QRY: URL + 'vp/areaInfoQry' + urlType, //请求省市区
150		INTERNET_CHECK: URL + 'vp/comboInetChk' + urlType, // 首次联网核查
151		UPDATE_QR_CODE: URL + 'vp/upQrCode' + urlType, // 每4分钟更新联网核查二维码
152		CHECK_AUTH_RESULT: URL + 'vp/qrAuthRes' + urlType // 轮询查联网核查结果
153	});
154}(window.jQuery);
155
156/*
157 * 判断浏览器
158 */
159+ function($, undefined) {
160	
161	$.citic.browsers = $.citic.browsers || {};
162	
163	$.extend($.citic.browsers, {
164	
165		versions:function(){
166	
167			var u = navigator.userAgent, app = navigator.appVersion;
168			
169			return {
170	
171				trident: u.indexOf('Trident') > -1, //IE内核
172	
173				presto: u.indexOf('Presto') > -1, //opera内核
174	
175				webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
176	
177				gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1,//火狐内核
178	
179				mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
180	
181				ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
182	
183				android: u.indexOf('Android') > -1, //android终端或者uc浏览器
184	
185				iPhone: u.indexOf('iPhone') > -1 , //是否为iPhone或者QQHD浏览器
186	
187				iPad: u.indexOf('iPad') > -1, //是否iPad
188	
189				webApp: u.indexOf('Safari') == -1 //是否web应该程序,没有头部与底部
190	
191			};
192
193		}(),
194		
195		language:function(){
196			(navigator.browserLanguage || navigator.language).toLowerCase();
197		}
198	});
199
200}(window.jQuery);
201
202/*
203 * 判断是否移动端
204 */
205function isMobile(){
206	var flag;
207	
208	if(window.devicePixelRatio){
209		var ratio=window.devicePixelRatio;
210		if(ratio!=1){
211			//移动端设备
212			flag=true;
213			if($.citic.browsers.versions.mobile && !$.citic.browsers.versions.iPad){
214				flag=true;
215			}
216			else{
217				flag=false;
218			}
219		}
220		else{
221			//ipad2等移动设备
222			if($.citic.browsers.versions.mobile && !$.citic.browsers.versions.iPad){
223				flag=true;
224			}
225			else{
226				flag=false;
227			}
228			
229		}
230	}
231	else{
232		//ie10以下处理,pc端处理,待完善
233		flag=false;
234	}
235	
236	return flag;
237}
238
239/*是否打开英文大写*/
240function capsLock(id,ad){
241	new Caps($("#"+id+""),{});
242}
243//全角true
244function checkRadius(s){
245	var rep = RegExp(/[\uff00-\uffff]/g);
246	var str = rep.test(s);//全角位true
247	return (str);
248}
249
250/*阻止密码框的赋值,粘贴 , 剪切 和输入空格*/
251
252function iptDefault(){
253	
254	$("input[type=password]").bind("cut copy paste",function(e){
255			
256		e.preventDefault();
257		
258	});
259	$("input[type=password]").bind("keydown",function(e){
260		var keyCode = e.which;
261		if(keyCode == 32){
262			return false;
263		}
264		
265		
266	});
267	
268}
269/*密码检验规则校验字母、数字组合、特殊字符只包含下划线*/
270function regPwCon( s )
271{
272	var isIntCharSpecial=RegExp(/^(?=.*\d.*)(?=.*\D.*)[\s\S]{8,20}$/);
273	return ( isIntCharSpecial.test(s) );
274}
275
276/*验证码校验规则 只包含数字或者字母*/
277function isIntChar(s) {
278	var isIntChar = RegExp(/^[a-zA-Z0-9]+$/);
279	return (isIntChar.test(s));
280}
281/*纯英文校验*/
282function isEnglish(s) {
283	var isIntCharSpecial = RegExp(/^[a-zA-Z]+$/);
284	return ( isIntCharSpecial.test(s) );
285}
286/*姓名拼音校验*/
287function isEnglishName(s) {
288	var isIntCharSpecial = RegExp(/^[a-zA-Z\ ]+$/);
289	return ( isIntCharSpecial.test(s) );
290}
291/*纯英文地址校验*/
292function isEnglishAddress(s) {
293	var isIntCharSpecial = RegExp(/^[0-9a-zA-Z\ \-\_\.\|\~\·\@\(\)\*\^]+$/);
294	return ( isIntCharSpecial.test(s) );
295}
296/*纯下划线校验*/
297function isSlideDown(s) {
298	var isIntCharSpecial = RegExp(/^[(\_)]+$/);
299	return ( isIntCharSpecial.test(s) );
300}
301/*地址校验*/
302function addressTest(dataCode){
303	var reg=/[^0-9a-zA-Z\ \-\_\.\|\~\·\@\(\)\*\^\u4E00-\u9FA5]/gm;
304	var kigouArray=new Array();
305	kigouArray=dataCode.match(reg);
306	if(kigouArray==null){
307		return true;
308	}else{
309		return false;
310	}
311}
312/*地址校验(包含生僻字)/[^0-9a-zA-Z\ \-\_\.\|\~\·\@\(\)\*\^\u4E00-\u9FA5]/gm*/
313function addressRemote(dataCode){
314//	var reg=/(?:[\0-\x1F!-'\+,\/:-\?\[-\]`\{\}\x7F-\xB6\xB8-\u33FF\u4DC0-\u4DFF\uA000-\uD7FF\uFB00-\uFFFF]|[\uD800-\uD83F\uD87B-\uD87D\uD87F-\uDBFF][\uDC00-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD87A[\uDFF0-\uDFFF]|\uD87E[\uDE20-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/gm;
315	var reg=/(?:[\0-\x1F!-'\+,\/:-\?\[-\]`\{\}\x7F-\xB6\xB8-\u2E7F\u2FE0-\u3006\u3008-\u33FF\u4DC0-\u4DFF\uA000-\uD7FF\uFB00-\uFFFF]|[\uD800-\uD83F\uD87B-\uD87D\uD87F\uD8C0-\uDBFF][\uDC00-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD87A[\uDFF0-\uDFFF]|\uD87E[\uDE20-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/gm;
316	var kigouArray=new Array();
317	kigouArray=dataCode.match(reg);
318	if(kigouArray==null){
319		return true;
320	}else{
321		return false;
322	}
323}
324/*身份验证中的校验*/
325function idManTest(dataCode){
326	var reg=/[^0-9a-zA-Z\ \-\_\.\|\~\·\@\(\)\*\^\u4E00-\u9FA5]/gm;
327	var kigouArray=new Array();
328	kigouArray=dataCode.match(reg);
329	if(kigouArray==null){
330		return true;
331	}else{
332		return false;
333	}
334}
335/*身份验证中的校验(包含生僻字)/[^0-9a-zA-Z\ \-\_\.\|\~\·\@\(\)\*\^\u4E00-\u9FA5]/gm*/
336function idManRemote(dataCode){
337//	var reg=/(?:[\0-\x1F!-'\+,\/:-\?\[-\]`\{\}\x7F-\xB6\xB8-\u33FF\u4DC0-\u4DFF\uA000-\uD7FF\uFB00-\uFFFF]|[\uD800-\uD83F\uD87B-\uD87D\uD87F-\uDBFF][\uDC00-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD87A[\uDFF0-\uDFFF]|\uD87E[\uDE20-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/gm;
338	var reg=/(?:[\0-\x1F!-'\+,\/:-\?\[-\]`\{\}\x7F-\xB6\xB8-\u2E7F\u2FE0-\u3006\u3008-\u33FF\u4DC0-\u4DFF\uA000-\uD7FF\uFB00-\uFFFF]|[\uD800-\uD83F\uD87B-\uD87D\uD87F\uD8C0-\uDBFF][\uDC00-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD87A[\uDFF0-\uDFFF]|\uD87E[\uDE20-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/gm;
339	var kigouArray=new Array();
340	kigouArray=dataCode.match(reg);
341	if(kigouArray==null){
342		return true;
343	}else{
344		return false;
345	}
346}
347/*校验登录名*/
348function userNameTest(dataCode){
349	var reg=/[^0-9a-zA-Z\.\@\_\u4E00-\u9FA5]/gm;
350	var kigouArray=new Array();
351	kigouArray=dataCode.match(reg);
352	if(kigouArray==null){
353		return true;
354	}else{
355		return false;
356	}
357}
358/*校验登录名(包含生僻字)/[^0-9a-zA-Z\.\@\_\u4E00-\u9FA5]/gm*/
359function userNameRemote(dataCode){
360//	var reg=/(?:[\0-\x2D\/:-\?\[-\^`\{-\u33FF\u4DC0-\u4DFF\uA000-\uD7FF\uFB00-\uFFFF]|[\uD800-\uD83F\uD87B-\uD87D\uD87F-\uDBFF][\uDC00-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD87A[\uDFF0-\uDFFF]|\uD87E[\uDE20-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/gm;
361	var reg=/(?:[\0-\x2D\/:-\?\[-\^`\{-\xB6\xB8-\u2E7F\u2FE0-\u3006\u3008-\u33FF\u4DC0-\u4DFF\uA000-\uD7FF\uFB00-\uFFFF]|[\uD800-\uD83F\uD87B-\uD87D\uD87F\uD8C0-\uDBFF][\uDC00-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD87A[\uDFF0-\uDFFF]|\uD87E[\uDE20-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/gm;
362	var kigouArray=new Array();
363	kigouArray=dataCode.match(reg);
364	if(kigouArray==null){
365		return true;
366	}else{
367		return false;
368	}
369}
370/*用户名校验规则*/
371function nameRule(dataCode){
372	var reg=/[^0-9a-zA-Z\_\u4E00-\u9FA5]/gm;
373	var kigouArray=new Array();
374	kigouArray=dataCode.match(reg);
375	if(kigouArray==null){
376		return true;
377	}else{
378		return false;
379	}
380}
381/*用户名校验规则(包含生僻字)/[^0-9a-zA-Z\_\u4E00-\u9FA5]/gm*/
382function nameRuleRemote(dataCode){
383//	var reg=/(?:[\0-\/:-@\[-\^`\{-\u33FF\u4DC0-\u4DFF\uA000-\uD7FF\uFB00-\uFFFF]|[\uD800-\uD83F\uD87B-\uD87D\uD87F-\uDBFF][\uDC00-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD87A[\uDFF0-\uDFFF]|\uD87E[\uDE20-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/gm;
384	var reg=/(?:[\0-\/:-@\[-\^`\{-\xB6\xB8-\u2E7F\u2FE0-\u3006\u3008-\u33FF\u4DC0-\u4DFF\uA000-\uD7FF\uFB00-\uFFFF]|[\uD800-\uD83F\uD87B-\uD87D\uD87F\uD8C0-\uDBFF][\uDC00-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD87A[\uDFF0-\uDFFF]|\uD87E[\uDE20-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/gm;
385	var kigouArray=new Array();
386	kigouArray=dataCode.match(reg);
387	if(kigouArray==null){
388		return true;
389	}else{
390		return false;
391	}
392}
393/*校验真实姓名规则*/
394function nameRule2(dataCode){
395	var reg1=/[^0-9a-zA-Z\ \·\u4E00-\u9FA5]/gm;
396	var kigouArray1=new Array();
397	kigouArray1=dataCode.match(reg1);
398	if(kigouArray1==null){
399		return true;
400	}else{
401		return false;
402	}
403}
404/*校验真实姓名规则(包含生僻字)/[^0-9a-zA-Z\ \·\u4E00-\u9FA5]/gm*/
405function nameRuleRemote2(dataCode){
406//	var reg1=/(?:[\0-\/:-@\[-`\{-\xB6\xB8-\u33FF\u4DC0-\u4DFF\uA000-\uD7FF\uFB00-\uFFFF]|[\uD800-\uD83F\uD87B-\uD87D\uD87F-\uDBFF][\uDC00-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD87A[\uDFF0-\uDFFF]|\uD87E[\uDE20-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/gm;
407	var reg1=/(?:[\0-\/:-@\[-`\{-\xB6\xB8-\u2E7F\u2FE0-\u3006\u3008-\u33FF\u4DC0-\u4DFF\uA000-\uD7FF\uFB00-\uFFFF]|[\uD800-\uD83F\uD87B-\uD87D\uD87F\uD8C0-\uDBFF][\uDC00-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD87A[\uDFF0-\uDFFF]|\uD87E[\uDE20-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/gm;
408	var kigouArray1=new Array();
409	kigouArray1=dataCode.match(reg1);
410	if(kigouArray1==null){
411		return true;
412	}else{
413		return false;
414	}
415}
416/*判断字符串的length*/
417function funCheckLength(strTemp){
418	var i,sum;
419	sum = 0;
420	for (i=0;i<strTemp.length;i++) {
421		if((strTemp.charCodeAt(i)>=0) && (strTemp.charCodeAt(i)<=255)){
422			sum = sum + 1;//英文数字
423		}else{
424			sum = sum + 2;//中文
425		}
426	}
427	return sum;
428}
429
430/*车牌校验*/
431function cardNoTest(dataCode){
432	var reg=/^[\u4E00-\u9FA5]{1}[A-Z]{1}[0-9a-zA-Z]/gm;
433	return ( reg.test(dataCode) );
434}
435/*包含最小中文长度校验*/
436function minLengthChinese(dataCode, length){
437	var reg1=/[\u4E00-\u9FA5]/gm;
438  var kigouArray = new Array();
439	kigouArray = dataCode.match(reg1);
440	return !isNulOrEmpty(kigouArray) ? kigouArray.length < length : true;
441}
442/*年龄是否大于18校验*/
443function getTimeAndAge (birthday) {
444	//当前时间
445	var myDate = new Date();
446	var yearNow = myDate.getFullYear();
447	var monthNow = myDate.getMonth() + 1;
448	var dayNow = myDate.getDate();
449	//出生日期
450	var myYear = Number(birthday.slice(6, 10));
451	var myMonth = Number(birthday.slice(10, 12));
452	var myDay = Number(birthday.slice(12, 14));
453	var age = yearNow - myYear;
454	if ((monthNow < myMonth) || (monthNow === myMonth && dayNow < myDay)) {
455		age--;
456	}
457	return age >= 18;
458}
459
460/*判断是否pc*/
461function isPc(){
462	var pc;
463	var sUserAgent = navigator.userAgent.toLowerCase();
464	var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
465	var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
466	//var bIsMidp = sUserAgent.match(/midp/i) = "midp";
467	var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
468	var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
469	var bIsAndroid = sUserAgent.match(/android/i) == "android";
470	var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
471	var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
472	if(bIsIpad || bIsIphoneOs || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM){
473		pc = false;
474	}else{
475		pc = true;
476		
477	}
478	
479	return pc;
480}
481/*
482 * 列表+分页
483 */
484+ function($, undefined) {
485
486	$.citic.pageList = $.citic.pageList || {};
487
488	$.extend($.citic.pageList, {		
489		
490	 	getTableList:function(dourl,param,curr,listid,listfun,pageid){ //参数 ajax地址,上送参数,第几页,表格id,表格拼装函数名,分页id
491			//分页数
492			if(curr==""){
493				param.currentPage=1;
494			}
495			else{
496				param.currentPage=curr;
497			}
498			if(param.pageSize==null || param.pageSize=="" || param.pageSize==undefined){
499				param.pageSize="10";
500			}
501			var pageObj;
502			
503			$.citic.ajax({
504				url: dourl,
505				type: 'post',
506				dataType: 'json',
507				data: param,
508				async: true,
509				processResponse: function(data) {
510					
511					listfun(data);	//拼装列表
512					
513					if(isMobile()){
514						try{
515						$('#'+pageid).empty();
516						laypage({
517					            cont: pageid, //容器。值支持id名、原生dom对象,jquery对象。【如该容器为】:<div id="page1"></div>
518					            pages: data.pageCount, //通过后台拿到的总页数
519					            groups:0,
520					            prev:false,
521					            next:'查看更多',
522					            curr: curr || 1, //当前页
523					            skin:'flow',
524					            jump: function(obj, first){ //触发分页后的回调
525					            	pageObj=obj;					            	
526					            	if(!first){ //点击跳页触发函数自身,并传递当前页:obj.curr
527						                if(obj.curr <= data.pageCount){ //点击跳页触发函数自身,并传递当前页:obj.curr						                
528				               			$.citic.pageList.getTableList(dourl,param,obj.curr,listid,listfun,pageid);						               		
529						                }						                
530					                }
531					            }	
532						});
533						}
534						catch(e){}
535					}
536					else{
537						try{
538		        		$('#'+pageid).empty();
539		        		laypage({
540				            cont: pageid, //容器。值支持id名、原生dom对象,jquery对象。【如该容器为】:<div id="page1"></div>
541				            pages: data.pageCount, //通过后台拿到的总页数				            
542				            prev:'<<',
543				            next:'>>',
544				            first:false,
545				            last:false,
546				            curr: curr || 1, //当前页
547				            jump: function(obj, first){ //触发分页后的回调
548				               pageObj=obj;
549				               if(!first){ //点击跳页触发函数自身,并传递当前页:obj.curr
550				                   $.citic.pageList.getTableList(dourl,param,obj.curr,listid,listfun,pageid);
551				                }
552				            }	
553						});			
554						}
555						catch(e){}
556					}
557					try{
558					if(pageObj.curr===data.pageCount){
559						$('.page_nomore').html('已没有更多');
560						//$('.laypage_curr').after('<span class="laypage_last">&gt;&gt;</span>');
561					}
562					}
563					catch(e){}
564				},
565				selfdefineFailed:function(data){
566					showErrorCode(data.retCode,data.retMsg);
567					//用户行为分析上送参数 + 错误代码
568					var optValueStr = "errorCode="+data.retCode;
569					//用户行为分析调用公共方法,交易名称,上送参数
570					optValueFun(param.tradeName,optValueStr);
571				}
572				
573			});
574
575		}
576	});
577	
578}(window.jQuery);
579/*
580 * 12、对传入的范围内进行验证,验证通过返回true,验证不通过返回false
581 * 注:areaCheck为需要验证的jquery选择器,例如"#id","input[name='shilie']"
582 */
583function validatorCheck(areaCheck, currentElement) {
584		var flag = true;
585		var validatorResult = currentElement.data('validator').check(); //验证当前页面需要验证的所有表单域
586		if (!validatorResult.passed) {
587			flag = false;
588		}
589		return flag;
590	}
591/*
592 * 13、异步验证
593 * 对传入的范围内进行验证,验证通过返回true,验证不通过返回false
594 * 注:areaCheck为需要验证的jquery对象,例如"#id","input[name='shilie']"
595 */
596function validatorCheckByAsy(areaCheck) {
597		//areaCheck.find("input[data-validate],select[data-validate],textarea[data-validate]").unbind("blur"); //把需要验证的表单域先进行解绑,然后再进行绑定blur事件
598		var flag = true;
599		areaCheck.validator(); //把该领域的值拼接成json,用data放入到validator属性里面
600		var validatorResult = areaCheck.data('validator').check(); //得到一个json的验证结果
601		if (!validatorResult.passed) {
602			flag = false;
603		}
604		return flag;
605}
606/*
607 * 14、异步提交
608 * 参数:1、验证的范围对象。 2、需要传递的json数据, 3、访问的mvc名字  4、访问成功提示信息
609 * 注:验证提交
610 */
611
612function ajaxSubmitMessage(checkArea, jsonData, mvcName, message) {
613	if (validatorCheckByAsy(checkArea)) {
614		$.citic.ajax({
615			url: mvcName + ".do",
616			type: 'post',
617			dataType: 'json',
618			data: jsonData,
619			processResponse: function(data) {
620				alert(message);
621			}
622		})
623	}
624}
625
626/*
627 * 37、如果值为NULL返回""
628 */
629function dealNull(param) {
630	if (param == null || param == "null" || param == undefined) {
631		param = "";
632	}
633	return param;
634}
635
636/*
637 * 39、把一个字符根据特殊字符截取返回数组
638 * 参数说明,1、needSplit:需要截取的字符串,2、splitFlag:截取的标志,例如||等
639 */
640function getArrayMessage(needSplit, splitFlag) {
641	var paramArray = [];
642	if (needSplit && splitFlag) {
643		paramArray = needSplit.split(splitFlag);
644	}
645	return paramArray;
646}
647
648/*
649 * 限制图片上传格式
650 */
651
652function limitImageType(fileValue, regValue) {
653		var flag = true;
654		var reg = new RegExp(regValue, "i")
655		if (!(reg.test(fileValue))) {
656			alert('您所上传的图片格式不符,请重新上传');
657			flag = false;
658		}
659		return flag;
660	}
661/*
662 * 根据路径获得文件名称
663 */
664
665function getUploadFileName(fileInput) {
666	var fileName = "";
667	if (fileInput) {
668		if (fileInput.indexOf("\\") == "-1") {
669			fileName = fileInput;
670		} else {
671			var temp = fileInput.replace(/\\/g, "/").split("/");
672			if (temp.length > 1) {
673				fileName = temp[temp.length - 1];
674			}
675		}
676	}
677	return fileName;
678}
679
680/*
681 * 单选框复选框
682 */
683function setRadioCheck() {
684	//单选
685	$('.comm_radio input').iCheck({
686		checkboxClass: 'icheckbox_minimal',
687		radioClass: 'iradio_minimal',
688		increaseArea: '20%'
689	});
690	//复选
691	$('.comm_check input').iCheck({
692		checkboxClass: 'icheckbox_minimal',
693		radioClass: 'iradio_minimal',
694		increaseArea: '20%'
695	});
696}
697/*radio控制div切换*/
698function setDivToggle(ard){
699	$("input[id="+ard+"]").iCheck("check");
700}
701
702//检测浏览器
703function checkOsBrowser() {
704	var userosbrowser;
705	if((navigator.platform =="Win32") || (navigator.platform =="Windows")){
706		if(navigator.userAgent.indexOf("MSIE")>0 || navigator.userAgent.indexOf("msie")>0 || navigator.userAgent.indexOf("Trident")>0 || navigator.userAgent.indexOf("trident")>0){
707			if(navigator.userAgent.indexOf("ARM")>0){
708				userosbrowser=9; //win8 RAM Touch
709				this.pgeditIEExe="";
710			}else{
711				userosbrowser=1;//windows32ie32
712				this.pgeditIEClassid=PGEdit_IE32_CLASSID;
713				this.pgeditIECab=PGEdit_IE32_CAB;
714				this.pgeditIEExe=PGEdit_IE32_EXE;
715			}
716		}else{
717			if(checkBrowserVersion()){
718				userosbrowser=2; //windowsff
719				this.pgeditFFExe=PGEdit_FF;
720			}else{
721				userosbrowser=11;
722				this.pgeditIEExe=PGEdit_Edge;		
723			}
724		
725		}
726	}else if((navigator.platform=="Win64")){
727		if(navigator.userAgent.indexOf("Windows NT 6.2")>0 || navigator.userAgent.indexOf("windows nt 6.2")>0){		
728			userosbrowser=1;//windows32ie32
729			this.pgeditIEClassid=PGEdit_IE32_CLASSID;
730			this.pgeditIECab=PGEdit_IE32_CAB;
731			this.pgeditIEExe=PGEdit_IE32_EXE;						
732		}else if(navigator.userAgent.indexOf("MSIE")>0 || navigator.userAgent.indexOf("msie")>0 || navigator.userAgent.indexOf("Trident")>0 || navigator.userAgent.indexOf("trident")>0){
733			userosbrowser=3;//windows64ie64
734			this.pgeditIEClassid=PGEdit_IE64_CLASSID;
735			this.pgeditIECab=PGEdit_IE64_CAB;
736			this.pgeditIEExe=PGEdit_IE64_EXE;			
737		}else{
738			if(checkBrowserVersion()){
739				userosbrowser=2; //windowsff
740				this.pgeditFFExe=PGEdit_FF;
741			}else{
742				userosbrowser=11;
743				this.pgeditIEExe=PGEdit_Edge;		
744			}
745		}
746	}else if(navigator.userAgent.indexOf("Linux")>0){
747		if(navigator.userAgent.indexOf("_64")>0){
748			userosbrowser=4;//linux64
749			this.pgeditFFExe=PGEdit_Linux64;
750		}else{
751			userosbrowser=5;//linux32
752			this.pgeditFFExe=PGEdit_Linux32;
753		}
754		if(navigator.userAgent.indexOf("Android")>0){
755			userosbrowser=7;//Android
756		}
757	}else if(navigator.platform.indexOf("Mac")==0){//Mac
758		if(navigator.userAgent.indexOf("Firefox")>0 || navigator.userAgent.indexOf("Chrome")>0){
759			if(checkBrowserVersion()){
760				userosbrowser=6;
761				this.pgeditFFExe=PGEdit_MacOs;
762			}else{
763				userosbrowser=11;
764				this.pgeditIEExe=PGEdit_MacOs_Chrome;		
765			}
766		}	else{
767			userosbrowser=11;
768			this.pgeditIEExe=PGEdit_MacOs_Chrome;	
769		}
770	}
771	return userosbrowser;
772}
773//检测浏览器版本
774function checkBrowserVersion () {
775	var user_agent = navigator.userAgent.toLowerCase();
776	// 判断浏览器是否是谷歌高版本
777	if(navigator.userAgent.indexOf("Chrome")>-1){
778		var regStr_chrome = /chrome\/[\d.]+/gi;
779		var versionChromeStr = user_agent.match(regStr_chrome).toString().replace(/[^0-9.]/ig, "");
780		var mainVersion_chrome = versionChromeStr.split(".")[0];
781		return Number(mainVersion_chrome) >= 42 ? false : true;
782	}
783	// 判断浏览器是否是火狐高版本
784	if(navigator.userAgent.indexOf("Firefox")>-1){
785		var ver = user_agent.match(/firefox\/([\d.]+)/)[1];//39.0
786		return Number(ver.split(".")[0]) > 52 ? false : true;
787	}
788}
789//安装密码后控件DIV显示"pwd"是控件的id,"ipt"是写入input的id,"chb"可为空
790function setPwdShow(pwd,ipt,chb){
791	$(pwd).show();
792	$(ipt).hide();
793	$(chb).hide();
794	$(ipt).removeAttr("checkInput").attr("checkInput","false");
795};
796
797//没安装密码控件时,控件DIV隐藏,input输入框显示
798function setIptShow(pwd,ipt,chb){
799	$(pwd).hide();
800	$(ipt).show();
801	$(chb).show();
802};
803
804/*检测 是否安装 IE及低版本浏览器密码控件*/
805function checkPwInit(){
806	try {
807		if (checkOsBrowser()==1) {
808			var comActiveX = new ActiveXObject("CITICEdit.PassGuard.1");
809			//if(this.getConvertVersionTwo(comActiveX.output35)<this.getConvertVersionTwo(PGEdit_IE32_EXE_VERSION)){
810			//	return false;
811			//}
812		} else if (checkOsBrowser()==2 || checkOsBrowser()==4 || checkOsBrowser()==5 || checkOsBrowser()==6 || checkOsBrowser()==8) {
813		    var arr=new Array();
814		    if(checkOsBrowser()==6){
815		    	var pge_info=navigator.plugins['CITICEdit'].description;
816		    }else if(checkOsBrowser()==8){
817		    	var pge_info=navigator.plugins['CITICEdit'].description;
818		    }else{
819		    	var pge_info=navigator.plugins['CITICEdit'].description;
820		    }
821		    
822			if(pge_info.indexOf(":")>0){
823				arr=pge_info.split(":");
824				var pge_version = arr[1];
825			}else{
826				var pge_version = "";
827			}
828			
829		} else if (checkOsBrowser()==3) {
830			var comActiveX = new ActiveXObject("CITICEdit.PassGuard.1");
831			//if(this.getConvertVersionTwo(comActiveX.output35)<this.getConvertVersionTwo(PGEdit_IE32_EXE_VERSION)){
832			//	return false;
833			//}
834		} else if (checkOsBrowser()==11) { // 非ie浏览器
835			return false;
836		}
837	}catch(e){
838		return false;
839		
840	}
841	return true;
842}
843
844var pwType; //区分国密商密变量0或者1
845var randDomParam; //获取前端加密随机数
846var addLinkUrl; //服务端加密随机数
847var randDomParams; //保存前端加密随机数
848var pgeditor;
849
850//初始化 密码控件
851function initPwEnter() {
852	$.citic.ajax({ 
853		url: $.citic.doUrl.GET_PWD_FLAG,
854		type: 'post',
855		dataType: 'json',
856		data: "",
857		async: true,
858		processResponse: function(data) {
859			pwType = data.content.pwdFlag;//区分国密商密
860			//初始化  密码控件
861			pgeditor = createLogonPinBlock("logonPwdId", "ocxEdit", "", "", pwType);
862			//获取客户端随机数
863			randDomParam = getTimeStamp()+pgeditor.pwdResultEncryptNum();
864			$("#ocxEdit").css("visibility","hidden");
865			randDomParams = {//保存客户端加密随机数
866				"randDomParam":randDomParam
867			};
868			
869			$.citic.ajax({ //协商密钥
870				url: $.citic.doUrl.GET_MCRYPT_KEY,
871				type: 'post',
872				dataType: 'json',
873				data: randDomParams,
874				async: true,
875				processResponse: function(data) {
876					//输入项 服务端加密随机数mcryptStr
877					$("#ocxEdit").css("visibility","visible");
878					addLinkUrl = data.content.mcryptStr;
879					pgeditor.pwdSetEncryptNum(addLinkUrl);
880		
881				}
882			});
883			
884		}
885
886	});
887}
888
889//初始化 密码控件6位数字密码
890function initPwEnterSix() {
891	$.citic.ajax({ 
892		url: $.citic.doUrl.GET_PWD_FLAG,
893		type: 'post',
894		dataType: 'json',
895		data: "",
896		async: true,
897		processResponse: function(data) {
898			pwType = data.content.pwdFlag;//区分国密商密
899			//初始化  密码控件
900			pgeditor = createLogonPinBlockSix("logonPwdId", "ocxEdit", "", "", pwType);			
901			//获取客户端随机数
902			randDomParam = getTimeStamp()+pgeditor.pwdResultEncryptNum();
903			$("#ocxEdit").css("visibility","hidden");
904			randDomParams = {//保存客户端加密随机数
905				"randDomParam":randDomParam
906			};
907			
908			$.citic.ajax({ //协商密钥
909				url: $.citic.doUrl.GET_MCRYPT_KEY,
910				type: 'post',
911				dataType: 'json',
912				data: randDomParams,
913				async: true,
914				processResponse: function(data) {
915					////console.log(data.mcryptStr);
916					//输入项 服务端加密随机数mcryptStr
917					$("#ocxEdit").css("visibility","visible");
918					addLinkUrl = data.content.mcryptStr;
919					////console.log(randDomParams);
920					pgeditor.pwdSetEncryptNum(addLinkUrl);
921		
922				}
923			});
924			
925		}
926
927	});
928}
929
930//初始化两个密码控件6位数字密码,支付页面
931var payPwType;
932var payEbankPwd;
933var payEleAccPwd;
934var payRandDomParam;
935var payAddLinkUrl;
936var payRandDomParams;
937function initPwdEnterSixToPay(bindFlag, eStatus, params) {
938	$.citic.ajax({ 
939		url: $.citic.doUrl.GET_PWD_FLAG,
940		type: 'post',
941		dataType: 'json',
942		data: "",
943		async: true,
944		processResponse: function(data) {
945			payPwType = data.content.pwdFlag;//区分国密商密
946			if (bindFlag == "1" && eStatus != "1") { //电子账户
947				//初始化  密码控件	//payPwdId=标签,payOcxEdit=控件
948				payEleAccPwd = createLogonPinBlockSix("payEleAccPwd", "payEleOcx", "", "", payPwType);			 //电子账户
949				//获取客户端随机数
950				payRandDomParam = getTimeStamp() + payEleAccPwd.pwdResultEncryptNum();
951				$("#payEleOcx").css("visibility","hidden");
952			}else if (bindFlag == "2") {
953				//初始化  密码控件
954				//payPwdId=标签,payOcxEdit=控件
955				payEbankPwd = createLogonPinBlockSix("payEbankPwd", "payEbankOcx", "", "", payPwType);		 //网银	
956				//获取客户端随机数
957				payRandDomParam = getTimeStamp() + payEbankPwd.pwdResultEncryptNum();
958				$("#payEbankOcx").css("visibility","hidden");
959			}else if (bindFlag == "3") {
960				//初始化  密码控件
961				//payPwdId=标签,payOcxEdit=控件
962				payEbankPwd = createLogonPinBlockSix("payEbankPwd", "payEbankOcx", "", "", payPwType);		 //网银	
963				//获取客户端随机数
964				payRandDomParam = getTimeStamp() + payEbankPwd.pwdResultEncryptNum();
965				$("#payEbankOcx").css("visibility","hidden");
966				if (eStatus != "1") {
967					payEleAccPwd = createLogonPinBlockSix("payEleAccPwd", "payEleOcx", "", "", payPwType);			 //电子账户
968					$("#payEleOcx").css("visibility","hidden");
969				}
970				if (!isNulOrEmpty(params)) {
971					if(params.payType == 0 && eStatus != "1"){
972						payRandDomParam = getTimeStamp() + payEleAccPwd.pwdResultEncryptNum();
973					}
974				}
975			}else{
976				return false;
977			}
978			
979			payRandDomParams = {//保存客户端加密随机数
980				"randDomParam": payRandDomParam
981			};
982			
983			$.citic.ajax({ //协商密钥
984				url: $.citic.doUrl.GET_MCRYPT_KEY,
985				type: 'post',
986				dataType: 'json',
987				data: payRandDomParams,
988				async: true,
989				processResponse: function(data) {
990					payAddLinkUrl = data.content.mcryptStr;
991					if (bindFlag == "1" && eStatus != "1") {
992						payEleAccPwd.pwdSetEncryptNum(payAddLinkUrl);
993						$("#payEleOcx").css("visibility","visible");
994					}else if (bindFlag == "2") {
995						//输入项 服务端加密随机数mcryptStr
996						$("#payEbankOcx").css("visibility","visible");
997						payEbankPwd.pwdSetEncryptNum(payAddLinkUrl);
998					}else if ( bindFlag == "3") {
999						if (eStatus != "1") {
1000							payEleAccPwd.pwdSetEncryptNum(payAddLinkUrl);
1001							$("#payEleOcx").css("visibility","visible");
1002						}
1003						//输入项 服务端加密随机数mcryptStr
1004						$("#payEbankOcx").css("visibility","visible");
1005						payEbankPwd.pwdSetEncryptNum(payAddLinkUrl);
1006					}
1007					if (!isNulOrEmpty(params)) {
1008						if (params.checkType == "0") {
1009							if (params.isHide == "1") {
1010								params.elements.parents(".form-group").hide();
1011							}
1012						}
1013					}
1014				}
1015			});
1016		}
1017	});
1018}
1019// 非IE浏览器初始化 获取随机数
1020function regPwInitNoIeSixToPay (bindFlag, errorInfo) {
1021	$.citic.ajax({ //区分国密商密
1022		url: $.citic.doUrl.MCTYPT_KEY,
1023		type: 'post',
1024		dataType: 'json',
1025		data: "",
1026		async: true,
1027		processResponse: function(data) {
1028			if (!isNulOrEmpty(data.content)) {
1029				//输入项 服务端加密随机数mcryptStr
1030				var randomNum = data.content.mcryptkey;
1031				var databNum = data.content.mcryptStr;
1032        if (bindFlag == "1") {//初始化电子账户密码控件
1033					payEleAccPwd = handlePayPwd("payEleAccPwd", "payEleOcx", randomNum, databNum);
1034				} else if (bindFlag == "2") { // 初始化网银密码控件
1035					payEbankPwd = handlePayPwd("payEbankPwd", "payEbankOcx", randomNum, databNum);
1036				}else {// 初始化电子账户网银密码控件
1037					payEbankPwd = handlePayPwd("payEbankPwd", "payEbankOcx", randomNum, databNum);
1038					payEleAccPwd = handlePayPwd("payEleAccPwd", "payEleOcx", randomNum, databNum);	 
1039				}
1040				if(!isNulOrEmpty(errorInfo)) {
1041					showErrorCode(errorInfo.retMsg, errorInfo.retCode);
1042				}
1043			}
1044		},
1045		selfdefineFailed:function(data){
1046			showErrorCode(data.retMsg, data.retCode);
1047			setIptShow(".payPwdDiv", ".payPassWord", "");
1048		}
1049	});
1050}
1051// 非IE浏览器初始化
1052function handlePayPwd (elementId, editId, randomNum, databNum) {
1053	var pgeditor = createLogonPinBlockSix(elementId, editId, "", "", "", randomNum, databNum);
1054	pgeditor.pwdSetSk(randomNum);//设置32长度随机因子
1055	$("#payEleOcx").css("visibility","hidden");
1056	if (!isNulOrEmpty(pgeditor.getVersion())) {
1057		setPwdShow(".payPwdDiv", ".payPassWord", "");
1058		pwdNewControlFlag="1";
1059		$("#payEleOcx").css("visibility","visible");
1060	} else {
1061		setIptShow(".payPwdDiv", ".payPassWord", "");
1062	}
1063	return pgeditor;
1064}
1065/*
1066 * 普通密码加密
1067 */
1068var $key
1069function pwNoCitic(_pw){
1070	var data = {
1071		plaintext : iSec_js_sdk.isec_crypto_utf8_to_base64(_pw).data,
1072		publicKey: $key
1073	}
1074	var pwd = iSec_js_sdk.isec_crypto_sm2_encrypt(data).data
1075	return pwd;
1076}
1077// SM2加密获取公钥
1078function getCrack(){
1079	$.citic.ajax({
1080		url: $.citic.doUrl.GET_PUBLIC_KEY,
1081		type: 'post',
1082		dataType: 'json',
1083		data: '',
1084		async: true,
1085		processResponse: function(data) {
1086			$key = data.content
1087		}
1088	});
1089}
1090
1091/*中信通行证新密码控件校验pwSetCiticNew(密码长度,密码规则,错误提示)长度最小8*/
1092var textError = "您输入的密码格式不正确";
1093var textErroreEN = "您输入的密码格式不正确-The password you entered is incorrect"
1094function pwSetCiticNew(length,valid,tipId){
1095	var flg;
1096	var _text = "您输入的密码格式不正确";
1097	var _textLen = "登录密码不能小于8位";
1098	var _textNull = "请输入密码";
1099	if(length == 0){
1100		$("#" + tipId).text(_textNull);
1101		flg = false;
1102	}else if(length < 8){
1103		$("#" + tipId).text(_textLen);
1104		flg = false;
1105	}else if(valid == 1){
1106		$("#" + tipId).text(_text);
1107		flg = false;
1108	}else{
1109		$("#" + tipId).text("");
1110		flg = true;
1111	}
1112	return flg;
1113}
1114/*中信通信证中英文密码控件校验pwSetCiticNewEN(密码长度,密码规则,错误提示)长度最小8*/
1115function pwSetCiticNewEN(length,valid,orgParam, tipId){
1116	var flg;
1117	var _text = "您输入的密码格式不正确";
1118	var _textEN = "The password you entered is incorrect"
1119	var _textLen = "登录密码不能小于8位";
1120	var _textLenEN = "Login password must be at least 8 characters."
1121	var _textNull = "请输入密码";
1122	var _textNullEN = "Please enter password";
1123	if(length == 0){
1124		if(orgParam==="ISREN") {
1125			$("#" + tipId).text(_textNullEN);
1126		} else {
1127			$("#" + tipId).text(_textNull);
1128		}
1129		flg = false;
1130	}else if(length < 8){
1131		if(orgParam==="ISREN") {
1132			$("#" + tipId).text(_textLenEN);
1133		} else {
1134			$("#" + tipId).text(_textLen);
1135		}
1136		flg = false;
1137	}else if(valid == 1){
1138		if(orgParam==="ISREN") {
1139			$("#" + tipId).text(_textEN);
1140		} else {
1141			$("#" + tipId).text(_text);
1142		}
1143		flg = false;
1144	}else{
1145		$("#" + tipId).text("");
1146		flg = true;
1147	}
1148	return flg;
1149}
1150/*中信通行证密码控件校验pwSetCitic(密码长度,密码规则,错误提示)长度最小6*/
1151function pwSetCitic(length,valid,tipId){
1152	var flg;
1153	var _text = "您输入的密码格式不正确";
1154	var _textNull = "请输入密码";
1155	if(length == 0){
1156		$("#" + tipId).text(_textNull);
1157		flg = false;
1158	}else if(length < 6){
1159		$("#" + tipId).text(_text);
1160		flg = false;
1161	}else{
1162		$("#" + tipId).text("");
1163		flg = true;
1164	}
1165	return flg;
1166}
1167/*密码控件  网银密码校验pwSetNetBank(密码长度,密码规则,错误提示)只校验长度*/
1168function pwSetNetBank(length,valid,tipId){
1169	var flg;
1170	var _text = "您输入的密码格式不正确";
1171	var _textNull = "请输入密码";
1172	if(length == 0){
1173		$("#" + tipId).text(_textNull);
1174		flg = false;
1175	}else if(length < 6){
1176		$("#" + tipId).text(_text);
1177		flg = false;
1178	}else{
1179		$("#" + tipId).text("");
1180		flg = true;
1181	}
1182	return flg;
1183}
1184/*密码控件  6位数字密码校验pwSetNetSix(密码长度,密码规则,错误提示)*/
1185function pwSetNetSix(length,valid,tipId){
1186	var flg;
1187	var _text = "您输入的密码格式不正确";
1188	var _textNull = "请输入密码";
1189	if(length == 0){
1190		$("#" + tipId).text(_textNull);
1191		flg = false;
1192	}else if(length != 6){
1193		$("#" + tipId).text(_text);
1194		flg = false;
1195	}else if(valid == 1){
1196		$("#" + tipId).text(_text);
1197		flg = false;
1198	}else{
1199		$("#" + tipId).text("");
1200		flg = true;
1201	}
1202	return flg;
1203}
1204
1205/*
1206 * 配置下拉菜单
1207 */
1208function setSelect() {
1209	//移动端下拉菜单
1210	$(".ser_down_arrow").on('click',function() {
1211		if ($(this).hasClass("glyphicon-menu-up")) {
1212			$(this).removeClass("glyphicon-menu-up");
1213		} else {
1214			$(this).addClass("glyphicon-menu-up");
1215		}
1216	});
1217
1218	//下拉框点击时,初始化下拉列表的宽度,
1219	$(".ser_ipt_wrap .dropdown-toggle, .ser_ipt_wrap .ser_new_select").on('click',function() {
1220		var _wid = $(this).innerWidth();
1221		$(this).siblings(".dropdown-menu").width(_wid).css("min-width",_wid);
1222	});
1223	//下拉列表的选中内容
1224	$(".ser_ipt_wrap .dropdown-menu").on('click',"a",function() {
1225		var _text = $(this).text();
1226		if ($(this).parents(".dropdown-menu").siblings().hasClass("ser_new_select")) {
1227			$(this).parents(".dropdown-menu").siblings(".ser_new_select").find("input").val(_text);
1228		} else {
1229			$(this).parents(".dropdown-menu").siblings("button").html(_text 
1229+ "<span class='caret'></span>");
1230		}
1231
1232	});
1233}
1234/*
1235 * 清空cookie中的交易码
1236 */
1237function clearCookie() {
1238	$.cookie('currMainCode', null, {
1239		path: "/"
1240	}, {
1241		expires: -1
1242	});
1243	$.cookie('currentTrancode', null, {
1244		path: "/"
1245	}, {
1246		expires: -1
1247	});
1248}
1249
1250//在页面二级框架中使用 例如frame_recharge.js
1251function defaultShowMenu(currentElement) {
1252	//默认显示的菜单	
1253}
1254
1255function openTabBarWindow(tranCode, currentElement, appendTo) {
1256	var finalAppendTo = '#firstTransition';
1257	if (appendTo) {
1258		$(appendTo, currentElement).html('');
1259		finalAppendTo = appendTo;
1260	}
1261	$(finalAppendTo, currentElement).html('');
1262	$.openWindow({
1263		tranCode: tranCode,
1264		showFun: null,
1265		appendTo: finalAppendTo,
1266		currentElement: currentElement
1267	});
1268
1269}
1270
1271/*
1272 * 嵌套页面按照flow流参数加载
1273 */
1274function openTabBarWindowParam(tranCode, currentElement, param) {
1275	var finalAppendTo = '#firstTransition';
1276	var _param={
1277		appendTo:'',
1278		startStep:'start'
1279	}
1280	
1281	$.extend(_param,param);
1282	
1283	if (_param.appendTo) {
1284		$(_param.appendTo, currentElement).html('');
1285		finalAppendTo = _param.appendTo;
1286	}
1287	$(finalAppendTo, currentElement).html('');
1288	$.openWindow({
1289		tranCode: tranCode,
1290		showFun: null,
1291		appendTo: finalAppendTo,
1292		currentElement: currentElement,
1293		startStep:_param.startStep
1294	});
1295}
1296
1297//当前路径
1298$.citic.contextPath = $.citic.getContextPath() + '/';
1299
1300/*
1301 * 获取地址栏参数
1302 */
1303function getParam(id) {
1304	var str=window.location.href;
1305
1306	if(str.indexOf('#!/')>=0){
1307		str=window.location.href;
1308		if(!isNulOrEmpty(str.split('?')[1])){
1309			str=str.split('?')[1];
1310		}		
1311	}
1312	else{
1313		str=window.location.search;		
1314	}
1315	
1316	var search = utf8to16(base64decode(str)); //解密
1317	var reg = new RegExp("(^|&)" + id + "=([^&]*)(&|$)");
1318	var r = search.substr(0).match(reg);
1319	if (r != null) return unescape(r[2]);
1320	return null;
1321}
1322
1323
1324/*
1325 * url页面跳转,pageurl是跳转的页面名(含路径),param是需要传递的参数json格式。
1326 */
1327function locationHref(pageurl, param) {
1328	var pageUrl = pageurl;
1329	var urlParam = param;
1330	if (pageUrl.indexOf('#!/') >= 0) {
1331		if (urlParam) {
1332			urlParam = base64encode(utf16to8(decodeURIComponent($.param(urlParam)))); //加密 ,decodeURIComponent中文编码
1333			window.location.href = $.citic.getContextPath() + '/' + pageUrl.split("#!/")[0] + '.html#!/' + pageUrl.split('#!/')[1] + "?" + urlParam;
1334		} else {
1335			window.location.href = $.citic.getContextPath() + '/' + pageUrl.split("#!/")[0] + '.html#!/' + pageUrl.split('#!/')[1];
1336		}
1337
1338	} else {
1339		if (urlParam) {
1340			urlParam = base64encode(utf16to8(decodeURIComponent($.param(urlParam)))); //加密 ,decodeURIComponent中文编码
1341			window.location.href = $.citic.getContextPath() + '/' + pageUrl + '.html?' + urlParam;
1342
1343		} else {
1344			window.location.href = $.citic.getContextPath() + '/' + pageUrl + '.html';
1345		}
1346
1347	}
1348}
1349
1350/*
1351 * 生成url链接,param是需要传递的参数json格式。
1352 */
1353function urlParamToBase64(pageurl,param) {
1354	var pageUrl = pageurl;
1355	var urlParam = param;
1356	var pagehref;
1357	if (pageUrl.indexOf('#!/') >= 0) {
1358		if (urlParam) {
1359			urlParam = base64encode(utf16to8(decodeURIComponent($.param(urlParam)))); //加密 ,decodeURIComponent中文编码
1360			pagehref = $.citic.getContextPath() + '/' + pageUrl.split("#!/")[0] + '.html#!/' + pageUrl.split('#!/')[1] + "?" + urlParam;
1361		} else {
1362			pagehref = $.citic.getContextPath() + '/' + pageUrl.split("#!/")[0] + '.html#!/' + pageUrl.split('#!/')[1];
1363		}
1364
1365	} else {
1366		if (urlParam) {
1367			urlParam = base64encode(utf16to8(decodeURIComponent($.param(urlParam)))); //加密 ,decodeURIComponent中文编码
1368			pagehref = $.citic.getContextPath() + '/' + pageUrl + '.html?' + urlParam;
1369
1370		} else {
1371			pagehref = $.citic.getContextPath() + '/' + pageUrl + '.html';
1372		}
1373
1374	}	
1375	return pagehref;
1376}
1377
1378/*
1379 * 错误提示
1380 */
1381function showTipError(err){
1382	var alertError='';
1383	var currPage;
1384	
1385	//清空提示
1386	if($('body').find('.page_error').attr('class')=='page_error'){							
1387		$('.page_error').remove();
1388	}		
1389	if($('body').find('.page_error2').attr('class')=='page_error2'){							
1390		$('.page_error2').remove();
1391	}	
1392	alertError+='<div class="page_error"><div>';
1393	
1394	if($('body').find('.ser_register_title').html()!=""){
1395		currPage=$('body').find('.ser_register_title');					
1396		currPage.after(alertError);
1397		$('body').find('.page_error').html("提示信息:" + err);
1398	}
1399	if($('body').find('.ser_con_title').html()!=""){					
1400		currPage=$('body').find('.ser_con_title');					
1401		currPage.after(alertError);
1402		$('body').find('.page_error').css('margin-top','30px');
1403		$('body').find('.page_error').html("提示信息:" + err);
1404	}
1405	$(window).scrollTop(0);
1406}
1407
1408/*
1409 * 错误提示
1410 */
1411function showErrorCode(err,code){
1412	var alertError='';
1413	var currPage;
1414	
1415	//清空提示
1416	if($('body').find('.page_error').attr('class')=='page_error'){							
1417		$('.page_error').remove();
1418	}		
1419	if($('body').find('.page_error2').attr('class')=='page_error2'){							
1420		$('.page_error2').remove();
1421	}	
1422	alertError+='<div class="page_error"><div>';
1423	
1424	if($('body').find('.ser_register_title').html()!=""){		
1425		currPage=$('body').find('.ser_register_title');					
1426		currPage.after(alertError);
1427		$('body').find('.page_error').html("提示信息:" + err + "<br>"+"错误码:"+code);
1428	}
1429	if($('body').find('.ser_con_title').html()!=""){					
1430		currPage=$('body').find('.ser_con_title');					
1431		currPage.after(alertError);
1432		$('body').find('.page_error').css('margin-top','30px');
1433		$('body').find('.page_error').html("提示信息:" + err + "<br>"+"错误码:"+code);
1434	}
1435	$(window).scrollTop(0);
1436}
1437
1438/*
1439 * 页面初始化init 单交易
1440 */
1441function pageInit(trancode) {
1442
1443	$(".sel_box").find("span").bind('click', function() {
1444		$('#center_menu_ul').show();
1445	});
1446
1447	$('li', $('#center_menu_ul')).bind('click', function() {
1448		$('li', $('#main_menu_ul')).removeClass('active');
1449		$('#center_menu_ul').hide();
1450		$("#center_fun").text($(this).text());
1451	});
1452
1453	//var SID = $.cookie('SID');
1454	var currLocationHref = window.location.href;
1455	var currentTrancode = "";
1456	var mainCode = "";
1457	var defalutIndex = true; //默认打开首页
1458	var defalutCode = trancode; //默认打开的交易
1459
1460	//清空cookie
1461	if (currLocationHref.indexOf('.html') > 0) {
1462		//clearCookie();
1463	}
1464	//获取参数地址后,若没有参数默认打开首页,并写入cookie
1465	if (currLocationHref.indexOf('#!/') > 0) {
1466		var currUrl = currLocationHref.split('#!/')[1];
1467		//提取url
1468		if (currUrl.indexOf('-') > 0) {
1469			currentTrancode = currUrl.split('-')[1];
1470			mainCode = currUrl.split('-')[0];
1471		} else {
1472			currentTrancode = currUrl;
1473		}
1474
1475	} else {
1476
1477		//提取cookie
1478		//currentTrancode = $.cookie('currentTrancode');
1479		//mainCode = $.cookie('currMainCode');
1480
1481	}
1482
1483	if (currentTrancode) {
1484
1485		//判断是否存在父级
1486		if (!mainCode) {
1487			mainCode = currentTrancode;
1488			currentTrancode = ""; //默认要打开的二级菜单 没有则传空
1489		}
1490
1491		//清空
1492		$('#main-transaction-area').empty().show();
1493		//打开交易
1494		$.openWindow({
1495			tranCode: mainCode,
1496			windowId: mainCode + $.citic.generateUID(),
1497			param: {
1498				"mvcCode": currentTrancode
1499			}
1500		});
1501
1502		defalutIndex = false;
1503	} else {
1504		defalutIndex = true;
1505	}
1506
1507	//默认打开首页
1508	if (defalutIndex) {
1509		$('#main-transaction-area').empty().show();
1510		$.openWindow({
1511			tranCode: defalutCode,
1512			windowId: defalutCode + $.citic.generateUID()
1513		});
1514	}
1515
1516	//logo返回前端测试首页
1517	$('.alogo img, .logo-mobile img').on('click', function() {
1518
1519		window.location.href=$.citic.doUrl.CMS_SIT_URL;
1520	})
1521
1522	//打开对应交易窗口
1523	$('body').on('click.button.citicMenu', '[data-toggle=citicMenu]', function(e) {
1524
1525		var mainCode = $(this).attr('main-content');
1526		var tranCode = $(this).attr('data-content');
1527		var isSession = $(this).attr('data-session'); //如果登录才能点击则设置  data-session="true"
1528
1529		if (isSession && !$.cookie('SID')) {
1530				
1531			window.location.href = $.citic.contextPath + 'login.html';
1532		}
1533
1534		$('#main-transaction-area').empty().show();
1535
1536		//如果没有父级frame则直接打开对应code的交易
1537		if (!mainCode) {
1538			mainCode = tranCode;
1539			tranCode = ""; //默认要打开的二级菜单 没有则传空
1540		}
1541
1542		var windowId = mainCode + $.citic.generateUID();
1543		$.openWindow({
1544			tranCode: mainCode, //要打开的框架页面
1545			windowId: windowId,
1546			param: {
1547				"mvcCode": tranCode
1548			} //默认要打开的二级菜单 没有则传空
1549		});
1550
1551	});
1552
1553	$('#loginBtn').bind('click.login.index', function() {
1554		locationHref('login.html');
1555
1556	});
1557	new Hid();
1558	new Find("",{
1559			fn:function(){
1560				new Mask($(".header").find(".dropdown"));
1561				new Select($(".window-body").find(".dropdown-toggle"),{});
1562			}
1563		}
1564	);
1565	//用户行为埋码
1566	if(behaviorFlag){
1567		behaviorFun();
1568	}
1569}
1570
1571/*
1572 * 页面初始化init 单交易
1573 */
1574function pageInitParam(trancode,param) {
1575
1576	$(".sel_box").find("span").bind('click', function() {
1577		$('#center_menu_ul').show();
1578	});
1579
1580	$('li', $('#center_menu_ul')).bind('click', function() {
1581		$('li', $('#main_menu_ul')).removeClass('active');
1582		$('#center_menu_ul').hide();
1583		$("#center_fun").text($(this).text());
1584	});
1585
1586	//var SID = $.cookie('SID');
1587	var currLocationHref = window.location.href;
1588	var currentTrancode = "";
1589	var mainCode = "";
1590	var defalutIndex = true; //默认打开首页
1591	var defalutCode = trancode; //默认打开的交易
1592	var _param={
1593		startStep:'start' //flow流
1594	};
1595	
1596	$.extend(_param,param);	
1597	
1598	//清空cookie
1599	if (currLocationHref.indexOf('.html') > 0) {
1600		//clearCookie();
1601	}
1602	//获取参数地址后,若没有参数默认打开首页,并写入cookie
1603	if (currLocationHref.indexOf('#!/') > 0) {
1604		var currUrl = currLocationHref.split('#!/')[1];
1605		//提取url
1606		if (currUrl.indexOf('-') > 0) {
1607			currentTrancode = currUrl.split('-')[1];
1608			mainCode = currUrl.split('-')[0];
1609		} else {
1610			currentTrancode = currUrl;
1611		}
1612
1613	} else {
1614
1615		//提取cookie
1616		//currentTrancode = $.cookie('currentTrancode');
1617		//mainCode = $.cookie('currMainCode');
1618
1619	}
1620
1621	if (currentTrancode) {
1622
1623		//判断是否存在父级
1624		if (!mainCode) {
1625			mainCode = currentTrancode;
1626			currentTrancode = ""; //默认要打开的二级菜单 没有则传空
1627		}
1628
1629		//清空
1630		$('#main-transaction-area').empty().show();
1631		//打开交易
1632		$.openWindow({
1633			tranCode: mainCode,
1634			windowId: mainCode + $.citic.generateUID(),
1635			param: {
1636				"mvcCode": currentTrancode
1637			}
1638		});
1639
1640		defalutIndex = false;
1641	} else {
1642		defalutIndex = true;
1643	}
1644
1645	//默认打开首页
1646	if (defalutIndex) {
1647		$('#main-transaction-area').empty().show();
1648		$.openWindow({
1649			tranCode: defalutCode,
1650			windowId: defalutCode + $.citic.generateUID(),	
1651			startStep:_param.startStep
1652		});
1653	}
1654
1655	//logo返回前端测试首页
1656	$('.alogo img, .logo-mobile img').on('click', function() {
1657
1658		window.location.href=$.citic.doUrl.CMS_SIT_URL;
1659	})
1660
1661	//打开对应交易窗口
1662	$('body').on('click.button.citicMenu', '[data-toggle=citicMenu]', function(e) {
1663
1664		var mainCode = $(this).attr('main-content');
1665		var tranCode = $(this).attr('data-content');
1666		var isSession = $(this).attr('data-session'); //如果登录才能点击则设置  data-session="true"
1667
1668		if (isSession && !$.cookie('SID')) {
1669				
1670			window.location.href = $.citic.contextPath + 'login.html';
1671		}
1672
1673		$('#main-transaction-area').empty().show();
1674
1675		//如果没有父级frame则直接打开对应code的交易
1676		if (!mainCode) {
1677			mainCode = tranCode;
1678			tranCode = ""; //默认要打开的二级菜单 没有则传空
1679		}
1680
1681		var windowId = mainCode + $.citic.generateUID();
1682		$.openWindow({
1683			tranCode: mainCode, //要打开的框架页面
1684			windowId: windowId,
1685			param: {
1686				"mvcCode": tranCode
1687			} //默认要打开的二级菜单 没有则传空
1688		});
1689
1690	});
1691
1692	$('#loginBtn').bind('click.login.index', function() {
1693		locationHref('login.html');
1694
1695	});
1696	new Hid();
1697	new Find("",{
1698			fn:function(){
1699				new Mask($(".header").find(".dropdown"));
1700				new Select($(".window-body").find(".dropdown-toggle"),{});
1701			}
1702		}
1703	);
1704	//用户行为埋码
1705	if(behaviorFlag){
1706		behaviorFun();
1707	}
1708}
1709
1710function framePageInit(frameCode, childCode) {
1711
1712	$(".sel_box").find("span").bind('click', function() {
1713		$('#center_menu_ul').show();
1714	});
1715
1716	$('li', $('#center_menu_ul')).bind('click', function() {
1717		$('li', $('#main_menu_ul')).removeClass('active');
1718		$('#center_menu_ul').hide();
1719		$("#center_fun").text($(this).text());
1720	});
1721
1722	//var SID = $.cookie('SID');
1723	var currLocationHref = window.location.href;
1724	var currentTrancode = '';
1725	var mainCode = '';
1726	var defalutIndex = true; //默认打开首页
1727	var defalutMain = frameCode;
1728	var defalutCode = childCode;
1729
1730	//清空cookie
1731	if (currLocationHref.indexOf('.html') > 0) {
1732		//clearCookie();
1733	}
1734	//获取参数地址后,若没有参数默认打开首页,并写入cookie
1735	if (currLocationHref.indexOf('#!/') > 0) {
1736		var currUrl = currLocationHref.split('#!/')[1];
1737			currUrl = currUrl.split('?')[0];
1738
1739		//提取url
1740		if (currUrl.indexOf('-') > 0) {
1741			currentTrancode = currUrl.split('-')[1];
1742			mainCode = currUrl.split('-')[0];
1743		} else {
1744			currentTrancode = currUrl;
1745		}
1746
1747	} else {
1748
1749		//提取cookie
1750		//currentTrancode = $.cookie('currentTrancode');
1751		//mainCode = $.cookie('currMainCode');
1752
1753	}
1754
1755	if (currentTrancode) {
1756
1757		//判断是否存在父级
1758		if (!mainCode) {
1759			mainCode = currentTrancode;
1760			currentTrancode = ""; //默认要打开的二级菜单 没有则传空
1761		}
1762
1763		//清空
1764		$('#main-transaction-area').empty().show();
1765		//打开交易
1766		$.openWindow({
1767			tranCode: mainCode,
1768			windowId: mainCode + $.citic.generateUID(),
1769			param: {
1770				"mvcCode": currentTrancode
1771			}
1772		});
1773
1774		defalutIndex = false;
1775	} else {
1776		defalutIndex = true;
1777	}
1778
1779	//默认打开首页
1780	if (defalutIndex) {
1781		$('#main-transaction-area').empty().show();
1782		$.openWindow({
1783			tranCode: defalutMain,
1784			windowId: defalutMain + $.citic.generateUID(),
1785			param: {
1786				"mvcCode": defalutCode
1787			}
1788		});
1789	}
1790
1791	//logo返回前端测试首页
1792	$('.alogo img, .logo-mobile img').on('click', function() {
1793		//locationHref('main');		
1794		window.location.href=$.citic.doUrl.CMS_SIT_URL;
1795	})
1796
1797	//打开对应交易窗口
1798	$('body').on('click.button.citicMenu', '[data-toggle=citicMenu]', function(e) {
1799
1800		var mainCode = $(this).attr('main-content');
1801		var tranCode = $(this).attr('data-content');
1802		var isSession = $(this).attr('data-session'); //如果登录才能点击则设置  data-session="true"
1803
1804		if (isSession && !$.cookie('SID')) {	
1805			window.location.href = $.citic.contextPath + 'login.html';
1806		}
1807
1808		$('#main-transaction-area').empty().show();
1809
1810		//如果没有父级frame则直接打开对应code的交易
1811		if (!mainCode) {
1812			mainCode = tranCode;
1813			tranCode = ""; //默认要打开的二级菜单 没有则传空
1814		}
1815
1816		var windowId = mainCode + $.citic.generateUID();
1817		$.openWindow({
1818			tranCode: mainCode, //要打开的框架页面
1819			windowId: windowId,
1820			param: {
1821				"mvcCode": tranCode
1822			} //默认要打开的二级菜单 没有则传空
1823		});
1824
1825	});
1826
1827	$('#loginBtn').bind('click.login.index', function() {
1828		locationHref('login.html');
1829
1830	});
1831	
1832	new Hid();
1833	new Find("",{
1834			fn:function(){
1835				new Mask($(".header").find(".dropdown"));
1836				new Select($(".window-body").find(".dropdown-toggle"),{});
1837			}
1838		}
1839	);
1840	//用户行为埋码
1841	if(behaviorFlag){
1842		behaviorFun();
1843	}
1844}
1845
1846/*
1847 * 页面init 嵌套页面
1848 */
1849function framePageInitParam(frameCode, childCode, param) {
1850
1851	$(".sel_box").find("span").bind('click', function() {
1852		$('#center_menu_ul').show();
1853	});
1854
1855	$('li', $('#center_menu_ul')).bind('click', function() {
1856		$('li', $('#main_menu_ul')).removeClass('active');
1857		$('#center_menu_ul').hide();
1858		$("#center_fun").text($(this).text());
1859	});
1860
1861	//var SID = $.cookie('SID');
1862	var currLocationHref = window.location.href;
1863	var currentTrancode = '';
1864	var mainCode = '';
1865	var defalutIndex = true; //默认打开首页
1866	var defalutMain = frameCode;
1867	var defalutCode = childCode;
1868	var _param={
1869		frameStartStep:'start', //父flow流
1870		childStartStep:''
1871	};
1872
1873	$.extend(_param,param);
1874
1875	//清空cookie
1876	if (currLocationHref.indexOf('.html') > 0) {
1877		//clearCookie();
1878	}
1879	//获取参数地址后,若没有参数默认打开首页,并写入cookie
1880	if (currLocationHref.indexOf('#!/') > 0) {
1881		var currUrl = currLocationHref.split('#!/')[1];
1882			currUrl = currUrl.split('?')[0];
1883
1884		//提取url
1885		if (currUrl.indexOf('-') > 0) {
1886			currentTrancode = currUrl.split('-')[1];
1887			mainCode = currUrl.split('-')[0];
1888		} else {
1889			currentTrancode = currUrl;
1890		}
1891
1892	} else {
1893
1894		//提取cookie
1895		//currentTrancode = $.cookie('currentTrancode');
1896		//mainCode = $.cookie('currMainCode');
1897
1898	}
1899
1900	if (currentTrancode) {
1901
1902		//判断是否存在父级
1903		if (!mainCode) {
1904			mainCode = currentTrancode;
1905			currentTrancode = ""; //默认要打开的二级菜单 没有则传空
1906		}
1907		
1908		//清空
1909		$('#main-transaction-area').empty().show();
1910		//打开交易
1911		$.openWindow({
1912			tranCode: mainCode,
1913			windowId: mainCode + $.citic.generateUID(),
1914			startStep:_param.frameStartStep,
1915			param: {
1916				"mvcCode": mainCode,
1917				"mvcStartStep":currentTrancode
1918			}
1919		});
1920
1921		defalutIndex = false;
1922	} else {
1923		defalutIndex = true;
1924	}
1925
1926	//默认打开首页
1927	if (defalutIndex) {
1928		$('#main-transaction-area').empty().show();
1929		$.openWindow({
1930			tranCode: defalutMain,
1931			windowId: defalutMain + $.citic.generateUID(),
1932			startStep:_param.frameStartStep,
1933			param: {
1934				"mvcCode": defalutCode,
1935				"mvcStartStep":_param.childStartStep
1936			}
1937		});
1938	}
1939
1940	//logo返回前端测试首页
1941	$('.alogo img, .logo-mobile img').on('click', function() {
1942		//locationHref('main');		
1943		window.location.href=$.citic.doUrl.CMS_SIT_URL;
1944	})
1945
1946	//打开对应交易窗口
1947	$('body').on('click.button.citicMenu', '[data-toggle=citicMenu]', function(e) {
1948
1949		var mainCode = $(this).attr('main-content');
1950		var tranCode = $(this).attr('data-content');
1951		var isSession = $(this).attr('data-session'); //如果登录才能点击则设置  data-session="true"
1952
1953		if (isSession && !$.cookie('SID')) {	
1954			window.location.href = $.citic.contextPath + 'login.html';
1955		}
1956
1957		$('#main-transaction-area').empty().show();
1958
1959		//如果没有父级frame则直接打开对应code的交易
1960		if (!mainCode) {
1961			mainCode = tranCode;
1962			tranCode = ""; //默认要打开的二级菜单 没有则传空
1963		}
1964
1965		var windowId = mainCode + $.citic.generateUID();
1966		$.openWindow({
1967			tranCode: mainCode, //要打开的框架页面
1968			windowId: windowId,
1969			param: {
1970				"mvcCode": tranCode
1971			} //默认要打开的二级菜单 没有则传空
1972		});
1973
1974	});
1975
1976	$('#loginBtn').bind('click.login.index', function() {
1977		locationHref('login.html');
1978
1979	});
1980	
1981	new Hid();
1982	new Find("",{
1983			fn:function(){
1984				new Mask($(".header").find(".dropdown"));
1985				new Select($(".window-body").find(".dropdown-toggle"),{});
1986			}
1987		}
1988	);
1989	//用户行为埋码
1990	if(behaviorFlag){
1991		behaviorFun();
1992	}
1993}
1994
1995//我的中信左侧菜单控制
1996function ctrLeftMenu(id){
1997	var dataContent=id;
1998	$('.ser_con_left .list-group a').siblings('.list_act').removeClass('list_act');
1999	$('.ser_con_left .list-group a').each(function(index){
2000		if($(this).attr('data-content')==dataContent){
2001			$(this).addClass('list_act');
2002			var _url=window.location.href;
2003			if(_url.indexOf('#!/')>0){
2004				var hash=_url.split('#!/')[1];
2005				hash=hash.split('-')[0]+'-'+dataContent;
2006				window.location.href=_url.split('#!/')[0]+'#!/'+hash;
2007			}
2008		}
2009	})
2010}
2011
2012//获取redio值,id=所有的redio控件的父级元素
2013function getRedioVal(id) {
2014	var inputValue;
2015	$("#" + id + " input:radio").each(function() {
2016		if ($(this).is(":checked")) {				
2017			inputValue=$(this).val();
2018		}
2019	});
2020	return inputValue;
2021}
2022//在当前的时间上加加减N天 时间格式:yyyy-mm-dd
2023//例:前一天getStartTime(-1)
2024//  当天getStartTime(0)
2025//  后一天getStartTime(1)
2026function getDateTime(day) {
2027	//保留日期,从第二日开始可选
2028	var data = new Date();
2029	data.setDate(data.getDate() + day);
2030	var time = data.getFullYear() + "-" + (data.getMonth() + 1) + "-" + data.getDate();
2031	return time;
2032}
2033
2034//判断是否为null或空
2035function isNulOrEmpty(prop) {
2036	if (prop == null || trim(prop) == "" || prop==undefined)
2037		return true;
2038	else 
2039		return false;
2040}
2041
2042//删除输入框前后空格
2043function trim(str){ 
2044	str=str+"";
2045    return str.replace(/(^\s*)|(\s*$)/g,"");
2046}
2047
2048//删除输入框全部空格
2049function trimAll(str){ 
2050	var val=str.replace(/\s/g,'');
2051    return val;
2052}
2053
2054//阻止冒泡
2055function stopEventBubble(event){
2056	var e=event || window.event;
2057	if(e && e.stopPropagation){
2058		e.stopPropagation();
2059	}
2060	else{
2061		e.cancelBubble=true;		
2062	}
2063}
2064
2065//阻止默认事件
2066function stopEvent(event){
2067	var e=event || window.event;
2068	if(e && e.stopPropagation){
2069		e.preventDefault();
2070	}
2071	else{
2072		e.returnValue=false;
2073	}
2074}
2075
2076//登陆存储器
2077var siteOflag;
2078function setOflag(obj){
2079	siteOflag=obj;
2080}
2081function getOflag(){
2082	return siteOflag;
2083}
2084/*Loading*/
2085var Loading=function(){
2086	this.init.apply(this,arguments);	
2087};
2088Loading.prototype={
2089	init:function(el,options){
2090		var _this=this;
2091		this.options={};
2092		for (var i in options) {
2093			this.options[i]=options[i];
2094		};
2095		$(".hasObjectTag").each(function(){
2096			$(this).css({
2097				visibility:"hidden"
2098			})
2099		});
2100		if($(".redText").size()){
2101			
2102			$(".redText").each(function(){
2103				$(this).text("");
2104			});
2105		};
2106		var arr=[];
2107		var _src=$.citic.contextPath +"css/loadding.html";
2108		var _loadimg=$.citic.contextPath+"images/loading.gif";
2109		arr[arr.length]="<div class='loading_bg'></div>";
2110		arr[arr.length]="<div class=\"loading\">";
2111		arr[arr.length]="	<div class='loading_mask'><iframe allowtransparency=\"yes\" frameborder=\"0\" scrolling=\"no\" width=\"100%\" height=\"100%\" src="+_src+" style=\"background-color:transparent\"></iframe></div>";
2112		arr[arr.length]="	<div class=\"freedom\">";
2113		arr[arr.length]="		<div class=\"title\">";
2114		arr[arr.length]="			处理中,请稍等...";
2115		arr[arr.length]="		</div>";
2116		arr[arr.length]="		<div class=\"area\">";
2117		arr[arr.length]="<img src="+ _loadimg +" />";
2118		//arr[arr.length]="			<iframe src="+_src+" frameborder=\"0\" scrolling=\"no\" width=\"100%\" height=\"20\"></iframe>";
2119		arr[arr.length]="       </div>";
2120		arr[arr.length]="	</div>";
2121		arr[arr.length]="</div>";
2122		if(!$(".loading").size()){
2123			$("body").append(arr.join(""));
2124		}else{
2125		};
2126		$(".loading_bg").css({
2127			height:$(window).height()
2128		});
2129		$(".loading").css({
2130			height:$(window).height()
2131		});				
2132		$(".loading_bg").addClass("visible");
2133		$(".loading").addClass("visible");	
2134		this.resize();
2135	},
2136	close:function(){
2137		$(".hasObjectTag").each(function(){
2138			$(this).css({
2139				visibility:"visible"
2140			})
2141		});
2142		$(".loading_bg").removeClass("visible");
2143		$(".loading").removeClass("visible");
2144	
2145	},
2146	resize:function(){
2147		window.onresize=function(){
2148			$(".loading_bg").css({
2149				height:$(window).height()
2150			});
2151			$(".loading").css({
2152				height:$(window).height()
2153			});			
2154		}
2155	}
2156};
2157
2158/*头部导航遮住密码控件*/
2159
2160var Mask=function(){
2161	this.init.apply(this,arguments);
2162};
2163Mask.prototype={
2164	init:function(el){
2165		this.el=el;
2166		this.el.on("click",function(event){			
2167			event.preventDefault();
2168			var thisH=$(this).find('.dropdown-menu').height();
2169			var arr=[];
2170			arr[arr.length]='<div class="mask_bg"><iframe allowtransparency="yes" frameborder="0" scrolling="no" width="100%" height="'+ thisH +'"  style="background-color:transparent"></iframe></div>';
2171			arr[arr.length]="<div class='mask'></div>";
2172			var html=arr.join("");			
2173			if($(this).hasClass("open")){
2174				if($(".window-body").size()){
2175					$(".hasObjectTag").each(function(){
2176						$(this).css({
2177							visibility:"visible"
2178						})
2179					});
2180					if($(".mask").size()){
2181						$("#userLoginDropMenu").find(".mask").removeClass("visible");
2182						$("#userLoginDropMenu").find(".mask_bg").removeClass("visible");
2183					};
2184				};
2185			}else{
2186				if($(".window-body").size()){
2187					$(".hasObjectTag").each(function(){
2188						$(this).css({
2189							visibility:"hidden"
2190						})
2191					});
2192					if($(".mask").size()){
2193						$("#userLoginDropMenu").find(".mask").css({
2194							height:thisH+"px"
2195						}).addClass("visible");
2196						$("#userLoginDropMenu").find(".mask_bg").css({
2197							height:thisH+"px"
2198						}).addClass("visible");
2199					}else{
2200						$("#userLoginDropMenu").append(html);
2201						$("#userLoginDropMenu").find(".mask").addClass("visible");
2202						$("#userLoginDropMenu").find(".mask_bg").addClass("visible");
2203					}
2204				};
2205			}
2206			
2207		});
2208		$(document).on("click",function(){
2209			if($(".window-body").size()){
2210				if(!$("#loginBox").size()){
2211					if($(".mask").size()&&$(".mask").hasClass("visible")){
2212						$(".hasObjectTag").each(function(){
2213							$(this).css({
2214								visibility:"visible"
2215							})
2216						});
2217						$("#userLoginDropMenu").find(".mask").removeClass("visible");
2218						$("#userLoginDropMenu").find(".mask_bg").removeClass("visible");
2219					};
2220				};
2221			};
2222		});
2223		
2224	}
2225};
2226
2227//调用方法 new Mask();
2228
2229/*下拉菜单遮住密码控件*/
2230var Select=function(){
2231	this.init.apply(this,arguments);
2232};
2233Select.prototype={
2234	init:function(el,options){
2235		var _this=this;
2236		this.el=el;
2237		this.el.on("click",function(event){
2238			event.preventDefault();
2239			$(".select_bg").each(function(){
2240				if($(this).hasClass("visible")){
2241					$(this).removeClass("visible");
2242				};
2243			});
2244			var arr=[];
2245			arr[arr.length]="<div class='select_bg'><iframe frameborder=\"0\" scrolling=\"no\" width=\"100%\" height=\"100%\"></iframe></div>";
2246			var html=arr.join("");
2247			if(!$(this).parent().find(".select_bg").size()){
2248				$(this).parent().append(html);
2249			};
2250			if($(this).parent().hasClass("open")){
2251				$(".hasObjectTag").each(function(){
2252						$(this).css({
2253							visibility:"visible"
2254						});
2255				});
2256				$(this).parent().find(".select_bg").removeClass("visible");
2257			}else{
2258				
2259				$(this).parent().find(".select_bg").css({
2260					width:$(this).parent().find(".dropdown-menu").outerWidth(true),
2261					height:$(this).parent().find(".dropdown-menu").outerHeight(true),
2262					top:"100%"
2263				});
2264				$(".hasObjectTag").each(function(){
2265					$(this).css({
2266						visibility:"hidden"
2267					});
2268				});
2269				$(this).parent().find(".select_bg").addClass("visible");
2270			};
2271		});
2272		$(document).on("click",function(){
2273			if($(".select_bg").size()){
2274				$(".hasObjectTag").each(function(){
2275					$(this).css({
2276						visibility:"visible"
2277					});
2278				});
2279				$(".select_bg").each(function(){
2280					if($(this).hasClass("visible")){
2281						$(this).removeClass("visible");
2282					};
2283				});
2284			};
2285			if($(".loading").size()&&$(".loading").hasClass("visible")){
2286				$(".hasObjectTag").each(function(){
2287					$(this).css({
2288						visibility:"hidden"
2289					});
2290				});
2291			};
2292		});
2293	}
2294};
2295//调用方法 new Select();
2296//
2297var Find=function(){
2298	this.init.apply(this,arguments);
2299};
2300Find.prototype={
2301	init:function(el,options){
2302		var _this=this;
2303		this.options={};
2304		for (var i in options) {
2305			this.options[i]=options[i];
2306		};
2307		var auto=function(){
2308			window.time=setTimeout(auto,30);
2309			if($(".window-body").size()){
2310				clearTimeout(window.time);
2311				setTimeout(function(){
2312					_this.options.fn();
2313				},500);
2314			};
2315		};
2316		auto();
2317	}
2318};
2319//
2320var Hid=function(){
2321	this.init.apply(this,arguments);
2322};
2323Hid.prototype={
2324	init:function(el,options){
2325		var _this=this;
2326		var time=null;
2327		var auto=function(){
2328			time=setTimeout(auto,30);
2329			if($(".window-body").size()){
2330				clearTimeout(time);
2331				setTimeout(function(){
2332					if($(".window-body").find(".hasObjectTag").size()){
2333						$(".window-body").find(".hasObjectTag").each(function(){
2334							$(this).css({
2335								visibility:"hidden"
2336							});
2337						});
2338					};
2339				},500);
2340			};
2341		};
2342		setTimeout(function(){
2343			if($("#loginBox").size()){
2344				auto();
2345			};
2346		},500);
2347	}
2348};
2349var Caps=function(){
2350	this.init.apply(this,arguments);
2351};
2352Caps.prototype={
2353	init:function(el,options){
2354		var _this=this;
2355		this.el=el;
2356		this.options={
2357			time:null
2358		};
2359		for (var i in options){
2360			this.options[i]=options[i];
2361		};
2362		var l=0;
2363		var arr=[];
2364		arr[arr.length]="<div class='tips' style='color:#E8313E;padding:2px 0px'>大写锁定已经打开</div>";
2365		var html=arr.join("");
2366		isShift=false;
2367		var auto=function(){
2368			var str=new String(_this.el.val());
2369			if(str.length>l){
2370				var char=str.substr(str.length-1,1);
2371				if(/^[A-Z]+$/.test(char)&&!isShift||/^[a-z]+$/.test(char)&&isShift){
2372					if(_this.el.parent().find(".tips").size()){
2373					}else{
2374						_this.el.after(html);
2375					};
2376					_this.el.parent().find(".tips").css({
2377						display:"block"
2378					});
2379				}else{
2380					_this.el.parent().find(".tips").css({
2381						display:"none"
2382					});
2383				};
2384			};
2385			l=str.length;
2386		};
2387		this.el.on("focus",function(){
2388			if(_this.options.time){
2389				clearInterval(_this.options.time);
2390			};
2391			_this.options.time=setInterval(auto,100);
2392		});
2393		this.el.on("blur",function(){
2394			if(_this.options.time){
2395				clearInterval(_this.options.time);
2396			};
2397			$(this).parent().find(".tips").css({
2398				display:"none"
2399			});
2400		});
2401		this.el.on("keypress",function(e){
2402		 	isShift=e.shiftKey || (e.which == 16) ||false;
2403		});
2404	}
2405};
2406
2407var Layer=function(){
2408	this.init.apply(this,arguments);
2409};
2410Layer.prototype={
2411	init:function(el,options){
2412		var _this=this;
2413		this.options={};
2414		for (var i in options){
2415			this.options[i]=options[i];
2416		};
2417		if(!$("#myModalFin").size()){
2418			//var arr=[];
2419			var str="";
2420			str+="<div class=\"modal fade myModal\" id=\"myLayer\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabelFin\" aria-hidden=\"false\" >";
2421			str+="	<div class=\"modal-dialog my-modal-dialog\" >";
2422			str+="		<div class=\"modal-content my-modal-content\">";
2423			str+="	<div class=\"modal-header\">";
2424			str+="		<img src=\"../images/mycitic/my-close.png\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\" />";
2425			str+="		<h4 id=\"myModalLabelFin\" class=\"modal-title\">提示</h4>";
2426			str+="	</div>";
2427			str+="	<div class=\"modal-body\">";
2428			str+="		<p id=\"FinMsg\"></p>";
2429			str+="		<p id=\"FinCode\" class=\"text-red\"></p>";
2430			str+="	</div>";
2431			str+="	<div class=\"modal-footer my-modal-footer\">";
2432			str+="		<div class=\"ser_btn_inline text-right\">";
2433			str+="			<div class=\"col-sm-12 col-md-12 col-lg-12 col-xs-12\">";
2434			str+="				<button id=\"FinCloseBtn\" type=\"button\" class=\"btn btn-red btn-ele\" data-dismiss=\"modal\">确认</button>";
2435			str+="			</div>";
2436			str+="		</div>";
2437			str+="	</div>";
2438			str+="		</div>";
2439			str+="	</div>";
2440			str+="</div>";
2441			//var str=arr.join("");
2442			$('body').append(str);
2443			
2444		};
2445		$('#FinMsg').text("错误信息:"+this.options.msg);
2446	
2447		$('#myLayer').modal('show');
2448	}
2449};
2450var Compare=function(){
2451	this.init.apply(this,arguments);
2452};
2453Compare.prototype={
2454	init:function(el,options){
2455		var _this=this;
2456		this.el=el;
2457		var num=0
2458		this.el.find("tr:not(.end)").each(function(){
2459			num++;
2460			var that=$(this);
2461			var str="";
2462			var arr=[];
2463			$(this).find("td").each(function(i){
2464				if(!str){
2465					str=$(this).text();
2466				}else{
2467					if(str!=$(this).text()){
2468						arr.push(i);
2469					};
2470				};
2471			});
2472			var _str="";
2473			if(arr.length>1){
2474				$.each(arr,function(key,value){
2475					if(!_str){
2476						_str=that.find("td").eq(Number(value)).text();
2477					}else{
2478						if(_str!=that.find("td").eq(Number(value)).text()){
2479							that.find("td").css({
2480								color:"#e8313e"
2481							});
2482						}else{
2483							that.find("td").eq(0).css({
2484								color:"#e8313e"
2485							});
2486						}
2487					};
2488				});
2489			}else if(arr.length==1){
2490				that.find("td").eq(Number(arr[0])).css({
2491					color:"#e8313e"
2492				});	
2493			}
2494		});
2495	}
2496};
2497
2498/*
2499 * 统计字符数
2500 */
2501var count=function(str){
2502	var _str=new String(str);
2503	var sum=0;
2504	for(var i=0; i<_str.length; i++){
2505		
2506		if(_str.charAt(i)==""){
2507			sum=sum+0;
2508		}else if($.citic.format.isChinese(_str.charAt(i))){
2509			sum=sum+2;
2510		}else{
2511			sum=sum+1;
2512		};
2513		
2514	};
2515	return sum;
2516};
2517
2518var Fill=function(){//填充--;
2519	this.init.apply(this,arguments);
2520};
2521Fill.prototype={
2522	init:function(el,options){
2523		var _this=this;
2524		this.el=el;
2525		this.options={};
2526		for (var i in options){
2527			this.options[i]=options[i];
2528		};
2529		this.el.each(function(){
2530			if($(this).html()==""&&$(this).text()==""){
2531				$(this).text("--");
2532			};
2533		});
2534	}
2535};
2536
2537//短信验证码
2538function getMobileCode(obj,id)
2539{
2540	var mobnum;
2541	$.citic.ajax({
2542		url: $.citic.doUrl.GET_MOBILE_CODE,
2543		type: 'post',
2544		dataType: 'json',
2545		data: obj,
2546		async: true,
2547		processResponse: function(data) {
2548			//获取验证码
2549			//getCodeId(data);
2550			var mobnum = data.content.mobile;
2551			$("#" + id).prop("disabled",false);
2552			//隐藏域
2553			try{
2554				if($('#pwdId').html()!=undefined){
2555					$('#pwdId').remove();
2556				}
2557			}
2558			catch(e){}
2559			$("#" + id).after('<input id="pwdId" type="hidden" value="' + data.content.pwdId + '">');
2560		},
2561		selfdefineFailed:function(data){
2562			showErrorCode(data.retMsg, data.retCode);
2563		}
2564	});
2565}
2566
2567//清空短信验证码
2568function clearMobileCode(ipt,btn,timer,ipt2){
2569	var _input=ipt;
2570	var _btn=btn;
2571	var _timer=timer;
2572	var _input2=ipt2; //手机号输入域
2573	
2574	$(_input).val('');
2575	$(_btn).prop('disabled', false);
2576	$(_btn).html('获取验证码');
2577	try{
2578		$(_input2).prop('disabled', false);
2579	}
2580	catch(e){}
2581	window.clearTimeout(_timer);
2582	_timer = null;
2583}
2584
2585
2586//赴美计时器控制
2587var usTimer=new Array();
2588function setUsTimer(arr){
2589	usTimer=arr;
2590}
2591function getUsTimer(){	
2592	return usTimer;
2593}
2594//赴英计时器控制
2595var ukTimer=new Array();
2596function setUkTimer(arr){
2597	ukTimer=arr;
2598}
2599function getUkTimer(){	
2600	return ukTimer;
2601}
2602//赴澳计时器控制
2603var ausTimer=new Array();
2604function setAusTimer(arr){
2605	ausTimer=arr;
2606}
2607function getAusTimer(){	
2608	return ausTimer;
2609}
2610//赴以计时器控制
2611var isrTimer=new Array();
2612function setIsrTimer(arr){
2613	isrTimer=arr;
2614}
2615function getIsrTimer(){	
2616	return isrTimer;
2617}
2618
2619//公共弹窗
2620//_msg错误信息
2621//_code错误码
2622function commonErrorPop(_msg,_code){
2623	$('body').addClass('modal-open');
2624	$('body').append('<div id="commonErrorPopMask" class="modal-backdrop fade in"></div>');
2625	var display = "block";
2626	var _msgTitle = "错误信息:";
2627	if (isNulOrEmpty(_code)) {
2628		display = "none";
2629		_msgTitle = "";
2630	}
2631	_msg = _msgTitle + _msg;
2632	var html = '<div class="modal fade myModal" id="commonErrorPop" tabindex="-1" role="dialog" aria-labelledby="commonErrorPopLabel" aria-hidden="true"><div class="modal-dialog my-modal-dialog"><div class="modal-content my-modal-content"><div class="modal-header"><img src="'+ getCurrSiteUrl() +'images/mycitic/my-close.png" class="close" id="commonErrorPopClose" data-dismiss="modal" aria-hidden="true" /><h4 id="commonErrorPopLabel" class="modal-title">提示信息</h4></div><div class="modal-body"><p style="text-indent: 2em;">' + _msg +'</p><p style="text-indent: 2em;display:'+display+'">错误码:' + _code +'</p></div><div class="modal-footer my-modal-footer"><div class="ser_btn_inline text-right"><div class="col-sm-12 col-md-12 col-lg-12 col-xs-12"><button type="button" class="btn btn-ele btn-red" id="commonErrorPopBtn" data-dismiss="modal">确认</button></div></div></div></div></div></div>';
2633	$('body').append(html);
2634	$('#commonErrorPop').css({
2635		'display': 'block',
2636		"opacity": "1"
2637	});
2638	//关闭
2639	$("#commonErrorPopBtn,#commonErrorPopClose").on("click", function() {
2640		$('#commonErrorPop').css('display', 'none');
2641		$('#commonErrorPop').remove();
2642		$('body').removeClass('modal-open');
2643		$('#commonErrorPopMask').remove();
2644	});
2645}
2646
2647//JSON.stringify
2648function jsonTostr(json)
2649{
2650	var s = "";
2651	$.each(json, function(i,n){
2652		s += ",'" + i + "':" + "'" + n + "'";
2653	});
2654	
2655	if(s != "")
2656	{
2657		s = s.substring(1);
2658	}
2659	
2660	return "{" + s + "}";
2661}
2662
2663//电子账户异常处理
2664function eaccStatusError(_element){
2665	var _domId='#'+_element;
2666	var _eaccHtml='<div class="ser_tips ser_tips_top eaccStatusCon" id="eaccStatusCon"><p><span class="red">抱歉!目前系统繁忙,建议您重新登录后再尝试交易。</span></p></div>';	
2667	if($('#eaccStatusCon').html()==undefined){
2668		$(_domId).after(_eaccHtml);
2669	}
2670}
2671
2672//中信通行证根据方式获取验证码
2673function getUUMobileCodeByType(obj,id){
2674	
2675	var uumobile;
2676	var uuPwdId='dynPwdId_'+id;
2677	var doUrlPath = $.citic.doUrl.SEND_DYN_PWD;
2678	if (obj.doUrlFlag != undefined && obj.doUrlFlag == "1") {
2679		doUrlPath = $.citic.doUrl.GET_MOBILE_CODE;
2680	}
2681	
2682	$.citic.ajax({
2683		url: doUrlPath,
2684		type: 'post',
2685		dataType: 'json',
2686		data: obj,
2687		async: true,
2688		processResponse: function(data) {
2689			//获取验证码
2690			uumobile=$.citic.format.mobileNoHide(data.content.mobile);
2691			$("#" + id).prop("disabled",false);
2692			//隐藏域
2693			try{
2694				if($("#"+uuPwdId).html()!=undefined){
2695					$("#"+uuPwdId).remove();
2696				}
2697			}
2698			catch(e){}
2699			if (obj.doUrlFlag != undefined && obj.doUrlFlag == "1") {
2700				$("#" + id).after('<input id="' + uuPwdId + '" type="hidden" value="' + data.content.pwdId + '">');
2701			} else {
2702				$("#" + id).after('<input id="' + uuPwdId + '" type="hidden" value="' + data.content.dynPwdId + '">');
2703			}
2704			if ($("#" + id).siblings("button").next(".uumobilemsg").html() == undefined) {
2705				$("#" + id).siblings("button").after('<p class="my-gray uumobilemsg">验证码已发送到' + uumobile + '手机上,180秒内有效。</p>');
2706			}else{
2707				$("#" + id).siblings("button").next('.uumobilemsg').html('验证码已发送到' + uumobile + '手机上,180秒内有效。');
2708			}
2709			
2710		}
2711	});
2712}
2713
2714//中信通行证根据方式获取验证码
2715function getUUEmailCode(obj,id){
2716	
2717	var uumobile;
2718	var uuPwdId='dynPwdId_'+id;
2719	
2720	$.citic.ajax({
2721		url: $.citic.doUrl.SEND_DYN_PWD,
2722		type: 'post',
2723		dataType: 'json',
2724		data: obj,
2725		async: true,
2726		processResponse: function(data) {
2727			//获取验证码
2728			uumobile=$.citic.format.mobileNoHide(data.content.email);
2729			$("#" + id).prop("disabled",false);
2730			//隐藏域
2731			try{
2732				if($('#'+ uuPwdId).html()!=undefined){
2733					$('#'+uuPwdId).remove();
2734				}
2735			}
2736			catch(e){}
2737			$("#" + id).after('<input id="' + uuPwdId + '" type="hidden" value="' + data.content.dynPwdId + '">');			
2738			if ($("#" + id).siblings("button").next(".uuemailmsg").html() == undefined) {
2739				$("#" + id).siblings("button").after('<p class="my-gray uuemailmsg">验证码已发送到' + uumobile + '邮箱上</p>');
2740			}else{
2741				$("#" + id).siblings("button").next('.uuemailmsg').html('验证码已发送到' + uumobile + '邮箱上');
2742			}
2743			
2744		}
2745	});
2746}
2747//中信通行证迁移状态查询
2748function queryUUFlag(_obj,_ajax){
2749	var ajax=_ajax;
2750	var obj=_obj;
2751	var checkUUState=function (data){
2752		var uudata;
2753		var gudFlg; //引导标识0-建议,1-强制
2754		var cstLevel; //用户级别
2755		var mdPwdReason; //改密原因
2756		var optFlag; //引导标志1-补充手机2-重设密码-需动态口令4-重设密码5-建议改密6-强制改密
2757		var channel; //验证密码渠道M-手机,N-个人网银
2758		var referer="";
2759		var skipObj={};
2760		
2761		referer=isNulOrEmpty(data.referer)?"":data.referer;
2762		uudata=isNulOrEmpty(data.content)?data:data.content;
2763		gudFlg=isNulOrEmpty(uudata.gudFlg)?"":uudata.gudFlg;		
2764		cstLevel=isNulOrEmpty(uudata.cstLevel)?"":uudata.cstLevel;		
2765		mdPwdReason=isNulOrEmpty(uudata.mdPwdReason)?"":uudata.mdPwdReason;		
2766		optFlag=isNulOrEmpty(uudata.optFlag)?"":uudata.optFlag;		
2767		channel=isNulOrEmpty(uudata.channel)?"":uudata.channel;
2768		
2769		if(referer=="login"){
2770			skipObj={
2771				"skipFlag":"1"
2772			}			
2773		}else{
2774			skipObj={
2775				"skipFlag":""
2776			}	
2777		}
2778
2779		if(optFlag=="1"){	//补充手机
2780			locationHref('html/uuPhoneAuthentic',skipObj);
2781		}else if(optFlag=="2"){	//重设密码-需动态口令
2782			locationHref('html/uuResetLoginPwd',skipObj);
2783		}else if(optFlag=="4"){	//重设密码
2784			locationHref('html/uuResetLoginPwd',skipObj);
2785		}else if(optFlag=="5"){	//建议改密
2786			locationHref('html/uuLoginPwdModify');
2787		}else if(optFlag=="6"){	//强制改密
2788			locationHref('html/uuLoginPwdModify');
2789		}else if(optFlag=="7"){//手机认证成功
2790			locationHref('html/uuPhoneAuthenticSuccess');
2791		}
2792		
2793	}
2794	//迁移状态查询
2795	if(!isNulOrEmpty(ajax)){
2796		$.citic.ajax({
2797			url: ajax,
2798			type: 'post',
2799			dataType: 'json',
2800			data: obj,
2801			async: true,
2802			processResponse: function(data) {
2803				obj.loading.close();	
2804				checkUUState(data);
2805			}
2806		});
2807	}
2808	else{
2809		checkUUState(obj);
2810	}
2811	
2812}
2813//返回密码强度
2814function getPwdStrong(s){
2815	
2816	var regx=new RegExp(/(.)\1{2}/);
2817	var str="";
2818
2819	if($.citic.format.isInteger(s) || $.citic.format.isSpecialChar(s) || isEnglish(s) || s.length<8){
2820		str="W";
2821	}else{
2822		if(s.length>=10){
2823			str="S";
2824		}else{
2825			str="M";
2826		}
2827	}
2828	
2829	return str;
2830}
2831//深圳分行获取地址栏传参
2832function subBankGet(name)
2833{
2834	var strSer = window.location.href;//不能用window.location.search
2835	var i = strSer.indexOf("?"); 
2836	strSer = strSer.substring(i+1);
2837	var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
2838	strSer = strSer.match(reg);
2839	if(strSer != null) return unescape(strSer[2]);
2840	return null;
2841}
2842function showPopupFund(status,prodno)
2843{
2844	//弹窗处理
2845	try{
2846		$('#popupModal').remove();
2847		$('body').removeClass('modal-open');
2848		$('#popupMask').remove();
2849	}
2850	catch(e){}
2851	var FinHtml='<div class="modal fade myModal in" id="popupModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabelFun" aria-hidden="false" style="display:block;"><div class="modal-dialog my-modal-dialog"><div class="modal-content my-modal-content" id="popupContent"></div></div></div>';
2852	var FinBoxContent='<div class="modal-header"><img src="../images/mycitic/my-close.png" id="popopClose" class="close" data-dismiss="modal" aria-hidden="true" /><h4 id="myModalLabelFun" class="modal-title">提示</h4></div><div class="modal-body"><p id="popupMsg"></p></div><div class="modal-footer my-modal-footer"><div class="ser_btn_inline text-right"><div class="col-sm-12 col-md-12 col-lg-12 col-xs-12"><button id="toMessage" type="button" class="btn btn-red btn-ele" data-dismiss="modal" style="display:none">前往</button><button id="closeBtn" type="button" class="btn btn-red btn-ele" data-dismiss="modal" style="display:none"></button></div></div></div>';
2853	$('body').addClass('modal-open');		
2854	$('body').append(FinHtml);
2855	$('#popupContent').append(FinBoxContent);
2856	var message = "";
2857	if(status == "09")
2858	{
2859		message = "您的个人信息在我行收录不完整,请至我行营业网点补充相关信息后完成购买。";
2860		$("#closeBtn").text("我知道了").show();
2861	}else if(status == "10")
2862	{
2863		message = "根据监管要求,购买前我行须向您采集个人基本信息!";
2864		$("#closeBtn").text("返回").show();
2865		$("#toMessage").show();
2866	}
2867	$('#popupMsg').text(message);
2868	$('body').append('<div id="popupMask" class="modal-backdrop fade in"></div>');
2869	//绑定事件
2870	$('#closeBtn, #popopClose').on('click',function(){
2871		$('#popupModal').remove();
2872		$('body').removeClass('modal-open');
2873		$('#popupMask').remove();
2874	});
2875	$("#toMessage").on("click",function(){
2876		locationHref('html/foundPerMessage',{"prodNo":prodno});
2877	});
2878}
2879/*
2880 * 第一种while循环  多行文本省略...
2881 * id	需要增加多行文本省略的标签ID
2882 * rows	多行文本省略展示行数
2883 * str	文本
2884 * lineHeight	行高
2885 */
2886function overflowhidden1(id,rows,str,lineHeight){
2887	var text = document.getElementById(id);
2888	var lineH = lineHeight;					//获取到line-height样式设置的值
2889	var at = rows * parseInt(lineH);		//计算包含文本的div应该有的高度
2890	var tempstr = str;						//获取到所有文本
2891	text.innerHTML = tempstr;					//将所有文本写入html中
2892	var len = tempstr.length;
2893	var i = 0;
2894	if(text.offsetHeight <= at){				//如果所有文本在写入html后文本没有溢出,那不需要做溢出处理
2895		/*text.innerHTML = tempstr;*/
2896	}else{
2897		//否则 一个一个字符添加写入 不断判断写入后是否溢出
2898		var temp = "";
2899		text.innerHTML = temp;
2900		while(text.offsetHeight <= at){
2901			temp = tempstr.substring(0,i+1);
2902			i++;
2903			text.innerHTML = temp;
2904		}
2905		var slen = temp.length;
2906		tempstr = temp.substring(0,slen-1);
2907		len = tempstr.length;
2908		text.innerHTML = tempstr.substring(0,len-3)+"...";//替换string后面三个字符
2909		//text.style.height = at + "px";//修改文本高度,为了让css样式overflow:hidden生效
2910	}
2911	text.style.height = at + "px";
2912}
2913//生僻字键盘弹出
2914var fzKeyboardNew = "";//生僻字键盘new
2915var fzKeyboardSelecter = "";//生僻字键盘new
2916function getFzKeyboard(selecter, errId, options){
2917	if (!isNulOrEmpty(options.token)) {
2918		var oldOption = {
2919			domainUrl: options.domainUrl, // 可配置接口访问的域名和静态资源下载地址,如不填会自动匹配当前浏览器域名
2920			contextPath: options.contextPath,// 请求url地址的上下文,此参数的作用主要是用于ngxin做转发规则
2921			apiRule: options.apiRule,//请求接口地址
2922			cssRule: options.cssRule,//下载静态资源地址
2923			tid: options.tid, // 接入方下发的tid
2924			token: options.token, //接入方下发的秘钥
2925			onlyUncc: false, // false:接口请求所有汉字,true:只请求生僻字
2926			css: "my-css-name", // 暴露给用户的css样式,以配置键盘中的元素样式
2927			bottom: 0, // pc端键盘距可视区底部距离
2928			position: "right", // pc端键盘样式定位参数,left/right/centre
2929			positionRange: 0, // pc端键盘样式定位边距,如: position: "right":距右边80px
2930			drag: true, // true:pc端可拖动
2931			hideAnimate: false, // true: pc端隐退有动画
2932			width: "500", // 输入框的宽
2933			zIndex: 9999,
2934			events: { // 事件
2935				//初始化完成事件
2936				init: function () {},
2937				//默认字体加载完成事件
2938				initFont: function () {},
2939				//键盘弹出事件
2940				show:function(a){
2941					$(".my-css-name").css({"background-color":"#fff"});
2942					var modalBgDiv= '<div class="modal_bg" style="position: absolute; z-index: -1; left: 0; top: 0; width: 100%; height: 100%;"><iframe width="100%" height="100%" frameborder="0" scrolling="no"></iframe></div>';
2943					$(".my-css-name").append(modalBgDiv);
2944				},
2945				//键盘收回事件
2946				hide: function () {},
2947				//主动点击收起键盘事件
2948				close: function () {},
2949				//点击键盘上的每个字触发的事件
2950				inputChat: function (word) {},
2951				//删除一个字触发的事件
2952				deleteChar: function (word) {},
2953				//点击键盘确认按钮触发事
2954				inputComplet: function (str) {
2955					if (!isNulOrEmpty(errId) && $(selecter).val() != "") {
2956						$("#"+errId).text('');
2957					}
2958				}
2959			}
2960		}
2961		try{
2962			//判断是否new,或者selecter与上一次不同,则重新new
2963			if (isNulOrEmpty(fzKeyboardNew) || fzKeyboardSelecter != selecter) {
2964				fzKeyboardNew = new  FzKeyboard(selecter, oldOption);
2965			}
2966			fzKeyboardSelecter = selecter;//存储本次selecter
2967			fzKeyboardNew.show();
2968		}catch(err){
2969			$('.span_text_botton').hide();
2970		}
2971		//为页面其他没有生僻字的输入框单选复选框等增加,删除键盘事件
2972		$("input[type='text'],textarea").on("focus",function(){
2973			$(".my-css-name").remove();
2974		});
2975		$("button").on("click",function(){
2976			$(".my-css-name").remove();
2977		});
2978		$("input[type='radio'],input[type='checkbox']").on("ifChecked",function(){
2979			$(".my-css-name").remove();
2980		}).on("ifUnchecked",function(){
2981			$(".my-css-name").remove();
2982		});
2983	}
2984}
2985//判断字符串是否包含生僻字
2986function isRemoteText(str){
2987	var regChn=/(?:[\0-\xB6\xB8-\u2E7F\u2FE0-\u3006\u3008-\u33FF\u4DC0-\u4DFF\uA000-\uD7FF\uFB00-\uFFFF]|[\uD800-\uD83F\uD87B-\uD87D\uD87F\uD8C0-\uDBFF][\uDC00-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD87A[\uDFF0-\uDFFF]|\uD87E[\uDE20-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/gm;
2988	var reg=/[^\u4E00-\u9FA5]/gm;
2989	str = str.replace(regChn,"");
2990	if(str.match(reg)==null){
2991		return false;
2992	}else{
2993		return true;
2994	}
2995}
2996// 生僻字反显
2997function getUncommonWordShow(selecter, options){
2998	//循环选择器判断是否包含生僻字
2999	var _flag = false;
3000	var _text = "";
3001	$(selecter).each(function(i,v){
3002		//判断此选择器在本页面是否只有一个
3003		if ($(v).length == 1) {
3004			//判断此选择器是否为输入框
3005			var _type = $(v).attr("type");
3006			if (_type == "text" || _type == "textarea") {
3007				_text = $(v).val();
3008			} else {
3009				_text = $(v).text();
3010			}
3011		} else {
3012			$(v).each(function(j,v){
3013				//判断此选择器是否为输入框
3014				var _type = $(this).attr("type");
3015				var _text = "";
3016				if (_type == "text" || _type == "textarea") {
3017					_text = $(this).val();
3018				} else {
3019					_text = $(this).text();
3020				}
3021				if (isRemoteText(_text)) {
3022					_flag = true;
3023				}
3024			});
3025		}
3026		if (isRemoteText(_text) && _flag == false) {
3027			_flag = true;
3028		}
3029	});
3030	//判断是否加载发现生僻字方法
3031	if (!isNulOrEmpty(options.token) && options.openFlag == '1' && _flag == true) {
3032		var oleOption = {
3033			domainUrl: options.domainUrl, // 可配置接口访问的域名和静态资源下载地址,如不填会自动匹配当前浏览器域名
3034			contextPath: options.contextPath, // 请求url地址的上下文,此参数的作用主要是用于ngxin做转发规则
3035			apiRule: options.apiRule,//请求接口地址
3036			cssRule: options.cssRule,//下载静态资源地址
3037			tid: options.tid, // 接入方下发的tid
3038			token: options.token, //接入方下发的秘钥
3039			onlyUncc: true, // false:接口请求所有汉字,true:只请求生僻字
3040			events: {
3041				// 生僻字加载前事件
3042				beforeLoad: function () {},
3043				// 生僻字加载中事件
3044				loading: function () {},
3045				// 生僻字加载完成事件
3046				loaded: function (buyVol) {},
3047				// 生僻字加载出现错误事件
3048				onError: function () {},
3049				// 生僻字加载成功返回样式数据事件;返回res数据格式:
3050				loadStyle:function(res){} 
3051			}
3052		}
3053		try{
3054			new UncommonWordShow(selecter,oleOption);
3055		}catch(err){
3056			alert("生僻字翻译错误,请稍后再试。");
3057		}
3058	}
3059};
3060
3061//生僻字键盘输入事件
3062function oneWordTwoCode(options)
3063{
3064	$(".span_text_botton").siblings("input").on("input",function(){
3065		var _inp = "#" + $(this).attr("id");
3066		new UncommonWordShow([_inp],{
3067			domainUrl: options.domainUrl, // 可配置接口访问的域名和静态资源下载地址,如不填会自动匹配当前浏览器域名
3068			contextPath: options.contextPath, // 请求url地址的上下文,此参数的作用主要是用于ngxin做转发规则
3069			apiRule: options.apiRule,//请求接口地址
3070			cssRule: options.cssRule,//下载静态资源地址
3071			tid: options.tid, // 接入方下发的tid
3072			token: options.token, //接入方下发的秘钥
3073			onlyUncc: true, // false:接口请求所有汉字,true:只请求生僻字
3074			events: {
3075				// 生僻字加载前事件
3076				beforeLoad: function () {},
3077				// 生僻字加载中事件
3078				loading: function () {},
3079				// 生僻字加载完成事件
3080				loaded: function (buyVol) {},
3081				// 生僻字加载出现错误事件
3082				onError: function () {},
3083				// 生僻字加载成功返回样式数据事件;返回res数据格式:
3084				loadStyle:function(res){} 
3085			}
3086		});
3087	});
3088}
3089
3090// 获取生僻字的token和tid
3091function getToken(type){// token值使用localStorage存储,若值为空请求接口
3092	var wordStorage = JSON.parse(window.localStorage.getItem("wordLocalStorage"));
3093	var options = {};
3094	if (!isNulOrEmpty(wordStorage)) {
3095		var expiredTime = wordStorage.expiredTime.substr(0,10);// token过期时间
3096		var nowDate = new Date().format("yyyyMMddHH"); // 系统时间
3097		if (nowDate == expiredTime) { //判断token是否过期
3098			options = {
3099				"token": wordStorage.token,
3100				"tid": wordStorage.tid,
3101				"domainUrl": wordStorage.domainUrl,
3102				"contextPath": wordStorage.contextPath,
3103				"apiRule": wordStorage.apiRule,
3104				"cssRule": wordStorage.cssRule,
3105				"webPath": wordStorage.webPath,
3106				"expiredTime": wordStorage.expiredTime,
3107				"openFlag": wordStorage.openFlag,
3108				"unFontsFlag": wordStorage.unFontsFlag	
3109			}
3110		} else {
3111			options = getOptions(type);
3112		}
3113	} else { // token为空,请求接口
3114		options = getOptions(type);
3115	}
3116	//加载生僻字引用js
3117	$('body').append('<script src="'+$.citic.getContextPath()+'/script/plugins/fzKeyboard/fzKeyboard.js?ver=1.0"></script>');
3118 	$('body').append('<script src="'+$.citic.getContextPath()+'/script/plugins/fzKeyboard/bundle.js?ver=1.0"></script>');
3119 	
3120	return options;
3121}
3122
3123function getOptions(type){
3124	var options={"token":"","tid":"","domainUrl":"","contextPath":"","apiRule":"","cssRule":"","webPath":"","expiredTime":"","openFlag":""};
3125	$.citic.ajax({
3126		url: $.citic.doUrl.GET_MICONV_PARAM,
3127		type: 'post',
3128		dataType: 'json',
3129		data: {},
3130		async: false,
3131		processResponse: function(data) {
3132			if (!isNulOrEmpty(data.content)) {
3133				window.localStorage.removeItem('wordLocalStorage');
3134				// openFlag  0 关闭 所有的生僻字都关闭
3135				// unFontsFlag  0  证明的打开,其他的关闭    1都打开    type==prove 表示是证明过来的
3136				if ((data.content.openFlag === "1" && data.content.unFontsFlag === "1") || (data.content.openFlag === "1" && type === "prove")) {
3137					options = {
3138						"token": data.content.token,
3139						"tid": data.content.tid,
3140						"domainUrl": data.content.url,
3141						"contextPath": data.content.path,
3142						"apiRule": $.citic.doUrl.FZ_SERVER_DISPATCHER+"?param=/"+data.content.path+"/",
3143						"cssRule": $.citic.doUrl.FZ_SERVER_DISPATCHER+"?param=/"+data.content.path,
3144						"webPath": data.content.webPath,
3145						"expiredTime": data.content.expiredTime,
3146						"openFlag": data.content.openFlag,
3147					  "unFontsFlag": data.content.unFontsFlag	
3148					}
3149				}
3150				var localParam = JSON.stringify(options);
3151				window.localStorage.setItem('wordLocalStorage', localParam);
3152			}
3153		}
3154	});
3155	return options;
3156}
3157// 小键盘点击事件
3158function complexSZ(options){
3159	if (options.openFlag === '1' && options.unFontsFlag === '1') { // openFlag-内管控制生僻字开关,1-打开,生僻字键盘展示 0-关闭
3160		$('.span_text_botton').show();
3161		$('.span_text_botton').off().click(function(){// 小键盘
3162			var getId, getTid, idName;
3163			if (!isNulOrEmpty($(this).siblings('input').attr('data-validate'))) {
3164				getId = JSON.parse($(this).siblings('input').attr('data-validate')).id;
3165				getTid = JSON.parse($(this).siblings('input').attr('data-validate')).tipId;
3166			} else {
3167				getId = $(this).siblings('input').attr('id');
3168				getTid = "";
3169		  	}
3170			idName = "#"+ getId;
3171			getFzKeyboard(idName, getTid,options);  // 第一个参数传的是ID
3172		});
3173	} else {
3174		$('.span_text_botton').hide();
3175	}
3176}
3177
3178//短信模板修改后中信通行证根据方式获取验证码 
3179function getUUMobileCodeByTypeSmg(obj,id){
3180	
3181	var uumobile;
3182	var uuPwdId='dynPwdId_'+id;
3183	var doUrlPath = $.citic.doUrl.SEND_DYN_PWD;
3184	if (obj.doUrlFlag != undefined && obj.doUrlFlag == "1") {
3185		doUrlPath = $.citic.doUrl.GET_MOBILE_CODE;
3186	}
3187	
3188	$.citic.ajax({
3189		url: doUrlPath,
3190		type: 'post',
3191		dataType: 'json',
3192		data: obj,
3193		async: true,
3194		processResponse: function(data) {
3195			//获取验证码
3196			uumobile=$.citic.format.mobileNoHide(data.content.mobile);
3197			$("#" + id).prop("disabled",false);
3198			//隐藏域
3199			try{
3200				if($("#"+uuPwdId).html()!=undefined){
3201					$("#"+uuPwdId).remove();
3202				}
3203			}
3204			catch(e){}
3205			if (obj.doUrlFlag != undefined && obj.doUrlFlag == "1") {
3206				$("#" + id).after('<input id="' + uuPwdId + '" type="hidden" value="' + data.content.pwdId + '">');
3207			} else {
3208				$("#" + id).after('<input id="' + uuPwdId + '" type="hidden" value="' + data.content.dynPwdId + '">');
3209			}
3210			if ($("#" + id).siblings("button").next(".uumobilemsg").html() == undefined) {
3211				$("#" + id).siblings("button").after('<p class="my-gray uumobilemsg">验证码已发送到' + uumobile + '手机上,180秒内有效。</p>');
3212			}else{
3213				$("#" + id).siblings("button").next('.uumobilemsg').html('验证码已发送到' + uumobile + '手机上,180秒内有效。');
3214			}
3215		},
3216		selfdefineFailed:function(data){
3217			showErrorCode(data.retMsg, data.retCode);
3218		}
3219	});
3220}
3221// 获取订单状态
3222function getOrderStatus(data) {
3223	var statusList = {
3224		"0": "未支付",
3225		"1": "已成交",
3226		"2": "已关闭",
3227		"3": "已删除"
3228	};
3229	return statusList[data];
3230}
3231//求积
3232function accmul (arg1, arg2) {
3233  var  m = 0;
3234    s1 = arg1.toString();
3235    s2 = arg2.toString();
3236  try {
3237    m += s1.split('.')[1].length;
3238  } catch (e) {
3239  }
3240  try {
3241    m += s2.split('.')[1].length;
3242  } catch (e) {
3243  }
3244  return Number(s1.replace('.', '')) * Number(s2.replace('.', '')) / Math.pow(10, m);
3245}
3246//求和
3247function accadd (arg1, arg2) {
3248  var r1, r2, m, a1, a2;
3249  arg1 = arg1.toString();
3250  arg2 = arg2.toString();
3251  try {
3252    r1 = arg1.split('.')[1].length;
3253  } catch (e) {
3254    r1 = 0;
3255  }
3256  try {
3257    r2 = arg2.split('.')[1].length;
3258  } catch (e) {
3259    r2 = 0;
3260  }
3261  m = Math.pow(10, Math.max(r1, r2));
3262  a1 = this.accmul(arg1, m);
3263  a2 = this.accmul(arg2, m);
3264  return (a1 + a2) / m;
3265}
3266
3267// 赴以申请地点字典翻译
3268function getApplicationPlace(orderType) {
3269	var orderList = {
3270		"CBG": "北京-Beijing",
3271		"CCU": "成都-Chengdu",
3272		"CGZ": "广州-Guangzhou",
3273		"CSH": "上海-Shanghai"
3274	}
3275	return orderList[orderType];
3276};
3277// 赴以缴费类别字典翻译
3278function getPaymentType(orderType) {
3279	var orderList = {
3280		"1": "签证费-Visa fee",
3281		"3": "领事费-Consular fee"
3282	};
3283	return orderList[orderType];
3284}
3285// 赴以申请类型典翻译
3286function getApplicantType(orderType) {
3287	var orderList = {
3288		"1": "因私护照持有人-Private Passport holder",
3289		"2": "因公护照持有人-Business Passport holder",
3290		"3": "接到使馆通知的申请人-Applicant notified by the Embassy"
3291	};
3292	return orderList[orderType] || '--';
3293}
3294// 获取账户种类
3295function getAccountType(data) {
3296	var statusList = {
3297		"1": "中信银行借记卡",
3298		"99": "银联卡"
3299	};
3300	return statusList[data];
3301}
3302// 使用密码控件后获取加密后密码。非ie不需要拼接随机数
3303function handleLgnPwd (timeStamp, pwdResult) {
3304  return  checkOsBrowser() == 11 ? pwdResult : timeStamp + pwdResult;
3305}
3306// 用于赴以赴美清空密码框
3307function clearPwdInp (flag) {
3308  var pwdCont = {
3309		"1": payEleAccPwd,
3310		"2": payEbankPwd
3311	};
3312	return flag != "3" ? pwdCont[flag].pwdClear() : clearAll();
3313}
3314function clearAll () {
3315	//清空电子账户网银密码控件
3316	payEbankPwd.pwdClear();
3317	payEleAccPwd.pwdClear(); 
3318}
3319//清空多个密码框
3320function clearMorePwd (pwdObj) {
3321	for(var i=0;i<pwdObj.length;i++){
3322		pwdObj[i].pwdClear();
3323	}
3324}
3325// 获取智能验证码开关
3326function getOnOff(fun) {
3327	$.citic.ajax({
3328		url: $.citic.doUrl.INTELLIGENT_OR_PIN,
3329		type: 'post',
3330		dataType: 'json',
3331		data: '',
3332		async: true,
3333		processResponse: function(data) {
3334			if(!isNulOrEmpty(data.content)){
3335				fun(data.content);
3336			}
3337		}
3338	});
3339}
3340		
3341function loadIntelCode() {
3342	$.ajax({
3343		url:intelCodeUrl + '/dx-captcha/index.js',
3344		dataType:'script',
3345		cache:true,
3346		timeout:1000,
3347		error:function(){
3348			$.ajax({
3349				url:$.citic.getContextPath() + '/dx-captcha/index.js',  
3350				dataType:"script",
3351				cache:true
3352			})
3353		}
3354	});
3355	
3356	$.ajax({
3357		url:intelCodeUrl + '/dx-captcha/init.js',
3358		dataType:'script',
3359		cache:true,
3360		timeout:1000,
3361		error:function(){
3362			$.ajax({
3363				url:$.citic.getContextPath() + '/dx-captcha/init.js',  
3364				dataType:'script',
3365				cache:true
3366			})
3367		}
3368	});
3369}
3370// 获取YYYY-MM-DD日期
3371function getCurrDate () {
3372	var currDate=new Date();
3373	var currMonth=currDate.getMonth()+1;
3374	var currDay=currDate.getDate();
3375	if (currMonth < 10) {
3376		currMonth = "0" + currMonth;
3377	}
3378	if (currDay < 10) {
3379		currDay = "0" + currDay;
3380	}
3381	currDate=currDate.getFullYear()+'-'+currMonth+'-'+currDay;
3382	return currDate;
3383}
3384// 魔方数据查询 pageId-魔方页面id,  successFun-接口正常返回时调用函数, errFun-接口报错或返回数据为ç©
3384ºæ—¶è°ƒç”¨çš„函数
3385function getCubeInfo (pageId, successFun, errFun) {
3386	$.citic.ajax({ 
3387		url: $.citic.doUrl.QUERY_PIC,
3388		type: 'post',
3389		dataType: 'json',
3390		data: {
3391			"pageId": pageId
3392		},
3393		async: true,
3394		processResponse: function(result) {
3395			if(!isNulOrEmpty(result.content) && result.content.success){
3396				successFun(result.content);
3397			} else {
3398				errFun();
3399			}
3400		},
3401		selfdefineFailed:function(e){
3402			// 设置默认样式
3403			errFun();
3404		}
3405	});
3406}
3407// 判断是IE11还是IE11以下
3408function isIEMore () {
3409	var userAgent = navigator.userAgent;
3410	var isNoIE11 = /MSIE/.test(userAgent);
3411	return isNoIE11;
3412}
3413// 新增无障碍和关怀版按钮
3414function addAssistDome () {
3415	// 打开关怀版同时打开无障碍工具条
3416	$('.ghb-no-click').on('click',function(){
3417		// 打开关怀版,存储cookie
3418		$.cookie('cbpw-care-version', 'cbpw-care-version', {path: "/",domain:sitDoMain});
3419		// 增加关怀版样式
3420		// 点击关怀版同时打开无障碍工具条
3421		var isShow = getAssistCookie("citicbank-assist", "show");
3422		if (!isShow && !isIEMore()) {
3423			$("#assist-open").click();
3424		}
3425		// 打开关怀版时关闭所有视频播放
3426		$("video[autoplay]").each(function(){
3427			this.pause();
3428		})
3429		// 增加关怀版样式
3430		$("body").addClass("care-version");
3431		styleSwitch();
3432		assistAddClass();
3433	});
3434	// 关闭关怀版同时关闭无障碍工具条
3435	$('.close-care').on('click',function(){
3436		// 清空cookie
3437		$.cookie('cbpw-care-version', null, {path: "/",expires: -1,domain:sitDoMain});
3438		// 清除关关怀版样式
3439		$("body").removeClass("care-version");
3440		styleSwitch();
3441		$('.care-version-btn').show();
3442		// 点击关怀版同时打开无障碍工具条
3443		var isShow = getAssistCookie("citicbank-assist", "show");
3444		if (isShow && !isIEMore()) {
3445			$("#citicbank-assist-close").click();
3446		}
3447	});
3448	// 工具条打开,自动播放的视频禁止播放
3449	$("body").on("click", "#assist-open", function(){
3450		$("video[autoplay]").each(function(){
3451			this.pause();
3452		})
3453		// 工具条打开浏览器样式修改
3454		styleSwitch();
3455		assistAddClass();
3456	})
3457	// IE火狐无障碍工具条关闭修改样式
3458	$("body").on("click", "#citicbank-assist-close", function(){
3459		styleSwitch();
3460		$(".care-assist-open").removeClass("wza-click").addClass("wza-no-click");
3461	})
3462}
3463// 获取无障碍工具条的cookie
3464function getAssistCookie (name, key) {
3465	var currCookies = document.cookie.split(";");
3466	var res = null;
3467	for(var i = 0; i < currCookies.length; i++) {
3468		// var cookieName = currCookies[i] ? currCookies[i].split("=")[0]:'';
3469		var cookieValue = currCookies[i] ? currCookies[i].split("=")[1]:'';
3470		if (currCookies[i].indexOf(name) > -1) {
3471			if (key) {
3472				res = cookieValue ? JSON.parse(decodeURIComponent(cookieValue))[key] : null;
3473			} else {
3474				res = cookieValue ? JSON.parse(decodeURIComponent(cookieValue)) : null;
3475			}
3476		}
3477	}
3478	return res;
3479}
3480function styleSwitch (times) {
3481	var isIE = /MSIE|Trident/.test(window.navigator.userAgent);
3482	var isFirefox = /Firefox/i.test(window.navigator.userAgent);
3483	var cbpwCareVersion = $.cookie('cbpw-care-version');
3484	var timeNum = !isNulOrEmpty(times) ? times : 50;
3485	if (cbpwCareVersion === 'cbpw-care-version') {
3486		setTimeout(function() {
3487			if (!isFirefox) {
3488				$("body").children().not("#citicbank-assist").not("script").css('zoom', '1.5');
3489			}
3490			if (isIE) {
3491				$("body").addClass("care-version-ie");
3492				$("body").css('width', 'calc(100% / 1.5)');
3493				$("#intellCode").addClass("care-intellCode");
3494				$(".container").addClass('care-left');
3495			}
3496		}, timeNum);
3497	} else {
3498		if (!isFirefox) {
3499			$("body").children().not("#citicbank-assist").not("script").css('zoom', '1');
3500		}
3501		if (isIE) {
3502			$("body").removeClass("care-version-ie");
3503			$("body").css('width', 'auto');
3504			$("#intellCode").removeClass("care-intellCode");
3505			$(".container").removeClass('care-left');
3506		}
3507	}
3508}
3509function assistAddClass() {
3510	setTimeout(function(){
3511		// 获取当前无障碍工具条是否打开
3512		var isShow = getAssistCookie("citicbank-assist", "show");
3513		if (isShow) {
3514			$(".care-assist-open").removeClass("wza-no-click").addClass("wza-click");
3515		} else {
3516			$(".care-assist-open").removeClass("wza-click").addClass("wza-no-click");
3517		}
3518	}, 200);
3519}
3520
3521// 初始化无障碍工具条
3522function initAssist () {
3523	var uaIndex = navigator.userAgent.toLowerCase();
3524	var assistScript = document.createElement('script');
3525	assistScript.type = "text/javascript";
3526	if (uaIndex.indexOf("trident") > 0) {
3527		// ie
3528	  assistScript.src = $.citic.getContextPath() + "/script/plugins/assist/ie/assist-entry-ie.js";
3529	} else {
3530	  assistScript.src = $.citic.getContextPath() + "/script/plugins/assist/assist-entry.js"; //JS路径可根据存放位置进行调整
3531	}
3532	$("body").append(assistScript);
3533	// 按钮展示
3534	if (!isIEMore()) {
3535		$(".open-assist-btn").show();
3536	}
3537	$('.care-version-btn').show();
3538	assistAddClass();
3539	// 按钮事件加载
3540	addAssistDome();
3541	// 初始化清除cookie里的值
3542	setTimeout(function(){
3543		// 获取当前无障碍工具条是否打开
3544		var assistInfo = getAssistCookie("citicbank-assist");
3545		if (!isNulOrEmpty(assistInfo) && !assistInfo.show) {
3546			$("#citicbank-assist-close").click();
3547		}
3548	}, 200);
3549}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.