Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
ptfw-uniapp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
侯忠英
ptfw-uniapp
Commits
4a50ad57
Commit
4a50ad57
authored
Aug 01, 2019
by
DPFly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码格式化
parent
1f15347b
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1721 additions
and
1468 deletions
+1721
-1468
index.vue
src/pages/order/detail/index.vue
+1573
-1333
index.vue
src/pages/order/goodsList/index.vue
+147
-134
index.vue
src/pages/store/goods/list/index.vue
+1
-1
No files found.
src/pages/order/detail/index.vue
View file @
4a50ad57
This diff is collapsed.
Click to expand it.
src/pages/order/goodsList/index.vue
View file @
4a50ad57
<
template
>
<view
class=
"container"
>
<view
class=
"container"
>
<view
class=
"goods-wrapper"
v-if=
"goods"
>
<block
v-for=
"(item, index) in goods"
:key=
"item.id"
>
<view
class=
"item"
>
<image
class=
"goods-image"
:src=
"(item.image ? item.image : 'https://img-shop.qmimg.cn/s16/images/2018/05/30/4b9e33114bb29a76.jpeg') + '?imageView2/1/w/200/h/200/q/100'"
></image>
<image
class=
"goods-image"
:src=
"
(item.image
? item.image
: 'https://img-shop.qmimg.cn/s16/images/2018/05/30/4b9e33114bb29a76.jpeg') +
'?imageView2/1/w/200/h/200/q/100'
"
></image>
<view
class=
"goods-info"
>
<view
class=
"goods-name"
>
<text
v-if=
"item.is_gift"
>
【赠】
</text>
<text>
{{
item
.
name
}}
</text>
<text>
{{
item
.
name
}}
</text>
</view>
<view
class=
"spec-wrap"
v-if=
"item.spec || item.property_str"
>
<text
class=
"label"
v-for=
"(specItem, specIndex) in item.spec"
:key=
"specItem"
>
{{
specItem
}}
</text><text
class=
"label"
v-if=
"item.spec && item.property_str"
>
+
</text><text
class=
"label"
v-if=
"item.property_str"
>
{{
item
.
property_str
}}
</text>
<text
class=
"label"
v-for=
"(specItem, specIndex) in item.spec"
:key=
"specItem"
>
{{
specItem
}}
</text
><text
class=
"label"
v-if=
"item.spec && item.property_str"
>
+
</text
><text
class=
"label"
v-if=
"item.property_str"
>
{{
item
.
property_str
}}
</text>
</view>
<view
class=
"spec-wrap"
v-if=
"item.sideDish"
>
<text
class=
"label"
>
{{
item
.
sideDish
}}
</text>
<text
class=
"label"
>
{{
item
.
sideDish
}}
</text>
</view>
</view>
<view
class=
"goods-price"
>
<text
class=
"goods-num"
>
×
{{
item
.
qty
}}
</text>
<text
class=
"goods-num"
>
×
{{
item
.
qty
}}
</text>
</view>
<view
class=
"item-right"
>
<text
class=
"goods-price text-right"
:class=
"
{'text-bold': item.qty > 1}">¥
{{
item
.
is_gift
?
'0.00'
:
item
.
subtotal
}}
</text>
<text
class=
"goods-price text-right"
:class=
"
{ 'text-bold': item.qty > 1 }"
>¥
{{
item
.
is_gift
?
'0.00'
:
item
.
subtotal
}}
</text
>
<text
class=
"goods-price text-delete"
></text>
</view>
</view>
...
...
@@ -30,138 +44,137 @@
</
template
>
<
script
>
import
native
from
'@/utils/basic/native'
export
default
{
data
()
{
return
{
goods
:
[]
}
},
onLoad
(
options
)
{
// 获取全局存储的商品列表数据
this
.
_getGoodsList
()
},
onUnload
()
{
// 页面返回或关闭 清除全局中存储商品的数据
this
.
$store
.
commit
(
'SET_CREATE_ORDER_GOODS'
)
},
methods
:
{
_getGoodsList
()
{
const
goods
=
this
.
$store
.
state
.
createOrderGoods
if
(
goods
.
length
>
0
)
{
this
.
goods
=
goods
}
else
{
native
.
navigateBack
({
delta
:
1
})
}
import
native
from
'@/utils/basic/native'
export
default
{
data
()
{
return
{
goods
:
[],
}
},
onLoad
(
options
)
{
// 获取全局存储的商品列表数据
this
.
_getGoodsList
()
},
onUnload
()
{
// 页面返回或关闭 清除全局中存储商品的数据
this
.
$store
.
commit
(
'SET_CREATE_ORDER_GOODS'
)
},
methods
:
{
_getGoodsList
()
{
const
goods
=
this
.
$store
.
state
.
createOrderGoods
if
(
goods
.
length
>
0
)
{
this
.
goods
=
goods
}
else
{
native
.
navigateBack
({
delta
:
1
,
})
}
}
}
},
},
}
</
script
>
<
style
>
page
{
background
:
#f5f5f5
;
box-sizing
:
border-box
;
}
page
{
background
:
#f5f5f5
;
box-sizing
:
border-box
;
}
</
style
>
<
style
scoped
lang=
"scss"
>
.goods-wrapper
{
width
:
740rpx
;
margin
:
0
auto
;
padding-bottom
:
2rpx
;
}
.goods-wrapper
.item
{
display
:
flex
;
align-items
:
center
;
width
:
100%
;
padding
:
40rpx
0
;
position
:
relative
;
background
:
#fff
;
margin-bottom
:
2rpx
;
}
.goods-wrapper
.item
:first-child
{
margin-top
:
0
;
}
.goods-wrapper
.item-left
{
width
:
80%
;
display
:
flex
;
justify-content
:
flex-start
;
}
.goods-wrapper
.item-right
{
flex-shrink
:
0
;
margin-right
:
20rpx
;
}
.goods-wrapper
.goods-image
{
flex-shrink
:
0
;
width
:
110rpx
;
height
:
110rpx
;
margin-left
:
20rpx
;
}
.goods-wrapper
.goods-info
{
flex-grow
:
1
;
overflow
:
hidden
;
}
.goods-wrapper
.goods-name
{
white-space
:
nowrap
;
font-size
:
30rpx
;
padding-left
:
20rpx
;
overflow
:
hidden
;
color
:
#282828
;
text-overflow
:
ellipsis
;
}
.goods-wrapper
.spec-wrap
{
padding-left
:
20rpx
;
line-height
:
32rpx
;
color
:
#999
;
}
.goods-wrapper
.spec-wrap
.label
{
color
:
#999
;
font-size
:
24rpx
;
word-break
:
break-all
;
}
.goods-wrapper
.goods-price
{
flex-shrink
:
0
;
display
:
block
;
font-size
:
30rpx
;
color
:
#232323
;
padding-left
:
20rpx
;
}
.goods-wrapper
.text-right
{
text-align
:
right
;
}
.goods-wrapper
.text-right.text-bold
{
font-weight
:
bold
;
}
.goods-wrapper
.goods-num
{
text-align
:
right
;
color
:
#999
;
font-size
:
24rpx
;
font-weight
:
500
;
}
.goods-wrapper
.text-delete
{
display
:
block
;
text-align
:
right
;
font-size
:
24rpx
;
color
:
#999
;
text-decoration
:
line-through
;
}
.goods-wrapper
{
width
:
740rpx
;
margin
:
0
auto
;
padding-bottom
:
2rpx
;
}
.goods-wrapper
.item
{
display
:
flex
;
align-items
:
center
;
width
:
100%
;
padding
:
40rpx
0
;
position
:
relative
;
background
:
#fff
;
margin-bottom
:
2rpx
;
}
.goods-wrapper
.item
:first-child
{
margin-top
:
0
;
}
.goods-wrapper
.item-left
{
width
:
80%
;
display
:
flex
;
justify-content
:
flex-start
;
}
.goods-wrapper
.item-right
{
flex-shrink
:
0
;
margin-right
:
20rpx
;
}
.goods-wrapper
.goods-image
{
flex-shrink
:
0
;
width
:
110rpx
;
height
:
110rpx
;
margin-left
:
20rpx
;
}
.goods-wrapper
.goods-info
{
flex-grow
:
1
;
overflow
:
hidden
;
}
.goods-wrapper
.goods-name
{
white-space
:
nowrap
;
font-size
:
30rpx
;
padding-left
:
20rpx
;
overflow
:
hidden
;
color
:
#282828
;
text-overflow
:
ellipsis
;
}
.goods-wrapper
.spec-wrap
{
padding-left
:
20rpx
;
line-height
:
32rpx
;
color
:
#999
;
}
.goods-wrapper
.spec-wrap
.label
{
color
:
#999
;
font-size
:
24rpx
;
word-break
:
break-all
;
}
.goods-wrapper
.goods-price
{
flex-shrink
:
0
;
display
:
block
;
font-size
:
30rpx
;
color
:
#232323
;
padding-left
:
20rpx
;
}
.goods-wrapper
.text-right
{
text-align
:
right
;
}
.goods-wrapper
.text-right.text-bold
{
font-weight
:
bold
;
}
.goods-wrapper
.goods-num
{
text-align
:
right
;
color
:
#999
;
font-size
:
24rpx
;
font-weight
:
500
;
}
.goods-wrapper
.text-delete
{
display
:
block
;
text-align
:
right
;
font-size
:
24rpx
;
color
:
#999
;
text-decoration
:
line-through
;
}
</
style
>
src/pages/store/goods/list/index.vue
View file @
4a50ad57
...
...
@@ -1288,7 +1288,7 @@ export default {
if
(
this
.
store_info
.
store_type
===
31
)
{
params
.
type_cate
=
this
.
cateringDiningWayType
===
1
?
1
:
3
}
if
(
this
.
guestsNumber
)
{
if
(
this
.
guestsNumber
)
{
params
.
guests_number
=
this
.
guestsNumber
}
this
.
$navigate
(
'/pages/order/create/index'
,
params
)
...
...
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