Commit a01050e5 by 袁伟伦

合并代码

parents cfc38586 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: [],
......
...@@ -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
...@@ -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)
} }
}, },
......
...@@ -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',
// })
// }
// }
// })
} }
}, },
......
...@@ -242,7 +242,7 @@ Page({ ...@@ -242,7 +242,7 @@ Page({
listType: type, listType: type,
pageSize: 10, pageSize: 10,
pageNo: 1, pageNo: 1,
tagId: '3c95ab1afb3a4d899ac25242c3d089ea', tagId: '101',
}, },
success: function(res) { success: function(res) {
var tmpArr = []; var tmpArr = [];
......
...@@ -129,6 +129,9 @@ Page({ ...@@ -129,6 +129,9 @@ Page({
id = 6 id = 6
} else if (datasetId == '559d980e9eaf4459883fb3a556d24347') { } else if (datasetId == '559d980e9eaf4459883fb3a556d24347') {
// 儿童营地信息 // 儿童营地信息
wx.navigateTo({
url: '/pages/campsite-mirror/campsite-mirror',
})
} else if (datasetId == 'c0a2d795a7a54dcd9459dd1b969c1771') { } else if (datasetId == 'c0a2d795a7a54dcd9459dd1b969c1771') {
// 住宿信息 // 住宿信息
......
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
.detail-title { .detail-title {
width: 670rpx; width: 670rpx;
min-height: 104rpx;
margin: 80rpx 0 64rpx 0; margin: 80rpx 0 64rpx 0;
font-size: 38rpx; font-size: 38rpx;
font-weight: 800; font-weight: 800;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment