Commit 97d594c4 by 严立

Merge branch 'master' of http://120.77.182.185/yanl/mini-shimao

parents b58fec69 398defbc
...@@ -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
...@@ -196,28 +233,14 @@ Page({ ...@@ -196,28 +233,14 @@ Page({
}, },
inspectForm: function () { inspectForm: function () {
let activityTime = this.data.activityTimes[this.data.activityIndex]
if (activityTime.residue*1 == 0) {
this.setData({
isSubmit: false,
errorSession: '',
})
return false
} else {
this.setData({
errorSession: '',
})
}
let complete = true
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: true canSubmit: complete
}) })
return true return complete
}, },
// 活动报名 // 活动报名
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,
......
...@@ -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="{{isSubmit ? 'button' : 'button-disable'}} button row con-c align-c" bindtap="onSubmit">确认报名</button> <button class="{{canSubmit ? 'button' : 'button-disable'}} button row con-c align-c" bindtap="onSubmit">确认报名</button>
</view> </view>
</view> </view>
\ No newline at end of file
...@@ -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 {
......
...@@ -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 {
......
...@@ -17,8 +17,9 @@ Page({ ...@@ -17,8 +17,9 @@ Page({
errorPhone: '', errorPhone: '',
errorQuantity: '', errorQuantity: '',
isSubmit: false, canSubmit: 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({
isSubmit: false, canSubmit: 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({
isSubmit: false, canSubmit: false,
errorPhone: '请输入手机号码' errorPhone: '请输入手机号码'
}) })
return return
} else if (this.data.formPhone.length != 11) { } else if (this.data.formPhone.length != 11) {
this.setData({ this.setData({
isSubmit: false, canSubmit: 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({
isSubmit: false, canSubmit: false,
errorQuantity: '预约人数不能为 0' errorQuantity: '预约人数不能为 0'
}) })
return return
...@@ -160,7 +161,7 @@ Page({ ...@@ -160,7 +161,7 @@ Page({
} }
this.setData({ this.setData({
isSubmit: true canSubmit: true
}) })
}, },
...@@ -170,10 +171,14 @@ Page({ ...@@ -170,10 +171,14 @@ 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',
...@@ -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
})
} }
}) })
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
</view> </view>
<view class="appointment-operation"> <view class="appointment-operation">
<button class="{{isSubmit ? 'button' : 'button-disable'}} row con-c align-c" bindtap="onSubmit">确认预约</button> <button class="{{canSubmit ? '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="{{isSubmit ? 'button' : 'button-disable'}} row con-c align-c" bindtap="onSubmit">确认预约</button> <button class="{{canSubmit ? 'button' : 'button-disable'}} row con-c align-c" bindtap="onSubmit">确认预约</button>
</view> </view>
</view> </view>
\ No newline at end of file
...@@ -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,17 +87,20 @@ ...@@ -87,17 +87,20 @@
</view> </view>
<!-- 游客攻略 --> <!-- 游客攻略 -->
<view class="strategy detail-item" bindtap="onFirstStrategyDetail"> <block wx:if="{{strategyOriginList.length > 0}}">
<image src="./image/title-strategy.png"></image> <view class="strategy detail-item" bindtap="onFirstStrategyDetail">
<view class="strategy-content"> <image src="./image/title-strategy.png"></image>
<image class="background-image" src="{{strategyFirstItem.image}}" mode="aspectFit"></image> <view class="strategy-content">
<view class="operation col"> <image class="background-image" src="{{strategyFirstItem.image}}" mode="aspectFit"></image>
<text>{{strategyFirstItem.title}}</text> <view class="operation col">
<text>{{strategyFirstItem.title}}</text>
</view>
</view> </view>
</view> </view>
</view> <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,19 +56,38 @@ Page({ ...@@ -53,19 +56,38 @@ Page({
nickName: nickName, nickName: nickName,
avatarUrl: avatarUrl, 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 切换点击 * 监听 TabBar 切换点击
...@@ -73,27 +95,30 @@ Page({ ...@@ -73,27 +95,30 @@ Page({
onTabItemTap: function (item) { onTabItemTap: function (item) {
// console.log(item) // console.log(item)
if (item.index == 3) { if (item.index == 3) {
let that = this // this.setData({
app.login({ // tabIn: true,
success: function(token) { // })
let mobile = wx.getStorageSync('mobile') // let that = this
let nickName = wx.getStorageSync('nickName') // app.login({
let avatarUrl = wx.getStorageSync('avatarUrl') // success: function(token) {
let userType = wx.getStorageSync('userType') // let mobile = wx.getStorageSync('mobile')
if (mobile && nickName && avatarUrl) { // let nickName = wx.getStorageSync('nickName')
that.setData({ // let avatarUrl = wx.getStorageSync('avatarUrl')
mobile: that.toHide(mobile), // let userType = wx.getStorageSync('userType')
nickName: nickName, // if (mobile && nickName && avatarUrl) {
avatarUrl: avatarUrl, // that.setData({
type: userType == 1 ? 1 : 0, // mobile: that.toHide(mobile),
}) // nickName: nickName,
} else { // avatarUrl: avatarUrl,
wx.navigateTo({ // type: userType == 1 ? 1 : 0,
url: '../login/login', // })
}) // } else {
} // wx.navigateTo({
} // url: '../login/login',
}) // })
// }
// }
// })
} }
}, },
......
...@@ -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({ that.setData({
data: tmpArr moreData: (that.data.data.length >= res.data.count*1) ? false: true
})
},
fail: function(err) {
that.setData({
loading: false
}) })
} }
}) })
} }
}) })
},
},
onReachBottom: function() {
if (this.data.loading || !this.data.moreData) {
return
}
this.data.pageNo += 1
this.getMyActivityList()
},
}) })
\ No newline at end of file
...@@ -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}}">
......
...@@ -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: 20, pageSize: 10,
pageNo: 1, pageNo: 1,
tagId: '3c95ab1afb3a4d899ac25242c3d089ea', tagId: '101',
}, },
success: function(res) { success: function(res) {
var tmpArr = []; var tmpArr = [];
......
...@@ -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) {
......
...@@ -32,23 +32,22 @@ ...@@ -32,23 +32,22 @@
<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>
<block wx:for="{{relation}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="relation-item row con-b">
<image mode="widthFix" src="{{item.cover}}"></image>
<view class="relation-item-info col">
<text>{{item.title}}</text>
<text>{{item.time}}</text>
<text>{{item.price}}</text>
</view>
<view class="relation-item-more row align-c">
<image src="/image/more.png"></image>
</view>
</view> </view>
</block> <block wx:for="{{relation}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="relation-item row con-b" data-id="{{item.id}}" bindtap="shopDetail">
<image mode="widthFix" src="{{item.cover}}"></image>
<view class="relation-item-info col">
<text>{{item.title}}</text>
<text>{{item.time}}</text>
<text>{{item.price}}</text>
</view>
<view class="relation-item-more row align-c">
<image src="/image/more.png"></image>
</view>
</view>
</block>
</view> </view>
</view> </view>
...@@ -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;
......
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