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
bd6059cc
Commit
bd6059cc
authored
Jul 25, 2022
by
刘文虎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.banshouhui.com/liuwenhu/account-book
parents
7dbd2d42
1e160f2a
Pipeline
#2918
canceled with stages
Changes
9
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
351 additions
and
107 deletions
+351
-107
index.js
api/card/index.js
+32
-1
index.vue
components/cell-card-back/index.vue
+4
-3
index.vue
components/cell-card/index.vue
+58
-44
create.vue
pages/card/create.vue
+39
-19
index.vue
pages/card/index.vue
+24
-0
share.vue
pages/card/share.vue
+150
-22
index.vue
pages/index/index.vue
+6
-1
show.vue
pages/maintain-bill/show.vue
+37
-17
config.js
utils/config.js
+1
-0
No files found.
api/card/index.js
View file @
bd6059cc
...
@@ -59,3 +59,34 @@ export async function editBusinessCard(data) {
...
@@ -59,3 +59,34 @@ export async function editBusinessCard(data) {
noLoading
:
true
noLoading
:
true
})
})
}
}
// 拨打电话
export
async
function
operateCall
(
data
)
{
return
request
({
url
:
`/rest/businessCard/call/
${
data
.
businessCardId
}
`
,
method
:
'GET'
,
data
,
noLoading
:
true
})
}
// 查看名片
export
async
function
operateView
(
data
)
{
return
request
({
url
:
`/rest/businessCard/view/
${
data
.
businessCardId
}
`
,
method
:
'GET'
,
data
,
noLoading
:
true
})
}
// 加通讯录
export
async
function
operateJoinList
(
data
)
{
return
request
({
url
:
`/rest/businessCard/joinList/
${
data
.
businessCardId
}
`
,
method
:
'GET'
,
data
,
noLoading
:
true
})
}
components/cell-card-back/index.vue
View file @
bd6059cc
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
</view>
</view>
<view
class=
"content-view"
>
<view
class=
"content-view"
>
<view
v-if=
"info.backTitle"
class=
"title-view"
>
{{
info
.
backTitle
}}
</view>
<view
v-if=
"info.backTitle"
class=
"title-view"
>
{{
info
.
backTitle
}}
</view>
<view
v-if=
"info.backConte
n
t"
class=
"text-view"
>
<view
v-if=
"info.backConte
x
t"
class=
"text-view"
>
<text>
{{
info
.
backConte
n
t
}}
</text>
<text>
{{
info
.
backConte
x
t
}}
</text>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -33,7 +33,7 @@ export default {
...
@@ -33,7 +33,7 @@ export default {
},
},
// green 绿;blue 蓝;black 黑;
// green 绿;blue 蓝;black 黑;
image
()
{
image
()
{
switch
(
this
.
info
.
type
)
{
switch
(
this
.
info
.
coverUrl
)
{
case
'green'
:
case
'green'
:
return
this
.
baseUrl
+
'muban1fanmian@3x.png'
return
this
.
baseUrl
+
'muban1fanmian@3x.png'
case
'blue'
:
case
'blue'
:
...
@@ -85,6 +85,7 @@ export default {
...
@@ -85,6 +85,7 @@ export default {
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#ffffff
;
color
:
#ffffff
;
margin-bottom
:
24rpx
;
margin-bottom
:
24rpx
;
text-align
:
center
;
}
}
}
}
}
}
...
...
components/cell-card/index.vue
View file @
bd6059cc
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
</view>
</view>
<view
class=
"content-view"
>
<view
class=
"content-view"
>
<view
class=
"top-view"
>
<view
class=
"top-view"
>
<view
class=
"title-view"
>
{{
info
.
frontTitle
}}
</view>
<view
class=
"title-view"
>
{{
info
.
frontTitle
}}
</view>
</view>
</view>
<view
class=
"name-view"
>
{{
info
.
name
}}
</view>
<view
class=
"name-view"
>
{{
info
.
name
}}
</view>
<view
class=
"info-view"
>
<view
class=
"info-view"
>
...
@@ -20,12 +20,14 @@
...
@@ -20,12 +20,14 @@
<view
class=
"value-view"
>
{{
info
.
address
}}
</view>
<view
class=
"value-view"
>
{{
info
.
address
}}
</view>
</view>
</view>
</view>
</view>
<view
<view
class=
"right-view"
>
class=
"right-view"
<QRCode
hover-class=
"u-hover-class"
ref=
"qr-code"
@
click=
"$u.throttle(previewQRCode, 500)"
canvas-id=
"qr-code"
>
:value=
"shareUrl"
<image
:src=
"info.qrCode"
></image>
:size=
"size"
@
complete=
"complete"
/>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -33,13 +35,15 @@
...
@@ -33,13 +35,15 @@
<
template
v-else-if=
"isBlue"
>
<
template
v-else-if=
"isBlue"
>
<view
class=
"content-view"
>
<view
class=
"content-view"
>
<view
class=
"top-view top-blue"
>
<view
class=
"top-view top-blue"
>
<view
class=
"title-view title-blue"
>
{{
info
.
frontTitle
}}
</view>
<view
class=
"title-view title-blue"
>
{{
info
.
frontTitle
}}
</view>
<view
<view
class=
"right-view"
>
class=
"right-view"
<QRCode
hover-class=
"u-hover-class"
ref=
"qr-code"
@
click=
"$u.throttle(previewQRCode, 500)"
canvas-id=
"qr-code"
>
:value=
"shareUrl"
<image
:src=
"info.qrCode"
></image>
:size=
"size"
@
complete=
"complete"
/>
</view>
</view>
</view>
</view>
<view
class=
"name-view"
>
{{
info
.
name
}}
</view>
<view
class=
"name-view"
>
{{
info
.
name
}}
</view>
...
@@ -71,24 +75,32 @@
...
@@ -71,24 +75,32 @@
<view
class=
"value-view"
>
{{
info
.
address
}}
</view>
<view
class=
"value-view"
>
{{
info
.
address
}}
</view>
</view>
</view>
</view>
</view>
<view
<view
class=
"right-view"
>
class=
"right-view"
<QRCode
hover-class=
"u-hover-class"
ref=
"qr-code"
@
click=
"$u.throttle(previewQRCode, 500)"
canvas-id=
"qr-code"
>
:value=
"shareUrl"
<image
:src=
"info.qrCode"
></image>
:size=
"size"
@
complete=
"complete"
/>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"bottom-view"
>
<view
class=
"bottom-view"
>
<view
class=
"title-view"
>
{{
info
.
frontTitle
}}
</view>
<view
class=
"title-view"
>
{{
info
.
frontTitle
}}
</view>
</view>
</view>
</
template
>
</
template
>
</view>
</view>
</template>
</template>
<
script
>
<
script
>
import
{
card_share_url
}
from
'@/utils/config.js'
import
QRCode
from
'@/components/Sansnn-uQRCode/components/u-qrcode/u-qrcode.vue'
export
default
{
export
default
{
components
:
{
QRCode
,
},
props
:
{
props
:
{
info
:
{
info
:
{
type
:
Object
,
type
:
Object
,
...
@@ -100,6 +112,7 @@ export default {
...
@@ -100,6 +112,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
loading
:
true
,
loading
:
true
,
size
:
60
,
}
}
},
},
computed
:
{
computed
:
{
...
@@ -110,17 +123,20 @@ export default {
...
@@ -110,17 +123,20 @@ export default {
return
this
.
baseUrl
+
'muban1zhengmian@3x.png'
return
this
.
baseUrl
+
'muban1zhengmian@3x.png'
},
},
isGreen
()
{
isGreen
()
{
return
this
.
info
.
coverUrl
==
'green'
return
this
.
info
.
coverUrl
==
'green'
},
},
isBlue
()
{
isBlue
()
{
return
this
.
info
.
coverUrl
==
'blue'
return
this
.
info
.
coverUrl
==
'blue'
},
},
isBlack
()
{
isBlack
()
{
return
this
.
info
.
coverUrl
==
'black'
return
this
.
info
.
coverUrl
==
'black'
},
shareUrl
()
{
return
card_share_url
+
`?cardId=
${
this
.
info
.
id
}
`
},
},
// green 绿;blue 蓝;black 黑;
// green 绿;blue 蓝;black 黑;
settings
()
{
settings
()
{
switch
(
this
.
info
.
coverUrl
)
{
switch
(
this
.
info
.
coverUrl
)
{
case
'green'
:
case
'green'
:
return
{
return
{
color
:
'#02A074'
,
color
:
'#02A074'
,
...
@@ -137,28 +153,26 @@ export default {
...
@@ -137,28 +153,26 @@ export default {
}
}
},
},
},
},
watch
:
{
methods
:
{
'info.id'
(
val
)
{
previewQRCode
()
{
if
(
val
)
{
uni
.
previewImage
({
this
.
remake
()
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
)
},
},
},
},
methods
:
{
remake
()
{
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'qr-code'
].
remake
()
})
})
},
},
complete
(
e
)
{
if
(
e
.
success
)
{
console
.
log
(
'生成成功'
)
}
else
{
console
.
log
(
'生成失败'
)
}
},
},
},
}
}
</
script
>
</
script
>
...
...
pages/card/create.vue
View file @
bd6059cc
...
@@ -115,6 +115,9 @@
...
@@ -115,6 +115,9 @@
</view>
</view>
</u-form>
</u-form>
</view>
</view>
<view
class=
"loading-view"
v-if=
"loading"
><u-loading
mode=
"flower"
></u-loading
></view>
<view
class=
"bottom-view"
>
<view
class=
"bottom-view"
>
<u-button
<u-button
:custom-style=
"customConFirm"
:custom-style=
"customConFirm"
...
@@ -126,13 +129,14 @@
...
@@ -126,13 +129,14 @@
</u-button>
</u-button>
</view>
</view>
<PopImage
:visible
.
sync=
"visible"
:images=
"currentImages"
/>
<PopImage
:visible
.
sync=
"visible"
:images=
"currentImages"
/>
<u-toast
ref=
"uToast"
/>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
NavbarRight
from
'@/components/navbar-right'
import
NavbarRight
from
'@/components/navbar-right'
import
PopImage
from
'@/components/pop-image'
import
PopImage
from
'@/components/pop-image'
import
{
edit
b
usinessCard
}
from
'@/api/card/index.js'
import
{
edit
BusinessCard
,
getB
usinessCard
}
from
'@/api/card/index.js'
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -253,7 +257,6 @@ export default {
...
@@ -253,7 +257,6 @@ export default {
},
},
canConfirm
()
{
canConfirm
()
{
for
(
var
item
in
this
.
form
)
{
for
(
var
item
in
this
.
form
)
{
console
.
log
(
'------canConfirm------'
,
item
)
if
(
!
this
.
form
[
item
])
{
if
(
!
this
.
form
[
item
])
{
return
false
return
false
}
}
...
@@ -281,14 +284,14 @@ export default {
...
@@ -281,14 +284,14 @@ export default {
var
data
=
res
.
data
var
data
=
res
.
data
if
(
data
)
{
if
(
data
)
{
this
.
form
=
{
this
.
form
=
{
id
:
res
.
id
,
id
:
data
.
id
,
address
:
res
.
data
,
address
:
data
.
address
,
backContext
:
res
.
backContext
,
backContext
:
data
.
backContext
,
backTitle
:
res
.
backTitle
,
backTitle
:
data
.
backTitle
,
coverUrl
:
res
.
coverUrl
,
coverUrl
:
data
.
coverUrl
,
frontTitle
:
res
.
frontTitle
,
frontTitle
:
data
.
frontTitle
,
name
:
res
.
name
,
name
:
data
.
name
,
phone
:
res
.
phone
,
phone
:
data
.
phone
,
}
}
}
}
this
.
loading
=
false
this
.
loading
=
false
...
@@ -297,20 +300,27 @@ export default {
...
@@ -297,20 +300,27 @@ export default {
this
.
loading
=
false
this
.
loading
=
false
})
})
},
},
edit
b
usinessCard
()
{
edit
B
usinessCard
()
{
this
.
buttonLoading
=
true
this
.
buttonLoading
=
true
edit
b
usinessCard
(
this
.
form
)
edit
B
usinessCard
(
this
.
form
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
data
)
{
if
(
res
.
data
)
{
this
.
buttonLoading
=
false
this
.
buttonLoading
=
false
uni
.
$emit
(
'card-refresh'
)
uni
.
$emit
(
'card-refresh'
)
this
.
$refs
.
uToast
.
show
({
title
:
this
.
cardId
?
'编辑成功'
:
'创建成功'
,
type
:
'success'
,
duration
:
1500
,
callback
:
()
=>
{
this
.
$u
.
route
({
this
.
$u
.
route
({
type
:
'back'
,
type
:
'back'
,
})
})
},
})
}
}
})
})
.
catch
((
res
)
=>
{
.
catch
((
res
)
=>
{
this
.
l
oading
=
false
this
.
buttonL
oading
=
false
})
})
},
},
previewTemplate
(
index
)
{
previewTemplate
(
index
)
{
...
@@ -324,7 +334,7 @@ export default {
...
@@ -324,7 +334,7 @@ export default {
this
.
$refs
.
uForm
.
validate
((
valid
)
=>
{
this
.
$refs
.
uForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
console
.
log
(
'验证通过'
)
console
.
log
(
'验证通过'
)
this
.
edit
b
usinessCard
()
this
.
edit
B
usinessCard
()
}
else
{
}
else
{
console
.
log
(
'验证失败'
)
console
.
log
(
'验证失败'
)
}
}
...
@@ -458,5 +468,15 @@ export default {
...
@@ -458,5 +468,15 @@ export default {
font-size
:
32rpx
;
font-size
:
32rpx
;
}
}
}
}
.loading-view
{
width
:
100%
;
background-color
:
transparent
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
top
:
50%
;
left
:
0
;
position
:
fixed
;
}
}
}
</
style
>
</
style
>
pages/card/index.vue
View file @
bd6059cc
...
@@ -106,6 +106,7 @@ import {
...
@@ -106,6 +106,7 @@ import {
getBusinessCardRecord
,
getBusinessCardRecord
,
operateStatistics
,
operateStatistics
,
}
from
'@/api/card/index.js'
}
from
'@/api/card/index.js'
import
{
mapGetters
}
from
'vuex'
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -130,6 +131,7 @@ export default {
...
@@ -130,6 +131,7 @@ export default {
}
}
},
},
computed
:
{
computed
:
{
...
mapGetters
([
'userInfo'
]),
baseUrl
()
{
baseUrl
()
{
return
process
.
uniEnv
.
qn_base_url
return
process
.
uniEnv
.
qn_base_url
},
},
...
@@ -139,6 +141,12 @@ export default {
...
@@ -139,6 +141,12 @@ export default {
noDataImage
()
{
noDataImage
()
{
return
this
.
baseUrl
+
'mingpianwuxinxi@3x.png'
return
this
.
baseUrl
+
'mingpianwuxinxi@3x.png'
},
},
shareTitle
()
{
return
`"
${
this
.
info
.
name
}
"的名片`
},
shareParams
()
{
return
`?cardId=
${
this
.
info
.
id
}
&shareUserId=
${
this
.
userInfo
.
id
}
`
},
infoKeys
()
{
infoKeys
()
{
// {view:浏览;call:拨打电话;list:通讯录},可用值:VIEW,CALL,LIST
// {view:浏览;call:拨打电话;list:通讯录},可用值:VIEW,CALL,LIST
return
[
return
[
...
@@ -291,6 +299,22 @@ export default {
...
@@ -291,6 +299,22 @@ export default {
url
:
'pages/card/create'
,
url
:
'pages/card/create'
,
})
})
},
},
// 朋友圈
onShareTimeline
(
res
)
{
return
{
title
:
this
.
shareTitle
,
path
:
'pages/pages/share'
+
this
.
shareParams
,
// imageUrl: ''
}
},
// 好友
onShareAppMessage
(
res
)
{
return
{
title
:
this
.
shareTitle
,
path
:
'pages/pages/share'
+
this
.
shareParams
,
// imageUrl: ''
}
},
},
},
}
}
</
script
>
</
script
>
...
...
pages/card/share.vue
View file @
bd6059cc
...
@@ -7,9 +7,12 @@
...
@@ -7,9 +7,12 @@
</view>
</view>
<CardBack
:info=
"info"
/>
<CardBack
:info=
"info"
/>
</view>
</view>
<view
class=
"loading-view"
v-if=
"loading"
><u-loading
mode=
"flower"
></u-loading
></view>
<view
class=
"bottom-view"
>
<view
class=
"bottom-view"
>
<view
class=
"left-view"
>
<view
class=
"left-view"
>
<u-button
:custom-style=
"custom
Scan"
@
click=
"handleClickScan
"
>
<u-button
:custom-style=
"custom
Call"
@
click=
"handleClickCall
"
>
<view
class=
"image-view"
>
<view
class=
"image-view"
>
<image
:src=
"bodadianhuaImage"
></image>
<image
:src=
"bodadianhuaImage"
></image>
</view>
</view>
...
@@ -19,7 +22,7 @@
...
@@ -19,7 +22,7 @@
<view
class=
"right-view"
>
<view
class=
"right-view"
>
<u-button
<u-button
:custom-style=
"customConFirm"
:custom-style=
"customConFirm"
@
click=
"handleClickCon
F
irm"
@
click=
"handleClickCon
f
irm"
class=
"confirm-button"
class=
"confirm-button"
>
>
<view
class=
"image-view"
>
<view
class=
"image-view"
>
...
@@ -29,6 +32,7 @@
...
@@ -29,6 +32,7 @@
</u-button>
</u-button>
</view>
</view>
</view>
</view>
<u-toast
ref=
"uToast"
/>
</view>
</view>
</
template
>
</
template
>
...
@@ -36,7 +40,13 @@
...
@@ -36,7 +40,13 @@
import
NavbarRight
from
'@/components/navbar-right'
import
NavbarRight
from
'@/components/navbar-right'
import
Card
from
'@/components/cell-card'
import
Card
from
'@/components/cell-card'
import
CardBack
from
'@/components/cell-card-back'
import
CardBack
from
'@/components/cell-card-back'
import
{
getBusinessCard
,
operateCall
,
operateView
,
operateJoinList
,
}
from
'@/api/card/index.js'
import
{
mapGetters
}
from
'vuex'
export
default
{
export
default
{
components
:
{
components
:
{
NavbarRight
,
NavbarRight
,
...
@@ -47,9 +57,12 @@ export default {
...
@@ -47,9 +57,12 @@ export default {
return
{
return
{
cardId
:
''
,
cardId
:
''
,
info
:
{},
info
:
{},
// shareUserId: '',
loading
:
false
,
}
}
},
},
computed
:
{
computed
:
{
...
mapGetters
([
'userInfo'
]),
baseUrl
()
{
baseUrl
()
{
return
process
.
uniEnv
.
qn_base_url
return
process
.
uniEnv
.
qn_base_url
},
},
...
@@ -59,7 +72,7 @@ export default {
...
@@ -59,7 +72,7 @@ export default {
cunrutongxunluImage
()
{
cunrutongxunluImage
()
{
return
this
.
baseUrl
+
'cunrutongxunlu@3x.png'
return
this
.
baseUrl
+
'cunrutongxunlu@3x.png'
},
},
custom
Scan
()
{
custom
Call
()
{
return
{
return
{
color
:
'transparent'
,
color
:
'transparent'
,
'background-color'
:
'#ffffff'
,
'background-color'
:
'#ffffff'
,
...
@@ -77,32 +90,137 @@ export default {
...
@@ -77,32 +90,137 @@ export default {
width
:
'332rpx'
,
width
:
'332rpx'
,
}
}
},
},
shareTitle
()
{
return
`"
${
this
.
info
.
name
}
"的名片`
},
shareParams
()
{
return
`?cardId=
${
this
.
info
.
id
}
&shareUserId=
${
this
.
userInfo
.
id
}
`
},
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
// 测试数据
// options.cardId = '1551401777033641984'
// if (options && options.shareUserId) {
// this.shareUserId = options.shareUserId
// }
if
(
options
.
q
)
{
// 扫码进的
const
q
=
decodeURIComponent
(
options
.
q
)
this
.
initOptions
(
q
)
}
else
{
if
(
options
&&
options
.
cardId
)
{
if
(
options
&&
options
.
cardId
)
{
this
.
cardId
=
options
.
cardId
this
.
cardId
=
options
.
cardId
}
}
this
.
init
()
}
this
.
getBusinessCard
()
this
.
operateView
()
},
},
onShow
()
{},
onShow
()
{},
methods
:
{
methods
:
{
init
()
{
getCardId
(
q
)
{
var
array
=
q
.
split
(
'?'
)
if
(
array
.
length
>
1
)
{
var
arr
=
array
[
1
].
split
(
'&'
)
for
(
var
item
of
arr
)
{
if
(
item
.
indexOf
(
'cardId='
)
!=
-
1
)
{
this
.
cardId
=
item
.
split
(
'='
)[
1
]
break
}
}
}
},
getBusinessCard
()
{
this
.
loading
=
true
getBusinessCard
()
.
then
((
res
)
=>
{
if
(
res
.
data
)
{
this
.
info
=
res
.
data
}
this
.
loading
=
false
})
.
catch
((
res
)
=>
{
this
.
loading
=
false
})
},
operateCall
()
{
this
.
loading
=
true
operateCall
({
businessCardId
:
this
.
cardId
,
})
.
then
((
res
)
=>
{
this
.
loading
=
false
})
.
catch
((
res
)
=>
{
this
.
loading
=
false
this
.
loading
=
false
this
.
info
=
{
})
type
:
'black'
,
},
title
:
'扳手专业品牌家电维修'
,
operateView
()
{
name
:
'小扳手'
,
this
.
loading
=
true
address
:
operateView
({
'dfsafdsafdasf发撒范德萨范德萨发的范德萨范大师傅的范德萨范大事发声的范德萨范德萨发撒发'
,
businessCardId
:
this
.
cardId
,
phone
:
'131231241314'
,
})
qrCode
:
'http://static-book.kaying.cc/icon/beijing%403x.png'
,
.
then
((
res
)
=>
{
backTitle
:
'范德萨范德萨范德萨范撒地方'
,
this
.
loading
=
false
backContent
:
`家电维修安装、清洗保养服务、二手家电回收\n水电维修服务、家具维保服务、家居清洗美化`
,
})
.
catch
((
res
)
=>
{
this
.
loading
=
false
})
},
operateJoinList
()
{
this
.
loading
=
true
operateJoinList
({
businessCardId
:
this
.
cardId
,
})
.
then
((
res
)
=>
{
this
.
loading
=
false
})
.
catch
((
res
)
=>
{
this
.
loading
=
false
})
},
handleClickCall
()
{
if
(
this
.
info
.
phone
)
{
uni
.
makePhoneCall
({
phoneNumber
:
this
.
info
.
phone
,
})
}
this
.
operateCall
()
},
handleClickConfirm
()
{
uni
.
addPhoneContact
({
nickName
:
this
.
info
.
name
,
mobilePhoneNumber
:
this
.
info
.
phone
,
success
:
()
=>
{
this
.
$refs
.
uToast
.
show
({
title
:
'保存成功'
,
type
:
'success'
,
duration
:
1500
,
callback
:
()
=>
{},
})
},
fail
:
()
=>
{
console
.
log
(
'fail'
)
},
})
this
.
operateJoinList
()
},
// 朋友圈
onShareTimeline
(
res
)
{
return
{
title
:
this
.
shareTitle
,
path
:
'pages/pages/share'
+
this
.
shareParams
,
// imageUrl: ''
}
},
// 好友
onShareAppMessage
(
res
)
{
return
{
title
:
this
.
shareTitle
,
path
:
'pages/pages/share'
+
this
.
shareParams
,
// imageUrl: ''
}
}
},
},
handleClickScan
()
{},
handleClickConfirm
()
{},
},
},
}
}
</
script
>
</
script
>
...
@@ -175,5 +293,15 @@ export default {
...
@@ -175,5 +293,15 @@ export default {
}
}
}
}
}
}
.loading-view
{
width
:
100%
;
background-color
:
transparent
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
top
:
50%
;
left
:
0
;
position
:
fixed
;
}
}
}
</
style
>
</
style
>
pages/index/index.vue
View file @
bd6059cc
...
@@ -266,7 +266,12 @@ export default {
...
@@ -266,7 +266,12 @@ export default {
return
this
.
$u
.
timeFormat
(
new
Date
(
string
).
getTime
(),
'yyyy年mm月'
)
return
this
.
$u
.
timeFormat
(
new
Date
(
string
).
getTime
(),
'yyyy年mm月'
)
},
},
},
},
onLoad
()
{},
onLoad
(
options
)
{
if
(
options
.
q
)
{
const
q
=
decodeURIComponent
(
options
.
q
)
// 获取到二维码原始链接内容
console
.
log
(
q
)
}
},
onShow
()
{
onShow
()
{
console
.
log
(
'----------------'
)
console
.
log
(
'----------------'
)
this
.
userInfo
this
.
userInfo
...
...
pages/maintain-bill/show.vue
View file @
bd6059cc
...
@@ -159,11 +159,7 @@
...
@@ -159,11 +159,7 @@
</view>
</view>
</
template
>
</
template
>
</view>
</view>
<PopQRCode
<PopQRCode
:visible
.
sync=
"visible"
:title=
"shareTitle"
:url=
"shareUrl"
/>
:visible
.
sync=
"visible"
:title=
"shareTitle"
:url=
"shareUrl"
/>
<u-toast
ref=
"uToast"
/>
<u-toast
ref=
"uToast"
/>
</view>
</view>
</template>
</template>
...
@@ -171,21 +167,21 @@
...
@@ -171,21 +167,21 @@
<
script
>
<
script
>
import
NavbarRight
from
'@/components/navbar-right'
import
NavbarRight
from
'@/components/navbar-right'
import
PopQRCode
from
'@/components/pop-qrCode'
import
PopQRCode
from
'@/components/pop-qrCode'
import
{
repairDetail
,
repairSign
}
from
'@/api/maintain/index.js'
import
{
repairDetail
,
repairSign
}
from
'@/api/maintain/index.js'
import
{
mapGetters
}
from
'vuex'
import
{
mapGetters
}
from
'vuex'
import
{
maintain_share_url
}
from
'@/utils/config.js'
;
import
{
maintain_share_url
}
from
'@/utils/config.js'
export
default
{
export
default
{
components
:
{
components
:
{
NavbarRight
,
NavbarRight
,
PopQRCode
PopQRCode
,
},
},
data
()
{
data
()
{
return
{
return
{
billId
:
''
,
billId
:
''
,
info
:
{
info
:
{
settleState
:
{},
settleState
:
{},
sendStatus
:
{}
sendStatus
:
{}
,
},
},
visible
:
false
,
visible
:
false
,
shareUserId
:
''
,
shareUserId
:
''
,
...
@@ -207,7 +203,7 @@ export default {
...
@@ -207,7 +203,7 @@ export default {
return
maintain_share_url
+
this
.
shareParams
return
maintain_share_url
+
this
.
shareParams
},
},
receive
()
{
receive
()
{
return
this
.
shareUserId
&&
(
this
.
shareUserId
!=
this
.
userInfo
.
id
)
return
this
.
shareUserId
&&
this
.
shareUserId
!=
this
.
userInfo
.
id
},
},
isOver
()
{
isOver
()
{
return
this
.
info
.
settleState
.
code
==
'YES'
return
this
.
info
.
settleState
.
code
==
'YES'
...
@@ -322,9 +318,20 @@ export default {
...
@@ -322,9 +318,20 @@ export default {
if
(
options
&&
options
.
billId
)
{
if
(
options
&&
options
.
billId
)
{
this
.
billId
=
options
.
billId
this
.
billId
=
options
.
billId
}
}
if
(
options
.
q
)
{
// 扫码进的
const
q
=
decodeURIComponent
(
options
.
q
)
this
.
initOptions
(
q
)
}
else
{
if
(
options
&&
options
.
billId
)
{
this
.
billId
=
options
.
billId
}
if
(
options
&&
options
.
shareUserId
)
{
if
(
options
&&
options
.
shareUserId
)
{
this
.
shareUserId
=
options
.
shareUserId
this
.
shareUserId
=
options
.
shareUserId
}
}
}
// 测试数据
// 测试数据
// this.billId = '1550685581418168320'
// this.billId = '1550685581418168320'
...
@@ -333,6 +340,20 @@ export default {
...
@@ -333,6 +340,20 @@ export default {
},
},
onShow
()
{},
onShow
()
{},
methods
:
{
methods
:
{
initOptions
(
q
)
{
var
array
=
q
.
split
(
'?'
)
if
(
array
.
length
>
1
)
{
var
arr
=
array
[
1
].
split
(
'&'
)
for
(
var
item
of
arr
)
{
if
(
item
.
indexOf
(
'billId='
)
!=
-
1
)
{
this
.
billId
=
item
.
split
(
'='
)[
1
]
}
if
(
item
.
indexOf
(
'shareUserId='
)
!=
-
1
)
{
this
.
shareUserId
=
item
.
split
(
'='
)[
1
]
}
}
}
},
toMainIndex
()
{
toMainIndex
()
{
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'pages/index/index'
,
url
:
'pages/index/index'
,
...
@@ -377,7 +398,7 @@ export default {
...
@@ -377,7 +398,7 @@ export default {
},
},
repairSign
()
{
repairSign
()
{
this
.
buttonLoading
=
true
this
.
buttonLoading
=
true
repairSign
({
id
:
this
.
billId
})
repairSign
({
id
:
this
.
billId
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
this
.
repairDetail
()
this
.
repairDetail
()
...
@@ -385,8 +406,7 @@ export default {
...
@@ -385,8 +406,7 @@ export default {
title
:
'签收成功'
,
title
:
'签收成功'
,
type
:
'success'
,
type
:
'success'
,
duration
:
1500
,
duration
:
1500
,
callback
:
()
=>
{
callback
:
()
=>
{},
},
})
})
this
.
buttonLoading
=
false
this
.
buttonLoading
=
false
}
}
...
@@ -401,7 +421,7 @@ export default {
...
@@ -401,7 +421,7 @@ export default {
type
:
'switchTab'
,
type
:
'switchTab'
,
})
})
},
},
handleClickScan
(){
handleClickScan
()
{
this
.
visible
=
true
this
.
visible
=
true
},
},
handleClickPreview
(
index
)
{
handleClickPreview
(
index
)
{
...
...
utils/config.js
View file @
bd6059cc
...
@@ -19,6 +19,7 @@ export const UPLOAD_FILE_HOST = process.uniEnv.qn_asset_url; // 服务器用户
...
@@ -19,6 +19,7 @@ export const UPLOAD_FILE_HOST = process.uniEnv.qn_asset_url; // 服务器用户
export
const
maintain_share_url
=
'https://system.banshouhui.com/maintainqrcode'
// pages/maintain-bill/show二维码地址
export
const
maintain_share_url
=
'https://system.banshouhui.com/maintainqrcode'
// pages/maintain-bill/show二维码地址
export
const
index_share_url
=
'https://system.banshouhui.com/indexqrcode'
// pages/index/index二维码地址
export
const
index_share_url
=
'https://system.banshouhui.com/indexqrcode'
// pages/index/index二维码地址
export
const
card_share_url
=
'https://system.banshouhui.com/shareqrcode'
// pages/card/share二维码地址
export
const
whiteList
=
[
'/pages/index/index'
,
'/pages/index/schedule/schedule'
,
'/pages/index/bill/bill'
,
export
const
whiteList
=
[
'/pages/index/index'
,
'/pages/index/schedule/schedule'
,
'/pages/index/bill/bill'
,
'/pages/index/mine/mine'
,
'/pages/login/login'
,
'/pages/login/quick-login/quick-login'
,
'/pages/index/mine/mine'
,
'/pages/login/login'
,
'/pages/login/quick-login/quick-login'
,
...
...
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