Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pptist
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
viitto
pptist
Commits
4f057847
Commit
4f057847
authored
Jun 24, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 1.4.0
parents
7f9ca70a
1f4d91d5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
94 additions
and
10 deletions
+94
-10
InsufficientDate.vue
src/components/User/InsufficientDate.vue
+71
-0
UserCard.vue
src/components/User/UserCard.vue
+11
-1
common.ts
src/utils/common.ts
+11
-8
Index.vue
src/views/TemplateCenter/Index.vue
+1
-1
No files found.
src/components/User/InsufficientDate.vue
0 → 100644
View file @
4f057847
<
template
>
<div
class=
"InsufficientDate-form animate__animated animate__fadeInDown"
>
<div
class=
"row items-center"
>
<el-icon
color=
"#564bec"
>
<IconAttention
theme=
"multi-color"
size=
"48"
:fill=
"['#564bec' ,'#564bec' ,'#FFF' ,'#43CCF8']"
></IconAttention>
</el-icon>
<div
class=
"col q-pl-md q-pr-lg"
>
<span
class=
"fz14 q-pl-md PingFangSC"
>
您好,您的云服务将于
{{
userInfo
.
expire
}}
正式到期,截止目前仅剩
{{
EndDays
}}
天,到期后将无法正常登录使用、为了保证正常使用,请及时续费!如果已启动付费流程,请忽略此消息。
</span>
<a
class=
"fz14 PingFangSC cursor-pointer"
@
click=
"goRenew"
>
立即续费→
</a>
</div>
<span
class=
"close-btn cursor-pointer column items-center flex-center"
@
click
.
stop=
"Off"
><IconClose
:size=
"16"
></IconClose></span>
</div>
</div>
</
template
>
<
script
setup
lang=
"ts"
>
import
{
ref
,
reactive
}
from
"vue"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
useUserStore
}
from
"@/store"
;
import
{
storeToRefs
}
from
"pinia"
;
import
{
openNewBlank
,
dateDiffer
}
from
"@/utils/common"
;
const
router
=
useRouter
();
const
useUser
=
useUserStore
();
const
{
userInfo
}
=
storeToRefs
(
useUser
);
const
props
=
defineProps
({
DetaTem
:{
type
:
Boolean
,
default
:
false
,
},
Details
:{
type
:
Object
,
default
:
{},
}
})
const
emit
=
defineEmits
<
{
(
event
:
'close'
):
void
,
(
event
:
'scanCode'
):
void
,
}
>
()
if
(
router
.
currentRoute
.
value
.
path
==
'/p/show'
)
emit
(
'close'
)
const
EndDays
=
dateDiffer
(
userInfo
.
value
.
expire
)
const
Off
=
()
=>
{
emit
(
'close'
)
}
const
goRenew
=
()
=>
{
router
.
push
({
path
:
`/p/show`
})
}
</
script
>
<
style
lang=
"scss"
scoped
>
.InsufficientDate-form
{
position
:
fixed
;
left
:
0
;
top
:
0
;
right
:
0
;
background
:
#dedcff
;
border-radius
:
10px
;
padding
:
10px
20px
;
z-index
:
9
;
}
.close-btn
{
text-align
:
center
;
color
:
black
;
border-radius
:
50%
;
z-index
:
3
;
}
.close-btn
:hover
{
color
:
$themeColor
;
}
</
style
>
\ No newline at end of file
src/components/User/UserCard.vue
View file @
4f057847
...
...
@@ -104,21 +104,24 @@
<!-- 创建设计 -->
<temDesign
:addTem=
"addVisible"
@
close=
"addVisible=false"
/>
<OrderReview
v-if=
"orderVisible"
:show-person=
"isShowPerson"
:default-type=
"isShowPerson?1:2"
@
close=
"()=>orderVisible=false"
></OrderReview>
<!-- 关注 -->
<follow
v-show=
"isPublicAccount"
:show=
"isPublicAccount"
@
close=
"isPublicAccount=false"
@
success=
"isPublicAccount=false,getInfo()"
></follow>
<InsufficientDate
v-if=
"EndDays<30&&!userInfo.OffEndDaysTisp"
@
close=
"closeEndDays"
></InsufficientDate>
</template>
<
script
lang=
"ts"
setup
>
import
{
ref
,
reactive
}
from
"vue"
;
import
{
useUserStore
}
from
"@/store"
;
import
{
storeToRefs
}
from
"pinia"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
openNewBlank
}
from
"@/utils/common"
;
import
{
openNewBlank
,
dateDiffer
}
from
"@/utils/common"
;
import
temDesign
from
"@/components/home/temDesign.vue"
;
import
{
EntMemberRight
,
ENT_USER_THEME
,
FreeMemberRight
,
PersonMemberRight
,
VIP_USER_THEME
}
from
"@/configs/customer"
;
import
OrderReview
from
'@/views/components/Order/Review.vue'
import
UserServices
from
"@/services/UserService"
;
import
{
ApiResult
}
from
"@/configs/axios"
;
import
follow
from
"@/components/home/follow.vue"
;
import
InsufficientDate
from
"./InsufficientDate.vue"
;
const
props
=
defineProps
({
size
:
{
...
...
@@ -159,6 +162,13 @@ const TravelDesign = ref({} as any)
const
personalInfor
=
ref
({}
as
any
)
const
EndDays
=
dateDiffer
(
userInfo
.
value
.
expire
)
// 关闭到期提示
const
closeEndDays
=
()
=>
{
userInfo
.
value
.
OffEndDaysTisp
=
true
}
const
goDesNorm
=
()
=>
{
openNewBlank
(
'/d'
)
}
...
...
src/utils/common.ts
View file @
4f057847
...
...
@@ -90,14 +90,17 @@ export const getHtmlPlainText = (html_str:string) => {
}
}
// 计算距离当前多少天
export
const
getDaysBetween
=
(
date1
:
any
,
date2
:
any
)
=>
{
const
ONE_DAY
=
1000
*
60
*
60
*
24
;
// 一天的毫秒数
const
date1Time
=
date1
.
getTime
();
// 获取时间戳
const
date2Time
=
date2
.
getTime
();
const
difference
=
Math
.
abs
(
date1Time
-
date2Time
);
// 获取时间差
return
Math
.
round
(
difference
/
ONE_DAY
);
// 两个日期之间的天数
// 计算距离天数
export
const
dateDiffer
=
(
DateEnd
:
string
)
=>
{
//date1结束时间
let
date1
=
new
Date
(
DateEnd
);
//date2当前时间
let
date2
=
new
Date
();
date1
=
new
Date
(
date1
.
getFullYear
(),
date1
.
getMonth
(),
date1
.
getDate
());
date2
=
new
Date
(
date2
.
getFullYear
(),
date2
.
getMonth
(),
date2
.
getDate
());
const
diff
=
date1
.
getTime
()
-
date2
.
getTime
();
//目标时间减去当前时间
const
diffDate
=
diff
/
(
24
*
60
*
60
*
1000
);
//计算当前时间与结束时间之间相差天数
return
diffDate
}
export
const
dateFormat
=
(
value
:
number
|
string
|
Date
=
Date
.
now
(),
format
=
'YYYY-MM-DD HH:mm:ss'
):
string
=>
{
...
...
src/views/TemplateCenter/Index.vue
View file @
4f057847
...
...
@@ -331,7 +331,7 @@ const queryObj = reactive({
TemplateType
:
0
,
//0 不限 1模版 2广告
type
:
0
,
OrderByType
:
1
,
//排序方式
QAuthType
:
userInfo
.
value
.
isp
?
1
:
''
,
//1-免费,2-VIP,3-私有
QAuthType
:
''
,
//1-免费,2-VIP,3-私有
})
const
queryColor
=
ref
({
DictKey
:
'Trip_Template_Color'
,
...
...
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