Authored by rqq

Merge branch 'release/4.5' of http://git.yoho.cn/fe/YOHOBUYWAP into release/4.5

@@ -70,7 +70,7 @@ class ShopProcess @@ -70,7 +70,7 @@ class ShopProcess
70 //店铺简介页地址 70 //店铺简介页地址
71 self::$shopData['shopIntroHref'] = Helpers::url('/product/index/intro', array('shop_id' => self::$shopId)); 71 self::$shopData['shopIntroHref'] = Helpers::url('/product/index/intro', array('shop_id' => self::$shopId));
72 } else { 72 } else {
73 - self::$shopData['allGoods'] = Helpers::url('', $allGoodsParam, 'search').'&openby:yohobuy={"action":"go.list","params":{"title":"全部商品", "actiontype":"0","shop_id":"'.self::$shopId.'","page":"1"}}'; 73 + self::$shopData['allGoods'] = Helpers::url('', $allGoodsParam, 'search') . '&openby:yohobuy={"action":"go.list","params":{"title":"全部商品", "actiontype":"0","shop_id":"' . self::$shopId . '","page":"1"}}';
74 self::$shopData['shopIntroHref'] = Helpers::url('/product/index/intro', array('shop_id' => self::$shopId, 'app_version' => self::$appVersion)); 74 self::$shopData['shopIntroHref'] = Helpers::url('/product/index/intro', array('shop_id' => self::$shopId, 'app_version' => self::$appVersion));
75 } 75 }
76 //搜索链接 76 //搜索链接
@@ -78,7 +78,7 @@ class ShopProcess @@ -78,7 +78,7 @@ class ShopProcess
78 //人气单品的链接 78 //人气单品的链接
79 self::$shopData['more_url'] = Helpers::url('', array('shop_id' => self::$shopId, 'order' => 's_n_d', 'title' => '人气单品',), 'search'); 79 self::$shopData['more_url'] = Helpers::url('', array('shop_id' => self::$shopId, 'order' => 's_n_d', 'title' => '人气单品',), 'search');
80 if (self::$appVersion) { 80 if (self::$appVersion) {
81 - self::$shopData['more_url'] = 'openby:yohobuy={"action":"go.list","params":{"shop_id":"'.self::$shopId.'","title":"人气单品"}}'; 81 + self::$shopData['more_url'] = 'openby:yohobuy={"action":"go.list","params":{"shop_id":"' . self::$shopId . '","title":"人气单品"}}';
82 } 82 }
83 } 83 }
84 84
@@ -148,11 +148,13 @@ class ShopProcess @@ -148,11 +148,13 @@ class ShopProcess
148 if (empty($val['brandDomain'])) { 148 if (empty($val['brandDomain'])) {
149 continue; 149 continue;
150 } 150 }
151 - $brandId .= $val['id'].',';  
152 - $appSuffix = 'openby:yohobuy={"action":"go.brand","params":{"shop_id":"'.self::$shopId.'","brand_id":"'.$val['id'].'"}}';  
153 - $brand['url'] = Helpers::url('', '', $val['brandDomain']); 151 + $brandId .= $val['id'] . ',';
  152 + // tar modified 1606031153 跳转当前店铺下的这个品牌的商品列表
  153 + $appSuffix = 'openby:yohobuy={"action":"go.list","params":{"shop_id":"' . self::$shopId . '","brand_id":"' . $val['id'] . '"}}';
  154 +// $brand['url'] = Helpers::url('', '', $val['brandDomain']);
  155 + $brand['url'] = Helpers::url('', array('shop_id' => self::$shopId, 'brand_id' => $val['id']), 'list');
154 if (!empty(self::$appVersion)) { 156 if (!empty(self::$appVersion)) {
155 - $brand['url'] .= '?'.$appSuffix; 157 + $brand['url'] .= '?' . $appSuffix;
156 } 158 }
157 $brand['img'] = Images::getImageUrl($val['brandIco'], 640, 400); 159 $brand['img'] = Images::getImageUrl($val['brandIco'], 640, 400);
158 $brand['brandName'] = $val['brandName']; 160 $brand['brandName'] = $val['brandName'];
@@ -178,6 +180,7 @@ class ShopProcess @@ -178,6 +180,7 @@ class ShopProcess
178 self::$shopData['bannerTop']['list'][] = array('url' => $slide['data'][0]['url'], 'img' => $slide['data'][0]['src']); 180 self::$shopData['bannerTop']['list'][] = array('url' => $slide['data'][0]['url'], 'img' => $slide['data'][0]['src']);
179 } 181 }
180 } 182 }
  183 +
181 /** 184 /**
182 * 热门分类 185 * 热门分类
183 * @param array $data 186 * @param array $data
@@ -204,8 +207,8 @@ class ShopProcess @@ -204,8 +207,8 @@ class ShopProcess
204 'url' => Helpers::getUrlBySkc($val['productId'], $val['goodsId'], $val['cnAlphabet']), 207 'url' => Helpers::getUrlBySkc($val['productId'], $val['goodsId'], $val['cnAlphabet']),
205 'img' => Helpers::getImageUrl($val['src'], 235, 314), 208 'img' => Helpers::getImageUrl($val['src'], 235, 314),
206 'productName' => $val['productName'], 209 'productName' => $val['productName'],
207 - 'salesPrice' => '¥'.$val['salesPrice'],  
208 - 'presentPrice' => '¥'.$val['salesPrice'] 210 + 'salesPrice' => '¥' . $val['salesPrice'],
  211 + 'presentPrice' => '¥' . $val['salesPrice']
209 ); 212 );
210 if (!empty(self::$appVersion)) { 213 if (!empty(self::$appVersion)) {
211 $goods['url'] .= '?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":' . $val['productSkn'] . '}}'; 214 $goods['url'] .= '?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":' . $val['productSkn'] . '}}';
@@ -349,7 +349,7 @@ class Helpers @@ -349,7 +349,7 @@ class Helpers
349 $result['showTags'] = $showTag; 349 $result['showTags'] = $showTag;
350 $result['img'] = isset($articleData['src']) ? self::getImageUrl($articleData['src'], 640, 640) : ''; 350 $result['img'] = isset($articleData['src']) ? self::getImageUrl($articleData['src'], 640, 640) : '';
351 //逛详情页app跳转url处理 20160601 351 //逛详情页app跳转url处理 20160601
352 - $result['url'] = $articleData['url'] . '&openby:yohobuy={"action":"go.h5","params":{"param":{"id":"' . $articleData['id'] . '"},"shareparam":{"id":"' . $articleData['id'] . '"},"share":"/guang/api/v1/share/guang","id":' . $articleData['id'] . ',"type":1,"url":"' . self::url('/info/index', array(), 'guang') . '","islogin":"N"}}'; 352 + $result['url'] = self::getUrlSafe($articleData['url'] . '&openby:yohobuy={"action":"go.h5","params":{"param":{"id":"' . $articleData['id'] . '"},"shareparam":{"id":"' . $articleData['id'] . '"},"share":"/guang/api/v1/share/guang","id":' . $articleData['id'] . ',"type":1,"url":"' . self::url('/info/index', array(), 'guang') . '","islogin":"N"}}');
353 $result['title'] = $articleData['title']; 353 $result['title'] = $articleData['title'];
354 $result['text'] = $articleData['intro']; 354 $result['text'] = $articleData['intro'];
355 $result['publishTime'] = $articleData['publish_time']; 355 $result['publishTime'] = $articleData['publish_time'];
@@ -377,7 +377,8 @@ class Helpers @@ -377,7 +377,8 @@ class Helpers
377 $articleData['author']['url'] = Helpers::getFilterUrl($articleData['author']['url']); 377 $articleData['author']['url'] = Helpers::getFilterUrl($articleData['author']['url']);
378 } 378 }
379 //编辑人员 app跳转url处理 20160601 379 //编辑人员 app跳转url处理 20160601
380 - $articleData['author']['url'].='&openby:yohobuy={"action":"go.h5","params":{"param":{"id":"' . $articleData['author']['author_id'] . '"},"share":"","id":' . $articleData['author']['author_id'] . ',"type":0,"islogin":"N","url":"' . self::url('/author/index', array(), 'guang') . '"}}'; 380 + $articleData['author']['url'].='&openby:yohobuy={"action":"go.h5","params":{"param":{"id":"' . $articleData['author']['author_id'] . '"},"share":"","id":' . $articleData['author']['author_id'] . ',"type":0,"islogin":"N","url":"' . self::transHttpsUrl(self::url('/author/index', array(), 'guang')) . '"}}';
  381 + $articleData['author']['url'] = self::getUrlSafe($articleData['author']['url']);
381 $result['author'] = $articleData['author']; 382 $result['author'] = $articleData['author'];
382 if (isset($result['author']['avatar'])) { 383 if (isset($result['author']['avatar'])) {
383 $result['author']['avatar'] = strtr($result['author']['avatar'], array('http://' => '//')); 384 $result['author']['avatar'] = strtr($result['author']['avatar'], array('http://' => '//'));
@@ -957,4 +958,14 @@ class Helpers @@ -957,4 +958,14 @@ class Helpers
957 { 958 {
958 return preg_replace('/^\/\//', 'http://', $url); 959 return preg_replace('/^\/\//', 'http://', $url);
959 } 960 }
  961 +
  962 + /**
  963 + * http和https转换成//
  964 + * @param type $url 地址
  965 + * @return type string
  966 + */
  967 + public static function getUrlSafe($url)
  968 + {
  969 + return '//' . strtr($url, array('http://' => '', 'https://' => ''));
  970 + }
960 } 971 }
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
@@ -216,7 +216,6 @@ orderHammer.on('tap', function(e) { @@ -216,7 +216,6 @@ orderHammer.on('tap', function(e) {
216 }); 216 });
217 }); 217 });
218 } else if ($cur.closest('.cancel').length > 0) { 218 } else if ($cur.closest('.cancel').length > 0) {
219 - console.log('s');  
220 $reaMask.css('visibility', 'visible'); 219 $reaMask.css('visibility', 'visible');
221 } else if ($cur.closest('.order-goods').length > 0) { 220 } else if ($cur.closest('.order-goods').length > 0) {
222 221
@@ -158,6 +158,7 @@ @@ -158,6 +158,7 @@
158 .suggest-sub-form { 158 .suggest-sub-form {
159 background: #fff; 159 background: #fff;
160 width: 100%; 160 width: 100%;
  161 + min-height: 800px;
161 162
162 #suggest-textarea { 163 #suggest-textarea {
163 box-sizing: border-box; 164 box-sizing: border-box;
@@ -939,10 +939,14 @@ class HomeController extends AbstractAction @@ -939,10 +939,14 @@ class HomeController extends AbstractAction
939 939
940 $hasWxShare = strpos($this->server('HTTP_USER_AGENT', ''), 'MicroMessenger') !== false; 940 $hasWxShare = strpos($this->server('HTTP_USER_AGENT', ''), 'MicroMessenger') !== false;
941 if ($hasWxShare) { 941 if ($hasWxShare) {
942 - $tools = new JsApiPay();  
943 - $openId = $tools->GetOpenid();  
944 - if ($openId) {  
945 - $this->setSession('weixinOpenId', $openId); 942 + $openId = $this->getSession('weixinOpenId' . $orderCode);
  943 + if (empty($openId)) {
  944 + $tools = new JsApiPay();
  945 + $openId = $tools->GetOpenid();
  946 + if ($openId) {
  947 + $this->setSession('weixinOpenId', $openId);
  948 + $this->setSession('weixinOpenId' . $orderCode, $openId);
  949 + }
946 } 950 }
947 } 951 }
948 952
@@ -61,7 +61,7 @@ class InfoController extends AbstractAction @@ -61,7 +61,7 @@ class InfoController extends AbstractAction
61 //guang双头部的问题 20160601 61 //guang双头部的问题 20160601
62 $authorTmp = explode("?id=", $detail['getAuthor']['url']); 62 $authorTmp = explode("?id=", $detail['getAuthor']['url']);
63 $authorId=$authorTmp[1]; 63 $authorId=$authorTmp[1];
64 - $data['guang']['author']['url'] = $detail['getAuthor']['url'] .'&openby:yohobuy={"action":"go.h5","params":{"param":{"id":"' . $authorId . '"},"share":"","id":' .$authorId . ',"type":0,"islogin":"N","url":"' . Helpers::url('/author/index', array(), 'guang') . '"}}'; 64 + $data['guang']['author']['url'] = Helpers::getUrlSafe($detail['getAuthor']['url'] .'&openby:yohobuy={"action":"go.h5","params":{"param":{"id":"' . $authorId . '"},"share":"","id":' .$authorId . ',"type":0,"islogin":"N","url":"' . Helpers::transHttpsUrl(Helpers::url('/author/index', array(), 'guang')) . '"}}');
65 } 65 }
66 66
67 $data['detail'] = array(); 67 $data['detail'] = array();