Phase1 后端核心:
- 新增 fsgx_v1.sql 迁移脚本(is_queue_goods/frozen_points/available_points/no_assess)
- SystemConfigServices 返佣设置扩展(周期人数/分档比例/范围/时机)
- StoreOrderCreateServices 周期循环佣金计算
- StoreOrderTakeServices 佣金发放后同步冻结积分
- StoreProductServices/StoreProduct 保存 is_queue_goods
Phase2 后端接口:
- GET /api/hjf/brokerage/progress 佣金周期进度
- GET /api/hjf/assets/overview 资产总览
- HjfPointsServices 每日 frozen_points 0.4‰ 释放定时任务
- PUT /adminapi/hjf/member/{uid}/no_assess 不考核接口
- GET /adminapi/hjf/points/release_log 积分日志接口
Phase3 前端清理:
- hjfCustom.js 路由精简(仅保留 points/log)
- hjfQueue.js/hjfMember.js API 清理/重定向至 CRMEB 原生接口
- pages.json 公排→推荐佣金/佣金记录/佣金规则
Phase4-5 前端改造:
- queue/status.vue 推荐佣金进度页整体重写
- 商品详情/订单确认/支付结果页文案与逻辑改造
- 个人中心/资产页/引导页/规则页文案改造
- HjfQueueProgress/HjfRefundNotice/HjfAssetCard 组件改造
- 推广中心嵌入佣金进度摘要
- hjfMockData.js 全量更新(公排字段→佣金字段)
Phase6 Admin 增强:
- 用户列表新增 frozen_points/available_points 列及不考核操作按钮
- hjfPoints.js USE_MOCK=false 对接真实积分日志接口
Phase7 配置文档:
- docs/fsgx-phase7-config-checklist.md 后台配置与全链路验收清单
Made-with: Cursor
229 lines
6.0 KiB
Vue
229 lines
6.0 KiB
Vue
<template>
|
|
<view :style="colorStyle">
|
|
<view class="bg--w111-fff">
|
|
<view :style="{'padding-top': sysHeight + 'px'}">
|
|
<view class="flex-between-center h-80 px-20" >
|
|
<text class="iconfont icon-ic_leftarrow fs-40" @tap="backPage"></text>
|
|
<view class="h-80 flex-y-center fs-32 text--w111-999">
|
|
<view :class="{'tab-active': tabActive == 0}" @tap="changeTab(0)">好友</view>
|
|
<view class="ml-48" :class="{'tab-active': tabActive == 1}" @tap="changeTab(1)">关注</view>
|
|
<view class="ml-48" :class="{'tab-active': tabActive == 2}" @tap="changeTab(2)">粉丝</view>
|
|
</view>
|
|
<text class="w-40"></text>
|
|
</view>
|
|
</view>
|
|
<view class="h-180 p-30 flex-between-center" v-for="(item,index) in userList" :key="index">
|
|
<view class="flex-y-center" @tap="authTo('/pages/discover/discoverUser/index?id=' + item.relation_id)">
|
|
<image :src="item.author_image" mode="aspectFill" class="w-120 h-120 rd-50-p111-"></image>
|
|
<view class="pl-20">
|
|
<view class="fs-30">{{item.author}}</view>
|
|
<view class="flex-y-center mt-16 fs-24 text--w111-999">
|
|
<text>内容·{{item.community_num}}</text>
|
|
<text class="pl-30">粉丝·{{item.fans_num}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="w-124 h-52 rd-30rpx flex-center bg-color text--w111-fff fs-24" v-show="item.is_follow == 0 && item.is_fans == 0"
|
|
@tap="followChange(item)">关注</view>
|
|
<view class="w-124 h-52 rd-30rpx flex-center bg--w111-fff text--w111-999 b-d fs-24" v-show="item.is_follow == 1 && item.is_fans == 0"
|
|
@tap="openModal(item,index)">已关注</view>
|
|
<view class="w-124 h-52 rd-30rpx flex-center bg-color text--w111-fff fs-24" v-show="item.is_follow == 0 && item.is_fans == 1"
|
|
@tap="followChange(item)">回关</view>
|
|
<view class="w-124 h-52 rd-30rpx flex-center bg--w111-fff text--w111-999 b-d fs-24" v-show="item.is_follow == 1 && item.is_fans == 1"
|
|
@tap="openModal(item,index)">互相关注</view>
|
|
</view>
|
|
<view v-show="!userList.length">
|
|
<emptyPage :title="emptyText()" src="/statics/images/video/no_friend.png"></emptyPage>
|
|
</view>
|
|
</view>
|
|
<!-- 确认框 -->
|
|
<tuiModal
|
|
:show="showModal"
|
|
title="确认取消关注"
|
|
:maskClosable="false"
|
|
@click="handleClick"></tuiModal>
|
|
<home></home>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
let sysHeight = uni.getWindowInfo().statusBarHeight;
|
|
import { communityFlowListApi, communitySetInsterestApi, communityFriendListApi } from "@/api/community.js" ;
|
|
import colors from "@/mixins/color";
|
|
import emptyPage from '@/components/emptyPage.vue';
|
|
import tuiModal from "@/components/tui-modal/index.vue"
|
|
export default {
|
|
data() {
|
|
return {
|
|
sysHeight,
|
|
tabActive:0,
|
|
params:{
|
|
page:1,
|
|
limit:20,
|
|
},
|
|
type:'follow',
|
|
loading:false,
|
|
userList:[],
|
|
showModal:false,
|
|
uid:'',
|
|
index:0
|
|
};
|
|
},
|
|
mixins: [colors],
|
|
components:{ emptyPage, tuiModal },
|
|
computed:{
|
|
menuBoxStyle(){
|
|
let res = wx.getMenuButtonBoundingClientRect();
|
|
return {
|
|
width: res.left + 'px'
|
|
}
|
|
}
|
|
},
|
|
onLoad(options) {
|
|
if(options.type && options.type == 0){
|
|
this.tabActive = 1;
|
|
this.type = 'follow';
|
|
this.getList()
|
|
}else if(options.type && options.type == 1){
|
|
this.tabActive = 0;
|
|
this.getFriend();
|
|
}else if(options.type && options.type == 2){
|
|
this.tabActive = 2;
|
|
this.type = 'fans';
|
|
this.getList()
|
|
}else{
|
|
this.tabActive = 0;
|
|
this.getFriend();
|
|
}
|
|
},
|
|
methods:{
|
|
changeTab(val){
|
|
if(this.tabActive == val) return
|
|
this.tabActive = val;
|
|
this.loading = false;
|
|
this.userList = [];
|
|
this.params.page = 1;
|
|
if(val == 1){
|
|
this.type = 'follow';
|
|
this.getList()
|
|
}else if(val == 2){
|
|
this.type = 'fans';
|
|
this.getList()
|
|
}else if(val == 0){
|
|
this.getFriend();
|
|
}
|
|
},
|
|
authTo(url){
|
|
uni.navigateTo({
|
|
url
|
|
})
|
|
},
|
|
backPage(){
|
|
uni.navigateBack()
|
|
},
|
|
getList(){
|
|
if (this.loading) return;
|
|
this.loading = true;
|
|
communityFlowListApi(this.type,this.params).then(res=>{
|
|
let list = res.data;
|
|
let loading = list.length < this.params.limit;
|
|
this.userList = this.userList.concat(list);
|
|
this.params.page++;
|
|
this.loading = loading;
|
|
}).catch(err => {
|
|
return this.$util.Tips({
|
|
title: err
|
|
});
|
|
});
|
|
},
|
|
getFriend(){
|
|
if (this.loading) return;
|
|
this.loading = true;
|
|
communityFriendListApi(this.params).then(res=>{
|
|
let list = res.data;
|
|
let loading = list.length < this.params.limit;
|
|
this.userList = this.userList.concat(list);
|
|
this.params.page++;
|
|
this.loading = loading;
|
|
}).catch(err => {
|
|
return this.$util.Tips({
|
|
title: err
|
|
});
|
|
});
|
|
},
|
|
openModal(item, index){
|
|
this.uid = item.relation_id;
|
|
this.index = index;
|
|
this.showModal = true;
|
|
},
|
|
handleClick(e){
|
|
let index = e.index;
|
|
let that = this;
|
|
if(index == 1){
|
|
communitySetInsterestApi(this.uid,{status:0}).then(res=>{
|
|
this.userList[this.index].is_follow = 0;
|
|
this.showModal = false;
|
|
}).catch(err => {
|
|
this.showModal = false;
|
|
uni.showToast({
|
|
title:err,
|
|
icon:'none',
|
|
duration:2000
|
|
})
|
|
});
|
|
}else{
|
|
this.showModal = false;
|
|
}
|
|
},
|
|
followChange(item){
|
|
communitySetInsterestApi(item.relation_id,{status:1}).then(res=>{
|
|
item.is_follow = 1;
|
|
return this.$util.Tips({
|
|
title: res.msg
|
|
});
|
|
}).catch(err => {
|
|
return this.$util.Tips({
|
|
title: err
|
|
});
|
|
});
|
|
},
|
|
emptyText(){
|
|
let obj = {
|
|
0:'您还没有好友哦~',
|
|
1:'您还没有关注任何人哦~',
|
|
2:'您还没有粉丝哦~'
|
|
};
|
|
return obj[this.tabActive]
|
|
}
|
|
},
|
|
onReachBottom() {
|
|
this.getList()
|
|
},
|
|
onPageScroll() {
|
|
uni.$emit('scroll');
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.tab-active{
|
|
font-weight: 500;
|
|
color: #333;
|
|
position: relative;
|
|
&:after{
|
|
content: '';
|
|
position: absolute;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
bottom: -14rpx;
|
|
width: 64rpx;
|
|
height: 5rpx;
|
|
background: var(--view-theme);
|
|
border-radius: 4rpx;
|
|
}
|
|
}
|
|
.b-d{
|
|
border: 1px solid #ddd
|
|
}
|
|
</style>
|