From ce486510f48b4acf8c3cda30c106feab7ef8a06a Mon Sep 17 00:00:00 2001
From: wuhui_zzw <1760308791@qq.com>
Date: Tue, 30 Jan 2024 18:44:06 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=EF=BC=9A=E4=BE=9B=E5=BA=94?=
=?UTF-8?q?=E5=95=86=E7=94=B3=E8=AF=B7=20-=20=E9=A9=B3=E5=9B=9E=E5=90=8E?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BF=A1=E6=81=AF=20=E4=BC=98=E5=8C=96?=
=?UTF-8?q?=EF=BC=9A=E4=BB=A3=E7=90=86=E4=B8=AD=E5=BF=83=20-=20=E9=82=80?=
=?UTF-8?q?=E8=AF=B7=E4=BA=8C=E7=BB=B4=E7=A0=81=E7=94=9F=E6=88=90=E6=B5=81?=
=?UTF-8?q?=E7=A8=8B=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/agent.js | 5 +-
pages.json | 6 ++
pages/agent/center.vue | 136 ++++++++++++++++++++++++++++++--
pages/agent/invite/index.vue | 88 +++++++++++++++++++++
pages/supplier/apply/record.vue | 3 -
5 files changed, 226 insertions(+), 12 deletions(-)
create mode 100644 pages/agent/invite/index.vue
diff --git a/api/agent.js b/api/agent.js
index 065d71b..76f4269 100644
--- a/api/agent.js
+++ b/api/agent.js
@@ -4,14 +4,13 @@ import request from "@/utils/request.js";
export function myAgentList(data) {
return request.get('agent/agent_list',data);
}
-// 代理中心 - 供应商入驻邀请二维码
+// 代理中心 - 邀请二维码
export function inviteSupplierJoinQrCode(data) {
- return request.get('agent/qr_code_invite_supplier',data);
+ return request.get('agent/qr_code_invite',data);
}
-
// 获取单条代理人员信息
export function getSingleAgentInfo(id) {
return request.get(`agent/single_agent_info/${id}`);
diff --git a/pages.json b/pages.json
index 55da0e7..c2bbeab 100644
--- a/pages.json
+++ b/pages.json
@@ -1323,6 +1323,12 @@
"style": {
"navigationBarTitleText": "代理中心"
}
+ },
+ {
+ "path": "invite/index",
+ "style": {
+ "navigationBarTitleText": "邀请下级"
+ }
}
diff --git a/pages/agent/center.vue b/pages/agent/center.vue
index aaf8434..8577a1e 100644
--- a/pages/agent/center.vue
+++ b/pages/agent/center.vue
@@ -62,16 +62,138 @@ export default {
menu_list() {
let menuList = [];
let agentType = this.agent_info.agent_type || 0;
+ // 类型:1=发起人,2=省公司,3=省合伙人(外勤),4=省合伙人(内勤),5=区县运营商,6=区县合伙人,7=餐厅,8=配送商
if(Number(agentType) <= 5){
menuList.push({
- title: '供应商邀请二维码',
- type: 'supplier_qr_code',
+ title: '供应商邀请码',
+ type: 'invite_qr_code',
url: '',
icon: 'iconfont icon-erweima1',
+ params: {
+ type: 'supplier'
+ }
+ });
+ }
+ if(Number(agentType) === 1){
+ menuList.push({
+ title: '省公司邀请码',
+ type: 'invite_qr_code',
+ url: '',
+ icon: 'iconfont icon-erweima1',
+ params: {
+ type: 'subordinate',
+ level: 2,
+ }
+ });
+ menuList.push({
+ title: '配送商邀请码',
+ type: 'invite_qr_code',
+ url: '',
+ icon: 'iconfont icon-erweima1',
+ params: {
+ type: 'subordinate',
+ level: 8,
+ }
+ });
+ }
+ if(Number(agentType) === 2){
+ menuList.push({
+ title: '外勤邀请码',
+ type: 'invite_qr_code',
+ url: '',
+ icon: 'iconfont icon-erweima1',
+ params: {
+ type: 'subordinate',
+ level: 3,
+ }
+ });
+ menuList.push({
+ title: '内勤邀请码',
+ type: 'invite_qr_code',
+ url: '',
+ icon: 'iconfont icon-erweima1',
+ params: {
+ type: 'subordinate',
+ level: 4,
+ }
+ });
+ menuList.push({
+ title: '配送商邀请码',
+ type: 'invite_qr_code',
+ url: '',
+ icon: 'iconfont icon-erweima1',
+ params: {
+ type: 'subordinate',
+ level: 8,
+ }
+ });
+ }
+ if(Number(agentType) === 3){
+ menuList.push({
+ title: '运营商邀请码',
+ type: 'invite_qr_code',
+ url: '',
+ icon: 'iconfont icon-erweima1',
+ params: {
+ type: 'subordinate',
+ level: 5,
+ }
+ });
+ menuList.push({
+ title: '配送商邀请码',
+ type: 'invite_qr_code',
+ url: '',
+ icon: 'iconfont icon-erweima1',
+ params: {
+ type: 'subordinate',
+ level: 8,
+ }
+ });
+ }
+ if(Number(agentType) === 5){
+ menuList.push({
+ title: '合伙人邀请码',
+ type: 'invite_qr_code',
+ url: '',
+ icon: 'iconfont icon-erweima1',
+ params: {
+ type: 'subordinate',
+ level: 6,
+ }
+ });
+ menuList.push({
+ title: '配送商邀请码',
+ type: 'invite_qr_code',
+ url: '',
+ icon: 'iconfont icon-erweima1',
+ params: {
+ type: 'subordinate',
+ level: 8,
+ }
+ });
+ }
+ if(Number(agentType) === 6){
+ menuList.push({
+ title: '餐厅邀请码',
+ type: 'invite_qr_code',
+ url: '',
+ icon: 'iconfont icon-erweima1',
+ params: {
+ type: 'subordinate',
+ level: 7,
+ }
+ });
+ menuList.push({
+ title: '配送商邀请码',
+ type: 'invite_qr_code',
+ url: '',
+ icon: 'iconfont icon-erweima1',
+ params: {
+ type: 'subordinate',
+ level: 8,
+ }
});
}
-
-
return menuList;
},
@@ -195,10 +317,12 @@ export default {
// 点击菜单 进行对应的操作
clickMenu(menu){
let _this = this;
+ let params = menu.params || {};
+ params.agent_id = _this.agent_info.id || 0;
switch (menu.type) {
// 邀请供应商入驻
- case 'supplier_qr_code':
- inviteSupplierJoinQrCode({agent_id: _this.agent_info.id}).then(res => {
+ case 'invite_qr_code':
+ inviteSupplierJoinQrCode(params).then(res => {
if (res.status == 200) {
_this.qrCode = res.data.qr_code || '';
_this.$refs.qrCodePopup.open('center');
diff --git a/pages/agent/invite/index.vue b/pages/agent/invite/index.vue
new file mode 100644
index 0000000..da68f91
--- /dev/null
+++ b/pages/agent/invite/index.vue
@@ -0,0 +1,88 @@
+
+
+
+
+
+ 邀请下级入驻
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/supplier/apply/record.vue b/pages/supplier/apply/record.vue
index 8e065e9..63d72ef 100644
--- a/pages/supplier/apply/record.vue
+++ b/pages/supplier/apply/record.vue
@@ -80,9 +80,6 @@ export default {
url: `/pages/supplier/apply/apply_join?apply_id=${item.id}`
})
},
-
-
-
}
}