Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
FlashMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
华国豪
FlashMan
Commits
4db99a87
Commit
4db99a87
authored
Nov 12, 2019
by
黄媛媛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
c1748bc3
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
23 additions
and
126 deletions
+23
-126
search.js
component/Search/search.js
+0
-4
FillOrder.js
pages/GroupTour/FillOrder/FillOrder.js
+8
-33
GroupTour.js
pages/GroupTour/GroupTour.js
+0
-5
pay.js
pages/Home/pay/pay.js
+0
-1
TicketOrder.js
pages/local/TicketOrder/TicketOrder.js
+5
-21
localhome.js
pages/local/localhome.js
+1
-5
Coupon.js
pages/member/Coupon/Coupon.js
+0
-3
webview.js
pages/webview/webview.js
+0
-54
util.js
utils/util.js
+9
-0
No files found.
component/Search/search.js
View file @
4db99a87
...
@@ -36,12 +36,10 @@ Component({
...
@@ -36,12 +36,10 @@ Component({
getCityList
()
{
getCityList
()
{
let
city
=
"成都"
,
let
city
=
"成都"
,
_this
=
this
;
_this
=
this
;
console
.
log
(
app
.
state
.
admin
)
app
.
$api
(
'b2b_get_site'
,
{}).
then
(
res
=>
{
app
.
$api
(
'b2b_get_site'
,
{}).
then
(
res
=>
{
_this
.
setData
({
_this
.
setData
({
cityList
:
res
cityList
:
res
})
})
console
.
log
(
_this
.
data
.
cityList
)
}).
catch
(
err
=>
{
})
}).
catch
(
err
=>
{
})
if
(
app
.
state
.
locaSite
)
{
if
(
app
.
state
.
locaSite
)
{
...
@@ -60,7 +58,6 @@ Component({
...
@@ -60,7 +58,6 @@ Component({
'content-type'
:
'application/json'
// 默认值
'content-type'
:
'application/json'
// 默认值
},
},
success
(
res
)
{
success
(
res
)
{
console
.
log
(
"res"
)
city
=
res
.
data
.
result
.
address_component
.
city
.
replace
(
'市'
,
''
);
city
=
res
.
data
.
result
.
address_component
.
city
.
replace
(
'市'
,
''
);
app
.
state
.
locaSite
=
true
app
.
state
.
locaSite
=
true
app
.
$api
(
'b2b_get_site'
,
{}).
then
(
res
=>
{
app
.
$api
(
'b2b_get_site'
,
{}).
then
(
res
=>
{
...
@@ -84,7 +81,6 @@ Component({
...
@@ -84,7 +81,6 @@ Component({
_this
.
setData
({
_this
.
setData
({
cityList
:
res
cityList
:
res
})
})
console
.
log
(
_this
.
data
.
cityList
)
}).
catch
(
err
=>
{
})
}).
catch
(
err
=>
{
})
}
}
})
})
...
...
pages/GroupTour/FillOrder/FillOrder.js
View file @
4db99a87
// pages/GroupTour/FillOrder/FillOrder.js
// pages/GroupTour/FillOrder/FillOrder.js
let
app
=
getApp
();
let
app
=
getApp
();
var
util
=
require
(
'../../../utils/util.js'
)
Page
({
Page
({
/**
/**
...
@@ -139,14 +141,9 @@ Page({
...
@@ -139,14 +141,9 @@ Page({
}
else
{
}
else
{
money
=
e
.
detail
.
value
.
substring
(
0
,
e
.
detail
.
value
.
length
-
1
);
money
=
e
.
detail
.
value
.
substring
(
0
,
e
.
detail
.
value
.
length
-
1
);
}
}
console
.
log
(
money
)
if
(
money
!==
""
&&
parseFloat
(
money
)
>
this
.
data
.
RedEnvelopeMoneyALL
)
{
if
(
money
!==
""
&&
parseFloat
(
money
)
>
this
.
data
.
RedEnvelopeMoneyALL
)
{
money
=
this
.
data
.
RedEnvelopeMoneyALL
money
=
this
.
data
.
RedEnvelopeMoneyALL
wx
.
showToast
({
util
.
shownone
(
'最大金额不能超过余额'
);
title
:
'最大金额不能超过余额'
,
icon
:
'none'
,
duration
:
2000
})
}
}
this
.
setData
({
this
.
setData
({
RedMoney
:
parseFloat
(
money
)
RedMoney
:
parseFloat
(
money
)
...
@@ -165,19 +162,11 @@ Page({
...
@@ -165,19 +162,11 @@ Page({
//兑换码兑换
//兑换码兑换
subCode
:
function
()
{
subCode
:
function
()
{
if
(
this
.
data
.
code
==
""
)
{
if
(
this
.
data
.
code
==
""
)
{
wx
.
showToast
({
util
.
shownone
(
'请输入兑换码'
);
title
:
'请输入兑换码'
,
icon
:
'none'
,
duration
:
2000
})
return
return
}
}
app
.
$apiJavaData
(
"api/b2b/user/updateUseCouponBycode"
,
{
ActivateCode
:
this
.
data
.
code
}).
then
(
res
=>
{
app
.
$apiJavaData
(
"api/b2b/user/updateUseCouponBycode"
,
{
ActivateCode
:
this
.
data
.
code
}).
then
(
res
=>
{
wx
.
showToast
({
util
.
shownone
(
'兑换成功,请到优惠券列表查看'
);
title
:
'兑换成功,请到优惠券列表查看'
,
icon
:
'none'
,
duration
:
2000
})
this
.
getCpList
()
this
.
getCpList
()
}).
catch
(
err
=>
{
})
}).
catch
(
err
=>
{
})
},
},
...
@@ -191,7 +180,6 @@ Page({
...
@@ -191,7 +180,6 @@ Page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
console
.
log
(
options
)
let
payInfo
=
wx
.
getStorageSync
(
'payInfo'
);
let
payInfo
=
wx
.
getStorageSync
(
'payInfo'
);
this
.
setData
({
this
.
setData
({
payInfo
:
payInfo
,
payInfo
:
payInfo
,
...
@@ -201,7 +189,6 @@ Page({
...
@@ -201,7 +189,6 @@ Page({
let
that
=
this
;
let
that
=
this
;
let
msg
=
{};
let
msg
=
{};
if
(
options
)
{
if
(
options
)
{
// console.log("options", options)
msg
.
configId
=
decodeURIComponent
(
options
.
idDes
);
msg
.
configId
=
decodeURIComponent
(
options
.
idDes
);
msg
.
tcid
=
options
.
tcid
;
msg
.
tcid
=
options
.
tcid
;
if
(
options
.
teamType
)
{
if
(
options
.
teamType
)
{
...
@@ -268,11 +255,7 @@ Page({
...
@@ -268,11 +255,7 @@ Page({
if
(
str
.
test
(
phoneNumber
))
{
if
(
str
.
test
(
phoneNumber
))
{
return
true
return
true
}
else
{
}
else
{
wx
.
showToast
({
util
.
shownone
(
'手机号不正确'
);
title
:
'手机号不正确'
,
duration
:
500
,
icon
:
'none'
,
})
return
false
return
false
}
}
},
},
...
@@ -280,19 +263,11 @@ Page({
...
@@ -280,19 +263,11 @@ Page({
StartYd
()
{
StartYd
()
{
let
that
=
this
;
let
that
=
this
;
if
(
that
.
data
.
payInfo
.
ContactMobile
==
""
||
!
that
.
data
.
payInfo
.
ContactMobile
||
that
.
data
.
payInfo
.
ContactMobile
.
length
<
11
)
{
if
(
that
.
data
.
payInfo
.
ContactMobile
==
""
||
!
that
.
data
.
payInfo
.
ContactMobile
||
that
.
data
.
payInfo
.
ContactMobile
.
length
<
11
)
{
wx
.
showToast
({
util
.
shownone
(
'请输入正确的手机号'
);
title
:
"请输入正确的手机号"
,
icon
:
'none'
,
duration
:
1000
})
return
;
return
;
}
}
if
(
that
.
data
.
payInfo
.
ContactName
==
""
||
!
that
.
data
.
payInfo
.
ContactName
)
{
if
(
that
.
data
.
payInfo
.
ContactName
==
""
||
!
that
.
data
.
payInfo
.
ContactName
)
{
wx
.
showToast
({
util
.
shownone
(
'请输入联系人姓名'
);
title
:
"请输入联系人姓名"
,
icon
:
'none'
,
duration
:
1000
})
return
;
return
;
}
}
this
.
data
.
payInfo
.
CouponAllotIds
=
this
.
data
.
CouponIds
?
this
.
data
.
CouponIds
.
slice
(
0
,
this
.
data
.
CouponIds
.
length
-
1
)
:
''
this
.
data
.
payInfo
.
CouponAllotIds
=
this
.
data
.
CouponIds
?
this
.
data
.
CouponIds
.
slice
(
0
,
this
.
data
.
CouponIds
.
length
-
1
)
:
''
...
...
pages/GroupTour/GroupTour.js
View file @
4db99a87
...
@@ -61,7 +61,6 @@ Page({
...
@@ -61,7 +61,6 @@ Page({
},
},
GodetailList
(
e
){
GodetailList
(
e
){
let
item
=
e
.
currentTarget
.
dataset
.
item
;
let
item
=
e
.
currentTarget
.
dataset
.
item
;
console
.
log
(
item
)
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
'/pages/GroupTour/GroupDetails/GroupDetails?idDes='
+
encodeURIComponent
(
item
.
id
)
+
"&tcid="
+
item
.
tcid
+
"&teamType=0"
,
url
:
'/pages/GroupTour/GroupDetails/GroupDetails?idDes='
+
encodeURIComponent
(
item
.
id
)
+
"&tcid="
+
item
.
tcid
+
"&teamType=0"
,
})
})
...
@@ -73,7 +72,6 @@ Page({
...
@@ -73,7 +72,6 @@ Page({
})
})
},
},
ChangeSite
(
val
)
{
ChangeSite
(
val
)
{
console
.
log
(
val
.
detail
);
this
.
setData
({
this
.
setData
({
site
:
val
.
detail
site
:
val
.
detail
})
})
...
@@ -146,7 +144,6 @@ Page({
...
@@ -146,7 +144,6 @@ Page({
dataList
:
[],
dataList
:
[],
arrList
:
[]
arrList
:
[]
})
})
console
.
log
(
"lineList"
,
that
.
data
.
lineList
)
this
.
GetLoadList
(
0
);
this
.
GetLoadList
(
0
);
}).
catch
(
err
=>
{})
}).
catch
(
err
=>
{})
},
},
...
@@ -164,14 +161,12 @@ Page({
...
@@ -164,14 +161,12 @@ Page({
that
.
setData
({
that
.
setData
({
tiaoshui
:
res
.
pageData
tiaoshui
:
res
.
pageData
})
})
console
.
log
(
that
.
data
.
tiaoshui
)
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
})
})
},
},
onPageScroll
:
function
(
e
)
{
onPageScroll
:
function
(
e
)
{
let
that
=
this
;
let
that
=
this
;
// console.log(e);//{scrollTop:99}
let
query
=
wx
.
createSelectorQuery
();
let
query
=
wx
.
createSelectorQuery
();
//选择id
//选择id
query
.
select
(
'#scrollView'
).
boundingClientRect
()
query
.
select
(
'#scrollView'
).
boundingClientRect
()
...
...
pages/Home/pay/pay.js
View file @
4db99a87
...
@@ -29,7 +29,6 @@ Page({
...
@@ -29,7 +29,6 @@ Page({
that
.
setData
({
that
.
setData
({
payInfo
:
info
payInfo
:
info
})
})
console
.
log
(
"payInfo"
,
that
.
data
.
payInfo
)
}
}
that
.
countdown
(
that
);
that
.
countdown
(
that
);
...
...
pages/local/TicketOrder/TicketOrder.js
View file @
4db99a87
...
@@ -64,12 +64,8 @@ Page({
...
@@ -64,12 +64,8 @@ Page({
phoneInput
(
e
)
{
phoneInput
(
e
)
{
let
val
=
e
.
detail
.
value
;
let
val
=
e
.
detail
.
value
;
this
.
data
.
msg
.
contactMobile
=
val
;
this
.
data
.
msg
.
contactMobile
=
val
;
if
(
val
.
length
>
11
)
{
if
(
val
.
length
>
11
)
{
wx
.
showToast
({
util
.
shownone
(
'手机号有误'
);
title
:
'手机号有误'
,
icon
:
'none'
,
duration
:
500
})
}
}
this
.
setData
({
this
.
setData
({
msg
:
this
.
data
.
msg
msg
:
this
.
data
.
msg
...
@@ -91,11 +87,7 @@ Page({
...
@@ -91,11 +87,7 @@ Page({
let
tomonth
=
util
.
changeMonth
(
this
.
data
.
tomonth
,
num
)
let
tomonth
=
util
.
changeMonth
(
this
.
data
.
tomonth
,
num
)
let
today
=
util
.
YYMM
(
new
Date
());
let
today
=
util
.
YYMM
(
new
Date
());
if
(
!
util
.
CompareDate
(
tomonth
,
today
))
{
if
(
!
util
.
CompareDate
(
tomonth
,
today
))
{
wx
.
showToast
({
util
.
shownone
(
'不能选择过去的日期!'
);
title
:
"不能选择过去的日期!"
,
icon
:
'none'
,
duration
:
1000
})
return
;
return
;
}
}
this
.
setData
({
this
.
setData
({
...
@@ -194,11 +186,7 @@ Page({
...
@@ -194,11 +186,7 @@ Page({
let
that
=
this
;
let
that
=
this
;
let
msg
=
that
.
data
.
msg
;
let
msg
=
that
.
data
.
msg
;
if
(
msg
.
useDate
==
""
)
{
if
(
msg
.
useDate
==
""
)
{
wx
.
showToast
({
util
.
shownone
(
'请选择使用日期'
);
title
:
"请选择使用日期"
,
icon
:
'none'
,
duration
:
1000
})
return
;
return
;
}
}
app
.
$apiJavaData
(
'/api/b2b/scenic/setTicketOrder'
,
msg
).
then
(
res
=>
{
app
.
$apiJavaData
(
'/api/b2b/scenic/setTicketOrder'
,
msg
).
then
(
res
=>
{
...
@@ -207,11 +195,7 @@ Page({
...
@@ -207,11 +195,7 @@ Page({
url
:
'/pages/member/orderCenter/orderCenter?index=3'
,
url
:
'/pages/member/orderCenter/orderCenter?index=3'
,
})
})
}
else
{
}
else
{
wx
.
showToast
({
util
.
shownone
(
res
.
message
);
title
:
res
.
message
,
icon
:
'none'
,
duration
:
1000
})
}
}
}).
catch
(
err
=>
{})
}).
catch
(
err
=>
{})
...
...
pages/local/localhome.js
View file @
4db99a87
...
@@ -61,7 +61,6 @@ Page({
...
@@ -61,7 +61,6 @@ Page({
},
},
getlineTeam
(
e
)
{
getlineTeam
(
e
)
{
console
.
log
(
e
);
let
item
=
e
.
currentTarget
.
dataset
.
item
;
let
item
=
e
.
currentTarget
.
dataset
.
item
;
let
index
=
e
.
currentTarget
.
dataset
.
index
;
let
index
=
e
.
currentTarget
.
dataset
.
index
;
this
.
setData
({
this
.
setData
({
...
@@ -79,14 +78,12 @@ Page({
...
@@ -79,14 +78,12 @@ Page({
fromOrigin
:
1
,
fromOrigin
:
1
,
}
}
app
.
$apiJavaNew
(
'/api/b2b/food/getHomeFoodList'
,
msg
).
then
(
res
=>
{
app
.
$apiJavaNew
(
'/api/b2b/food/getHomeFoodList'
,
msg
).
then
(
res
=>
{
console
.
log
(
"getFood"
)
console
.
log
(
res
);
let
list
=
res
.
pageData
;
let
list
=
res
.
pageData
;
this
.
setData
({
this
.
setData
({
foodList
:
list
foodList
:
list
})
})
console
.
log
(
"foodList"
,
this
.
data
.
foodList
);
}).
catch
(
err
=>
{
})
}).
catch
(
err
=>
{
})
},
},
...
@@ -156,7 +153,6 @@ Page({
...
@@ -156,7 +153,6 @@ Page({
})
})
},
},
ChangeSite
(
val
)
{
ChangeSite
(
val
)
{
console
.
log
(
val
.
detail
);
this
.
setData
({
this
.
setData
({
site
:
val
.
detail
site
:
val
.
detail
})
})
...
...
pages/member/Coupon/Coupon.js
View file @
4db99a87
...
@@ -82,7 +82,6 @@ Page({
...
@@ -82,7 +82,6 @@ Page({
wx
.
getStorage
({
wx
.
getStorage
({
key
:
'admin'
,
key
:
'admin'
,
success
:
res
=>
{
success
:
res
=>
{
console
.
log
(
e
)
let
type
=
e
.
detail
.
target
.
dataset
.
type
;
let
type
=
e
.
detail
.
target
.
dataset
.
type
;
let
formId
=
e
.
detail
.
formId
let
formId
=
e
.
detail
.
formId
let
url
=
''
;
let
url
=
''
;
...
@@ -126,7 +125,6 @@ Page({
...
@@ -126,7 +125,6 @@ Page({
},
},
// 获取数据
// 获取数据
getList
:
function
(
type
)
{
getList
:
function
(
type
)
{
console
.
log
(
this
.
data
.
pageIndex
,
this
.
data
.
totalPage
,
type
)
if
(
this
.
data
.
pageIndex
>=
this
.
data
.
totalPage
&&
type
)
{
if
(
this
.
data
.
pageIndex
>=
this
.
data
.
totalPage
&&
type
)
{
return
return
}
}
...
@@ -157,7 +155,6 @@ Page({
...
@@ -157,7 +155,6 @@ Page({
//切换类型
//切换类型
setActiveTag
:
function
(
e
)
{
setActiveTag
:
function
(
e
)
{
let
index
=
e
.
target
.
id
.
split
(
'active'
)[
1
]
let
index
=
e
.
target
.
id
.
split
(
'active'
)[
1
]
console
.
log
(
index
)
this
.
setData
({
this
.
setData
({
dropdownActive
:
Number
(
index
),
dropdownActive
:
Number
(
index
),
tagBoxShow
:
false
,
tagBoxShow
:
false
,
...
...
pages/webview/webview.js
View file @
4db99a87
...
@@ -5,14 +5,9 @@ Page({
...
@@ -5,14 +5,9 @@ Page({
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
// urlHref: "http://activity.oytour.com/html/GT_activities.html",
urlHref
:
"http://127.0.0.1:5500/html/GT_activities.html"
,
urlHref
:
"http://127.0.0.1:5500/html/GT_activities.html"
,
},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
let
admin
=
wx
.
getStorageSync
(
'admin'
);
let
admin
=
wx
.
getStorageSync
(
'admin'
);
let
customerId
=
admin
.
id
;
let
customerId
=
admin
.
id
;
...
@@ -21,59 +16,10 @@ Page({
...
@@ -21,59 +16,10 @@ Page({
let
secretKey
=
admin
.
secretKey
;
let
secretKey
=
admin
.
secretKey
;
let
platform
=
"xcx"
;
let
platform
=
"xcx"
;
let
urlHref
=
this
.
data
.
urlHref
+
"?customerId="
+
customerId
+
'&accountId='
+
accountId
+
'&token='
+
token
+
'&secretKey='
+
secretKey
+
'&platform='
+
platform
;
let
urlHref
=
this
.
data
.
urlHref
+
"?customerId="
+
customerId
+
'&accountId='
+
accountId
+
'&token='
+
token
+
'&secretKey='
+
secretKey
+
'&platform='
+
platform
;
console
.
log
(
"urlHref"
,
urlHref
)
this
.
setData
({
this
.
setData
({
urlHref
:
urlHref
urlHref
:
urlHref
})
})
},
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
:
function
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
:
function
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
}
})
})
\ No newline at end of file
utils/util.js
View file @
4db99a87
...
@@ -136,6 +136,14 @@ const getNextMonth = (date) => {
...
@@ -136,6 +136,14 @@ const getNextMonth = (date) => {
var
t2
=
year2
+
'-'
+
month2
+
'-'
+
day2
;
var
t2
=
year2
+
'-'
+
month2
+
'-'
+
day2
;
return
t2
;
return
t2
;
}
}
const
shownone
=
text
=>
wx
.
showToast
({
title
:
text
,
icon
:
'none'
,
duration
:
1000
})
module
.
exports
=
{
module
.
exports
=
{
formatTime
:
formatTime
,
formatTime
:
formatTime
,
CompareDate
:
CompareDate
,
CompareDate
:
CompareDate
,
...
@@ -146,4 +154,5 @@ module.exports = {
...
@@ -146,4 +154,5 @@ module.exports = {
AddDays
:
AddDays
,
AddDays
:
AddDays
,
getNextMonth
:
getNextMonth
,
getNextMonth
:
getNextMonth
,
getPreMonth
:
getPreMonth
,
getPreMonth
:
getPreMonth
,
shownone
:
shownone
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment