Commit a6ac5827 by 严立

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

# Conflicts:
#	app.js
#	pages/mine/home/home.js
#	pages/mine/home/home.wxml
#	pages/play/service-detail/service-detail.wxml
#	pages/play/service-detail/service-detail.wxss

Signed-off-by: 严立 <yanl@xmmakeit.com>
parent b8006dfd
......@@ -65,7 +65,7 @@
</block>
</swiper>
<view class="all_activity_nothing">
<view class="all_activity_nothing" wx:if="{{childActivity.length === 0}}">
<image src="{{resourcesBase + 'campsite/all-activities-nothing.png'}}"></image>
</view>
</view>
......
......@@ -182,6 +182,7 @@
.swiper {
width: 750rpx;
height: 1160rpx;
padding: 40rpx 0 0 0;
background-color: #FCF8F0;
}
......
......@@ -46,21 +46,21 @@
<!-- 活动价 - 暂无 -->
<block wx:if="{{item.priceType === 1}}">
<text class="discount-mark">活动价</text>
<text>{{'¥ ' + item.priceDiscountText}}</text>
<text>{{' + item.priceText}}</text>
<text>{{item.priceDiscountText === '0.00' ? '免费' : '¥ ' + item.priceDiscountText}}</text>
<text>{{item.priceText === '0.00' ? '免费' : '¥' + item.priceText}}</text>
</block>
<!-- 业主价 -->
<block wx:if="{{item.priceType === 2}}">
<text class="owner-mark">业主价</text>
<text>{{'¥' + item.priceSpecialText}}</text>
<text>{{'¥' + item.priceText}}</text>
<text>{{item.priceSpecialText === '0.00' ? '免费' : '¥' + item.priceSpecialText}}</text>
<text>{{item.priceText === '0.00' ? '免费' : '¥' + item.priceText}}</text>
</block>
<!-- 普通价 -->
<block wx:if="{{item.priceType === 3}}">
<text></text>
<text>{{item.priceText}}</text>
<text>{{item.priceText === '0.00' ? '免费' : '¥' + item.priceText}}</text>
<text></text>
</block>
</view>
......
......@@ -35,65 +35,35 @@ Page({
userInfo: wx.getStorageSync('userInfo'),
cssGreeting: wx.getStorageSync('navStatusHeight') + wx.getStorageSync('navTitleHeight') + 20 * wx.getStorageSync('unitProportion'),
})
this.setGreetingMessage()
this.setDefaultGreetingMessage()
this.queryFestivalGreeting()
this.queryShopCover()
this.queryRecommend()
this.queryIntegralMallGoods()
},
queryShopCover: function () {
function shopCover(funcType, funcIndex) {
App.wxRequest({
url: 'v1/banner/getOfficeByBanner',
data: {
'smColumnId': funcType,
},
success: (response) => {
let funcResponse = response.data
let funcBanner = This.data.banner
if (funcResponse.length) {
funcBanner[funcIndex] = funcResponse[0].img
} else {
funcBanner[funcIndex] = ''
}
This.setData({
banner: funcBanner
})
}
})
}
let This = this
// 0 首页,1 所有服务,2 儿童营地,3 海错图,4 元养水韵,5 儿童营地接待,6 拾光花坊, 7 商品
let funcShopList = [2, 3, 4, 5, 6]
for (let i = 0, l = funcShopList.length; i < l; i++) {
shopCover(funcShopList[i], i)
}
},
/**
* 问候消息
* @function
* @param {object} - funcEvent
* @returns
*/
setGreetingMessage: function () {
setDefaultGreetingMessage: function () {
let funcHour = Number(App.modular.miment().format('hh'))
let funcMinute = Number(App.modular.miment().format('mm'))
let funcTime = [{
'min': 0,
'max': 12,
'message': '上午好!'
'message': '上午好!'
}, {
'min': 12,
'max': 18,
'message': '下午好!'
'message': '下午好!'
}, {
'min': 18,
'max': 24,
'message': '晚上好!'
'message': '晚上好!'
}]
let funcIndex = 0
......@@ -110,14 +80,87 @@ Page({
}
}
let funcGreetingName = this.data.userInfo.name
if (funcGreetingName.length > 5) funcGreetingName = funcGreetingName.substring(0, 5) + '...'
if (funcGreetingName === '') funcGreetingName = 'Hello'
let funcUserName = this.data.userInfo.name ? this.data.userInfo.name : 'Hello'
let funcGreetingMessage = funcTime[funcIndex].message
let funcUserNameChar = App.modular.utils.countStringChar(funcUserName)
let funcGreetingMessageChar = App.modular.utils.countStringChar(funcGreetingMessage)
let funcUserNameSubstring = funcUserName
let funcUserNameSubstringChar = funcUserNameChar
if (funcUserNameChar + funcGreetingMessageChar > 60 && funcGreetingMessageChar < 40) {
while (funcUserNameSubstringChar + funcGreetingMessageChar > 60) {
funcUserNameSubstring = funcUserNameSubstring.substring(0, funcUserNameSubstring.length - 1)
funcUserNameSubstringChar = App.modular.utils.countStringChar(funcUserNameSubstring) + 3
}
funcUserNameSubstring = funcUserNameSubstring + '...'
}
this.setData({
greetingName: funcUserNameSubstring,
greetingMessage: funcGreetingMessage
})
},
queryFestivalGreeting: function () {
App.request({
url: 'v1/common/getGreet',
}).then((response) => {
let funcData = response.data
let funcDateNow = App.modular.miment().stamp()
if (funcData.startTime < funcDateNow && funcDateNow < funcData.endTime) {
let funcUserName = this.data.userInfo.name ? this.data.userInfo.name : 'Hello'
let funcGreetingMessage = ',' + funcData.content
let funcUserNameChar = App.modular.utils.countStringChar(funcUserName)
let funcGreetingMessageChar = App.modular.utils.countStringChar(funcGreetingMessage)
let funcUserNameSubstring = funcUserName
let funcUserNameSubstringChar = funcUserNameChar
if (funcUserNameChar + funcGreetingMessageChar > 60 && funcGreetingMessageChar < 40) {
while (funcUserNameSubstringChar + funcGreetingMessageChar > 60) {
funcUserNameSubstring = funcUserNameSubstring.substring(0, funcUserNameSubstring.length - 1)
funcUserNameSubstringChar = App.modular.utils.countStringChar(funcUserNameSubstring) + 3
}
funcUserNameSubstring = funcUserNameSubstring + '...'
}
this.setData({
greetingName: funcGreetingName,
greetingMessage: funcTime[funcIndex].message
greetingName: funcUserNameSubstring,
greetingMessage: funcGreetingMessage
})
}
})
},
queryShopCover: function () {
function shopCover(funcType, funcIndex) {
App.request({
url: 'v1/banner/getOfficeByBanner',
params: {
'smColumnId': funcType,
}
}).then((response) => {
let funcResponse = response.data
let funcBanner = This.data.banner
if (funcResponse.length) {
funcBanner[funcIndex] = funcResponse[0].img
} else {
funcBanner[funcIndex] = ''
}
This.setData({
banner: funcBanner
})
})
}
let This = this
// 0 首页,1 所有服务,2 儿童营地,3 海错图,4 元养水韵,5 儿童营地接待,6 拾光花坊, 7 商品
let funcShopList = [2, 3, 4, 5, 6]
for (let i = 0, l = funcShopList.length; i < l; i++) {
shopCover(funcShopList[i], i)
}
},
/**
......
......@@ -4,13 +4,13 @@
<block wx:if="{{!appStatus}}">
<!-- 问候订制 -->
<view class="greeting" style="{{'padding-bottom: 0; padding-top:' + cssGreeting + 'px;'}}">
<text>{{greetingName + ',' + greetingMessage}}</text>
<text>{{greetingName + greetingMessage}}</text>
</view>
</block>
<block wx:if="{{appStatus}}">
<!-- 问候订制 -->
<view class="greeting" style="{{'padding-top:' + cssGreeting + 'px;'}}">
<text>{{greetingName + ',' + greetingMessage}}</text>
<text>{{greetingName + greetingMessage}}</text>
</view>
<!-- 商店 -->
......
......@@ -398,6 +398,7 @@ Page({
* @returns
*/
setEntryTime: function (funcEntryId) {
console.log(funcEntryId)
let funcItem = wx.getStorageSync('shoppingCartBuffer')[0]
App.request({
url: 'v1/activity/getEnrollView',
......@@ -480,6 +481,8 @@ Page({
let funcTimeBegin = ''
let funcTimeEnd = ''
console.log('funcTimetable')
console.log(funcTimetable)
for (let i = 0, l = funcTimetable.length; i < l; i++) {
if (funcEntryId === funcTimetable[i].id) {
funcDateBegin = App.modular.miment(funcTimetable[i].beginTime).format('MM月DD日')
......@@ -487,7 +490,7 @@ Page({
funcTimeEnd = App.modular.miment(funcTimetable[i].endTime).format('hh:mm')
this.setData({
quantityTipNumber: funcDate[0][i].residue,
quantityTipNumber: funcTimetable[i].residue,
buyContentTime: funcDateBegin + ' ' + funcTimeBegin + ' - ' + funcTimeEnd
})
break
......
......@@ -13,7 +13,7 @@
top: 0 !important;
left: 0 !important;
width: 750rpx;
height: 800rpx;
height: 792rpx;
}
.banner-swiper-point {
......
......@@ -63,9 +63,8 @@ Page({
'cover': funcData[i].cover,
'banner': funcData[i].playImg,
'describe': funcData[i].summary,
'timeDateMM': [funcData[i].activeDate.match(/[0-9]+/g)[0], funcData[i].activeDate.match(/[0-9]+/g)[2]],
'timeDateDD': [funcData[i].activeDate.match(/[0-9]+/g)[1], funcData[i].activeDate.match(/[0-9]+/g)[3]],
'timePeriod': funcData[i].activeTime.replace(/-/, ' - '),
'timeDate': funcData[i].activeDate,
'timePeriod': funcData[i].activeTime,
'ownerPrice': funcData[i].ownerPrice,
'visitorPrice': funcData[i].visitorPrice,
'tagId': funcData[i].tagIds,
......@@ -300,9 +299,8 @@ Page({
},
onReachBottom: function () {
console.log('onReachBottom')
this.setData({
pageNo: this.data.pageNo + 1
touristRoutePageNo: this.data.touristRoutePageNo + 1
})
this.routeList()
......
......@@ -25,24 +25,15 @@
<view class="recent_activities_list row" wx:if="{{recentActivitiesList.length > 0}}" bindchange="swiperRecentChange">
<block wx:for="{{recentActivitiesList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="recent_activities_item" data-item="{{item}}" bindtap="onActivityDetail">
<view class="recent_activities_item_wrap column">
<view class="recent_activities_item_date row ac">
<text class="font_normal_42 color_regular">{{item.timeDateMM[0]}}</text>
<text class="font_normal_50 color_regular">/</text>
<text class="font_normal_42 color_regular">{{item.timeDateDD[0]}}</text>
</view>
<view class="recent_activities_item_date row ac">
<text class="font_normal_42 color_regular">{{item.timeDateMM[1]}}</text>
<text class="font_normal_50 color_regular">/</text>
<text class="font_normal_42 color_regular">{{item.timeDateDD[1]}}</text>
</view>
<view class="recent_activities_item_line"></view>
<text class="recent_activities_item_time font_bold_30 color_regular">{{item.timePeriod}}</text>
<view class="recent_activities_item_wrap">
<image class="recent_activities_item_cover" mode="aspectFill" src="{{item.banner}}"></image>
<view class="recent_activities_item_name row ac">
<text class="font_bold_54 color_regular overflow_point_2">{{item.name}}</text>
</view>
<view class="recent_activities_item_date row ac">
<text class="recent_activities_item_time font_normal_30 color_cancel">{{item.timeDate + item.timePeriod}}</text>
</view>
</view>
<image class="recent_activities_item_cover" mode="aspectFill" src="{{item.banner}}"></image>
</view>
</block>
<view class="recent_activities_item"></view>
......
......@@ -77,7 +77,7 @@
/* 近期活动 */
.recent_activities_list {
width: 750rpx;
margin: 80rpx 0 0 0;
margin: 90rpx 0 0 0;
padding: 0 0 0 40rpx;
overflow-x: scroll;
}
......@@ -85,8 +85,8 @@
.recent_activities_item {
display: inline-block;
position: relative;
width: 648rpx;
height: 720rpx;
width: 650rpx;
min-height: 720rpx;
margin: 0 24rpx 0 0;
padding: 48rpx 0 0 0;
}
......@@ -96,37 +96,28 @@
}
.recent_activities_item_wrap {
width: 648rpx;
height: 672rpx;
padding: 50rpx 0 0 50rpx;
width: 650rpx;
min-height: 672rpx;
padding: 0 40rpx;
border-radius: 2px;
background: #EEF3F9;
}
.recent_activities_item_date {
margin: 0 0 12rpx 0;
}
.recent_activities_item_line {
width: 1px;
height: 128rpx;
margin: 8rpx 0 22rpx 10rpx;
background: #000000;
.recent_activities_item_cover {
position: relative;
top: -48rpx;
left: 0;
width: 568rpx;
height: 464rpx;
border-radius: 2px;
}
.recent_activities_item_name {
width: 560rpx;
height: 168rpx;
margin: 60rpx 0 0 0;
margin: -6rpx 0 0 0;
}
.recent_activities_item_cover {
position: absolute;
top: 0;
left: 260rpx;
width: 340rpx;
height: 464rpx;
border-radius: 2px;
.recent_activities_item_date {
margin: 30rpx 0 0 0;
}
.item-nothing {
......
......@@ -32,7 +32,7 @@ Page({
isBlack: false,
cssTabContentTop: wx.getStorageSync('navHeight'),
cssTabContentTop: 0,
sideHeight: 550,
winSide: true,
......@@ -60,13 +60,24 @@ Page({
},
onLoad: function(options) {
console.log(options)
this.setData({
option: options,
cssTabContentTop: wx.getStorageSync('navHeight'),
})
this.setActivityTypeTag()
},
onShow: function() {
this.setData({
appStatus: App.globalData.appStatus
})
},
setViewContent: function () {
// 根据商店查询相关订制内容
switch (Number(options.id)) {
switch (Number(this.data.option.id)) {
case 1:
this.queryCommodity()
this.queryActivity()
......@@ -129,12 +140,6 @@ Page({
}
},
onShow: function() {
this.setData({
appStatus: App.globalData.appStatus
})
},
/**
* 设置电影类型标签
* @function
......@@ -159,7 +164,7 @@ Page({
this.setData({
activityTypeTag: funcList,
})
this.queryDetail(Number(this.data.options.id))
this.queryDetail(Number(this.data.option.id))
})
},
......@@ -327,7 +332,6 @@ Page({
App.request({
url: 'v1/park/getList',
}).then((response) => {
console.log(response)
let funcData = response.data
funcDetail.forEach(shop => {
funcData.forEach(item => {
......@@ -377,6 +381,7 @@ Page({
this.setData({
shopInfo: funcItem
})
this.setViewContent()
break
}
}
......@@ -389,6 +394,8 @@ Page({
* @returns
*/
queryActivity: function() {
console.log('this.data.shopInfo.id')
console.log(this.data.shopInfo.id)
App.wxRequest({
url: 'v1/activity/getList',
data: {
......@@ -411,11 +418,12 @@ Page({
'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': this.ignoreActivityTypeTag([]),
'tagIds': funcResponse[i].tagIds.split(','),
'tagNames': [],
'date': funcResponse[i].activeDate + ' ' + funcResponse[i].activeTime, // 活动时间
'priceType': 1,
}
funcItem.tagNames = this.insertActivityTypeTag(funcItem.tagIds)
let funcUserType = wx.getStorageSync('userInfo').userType
// 根据后台判断价格显示类型
......@@ -437,8 +445,6 @@ Page({
winActivity: true,
detailActivity: funcList
})
console.log(JSON.stringify(this.data.detailActivity))
}
})
},
......@@ -956,16 +962,16 @@ Page({
},
/**
* 过滤活动标签
* 插入活动标签
* @function
* @param {array} - funcIgnoreTag
* @returns
*/
ignoreActivityTypeTag: function (funcIgnoreTag) {
insertActivityTypeTag: function (funcInsertTag) {
let funcRemainTag = []
let funcActivityTypeTag = this.data.activityTypeTag
for (let i = 0, l = funcActivityTypeTag.length; i < l; i++) {
if (!funcIgnoreTag.includes(funcActivityTypeTag[i].value)) funcRemainTag.push(funcActivityTypeTag[i].text)
if (funcInsertTag.includes(funcActivityTypeTag[i].value)) funcRemainTag.push(funcActivityTypeTag[i].text)
}
return funcRemainTag
},
......
......@@ -20,25 +20,25 @@
<view class="commodity">
<!-- 详情标题,分享,位置 -->
<view class="commodity-title row align-c">
<view class="commodity-title row ac">
<text>{{info.name}}</text>
<image src="{{imageBase + 'icon/share-2.png'}}" bindtap="onShare"></image>
<image src="{{imageBase + 'icon/location-2.png'}}" bind:tap="onLocation"></image>
</view>
<!-- 分享弹出图片 -->
<view class="container-share row con-c align-c" hidden="{{!showPopup}}">
<view class="container-share row con-c ac" hidden="{{!showPopup}}">
<view class="col con-c">
<view class="share-content">
<image src="{{shareImage}}"></image>
</view>
<view class="share-operation row con-b align-c">
<view class="share-operation row cb ac">
<button bindtap="onCancel">取消</button>
<button bindtap="onDownload">下载图片</button>
</view>
</view>
</view>
<!-- 开放时间信息 -->
<view class="commodity-other {{option.id === '6' || option.id === '4' ? 'food-border' : ''}} row align-c">
<view class="commodity-other {{option.id === '6' || option.id === '4' ? 'food-border' : ''}} row ac">
<image src="{{imageBase + 'icon/clock-2.png'}}"></image>
<text>开放时间</text>
<text>{{info.date}}</text>
......@@ -46,7 +46,7 @@
<!-- 近期活动 -->
<view class="commodity-card" wx:if="{{winActivity}}">
<view class="commodity-card-title row con-b align-e">
<view class="commodity-card-title row cb align-e">
<text>近期活动</text>
<text bindtap="onActivityAll">查看全部</text>
</view>
......@@ -54,43 +54,43 @@
<block wx:for="{{detailActivity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="commodity-card-item col" bindtap="onActivityDetail" data-id="{{item.id}}">
<image mode="aspectFill" src="{{item.cover}}"></image>
<view class="commodity-card-item-title row con-b align-c">
<view class="commodity-card-item-title row ac">
<text>{{item.title}}</text>
<text>{{item.tagNames[0]}}</text>
<text wx:if="{{item.tagNames[0]}}">{{item.tagNames[0]}}</text>
</view>
<view class="commodity-card-item-date row align-c">
<view class="commodity-card-item-date row ac">
<image src="{{imageBase + 'icon/clock-2.png'}}"></image>
<text>{{item.date}}</text>
</view>
<view class="commodity-card-item-operation row con-b align-c">
<view class="commodity-card-item-operation row cb ac">
<!-- 活动价样式 -->
<view class="row align-c" wx:if="{{item.priceType === 1}}">
<view class="row ac" wx:if="{{item.priceType === 1}}">
<text class="discount-mark">活动价</text>
<text class="price-symbol">{{item.priceDiscount == '0' ? '' : '¥'}}</text>
<text class="price-valid">{{item.priceDiscount == '0' ? '免费' : item.priceDiscountText}}</text>
<text class="price-invalid">{{'¥' + item.priceText}}</text>
</view>
<!-- 业主价样式 -->
<view class="row align-c" wx:if="{{item.priceType === 2}}">
<view class="row ac" wx:if="{{item.priceType === 2}}">
<text class="owner-mark">业主价</text>
<text class="price-symbol">{{item.priceSpecial == '0' ? '' : '¥'}}</text>
<text class="price-valid">{{item.priceSpecial == '0' ? '免费' : item.priceSpecialText}}</text>
<text class="price-invalid">{{'¥' + item.priceText}}</text>
</view>
<!-- 普通价样式 -->
<view class="row align-c" wx:if="{{item.priceType === 3}}">
<view class="row ac" wx:if="{{item.priceType === 3}}">
<text class="price-symbol">{{item.price == '0' ? '' : '¥'}}</text>
<text class="price-valid">{{item.price == '0' ? '免费' : item.priceText}}</text>
</view>
<view>
<button class="row con-c align-c">报名</button>
<button class="row con-c ac">报名</button>
</view>
</view>
</view>
</block>
<view class="commodity-card-item col" wx:if="{{detailActivity.length !== 0}}"></view>
<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 ac">
<image class="nothing-activity" src="{{imageBase + 'icon/fireworks-2.png'}}"></image>
<text>近期暂无活动安排</text>
</view>
......@@ -100,10 +100,10 @@
<!-- 商品 -->
<view class="commodity-card" wx:if="{{winCommodity}}">
<view class="commodity-card-title row con-b align-e">
<view class="commodity-card-title row cb align-e">
<text>{{commodityTitle}}</text>
<text wx:if="{{!winHidden}}" bindtap="onCommodityAll">查看全部</text>
<view wx:if="{{winHidden}}" class="row align-c">
<view wx:if="{{winHidden}}" class="row ac">
<image src="{{imageBase + 'icon/warning-2.png'}}"></image>
<text>请到线下门店购买</text>
</view>
......@@ -112,20 +112,20 @@
<view class="commodity-card-list row">
<block wx:for="{{detailCommodity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="commodity-card-item col">
<view class="commodity-card-item-cover row con-c align-c">
<view class="commodity-card-item-cover row con-c ac">
<image mode="aspectFill" src="{{item.cover}}"></image>
</view>
<view class="commodity-card-item-title row con-b align-c">
<view class="commodity-card-item-title row cb ac">
<text>{{item.name}}</text>
</view>
<view class="commodity-card-item-date row align-c">
<view class="commodity-card-item-date row ac">
<text>{{item.describe}}</text>
</view>
<block wx:if="{{!winHidden}}">
<view class="commodity-card-item-operation row con-b align-c">
<view class="commodity-card-item-operation row cb ac">
<!-- 活动价样式 -->
<view class="row align-c" wx:if="{{item.priceType === 1}}">
<view class="row ac" wx:if="{{item.priceType === 1}}">
<text class="discount-mark">活动价</text>
<text class="price-symbol">¥</text>
<text class="price-valid">{{item.priceDiscountText == '0' ? '免费' : item.priceDiscountText}}</text>
......@@ -133,19 +133,19 @@
</view>
<!-- 业主价样式 -->
<view class="row align-c" wx:if="{{item.priceType === 2}}">
<view class="row ac" wx:if="{{item.priceType === 2}}">
<text class="owner-mark">业主价</text>
<text class="price-symbol">¥</text>
<text class="price-valid">{{item.priceSpecialText == '0' ? '免费' : item.priceSpecialText}}</text>
<text class="price-invalid">{{'¥' + item.priceText}}</text>
</view>
<!-- 普通价样式 -->
<view class="row align-c" wx:if="{{item.priceType === 3}}">
<view class="row ac" wx:if="{{item.priceType === 3}}">
<text class="price-symbol">¥</text>
<text class="price-valid">{{item.priceText == '0' ? '免费' : item.priceText}}</text>
</view>
<view>
<button class="row con-c align-c" data-id="{{item.id}}" data-classid="{{item.classifyId}}" bindtap="onBuyCommodity">购买</button>
<button class="row con-c ac" data-id="{{item.id}}" data-classid="{{item.classifyId}}" bindtap="onBuyCommodity">购买</button>
</view>
</view>
</block>
......@@ -157,7 +157,7 @@
</view>
<!-- 能量补给站 -->
<view class="commodity-menu col" wx:if="{{winCommodityMenu}}">
<view class="commodity-menu-title row con-b align-e">
<view class="commodity-menu-title row cb align-e">
<text>{{commodityTitle}}</text>
</view>
<image src="{{resourcesBase + 'play/service/service-flower.png'}}" bindtap="onBuySnacks" data-id="{{5}}"></image>
......@@ -165,10 +165,10 @@
<!-- 简介,评价 -->
<view class="tab-content row" style="{{ 'top: ' + cssTabContentTop + 'px;'}}">
<view class="tab-content-item row align-c {{contentType === 'detail' ? 'tab-content-active' : ''}}" data-type="detail" bindtap="onSelectionContent">
<view class="tab-content-item row ac {{contentType === 'detail' ? 'tab-content-active' : ''}}" data-type="detail" bindtap="onSelectionContent">
<text>简介</text>
</view>
<view class="tab-content-item row align-c {{contentType === 'evaluate' ? 'tab-content-active' : ''}}" data-type="evaluate" bindtap="onSelectionContent">
<view class="tab-content-item row ac {{contentType === 'evaluate' ? 'tab-content-active' : ''}}" data-type="evaluate" bindtap="onSelectionContent">
<text>评价</text>
</view>
</view>
......@@ -182,20 +182,20 @@
<!-- 评价 -->
<view class="evaluate" wx:if="{{contentType === 'evaluate'}}">
<view class="evaluate-option row con-b align-c">
<view class="evaluate-option-item row align-c">
<view class="evaluate-option row cb ac">
<view class="evaluate-option-item row ac">
<image src="{{imageBase + 'icon/evaluate-1.png'}}"></image>
<text>服务</text>
<text>{{officeServiceText}}</text>
<text>分</text>
</view>
<view class="evaluate-option-item row align-c">
<view class="evaluate-option-item row ac">
<image src="{{imageBase + 'icon/shop-1.png'}}"></image>
<text>产品</text>
<text>{{officeProductText}}</text>
<text>分</text>
</view>
<view class="evaluate-option-item row align-c">
<view class="evaluate-option-item row ac">
<image src="{{imageBase + 'icon/album-1.png'}}"></image>
<text>环境</text>
<text>{{officeEnvironmentalText}}</text>
......@@ -209,12 +209,12 @@
<view class="row">
<image class="evaluate-item-avatar" src="{{item.userAvatar}}" mode="widthFix"></image>
<view class="evaluate-item-info">
<view class="evaluate-item-info-text row align-c">
<view class="evaluate-item-info-text row ac">
<text>{{item.userName}}</text>
<text>业主</text>
<text>{{item.date}}</text>
</view>
<view class="evaluate-item-info-star row align-c">
<view class="evaluate-item-info-star row ac">
<block wx:for="{{item.star}}" wx:for-index="indexStar" wx:for-item="itemStar" wx:key="indexStar">
<image src="{{imageBase + 'icon/star-1.png'}}" data-item="{{item}}"></image>
</block>
......@@ -236,7 +236,7 @@
<image wx:if="{{indexAlbum < 4}}" src="{{itemAlbum}}" data-index="{{indexAlbum}}" data-item="{{item}}" bindtap="onEvaluateAlbum"></image>
</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">
<view wx:if="{{item.userAlbum.length > 4}}" class="evaluate-item-album-more row con-c ac" data-index="{{3}}" data-item="{{item}}" bindtap="onEvaluateAlbum">
<text>{{'+' + (item.userAlbum.length - 4)}}</text>
</view>
</view>
......@@ -247,14 +247,14 @@
<!-- 操作 -->
<view class="operation" wx:if="{{option.id === '1'}}">
<button class="button row con-c align-c" bindtap="onContact">购买门票</button>
<button class="button row con-c ac" bindtap="onContact">购买门票</button>
</view>
<view class="operation" wx:if="{{option.id === '4' || option.id === '6'}}">
<button class="button row con-c align-c" bindtap="onBuyFood">立即点餐</button>
<button class="button row con-c ac" bindtap="onBuyFood">立即点餐</button>
</view>
<!-- 侧边返回顶部 -->
<view class="appointment-side col con-b align-c" hidden="{{winSide}}">
<view class="appointment-side col cb ac" hidden="{{winSide}}">
<button class="appointment-side-top" bindtap="onBackTop">
<image src="{{imageBase + 'top.png'}}"></image>
</button>
......@@ -281,25 +281,25 @@
<view class="commodity-movie" style="height: {{movieHeight + 'rpx'}}">
<!-- 详情标题,分享,位置 -->
<view class="commodity-title movie-title row align-c">
<view class="commodity-title movie-title row ac">
<text>{{info.title}}</text>
<image src="{{imageBase + 'icon/share-3.png'}}" bindtap="onShare"></image>
<image src="{{imageBase + 'icon/location-3.png'}}" bind:tap="onLocation"></image>
</view>
<!-- 分享弹出图片 -->
<view class="container-share row con-c align-c" hidden="{{!showPopup}}">
<view class="container-share row con-c ac" hidden="{{!showPopup}}">
<view class="col con-c">
<view class="share-content">
<image src="{{shareImage}}"></image>
</view>
<view class="share-operation row con-b align-c">
<view class="share-operation row cb ac">
<button bindtap="onCancel">取消</button>
<button bindtap="onDownload">下载图片</button>
</view>
</view>
</view>
<!-- 开放时间信息 -->
<view class="commodity-other movie-border row align-c">
<view class="commodity-other movie-border row ac">
<image src="{{imageBase + 'icon/clock-2.png'}}"></image>
<text>开放时间</text>
<text>{{info.date}}</text>
......@@ -312,7 +312,7 @@
<!-- 热映影片 -->
<view class="commodity-movie-card">
<view class="movie-card-title row con-b align-e">
<view class="movie-card-title row cb align-e">
<text>热映影片</text>
<text bindtap="onMovieAll">查看全部</text>
</view>
......@@ -320,10 +320,10 @@
<block wx:for="{{detailCommodity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="movie-card-item col" data-id="{{item.name}}" bindtap="onBuy">
<image mode="aspectFill" src="{{item.cover}}"></image>
<view class="movie-card-item-title row align-c">
<view class="movie-card-item-title row ac">
<text>{{item.movieName}}</text>
</view>
<view class="movie-card-item-info row align-c">
<view class="movie-card-item-info row ac">
<view class="movie-card-item-info-left">
<text>类型</text>
</view>
......@@ -331,7 +331,7 @@
<text>{{item.movieType}}</text>
</view>
</view>
<view class="movie-card-item-info row align-c">
<view class="movie-card-item-info row ac">
<view class="movie-card-item-info-left">
<text>导演</text>
</view>
......@@ -339,22 +339,22 @@
<text>{{item.movieDirector}}</text>
</view>
</view>
<view class="movie-card-item-operation row con-b align-c">
<view class="row align-c" wx:if="{{item.priceType === 1}}">
<view class="movie-card-item-operation row cb ac">
<view class="row ac" wx:if="{{item.priceType === 1}}">
<text>{{item.priceSpecial == 0 ? '免费' : '¥' + item.priceSpecialText}}</text>
</view>
<view class="row align-c" wx:if="{{item.priceType === 2}}">
<view class="row ac" wx:if="{{item.priceType === 2}}">
<text>{{item.priceText == 0 ? '免费' : '¥' + item.price}}</text>
</view>
<view>
<button class="row con-c align-c">报名观影</button>
<button class="row con-c ac">报名观影</button>
</view>
</view>
</view>
</block>
<view class="movie-card-last-item col" wx:if="{{detailCommodity.length > 2}}"></view>
<block wx:if="{{detailCommodity.length === 0}}">
<view class="commodity-card-item-nothing col con-c align-c">
<view class="commodity-card-item-nothing col con-c ac">
<image class="nothing-movie" src="{{resourcesBase + 'play/no-movie-2.png'}}"></image>
<text>暂无影片,请期待后续排片</text>
</view>
......@@ -364,11 +364,11 @@
</view>
<!-- 简介,评价 -->
<view class="tab-content movie-border row">
<view class="tab-content-item row align-c {{contentType === 'detail' ? 'tab-content-active-movie' : ''}}" data-type="detail" bindtap="onSelectionContent">
<view class="tab-content movie-border row" style="{{ 'top: ' + cssTabContentTop + 'px;'}}">
<view class="tab-content-item row ac {{contentType === 'detail' ? 'tab-content-active-movie' : ''}}" data-type="detail" bindtap="onSelectionContent">
<text>简介</text>
</view>
<view class="tab-content-item row align-c {{contentType === 'evaluate' ? 'tab-content-active-movie' : ''}}" data-type="evaluate" bindtap="onSelectionContent">
<view class="tab-content-item row ac {{contentType === 'evaluate' ? 'tab-content-active-movie' : ''}}" data-type="evaluate" bindtap="onSelectionContent">
<text>评价</text>
</view>
</view>
......@@ -382,20 +382,20 @@
<!-- 评价 -->
<view class="evaluate" wx:if="{{contentType === 'evaluate'}}">
<view class="evaluate-option row con-b align-c">
<view class="evaluate-option-item row align-c">
<view class="evaluate-option row cb ac">
<view class="evaluate-option-item row ac">
<image src="{{imageBase + 'icon/evaluate-2.png'}}"></image>
<text>服务</text>
<text class="color-white">{{officeServiceText}}</text>
<text class="color-white">分</text>
</view>
<view class="evaluate-option-item row align-c">
<view class="evaluate-option-item row ac">
<image src="{{imageBase + 'icon/shop-3.png'}}"></image>
<text>产品</text>
<text class="color-white">{{officeProductText}}</text>
<text class="color-white">分</text>
</view>
<view class="evaluate-option-item row align-c">
<view class="evaluate-option-item row ac">
<image src="{{imageBase + 'icon/album-2.png'}}"></image>
<text>环境</text>
<text class="color-white">{{officeEnvironmentalText}}</text>
......@@ -409,12 +409,12 @@
<view class="row">
<image class="evaluate-item-avatar" src="{{item.userAvatar}}" mode="widthFix"></image>
<view class="evaluate-item-info">
<view class="evaluate-item-info-text row align-c">
<view class="evaluate-item-info-text row ac">
<text style="color: #FFFFFF">{{item.userName}}</text>
<text>业主</text>
<text style="color: #656E7B">{{item.date}}</text>
</view>
<view class="evaluate-item-info-star row align-c">
<view class="evaluate-item-info-star row ac">
<block wx:for="{{item.star}}" wx:for-index="indexStar" wx:for-item="itemStar" wx:key="indexStar">
<image src="{{imageBase + 'icon/star-1.png'}}" data-item="{{item}}"></image>
</block>
......@@ -443,7 +443,7 @@
<image wx:if="{{indexAlbum < 4}}" src="{{itemAlbum}}" data-index="{{indexAlbum}}" data-item="{{item}}" bindtap="onEvaluateAlbum"></image>
</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">
<view wx:if="{{item.userAlbum.length > 4}}" class="evaluate-item-album-more row con-c ac" data-index="{{3}}" data-item="{{item}}" bindtap="onEvaluateAlbum">
<text>{{'+' + (item.userAlbum.length - 4)}}</text>
</view>
</view>
......@@ -453,7 +453,7 @@
</view>
<!-- 侧边返回顶部 -->
<view class="appointment-side col con-b align-c" hidden="{{winSide}}">
<view class="appointment-side col cb ac" hidden="{{winSide}}">
<button class="appointment-side-top" bindtap="onBackTop">
<image src="{{imageBase + 'top.png'}}"></image>
</button>
......@@ -464,7 +464,7 @@
<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">
<swiper-item class="album-item row con-c ac">
<image class="album-image" src="{{item}}" mode="aspectFit"></image>
</swiper-item>
</block>
......
......@@ -319,6 +319,7 @@
}
.commodity-card-item-title text:nth-child(1) {
flex-grow: 1;
font-size: 30rpx;
font-weight: 400;
line-height: 44rpx;
......@@ -328,16 +329,6 @@
white-space: nowrap;
}
.movie-card-item-title text:nth-child(1) {
font-size: 26rpx;
font-weight: 400;
line-height: 37rpx;
color: #fff;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.commodity-card-item-title text:nth-child(2) {
width: 96rpx;
height: 32rpx;
......@@ -351,6 +342,16 @@
color: #86c5e1;
}
.movie-card-item-title text:nth-child(1) {
font-size: 26rpx;
font-weight: 400;
line-height: 37rpx;
color: #fff;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.commodity-card-item-date {
width: 498rpx;
height: 40rpx;
......
......@@ -42,6 +42,22 @@ let output = {
}
},
countStringChar: function (funcCountString) {
let funcCountDoubleByte = funcCountString.match(/[\uff00-\uffff]/ig)
let funcCountSingleByte = funcCountString.match(/[\u0000-\u00ff]/ig)
let funcCountChinese = funcCountString.match(/[\u4e00-\u9fa5]/ig)
let funcCountEmoji = funcCountString.match(/[\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]|\uD83D[\uDE80-\uDEFF]|[\u2700-\u27BF]\uFE0F]/ig)
if (funcCountDoubleByte === null) funcCountDoubleByte = []
if (funcCountSingleByte === null) funcCountSingleByte = []
if (funcCountChinese === null) funcCountChinese = []
if (funcCountEmoji === null) funcCountEmoji = []
let funcCountStringChar = funcCountDoubleByte.length * 2 + funcCountSingleByte.length * 1 + funcCountChinese.length * 2 + funcCountEmoji.length * 1
console.log(funcCountStringChar)
return funcCountStringChar
},
}
export default output
\ 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