|
@@ -67,7 +67,7 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- 分享弹窗 -->
|
|
|
- <SharePopup ref="sharePopup" />
|
|
|
+ <SharePopup ref="sharePopup" :qrText="qrText" :nickname="nickname" />
|
|
|
</div>
|
|
|
|
|
|
</layout>
|
|
@@ -88,6 +88,8 @@ import WithdrawalRecord from './components/WithdrawalRecord';
|
|
|
import SharePopup from './components/SharePopup';
|
|
|
import WxPopTpis from './components/WxPopTpis';
|
|
|
|
|
|
+const Authorization = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyYW5kb20iOiI2ODk3NyIsImNsaWVudCI6IjEiLCJ1c2VyVHlwZSI6IjIiLCJtZXJjaGFudFNpZ24iOiJTWlgiLCJleHAiOjE3NDcwMzMyODgsInVzZXJuYW1lIjoiZHZBd1UxNjM0NjA5NTU3U1pYIn0.o7bIutx2e2WrdqIx6fG_WR57oSXZ5s5ewfB0QdAHOBU';
|
|
|
+
|
|
|
export default {
|
|
|
auth: false,
|
|
|
name: 'OemInviteNewUser',
|
|
@@ -97,126 +99,66 @@ export default {
|
|
|
components: { layout, layoutBack, RecordList, InvitePagination, BuyRecordList, WithdrawalRecord, SharePopup, WxPopTpis },
|
|
|
data() {
|
|
|
return {
|
|
|
+ qrText: '', // 生成二维码的文本
|
|
|
registerCount: 0, // 今日注册人数
|
|
|
nickname: '', // 用户昵称
|
|
|
withdrawalBalance: 0, // 可提现余额
|
|
|
inviteBuyAmount: 0, // 累计邀请金额
|
|
|
- activityId: 1, // 活动ID
|
|
|
accumulatedWithdrawal: 0, // 累计提现金额,
|
|
|
// 查询参数
|
|
|
queryData: {
|
|
|
- phoneNumber: '', // 手机号
|
|
|
- merchantSign: '', // 商户标识
|
|
|
- userName: '', // 邀请人用户名
|
|
|
- quiltUserName: '', // 被邀请人用户名
|
|
|
+ // phoneNumber: '', // 手机号
|
|
|
+ // merchantSign: '', // 商户标识
|
|
|
+ // userName: '', // 邀请人用户名
|
|
|
+ // quiltUserName: '', // 被邀请人用户名
|
|
|
activityId: '', // 活动ID
|
|
|
- toDay: '', // 今日日期
|
|
|
- inviteUserName: '', // 邀请人名称
|
|
|
+ // toDay: '', // 今日日期
|
|
|
+ // inviteUserName: '', // 邀请人名称
|
|
|
},
|
|
|
activeTab: 0,
|
|
|
tabs: [{
|
|
|
title: '邀请记录',
|
|
|
+ requireMethod: 'getInviteRecordList', // 请求定义的方法key
|
|
|
query: {
|
|
|
pageNum: 1, // 页码
|
|
|
- pageSize: 10, // 每页数量
|
|
|
- },
|
|
|
- data: [{
|
|
|
- id: 1,
|
|
|
- name: '1305677',
|
|
|
- phoneNumber: '13800138000',
|
|
|
- createTime: '2025-04-03 10:00:00',
|
|
|
- money: '100.00',
|
|
|
- status: '已提现',
|
|
|
- },
|
|
|
- {
|
|
|
- id: 1,
|
|
|
- name: '1305677',
|
|
|
- phoneNumber: '13800138000',
|
|
|
- createTime: '2025-04-03 10:00:00',
|
|
|
- money: '100.00',
|
|
|
- status: '已提现',
|
|
|
- },
|
|
|
- {
|
|
|
- id: 1,
|
|
|
- name: '1305677',
|
|
|
- phoneNumber: '13800138000',
|
|
|
- createTime: '2025-04-03 10:00:00',
|
|
|
- money: '100.00',
|
|
|
- status: '已提现',
|
|
|
+ pageSize: 5, // 每页数量
|
|
|
},
|
|
|
- {
|
|
|
- id: 1,
|
|
|
- name: '1305677',
|
|
|
- phoneNumber: '13800138000',
|
|
|
- createTime: '2025-04-03 10:00:00',
|
|
|
- money: '100.00',
|
|
|
- status: '已提现',
|
|
|
- },
|
|
|
- {
|
|
|
- id: 1,
|
|
|
- name: '1305677',
|
|
|
- phoneNumber: '13800138000',
|
|
|
- createTime: '2025-04-03 10:00:00',
|
|
|
- money: '100.00',
|
|
|
- status: '已提现',
|
|
|
- },
|
|
|
- ],
|
|
|
- total: 1,
|
|
|
+ data: [],
|
|
|
+ total: 0,
|
|
|
},{
|
|
|
title: '购买记录',
|
|
|
+ requireMethod: 'getInviteBuyRecordList', // 请求定义的方法key
|
|
|
query: {
|
|
|
pageNum: 1,
|
|
|
- pageSize: 10,
|
|
|
+ pageSize: 5,
|
|
|
},
|
|
|
- data: [{
|
|
|
- id: 1,
|
|
|
- newPhone: '13800138000',
|
|
|
- finishTime: '2025-04-03 10:00:00',
|
|
|
- totalAmount: '100.00',
|
|
|
- rakeBackAmount: '30.00',
|
|
|
- },{
|
|
|
- id: 1,
|
|
|
- newPhone: '13800138000',
|
|
|
- finishTime: '2025-04-03 10:00:00',
|
|
|
- totalAmount: '100.00',
|
|
|
- rakeBackAmount: '30.00',
|
|
|
- },{
|
|
|
- id: 1,
|
|
|
- newPhone: '13800138000',
|
|
|
- finishTime: '2025-04-03 10:00:00',
|
|
|
- totalAmount: '100.00',
|
|
|
- rakeBackAmount: '30.00',
|
|
|
- },{
|
|
|
- id: 1,
|
|
|
- newPhone: '13800138000',
|
|
|
- finishTime: '2025-04-03 10:00:00',
|
|
|
- totalAmount: '100.00',
|
|
|
- rakeBackAmount: '30.00',
|
|
|
- },{
|
|
|
- id: 1,
|
|
|
- newPhone: '13800138000',
|
|
|
- finishTime: '2025-04-03 10:00:00',
|
|
|
- totalAmount: '100.00',
|
|
|
- rakeBackAmount: '30.00',
|
|
|
- }],
|
|
|
- total: 1,
|
|
|
+ data: [],
|
|
|
+ total: 0,
|
|
|
},{
|
|
|
title: '提现记录',
|
|
|
+ requireMethod: 'getInviteBuyRecordList', // 请求定义的方法key
|
|
|
query: {
|
|
|
pageNum: 1,
|
|
|
- pageSize: 10,
|
|
|
+ pageSize: 5,
|
|
|
},
|
|
|
- data: [{
|
|
|
- withdrawalTime: '2025-04-03 10:00:00',
|
|
|
- withdrawalMoney: '100.00',
|
|
|
- }],
|
|
|
+ data: [],
|
|
|
total: 0,
|
|
|
}],
|
|
|
}
|
|
|
},
|
|
|
- // 页面初始化后触发
|
|
|
+ // 页面初始化后触发
|
|
|
async fetch() {
|
|
|
+ // 获取参数的token值
|
|
|
+ let token = this.$route.query.token;
|
|
|
+ if(!token) {return this.$toast('用户信息获取失败')}
|
|
|
+
|
|
|
+ // token参数会自动被系统获取,请求接口自动带上token
|
|
|
+
|
|
|
await this.getActivityData();
|
|
|
+ await this.getInviteRecordList();
|
|
|
+ await this.getInviteBuyRecordList();
|
|
|
+ await this.getInviteWithdrawalRecordList();
|
|
|
+ await this.getActivityRule(this.queryData.activityId);
|
|
|
},
|
|
|
computed: {
|
|
|
// 是否为微信浏览器环境
|
|
@@ -227,7 +169,7 @@ export default {
|
|
|
methods: {
|
|
|
// nav right菜单点击事件
|
|
|
onRightHandle() {
|
|
|
- this.$router.push({ path: '/activity/invite-user/invite-new-user-rule' })
|
|
|
+ this.$router.push({ path: '/activity/invite-user/invite-new-user-rule', query: { activityId: this.queryData.activityId} })
|
|
|
},
|
|
|
// 分享按钮点击事件
|
|
|
shareHandle() {
|
|
@@ -237,8 +179,9 @@ export default {
|
|
|
pageChangeHandle(page) {
|
|
|
let active = this.activeTab;
|
|
|
this.tabs[active].query.pageNum = page;
|
|
|
- console.log('pageChangeHandle', page);
|
|
|
+
|
|
|
// 发起请求
|
|
|
+ this[this.tabs[active].requireMethod]();
|
|
|
},
|
|
|
// 提现按钮点击
|
|
|
withdrawalHandle() {
|
|
@@ -251,6 +194,7 @@ export default {
|
|
|
async getActivityData() {
|
|
|
const res = await this.$axios.$get(
|
|
|
'/activity/v5/activity/inviteNewUser/getInviteNewUserPageData',
|
|
|
+ // { headers: { Authorization } }
|
|
|
);
|
|
|
let {
|
|
|
registerCount, // 今日注册人数
|
|
@@ -260,42 +204,91 @@ export default {
|
|
|
activityId, // 活动ID
|
|
|
accumulatedWithdrawal, // 累计提现金额
|
|
|
} = res.data;
|
|
|
+
|
|
|
+ // 页面展示数据
|
|
|
this.registerCount = registerCount;
|
|
|
this.nickname = nickname;
|
|
|
this.withdrawalBalance = withdrawalBalance;
|
|
|
this.inviteBuyAmount = inviteBuyAmount;
|
|
|
- this.activityId = activityId;
|
|
|
this.accumulatedWithdrawal = accumulatedWithdrawal;
|
|
|
+ // 查询参数
|
|
|
+ this.queryData.activityId = activityId;
|
|
|
},
|
|
|
// 获取活动页好友注册记录列表
|
|
|
async getInviteRecordList() {
|
|
|
- const res = await this.$axios.$post(
|
|
|
+ let {status, success, data} = await this.$axios.$post(
|
|
|
'/activity/v5/activity/inviteNewUser/getInviteNewRegisterUserData',
|
|
|
- { ...this.queryData, ...this.tabs[0].query }
|
|
|
+ { ...this.queryData, ...this.tabs[0].query },
|
|
|
+ // { headers: { Authorization } }
|
|
|
);
|
|
|
-
|
|
|
- this.tabs[0].data = res.data.list;
|
|
|
- this.tabs[0].total = res.data.total;
|
|
|
+ if(status === 0 && success) {
|
|
|
+ this.tabs[0].data = data.list;
|
|
|
+ this.tabs[0].total = data.total;
|
|
|
+ }
|
|
|
+ /*
|
|
|
+ 友注册记录列表数据格式
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ name: '1305677',
|
|
|
+ phoneNumber: '13800138000',
|
|
|
+ createTime: '2025-04-03 10:00:00',
|
|
|
+ money: '100.00',
|
|
|
+ status: '已提现',
|
|
|
+ }
|
|
|
+ */
|
|
|
},
|
|
|
// 获取活动页好友购买记录列表
|
|
|
async getInviteBuyRecordList() {
|
|
|
- const res = await this.$axios.$post(
|
|
|
+ let {status, success, data} = await this.$axios.$post(
|
|
|
'/activity/v5/activity/inviteNewUser/getInviteNewUserBuyData',
|
|
|
- { ...this.queryData, ...this.tabs[1].query }
|
|
|
+ { ...this.queryData, ...this.tabs[1].query },
|
|
|
+ // { headers: { Authorization } }
|
|
|
);
|
|
|
-
|
|
|
- this.tabs[1].data = res.data.list;
|
|
|
- this.tabs[1].total = res.data.total;
|
|
|
+ if(status === 0 && success) {
|
|
|
+ this.tabs[1].data = data.list;
|
|
|
+ this.tabs[1].total = data.total;
|
|
|
+ }
|
|
|
+ /*
|
|
|
+ 友购买记录列表数据格式
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ newPhone: '13800138000',
|
|
|
+ finishTime: '2025-04-03 10:00:00',
|
|
|
+ totalAmount: '100.00',
|
|
|
+ rakeBackAmount: '30.00',
|
|
|
+ }
|
|
|
+ */
|
|
|
},
|
|
|
// 获取活动页好友提现记录列表
|
|
|
async getInviteWithdrawalRecordList() {
|
|
|
- const res = await this.$axios.$post(
|
|
|
+ let {status, success, data} = await this.$axios.$post(
|
|
|
'/activity/v5/activity/inviteNewUser/getInviteNewUserWithdrawalRecodeList',
|
|
|
- {...this.queryData,...this.tabs[2].query }
|
|
|
+ {...this.queryData,...this.tabs[2].query },
|
|
|
+ // { headers: { Authorization } }
|
|
|
);
|
|
|
|
|
|
- this.tabs[2].data = res.data.list;
|
|
|
- this.tabs[2].total = res.data.total;
|
|
|
+ if(status === 0 && success) {
|
|
|
+ this.tabs[2].data = data.list;
|
|
|
+ this.tabs[2].total = data.total;
|
|
|
+ }
|
|
|
+
|
|
|
+ /*
|
|
|
+ 友提现记录列表数据格式
|
|
|
+ {
|
|
|
+ withdrawalTime: '2025-04-03 10:00:00',
|
|
|
+ withdrawalMoney: '100.00',
|
|
|
+ }
|
|
|
+ */
|
|
|
+ },
|
|
|
+ // 获取邀请url地址,用于生成二维码
|
|
|
+ async getActivityRule(id) {
|
|
|
+ let {status, success, data} = await this.$axios.$get('/activity/activity/basic/getDetailsById',{
|
|
|
+ params: { id }
|
|
|
+ });
|
|
|
+
|
|
|
+ if(status === 0 && success) {
|
|
|
+ this.qrText = data?.activityInviteNewUser?.jumpAddress;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|