Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cust-app
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
李伟
cust-app
Commits
181aea40
Commit
181aea40
authored
Feb 28, 2025
by
罗林杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改查询是否停用
parent
92a318e3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
14 deletions
+43
-14
index.js
api/activity/index.js
+7
-0
Item.vue
pages/components/article/Item.vue
+1
-1
List.vue
pages/components/article/List.vue
+1
-1
article.vue
pages/tab/article.vue
+1
-1
index.vue
pages/tab/index.vue
+1
-1
activityDetail.vue
pagesActivity/activityDetail.vue
+30
-8
articleDetail.vue
pagesArticle/articleDetail.vue
+2
-2
No files found.
api/activity/index.js
View file @
181aea40
...
@@ -38,3 +38,10 @@ export function pay(data) {
...
@@ -38,3 +38,10 @@ export function pay(data) {
}
}
})
})
}
}
export
function
isApplication
(
data
)
{
return
request
({
url
:
'/app/cmsActivity/getActivityIsApplication'
,
method
:
'GET'
,
data
})
}
\ No newline at end of file
pages/components/article/Item.vue
View file @
181aea40
...
@@ -176,7 +176,7 @@
...
@@ -176,7 +176,7 @@
//已登录
//已登录
isStopAccount
().
then
(
res
=>
{
isStopAccount
().
then
(
res
=>
{
//如果flag=0 被禁用了 踢出该用户
//如果flag=0 被禁用了 踢出该用户
if
(
res
.
data
==
'0'
)
{
if
(
res
.
data
.
data
==
'0'
)
{
uni
.
removeStorageSync
(
'userInfo'
)
uni
.
removeStorageSync
(
'userInfo'
)
uni
.
removeStorageSync
(
'token'
)
uni
.
removeStorageSync
(
'token'
)
uni
.
navigateTo
({
uni
.
navigateTo
({
...
...
pages/components/article/List.vue
View file @
181aea40
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
if
(
token
!=
''
)
{
if
(
token
!=
''
)
{
isStopAccount
().
then
(
res
=>
{
isStopAccount
().
then
(
res
=>
{
//如果flag=0 被禁用了 踢出该用户
//如果flag=0 被禁用了 踢出该用户
if
(
res
.
data
==
'0'
)
{
if
(
res
.
data
.
data
==
'0'
)
{
uni
.
removeStorageSync
(
'userInfo'
)
uni
.
removeStorageSync
(
'userInfo'
)
uni
.
removeStorageSync
(
'token'
)
uni
.
removeStorageSync
(
'token'
)
this
.
isLoginPop
=
true
this
.
isLoginPop
=
true
...
...
pages/tab/article.vue
View file @
181aea40
...
@@ -131,7 +131,7 @@
...
@@ -131,7 +131,7 @@
if
(
token
!=
''
)
{
if
(
token
!=
''
)
{
isStopAccount
().
then
(
res
=>
{
isStopAccount
().
then
(
res
=>
{
//如果flag=0 被禁用了 踢出该用户
//如果flag=0 被禁用了 踢出该用户
if
(
res
.
data
==
'0'
)
{
if
(
res
.
data
.
data
==
'0'
)
{
uni
.
removeStorageSync
(
'userInfo'
)
uni
.
removeStorageSync
(
'userInfo'
)
uni
.
removeStorageSync
(
'token'
)
uni
.
removeStorageSync
(
'token'
)
uni
.
navigateTo
({
uni
.
navigateTo
({
...
...
pages/tab/index.vue
View file @
181aea40
...
@@ -200,7 +200,7 @@
...
@@ -200,7 +200,7 @@
}
else
{
}
else
{
isStopAccount
().
then
(
res
=>
{
isStopAccount
().
then
(
res
=>
{
//如果flag=0 被禁用了 踢出该用户
//如果flag=0 被禁用了 踢出该用户
if
(
res
.
data
==
'0'
)
{
if
(
res
.
data
.
data
==
'0'
)
{
uni
.
removeStorageSync
(
'userInfo'
)
uni
.
removeStorageSync
(
'userInfo'
)
uni
.
removeStorageSync
(
'token'
)
uni
.
removeStorageSync
(
'token'
)
uni
.
navigateTo
({
uni
.
navigateTo
({
...
...
pagesActivity/activityDetail.vue
View file @
181aea40
...
@@ -10,7 +10,8 @@
...
@@ -10,7 +10,8 @@
</view>
</view>
</view>
</view>
<view
class=
"act-bottom"
>
<view
class=
"act-bottom"
>
<view
class=
"act-button"
@
click=
"open"
>
报名
</view>
<view
v-if=
"activityDetail.isApplication == '1' && isApplication == false"
class=
"act-button"
@
click=
"open"
>
报名
</view>
<view
v-else-if=
"activityDetail.isApplication == '1' && isApplication == true"
class=
"act-button"
style=
"background: #999999;"
>
已报名
</view>
</view>
</view>
</view>
</view>
<!-- 报名弹窗 -->
<!-- 报名弹窗 -->
...
@@ -35,14 +36,17 @@
...
@@ -35,14 +36,17 @@
</view>
</view>
</view>
</view>
<view
class=
"buy-num"
>
<view
class=
"buy-num"
>
<view
class=
"buynum-title"
>
购买数量
</view>
<!--
<view
class=
"buynum-title"
>
购买数量
</view>
-->
<view
class=
"buynum-math"
>
<!--
<view
class=
"buynum-math"
>
-->
<view
class=
"num"
>
{{
buynum
}}
</view>
<!--
<view
class=
"num"
>
{{
buynum
}}
</view>
-->
</view>
<!--
</view>
-->
<view
class=
"buy-num-math"
>
<view>
已报名人数:
{{
activityDetail
.
applicationCount
}}
/
{{
activityDetail
.
maxApplicationCount
}}
</view>
</view>
</view>
</view>
<view
class=
"all-price"
>
<view
class=
"all-price"
>
<view
class=
"all-money"
>
共计:
<text>
¥
{{
totalprice
}}
</text></view>
<view
class=
"all-money"
>
共计:
<text>
¥
{{
totalprice
}}
</text></view>
<view
class=
"all-button"
@
click=
"submitorder"
>
确认
支付
</view>
<view
class=
"all-button"
@
click=
"submitorder"
>
确认
报名
</view>
</view>
</view>
</view>
</view>
</u-popup>
</u-popup>
...
@@ -50,7 +54,7 @@
...
@@ -50,7 +54,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
activityDetail
,
addApplication
,
pay
}
from
"../api/activity/index.js"
import
{
activityDetail
,
addApplication
,
isApplication
,
pay
}
from
"../api/activity/index.js"
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -61,12 +65,16 @@ import {activityDetail, addApplication, pay} from "../api/activity/index.js"
...
@@ -61,12 +65,16 @@ import {activityDetail, addApplication, pay} from "../api/activity/index.js"
activityId
:
''
,
// 活动id
activityId
:
''
,
// 活动id
buynum
:
1
,
// 购买数量
buynum
:
1
,
// 购买数量
totalprice
:
0
,
//总价
totalprice
:
0
,
//总价
isApplication
:
false
,
}
}
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
this
.
activityId
=
JSON
.
parse
(
options
.
id
)
this
.
activityId
=
JSON
.
parse
(
options
.
id
)
this
.
getActivityDetail
()
},
},
onShow
()
{
this
.
getActivityDetail
()
this
.
getUserInfo
()
},
methods
:
{
methods
:
{
// 获取活动详情
// 获取活动详情
getActivityDetail
(){
getActivityDetail
(){
...
@@ -78,6 +86,19 @@ import {activityDetail, addApplication, pay} from "../api/activity/index.js"
...
@@ -78,6 +86,19 @@ import {activityDetail, addApplication, pay} from "../api/activity/index.js"
'<img style="max-width:100%;height:auto;border-radius: 12px 12px 12px 12px;" '
)
'<img style="max-width:100%;height:auto;border-radius: 12px 12px 12px 12px;" '
)
})
})
},
},
//查询当前用户是否已经报名
getUserInfo
(){
const
form
=
{
activityId
:
this
.
activityId
}
isApplication
(
form
).
then
(
res
=>
{
if
(
res
.
data
.
code
===
200
){
if
(
res
.
data
.
data
==
'1'
){
this
.
isApplication
=
true
}
}
})
},
// 打开报名弹窗
// 打开报名弹窗
open
()
{
open
()
{
const
token
=
uni
.
getStorageSync
(
'token'
)
const
token
=
uni
.
getStorageSync
(
'token'
)
...
@@ -172,6 +193,7 @@ import {activityDetail, addApplication, pay} from "../api/activity/index.js"
...
@@ -172,6 +193,7 @@ import {activityDetail, addApplication, pay} from "../api/activity/index.js"
title
:
'报名成功!'
,
title
:
'报名成功!'
,
icon
:
'none'
icon
:
'none'
})
})
this
.
getUserInfo
()
}
}
}
else
if
(
res
.
data
.
code
!==
200
){
}
else
if
(
res
.
data
.
code
!==
200
){
uni
.
showToast
({
uni
.
showToast
({
...
...
pagesArticle/articleDetail.vue
View file @
181aea40
...
@@ -168,7 +168,7 @@ export default{
...
@@ -168,7 +168,7 @@ export default{
//已登录
//已登录
isStopAccount
().
then
(
res
=>
{
isStopAccount
().
then
(
res
=>
{
//如果flag=0 被禁用了 踢出该用户
//如果flag=0 被禁用了 踢出该用户
if
(
res
.
data
==
'0'
)
{
if
(
res
.
data
.
data
==
'0'
)
{
uni
.
removeStorageSync
(
'userInfo'
)
uni
.
removeStorageSync
(
'userInfo'
)
uni
.
removeStorageSync
(
'token'
)
uni
.
removeStorageSync
(
'token'
)
uni
.
navigateTo
({
uni
.
navigateTo
({
...
@@ -218,7 +218,7 @@ export default{
...
@@ -218,7 +218,7 @@ export default{
//已登录
//已登录
isStopAccount
().
then
(
res
=>
{
isStopAccount
().
then
(
res
=>
{
//如果flag=0 被禁用了 踢出该用户
//如果flag=0 被禁用了 踢出该用户
if
(
res
.
data
==
'0'
)
{
if
(
res
.
data
.
data
==
'0'
)
{
uni
.
removeStorageSync
(
'userInfo'
)
uni
.
removeStorageSync
(
'userInfo'
)
uni
.
removeStorageSync
(
'token'
)
uni
.
removeStorageSync
(
'token'
)
uni
.
navigateTo
({
uni
.
navigateTo
({
...
...
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