Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
严立
/
mini-shimao
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
879a0a9d
authored
Sep 23, 2020
by
wjw
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
ww--畅玩修复
parent
c2acc8b4
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
186 additions
and
23 deletions
image/icon/evaluate-2.png.png → image/icon/evaluate-2.png
image/icon/shop-2.png.png → image/icon/shop-2.png
pages/play/activity/activity.wxml
pages/play/service-detail/service-detail.js
pages/play/service-detail/service-detail.wxml
pages/play/service-detail/service-detail.wxss
image/icon/evaluate-2.png
.png
→
image/icon/evaluate-2.png
View file @
879a0a9d
660 Bytes
|
W:
|
H:
660 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
image/icon/shop-2.png
.png
→
image/icon/shop-2.png
View file @
879a0a9d
503 Bytes
|
W:
|
H:
503 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
pages/play/activity/activity.wxml
View file @
879a0a9d
<!-- 畅玩 - 活动列表 -->
<navigation class="navigation" titleText="{{
shopInfo.name +
navigationTitle}}" background="#ffffff" backIcon="/image/back.png"></navigation>
<navigation class="navigation" titleText="{{navigationTitle}}" background="#ffffff" backIcon="/image/back.png"></navigation>
<view class="container con-s">
<!-- 活动类别 -->
...
...
pages/play/service-detail/service-detail.js
View file @
879a0a9d
...
...
@@ -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
),
})
}
})
},
/**
* 评论查看全部
...
...
pages/play/service-detail/service-detail.wxml
View file @
879a0a9d
...
...
@@ -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.ta
b
}}</text>
<text>{{item.ta
gNames[0]
}}</text>
</view>
<view class="commodity-card-item-date row align-c">
<image src="{{imageBase + 'icon/clock-2.png'}}"></image>
<text>{{item.
tim
e}}</text>
<text>{{item.
dat
e}}</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-i
tem="{{item}}" bindtap="onBu
y">购买</button>
<button class="row con-c align-c" data-i
d="{{item.id}}" data-classid="{{item.classifyId}}" bindtap="onBuyCommodit
y">购买</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>
<!-- 简介,评价 -->
...
...
pages/play/service-detail/service-detail.wxss
View file @
879a0a9d
...
...
@@ -357,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;
...
...
@@ -567,6 +603,7 @@
/* 详情 */
.detail {
margin-top: 62rpx;
padding-bottom: 160rpx;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment