Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHO-ACTIVITY-PHP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
梁志锋
9 years ago
Commit
ce3ba5cb25a4bb6df1f21c3b24c6e61bff0fe695
2 parents
c5b32605
c3de3b13
浏览页面 删除成功的延迟时间 code review by chenglong.wang
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
380 additions
and
153 deletions
library/Api/Yohobuy.php
library/LibModels/Wap/Guang/PlusstarData.php
library/Plugin/Helpers.php
static/js/me/address-act.js
static/js/me/address.js
static/js/me/browse-record.js
static/js/me/order.js
static/js/me/pay.js
static/js/passport/login/international.js
static/js/passport/login/login.js
static/js/product/detail/comments-consults.js
static/js/product/newsale/hot-rank.js
static/sass/me/_coupons.scss
static/sass/me/_fav.scss
static/sass/me/_pay.scss
static/sass/me/_personal-details.scss
static/sass/me/_vip-grade.scss
static/sass/product/_detail.scss
static/sass/product/_hot-rank.scss
static/sass/product/_product-description.scss
template/m.yohobuy.com/actions/index/home/coupon_list.phtml
template/m.yohobuy.com/actions/index/home/pay.phtml
template/m.yohobuy.com/actions/product/detail/consults.phtml
template/m.yohobuy.com/actions/product/newsale/hotlist.phtml
yohobuy/m.yohobuy.com/application/controllers/Home.php
yohobuy/m.yohobuy.com/application/models/Guang/Plusstar.php
yohobuy/m.yohobuy.com/application/models/Home/Order.php
yohobuy/m.yohobuy.com/application/models/Index/Home.php
yohobuy/m.yohobuy.com/application/models/Index/User.php
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
yohobuy/m.yohobuy.com/application/models/Product/Newsale.php
library/Api/Yohobuy.php
View file @
ce3ba5c
...
...
@@ -18,17 +18,21 @@ class Yohobuy
{
/* 正式环境 */
// const API_URL = 'http://api2.open.yohobuy.com/';
// const API_URL2 = 'http://api.open.yohobuy.com/';
// const SERVICE_URL = 'http://service.api.yohobuy.com/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_URL_LOGINSESSION = 'http://m1.yohobuy.com/';
/* 测试环境 */
const
API_URL
=
'http://testapi.yoho.cn:28078/'
;
const
SERVICE_URL
=
'http://testservice.yoho.cn:28077/'
;
// const API_URL = 'http://api2.open.yohobuy.com/';
// const API_URL2 = 'http://api.open.yohobuy.com/';
// const SERVICE_URL = 'http://service.api.yohobuy.com/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
const
API_URL
=
'http://apih5.yoho.cn/'
;
const
API_URL2
=
'http://apih5.yoho.cn/'
;
const
SERVICE_URL
=
'http://serviceh5.yoho.cn/'
;
const
YOHOBUY_URL
=
'http://www.yohobuy.com/'
;
// /* 测试环境 */
// const API_URL = 'http://testapi.yoho.cn:28078/';
// const SERVICE_URL = 'http://testservice.yoho.cn:28077/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
/**
* 私钥列表
*
...
...
@@ -212,7 +216,6 @@ class Yohobuy
if
(
!
empty
(
$data
))
{
$str
=
http_build_query
(
$data
,
null
,
'&'
);
// 新加支持application/x-www-form-urlencoded调用方式
//curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt
(
$ch
,
CURLOPT_POSTFIELDS
,
$str
);
}
...
...
library/LibModels/Wap/Guang/PlusstarData.php
View file @
ce3ba5c
...
...
@@ -21,7 +21,7 @@ use LibModels\Wap\Product\SearchData;
class
PlusstarData
{
const
URI_BRANDLIST
=
'guang/api/v
1
/plustar/getlist'
;
const
URI_BRANDLIST
=
'guang/api/v
3
/plustar/getlist'
;
const
URI_BRANDINFO_PLUSSTAR
=
'guang/service/v3/plustar/'
;
// 'guang/service/v3/plustar/'
const
URI_BRANDINFO_FAVORITE
=
'shops/service/v1/favorite/'
;
const
URI_BRANDINFO_ARTICLE
=
'guang/service/v1/article/'
;
...
...
@@ -45,19 +45,20 @@ class PlusstarData
// 公共的参数
$param
=
Yohobuy
::
param
();
$param
[
'brand_type'
]
=
'1'
;
$param
[
'gender'
]
=
$gender
;
$param
[
'yh_channel'
]
=
$channel
;
// 构建推荐的品牌参数及调用接口的URL
$build
=
$param
;
$build
[
'is_recommend'
]
=
'1'
;
$build
[
'brand_type'
]
=
'4'
;
//$build['is_recommend'] = '1';
$build
[
'client_secret'
]
=
Sign
::
getSign
(
$build
);
$urlList
[
'recom'
]
=
Yohobuy
::
httpBuildQuery
(
$url
,
$build
);
// 构建所有的品牌参数及调用接口的URL
$build
=
$param
;
$build
[
'is_recommend'
]
=
'0'
;
$build
[
'brand_type'
]
=
'1'
;
//$build['is_recommend'] = '0';
$build
[
'client_secret'
]
=
Sign
::
getSign
(
$build
);
$urlList
[
'all'
]
=
Yohobuy
::
httpBuildQuery
(
$url
,
$build
);
...
...
library/Plugin/Helpers.php
View file @
ce3ba5c
...
...
@@ -517,6 +517,52 @@ class Helpers
}
/**
* 订单状态,按订单支付类型和订单状态
* @var array
*/
public
static
function
getOrderStatus
()
{
return
array
(
'1'
=>
array
(
//在线支付
0
=>
'待付款'
,
1
=>
'已付款'
,
2
=>
'已付款'
,
3
=>
'已付款'
,
4
=>
'已发货'
,
5
=>
'已发货'
,
6
=>
'交易成功'
),
'2'
=>
array
(
//货到付款
0
=>
'备货中'
,
1
=>
'已付款'
,
2
=>
'已付款'
,
3
=>
'已付款'
,
4
=>
'已发货'
,
5
=>
'已发货'
,
6
=>
'交易成功'
),
'3'
=>
array
(
//现金支付
0
=>
'待付款'
,
1
=>
'已付款'
,
2
=>
'已付款'
,
3
=>
'已付款'
,
4
=>
'已发货'
,
5
=>
'已发货'
,
6
=>
'交易成功'
),
'4'
=>
array
(
//抵消支付
0
=>
'待付款'
,
1
=>
'已付款'
,
2
=>
'已付款'
,
3
=>
'已付款'
,
4
=>
'已发货'
,
5
=>
'已发货'
,
6
=>
'交易成功'
)
);
}
/**
* 获取会员的级别
*
* @param string $vipInfo
...
...
static/js/me/address-act.js
View file @
ce3ba5c
...
...
@@ -101,6 +101,9 @@ $addressForm.on('submit', function() {
});
$submit
.
on
(
'touchend'
,
function
()
{
if
(
security
.
hasDangerInput
(
false
))
{
return
false
;
}
$input
.
blur
();
$addressForm
.
submit
();
return
false
;
...
...
static/js/me/address.js
View file @
ce3ba5c
...
...
@@ -6,12 +6,9 @@
var
$
=
require
(
'jquery'
),
tip
=
require
(
'../plugin/tip'
),
security
=
require
(
'../plugin/security'
),
loading
=
require
(
'../plugin/loading'
);
var
$action
=
$
(
'.action'
),
$addressForm
=
$
(
'.edit-address'
),
$submit
=
$
(
'.submit'
),
$addAddress
=
$
(
'.add-address'
),
$footer
=
$
(
'#yoho-footer'
),
$confim
=
$
(
'.confim-mask'
),
...
...
@@ -24,12 +21,13 @@ $pageWrap.first().css('min-height', function() {
});
window
.
rePosFooter
();
$confim
.
on
(
'touchend'
,
'.cancel'
,
function
()
{
$confim
.
on
(
'touchend'
,
'.cancel'
,
function
(
e
)
{
deleteId
=
null
;
$confim
.
hide
();
$confim
.
fadeOut
();
return
false
;
}).
on
(
'touchend'
,
'.confim'
,
function
()
{
loading
.
showLoadingMask
();
$confim
.
hide
();
$confim
.
fadeOut
();
$
.
ajax
({
method
:
'POST'
,
url
:
'/home/delAddress'
,
...
...
@@ -52,6 +50,7 @@ $confim.on('touchend', '.cancel', function() {
}).
always
(
function
()
{
deleteId
=
null
;
});
return
false
;
});
...
...
@@ -69,17 +68,5 @@ $addAddress.on('touchend', function() {
// 删除
$action
.
on
(
'touchend'
,
'.del'
,
function
()
{
deleteId
=
$
(
this
).
data
(
'id'
);
$confim
.
show
();
});
$submit
.
on
(
'touchend'
,
function
()
{
if
(
security
.
hasDangerInput
(
false
))
{
return
false
;
}
$addressForm
.
submit
();
return
false
;
}).
on
(
'touchstart'
,
function
()
{
$
(
this
).
addClass
(
'highlight'
);
}).
on
(
'touchend touchcancel'
,
function
()
{
$
(
this
).
removeClass
(
'highlight'
);
$confim
.
fadeIn
();
});
...
...
static/js/me/browse-record.js
View file @
ce3ba5c
...
...
@@ -108,13 +108,13 @@ $page.on('touchstart', '.del-icon', function() {
success
:
function
(
data
)
{
if
(
data
.
code
===
200
)
{
dialog
.
showDialog
({
dialogText
:
'删除浏览记录成功'
,
autoHide
:
2000
,
fast
:
true
});
dialogText
:
'删除浏览记录成功'
,
autoHide
:
2000
,
fast
:
true
});
setTimeout
(
function
()
{
window
.
history
.
go
(
0
);
},
20
00
);
},
12
00
);
}
}
});
...
...
static/js/me/order.js
View file @
ce3ba5c
...
...
@@ -37,7 +37,7 @@ function getOrders(option) {
page
:
order
.
page
+
1
};
var
show
=
option
&&
option
.
show
LoadingMask
;
var
show
=
option
&&
!
option
.
no
LoadingMask
;
if
(
inAjax
)
{
return
;
...
...
static/js/me/pay.js
View file @
ce3ba5c
...
...
@@ -3,7 +3,90 @@
* @author: 赵彪<bill.zhao@yoho.cn>
* @date: 2015/12/03
*/
var
loading
=
require
(
'../plugin/loading'
);
var
$
=
require
(
'jquery'
);
var
loading
=
require
(
'../plugin/loading'
),
Hammer
=
require
(
'yoho.hammer'
);
var
theOrderCode
=
document
.
getElementById
(
'ordercode'
).
value
;
var
wxPayEl
=
document
.
getElementById
(
'weixin'
),
wxHammer
=
wxPayEl
&&
new
Hammer
(
wxPayEl
);
var
appIconPosition
=
{
baidu
:
'-2.7rem'
,
weixin
:
'-1.2rem'
,
QQ
:
'-5.4rem'
,
bank
:
'-4'
};
//隐藏微信分享选项
if
(
window
.
wx
)
{
wx
.
hideOptionMenu
();
}
function
onBridgeReady
()
{
document
.
addEventListener
(
'WeixinJSBridgeReady'
,
function
()
{
window
.
WeixinJSBridge
&&
window
.
WeixinJSBridge
.
call
(
'hideOptionMenu'
);
});
}
if
(
typeof
WeixinJSBridge
===
undefined
)
{
if
(
document
.
addEventListener
)
{
document
.
addEventListener
(
'WeixinJSBridgeReady'
,
onBridgeReady
,
false
);
}
else
if
(
document
.
attachEvent
)
{
document
.
attachEvent
(
'WeixinJSBridgeReady'
,
onBridgeReady
);
document
.
attachEvent
(
'onWeixinJSBridgeReady'
,
onBridgeReady
);
}
onBridgeReady
();
}
else
{
onBridgeReady
();
}
//调用微信JS api 支付
function
jsApiCall
(
orderCode
,
jsApiParameters
)
{
//防止重复操作弹框
window
.
WeixinJSBridge
&&
window
.
WeixinJSBridge
.
invoke
(
'getBrandWCPayRequest'
,
jsApiParameters
,
function
(
res
)
{
window
.
location
.
href
=
'/home/orders/detail?order_code='
+
orderCode
;
}
);
}
//微信支付
function
callpay
(
orderCode
)
{
var
jsApiParameters
;
if
(
typeof
WeixinJSBridge
===
undefined
)
{
if
(
document
.
addEventListener
)
{
document
.
addEventListener
(
'WeixinJSBridgeReady'
,
jsApiCall
,
false
);
}
else
if
(
document
.
attachEvent
)
{
document
.
attachEvent
(
'WeixinJSBridgeReady'
,
jsApiCall
);
document
.
attachEvent
(
'onWeixinJSBridgeReady'
,
jsApiCall
);
}
}
else
{
$
.
ajax
({
type
:
'GET'
,
url
:
'/shopping/pay/wechatwapapi?order_code='
+
orderCode
,
dataType
:
'json'
,
success
:
function
(
res
)
{
if
(
res
.
code
===
200
)
{
jsApiParameters
=
res
.
data
.
jsApiParameters
;
jsApiCall
(
orderCode
,
jsApiParameters
);
}
else
{
alert
(
'微信支付调取失败'
);
}
},
error
:
function
()
{
alert
(
'请刷新本页面,完成微信支付'
);
}
});
}
}
function
isWXOpen
()
{
var
ua
=
navigator
.
userAgent
.
toLowerCase
();
...
...
@@ -32,39 +115,23 @@ function handleForWX() {
}
}
function
setIcon
(
div
,
appName
)
{
if
(
appName
.
indexOf
(
'百度'
)
!==
-
1
)
{
div
.
style
.
backgroundPositionY
=
'-2.7rem'
;
return
false
;
}
if
(
appName
.
indexOf
(
'微信'
)
!==
-
1
)
{
div
.
style
.
backgroundPositionY
=
'-1.2rem'
;
return
false
;
}
if
(
appName
.
indexOf
(
'银联'
)
!==
-
1
)
{
div
.
style
.
backgroundPositionY
=
'-4rem'
;
return
false
;
}
if
(
appName
.
indexOf
(
'QQ'
)
!==
-
1
)
{
div
.
style
.
backgroundPositionY
=
'-5.4rem'
;
return
false
;
}
function
setAppIcon
(
el
,
position
)
{
el
.
style
.
backgroundPositionY
=
position
;
}
function
loadIcon
()
{
var
boxs
=
document
.
getElementsByClassName
(
'box'
);
var
div
=
null
;
var
app
Name
=
null
;
var
app
id
=
null
;
[].
forEach
.
call
(
boxs
,
function
(
box
,
index
)
{
div
=
box
.
getElementsByClassName
(
'icon'
)[
0
].
getElementsByTagName
(
'div'
)[
0
];
if
(
div
)
{
appName
=
box
.
getElementsByClassName
(
'app'
)[
0
].
innerHTML
;
setIcon
(
div
,
appName
);
appid
=
box
.
getAttribute
(
'id'
);
if
(
appid
!==
'alipay'
)
{
setAppIcon
(
div
,
appIconPosition
[
appid
]);
}
}
});
}
...
...
@@ -75,6 +142,12 @@ function showPage() {
pageList
.
style
.
visibility
=
'visible'
;
}
if
(
wxHammer
)
{
wxHammer
.
on
(
'tap'
,
function
()
{
callpay
(
theOrderCode
);
});
}
function
main
()
{
handleForWX
();
loading
.
hideLoadingMask
();
...
...
static/js/passport/login/international.js
View file @
ce3ba5c
...
...
@@ -73,6 +73,8 @@ $loginBtn.on('touchstart', function() {
return
;
}
$loginBtn
.
text
(
'正在登录...'
).
addClass
(
'disable'
);
if
(
api
.
phoneRegx
[
areaCode
].
test
(
pn
)
&&
api
.
pwdValidate
(
pwd
))
{
$
.
ajax
({
type
:
'POST'
,
...
...
@@ -83,7 +85,8 @@ $loginBtn.on('touchstart', function() {
password
:
pwd
},
success
:
function
(
data
)
{
var
res
;
var
res
,
time
;
if
(
data
.
code
===
200
)
{
res
=
data
.
data
;
...
...
@@ -91,19 +94,32 @@ $loginBtn.on('touchstart', function() {
$
.
ajax
({
url
:
res
.
session
,
dataType
:
'jsonp'
dataType
:
'jsonp'
,
success
:
function
()
{
clearTimeout
(
time
);
//Cookie写入成功后,1s后跳转页面
setTimeout
(
function
()
{
location
.
href
=
res
.
href
;
},
1000
);
}
});
//2000ms后跳转页面
setTimeout
(
function
()
{
//3秒后强制跳转
time
=
setTimeout
(
function
()
{
location
.
href
=
res
.
href
;
},
2000
);
},
3000
);
showErrTip
(
'登录成功'
);
}
else
{
showErrTip
(
data
.
message
);
}
},
error
:
function
()
{
showErrTip
(
'网络断开连接啦~'
);
},
complete
:
function
()
{
$loginBtn
.
text
(
'登录'
).
removeClass
(
'disable'
);
}
});
}
else
{
...
...
static/js/passport/login/login.js
View file @
ce3ba5c
...
...
@@ -76,6 +76,8 @@ $loginBtn.on('touchstart', function() {
return
;
}
$loginBtn
.
text
(
'正在登录...'
).
addClass
(
'disable'
);
//验证账号(数字或者邮箱)和密码合理性
if
((
/^
[
0-9
]
+$/
.
test
(
acc
)
||
api
.
emailRegx
.
test
(
acc
))
&&
api
.
pwdValidate
(
pwd
))
{
$
.
ajax
({
...
...
@@ -86,28 +88,40 @@ $loginBtn.on('touchstart', function() {
password
:
pwd
},
success
:
function
(
data
)
{
var
res
;
var
res
,
time
;
if
(
data
.
code
===
200
)
{
res
=
data
.
data
;
showErrTip
(
'登录成功'
);
$
.
ajax
({
url
:
res
.
session
,
dataType
:
'jsonp'
dataType
:
'jsonp'
,
success
:
function
()
{
clearTimeout
(
time
);
//Cookie写入成功后,1s后跳转页面
setTimeout
(
function
()
{
location
.
href
=
res
.
href
;
},
1000
);
}
});
//2s后跳转页面
setTimeout
(
function
()
{
//3秒后强制跳转
time
=
setTimeout
(
function
()
{
location
.
href
=
res
.
href
;
},
2000
);
},
3000
);
showErrTip
(
'登录成功'
);
}
else
{
showErrTip
(
data
.
message
);
}
},
error
:
function
()
{
showErrTip
(
'网络断开连接啦~'
);
},
complete
:
function
()
{
$loginBtn
.
text
(
'登录'
).
removeClass
(
'disable'
);
}
});
}
else
{
...
...
static/js/product/detail/comments-consults.js
View file @
ce3ba5c
...
...
@@ -10,7 +10,14 @@ var $ = require('jquery'),
var
commentsNum
,
consultsNum
;
var
consultFooterEle
=
document
.
getElementById
(
'consult-content-footer'
),
consultFooterHammer
=
consultFooterEle
&&
new
Hammer
(
consultFooterEle
);
consultFooterHammer
=
consultFooterEle
&&
new
Hammer
(
consultFooterEle
),
navtabEle
=
document
.
getElementById
(
'nav-tab'
),
navtabHammer
=
navtabEle
&&
new
Hammer
(
navtabEle
),
gotoConsultEle
=
document
.
getElementById
(
'goto-consult'
),
gotoConsultHammer
=
gotoConsultEle
&&
new
Hammer
(
gotoConsultEle
);
(
function
()
{
...
...
@@ -36,29 +43,38 @@ var consultFooterEle = document.getElementById('consult-content-footer'),
})();
$
(
'#nav-tab li'
).
on
(
'touchend'
,
function
()
{
var
index
=
$
(
this
).
index
();
if
(
navtabHammer
)
{
navtabHammer
.
on
(
'tap'
,
function
(
e
)
{
var
$this
=
$
(
e
.
target
).
closest
(
'li'
);
var
index
=
$this
.
index
();
if
(
$
(
this
).
hasClass
(
'comment-nav'
)
&&
0
===
commentsNum
)
{
tip
.
show
(
'暂无商品评价'
);
}
else
{
if
(
!
$
(
this
).
hasClass
(
'focus'
))
{
if
(
$this
.
hasClass
(
'comment-nav'
)
&&
0
===
commentsNum
)
{
tip
.
show
(
'暂无商品评价'
);
}
else
{
if
(
!
$this
.
hasClass
(
'focus'
))
{
$
(
'#nav-tab li'
).
each
(
function
()
{
$
(
this
).
removeClass
(
'focus'
);
});
$
(
'#feedback-content .content'
).
each
(
function
()
{
$
(
this
).
addClass
(
'hide'
);
});
$
(
'#nav-tab li'
).
each
(
function
()
{
$
(
this
).
removeClass
(
'focus'
);
});
$
(
'#feedback-content .content'
).
each
(
function
()
{
$
(
this
).
addClass
(
'hide'
);
});
$
(
this
).
addClass
(
'focus'
);
$
(
'#feedback-content .content:eq('
+
index
+
')'
).
removeClass
(
'hide'
);
$this
.
addClass
(
'focus'
);
$
(
'#feedback-content .content:eq('
+
index
+
')'
).
removeClass
(
'hide'
);
}
}
}
});
});
}
if
(
consultFooterHammer
)
{
consultFooterHammer
.
on
(
'tap'
,
function
()
{
location
.
href
=
$
(
consultFooterEle
).
find
(
'a'
).
attr
(
'href'
);
});
}
if
(
gotoConsultHammer
)
{
gotoConsultHammer
.
on
(
'tap'
,
function
()
{
location
.
href
=
$
(
gotoConsultEle
).
find
(
'a'
).
attr
(
'href'
);
});
}
\ No newline at end of file
...
...
static/js/product/newsale/hot-rank.js
View file @
ce3ba5c
...
...
@@ -38,11 +38,14 @@ function hotrank(page, sort, tabId, notab) {
}
}
else
{
$
(
'.no-result'
).
remove
();
$
(
'.rank-main'
).
remove
();
if
(
page
===
1
)
{
$
(
'.rank-main'
).
remove
();
}
$
(
'#hotRank'
).
append
(
data
);
}
lazyLoad
(
$
(
'img.lazy'
));
$
(
'.rank-main ul li:gt(
2
)'
).
find
(
'.item-content i'
).
removeClass
(
'top'
);
$
(
'.rank-main ul li:gt(
9
)'
).
find
(
'.item-content i'
).
removeClass
(
'top'
);
winH
=
$
(
window
).
height
();
if
(
$
(
'.rank-main'
).
length
!==
0
)
{
$
(
'#yoho-footer'
).
css
(
'position'
,
'static'
);
...
...
static/sass/me/_coupons.scss
View file @
ce3ba5c
...
...
@@ -47,14 +47,15 @@
font-size
:
50px
;
}
p
{
width
:
5
5
.517241%
;
width
:
5
9
.517241%
;
height
:
auto
;
padding
:
0
5%
18
em
/
$pxConvertRem
;
margin
:
0
3%
16
em
/
$pxConvertRem
;
float
:
left
;
&
:first-of-type
{
padding
-top
:
0
.75rem
;
margin
-top
:
0
.75rem
;
font-size
:
18px
;
height
:
76rem
/
$pxConvertRem
;
height
:
auto
;
min-height
:
42px
;
display
:
-
webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
...
...
static/sass/me/_fav.scss
View file @
ce3ba5c
...
...
@@ -310,7 +310,6 @@
line-height
:
pxToRem
(
65px
);
text-align
:
center
;
font-size
:
pxToRem
(
22px
);
color
:
#fff
;
.price-discount
{
span
{
...
...
static/sass/me/_pay.scss
View file @
ce3ba5c
...
...
@@ -9,23 +9,30 @@
border
:
1px
solid
#eee
;
border-radius
:
10rem
/
$pxConvertRem
;
padding
:
(
12rem
/
$pxConvertRem
)
(
20rem
/
$pxConvertRem
);
display
:
flex
;
align-items
:
center
;
margin-bottom
:
20rem
/
$pxConvertRem
;
@include
flexbox
((
display
:
box
,
box-align
:
center
)
,
$version
:
1
);
@include
flexbox
((
display
:
flex
,
align-items
:
center
));
>
div
{
min-height
:
40rem
/
$pxConvertRem
;
display
:
flex
;
align-items
:
center
;
@include
flexbox
((
box-flex
:
1
,
display
:
box
,
bax-align
:
center
)
,
$version
:
1
);
@include
flexbox
((
display
:
flex
,
align-items
:
center
));
}
.icon
{
width
:
15%
;
@include
flexbox
((
flex-basis
:
15%
));
img
{
width
:
60rem
/
$pxConvertRem
;
margin
:
0
;
}
>
div
{
width
:
60rem
/
$pxConvertRem
;
height
:
60rem
/
$pxConvertRem
;
...
...
@@ -39,19 +46,29 @@
.app
{
width
:
40%
;
@include
flexbox
((
flex-basis
:
40%
));
font-size
:
32rem
/
$pxConvertRem
;
color
:
#414141
;
}
.hint
{
width
:
40%
;
@include
flexbox
((
flex-basis
:
40%
));
font-size
:
24rem
/
$pxConvertRem
;
color
:
#4b4b4b
;
}
.iconfont
{
width
:
5%
;
justify-content
:
flex-end
;
@include
flexbox
((
box-pack
:
end
)
,
$version
:
1
);
@include
flexbox
((
flex-basis
:
5%
,
justify-content
:
flex-end
));
color
:
#e0e0e0
;
font-size
:
28rem
/
$pxConvertRem
;
}
...
...
static/sass/me/_personal-details.scss
View file @
ce3ba5c
...
...
@@ -53,8 +53,8 @@
display
:
block
;
position
:
relative
;
i
{
width
:
80rem
/
$pxConvertRem
;
height
:
30rem
/
$pxConvertRem
;
width
:
72rem
/
$pxConvertRem
;
height
:
32rem
/
$pxConvertRem
;
overflow
:
hidden
;
display
:
block
;
position
:
absolute
;
...
...
static/sass/me/_vip-grade.scss
View file @
ce3ba5c
...
...
@@ -13,21 +13,28 @@
.basic-info
{
padding-top
:
30rem
/
$pxConvertRem
;
padding-bottom
:
25rem
/
$pxConvertRem
;
p
{
width
:
100%
;
height
:
auto
;
overflow
:
hidden
;
display
:
block
;
}
span
{
float
:
left
;
overflow
:
hidden
;
}
.user-name
{
max-width
:
240rem
/
$pxConvertRem
;
text-overflow
:ellipsis
;
white-space
:nowrap
;
font-size
:
25rem
/
$pxConvertRem
;
margin-right
:
0
.5rem
;
display
:
inline-block
;
overflow
:
hidden
;
}
.vip-icon
{
display
:
inline-block
;
width
:
pxToRem
(
72px
);
height
:
pxToRem
(
32px
);
vertical-align
:
sub
;
line-height
:
36rem
/
$pxConvertRem
;
}
.vip-3
{
...
...
static/sass/product/_detail.scss
View file @
ce3ba5c
...
...
@@ -33,6 +33,11 @@ $basicBtnC:#eb0313;
line-height
:
pxToRem
(
36px
);
&
.table
{
@include
flexbox
((
display
:
box
,
box-lines
:
multiple
,
box-pack
:
start
)
,
$version
:
1
);
@include
flexbox
((
display
:
flex
,
flex-wrap
:
wrap
,
justify-content
:
flex-start
...
...
@@ -42,11 +47,17 @@ $basicBtnC:#eb0313;
box-sizing
:
border-box
;
//padding: pxToRem(20px) pxToRem(12px);
padding
:
4%
3%
;
//width: 50
%;
width
:
49
.9
%
;
border-bottom
:
pxToRem
(
4px
)
solid
#fff
;
border-right
:
pxToRem
(
4px
)
solid
#fff
;
font-size
:
pxToRem
(
24px
);
background-color
:
$tableCellC
;
word-wrap
:
break-word
;
@include
flexbox
((
box-flex
:
1
.0
,
display
:
box
,
box-align
:
center
)
,
$version
:
1
);
@include
flexbox
((
display
:
flex
,
align-items
:
center
,
...
...
static/sass/product/_hot-rank.scss
View file @
ce3ba5c
...
...
@@ -54,6 +54,8 @@
margin
:
(
15rem
/
$pxConvertRem
)
0
0
!
important
;
padding
:
0
!
important
;
width
:
9
.5rem
;
max-height
:
72rem
/
$pxConvertRem
;
overflow
:
hidden
;
line-height
:
36rem
/
$pxConvertRem
;
color
:
#444
;
font-size
:
28rem
/
$pxConvertRem
;
...
...
static/sass/product/_product-description.scss
View file @
ce3ba5c
...
...
@@ -2,12 +2,7 @@
.goods-desc
{
padding-bottom
:
pxToRem
(
20px
);
padding-top
:
pxToRem
(
20px
);
&
.page-block
{
.table
{
display
:
flex
;
flex-wrap
:
wrap
;
}
}
.service
{
width
:
pxToRem
(
494px
);
height
:
pxToRem
(
28px
);
...
...
@@ -48,6 +43,10 @@
.material-item
{
margin
:
pxToRem
(
10px
)
0
;
@include
flexbox
((
display
:
box
,
box-align
:
center
)
,
$version
:
1
);
@include
flexbox
((
display
:
flex
,
align-items
:
center
));
...
...
@@ -56,6 +55,12 @@
margin
:
0
;
}
.material-image
{
width
:
23%
;
@include
flexbox
((
box-flex
:
1
.0
,
display
:
box
,
box-pack
:
center
)
,
$version
:
1
);
@include
flexbox
((
display
:
flex
,
flex-basis
:
23%
,
...
...
@@ -70,6 +75,12 @@
height
:
auto
;
line-height
:
pxToRem
(
38px
);
color
:
#4b4b4b
;
word-wrap
:
break-word
;
width
:
76
.9
;
@include
flexbox
((
box-flex
:
1
.0
,
display
:
box
)
,
$version
:
1
);
@include
flexbox
((
display
:
flex
,
flex-basis
:
76
.9%
...
...
template/m.yohobuy.com/actions/index/home/coupon_list.phtml
View file @
ce3ba5c
{
{#coupons
}
}
<div
class=
"employ-main"
style=
"background-image:url('{{coupon_pic}}')"
>
<div
class=
"employ-main"
>
<span>
{
{
money
}
}</span>
<p
class=
"coupon-name"
>
{
{
coupon_name
}
}</p>
<p>有效期:
{
{
couponValidity
}
}</p>
...
...
template/m.yohobuy.com/actions/index/home/pay.phtml
View file @
ce3ba5c
{
{>
layout/header
}
}
<div
class=
"pay-page yoho-page"
>
{
{#if
orderCode
}
}
<input
id='ordercode'
type=
"hidden"
value=
"{{orderCode}}"
>
{
{/if
}
}
<div
class=
"payapp-list"
>
{
{#
payAppInfo
}
}
{
{#
payAppInfo
}
}
{
{#if
payLink
}
}
<a
href=
"{{payLink}}"
>
<div
class=
"box"
>
{
{/if
}
}
<div
class=
"box"
id=
"{{appId}}"
>
<div
class=
"icon"
>
{
{#if
appIcon
}
}
<img
src=
"{{appIcon}}"
alt=
"app图标"
>
...
...
@@ -21,7 +26,9 @@
</div>
<div
class=
"iconfont"
>
604
</div>
</div>
{
{#if
payLink
}
}
</a>
{
{/if
}
}
{
{/
payAppInfo
}
}
</div>
</div>
...
...
template/m.yohobuy.com/actions/product/detail/consults.phtml
View file @
ce3ba5c
{
{>
layout/header
}
}
<div
class=
"goods-consults-page yoho-page"
>
<div
class=
"goto-consult"
>
<i
class=
"iconfont consult-logo"
>
639
;</i>
<span>我要咨询</span>
<a
href=
"{{link}}"
class=
"iconfont enter-consult-page"
>
604
;</a>
</div>
<div
class=
"goto-consult"
id=
"goto-consult"
>
<i
class=
"iconfont consult-logo"
>
639
;</i>
<span>我要咨询</span>
<a
href=
"{{link}}"
class=
"iconfont enter-consult-page"
>
604
;</a>
</div>
{
{#
consults
}
}
<div
class=
"goods-consults"
id=
"goods-consults"
>
{
{#list
}
}
...
...
template/m.yohobuy.com/actions/product/newsale/hotlist.phtml
View file @
ce3ba5c
...
...
@@ -21,7 +21,7 @@
</div>
<div
class=
"item-content"
>
<i
class=
"rank-icon top"
>
{
{rank
}
}</i>
<h
2
{
{#
active
}
}class=
"hasActive"
{
{/
activ
e
}
}>
{
{name
}
}</h
2
>
<h
2
{
{#
sales_phrase
}
}class=
"hasActive"
{
{/
sales_phras
e
}
}>
{
{name
}
}</h
2
>
{
{#
active
}
}
<p>
{
{.
}
}</p>
{
{/
active
}
}
...
...
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
ce3ba5c
...
...
@@ -30,7 +30,7 @@ class HomeController extends AbstractAction
{
$uid
=
$this
->
getUid
(
$useSession
);
if
(
!
$uid
)
{
$this
->
go
(
Helpers
::
url
(
'/signin.html'
,
array
(
'refer'
=>
$this
->
server
(
'HTTP_REFERER'
,
'/'
))));
$this
->
go
(
Helpers
::
url
(
'/signin.html'
,
array
(
'refer'
=>
$this
->
server
(
'HTTP_REFERER'
,
SITE_MAIN
))));
}
}
...
...
@@ -642,7 +642,7 @@ class HomeController extends AbstractAction
$this
->
auditJumpLogin
();
$backUrl
=
Helpers
::
url
(
'/home'
);
$this
->
setTitle
(
'我的订单'
);
$this
->
setNavHeader
(
'我的订单'
,
$backUrl
);
...
...
@@ -780,13 +780,14 @@ class HomeController extends AbstractAction
$this
->
setTitle
(
'支付中心'
);
$this
->
setNavHeader
(
'支付中心'
);
$orderCode
=
$this
->
get
(
'order_code'
);
if
(
empty
(
$orderCode
))
{
$this
->
error
();
}
$this
->
_view
->
display
(
'pay'
,
array
(
'payCenterPage'
=>
true
,
'payAppInfo'
=>
array
(
0
=>
array
(
'appIcon'
=>
''
,
...
...
@@ -806,6 +807,7 @@ class HomeController extends AbstractAction
),
),
'orderCode'
=>
$orderCode
,
'hasWxShare'
=>
strpos
(
$this
->
_request
->
server
(
'HTTP_USER_AGENT'
,
''
),
'MicroMessenger'
)
!==
false
));
}
...
...
yohobuy/m.yohobuy.com/application/models/Guang/Plusstar.php
View file @
ce3ba5c
...
...
@@ -51,7 +51,7 @@ class PlusstarModel
}
$result
=
array
();
$brandList
=
PlusstarData
::
firstBrandList
(
$gender
,
$channel
);
$brandList
=
PlusstarData
::
firstBrandList
(
$gender
,
$channel
);
if
(
!
empty
(
$brandList
[
'recom'
][
'data'
][
'list'
][
0
][
'data'
]))
{
$result
[
'ps'
][
'star'
]
=
self
::
formatData
(
$brandList
[
'recom'
][
'data'
][
'list'
][
0
][
'data'
],
$gender
,
true
);
//$result['ps']['sName'] = isset($brandList['recom']['data']['brand_type_name']) ? $brandList['recom']['data']['brand_type_name'] : '';
...
...
@@ -107,7 +107,7 @@ class PlusstarModel
}
$result
=
array
();
$brandList
=
PlusstarData
::
brandList
(
$gender
,
$channel
);
$brandList
=
PlusstarData
::
brandList
(
$gender
,
$channel
);
if
(
!
empty
(
$brandList
[
'star'
][
'data'
][
'list'
][
0
][
'data'
]))
{
$result
[
'ps'
][
'star'
]
=
self
::
formatData
(
$brandList
[
'star'
][
'data'
][
'list'
][
0
][
'data'
],
$gender
,
false
);
//$result['ps']['pName'] = isset($brandList['star']['data']['brand_type_name']) ? $brandList['star']['data']['brand_type_name'] : '';
...
...
yohobuy/m.yohobuy.com/application/models/Home/Order.php
View file @
ce3ba5c
...
...
@@ -61,17 +61,23 @@ class OrderModel
{
$result
=
array
();
//调用接口获得数据
$data
=
OrderData
::
getOrderData
(
$type
,
$page
,
$limit
,
$gender
,
$yh_channel
,
$uid
);
$data
=
OrderData
::
getOrderData
(
$type
,
$page
,
$limit
,
$gender
,
$yh_channel
,
$uid
);
// 判断是否还有数据, 没有数据则返回空
if
(
isset
(
$data
[
'data'
][
'page_total'
])
&&
$page
>
$data
[
'data'
][
'page_total'
])
{
return
$result
;
}
//检查数据返回是否正常,正常则处理数据
if
(
!
empty
(
$data
[
'data'
][
'order_list'
]))
{
// 订单的状态列表
$orderStatus
=
Helpers
::
getOrderStatus
();
foreach
(
$data
[
'data'
][
'order_list'
]
as
$key
=>
$vo
)
{
if
(
$vo
[
'payment_status'
]
==
'Y'
&&
$vo
[
'status'
]
==
0
)
{
$vo
[
'status'
]
=
1
;
}
//订单号,支付状态,订单商品数量,订单总价格
$result
[
$key
][
'orderNum'
]
=
$vo
[
'order_code'
];
$result
[
$key
][
'orderStatus'
]
=
(
$vo
[
'is_cancel'
]
===
'Y'
)
?
'已取消'
:
$
vo
[
'status_str'
];
$result
[
$key
][
'orderStatus'
]
=
(
$vo
[
'is_cancel'
]
===
'Y'
)
?
'已取消'
:
$
orderStatus
[
$vo
[
'payment_type'
]
][
$vo
[
'status'
]
];
$result
[
$key
][
'count'
]
=
count
(
$vo
[
'order_goods'
]);
$result
[
$key
][
'sumCost'
]
=
$vo
[
'amount'
];
//类内调用格式化订单商品数据方法
...
...
yohobuy/m.yohobuy.com/application/models/Index/Home.php
View file @
ce3ba5c
...
...
@@ -27,7 +27,7 @@ class HomeModel
/* 女生楼层资源的位置码 */
const
CODE_FLOOR_GIRLS
=
'189b6686065dbd6755dd6906cf03c002'
;
/* 潮童楼层资源的位置码 */
const
CODE_FLOOR_KIDS
=
'
66cad79d93e055ad6fc5c8744086066d
'
;
// '66cad79d93e055ad6fc5c8744086066d';
const
CODE_FLOOR_KIDS
=
'
b8c1bff53d4ea60f978926d538620636
'
;
// '66cad79d93e055ad6fc5c8744086066d';
/* 创意生活楼层资源的位置码 */
const
CODE_FLOOR_LIFESTYLE
=
'61cd852c6afcf60660196154f66a3a62'
;
...
...
yohobuy/m.yohobuy.com/application/models/Index/User.php
View file @
ce3ba5c
...
...
@@ -251,7 +251,7 @@ class UserModel
$product
[
'link'
]
=
isset
(
$one
[
'goods'
][
0
])
?
Helpers
::
url
(
'/product/pro_'
.
$one
[
'product_id'
]
.
'_'
.
$one
[
'goods'
][
0
][
'id'
]
.
'/'
.
$one
[
'cnAlphabet'
]
.
'.html'
)
:
''
;
$product
[
'imgUrl'
]
=
(
isset
(
$one
[
'default_images'
])
&&
!
empty
(
$one
[
'default_images'
]))
?
Images
::
getImageUrl
(
$one
[
'default_images'
],
235
,
314
)
:
''
;
$product
[
'price'
]
=
!
empty
(
$one
[
'market_price'
])
?
'¥'
.
$one
[
'market_price'
]
:
0
;
$product
[
'discount'
]
=
!
empty
(
$one
[
'sales_price'
])
?
'¥'
.
$one
[
'sales_price'
]
:
0
;
$product
[
'discount'
]
=
(
$one
[
'market_price'
]
>
$one
[
'sales_price'
])
?
'¥'
.
$one
[
'sales_price'
]
:
false
;
$brand
[
'productList'
][]
=
$product
;
}
...
...
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
View file @
ce3ba5c
...
...
@@ -42,7 +42,7 @@ class DetailModel
if
(
isset
(
$baseInfo
[
'productName'
]))
{
$result
[
'goodsName'
]
=
$baseInfo
[
'productName'
];
}
// 商品促销短语
if
(
!
empty
(
$baseInfo
[
'salesPhrase'
]))
{
$result
[
'goodsSubtitle'
]
=
$baseInfo
[
'salesPhrase'
];
...
...
@@ -211,12 +211,14 @@ class DetailModel
// 悬浮的购物车信息
$result
[
'cartInfo'
]
=
array
(
'cartUrl'
=>
Helpers
::
url
(
'/cart/index/index'
,
null
),
// 购物车链接
'addToCartUrl'
=>
Helpers
::
url
(
'/product/buy_'
.
$productId
.
'_'
.
$goodsId
.
'.html'
),
// 加入购物车链接
'numInCart'
=>
0
,
'goodsInstore'
=>
$baseInfo
[
'storage'
],
// 库存量
'soldOut'
=>
$baseInfo
[
'storage'
]
==
0
,
// 已售磬
'notForSale'
=>
$baseInfo
[
'attribute'
]
==
2
,
// 非卖品
);
if
(
!
$result
[
'cartInfo'
][
'soldOut'
]
&&
!
$result
[
'cartInfo'
][
'notForSale'
])
{
$result
[
'cartInfo'
][
'addToCartUrl'
]
=
Helpers
::
url
(
'/product/buy_'
.
$productId
.
'_'
.
$goodsId
.
'.html'
);
// 加入购物车链接
}
// 是否收藏
$result
[
'isCollect'
]
=
false
;
...
...
@@ -289,24 +291,23 @@ class DetailModel
$boyReference
=
!
empty
(
$sizeInfo
[
'productExtra'
][
'boyReference'
]);
$girlReference
=
!
empty
(
$sizeInfo
[
'productExtra'
][
'girlReference'
]);
$gender
=
isset
(
$sizeInfo
[
'gender'
])
?
$sizeInfo
[
'gender'
]
:
3
;
$referenceName
=
'参考尺码'
;
if
((
$gender
==
1
&&
$boyReference
)
||
(
$gender
==
2
&&
$girlReference
)
)
{
$referenceName
=
'参考尺码'
;
if
((
$gender
==
1
&&
$boyReference
)
||
(
$gender
==
2
&&
$girlReference
))
{
$referenceName
=
'参考尺码'
;
}
elseif
(
$gender
==
3
&&
$boyReference
)
{
}
elseif
(
$gender
==
3
&&
$boyReference
)
{
$referenceName
=
'参考尺码(男)'
;
}
elseif
(
$gender
==
3
&&
$girlReference
)
{
}
elseif
(
$gender
==
3
&&
$girlReference
)
{
$referenceName
=
'参考尺码(女)'
;
}
$sizeNameList
=
array
(
0
=>
array
(
'param'
=>
'吊牌尺码'
));
// 尺码名称
$referenceList
=
array
();
// 判断是否显示参考尺码
$showReference
=
!
empty
(
$sizeInfo
[
'sizeInfoBo'
][
'sizeBoList'
][
0
][
'referenceSize'
]);
$showReference
=
!
empty
(
$sizeInfo
[
'sizeInfoBo'
][
'sizeBoList'
][
0
][
'referenceSize'
])
&&
(
$sizeInfo
[
'sizeInfoBo'
][
'sizeBoList'
][
0
][
'referenceSize'
][
'gender'
]
==
$gender
||
$sizeInfo
[
'sizeInfoBo'
][
'sizeBoList'
][
0
][
'referenceSize'
][
'gender'
]
==
3
)
;
if
(
$showReference
)
{
$
sizeNameList
[
1
]
=
array
(
'param'
=>
$referenceName
);
$
referenceList
[
0
]
=
array
(
'param'
=>
$referenceName
);
}
$referenceList
=
array
();
$sizeNameList
=
array
(
0
=>
array
(
'param'
=>
'吊牌尺码'
));
// 尺码名称
$sizeBoGroup
=
array
();
// 尺码按ID分组
foreach
(
$sizeInfo
[
'sizeInfoBo'
][
'sizeAttributeBos'
]
as
$attr
)
{
$sizeBoGroup
[
$attr
[
'id'
]][
0
]
=
array
(
'param'
=>
$attr
[
'attributeName'
]);
...
...
@@ -416,6 +417,7 @@ class DetailModel
'\r\n\t'
=>
''
,
'</p>'
=>
''
,
'<img src='
=>
"<img class=
\"
lazy
\"
src=
\"
data:image/gif;base64,R0lGODlhAQABAJEAAAAAAP///93d3f///yH5BAEAAAMALAAAAAABAAEAAAICVAEAOw==
\"
data-original="
,
'<img border="0" src='
=>
"<img border=
\"
0
\"
class=
\"
lazy
\"
src=
\"
data:image/gif;base64,R0lGODlhAQABAJEAAAAAAP///93d3f///yH5BAEAAAMALAAAAAABAAEAAAICVAEAOw==
\"
data-original="
,
)),
);
}
...
...
yohobuy/m.yohobuy.com/application/models/Product/Newsale.php
View file @
ce3ba5c
...
...
@@ -23,16 +23,16 @@ class NewsaleModel
/* 男生频道取新品到着及折扣专区数据的位置码 */
const
CODE_TOP_NEW_BOYS
=
'3cf2c1be5217fbab6009ce83959e1e12'
;
const
CODE_TOP_SALE_BOYS
=
'
e9c9be32d72e2906d404a72ee24cb523
'
;
const
CODE_TOP_SALE_BOYS
=
'
153180b9a88c0b565848850c523bb637
'
;
/* 女生频道取新品到着及折扣专区数据的位置码 */
const
CODE_TOP_NEW_GIRLS
=
'1cf7f9f10e2a2670e73d05c568793ad9'
;
const
CODE_TOP_SALE_GIRLS
=
'
785c0e6aab746949073c4ffb9d5106ac
'
;
const
CODE_TOP_SALE_GIRLS
=
'
0b2d133419a0f7c381306fd3522365e1
'
;
/* 潮童频道取新品到着及折扣专区数据的位置码 */
const
CODE_TOP_NEW_KIDS
=
'57457adececa6c748b29c90cad0ae940'
;
const
CODE_TOP_SALE_KIDS
=
'
ad1bb67a6007819c86f737d74172fd2e
'
;
const
CODE_TOP_SALE_KIDS
=
'
de23648d28ee1e8a3f087a9dbac506f8
'
;
/* 创意生活频道取新品到着及折扣专区数据的位置码 */
const
CODE_TOP_NEW_LIFESTYLE
=
'04953a61cbf1db426a681e55d496d2fe'
;
const
CODE_TOP_SALE_LIFESTYLE
=
'
8132c7db3adbeb7b0d0002de9691c753
'
;
const
CODE_TOP_SALE_LIFESTYLE
=
'
01269e498ff5b07756e0733ec0e88c75
'
;
/**
* 获取新品到着的焦点图资源数据
...
...
Please
register
or
login
to post a comment