Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
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
Email Patches
Plain Diff
Browse Files
Authored by
陈轩
8 years ago
Commit
6fe0aa69d9cd357dde5c6e200f0bc95ed4814dc5
1 parent
18523d12
秒杀列表 ajax 404 错误提示
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
27 deletions
apps/passport/models/phone-service.js
apps/product/controllers/seckill.js
public/js/product/seckill.page.js
apps/passport/models/phone-service.js
View file @
6fe0aa6
...
...
@@ -28,18 +28,6 @@ class PhoneService {
// 发送 验证码
// http://git.yoho.cn/yoho-documents/api-interfaces/blob/master/个人中心/验证码登录/发送验证码.md
static
sendSMS
(
mobile
,
area
,
type
)
{
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
resolve
({
alg
:
'SALT_MD5'
,
code
:
200
,
data
:
{},
md5
:
'6d729d4b35f10fc73531210bd7ecff91'
,
message
:
'发送成功.'
});
});
}
return
API
.
get
(
''
,
{
method
:
'app.message.sendSms'
,
mobile
,
...
...
@@ -51,20 +39,6 @@ class PhoneService {
// 校验 验证码
// http://git.yoho.cn/yoho-documents/api-interfaces/blob/master/个人中心/验证码登录/验证验证码.md
static
verifySMS
(
mobile
,
area
,
code
,
type
)
{
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
resolve
({
alg
:
'SALT_MD5'
,
code
:
200
,
data
:
{
is_pass
:
'Y'
},
md5
:
'6d729d4b35f10fc73531210bd7ecff91'
,
message
:
'发送成功.'
});
});
}
return
API
.
get
(
''
,
{
method
:
'app.message.verifySmsCode'
,
mobile
,
...
...
apps/product/controllers/seckill.js
View file @
6fe0aa6
...
...
@@ -128,9 +128,10 @@ const index = (req, res, next) => {
return
seckillModel
.
queryActivity
().
then
((
resultActivity
)
=>
{
// console.log(resultActivity)
let
focusIndex
=
false
;
// let nowTime = Date.now();
if
(
!
resultActivity
.
data
)
{
return
next
();
return
next
();
}
result
.
currentTime
=
resultActivity
.
data
.
currentTime
*
1000
;
if
(
resultActivity
.
code
!==
200
)
{
...
...
public/js/product/seckill.page.js
View file @
6fe0aa6
...
...
@@ -417,6 +417,12 @@ seckillObj = {
})
.
error
(
function
()
{
self
.
$container
.
replaceWith
(
self
.
pageTemplate
({
error
:
'系统繁忙.....'
,
isApp
:
yoho
.
isApp
})
);
})
.
always
(
function
()
{
loading
.
hide
();
...
...
Please
register
or
login
to post a comment