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">
......
...@@ -126,4 +126,7 @@ ...@@ -126,4 +126,7 @@
.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',
......
...@@ -9,7 +9,7 @@ let logicData = { ...@@ -9,7 +9,7 @@ let logicData = {
Page({ Page({
data: { data: {
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
appResourcesBase: App.globalData.appResourcesBase, resourcesBase: App.globalData.appResourcesBase,
option: {}, option: {},
// 弹出控制 // 弹出控制
...@@ -62,7 +62,7 @@ Page({ ...@@ -62,7 +62,7 @@ Page({
detailActivity: [], // 活动 detailActivity: [], // 活动
detailCommodity: [], // 商品 detailCommodity: [], // 商品
detailEvaluate: [], // 评论 detailEvaluate: [], // 评论
evaluateAlbum: [],
isBlack: false, isBlack: false,
...@@ -75,14 +75,7 @@ Page({ ...@@ -75,14 +75,7 @@ Page({
winActivity: false, // 近期活动 winActivity: false, // 近期活动
winCommodity: false, // 商品列表 winCommodity: false, // 商品列表
winCommodityMenu: false, winCommodityMenu: false,
winEvaluateAlbum: false,
officeService: 0,
officeServiceText: '5.0', // 门店服务评分
officeProduct: 0,
officeProductText: '5.0', // 门店产品评分
officeEnvironmental: 0,
officeEnvironmentalText: '5.0', // 门店环境评分
}, },
onLoad: function (options) { onLoad: function (options) {
...@@ -147,8 +140,7 @@ Page({ ...@@ -147,8 +140,7 @@ Page({
default: default:
this.queryCommodity() this.queryCommodity()
} }
// 查询评价
this.getOfficeAppraise()
this.getAppraise() this.getAppraise()
}, },
...@@ -159,7 +151,6 @@ Page({ ...@@ -159,7 +151,6 @@ Page({
* @returns * @returns
*/ */
queryDetail: function (funcAppId) { queryDetail: function (funcAppId) {
let that = this
let funcIndex = 0 let funcIndex = 0
// 预设数据 // 预设数据
let funcDetail = [ let funcDetail = [
...@@ -323,7 +314,7 @@ Page({ ...@@ -323,7 +314,7 @@ Page({
// 查询景点信息 // 查询景点信息
App.wxRequest({ App.wxRequest({
url: '/api/v1/park/getList', url: '/api/v1/park/getList',
success: function(res) { success: (res) => {
let funcData = res.list let funcData = res.list
funcDetail.forEach(shop => { funcDetail.forEach(shop => {
funcData.forEach(item => { funcData.forEach(item => {
...@@ -336,7 +327,7 @@ Page({ ...@@ -336,7 +327,7 @@ Page({
} }
}) })
}) })
that.setData({ this.setData({
banner: funcDetail[funcIndex].banner, banner: funcDetail[funcIndex].banner,
shareImage: funcDetail[funcIndex].shareImage, shareImage: funcDetail[funcIndex].shareImage,
info: { info: {
...@@ -399,42 +390,8 @@ Page({ ...@@ -399,42 +390,8 @@ Page({
'officeId': this.data.shopInfo.id, 'officeId': this.data.shopInfo.id,
}, },
success: (response) => { success: (response) => {
let funcResponse = response.data.list
let funcList = []
for (let i = 0, l = funcResponse.length; i < l; i++) {
let funcItem = {
'cover': funcResponse[i].cover,
'id': funcResponse[i].id,
'title': funcResponse[i].name,
'officeId': funcResponse[i].officeId,
'price': funcResponse[i].visitorPrice, // 普通价
'priceText': App.modular.utils.formatAmount(funcResponse[i].visitorPrice), // 普通价文本格式
'priceSpecial': funcResponse[i].ownerPrice, // 业主价
'priceSpecialText': App.modular.utils.formatAmount(funcResponse[i].ownerPrice), // 业主价文本格式
'tags': funcResponse[i].tags,
'tagId': funcResponse[i].tagId,
'time': funcResponse[i].activeDate + ' ' + funcResponse[i].activeTime, // 活动时间
'priceType': 1,
}
let funcUserType = wx.getStorageSync('userInfo').userType
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if (funcItem.priceDiscount) {
funcItem.priceType = 1
} else {
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if (funcItem.price !== funcItem.priceSpecial && funcUserType) {
funcItem.priceType = 2
} else {
funcItem.priceType = 3
}
}
funcList.push(funcItem)
}
this.setData({ this.setData({
winActivity: true, winActivity: true
detailActivity: funcList
}) })
} }
}) })
...@@ -457,8 +414,8 @@ Page({ ...@@ -457,8 +414,8 @@ Page({
'pageSize': 10, 'pageSize': 10,
}, },
success: (response) => { success: (response) => {
let funcResponse = response.data
let funcCommodityList = [] let funcCommodityList = []
let funcResponse = response.data
for (let i = 0, l = funcResponse.length; i < l; i++) { for (let i = 0, l = funcResponse.length; i < l; i++) {
let funcItem = { let funcItem = {
'id': funcResponse[i].id, // 商品标识 'id': funcResponse[i].id, // 商品标识
...@@ -556,73 +513,82 @@ Page({ ...@@ -556,73 +513,82 @@ Page({
* @returns * @returns
*/ */
getAppraise: function () { getAppraise: function () {
let that = this
App.wxRequest({ App.wxRequest({
url: '/api/v1/appraise/getList', url: '/api/v1/appraise/getList',
data: { data: {
'pageNo': '1', 'pageNo': '1',
'pageSize': '-1', 'pageSize': '-1',
'officeId': that.data.shopInfo.id 'officeId': this.data.shopInfo.id
}, },
success: (res) => { success: (response) => {
let funcData = res.data.list let funcResponse = response.data
let funcList = [] let funcList = []
let officeServiceText = '0' for (let i = 0, l = funcResponse.list.length; i< l; i++) {
let officeProductText = '0'
let officeEnvironmentalText = '0'
console.log(JSON.stringify(funcData))
for (let i=0, l=funcData.length; i<l; i++) {
let funcItem = { let funcItem = {
'avatar': funcData[i].headImg, // 头像 'star': 4,
'name': funcData[i].nickname, 'scoreService': funcResponse.list[i].environmentalEvaluation, // 服务评价
'userType': funcData[i].userType, 'scoreCommodity': funcResponse.list[i].productEvaluation, // 商品评价
'content': funcData[i].content, // 内容 'scoreEnvironmental': funcResponse.list[i].environmentalEvaluation, // 环境评价
'imgUrls': funcData[i].imgUrls, // 图片 'userName': funcResponse.list[i].name,
'environmentalEvaluation': funcData[i].environmentalEvaluation, // 环境评分 'userAvatar': funcResponse.list[i].headImg,
'productEvaluation': funcData[i].productEvaluation, // 产品评分 'userType': funcResponse.list[i].userType,
'serviceEvaluation': funcData[i].serviceEvaluation, // 服务评分 'userAlbum': funcResponse.list[i].imgUrls, // 评论图册
'date': funcData[i].createDate, // 评价时间 'date': funcResponse.list[i].createDate,
'star': Math.floor((funcData[i].environmentalEvaluation + funcData[i].productEvaluation + funcData[i].serviceEvaluation) / 3) 'content': funcResponse.list[i].content,
'isMore': false,
} }
funcItem = {
'isMore': false,
'star': 4,
'scoreService': 3,
'scoreCommodity': 2,
'scoreEnvironmental': 1,
'userName': '用户名称',
'userAvatar': 'https://gss3.bdstatic.com/84oSdTum2Q5BphGlnYG/timg?wapp&quality=80&size=b150_150&subsize=20480&cut_x=0&cut_w=0&cut_y=0&cut_h=0&sec=1369815402&srctrace&di=6a992d9158ef2273c2e9d0a77fbbbe88&wh_rate=null&src=http%3A%2F%2Ftiebapic.baidu.com%2Fforum%2Fpic%2Fitem%2F4d086e061d950a7be03653981dd162d9f2d3c96f.jpg',
'userType': 0,
'userAlbum': [
'https://dss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=975216563,2695721503&fm=111&gp=0.jpg',
'https://dss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2856846879,389279115&fm=26&gp=0.jpg',
'https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2032511182,3555754069&fm=26&gp=0.jpg',
'https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2032511182,3555754069&fm=26&gp=0.jpg',
'https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2032511182,3555754069&fm=26&gp=0.jpg',
],
'date': '2020.02.09',
'content': '/sd12i301!@(#*)(#Updjs',
}
funcItem.star = Math.floor((funcItem.scoreService + funcItem.scoreCommodity + funcItem.scoreEnvironmental) / 3)
funcList.push(funcItem) funcList.push(funcItem)
} }
if (funcList.length === 0) {
officeServiceText = '5.0' this.setData({
officeProductText = '5.0' detailEvaluate: funcList
officeEnvironmentalText = '5.0'
that.setData({
officeServiceText,
officeProductText,
officeEnvironmentalText
})
}
that.setData({
detailEvaluate: funcList,
}) })
} const funcQuery = wx.createSelectorQuery()
}) funcQuery.selectAll('.evaluate-item-content-mark').boundingClientRect()
}, funcQuery.exec((response) => {
// 查询门店评分 let funcContentHeight = 88 * wx.getStorageSync('unitProportion')
getOfficeAppraise: function () { let funcEvaluate = this.data.detailEvaluate
let that = this
let officeId = wx.getStorageSync('shopInfoBuffer').id let funcTextHeight = response[0]
App.wxRequest({ console.log(funcContentHeight)
url: '/api/v1/appraise/getOfficeAppraise', console.log(funcTextHeight)
data: { for (let i = 0, l = funcTextHeight.length; i < l; i++) {
'officeId': officeId if (funcContentHeight > funcTextHeight[i].height) {
}, funcEvaluate[i].isMore = true
success: function (response) { }
let funcData = response.data }
that.setData({
detailEvaluate: funcData.list, this.setData({
officeServiceText: funcData.serviceEvaluation.toFixed(1), detailEvaluate: funcEvaluate
officeProductText: funcData.productEvaluatio.toFixed(1), })
officeEnvironmentalText: funcData.environmentalEvaluation.toFixed(1),
}) })
} }
}) })
}, },
onBuy: function (event) { onBuy: function (event) {
let id = event.currentTarget.dataset.id let id = event.currentTarget.dataset.id
wx.navigateTo({ wx.navigateTo({
...@@ -668,10 +634,10 @@ Page({ ...@@ -668,10 +634,10 @@ Page({
break break
} }
}, },
// 点击下方按钮
onContact: function () { onContact: function () {
wx.navigateTo({ wx.makePhoneCall({
url: '/pages/commodity/project-detail/project-detail' phoneNumber: this.data.info.contact
}) })
}, },
...@@ -783,7 +749,7 @@ Page({ ...@@ -783,7 +749,7 @@ Page({
* @param {object} - funcEvent * @param {object} - funcEvent
* @returns * @returns
*/ */
onAllActivity: function () { onActivityAll: function () {
wx.navigateTo({ wx.navigateTo({
url: '/pages/play/activity/activity?fromPage=serviceDetail', url: '/pages/play/activity/activity?fromPage=serviceDetail',
}) })
...@@ -806,4 +772,54 @@ Page({ ...@@ -806,4 +772,54 @@ Page({
url: '/pages/play/movie/movie', url: '/pages/play/movie/movie',
}) })
}, },
/**
* 评论查看全部
* @function
* @param
* @returns
*/
onEvaluateMore: function (event) {
let funcItem = event.currentTarget.dataset.item
let funcIndex = event.currentTarget.dataset.index
let funcEvaluate = this.data.detailEvaluate
funcEvaluate[funcIndex].isMore = true
this.setData({
detailEvaluate: funcEvaluate
})
console.log(funcItem)
},
/**
* 评论查看相册
* @function
* @param
* @returns
*/
onEvaluateAlbum: function (event) {
console.log('onEvaluateAlbum')
let funcItem = event.currentTarget.dataset.item
let funcIndex = event.currentTarget.dataset.index
this.setData({
evaluateAlbum: funcItem.userAlbum,
evaluateAlbumActive: funcIndex,
winEvaluateAlbum: true
})
},
/**
* 评论相册隐藏
* @function
* @param
* @returns
*/
onHiddenEvaluateAlbum: function () {
this.setData({
winEvaluateAlbum: false
})
},
}) })
\ No newline at end of file
<!-- 畅玩 - 商店详情 --> <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>
...@@ -435,4 +438,15 @@ ...@@ -435,4 +438,15 @@
<image src="{{imageBase + 'top.png'}}"></image> <image src="{{imageBase + 'top.png'}}"></image>
</button> </button>
</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> </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