Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
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
zhangxiaoru
8 years ago
Commit
05e88c58a7f2769e63eddf3b11459439447da5d1
1 parent
5bdbc621
埋点 延迟发送
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
54 deletions
static/js/cart/cart.js
static/js/cart/invoice-info.js
static/js/cart/order-ensure.js
static/js/cart/cart.js
View file @
05e88c5
...
...
@@ -202,13 +202,17 @@ $('.btn-balance').on('touchend', function() {
productId
.
push
(
$
(
this
).
data
(
'id'
));
});
window
.
_yas
.
sendCustomInfo
({
op
:
'YB_SC_TOBUY_CLICK'
,
param
:
JSON
.
stringify
({
C_ID
:
C_ID
,
PRD_ID
:
productId
.
join
(
','
),
})
},
true
);
setTimeout
(
function
()
{
if
(
window
.
_yas
&&
window
.
_yas
.
sendCustomInfo
)
{
window
.
_yas
.
sendCustomInfo
({
op
:
'YB_SC_TOBUY_CLICK'
,
param
:
JSON
.
stringify
({
C_ID
:
C_ID
,
PRD_ID
:
productId
.
join
(
','
),
})
},
true
);
}
},
200
);
}
if
(
shouldLowStocks
())
{
...
...
@@ -260,10 +264,12 @@ if ($('.invalid-goods').find('.shopping-cart-good').length === 0) {
}
$
(
function
()
{
if
(
window
.
_yas
&&
window
.
_yas
.
sendCustomInfo
)
{
window
.
_yas
.
sendCustomInfo
({
op
:
'YB_SC'
,
param
:
JSON
.
stringify
({
C_ID
:
C_ID
})
},
true
);
}
setTimeout
(
function
()
{
if
(
window
.
_yas
&&
window
.
_yas
.
sendCustomInfo
)
{
window
.
_yas
.
sendCustomInfo
({
op
:
'YB_SC'
,
param
:
JSON
.
stringify
({
C_ID
:
C_ID
})
},
true
);
}
},
200
);
});
\ No newline at end of file
...
...
static/js/cart/invoice-info.js
View file @
05e88c5
...
...
@@ -168,17 +168,19 @@ $company.on('input', function() {
// 确认及返回事件
$
(
'.confirm-btn, .nav-back'
).
on
(
'touchstart'
,
function
(
e
)
{
if
(
window
.
_yas
&&
window
.
_yas
.
sendCustomInfo
)
{
window
.
_yas
.
sendCustomInfo
({
op
:
'YB_SC_INVOICE_INFO_SAVE'
,
param
:
JSON
.
stringify
({
C_ID
:
C_ID
,
INVOICE_TYPE
:
$invoiceType
.
find
(
'.on'
).
data
(
'id'
),
INVOICE_TITLE
:
$
(
'.invoice-top'
).
find
(
'.on'
).
text
(),
INVOICE_CONTENT
:
$chooseCont
.
data
(
'id'
)
})
},
true
);
}
setTimeout
(
function
()
{
if
(
window
.
_yas
&&
window
.
_yas
.
sendCustomInfo
)
{
window
.
_yas
.
sendCustomInfo
({
op
:
'YB_SC_INVOICE_INFO_SAVE'
,
param
:
JSON
.
stringify
({
C_ID
:
C_ID
,
INVOICE_TYPE
:
$invoiceType
.
find
(
'.on'
).
data
(
'id'
),
INVOICE_TITLE
:
$
(
'.invoice-top'
).
find
(
'.on'
).
text
(),
INVOICE_CONTENT
:
$chooseCont
.
data
(
'id'
)
})
},
true
);
}
},
200
);
e
.
preventDefault
();
confirmAction
();
...
...
static/js/cart/order-ensure.js
View file @
05e88c5
...
...
@@ -165,14 +165,16 @@ $invoice.on('touchend', '.checkbox', function() {
orderCont
=
window
.
cookie
(
'order-info'
)
&&
JSON
.
parse
(
window
.
cookie
(
'order-info'
));
invoiceInit
();
if
(
window
.
_yas
&&
window
.
_yas
.
sendCustomInfo
)
{
window
.
_yas
.
sendCustomInfo
({
op
:
'YB_SC_INVOICE_ISSUE'
,
param
:
JSON
.
stringify
({
C_ID
:
C_ID
})
},
true
);
}
setTimeout
(
function
()
{
if
(
window
.
_yas
&&
window
.
_yas
.
sendCustomInfo
)
{
window
.
_yas
.
sendCustomInfo
({
op
:
'YB_SC_INVOICE_ISSUE'
,
param
:
JSON
.
stringify
({
C_ID
:
C_ID
})
},
true
);
}
},
200
)
});
...
...
@@ -337,20 +339,23 @@ function submitOrder(times) {
})
/* 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
||
''
,
PRD_SKN
:
PRD_SKN
.
join
(
','
),
PRD_SKU
:
PRD_SKU
.
join
(
','
)
})
},
true
);
}
setTimeout
(
function
()
{
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
||
''
,
PRD_SKN
:
PRD_SKN
.
join
(
','
),
PRD_SKU
:
PRD_SKU
.
join
(
','
)
})
},
true
);
}
},
200
)
window
.
setCookie
(
'order-info'
,
''
);
window
.
location
.
href
=
url
;
...
...
@@ -583,12 +588,14 @@ $(window).scroll(function() {
});
$
(
function
()
{
if
(
window
.
_yas
&&
window
.
_yas
.
sendCustomInfo
)
{
window
.
_yas
.
sendCustomInfo
({
op
:
'YB_SC_ORDER_ENSURE'
,
param
:
JSON
.
stringify
({
C_ID
:
C_ID
})
},
true
);
}
setTimeout
(
function
()
{
if
(
window
.
_yas
&&
window
.
_yas
.
sendCustomInfo
)
{
window
.
_yas
.
sendCustomInfo
({
op
:
'YB_SC_ORDER_ENSURE'
,
param
:
JSON
.
stringify
({
C_ID
:
C_ID
})
},
true
);
}
},
200
)
});
...
...
Please
register
or
login
to post a comment