Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
user
Overview
Overview
Details
Activity
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
hooloo
mp
user
Commits
9ade4a34
Commit
9ade4a34
authored
Apr 10, 2023
by
songbingqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
区分出两张图片
parent
3eb9bf9e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
4 deletions
+25
-4
components/bocft-popup/bocft-popup.vue
+21
-0
components/bocft-popup/initPopup.js
+2
-2
request/user/index.js
+2
-2
No files found.
components/bocft-popup/bocft-popup.vue
View file @
9ade4a34
<
template
>
<
template
>
<u-popup
:overlayStyle=
"
{'z-index':'10073'}" bgColor="transparent" :show="show" mode="center" @close="close">
<u-popup
:overlayStyle=
"
{'z-index':'10073'}" bgColor="transparent" :show="show" mode="center" @close="close">
<image
mode=
"widthFix"
v-if=
"urlImg&&width&&height"
class=
"empty_icon"
:src=
"urlImg"
:style=
"
{'width':width+'rpx','height':height+'rpx'}">
</image>
<image
mode=
"widthFix"
v-if=
"urlImg&&width&&height"
class=
"empty_icon"
:src=
"urlImg"
:style=
"
{'width':width+'rpx','height':height+'rpx'}">
</image>
<image
mode=
"widthFix"
@
click=
"close"
v-if=
"urlImg&&titleWidth&&titleHeight"
class=
"tititle"
:src=
"buttonImg"
:style=
"
{'width':titleWidth+'rpx','height':titleHeight+'rpx'}">
</image>
</u-popup>
</u-popup>
</
template
>
</
template
>
...
@@ -13,6 +14,9 @@
...
@@ -13,6 +14,9 @@
},
},
urlImg
()
{
urlImg
()
{
return
this
.
$popupStore
.
state
.
url
return
this
.
$popupStore
.
state
.
url
},
buttonImg
()
{
return
this
.
$popupStore
.
state
.
title
}
}
},
},
watch
:{
watch
:{
...
@@ -26,6 +30,17 @@
...
@@ -26,6 +30,17 @@
this
.
height
=
image
.
height
>
wheight
?
wheight
:
image
.
height
this
.
height
=
image
.
height
>
wheight
?
wheight
:
image
.
height
}
}
})
})
},
buttonImg
(
val
)
{
uni
.
getImageInfo
({
src
:
val
,
success
:(
image
)
=>
{
const
wheight
=
uni
.
getSystemInfoSync
().
windowHeight
;
const
wwidth
=
uni
.
getSystemInfoSync
().
windowWidth
;
this
.
titleWidth
=
image
.
width
>
wwidth
?
wwidth
:
image
.
width
this
.
titleHeight
=
image
.
height
>
wheight
?
wheight
:
image
.
height
}
})
}
}
},
},
data
()
{
data
()
{
...
@@ -33,6 +48,8 @@
...
@@ -33,6 +48,8 @@
percent
:
0
,
percent
:
0
,
width
:
0
,
width
:
0
,
height
:
0
,
height
:
0
,
titleWidth
:
0
,
titleHeight
:
0
,
flag
:
false
flag
:
false
};
};
},
},
...
@@ -45,4 +62,7 @@
...
@@ -45,4 +62,7 @@
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.tititle
{
margin
:
80
rpx
auto
;
}
</
style
>
</
style
>
\ No newline at end of file
components/bocft-popup/initPopup.js
View file @
9ade4a34
...
@@ -5,14 +5,14 @@ export default function initPopup(v) {
...
@@ -5,14 +5,14 @@ export default function initPopup(v) {
v
.
prototype
.
$popupStore
=
new
Vuex
.
Store
({
v
.
prototype
.
$popupStore
=
new
Vuex
.
Store
({
state
:
{
state
:
{
show
:
false
,
show
:
false
,
url
:
""
url
:
""
,
title
:
""
},
},
mutations
:
{
mutations
:
{
closePopup
(
state
,
data
)
{
closePopup
(
state
,
data
)
{
state
.
show
=
false
state
.
show
=
false
},
},
showPopup
(
state
,
data
)
{
showPopup
(
state
,
data
)
{
console
.
log
(
data
)
state
=
Object
.
assign
(
state
,
data
)
state
=
Object
.
assign
(
state
,
data
)
state
.
show
=
true
state
.
show
=
true
},
},
...
...
request/user/index.js
View file @
9ade4a34
...
@@ -252,9 +252,9 @@ export default {
...
@@ -252,9 +252,9 @@ export default {
return
uni
.
$u
.
http
return
uni
.
$u
.
http
.
post
(
"/v1/issue/return/user/coupon"
,
params
)
.
post
(
"/v1/issue/return/user/coupon"
,
params
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
const
{
url
,
flag
}
=
res
.
data
.
data
const
{
url
,
flag
,
title
}
=
res
.
data
.
data
if
(
flag
===
1
)
{
if
(
flag
===
1
)
{
context
.
showPopup
({
url
:
url
});
context
.
showPopup
({
url
:
url
,
title
:
title
});
}
}
return
res
;
return
res
;
})
})
...
...
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