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({
getCityList
()
{
let
city
=
"成都"
,
_this
=
this
;
console
.
log
(
app
.
state
.
admin
)
app
.
$api
(
'b2b_get_site'
,
{}).
then
(
res
=>
{
_this
.
setData
({
cityList
:
res
})
console
.
log
(
_this
.
data
.
cityList
)
}).
catch
(
err
=>
{
})
if
(
app
.
state
.
locaSite
)
{
...
...
@@ -60,7 +58,6 @@ Component({
'content-type'
:
'application/json'
// 默认值
},
success
(
res
)
{
console
.
log
(
"res"
)
city
=
res
.
data
.
result
.
address_component
.
city
.
replace
(
'市'
,
''
);
app
.
state
.
locaSite
=
true
app
.
$api
(
'b2b_get_site'
,
{}).
then
(
res
=>
{
...
...
@@ -84,7 +81,6 @@ Component({
_this
.
setData
({
cityList
:
res
})
console
.
log
(
_this
.
data
.
cityList
)
}).
catch
(
err
=>
{
})
}
})
...
...
pages/GroupTour/FillOrder/FillOrder.js
View file @
4db99a87
// pages/GroupTour/FillOrder/FillOrder.js
let
app
=
getApp
();
var
util
=
require
(
'../../../utils/util.js'
)
Page
({
/**
...
...
@@ -139,14 +141,9 @@ Page({
}
else
{
money
=
e
.
detail
.
value
.
substring
(
0
,
e
.
detail
.
value
.
length
-
1
);
}
console
.
log
(
money
)
if
(
money
!==
""
&&
parseFloat
(
money
)
>
this
.
data
.
RedEnvelopeMoneyALL
)
{
money
=
this
.
data
.
RedEnvelopeMoneyALL
wx
.
showToast
({
title
:
'最大金额不能超过余额'
,
icon
:
'none'
,
duration
:
2000
})
util
.
shownone
(
'最大金额不能超过余额'
);
}
this
.
setData
({
RedMoney
:
parseFloat
(
money
)
...
...
@@ -165,19 +162,11 @@ Page({
//兑换码兑换
subCode
:
function
()
{
if
(
this
.
data
.
code
==
""
)
{
wx
.
showToast
({
title
:
'请输入兑换码'
,
icon
:
'none'
,
duration
:
2000
})
util
.
shownone
(
'请输入兑换码'
);
return
}
app
.
$apiJavaData
(
"api/b2b/user/updateUseCouponBycode"
,
{
ActivateCode
:
this
.
data
.
code
}).
then
(
res
=>
{
wx
.
showToast
({
title
:
'兑换成功,请到优惠券列表查看'
,
icon
:
'none'
,
duration
:
2000
})
util
.
shownone
(
'兑换成功,请到优惠券列表查看'
);
this
.
getCpList
()
}).
catch
(
err
=>
{
})
},
...
...
@@ -191,7 +180,6 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
console
.
log
(
options
)
let
payInfo
=
wx
.
getStorageSync
(
'payInfo'
);
this
.
setData
({
payInfo
:
payInfo
,
...
...
@@ -201,7 +189,6 @@ Page({
let
that
=
this
;
let
msg
=
{};
if
(
options
)
{
// console.log("options", options)
msg
.
configId
=
decodeURIComponent
(
options
.
idDes
);
msg
.
tcid
=
options
.
tcid
;
if
(
options
.
teamType
)
{
...
...
@@ -268,11 +255,7 @@ Page({
if
(
str
.
test
(
phoneNumber
))
{
return
true
}
else
{
wx
.
showToast
({
title
:
'手机号不正确'
,
duration
:
500
,
icon
:
'none'
,
})
util
.
shownone
(
'手机号不正确'
);
return
false
}
},
...
...
@@ -280,19 +263,11 @@ Page({
StartYd
()
{
let
that
=
this
;
if
(
that
.
data
.
payInfo
.
ContactMobile
==
""
||
!
that
.
data
.
payInfo
.
ContactMobile
||
that
.
data
.
payInfo
.
ContactMobile
.
length
<
11
)
{
wx
.
showToast
({
title
:
"请输入正确的手机号"
,
icon
:
'none'
,
duration
:
1000
})
util
.
shownone
(
'请输入正确的手机号'
);
return
;
}
if
(
that
.
data
.
payInfo
.
ContactName
==
""
||
!
that
.
data
.
payInfo
.
ContactName
)
{
wx
.
showToast
({
title
:
"请输入联系人姓名"
,
icon
:
'none'
,
duration
:
1000
})
util
.
shownone
(
'请输入联系人姓名'
);
return
;
}
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({
},
GodetailList
(
e
){
let
item
=
e
.
currentTarget
.
dataset
.
item
;
console
.
log
(
item
)
wx
.
navigateTo
({
url
:
'/pages/GroupTour/GroupDetails/GroupDetails?idDes='
+
encodeURIComponent
(
item
.
id
)
+
"&tcid="
+
item
.
tcid
+
"&teamType=0"
,
})
...
...
@@ -73,7 +72,6 @@ Page({
})
},
ChangeSite
(
val
)
{
console
.
log
(
val
.
detail
);
this
.
setData
({
site
:
val
.
detail
})
...
...
@@ -146,7 +144,6 @@ Page({
dataList
:
[],
arrList
:
[]
})
console
.
log
(
"lineList"
,
that
.
data
.
lineList
)
this
.
GetLoadList
(
0
);
}).
catch
(
err
=>
{})
},
...
...
@@ -164,14 +161,12 @@ Page({
that
.
setData
({
tiaoshui
:
res
.
pageData
})
console
.
log
(
that
.
data
.
tiaoshui
)
}).
catch
(
err
=>
{
})
},
onPageScroll
:
function
(
e
)
{
let
that
=
this
;
// console.log(e);//{scrollTop:99}
let
query
=
wx
.
createSelectorQuery
();
//选择id
query
.
select
(
'#scrollView'
).
boundingClientRect
()
...
...
pages/Home/pay/pay.js
View file @
4db99a87
...
...
@@ -29,7 +29,6 @@ Page({
that
.
setData
({
payInfo
:
info
})
console
.
log
(
"payInfo"
,
that
.
data
.
payInfo
)
}
that
.
countdown
(
that
);
...
...
pages/local/TicketOrder/TicketOrder.js
View file @
4db99a87
...
...
@@ -64,12 +64,8 @@ Page({
phoneInput
(
e
)
{
let
val
=
e
.
detail
.
value
;
this
.
data
.
msg
.
contactMobile
=
val
;
if
(
val
.
length
>
11
)
{
wx
.
showToast
({
title
:
'手机号有误'
,
icon
:
'none'
,
duration
:
500
})
if
(
val
.
length
>
11
)
{
util
.
shownone
(
'手机号有误'
);
}
this
.
setData
({
msg
:
this
.
data
.
msg
...
...
@@ -91,11 +87,7 @@ Page({
let
tomonth
=
util
.
changeMonth
(
this
.
data
.
tomonth
,
num
)
let
today
=
util
.
YYMM
(
new
Date
());
if
(
!
util
.
CompareDate
(
tomonth
,
today
))
{
wx
.
showToast
({
title
:
"不能选择过去的日期!"
,
icon
:
'none'
,
duration
:
1000
})
util
.
shownone
(
'不能选择过去的日期!'
);
return
;
}
this
.
setData
({
...
...
@@ -194,11 +186,7 @@ Page({
let
that
=
this
;
let
msg
=
that
.
data
.
msg
;
if
(
msg
.
useDate
==
""
)
{
wx
.
showToast
({
title
:
"请选择使用日期"
,
icon
:
'none'
,
duration
:
1000
})
util
.
shownone
(
'请选择使用日期'
);
return
;
}
app
.
$apiJavaData
(
'/api/b2b/scenic/setTicketOrder'
,
msg
).
then
(
res
=>
{
...
...
@@ -207,11 +195,7 @@ Page({
url
:
'/pages/member/orderCenter/orderCenter?index=3'
,
})
}
else
{
wx
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
,
duration
:
1000
})
util
.
shownone
(
res
.
message
);
}
}).
catch
(
err
=>
{})
...
...
pages/local/localhome.js
View file @
4db99a87
...
...
@@ -61,7 +61,6 @@ Page({
},
getlineTeam
(
e
)
{
console
.
log
(
e
);
let
item
=
e
.
currentTarget
.
dataset
.
item
;
let
index
=
e
.
currentTarget
.
dataset
.
index
;
this
.
setData
({
...
...
@@ -79,14 +78,12 @@ Page({
fromOrigin
:
1
,
}
app
.
$apiJavaNew
(
'/api/b2b/food/getHomeFoodList'
,
msg
).
then
(
res
=>
{
console
.
log
(
"getFood"
)
console
.
log
(
res
);
let
list
=
res
.
pageData
;
this
.
setData
({
foodList
:
list
})
console
.
log
(
"foodList"
,
this
.
data
.
foodList
);
}).
catch
(
err
=>
{
})
},
...
...
@@ -156,7 +153,6 @@ Page({
})
},
ChangeSite
(
val
)
{
console
.
log
(
val
.
detail
);
this
.
setData
({
site
:
val
.
detail
})
...
...
pages/member/Coupon/Coupon.js
View file @
4db99a87
...
...
@@ -82,7 +82,6 @@ Page({
wx
.
getStorage
({
key
:
'admin'
,
success
:
res
=>
{
console
.
log
(
e
)
let
type
=
e
.
detail
.
target
.
dataset
.
type
;
let
formId
=
e
.
detail
.
formId
let
url
=
''
;
...
...
@@ -126,7 +125,6 @@ Page({
},
// 获取数据
getList
:
function
(
type
)
{
console
.
log
(
this
.
data
.
pageIndex
,
this
.
data
.
totalPage
,
type
)
if
(
this
.
data
.
pageIndex
>=
this
.
data
.
totalPage
&&
type
)
{
return
}
...
...
@@ -157,7 +155,6 @@ Page({
//切换类型
setActiveTag
:
function
(
e
)
{
let
index
=
e
.
target
.
id
.
split
(
'active'
)[
1
]
console
.
log
(
index
)
this
.
setData
({
dropdownActive
:
Number
(
index
),
tagBoxShow
:
false
,
...
...
pages/webview/webview.js
View file @
4db99a87
...
...
@@ -5,14 +5,9 @@ Page({
* 页面的初始数据
*/
data
:
{
// urlHref: "http://activity.oytour.com/html/GT_activities.html",
urlHref
:
"http://127.0.0.1:5500/html/GT_activities.html"
,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
let
admin
=
wx
.
getStorageSync
(
'admin'
);
let
customerId
=
admin
.
id
;
...
...
@@ -21,59 +16,10 @@ Page({
let
secretKey
=
admin
.
secretKey
;
let
platform
=
"xcx"
;
let
urlHref
=
this
.
data
.
urlHref
+
"?customerId="
+
customerId
+
'&accountId='
+
accountId
+
'&token='
+
token
+
'&secretKey='
+
secretKey
+
'&platform='
+
platform
;
console
.
log
(
"urlHref"
,
urlHref
)
this
.
setData
({
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) => {
var
t2
=
year2
+
'-'
+
month2
+
'-'
+
day2
;
return
t2
;
}
const
shownone
=
text
=>
wx
.
showToast
({
title
:
text
,
icon
:
'none'
,
duration
:
1000
})
module
.
exports
=
{
formatTime
:
formatTime
,
CompareDate
:
CompareDate
,
...
...
@@ -146,4 +154,5 @@ module.exports = {
AddDays
:
AddDays
,
getNextMonth
:
getNextMonth
,
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