Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
alumni-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
alumni-show-h5
Commits
5da75d0d
提交
5da75d0d
authored
6月 03, 2021
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
校友圈修改
上级
9c6a9fcd
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
212 行增加
和
23 行删除
+212
-23
index.js
src/api/index.js
+26
-0
ActivityItem.vue
src/components/ActivityItem.vue
+16
-1
Index.vue
src/views/my/Index.vue
+29
-1
Form.vue
src/views/my/components/Form.vue
+118
-15
info.vue
src/views/my/info.vue
+22
-5
vue.config.js
vue.config.js
+1
-1
没有找到文件。
src/api/index.js
浏览文件 @
5da75d0d
...
...
@@ -287,3 +287,28 @@ export function readMessage(id) {
export
function
getPopular
()
{
return
httpRequest
.
get
(
'/api/alumni/v1/organization/recommend'
)
}
// 勾选协议
export
function
agreementCheck
()
{
return
httpRequest
.
post
(
'/api/alumni/v1/student/agreement/check'
)
}
// 判断是否勾选协议
export
function
isAgreementCheck
()
{
return
httpRequest
.
get
(
'/api/alumni/v1/student/agreement/read'
)
}
// 完善资料
export
function
studenUpdate
(
data
)
{
return
httpRequest
.
post
(
'/api/alumni/v1/student/update'
,
data
)
}
// 获取学员信息
export
function
getStudentInfo
(
id
)
{
return
httpRequest
.
get
(
`/api/alumni/v1/student/detail/
${
id
}
`
)
}
// 判断资料是否完善
export
function
isCompleteInfo
()
{
return
httpRequest
.
get
(
`/api/alumni/v1/student/complete/data`
)
}
\ No newline at end of file
src/components/ActivityItem.vue
浏览文件 @
5da75d0d
...
...
@@ -7,12 +7,27 @@
<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
.
org_name
}}
</p>
<p>
{{
data
.
activity_time
|
dateFormat
}}
</p>
<p>
{{
data
.
activity_city
}}
</p>
</div>
</div>
<div
class=
"activity-item-status"
v-html=
"statusText"
></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
>
<
script
>
...
...
src/views/my/Index.vue
浏览文件 @
5da75d0d
...
...
@@ -20,7 +20,7 @@
<div
class=
"user-content__info"
>
{{
user
.
class_name
}}
</div>
<div
class=
"user-content__info"
>
紫荆币:0
</div>
</div>
<
!--
<van-icon
name=
"arrow"
class=
"arrow-right"
/>
--
>
<
van-icon
name=
"arrow"
@
click=
"$router.push(
{ path: '/my/info' })" class="arrow-right"/
>
<!--
<div
class=
"user-aside"
>
<dl
@
click=
"$router.push(
{ name: 'myGroup' })">
<dt>
{{
detail
.
org_stu_total
}}
</dt>
...
...
@@ -101,6 +101,21 @@ export default {
}
},
methods
:
{
// 判断资料是否完善
isCompleteInfo
()
{
api
.
isCompleteInfo
().
then
(
response
=>
{
if
(
!
response
.
success
)
{
this
.
$dialog
.
confirm
({
title
:
'提示'
,
message
:
'您的信息不完善,去完善信息'
,
}).
then
(()
=>
{
this
.
$router
.
push
({
path
:
'/my/info'
})
})
.
catch
(()
=>
{
})
}
})
},
onTabClick
(
name
)
{
this
.
$router
.
push
({
query
:
{
tab
:
name
}
})
},
...
...
@@ -108,6 +123,19 @@ export default {
getDetail
()
{
api
.
getMy
().
then
(
response
=>
{
this
.
detail
=
response
if
(
!
parseInt
(
this
.
detail
.
information_status
)
===
0
)
{
if
(
!
window
.
sessionStorage
.
isCompleteInfoShow
)
{
window
.
sessionStorage
.
isCompleteInfoShow
=
1
this
.
$dialog
.
confirm
({
title
:
'提示'
,
message
:
'您的信息不完善,去完善信息'
,
}).
then
(()
=>
{
this
.
$router
.
push
({
path
:
'/my/info'
})
})
.
catch
(()
=>
{
})
}
}
})
}
},
...
...
src/views/my/components/Form.vue
浏览文件 @
5da75d0d
...
...
@@ -3,12 +3,25 @@
<van-form
@
submit=
"onSubmit"
>
<template
v-for=
"(item, index) in fields"
>
<template
v-if=
"item.type === 'select'"
>
<select
:key=
"index"
v-model=
"form[item.name]"
class=
"van-field__control"
>
<option
value=
""
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
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
...
...
@@ -30,7 +43,6 @@
<template
#
label
>
{{
item
.
label
}}
<div
class=
"form-item__tips"
v-if=
"item.tips"
>
{{
item
.
tips
}}
</div>
<!--
<span
class=
"red"
v-if=
"item.required"
>
*
</span>
-->
</
template
>
<
template
#
input
>
<upload
v-model=
"form[item.name]"
v-bind=
"item"
:max-count=
"1"
/>
...
...
@@ -39,21 +51,28 @@
</template>
<
template
v-else
>
<van-field
:disabled=
"item.disabled || false"
:key=
"index"
v-model=
"form[item.name]"
:label=
"item.label"
:placeholder=
"item.placeholder"
:rules=
"[
{ required: true, message: '请填写用户名' }]"
/>
</
template
>
</template>
<!-- <div style="margin: 16px;">
<van-button round block type="info" native-type="submit">提交</van-button>
</div> -->
<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
},
...
...
@@ -62,18 +81,102 @@ export default {
},
data
()
{
return
{
form
:
{
username
:
''
,
password
:
''
},
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
浏览文件 @
5da75d0d
...
...
@@ -14,7 +14,8 @@ export default {
{
name
:
'personal_name'
,
label
:
'用户名'
,
placeholder
:
'请输入用户名'
placeholder
:
'请输入用户名'
,
disabled
:
true
},
{
name
:
'city'
,
...
...
@@ -34,7 +35,8 @@ export default {
{
name
:
'mobile'
,
label
:
'联系方式'
,
placeholder
:
'请输入联系方式'
placeholder
:
'请输入联系方式'
,
disabled
:
true
},
{
name
:
'company'
,
...
...
@@ -57,9 +59,23 @@ export default {
label
:
'所在行业'
,
placeholder
:
'请选择所在行业'
,
values
:
[
{
name
:
'1'
,
text
:
'地方校友会'
},
{
name
:
'2'
,
text
:
'行业研究会'
},
{
name
:
'3'
,
text
:
'俱乐部'
}
{
name
:
'人工智能/IOT'
,
text
:
'人工智能/IOT'
},
{
name
:
'IT/通信/电子/互联网'
,
text
:
'IT/通信/电子/互联网'
},
{
name
:
'金融业'
,
text
:
'金融业'
},
{
name
:
'医疗/医药/大健康'
,
text
:
'医疗/医药/大健康'
},
{
name
:
'农林牧副渔'
,
text
:
'农林牧副渔'
},
{
name
:
'房地产/建筑'
,
text
:
'房地产/建筑'
},
{
name
:
'贸易/批发/零售/租赁业'
,
text
:
'贸易/批发/零售/租赁业'
},
{
name
:
'材料/新材料'
,
text
:
'材料/新材料'
},
{
name
:
'生产/加工/制造'
,
text
:
'生产/加工/制造'
},
{
name
:
'能源/破产/环保'
,
text
:
'能源/破产/环保'
},
{
name
:
'商业服务'
,
text
:
'商业服务'
},
{
name
:
'服务业'
,
text
:
'服务业'
},
{
name
:
'文体教育/工艺美术'
,
text
:
'文体教育/工艺美术'
},
{
name
:
'文化/传媒/娱乐/体育'
,
text
:
'文化/传媒/娱乐/体育'
},
{
name
:
'政府/非营利机构'
,
text
:
'政府/非营利机构'
},
{
name
:
'交通/运输/物流/仓储'
,
text
:
'交通/运输/物流/仓储'
},
{
name
:
'其他'
,
text
:
'其他'
}
]
},
{
...
...
@@ -93,4 +109,5 @@ export default {
.info-box
{
background
:
#fff
;
}
</
style
>
vue.config.js
浏览文件 @
5da75d0d
...
...
@@ -10,7 +10,7 @@ module.exports = {
},
proxy
:
{
'/api'
:
{
target
:
'https://alumni.ezijing.com'
target
:
'https://alumni
2
.ezijing.com'
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论