Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
account-book
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
刘文虎
account-book
Commits
feb2c1d4
Commit
feb2c1d4
authored
Jul 20, 2022
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 名片
parent
17354344
Pipeline
#2817
canceled with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
317 additions
and
13 deletions
+317
-13
index.vue
components/cell-card/index.vue
+216
-12
index.vue
components/cell-relation/index.vue
+93
-0
index.vue
pages/card/index.vue
+8
-1
No files found.
components/cell-card/index.vue
View file @
feb2c1d4
<
template
>
<
template
>
<view
class=
"cell-card"
>
<view
class=
"cell-card"
>
<view
class=
"back-view"
></view>
<template
v-if=
"isGreen"
>
<view
class=
"content-view"
></view>
<view
class=
"back-view"
v-if=
"isGreen"
>
<image
:src=
"image"
></image>
</view>
<view
class=
"content-view"
>
<view
class=
"top-view"
>
<view
class=
"title-view"
>
{{
info
.
title
}}
</view>
</view>
<view
class=
"name-view"
>
{{
info
.
name
}}
</view>
<view
class=
"info-view"
>
<view
class=
"left-view"
>
<view
class=
"item-view"
>
<view
class=
"label-view"
>
电话:
</view>
<view
class=
"value-view"
>
{{
info
.
phone
}}
</view>
</view>
<view
class=
"item-view"
>
<view
class=
"label-view"
>
地址:
</view>
<view
class=
"value-view"
>
{{
info
.
address
}}
</view>
</view>
</view>
<view
class=
"right-view"
hover-class=
"u-hover-class"
@
click=
"$u.throttle(previewQRCode, 500)"
>
<image
:src=
"info.qrCode"
></image>
</view>
</view>
</view>
</
template
>
<
template
v-else-if=
"isBlue"
>
<view
class=
"content-view"
>
<view
class=
"top-view top-blue"
>
<view
class=
"title-view title-blue"
>
{{
info
.
title
}}
</view>
<view
class=
"right-view"
hover-class=
"u-hover-class"
@
click=
"$u.throttle(previewQRCode, 500)"
>
<image
:src=
"info.qrCode"
></image>
</view>
</view>
<view
class=
"name-view"
>
{{
info
.
name
}}
</view>
<view
class=
"info-view"
>
<view
class=
"left-view"
>
<view
class=
"item-view"
>
<view
class=
"label-view"
>
电话:
</view>
<view
class=
"value-view"
>
{{
info
.
phone
}}
</view>
</view>
<view
class=
"item-view"
>
<view
class=
"label-view"
>
地址:
</view>
<view
class=
"value-view"
>
{{
info
.
address
}}
</view>
</view>
</view>
</view>
</view>
</
template
>
<
template
v-else-if=
"isBlack"
>
<view
class=
"content-view"
>
<view
class=
"name-view name-black"
>
{{
info
.
name
}}
</view>
<view
class=
"info-view"
>
<view
class=
"left-view"
>
<view
class=
"item-view"
>
<view
class=
"label-view"
>
电话:
</view>
<view
class=
"value-view"
>
{{
info
.
phone
}}
</view>
</view>
<view
class=
"item-view"
>
<view
class=
"label-view"
>
地址:
</view>
<view
class=
"value-view"
>
{{
info
.
address
}}
</view>
</view>
</view>
<view
class=
"right-view"
hover-class=
"u-hover-class"
@
click=
"$u.throttle(previewQRCode, 500)"
>
<image
:src=
"info.qrCode"
></image>
</view>
</view>
</view>
<view
class=
"bottom-view"
>
<view
class=
"title-view"
>
{{
info
.
title
}}
</view>
</view>
</
template
>
</view>
</view>
</template>
</template>
...
@@ -12,40 +94,162 @@ export default {
...
@@ -12,40 +94,162 @@ export default {
type
:
Object
,
type
:
Object
,
default
()
{
default
()
{
return
{}
return
{}
}
}
,
},
},
// green 绿;blue 蓝;black 黑;
type
:
{
type
:
String
,
default
:
'green'
}
},
},
data
()
{
data
()
{
return
{
return
{
loading
:
true
loading
:
true
,
}
}
},
},
computed
:
{
computed
:
{
baseUrl
()
{
return
process
.
uniEnv
.
qn_base_url
},
image
()
{
return
this
.
baseUrl
+
'muban1zhengmian@3x.png'
},
isGreen
()
{
return
this
.
info
.
type
==
'green'
},
isBlue
()
{
return
this
.
info
.
type
==
'blue'
},
isBlack
()
{
return
this
.
info
.
type
==
'black'
},
// green 绿;blue 蓝;black 黑;
settings
()
{
switch
(
this
.
info
.
type
)
{
case
'green'
:
return
{
color
:
'#02A074'
,
}
case
'blue'
:
return
{
color
:
'#2D60E7'
,
}
case
'black'
:
return
{
color
:
'#FFFFFF'
,
backgroundColor
:
'#354255'
,
}
}
},
},
},
methods
:
{
methods
:
{
previewQRCode
()
{
uni
.
previewImage
({
urls
:
[
this
.
info
.
qrCode
],
current
:
0
,
longPressActions
:
{
success
:
function
(
data
)
{
console
.
log
(
'选中了第'
+
(
data
.
tapIndex
+
1
)
+
'个按钮,第'
+
(
data
.
index
+
1
)
+
'张图片'
)
},
fail
:
function
(
err
)
{
console
.
log
(
err
.
errMsg
)
},
},
})
},
},
},
}
}
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
.cell-card
{
.cell-card
{
width
:
100%
;
width
:
100%
;
height
:
21
0rpx
;
height
:
42
0rpx
;
border-radius
:
16rpx
;
border-radius
:
16rpx
;
background-color
:
#ffffff
;
background-color
:
#ffffff
;
position
:
relative
;
position
:
relative
;
overflow
:
hidden
;
.back-view
{
.back-view
{
position
:
absolute
;
position
:
absolute
;
top
:
0
;
right
:
0
;
height
:
0
;
width
:
100%
;
height
:
100%
;
}
}
.content-view
{
.content-view
{
position
:
relative
;
position
:
relative
;
margin-top
:
8rpx
;
.top-view
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
height
:
136rpx
;
font-size
:
40rpx
;
font-weight
:
bold
;
padding
:
0
32rpx
;
.title-view
{
}
}
.name-view
{
margin
:
24rpx
32rpx
0rpx
32rpx
;
font-size
:
28rpx
;
color
:
#333333
;
font-weight
:
bold
;
}
.info-view
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
flex-start
;
padding
:
24rpx
32rpx
36rpx
32rpx
;
.left-view
{
.item-view
{
display
:
flex
;
align-items
:
flex-start
;
color
:
#333333
;
font-size
:
24rpx
;
margin-top
:
8rpx
;
.label-view
{
width
:
74rpx
;
flex-shrink
:
0
;
}
.value-view
{
}
}
}
}
.right-view
{
width
:
120rpx
;
height
:
120rpx
;
margin-left
:
50rpx
;
flex-shrink
:
0
;
}
.top-blue
{
margin-top
:
40rpx
;
.title-blue
{
color
:
#2d60e7
;
}
}
.name-black
{
padding-top
:
24rpx
;
}
}
.bottom-view
{
background-color
:
#354255
;
position
:
absolute
;
bottom
:
0
;
right
:
0
;
left
:
0
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
height
:
136rpx
;
font-size
:
40rpx
;
font-weight
:
bold
;
padding
:
0
32rpx
;
color
:
#ffffff
;
text-align
:
center
;
}
}
}
}
</
style
>
</
style
>
components/cell-relation/index.vue
0 → 100644
View file @
feb2c1d4
<
template
>
<view
class=
"cell-relation"
>
<view
class=
"content-view"
>
<view
class=
"left-view"
@
click=
"$u.throttle(handleClickMember, 500)"
>
<image
mode=
"aspectFill"
:src=
"member.avatar || defaultImage"
class=
"image-view"
></image>
<view
class=
"name-view"
>
{{
member
.
nickname
}}
</view>
</view>
<!--
<view
class=
"text-view"
>
{{
member
.
business
}}
</view>
-->
<view
class=
"time-view"
>
{{
member
.
createTime
}}
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
props
:
{
member
:
{
type
:
Object
,
default
()
{
return
{}
},
},
bottomBorder
:
{
type
:
Boolean
,
default
:
false
}
},
data
()
{
return
{}
},
computed
:
{
baseUrl
()
{
return
process
.
uniEnv
.
qn_base_url
},
defaultImage
()
{
return
this
.
baseUrl
+
'toxuiang@3x.png'
},
},
created
()
{},
methods
:
{
handleClickMember
()
{
this
.
$emit
(
'click'
,
this
.
member
)
},
},
}
</
script
>
<
style
scoped
lang=
"scss"
>
.cell-relation
{
padding
:
0
24rpx
;
background-color
:
#2D3340
;
.content-view
{
height
:
100rpx
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
font-size
:
26rpx
;
color
:
#ffffff
;
.left-view
{
display
:
flex
;
align-items
:
center
;
flex-shrink
:
0
;
width
:
260rpx
;
.image-view
{
width
:
48rpx
;
height
:
48rpx
;
border-radius
:
50%
;
background-color
:
#ffffff
;
}
.name-view
{
margin-left
:
16rpx
;
width
:
176rpx
;
flex-shrink
:
0
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
}
// .text-view {
// width: 120rpx;
// flex-shrink: 0;
// }
.time-view
{
flex
:
1
;
text-align
:
right
;
}
}
}
</
style
>
pages/card/index.vue
View file @
feb2c1d4
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
</view>
</view>
<template
v-else
>
<template
v-else
>
<view
class=
"card-content"
>
<view
class=
"card-content"
>
<Card
:info=
"info.card"
/>
</view>
</view>
<view
class=
"tool-view"
>
<view
class=
"tool-view"
>
<view
<view
...
@@ -68,11 +69,15 @@
...
@@ -68,11 +69,15 @@
<
script
>
<
script
>
import
NavbarRight
from
'@/components/navbar-right'
import
NavbarRight
from
'@/components/navbar-right'
import
NoData
from
'@/components/no-data'
import
NoData
from
'@/components/no-data'
import
Card
from
'@/components/cell-card'
import
CellRelation
from
'@/components/cell-relation'
export
default
{
export
default
{
components
:
{
components
:
{
NavbarRight
,
NavbarRight
,
NoData
,
NoData
,
Card
,
CellRelation
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -121,7 +126,9 @@ export default {
...
@@ -121,7 +126,9 @@ export default {
call
:
'0'
,
call
:
'0'
,
address
:
'2'
,
address
:
'2'
,
card
:
{
card
:
{
name
:
'a'
,
type
:
'green'
,
title
:
'扳手专业品牌家电维修'
,
name
:
'小扳手'
,
address
:
address
:
'dfsafdsafdasf发撒范德萨范德萨发的范德萨范大师傅的范德萨范大事发声的范德萨范德萨发撒发'
,
'dfsafdsafdasf发撒范德萨范德萨发的范德萨范大师傅的范德萨范大事发声的范德萨范德萨发撒发'
,
phone
:
'131231241314'
,
phone
:
'131231241314'
,
...
...
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