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
97d594c4
authored
Aug 26, 2020
by
严立
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
http://120.77.182.185/yanl/mini-shimao
parents
b58fec69
398defbc
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
264 additions
and
99 deletions
pages/activity-entry/activity-entry.js
pages/activity-entry/activity-entry.wxml
pages/activity-entry/activity-entry.wxss
pages/activity/activity.wxss
pages/appointment/appointment.js
pages/appointment/appointment.wxml
pages/home/home.js
pages/home/home.wxml
pages/login/login.js
pages/mine/mine.js
pages/myActivity/myActivity.js
pages/myInfo/myInfo.wxml
pages/play/play.js
pages/strategy/strategy.js
pages/strategy/strategy.wxml
pages/strategy/strategy.wxss
pages/activity-entry/activity-entry.js
View file @
97d594c4
...
@@ -22,8 +22,8 @@ Page({
...
@@ -22,8 +22,8 @@ Page({
errorPhone
:
''
,
errorPhone
:
''
,
errorSession
:
''
,
errorSession
:
''
,
errorQuantity
:
''
,
errorQuantity
:
''
,
canSubmit
:
false
,
isSubmit
:
false
,
isSubmit
:
false
,
// 接口参数
// 接口参数
id
:
''
,
id
:
''
,
},
},
...
@@ -66,7 +66,6 @@ Page({
...
@@ -66,7 +66,6 @@ Page({
this
.
setData
({
this
.
setData
({
formInto
:
funcFormInto
formInto
:
funcFormInto
})
})
this
.
inspectForm
()
},
},
onQuantityAdd
:
function
()
{
onQuantityAdd
:
function
()
{
...
@@ -101,8 +100,6 @@ Page({
...
@@ -101,8 +100,6 @@ Page({
formInto
:
funcFormInto
formInto
:
funcFormInto
})
})
this
.
inspectForm
()
},
},
onSelectionDate
:
function
(
event
)
{
onSelectionDate
:
function
(
event
)
{
...
@@ -116,18 +113,21 @@ Page({
...
@@ -116,18 +113,21 @@ Page({
})
})
let
activityTime
=
this
.
data
.
activityTimes
[
this
.
data
.
activityIndex
]
let
activityTime
=
this
.
data
.
activityTimes
[
this
.
data
.
activityIndex
]
if
(
1
==
activityTime
.
enroll
*
1
)
{
if
(
1
==
activityTime
.
enroll
*
1
)
{
this
.
setData
({
this
.
setData
({
errorQuantity
:
'该场次已报名过,请选择其他场次'
,
errorQuantity
:
'该场次已报名过,请选择其他场次'
,
})
})
}
else
if
(
0
==
activityTime
.
residue
*
1
)
{
this
.
setData
({
errorQuantity
:
'该场次人数已满,请选择其他场次'
,
})
}
else
{
}
else
{
this
.
setData
({
this
.
setData
({
errorQuantity
:
''
,
errorQuantity
:
''
,
})
})
}
}
this
.
inspectForm
()
},
},
onServic
:
function
()
{
onServic
:
function
()
{
...
@@ -155,6 +155,7 @@ Page({
...
@@ -155,6 +155,7 @@ Page({
},
},
bindNameInput
:
function
(
e
)
{
bindNameInput
:
function
(
e
)
{
console
.
log
(
e
.
detail
.
value
)
this
.
setData
({
this
.
setData
({
[
'formInto.name'
]:
e
.
detail
.
value
[
'formInto.name'
]:
e
.
detail
.
value
})
})
...
@@ -166,6 +167,42 @@ Page({
...
@@ -166,6 +167,42 @@ Page({
})
})
},
},
onInputBlur
:
function
(
e
)
{
let
type
=
e
.
target
.
dataset
.
type
let
value
=
e
.
detail
.
value
if
(
type
==
'name'
)
{
if
(
value
===
''
)
{
this
.
setData
({
canSubmit
:
false
,
errorName
:
'请输入姓名'
})
return
false
}
else
{
this
.
setData
({
errorName
:
''
})
}
}
else
if
(
type
==
'phone'
)
{
if
(
value
===
''
)
{
this
.
setData
({
canSubmit
:
false
,
errorPhone
:
'请输入手机号码'
})
complete
=
false
}
else
if
(
value
.
length
!=
11
)
{
this
.
setData
({
canSubmit
:
false
,
errorPhone
:
'请输入11位手机号码'
})
complete
=
false
}
else
{
this
.
setData
({
errorPhone
:
''
})
}
}
},
//活动报名页
//活动报名页
getEnrollView
(){
getEnrollView
(){
var
that
=
this
var
that
=
this
...
@@ -197,27 +234,13 @@ Page({
...
@@ -197,27 +234,13 @@ Page({
inspectForm
:
function
()
{
inspectForm
:
function
()
{
let
activityTime
=
this
.
data
.
activityTimes
[
this
.
data
.
activityIndex
]
let
complete
=
true
if
(
activityTime
.
residue
*
1
==
0
)
{
this
.
setData
({
isSubmit
:
false
,
errorSession
:
''
,
})
return
false
}
else
{
this
.
setData
({
errorSession
:
''
,
})
}
let
formInto
=
this
.
data
.
formInto
let
formInto
=
this
.
data
.
formInto
if
(
formInto
.
name
===
''
)
{
if
(
formInto
.
name
===
''
)
{
this
.
setData
({
this
.
setData
({
isSubmit
:
false
,
errorName
:
'请输入姓名'
errorName
:
'请输入姓名'
})
})
return
false
complete
=
false
}
else
{
}
else
{
this
.
setData
({
this
.
setData
({
errorName
:
''
errorName
:
''
...
@@ -226,44 +249,60 @@ Page({
...
@@ -226,44 +249,60 @@ Page({
if
(
formInto
.
phone
===
''
)
{
if
(
formInto
.
phone
===
''
)
{
this
.
setData
({
this
.
setData
({
isSubmit
:
false
,
errorPhone
:
'请输入手机号码'
errorPhone
:
'请输入手机号码'
})
})
return
false
complete
=
false
}
else
if
(
formInto
.
phone
.
length
!=
11
)
{
}
else
if
(
formInto
.
phone
.
length
!=
11
)
{
this
.
setData
({
this
.
setData
({
isSubmit
:
false
,
errorPhone
:
'请输入11位手机号码'
errorPhone
:
'请输入11位手机号码'
})
})
return
false
complete
=
false
}
else
{
}
else
{
this
.
setData
({
this
.
setData
({
errorPhone
:
''
errorPhone
:
''
})
})
}
}
if
(
formInto
.
quantity
===
0
)
{
let
activityTime
=
this
.
data
.
activityTimes
[
this
.
data
.
activityIndex
]
if
(
1
==
activityTime
.
enroll
*
1
)
{
this
.
setData
({
errorQuantity
:
'该场次已报名过,请选择其他场次'
,
})
complete
=
false
}
else
if
(
0
==
activityTime
.
residue
*
1
)
{
this
.
setData
({
errorQuantity
:
'该场次人数已满,请选择其他场次'
,
})
complete
=
false
}
else
if
(
formInto
.
quantity
===
0
)
{
this
.
setData
({
this
.
setData
({
isSubmit
:
false
,
errorQuantity
:
'请设置报名人数'
errorQuantity
:
'请设置报名人数'
})
})
return
false
complete
=
false
}
else
{
this
.
setData
({
errorQuantity
:
''
})
}
}
this
.
setData
({
this
.
setData
({
isSubmit
:
tru
e
canSubmit
:
complet
e
})
})
return
tru
e
return
complet
e
},
},
// 活动报名
// 活动报名
doActivityEnroll
()
{
doActivityEnroll
()
{
if
(
!
this
.
inspectForm
())
{
if
(
!
this
.
inspectForm
()
||
this
.
data
.
isSubmit
)
{
return
return
}
}
this
.
setData
({
isSubmit
:
true
,
})
var
activityTime
=
this
.
data
.
activityTimes
[
this
.
data
.
activityIndex
]
var
activityTime
=
this
.
data
.
activityTimes
[
this
.
data
.
activityIndex
]
let
formInto
=
this
.
data
.
formInto
let
formInto
=
this
.
data
.
formInto
wx
.
lin
.
showToast
({
wx
.
lin
.
showToast
({
...
@@ -283,11 +322,15 @@ Page({
...
@@ -283,11 +322,15 @@ Page({
},
},
success
:
function
(
res
)
{
success
:
function
(
res
)
{
that
.
setData
({
that
.
setData
({
entryComplete
:
true
entryComplete
:
true
,
isSubmit
:
false
,
})
})
wx
.
lin
.
hideToast
()
wx
.
lin
.
hideToast
()
},
},
fail
:
function
(
err
)
{
fail
:
function
(
err
)
{
that
.
setData
({
isSubmit
:
false
,
})
wx
.
lin
.
showToast
({
wx
.
lin
.
showToast
({
icon
:
'error'
,
icon
:
'error'
,
title
:
err
.
msg
,
title
:
err
.
msg
,
...
...
pages/activity-entry/activity-entry.wxml
View file @
97d594c4
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
<text space="ensp">姓 名</text>
<text space="ensp">姓 名</text>
</view>
</view>
<view class="input-wrap row align-c">
<view class="input-wrap row align-c">
<input maxlength="16" class="weui-input" placeholder-class="input-tip" placeholder="请输入名字" bindinput="bindNameInput"></input>
<input maxlength="16" class="weui-input" placeholder-class="input-tip" placeholder="请输入名字"
data-type="name" bindblur="onInputBlur"
bindinput="bindNameInput"></input>
</view>
</view>
</view>
</view>
<view class="form-error row align-c">
<view class="form-error row align-c">
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
<text space="ensp">手 机 号</text>
<text space="ensp">手 机 号</text>
</view>
</view>
<view class="input-wrap row align-c">
<view class="input-wrap row align-c">
<input maxlength="11" type="number" class="weui-input" placeholder-class="input-tip" placeholder="请输入手机号" bindinput="bindPhoneInput"></input>
<input maxlength="11" type="number" class="weui-input" placeholder-class="input-tip" placeholder="请输入手机号"
data-type="phone" bindblur="onInputBlur"
bindinput="bindPhoneInput"></input>
</view>
</view>
</view>
</view>
<view class="form-error row align-c">
<view class="form-error row align-c">
...
@@ -95,6 +95,6 @@
...
@@ -95,6 +95,6 @@
</view>
</view>
<view class="entry-operation">
<view class="entry-operation">
<button class="{{
is
Submit ? 'button' : 'button-disable'}} button row con-c align-c" bindtap="onSubmit">确认报名</button>
<button class="{{
can
Submit ? 'button' : 'button-disable'}} button row con-c align-c" bindtap="onSubmit">确认报名</button>
</view>
</view>
</view>
</view>
\ No newline at end of file
pages/activity-entry/activity-entry.wxss
View file @
97d594c4
...
@@ -63,11 +63,18 @@
...
@@ -63,11 +63,18 @@
.entry-tip-title {
.entry-tip-title {
width: 434rpx;
width: 434rpx;
height: 42rpx;
/* height: 42rpx; */
font-size: 30rpx;
font-size: 30rpx;
font-weight: bold;
font-weight: bold;
color: #15191F;
color: #15191F;
line-height: 42rpx;
line-height: 42rpx;
display: -webkit-box;
overflow: hidden;
white-space: normal;
text-overflow: ellipsis;
word-wrap: break-word;
-webkit-line-clamp:2;
-webkit-box-orient: vertical;
}
}
.entry-tip-date {
.entry-tip-date {
...
...
pages/activity/activity.wxss
View file @
97d594c4
...
@@ -46,6 +46,13 @@
...
@@ -46,6 +46,13 @@
font-weight: bold;
font-weight: bold;
color: #15191F;
color: #15191F;
line-height: 48rpx;
line-height: 48rpx;
display: -webkit-box;
overflow: hidden;
white-space: normal;
text-overflow: ellipsis;
word-wrap: break-word;
-webkit-line-clamp:1;
-webkit-box-orient: vertical;
}
}
.item-date {
.item-date {
...
...
pages/appointment/appointment.js
View file @
97d594c4
...
@@ -17,8 +17,9 @@ Page({
...
@@ -17,8 +17,9 @@ Page({
errorPhone
:
''
,
errorPhone
:
''
,
errorQuantity
:
''
,
errorQuantity
:
''
,
is
Submit
:
false
,
can
Submit
:
false
,
winQuota
:
false
,
winQuota
:
false
,
isSubmit
:
false
,
// 预约入园剩余名额
// 预约入园剩余名额
total
:
0
,
total
:
0
,
...
@@ -119,7 +120,7 @@ Page({
...
@@ -119,7 +120,7 @@ Page({
inspectForm
:
function
()
{
inspectForm
:
function
()
{
if
(
this
.
data
.
formName
===
''
)
{
if
(
this
.
data
.
formName
===
''
)
{
this
.
setData
({
this
.
setData
({
is
Submit
:
false
,
can
Submit
:
false
,
errorName
:
'请输入姓名'
errorName
:
'请输入姓名'
})
})
return
return
...
@@ -131,13 +132,13 @@ Page({
...
@@ -131,13 +132,13 @@ Page({
if
(
this
.
data
.
formPhone
===
''
)
{
if
(
this
.
data
.
formPhone
===
''
)
{
this
.
setData
({
this
.
setData
({
is
Submit
:
false
,
can
Submit
:
false
,
errorPhone
:
'请输入手机号码'
errorPhone
:
'请输入手机号码'
})
})
return
return
}
else
if
(
this
.
data
.
formPhone
.
length
!=
11
)
{
}
else
if
(
this
.
data
.
formPhone
.
length
!=
11
)
{
this
.
setData
({
this
.
setData
({
is
Submit
:
false
,
can
Submit
:
false
,
errorPhone
:
'请输入11位手机号码'
errorPhone
:
'请输入11位手机号码'
})
})
return
return
...
@@ -149,7 +150,7 @@ Page({
...
@@ -149,7 +150,7 @@ Page({
if
(
this
.
data
.
formQuantity
===
0
)
{
if
(
this
.
data
.
formQuantity
===
0
)
{
this
.
setData
({
this
.
setData
({
is
Submit
:
false
,
can
Submit
:
false
,
errorQuantity
:
'预约人数不能为 0'
errorQuantity
:
'预约人数不能为 0'
})
})
return
return
...
@@ -160,7 +161,7 @@ Page({
...
@@ -160,7 +161,7 @@ Page({
}
}
this
.
setData
({
this
.
setData
({
is
Submit
:
true
can
Submit
:
true
})
})
},
},
...
@@ -170,11 +171,15 @@ Page({
...
@@ -170,11 +171,15 @@ Page({
app
.
login
({
app
.
login
({
success
:
function
()
{
success
:
function
()
{
if
(
!
that
.
data
.
isSubmit
)
{
if
(
!
that
.
data
.
canSubmit
||
that
.
data
.
isSubmit
)
{
that
.
inspectForm
()
//
that.inspectForm()
return
return
}
}
that
.
setData
({
isSubmit
:
true
})
wx
.
lin
.
showToast
({
wx
.
lin
.
showToast
({
icon
:
'loading'
,
icon
:
'loading'
,
title
:
'提交中'
,
title
:
'提交中'
,
...
@@ -191,7 +196,8 @@ Page({
...
@@ -191,7 +196,8 @@ Page({
},
},
success
:
function
(
res
)
{
success
:
function
(
res
)
{
that
.
setData
({
that
.
setData
({
appointmentComplete
:
true
appointmentComplete
:
true
,
isSubmit
:
false
})
})
wx
.
lin
.
hideToast
()
wx
.
lin
.
hideToast
()
},
},
...
@@ -200,6 +206,9 @@ Page({
...
@@ -200,6 +206,9 @@ Page({
icon
:
'error'
,
icon
:
'error'
,
title
:
err
.
msg
,
title
:
err
.
msg
,
})
})
that
.
setData
({
isSubmit
:
false
})
}
}
})
})
...
...
pages/appointment/appointment.wxml
View file @
97d594c4
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
</view>
</view>
<view class="appointment-operation">
<view class="appointment-operation">
<button class="{{
is
Submit ? 'button' : 'button-disable'}} row con-c align-c" bindtap="onSubmit">确认预约</button>
<button class="{{
can
Submit ? 'button' : 'button-disable'}} row con-c align-c" bindtap="onSubmit">确认预约</button>
<button class="button-plain row con-c align-c" bindtap="onServic">电话咨询</button>
<button class="button-plain row con-c align-c" bindtap="onServic">电话咨询</button>
</view>
</view>
</view>
</view>
...
@@ -159,6 +159,6 @@
...
@@ -159,6 +159,6 @@
</view>
</view>
<view class="appointment-operation">
<view class="appointment-operation">
<button class="{{
is
Submit ? 'button' : 'button-disable'}} row con-c align-c" bindtap="onSubmit">确认预约</button>
<button class="{{
can
Submit ? 'button' : 'button-disable'}} row con-c align-c" bindtap="onSubmit">确认预约</button>
</view>
</view>
</view>
</view>
\ No newline at end of file
pages/home/home.js
View file @
97d594c4
...
@@ -25,11 +25,11 @@ Page({
...
@@ -25,11 +25,11 @@ Page({
// strategy 列表数据
// strategy 列表数据
strategyFirstItem
:
{
strategyFirstItem
:
{
id
:
'
1
'
,
id
:
''
,
index
:
0
,
index
:
0
,
image
:
'
https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/home/strategy/strategy-00.jpg
'
,
image
:
''
,
title
:
'
凉爽一夏,在银湖湾听海踏浪
'
,
title
:
''
,
date
:
'
2020-07-10
'
date
:
''
},
},
strategy
:
[],
strategy
:
[],
strategyList
:
[],
strategyList
:
[],
...
...
pages/home/home.wxml
View file @
97d594c4
...
@@ -87,6 +87,7 @@
...
@@ -87,6 +87,7 @@
</view>
</view>
<!-- 游客攻略 -->
<!-- 游客攻略 -->
<block wx:if="{{strategyOriginList.length > 0}}">
<view class="strategy detail-item" bindtap="onFirstStrategyDetail">
<view class="strategy detail-item" bindtap="onFirstStrategyDetail">
<image src="./image/title-strategy.png"></image>
<image src="./image/title-strategy.png"></image>
<view class="strategy-content">
<view class="strategy-content">
...
@@ -99,5 +100,7 @@
...
@@ -99,5 +100,7 @@
<view style="margin-bottom:10px">
<view style="margin-bottom:10px">
<l-water-flow column-gap="14rpx" generic:l-water-flow-item="strategy-item" bind:linitemtap="onStrategyDetail"></l-water-flow>
<l-water-flow column-gap="14rpx" generic:l-water-flow-item="strategy-item" bind:linitemtap="onStrategyDetail"></l-water-flow>
</view>
</view>
</block>
</view>
</view>
</view>
</view>
\ No newline at end of file
pages/login/login.js
View file @
97d594c4
...
@@ -85,9 +85,13 @@ Page({
...
@@ -85,9 +85,13 @@ Page({
if
(
this
.
data
.
islogin
&&
this
.
data
.
isphone
)
{
if
(
this
.
data
.
islogin
&&
this
.
data
.
isphone
)
{
console
.
log
(
'授权及绑定成功'
)
console
.
log
(
'授权及绑定成功'
)
}
else
{
}
else
{
wx
.
switchTab
({
console
.
log
(
'back home'
)
url
:
'../home/home'
,
// setTimeout(()=>{
})
// wx.switchTab({
// url: '/pages/home/home',
// })
// },300)
}
}
},
},
...
...
pages/mine/mine.js
View file @
97d594c4
...
@@ -11,10 +11,12 @@ Page({
...
@@ -11,10 +11,12 @@ Page({
nickName
:
''
,
nickName
:
''
,
avatarUrl
:
''
,
avatarUrl
:
''
,
mask
:
false
,
mask
:
false
,
type
:
1
,
//判断是否是认证的了
type
:
0
,
//判断是否是认证的了
approveList
:[
'园区门票优惠'
,
'餐厅价格优惠'
,
'SPA服务优惠'
,
'免费观看电影'
,
'无须预约入园'
,
'尽享多重特权'
],
approveList
:[
'园区门票优惠'
,
'餐厅价格优惠'
,
'SPA服务优惠'
,
'免费观看电影'
,
'无须预约入园'
,
'尽享多重特权'
],
activityList
:
[],
activityList
:
[],
appointmentList
:
[],
appointmentList
:
[],
tabIn
:
false
,
showIndex
:
0
,
},
},
//去认证
//去认证
goApprove
(){
goApprove
(){
...
@@ -44,6 +46,7 @@ Page({
...
@@ -44,6 +46,7 @@ Page({
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
},
},
onShow
:
function
()
{
onShow
:
function
()
{
let
that
=
this
let
mobile
=
wx
.
getStorageSync
(
'mobile'
)
let
mobile
=
wx
.
getStorageSync
(
'mobile'
)
let
nickName
=
wx
.
getStorageSync
(
'nickName'
)
let
nickName
=
wx
.
getStorageSync
(
'nickName'
)
let
avatarUrl
=
wx
.
getStorageSync
(
'avatarUrl'
)
let
avatarUrl
=
wx
.
getStorageSync
(
'avatarUrl'
)
...
@@ -53,12 +56,7 @@ Page({
...
@@ -53,12 +56,7 @@ Page({
nickName
:
nickName
,
nickName
:
nickName
,
avatarUrl
:
avatarUrl
,
avatarUrl
:
avatarUrl
,
})
})
}
let
userType
=
wx
.
getStorageSync
(
'userType'
)
this
.
setData
({
type
:
userType
==
1
?
1
:
0
,
})
let
that
=
this
app
.
login
({
app
.
login
({
success
:
function
(
token
)
{
success
:
function
(
token
)
{
that
.
getMyActivityList
()
that
.
getMyActivityList
()
...
@@ -66,34 +64,61 @@ Page({
...
@@ -66,34 +64,61 @@ Page({
that
.
getAuth
()
that
.
getAuth
()
}
}
})
})
},
/**
* 监听 TabBar 切换点击
*/
onTabItemTap
:
function
(
item
)
{
// console.log(item)
if
(
item
.
index
==
3
)
{
let
that
=
this
app
.
login
({
success
:
function
(
token
)
{
let
mobile
=
wx
.
getStorageSync
(
'mobile'
)
let
nickName
=
wx
.
getStorageSync
(
'nickName'
)
let
avatarUrl
=
wx
.
getStorageSync
(
'avatarUrl'
)
let
userType
=
wx
.
getStorageSync
(
'userType'
)
let
userType
=
wx
.
getStorageSync
(
'userType'
)
if
(
mobile
&&
nickName
&&
avatarUrl
)
{
that
.
setData
({
that
.
setData
({
mobile
:
that
.
toHide
(
mobile
),
nickName
:
nickName
,
avatarUrl
:
avatarUrl
,
type
:
userType
==
1
?
1
:
0
,
type
:
userType
==
1
?
1
:
0
,
})
})
}
else
{
}
if
(
this
.
data
.
showIndex
==
0
)
{
that
.
setData
({
tabIn
:
false
,
showIndex
:
1
,
})
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
'../login/login'
,
url
:
'../login/login'
,
})
})
}
}
else
if
(
this
.
data
.
showIndex
==
1
)
{
}
that
.
setData
({
tabIn
:
false
,
showIndex
:
0
,
})
})
wx
.
switchTab
({
url
:
'/pages/home/home'
,
})
}
},
/**
* 监听 TabBar 切换点击
*/
onTabItemTap
:
function
(
item
)
{
// console.log(item)
if
(
item
.
index
==
3
)
{
// this.setData({
// tabIn: true,
// })
// let that = this
// app.login({
// success: function(token) {
// let mobile = wx.getStorageSync('mobile')
// let nickName = wx.getStorageSync('nickName')
// let avatarUrl = wx.getStorageSync('avatarUrl')
// let userType = wx.getStorageSync('userType')
// if (mobile && nickName && avatarUrl) {
// that.setData({
// mobile: that.toHide(mobile),
// nickName: nickName,
// avatarUrl: avatarUrl,
// type: userType == 1 ? 1 : 0,
// })
// } else {
// wx.navigateTo({
// url: '../login/login',
// })
// }
// }
// })
}
}
},
},
...
...
pages/myActivity/myActivity.js
View file @
97d594c4
...
@@ -16,13 +16,18 @@ Page({
...
@@ -16,13 +16,18 @@ Page({
height
:
0
,
height
:
0
,
data
:[],
data
:[],
active
:
0
,
active
:
0
,
pageNo
:
1
,
pageSize
:
10
,
loading
:
false
,
moreData
:
true
,
},
},
chageNav
(
e
){
chageNav
(
e
){
let
index
=
e
.
currentTarget
.
dataset
.
index
let
index
=
e
.
currentTarget
.
dataset
.
index
this
.
setData
({
this
.
setData
({
active
:
index
active
:
index
,
pageNo
:
1
,
})
})
this
.
getMyActivityList
(
index
)
this
.
getMyActivityList
()
},
},
activityDetail
(
e
){
activityDetail
(
e
){
wx
.
navigateTo
({
wx
.
navigateTo
({
...
@@ -36,7 +41,7 @@ Page({
...
@@ -36,7 +41,7 @@ Page({
this
.
setData
({
this
.
setData
({
height
:
wx
.
getSystemInfoSync
().
windowHeight
,
//获取屏幕的高度
height
:
wx
.
getSystemInfoSync
().
windowHeight
,
//获取屏幕的高度
})
})
this
.
getMyActivityList
(
this
.
data
.
active
)
this
.
getMyActivityList
()
},
},
/**
/**
...
@@ -89,9 +94,9 @@ Page({
...
@@ -89,9 +94,9 @@ Page({
},
},
// 我的活动
// 我的活动
getMyActivityList
(
index
)
{
getMyActivityList
()
{
let
state
=
''
let
state
=
''
switch
(
index
)
{
switch
(
Number
(
this
.
data
.
active
)
)
{
case
0
:
state
=
''
;
break
;
case
0
:
state
=
''
;
break
;
case
1
:
state
=
0
;
break
;
case
1
:
state
=
0
;
break
;
case
2
:
state
=
1
;
break
;
case
2
:
state
=
1
;
break
;
...
@@ -100,9 +105,12 @@ Page({
...
@@ -100,9 +105,12 @@ Page({
var
that
=
this
var
that
=
this
app
.
login
({
app
.
login
({
success
:
function
()
{
success
:
function
()
{
that
.
setData
({
loading
:
true
})
app
.
wxRequest
({
app
.
wxRequest
({
url
:
'/api/v1/activity/getMyActivityList'
,
url
:
'/api/v1/activity/getMyActivityList'
,
data
:
{
activeState
:
state
,
pageSize
:
10
,
pageNo
:
1
},
data
:
{
activeState
:
state
,
pageSize
:
that
.
data
.
pageSize
,
pageNo
:
that
.
data
.
pageNo
},
success
:
function
(
res
)
{
success
:
function
(
res
)
{
let
list
=
res
.
data
.
list
let
list
=
res
.
data
.
list
let
tmpArr
=
[]
let
tmpArr
=
[]
...
@@ -124,13 +132,33 @@ Page({
...
@@ -124,13 +132,33 @@ Page({
}
}
tmpArr
.
push
(
obj
)
tmpArr
.
push
(
obj
)
})
})
if
(
that
.
data
.
pageNo
!=
1
)
{
tmpArr
=
that
.
data
.
data
.
concat
(
tmpArr
)
}
that
.
setData
({
data
:
tmpArr
,
loading
:
false
,
})
that
.
setData
({
moreData
:
(
that
.
data
.
data
.
length
>=
res
.
data
.
count
*
1
)
?
false
:
true
})
},
fail
:
function
(
err
)
{
that
.
setData
({
that
.
setData
({
data
:
tmpArr
loading
:
false
})
})
}
}
})
})
}
}
})
})
},
onReachBottom
:
function
()
{
if
(
this
.
data
.
loading
||
!
this
.
data
.
moreData
)
{
return
}
this
.
data
.
pageNo
+=
1
this
.
getMyActivityList
()
},
},
})
})
\ No newline at end of file
pages/myInfo/myInfo.wxml
View file @
97d594c4
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
</l-list>
</l-list>
<l-list is-hover="{{false}}" l-content-class="menu-title" title="姓名" is-link="{{false}}">
<l-list is-hover="{{false}}" l-content-class="menu-title" title="姓名" is-link="{{false}}">
<view slot="right-section">
<view slot="right-section">
<input style="text-align:right;" placeholder="请填写姓名" placeholder-class="phone" value="{{nickName}}" data-type="name" bindblur="onInputBlur"/>
<input
maxlength="10"
style="text-align:right;" placeholder="请填写姓名" placeholder-class="phone" value="{{nickName}}" data-type="name" bindblur="onInputBlur"/>
</view>
</view>
</l-list>
</l-list>
<l-list is-hover="{{false}}" l-content-class="menu-title" title="性别" is-link="{{false}}">
<l-list is-hover="{{false}}" l-content-class="menu-title" title="性别" is-link="{{false}}">
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
</l-list>
</l-list>
<l-list is-hover="{{false}}" l-content-class="menu-title" title="地址" is-link="{{false}}">
<l-list is-hover="{{false}}" l-content-class="menu-title" title="地址" is-link="{{false}}">
<view slot="right-section">
<view slot="right-section">
<input style="text-align:right;" placeholder="请填写地址" placeholder-class="phone" value="{{address}}" data-type="address" bindblur="onInputBlur"/>
<input
maxlength="30"
style="text-align:right;" placeholder="请填写地址" placeholder-class="phone" value="{{address}}" data-type="address" bindblur="onInputBlur"/>
</view>
</view>
</l-list>
</l-list>
<l-list is-hover="{{false}}" l-content-class="menu-title" title="手机号" is-link="{{false}}">
<l-list is-hover="{{false}}" l-content-class="menu-title" title="手机号" is-link="{{false}}">
...
...
pages/play/play.js
View file @
97d594c4
...
@@ -240,9 +240,9 @@ Page({
...
@@ -240,9 +240,9 @@ Page({
url
:
'/api/v1/activity/getList'
,
url
:
'/api/v1/activity/getList'
,
data
:
{
data
:
{
listType
:
type
,
listType
:
type
,
pageSize
:
2
0
,
pageSize
:
1
0
,
pageNo
:
1
,
pageNo
:
1
,
tagId
:
'
3c95ab1afb3a4d899ac25242c3d089ea
'
,
tagId
:
'
101
'
,
},
},
success
:
function
(
res
)
{
success
:
function
(
res
)
{
var
tmpArr
=
[];
var
tmpArr
=
[];
...
...
pages/strategy/strategy.js
View file @
97d594c4
...
@@ -106,6 +106,44 @@ Page({
...
@@ -106,6 +106,44 @@ Page({
})
})
},
},
shopDetail
(
e
)
{
let
datasetId
=
e
.
currentTarget
.
dataset
.
id
let
id
=
''
if
(
datasetId
==
'21a0cbbd39604380bc46fba38ac5fb63'
)
{
// 海错图展馆
id
=
1
}
else
if
(
datasetId
==
'b8f04379bf164b7f8bca69be14146a17'
)
{
// 拾光花坊
id
=
2
}
else
if
(
datasetId
==
'd8922a8f759245d4949b62693099edb5'
)
{
// 元养水韵SPA馆
id
=
3
}
else
if
(
datasetId
==
'd0e5ff414f794e15bc33c4e11f5356a8'
)
{
// 原味舒食
id
=
4
}
else
if
(
datasetId
==
'81078c007c034d46b7dfe59935d84f7a'
)
{
// 原野MOJITO
id
=
5
}
else
if
(
datasetId
==
'29e79743f0f94e5eb726e0ebdfe64248'
)
{
// 星空影院
id
=
6
}
else
if
(
datasetId
==
'559d980e9eaf4459883fb3a556d24347'
)
{
// 儿童营地信息
wx
.
navigateTo
({
url
:
'/pages/campsite-mirror/campsite-mirror'
,
})
}
else
if
(
datasetId
==
'c0a2d795a7a54dcd9459dd1b969c1771'
)
{
// 住宿信息
}
if
(
id
!=
''
)
{
wx
.
navigateTo
({
url
:
'/pages/shop-detail/shop-detail?id='
+
id
})
}
},
// 攻略详情文中提及
// 攻略详情文中提及
getParksByParkIds
(
parkIds
)
{
getParksByParkIds
(
parkIds
)
{
if
(
!
parkIds
)
{
if
(
!
parkIds
)
{
...
...
pages/strategy/strategy.wxml
View file @
97d594c4
...
@@ -32,13 +32,12 @@
...
@@ -32,13 +32,12 @@
<text>{{date}}</text>
<text>{{date}}</text>
</view>
</view>
</view>
</view>
<view class="relation" wx:if="{{relation.length>0}}">
<view class="relation" wx:if="{{relation.length>0}}">
<view class="relation-title">
<view class="relation-title">
<text>文中提及</text>
<text>文中提及</text>
</view>
</view>
<block wx:for="{{relation}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<block wx:for="{{relation}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="relation-item row con-b
">
<view class="relation-item row con-b" data-id="{{item.id}}" bindtap="shopDetail
">
<image mode="widthFix" src="{{item.cover}}"></image>
<image mode="widthFix" src="{{item.cover}}"></image>
<view class="relation-item-info col">
<view class="relation-item-info col">
<text>{{item.title}}</text>
<text>{{item.title}}</text>
...
...
pages/strategy/strategy.wxss
View file @
97d594c4
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
}
}
.detail-date {
.detail-date {
width: 152rpx;
/* width: 152rpx; */
height: 40rpx;
height: 40rpx;
margin: 64rpx 0 32rpx 0;
margin: 64rpx 0 32rpx 0;
font-size: 26rpx;
font-size: 26rpx;
...
...
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