Commit 398defbc by TengFengLian

用户注册

parent 34b312b9
......@@ -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: [],
......
......@@ -87,6 +87,7 @@
</view>
<!-- 游客攻略 -->
<block wx:if="{{strategyOriginList.length > 0}}">
<view class="strategy detail-item" bindtap="onFirstStrategyDetail">
<image src="./image/title-strategy.png"></image>
<view class="strategy-content">
......@@ -99,5 +100,7 @@
<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
......@@ -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)
}
},
......
......@@ -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,12 +56,7 @@ Page({
nickName: nickName,
avatarUrl: avatarUrl,
})
}
let userType = wx.getStorageSync('userType')
this.setData({
type: userType == 1 ? 1 : 0,
})
let that = this
app.login({
success: function(token) {
that.getMyActivityList()
......@@ -66,34 +64,61 @@ Page({
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')
if (mobile && nickName && avatarUrl) {
that.setData({
mobile: that.toHide(mobile),
nickName: nickName,
avatarUrl: avatarUrl,
type: userType == 1 ? 1 : 0,
})
} else {
} 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',
})
}
},
/**
* 监听 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({
listType: type,
pageSize: 10,
pageNo: 1,
tagId: '3c95ab1afb3a4d899ac25242c3d089ea',
tagId: '101',
},
success: function(res) {
var tmpArr = [];
......
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