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
f281f92e
Commit
f281f92e
authored
Dec 30, 2020
by
和慭琛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口对接 100% UI高保真还原 100%
parent
1d9b7a34
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
97 additions
and
114 deletions
+97
-114
pages.json
take-order/pages.json
+12
-6
brand.vue
take-order/pages/photo/brand.vue
+1
-0
detail.vue
take-order/pages/photo/detail.vue
+43
-27
list.vue
take-order/pages/photo/list.vue
+41
-81
No files found.
take-order/pages.json
View file @
f281f92e
...
@@ -6,6 +6,13 @@
...
@@ -6,6 +6,13 @@
*/
*/
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
{
"path"
:
"pages/photo/product"
,
"style"
:
{
"navigationBarTitleText"
:
"选择产品"
}
},
{
{
"path"
:
"pages/photo/detail"
,
"path"
:
"pages/photo/detail"
,
"style"
:
{
"style"
:
{
...
@@ -13,6 +20,10 @@
...
@@ -13,6 +20,10 @@
}
}
},
},
{
{
"path"
:
"pages/photo/preview"
,
"path"
:
"pages/photo/preview"
,
"style"
:
{
"style"
:
{
...
@@ -27,12 +38,7 @@
...
@@ -27,12 +38,7 @@
}
}
},
},
{
"path"
:
"pages/photo/product"
,
"style"
:
{
"navigationBarTitleText"
:
"选择产品"
}
},
{
{
"path"
:
"pages/index/index"
,
"path"
:
"pages/index/index"
,
...
...
take-order/pages/photo/brand.vue
View file @
f281f92e
...
@@ -67,6 +67,7 @@
...
@@ -67,6 +67,7 @@
url
:
'/pages/photo/list'
url
:
'/pages/photo/list'
+
'?brand_code='
+
this
.
brand_code
+
'?brand_code='
+
this
.
brand_code
+
'&brand='
+
this
.
brand
+
'&brand='
+
this
.
brand
+
'&product_code='
+
this
.
product_code
+
'&product='
+
this
.
product
,
+
'&product='
+
this
.
product
,
})
})
},
},
...
...
take-order/pages/photo/detail.vue
View file @
f281f92e
...
@@ -3,14 +3,13 @@
...
@@ -3,14 +3,13 @@
<view
class=
"topView"
>
<view
class=
"topView"
>
<!--text class="topTitle">示范照片 (
{{
currentNumber
}}
/
{{
totalNumber
}}
)
</text-->
<!--text class="topTitle">示范照片 (
{{
currentNumber
}}
/
{{
totalNumber
}}
)
</text-->
</view>
</view>
<scroll-view
scroll-x
class=
"centerBackView"
>
<view
class=
"centerBackView"
>
<image
class=
"photoImage"
@
click=
"imageClick(item.image)"
:src=
"item.image"
mode=
""
v-for=
"(item,ikey) in photoList"
:key=
"ikey"
></image>
<image
class=
"photoImage"
@
click=
"imageClick(current_image)"
:src=
"current_image"
mode=
"aspectFill"
></image>
</scroll-view>
<view
class=
"bottomView"
>
<view
class=
"takeView"
@
click=
"takeClick"
>
<text
class=
"takeText"
>
按规范\n拍照
</text>
</view>
</view>
</view>
<view
class=
"bottomView"
>
<image
class=
"takeView"
:src=
"icon_gotake"
mode=
""
@
click=
"takeClick"
></image>
<image
class=
"backIcon"
:src=
"icon_arrow_down"
mode=
""
@
click=
"backClick"
></image>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -18,33 +17,34 @@
...
@@ -18,33 +17,34 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
totalNumber
:
0
,
image_count
:
1
,
currentNumber
:
1
,
current_count
:
1
,
photoList
:[]
current_image
:
''
,
icon_gotake
:
'https://qn-static.banshouhui.com/gotake.png'
,
icon_arrow_down
:
'https://qn-static.banshouhui.com/arrow_down.png'
,
}
}
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
this
.
initData
()
this
.
initData
(
e
)
},
},
methods
:
{
methods
:
{
initData
:
function
()
{
initData
:
function
(
e
)
{
if
(
e
&&
e
.
current_image
){
this
.
current_image
=
e
.
current_image
}
this
.
photoList
=
[
if
(
e
&&
e
.
image_count
){
{
this
.
image_count
=
e
.
image_count
image
:
'https://qn-static.banshouhui.com/selected.png'
,
}
},
{
if
(
e
&&
e
.
current_count
){
image
:
'https://qn-static.banshouhui.com/close_new.png'
,
this
.
current_count
=
e
.
current_count
},
}
{
image
:
'https://qn-static.banshouhui.com/auth_notice_new.png'
,
}
]
this
.
totalNumber
=
this
.
photoList
.
length
uni
.
setNavigationBarTitle
({
uni
.
setNavigationBarTitle
({
title
:
'走线照片 ('
+
this
.
current
Number
+
'/'
+
this
.
totalNumber
+
')'
title
:
'走线照片 ('
+
this
.
current
_count
+
'/'
+
this
.
image_count
+
')'
});
});
},
},
...
@@ -62,6 +62,12 @@
...
@@ -62,6 +62,12 @@
})
})
},
},
//返回 点击
backClick
:
function
()
{
uni
.
navigateBack
({
})
},
}
}
...
@@ -97,14 +103,14 @@
...
@@ -97,14 +103,14 @@
}
}
.centerBackView
{
.centerBackView
{
background-color
:
#
007AFF
;
background-color
:
#
333333
;
height
:
568
rpx
;
height
:
568
rpx
;
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
}
}
.photoImage
{
.photoImage
{
background-color
:
#
4CD964
;
background-color
:
#
333333
;
width
:
750
rpx
;
width
:
750
rpx
;
height
:
568
rpx
;
height
:
568
rpx
;
}
}
...
@@ -137,4 +143,14 @@
...
@@ -137,4 +143,14 @@
text-align
:
center
;
text-align
:
center
;
}
}
.backIcon
{
background-color
:
#FFFFFF
;
width
:
54
rpx
;
height
:
54
rpx
;
border-radius
:
27
rpx
;
position
:
fixed
;
left
:
60
rpx
;
bottom
:
50
rpx
;
}
</
style
>
</
style
>
take-order/pages/photo/list.vue
View file @
f281f92e
<
template
>
<
template
>
<view
class=
"backView"
>
<view
class=
"backView"
>
<view
class=
"topView"
>
<view
class=
"topView"
>
<view
:class=
"activeTop == ikey ? 'topItemView whiteBackColor' : 'topItemView FAbackColor' "
@
click=
"topItemClick(ikey,item)"
v-for=
"(item,ikey) in
top
List"
:key=
"ikey"
>
<view
:class=
"activeTop == ikey ? 'topItemView whiteBackColor' : 'topItemView FAbackColor' "
@
click=
"topItemClick(ikey,item)"
v-for=
"(item,ikey) in
data
List"
:key=
"ikey"
>
<text
class=
"topActiveItemTitle"
v-if=
"activeTop == ikey"
>
{{
item
.
t
itl
e
}}
</text>
<text
class=
"topActiveItemTitle"
v-if=
"activeTop == ikey"
>
{{
item
.
t
yp
e
}}
</text>
<text
class=
"topItemTitle"
v-if=
"activeTop != ikey"
>
{{
item
.
t
itl
e
}}
</text>
<text
class=
"topItemTitle"
v-if=
"activeTop != ikey"
>
{{
item
.
t
yp
e
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"rightView"
>
<view
class=
"rightView"
>
<view
class=
"rightItemView"
@
click=
"rightItemClick(item,ikey)"
v-for=
"(item,ikey) in rightList"
:key=
"ikey"
>
<view
class=
"rightItemView"
@
click=
"rightItemClick(item,ikey)"
v-for=
"(item,ikey) in rightList"
:key=
"ikey"
>
<view
:class=
" item.images ? 'rightContentView width_50' : 'rightContentView width_100' "
>
<view
:class=
" item.images ? 'rightContentView width_50' : 'rightContentView width_100' "
>
<text
class=
"rightTitle u-m-t-30 u-m-l-30"
>
{{
item
.
title
}}
(
{{
item
.
photoNumber
}}
张)
</text>
<text
class=
"rightTitle u-m-t-30 u-m-l-30"
>
{{
item
.
name
}}
(
{{
item
.
image_count
}}
张)
</text>
<text
class=
"rightContent u-m-t-14 u-m-l-30 u-p-b-30"
>
{{
item
.
content
}}
</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.images"
>
<view
class=
"rightImageView"
v-if=
"item.images"
>
<image
class=
"rightImage"
src=
"
"
mode=
""
></image>
<image
class=
"rightImage"
:src=
"item.images[0]
"
mode=
""
></image>
</view>
</view>
</view>
</view>
</view>
</view>
<!--text class="topTitle">
{{
topTitle
}}
</text-->
<!--view class="centerBackView">
<view
class=
"leftView"
>
<view
class=
"leftItemView"
@
click=
"leftItemClick(item,ikey)"
v-for=
"(item,ikey) in leftList"
:key=
"ikey"
>
<text
class=
"leftItemText"
>
{{
item
.
title
}}
</text>
</view>
</view>
<view
class=
"rightView"
>
<view
class=
"rightItemView"
@
click=
"rightItemClick(item,ikey)"
v-for=
"(item,ikey) in rightList"
:key=
"ikey"
>
<view
:class=
" item.images ? 'rightContentView width_50' : 'rightContentView width_100' "
>
<text
class=
"rightTitle u-m-t-30 u-m-l-30"
>
{{
item
.
title
}}
(
{{
item
.
photoNumber
}}
张)
</text>
<text
class=
"rightContent u-m-t-30 u-m-l-30 u-p-b-30"
>
{{
item
.
content
}}
</text>
</view>
<view
class=
"rightImageView"
v-if=
"item.images"
>
<image
class=
"rightImage"
src=
""
mode=
""
></image>
</view>
</view>
</view>
</view-->
</view>
</view>
</
template
>
</
template
>
...
@@ -48,22 +29,24 @@
...
@@ -48,22 +29,24 @@
activeTop
:
0
,
activeTop
:
0
,
leftList
:[],
leftList
:[],
rightList
:[],
rightList
:[],
brand_code
:
''
,
product
:
''
,
product
:
''
,
product_code
:
''
,
brand
:
''
,
brand
:
''
,
brand_code
:
''
,
dataList
:[],
}
}
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
if
(
e
&&
e
.
brand_code
){
this
.
brand_code
=
e
.
brand_code
}
if
(
e
&&
e
.
product
){
if
(
e
&&
e
.
product
){
this
.
product
=
e
.
product
this
.
product
=
e
.
product
}
}
if
(
e
&&
e
.
product_code
){
this
.
product_code
=
e
.
product_code
}
if
(
e
&&
e
.
brand
){
if
(
e
&&
e
.
brand
){
this
.
brand
=
e
.
brand
this
.
brand
=
e
.
brand
uni
.
setNavigationBarTitle
({
uni
.
setNavigationBarTitle
({
...
@@ -71,79 +54,56 @@
...
@@ -71,79 +54,56 @@
});
});
}
}
this
.
topList
=
[
if
(
e
&&
e
.
brand_code
){
{
'title'
:
'安装阶段'
},
this
.
brand_code
=
e
.
brand_code
{
'title'
:
'勘察部分'
},
}
{
'title'
:
'一一阶段'
},
{
'title'
:
'二二阶段'
},
{
'title'
:
'三三阶段'
},
{
'title'
:
'四四阶段'
},
]
this
.
topTitle
=
this
.
product
+
'-'
+
this
.
brand
this
.
topTitle
=
this
.
product
+
'-'
+
this
.
brand
this
.
getLeftData
()
this
.
getListData
()
},
},
methods
:
{
methods
:
{
getL
ef
tData
:
function
(){
getL
is
tData
:
function
(){
this
.
$u
.
cloudApi
.
getstandard
({
brand_code
:
this
.
brand_code
}).
then
(
res
=>
{
console
.
log
(
'getListData:'
)
console
.
log
(
'product_code'
+
this
.
product_code
)
console
.
log
(
'brand_code'
+
this
.
brand_code
)
let
that
=
this
this
.
$u
.
cloudApi
.
getGroupStandard
({
product_code
:
this
.
product_code
,
brand_code
:
this
.
brand_code
}).
then
(
res
=>
{
console
.
log
(
'获取规范标准数据:'
)
console
.
log
(
'获取规范标准数据:'
)
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
result
&&
res
.
result
.
length
){
that
.
handleData
(
res
)
}
})
})
this
.
leftList
=
[
{
'title'
:
'回单'
,
'id'
:
0
},
{
'title'
:
'回单'
,
'id'
:
1
},
{
'title'
:
'回单'
,
'id'
:
2
}
]
this
.
getRightData
()
},
},
getRightData
:
function
()
{
handleData
:
function
(
res
){
this
.
rightList
=
[
this
.
dataList
=
res
.
result
{
var
item
=
res
.
result
[
0
]
'title'
:
'电源点照片'
,
this
.
rightList
=
item
.
list
'photoNumber'
:
4
,
'content'
:
'拍照要求:232拍照要求131拍照要求23拍照要求123拍照要求12'
,
'images'
:[
'asdasdasd.png'
,
'assdasdad.png'
,
'asdsds.png'
]
},
{
'title'
:
'电源点照片'
,
'photoNumber'
:
4
,
'content'
:
'拍照要求:232拍照要求131拍照要求23拍照要求123拍照要求12'
,
'images'
:
null
},
{
'title'
:
'电源点照片'
,
'photoNumber'
:
4
,
'content'
:
'拍照要求:232拍照要求131拍照要求23拍照要求123拍照要求12'
,
'images'
:[
'asdasdasd.png'
,
'assdasdad.png'
,
'asdsds.png'
]
},
]
},
},
//顶部点击
//顶部点击
topItemClick
:
function
(
ikey
,
item
)
{
topItemClick
:
function
(
ikey
,
item
)
{
this
.
activeTop
=
ikey
this
.
activeTop
=
ikey
this
.
rightList
=
item
.
list
},
},
//左侧点击
leftItemClick
:
function
(
item
,
ikey
)
{
this
.
getRightData
()
},
//右侧点击
//右侧点击
rightItemClick
:
function
(
item
,
ikey
)
{
rightItemClick
:
function
(
item
,
ikey
)
{
var
current_image
=
item
.
images
[
ikey
]
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/photo/detail'
url
:
'/pages/photo/detail'
+
'?current_image='
+
current_image
+
'&image_count='
+
item
.
image_count
+
'¤t_count='
+
ikey
,
})
})
},
},
...
@@ -254,8 +214,8 @@
...
@@ -254,8 +214,8 @@
.topView
{
.topView
{
background-color
:
#
007A
FF
;
background-color
:
#
FFFF
FF
;
width
:
100%
;
height
:
96
rpx
;
height
:
96
rpx
;
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
...
...
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