Commit 233f35af by 严立

LL - 代码合并

parents 9c015d9e 879a0a9d

660 Bytes | W: | H:

660 Bytes | W: | H:

image/icon/evaluate-2.png.png
image/icon/evaluate-2.png
image/icon/evaluate-2.png.png
image/icon/evaluate-2.png
  • 2-up
  • Swipe
  • Onion skin

503 Bytes | W: | H:

503 Bytes | W: | H:

image/icon/shop-2.png.png
image/icon/shop-2.png
image/icon/shop-2.png.png
image/icon/shop-2.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -309,8 +309,9 @@ Page({
* @returns
*/
onCommodityDetail: function (event) {
let shopInfo = wx.getStorageSync('shopInfoBuffer')
let funcCommodityInfo = event.currentTarget.dataset.item
if (shopInfo.appId === 7) {
// 补充必要参数
funcCommodityInfo.quantity = 1
funcCommodityInfo.quantityMin = 1
......@@ -321,6 +322,9 @@ Page({
wx.navigateTo({
url: '/pages/play/service-sell/service-sell'
})
} else {
return
}
},
/**
......
......@@ -103,6 +103,9 @@ Page({
address: funcResponse.address,
quota: funcResponse.enrollNum,
describe: funcResponse.content,
priceText: funcItem.priceText,
priceSpecialText: funcItem.priceSpecialText,
priceType: funcItem.priceType
// contact: response.contact,
}
})
......
......@@ -25,17 +25,18 @@
<view class="detail-other col">
<view class="row align-c">
<image src="/image/icon/g-time.png"></image>
<text>活动时间</text>
<text>时间</text>
<text>{{info.date}}</text>
</view>
<view style="height:auto;" class="row">
<view style="height:auto;" class="row align-c">
<image src="/image/icon/g-location.png"></image>
<text>活动地址</text>
<text>地址</text>
<text style="height:auto;">{{info.address}}</text>
<image src="/image/icon/arrow-r-1.png"></image>
</view>
<view class="row align-c">
<image src="/image/icon/g-custom.png"></image>
<text>报名名额</text>
<text>名额</text>
<text>{{info.quota}}人</text>
</view>
</view>
......@@ -45,7 +46,43 @@
</view>
</view>
<view class="contact">
<view class="contact row">
<!-- 活动价样式 -->
<view wx:if="{{info.priceType === 1}}">
<view class="info-price row align-c">
<text class="item-price-discount">活动价</text>
<text>¥</text>
<text>{{info.priceDiscountText}}</text>
<text>/人</text>
</view>
<view class="item-info-old-price row align-c">
<text>¥</text>
<text>{{info.priceText}}</text>
<text>/人</text>
</view>
</view>
<!-- 业主价样式 -->
<view class="row" wx:if="{{info.priceType === 2}}">
<view class="item-price row align-c">
<text class="item-price-special">业主价</text>
<text>¥</text>
<text>{{info.priceSpecialText}}</text>
<text>/人</text>
</view>
<view class="item-info-old-price row align-c">
<text>¥</text>
<text>{{info.priceText}}</text>
<text>/人</text>
</view>
</view>
<!-- 普通价样式 -->
<view class="row" wx:if="{{info.priceType === 3}}">
<view class="item-price row align-c">
<text>¥</text>
<text>{{info.priceText}}</text>
<text>/人</text>
</view>
</view>
<button class="{{isSubmit ? 'button' : 'button-disable'}} row con-c align-c" size="long" bindtap="onContact">{{stateText}}</button>
</view>
</view>
\ No newline at end of file
......@@ -15,7 +15,6 @@
height: 60rpx;
}
.banner {
z-index: 9;
position: relative;
......@@ -86,9 +85,9 @@
}
.detail-other view text:nth-child(2) {
width: 120rpx;
width: 60rpx;
height: 42rpx;
margin-right: 32rpx;
margin-right: 24rpx;
font-size: 30rpx;
font-weight: 300;
color: #959DA9;
......@@ -96,13 +95,18 @@
}
.detail-other view text:nth-child(3) {
width: 470rpx;
width: 500rpx;
height: 40rpx;
font-size: 30rpx;
font-weight: 400;
color: #000000;
line-height: 42rpx;
}
.detail-other view image:nth-child(4) {
width: 32rpx;
height: 32rpx;
margin-left: 6rpx;
}
.detail-describe {
width: 670rpx;
......@@ -126,8 +130,55 @@
border-top: 1rpx #E2E7EF solid;
background: #ffffff;
}
.item-price {
color: #15191F;
margin-right: 12rpx;
}
.item-price-special {
width: 78rpx;
height: 36rpx;
margin-right: 12rpx;
border-radius: 4rpx;
background: linear-gradient(180deg, #3F4357 0%, #252532 100%);
text-align: center;
font-size: 18rpx;
font-weight: 500;
line-height: 36rpx;
color: #E8D0AF;
}
.item-price text:nth-child(2) {
font-size: 26rpx;
font-weight: 600;
}
.item-price text:nth-child(3) {
font-size: 38rpx;
font-weight: 600;
}
.item-price text:nth-child(4) {
font-size: 26rpx;
}
.item-info-old-price {
color: #C2C7CF;
text-decoration: line-through;
}
.item-info-old-price text:nth-child(1) {
font-size: 30rpx;
}
.item-info-old-price text:nth-child(2) {
font-size: 30rpx;
}
.item-info-old-price text:nth-child(3) {
font-size: 26rpx;
}
.contact .button {
width: 670rpx;
position: absolute;
right: 40rpx;
width: 200rpx;
height: 96rpx;
margin-bottom: 40rpx;
background: #86C5E1;
......
......@@ -2,23 +2,40 @@ const App = getApp()
Page({
data: {
option: {},
imageBase: App.globalData.appImageBase,
statusActive: 0,
statusList: [
{
id: '0',
name: '全部'
}
],
navigationTitle: '主题活动',
activity: [],
selectedActivity: [],
other: [],
shopInfo: {},
options: {}
},
onLoad: function (options) {
if (options.fromPage === 'serviceDetail') this.setData({ shopInfo: wx.getStorageSync('shopInfoBuffer')})
if (options.fromPage === 'serviceDetail') {
let shopInfo = wx.getStorageSync('shopInfoBuffer')
console.log(shopInfo)
this.setData({
options: options,
shopInfo: shopInfo
})
}
this.getActivityList(1)
this.getActivityList(0)
},
onActivityDetail: function (funcItem) {
onActivityDetail: function (event) {
wx.navigateTo({
url: '/pages/play/activity-detail/activity-detail?id=' + funcItem.currentTarget.dataset.id
url: '/pages/play/activity-detail/activity-detail?id=' + event.currentTarget.dataset.id
})
},
......@@ -38,28 +55,45 @@ Page({
url: '/api/v1/activity/getList',
data: funcParam,
success: function (res) {
var tmpArr = [];
let tmpArr = [];
let funcData = res.data.list
res.data.list.forEach(item => {
var tmpItem = {
let tmpItem = {
id: item.id,
cover: item.cover,
title: item.name,
date: item.activeDate,//'6月30日-7月12日 10:00-12:00',
describe: item.summary,
beginDate: item.activeDate.split('-')[0],
tagIds: item.tagIds,
tagNames: item.tagNames,
price: item.visitorPrice, // 普通价
priceText: App.modular.utils.formatAmount(item.visitorPrice), // 普通价文本格式
priceSpecial: item.ownerPrice, // 业主价
priceSpecialText: App.modular.utils.formatAmount(item.ownerPrice), // 业主价文本格式
priceType: 1,
}
let funcUserType = wx.getStorageSync('userInfo').userType
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if (tmpItem.priceDiscount) {
tmpItem.priceType = 1
} else {
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if (tmpItem.price !== tmpItem.priceSpecial && funcUserType) {
tmpItem.priceType = 2
} else {
tmpItem.priceType = 3
}
}
tmpArr.push(tmpItem)
})
// var year = new Date().getFullYear()
// // 活动开始时间倒序排序
// tmpArr.sort(function(a,b) {
// return new Date(year + "/" + b.beginDate.replace(/月/g,"\/").replace(/日/g,"\/")) - new Date(year + "/" + a.beginDate.replace(/月/g,"\/").replace(/日/g,"\/"))
// })
if (type == 1) {
that.setTabs(tmpArr)
that.setData({
activity: tmpArr
activity: tmpArr,
selectedActivity: tmpArr
})
} else {
that.setData({
......@@ -68,5 +102,45 @@ Page({
}
}
})
},
// 设置标签
setTabs: function (tmpArr) {
let that = this
let statusList = this.data.statusList
let tagIds = []
let tagNames = []
tmpArr.forEach(item => {
tagIds = tagIds.concat(item.tagIds.split(','))
tagNames = tagNames.concat(item.tagNames)
})
tagIds = Array.from(new Set(tagIds))
tagNames = Array.from(new Set(tagNames))
for (let i=0, l=tagIds.length; i<l; i++) {
let status = {
id: tagIds[i],
name: tagNames[i]
}
statusList.push(status)
}
that.setData({
statusList
})
},
// 选择标签
onSelectionStatus: function (event) {
let index = event.currentTarget.dataset.index
let statusList = this.data.statusList
let selectedActivity = this.data.activity
console.log(selectedActivity)
if (index !== 0) {
selectedActivity = selectedActivity.filter(item => {
item.tagNames = [].concat(statusList[index].name)
return item.tagIds.includes(statusList[index].id)
})
}
this.setData({
selectedActivity,
statusActive: index
})
},
})
\ No newline at end of file
<!-- 畅玩 - 活动列表 -->
<navigation class="navigation" titleText="主题活动" background="#ffffff" backIcon="/image/back.png"></navigation>
<navigation class="navigation" titleText="{{navigationTitle}}" background="#ffffff" backIcon="/image/back.png"></navigation>
<view class="container">
<block wx:if="{{activity.length > 0}}">
<view class="title row">
<image src="./image/title.png"></image>
<view class="container con-s">
<!-- 活动类别 -->
<view class="status row align-c" wx:if="{{!options.fromPage}}">
<block wx:for="{{statusList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="status-item row con-c align-c" data-index="{{index}}" bindtap="onSelectionStatus">
<view class="row con-c align-c {{index === statusActive ? 'status-item-active' : ''}}">
<text>{{item.name}}</text>
</view>
</view>
</block>
</view>
<block wx:if="{{activity.length > 0}}">
<view class="list">
<block wx:for="{{activity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<block wx:for="{{selectedActivity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="item" data-id="{{item.id}}" bindtap="onActivityDetail">
<view class="item-cover" wx:if="{{item.cover !== ''}}">
<image src="{{item.cover}}" mode="aspectFill"></image>
</view>
<view class="item-info col">
<text class="item-title">{{item.title}}</text>
<text class="item-date">{{item.date}}</text>
<text class="item-describe">{{item.describe}}</text>
<view class="item-title row con-b align-c">
<text>{{item.title}}</text>
<text wx:if="{{item.tagNames[0]}}">{{item.tagNames[0]}}</text>
</view>
<view class="item-date row align-c">
<image src="{{imageBase + 'icon/clock-2.png'}}"></image>
<text>{{item.date}}</text>
</view>
<view class="item-describe">
<text>{{item.describe}}</text>
</view>
<view class="item-operation row con-b align-c">
<view class="row align-c" wx:if="{{item.priceType === 1}}">
<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 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 === 3}}">
<text style="display: none"></text>
<text class="price-symbol">¥</text>
<text>{{item.priceText == '0' ? '免费' : item.priceText}}</text>
</view>
<view>
<button class="row con-c align-c" catchtap="onReport" data-id="{{item.id}}">报名</button>
</view>
</view>
</view>
</view>
</block>
......@@ -29,18 +65,38 @@
</view>
<view class="other row" >
<view class="route-list row con-b">
<!-- 左侧列表 -->
<view class="route-list-left">
<block wx:for="{{other}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="other-item col" data-id="{{item.id}}" bindtap="onActivityDetail">
<view>
<image src="{{item.cover}}"></image>
<view class="route-item" wx:if="{{index % 2 === 0}}" data-id="{{item.id}}" bindtap="onActivityDetail">
<view class="row con-c align-c">
<image src="{{item.cover}}" mode="aspectFill"></image>
</view>
<view class="other-item-info col">
<text>{{item.title}}</text>
<text>{{item.date}}</text>
<text class="route-item-title">{{item.title}}</text>
<text class="route-item-content">{{item.date}}</text>
</view>
</block>
</view>
<!-- 右侧列表 -->
<view class="route-list-right">
<block wx:for="{{touristRouteList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="route-item" wx:if="{{index % 2 === 1}}" data-item="{{item}}" bindtap="onTouristRouteDetail">
<view class="row con-c align-c">
<image src="{{item.cover}}" mode="aspectFill"></image>
</view>
<view class="route-item-tags row align-c">
<block wx:for="{{item.tags}}" wx:for-index="indexTags" wx:for-item="itemTags" wx:key="indexTags">
<text>{{'# ' + itemTags}}</text>
</block>
<view class="other-item col"></view>
</view>
<text class="route-item-title">{{item.title}}</text>
<text class="route-item-content">{{item.date}}</text>
</view>
</block>
</view>
</view>
</view>
</block>
</view>
\ No newline at end of file
......@@ -5,32 +5,70 @@
}
.container {
min-height: 100%;
min-height: 100vh;
margin-top: 120rpx;
padding-bottom: 100rpx;
background: linear-gradient(#ffffff, #F2F2F2);
}
/* 状态筛选菜单 */
.status {
width: 750rpx;
height: 76rpx;
margin-top: 80rpx;
padding: 0 40rpx;
border-bottom: 1px #E2E7EF solid;
overflow: scroll;
flex-wrap: nowrap;
}
.status-item {
height: 76rpx;
margin-right: 80rpx;
font-size: 26rpx;
font-weight: 400;
color: #959DA9;
}
.status-item text {
display: inline-block;
white-space: nowrap;
}
.status-item:last-child {
padding-right: 40rpx;
}
.status-item-active {
height: 76rpx;
color: #15191F;
font-weight: 600;
border-bottom: 4rpx #15191F solid;
}
.status::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
.title {
width: 750rpx;
height: 96rpx;
margin-top: 50rpx;
margin-top: 40rpx;
padding: 0 40rpx;
}
.title image {
width: 184rpx;
width: 138rpx;
height: 96rpx;
}
/* 活动列表 */
.list {
padding: 0 40rpx 50rpx 40rpx;
padding: 0rpx 40rpx 50rpx 40rpx;
}
.item {
width: 670rpx;
height: 644rpx;
margin-top: 48rpx;
height: 708rpx;
margin-top: 64rpx;
border-radius: 2px;
overflow: hidden;
background: #ffffff;
......@@ -41,13 +79,15 @@
}
.item-title {
width: 606rpx;
height: 48rpx;
margin-top: 30rpx;
height: 44rpx;
margin-top: 32rpx;
}
.item-title text:nth-child(1) {
font-size: 34rpx;
font-weight: bold;
color: #15191F;
line-height: 48rpx;
line-height: 44rpx;
display: -webkit-box;
overflow: hidden;
white-space: normal;
......@@ -57,22 +97,41 @@
-webkit-box-orient: vertical;
}
.item-title text:nth-child(2) {
width: 96rpx;
height: 32rpx;
border-radius: 4rpx;
border: 1px solid #86C5E1;
background: rgba(134, 197, 225, 0.1);
text-align: center;
font-size: 18rpx;
font-weight: 500;
line-height: 24rpx;
color: #86C5E1;
}
.item-date {
width: 606rpx;
height: 36rpx;
margin-top: 24rpx;
height: 40rpx;
margin-top: 8rpx;
font-size: 26rpx;
color: #15191F;
line-height: 36rpx;
color: #656E7B;
line-height: 40rpx;
}
.item-date image {
width: 32rpx;
height: 32rpx;
margin-right: 8rpx;
}
.item-describe {
width: 606rpx;
height: 72rpx;
height: 80rpx;
margin-top: 16rpx;
font-size: 26rpx;
color: #959DA9;
line-height: 36rpx;
line-height: 40rpx;
display: -webkit-box;
overflow: hidden;
white-space: normal;
......@@ -82,50 +141,110 @@
-webkit-box-orient: vertical;
}
.price-symbol {
margin-top: 8rpx;
color: #15191F;
font-size: 18rpx;
font-weight: 600;
}
.item-operation {
margin-top: 16rpx;
}
.item-operation text:nth-child(1) {
width: 78rpx;
height: 32rpx;
margin-right: 12rpx;
background: linear-gradient(180deg, #3F4357 0%, #252532 100%);
border-radius: 4rpx;
text-align: center;
font-size: 18rpx;
font-weight: 500;
line-height: 28rpx;
color: #E8D0AF;
}
.item-operation text:nth-child(3) {
margin-right: 16rpx;
text-align: center;
font-size: 30rpx;
font-weight: 600;
line-height: 36rpx;
color: #15191F;
}
.item-operation text:nth-child(4) {
text-align: center;
font-size: 22rpx;
font-weight: 400;
line-height: 32rpx;
color: #C2C7CF;
text-decoration: line-through;
}
.item-operation button {
flex-grow: 1;
width: 132rpx;
height: 56rpx;
border-radius: 4rpx;
background: #86C5E1;
color: #FFFFFF;
font-size: 26rpx;
font-weight: 500;
line-height: 36rpx;
}
.item-cover image {
width: 670rpx;
height: 376rpx;
}
/* 往期活动 */
.other {
width: 710rpx;
margin: 50rpx 0 50rpx 40rpx;
overflow: scroll;
.route-list {
margin-top: 48rpx;
}
.other-item {
min-width: 286rpx;
height: 476rpx;
margin-right: 32rpx;
background: #ffffff;
border-radius: 2px;
.route-list-left,
.route-list-right {
width: 320rpx;
}
.route-item {
display: flex;
flex-direction: column;
max-width: 328rpx;
margin-top: 16rpx;
border-radius: 4rpx;
overflow: hidden;
background: #ffffff;
}
.other-item:last-child {
width: 1rpx !important;
min-width: 1rpx !important;
.route-item image {
height: 354rpx;
}
.other-item-info {
padding: 0 32rpx;
.route-list-right .route-item:first-child image {
height: 354rpx;
}
.other-item-info text {
max-width: 224rpx;
height: 36rpx;
margin-top: 12rpx;
.route-item-title {
display: -webkit-box;
margin: 32rpx 32rpx 8rpx;
font-size: 26rpx;
font-weight: bold;
color: #15191F;
line-height: 36rpx;
font-weight: bolder;
color: #000000;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
line-clamp: 2;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.other-item image {
width: 286rpx;
height: 340rpx;
.route-item-content {
margin: 0 32rpx 32rpx 32rpx;
font-size: 22rpx;
color: #959DA9;
}

2.82 KB | W: | H:

5.61 KB | W: | H:

pages/play/activity/image/title-2.png
pages/play/activity/image/title-2.png
pages/play/activity/image/title-2.png
pages/play/activity/image/title-2.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -48,7 +48,7 @@ Page({
// 内容类型
contentType: 'evaluate',
contentType: 'detail',
// banner 列表数据
banner: [],
......@@ -72,6 +72,14 @@ Page({
commodityTitle: '',
officeService: 0,
officeServiceText: '5.0', // 门店服务评分
officeProduct: 0,
officeProductText: '5.0', // 门店产品评分
officeEnvironmental: 0,
officeEnvironmentalText: '5.0', // 门店环境评分
winActivity: false, // 近期活动
winCommodity: false, // 商品列表
winCommodityMenu: false,
......@@ -140,7 +148,7 @@ Page({
default:
this.queryCommodity()
}
this.getOfficeAppraise()
this.getAppraise()
},
......@@ -390,8 +398,44 @@ Page({
'officeId': this.data.shopInfo.id,
},
success: (response) => {
let funcResponse = response.data.list
console.log(funcResponse)
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), // 业主价文本格式
'tagIds': funcResponse[i].tagIds,
'tagNames': funcResponse[i].tagNames,
'date': 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
}
}
console.log(funcItem)
funcList.push(funcItem)
}
this.setData({
winActivity: true
winActivity: true,
detailActivity: funcList
})
}
})
......@@ -611,7 +655,51 @@ Page({
url: '/pages/home/guide/guide?id=' + Number(this.data.option.id)
})
},
// 缓存商店信息
setShopInfo: function (funcShopAppId, funcShopType) {
// 获取门店基本信息
let funcShopId = App.globalData.shopId
for (let i = 0, l = funcShopId.length; i < l; i++) {
if (funcShopAppId === funcShopId[i].appId) {
let funcShopInfo = {
'id': funcShopId[i].id,
'appId': funcShopId[i].appId,
'name': funcShopId[i].title[funcShopType],
'logo': funcShopId[i].logo,
'cover': funcShopId[i].cover,
'shopType': funcShopType,
'commodityLogo': funcShopId[i].commodityLogo
}
wx.setStorageSync('shopInfoBuffer', funcShopInfo)
break
}
}
},
// 跳转到活动详情
onActivityDetail: function (event) {
let id = event.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/play/activity-detail/activity-detail?id=' + id,
})
},
onBuyCommodity: function (event) {
let id = event.currentTarget.dataset.id
let classifyId = event.currentTarget.dataset.classid
wx.navigateTo({
url: '/pages/commodity/menu-food/menu-food?commodityId=' + id + '&sideBarId=' + classifyId
})
},
// 跳转到能量补给站
onBuySnacks(event) {
// funcShopType 使用函数区分商品类型,所以每个函数里的数值是固定的
let funcShopType = 5
let funcShopAppId = event.currentTarget.dataset.id
this.setShopInfo(funcShopAppId, funcShopType)
wx.navigateTo({
url: '/pages/commodity/menu-food/menu-food',
})
},
/**
* 简介,评价切换
* @function
......@@ -636,8 +724,8 @@ Page({
},
onContact: function () {
wx.makePhoneCall({
phoneNumber: this.data.info.contact
wx.navigateTo({
url: '/pages/commodity/project-detail/project-detail'
})
},
......@@ -772,6 +860,25 @@ Page({
url: '/pages/play/movie/movie',
})
},
// 查询门店评分
getOfficeAppraise: function () {
let that = this
let officeId = wx.getStorageSync('shopInfoBuffer').id
App.wxRequest({
url: '/api/v1/appraise/getOfficeAppraise',
data: {
'officeId': officeId
},
success: function (response) {
let funcData = response.data
that.setData({
officeServiceText: funcData.serviceEvaluation.toFixed(1),
officeProductText: funcData.productEvaluatio.toFixed(1),
officeEnvironmentalText: funcData.environmentalEvaluation.toFixed(1),
})
}
})
},
/**
* 评论查看全部
......
......@@ -53,21 +53,36 @@
</view>
<view class="commodity-card-list row">
<block wx:for="{{detailActivity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="commodity-card-item col">
<view class="commodity-card-item col" bindtap="onActivityDetail" data-id="{{item.id}}">
<image src="{{item.cover}}"></image>
<view class="commodity-card-item-title row con-b align-c">
<text>{{item.title}}</text>
<text>{{item.tab}}</text>
<text>{{item.tagNames[0]}}</text>
</view>
<view class="commodity-card-item-date row align-c">
<image src="{{imageBase + 'icon/clock-2.png'}}"></image>
<text>{{item.time}}</text>
<text>{{item.date}}</text>
</view>
<view class="commodity-card-item-operation row con-b align-c">
<view class="row align-c">
<text>业主价</text>
<text>免费</text>
<text>{{item.price}}</text>
<!-- 活动价样式 -->
<view class="row align-c" wx:if="{{item.priceType === 1}}">
<text class="detail-price-discount">活动价</text>
<text class="price-symbol">¥</text>
<text>{{item.priceDiscountText == '0' ? '免费' : item.priceDiscountText}}</text>
<text>{{'¥' + item.priceText}}</text>
</view>
<!-- 业主价样式 -->
<view class="row align-c" wx:if="{{item.priceType === 2}}">
<text class="detail-price-special">业主价</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 === 3}}">
<text class="">业主价</text>
<text class="price-symbol">¥</text>
<text>{{item.priceText == '0' ? '免费' : item.priceText}}</text>
</view>
<view>
<button class="row con-c align-c">报名</button>
......@@ -102,13 +117,11 @@
<text>{{item.describe}}</text>
</view>
<view class="commodity-card-item-operation row con-b align-c">
<!-- 活动价样式 -->
<view class="row align-c" wx:if="{{item.priceType === 1}}">
<text class="detail-price-discount">活动价</text>
<text class="price-symbol">¥</text>
<text>{{item.priceDiscountText == '0' ? '免费' : item.priceDiscountText}}</text>
<text class="price-unit">/人</text>
<text>{{'¥' + item.priceText}}</text>
</view>
......@@ -117,20 +130,16 @@
<text class="detail-price-special">业主价</text>
<text class="price-symbol">¥</text>
<text>{{item.priceSpecialText == '0' ? '免费' : item.priceSpecialText}}</text>
<text class="price-unit">/人</text>
<text>{{'¥' + item.priceText}}</text>
</view>
<!-- 普通价样式 -->
<view class="row align-c" wx:if="{{item.priceType === 3}}">
<text class="">业主价</text>
<text class="price-symbol">¥</text>
<text>{{item.priceText == '0' ? '免费' : item.priceText}}</text>
<text class="price-unit">/人</text>
<text></text>
</view>
<view>
<button class="row con-c align-c" data-item="{{item}}" bindtap="onBuy">购买</button>
<button class="row con-c align-c" data-id="{{item.id}}" data-classid="{{item.classifyId}}" bindtap="onBuyCommodity">购买</button>
</view>
</view>
</view>
......@@ -139,8 +148,18 @@
</view>
</view>
<view class="commodity-menu" wx:if="{{winCommodityMenu}}">
<view></view>
<view class="commodity-menu col" wx:if="{{winCommodityMenu}}" bindtap="onBuySnacks" data-id="{{5}}">
<image class="commodity-menu-bg" src="{{resourcesBase + 'play/service/service-flower.png'}}"></image>
<view>
<image class="commodity-menu-icon"></image>
</view>
<view>
<text>能量补给站</text>
</view>
<view class="row align-c">
<text>饮品预订</text>
<image src="{{imageBase + 'more-w.png'}}"></image>
</view>
</view>
<!-- 简介,评价 -->
......
......@@ -235,7 +235,20 @@
.commodity-card-item-nothing {
width: 670rpx;
height: 544rpx;
background: #F5F6F8;
}
.commodity-card-item-nothing image {
width: 96rpx;
height: 76rpx;
}
.commodity-card-item-nothing text {
margin-top: 42rpx;
font-size: 30rpx;
color: #959DA9;
line-height: 42rpx;
font-weight: 600;
}
.commodity-card-item-nothing image {
......@@ -344,19 +357,55 @@
/* 能量补给跳转 */
.commodity-menu {
position: relative;
width: 750rpx;
height: 256rpx;
margin-top: 80rpx;
padding: 0 40rpx;
border-radius: 4px;
overflow: hidden;
}
.commodity-menu > view {
.commodity-menu-bg {
position: absolute;
z-index: -1;
width: 670rpx;
height: 256rpx;
background: #999999;
}
.commodity-menu-icon {
}
.commodity-menu-icon {
margin: 56rpx 0 0 54rpx;
width: 52rpx;
height: 37rpx;
background: #15191F;
}
.commodity-menu view:nth-child(3) {
margin: 26rpx 0 0 50rpx;
font-size: 30rpx;
color: #FFFFFF;
line-height: 42rpx;
}
.commodity-menu view:nth-child(4) {
margin: 8rpx 0 0 50rpx;
font-size: 26rpx;
color: #FFFFFF;
line-height: 40rpx;
}
.commodity-menu view:nth-child(4) image {
margin-left: 16rpx;
width: 32rpx;
height: 32rpx;
}
.movie-card-item-info {
height: 33rpx;
margin-top: 10rpx;
......@@ -421,17 +470,18 @@
height: 32rpx;
margin-right: 12rpx;
background: linear-gradient(180deg, #3F4357 0%, #252532 100%);
border-radius: 4px;
border-radius: 4rpx;
text-align: center;
font-size: 18rpx;
font-weight: 500;
line-height: 28rpx;
line-height: 32rpx;
color: #E8D0AF;
}
.commodity-card-item-operation text:nth-child(3) {
margin-right: 16rpx;
text-align: center;
font-size: 30rpx;
font-weight: 800;
......@@ -439,7 +489,7 @@
color: #15191F;
}
.commodity-card-item-operation text:nth-child(5) {
.commodity-card-item-operation text:nth-child(4) {
text-align: center;
font-size: 22rpx;
font-weight: 400;
......@@ -454,13 +504,6 @@
font-size: 18rpx;
font-weight: 600;
}
.price-unit {
margin-top: 8rpx;
margin-right: 16rpx;
color: #15191F;
font-size: 18rpx;
font-weight: 600;
}
.commodity-card-item-operation button {
flex-grow: 1;
......@@ -560,6 +603,7 @@
/* 详情 */
.detail {
margin-top: 62rpx;
padding-bottom: 160rpx;
}
......@@ -619,6 +663,10 @@
width: 670rpx;
min-height: 292rpx;
margin: 48rpx 40rpx 0 40rpx;
border-bottom: 1rpx solid #E2E7EF;
}
.evaluate-item:last-child {
border-bottom: none;
}
.evaluate-item-avatar {
......@@ -645,13 +693,13 @@
.evaluate-item-info-text text:nth-child(2) {
width: 60rpx;
height: 32rpx;
border-radius: 4px;
border-radius: 4rpx;
background: linear-gradient(180deg, #3F4357 0%, #252532 100%);
text-align: center;
font-size: 18rpx;
font-weight: 500;
line-height: 28rpx;
line-height: 32rpx;
color: #E8D0AF;
}
......@@ -665,6 +713,10 @@
color: #959DA9;
}
.evaluate-item-info-star {
margin-top: 8rpx;
}
.evaluate-item-info-star image {
width: 28rpx;
height: 28rpx;
......@@ -672,17 +724,19 @@
}
.evaluate-item-content {
display: -webkit-box;
position: relative;
width: 670rpx;
min-height: 88rpx;
max-height: 132rpx;
margin-top: 32rpx;
overflow: hidden;
font-size: 26rpx;
font-weight: 400;
line-height: 44rpx;
color: #15191F;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
.evaluate-item-content-whole {
......
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