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
e7fff6f2
Commit
e7fff6f2
authored
Dec 29, 2020
by
和慭琛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
部分接口对接 部分UI高保真还原
parent
6c8aa5b9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
183 additions
and
67 deletions
+183
-67
pages.json
take-order/pages.json
+18
-8
brand.vue
take-order/pages/photo/brand.vue
+48
-25
list.vue
take-order/pages/photo/list.vue
+93
-3
product.vue
take-order/pages/photo/product.vue
+24
-31
No files found.
take-order/pages.json
View file @
e7fff6f2
...
@@ -6,17 +6,18 @@
...
@@ -6,17 +6,18 @@
*/
*/
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
{
{
"path"
:
"pages/photo/
produc
t"
,
"path"
:
"pages/photo/
lis
t"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"
选择产品
"
"navigationBarTitleText"
:
"
规范展示
"
}
}
},
},
{
{
"path"
:
"pages/photo/
try
"
,
"path"
:
"pages/photo/
product
"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"
拍照
"
"navigationBarTitleText"
:
"
选择产品
"
}
}
},
},
...
@@ -31,20 +32,25 @@
...
@@ -31,20 +32,25 @@
{
{
"path"
:
"pages/photo/
detail
"
,
"path"
:
"pages/photo/
try
"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"
图片展示
"
"navigationBarTitleText"
:
"
拍照
"
}
}
},
},
{
{
"path"
:
"pages/photo/
list
"
,
"path"
:
"pages/photo/
detail
"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"
规范
展示"
"navigationBarTitleText"
:
"
图片
展示"
}
}
},
},
...
@@ -53,6 +59,10 @@
...
@@ -53,6 +59,10 @@
{
{
"path"
:
"pages/photo/brand"
,
"path"
:
"pages/photo/brand"
,
"style"
:
{
"style"
:
{
...
...
take-order/pages/photo/brand.vue
View file @
e7fff6f2
<
template
>
<
template
>
<view
class=
"backView"
>
<view
class=
"backView"
>
<text
class=
"topTitle"
>
选择产品
</text>
<text
class=
"topTitle"
>
{{
product
}}
>
选择产品
</text>
<view
class=
""
>
<view
class=
"
u-p-b-48
"
>
<view
class=
"itemView u-m-t-
80
"
v-for=
"(item,ikey) in brandList"
:key=
"ikey"
>
<view
class=
"itemView u-m-t-
48
"
v-for=
"(item,ikey) in brandList"
:key=
"ikey"
>
<text
class=
"itemTitle"
@
click=
"itemClick(item)"
>
{{
item
.
titl
e
}}
</text>
<text
class=
"itemTitle"
@
click=
"itemClick(item)"
>
{{
item
.
nam
e
}}
</text>
</view>
</view>
</view>
</view>
...
@@ -14,14 +14,21 @@
...
@@ -14,14 +14,21 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
code
:
''
,
product_code
:
''
,
brandList
:[]
brandList
:[],
brand_code
:
''
,
product
:
''
,
brand
:
''
,
}
}
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
if
(
e
&&
e
.
code
){
if
(
e
&&
e
.
product_code
){
this
.
code
=
e
.
code
this
.
product_code
=
e
.
product_code
}
if
(
e
&&
e
.
product
){
this
.
product
=
e
.
product
}
}
this
.
getBrandList
()
this
.
getBrandList
()
...
@@ -30,27 +37,37 @@
...
@@ -30,27 +37,37 @@
getBrandList
:
function
()
{
getBrandList
:
function
()
{
this
.
$u
.
cloudApi
.
getBrand
({
product_code
:
this
.
code
}).
then
(
res
=>
{
let
that
=
this
console
.
log
(
res
,
"品牌"
)
this
.
$u
.
cloudApi
.
getBrand
({
product_code
:
this
.
product_code
}).
then
(
res
=>
{
console
.
log
(
'获取品牌数据:'
)
console
.
log
(
res
)
if
(
res
.
result
.
data
){
that
.
brandList
=
res
.
result
.
data
}
}
}
)
)
// this.brandList = [
// {
// 'title':'广汽',
// 'id':0
// },
// {
// 'title':'比亚迪',
// 'id':1
// }
// ]
},
},
//选择 点击
//选择 点击
itemClick
:
function
(
item
)
{
itemClick
:
function
(
item
)
{
if
(
item
.
product_code
){
this
.
brand_code
=
item
.
code
}
if
(
item
.
name
){
this
.
brand
=
item
.
name
}
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/photo/list'
url
:
'/pages/photo/list'
+
'?brand_code='
+
this
.
brand_code
+
'&brand='
+
this
.
brand
+
'&product='
+
this
.
product
,
})
})
},
},
...
@@ -74,21 +91,27 @@
...
@@ -74,21 +91,27 @@
}
}
.topTitle
{
.topTitle
{
margin-top
:
80
rpx
;
margin-top
:
192
rpx
;
font-size
:
32
rpx
;
font-size
:
32
rpx
;
}
}
.itemView
{
.itemView
{
background-color
:
#
999999
;
background-color
:
#
FFFFFF
;
width
:
400
rpx
;
width
:
548
rpx
;
height
:
80
rpx
;
height
:
96
rpx
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
border-style
:
solid
;
box-shadow
:
0px
2px
7px
0px
rgba
(
0
,
0
,
0
,
0.05
);
border-width
:
0
rpx
;
}
}
.itemTitle
{
.itemTitle
{
font-size
:
28
rpx
;
font-size
:
32
rpx
;
font-weight
:
bold
;
}
}
</
style
>
</
style
>
take-order/pages/photo/list.vue
View file @
e7fff6f2
<
template
>
<
template
>
<view
class=
"backView"
>
<view
class=
"backView"
>
<text
class=
"topTitle"
>
{{
topTitle
}}
</text>
<view
class=
"topView"
>
<view
:class=
"activeTop == ikey ? 'topItemView whiteBackColor' : 'topItemView FAbackColor' "
@
click=
"topItemClick(ikey,item)"
v-for=
"(item,ikey) in topList"
:key=
"ikey"
>
<text
class=
"topActiveItemTitle"
v-if=
"activeTop == ikey"
>
{{
item
.
title
}}
</text>
<text
class=
"topItemTitle"
v-if=
"activeTop != ikey"
>
{{
item
.
title
}}
</text>
</view>
</view>
<!--text class="topTitle">
{{
topTitle
}}
</text>
<view
class=
"centerBackView"
>
<view
class=
"centerBackView"
>
<view
class=
"leftView"
>
<view
class=
"leftView"
>
<view
class=
"leftItemView"
@
click=
"leftItemClick(item,ikey)"
v-for=
"(item,ikey) in leftList"
:key=
"ikey"
>
<view
class=
"leftItemView"
@
click=
"leftItemClick(item,ikey)"
v-for=
"(item,ikey) in leftList"
:key=
"ikey"
>
...
@@ -18,7 +24,7 @@
...
@@ -18,7 +24,7 @@
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view
--
>
</view>
</view>
</
template
>
</
template
>
...
@@ -26,18 +32,59 @@
...
@@ -26,18 +32,59 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
topList
:[],
topTitle
:
''
,
topTitle
:
''
,
activeTop
:
0
,
leftList
:[],
leftList
:[],
rightList
:[],
rightList
:[],
brand_code
:
''
,
product
:
''
,
brand
:
''
,
}
}
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
this
.
topTitle
=
'充电桩-北汽'
if
(
e
&&
e
.
brand_code
){
this
.
brand_code
=
e
.
brand_code
}
if
(
e
&&
e
.
product
){
this
.
product
=
e
.
product
}
if
(
e
&&
e
.
brand
){
this
.
brand
=
e
.
brand
uni
.
setNavigationBarTitle
({
title
:
this
.
brand
});
}
this
.
topList
=
[
{
'title'
:
'安装阶段'
},
{
'title'
:
'勘察部分'
},
{
'title'
:
'一一阶段'
},
{
'title'
:
'二二阶段'
},
{
'title'
:
'三三阶段'
},
{
'title'
:
'四四阶段'
},
]
this
.
topTitle
=
this
.
product
+
'-'
+
this
.
brand
this
.
getLeftData
()
this
.
getLeftData
()
},
},
methods
:
{
methods
:
{
getLeftData
:
function
(){
getLeftData
:
function
(){
this
.
$u
.
cloudApi
.
getstandard
({
brand_code
:
this
.
brand_code
}).
then
(
res
=>
{
console
.
log
(
'获取规范标准数据:'
)
console
.
log
(
res
)
})
this
.
leftList
=
[
this
.
leftList
=
[
{
'title'
:
'回单'
,
'id'
:
0
},
{
'title'
:
'回单'
,
'id'
:
0
},
{
'title'
:
'回单'
,
'id'
:
1
},
{
'title'
:
'回单'
,
'id'
:
1
},
...
@@ -71,6 +118,11 @@
...
@@ -71,6 +118,11 @@
]
]
},
},
//顶部点击
topItemClick
:
function
(
ikey
,
item
)
{
this
.
activeTop
=
ikey
},
//左侧点击
//左侧点击
leftItemClick
:
function
(
item
,
ikey
)
{
leftItemClick
:
function
(
item
,
ikey
)
{
this
.
getRightData
()
this
.
getRightData
()
...
@@ -185,6 +237,44 @@
...
@@ -185,6 +237,44 @@
height
:
80%
;
height
:
80%
;
}
}
.topView
{
background-color
:
#007AFF
;
height
:
96
rpx
;
display
:
flex
;
flex-direction
:
row
;
}
.topItemView
{
width
:
210
rpx
;
height
:
96
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.whiteBackColor
{
background-color
:
#FFFFFF
;
}
.FAbackColor
{
background-color
:
#FAFAFA
;
}
.topItemTitle
{
font-size
:
32
rpx
;
color
:
#999999
;
}
.topActiveItemTitle
{
font-size
:
32
rpx
;
font-weight
:
bold
;
color
:
#333333
;
}
...
...
take-order/pages/photo/product.vue
View file @
e7fff6f2
<
template
>
<
template
>
<view
class=
"backView"
>
<view
class=
"backView"
>
<text
class=
"topTitle"
>
选择产品
</text>
<text
class=
"topTitle"
>
选择产品
</text>
<view
class=
""
>
<view
class=
"
u-p-b-48
"
>
<view
class=
"itemView u-m-t-
80
"
v-for=
"(item,ikey) in productList"
:key=
"ikey"
>
<view
class=
"itemView u-m-t-
48
"
v-for=
"(item,ikey) in productList"
:key=
"ikey"
>
<text
class=
"itemTitle"
@
click=
"itemClick(item)"
>
{{
item
.
name
}}
</text>
<text
class=
"itemTitle"
@
click=
"itemClick(item)"
>
{{
item
.
name
}}
</text>
</view>
</view>
</view>
</view>
...
@@ -15,7 +15,8 @@
...
@@ -15,7 +15,8 @@
data
()
{
data
()
{
return
{
return
{
productList
:[],
productList
:[],
code
:
''
,
product_code
:
''
,
product
:
''
,
}
}
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
...
@@ -39,37 +40,25 @@
...
@@ -39,37 +40,25 @@
})
})
/*
const db = uniCloud.database({
spaceId: 'tcb-nikbzhlwnpd5n913e1c5e-50f4bbo'
})
const collection = db.collection("config").where({type: "brand"}).get()
console.log('collection:')
console.log(collection)
this.productList = [
{
'title':'新风机',
'id':0
},
{
'title':'充电桩',
'id':1
}
]
*/
},
},
//选择 点击
//选择 点击
itemClick
:
function
(
item
)
{
itemClick
:
function
(
item
)
{
if
(
item
.
code
){
if
(
item
.
code
){
this
.
code
=
item
.
code
this
.
product_code
=
item
.
code
}
if
(
item
.
name
){
this
.
product
=
item
.
name
}
}
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/photo/brand'
+
'?code='
+
this
.
code
url
:
'/pages/photo/brand'
+
'?product_code='
+
this
.
product_code
+
'&product='
+
this
.
product
,
})
})
},
},
...
@@ -93,22 +82,26 @@
...
@@ -93,22 +82,26 @@
}
}
.topTitle
{
.topTitle
{
margin-top
:
80
rpx
;
margin-top
:
192
rpx
;
font-size
:
32
rpx
;
font-size
:
32
rpx
;
}
}
.itemView
{
.itemView
{
background-color
:
#
999999
;
background-color
:
#
FFFFFF
;
width
:
400
rpx
;
width
:
548
rpx
;
height
:
80
rpx
;
height
:
96
rpx
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
border-style
:
solid
;
box-shadow
:
0px
2px
7px
0px
rgba
(
0
,
0
,
0
,
0.05
);
border-width
:
0
rpx
;
}
}
.itemTitle
{
.itemTitle
{
font-size
:
28
rpx
;
font-size
:
32
rpx
;
font-weight
:
bold
;
}
}
</
style
>
</
style
>
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