diff --git a/src/pages/news/groupChitchatDetail.wpy b/src/pages/news/groupChitchatDetail.wpy
index 7d8ad65..08cdff4 100644
--- a/src/pages/news/groupChitchatDetail.wpy
+++ b/src/pages/news/groupChitchatDetail.wpy
@@ -1,155 +1,22 @@
-
-
-
+
+
+
{{item.nickname}}
+
--
+
@@ -157,19 +24,22 @@ page {
-
-
- 查看更多群成员
+
+
+
+
+
+ 查看更多群成员({{ currentPage }}/{{ totalPages }})
-
-
-
-
+
+
+
收起
+
群聊头像
@@ -184,7 +54,7 @@ page {
我在本群的昵称
-
+
@@ -192,6 +62,7 @@ page {
群聊简介
{{ detail.team.intro }}
+
显示群成员昵称
@@ -208,14 +79,15 @@ page {
-
+
+
退出群聊
加入群聊
-
+
@@ -234,15 +106,44 @@ wepy.page({
data: {
id: '',
- defaultImg: 'https://image.fulllinkai.com/202307/18/449c3253ca2bbed9314d39977a486d0e.png', // 默认头像
- detail: {},
+ defaultImg: 'https://image.fulllinkai.com/202307/18/449c3253ca2bbed9314d39977a486d0e.png',
+ detail: {
+ members: [],
+ team: {},
+ user_team: {}
+ },
notiTypeList: [],
notiTypeData: {muteNotiType: 0},
notiTypeIndex: null,
- hidden: true,
throttle: true,
- isCodeIn: false // 是否扫码进入详情
+ isCodeIn: false,
+ // 分页加载相关
+ pageSize: 25, // 每页显示数量
+ currentLoadCount: 25, // 当前已加载数量,默认25
+ isLoadAll: false // 是否已加载全部成员
},
+
+ computed: {
+ displayMembers() {
+ // 返回当前已加载的成员列表
+ if (this.detail.members && this.detail.members.length > 0) {
+ return this.detail.members.slice(0, this.currentLoadCount)
+ }
+ return []
+ },
+
+ // 当前页码
+ currentPage() {
+ return Math.ceil(this.currentLoadCount / this.pageSize)
+ },
+
+ // 总页数
+ totalPages() {
+ if (!this.detail.members || this.detail.members.length === 0) return 1
+ return Math.ceil(this.detail.members.length / this.pageSize)
+ }
+ },
+
methods: {
getDetail() {
let vm = this
@@ -250,6 +151,11 @@ wepy.page({
vm.$get({url: `${service.host}/team/${vm.id}/detail`}).then(({code, data}) => {
if (code === 0) {
vm.detail = data
+ if (!vm.detail.members) {
+ vm.detail.members = []
+ }
+ // 重置加载状态
+ vm.resetLoadState()
}
wx.hideLoading()
}).catch(err => {
@@ -257,7 +163,40 @@ wepy.page({
console.log(err)
})
},
- // 修改群信息
+
+ // 重置加载状态
+ resetLoadState() {
+ this.currentLoadCount = this.pageSize
+ // 判断是否需要显示"查看更多"按钮
+ if (this.detail.members && this.detail.members.length <= this.pageSize) {
+ this.isLoadAll = true
+ } else {
+ this.isLoadAll = false
+ }
+ },
+
+ // 加载更多成员
+ loadMoreMembers() {
+ let vm = this
+ let totalCount = vm.detail.members.length
+ let newLoadCount = vm.currentLoadCount + vm.pageSize
+
+ // 如果新加载数量大于等于总成员数,则加载全部并显示"收起"
+ if (newLoadCount >= totalCount) {
+ vm.currentLoadCount = totalCount
+ vm.isLoadAll = true
+ } else {
+ vm.currentLoadCount = newLoadCount
+ vm.isLoadAll = false
+ }
+ },
+
+ // 收起成员列表
+ collapseMembers() {
+ this.currentLoadCount = this.pageSize
+ this.isLoadAll = false
+ },
+
changeGroupData() {
let vm = this
let data = {
@@ -284,19 +223,19 @@ wepy.page({
})
}
},
- // 监听群昵称是否显示
+
changeShowNick(e) {
let vm = this
vm.detail.user_team.show_other_nick = e.$wx.detail.value ? 1 : 0
vm.changeGroupData()
},
- // 监听置顶
+
changeShowTop(e) {
let vm = this
vm.detail.user_team.is_top = e.$wx.detail.value ? 1 : 0
vm.changeGroupData()
},
- // 消息免打扰设置
+
changeMutenotiType(e) {
let vm = this
vm.$showLoading('')
@@ -316,7 +255,6 @@ wepy.page({
if (res) {
vm.notiTypeData.muteNotiType = muteNotiType
vm.notiTypeData.muteTeam = muteTeam
- console.log(vm.notiTypeIndex, e.$wx.detail.value, vm.detail, 'vm.notiTypeIndex')
if (vm.notiTypeIndex !== null) {
vm.notiTypeList[vm.notiTypeIndex].muteNotiType = muteNotiType
vm.notiTypeList[vm.notiTypeIndex].muteTeam = muteTeam
@@ -331,13 +269,12 @@ wepy.page({
if (!e.$wx.detail.value) {
vm.notiTypeList.splice(vm.notiTypeIndex, 1)
}
- console.log(vm.notiTypeList, 'vm.notiTypeList')
wx.setStorageSync('muteNotList', vm.notiTypeList)
}
wx.hideLoading()
})
},
- // 退出群聊
+
quitGroup() {
let vm = this
wx.showModal({
@@ -350,15 +287,14 @@ wepy.page({
if (code == 0) {
wx.switchTab({url: '/pages/tabBar/news'})
}
- }).catch(() => {
- })
+ }).catch(() => {})
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
},
- // 加入群聊
+
joinGroup() {
let vm = this
wx.showModal({
@@ -371,39 +307,36 @@ wepy.page({
if (code == 0) {
vm.getDetail()
}
- }).catch(() => {
- })
+ }).catch(() => {})
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
},
- // 返回群聊天
+
backChat() {
let vm = this
- wx.redirectTo({url: `/pages/news/groupChitchat?id=${vm.id}&name=${encodeURIComponent(vm.detail.tname)}`})
- },
- // 展示、收起更多成员
- moreMembers() {
- let vm = this
- vm.hidden = !vm.hidden
+ wx.redirectTo({url: `/pages/news/groupChitchat?id=${vm.id}&name=${encodeURIComponent(vm.detail.team.tname)}`})
},
+
jumpPath(e) {
wx.navigateTo({url: e})
},
- handleContact(e) {
- let vm = this
- try {
- wx.previewImage({
- current: 'https://image.fulllinkai.com/202310/23/2a132a4978ef87d532a817041e425c26.png',
- urls: ['https://image.fulllinkai.com/202310/23/2a132a4978ef87d532a817041e425c26.png']
- })
- } catch (error) {
- vm.$showToast('请更新至微信最新版本')
- }
+
+ handleContact(e) {
+ let vm = this
+ try {
+ wx.previewImage({
+ current: 'https://image.fulllinkai.com/202310/23/2a132a4978ef87d532a817041e425c26.png',
+ urls: ['https://image.fulllinkai.com/202310/23/2a132a4978ef87d532a817041e425c26.png']
+ })
+ } catch (error) {
+ vm.$showToast('请更新至微信最新版本')
}
+ }
},
+
onLoad(e) {
let vm = this
if (e.scene) {
@@ -424,23 +357,183 @@ wepy.page({
}
})
}
+ // 初始化加载状态
+ vm.currentLoadCount = vm.pageSize
+ vm.isLoadAll = false
vm.getDetail()
},
+
onShow() {
let vm = this
if (vm.id) {
vm.getDetail()
}
},
- created() {
- }
+
+ created() {}
})
+
+
+
{
navigationBarTitleText: '群聊详情',
enablePullDownRefresh: false,
backgroundColorTop: '#f5f5f5',
-backgroundColorBottom: '#f5f5f5',
+backgroundColorBottom: '#f5f5f5'
}
diff --git a/src/pages/tabBar/dynamic.wpy b/src/pages/tabBar/dynamic.wpy
index 464147b..01bb0a6 100644
--- a/src/pages/tabBar/dynamic.wpy
+++ b/src/pages/tabBar/dynamic.wpy
@@ -126,7 +126,7 @@ page {
height: 124rpx;
width: 124rpx;
right: 30rpx;
- bottom: 320rpx;
+ bottom: 200rpx;
text-align: center;
z-index: 1000;
}
@@ -134,7 +134,7 @@ page {
.m_returnTop {
position: fixed;
right: 46rpx;
- bottom: 160rpx;
+ bottom: 100rpx;
z-index: 99;
-webkit-transition: opacity 1s;
transition: opacity 1s;
diff --git a/src/pages/tabBar/user.wpy b/src/pages/tabBar/user.wpy
index 395ae7b..069e6fc 100644
--- a/src/pages/tabBar/user.wpy
+++ b/src/pages/tabBar/user.wpy
@@ -26,7 +26,7 @@
@tap="goto('/pages/users/upgradeVIP')">
升级VIP尊贵特权
- {{ user.deadline }}到期
+ {{ user.deadline }}
去续费
@@ -61,9 +61,9 @@
{{ item.title }}
-
- {{ user.deadline }} 到期
- 未激活
+
+ {{ user.deadline }}
+ 未激活
@@ -634,7 +634,7 @@ wepy.page({
this.init = true
this.user = data.user
this.user.rank_id = data.rank_profile.rank_id
- this.user.deadline = data.rank_profile.deadline
+ this.user.deadline = (data.rank_profile?.deadline).substring(0, 16)
// this.user.card_num = data.approve_profile.card_num
this.user.is_approved = data.approve_profile.is_approved
this.user.is_real_approved = data.approve_profile.is_real_approved
@@ -1577,7 +1577,7 @@ page {
{
navigationBarTitleText: '我的',
navigationStyle: 'custom',
-enablePullDownRefresh: false,
+enablePullDownRefresh: true,
backgroundColorTop: '#f2f2f2',
backgroundColorBottom: '#f2f2f2',
usingComponents: {
diff --git a/src/pages/users/upgradeVIP.wpy b/src/pages/users/upgradeVIP.wpy
index 65f65f3..50de8b8 100644
--- a/src/pages/users/upgradeVIP.wpy
+++ b/src/pages/users/upgradeVIP.wpy
@@ -44,7 +44,7 @@
-
+
style="width:{{100/index}}%">
+
-
+
合计: ¥{{ payData.discount_price }}
@@ -114,14 +115,17 @@ background: linear-gradient(270deg, #E6C7AB 0%, #F5E6D8 100%);">
v-else>{{ deductionPrice > 0 ? deductionPrice : '0.00' }}
- 原价:¥{{ payData.price }}
+ 原价:¥{{
+ payData.price
+ }}
{{ payData.title }}
-
微信支付
@@ -212,6 +216,8 @@ wepy.page({
},
onShow() {
+ let that = this
+
},
onLoad(e) {
@@ -228,6 +234,7 @@ wepy.page({
},
onPullDownRefresh() {
+ this.getPageData()
},
onShareAppMessage(res) {
@@ -240,9 +247,10 @@ wepy.page({
path: url,
imageUrl: 'https://images.ufutx.com/202004/10/9d3829a6ad06cf95b32806fbc4f7dd94.png',
success: function (res) {
- wx.showToast({ title: '转发成功', icon: 'success' })
+ wx.showToast({title: '转发成功', icon: 'success'})
},
- fail: function (res) {}
+ fail: function (res) {
+ }
}
},
@@ -279,6 +287,7 @@ wepy.page({
vm.worthShare()
}
wx.hideLoading()
+ wx.stopPullDownRefresh()
}).finally(() => {
this.loaded = false
this.init = true
@@ -382,7 +391,8 @@ wepy.page({
return
}
- that.trade_no = data.order?.trade_no
+ that.trade_no = data?.order_no
+ console.log('---', that.trade_no)
// 测试订单直接回调
if (data.length == 0 || data.config?.payment_debug) {
@@ -394,14 +404,6 @@ wepy.page({
// iOS虚拟支付
const virtualPayData = data || {}
- console.log('virtualPayData', virtualPayData)
-
- console.log({
- signData: virtualPayData.sign_data,
- paySig: virtualPayData.paySig || '',
- signature: virtualPayData.signature || '',
- mode: virtualPayData.mode || 'short_series_goods',
- })
wx.requestVirtualPayment({
signData: virtualPayData.sign_data,
paySig: virtualPayData.paySig || '',
@@ -410,15 +412,29 @@ wepy.page({
success(res) {
console.log('requestVirtualPayment success', res)
// 虚拟支付成功后回调
- that.$post({url: `${service.host}/order/${that.trade_no}/callback`}).then(() => {
- that.getUserData()
- that.$Toast_success('支付成功')
- let userInfo = wx.getStorageSync('userInfo')
- userInfo.rank_id = 9
- wx.setStorageSync('userInfo', userInfo)
+ that.$post({
+ url: `${service.host}/order/callback/virtual`,
+ data: {orderNo: that.trade_no}
+ }).then(() => {
+ that.getPageData()
+ wx.showModal({ // 使用模态框提示用户进行操作
+ title: '支付完成',
+ content: '会员开通成功,权益将在几分钟内到账,到账后即可生效。',
+ showCancel: false,
+ confirmText: `知道了`,
+ success: function (res) {
+ if (res.confirm) {
+ let userInfo = wx.getStorageSync('userInfo')
+ userInfo.rank_id = 9
+ wx.setStorageSync('userInfo', userInfo)
+ } else if (res.cancel) {
+ console.log('用户点击取消')
+ }
+ }
+ })
})
},
- fail({ errMsg, errCode }) {
+ fail({errMsg, errCode}) {
console.error('虚拟支付失败:', errMsg, errCode)
that.$Toast_error('支付失败,请重试')
}
@@ -472,7 +488,7 @@ wepy.page({
})
},
fail(res) {
- wx.showToast({ title: '已取消支付', icon: 'none' })
+ wx.showToast({title: '已取消支付', icon: 'none'})
}
})
})
@@ -567,7 +583,8 @@ page {
.m_payData {
padding: 20px 20px;
- margin: 32rpx;border-radius: 10px;
+ margin: 32rpx;
+ border-radius: 10px;
background: #FBFAFC;
.u_payData_img {
@@ -612,7 +629,7 @@ page {
align-self: stretch;
border-radius: 0 10px 10px 10px;
border: 1px solid #E6C7AB;
- padding: 42rpx 32rpx 32rpx 32rpx;
+ padding: 42rpx 32rpx 32rpx 32rpx;
}
.scroll-wrapper {
@@ -634,6 +651,7 @@ page {
.card-swiper {
width: 100% !important;
+
.swiper-item {
border-radius: 22rpx;
}
@@ -650,25 +668,27 @@ page {
.payBtn {
position: relative;
position: fixed;
- bottom: 32rpx;
+ bottom: 0rpx;
left: 0;
- height: 60px;
+ //height: 60px;
width: 100%;
- padding: 32rpx;
+ padding: 22rpx 32rpx 46rpx 32rpx;
display: flex;
background: #FFFFFF;
justify-content: space-between;
align-items: center;
+ box-shadow: 0 -6px 6px rgba(199, 213, 227, 0.4);
.l_text {
color: var(--0-e-0-e-0-e, #0E0E0E);
- font-size: 12px;
+ font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: normal;
- .price{
+
+ .price {
color: var(--ff-2946, #FF2946);;
- font-size: 20px;
+ font-size: 26px;
font-style: normal;
font-weight: 600;
line-height: normal;
@@ -681,7 +701,8 @@ page {
font-size: 16px;
font-style: normal;
font-weight: 500;
- line-height: normal;display: flex;
+ line-height: normal;
+ display: flex;
padding: 12px 36px;
height: 92rpx;
justify-content: center;
@@ -783,7 +804,7 @@ page {
{
navigationBarTitleText: 'VIP服务',
navigationStyle: 'custom',
-enablePullDownRefresh: false,
+enablePullDownRefresh: true,
backgroundColorTop: '#f2f2f2',
backgroundColorBottom: '#f2f2f2',
usingComponents: {