仅代理商能够进入分享推广和我的用户
This commit is contained in:
parent
e0bad237cb
commit
d23f45f84a
|
|
@ -59,3 +59,15 @@ export function getAgentAgreement() {
|
|||
export function getServiceAreas() {
|
||||
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>
|
||||
import { commonEnum } from '@/enum/commonEnum.js'
|
||||
import { getUserInfo, getUserFinancialData, getAgentCount } from '@/api/user/user.js'
|
||||
import { isAgent } from '@/api/agents.js'
|
||||
|
||||
export default {
|
||||
name: 'ProfilePage',
|
||||
|
|
@ -347,15 +348,33 @@ export default {
|
|||
url: '/pages/requestWithdrawal/requestWithdrawal',
|
||||
})
|
||||
},
|
||||
goToUserList() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/useList/useList',
|
||||
})
|
||||
|
||||
async goToUserList() {
|
||||
const response = await isAgent()
|
||||
if (response.data) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/useList/useList',
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '请先申请代理',
|
||||
icon: 'none',
|
||||
})
|
||||
}
|
||||
},
|
||||
goToSharePromotion() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/agents/requestAgent',
|
||||
})
|
||||
|
||||
async goToSharePromotion() {
|
||||
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