Authored by Rock Zhang

Merge branch 'develop' into test

... ... @@ -5,4 +5,12 @@
<p>{{ couponValidity}}</p>
{{# used}}<i></i>{{/ used}}
</div>
{{/coupons}}
\ No newline at end of file
{{/coupons}}
{{# noRecord}}
<div class="null">
<i></i>
<p>您还没有优惠券!</p>
<a href="{{topURL}}">随便逛逛</a>
</div>
{{/ noRecord}}
\ No newline at end of file
... ...
... ... @@ -249,12 +249,12 @@
{{#if onlineServicePage}}
<script>
seajs.use('js/me/online-service');
</script>onlineServiceDetailPage
</script>
{{/if}}
{{#if onlineServiceDetailPage}}
<script>
seajs.use('js/index/footer');
</script>onlineServiceDetailPage
</script>
{{/if}}
{{#if addressPage}}
<script>
... ...
... ... @@ -368,17 +368,33 @@ class UserModel
// 调用接口获取优惠券数据
$coupons = UserData::couponData($uid, $status, $page);
// 处理优惠券数据
if (isset($coupons['data']) && !empty($coupons['data']['total'])) {
$result['coupons'] = $coupons['data']['info'];
// 没有获取到优惠券时
if (!$coupons) {
$result['topURL'] = '/product/new';
$result['noRecord'] = true;
return $result;
}
foreach ($result['coupons'] as &$val) {
// 处理已使用的优惠券
if ($status == 1) {
$val['used'] = true;
// 处理优惠券数据
if (isset($coupons['data'])) {
// 不能再查到结果了
if ($page == 1 && $coupons['data']['total'] === 0) {
$result['walkwayUrl'] = '/product/new';
$result['noRecord'] = true;
} else {
$couponArr = array();
isset($coupons['data']['info']) && $couponArr = $coupons['data']['info'];
foreach ($couponArr as &$val) {
// 处理已使用的优惠券
if ($status == 1) {
$val['used'] = true;
}
}
}
!empty($couponArr) && $result['coupons'] = $couponArr;
}
}
return $result;
... ...
... ... @@ -339,7 +339,7 @@ class DetailModel
// 详情配图
if (isset($sizeInfo['productIntroBo']['productIntro'])) {
$productIntro = strstr($sizeInfo['productIntroBo']['productIntro'], '<br />');
$productIntro = $sizeInfo['productIntroBo']['productIntro'];
if ($productIntro) {
$result['productDetail'] = array(
'title' => '商品详情',
... ...