Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
严立
/
mini-shimao
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
fed352b1
authored
Aug 20, 2020
by
TengFengLian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update
parent
3effb392
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
96 additions
and
41 deletions
pages/activity-entry/activity-entry.js
pages/home/home.js
pages/home/home.wxml
pages/mine/mine.js
pages/play/play.js
pages/play/play.wxml
pages/activity-entry/activity-entry.js
View file @
fed352b1
...
@@ -101,6 +101,8 @@ Page({
...
@@ -101,6 +101,8 @@ Page({
[
'formInto.quantity'
]:
0
[
'formInto.quantity'
]:
0
})
})
this
.
inspectForm
()
},
},
onServic
:
function
()
{
onServic
:
function
()
{
...
@@ -167,6 +169,10 @@ Page({
...
@@ -167,6 +169,10 @@ Page({
errorSession
:
'该场次已没剩余名额'
,
errorSession
:
'该场次已没剩余名额'
,
})
})
return
false
return
false
}
else
{
this
.
setData
({
errorSession
:
''
,
})
}
}
...
@@ -223,38 +229,8 @@ Page({
...
@@ -223,38 +229,8 @@ Page({
if
(
!
this
.
inspectForm
())
{
if
(
!
this
.
inspectForm
())
{
return
return
}
}
// var activityTime = this.data.activityTimes[this.data.activityIndex]
var
activityTime
=
this
.
data
.
activityTimes
[
this
.
data
.
activityIndex
]
// console.log(activityTime)
let
formInto
=
this
.
data
.
formInto
// if (activityTime.residue*1 == 0) {
// wx.lin.showToast({
// title: '该场次已没剩余名额',
// icon: 'error',
// })
// return
// }
// let formInto = this.data.formInto
// if (formInto.name == ''){
// wx.lin.showToast({
// title: '请输入名字',
// icon: 'error',
// })
// return
// }
// if (formInto.phone == ''){
// wx.lin.showToast({
// title: '请输入手机号',
// icon: 'error',
// })
// return
// }
// if (formInto.quantity == 0){
// wx.lin.showToast({
// title: '请设置报名人数',
// icon: 'error',
// })
// return
// }
wx
.
lin
.
showToast
({
wx
.
lin
.
showToast
({
icon
:
'loading'
,
icon
:
'loading'
,
title
:
'提交中'
,
title
:
'提交中'
,
...
...
pages/home/home.js
View file @
fed352b1
...
@@ -41,11 +41,12 @@ Page({
...
@@ -41,11 +41,12 @@ Page({
},
},
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
this
.
queryBanner
()
//
this.queryBanner()
// this.queryStrategy()
// this.queryStrategy()
this
.
setNavigationLogo
()
this
.
setNavigationLogo
()
//
//
this
.
getBanner
()
this
.
loadVisiterPlanList
()
this
.
loadVisiterPlanList
()
},
},
...
@@ -219,6 +220,23 @@ Page({
...
@@ -219,6 +220,23 @@ Page({
},
40
)
},
40
)
},
},
bannerClick
(
e
)
{
console
.
log
(
e
.
currentTarget
.
dataset
.
item
)
},
getBanner
()
{
var
that
=
this
app
.
wxRequest
({
url
:
'/api/v1/banner/getList'
,
success
:
function
(
res
)
{
that
.
setData
({
banner
:
res
.
data
})
}
})
},
// 游客攻略列表
// 游客攻略列表
loadVisiterPlanList
()
{
loadVisiterPlanList
()
{
this
.
data
.
loading
=
true
this
.
data
.
loading
=
true
...
...
pages/home/home.wxml
View file @
fed352b1
...
@@ -7,8 +7,8 @@
...
@@ -7,8 +7,8 @@
<view id="banner" class="banner">
<view id="banner" class="banner">
<swiper autoplay circular class="banner-swiper" indicator-dots="{{false}}" interval="2000" duration="500" bindchange="onSwiperChange">
<swiper autoplay circular class="banner-swiper" indicator-dots="{{false}}" interval="2000" duration="500" bindchange="onSwiperChange">
<block wx:for="{{banner}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<block wx:for="{{banner}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item class="banner-swiper-item">
<swiper-item class="banner-swiper-item"
data-item="{{item}}" bindtap="bannerClick"
>
<image class="banner-swiper-image" src="{{item}}"></image>
<image class="banner-swiper-image" src="{{item
.img
}}"></image>
</swiper-item>
</swiper-item>
</block>
</block>
</swiper>
</swiper>
...
...
pages/mine/mine.js
View file @
fed352b1
import
iRequest
from
'../../utils/request/corvus.js'
import
iRequest
from
'../../utils/request/corvus.js'
const
app
=
getApp
()
Page
({
Page
({
...
@@ -18,7 +19,9 @@ Page({
...
@@ -18,7 +19,9 @@ Page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
},
onShow
:
function
()
{
this
.
getMyActivityList
()
},
},
getUserInfo
:
function
(
funcEvent
)
{
getUserInfo
:
function
(
funcEvent
)
{
console
.
log
(
funcEvent
)
console
.
log
(
funcEvent
)
...
@@ -56,5 +59,18 @@ Page({
...
@@ -56,5 +59,18 @@ Page({
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
'../myInfo/myInfo'
,
url
:
'../myInfo/myInfo'
,
})
})
}
},
// 我的活动
getMyActivityList
()
{
var
that
=
this
app
.
wxRequest
({
url
:
'/api/v1/activity/getMyActivityList'
,
data
:
{
activeState
:
'0,1'
,
pageSize
:
10
,
pageNo
:
1
},
success
:
function
(
res
)
{
}
})
},
})
})
\ No newline at end of file
pages/play/play.js
View file @
fed352b1
...
@@ -196,9 +196,10 @@ Page({
...
@@ -196,9 +196,10 @@ Page({
},
},
onActivityDetail
:
function
(
funcItem
)
{
onActivityDetail
:
function
(
funcItem
)
{
wx
.
navigateTo
({
console
.
log
(
funcItem
)
url
:
'/pages/activity-detail/activity-detail'
// wx.navigateTo({
})
// url: '/pages/activity-detail/activity-detail'
// })
},
},
onTabSelection
:
function
(
funcEvent
)
{
onTabSelection
:
function
(
funcEvent
)
{
...
@@ -258,4 +259,46 @@ Page({
...
@@ -258,4 +259,46 @@ Page({
bannerIndex
:
event
.
detail
.
current
bannerIndex
:
event
.
detail
.
current
})
})
},
},
//主题活动列表 type 1 近期 0 往期
getActivityList
(
type
){
var
that
=
this
app
.
wxRequest
({
url
:
'/api/v1/activity/getList'
,
data
:
{
listType
:
type
,
pageSize
:
20
,
pageNo
:
1
,
},
success
:
function
(
res
)
{
var
tmpArr
=
[];
res
.
data
.
list
.
forEach
(
item
=>
{
var
tmpItem
=
{
id
:
item
.
id
,
cover
:
item
.
cover
,
title
:
item
.
name
,
date
:
item
.
activeDate
+
' '
+
item
.
activeTime
,
//'6月30日-7月12日 10:00-12:00',
describe
:
item
.
summary
,
beginDate
:
item
.
activeDate
.
split
(
'-'
)[
0
],
}
tmpArr
.
push
(
tmpItem
)
})
// 活动开始时间倒序排序
tmpArr
.
sort
(
function
(
a
,
b
)
{
return
new
Date
(
b
.
beginDate
.
replace
(
/月/g
,
"\/"
).
replace
(
/日/g
,
"\/"
))
-
new
Date
(
a
.
beginDate
.
replace
(
/月/g
,
"\/"
).
replace
(
/日/g
,
"\/"
))
})
if
(
type
==
1
)
{
that
.
setData
({
banner
:
tmpArr
})
}
else
{
that
.
setData
({
other
:
tmpArr
})
}
}
})
}
})
})
\ No newline at end of file
pages/play/play.wxml
View file @
fed352b1
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<swiper autoplay circular interval="2000" next-margin="64rpx" bindchange="eventBannerChange">
<swiper autoplay circular interval="2000" next-margin="64rpx" bindchange="eventBannerChange">
<block wx:for="{{banner}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<block wx:for="{{banner}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item>
<swiper-item>
<image src="{{item}}" class="{{bannerIndex !== index ? 'banner-content': 'banner-content-active'}}" bindtap="onActivityDetail"/>
<image src="{{item}}" class="{{bannerIndex !== index ? 'banner-content': 'banner-content-active'}}"
data-item="{{item}}"
bindtap="onActivityDetail"/>
</swiper-item>
</swiper-item>
</block>
</block>
</swiper>
</swiper>
...
...
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