Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into feature/bindMobile
Showing
6 changed files
with
47 additions
and
38 deletions
@@ -9,6 +9,7 @@ var $ = require('jquery'), | @@ -9,6 +9,7 @@ var $ = require('jquery'), | ||
9 | Hammer = require('yoho.hammer'), | 9 | Hammer = require('yoho.hammer'), |
10 | Handlebars = require('yoho.handlebars'), | 10 | Handlebars = require('yoho.handlebars'), |
11 | tip = require('../plugin/tip'), | 11 | tip = require('../plugin/tip'), |
12 | + loading = require('../plugin/loading'), | ||
12 | orderInfo = require('./order-info').orderInfo; | 13 | orderInfo = require('./order-info').orderInfo; |
13 | 14 | ||
14 | var dispatchModeHammer, | 15 | var dispatchModeHammer, |
@@ -94,6 +95,7 @@ function orderCompute() { | @@ -94,6 +95,7 @@ function orderCompute() { | ||
94 | } | 95 | } |
95 | 96 | ||
96 | function submitOrder() { | 97 | function submitOrder() { |
98 | + loading.showLoadingMask(); | ||
97 | $.ajax({ | 99 | $.ajax({ |
98 | method: 'POST', | 100 | method: 'POST', |
99 | url: '/shoppingCart/orderSub', | 101 | url: '/shoppingCart/orderSub', |
@@ -114,6 +116,7 @@ function submitOrder() { | @@ -114,6 +116,7 @@ function submitOrder() { | ||
114 | var url; | 116 | var url; |
115 | 117 | ||
116 | if (!res) { | 118 | if (!res) { |
119 | + loading.hideLoadingMask(); | ||
117 | tip.show('网络出错'); | 120 | tip.show('网络出错'); |
118 | return; | 121 | return; |
119 | } | 122 | } |
@@ -125,11 +128,14 @@ function submitOrder() { | @@ -125,11 +128,14 @@ function submitOrder() { | ||
125 | } else { | 128 | } else { |
126 | url = '/home/pay?order_code=' + res.data.order_code; | 129 | url = '/home/pay?order_code=' + res.data.order_code; |
127 | } | 130 | } |
131 | + window.setCookie('order-info', ''); | ||
128 | window.location.href = url; | 132 | window.location.href = url; |
129 | } else { | 133 | } else { |
134 | + loading.hideLoadingMask(); | ||
130 | tip.show(res.messege || '网络出错'); | 135 | tip.show(res.messege || '网络出错'); |
131 | } | 136 | } |
132 | }).fail(function() { | 137 | }).fail(function() { |
138 | + loading.hideLoadingMask(); | ||
133 | tip.show('网络出错'); | 139 | tip.show('网络出错'); |
134 | }); | 140 | }); |
135 | } | 141 | } |
@@ -106,15 +106,13 @@ | @@ -106,15 +106,13 @@ | ||
106 | <span class="iconfont num"></span> | 106 | <span class="iconfont num"></span> |
107 | </a> | 107 | </a> |
108 | </div> | 108 | </div> |
109 | - {{! | ||
110 | <div class="group-list"> | 109 | <div class="group-list"> |
111 | - <a class="list-item" href="/help.html"> | 110 | + <a class="list-item" href="/home/help"> |
112 | <span class="iconfont icon"></span> | 111 | <span class="iconfont icon"></span> |
113 | 帮助 | 112 | 帮助 |
114 | <span class="iconfont num"></span> | 113 | <span class="iconfont num"></span> |
115 | </a> | 114 | </a> |
116 | </div> | 115 | </div> |
117 | - }} | ||
118 | 116 | ||
119 | {{> product/recommend-for-you}} | 117 | {{> product/recommend-for-you}} |
120 | {{> product/suspend-cart}} | 118 | {{> product/suspend-cart}} |
@@ -835,46 +835,51 @@ class HomeController extends AbstractAction | @@ -835,46 +835,51 @@ class HomeController extends AbstractAction | ||
835 | // 审判跳转登录页 | 835 | // 审判跳转登录页 |
836 | $this->auditJumpLogin(); | 836 | $this->auditJumpLogin(); |
837 | 837 | ||
838 | + /* 判断订单号是否传 */ | ||
838 | $orderCode = $this->get('order_code'); | 839 | $orderCode = $this->get('order_code'); |
839 | if (empty($orderCode)) { | 840 | if (empty($orderCode)) { |
840 | $this->error(); | 841 | $this->error(); |
841 | } | 842 | } |
842 | 843 | ||
844 | + /* 订单信息不存在 */ | ||
845 | + $orderDetail = OrderModel::orderDetail($orderCode, $this->_uid, $this->_usession); | ||
846 | + if (empty($orderDetail)) { | ||
847 | + $this->error(); | ||
848 | + } | ||
849 | + | ||
843 | $this->setTitle('订单详情'); | 850 | $this->setTitle('订单详情'); |
844 | $this->setNavHeader('订单详情'); | 851 | $this->setNavHeader('订单详情'); |
845 | 852 | ||
846 | $this->_view->display('order-detail', array( | 853 | $this->_view->display('order-detail', array( |
847 | 'orderDetailPage' => true, | 854 | 'orderDetailPage' => true, |
848 | - 'orderDetail' => OrderModel::orderDetail($orderCode, $this->_uid, $this->_usession), | 855 | + 'orderDetail' => $orderDetail, |
849 | )); | 856 | )); |
850 | } | 857 | } |
851 | 858 | ||
852 | - /** | ||
853 | - * 帮助中心列表页 | ||
854 | - */ | 859 | + /** |
860 | + * 帮助中心列表页 | ||
861 | + */ | ||
855 | public function helpAction() | 862 | public function helpAction() |
856 | - { | ||
857 | - $service = Home\HelpModel::serviceInfo(); | 863 | + { |
858 | $this->setTitle('帮助中心'); | 864 | $this->setTitle('帮助中心'); |
859 | $this->setNavHeader('帮助中心'); | 865 | $this->setNavHeader('帮助中心'); |
860 | - $data = array( | ||
861 | - 'iHelp' =>$service, | ||
862 | - ); | ||
863 | - $this->_view->display('i-help', $data); | ||
864 | - } | ||
865 | 866 | ||
867 | + $this->_view->display('help', array( | ||
868 | + 'iHelp' => Home\HelpModel::serviceInfo(), | ||
869 | + )); | ||
870 | + } | ||
866 | 871 | ||
867 | /** | 872 | /** |
868 | * 帮助中心列表详细信息 | 873 | * 帮助中心列表详细信息 |
869 | */ | 874 | */ |
870 | - public function helpDetailAction() | 875 | + public function helpDetailAction() |
871 | { | 876 | { |
872 | $caption = $this->get('caption', '帮助中心'); | 877 | $caption = $this->get('caption', '帮助中心'); |
873 | $code = $this->get('code', 0); | 878 | $code = $this->get('code', 0); |
874 | if (empty($code)) { | 879 | if (empty($code)) { |
875 | $this->error(); | 880 | $this->error(); |
876 | } | 881 | } |
877 | - | 882 | + |
878 | $this->setTitle($caption); | 883 | $this->setTitle($caption); |
879 | $this->setNavHeader($caption); | 884 | $this->setNavHeader($caption); |
880 | 885 | ||
@@ -883,27 +888,24 @@ class HomeController extends AbstractAction | @@ -883,27 +888,24 @@ class HomeController extends AbstractAction | ||
883 | )); | 888 | )); |
884 | } | 889 | } |
885 | 890 | ||
886 | - | ||
887 | - /** | 891 | + /** |
888 | * YOHO币详情 新版 | 892 | * YOHO币详情 新版 |
889 | */ | 893 | */ |
890 | public function currencyDetailAction() | 894 | public function currencyDetailAction() |
891 | { | 895 | { |
896 | + // 审判跳转登录页 | ||
897 | + $this->auditJumpLogin(); | ||
898 | + | ||
892 | $this->setTitle('YOHO币'); | 899 | $this->setTitle('YOHO币'); |
893 | $this->setNavHeader('YOHO币', true, false); | 900 | $this->setNavHeader('YOHO币', true, false); |
894 | 901 | ||
895 | - $data['money'] = '0'; | ||
896 | - $page = $this->post('page',1); | ||
897 | - $size = $this->post('size', 20); | ||
898 | - // $data = UserModel::getYohoCoinLists($this->_uid,$page,$size); | ||
899 | - $data = UserModel::getYohoCoinLists(3965746,$page,$size); | 902 | + $data = UserModel::getYohoCoinLists($this->_uid, 0, 20); |
900 | $this->_view->display('currency-detail', array( | 903 | $this->_view->display('currency-detail', array( |
901 | 'money' => $data['money'], | 904 | 'money' => $data['money'], |
902 | 'pageFooter' => true, | 905 | 'pageFooter' => true, |
903 | 'currencyDetail' => true, | 906 | 'currencyDetail' => true, |
904 | 'currencyDetailPage' => true | 907 | 'currencyDetailPage' => true |
905 | )); | 908 | )); |
906 | - | ||
907 | } | 909 | } |
908 | 910 | ||
909 | /** | 911 | /** |
@@ -911,18 +913,18 @@ class HomeController extends AbstractAction | @@ -911,18 +913,18 @@ class HomeController extends AbstractAction | ||
911 | */ | 913 | */ |
912 | public function ajaxCurrencyDetailAction() | 914 | public function ajaxCurrencyDetailAction() |
913 | { | 915 | { |
914 | - $data['list'] = array(); | ||
915 | - $data['money'] = 0; | ||
916 | - $page = $this->post('page',1); | ||
917 | - $size = $this->post('size', 20); | ||
918 | - $data = UserModel::getYohoCoinLists($this->_uid,$page,$size); | ||
919 | - //$data = UserModel::getYohoCoinLists(3965746,$page,$size); | ||
920 | - $this->_view->display('ajax-currency-detail', array( | ||
921 | - 'currency' => $data['list'], | ||
922 | - 'pageFooter' => true, | ||
923 | - 'currencyDetailPage' => true | ||
924 | - )); | ||
925 | - | 916 | + if ($this->isAjax()) { |
917 | + $uid = $this->getUid(); | ||
918 | + $page = $this->post('page', 1); | ||
919 | + $data = UserModel::getYohoCoinLists($uid, $page, 20); | ||
920 | + $this->_view->display('ajax-currency-detail', array( | ||
921 | + 'currency' => $data['list'], | ||
922 | + 'pageFooter' => true, | ||
923 | + 'currencyDetailPage' => true | ||
924 | + )); | ||
925 | + } else { | ||
926 | + echo ' '; | ||
927 | + } | ||
926 | } | 928 | } |
927 | 929 | ||
928 | } | 930 | } |
@@ -379,7 +379,7 @@ class UserModel | @@ -379,7 +379,7 @@ class UserModel | ||
379 | public static function getYohoCoinLists($uid, $page, $limit) | 379 | public static function getYohoCoinLists($uid, $page, $limit) |
380 | { | 380 | { |
381 | $result = array(); | 381 | $result = array(); |
382 | - | 382 | + $data['money'] = '0'; |
383 | // 调用接口获取YOHO币 | 383 | // 调用接口获取YOHO币 |
384 | $yohoCoin = UserData::yohoCoinData($uid, $page, $limit, 'post'); | 384 | $yohoCoin = UserData::yohoCoinData($uid, $page, $limit, 'post'); |
385 | // 处理YOHO币数据 | 385 | // 处理YOHO币数据 |
@@ -396,6 +396,7 @@ class UserModel | @@ -396,6 +396,7 @@ class UserModel | ||
396 | } | 396 | } |
397 | } | 397 | } |
398 | $data['list'] = $result; | 398 | $data['list'] = $result; |
399 | + | ||
399 | return $data; | 400 | return $data; |
400 | } | 401 | } |
401 | 402 |
@@ -86,6 +86,7 @@ class BindController extends AbstractAction | @@ -86,6 +86,7 @@ class BindController extends AbstractAction | ||
86 | $sourceType = $this->get('sourceType'); | 86 | $sourceType = $this->get('sourceType'); |
87 | $nickname = $this->get('nickname'); | 87 | $nickname = $this->get('nickname'); |
88 | $areaCode = $this->get('areaCode', '86'); | 88 | $areaCode = $this->get('areaCode', '86'); |
89 | + $phoneNum=$this->get('phoneNum'); | ||
89 | $data = array( | 90 | $data = array( |
90 | 'bindPwd'=>true,//js标识 | 91 | 'bindPwd'=>true,//js标识 |
91 | 'backUrl' => '/', // 返回的URL链接 | 92 | 'backUrl' => '/', // 返回的URL链接 |
@@ -94,7 +95,8 @@ class BindController extends AbstractAction | @@ -94,7 +95,8 @@ class BindController extends AbstractAction | ||
94 | 'sourceType' => $sourceType, // 第三方登录来源 | 95 | 'sourceType' => $sourceType, // 第三方登录来源 |
95 | 'openId' => $openId, // openId | 96 | 'openId' => $openId, // openId |
96 | 'nickname' => $nickname, //昵称 | 97 | 'nickname' => $nickname, //昵称 |
97 | - 'areaCode' => $areaCode //国别码 | 98 | + 'areaCode' => $areaCode, //国别码 |
99 | + 'phoneNum' => $phoneNum //国别码 | ||
98 | ); | 100 | ); |
99 | 101 | ||
100 | // 渲染模板 | 102 | // 渲染模板 |
-
Please register or login to post a comment