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
5b541354
Commit
5b541354
authored
Apr 07, 2021
by
李超鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
4ef5c8fb
5ab23fbe
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
400 additions
and
309 deletions
+400
-309
list.vue
take-order/pages/photo/list.vue
+397
-306
preview.vue
take-order/pages/photo/preview.vue
+3
-3
No files found.
take-order/pages/photo/list.vue
View file @
5b541354
...
@@ -24,8 +24,27 @@
...
@@ -24,8 +24,27 @@
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<u-button
v-if=
"activeTop + 1 === dataList.length"
class=
"ph-list-button"
type=
"error"
shape=
"circle"
:disabled=
"buttonDisabled"
:custom-style=
"buttonStyle"
@
click=
"isPopShow = true"
>
一键清空展示图片
</u-button>
</view>
<u-popup
border-radius=
"10"
v-model=
"isPopShow"
safe-area-inset-bottom
mode=
"center"
width=
"690rpx"
height=
"600rpx"
>
<view
class=
"ph-list-pop-title"
>
<text>
是否一键清空系统展示的图片?
</text>
</view>
<view
class=
"ph-list-pop-text"
>
<text>
点击"确定"则删除系统展示的所有图片
</text>
</view>
</view>
<view
class=
"ph-list-pop-btn-view"
>
<u-button
:custom-style=
"customStyleCancel"
hover-class=
"none"
shape=
"circle"
type=
"primary"
@
click=
"isPopShow = false"
>
取消
</u-button>
<u-button
:custom-style=
"customStyleSave"
shape=
"circle"
type=
"primary"
@
click=
"handleClickSure()"
>
确定
</u-button>
</view>
</u-popup>
</view>
</view>
</template>
</template>
...
@@ -42,7 +61,8 @@
...
@@ -42,7 +61,8 @@
brand
:
''
,
brand
:
''
,
brandId
:
''
,
brandId
:
''
,
dataList
:
[],
dataList
:
[],
loading
:
true
loading
:
true
,
isPopShow
:
false
}
}
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
...
@@ -71,6 +91,43 @@
...
@@ -71,6 +91,43 @@
},
},
computed
:
{
buttonStyle
()
{
return
{
'color'
:
'#FFFFFF'
,
'width'
:
'600rpx'
,
'height'
:
'104rpx'
,
'font-size'
:
'36rpx'
}
},
buttonDisabled
()
{
for
(
var
item
of
this
.
dataList
)
{
for
(
var
i
of
item
.
list
)
{
if
((
i
.
imageList
||
[]).
length
>
0
)
{
return
false
}
}
}
return
true
},
customStyleCancel
()
{
return
{
'background-color'
:
'#D1D4D4'
,
'width'
:
'280rpx'
,
'height'
:
'96rpx'
}
},
customStyleSave
()
{
return
{
'background-color'
:
'##2272FF'
,
'width'
:
'280rpx'
,
'height'
:
'96rpx'
,
'margin-left'
:
'50rpx'
}
}
},
methods
:
{
methods
:
{
getListData
:
function
()
{
getListData
:
function
()
{
this
.
loading
=
true
this
.
loading
=
true
...
@@ -83,9 +140,11 @@
...
@@ -83,9 +140,11 @@
}).
then
(
res
=>
{
}).
then
(
res
=>
{
this
.
loading
=
false
this
.
loading
=
false
if
(
res
&&
res
.
result
)
{
if
(
res
&&
res
.
result
)
{
if
(
res
.
result
.
error_code
){
if
(
res
.
result
.
error_code
)
{
uni
.
showToast
({
title
:
res
.
result
.
error_msg
})
uni
.
showToast
({
}
else
{
title
:
res
.
result
.
error_msg
})
}
else
{
that
.
handleData
(
res
.
result
)
that
.
handleData
(
res
.
result
)
}
}
}
}
...
@@ -94,6 +153,7 @@
...
@@ -94,6 +153,7 @@
},
},
handleData
:
function
(
result
)
{
handleData
:
function
(
result
)
{
this
.
activeTop
=
0
const
globalData
=
getApp
().
globalData
const
globalData
=
getApp
().
globalData
globalData
.
photo
.
productList
=
result
globalData
.
photo
.
productList
=
result
this
.
dataList
=
result
this
.
dataList
=
result
...
@@ -131,13 +191,23 @@
...
@@ -131,13 +191,23 @@
photo
.
currentItem
=
item
photo
.
currentItem
=
item
photo
.
itemIndex
=
ikey
photo
.
itemIndex
=
ikey
const
len
=
item
.
imageList
.
length
const
len
=
item
.
imageList
.
length
photo
.
currentItemLength
=
len
>
9
?
10
:
len
photo
.
currentItemLength
=
len
>
9
?
10
:
len
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/photo/take'
url
:
'/pages/photo/take'
})
})
},
},
// 清除图片
handleClickSure
:
function
()
{
this
.
$u
.
cloudApi
.
cleanImage
({
'token'
:
getApp
().
globalData
.
token
,
}).
then
(
res
=>
{
this
.
isPopShow
=
false
if
(
res
&&
res
.
result
)
{
this
.
getListData
()
}
})
}
}
}
}
}
</
script
>
</
script
>
...
@@ -268,8 +338,9 @@
...
@@ -268,8 +338,9 @@
margin
:
0
rpx
12
rpx
12
rpx
0
rpx
;
margin
:
0
rpx
12
rpx
12
rpx
0
rpx
;
}
}
.rightImage
:nth-child
(
5n
)
{
margin-right
:
0
;
.rightImage
:nth-child
(
5n
)
{
margin-right
:
0
;
}
}
...
@@ -308,4 +379,24 @@
...
@@ -308,4 +379,24 @@
.greenBackColor
{
.greenBackColor
{
background-color
:
#4CD964
;
background-color
:
#4CD964
;
}
}
.ph-list-pop-text
{
color
:
#666666
;
text-align
:
center
;
margin-top
:
20
rpx
;
font-size
:
30
rpx
;
}
.ph-list-pop-title
{
font-size
:
40
rpx
;
padding-top
:
150
rpx
;
text-align
:
center
;
color
:
#333333
;
}
.ph-list-pop-btn-view
{
display
:
flex
;
justify-content
:
center
;
margin-top
:
150
rpx
;
}
</
style
>
</
style
>
take-order/pages/photo/preview.vue
View file @
5b541354
...
@@ -5,10 +5,10 @@
...
@@ -5,10 +5,10 @@
<!--
<image
class=
"pic"
:src=
"files[0]"
v-lazy
mode=
"aspectFit"
></image>
-->
<!--
<image
class=
"pic"
:src=
"files[0]"
v-lazy
mode=
"aspectFit"
></image>
-->
</view>
</view>
<view
class=
"bottomView"
>
<view
class=
"bottomView"
>
<image
class=
"btn"
:src=
"btn_remake"
@
click=
"$u.
debounce(remakePhoto, 5
00)"
></image>
<image
class=
"btn"
:src=
"btn_remake"
@
click=
"$u.
throttle(remakePhoto, 30
00)"
></image>
<image
class=
"btn"
:src=
"btn_continue"
@
click=
"$u.
debounce(continuePhoto, 5
00)"
></image>
<image
class=
"btn"
:src=
"btn_continue"
@
click=
"$u.
throttle(continuePhoto, 30
00)"
></image>
</view>
</view>
<image
class=
"btn finish"
src=
"/static/photo/finish.png"
@
click=
"$u.
debounce(finishPhoto, 5
00)"
></image>
<image
class=
"btn finish"
src=
"/static/photo/finish.png"
@
click=
"$u.
throttle(finishPhoto, 30
00)"
></image>
</view>
</view>
</
template
>
</
template
>
...
...
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