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
b605e0d4
Commit
b605e0d4
authored
Feb 08, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查看他们动态,未关注的只能查看5条,已关注的查看一个月的,数据字典控制,修改了接口
parent
ca66d3bb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
111 additions
and
67 deletions
+111
-67
index.js
api/article/index.js
+9
-0
userArticleList.vue
pagesUser/userArticleList.vue
+9
-4
userInfo.vue
pagesUser/userInfo.vue
+2
-2
recharge.vue
pagesme/goldCoin/recharge.vue
+91
-61
No files found.
api/article/index.js
View file @
b605e0d4
...
...
@@ -10,6 +10,15 @@ export function articleList(query) {
})
}
// 动态列表
export
function
userArticleList
(
query
)
{
return
request
({
url
:
'/app/open/opmArticle/queryUserArticleByPagination'
,
data
:
query
,
method
:
'GET'
,
})
}
// 发表动态
export
function
publishArticle
(
data
)
{
return
request
({
...
...
pagesUser/userArticleList.vue
View file @
b605e0d4
...
...
@@ -27,7 +27,7 @@
import
ItemVue
from
'./component/Item.vue'
;
import
empty
from
'@/components/empty.vue'
;
import
{
topicList
}
from
"../api/topic"
;
import
{
articleList
,
like
}
from
"../api/article"
;
import
{
articleList
,
like
,
userArticleList
}
from
"../api/article"
;
import
{
getCity
,
getValue
}
from
"../common/options"
;
import
{
calculateAge
,
parseDate
}
from
"../common"
;
export
default
{
...
...
@@ -50,6 +50,8 @@ export default {
baseUrl
:
this
.
$IMG_URL
,
// v-model绑定的这个变量不要在分页请求结束中自己赋值!!!
dataList
:
[],
//是否已关注 1关注 0未关注
isFollowed
:
''
,
menuButtonInfo
:
''
,
navHeight
:
''
,
type
:
''
,
...
...
@@ -65,6 +67,9 @@ export default {
onLoad
(
options
){
this
.
userId
=
options
.
userId
this
.
type
=
options
.
type
if
(
options
.
isFollowed
!==
undefined
&&
options
.
isFollowed
!==
''
){
this
.
isFollowed
=
options
.
isFollowed
}
if
(
this
.
type
===
'else'
){
this
.
title
=
'他的动态'
}
else
if
(
this
.
type
===
'my'
){
...
...
@@ -106,13 +111,13 @@ export default {
},
//分页查询方法
queryList
(
pageNo
,
pageSize
)
{
// const userId = uni.getStorageSync('userInfo').businessId
const
params
=
{
page
:
pageNo
,
rows
:
pageSize
,
userId
:
this
.
userId
userId
:
this
.
userId
,
isFollowed
:
this
.
isFollowed
}
a
rticleList
(
params
).
then
(
res
=>
{
userA
rticleList
(
params
).
then
(
res
=>
{
const
list
=
res
.
data
.
data
list
.
forEach
(
item
=>
{
//处理头像
...
...
pagesUser/userInfo.vue
View file @
b605e0d4
...
...
@@ -238,7 +238,7 @@ import {addFollow, deleteFollow, isFollow, likeUser, userDetail} from "../api/us
baseUrl
:
this
.
$IMG_URL
,
//用户头像
imgList
:[],
isFollowed
:
0
,
isFollowed
:
'0'
,
//用户信息
userData
:
{},
isShow
:
false
,
...
...
@@ -340,7 +340,7 @@ import {addFollow, deleteFollow, isFollow, likeUser, userDetail} from "../api/us
//查看更多动态
gotomore
(){
uni
.
navigateTo
({
url
:
'/pagesUser/userArticleList?userId='
+
this
.
userId
+
'&type=else'
url
:
'/pagesUser/userArticleList?userId='
+
this
.
userId
+
'&type=else'
+
'&isFollowed='
+
this
.
isFollowed
});
},
//获取用户详情
...
...
pagesme/goldCoin/recharge.vue
View file @
b605e0d4
<
template
>
<view>
<view
class=
"money"
>
<text>
余额:
</text>
<text>
{{
parseFloat
(
balance
).
toFixed
(
2
)
}}
币
</text>
<view
class=
"firstView"
>
<text
class=
"firstText"
@
click=
"consumeRecord"
>
消费记录
</text>
</view>
<view
class=
"secondView"
>
<text
class=
"secondText"
>
余额:
</text>
<text>
{{
parseFloat
(
balance
).
toFixed
(
2
)
}}
币
</text>
</view>
</view>
<view
class=
"recharge"
>
<view>
充值
</view>
<view
class=
"list"
>
<view
v-for=
"(item, index) in
6
"
:key=
"index"
:class=
"
{active: activeIndex===index}"
@click="clickItem(index,
item)">
<view>
{{
index
+
1
}}
00
币
</view>
<view>
¥
{{
i
ndex
+
1
}}
00
</view>
<view
v-for=
"(item, index) in
goldCoinList
"
:key=
"index"
:class=
"
{active: activeIndex===index}"
@click="clickItem(index,item)">
<view>
{{
item
.
coin
}}
币
</view>
<view>
¥
{{
i
tem
.
price
}}
</view>
</view>
</view>
</view>
...
...
@@ -33,7 +38,17 @@ let iapChannel = null // 苹果内部支付渠道
export
default
{
data
()
{
return
{
activeIndex
:
0
,
//金币价格列表
goldCoinList
:
[
{
coin
:
100
,
price
:
100
},
{
coin
:
200
,
price
:
200
},
{
coin
:
300
,
price
:
300
},
{
coin
:
400
,
price
:
400
},
{
coin
:
500
,
price
:
500
},
{
coin
:
600
,
price
:
600
}
],
activeIndex
:
0
,
//激活的索引
payMoney
:
0
,
//支付金额
loading
:
false
,
// 是否充值中
balance
:
0
,
// 余额
moneyList
:
[],
// 充值列表展示金额
...
...
@@ -69,60 +84,63 @@ export default {
// });
},
methods
:
{
requestOrder
()
{
uni
.
showLoading
({
title
:
'检测支付环境...'
})
//必须调用此方法向Appstore请求有效的商品详情,才能进行 iap 支付,
iapChannel
.
requestOrder
(
this
.
moneyList
,
(
orderList
)
=>
{
console
.
log
(
'requestOrder success666: '
+
JSON
.
stringify
(
orderList
));
uni
.
hideLoading
();
},
(
e
)
=>
{
console
.
log
(
'requestOrder failed: '
+
JSON
.
stringify
(
e
));
uni
.
hideLoading
();
this
.
errorMsg
()
});
},
iosPayHandler
()
{
this
.
loading
=
true
;
uni
.
requestPayment
({
provider
:
'appleiap'
,
orderInfo
:
{
productid
:
this
.
applePrice
// 商品id
},
success
:
(
e
)
=>
{
console
.
log
(
"success"
,
e
);
uni
.
showToast
({
title
:
"支付成功!"
})
// 调用接口,立即扣款购买商品
},
fail
:
(
e
)
=>
{
console
.
log
(
"fail"
,
e
);
uni
.
showModal
({
content
:
"支付失败,原因为: "
+
e
.
errMsg
,
showCancel
:
false
})
},
complete
:
()
=>
{
this
.
loading
=
false
;
}
})
},
errorMsg
()
{
uni
.
showModal
({
content
:
"暂不支持苹果 iap 支付"
,
showCancel
:
false
})
},
//
requestOrder() {
//
uni.showLoading({
//
title: '检测支付环境...'
//
})
//
//必须调用此方法向Appstore请求有效的商品详情,才能进行 iap 支付,
//
iapChannel.requestOrder(this.moneyList, (orderList) => {
//
console.log('requestOrder success666: ' + JSON.stringify(orderList));
//
uni.hideLoading();
//
}, (e) => {
//
console.log('requestOrder failed: ' + JSON.stringify(e));
//
uni.hideLoading();
//
this.errorMsg()
//
});
//
},
//
iosPayHandler() {
//
this.loading = true;
//
uni.requestPayment({
//
provider: 'appleiap',
//
orderInfo: {
//
productid: this.applePrice // 商品id
//
},
//
success: (e) => {
//
console.log("success", e);
//
uni.showToast({
//
title: "支付成功!"
//
})
//
// 调用接口,立即扣款购买商品
//
},
//
fail: (e) => {
//
console.log("fail", e);
//
uni.showModal({
//
content: "支付失败,原因为: " + e.errMsg,
//
showCancel: false
//
})
//
},
//
complete: () => {
//
this.loading = false;
//
}
//
})
//
},
//
errorMsg() {
//
uni.showModal({
//
content: "暂不支持苹果 iap 支付",
//
showCancel: false
//
})
//
},
clickItem
(
index
,
item
)
{
this
.
activeIndex
=
index
this
.
applePrice
=
item
this
.
payMoney
=
item
.
price
},
async
loadData
()
{
},
//消费记录
consumeRecord
(){
}
}
}
</
script
>
...
...
@@ -133,13 +151,25 @@ export default {
background-color
:
cornflowerblue
;
color
:
#FFFFFF
;
font-size
:
88rpx
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
text
:first-child
{
color
:
#e7e4e9
;
font-size
:
30rpx
;
.firstView
{
display
:
flex
;
justify-content
:
flex-end
;
padding-right
:
20rpx
;
padding-top
:
20rpx
;
color
:
#6e6d70
;
.firstText
{
color
:
#e7e4e9
;
font-size
:
30rpx
;
}
}
.secondView
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
.secondText
{
color
:
#e7e4e9
;
font-size
:
30rpx
;
}
}
}
...
...
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