Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
take_order
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
和慭琛
take_order
Commits
2ee929a1
Commit
2ee929a1
authored
Mar 25, 2021
by
李俊赕
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-photo-v2' of
https://git.banshouhui.com/heyinchen/take_order
into dev-photo-v2
parents
3de3fa98
63474fe0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
45 deletions
+41
-45
detail.vue
take-order/pages/photo/detail.vue
+2
-2
list.vue
take-order/pages/photo/list.vue
+35
-42
u-swiper.vue
take-order/uview-ui/components/u-swiper/u-swiper.vue
+4
-1
No files found.
take-order/pages/photo/detail.vue
View file @
2ee929a1
...
@@ -100,11 +100,11 @@
...
@@ -100,11 +100,11 @@
}
}
if
(
e
&&
e
.
current_count
){
if
(
e
&&
e
.
current_count
){
this
.
done_count
=
Math
.
max
(
e
.
current_count
-
1
,
0
)
this
.
done_count
=
e
.
current_count
}
}
if
(
e
&&
e
.
current_count
){
if
(
e
&&
e
.
current_count
){
this
.
current_count
=
e
.
current_count
this
.
current_count
=
Math
.
max
(
e
.
current_count
-
1
,
0
)
}
}
if
(
e
&&
e
.
images
){
if
(
e
&&
e
.
images
){
...
...
take-order/pages/photo/list.vue
View file @
2ee929a1
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<view
class=
"right-view-title"
>
拍照项有:
</view>
<view
class=
"right-view-title"
>
拍照项有:
</view>
<template
v-for=
"(item,ikey) in rightList"
>
<template
v-for=
"(item,ikey) in rightList"
>
<view
class=
"rightItemView"
@
click=
"rightItemClick(item,ikey)"
:key=
"ikey"
>
<view
class=
"rightItemView"
@
click=
"rightItemClick(item,ikey)"
:key=
"ikey"
>
<view
class=
"['rightContentView', item.images.length > 0 ? 'gray666Color' : 'rightTitle']"
>
<view
:
class=
"['rightContentView', item.images.length > 0 ? 'gray666Color' : 'rightTitle']"
>
<text
class=
"ph-lst-item-index"
>
{{
ikey
+
1
}}
</text>
<text
class=
"ph-lst-item-index"
>
{{
ikey
+
1
}}
</text>
<text
class=
""
>
{{
item
.
name
}}
(
{{
item
.
image_count
}}
张)
</text>
<text
class=
""
>
{{
item
.
name
}}
(
{{
item
.
image_count
}}
张)
</text>
<image
class=
"ph-list-item-arrow"
src=
"/static/photo/arrow.png"
></image>
<image
class=
"ph-list-item-arrow"
src=
"/static/photo/arrow.png"
></image>
...
@@ -100,18 +100,6 @@
...
@@ -100,18 +100,6 @@
const
globalData
=
getApp
().
globalData
const
globalData
=
getApp
().
globalData
globalData
.
photo
.
productList
=
res
.
result
globalData
.
photo
.
productList
=
res
.
result
this
.
dataList
=
res
.
result
this
.
dataList
=
res
.
result
this
.
dataList
.
forEach
(
item
=>
{
item
.
list
.
forEach
(
subItem
=>
{
subItem
.
isClicked
=
false
})
})
console
.
log
(
'添加 新字段 后的数组:'
)
console
.
log
(
this
.
dataList
)
var
item
=
res
.
result
[
0
]
var
item
=
res
.
result
[
0
]
this
.
rightList
=
item
.
list
this
.
rightList
=
item
.
list
},
},
...
@@ -128,42 +116,46 @@
...
@@ -128,42 +116,46 @@
// 点击图片
// 点击图片
handleClickImage
(
item
,
image
,
index
)
{
handleClickImage
(
item
,
image
,
index
)
{
uni
.
navigateTo
({
// uni.navigateTo({
url
:
'/pages/photo/detail'
+
// url: '/pages/photo/detail' +
'?current_image='
+
image
+
// '?current_image=' + image +
'&image_count='
+
item
.
image_count
+
// '&image_count=' + item.images.length +
'¤t_count='
+
(
index
+
1
)
+
// '¤t_count=' + (index + 1) +
'&images='
+
JSON
.
stringify
(
item
.
images
)
+
// '&images=' + JSON.stringify(item.images) +
'&title='
+
item
.
name
,
// '&title=' + item.name,
// })
uni
.
previewImage
({
urls
:
item
.
images
,
current
:
index
})
})
},
},
//右侧点击
//右侧点击
rightItemClick
:
function
(
item
,
ikey
)
{
rightItemClick
:
function
(
item
,
ikey
)
{
console
.
log
(
item
,
'item'
)
// for (let i = 0; i
<
this
.
rightList
.
length
;
i
++
)
{
const
photo
=
getApp
().
globalData
.
photo
// var subItem = this.rightList[i]
photo
.
currentItem
=
item
// if(i == ikey){
uni
.
navigateTo
({
// subItem.isClicked = true
url
:
'/pages/photo/take'
// }
})
// }
// // for (let i = 0; i
<
this
.
rightList
.
length
;
i
++
)
{
// item.clickable = true
// // var subItem = this.rightList[i]
// // if(i == ikey){
// // subItem.isClicked = true
// // }
// // }
// // item.clickable = true
// this.$set(this.rightList[ikey],'clickable',true)
// this.$set(this.rightList[ikey],'clickable',true)
// var current_image = item.images[0]
// var current_image = item.images[0]
// var current_count = 1
// var current_count = 1
// uni.navigateTo({
// uni.navigateTo({
// url:'/pages/photo/
detail
'
// url:'/pages/photo/
standard
'
// +'?current_image=' + current_image
//
//
+'?current_image=' + current_image
// +'&image_count=' + item.image_count
//
//
+'&image_count=' + item.image_count
// +'¤t_count=' + current_count
//
//
+'¤t_count=' + current_count
// +'&images=' + JSON.stringify(item.images)
//
//
+'&images=' + JSON.stringify(item.images)
// +'&title=' + item.name,
//
//
+'&title=' + item.name,
// })
// })
console
.
log
(
item
,
'item'
)
const
photo
=
getApp
().
globalData
.
photo
photo
.
currentItem
=
item
uni
.
navigateTo
({
url
:
'/pages/photo/take'
})
},
},
...
@@ -181,6 +173,7 @@
...
@@ -181,6 +173,7 @@
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
align-items
:
center
;
align-items
:
center
;
height
:
100%
;
}
}
.centerBackView
{
.centerBackView
{
...
@@ -215,8 +208,8 @@
...
@@ -215,8 +208,8 @@
width
:
100%
;
width
:
100%
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
margin
-top
:
100
rpx
;
padding
-top
:
100
rpx
;
margin
-bottom
:
50
rpx
;
padding
-bottom
:
50
rpx
;
}
}
.right-view-title
{
.right-view-title
{
...
@@ -356,4 +349,4 @@
...
@@ -356,4 +349,4 @@
color
:
#666666
;
color
:
#666666
;
border-color
:
#666666
;
border-color
:
#666666
;
}
}
</
style
>
</
style
>
take-order/uview-ui/components/u-swiper/u-swiper.vue
View file @
2ee929a1
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<swiper
:current=
"elCurrent"
@
change=
"change"
@
animationfinish=
"animationfinish"
:interval=
"interval"
:circular=
"circular"
:duration=
"duration"
:autoplay=
"autoplay"
<swiper
:current=
"elCurrent"
@
change=
"change"
@
animationfinish=
"animationfinish"
:interval=
"interval"
:circular=
"circular"
:duration=
"duration"
:autoplay=
"autoplay"
:previous-margin=
"effect3d ? effect3dPreviousMargin + 'rpx' : '0'"
:next-margin=
"effect3d ? effect3dPreviousMargin + 'rpx' : '0'"
:previous-margin=
"effect3d ? effect3dPreviousMargin + 'rpx' : '0'"
:next-margin=
"effect3d ? effect3dPreviousMargin + 'rpx' : '0'"
:style=
"
{
:style=
"
{
height: height
+ 'rpx'
height: height
String
}">
}">
<swiper-item
class=
"u-swiper-item"
v-for=
"(item, index) in list"
:key=
"index"
>
<swiper-item
class=
"u-swiper-item"
v-for=
"(item, index) in list"
:key=
"index"
>
<view
class=
"u-list-image-wrap"
@
tap
.
stop
.
prevent=
"listClick(index)"
:class=
"[uCurrent != index ? 'u-list-scale' : '']"
:style=
"
{
<view
class=
"u-list-image-wrap"
@
tap
.
stop
.
prevent=
"listClick(index)"
:class=
"[uCurrent != index ? 'u-list-scale' : '']"
:style=
"
{
...
@@ -207,6 +207,9 @@
...
@@ -207,6 +207,9 @@
// 因为uni的swiper组件的current参数只接受Number类型,这里做一个转换
// 因为uni的swiper组件的current参数只接受Number类型,这里做一个转换
elCurrent
()
{
elCurrent
()
{
return
Number
(
this
.
current
);
return
Number
(
this
.
current
);
},
heightString
()
{
return
typeof
this
.
height
===
'number'
&&
this
.
height
!==
0
?
(
this
.
height
+
'rpx'
)
:
this
.
height
}
}
},
},
methods
:
{
methods
:
{
...
...
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