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
7db0d8c6
Commit
7db0d8c6
authored
Jan 17, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了bug
parent
3918d90d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
67 additions
and
61 deletions
+67
-61
index.js
api/activity/index.js
+1
-1
Item.vue
pages/components/article/Item.vue
+0
-3
index.vue
pages/tab/index.vue
+15
-5
activityDetail.vue
pagesActivity/activityDetail.vue
+7
-9
articleDetail.vue
pagesArticle/articleDetail.vue
+39
-29
publishArticle.vue
pagesArticle/publishArticle.vue
+5
-14
No files found.
api/activity/index.js
View file @
7db0d8c6
...
@@ -20,7 +20,7 @@ export function activityDetail(id) {
...
@@ -20,7 +20,7 @@ export function activityDetail(id) {
//报名
//报名
export
function
addApplication
(
data
)
{
export
function
addApplication
(
data
)
{
return
request
({
return
request
({
url
:
'/
cmsApplication
/add'
,
url
:
'/
app/order
/add'
,
method
:
'POST'
,
method
:
'POST'
,
data
data
})
})
...
...
pages/components/article/Item.vue
View file @
7db0d8c6
...
@@ -33,9 +33,6 @@
...
@@ -33,9 +33,6 @@
</text>
</text>
</view>
</view>
</
template
>
</
template
>
<!-- <view v-else style="height: 100rpx;">-->
<!-- </view>-->
<view
class=
"content"
>
<view
class=
"content"
>
<
template
v-if=
"info.content"
>
<
template
v-if=
"info.content"
>
<u-read-more
ref=
"uReadMore"
:toggle=
"true"
color=
"#415C9E"
<u-read-more
ref=
"uReadMore"
:toggle=
"true"
color=
"#415C9E"
...
...
pages/tab/index.vue
View file @
7db0d8c6
...
@@ -79,6 +79,7 @@
...
@@ -79,6 +79,7 @@
import
{
bannerList
}
from
'../../api/banner/index'
import
{
bannerList
}
from
'../../api/banner/index'
import
{
userList
}
from
'../../api/user/index'
import
{
userList
}
from
'../../api/user/index'
import
{
getCity
}
from
"../../common/options"
;
import
{
getCity
}
from
"../../common/options"
;
import
{
getOssUrl
}
from
"../../api/article"
;
export
default
{
export
default
{
components
:
{
components
:
{
LsSwiper
LsSwiper
...
@@ -117,11 +118,20 @@
...
@@ -117,11 +118,20 @@
}
}
userList
(
query
).
then
(
res
=>
{
userList
(
query
).
then
(
res
=>
{
// 假设 res.data.data 是从服务器接收到的数据
// 假设 res.data.data 是从服务器接收到的数据
this
.
userList
=
res
.
data
.
data
.
map
(
item
=>
({
res
.
data
.
data
.
forEach
(
item
=>
{
...
item
,
// 复制对象中的所有属性
//处理头像
avatarUrl
:
item
.
avatarUrl
!=
null
?
item
.
avatarUrl
.
replace
(
/
\\
/g
,
'/'
)
:
''
,
// 替换 avatarUrl 中的所有 \ 为 /
if
(
item
.
avatar
!=
null
){
city
:
getCity
(
item
.
memResidenceProvince
,
item
.
memResidenceCity
)
getOssUrl
(
item
.
avatar
).
then
(
res
=>
{
}));
item
.
avatarUrl
=
res
.
data
.
data
})
}
//处理城市
if
(
item
.
memResidenceProvince
!=
null
&&
item
.
memResidenceProvince
!=
''
&&
item
.
memResidenceCity
!=
null
&&
item
.
memResidenceCity
!=
''
){
item
.
city
=
getCity
(
item
.
memResidenceProvince
,
item
.
memResidenceCity
)
console
.
log
(
item
.
city
)
}
});
this
.
userList
=
res
.
data
.
data
}).
catch
(
e
=>
{
}).
catch
(
e
=>
{
console
.
log
(
e
)
console
.
log
(
e
)
})
})
...
...
pagesActivity/activityDetail.vue
View file @
7db0d8c6
...
@@ -102,13 +102,12 @@
...
@@ -102,13 +102,12 @@
},
},
// 提交订单
// 提交订单
submitorder
()
{
submitorder
()
{
const
applyParams
=
{
const
params
=
{
activityId
:
this
.
activityDetail
.
businessId
,
goodsId
:
this
.
activityDetail
.
businessId
,
status
:
'1'
,
num
:
'1'
,
applicationFee
:
this
.
totalprice
,
}
}
// 添加订单(报名)
// 添加订单(报名)
addApplication
(
applyP
arams
).
then
(
res
=>
{
addApplication
(
p
arams
).
then
(
res
=>
{
if
(
res
.
data
.
code
===
200
)
{
if
(
res
.
data
.
code
===
200
)
{
this
.
show
=
false
this
.
show
=
false
uni
.
showToast
({
uni
.
showToast
({
...
@@ -116,9 +115,8 @@
...
@@ -116,9 +115,8 @@
icon
:
'success'
icon
:
'success'
})
})
}
else
if
(
res
.
data
.
code
!==
200
){
}
else
if
(
res
.
data
.
code
!==
200
){
console
.
log
(
"到这"
)
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
message
,
title
:
res
.
data
.
message
,
icon
:
'none'
icon
:
'none'
})
})
}
}
...
@@ -126,8 +124,8 @@
...
@@ -126,8 +124,8 @@
},
},
// 计算总价
// 计算总价
countprice
()
{
countprice
()
{
const
price
1
=
this
.
activityDetail
.
applicationFee
*
this
.
buynum
const
price
=
this
.
activityDetail
.
applicationFee
*
this
.
buynum
this
.
totalprice
=
price
1
this
.
totalprice
=
price
},
},
// 关闭报名弹窗
// 关闭报名弹窗
close
()
{
close
()
{
...
...
pagesArticle/articleDetail.vue
View file @
7db0d8c6
...
@@ -154,37 +154,37 @@
...
@@ -154,37 +154,37 @@
</view>
</view>
<view
class=
"bottom"
>
<view
class=
"bottom"
>
<u--input
<u--input
placeholder=
"走心,说点好听的"
placeholder=
"走心,说点好听的
.....
"
border=
"surround"
border=
"surround"
v-model=
"commentValue"
v-model=
"commentValue"
@
confirm=
"handleEnter"
@
confirm=
"handleEnter"
customStyle=
"border-radius:36rpx;height:45rpx;background-color:rgb(249, 250, 251);width:
6
0%"
customStyle=
"border-radius:36rpx;height:45rpx;background-color:rgb(249, 250, 251);width:
10
0%"
></u--input>
></u--input>
<view
class=
"bottom-button-area"
>
<!--
<view
class=
"bottom-button-area"
>
--
>
<view
class=
"bottom-button"
>
<!--
<view
class=
"bottom-button"
>
--
>
<image
<!--
<image-->
@
click=
""
<!-- @click=""-->
:src=
"baseUrl+'/article/103.png'"
<!-- :src="baseUrl+'/article/103.png'"-->
/
>
<!-- />--
>
<text
class=
"imageText"
>
分享
</text
>
<!--
<text
class=
"imageText"
>
分享
</text>
--
>
</view
>
<!--
</view>
--
>
<view
class=
"bottom-button"
>
<!--
<view
class=
"bottom-button"
>
--
>
<image
<!--
<image-->
@
click=
""
<!-- @click=""-->
:src=
"baseUrl+'/article/104.png'"
<!-- :src="baseUrl+'/article/104.png'"-->
></image
>
<!-- >
</image>
--
>
<text
class=
"imageText"
>
{{
articleInfo
.
commentCount
}}
</text
>
<!--
<text
class=
"imageText"
>
{{
articleInfo
.
commentCount
}}
</text>
--
>
</view
>
<!--
</view>
--
>
<view
class=
"bottom-button"
>
<!--
<view
class=
"bottom-button"
>
--
>
<image
<!--
<image-->
@
click=
""
<!-- @click=""-->
:src=
"articleInfo.isLike == '0'
<!-- :src="articleInfo.isLike == '0'-->
? baseUrl+'/article/105.png'
<!-- ? baseUrl+'/article/105.png'-->
: baseUrl+'/article/105-no.png'"
<!-- : baseUrl+'/article/105-no.png'"-->
></image
>
<!-- >
</image>
--
>
<text
class=
"imageText"
>
{{
articleInfo
.
likeCount
}}
</text
>
<!--
<text
class=
"imageText"
>
{{
articleInfo
.
likeCount
}}
</text>
--
>
</view
>
<!--
</view>
--
>
</view
>
<!--
</view>
--
>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -217,6 +217,14 @@ export default{
...
@@ -217,6 +217,14 @@ export default{
methods
:
{
methods
:
{
//评论回车事件
//评论回车事件
handleEnter
(
value
){
handleEnter
(
value
){
const
token
=
uni
.
getStorageSync
(
"token"
)
if
(
token
==
null
||
token
==
''
){
uni
.
showToast
({
title
:
'请先登录'
,
icon
:
'none'
})
return
;
}
if
(
this
.
commentValue
===
''
){
if
(
this
.
commentValue
===
''
){
uni
.
showToast
({
uni
.
showToast
({
title
:
'评论内容不能为空'
,
title
:
'评论内容不能为空'
,
...
@@ -231,6 +239,8 @@ export default{
...
@@ -231,6 +239,8 @@ export default{
}
}
comment
(
params
).
then
(
res
=>
{
comment
(
params
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
){
if
(
res
.
data
.
code
==
200
){
//方便回到动态页的时候刷新数据
uni
.
setStorageSync
(
"isRefresh"
,
true
)
this
.
getArticleDetail
()
this
.
getArticleDetail
()
}
}
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
...
@@ -386,10 +396,10 @@ export default{
...
@@ -386,10 +396,10 @@ export default{
height: 24rpx
height: 24rpx
}
}
.bottom-button-area{
.bottom-button-area{
width:
4
0%;
width:
3
0%;
padding: 0rpx 20rpx;
padding: 0rpx 20rpx;
display: flex;
display: flex;
justify-content: space-
between
;
justify-content: space-
around
;
align-items: center;
align-items: center;
.bottom-button{
.bottom-button{
display: flex;
display: flex;
...
...
pagesArticle/publishArticle.vue
View file @
7db0d8c6
...
@@ -19,18 +19,13 @@
...
@@ -19,18 +19,13 @@
</view>
</view>
</view>
</view>
</view>
</view>
<ELM
ref=
"elm"
:msg=
"tipMsg"
:isConfirm=
"isConfirm"
@
confirm=
"confirm"
></ELM>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
ELM
from
'@/components/elm-toast/index.vue'
;
import
{
publishArticle
}
from
'../api/article/index'
import
{
getOssUrl
,
publishArticle
,
uploadPublic
}
from
'../api/article/index'
export
default
{
export
default
{
components
:
{
ELM
},
data
()
{
data
()
{
return
{
return
{
uploadImgJSON
:{
uploadImgJSON
:{
...
@@ -55,8 +50,10 @@
...
@@ -55,8 +50,10 @@
//发布
//发布
submit
()
{
submit
()
{
if
(
!
this
.
content
&&
!
this
.
fileList
.
length
)
{
if
(
!
this
.
content
&&
!
this
.
fileList
.
length
)
{
this
.
tipMsg
=
'请输入内容或上传图片后再点击发布'
uni
.
showToast
({
this
.
$refs
.
elm
.
showDialog
();
title
:
'请输入内容或上传图片后再点击发布'
,
icon
:
'none'
})
return
;
return
;
}
}
const
params
=
{
const
params
=
{
...
@@ -93,12 +90,6 @@
...
@@ -93,12 +90,6 @@
deletePic
(
event
)
{
deletePic
(
event
)
{
this
[
`fileList
${
event
.
name
}
`
].
splice
(
event
.
index
,
1
)
this
[
`fileList
${
event
.
name
}
`
].
splice
(
event
.
index
,
1
)
},
},
//获取oss图片url
getOssUrl
()
{
// getOssUrl(id).then(res => {
// this.img = res.data.data.url
// })
},
// 新增图片
// 新增图片
afterRead
(
event
)
{
afterRead
(
event
)
{
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
...
...
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