Authored by 郝肖肖

合master

Showing 47 changed files with 59 additions and 45 deletions
... ... @@ -10,11 +10,11 @@ class AliwapReqparams
public function __construct($_orderCode, $_totalFee, $_goodName, $client_ip, $_orderTime, $_paymentParameter="", $_isTest=false, $_payExpire = '')
{
//到期时间,默认为当前时间加2个小时的时间戳
$_payExpire = empty($_payExpire) ? strtotime('+2 hours') : strtotime($_payExpire);
$payExpireMinute = 0;//剩余分钟数
if ($_payExpire && ($expireTime = $_payExpire - time()) > 0) {
$payExpireMinute = floor($expireTime / 60);
//当前时间加六十秒,访问有误差。支付宝是yy-mm-dd HH:ii,没有秒
if (empty($_payExpire)) {
$_payExpire = strtotime('+2 hours', $_orderTime) + 60;
} else {
$_payExpire = strtotime($_payExpire) + 60;
}
$this->orderCode = $_orderCode;
... ... @@ -24,7 +24,7 @@ class AliwapReqparams
$this->orderTime = $_orderTime;
$this->paymentParameter = $_paymentParameter;
$this->isTest = $_isTest;
$this->payExpireMinute = $payExpireMinute;
$this->payExpire = $_payExpire;//到期时间
}
/**
... ...
... ... @@ -39,7 +39,7 @@ class AliwapService
/* 业务参数 */
'payment_type' => $this->config->payment_type,
'seller_id' => $this->config->partner,
'it_b_pay' => $params->payExpireMinute . 'm',
'it_b_pay' => date('Y-m-d H:i', $params->payExpire),
'payment_type' => $this->config->payment_type,
'out_trade_no' => $params->orderCode,
'subject' => $params->goodsName,
... ...
No preview for this file type
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.
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.

21.5 KB | W: | H:

21.5 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

32.8 KB | W: | H:

32.8 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

43.9 KB | W: | H:

43.9 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

64 KB | W: | H:

64 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

53.4 KB | W: | H:

53.4 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

32 KB | W: | H:

32 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

43 KB | W: | H:

43 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

48.6 KB | W: | H:

48.6 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

18 KB | W: | H:

18 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

4.05 KB | W: | H:

4.05 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
... ... @@ -562,14 +562,19 @@ if ($brandHeader.length > 0) {
var appVersion = $('input[name="app_version"]').val();
/* 如果是基础店铺,POST 的数据一样 */
if ($this.hasClass('coled')) {
postData = {
shop_id: id,
app_version: appVersion
app_version: appVersion,
opt: 'cancel'
};
if ($this.hasClass('coled')) {
postUrl = '/product/index/cancelShopFav';
} else {
postData = {
shop_id: id,
app_version: appVersion,
opt: 'ok'
};
postUrl = '/product/index/shopFav';
}
} else {
... ... @@ -592,8 +597,11 @@ if ($brandHeader.length > 0) {
$.ajax({
type: 'GET',
url: postUrl,
url: location.protocol + '//m.yohobuy.com' + postUrl,
data: postData,
xhrFields: {
withCredentials: true
},
success: function(data) {
if (data.code === 200) {
$this.toggleClass('coled');
... ...
... ... @@ -887,7 +887,9 @@ function postCollect(info) {
method: 'get',
url: location.protocol + '//m.yohobuy.com' + info.url,
data: info.data,
xhrFields: {
withCredentials: true
},
success: function(data) {
if (data.code === 200) {
... ...
{
"name": "yohobuy",
"version": "4.9.22",
"version": "4.9.25",
"description": "yohobuy statics",
"keywords": [],
"homepage": "",
... ...
... ... @@ -81,9 +81,15 @@
<ul class="spring first">
{{#each spring}}
<li class="buriedpoint" data-bp-id="shop_spring_{{url}}_0">
{{#if url}}
<a href="{{url}}">
<img src="{{springType}}">
</a>
{{^}}
<a href="javascript:;">
<img src="{{springType}}">
</a>
{{/if}}
</li>
{{/each}}
</ul>
... ...
... ... @@ -3,6 +3,12 @@
<script>
var _hmt = _hmt || [];
function async_load(){
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?e5b83a487a4458aa5abca43f5779b764";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
... ...
... ... @@ -1059,6 +1059,10 @@ class HomeController extends AbstractAction
break;
}
//到期时间
$_payExpire = empty($orderDetail['data']['pay_expire']) ?
$orderDetail['data']['create_time'] + 7200 : strtotime($orderDetail['data']['pay_expire']);
//统一下单
$tools = new JsApiPay();
$input = new WxPayUnifiedOrder();
... ... @@ -1066,7 +1070,7 @@ class HomeController extends AbstractAction
$input->SetOut_trade_no('YOHOBuy_' . $orderCode); // 商户订单号
$input->SetTotal_fee($totalFee);
$input->SetTime_start(date("YmdHis", (int) $orderDetail['data']['create_time']));
$input->SetTime_expire(date("YmdHis", (int) $orderDetail['data']['create_time'] + 7200));
$input->SetTime_expire(date("YmdHis", $_payExpire));
$input->SetTrade_type("JSAPI");
$input->SetOpenid($openId);
$order = WxPayApi::unifiedOrder($input);
... ...
... ... @@ -379,7 +379,7 @@ class ListModel
public static function introData(&$data)
{
$imgArray = explode("?", $data['shop_logo']);
$data['shop_logo'] = $imgArray[0] . '?imageMogr2/thumbnail/400x172/extent/400x172/background/d2hpdGU=/position/center';
$data['shop_logo'] = str_replace('http:', '', $imgArray[0]) . '?imageMogr2/thumbnail/400x172/extent/400x172/background/d2hpdGU=/position/center';
return $data;
}
... ...
... ... @@ -631,7 +631,8 @@ class IndexController extends AbstractAction
*/
public function shopFavAction()
{
header('Access-Control-Allow-Origin:*');
header('Access-Control-Allow-Origin:' . $_SERVER['HTTP_ORIGIN']);
header('Access-Control-Allow-Credentials:true');
$data = array();
$shopId = $this->get('shop_id', 0);
$appVersion = $this->get('app_version', 0);
... ... @@ -641,9 +642,6 @@ class IndexController extends AbstractAction
$uid = $this->getUid();
}
do {
// if (!$this->isAjax()) {
// break;
// }
if (empty($uid)) {
$data['code'] = 401;
$refer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
... ... @@ -667,7 +665,8 @@ class IndexController extends AbstractAction
*/
public function cancelShopFavAction()
{
header('Access-Control-Allow-Origin:*');
header('Access-Control-Allow-Origin:' . $_SERVER['HTTP_ORIGIN']);
header('Access-Control-Allow-Credentials:true');
$data = array();
$shopId = $this->get('shop_id', 0);
$appVersion = $this->get('app_version', 0);
... ... @@ -676,14 +675,9 @@ class IndexController extends AbstractAction
} else {
$uid = $this->getUid();
}
do {
// if (!$this->isAjax()) {
// break;
// }
if (!empty($shopId) && !empty($uid)) {
$data = ShopData::cancelShopFav($uid, $shopId);
}
} while(false);
$this->echoJson($data);
}
... ...
... ... @@ -25,14 +25,11 @@ class OptController extends AbstractAction
*/
public function favoriteBrandAction()
{
header('Access-Control-Allow-Origin:' . $_SERVER['HTTP_ORIGIN']);
header('Access-Control-Allow-Credentials:true');
$result = array('code' => 401, 'message' => '参数不正确', 'data' => false);
do {
/* 判断是否是AJAX请求 */
if (!$this->isAjax()) {
break;
}
/* 判断品牌ID是否有效 */
$id = $this->post('id');
if (!is_numeric($id)) {
... ... @@ -74,14 +71,11 @@ class OptController extends AbstractAction
*/
public function favoriteProductAction()
{
header('Access-Control-Allow-Origin:' . $_SERVER['HTTP_ORIGIN']);
header('Access-Control-Allow-Credentials:true');
$result = array('code' => 401, 'message' => '参数不正确', 'data' => false);
do {
/* 判断是否是AJAX请求 */
if (!$this->isAjax()) {
break;
}
/* 判断品牌ID是否有效 */
$id = $this->post('id');
if (!is_numeric($id)) {
... ...
... ... @@ -137,6 +137,9 @@ class PayController extends AbstractAction
//锁单接口
$prePayInfo = CartData::savePrePayInfo($uid, $orderCode, 22);
UdpLog::info("【微信锁订单接口】,orderCode:{$orderCode}", array('prePayInfo' => $prePayInfo));
//到期时间
$_payExpire = empty($orderDetail['data']['pay_expire']) ?
$orderDetail['data']['create_time'] + 7200 : strtotime($orderDetail['data']['pay_expire']);
//统一下单
$tools = new JsApiPay();
... ... @@ -145,7 +148,7 @@ class PayController extends AbstractAction
$input->SetOut_trade_no('YOHOBuy_' . $orderCode); // 商户订单号
$input->SetTotal_fee($totalFee);
$input->SetTime_start(date("YmdHis", (int) $orderDetail['data']['create_time']));
$input->SetTime_expire(date("YmdHis", (int) $orderDetail['data']['create_time'] + 7200));
$input->SetTime_expire(date("YmdHis", $_payExpire));
$input->SetTrade_type("JSAPI");
$input->SetOpenid($openId);
$order = WxPayApi::unifiedOrder($input);
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "4.9.22"
application.version = "4.9.25"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "4.9.22"
application.version = "4.9.25"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "4.9.22"
application.version = "4.9.25"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "4.9.22"
application.version = "4.9.25"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...
... ... @@ -11,14 +11,11 @@ define('APPLICATION_PATH', dirname(__DIR__)); // 应用目录
define('ROOT_PATH', dirname(dirname(APPLICATION_PATH))); // 根目录
defined('APPLICATION_ENV') || define('APPLICATION_ENV', 'developer');
define('API_URL', 'http://api-test4.yohops.com:9999/');
define('SERVICE_URL', 'http://service-test4.yohops.com:9999/');
define('USE_INTER_FACE_SHUNT', false);//分流开关
#dev环境
// define('API_URL', 'http://dev-api.yohops.com:9999/');
// define('SERVICE_URL', 'http://dev-service.yohops.com:9999/');
define('API_URL', 'http://dev-api.yohops.com:9999/');
define('SERVICE_URL', 'http://dev-service.yohops.com:9999/');
define('YOHOBUY_URL', 'http://www.yohobuy.com/');
define('SERVICE_NOTIFY', 'http://test2.open.yohobuy.com/');
define('API_OLD', 'http://devservice.yoho.cn:58077/');
... ...