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
aa0a3845
Commit
aa0a3845
authored
May 29, 2024
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/viitto/pptist
parents
548165f5
62320259
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
131 deletions
+70
-131
App.vue
src/App.vue
+12
-1
vipfooter.png
src/assets/img/vipfooter.png
+0
-0
vipFooter.vue
src/components/home/vipFooter.vue
+43
-125
Index.vue
src/views/Market/Index.vue
+13
-2
Setting.vue
src/views/UserCenter/Setting.vue
+2
-3
No files found.
src/App.vue
View file @
aa0a3845
...
...
@@ -13,7 +13,7 @@ import { injectKeyTemplate } from './types/injectKey';
import
UserServices
from
'./services/UserService'
;
import
WaterMake
from
'./components/WaterMake/Index.vue'
const
{
token
}
=
storeToRefs
(
useUserStore
())
const
{
token
,
userInfo
}
=
storeToRefs
(
useUserStore
())
const
snapshotStore
=
useSnapshotStore
()
const
mainStore
=
useMainStore
()
const
{
databaseId
}
=
storeToRefs
(
mainStore
)
...
...
@@ -47,6 +47,15 @@ const healthCheckHandler = async ()=>{
await
UserServices
.
CollectAsync
()
}
}
const
vipTips
=
()
=>
{
let
Dates
=
new
Date
()
let
y
=
Dates
.
getFullYear
()
let
m
=
Dates
.
getMonth
()
+
1
let
d
=
Dates
.
getDay
()
userInfo
.
value
.
BuyvipTipsDate
=
y
+
'-'
+
(
m
>
9
?
m
:
'0'
+
m
)
+
'-'
+
(
d
>
9
?
d
:
'0'
+
d
)
}
setInterval
(()
=>
{
healthCheckHandler
()
},
1000
*
60
)
...
...
@@ -66,6 +75,8 @@ onMounted(() => {
return
null
;
}
})
// vipTips()
</
script
>
<
style
lang=
"scss"
>
...
...
src/assets/img/vipfooter.png
0 → 100644
View file @
aa0a3845
213 KB
src/components/home/vipFooter.vue
View file @
aa0a3845
<
template
>
<div
class=
"vipFooterBox animate__animated animate__fadeInUp"
@
click=
"goVipIntroduce"
>
<img
class=
"cursor-pointer"
src=
"../../assets//img/vipfooter.png"
/>
<span
class=
"close-btn cursor-pointer column items-center flex-center"
@
click
.
stop=
"OffVip"
><IconClose
:size=
"16"
></IconClose></span>
</div>
</
template
>
<
script
setup
lang=
"ts"
>
import
{
reactive
,
ref
,
inject
,
onMounted
,
watch
}
from
"vue"
;
import
LineService
from
'@/services/LineService'
import
ConfigService
from
'@/services/ConfigService'
import
{
useUserStore
}
from
"@/store/user"
;
import
{
useSellTemplateStore
}
from
'@/store'
import
{
useScreenStore
}
from
"@/store/screen"
;
import
{
storeToRefs
}
from
"pinia"
;
import
{
injectKeyTemplate
}
from
'@/types/injectKey'
import
{
createOpEditorLink
,
createSaleCreateLink
,
managerTemplateLink
}
from
'@/utils/common'
import
{
ElLoading
,
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
{
useRouter
}
from
"vue-router"
;
import
UserCard
from
"@/components/User/UserCard.vue"
;
import
{
Delete
,
View
}
from
'@element-plus/icons-vue'
;
import
{
VIEWPORT_SIZE
,
VIEWPORT_VER_SIZE
}
from
'@/configs/canvas'
import
foote
from
'@/components/footer/index.vue'
;
import
{
noDataImg
}
from
"@/utils/common"
;
const
{
userInfo
}
=
storeToRefs
(
useUserStore
())
const
router
=
useRouter
();
const
scrollContainer
=
ref
<
any
>
()
const
scrollToElement
=
ref
<
any
>
()
const
searchData
=
ref
({}
as
any
)
searchData
.
value
=
inject
(
injectKeyTemplate
)
const
marketStore
=
useScreenStore
()
const
{
market
,
ConfigId
}
=
storeToRefs
(
useScreenStore
())
const
personVisible
=
ref
(
false
)
const
model
=
ref
(
2
)
const
showCurrentTemplate
=
ref
<
any
>
()
const
imgList
=
ref
<
any
>
()
const
datas
=
reactive
({
scrollTop
:
0
,
currentImg
:
0
,
// 当前查看img
})
let
TemplateType
=
0
if
(
router
.
currentRoute
.
value
.
path
==
'/market'
)
model
.
value
=
1
if
(
router
.
currentRoute
.
value
.
path
.
includes
(
'create'
))
{
model
.
value
=
2
if
(
router
.
currentRoute
.
value
.
fullPath
.
indexOf
(
'/ad'
)
!=-
1
)
TemplateType
=
2
else
if
(
router
.
currentRoute
.
value
.
fullPath
.
indexOf
(
'/trip'
)
!=-
1
)
TemplateType
=
1
}
else
if
(
router
.
currentRoute
.
value
.
path
.
includes
(
'op'
))
{
model
.
value
=
0
}
marketStore
.
setModel
(
model
.
value
)
const
props
=
defineProps
({
DetaTem
:{
...
...
@@ -67,95 +27,53 @@ const emit = defineEmits<{
(
event
:
'close'
):
void
,
}
>
()
// 删除监听滚动
const
CloseDetails
=
()
=>
{
const
OffVip
=
()
=>
{
emit
(
'close'
)
// document.querySelector("#scrollId .Details-left").removeEventListener("scroll", handleScroll);
}
const
ToggleImg
=
(
text
:
String
)
=>
{
if
(
text
==
'left'
){
if
(
datas
.
currentImg
>
0
)
{
datas
.
currentImg
--
scrollContainer
.
value
.
scrollTop
=
imgList
.
value
[
datas
.
currentImg
].
imgTop
}
}
if
(
text
==
'right'
){
if
(
datas
.
currentImg
<
imgList
.
value
.
length
-
1
)
{
datas
.
currentImg
++
scrollContainer
.
value
.
scrollTop
=
imgList
.
value
[
datas
.
currentImg
].
imgTop
}
}
}
const
addTemplate
=
(
type
:
number
)
=>
{
const
goVipIntroduce
=
()
=>
{
router
.
push
({
path
:
`/
create_template/
${
type
}
`
path
:
`/
p/show
`
})
}
// 图片滚动翻页
const
handleScroll
=
(
e
)
=>
{
let
temp
=
document
.
querySelector
(
"#scrollId .Details-left"
).
scrollTop
;
let
PageImageList
=
imgList
.
value
for
(
let
i
=
0
;
i
<
PageImageList
.
length
;
i
++
){
if
(
temp
>=
PageImageList
[
i
].
imgTop
&&
datas
.
currentImg
!=
i
)
datas
.
currentImg
=
i
}
}
// 查看所有子模版
const
getTemplate
=
async
(
item
:
any
)
=>
{
if
(
!
item
)
return
if
(
item
.
PageImageList
&&
item
.
PageImageList
.
length
>
0
){
datas
.
currentImg
=
0
datas
.
DetailsVisible
=
true
imgList
.
value
=
[]
let
arrList
=
function
(
list
){
list
.
forEach
(
x
=>
{
imgList
.
value
.
push
({
url
:
x
,
imgTop
:
0
})
})
}
arrList
(
item
.
PageImageList
)
showCurrentTemplate
.
value
=
item
if
(
item
.
PageImageList
.
length
>
1
){
setTimeout
(()
=>
{
for
(
let
i
=
0
;
i
<
imgList
.
value
.
length
;
i
++
){
imgList
.
value
[
i
].
imgTop
=
(
scrollToElement
.
value
[
i
].
offsetHeight
+
30
)
*
i
}
document
.
querySelector
(
"#scrollId .Details-left"
).
addEventListener
(
"scroll"
,
handleScroll
);
},
500
)
}
}
else
{
ElMessage
.
warning
({
showClose
:
true
,
message
:
`当前
${
item
.
TemplateType
==
2
?
'广告'
:
'行程'
}
没有预览信息,请选择其他操作`
,
})
}
}
/**
* 页面跳转
*/
const
goToTemplate
=
(
item
:
any
)
=>
{
let
url
=
''
if
(
model
.
value
==
2
)
url
=
createSaleCreateLink
(
item
.
TempId
,
item
.
TemplateType
)
else
if
(
model
.
value
==
0
&&
router
.
currentRoute
.
value
.
params
.
configId
)
url
=
createOpEditorLink
(
parseInt
(
router
.
currentRoute
.
value
.
params
.
configId
.
toString
()),
item
.
TempId
)
else
if
(
model
.
value
==
1
)
url
=
managerTemplateLink
(
item
.
TempId
,
item
.
TemplateType
)
if
(
url
!=
''
)
{
router
.
push
({
path
:
url
})
}
}
watch
(()
=>
props
.
Details
,()
=>
{
})
</
script
>
<
style
lang=
"scss"
scoped
>
.vipFooterBox
{
position
:
relative
;
position
:
fixed
;
bottom
:
0
;
left
:
0
;
z-index
:
2
;
}
.vipFooterBox
img
{
width
:
100vw
;
height
:
7
.81vw
;
}
.vipFooterBox
.content-item
{
display
:
flex
;
flex-direction
:
row
;
justify-content
:
space-between
;
font-size
:
0
.73vw
;
margin-bottom
:
0
.7vw
;
color
:
#000000
;
}
.vipFooterBox
.close-btn
{
position
:
fixed
;
bottom
:
3
.3vw
;
right
:
5vw
;
width
:
1
.77vw
;
height
:
1
.77vw
;
border
:
2px
solid
#AFAFAF
;
text-align
:
center
;
color
:
#AFAFAF
;
border-radius
:
50%
;
z-index
:
3
;
}
.vipFooterBox
.close-btn
:hover
{
border
:
2px
solid
#fff
;
color
:
#fff
;
}
</
style
>
\ No newline at end of file
src/views/Market/Index.vue
View file @
aa0a3845
...
...
@@ -206,8 +206,8 @@
<!-- 行程、广告图详情 -->
<temDetails
:DetaTem=
"DetailsVisible"
:Details=
"datas.TemDetails"
@
close=
"DetailsVisible=false"
/>
<!-- vip -->
<vipFooter></vipFooter>
<!-- vip
购买提示
-->
<vipFooter
v-if=
"!userInfo.iv&&!userInfo.it&&!userInfo.OpenPrompt"
@
close=
"closeVip"
></vipFooter>
</template>
<
script
setup
lang=
"ts"
>
...
...
@@ -302,6 +302,17 @@ const queryColor = ref({
const
parmas
=
ref
({}
as
any
)
parmas
.
value
=
router
.
currentRoute
.
value
.
params
// 关闭vip购买提示
const
closeVip
=
()
=>
{
userInfo
.
value
.
OpenPrompt
=
true
// let Dates = new Date()
// let y = Dates.getFullYear()
// let m = Dates.getMonth()+1
// let d = Dates.getDay()
// userInfo.value.NewBuyvipTipsDate = y + '-' + (m>9?m:'0'+m) + '-' + (d>9?d:'0'+d)
// console.log(userInfo.value.NewBuyvipTipsDate,'-----------')
}
// 版型 横版 竖版
const
SwitchingVersion
=
(
row
:
Object
)
=>
{
queryObj
.
TempType
=
row
.
Id
...
...
src/views/UserCenter/Setting.vue
View file @
aa0a3845
...
...
@@ -191,10 +191,9 @@ const beforeAvatarUpload=async (res:any)=>{
loadingImg
.
value
=
true
let
filePath
=
"/Upload/User/"
;
let
url
=
await
AliyunUpload
.
UploadAvatar
(
res
,
filePath
);
if
(
url
!=
''
)
{
userInfo
.
value
.
photo
=
url
//
await bindHandler()
await
bindHandler
()
}
}
...
...
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