仅代理商能够进入分享推广和我的用户
This commit is contained in:
parent
e0bad237cb
commit
d23f45f84a
|
|
@ -59,3 +59,15 @@ export function getAgentAgreement() {
|
||||||
export function getServiceAreas() {
|
export function getServiceAreas() {
|
||||||
return get('/app/region')
|
return get('/app/region')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取是否是代理商
|
||||||
|
* @returns {Promise} 返回是ture or false
|
||||||
|
*/
|
||||||
|
export function isAgent(params) {
|
||||||
|
return request({
|
||||||
|
url: '/app/agent',
|
||||||
|
method: 'GET',
|
||||||
|
params,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { commonEnum } from '@/enum/commonEnum.js'
|
import { commonEnum } from '@/enum/commonEnum.js'
|
||||||
import { getUserInfo, getUserFinancialData, getAgentCount } from '@/api/user/user.js'
|
import { getUserInfo, getUserFinancialData, getAgentCount } from '@/api/user/user.js'
|
||||||
|
import { isAgent } from '@/api/agents.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ProfilePage',
|
name: 'ProfilePage',
|
||||||
|
|
@ -347,15 +348,33 @@ export default {
|
||||||
url: '/pages/requestWithdrawal/requestWithdrawal',
|
url: '/pages/requestWithdrawal/requestWithdrawal',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goToUserList() {
|
|
||||||
uni.navigateTo({
|
async goToUserList() {
|
||||||
url: '/pages/useList/useList',
|
const response = await isAgent()
|
||||||
})
|
if (response.data) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/useList/useList',
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请先申请代理',
|
||||||
|
icon: 'none',
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
goToSharePromotion() {
|
|
||||||
uni.navigateTo({
|
async goToSharePromotion() {
|
||||||
url: '/pages/agents/requestAgent',
|
const response = await isAgent()
|
||||||
})
|
if (response.data) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/agents/requestAgent',
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请先申请代理',
|
||||||
|
icon: 'none',
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 处理用户信息更新事件
|
// 处理用户信息更新事件
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user