MxWeiXinPF.Web/obj/Release/Package/PackageTmp/weixin/sjb/js/wei_dialog.js

(开头部分) 12KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/**
 * 微生活html5页面 对话框
 * @author luanluan, yanwenkai, shiyanchao
 * @requires /trunk/src/apps/Meishi/docs/html1103/scripts/wei_webapp_v2_common.js,
 *			/trunk/src/apps/Meishi/docs/html1103/styles/wei_dialog.css
 */
var 
	/**
	 * 统一弹出对话框
	 * 	  参考: /trunk/src/apps/Meishi/docs/html1103/_doc/弹窗规范-扁平.jpg
	 */
	MDialog = (function(){
		var nohref = 'javascript:void(0)';
		var _notset = function(obj){
			return (typeof obj == 'undefined');
		};
		var _makeModal = function(){
			var tmpl = '<div class="mModal"><a href="'+nohref+'"></a></div>';
			_q('body').insertAdjacentHTML('beforeEnd', tmpl);
			tmpl = null;
			var m = _q('.mModal:last-of-type');
			if (_qAll('.mModal').length > 1) m.style.opacity = .01;
			_q('a',m).style.height = window.innerHeight + 'px';
			m.style.zIndex = window._dlgBaseDepth++;
			return m;
		};
		var _ensureDepth = function(){
			if ( _notset(window._dlgBaseDepth) )
				window._dlgBaseDepth = 900; /*对话框类基准深度*/
		};
		var _lockPage = function(isLock){
			if (_notset(isLock)) isLock = true;
			_q('body').style.overflow = isLock ? 'hidden' : 'visible';
		};
		var _c = function(title, content, notice, 
				btn1Label, btn1Callback, btn1Style, btn2Label, btn2Callback, btn2Style,
				iconType, needCloseBtn, needModal, closeCallback)
			{
				if (_notset(content)) content = null;
				if (_notset(notice)) notice = null;
				if (_notset(btn1Callback)) btn1Callback = null;
				if (_notset(btn1Style)) btn1Style = null;
				if (_notset(btn2Label)) btn2Label = null;
				if (_notset(btn2Callback)) btn2Callback = null;
				if (_notset(btn2Style)) btn2Style = null;
				if (_notset(iconType)) iconType = null;
				if (_notset(needCloseBtn)) needCloseBtn = true;
				if (_notset(needModal)) needModal = true;
				
				_ensureDepth();
				
				var	pw = window.innerWidth,
					ph = window.innerHeight,
					tmpl = null,
					m = null;
				
				if (needModal)
					m = _makeModal();
				
				tmpl = '<div class="mDialog">' + '<figure></figure>' + '<h1></h1>' + '<h2></h2>' + '<h3></h3>' + '<footer>' + '	<a class="two"></a>' + '	<a class="two"></a>' + '	<a class="one"></a>' + '</footer>' + '<a class="x">X</a>' + '</div>';
后面还有 379 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。