parent
9cb3fa95e1
commit
ce486510f4
|
|
@ -4,14 +4,13 @@ import request from "@/utils/request.js";
|
||||||
export function myAgentList(data) {
|
export function myAgentList(data) {
|
||||||
return request.get('agent/agent_list',data);
|
return request.get('agent/agent_list',data);
|
||||||
}
|
}
|
||||||
// 代理中心 - 供应商入驻邀请二维码
|
// 代理中心 - 邀请二维码
|
||||||
export function inviteSupplierJoinQrCode(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) {
|
export function getSingleAgentInfo(id) {
|
||||||
return request.get(`agent/single_agent_info/${id}`);
|
return request.get(`agent/single_agent_info/${id}`);
|
||||||
|
|
|
||||||
|
|
@ -1323,6 +1323,12 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "代理中心"
|
"navigationBarTitleText": "代理中心"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "invite/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "邀请下级"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,16 +62,138 @@ export default {
|
||||||
menu_list() {
|
menu_list() {
|
||||||
let menuList = [];
|
let menuList = [];
|
||||||
let agentType = this.agent_info.agent_type || 0;
|
let agentType = this.agent_info.agent_type || 0;
|
||||||
|
// 类型:1=发起人,2=省公司,3=省合伙人(外勤),4=省合伙人(内勤),5=区县运营商,6=区县合伙人,7=餐厅,8=配送商
|
||||||
if(Number(agentType) <= 5){
|
if(Number(agentType) <= 5){
|
||||||
menuList.push({
|
menuList.push({
|
||||||
title: '供应商邀请二维码',
|
title: '供应商邀请码',
|
||||||
type: 'supplier_qr_code',
|
type: 'invite_qr_code',
|
||||||
url: '',
|
url: '',
|
||||||
icon: 'iconfont icon-erweima1',
|
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;
|
return menuList;
|
||||||
},
|
},
|
||||||
|
|
@ -195,10 +317,12 @@ export default {
|
||||||
// 点击菜单 进行对应的操作
|
// 点击菜单 进行对应的操作
|
||||||
clickMenu(menu){
|
clickMenu(menu){
|
||||||
let _this = this;
|
let _this = this;
|
||||||
|
let params = menu.params || {};
|
||||||
|
params.agent_id = _this.agent_info.id || 0;
|
||||||
switch (menu.type) {
|
switch (menu.type) {
|
||||||
// 邀请供应商入驻
|
// 邀请供应商入驻
|
||||||
case 'supplier_qr_code':
|
case 'invite_qr_code':
|
||||||
inviteSupplierJoinQrCode({agent_id: _this.agent_info.id}).then(res => {
|
inviteSupplierJoinQrCode(params).then(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
_this.qrCode = res.data.qr_code || '';
|
_this.qrCode = res.data.qr_code || '';
|
||||||
_this.$refs.qrCodePopup.open('center');
|
_this.$refs.qrCodePopup.open('center');
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,88 @@
|
||||||
|
<template>
|
||||||
|
<view class="main-content">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
邀请下级入驻
|
||||||
|
|
||||||
|
|
||||||
|
<!--授权登录-->
|
||||||
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authClose"></authorize>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {mapGetters} from "vuex";
|
||||||
|
import authorize from '@/components/Authorize';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'business',
|
||||||
|
components: {
|
||||||
|
authorize,
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['isLogin', 'uid', 'userInfo', 'viewColor'])
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 登录相关
|
||||||
|
isAuto: false, //没有授权的不会自动授权
|
||||||
|
isShowAuth: false,//是否隐藏授权
|
||||||
|
// 二维码
|
||||||
|
qrCode: '',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
let _this = this;
|
||||||
|
if(options.scene){
|
||||||
|
console.log('转换前参数:',options.scene)
|
||||||
|
let scene = _this.$util.getUrlParams(decodeURIComponent(options.scene));
|
||||||
|
console.log("接收参数",scene)
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
// 判断:是否登录
|
||||||
|
if (!this.isLogin) {
|
||||||
|
// 未登录 授权登录
|
||||||
|
this.isAuto = true;
|
||||||
|
this.isShowAuth = true
|
||||||
|
}else{
|
||||||
|
// 已登录 获取信息
|
||||||
|
this.init();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 授权回调
|
||||||
|
onLoadFun() {
|
||||||
|
if(this.isLogin){
|
||||||
|
this.isShowAuth = false;
|
||||||
|
this.init();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 授权关闭
|
||||||
|
authClose(e) {
|
||||||
|
this.isShowAuth = e
|
||||||
|
},
|
||||||
|
// 授权成功 初始化
|
||||||
|
init () {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
@ -80,9 +80,6 @@ export default {
|
||||||
url: `/pages/supplier/apply/apply_join?apply_id=${item.id}`
|
url: `/pages/supplier/apply/apply_join?apply_id=${item.id}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue