Authored by 郭成尧

Merge branch 'master' into hotfix/limittags

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.
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.
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.
This diff could not be displayed because it is too large.
... ... @@ -290,6 +290,7 @@ function submitOrder() {
tip.show('系统繁忙,请稍后再试!');
return;
}
if (res.code === 200) {
if (payType === 2) {
... ... @@ -298,6 +299,21 @@ function submitOrder() {
} else {
url = '/home/orders/pay?order_code=' + res.data.order_code;
}
/* tar add 161116 */
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
op: 'YB_SC_TOPAY_CLICK',
param: JSON.stringify({
C_ID: window._ChannelVary[cookie('_Channel')],
ORDER_CODE: res.data.order_code,
PRD_NUM: $('#goods-num').val(),
ORDER_AMOUNT: res.data.order_amount,
UNIONCOOKIE: res.data.unionCookie || '',
})
}, true);
}
window.setCookie('order-info', '');
window.location.href = url;
} else if (res.message) {
... ...
{
"name": "yohobuy",
"version": "5.1.0",
"version": "5.1.1",
"description": "yohobuy statics",
"keywords": [],
"homepage": "",
... ...
... ... @@ -84,6 +84,7 @@
{{> me/order/good}}
{{/each}}
<div class="goods-num">共{{num}}件商品 合计<span>{{goodsPrice}}</span></div>
<input type="hidden" id="goods-num" value="{{num}}">
</section>
<section class="block">
... ...
... ... @@ -4,13 +4,11 @@ use Action\AbstractAction;
use Hood\Core\Security\AuthCode;
use Index\CartModel;
use Index\UserModel;
use Plugin\Helpers;
use Plugin\UnionTrans;
use Home\OrderModel;
use LibModels\Wap\Home\CartData;
use Plugin\UdpLog;
use LibModels\Wap\Home\UserData;
use Plugin\Encryption;
use Plugin\Helpers;
use Plugin\UdpLog;
/**
* 购物车相关的控制器
... ... @@ -641,9 +639,27 @@ class IndexController extends AbstractAction
/* 判断是否是友盟过来的用户 */
$userAgent = null;
$unionKey = '';
$unionInfo = array();
if (!empty($_COOKIE['mkt_code']) || !empty($_COOKIE['_QYH_UNION'])) {
/* tar modified 161108 添加新的联盟数据处理逻辑,兼容原有联盟数据处理,
区别是旧的北京写 cookie 加密过来,新的 node 写 cookie,没有加密 */
if (!empty($_COOKIE['mkt_code'])) {
$unionKey = '{"client_id": 800' . $_COOKIE['mkt_code'] . '}';
} else {
$encryData = trim(Encryption::decrypt($_COOKIE['_QYH_UNION']));
$extraIndex = strrpos($encryData, '}') + 1;
$encryObject = substr($encryData, 0, $extraIndex);
$testQyhUnion = json_decode($encryObject, true);
if (isset($testQyhUnion['client_id'])) {
$unionKey = $encryObject;
} else {
$unionKey = AuthCode::decode($_COOKIE['_QYH_UNION'], 'q_union_yohobuy');
}
}
/* 解密客户端联盟信息 mkt_code优先 */
$unionKey = !empty($_COOKIE['mkt_code']) ? '{"client_id": 800' . $_COOKIE['mkt_code'] . '}' : AuthCode::decode($_COOKIE['_QYH_UNION'], 'q_union_yohobuy');
// $unionKey = !empty($_COOKIE['mkt_code']) ? '{"client_id": 800' . $_COOKIE['mkt_code'] . '}' : AuthCode::decode($_COOKIE['_QYH_UNION'], 'q_union_yohobuy');
/* 检查联盟参数是否有效 */
$unionInfo = empty($unionKey) ? array() : json_decode($unionKey, true);
/* 模拟APP的User-Agent */
... ... @@ -651,6 +667,8 @@ class IndexController extends AbstractAction
}
$result = CartModel::orderSub($uid, $addressId, $cartType, $deliveryTime, $deliveryWay, $invoices, $paymentId, $paymentType, $remark, $couponCode, $yohoCoin, $skuList, $unionKey, $userAgent);
$result['data']['unionCookie'] = $unionInfo;
// 记录下单异常的数据
if (empty($result)) {
$message = 'uid:' . $uid . ',addressId:' . $addressId . ',cartType:' . $cartType . ',deliveryTime:' . $deliveryTime
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "5.1.0"
application.version = "5.1.1"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "5.1.0"
application.version = "5.1.1"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "5.1.0"
application.version = "5.1.1"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "5.1.0"
application.version = "5.1.1"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...
... ... @@ -17,10 +17,10 @@ define('USE_INTER_FACE_SHUNT', false);//分流开关
#dev环境
define('API_URL', 'http://api-test1.yohops.com:9999/');
define('SERVICE_URL', 'http://service-test1.yohops.com:9999/');
define('API_URL', 'http://api-test2.yohops.com:9999/');
define('SERVICE_URL', 'http://service-test2.yohops.com:9999/');
define('YOHOBUY_URL', 'http://www.yohobuy.com/');
define('SERVICE_NOTIFY', 'http://service-test1.yohops.com:9999/');
define('SERVICE_NOTIFY', 'http://service-test2.yohops.com:9999/');
$application = new Application(APPLICATION_PATH . '/configs/application.developer.ini');
$application->bootstrap()->run();
... ...
... ... @@ -13,8 +13,8 @@ defined('APPLICATION_ENV') || define('APPLICATION_ENV', 'testing');
define('USE_INTER_FACE_SHUNT', true);//分流开关
define('API_URL', 'http://api-test1.yohops.com:9999/');
define('SERVICE_URL', 'http://service-test1.yohops.com:9999/');
define('API_URL', 'http://api-test2.yohops.com:9999/');
define('SERVICE_URL', 'http://service-test2.yohops.com:9999/');
define('YOHOBUY_URL', 'http://www.yohobuy.com/');
define('SERVICE_NOTIFY', 'http://service-test1.yohops.com:9999/');
... ...