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
8dffc547
Commit
8dffc547
authored
Mar 31, 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
97c7a265
61e9bd92
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
232 additions
and
224 deletions
+232
-224
index.vue
take-order/pages/photo/index.vue
+232
-224
No files found.
take-order/pages/photo/index.vue
View file @
8dffc547
<
template
>
<
template
>
<view
class=
"backView"
>
<view
class=
"backView"
>
<view
class=
"ph-pr-arr"
v-for=
"(dataItem, index) in list"
:key=
"index"
>
<view
class=
"ph-pr-arr"
v-for=
"(dataItem, index) in list"
:key=
"index"
>
<template
v-if=
"dataItem.data.length > 0"
>
<template
v-if=
"dataItem.data.length > 0"
>
<view
class=
"topTitle"
><text>
{{
dataItem
.
title
}}
</text></view>
<view
class=
"topTitle"
><text>
{{
dataItem
.
title
}}
</text></view>
<view
class=
"ph-pr-content"
>
<view
class=
"ph-pr-content"
>
<view
v-for=
"(item,ikey) in dataItem.data"
<view
v-for=
"(item,ikey) in dataItem.data"
:class=
"param[dataItem.type] === item.id ? 'select-item-view' : 'item-view'"
:class=
"param[dataItem.type] === item.id ? 'select-item-view' : 'item-view'"
@
click=
"itemClick(dataItem.type, item, ikey)"
:key=
"item.id"
>
@
click=
"itemClick(dataItem.type, item, ikey)"
:key=
"item.id"
>
<text
class=
"itemTitle"
>
{{
item
.
name
}}
</text>
<text
class=
"itemTitle"
>
{{
item
.
name
}}
</text>
</view>
</view>
</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>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
classifyList
:
[],
classifyList
:
[],
systemList
:
[],
systemList
:
[],
brandList
:
[],
brandList
:
[],
param
:
{
param
:
{
classifyId
:
''
,
classifyId
:
''
,
systemId
:
''
,
systemId
:
''
,
brandId
:
''
,
brandId
:
''
,
},
},
brandName
:
''
,
brandName
:
''
,
selectedAll
:
false
,
selectedAll
:
false
,
}
}
},
},
computed
:
{
computed
:
{
list
()
{
list
()
{
return
[{
return
[{
title
:
'请选择类别'
,
title
:
'请选择类别'
,
type
:
'classifyId'
,
type
:
'classifyId'
,
data
:
this
.
classifyList
data
:
this
.
classifyList
},
},
{
{
title
:
'请选择系统'
,
title
:
'请选择系统'
,
type
:
'systemId'
,
type
:
'systemId'
,
data
:
this
.
systemList
data
:
this
.
systemList
},
},
{
{
title
:
'请选择品牌'
,
title
:
'请选择品牌'
,
type
:
'brandId'
,
type
:
'brandId'
,
data
:
this
.
brandList
data
:
this
.
brandList
}
}
]
]
},
},
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'
,
onLoad
(
e
)
{
'height'
:
'104rpx'
getApp
().
trackPage
(
'选择产品页'
)
}
:
{
this
.
getRelationDictionaryV2
()
'color'
:
'#FFFFFF'
,
},
'background-color'
:
'#D1D4D4;'
,
onShareAppMessage
(
res
)
{
'width'
:
'600rpx'
,
let
shareObj
=
{
'height'
:
'104rpx'
title
:
''
,
}
path
:
'/pages/photo/product'
,
}
imageUrl
:
''
,
},
success
()
{},
onLoad
(
e
)
{
fail
()
{}
getApp
().
trackPage
(
'选择产品页'
)
}
this
.
getRelationDictionaryV2
()
return
shareObj
},
},
onShareAppMessage
(
res
)
{
methods
:
{
let
shareObj
=
{
getRelationDictionaryV2
:
function
()
{
title
:
''
,
this
.
$u
.
cloudApi
.
getRelationDictionaryV2
().
then
(
res
=>
{
path
:
'/pages/photo/product'
,
if
(
res
&&
res
.
result
)
{
imageUrl
:
''
,
this
.
classifyList
=
res
.
result
success
()
{},
this
.
param
.
classifyId
=
res
.
result
[
0
].
id
fail
()
{}
this
.
systemList
=
res
.
result
[
0
].
child
}
}
return
shareObj
})
},
},
methods
:
{
getRelationDictionaryV2
:
function
()
{
//选择 点击
this
.
$u
.
cloudApi
.
getRelationDictionaryV2
().
then
(
res
=>
{
itemClick
:
function
(
type
,
item
,
ikey
)
{
if
(
res
&&
res
.
result
)
{
this
.
classifyList
=
res
.
result
switch
(
type
)
{
this
.
param
.
classifyId
=
res
.
result
[
0
].
id
case
'classifyId'
:
this
.
systemList
=
res
.
result
[
0
].
child
this
.
param
=
{
}
classifyId
:
item
.
id
,
})
systemId
:
''
,
},
brandId
:
''
}
//选择 点击
this
.
selectedAll
=
false
itemClick
:
function
(
type
,
item
,
ikey
)
{
this
.
systemList
=
this
.
classifyList
[
ikey
].
child
this
.
brandList
=
[]
switch
(
type
)
{
break
case
'classifyId'
:
case
'systemId'
:
this
.
param
=
{
this
.
param
=
{
classifyId
:
item
.
id
,
classifyId
:
this
.
param
.
classifyId
,
systemId
:
''
,
systemId
:
item
.
id
,
brandId
:
''
brandId
:
''
}
}
this
.
selectedAll
=
false
this
.
systemList
=
this
.
classifyList
[
ikey
].
child
this
.
selectedAll
=
false
this
.
brandList
=
[]
this
.
brandList
=
this
.
systemList
[
ikey
].
child
break
case
'systemId'
:
break
this
.
param
=
{
case
'brandId'
:
classifyId
:
this
.
param
.
classifyId
,
this
.
param
.
brandId
=
item
.
id
systemId
:
item
.
id
,
this
.
selectedAll
=
true
brandId
:
''
this
.
brandName
=
item
.
name
}
break
default
:
this
.
selectedAll
=
false
break
this
.
brandList
=
this
.
systemList
[
ikey
].
child
}
},
break
case
'brandId'
:
// 点击下一步
this
.
param
.
brandId
=
item
.
id
handleClick
()
{
this
.
selectedAll
=
true
// 点击下一步设置全局拍照品牌品类
this
.
brandName
=
item
.
name
const
globalData
=
getApp
().
globalData
break
if
(
!
globalData
.
token
)
{
default
:
uni
.
navigateTo
({
break
url
:
'/pages/login/wxlogin'
}
})
},
return
}
// 点击下一步
let
keys
=
[
'brandId'
,
'brandName'
,
'classifyId'
,
'systemId'
]
handleClick
()
{
keys
.
map
(
key
=>
{
// 点击下一步设置全局拍照品牌品类
globalData
.
photo
.
product
[
key
]
=
this
[
key
]
||
this
.
param
[
key
]
if
(
!
this
.
selectedAll
)
{
})
return
uni
.
navigateTo
({
}
url
:
'/pages/photo/list'
+
const
globalData
=
getApp
().
globalData
'?brandId='
+
this
.
param
.
brandId
+
if
(
!
globalData
.
token
)
{
'&brand='
+
this
.
brandName
+
uni
.
navigateTo
({
'&classifyId='
+
this
.
param
.
classifyId
+
url
:
'/pages/login/wxlogin'
'&systemId='
+
this
.
param
.
systemId
,
})
})
return
}
}
}
let
keys
=
[
'brandId'
,
'brandName'
,
'classifyId'
,
'systemId'
]
}
keys
.
map
(
key
=>
{
</
script
>
globalData
.
photo
.
product
[
key
]
=
this
[
key
]
||
this
.
param
[
key
]
})
<
style
>
uni
.
navigateTo
({
.backView
{
url
:
'/pages/photo/list'
+
background-color
:
#FAFAFA
;
'?brandId='
+
this
.
param
.
brandId
+
position
:
absolute
;
'&brand='
+
this
.
brandName
+
top
:
0
;
'&classifyId='
+
this
.
param
.
classifyId
+
left
:
0
;
'&systemId='
+
this
.
param
.
systemId
,
width
:
100%
;
})
display
:
flex
;
}
flex-direction
:
column
;
}
align-items
:
center
;
}
height
:
100%
;
</
script
>
}
<
style
>
.topTitle
{
.backView
{
margin-top
:
50
rpx
;
background-color
:
#FAFAFA
;
padding-left
:
30
rpx
;
position
:
absolute
;
font-size
:
36
rpx
;
top
:
0
;
font-weight
:
bold
;
left
:
0
;
color
:
#333333
;
width
:
100%
;
}
display
:
flex
;
flex-direction
:
column
;
.ph-pr-content
{
align-items
:
center
;
display
:
flex
;
height
:
100%
;
flex-wrap
:
wrap
;
}
justify-content
:
flex-start
;
width
:
100%
;
.topTitle
{
padding
:
22
rpx
22
rpx
;
margin-top
:
50
rpx
;
}
padding-left
:
30
rpx
;
font-size
:
36
rpx
;
.ph-pr-arr
{
font-weight
:
bold
;
width
:
100%
;
color
:
#333333
;
}
}
.item-view
{
.ph-pr-content
{
background-color
:
#FFFFFF
;
display
:
flex
;
/* width: 548rpx; */
flex-wrap
:
wrap
;
margin
:
0
rpx
8
rpx
24
rpx
8
rpx
;
justify-content
:
flex-start
;
/* flex: 1 1 0%;
width
:
100%
;
max-width: 33%; */
padding
:
22
rpx
22
rpx
;
width
:
222
rpx
;
}
height
:
76
rpx
;
display
:
flex
;
.ph-pr-arr
{
align-items
:
center
;
width
:
100%
;
justify-content
:
center
;
}
border-style
:
solid
;
box-shadow
:
0px
2px
7px
0px
rgba
(
0
,
0
,
0
,
0.05
);
.item-view
{
border-width
:
0
rpx
;
background-color
:
#FFFFFF
;
border-radius
:
12
rpx
;
/* width: 548rpx; */
font-size
:
26
rpx
;
margin
:
0
rpx
8
rpx
24
rpx
8
rpx
;
color
:
#666666
;
/* flex: 1 1 0%;
}
max-width: 33%; */
width
:
222
rpx
;
.select-item-view
{
height
:
76
rpx
;
background-color
:
#2272FF
;
display
:
flex
;
margin
:
0
rpx
8
rpx
24
rpx
8
rpx
;
align-items
:
center
;
/* flex: 1 1 0%;
justify-content
:
center
;
max-width: 33%; */
border-style
:
solid
;
width
:
222
rpx
;
box-shadow
:
0px
2px
7px
0px
rgba
(
0
,
0
,
0
,
0.05
);
height
:
76
rpx
;
border-width
:
0
rpx
;
display
:
flex
;
border-radius
:
12
rpx
;
align-items
:
center
;
font-size
:
26
rpx
;
justify-content
:
center
;
color
:
#666666
;
border-style
:
solid
;
}
box-shadow
:
0px
2px
7px
0px
rgba
(
0
,
0
,
0
,
0.05
);
border-width
:
0
rpx
;
.select-item-view
{
border-radius
:
12
rpx
;
background-color
:
#2272FF
;
font-size
:
26
rpx
;
margin
:
0
rpx
8
rpx
24
rpx
8
rpx
;
color
:
#FFFFFF
;
/* flex: 1 1 0%;
}
max-width: 33%; */
width
:
222
rpx
;
.ph-pr-button
{
height
:
76
rpx
;
position
:
absolute
;
display
:
flex
;
bottom
:
76
rpx
;
align-items
:
center
;
border-radius
:
52
rpx
;
justify-content
:
center
;
height
:
104
rpx
;
border-style
:
solid
;
font-size
:
32
rpx
;
box-shadow
:
0px
2px
7px
0px
rgba
(
0
,
0
,
0
,
0.05
);
width
:
600
rpx
;
border-width
:
0
rpx
;
line-height
:
104
rpx
;
border-radius
:
12
rpx
;
}
font-size
:
26
rpx
;
color
:
#FFFFFF
;
}
.ph-pr-button
{
position
:
absolute
;
bottom
:
76
rpx
;
font-size
:
32
rpx
;
}
</
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