Commit c12201a5 authored by hbcui1984's avatar hbcui1984

修正ajax方法中多了一个}的bug

parent 6bb6876a
......@@ -11,8 +11,8 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="http://dcloudio.github.io/mui/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="http://dcloudio.github.io/mui/dist/css/mui.min.css?v=2015-03-30 16:37:17 +0800">
<link rel="stylesheet" href="http://dcloudio.github.io/mui/assets/css/docs.css?v=2015-03-30 16:37:17 +0800">
<link rel="stylesheet" href="http://dcloudio.github.io/mui/dist/css/mui.min.css?v=2015-04-20 12:10:17 +0800">
<link rel="stylesheet" href="http://dcloudio.github.io/mui/assets/css/docs.css?v=2015-04-20 12:10:17 +0800">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://dcloudio.github.io/mui/assets/img/apple-touch-icon-114x114.png">
......@@ -133,7 +133,7 @@
<p class="docs-footer-text">mui遵循 <a href="https://github.com/dcloudio/mui/blob/master/LICENSE">MIT License</a>
</p>
<ul class="docs-footer-links">
<li>最新版本 v1.4.0</li>
<li>最新版本 v1.5.0</li>
<li>&middot;</li>
<li><a href="http://ask.dcloud.net.cn">问答社区</a></li>
<li>&middot;</li>
......@@ -147,8 +147,8 @@
</div>
<script src="http://dcloudio.github.io/mui/dist/js/jquery-2.1.1.js"></script>
<script src="http://dcloudio.github.io/mui/dist/js/bootstrap.min.js"></script>
<script src="http://dcloudio.github.io/mui/dist/js/mui.min.js?v=2015-03-30 16:37:17 +0800"></script>
<script src="http://dcloudio.github.io/mui/assets/js/docs.min.js?v=2015-03-30 16:37:17 +0800"></script>
<script src="http://dcloudio.github.io/mui/dist/js/mui.min.js?v=2015-04-20 12:10:17 +0800"></script>
<script src="http://dcloudio.github.io/mui/assets/js/docs.min.js?v=2015-04-20 12:10:17 +0800"></script>
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Ffff299fda9ff2d5ac97d9e621f738e52' type='text/javascript'%3E%3C/script%3E"));
......
/*!
* =====================================================
* Mui v1.4.0 (https://github.com/dcloudio/mui)
* Mui v1.5.0 (https://github.com/dcloudio/mui)
* =====================================================
*/
......@@ -629,6 +629,9 @@ p {
width: auto;
overflow: auto;
}
.mui-plus-pullrefresh .mui-slider-group {
overflow: visible;
}
.mui-plus-pullrefresh .mui-scroll {
position: static;
width: auto;
......@@ -886,15 +889,15 @@ button,
-webkit-transition-duration: .2s;
transition-duration: .2s;
}
input[type="button"]:active, input[type="button"].mui-active,
input[type="submit"]:active,
input[type="submit"].mui-active,
input[type="reset"]:active,
input[type="reset"].mui-active,
button:active,
button.mui-active,
.mui-btn:active,
.mui-btn.mui-active {
input[type="button"]:enabled:active, input[type="button"].mui-active:enabled,
input[type="submit"]:enabled:active,
input[type="submit"].mui-active:enabled,
input[type="reset"]:enabled:active,
input[type="reset"].mui-active:enabled,
button:enabled:active,
button.mui-active:enabled,
.mui-btn:enabled:active,
.mui-btn.mui-active:enabled {
color: #fff;
background-color: #929292;
}
......@@ -916,9 +919,9 @@ input[type="submit"],
background-color: #007aff;
border: 1px solid #007aff;
}
input[type="submit"]:active, input[type="submit"].mui-active,
.mui-btn-primary:active,
.mui-btn-primary.mui-active, .mui-btn-blue:active, .mui-btn-blue.mui-active {
input[type="submit"]:enabled:active, input[type="submit"].mui-active:enabled,
.mui-btn-primary:enabled:active,
.mui-btn-primary.mui-active:enabled, .mui-btn-blue:enabled:active, .mui-btn-blue.mui-active:enabled {
color: #fff;
background-color: #0062cc;
border: 1px solid #0062cc;
......@@ -929,7 +932,7 @@ input[type="submit"]:active, input[type="submit"].mui-active,
background-color: #4cd964;
border: 1px solid #4cd964;
}
.mui-btn-positive:active, .mui-btn-positive.mui-active, .mui-btn-success:active, .mui-btn-success.mui-active, .mui-btn-green:active, .mui-btn-green.mui-active {
.mui-btn-positive:enabled:active, .mui-btn-positive.mui-active:enabled, .mui-btn-success:enabled:active, .mui-btn-success.mui-active:enabled, .mui-btn-green:enabled:active, .mui-btn-green.mui-active:enabled {
color: #fff;
background-color: #2ac845;
border: 1px solid #2ac845;
......@@ -940,7 +943,7 @@ input[type="submit"]:active, input[type="submit"].mui-active,
background-color: #f0ad4e;
border: 1px solid #f0ad4e;
}
.mui-btn-warning:active, .mui-btn-warning.mui-active, .mui-btn-yellow:active, .mui-btn-yellow.mui-active {
.mui-btn-warning:enabled:active, .mui-btn-warning.mui-active:enabled, .mui-btn-yellow:enabled:active, .mui-btn-yellow.mui-active:enabled {
color: #fff;
background-color: #ec971f;
border: 1px solid #ec971f;
......@@ -951,7 +954,7 @@ input[type="submit"]:active, input[type="submit"].mui-active,
background-color: #dd524d;
border: 1px solid #dd524d;
}
.mui-btn-negative:active, .mui-btn-negative.mui-active, .mui-btn-danger:active, .mui-btn-danger.mui-active, .mui-btn-red:active, .mui-btn-red.mui-active {
.mui-btn-negative:enabled:active, .mui-btn-negative.mui-active:enabled, .mui-btn-danger:enabled:active, .mui-btn-danger.mui-active:enabled, .mui-btn-red:enabled:active, .mui-btn-red.mui-active:enabled {
color: #fff;
background-color: #cf2d28;
border: 1px solid #cf2d28;
......@@ -962,7 +965,7 @@ input[type="submit"]:active, input[type="submit"].mui-active,
background-color: #8a6de9;
border: 1px solid #8a6de9;
}
.mui-btn-royal:active, .mui-btn-royal.mui-active, .mui-btn-purple:active, .mui-btn-purple.mui-active {
.mui-btn-royal:enabled:active, .mui-btn-royal.mui-active:enabled, .mui-btn-purple:enabled:active, .mui-btn-purple.mui-active:enabled {
color: #fff;
background-color: #6641e2;
border: 1px solid #6641e2;
......@@ -973,7 +976,7 @@ input[type="submit"]:active, input[type="submit"].mui-active,
background-color: #c7c7cc;
border: 1px solid #c7c7cc;
}
.mui-btn-grey:active, .mui-btn-grey.mui-active {
.mui-btn-grey:enabled:active, .mui-btn-grey.mui-active:enabled {
color: #fff;
background-color: #acacb4;
border: 1px solid #acacb4;
......@@ -997,7 +1000,7 @@ input[type="submit"]:active, input[type="submit"].mui-active,
.mui-btn-outlined.mui-btn-royal, .mui-btn-outlined.mui-btn-purple {
color: #8a6de9;
}
.mui-btn-outlined.mui-btn-primary:active, .mui-btn-outlined.mui-btn-blue:active, .mui-btn-outlined.mui-btn-positive:active, .mui-btn-outlined.mui-btn-success:active, .mui-btn-outlined.mui-btn-green:active, .mui-btn-outlined.mui-btn-warning:active, .mui-btn-outlined.mui-btn-yellow:active, .mui-btn-outlined.mui-btn-negative:active, .mui-btn-outlined.mui-btn-danger:active, .mui-btn-outlined.mui-btn-red:active, .mui-btn-outlined.mui-btn-royal:active, .mui-btn-outlined.mui-btn-purple:active {
.mui-btn-outlined.mui-btn-primary:enabled:active, .mui-btn-outlined.mui-btn-blue:enabled:active, .mui-btn-outlined.mui-btn-positive:enabled:active, .mui-btn-outlined.mui-btn-success:enabled:active, .mui-btn-outlined.mui-btn-green:enabled:active, .mui-btn-outlined.mui-btn-warning:enabled:active, .mui-btn-outlined.mui-btn-yellow:enabled:active, .mui-btn-outlined.mui-btn-negative:enabled:active, .mui-btn-outlined.mui-btn-danger:enabled:active, .mui-btn-outlined.mui-btn-red:enabled:active, .mui-btn-outlined.mui-btn-royal:enabled:active, .mui-btn-outlined.mui-btn-purple:enabled:active {
color: #fff;
}
......@@ -1008,7 +1011,7 @@ input[type="submit"]:active, input[type="submit"].mui-active,
background-color: transparent;
border: 0;
}
.mui-btn-link:active, .mui-btn-link.mui-active {
.mui-btn-link:enabled:active, .mui-btn-link.mui-active:enabled {
color: #0062cc;
background-color: transparent;
}
......@@ -1028,13 +1031,13 @@ input[type="submit"]:active, input[type="submit"].mui-active,
}
.mui-btn .mui-badge-inverted,
.mui-btn:active .mui-badge-inverted {
.mui-btn:enabled:active .mui-badge-inverted {
background-color: transparent;
}
.mui-btn-primary:active .mui-badge-inverted,
.mui-btn-positive:active .mui-badge-inverted,
.mui-btn-negative:active .mui-badge-inverted {
.mui-btn-primary:enabled:active .mui-badge-inverted,
.mui-btn-positive:enabled:active .mui-badge-inverted,
.mui-btn-negative:enabled:active .mui-badge-inverted {
color: #fff;
}
......@@ -1512,8 +1515,6 @@ input[type="submit"]:active, input[type="submit"].mui-active,
overflow: hidden;
background-color: inherit;
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-touch-callout: none;
}
.mui-table-view-cell:after {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
/*!
* =====================================================
* Mui v1.4.0 (https://github.com/dcloudio/mui)
* Mui v1.5.0 (https://github.com/dcloudio/mui)
* =====================================================
*/
/**
......@@ -656,6 +656,9 @@ var mui = (function(document, undefined) {
}
var target = e.target;
if (target.tagName && target.tagName === 'INPUT' && target.type === 'text') {
if (target.disabled || target.readOnly) {
return;
}
document.body.classList.add(CLASS_FOCUSIN);
var isFooter = false;
for (; target && target !== document; target = target.parentNode) {
......@@ -1370,7 +1373,7 @@ var mui = (function(document, undefined) {
*/
$.fire = function(webview, eventType, data) {
if (webview) {
webview.evalJS("typeof mui!=='undefined'&&mui.receive('" + eventType + "','" + JSON.stringify(data || {}) + "')");
webview.evalJS("typeof mui!=='undefined'&&mui.receive('" + eventType + "','" + JSON.stringify(data || {}).replace(/\'/g, "\\u0027").replace(/\\/g, "\\u005c") + "')");
}
};
/**
......@@ -2764,12 +2767,12 @@ var mui = (function(document, undefined) {
var pos = $.parseTranslateMatrix($.getStyles(this.scroller, 'webkitTransform'));
this.setTranslate(Math.round(pos.x), Math.round(pos.y));
this.resetPosition(); //reset
$.trigger(this.wrapper, 'scrollend', this);
$.trigger(this.scroller, 'scrollend', this);
// e.stopPropagation();
e.preventDefault();
}
this.reLayout();
$.trigger(this.wrapper, 'beforescrollstart', this);
$.trigger(this.scroller, 'beforescrollstart', this);
},
_getDirectionByAngle: function(angle) {
if (angle < -80 && angle > -100) {
......@@ -2805,13 +2808,13 @@ var mui = (function(document, undefined) {
if (detail.direction === 'left' || detail.direction === 'right') {
if (this.options.scrollX) {
isPreventDefault = true;
if (!this.moved) { //识别角度
if (direction !== 'left' && direction !== 'right') {
isReturn = true;
} else {
$.gestures.touch.lockDirection = true; //锁定方向
$.gestures.touch.startDirection = detail.direction;
}
if (!this.moved) { //识别角度(该角度导致轮播不灵敏)
// if (direction !== 'left' && direction !== 'right') {
// isReturn = true;
// } else {
$.gestures.touch.lockDirection = true; //锁定方向
$.gestures.touch.startDirection = detail.direction;
// }
}
} else if (this.options.scrollY && !this.moved) {
isReturn = true;
......@@ -2842,7 +2845,7 @@ var mui = (function(document, undefined) {
return;
}
if (!this.moved) {
$.trigger(this.wrapper, 'scrollstart', this);
$.trigger(this.scroller, 'scrollstart', this);
} else {
e.stopPropagation(); //move期间阻止冒泡(scroll嵌套)
}
......@@ -2882,7 +2885,7 @@ var mui = (function(document, undefined) {
this.moved = true;
this.x = newX;
this.y = newY;
$.trigger(this.wrapper, 'scroll', this);
$.trigger(this.scroller, 'scroll', this);
},
_flick: function(e) {
// if (!this.moved || this.needReset) {
......@@ -2910,7 +2913,7 @@ var mui = (function(document, undefined) {
this.scrollTo(newX, newY); // ensures that the last position is rounded
if (e.type === 'dragend') { //dragend
$.trigger(this.wrapper, 'scrollend', this);
$.trigger(this.scroller, 'scrollend', this);
return;
}
var time = 0;
......@@ -2939,7 +2942,7 @@ var mui = (function(document, undefined) {
return;
}
$.trigger(this.wrapper, 'scrollend', this);
$.trigger(this.scroller, 'scrollend', this);
// e.stopPropagation();
},
_end: function(e) {
......@@ -2955,12 +2958,12 @@ var mui = (function(document, undefined) {
this._transitionTime();
if (!this.resetPosition(this.options.bounceTime)) {
this.isInTransition = false;
$.trigger(this.wrapper, 'scrollend', this);
$.trigger(this.scroller, 'scrollend', this);
}
},
_scrollend: function(e) {
if (Math.abs(this.y) > 0 && this.y <= this.maxScrollY) {
$.trigger(this.wrapper, 'scrollbottom', this);
$.trigger(this.scroller, 'scrollbottom', this);
}
},
_resize: function() {
......@@ -3117,7 +3120,7 @@ var mui = (function(document, undefined) {
this.parallaxStyle['webkitTransform'] = this._getTranslateStr(0, -parallaxY) + ' scale(' + scale + ',' + scale + ')';
} else {
this.parallaxImgStyle['opacity'] = 1;
this.parallaxStyle['webkitTransform'] = this._getTranslateStr(0, -10) + ' scale(1,1)';
this.parallaxStyle['webkitTransform'] = this._getTranslateStr(0, -1) + ' scale(1,1)';
}
}
if (this.indicators) {
......@@ -3177,7 +3180,7 @@ var mui = (function(document, undefined) {
},
refresh: function() {
this.reLayout();
$.trigger(this.wrapper, 'refresh', this);
$.trigger(this.scroller, 'refresh', this);
this.resetPosition();
},
scrollTo: function(x, y, time, easing) {
......@@ -4701,7 +4704,7 @@ var mui = (function(document, undefined) {
$.trigger(this, 'shown', this);
}
var onPopoverHidden = function(e) {
this.setAttribute('style', '');
setStyle(this,'none');
this.removeEventListener('webkitTransitionEnd', onPopoverHidden);
this.removeEventListener('touchmove', $.preventDefault);
fixedPopoverScroll(false);
......@@ -4788,7 +4791,7 @@ var mui = (function(document, undefined) {
// }
}
}
popover.setAttribute('style', 'display:block'); //actionsheet transform
setStyle(popover, 'block'); //actionsheet transform
popover.offsetHeight;
popover.classList.add(CLASS_ACTIVE);
backdrop.setAttribute('style', '');
......@@ -4798,6 +4801,15 @@ var mui = (function(document, undefined) {
backdrop.classList.add(CLASS_ACTIVE);
popover.addEventListener('webkitTransitionEnd', onPopoverShown);
};
var setStyle = function(popover, display, top, left) {
var style = popover.style;
if (typeof display !== 'undefined')
style.display = display;
if (typeof top !== 'undefined')
style.top = top + 'px';
if (typeof left !== 'undefined')
style.left = left + 'px';
};
var calPosition = function(popover, anchor, isActionSheet) {
if (!popover || !anchor) {
return;
......@@ -4808,7 +4820,7 @@ var mui = (function(document, undefined) {
var pWidth = popover.offsetWidth;
var pHeight = popover.offsetHeight;
if (isActionSheet) { //actionsheet
popover.setAttribute('style', 'display:block;top:' + (wHeight - pHeight + window.pageYOffset) + 'px;left:' + (wWidth - pWidth) / 2 + 'px;');
setStyle(popover, 'block', (wHeight - pHeight + window.pageYOffset), (wWidth - pWidth) / 2)
return;
}
var aWidth = anchor.offsetWidth;
......@@ -4862,7 +4874,7 @@ var mui = (function(document, undefined) {
} else if (position === 'middle') {
arrow.setAttribute('style', 'display:none');
}
popover.setAttribute('style', 'display:block;top:' + pTop + 'px;left:' + pLeft + 'px;');
setStyle(popover, 'block', pTop, pLeft);
};
$.createMask = function(callback) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -11,8 +11,8 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="http://dcloudio.github.io/mui/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="http://dcloudio.github.io/mui/dist/css/mui.min.css?v=2015-03-30 16:37:17 +0800">
<link rel="stylesheet" href="http://dcloudio.github.io/mui/assets/css/docs.css?v=2015-03-30 16:37:17 +0800">
<link rel="stylesheet" href="http://dcloudio.github.io/mui/dist/css/mui.min.css?v=2015-04-20 12:10:17 +0800">
<link rel="stylesheet" href="http://dcloudio.github.io/mui/assets/css/docs.css?v=2015-04-20 12:10:17 +0800">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://dcloudio.github.io/mui/assets/img/apple-touch-icon-114x114.png">
......@@ -156,7 +156,7 @@
<p class="docs-footer-text">mui遵循 <a href="https://github.com/dcloudio/mui/blob/master/LICENSE">MIT License</a>
</p>
<ul class="docs-footer-links">
<li>最新版本 v1.4.0</li>
<li>最新版本 v1.5.0</li>
<li>&middot;</li>
<li><a href="http://ask.dcloud.net.cn">问答社区</a></li>
<li>&middot;</li>
......@@ -170,8 +170,8 @@
</div>
<script src="http://dcloudio.github.io/mui/dist/js/jquery-2.1.1.js"></script>
<script src="http://dcloudio.github.io/mui/dist/js/bootstrap.min.js"></script>
<script src="http://dcloudio.github.io/mui/dist/js/mui.min.js?v=2015-03-30 16:37:17 +0800"></script>
<script src="http://dcloudio.github.io/mui/assets/js/docs.min.js?v=2015-03-30 16:37:17 +0800"></script>
<script src="http://dcloudio.github.io/mui/dist/js/mui.min.js?v=2015-04-20 12:10:17 +0800"></script>
<script src="http://dcloudio.github.io/mui/assets/js/docs.min.js?v=2015-04-20 12:10:17 +0800"></script>
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Ffff299fda9ff2d5ac97d9e621f738e52' type='text/javascript'%3E%3C/script%3E"));
......
......@@ -11,8 +11,8 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="http://dcloudio.github.io/mui/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="http://dcloudio.github.io/mui/dist/css/mui.min.css?v=2015-03-30 16:37:17 +0800">
<link rel="stylesheet" href="http://dcloudio.github.io/mui/assets/css/docs.css?v=2015-03-30 16:37:17 +0800">
<link rel="stylesheet" href="http://dcloudio.github.io/mui/dist/css/mui.min.css?v=2015-04-20 12:10:17 +0800">
<link rel="stylesheet" href="http://dcloudio.github.io/mui/assets/css/docs.css?v=2015-04-20 12:10:17 +0800">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://dcloudio.github.io/mui/assets/img/apple-touch-icon-114x114.png">
......@@ -107,7 +107,7 @@
<p class="docs-footer-text">mui遵循 <a href="https://github.com/dcloudio/mui/blob/master/LICENSE">MIT License</a>
</p>
<ul class="docs-footer-links">
<li>最新版本 v1.4.0</li>
<li>最新版本 v1.5.0</li>
<li>&middot;</li>
<li><a href="http://ask.dcloud.net.cn">问答社区</a></li>
<li>&middot;</li>
......@@ -121,8 +121,8 @@
</div>
<script src="http://dcloudio.github.io/mui/dist/js/jquery-2.1.1.js"></script>
<script src="http://dcloudio.github.io/mui/dist/js/bootstrap.min.js"></script>
<script src="http://dcloudio.github.io/mui/dist/js/mui.min.js?v=2015-03-30 16:37:17 +0800"></script>
<script src="http://dcloudio.github.io/mui/assets/js/docs.min.js?v=2015-03-30 16:37:17 +0800"></script>
<script src="http://dcloudio.github.io/mui/dist/js/mui.min.js?v=2015-04-20 12:10:17 +0800"></script>
<script src="http://dcloudio.github.io/mui/assets/js/docs.min.js?v=2015-04-20 12:10:17 +0800"></script>
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Ffff299fda9ff2d5ac97d9e621f738e52' type='text/javascript'%3E%3C/script%3E"));
......
......@@ -11,8 +11,8 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="http://dcloudio.github.io/mui/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="http://dcloudio.github.io/mui/dist/css/mui.min.css?v=2015-03-30 16:37:17 +0800">
<link rel="stylesheet" href="http://dcloudio.github.io/mui/assets/css/docs.css?v=2015-03-30 16:37:17 +0800">
<link rel="stylesheet" href="http://dcloudio.github.io/mui/dist/css/mui.min.css?v=2015-04-20 12:10:17 +0800">
<link rel="stylesheet" href="http://dcloudio.github.io/mui/assets/css/docs.css?v=2015-04-20 12:10:17 +0800">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://dcloudio.github.io/mui/assets/img/apple-touch-icon-114x114.png">
......@@ -454,15 +454,15 @@ mui的解决思路是:单webview只承载单个页面的dom,减少dom层级
<span class="c1">//服务器返回响应,根据响应结果,分析是否登录成功;</span>
<span class="p">...</span>
<span class="p">},</span><span class="s1">&#39;json&#39;</span>
<span class="p">});</span></code></pre></div>
<span class="p">);</span></code></pre></div>
<p class="component-description"><code>mui.get()</code>方法和<code>mui.post()</code>方法类似,只不过是直接使用GET请求方式向服务器发送数据、且不处理timeout和异常(若需处理异常及超时,请使用<code>mui.ajax()</code>方法),使用方法:
<code>mui.get(url[,data][,success][,dataType])</code>,如下为获得某服务器新闻列表的代码片段,服务器以json格式返回数据列表
</p>
<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="nx">mui</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="s1">&#39;http://server-name/list.php&#39;</span><span class="p">,{</span><span class="nx">category</span><span class="o">:</span><span class="s1">&#39;news&#39;</span><span class="p">},</span><span class="kd">function</span><span class="p">(</span><span class="nx">data</span><span class="p">){</span>
<span class="c1">//获得服务器响应</span>
<span class="p">...</span>
<span class="c1">//获得服务器响应</span>
<span class="p">...</span>
<span class="p">},</span><span class="s1">&#39;json&#39;</span>
<span class="p">});</span></code></pre></div>
<span class="p">);</span></code></pre></div>
<p class="component-description">
如上<code>mui.get()</code>方法和如下<code>mui.ajax()</code>方法效果是一致的:</p>
</p>
......@@ -481,10 +481,10 @@ mui的解决思路是:单webview只承载单个页面的dom,减少dom层级
<p class="component-description" ><code>mui.getJSON()</code>方法是在<code>mui.get()</code>方法基础上的更进一步简化,限定返回json格式的数据,其它参数和<code>mui.get()</code>方法一致,使用方法:
<code>mui.get(url[,data][,success])</code>,如上获得新闻列表的代码换成<code>mui.getJSON()</code>方法后,更为简洁,如下:</p>
<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="nx">mui</span><span class="p">.</span><span class="nx">getJSON</span><span class="p">(</span><span class="s1">&#39;http://server-name/list.php&#39;</span><span class="p">,{</span><span class="nx">category</span><span class="o">:</span><span class="s1">&#39;news&#39;</span><span class="p">},</span><span class="kd">function</span><span class="p">(</span><span class="nx">data</span><span class="p">){</span>
<span class="c1">//获得服务器响应</span>
<span class="p">...</span>
<span class="c1">//获得服务器响应</span>
<span class="p">...</span>
<span class="p">}</span>
<span class="p">});</span></code></pre></div>
<span class="p">);</span></code></pre></div>
......@@ -1065,7 +1065,7 @@ mui的解决思路是:单webview只承载单个页面的dom,减少dom层级
<p class="docs-footer-text">mui遵循 <a href="https://github.com/dcloudio/mui/blob/master/LICENSE">MIT License</a>
</p>
<ul class="docs-footer-links">
<li>最新版本 v1.4.0</li>
<li>最新版本 v1.5.0</li>
<li>&middot;</li>
<li><a href="http://ask.dcloud.net.cn">问答社区</a></li>
<li>&middot;</li>
......@@ -1079,8 +1079,8 @@ mui的解决思路是:单webview只承载单个页面的dom,减少dom层级
</div>
<script src="http://dcloudio.github.io/mui/dist/js/jquery-2.1.1.js"></script>
<script src="http://dcloudio.github.io/mui/dist/js/bootstrap.min.js"></script>
<script src="http://dcloudio.github.io/mui/dist/js/mui.min.js?v=2015-03-30 16:37:17 +0800"></script>
<script src="http://dcloudio.github.io/mui/assets/js/docs.min.js?v=2015-03-30 16:37:17 +0800"></script>
<script src="http://dcloudio.github.io/mui/dist/js/mui.min.js?v=2015-04-20 12:10:17 +0800"></script>
<script src="http://dcloudio.github.io/mui/assets/js/docs.min.js?v=2015-04-20 12:10:17 +0800"></script>
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Ffff299fda9ff2d5ac97d9e621f738e52' type='text/javascript'%3E%3C/script%3E"));
......
......@@ -2,7 +2,7 @@
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://dcloudio.github.io/mui/</loc>
<lastmod>2015-03-30T16:37:17+08:00</lastmod>
<lastmod>2015-04-20T12:10:17+08:00</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
......@@ -10,7 +10,7 @@
<url>
<loc>http://dcloudio.github.io/mui/about/</loc>
<lastmod>2015-03-30T16:37:17+08:00</lastmod>
<lastmod>2015-04-20T12:10:17+08:00</lastmod>
<changefreq>weekly</changefreq>
<priority>0.7</priority>
</url>
......@@ -19,7 +19,7 @@
<url>
<loc>http://dcloudio.github.io/mui/components/</loc>
<lastmod>2015-03-30T16:37:17+08:00</lastmod>
<lastmod>2015-04-20T12:10:17+08:00</lastmod>
<changefreq>weekly</changefreq>
<priority>0.7</priority>
</url>
......@@ -28,7 +28,7 @@
<url>
<loc>http://dcloudio.github.io/mui/getting-started/</loc>
<lastmod>2015-03-30T16:37:17+08:00</lastmod>
<lastmod>2015-04-20T12:10:17+08:00</lastmod>
<changefreq>weekly</changefreq>
<priority>0.7</priority>
</url>
......@@ -39,7 +39,7 @@
<url>
<loc>http://dcloudio.github.io/mui/javascript/</loc>
<lastmod>2015-03-30T16:37:17+08:00</lastmod>
<lastmod>2015-04-20T12:10:17+08:00</lastmod>
<changefreq>weekly</changefreq>
<priority>0.7</priority>
</url>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment