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
82e1fb4a
Commit
82e1fb4a
authored
Jun 28, 2019
by
huangyuanyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
cce343bd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
89 additions
and
59 deletions
+89
-59
app.js
app.js
+44
-0
home.js
pages/Home/home.js
+31
-8
home.wxml
pages/Home/home.wxml
+14
-51
No files found.
app.js
View file @
82e1fb4a
...
@@ -75,6 +75,50 @@ App({
...
@@ -75,6 +75,50 @@ App({
})
})
return
promise
;
return
promise
;
},
},
//
$apiJavaNew
:
function
(
url
,
msg
)
{
let
groupId
=
2
;
let
token
=
this
.
state
.
admin
.
token
;
let
secretKey
=
this
.
state
.
admin
.
secretKey
;
var
promise
=
new
Promise
((
resolve
,
reject
)
=>
{
wx
.
showLoading
({
title
:
'加载中'
,
});
let
timestamp
=
(
new
Date
()).
valueOf
()
let
sign
=
md5
(
'msg='
+
encodeURIComponent
(
JSON
.
stringify
(
msg
)).
toLowerCase
()
+
'&'
+
'timestamp='
+
timestamp
+
'&'
+
'token='
+
token
+
'&'
+
'key='
+
secretKey
)
wx
.
request
({
// url: 'https://efficient.oytour.com/'+ url, //线上
url
:
'http://47.96.12.235:9001/'
+
url
,
//测试
method
:
'POST'
,
data
:
{
msg
:
msg
,
timestamp
:
timestamp
,
token
:
token
,
sign
:
sign
,
groupId
:
groupId
,
},
success
(
res
)
{
wx
.
hideLoading
()
if
(
res
.
data
.
resultCode
===
1
)
{
resolve
(
res
.
data
.
data
);
}
else
if
(
res
.
data
.
resultCode
===
10000
||
res
.
data
.
resultCode
===
10001
)
{
// wx.reLaunch({
// url: '/pages/login/login'
// })
}
else
{
wx
.
showToast
({
title
:
res
.
data
.
message
,
icon
:
'none'
,
duration
:
1000
})
reject
(
res
.
data
)
}
}
})
})
return
promise
;
},
// 抽奖接口2
// 抽奖接口2
$apiJava
:
function
(
url
,
msg
,
groupId
,
uid
,
token
,
secretKey
)
{
$apiJava
:
function
(
url
,
msg
,
groupId
,
uid
,
token
,
secretKey
)
{
...
...
pages/Home/home.js
View file @
82e1fb4a
...
@@ -6,7 +6,8 @@ Page({
...
@@ -6,7 +6,8 @@ Page({
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
homeTravelSpecialSale
:[],
specialAirTicketItem
:[],
},
},
/**
/**
...
@@ -14,6 +15,7 @@ Page({
...
@@ -14,6 +15,7 @@ Page({
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
this
.
GetInitData
();
this
.
GetInitData
();
this
.
GetAllTicket
();
},
},
/**
/**
...
@@ -28,16 +30,37 @@ Page({
...
@@ -28,16 +30,37 @@ Page({
*/
*/
onShow
:
function
()
{
onShow
:
function
()
{
},
GetAllTicket
()
{
let
Msg
=
{
airTicketType
:
0
,
pageIndex
:
1
,
pageSize
:
2
,
};
let
that
=
this
;
app
.
$apiJavaNew
(
'/api/b2b/home/getHomeSpecialAirTicketList'
,
Msg
).
then
(
res
=>
{
console
.
log
(
"特价机票"
,
res
);
that
.
setData
({
specialAirTicketItem
:
res
.
pageData
})
}).
catch
(
err
=>
{
wx
.
showToast
({
title
:
err
.
message
,
icon
:
'none'
,
duration
:
1000
})
})
},
},
GetInitData
(){
GetInitData
(){
console
.
log
(
"111"
)
;
let
that
=
this
;
app
.
$api
(
'/api/b2b/home/getHomeInitData'
,
{}).
then
(
res
=>
{
app
.
$api
JavaNew
(
'/api/b2b/home/getHomeInitData'
,
{}).
then
(
res
=>
{
console
.
log
(
"首页数据"
,
res
);
console
.
log
(
"首页数据"
,
res
);
// wx.showToast
({
that
.
setData
({
// title: '提交成功!'
,
homeTravelSpecialSale
:
res
.
homeTravelSpecialSale
,
// icon: 'none'
,
specialAirTicketItem
:
res
.
specialAirTicketItem
,
// duration: 1000
})
// })
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
wx
.
showToast
({
wx
.
showToast
({
title
:
err
.
message
,
title
:
err
.
message
,
...
...
pages/Home/home.wxml
View file @
82e1fb4a
...
@@ -53,42 +53,28 @@
...
@@ -53,42 +53,28 @@
<text style="font-size:24rpx;color:#888888;float:right">查看更多</text>
<text style="font-size:24rpx;color:#888888;float:right">查看更多</text>
</view>
</view>
<view class="cztm cztm1">
<view class="cztm cztm1">
<view class="cztmList1">
<view class="cztmList1"
wx:for="{{homeTravelSpecialSale}}" wx:key="{{index}}" wx:if="{{index==0}}"
>
<image src="
http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626102629935.png
"></image>
<image src="
{{item.imgCover[0].url}}
"></image>
<view class="boxshadow">
<view class="boxshadow">
<view
style="font-size:30rpx;padding-top:29rpx">夏日协奏曲
</view>
<view
class="text1" style="font-size:30rpx;padding-top:29rpx">{{item.title}}
</view>
<view style="font-size:22rpx">
13日11
晚</view>
<view style="font-size:22rpx">
{{item.dayNum}}日{{item.nightNum}}
晚</view>
</view>
</view>
</view>
</view>
<view class="cztmList">
<view class="cztmList"
wx:for="{{homeTravelSpecialSale}}" wx:key="{{index}}" wx:if="{{index==1}}"
>
<image src="
http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626102629935.png
"></image>
<image src="
{{item.imgCover[0].url}}
"></image>
<view class="boxshadow">
<view class="boxshadow">
<view
style="font-size:30rpx;padding-top:29rpx">夏日协奏曲
</view>
<view
class="text1" style="font-size:30rpx;padding-top:29rpx">{{item.title}}
</view>
<view style="font-size:22rpx">
13日11
晚</view>
<view style="font-size:22rpx">
{{item.dayNum}}日{{item.nightNum}}
晚</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="cztm cztm2">
<view class="cztm cztm2">
<view class="cztmList">
<view class="cztmList"
wx:for="{{homeTravelSpecialSale}}" wx:key="{{index}}" wx:if="{{index>1 && index<5}}"
>
<image src="
http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626102629935.png
"></image>
<image src="
{{item.imgCover[0].url}}
"></image>
<view class="boxshadow">
<view class="boxshadow">
<view style="font-size:30rpx;padding-top:29rpx">夏日协奏曲</view>
<view class="text1" style="font-size:30rpx;padding-top:29rpx">{{item.title}}</view>
<view style="font-size:22rpx">13日11晚</view>
<view style="font-size:22rpx">{{item.dayNum}}日{{item.nightNum}}晚</view>
</view>
</view>
<view class="cztmList">
<image src="http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626102629935.png"></image>
<view class="boxshadow">
<view style="font-size:30rpx;padding-top:29rpx">夏日协奏曲</view>
<view style="font-size:22rpx">13日11晚</view>
</view>
</view>
<view class="cztmList">
<image src="http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626102629935.png"></image>
<view class="boxshadow">
<view style="font-size:30rpx;padding-top:29rpx">夏日协奏曲</view>
<view style="font-size:22rpx">13日11晚</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -106,34 +92,11 @@
...
@@ -106,34 +92,11 @@
</view>
</view>
<view class="listRight">
<view class="listRight">
<view class="icon">
<view class="icon">
<view>成都</view>
<view>就是佛牌骄</view>
<view>
<view style="padding:0 4rpx">
<view style="position:relative;top:20rpx;">
<image style="width:22rpx;height:22rpx" src="../../images/home/icon1.png"></image>
</view>
<image style="width:86rpx;height:14rpx" src="../../images/home/icon2.png"></image>
</view>
</view>
<view>日本</view>
</view>
<view style="text-align:right;color:#EE4454;font-size:20rpx;">
¥888.00
</view>
</view>
</view>
<view class="tjTicket">
<view class="listLeft">
CZ3854
</view>
<view class="listRight">
<view class="icon">
<view>成都</view>
<view>
<view>
<view style="padding:0 4rpx">
<view style="padding:0 4rpx">
<view style="position:relative;top:20rpx;">
<view style="position:relative;top:20rpx;">
<image style="width:
22
rpx;height:22rpx" src="../../images/home/icon1.png"></image>
<image style="width:
15
rpx;height:22rpx" src="../../images/home/icon1.png"></image>
</view>
</view>
<image style="width:86rpx;height:14rpx" src="../../images/home/icon2.png"></image>
<image style="width:86rpx;height:14rpx" src="../../images/home/icon2.png"></image>
...
...
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