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
eb8d0e9b
Commit
eb8d0e9b
authored
Jan 17, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发布动态增加了完善个人资料的条件
parent
ac8f281c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
119 additions
and
5 deletions
+119
-5
article.vue
pages/tab/article.vue
+119
-5
No files found.
pages/tab/article.vue
View file @
eb8d0e9b
...
@@ -39,12 +39,29 @@
...
@@ -39,12 +39,29 @@
</swiper-item>
</swiper-item>
</swiper>
</swiper>
<login
@
change=
"getToLogin"
:isLoginPop=
"isLoginPop"
class=
"my-select"
></login>
<login
@
change=
"getToLogin"
:isLoginPop=
"isLoginPop"
class=
"my-select"
></login>
<!-- 完善个人信息弹窗-->
<u-popup
u-popup
:show=
"tipsShow"
mode=
"center"
round=
"12"
:safeAreaInsetBottom=
"false"
>
<view
class=
"popup-container"
>
<image
class=
"pop-bgc"
:src=
"baseUrl+'/common/home-pop-bg.png'"
></image>
<view
class=
"div-popo"
>
<view
class=
"pop-title"
>
温馨提示
</view>
<view
class=
"tips-content"
>
完善个人资料后,才可以进行发布
</view>
<view
class=
"btn-c"
>
<view
class=
"pop-btn agree"
@
click=
"handAgree"
>
前往完善
</view>
<view
class=
"pop-btn"
@
click=
"handleNoAgree"
>
暂不完善
</view>
</view>
</view>
</view>
</u-popup>
</z-paging-swiper>
</z-paging-swiper>
</template>
</template>
<
script
>
<
script
>
import
ListVue
from
'../components/article/List.vue'
;
import
ListVue
from
'../components/article/List.vue'
;
import
login
from
'../../components/login/login.vue'
;
import
login
from
'../../components/login/login.vue'
;
import
{
userDetail
}
from
"../../api/user"
;
export
default
{
export
default
{
options
:
{
options
:
{
styleIsolation
:
'shared'
styleIsolation
:
'shared'
...
@@ -55,6 +72,8 @@
...
@@ -55,6 +72,8 @@
},
},
data
()
{
data
()
{
return
{
return
{
//完善个人资料提示弹窗
tipsShow
:
false
,
//图片路径
//图片路径
baseUrl
:
this
.
$IMG_URL
,
baseUrl
:
this
.
$IMG_URL
,
//tab标签
//tab标签
...
@@ -101,16 +120,48 @@
...
@@ -101,16 +120,48 @@
},
},
//发布动态按钮
//发布动态按钮
publishArticle
(
path
)
{
publishArticle
(
path
)
{
if
(
uni
.
getStorageSync
(
'userInfo'
)
!=
''
)
{
const
token
=
uni
.
getStorageSync
(
'token'
)
//已登录
const
userInfo
=
uni
.
getStorageSync
(
'userInfo'
)
uni
.
navigateTo
({
if
(
token
!=
''
)
{
url
:
'/pagesArticle/publishArticle'
//已登录 判断授权
})
if
(
userInfo
&&
userInfo
.
wxNickName
!==
''
&&
userInfo
.
wxNickName
!=
null
)
{
//已授权过
//判断是否完善个人资料 完善之后才可发布动态
userDetail
(
userInfo
.
memberId
).
then
(
res
=>
{
const
memInfo
=
res
.
data
.
data
if
(
memInfo
.
memNickName
!=
null
&&
memInfo
.
memNickName
!=
''
&&
memInfo
.
memBirthday
!=
null
&&
memInfo
.
memMaxEducation
!=
null
&&
memInfo
.
memCareer
!=
''
&&
memInfo
.
memCareer
!=
null
&&
memInfo
.
memResidenceProvince
!=
null
&&
memInfo
.
memResidenceCity
!=
null
){
//已完善个人资料 可以发布动态
uni
.
navigateTo
({
url
:
'/pagesArticle/publishArticle'
})
}
else
{
//没完善个人资料 需要去完善
this
.
tipsShow
=
true
}
})
}
else
{
//没授权过,需要授权
uni
.
switchTab
({
url
:
'/pages/tab/index'
});
}
}
else
{
}
else
{
//未登录
//未登录
this
.
isLoginPop
=
true
this
.
isLoginPop
=
true
}
}
},
},
//完善个人信息 确认按钮
handAgree
(){
this
.
tipsShow
=
false
uni
.
navigateTo
({
url
:
'/pagesme/me/updateBasicInformation'
})
},
//完善个人信息 取消按钮
handleNoAgree
(){
this
.
tipsShow
=
false
},
goMessage
()
{
goMessage
()
{
},
},
...
@@ -189,4 +240,67 @@
...
@@ -189,4 +240,67 @@
::v-deep
.u-badge
{
::v-deep
.u-badge
{
font-weight
:
600
;
font-weight
:
600
;
}
}
.popup-container
{
height
:
500rpx
;
width
:
544rpx
;
overflow
:
hidden
;
.div-popo
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
.pop-title
{
color
:
rgba
(
45
,
49
,
50
,
0
.8
);
font-size
:
40rpx
;
font-family
:
'PingFang SC-Heavy, PingFang SC'
;
display
:
flex
;
justify-content
:
center
;
margin-top
:
50rpx
;
}
.tips-content
{
width
:
448rpx
;
margin
:
auto
;
text-align
:
left
;
margin-top
:
50rpx
;
line-height
:
56rpx
;
color
:
#666
;
font-size
:
28rpx
;
font-family
:
'PingFang SC-Regular, PingFang SC'
;
.agreement-btn
{
display
:
inline-block
;
color
:
#5b83e8
;
font-family
:
'PingFang SC-Bold, PingFang SC'
;
text-decoration
:
underline
;
}
}
.btn-c
{
display
:
flex
;
margin
:
auto
;
margin-top
:
64rpx
;
justify-content
:
space-between
;
width
:
428rpx
;
}
}
.pop-btn
{
width
:
204rpx
;
height
:
76rpx
;
border-radius
:
38rpx
;
text-align
:
center
;
line-height
:
76rpx
;
border
:
2rpx
solid
#446cd2
;
color
:
#5b83e8
;
font-family
:
'PingFang SC-Regular, PingFang SC'
;
&
.agree
{
border
:
none
;
background
:
linear-gradient
(
86deg
,
#c2d2f9
0%
,
#c5c2f3
100%
);
}
}
}
</
style
>
</
style
>
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