Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6c1db84c
authored
Apr 09, 2024
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
弹框组件
1 parent
4e9fc9a5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
135 additions
and
31 deletions
components/MessageBox/index.vue
main.js
pages/home/home.vue
components/MessageBox/index.vue
0 → 100644
View file @
6c1db84
<
template
>
<uni-popup
ref=
"tips"
type=
"center"
:is-mask-click=
"false"
:animation=
"false"
>
<view
class=
"tips-wrapper"
>
<view
class=
"tips-content"
>
<view
class=
"tips-title"
>
{{
title
}}
<view
class=
"icon-close"
@
click=
"close"
>
×
</view>
</view>
<view
class=
"tips-text"
>
{{
content
}}
</view>
</view>
<view
class=
"tips-footer"
>
<view
class=
"tips-btn close"
@
click=
"close()"
>
{{
cancelBtnText
}}
</view>
<view
class=
"tips-btn preview"
@
click=
"confirm()"
>
{{
confirmBtnText
}}
</view>
</view>
</view>
</uni-popup>
</
template
>
<
script
>
export
default
{
name
:
"MessageBox"
,
data
()
{
return
{};
},
props
:
{
title
:
{
type
:
String
,
default
:
"提示"
,
},
content
:
{
type
:
String
,
default
:
"提示"
,
},
confirmBtnText
:
{
type
:
String
,
default
:
"确定"
,
},
cancelBtnText
:
{
type
:
String
,
default
:
"取消"
,
},
},
mounted
()
{
this
.
$refs
.
tips
.
open
(
"center"
);
},
methods
:
{
close
()
{
this
.
$refs
.
tips
.
close
();
this
.
$emit
(
"cancel"
);
},
confirm
()
{
this
.
$refs
.
tips
.
close
();
this
.
$emit
(
"confirm"
);
},
},
};
</
script
>
<
style
scoped
lang=
"scss"
>
.tips-wrapper
{
width
:
704
rpx
;
height
:
372
rpx
;
background
:
#ffffff
;
border-radius
:
20
rpx
;
.tips-content
{
padding
:
48
rpx
;
border-bottom
:
1px
solid
#e8e8e8
;
.tips-title
{
position
:
relative
;
width
:
100%
;
font-weight
:
500
;
font-size
:
32
rpx
;
color
:
#292d33
;
text-align
:
center
;
.icon-close
{
position
:
absolute
;
right
:
0
;
top
:
-24
rpx
;
width
:
160
rpx
;
font-size
:
50
rpx
;
text-align
:
right
;
padding-right
:
20
rpx
;
line-height
:
96
rpx
;
}
}
}
.tips-text
{
font-size
:
30
rpx
;
color
:
#5a5e66
;
letter-spacing
:
1
rpx
;
text-align
:
center
;
line-height
:
40
rpx
;
margin-top
:
48
rpx
;
}
.tips-footer
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
height
:
100
rpx
;
.close
{
color
:
#6c6c70
;
}
.preview
{
color
:
#2c66f7
;
}
}
.tips-btn
{
width
:
50%
;
text-align
:
center
;
font-size
:
32
rpx
;
text-align
:
center
;
line-height
:
44
rpx
;
}
}
</
style
>
main.js
View file @
6c1db84
...
@@ -5,7 +5,9 @@ import store from "@/store";
...
@@ -5,7 +5,9 @@ import store from "@/store";
import
api
from
"./api/index"
;
import
api
from
"./api/index"
;
import
{
Storage
}
from
"./utils/cache/index"
;
import
{
Storage
}
from
"./utils/cache/index"
;
import
GlsxImage
from
"./components/GlsxImage"
;
import
GlsxImage
from
"./components/GlsxImage"
;
import
MessageBox
from
"./components/MessageBox/index"
;
Vue
.
component
(
"GlsxImage"
,
GlsxImage
);
Vue
.
component
(
"GlsxImage"
,
GlsxImage
);
Vue
.
component
(
"MessageBox"
,
MessageBox
);
uni
.
$api
=
api
;
uni
.
$api
=
api
;
uni
.
$storage
=
new
Storage
();
uni
.
$storage
=
new
Storage
();
Vue
.
config
.
productionTip
=
false
;
Vue
.
config
.
productionTip
=
false
;
...
...
pages/home/home.vue
View file @
6c1db84
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
* @Description: 首页
* @Description: 首页
* @Author: huyue
* @Author: huyue
* @Date: 2024-04-07 14:39:40
* @Date: 2024-04-07 14:39:40
* @LastEditors:
huyue
* @LastEditors:
前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-0
8 19:37:16
* @LastEditTime: 2024-04-0
9 14:34:41
-->
-->
<
template
>
<
template
>
<view
class=
"container"
>
<view
class=
"container"
>
...
@@ -61,28 +61,13 @@
...
@@ -61,28 +61,13 @@
</view>
</view>
</view>
</view>
<!-- 未点击开始接待,弹窗 -->
<!-- 未点击开始接待,弹窗 -->
<uni-popup
<MessageBox
ref=
"tips"
v-if=
"messageBoxVisible"
type=
"center"
@
cancel=
"cancel"
:is-mask-click=
"false"
@
confirm=
"confirm"
:animation=
"false"
content=
"直接点击素材可进行预览,若面向车辆主展示,请点击页面下方的「开始接待」"
>
confirmBtnText=
"预览"
<view
class=
"tips-wrapper"
>
></MessageBox>
<view
class=
"tips-content"
>
<view
class=
"tips-title"
>
提示
<view
class=
"icon-close"
@
click=
"close"
>
×
</view>
</view>
<view
class=
"tips-text"
>
直接点击素材可进行预览,若面向车辆主展示,请点击页面下方的「开始接待」
</view
>
</view>
<view
class=
"tips-footer"
>
<view
class=
"tips-btn close"
@
click=
"close()"
>
取消
</view>
<view
class=
"tips-btn preview"
@
click=
"preview()"
>
预览素材
</view>
</view>
</view>
</uni-popup>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -92,6 +77,7 @@ export default {
...
@@ -92,6 +77,7 @@ export default {
mixins
:
[
myClick
],
mixins
:
[
myClick
],
data
()
{
data
()
{
return
{
return
{
messageBoxVisible
:
false
,
moduleList
:
[
moduleList
:
[
{
{
id
:
1
,
id
:
1
,
...
@@ -122,8 +108,8 @@ export default {
...
@@ -122,8 +108,8 @@ export default {
},
},
// 退出
// 退出
logout
()
{
logout
()
{
uni
.
$storage
.
rm
(
'userInfo'
)
uni
.
$storage
.
rm
(
"userInfo"
);
uni
.
$storage
.
rm
(
'sessionId'
)
uni
.
$storage
.
rm
(
"sessionId"
);
this
.
stopAudio
();
this
.
stopAudio
();
uni
.
reLaunch
({
uni
.
reLaunch
({
url
:
"/pages/common/login"
,
url
:
"/pages/common/login"
,
...
@@ -135,17 +121,17 @@ export default {
...
@@ -135,17 +121,17 @@ export default {
url
:
`../detail/detail?id=
${
item
.
id
}
&type=edit`
,
url
:
`../detail/detail?id=
${
item
.
id
}
&type=edit`
,
});
});
}
else
{
}
else
{
this
.
$refs
.
tips
.
open
(
"center"
)
;
this
.
messageBoxVisible
=
true
;
}
}
},
},
c
lose
()
{
c
ancel
()
{
this
.
$refs
.
tips
.
close
()
;
this
.
messageBoxVisible
=
false
;
},
},
preview
()
{
confirm
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`../detail/detail?type=preview`
,
url
:
`../detail/detail?type=preview`
,
});
});
this
.
close
()
this
.
messageBoxVisible
=
false
;
},
},
},
},
};
};
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment