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
a01050e5
authored
Aug 26, 2020
by
袁伟伦
Browse files
Options
_('Browse Files')
Download
Plain Diff
合并代码
parents
cfc38586
97d594c4
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
88 additions
and
53 deletions
pages/home/home.js
pages/home/home.wxml
pages/login/login.js
pages/mine/mine.js
pages/play/play.js
pages/strategy/strategy.js
pages/strategy/strategy.wxss
pages/home/home.js
View file @
a01050e5
...
...
@@ -25,11 +25,11 @@ Page({
// strategy 列表数据
strategyFirstItem
:
{
id
:
'
1
'
,
id
:
''
,
index
:
0
,
image
:
'
https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/home/strategy/strategy-00.jpg
'
,
title
:
'
凉爽一夏,在银湖湾听海踏浪
'
,
date
:
'
2020-07-10
'
image
:
''
,
title
:
''
,
date
:
''
},
strategy
:
[],
strategyList
:
[],
...
...
pages/home/home.wxml
View file @
a01050e5
...
...
@@ -87,17 +87,20 @@
</view>
<!-- 游客攻略 -->
<view class="strategy detail-item" bindtap="onFirstStrategyDetail">
<image src="./image/title-strategy.png"></image>
<view class="strategy-content">
<image class="background-image" src="{{strategyFirstItem.image}}" mode="aspectFit"></image>
<view class="operation col">
<text>{{strategyFirstItem.title}}</text>
<block wx:if="{{strategyOriginList.length > 0}}">
<view class="strategy detail-item" bindtap="onFirstStrategyDetail">
<image src="./image/title-strategy.png"></image>
<view class="strategy-content">
<image class="background-image" src="{{strategyFirstItem.image}}" mode="aspectFit"></image>
<view class="operation col">
<text>{{strategyFirstItem.title}}</text>
</view>
</view>
</view>
</view>
<view style="margin-bottom:10px">
<l-water-flow column-gap="14rpx" generic:l-water-flow-item="strategy-item" bind:linitemtap="onStrategyDetail"></l-water-flow>
</view>
<view style="margin-bottom:10px">
<l-water-flow column-gap="14rpx" generic:l-water-flow-item="strategy-item" bind:linitemtap="onStrategyDetail"></l-water-flow>
</view>
</block>
</view>
</view>
\ No newline at end of file
pages/login/login.js
View file @
a01050e5
...
...
@@ -85,9 +85,13 @@ Page({
if
(
this
.
data
.
islogin
&&
this
.
data
.
isphone
)
{
console
.
log
(
'授权及绑定成功'
)
}
else
{
wx
.
switchTab
({
url
:
'../home/home'
,
})
console
.
log
(
'back home'
)
// setTimeout(()=>{
// wx.switchTab({
// url: '/pages/home/home',
// })
// },300)
}
},
...
...
pages/mine/mine.js
View file @
a01050e5
...
...
@@ -11,10 +11,12 @@ Page({
nickName
:
''
,
avatarUrl
:
''
,
mask
:
false
,
type
:
1
,
//判断是否是认证的了
type
:
0
,
//判断是否是认证的了
approveList
:[
'园区门票优惠'
,
'餐厅价格优惠'
,
'SPA服务优惠'
,
'免费观看电影'
,
'无须预约入园'
,
'尽享多重特权'
],
activityList
:
[],
appointmentList
:
[],
tabIn
:
false
,
showIndex
:
0
,
},
//去认证
goApprove
(){
...
...
@@ -44,6 +46,7 @@ Page({
onLoad
:
function
(
options
)
{
},
onShow
:
function
()
{
let
that
=
this
let
mobile
=
wx
.
getStorageSync
(
'mobile'
)
let
nickName
=
wx
.
getStorageSync
(
'nickName'
)
let
avatarUrl
=
wx
.
getStorageSync
(
'avatarUrl'
)
...
...
@@ -53,19 +56,38 @@ Page({
nickName
:
nickName
,
avatarUrl
:
avatarUrl
,
})
app
.
login
({
success
:
function
(
token
)
{
that
.
getMyActivityList
()
that
.
getList
()
that
.
getAuth
()
}
})
let
userType
=
wx
.
getStorageSync
(
'userType'
)
that
.
setData
({
type
:
userType
==
1
?
1
:
0
,
})
}
if
(
this
.
data
.
showIndex
==
0
)
{
that
.
setData
({
tabIn
:
false
,
showIndex
:
1
,
})
wx
.
navigateTo
({
url
:
'../login/login'
,
})
}
else
if
(
this
.
data
.
showIndex
==
1
)
{
that
.
setData
({
tabIn
:
false
,
showIndex
:
0
,
})
wx
.
switchTab
({
url
:
'/pages/home/home'
,
})
}
let
userType
=
wx
.
getStorageSync
(
'userType'
)
this
.
setData
({
type
:
userType
==
1
?
1
:
0
,
})
let
that
=
this
app
.
login
({
success
:
function
(
token
)
{
that
.
getMyActivityList
()
that
.
getList
()
that
.
getAuth
()
}
})
},
/**
* 监听 TabBar 切换点击
...
...
@@ -73,27 +95,30 @@ Page({
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'
)
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'
,
})
}
}
})
// 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/play/play.js
View file @
a01050e5
...
...
@@ -242,7 +242,7 @@ Page({
listType
:
type
,
pageSize
:
10
,
pageNo
:
1
,
tagId
:
'
3c95ab1afb3a4d899ac25242c3d089ea
'
,
tagId
:
'
101
'
,
},
success
:
function
(
res
)
{
var
tmpArr
=
[];
...
...
pages/strategy/strategy.js
View file @
a01050e5
...
...
@@ -129,6 +129,9 @@ Page({
id
=
6
}
else
if
(
datasetId
==
'559d980e9eaf4459883fb3a556d24347'
)
{
// 儿童营地信息
wx
.
navigateTo
({
url
:
'/pages/campsite-mirror/campsite-mirror'
,
})
}
else
if
(
datasetId
==
'c0a2d795a7a54dcd9459dd1b969c1771'
)
{
// 住宿信息
...
...
pages/strategy/strategy.wxss
View file @
a01050e5
...
...
@@ -36,7 +36,6 @@
.detail-title {
width: 670rpx;
min-height: 104rpx;
margin: 80rpx 0 64rpx 0;
font-size: 38rpx;
font-weight: 800;
...
...
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