Authored by 郭成尧

优化接口无数据提示信息方式

... ... @@ -40,11 +40,9 @@ $receive.on('click', function() {
success: function(data) {
var msg = data.msg,
status = data.status,
newUrl;
if (data.noLogin === true) {
newUrl = data.url + '?code=' + getUrlParam('code');
if (data.noLogin === true) {
if ($('#intimacy-link').length <= 0) {
$('body').append('<a href=\'' + newUrl + '\' style="display:none;" id="intimacy-link">' +
'<span class="intimacy-link"></span></a>');
... ... @@ -95,3 +93,4 @@ if ($('.banner-swiper').find('li').size() > 1) {
$('.coupon-message-op-rel').on('click', function() {
location.reload();
});
... ...
... ... @@ -52,6 +52,9 @@
<input id="shareImg" type="hidden" value="{{shareImg}}">
<input id="shareTitle" type="hidden" value="{{shareTitle}}">
{{/ share}}
{{#if noData}}
{{/if}}
{{/ content}}
</div>
<div class="floor-mask"></div>
... ...
... ... @@ -40,7 +40,12 @@ class CouponController extends AbstractAction
if (isset($resource['code']) && $resource['code'] === 200) {
$result = CouponFloorProcess::getContent($resource['data']);
}else{
echo '没有返回数据!';exit;
$this->_view->display('index', array(
'content' => array(
'noData' => true,
),
'floorPage' => true
));
}
// 分享
$shareData = CouponFloorProcess::getShare($receiveData['code'], '领券中心');
... ...