Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
alumni-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
alumni-show-h5
Commits
ce446023
提交
ce446023
authored
6月 10, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
5da75d0d
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
147 行增加
和
254 行删除
+147
-254
index.js
src/api/index.js
+1
-2
ActivityItem.vue
src/components/ActivityItem.vue
+8
-17
Form.vue
src/components/Form.vue
+0
-0
index.js
src/router/index.js
+4
-0
index.vue
src/views/agreement/index.vue
+11
-0
Index.vue
src/views/my/Index.vue
+38
-42
Form.vue
src/views/my/components/Form.vue
+0
-182
info.vue
src/views/my/info.vue
+85
-11
没有找到文件。
src/api/index.js
浏览文件 @
ce446023
...
@@ -311,4 +311,4 @@ export function getStudentInfo(id) {
...
@@ -311,4 +311,4 @@ export function getStudentInfo(id) {
// 判断资料是否完善
// 判断资料是否完善
export
function
isCompleteInfo
()
{
export
function
isCompleteInfo
()
{
return
httpRequest
.
get
(
`/api/alumni/v1/student/complete/data`
)
return
httpRequest
.
get
(
`/api/alumni/v1/student/complete/data`
)
}
}
\ No newline at end of file
src/components/ActivityItem.vue
浏览文件 @
ce446023
...
@@ -7,27 +7,15 @@
...
@@ -7,27 +7,15 @@
<div
class=
"activity-item-main"
>
<div
class=
"activity-item-main"
>
<div
class=
"activity-item-title"
>
{{
data
.
activity_name
}}
</div>
<div
class=
"activity-item-title"
>
{{
data
.
activity_name
}}
</div>
<div
class=
"activity-item-content"
>
<div
class=
"activity-item-content"
>
<p>
组织名称:
{{
data
.
org_name
}}
</p>
<p>
<p>
{{
data
.
activity_time
|
dateFormat
}}
</p>
组织名称:
<b>
{{
data
.
org_name
}}
</b>
</p>
<p>
{{
data
.
activity_time
}}
</p>
<p>
{{
data
.
activity_city
}}
</p>
<p>
{{
data
.
activity_city
}}
</p>
</div>
</div>
</div>
</div>
<div
class=
"activity-item-status"
v-html=
"statusText"
></div>
<div
class=
"activity-item-status"
v-html=
"statusText"
></div>
</div>
</div>
<!--
<div
class=
"activity-item"
@
click=
"onClick"
>
<div
class=
"activity-item-index"
:class=
"topClass"
v-if=
"showIndex && index
<
3
"
></div>
<div
class=
"activity-item-pic"
>
<img
:src=
"data.activity_image"
v-if=
"data.activity_image"
/>
</div>
<div
class=
"activity-item-main"
>
<div
class=
"activity-item-title"
>
{{
data
.
activity_name
}}
</div>
<div
class=
"activity-item-content"
>
<p>
{{
data
.
activity_city
}}
·
{{
data
.
org_name
}}
·
{{
data
.
stu_nums
}}
人参与
</p>
<p>
{{
data
.
activity_time
|
dateFormat
}}
</p>
</div>
</div>
<div
class=
"activity-item-status"
v-html=
"statusText"
></div>
</div>
-->
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -112,7 +100,10 @@ export default {
...
@@ -112,7 +100,10 @@ export default {
margin-top
:
4px
;
margin-top
:
4px
;
font-size
:
12px
;
font-size
:
12px
;
color
:
#a0a0a0
;
color
:
#a0a0a0
;
line-height
:
18px
;
line-height
:
16px
;
}
b
{
color
:
#1b1b1b
;
}
}
}
}
.activity-item-index
{
.activity-item-index
{
...
...
src/components/Form.vue
浏览文件 @
ce446023
差异被折叠。
点击展开。
src/router/index.js
浏览文件 @
ce446023
...
@@ -254,6 +254,10 @@ const routes = [
...
@@ -254,6 +254,10 @@ const routes = [
path
:
'/vote/apply'
,
path
:
'/vote/apply'
,
name
:
'voteApply'
,
name
:
'voteApply'
,
component
:
()
=>
import
(
'@/views/vote/Apply.vue'
)
component
:
()
=>
import
(
'@/views/vote/Apply.vue'
)
},
{
path
:
'/agreement'
,
component
:
()
=>
import
(
'@/views/agreement/index.vue'
)
}
}
]
]
...
...
src/views/agreement/index.vue
0 → 100644
浏览文件 @
ce446023
<
template
>
<div></div>
</
template
>
<
script
>
export
default
{}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
src/views/my/Index.vue
浏览文件 @
ce446023
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
</li>
</li>
</ul>
</ul>
</div>
</div>
<div
class=
"user"
>
<div
class=
"user"
@
click=
"$router.push(
{ path: '/my/info' })"
>
<div
class=
"user-avatar"
>
<div
class=
"user-avatar"
>
<img
:src=
"user.avatar | avatar"
/>
<img
:src=
"user.avatar | avatar"
/>
</div>
</div>
...
@@ -20,24 +20,24 @@
...
@@ -20,24 +20,24 @@
<div
class=
"user-content__info"
>
{{
user
.
class_name
}}
</div>
<div
class=
"user-content__info"
>
{{
user
.
class_name
}}
</div>
<div
class=
"user-content__info"
>
紫荆币:0
</div>
<div
class=
"user-content__info"
>
紫荆币:0
</div>
</div>
</div>
<van-icon
name=
"arrow"
@
click=
"$router.push(
{ path: '/my/info' })" class="arrow-right"
/>
<van-icon
name=
"arrow"
class=
"arrow-right"
/>
<!--
<div
class=
"user-aside"
>
<!--
<div
class=
"user-aside"
>
<dl
@
click=
"$router.push(
{ name: 'myGroup' })">
<dl
@
click=
"$router.push(
{ name: 'myGroup' })">
<dt>
{{
detail
.
org_stu_total
}}
</dt>
<dt>
{{
detail
.
org_stu_total
}}
</dt>
<dd>
组织
</dd>
<dd>
组织
</dd>
</dl>
</dl>
<dl
@
click=
"$router.push(
{ name: 'myActivity' })">
<dl
@
click=
"$router.push(
{ name: 'myActivity' })">
<dt>
{{
detail
.
act_stu_total
}}
</dt>
<dt>
{{
detail
.
act_stu_total
}}
</dt>
<dd>
活动
</dd>
<dd>
活动
</dd>
</dl>
</dl>
<dl
@
click=
"$router.push(
{ name: 'myApprove' })">
<dl
@
click=
"$router.push(
{ name: 'myApprove' })">
<dt>
<dt>
{{
detail
.
act_check_total
}}
{{
detail
.
act_check_total
}}
<span
class=
"badge"
v-if=
"hasBadge"
></span>
<span
class=
"badge"
v-if=
"hasBadge"
></span>
</dt>
</dt>
<dd>
审批
</dd>
<dd>
审批
</dd>
</dl>
</dl>
</div>
-->
</div>
-->
</div>
</div>
</div>
</div>
<van-tabs
v-model=
"tabActive"
class=
"my-tab"
:ellipsis=
"false"
>
<van-tabs
v-model=
"tabActive"
class=
"my-tab"
:ellipsis=
"false"
>
...
@@ -101,21 +101,6 @@ export default {
...
@@ -101,21 +101,6 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
// 判断资料是否完善
isCompleteInfo
()
{
api
.
isCompleteInfo
().
then
(
response
=>
{
if
(
!
response
.
success
)
{
this
.
$dialog
.
confirm
({
title
:
'提示'
,
message
:
'您的信息不完善,去完善信息'
,
}).
then
(()
=>
{
this
.
$router
.
push
({
path
:
'/my/info'
})
})
.
catch
(()
=>
{
})
}
})
},
onTabClick
(
name
)
{
onTabClick
(
name
)
{
this
.
$router
.
push
({
query
:
{
tab
:
name
}
})
this
.
$router
.
push
({
query
:
{
tab
:
name
}
})
},
},
...
@@ -123,24 +108,35 @@ export default {
...
@@ -123,24 +108,35 @@ export default {
getDetail
()
{
getDetail
()
{
api
.
getMy
().
then
(
response
=>
{
api
.
getMy
().
then
(
response
=>
{
this
.
detail
=
response
this
.
detail
=
response
if
(
!
parseInt
(
this
.
detail
.
information_status
)
===
0
)
{
})
if
(
!
window
.
sessionStorage
.
isCompleteInfoShow
)
{
},
window
.
sessionStorage
.
isCompleteInfoShow
=
1
// 判断资料是否完善
this
.
$dialog
.
confirm
({
isCompleteInfo
()
{
const
hasCompleteTips
=
window
.
localStorage
.
getItem
(
'hasCompleteTips'
,
true
)
if
(
hasCompleteTips
)
{
return
}
api
.
isCompleteInfo
().
then
(
response
=>
{
if
(
!
response
.
success
)
{
this
.
$dialog
.
confirm
({
title
:
'提示'
,
title
:
'提示'
,
message
:
'您的信息不完善,去完善信息'
,
message
:
'您的信息不完整,请先完善信息'
}).
then
(()
=>
{
})
.
then
(()
=>
{
window
.
localStorage
.
setItem
(
'hasCompleteTips'
,
true
)
this
.
$router
.
push
({
path
:
'/my/info'
})
this
.
$router
.
push
({
path
:
'/my/info'
})
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
window
.
localStorage
.
setItem
(
'hasCompleteTips'
,
true
)
})
})
}
}
}
})
})
}
}
},
},
beforeMount
()
{
beforeMount
()
{
this
.
getDetail
()
this
.
getDetail
()
this
.
isCompleteInfo
()
}
}
}
}
</
script
>
</
script
>
...
@@ -258,8 +254,8 @@ export default {
...
@@ -258,8 +254,8 @@ export default {
background
:
rgba
(
255
,
103
,
103
,
1
);
background
:
rgba
(
255
,
103
,
103
,
1
);
border-radius
:
50%
;
border-radius
:
50%
;
}
}
.arrow-right
{
.arrow-right
{
font-size
:
.24rem
;
font-size
:
0
.24rem
;
color
:
#fff
;
color
:
#fff
;
}
}
</
style
>
</
style
>
src/views/my/components/Form.vue
deleted
100644 → 0
浏览文件 @
5da75d0d
<
template
>
<div>
<van-form
@
submit=
"onSubmit"
>
<template
v-for=
"(item, index) in fields"
>
<template
v-if=
"item.type === 'select'"
>
<div
class=
"van-cell van-field"
:key=
"index"
>
<div
class=
"van-cell__title van-field__label"
>
<span>
{{
item
.
label
}}
</span>
</div>
<div
class=
"van-cell__value van-field__value"
>
<div
class=
"van-field__body"
>
<input
v-model=
"form[item.name]"
:placeholder=
"item.placeholder"
/>
<select
v-model=
"form[item.name]"
class=
"div-select van-field__control"
>
<option
disabled
selected
v-if=
"item.placeholder"
>
{{
item
.
placeholder
}}
</option>
<option
v-for=
"option in item.values"
:value=
"option[item.valueKey] || option.name"
:key=
"option.name"
>
{{
option
.
text
}}
</option>
</select>
</div>
</div>
</div>
</
template
>
<
template
v-else-if=
"item.type === 'textarea'"
>
<van-field
:key=
"index"
v-model=
"form[item.name]"
rows=
"2"
:label=
"item.label"
type=
"textarea"
:placeholder=
"item.placeholder"
/>
</
template
>
<
template
v-else-if=
"item.type === 'uploader'"
>
<van-field
:key=
"index"
:border=
"false"
:required=
"false"
v-model=
"form[item.name]"
>
<template
#
label
>
{{
item
.
label
}}
<div
class=
"form-item__tips"
v-if=
"item.tips"
>
{{
item
.
tips
}}
</div>
</
template
>
<
template
#
input
>
<upload
v-model=
"form[item.name]"
v-bind=
"item"
:max-count=
"1"
/>
</
template
>
</van-field>
</template>
<
template
v-else
>
<van-field
:disabled=
"item.disabled || false"
:key=
"index"
v-model=
"form[item.name]"
:label=
"item.label"
:placeholder=
"item.placeholder"
/>
</
template
>
</template>
<div
class=
"agree-change"
@
click=
"agreeChange"
>
<van-icon
:name=
"!isAgree ? 'circle' : 'passed'"
:class=
"!isAgree ? 'icon' : 'active'"
/>
<div
class=
"text"
>
我承诺以上信息真实有效,同意遵守
<a
href=
"/"
>
《i紫荆用户协议》
</a>
。
</div>
</div>
<div
style=
"margin: 16px;"
>
<van-button
class=
"btns"
round
block
type=
"info"
native-type=
"submit"
>
提交
</van-button>
</div>
</van-form>
</div>
</template>
<
script
>
import
*
as
api
from
'@/api/index'
import
Upload
from
'@/components/Upload'
export
default
{
components
:
{
Upload
},
props
:
{
fields
:
{
type
:
Array
}
},
data
()
{
return
{
isAgree
:
false
,
form
:
{},
columns
:
[
'11'
,
'22'
]
}
},
mounted
()
{
this
.
getDetail
()
// this.isAgreement()
},
methods
:
{
onSubmit
()
{
if
(
!
this
.
isAgree
)
{
this
.
$notify
({
type
:
'warning'
,
message
:
'请勾选用户协议'
})
return
false
}
api
.
studenUpdate
(
this
.
form
)
.
then
(
response
=>
{
this
.
$notify
({
type
:
'primary'
,
message
:
response
.
message
})
})
.
catch
(()
=>
{
})
console
.
log
(
this
.
form
)
},
// 获取我的详情
getDetail
()
{
api
.
getMy
().
then
(
response
=>
{
api
.
getStudentInfo
(
response
.
user
.
id
).
then
(
response
=>
{
this
.
form
=
response
})
})
},
// 勾选协议
agreeChange
()
{
this
.
isAgree
=
!
this
.
isAgree
if
(
this
.
isAgree
)
{
api
.
agreementCheck
()
.
then
(
response
=>
{
console
.
log
(
response
)
})
.
catch
(()
=>
{
})
}
}
// // 判断是否勾选
// isAgreement() {
// api
// .isAgreementCheck()
// .then(response => {
// response.success === 1 && (this.isAgree = true)
// })
// .catch(() => {
// })
// }
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.div-select
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
}
.btns
{
width
:
2rem
;
height
:
.4rem
;
background
:
#AD0440
;
border-radius
:
.2rem
;
font-size
:
.14rem
;
color
:
#FFFFFF
;
border
:
none
;
margin
:
0
auto
;
line-height
:
.4rem
;
}
.agree-change
{
display
:
flex
;
align-items
:
center
;
.icon
{
color
:
rgba
(
160
,
160
,
160
,
1
);
font-size
:
.14rem
;
margin
:
0
.02rem
0
.15rem
;
}
.active
{
color
:
rgba
(
173
,
4
,
64
,
1
);
font-size
:
.14rem
;
margin
:
0
.02rem
0
.15rem
;
}
.text
{
font-size
:
.13rem
;
color
:
#969696
;
a
{
color
:
rgba
(
173
,
4
,
64
,
1
);
}
}
}
</
style
>
src/views/my/info.vue
浏览文件 @
ce446023
<
template
>
<
template
>
<div
class=
"info-box"
>
<div
class=
"info-box"
>
<info-form
:fields=
"fields"
></info-form>
<v-form
ref=
"form"
:model=
"formModel"
:fields=
"fields"
@
submit=
"onSubmit"
className=
"info"
:hasFieldBorder=
"true"
>
<div
class=
"agreement"
>
<van-checkbox
checked-color=
"#ad0440"
v-model=
"isAgree"
@
change=
"agreeChange"
/>
<div
class=
"text"
>
我承诺以上信息真实有效,同意遵守
<router-link
to=
"/agreement"
>
《i紫荆用户协议》
</router-link>
。
</div>
</div>
<input
type=
"button"
value=
"提交"
class=
"submit-button"
@
click=
"handleSubmit"
/>
</v-form>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
infoForm
from
'./components/Form'
import
*
as
api
from
'@/api/index'
import
VForm
from
'@/components/Form'
export
default
{
export
default
{
components
:
{
info
Form
},
components
:
{
V
Form
},
data
()
{
data
()
{
return
{
return
{
isAgree
:
false
,
formModel
:
{},
formModel
:
{},
fields
:
[
fields
:
[
{
{
name
:
'personal_name'
,
name
:
'personal_name'
,
label
:
'用户名'
,
label
:
'用户名'
,
placeholder
:
'请输入用户名'
,
placeholder
:
'请输入用户名'
,
disabled
:
true
readonly
:
true
},
},
{
{
name
:
'city'
,
name
:
'city'
,
...
@@ -36,7 +47,7 @@ export default {
...
@@ -36,7 +47,7 @@ export default {
name
:
'mobile'
,
name
:
'mobile'
,
label
:
'联系方式'
,
label
:
'联系方式'
,
placeholder
:
'请输入联系方式'
,
placeholder
:
'请输入联系方式'
,
disabled
:
true
readonly
:
true
},
},
{
{
name
:
'company'
,
name
:
'company'
,
...
@@ -54,7 +65,7 @@ export default {
...
@@ -54,7 +65,7 @@ export default {
placeholder
:
'请输入生日(月 日)'
placeholder
:
'请输入生日(月 日)'
},
},
{
{
type
:
's
elect'
,
fieldType
:
'nativeS
elect'
,
name
:
'industry'
,
name
:
'industry'
,
label
:
'所在行业'
,
label
:
'所在行业'
,
placeholder
:
'请选择所在行业'
,
placeholder
:
'请选择所在行业'
,
...
@@ -95,19 +106,82 @@ export default {
...
@@ -95,19 +106,82 @@ export default {
placeholder
:
'请输入'
placeholder
:
'请输入'
},
},
{
{
t
ype
:
'uploader'
,
fieldT
ype
:
'uploader'
,
name
:
'avatar'
,
name
:
'avatar'
,
label
:
'个人头像'
,
label
:
'个人头像'
placeholder
:
'请输入客户是谁'
}
}
]
]
}
}
},
mounted
()
{
this
.
getDetail
()
},
methods
:
{
handleSubmit
()
{
this
.
$refs
.
form
.
submit
()
},
onSubmit
(
data
)
{
if
(
!
this
.
isAgree
)
{
this
.
$notify
({
type
:
'warning'
,
message
:
'请勾选用户协议'
})
return
false
}
if
(
data
.
avatar
)
{
const
[
first
=
{
url
:
''
}]
=
data
.
avatar
data
.
avatar
=
first
.
url
}
api
.
studenUpdate
(
data
).
then
(
response
=>
{
this
.
$notify
({
type
:
'primary'
,
message
:
response
.
message
})
})
},
// 获取我的详情
getDetail
()
{
const
userId
=
this
.
$store
.
state
.
user
.
id
api
.
getStudentInfo
(
userId
).
then
(
response
=>
{
this
.
formModel
=
response
})
},
// 勾选协议
agreeChange
(
value
)
{
value
&&
api
.
agreementCheck
()
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.info
-box
{
.info
{
background
:
#fff
;
padding-bottom
:
40px
;
}
}
::v-deep
.van-uploader
{
width
:
0
.6rem
;
height
:
0
.6rem
;
}
::v-deep
.van-uploader__upload
,
::v-deep
.van-uploader__preview-image
{
width
:
0
.6rem
;
height
:
0
.6rem
;
background-color
:
#fff
;
border
:
1px
solid
#bfbfbf
;
}
::v-deep
.van-uploader__upload-icon
{
font-size
:
0
.12rem
;
color
:
#000030
;
}
.submit-button
{
width
:
2rem
;
margin
:
20px
auto
0
;
}
.agreement
{
display
:
flex
;
align-items
:
center
;
padding
:
10px
16px
;
.text
{
margin-left
:
8px
;
font-size
:
12px
;
color
:
#969696
;
a
{
color
:
rgba
(
173
,
4
,
64
,
1
);
}
}
}
</
style
>
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论