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}`
})
},
-
-
-
}
}