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
495e2482
Commit
495e2482
authored
Apr 01, 2021
by
李超鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev-photo-v2' into dev-photo-v2
parents
a1cd1203
e3a33888
Changes
11
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
410 additions
and
352 deletions
+410
-352
App.vue
take-order/App.vue
+3
-0
wxlogin.vue
take-order/pages/login/wxlogin.vue
+5
-9
index.vue
take-order/pages/photo/index.vue
+232
-224
list.vue
take-order/pages/photo/list.vue
+35
-32
preview.vue
take-order/pages/photo/preview.vue
+19
-3
setting.vue
take-order/pages/photo/setting.vue
+36
-16
take.vue
take-order/pages/photo/take.vue
+80
-63
arrow.png
take-order/static/photo/arrow.png
+0
-0
continue.png
take-order/static/photo/continue.png
+0
-0
finish.png
take-order/static/photo/finish.png
+0
-0
login.js
take-order/utils/login.js
+0
-5
No files found.
take-order/App.vue
View file @
495e2482
...
@@ -101,6 +101,7 @@ export default {
...
@@ -101,6 +101,7 @@ export default {
settleRecommend
:
''
,
settleRecommend
:
''
,
navHeight
:
0
,
//导航栏高度
navHeight
:
0
,
//导航栏高度
rpxScreenHeight
:
0
,
// 照相视框高度
rpxScreenHeight
:
0
,
// 照相视框高度
safeHeight
:
0
,
// 安全高度
//拍照相关数据
//拍照相关数据
photo
:
{
photo
:
{
product
:
{
product
:
{
...
@@ -165,6 +166,8 @@ export default {
...
@@ -165,6 +166,8 @@ export default {
this
.
globalData
.
navHeight
=
a
.
statusBarHeight
/
a
.
screenWidth
*
750
+
90
this
.
globalData
.
navHeight
=
a
.
statusBarHeight
/
a
.
screenWidth
*
750
+
90
this
.
globalData
.
rpxScreenHeight
=
a
.
screenHeight
/
a
.
screenWidth
*
750
this
.
globalData
.
rpxScreenHeight
=
a
.
screenHeight
/
a
.
screenWidth
*
750
this
.
globalData
.
screenHeight
=
a
.
screenHeight
this
.
globalData
.
screenHeight
=
a
.
screenHeight
this
.
globalData
.
safeHeight
=
a
.
safeArea
.
bottom
console
.
log
(
a
,
'a'
)
}
catch
(
a
)
{
}
catch
(
a
)
{
}
}
},
},
...
...
take-order/pages/login/wxlogin.vue
View file @
495e2482
...
@@ -105,18 +105,10 @@ export default {
...
@@ -105,18 +105,10 @@ export default {
if
(
res
&&
util
.
getToken
())
{
if
(
res
&&
util
.
getToken
())
{
that
.
goBackPage
()
that
.
goBackPage
()
}
else
{
}
else
{
uni
.
showToast
({
title
:
'授权失败,请重新授权'
,
icon
:
'none'
});
this
.
setLoginStatus
()
this
.
setLoginStatus
()
}
}
}).
catch
(
res
=>
{
}).
catch
(
res
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
});
this
.
setLoginStatus
()
this
.
setLoginStatus
()
})
})
},
},
...
@@ -141,9 +133,13 @@ export default {
...
@@ -141,9 +133,13 @@ export default {
return
login
.
signup
(
params
);
return
login
.
signup
(
params
);
}).
then
(
res
=>
{
}).
then
(
res
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
if
(
util
.
getToken
())
{
if
(
res
&&
util
.
getToken
())
{
that
.
goBackPage
()
that
.
goBackPage
()
}
else
{
}
else
{
uni
.
showToast
({
title
:
'授权失败,请重新授权'
,
icon
:
'none'
});
this
.
setLoginStatus
(
false
)
this
.
setLoginStatus
(
false
)
}
}
}).
catch
(
res
=>
{
}).
catch
(
res
=>
{
...
...
take-order/pages/photo/index.vue
View file @
495e2482
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
</view>
</view>
</
template
>
</
template
>
</view>
</view>
<
button
class=
"ph-pr-button"
type=
"primary"
@
click=
"handleClick"
:disabled=
"!selectedAll"
<
u-button
class=
"ph-pr-button"
type=
"primary"
shape=
"circle"
@
click=
"handleClick"
:
style=
"buttonStyle"
>
下一步
</button>
:
hover-class=
"selectedAll ? '' : 'none'"
:custom-style=
"buttonStyle"
>
下一步
</u-button>
</view>
</view>
</template>
</template>
...
@@ -53,8 +53,17 @@
...
@@ -53,8 +53,17 @@
]
]
},
},
buttonStyle
()
{
buttonStyle
()
{
return
this
.
selectedAll
?
'color: #FFFFFF;background-color: #2272FF;'
:
return
this
.
selectedAll
?
{
'color: #FFFFFF;background-color: #D1D4D4;'
'color'
:
'#FFFFFF'
,
'background-color'
:
'#2272FF;'
,
'width'
:
'600rpx'
,
'height'
:
'104rpx'
}
:
{
'color'
:
'#FFFFFF'
,
'background-color'
:
'#D1D4D4;'
,
'width'
:
'600rpx'
,
'height'
:
'104rpx'
}
}
}
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
...
@@ -120,10 +129,13 @@
...
@@ -120,10 +129,13 @@
// 点击下一步
// 点击下一步
handleClick
()
{
handleClick
()
{
// 点击下一步设置全局拍照品牌品类
// 点击下一步设置全局拍照品牌品类
if
(
!
this
.
selectedAll
)
{
return
}
const
globalData
=
getApp
().
globalData
const
globalData
=
getApp
().
globalData
if
(
!
globalData
.
token
)
{
if
(
!
globalData
.
token
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/login/wxlogin'
url
:
'/pages/login/wxlogin'
})
})
return
return
}
}
...
@@ -145,7 +157,7 @@
...
@@ -145,7 +157,7 @@
<
style
>
<
style
>
.backView
{
.backView
{
background-color
:
#F
AFAFA
;
background-color
:
#F
4f5f7
;
position
:
absolute
;
position
:
absolute
;
top
:
0
;
top
:
0
;
left
:
0
;
left
:
0
;
...
@@ -216,10 +228,6 @@
...
@@ -216,10 +228,6 @@
.ph-pr-button
{
.ph-pr-button
{
position
:
absolute
;
position
:
absolute
;
bottom
:
76
rpx
;
bottom
:
76
rpx
;
border-radius
:
52
rpx
;
height
:
104
rpx
;
font-size
:
32
rpx
;
font-size
:
32
rpx
;
width
:
600
rpx
;
line-height
:
104
rpx
;
}
}
</
style
>
</
style
>
take-order/pages/photo/list.vue
View file @
495e2482
<
template
>
<
template
>
<view
class=
"backView"
>
<view
class=
"backView"
>
<u-loading
style=
"position:
absolute
;top: 50%;"
:show=
"loading"
size=
"36"
mode=
"flower"
></u-loading>
<u-loading
style=
"position:
fixed
;top: 50%;"
:show=
"loading"
size=
"36"
mode=
"flower"
></u-loading>
<view
class=
"topView"
>
<view
class=
"topView"
>
<view
:class=
"['topItemView',
{'active':activeTop===ikey}]" @click="handleTopItemChange(ikey,item)" v-for="(item,ikey) in dataList" :key="ikey">
<view
:class=
"['topItemView',
{'active':activeTop===ikey}]" @click="handleTopItemChange(ikey,item)" v-for="(item,ikey) in dataList" :key="ikey">
<text
<text
...
@@ -12,15 +12,15 @@
...
@@ -12,15 +12,15 @@
<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',
{'active':item.imageList.length > 0
|| item.images.length > 0
}]">
<view
:class=
"['rightContentView',
{'active':item.imageList.length > 0}]">
<text
class=
"ph-lst-item-index"
>
{{
ikey
+
1
}}
</text>
<text
class=
"ph-lst-item-index"
>
{{
ikey
+
1
}}
</text>
<text
class=
""
>
{{
item
.
name
}}
</text>
<text
class=
""
>
{{
item
.
name
}}
</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>
<!--
<text
class=
"rightContent u-m-t-14 u-m-l-30 u-p-b-30"
>
{{
item
.
describe
}}
</text>
-->
<!--
<text
class=
"rightContent u-m-t-14 u-m-l-30 u-p-b-30"
>
{{
item
.
describe
}}
</text>
-->
</view>
</view>
<view
class=
"rightImageView"
v-if=
"item.imageList.length > 0
|| item.images.length > 0
"
>
<view
class=
"rightImageView"
v-if=
"item.imageList.length > 0"
>
<image
class=
"rightImage"
v-for=
"(image, index) in
(item.imageList.length > 0 ? item.imageList : item.images)
"
:src=
"image"
:key=
"image"
<image
class=
"rightImage"
v-for=
"(image, index) in
item.imageList
"
:src=
"image"
:key=
"image"
@
click
.
stop=
"handleClickImage(item, index)"
mode=
""
></image>
@
click
.
stop=
"handleClickImage(item, index)"
mode=
"
aspectFill
"
></image>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -93,9 +93,11 @@
...
@@ -93,9 +93,11 @@
const
globalData
=
getApp
().
globalData
const
globalData
=
getApp
().
globalData
globalData
.
photo
.
productList
=
result
globalData
.
photo
.
productList
=
result
this
.
dataList
=
result
this
.
dataList
=
result
if
(
result
.
length
>
0
)
{
var
item
=
result
[
0
]
var
item
=
result
[
0
]
globalData
.
photo
.
waterSetting
=
item
.
userWatermark
globalData
.
photo
.
waterSetting
=
item
.
userWatermark
this
.
rightList
=
item
.
list
this
.
rightList
=
item
.
list
}
},
},
//顶部点击
//顶部点击
...
@@ -114,7 +116,7 @@
...
@@ -114,7 +116,7 @@
// 点击图片
// 点击图片
handleClickImage
(
item
,
index
)
{
handleClickImage
(
item
,
index
)
{
uni
.
previewImage
({
uni
.
previewImage
({
urls
:
item
.
imageList
.
length
>
0
?
item
.
imageList
:
item
.
images
,
urls
:
item
.
imageList
,
current
:
index
current
:
index
})
})
},
},
...
@@ -198,6 +200,7 @@
...
@@ -198,6 +200,7 @@
padding
:
36
rpx
30
rpx
18
rpx
30
rpx
;
padding
:
36
rpx
30
rpx
18
rpx
30
rpx
;
border-radius
:
12
rpx
;
border-radius
:
12
rpx
;
background-color
:
#FFFFFF
;
background-color
:
#FFFFFF
;
min-height
:
108
rpx
;
}
}
.ph-lst-item-index
{
.ph-lst-item-index
{
...
@@ -211,11 +214,12 @@
...
@@ -211,11 +214,12 @@
border-width
:
1px
;
border-width
:
1px
;
border-style
:
solid
;
border-style
:
solid
;
margin-right
:
10
rpx
;
margin-right
:
10
rpx
;
margin-top
:
4
rpx
;
}
}
.rightContentView
{
.rightContentView
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
flex-start
;
width
:
100%
;
width
:
100%
;
font-size
:
30
rpx
;
font-size
:
30
rpx
;
color
:
#2272FF
;
color
:
#2272FF
;
...
@@ -229,9 +233,9 @@
...
@@ -229,9 +233,9 @@
.ph-list-item-arrow
{
.ph-list-item-arrow
{
position
:
absolute
;
position
:
absolute
;
width
:
56
rpx
;
width
:
40
rpx
;
height
:
56
rpx
;
height
:
40
rpx
;
right
:
3
0
rpx
;
right
:
3
8
rpx
;
}
}
.rightContent
{
.rightContent
{
...
@@ -278,7 +282,6 @@
...
@@ -278,7 +282,6 @@
flex
:
1
;
flex
:
1
;
background-color
:
#FFFFFF
;
background-color
:
#FFFFFF
;
color
:
#999999
;
color
:
#999999
;
}
}
.topItemView.active
{
.topItemView.active
{
color
:
#2272FF
;
color
:
#2272FF
;
...
...
take-order/pages/photo/preview.vue
View file @
495e2482
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
<image
class=
"btn"
:src=
"btn_remake"
@
click=
"remakePhoto"
></image>
<image
class=
"btn"
:src=
"btn_remake"
@
click=
"remakePhoto"
></image>
<image
class=
"btn"
:src=
"btn_continue"
@
click=
"continuePhoto"
></image>
<image
class=
"btn"
:src=
"btn_continue"
@
click=
"continuePhoto"
></image>
</view>
</view>
<image
class=
"btn finish"
src=
"/static/photo/finish.png"
@
click=
"finishPhoto"
></image>
</view>
</view>
</
template
>
</
template
>
...
@@ -19,7 +20,7 @@
...
@@ -19,7 +20,7 @@
return
{
return
{
protocolContent
:
''
,
protocolContent
:
''
,
btn_remake
:
'https://qn-static.banshouhui.com/take_order/photo/remake.png'
,
btn_remake
:
'https://qn-static.banshouhui.com/take_order/photo/remake.png'
,
btn_continue
:
'
https://qn-static.banshouhui.com/take_order
/photo/continue.png'
,
btn_continue
:
'
/static
/photo/continue.png'
,
standardId
:
''
,
standardId
:
''
,
images
:
[],
images
:
[],
files
:
[],
files
:
[],
...
@@ -119,7 +120,12 @@
...
@@ -119,7 +120,12 @@
delta
:
1
delta
:
1
})
})
},
},
finishPhoto
(){
// 完成本项
uni
.
navigateBack
({
delta
:
2
})
},
// 确认图片
// 确认图片
continuePhoto
()
{
continuePhoto
()
{
let
self
=
this
let
self
=
this
...
@@ -211,7 +217,7 @@
...
@@ -211,7 +217,7 @@
box-shadow
:
0
0
1rpx
6rpx
rgba
(
255
,
255
,
255
,
0
.05
);
box-shadow
:
0
0
1rpx
6rpx
rgba
(
255
,
255
,
255
,
0
.05
);
background-color
:
#333333
;
background-color
:
#333333
;
width
:
100%
;
width
:
100%
;
padding
:
70rpx
;
padding
:
70rpx
0
;
position
:
fixed
;
position
:
fixed
;
bottom
:
0
;
bottom
:
0
;
display
:
flex
;
display
:
flex
;
...
@@ -223,4 +229,14 @@
...
@@ -223,4 +229,14 @@
height
:
88rpx
;
height
:
88rpx
;
}
}
}
}
.btn
{
display
:
block
;
width
:
232rpx
;
height
:
80rpx
;
&
.finish
{
position
:
fixed
;
top
:
30rpx
;
right
:
30rpx
;
}
}
</
style
>
</
style
>
take-order/pages/photo/setting.vue
View file @
495e2482
<
template
>
<
template
>
<view
class=
"backView"
>
<view
class=
"backView"
>
<u-loading
style=
"position:
absolute
;top: 50%;"
:show=
"loading"
size=
"36"
mode=
"flower"
></u-loading>
<u-loading
style=
"position:
fixed
;top: 50%;"
:show=
"loading"
size=
"36"
mode=
"flower"
></u-loading>
<view
class=
"itemView firstItem"
>
<view
class=
"itemView firstItem"
>
<view
class=
"itemTitleView"
>
<view
class=
"itemTitleView"
>
<text
class=
"itemTitle"
>
保存原图
</text>
<text
class=
"itemTitle"
>
保存原图
</text>
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
<switch
class=
"itemSwitch"
:checked=
"item['enable']"
@
change=
"itemChange(item, ikey)"
color=
"#007AFF"
/>
<switch
class=
"itemSwitch"
:checked=
"item['enable']"
@
change=
"itemChange(item, ikey)"
color=
"#007AFF"
/>
</view>
</view>
<u-popup
border-radius=
"10"
v-model=
"isPopShow"
safe-area-inset-bottom
:mask-close-able=
"false"
mode=
"center"
<u-popup
border-radius=
"10"
v-model=
"isPopShow"
safe-area-inset-bottom
:mask-close-able=
"false"
mode=
"center"
width=
"690rp
"
height=
"600rpx
"
>
width=
"690rp
x"
height=
"600rpx"
@
close=
"handlePopClose
"
>
<view
class=
"popCenterView"
>
<view
class=
"popCenterView"
>
<text
class=
"popTitle"
>
设置自定义项
</text>
<text
class=
"popTitle"
>
设置自定义项
</text>
<view
class=
"inputBackView"
>
<view
class=
"inputBackView"
>
...
@@ -48,12 +48,12 @@
...
@@ -48,12 +48,12 @@
<text
class=
"popNoticeText u-m-t-20"
>
示例:
</text>
<text
class=
"popNoticeText u-m-t-20"
>
示例:
</text>
<text
class=
"popNoticeText"
>
工程队名称:蓝天工程队
</text>
<text
class=
"popNoticeText"
>
工程队名称:蓝天工程队
</text>
<view
class=
"popBtnView"
>
<view
class=
"popBtnView"
>
<
view
class=
"popCancelBtn
"
@
click=
"popCancelClick()"
>
<
u-button
:custom-style=
"customStyleCancel"
hover-class=
"none"
shape=
"circle"
type=
"primary
"
@
click=
"popCancelClick()"
>
<text
class=
"popBtnText"
>
取消
</text>
取消
</
view
>
</
u-button
>
<
view
class=
"popSaveBtn
"
@
click=
"popSaveClick()"
>
<
u-button
:custom-style=
"customStyleSave"
shape=
"circle"
type=
"primary
"
@
click=
"popSaveClick()"
>
<text
class=
"popBtnText"
>
保存
</text>
保存
</
view
>
</
u-button
>
</view>
</view>
</view>
</view>
</u-popup>
</u-popup>
...
@@ -98,6 +98,21 @@
...
@@ -98,6 +98,21 @@
},
},
showTitleSwitch
()
{
showTitleSwitch
()
{
return
this
.
result
[
'lower_right'
].
hasOwnProperty
(
'title_text'
)
return
this
.
result
[
'lower_right'
].
hasOwnProperty
(
'title_text'
)
},
customStyleCancel
()
{
return
{
'background-color'
:
'#D1D4D4'
,
'width'
:
'280rpx'
,
'height'
:
'96rpx'
}
},
customStyleSave
()
{
return
{
'background-color'
:
'##2272FF'
,
'width'
:
'280rpx'
,
'height'
:
'96rpx'
,
'margin-left'
:
'50rpx'
}
}
}
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
...
@@ -208,6 +223,11 @@
...
@@ -208,6 +223,11 @@
}
}
},
},
handlePopClose
()
{
this
.
showTipLeft
=
false
,
this
.
showTipRight
=
false
},
//自定义弹窗 保存
//自定义弹窗 保存
popSaveClick
:
function
()
{
popSaveClick
:
function
()
{
if
(
this
.
currenItem
[
'watemark_text'
]
&&
this
.
currenItem
[
'watemark_value'
])
{
if
(
this
.
currenItem
[
'watemark_text'
]
&&
this
.
currenItem
[
'watemark_value'
])
{
...
@@ -395,10 +415,10 @@
...
@@ -395,10 +415,10 @@
width
:
100%
;
width
:
100%
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
center
;
}
}
.popCancelBtn
{
/*
.popCancelBtn {
background-color: #D1D4D4;
background-color: #D1D4D4;
width: 280rpx;
width: 280rpx;
height: 96rpx;
height: 96rpx;
...
@@ -407,9 +427,9 @@
...
@@ -407,9 +427,9 @@
display: flex;
display: flex;
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
}
}
*/
.popSaveBtn
{
/*
.popSaveBtn {
background-color: #2272FF;
background-color: #2272FF;
width: 280rpx;
width: 280rpx;
height: 96rpx;
height: 96rpx;
...
@@ -418,11 +438,11 @@
...
@@ -418,11 +438,11 @@
display: flex;
display: flex;
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
}
}
*/
.popBtnText
{
/*
.popBtnText {
font-size: 32rpx;
font-size: 32rpx;
color: #FFFFFF;
color: #FFFFFF;
font-weight: 600;
font-weight: 600;
}
}
*/
</
style
>
</
style
>
take-order/pages/photo/take.vue
View file @
495e2482
This diff is collapsed.
Click to expand it.
take-order/static/photo/arrow.png
View replaced file @
a1cd1203
View file @
495e2482
4.86 KB
|
W:
|
H:
3.61 KB
|
W:
|
H:
2-up
Swipe
Onion skin
take-order/static/photo/continue.png
0 → 100644
View file @
495e2482
5.61 KB
take-order/static/photo/finish.png
0 → 100644
View file @
495e2482
5.31 KB
take-order/utils/login.js
View file @
495e2482
...
@@ -35,11 +35,6 @@ function authorization(data) {
...
@@ -35,11 +35,6 @@ function authorization(data) {
app
.
setUserData
(
res
.
data
)
app
.
setUserData
(
res
.
data
)
resolve
(
res
);
resolve
(
res
);
}
else
{
}
else
{
uni
.
showModal
({
title
:
'用户登录失败'
,
content
:
res
.
message
,
showCancel
:
false
});
reject
(
res
);
reject
(
res
);
}
}
}
else
{
}
else
{
...
...
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