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
61ac35fc
authored
Sep 27, 2020
by
wjw
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
ww--SPA门店详情修改
parent
c8b2ef96
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
5 deletions
pages/play/service-detail/service-detail.js
pages/play/service-detail/service-detail.wxml
pages/play/service-detail/service-detail.js
View file @
61ac35fc
...
@@ -64,6 +64,7 @@ Page({
...
@@ -64,6 +64,7 @@ Page({
detailEvaluate
:
[],
// 评论
detailEvaluate
:
[],
// 评论
evaluateAlbum
:
[],
evaluateAlbum
:
[],
emptyImg
:
App
.
globalData
.
appResourcesBase
+
'play/service/nothing.jpg'
,
isBlack
:
false
,
isBlack
:
false
,
...
@@ -458,7 +459,6 @@ Page({
...
@@ -458,7 +459,6 @@ Page({
success
:
(
response
)
=>
{
success
:
(
response
)
=>
{
let
funcCommodityList
=
[]
let
funcCommodityList
=
[]
let
funcResponse
=
response
.
data
let
funcResponse
=
response
.
data
console
.
log
(
JSON
.
stringify
(
funcResponse
))
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
let
funcItem
=
{
let
funcItem
=
{
'id'
:
funcResponse
[
i
].
id
,
// 商品标识
'id'
:
funcResponse
[
i
].
id
,
// 商品标识
...
@@ -653,9 +653,26 @@ Page({
...
@@ -653,9 +653,26 @@ Page({
onBuyCommodity
:
function
(
event
)
{
onBuyCommodity
:
function
(
event
)
{
let
id
=
event
.
currentTarget
.
dataset
.
id
let
id
=
event
.
currentTarget
.
dataset
.
id
let
classifyId
=
event
.
currentTarget
.
dataset
.
classid
let
classifyId
=
event
.
currentTarget
.
dataset
.
classid
wx
.
navigateTo
({
url
:
'/pages/commodity/menu-food/menu-food?commodityId='
+
id
+
'&sideBarId='
+
classifyId
console
.
log
(
this
.
data
.
option
)
})
switch
(
Number
(
this
.
data
.
option
.
id
))
{
case
7
:
let
funcCommodityInfo
=
this
.
data
.
detailCommodity
.
filter
(
v
=>
v
.
id
===
id
)[
0
]
funcCommodityInfo
.
quantity
=
1
funcCommodityInfo
.
quantityMin
=
1
funcCommodityInfo
.
quantityMax
=
1
funcCommodityInfo
.
isActive
=
true
wx
.
setStorageSync
(
'shoppingCartBuffer'
,
[
funcCommodityInfo
])
wx
.
navigateTo
({
url
:
'/pages/play/service-sell/service-sell'
})
break
default
:
wx
.
navigateTo
({
url
:
'/pages/commodity/menu-food/menu-food?commodityId='
+
id
+
'&sideBarId='
+
classifyId
})
}
},
},
// 跳转到能量补给站
// 跳转到能量补给站
onBuySnacks
(
event
)
{
onBuySnacks
(
event
)
{
...
...
pages/play/service-detail/service-detail.wxml
View file @
61ac35fc
...
@@ -126,7 +126,7 @@
...
@@ -126,7 +126,7 @@
<block wx:for="{{detailCommodity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<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 col">
<view class="commodity-card-item-cover row con-c align-c">
<view class="commodity-card-item-cover row con-c align-c">
<image mode="aspectFit" src="{{item.img[0]}}"></image>
<image mode="aspectFit" src="{{item.img[0]
? item.img[0] : emptyImg
}}"></image>
</view>
</view>
<view class="commodity-card-item-title row con-b align-c">
<view class="commodity-card-item-title row con-b align-c">
<text>{{item.name}}</text>
<text>{{item.name}}</text>
...
...
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