Commit 45cb8b11 by wjw

ww-活动业态丢失解决

parent 05f095e5
......@@ -288,8 +288,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
......@@ -300,6 +301,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="{{shopInfo.name + 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
......@@ -9,6 +9,7 @@ let logicData = {
Page({
data: {
imageBase: App.globalData.appImageBase,
appResourcesBase: App.globalData.appResourcesBase,
option: {},
// 弹出控制
......@@ -74,6 +75,14 @@ Page({
winActivity: false, // 近期活动
winCommodity: false, // 商品列表
winCommodityMenu: false,
officeService: 0,
officeServiceText: '5.0', // 门店服务评分
officeProduct: 0,
officeProductText: '5.0', // 门店产品评分
officeEnvironmental: 0,
officeEnvironmentalText: '5.0', // 门店环境评分
},
onLoad: function (options) {
......@@ -138,7 +147,8 @@ Page({
default:
this.queryCommodity()
}
// 查询评价
this.getOfficeAppraise()
this.getAppraise()
},
......@@ -389,8 +399,42 @@ Page({
'officeId': this.data.shopInfo.id,
},
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({
winActivity: true
winActivity: true,
detailActivity: funcList
})
}
})
......@@ -413,8 +457,8 @@ Page({
'pageSize': 10,
},
success: (response) => {
let funcCommodityList = []
let funcResponse = response.data
let funcCommodityList = []
for (let i = 0, l = funcResponse.length; i < l; i++) {
let funcItem = {
'id': funcResponse[i].id, // 商品标识
......@@ -512,22 +556,73 @@ Page({
* @returns
*/
getAppraise: function () {
let that = this
App.wxRequest({
url: '/api/v1/appraise/getList',
data: {
'pageNo': '1',
'pageSize': '-1',
'officeId': this.data.shopInfo.id
'officeId': that.data.shopInfo.id
},
success: (res) => {
let funcData = res.data
this.setData({
detailEvaluate: funcData.list
let funcData = res.data.list
let funcList = []
let officeServiceText = '0'
let officeProductText = '0'
let officeEnvironmentalText = '0'
console.log(JSON.stringify(funcData))
for (let i=0, l=funcData.length; i<l; i++) {
let funcItem = {
'avatar': funcData[i].headImg, // 头像
'name': funcData[i].nickname,
'userType': funcData[i].userType,
'content': funcData[i].content, // 内容
'imgUrls': funcData[i].imgUrls, // 图片
'environmentalEvaluation': funcData[i].environmentalEvaluation, // 环境评分
'productEvaluation': funcData[i].productEvaluation, // 产品评分
'serviceEvaluation': funcData[i].serviceEvaluation, // 服务评分
'date': funcData[i].createDate, // 评价时间
'star': Math.floor((funcData[i].environmentalEvaluation + funcData[i].productEvaluation + funcData[i].serviceEvaluation) / 3)
}
funcList.push(funcItem)
}
if (funcList.length === 0) {
officeServiceText = '5.0'
officeProductText = '5.0'
officeEnvironmentalText = '5.0'
that.setData({
officeServiceText,
officeProductText,
officeEnvironmentalText
})
}
that.setData({
detailEvaluate: funcList,
})
},
}
})
},
// 查询门店评分
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({
detailEvaluate: funcData.list,
officeServiceText: funcData.serviceEvaluation.toFixed(1),
officeProductText: funcData.productEvaluatio.toFixed(1),
officeEnvironmentalText: funcData.environmentalEvaluation.toFixed(1),
})
}
})
},
onBuy: function (event) {
let id = event.currentTarget.dataset.id
wx.navigateTo({
......@@ -573,10 +668,10 @@ Page({
break
}
},
// 点击下方按钮
onContact: function () {
wx.makePhoneCall({
phoneNumber: this.data.info.contact
wx.navigateTo({
url: '/pages/commodity/project-detail/project-detail'
})
},
......@@ -688,7 +783,7 @@ Page({
* @param {object} - funcEvent
* @returns
*/
onActivityAll: function () {
onAllActivity: function () {
wx.navigateTo({
url: '/pages/play/activity/activity?fromPage=serviceDetail',
})
......
......@@ -50,7 +50,7 @@
<view class="commodity-card" wx:if="{{winActivity}}">
<view class="commodity-card-title row con-b align-e">
<text>近期活动</text>
<text bindtap="onActivityAll">查看全部</text>
<text bindtap="onAllActivity">查看全部</text>
</view>
<view class="commodity-card-list row">
<block wx:for="{{detailActivity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
......@@ -65,10 +65,22 @@
<text>{{item.time}}</text>
</view>
<view class="commodity-card-item-operation row con-b align-c">
<view class="row 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>免费</text>
<text>{{item.price}}</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">报名</button>
......@@ -79,6 +91,7 @@
<block wx:if="{{detailActivity.length === 0}}">
<view class="commodity-card-item-nothing col con-c align-c">
<image src="{{appResourcesBase + 'service/nothing.png'}}"></image>
<text>近期暂无活动安排</text>
</view>
</block>
......@@ -108,7 +121,6 @@
<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,7 +129,6 @@
<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>
......@@ -126,8 +137,6 @@
<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>
......@@ -166,19 +175,19 @@
<view class="evaluate-option-item row align-c">
<image src="{{imageBase + 'icon/evaluate-1.png'}}"></image>
<text>服务</text>
<text>0.5</text>
<text>{{officeServiceText}}</text>
<text>分</text>
</view>
<view class="evaluate-option-item row align-c">
<image src="{{imageBase + 'icon/shop-1.png'}}"></image>
<text>产品</text>
<text>0.5</text>
<text>{{officeProductText}}</text>
<text>分</text>
</view>
<view class="evaluate-option-item row align-c">
<image src="{{imageBase + 'icon/album-1.png'}}"></image>
<text>环境</text>
<text>0.5</text>
<text>{{officeEnvironmentalText}}</text>
<text>分</text>
</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 {
......@@ -405,17 +418,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;
......@@ -423,7 +437,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;
......@@ -438,13 +452,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;
......@@ -602,6 +609,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 {
......@@ -628,13 +639,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;
}
......@@ -648,6 +659,10 @@
color: #959DA9;
}
.evaluate-item-info-star {
margin-top: 8rpx;
}
.evaluate-item-info-star image {
width: 28rpx;
height: 28rpx;
......@@ -655,16 +670,18 @@
}
.evaluate-item-content {
display: -webkit-box;
position: relative;
width: 670rpx;
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-more {
......
{
"description": "项目配置文件",
"packOptions": {
"ignore": []
},
"setting": {
"urlCheck": true,
"es6": true,
"enhance": true,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": true,
"coverView": true,
"nodeModules": true,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": false,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"useMultiFrameRuntime": false,
"useApiHook": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"useIsolateContext": true,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"enableEngineNative": false
},
"compileType": "miniprogram",
"libVersion": "2.10.0",
"appid": "wx37a9b7a3d92029f2",
"projectname": "%E4%B8%96%E8%8C%82%E5%B0%8F%E7%A8%8B%E5%BA%8F%E4%BA%8C%E6%9C%9F",
"debugOptions": {
"hidedInDevtools": []
},
"isGameTourist": false,
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"plugin": {
"current": -1,
"list": []
},
"game": {
"currentL": -1,
"list": []
},
"gamePlugin": {
"current": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": [
{
"id": -1,
"name": "pages/commodity/menu-food/menu-food",
"pathName": "pages/commodity/menu-food/menu-food",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/play/home/home",
"pathName": "pages/play/home/home",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/play/service-detail/service-detail",
"pathName": "pages/play/service-detail/service-detail",
"query": "id=1&type=4",
"scene": null
},
{
"id": -1,
"name": "pages/mine/home/home",
"pathName": "pages/mine/home/home",
"scene": null
}
]
}
}
}
\ No newline at end of file
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