Toggle navigation
Toggle navigation
This project
Loading...
Sign in
mobile
/
tt-yoho-app
·
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
肖亚东
6 years ago
Commit
4c0eb59b75797ad58032e1febad266225e3c42fe
1 parent
f94b7f4c
加价购页面逻辑处理 — review by 李奇
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
26 deletions
pages/shopCart/giftPage.js
pages/shopCart/giftPage.json
pages/shopCart/giftPage.ttml
pages/shopCart/giftPage.ttss
pages/shopCart/shopCart.js
pages/shopCart/giftPage.js
View file @
4c0eb59
...
...
@@ -64,6 +64,9 @@ Page({
this
.
setData
({
promotion_ids
,
is_gift
,
status
});
this
.
queryGiftPageData
();
new
app
.
WeToast
();
},
/**
...
...
@@ -117,8 +120,12 @@ Page({
onPressProduct
:
function
(
event
)
{
let
data
=
event
.
currentTarget
.
dataset
;
let
product_skn
=
data
.
productSkn
;
let
promotion_id
=
data
.
promotion_id
;
this
.
setData
({
current_skn
:
product_skn
,
promotion_id
});
let
promotion_id
=
data
.
item
.
promotion_id
;
this
.
setData
({
current_skn
:
product_skn
,
promotion_id
});
let
param
=
{
method
:
'app.product.gift'
,
uid
:
app
.
getUid
(),
...
...
@@ -257,6 +264,7 @@ Page({
selected
:
'Y'
,
goods_type
:
goods_type
,
edit_product_sku
:
0
,
uid
:
app
&&
app
.
getUid
(),
};
}
else
if
(
that
.
data
.
status
===
'30'
)
{
param
=
{
...
...
@@ -266,6 +274,7 @@ Page({
promotion_id
:
promotion_id
,
goods_type
:
goods_type
,
buy_number
:
1
,
uid
:
app
&&
app
.
getUid
(),
}
}
else
{
tt
.
navigateBack
();
...
...
@@ -310,9 +319,6 @@ Page({
},
errorToast
:
function
(
event
)
{
console
.
log
(
'===================================='
);
console
.
log
(
event
);
console
.
log
(
'===================================='
);
let
detail
=
event
.
detail
;
this
.
wetoast
.
toast
({
title
:
detail
.
title
,
...
...
pages/shopCart/giftPage.json
View file @
4c0eb59
{
"navigationBarTitleText"
:
"
换购商品
"
,
"navigationBarTitleText"
:
""
,
"usingComponents"
:
{
"shoppingCartFooterView"
:
"../../components/shopCart/footerView/shoppingCartFooterView"
,
"shoppingCartProductCell"
:
"../../components/shopCart/cells/shoppingCartProductCell"
,
"shoppingCartGiftOrPriceCell"
:
"../../components/shopCart/cells/shoppingCartGiftOrPriceCell"
,
"shoppingCartInvalidProductCell"
:
"../../components/shopCart/cells/shoppingCartInvalidProductCell"
,
"shoppingCartPromotionCell"
:
"../../components/shopCart/cells/shoppingCartPromotionCell"
,
"shoppingCartOneProductCell"
:
"../../components/shopCart/cells/shoppingCartOneProductCell"
,
"picker"
:
"../../components/picker/picker"
}
}
\ No newline at end of file
...
...
pages/shopCart/giftPage.ttml
View file @
4c0eb59
...
...
@@ -49,3 +49,5 @@
></picker>
</view>
<import src="../../vendors/toast/wetoast.ttml"/>
<template is="wetoast" data="{{...__wetoast__}}"/>
\ No newline at end of file
...
...
pages/shopCart/giftPage.ttss
View file @
4c0eb59
/* giftPage.wxss */
/* @import "../goodsDetail/picker/picker.wxss"; */
.container {
background-color: white;
...
...
pages/shopCart/shopCart.js
View file @
4c0eb59
...
...
@@ -213,18 +213,12 @@ Page({
},
onShoppingCartProductAction
:
function
(
event
)
{
console
.
log
(
event
);
let
dataset
=
event
.
detail
.
currentTarget
.
dataset
;
console
.
log
(
dataset
);
if
(
Object
.
keys
(
dataset
).
length
===
0
)
{
dataset
=
event
.
detail
.
detail
.
currentTarget
.
dataset
;
}
let
identifier
=
dataset
.
identifier
;
console
.
log
(
'===onShoppingCartProductAction===='
);
console
.
log
(
dataset
);
console
.
log
(
'===================================='
);
switch
(
identifier
)
{
case
"selectSingleGoodsAction"
:
...
...
@@ -407,19 +401,19 @@ Page({
},
moveEnd
:
function
(
e
)
{
// console.log(
'moveEnd'
);
// console.log(
e
);
let
isEditing
=
this
.
data
.
isEditing
;
if
(
isEditing
)
{
return
;
}
let
changedTouches
=
e
.
detail
.
detail
.
changedTouches
;
let
changedTouches
=
e
.
detail
.
changedTouches
;
if
(
!
changedTouches
)
{
changedTouches
=
e
.
detail
.
changedTouches
;
changedTouches
=
e
.
detail
.
detail
.
changedTouches
;
}
let
dataset
=
e
.
detail
.
detail
.
currentTarget
.
dataset
;
if
(
!
dataset
)
{
dataset
=
e
.
detail
.
currentTarget
.
dataset
;
let
dataset
=
e
.
detail
.
currentTarget
.
dataset
;
if
(
Object
.
keys
(
dataset
).
length
===
0
)
{
dataset
=
e
.
detail
.
detail
.
currentTarget
.
dataset
;
}
var
X
=
changedTouches
[
0
].
clientX
;
...
...
Please
register
or
login
to post a comment