Commit c2acc8b4 by wjw

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

# Conflicts:
#	pages/play/service-detail/service-detail.js
#	pages/play/service-detail/service-detail.wxml

Signed-off-by: wjw <364716925@qq.com>
parents 45cb8b11 749e8459
let App = getApp() let App = getApp()
Page({ let logicData = {
pageScrollLock: false,
pageScrollTimer: 0,
}
Page({
data: { data: {
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase, resourcesBase: App.globalData.appResourcesBase,
// 导航栏相关属性
navigationStyle: {
normal: {
backIcon: '/image/back-w.png',
color: '#FFFFFF',
background: 'rgba(255, 255, 255, 0)'
},
change: {
backIcon: '/image/back.png',
color: '#000000',
background: 'rgba(255, 255, 255, 1)'
},
scroll: '600rpx',
},
navigationScroll: 0,
navbarTitle: '', navbarTitle: '',
banner: '', banner: '',
bgColor: '', bgColor: '',
buyText: '', buyText: '',
unitText: '', unitText: '',
shopInfo: {},
userInfo: {}, userInfo: {},
commodityList: [], commodityList: [],
}, },
...@@ -36,7 +57,7 @@ Page({ ...@@ -36,7 +57,7 @@ Page({
case 3: case 3:
this.setData({ this.setData({
navbarTitle: '儿童营地', navbarTitle: '儿童营地入园购票',
banner: 'service/detail-banner-3.png', banner: 'service/detail-banner-3.png',
bgColor: '#F6DADA', bgColor: '#F6DADA',
buyText: '购买门票', buyText: '购买门票',
...@@ -313,6 +334,11 @@ Page({ ...@@ -313,6 +334,11 @@ Page({
* @returns * @returns
*/ */
onBuy: function (event) { onBuy: function (event) {
if (this.data.shopInfo.appId === 7) {
this.onCommodityDetail(event)
return
}
let funcCommodityInfo = event.currentTarget.dataset.item let funcCommodityInfo = event.currentTarget.dataset.item
// 补充必要参数 // 补充必要参数
...@@ -326,4 +352,20 @@ Page({ ...@@ -326,4 +352,20 @@ Page({
url: '/pages/pay/order-input/order-input?type=' + funcCommodityInfo.typeId url: '/pages/pay/order-input/order-input?type=' + funcCommodityInfo.typeId
}) })
}, },
onPageScroll: function (funcEvent) {
// 优化滚动事件触发频率
if (logicData.pageScrollLock) return
logicData.pageScrollLock = true
this.setData({
navigationScroll: funcEvent.scrollTop
})
// 恢复滚动事件
logicData.pageScrollTimer = setTimeout(function () {
logicData.pageScrollLock = false
clearTimeout(logicData.pageScrollTimer)
}, 10)
},
}) })
\ No newline at end of file
<navigation class="navigation" titleText="{{navbarTitle}}" backIcon="/image/back.png"></navigation> <navigation class="navigation" titleText="{{navbarTitle}}" scrollStyle="{{navigationStyle}}" scrollHeight="{{navigationScroll}}"></navigation>
<view class="container con-s" style="background: {{bgColor}}"> <view class="container con-s" style="background: {{bgColor}}">
<view class="background-img"> <view class="background-img">
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</view> </view>
<block wx:for="{{commodityList}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{commodityList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="project-wrapper col" data-item="{{item}}" bindtap="onCommodityDetail"> <view class="project-wrapper col" data-item="{{item}}" bindtap="onBuy">
<view class="project-cover"> <view class="project-cover">
<image src="{{item.cover}}"></image> <image src="{{item.cover}}"></image>
</view> </view>
......
let App = getApp() let App = getApp()
let logicData = {
pageScrollLock: false,
pageScrollTimer: 0,
}
Page({ Page({
data: { data: {
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase, resourcesBase: App.globalData.appResourcesBase,
// 导航栏相关属性
navigationStyle: {
normal: {
backIcon: '/image/back-w.png',
color: '#FFFFFF',
background: 'rgba(255, 255, 255, 0)'
},
change: {
backIcon: '/image/back.png',
color: '#000000',
background: 'rgba(255, 255, 255, 1)'
},
scroll: '600rpx',
},
navigationScroll: 0,
banner: [], banner: [],
bannerIndex: 0, bannerIndex: 0,
...@@ -29,48 +48,35 @@ Page({ ...@@ -29,48 +48,35 @@ Page({
}, },
onLoad: function (options) { onLoad: function (options) {
this.queryBanner()
for (let i = 0, l = this.data.shopAppId.length; i < l; i++) { for (let i = 0, l = this.data.shopAppId.length; i < l; i++) {
this.queryBanner(this.data.shopAppId[i].appId, i)
this.queryPassCheck(this.data.shopAppId[i].appId, this.data.shopAppId[i].commodityType, i) this.queryPassCheck(this.data.shopAppId[i].appId, this.data.shopAppId[i].commodityType, i)
} }
}, },
queryBanner: function (funcShopAppId, funcIndex) { queryBanner: function () {
let funcType = ''
switch (funcShopAppId) {
case 1:
funcType = 3
break
case 3:
funcType = 2
if (funcIndex === 3) funcIndex = 2
break
case 7:
funcType = 4
break
}
App.wxRequest({ App.wxRequest({
url: '/api/v1/banner/getOfficeByBanner', url: '/api/v1/banner/getOfficeByBanner',
data: { data: {
'smColumnId': funcType, 'smColumnId': 1,
}, },
success: (response) => { success: (response) => {
let funcResponse = response.data let funcResponse = response.data
let funcBanner = this.data.banner
if (funcResponse.length) { let funcList = []
funcBanner[funcIndex] = funcResponse[0].img for (let i = 0, l = funcResponse.length; i < l; i++) {
} else { let funcItem = {
funcBanner[funcIndex] = '' 'id': funcResponse[i].id,
'cover': funcResponse[i].img
}
funcList.push(funcItem)
} }
this.setData({ this.setData({
banner: funcBanner banner: funcList
}) })
console.log(funcBanner) console.log(this.data.banner)
} }
}) })
}, },
...@@ -262,6 +268,22 @@ Page({ ...@@ -262,6 +268,22 @@ Page({
}) })
}, },
onPageScroll: function (funcEvent) {
// 优化滚动事件触发频率
if (logicData.pageScrollLock) return
logicData.pageScrollLock = true
this.setData({
navigationScroll: funcEvent.scrollTop
})
// 恢复滚动事件
logicData.pageScrollTimer = setTimeout(function () {
logicData.pageScrollLock = false
clearTimeout(logicData.pageScrollTimer)
}, 10)
},
/** /**
* banner 切换图片同步自定义标识组件 * banner 切换图片同步自定义标识组件
* @function * @function
......
<navigation class="navigation" titleText="所有项目服务" color="#FFFFFF" backIcon="/image/back-w.png"></navigation> <navigation class="navigation" titleText="所有项目服务" scrollStyle="{{navigationStyle}}" scrollHeight="{{navigationScroll}}"></navigation>
<view class="container"> <view class="container">
<view class="banner"> <view class="banner">
<swiper autoplay circular class="banner-swiper" indicator-dots="{{false}}" interval="5000" duration="500" bindchange="eventSwiperChange"> <swiper autoplay circular class="banner-swiper" indicator-dots="{{false}}" interval="5000" duration="500" bindchange="eventSwiperChange">
<block wx:for="{{banner}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{banner}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item class="banner-swiper-item" data-item="{{item}}" bindtap="bannerClick"> <swiper-item class="banner-swiper-item" data-item="{{item}}" bindtap="bannerClick">
<image class="banner-swiper-image" src="{{item}}"></image> <image class="banner-swiper-image" src="{{item.cover}}"></image>
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</view> </view>
<view class="commodity-list"> <view class="commodity-list">
<block wx:for="{{shopCommodityData[0]}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{shopCommodityData[0]}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="commodity-item row"> <view class="commodity-item row" data-index="{{0}}" data-itemindex="{{index}}" bindtap="onBuy">
<view class="commodity-cover"> <view class="commodity-cover">
<image src="{{item.cover}}"></image> <image src="{{item.cover}}"></image>
</view> </view>
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
</block> </block>
<view class="commodity-price-operation row con-e align-c"> <view class="commodity-price-operation row con-e align-c">
<button class="row con-c align-c" data-index="{{0}}" data-itemindex="{{index}}" bindtap="onBuy">购买门票</button> <button class="row con-c align-c">购买门票</button>
</view> </view>
</view> </view>
</view> </view>
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
</view> </view>
<view class="commodity-list"> <view class="commodity-list">
<block wx:for="{{shopCommodityData[1]}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{shopCommodityData[1]}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="commodity-item row"> <view class="commodity-item row" data-index="{{1}}" data-itemindex="{{index}}" bindtap="onBuyService">
<view class="commodity-cover"> <view class="commodity-cover">
<image src="{{item.cover}}"></image> <image src="{{item.cover}}"></image>
</view> </view>
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
</block> </block>
<view class="commodity-price-operation row con-e align-c"> <view class="commodity-price-operation row con-e align-c">
<button class="row con-c align-c" data-index="{{1}}" data-itemindex="{{index}}" bindtap="onBuyService">查看服务</button> <button class="row con-c align-c">查看服务</button>
</view> </view>
</view> </view>
</view> </view>
...@@ -176,7 +176,7 @@ ...@@ -176,7 +176,7 @@
</view> </view>
<view class="commodity-list"> <view class="commodity-list">
<block wx:for="{{shopCommodityData[2]}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{shopCommodityData[2]}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="commodity-item row"> <view class="commodity-item row" data-index="{{2}}" data-itemindex="{{index}}" bindtap="onBuy">
<view class="commodity-cover"> <view class="commodity-cover">
<image src="{{item.cover}}"></image> <image src="{{item.cover}}"></image>
</view> </view>
...@@ -226,14 +226,14 @@ ...@@ -226,14 +226,14 @@
</block> </block>
<view class="commodity-price-operation row con-e align-c"> <view class="commodity-price-operation row con-e align-c">
<button class="row con-c align-c" data-index="{{2}}" data-itemindex="{{index}}" bindtap="onBuy">购买门票</button> <button class="row con-c align-c">购买门票</button>
</view> </view>
</view> </view>
</view> </view>
</block> </block>
<block wx:for="{{shopCommodityData[3]}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{shopCommodityData[3]}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="commodity-item row"> <view class="commodity-item row" data-index="{{3}}" data-itemindex="{{index}}" bindtap="onBuy">
<view class="commodity-cover"> <view class="commodity-cover">
<image src="{{item.cover}}"></image> <image src="{{item.cover}}"></image>
</view> </view>
...@@ -283,7 +283,7 @@ ...@@ -283,7 +283,7 @@
</block> </block>
<view class="commodity-price-operation row con-e align-c"> <view class="commodity-price-operation row con-e align-c">
<button class="row con-c align-c" data-index="{{3}}" data-itemindex="{{index}}" bindtap="onBuy">购买门票</button> <button class="row con-c align-c">购买门票</button>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -110,7 +110,7 @@ let output = [ ...@@ -110,7 +110,7 @@ let output = [
}, { }, {
x: 2794, x: 2794,
y: 600, y: 600,
id: '', id: 3,
name: '儿童营地', name: '儿童营地',
icon: './image/icon/13.png', icon: './image/icon/13.png',
card: 'guide/card/13.png', card: 'guide/card/13.png',
......
// pages/hotelAccommodation/hotelAccommodation.js const App = getApp()
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
...@@ -12,6 +11,9 @@ Page({ ...@@ -12,6 +11,9 @@ Page({
mobile: '', mobile: '',
num: '', num: '',
time: '', time: '',
tickerInfo: {},
isDoing: false,
isShowCancel: false
}, },
showHotline() { showHotline() {
...@@ -19,6 +21,65 @@ Page({ ...@@ -19,6 +21,65 @@ Page({
hotline: true hotline: true
}) })
}, },
//取消预约
onCancel: function (event) {
let that = this
if (this.data.isDoing) return
wx.lin.showDialog({
type: "confirm",
title: "",
content: "是否确认取消预约",
success: (res) => {
if (res.confirm) {
console.log('用户点击确定')
wx.showLoading({
title: '处理中',
mask: true
})
this.setData({
isDoing: true
})
App.wxRequest({
url: '/api/v1/subscribe/cancelSubscribe',
data: {
'id': that.data.tickerInfo.id
},
success: (response) => {
wx.hideLoading()
that.setData({
isDoing: false
})
wx.lin.showToast({
image: '/image/success.png',
title: '取消成功',
})
setTimeout(() => {
let type = that.data.type
let tabType = 2
if (type == 0) {
//返回夜间入园预约列表
tabType = 1
} else {
// 返回看房预约
tabType = 2
}
wx.redirectTo({
url: '/pages/mine/appointment/appointment?tab=' + tabType,
})
}, 2000);
}
})
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
},
//客服热线拨打 //客服热线拨打
call() { call() {
wx.makePhoneCall({ wx.makePhoneCall({
...@@ -39,12 +100,23 @@ Page({ ...@@ -39,12 +100,23 @@ Page({
console.log('.............', options.detail) console.log('.............', options.detail)
let detail = JSON.parse(options.detail); let detail = JSON.parse(options.detail);
console.log(detail); console.log(detail);
let yyDate = detail.subscribeDate ? Date.parse(detail.subscribeDate.replace(/-/, '/')) : 0
let nowStr=new Date().toLocaleString().substr(0,10)+" 00:00:00"
let now = Date.parse(nowStr)
console.log(yyDate, 'yyDateyyDateyyDateyyDateyyDate');
console.log(nowStr, 'nowStr');
console.log(now, 'now');
let isShowCancel = now <= yyDate
this.setData({ this.setData({
tickerInfo: detail,
type: detail.type, type: detail.type,
name: detail.name, name: detail.name,
mobile: detail.mobile, mobile: detail.mobile,
num: detail.num, num: detail.num,
time: detail.time, time: detail.time,
isShowCancel
}) })
}, },
}) })
\ No newline at end of file
...@@ -35,12 +35,16 @@ ...@@ -35,12 +35,16 @@
</view> </view>
<image src="http://sm-web.meiqicloud.com/userfiles/appResources/appointment/night/ornament-1.png" class="thanks"></image> <image src="http://sm-web.meiqicloud.com/userfiles/appResources/appointment/night/ornament-1.png" class="thanks"></image>
</view> </view>
<view class="bottom-btns"> <view class="bottom-btns" wx:if="{{isShowCancel}}">
<view class="custom" bindtap="showHotline">客服咨询</view> <view class="custom margin-right-20" bindtap="onCancel">取消预约</view>
<view class="custom" bindtap="showHotline">客服咨询</view> <view class="custom" bindtap="showHotline">客服咨询</view>
</view> </view>
<view wx:else class="custom" bindtap="showHotline">客服咨询</view>
</view> </view>
</view> </view>
<l-dialog />
<l-toast l-image-class="toast-image"></l-toast>
<!-- 客服热线 --> <!-- 客服热线 -->
<l-arc-popup show="{{hotline}}" arc-radius="30"> <l-arc-popup show="{{hotline}}" arc-radius="30">
......
...@@ -127,3 +127,6 @@ ...@@ -127,3 +127,6 @@
.bottom-btns { .bottom-btns {
display: flex; display: flex;
} }
.margin-right-20{
margin-right: 20rpx;
}
\ No newline at end of file
...@@ -12,9 +12,11 @@ Page({ ...@@ -12,9 +12,11 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
isFinished: false,
option: {}, option: {},
isDoing: false, isDoing: false,
pageNo: 1, pageNo: 1,
pageSize: 10,
// 导航栏相关属性 // 导航栏相关属性
navigationStyle: { navigationStyle: {
normal: { normal: {
...@@ -109,11 +111,12 @@ Page({ ...@@ -109,11 +111,12 @@ Page({
// 点击导航切换,默认是全部的 // 点击导航切换,默认是全部的
chageNav(e) { chageNav(e) {
let index = e.currentTarget.dataset.index let index = e.currentTarget.dataset.index
console.log(index, 'nav----------');
if (index === 0) { if (index === 0) {
this.setData({ this.setData({
pageNo: 1, pageNo: 1,
activityList: [] activityList: [],
isFinished: false
}) })
this.getActivity() this.getActivity()
} else { } else {
...@@ -247,15 +250,17 @@ Page({ ...@@ -247,15 +250,17 @@ Page({
}, },
// 我的活动 // 我的活动
getActivity: function () { getActivity: function () {
if (this.data.isFinished) return
let that = this let that = this
wx.showLoading({ wx.showLoading({
title: '加载中', title: '加载中',
mask:true
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/activity/getMyActivityList', url: '/api/v1/activity/getMyActivityList',
data: { data: {
activeState: '', //""全部 0 未开始 1进行中 2已结束 activeState: '', //""全部 0 未开始 1进行中 2已结束
pageSize: '10', pageSize: this.data.pageSize,
pageNo: this.data.pageNo, pageNo: this.data.pageNo,
type: '1' type: '1'
}, },
...@@ -264,6 +269,11 @@ Page({ ...@@ -264,6 +269,11 @@ Page({
success: (res) => {}, success: (res) => {},
}) })
let funcData = res.data.list let funcData = res.data.list
if (funcData.length < that.data.pageSize) {
that.setData({
isFinished: true
})
}
let tmpArr = [] let tmpArr = []
funcData.forEach(item => { funcData.forEach(item => {
let obj = { let obj = {
...@@ -281,7 +291,7 @@ Page({ ...@@ -281,7 +291,7 @@ Page({
tmpArr.push(obj) tmpArr.push(obj)
}) })
that.setData({ that.setData({
activityList: tmpArr activityList: that.data.activityList.concat(tmpArr)
}) })
} }
}) })
...@@ -301,6 +311,7 @@ Page({ ...@@ -301,6 +311,7 @@ Page({
let that = this let that = this
wx.showLoading({ wx.showLoading({
title: '加载中', title: '加载中',
mask:true
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/subscribe/getList', url: '/api/v1/subscribe/getList',
...@@ -336,7 +347,7 @@ Page({ ...@@ -336,7 +347,7 @@ Page({
id: item.id, id: item.id,
mobile: item.mobile, mobile: item.mobile,
name: item.name, name: item.name,
subscribeDate: item.subscribeDate
} }
tmpArr.push(obj) tmpArr.push(obj)
}) })
...@@ -355,7 +366,6 @@ Page({ ...@@ -355,7 +366,6 @@ Page({
if (this.data.active == 0) { if (this.data.active == 0) {
this.getActivity() this.getActivity()
} }
}, },
// 导航栏返回事件。 // 导航栏返回事件。
......
...@@ -225,11 +225,11 @@ ...@@ -225,11 +225,11 @@
<view class="noActive" wx:if="{{data.length === 0 && active === 1}}"> <view class="noActive" wx:if="{{data.length === 0 && active === 1}}">
<view class="noActive-title">暂无夜间入园预约</view> <view class="noActive-title">暂无夜间入园预约</view>
<view class="noActive-rule">20:00后入园需要提前预约,每日限流200人</view> <view class="noActive-rule">20:00后入园需要提前预约,每日限流200人</view>
<view class="noActive-botton" data-index="2" bindtap="goAppoint">去预约</view> <view class="noActive-botton" data-index="1" bindtap="goAppoint">去预约</view>
</view> </view>
<view class="noActive" wx:if="{{data.length === 0 && active === 2}}"> <view class="noActive" wx:if="{{data.length === 0 && active === 2}}">
<view class="noActive-title">暂无看房预约</view> <view class="noActive-title">暂无看房预约</view>
<view class="noActive-botton" data-index="1" bindtap="goAppoint">去预约</view> <view class="noActive-botton" data-index="2" bindtap="goAppoint">去预约</view>
</view> </view>
<!-- 主题活动数据为空 --> <!-- 主题活动数据为空 -->
<view class="noActive" wx:if="{{activityList.length === 0 && active === 0}}"> <view class="noActive" wx:if="{{activityList.length === 0 && active === 0}}">
......
...@@ -267,7 +267,7 @@ Page({ ...@@ -267,7 +267,7 @@ Page({
} }
}) })
}, },
//活动预约统计 //获取活动预约统计
getCountEnrollSubscribe() { getCountEnrollSubscribe() {
let that = this let that = this
App.wxRequest({ App.wxRequest({
...@@ -406,14 +406,14 @@ Page({ ...@@ -406,14 +406,14 @@ Page({
} }
}, },
// 我的活动 // 获取我的活动
getMyActivityList() { getMyActivityList() {
var that = this var that = this
App.wxRequest({ App.wxRequest({
url: '/api/v1/activity/getMyActivityList', url: '/api/v1/activity/getMyActivityList',
data: { data: {
activeState: '1', activeState: '1',
pageSize: 2, pageSize: -1,
pageNo: 1, pageNo: 1,
type: 1 type: 1
}, },
......
...@@ -232,7 +232,8 @@ ...@@ -232,7 +232,8 @@
<view class="order-activity-icon-wrapper col align-c" data-type='0' bindtap="goAppointment"> <view class="order-activity-icon-wrapper col align-c" data-type='0' bindtap="goAppointment">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/yy_theme.png'}}"></image> <image src="{{imageResourcesBase+'mine/home/yy_theme.png'}}"></image>
<view class="order-activity-badge {{ enrollSubscribeData.active > 9 ? 'badge-widen' : ''}}" wx:if="{{enrollSubscribeData.active}}"> <view class="order-activity-badge {{ enrollSubscribeData.active > 9 ? 'badge-widen' : ''}}"
wx:if="{{enrollSubscribeData.active}}">
{{enrollSubscribeData.active}}</view> {{enrollSubscribeData.active}}</view>
</view> </view>
<text>主题活动</text> <text>主题活动</text>
...@@ -240,7 +241,8 @@ ...@@ -240,7 +241,8 @@
<view class="order-activity-icon-wrapper col align-c" data-type='1' bindtap="goAppointment"> <view class="order-activity-icon-wrapper col align-c" data-type='1' bindtap="goAppointment">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/yy_night.png'}}"></image> <image src="{{imageResourcesBase+'mine/home/yy_night.png'}}"></image>
<view class="order-activity-badge {{ enrollSubscribeData.garden > 9 ? 'badge-widen' : ''}}" wx:if="{{enrollSubscribeData.garden}}"> <view class="order-activity-badge {{ enrollSubscribeData.garden > 9 ? 'badge-widen' : ''}}"
wx:if="{{enrollSubscribeData.garden}}">
{{enrollSubscribeData.garden}}</view> {{enrollSubscribeData.garden}}</view>
</view> </view>
<text>夜间入园预约</text> <text>夜间入园预约</text>
...@@ -248,7 +250,8 @@ ...@@ -248,7 +250,8 @@
<view class="order-activity-icon-wrapper col align-c" data-type='2' bindtap="goAppointment"> <view class="order-activity-icon-wrapper col align-c" data-type='2' bindtap="goAppointment">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/yy_house.png'}}"></image> <image src="{{imageResourcesBase+'mine/home/yy_house.png'}}"></image>
<view class="order-activity-badge {{ enrollSubscribeData.scanHouse > 9 ? 'badge-widen' : ''}}" wx:if="{{enrollSubscribeData.scanHouse}}"> <view class="order-activity-badge {{ enrollSubscribeData.scanHouse > 9 ? 'badge-widen' : ''}}"
wx:if="{{enrollSubscribeData.scanHouse}}">
{{enrollSubscribeData.scanHouse}}</view> {{enrollSubscribeData.scanHouse}}</view>
</view> </view>
<text>看房预约</text> <text>看房预约</text>
...@@ -257,7 +260,8 @@ ...@@ -257,7 +260,8 @@
<!-- 预约卡片 --> <!-- 预约卡片 -->
<view class="appintment"> <view class="appintment">
<!-- 主题活动 --> <!-- 主题活动 -->
<view class="appointment-wrapper" wx:for="{{activityList}}" wx:key="*this" data-item="{{item}}" bindtap="onOrderDetail"> <view class="appointment-wrapper" wx:for="{{activityList}}" wx:key="*this" data-item="{{item}}"
bindtap="onOrderDetail">
<view class="appointment-time">{{item.activeTime}}</view> <view class="appointment-time">{{item.activeTime}}</view>
<view class="appointment-activity-content row"> <view class="appointment-activity-content row">
<view class="appointment-activity-img"> <view class="appointment-activity-img">
...@@ -314,8 +318,7 @@ ...@@ -314,8 +318,7 @@
</view> --> </view> -->
</view> </view>
<!-- more --> <!-- more -->
<view class="more row align-c con-c" bindtap="onShowMoreActivity" wx:if="{{activityListBackup.length>2}}">
<view class="more row align-c con-c" bindtap="onShowMoreActivity" wx:if="{{activityList.length>1}}">
<text wx:if="{{!showMoreActivity}}">展开更多</text> <text wx:if="{{!showMoreActivity}}">展开更多</text>
<text wx:else>收起</text> <text wx:else>收起</text>
<image wx:if="{{!showMoreActivity}}" src="{{imageBase + 'icon/arrow-b-2.png'}}"></image> <image wx:if="{{!showMoreActivity}}" src="{{imageBase + 'icon/arrow-b-2.png'}}"></image>
......
...@@ -77,8 +77,6 @@ Page({ ...@@ -77,8 +77,6 @@ Page({
queryOrder: function () { queryOrder: function () {
// 数据全部加载完成不再执行 // 数据全部加载完成不再执行
console.log(this.data.isFinished, '-----------------------------------this.data.isFinished');
if (this.data.isFinished) return if (this.data.isFinished) return
let that = this; let that = this;
// let funcName = this.data.orderType[this.data.orderTypeActive].value // let funcName = this.data.orderType[this.data.orderTypeActive].value
...@@ -88,6 +86,7 @@ Page({ ...@@ -88,6 +86,7 @@ Page({
}) })
wx.showLoading({ wx.showLoading({
title: '加载中', title: '加载中',
mask:true
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/order/getOrderList', url: '/api/v1/order/getOrderList',
......
.container { .container {
margin-top: 150rpx; margin-top: 200rpx;
padding-bottom: 196rpx; padding-bottom: 196rpx;
} }
.list-wrapper { .list-wrapper {
......
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
<view class="info-content col con-c"> <view class="info-content col con-c">
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">报名活动</text> <text class="info-content-item-label">报名活动</text>
<text class="info-content-item-title">儿童营地儿童营地儿童营地儿童营地儿童营地儿童营地</text> <text class="info-content-item-title">{{orderInfo.commodity[0].name}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">活动时间</text> <text class="info-content-item-label">活动时间</text>
...@@ -150,15 +150,15 @@ ...@@ -150,15 +150,15 @@
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">活动地点</text> <text class="info-content-item-label">活动地点</text>
<text class="info-content-item-describe">儿童营地</text> <text class="info-content-item-describe">{{orderInfo.officeName}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">订单信息</text> <text class="info-content-item-label">订单信息</text>
<text class="info-content-item-tip">姓名</text> <text class="info-content-item-tip">{{orderInfo.contactName}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-tip">18030303030</text> <text class="info-content-item-tip">{{orderInfo.contactPhone}}</text>
</view> </view>
<image wx:if="{{orderInfo.state!==2}}" class="seal-shot" src="{{resourcesBase+orderInfo.shopInfo.print}}"> <image wx:if="{{orderInfo.state!==2}}" class="seal-shot" src="{{resourcesBase+orderInfo.shopInfo.print}}">
</image> </image>
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
<image class="seal-long" src="{{resourcesBase+orderInfo.shopInfo.printUse}}"></image> <image class="seal-long" src="{{resourcesBase+orderInfo.shopInfo.printUse}}"></image>
</view> </view>
<view class="info-code col con-c align-c"> <view class="info-code col con-c align-c">
<text>{{'张门票可用'}}</text> <text>{{orderInfo.commodity.length}}张门票可用</text>
<button bindtap="onFastScan" class="row con-c align-c">一键扫码</button> <button bindtap="onFastScan" class="row con-c align-c">一键扫码</button>
<text>{{orderInfo.expireTime}}</text> <text>{{orderInfo.expireTime}}</text>
</view> </view>
...@@ -281,7 +281,7 @@ ...@@ -281,7 +281,7 @@
<text <text
wx:if="{{orderInfo.state !== 0 && orderInfo.state !== -1}}">{{'付款时间:' + (orderInfo.tipTimePay?orderInfo.tipTimePay:'')}}</text> wx:if="{{orderInfo.state !== 0 && orderInfo.state !== -1}}">{{'付款时间:' + (orderInfo.tipTimePay?orderInfo.tipTimePay:'')}}</text>
<text <text
wx:if="{{orderInfo.state !== 0 && orderInfo.state !== -1}}">{{'获得积分:' + (orderInfo.tipIntegral?orderInfo.tipIntegral:'')}}</text> wx:if="{{orderInfo.state !== 0 && orderInfo.state !== -1&&orderInfo.tipIntegral}}">{{'获得积分:' + (orderInfo.tipIntegral?orderInfo.tipIntegral:'')}}</text>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -874,6 +874,7 @@ Page({ ...@@ -874,6 +874,7 @@ Page({
}, },
success: (response) => { success: (response) => {
if (/ 商品不存在/.test(response.data.msg)) { if (/ 商品不存在/.test(response.data.msg)) {
wx.setStorageSync('shoppingCartBuffer', [])
wx.lin.showToast({ wx.lin.showToast({
title: '商品已下架,请重新下单。', title: '商品已下架,请重新下单。',
icon: 'error', icon: 'error',
...@@ -887,6 +888,7 @@ Page({ ...@@ -887,6 +888,7 @@ Page({
} }
if (/价格不一致/.test(response.data.msg)) { if (/价格不一致/.test(response.data.msg)) {
wx.setStorageSync('shoppingCartBuffer', [])
wx.lin.showToast({ wx.lin.showToast({
title: '价格已变更,请重新下单。', title: '价格已变更,请重新下单。',
icon: 'error', icon: 'error',
......
<!-- 畅玩 - 商店详情 --> <navigation class="navigation" titleText="{{info.title}}" scrollStyle="{{navigationStyle}}" scrollHeight="{{navigationScroll}}"></navigation>
<navigation class="navigation" titleText="{{info.title}}" color="#ffffff" scrollStyle="{{navigationStyle}}" scrollHeight="{{navigationScroll}}"></navigation>
<view class="container" wx:if="{{option.id !== '2'}}"> <view class="container" wx:if="{{option.id !== '2'}}">
<view id="banner" class="banner"> <view id="banner" class="banner">
...@@ -50,7 +49,7 @@ ...@@ -50,7 +49,7 @@
<view class="commodity-card" wx:if="{{winActivity}}"> <view class="commodity-card" wx:if="{{winActivity}}">
<view class="commodity-card-title row con-b align-e"> <view class="commodity-card-title row con-b align-e">
<text>近期活动</text> <text>近期活动</text>
<text bindtap="onAllActivity">查看全部</text> <text bindtap="onActivityAll">查看全部</text>
</view> </view>
<view class="commodity-card-list row"> <view class="commodity-card-list row">
<block wx:for="{{detailActivity}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{detailActivity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
...@@ -65,22 +64,10 @@ ...@@ -65,22 +64,10 @@
<text>{{item.time}}</text> <text>{{item.time}}</text>
</view> </view>
<view class="commodity-card-item-operation row con-b align-c"> <view class="commodity-card-item-operation row con-b align-c">
<view class="row align-c" wx:if="{{item.priceType === 1}}"> <view class="row align-c">
<text>活动价</text>
<text class="price-symbol">¥</text>
<text>{{item.priceSpecialText == '0' ? '免费' : item.priceSpecialText}}</text>
<text>{{item.priceText}}</text>
</view>
<view class="row align-c" wx:if="{{item.priceType === 2}}">
<text>业主价</text> <text>业主价</text>
<text class="price-symbol">¥</text> <text>免费</text>
<text>{{item.priceSpecialText == '0' ? '免费' : item.priceSpecialText}}</text> <text>{{item.price}}</text>
<text>{{item.priceText}}</text>
</view>
<view class="row align-c" wx:if="{{item.priceType === 3}}">
<text style="display: none"></text>
<text class="price-symbol">¥</text>
<text>{{item.priceText == '0' ? '免费' : item.priceText}}</text>
</view> </view>
<view> <view>
<button class="row con-c align-c">报名</button> <button class="row con-c align-c">报名</button>
...@@ -91,7 +78,7 @@ ...@@ -91,7 +78,7 @@
<block wx:if="{{detailActivity.length === 0}}"> <block wx:if="{{detailActivity.length === 0}}">
<view class="commodity-card-item-nothing col con-c align-c"> <view class="commodity-card-item-nothing col con-c align-c">
<image src="{{appResourcesBase + 'service/nothing.png'}}"></image> <image src="{{imageBase + 'icon/fireworks-2.png'}}"></image>
<text>近期暂无活动安排</text> <text>近期暂无活动安排</text>
</view> </view>
</block> </block>
...@@ -121,6 +108,7 @@ ...@@ -121,6 +108,7 @@
<text class="detail-price-discount">活动价</text> <text class="detail-price-discount">活动价</text>
<text class="price-symbol">¥</text> <text class="price-symbol">¥</text>
<text>{{item.priceDiscountText == '0' ? '免费' : item.priceDiscountText}}</text> <text>{{item.priceDiscountText == '0' ? '免费' : item.priceDiscountText}}</text>
<text class="price-unit">/人</text>
<text>{{'¥' + item.priceText}}</text> <text>{{'¥' + item.priceText}}</text>
</view> </view>
...@@ -129,6 +117,7 @@ ...@@ -129,6 +117,7 @@
<text class="detail-price-special">业主价</text> <text class="detail-price-special">业主价</text>
<text class="price-symbol">¥</text> <text class="price-symbol">¥</text>
<text>{{item.priceSpecialText == '0' ? '免费' : item.priceSpecialText}}</text> <text>{{item.priceSpecialText == '0' ? '免费' : item.priceSpecialText}}</text>
<text class="price-unit">/人</text>
<text>{{'¥' + item.priceText}}</text> <text>{{'¥' + item.priceText}}</text>
</view> </view>
...@@ -137,6 +126,8 @@ ...@@ -137,6 +126,8 @@
<text class="">业主价</text> <text class="">业主价</text>
<text class="price-symbol">¥</text> <text class="price-symbol">¥</text>
<text>{{item.priceText == '0' ? '免费' : item.priceText}}</text> <text>{{item.priceText == '0' ? '免费' : item.priceText}}</text>
<text class="price-unit">/人</text>
<text></text>
</view> </view>
<view> <view>
<button class="row con-c align-c" data-item="{{item}}" bindtap="onBuy">购买</button> <button class="row con-c align-c" data-item="{{item}}" bindtap="onBuy">购买</button>
...@@ -196,35 +187,47 @@ ...@@ -196,35 +187,47 @@
<block wx:for="{{detailEvaluate}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{detailEvaluate}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="evaluate-item col"> <view class="evaluate-item col">
<view class="row"> <view class="row">
<image class="evaluate-item-avatar" src="{{item}}" mode="widthFix"></image> <image class="evaluate-item-avatar" src="{{item.userAvatar}}" mode="widthFix"></image>
<view class="evaluate-item-info"> <view class="evaluate-item-info">
<view class="evaluate-item-info-text row align-c"> <view class="evaluate-item-info-text row align-c">
<text>{{item.name}}</text> <text>{{item.userName}}</text>
<text>业主</text> <text>业主</text>
<text>{{item.date}}</text> <text>{{item.date}}</text>
</view> </view>
<view class="evaluate-item-info-star row align-c"> <view class="evaluate-item-info-star row align-c">
<block wx:for="{{item.star}}" wx:for-index="indexStar" wx:for-item="itemStar" wx:key="indexStar"> <block wx:for="{{item.star}}" wx:for-index="indexStar" wx:for-item="itemStar" wx:key="indexStar">
<image src="{{imageBase + 'icon/star-1.png'}}"></image> <image src="{{imageBase + 'icon/star-1.png'}}" data-item="{{item}}"></image>
</block> </block>
</view> </view>
</view> </view>
</view> </view>
<view class="evaluate-item-content"> <!-- 评论隐藏样式 -->
<view> <view class="evaluate-item-content" wx:if="{{!item.isMore}}">
<view class="evaluate-item-content-mark">
<text>{{item.content}}</text> <text>{{item.content}}</text>
</view> </view>
<!-- <view class="evaluate-item-content-more"> <view class="evaluate-item-content-more" data-item="{{item}}" data-index="{{index}}" bindtap="onEvaluateMore">
<text>... </text> <text>... </text>
<text>全文</text> <text>全文</text>
</view> --> </view>
</view>
<!-- 评论展开样式 -->
<view class="evaluate-item-content-whole" wx:if="{{item.isMore}}">
<view>
<text>{{item.content}}</text>
</view>
</view> </view>
<view class="evaluate-item-album"> <view class="evaluate-item-album">
<block wx:for="{{item.imgUrls}}" wx:for-index="indexAlbum" wx:for-item="itemAlbum" wx:key="indexAlbum"> <block wx:for="{{item.userAlbum}}" wx:for-index="indexAlbum" wx:for-item="itemAlbum" wx:key="indexAlbum">
<image src="{{itemAlbum}}" bindtap="onPreviewImage" data-index="{{index}}" data-url="{{itemAlbum}}"></image> <image wx:if="{{indexAlbum < 4}}" src="{{itemAlbum}}" data-index="{{indexAlbum}}" data-item="{{item}}" bindtap="onEvaluateAlbum"></image>
</block> </block>
<view wx:if="{{item.userAlbum.length > 4}}" class="evaluate-item-album-more row con-c align-c" data-index="{{3}}" data-item="{{item}}" bindtap="onEvaluateAlbum">
<text>{{'+' + (item.userAlbum.length - 4)}}</text>
</view>
</view> </view>
</view> </view>
</block> </block>
...@@ -436,3 +439,14 @@ ...@@ -436,3 +439,14 @@
</button> </button>
</view> </view>
</view> </view>
<!-- 查看相册 -->
<view class="full-screen-album" wx:if="{{winEvaluateAlbum}}" bindtap="onHiddenEvaluateAlbum" >
<swiper circular current="{{evaluateAlbumActive}}" class="full-screen-album-swiper" duration="500">
<block wx:for="{{evaluateAlbum}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item class="album-item row con-c align-c">
<image class="album-image" src="{{item}}" mode="aspectFit"></image>
</swiper-item>
</block>
</swiper>
</view>
\ No newline at end of file
...@@ -251,6 +251,22 @@ ...@@ -251,6 +251,22 @@
font-weight: 600; font-weight: 600;
} }
.commodity-card-item-nothing image {
display: block;
width: 96rpx;
height: 76rpx;
}
.commodity-card-item-nothing text {
width: 240rpx;
height: 42rpx;
margin-top: 40rpx;
font-size: 30rpx;
font-weight: 500;
line-height: 42rpx;
color: #959DA9;
}
.commodity-card-item { .commodity-card-item {
width: 562rpx; width: 562rpx;
margin-right: 24rpx; margin-right: 24rpx;
...@@ -606,6 +622,7 @@ ...@@ -606,6 +622,7 @@
} }
/* 评论详情 */ /* 评论详情 */
.evaluate-item { .evaluate-item {
position: relative;
width: 670rpx; width: 670rpx;
min-height: 292rpx; min-height: 292rpx;
margin: 48rpx 40rpx 0 40rpx; margin: 48rpx 40rpx 0 40rpx;
...@@ -673,6 +690,7 @@ ...@@ -673,6 +690,7 @@
display: -webkit-box; display: -webkit-box;
position: relative; position: relative;
width: 670rpx; width: 670rpx;
min-height: 88rpx;
max-height: 132rpx; max-height: 132rpx;
margin-top: 32rpx; margin-top: 32rpx;
font-size: 26rpx; font-size: 26rpx;
...@@ -684,6 +702,18 @@ ...@@ -684,6 +702,18 @@
overflow: hidden; overflow: hidden;
} }
.evaluate-item-content-whole {
position: relative;
width: 670rpx;
min-height: 132rpx;
margin-top: 32rpx;
font-size: 26rpx;
font-weight: 400;
line-height: 44rpx;
color: #15191F;
}
.evaluate-item-content-more { .evaluate-item-content-more {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
...@@ -707,6 +737,7 @@ ...@@ -707,6 +737,7 @@
} }
.evaluate-item-album { .evaluate-item-album {
position: relative;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
flex-direction: row; flex-direction: row;
...@@ -729,7 +760,46 @@ ...@@ -729,7 +760,46 @@
.evaluate-item-album image:nth-child(4n) { .evaluate-item-album image:nth-child(4n) {
margin-right: 0; margin-right: 0;
border: 1px red solid; }
.evaluate-item-album-more {
position: absolute;
right: 0;
width: 160rpx;
height: 160rpx;
margin: 0 0 10rpx 0;
border-radius: 4px;
background: rgba(0, 0, 0, .4);
}
.evaluate-item-album-more text {
height: 53rpx;
font-size: 38rpx;
font-weight: 400;
line-height: 52rpx;
color: #FFFFFF;
}
/* 评论相册样式 */
.full-screen-album {
z-index: 2000;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #000000;
}
.full-screen-album-swiper,
.album-item {
width: 750rpx;
height: 100%;
}
.album-image {
width: 750rpx;
min-height: 100%;
} }
/* 价格样式 */ /* 价格样式 */
......
...@@ -49,7 +49,7 @@ Page({ ...@@ -49,7 +49,7 @@ Page({
let funcItem = { let funcItem = {
'name': funcResponse.name, 'name': funcResponse.name,
'time': funcResponse.spaMins, 'time': funcResponse.spaMins + 'mins',
'address': '元养水韵SPA', 'address': '元养水韵SPA',
'content': funcResponse.particulars, 'content': funcResponse.particulars,
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<view class="time-address-title"> <view class="time-address-title">
<text>时长</text> <text>时长</text>
</view> </view>
<view class="time-address"> <view class="time-address" wx:if="{{serviceInfo.time}}">
<text>{{serviceInfo.time}}</text> <text>{{serviceInfo.time}}</text>
</view> </view>
</view> </view>
......
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