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
6a7a5511
Commit
6a7a5511
authored
Jun 24, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复关注 bug
parent
6f4f849b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
72 additions
and
27 deletions
+72
-27
follow.vue
src/components/home/follow.vue
+20
-11
axios.ts
src/configs/axios.ts
+4
-3
menu.ts
src/store/menu.ts
+1
-1
user.ts
src/store/user.ts
+19
-7
Index.vue
src/views/Market/Index.vue
+3
-3
Index.vue
src/views/TemplateCenter/Index.vue
+25
-2
No files found.
src/components/home/follow.vue
View file @
6a7a5511
...
...
@@ -25,6 +25,8 @@
</div>
</div>
</
template
>
<
script
setup
lang=
"ts"
>
...
...
@@ -74,23 +76,23 @@ const RefreshLoading = ref(false)
const
followForm
=
ref
()
const
close
=
()
=>
{
stopTimerHandler
()
stopTimerHandler
(
1
)
emit
(
'close'
)
}
if
(
model
.
value
==
0
&&
ConfigId
.
value
)
params
.
ConfigId
=
ConfigId
.
value
const
beginTimerHandler
=
()
=>
{
queryTimer
.
value
=
setInterval
(
async
()
=>
{
await
userLoginHandler
(
0
)
queryTimer
.
value
=
setInterval
(()
=>
{
userLoginHandler
(
0
)
},
3000
)
}
const
stopTimerHandler
=
async
(
)
=>
{
const
stopTimerHandler
=
(
type
:
any
)
=>
{
if
(
queryTimer
.
value
){
clearInterval
(
queryTimer
.
value
)
queryTimer
.
value
=
null
userLoginHandler
(
1
)
if
(
type
==
1
)
userLoginHandler
(
1
)
}
}
...
...
@@ -111,17 +113,24 @@ const getQrcode = async (type:any) =>{
if
(
type
)
RefreshLoading
.
value
=
false
}
const
userLoginHandler
=
async
(
type
:
any
)
=>
{
const
result
=
await
user
.
setUserWechatLoginAsync
(
scene_id
.
value
,
type
)
const
userLoginHandler
=
async
(
type
:
number
)
=>
{
if
(
type
==
0
&&
!
queryTimer
.
value
)
{
return
}
const
result
=
await
user
.
setUserWechatFollowAsync
(
scene_id
.
value
,
type
)
if
(
result
.
status
==
'SUCCESS'
){
if
(
!
type
)
{
stopTimerHandler
()
if
(
type
==
0
)
{
ElMessage
.
success
({
message
:
'关注成功'
})
stopTimerHandler
()
emit
(
'success'
)
}
}
else
if
(
result
.
status
==
'SCANNING'
)
{
stopTimerHandler
()
emit
(
'success'
)
}
else
if
(
result
.
status
==
'ERROR'
)
{
if
(
!
type
)
{
stopTimerHandler
()
if
(
type
==
0
)
{
stopTimerHandler
(
1
)
loseEffect
.
value
=
true
ElMessage
.
error
({
message
:
'二维码维码已失效,请重新获取'
})
}
...
...
src/configs/axios.ts
View file @
6a7a5511
...
...
@@ -11,12 +11,13 @@ let datas: AxiosResponse
export
enum
ApiResult
{
'SUCCESS'
=
1
,
'
FAILED
'
=
0
,
'
nv
'
=
0
,
'TOKEN_INVALID'
=
10000
,
'TOKEN_ILLEGAL'
=
10001
,
'REMOTE_LOGIN'
=
10010
,
'STATIC_ACCESS'
=
20005
,
'SCANNING_STATE'
=
10008
'SCANNING_STATE'
=
10008
,
'SCANNING_SUCCESS'
=
10002
,
}
export
enum
VipType
{
...
...
@@ -78,7 +79,7 @@ const getErrorCode2text = (response: AxiosResponse): string => {
*/
const
service
=
Axios
.
create
({
// process.env.VUE_APP_API_URL
//'http://reborn.oytour.com/api/common/post'
//'http
s
://reborn.oytour.com/api/common/post'
baseURL
:
process
.
env
.
VUE_APP_API_URL
,
timeout
:
200000
,
headers
:
{
...
...
src/store/menu.ts
View file @
6a7a5511
...
...
@@ -26,7 +26,7 @@ const menus:{menu:Menu,owner:MenuOwner}[] = [
{
menu
:{
name
:
'字体'
,
icon
:
'IconAddText'
,
url
:
'/m/font'
},
owner
:
'M'
},
{
menu
:{
name
:
'账号一览'
,
icon
:
'IconEarth'
,
url
:
'/a'
},
owner
:
'A'
},
{
menu
:{
name
:
'成员管理'
,
icon
:
'IconPeoples'
,
url
:
'/a/u'
},
owner
:
'A'
},
{
menu
:{
name
:
'数据统计'
,
icon
:
'IconDashBoard'
,
url
:
'/a/d'
},
owner
:
'A'
},
//
{menu:{name:'数据统计',icon:'IconDashBoard',url:'/a/d'},owner:'A'},
{
menu
:{
name
:
'水印设置'
,
icon
:
'IconTag'
,
url
:
'/a/w'
},
owner
:
'A'
},
{
menu
:{
name
:
'云盘空间'
,
icon
:
'IconCloudStorage'
,
url
:
'/a/c'
},
owner
:
'A'
},
{
menu
:{
name
:
'订单/发票'
,
icon
:
'IconCurrency'
,
url
:
'/a/order'
},
owner
:
'E'
},
...
...
src/store/user.ts
View file @
6a7a5511
...
...
@@ -20,7 +20,7 @@ const st: StorageLike = {
}
export
interface
UserLoginResult
{
status
:
'ERROR'
|
'CHOSEN'
|
'SUCCESS'
|
'UNSWEPT'
,
status
:
'ERROR'
|
'CHOSEN'
|
'SUCCESS'
|
'UNSWEPT'
|
'SCANNING'
,
verify
:
boolean
,
data
?:
any
[]
}
...
...
@@ -113,11 +113,23 @@ export const useUserStore = defineStore('user', {
this
.
userInfo
.
logo
=
ENTERPRISE_DEFAULT_HEADER
}
},
async
setUserWechatFollowAsync
(
scene_id
:
string
,
islean
:
any
)
{
try
{
let
response
=
await
UserService
.
WechatLoginAsync
(
scene_id
,
islean
)
if
(
response
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
return
{
status
:
'SUCCESS'
}
as
UserLoginResult
}
else
if
(
response
.
data
.
resultCode
==
ApiResult
.
SCANNING_STATE
)
return
{
status
:
'UNSWEPT'
}
as
UserLoginResult
else
if
(
response
.
data
.
resultCode
==
ApiResult
.
SCANNING_SUCCESS
)
return
{
status
:
'SCANNING'
}
as
UserLoginResult
else
if
(
response
.
data
.
resultCode
==
ApiResult
.
nv
)
return
{
status
:
'ERROR'
}
as
UserLoginResult
}
catch
(
error
)
{
}
},
async
setUserWechatLoginAsync
(
scene_id
:
string
,
islean
:
any
)
{
try
{
let
response
=
await
UserService
.
WechatLoginAsync
(
scene_id
,
islean
)
if
(
response
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
if
(
!
Array
.
isArray
(
response
.
data
.
data
)
)
{
if
(
response
.
data
.
data
&&
response
.
data
.
data
.
token
&&
response
.
data
.
data
.
userinfo
)
{
this
.
token
=
response
.
data
.
data
.
token
this
.
userInfo
=
response
.
data
.
data
.
userinfo
if
(
!
this
.
userInfo
.
photo
||
(
!
this
.
userInfo
.
photo
.
includes
(
'http://'
)
&&
!
this
.
userInfo
.
photo
.
includes
(
'https://'
))){
...
...
@@ -126,13 +138,13 @@ export const useUserStore = defineStore('user', {
if
(
!
this
.
userInfo
.
logo
||
(
!
this
.
userInfo
.
logo
.
includes
(
'http://'
)
&&
!
this
.
userInfo
.
logo
.
includes
(
'https://'
))){
this
.
userInfo
.
logo
=
ENTERPRISE_DEFAULT_HEADER
}
return
{
status
:
'SUCCESS'
}
as
UserLoginResult
}
else
{
return
{
status
:
'CHOSEN'
,
data
:
response
.
data
.
data
}
as
UserLoginResult
}
else
{
return
{
status
:
'ERROR'
}
as
UserLoginResult
}
return
{
status
:
'SUCCESS'
}
as
UserLoginResult
}
else
if
(
response
.
data
.
resultCode
==
ApiResult
.
SCANNING_STATE
)
return
{
status
:
'UNSWEPT'
}
as
UserLoginResult
else
return
{
status
:
'ERROR'
}
as
UserLoginResult
else
if
(
response
.
data
.
resultCode
==
ApiResult
.
SCANNING_SUCCESS
)
return
{
status
:
'SCANNING'
}
as
UserLoginResult
else
if
(
response
.
data
.
resultCode
==
ApiResult
.
nv
)
return
{
status
:
'ERROR'
}
as
UserLoginResult
}
catch
(
error
)
{}
return
{
status
:
'ERROR'
}
as
UserLoginResult
},
...
...
src/views/Market/Index.vue
View file @
6a7a5511
...
...
@@ -3,8 +3,8 @@
<div
class=
"Market-fromBj"
></div>
<div
class=
""
>
<div
:class=
"[datas.scrollTop>200?'MarketHeader':'']"
>
<adHeader
v-if=
"!userInfo.iv&&!userInfo.it&&!userInfo.OpenScanCode"
style=
"position: relative;z-index: 2;"
@
close=
"closeScanCode"
@
scanCode=
"isPublicAccount=true"
></adHeader>
<
!--
<
adHeader
v-if=
"!userInfo.iv&&!userInfo.it&&!userInfo.OpenScanCode"
style=
"position: relative;z-index: 2;"
@
close=
"closeScanCode"
@
scanCode=
"isPublicAccount=true"
></adHeader>
-->
<div
class=
"MarketSearch row items-center"
>
<img
class=
"q-pr-36 cusor-pointer"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/pptTD.png"
style=
"height: 28px;"
@
click=
"forwordHandler('/space')"
/>
<div
class=
"row grow Market-select reactive"
>
...
...
@@ -21,7 +21,7 @@
<UserCard
:ScanCode=
"ScanCode"
></UserCard>
</div>
</div>
<div
class=
"relative"
style=
"padding: 0 17px 22px 17px; max-width:1440px; margin:0 auto;z-index:
2
;"
>
<div
class=
"relative"
style=
"padding: 0 17px 22px 17px; max-width:1440px; margin:0 auto;z-index:
1
;"
>
<div
class=
"marketTag-from row"
>
<div
class=
"bg-white rounded text-nowrap marketTag"
>
<div
class=
"column text-small"
>
...
...
src/views/TemplateCenter/Index.vue
View file @
6a7a5511
...
...
@@ -5,7 +5,7 @@
<div
class=
"row items-center q-mb-lg"
>
<span
class=
"fz14 q-pr-md shrink microsoft"
>
关键字:
</span>
<div>
<el-input
class=
"microsoft"
style=
"max-width:
212
px"
v-model=
"queryObj.Title"
placeholder=
"请输入关键字"
clearable
<el-input
class=
"microsoft"
style=
"max-width:
150
px"
v-model=
"queryObj.Title"
placeholder=
"请输入关键字"
clearable
@
keyup
.
enter=
"search"
></el-input>
</div>
</div>
...
...
@@ -90,6 +90,20 @@
/>
</el-select>
</div>
<div
class=
"row items-center q-mb-lg q-pl-lg"
v-if=
"userInfo.isp"
>
<span
class=
"fz14 q-pr-md shrink microsoft"
>
类型:
</span>
<el-select
v-model=
"queryObj.QAuthType"
class=
"ml-1 shrink TemSel microsoft"
placeholder=
"类型"
@
change=
"search()"
>
<!--
<el-option
class=
"microsoft"
key=
""
label=
"不限"
value=
""
/>
-->
<el-option
class=
"microsoft"
v-for=
"item in QAuthTypes"
:key=
"item.ID"
:label=
"`$
{item.Name}`"
:value="item.ID"
/>
</el-select>
</div>
</div>
<div
class=
"row nowrap"
style=
"flex-shrink: 0;width: 205px;"
>
<div>
...
...
@@ -317,6 +331,7 @@ const queryObj = reactive({
TemplateType
:
0
,
//0 不限 1模版 2广告
type
:
0
,
OrderByType
:
1
,
//排序方式
QAuthType
:
''
,
//1-免费,2-VIP,3-私有
})
const
queryColor
=
ref
({
DictKey
:
'Trip_Template_Color'
,
...
...
@@ -324,6 +339,12 @@ const queryColor = ref({
})
const
setTemplateType
=
ref
(
1
)
const
ColorList
=
ref
([])
const
QAuthTypes
=
ref
([
{
Name
:
'免费'
,
ID
:
1
},
{
Name
:
'VIP'
,
ID
:
2
},
{
Name
:
'私有'
,
ID
:
3
},
])
marketStore
.
setModel
(
'1'
)
const
tableScrollHandler
=
()
=>
{
if
(
queryObj
.
pageCount
>
queryObj
.
pageIndex
){
...
...
@@ -759,6 +780,8 @@ getTemplateQuery();
queryTemplateBySearchHandler
();
onMounted
(()
=>
{
if
(
userInfo
.
value
.
isp
)
queryObj
.
QAuthType
=
1
console
.
log
(
userInfo
.
value
.
isp
,
'-----'
)
// marketRef.value.addEventListener("scroll", scrollingHandler);
})
</
script
>
...
...
@@ -1214,6 +1237,6 @@ onMounted(()=>{
line-height
:
42px
;
}
.TemSel
{
width
:
1
2
0px
;
width
:
1
0
0px
;
}
</
style
>
\ No newline at end of file
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