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
5391d957
Commit
5391d957
authored
Jan 08, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接了会员详情接口
parent
19b499c3
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
2000 additions
and
95 deletions
+2000
-95
index.js
api/user/index.js
+9
-0
index.js
common/index.js
+29
-0
Item.vue
pages/components/article/Item.vue
+2
-2
activity.vue
pages/tab/activity.vue
+3
-3
index.vue
pages/tab/index.vue
+1
-1
userInfo.vue
pagesUser/userInfo.vue
+70
-86
userList.vue
pagesUser/userList.vue
+4
-2
index.js
store/index.js
+1
-1
options.js
util/options.js
+1881
-0
No files found.
api/user/index.js
View file @
5391d957
...
...
@@ -12,3 +12,12 @@ export function userList(data){
});
}
/**
* 获取用户详情
*/
export
function
userDetail
(
data
){
return
request
({
method
:
"get"
,
url
:
'/app/open/memInfo/detail/'
+
data
,
});
}
common/index.js
0 → 100644
View file @
5391d957
//将字符串日期转换成数字,并且为年月日
export
function
parseDate
(
dateString
)
{
// 假设 dateString 是有效的并且遵循 "YYYY-MM-DD" 格式
var
parts
=
dateString
.
split
(
'-'
);
// 使用split方法分割字符串
return
{
year
:
parseInt
(
parts
[
0
],
10
),
// 将第一部分转换为整数作为年份
month
:
parseInt
(
parts
[
1
],
10
),
// 将第二部分转换为整数作为月份
day
:
parseInt
(
parts
[
2
],
10
)
// 将第三部分转换为整数作为日子
};
}
//通过生日计算年龄
export
function
calculateAge
(
birth_year
,
birth_month
,
birth_day
)
{
const
today_date
=
new
Date
();
const
today_year
=
today_date
.
getFullYear
();
const
today_month
=
today_date
.
getMonth
();
const
today_day
=
today_date
.
getDate
();
var
age
=
today_year
-
birth_year
;
if
(
today_month
<
(
birth_month
-
1
))
{
age
--
;
}
if
(((
birth_month
-
1
)
==
today_month
)
&&
(
today_day
<
birth_day
))
{
age
--
;
}
return
age
;
}
pages/components/article/Item.vue
View file @
5391d957
...
...
@@ -31,9 +31,9 @@
<text
decode=
"true"
style=
"color: #434343;"
>
{{
info
.
information
}}
</text>
</view>
</
template
>
<view
v-else
style=
"height: 100rpx;"
>
<!-- <view v-else style="height: 100rpx;">--
>
</view
>
<!-- </view>--
>
<view
class=
"content"
>
<
template
v-if=
"info.content"
>
<u-read-more
ref=
"uReadMore"
:shadowStyle=
"shadowStyle"
:toggle=
"true"
color=
"#415C9E"
...
...
pages/tab/activity.vue
View file @
5391d957
...
...
@@ -12,7 +12,7 @@
<view
class=
"card"
v-for=
"(item,index) in activityList"
:key=
"index"
@
click=
"gotopage(item)"
>
<view
class=
"contentBody"
>
<view
class=
"leftlist"
>
<image
:src=
"item.
path
"
class=
"leftlistimage"
/>
<image
:src=
"item.
url
"
class=
"leftlistimage"
/>
</view>
<view
class=
"rightlist"
>
<view
class=
"rightlist-title"
>
{{
item
.
title
}}
</view>
...
...
@@ -124,7 +124,7 @@ export default {
}
bannerList
(
query
).
then
(
res
=>
{
//将res.data.rows集合里的bannerPicture取出来,放到集合中 将\替换成/
this
.
bannerList
=
res
.
data
.
data
.
map
(
item
=>
item
.
path
.
replace
(
/
\\
/g
,
'/'
));
this
.
bannerList
=
res
.
data
.
data
.
map
(
item
=>
item
.
url
.
replace
(
/
\\
/g
,
'/'
));
}).
catch
(
e
=>
{
console
.
log
(
e
)
})
...
...
@@ -139,7 +139,7 @@ export default {
console
.
log
(
'res.data.data:'
,
res
.
data
.
data
)
this
.
activityList
=
res
.
data
.
data
.
map
(
item
=>
({
...
item
,
// 复制对象中的所有属性
path
:
item
.
path
!=
null
?
item
.
path
.
replace
(
/
\\
/g
,
'/'
)
:
''
// 替换 avatarUrl 中的所有 \ 为 /
url
:
item
.
url
!=
null
?
item
.
url
.
replace
(
/
\\
/g
,
'/'
)
:
''
// 替换 avatarUrl 中的所有 \ 为 /
}));
}).
catch
(
e
=>
{
console
.
log
(
e
)
...
...
pages/tab/index.vue
View file @
5391d957
...
...
@@ -132,7 +132,7 @@
}
bannerList
(
query
).
then
(
res
=>
{
//将res.data.rows集合里的bannerPicture取出来,放到集合中 将\替换成/
this
.
bannerList
=
res
.
data
.
data
.
map
(
item
=>
item
.
path
.
replace
(
/
\\
/g
,
'/'
));
this
.
bannerList
=
res
.
data
.
data
.
map
(
item
=>
item
.
url
.
replace
(
/
\\
/g
,
'/'
));
}).
catch
(
e
=>
{
console
.
log
(
e
)
})
...
...
pagesUser/userInfo.vue
View file @
5391d957
This diff is collapsed.
Click to expand it.
pagesUser/userList.vue
View file @
5391d957
...
...
@@ -15,8 +15,8 @@
<view
class=
"bottom-left"
>
<view
class=
"bottom-info"
>
{{
item
.
memNickName
}}
<image
v-if=
"item.memSex == '0'"
class=
"gender"
src=
"../static/images/like/male.png
"
mode=
""
/>
<image
v-else
class=
"gender"
src=
"../static/images/like/famale.png
"
mode=
""
/>
<image
v-if=
"item.memSex == '0'"
class=
"gender"
:src=
"baseUrl+'/user/male.png'
"
mode=
""
/>
<image
v-else
class=
"gender"
:src=
"baseUrl+'/user/famale.png'
"
mode=
""
/>
</view>
<view
class=
"bottom-info"
>
{{
18
}}
岁
...
...
@@ -39,6 +39,8 @@ let util = require('@/util/means.js');
export
default
{
data
()
{
return
{
//图片路径
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
//分页查询参数
queryParam
:{
page
:
1
,
...
...
store/index.js
View file @
5391d957
...
...
@@ -6,7 +6,7 @@ Vue.use(Vuex)
const
store
=
new
Vuex
.
Store
({
state
:
{
imgUrl
:
'http://192.168.1.
80
/static/images'
imgUrl
:
'http://192.168.1.
7
/static/images'
//公共的变量,这里的变量不能随便修改,只能通过触发mutations的方法才能改变
},
mutations
:
{
...
...
util/options.js
0 → 100644
View file @
5391d957
This diff is collapsed.
Click to expand it.
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