docs: “agent”统一更改成“agency”
This commit is contained in:
parent
f764c372c4
commit
6839fca8e7
@ -3,10 +3,10 @@
|
|||||||
<MobileHeader title="Agency Setting" />
|
<MobileHeader title="Agency Setting" />
|
||||||
|
|
||||||
<div style="padding: 16px; position: relative; z-index: 2">
|
<div style="padding: 16px; position: relative; z-index: 2">
|
||||||
<!-- My Agent 部分 -->
|
<!-- My Agency 部分 -->
|
||||||
<div style="margin-bottom: 20px">
|
<div style="margin-bottom: 20px">
|
||||||
<div style="display: flex; align-items: center; margin-bottom: 12px">
|
<div style="display: flex; align-items: center; margin-bottom: 12px">
|
||||||
<div style="font-size: 1.4em; font-weight: 600">My Agent</div>
|
<div style="font-size: 1.4em; font-weight: 600">My Agency</div>
|
||||||
<img src="/src/assets/icon/agency.png" alt="" height="25px" style="display: block" />
|
<img src="/src/assets/icon/agency.png" alt="" height="25px" style="display: block" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -29,7 +29,7 @@
|
|||||||
style="aspect-ratio: 1/1; border-radius: 50%; object-fit: cover"
|
style="aspect-ratio: 1/1; border-radius: 50%; object-fit: cover"
|
||||||
@error="defaultAvatarUrl"
|
@error="defaultAvatarUrl"
|
||||||
/>
|
/>
|
||||||
<div class="agent-details" style="flex: 1">
|
<div style="flex: 1">
|
||||||
<div style="margin-bottom: 4px; font-weight: 600">
|
<div style="margin-bottom: 4px; font-weight: 600">
|
||||||
{{ userInfo.name }}
|
{{ userInfo.name }}
|
||||||
</div>
|
</div>
|
||||||
@ -64,8 +64,8 @@ const defaultAvatarUrl = (e) => {
|
|||||||
|
|
||||||
// 方法
|
// 方法
|
||||||
const leaveAgent = () => {
|
const leaveAgent = () => {
|
||||||
if (confirm('Are you sure you want to leave this agent?')) {
|
if (confirm('Are you sure you want to leave this agency?')) {
|
||||||
showError('Leave agent request submitted')
|
showError('Leave agency request submitted')
|
||||||
// 这里可以添加实际的离开代理商逻辑
|
// 这里可以添加实际的离开代理商逻辑
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -259,7 +259,7 @@
|
|||||||
Host Salary: {{ loadingTeamBill ? '–' : teamBillInfo.hostSalary }}
|
Host Salary: {{ loadingTeamBill ? '–' : teamBillInfo.hostSalary }}
|
||||||
</div>
|
</div>
|
||||||
<div class="contentText">
|
<div class="contentText">
|
||||||
Agent Salary: {{ loadingTeamBill ? '–' : teamBillInfo.agentSalary }}
|
Agency Salary: {{ loadingTeamBill ? '–' : teamBillInfo.agentSalary }}
|
||||||
</div>
|
</div>
|
||||||
<div class="contentText">Total: {{ loadingTeamBill ? '–' : teamBillInfo.total }}</div>
|
<div class="contentText">Total: {{ loadingTeamBill ? '–' : teamBillInfo.total }}</div>
|
||||||
<div style="display: flex; justify-content: flex-end">
|
<div style="display: flex; justify-content: flex-end">
|
||||||
|
|||||||
@ -12,8 +12,8 @@
|
|||||||
<div class="reminder-section">
|
<div class="reminder-section">
|
||||||
<h3>Reminder before application:</h3>
|
<h3>Reminder before application:</h3>
|
||||||
<p>
|
<p>
|
||||||
Enter the ID of your agent, and you will become the host after the host apply is approved.
|
Enter the ID of your agency, and you will become the host after the host apply is
|
||||||
After becoming an host, your income will be entrusted to your agent
|
approved. After becoming an host, your income will be entrusted to your agency
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -25,8 +25,8 @@
|
|||||||
<input
|
<input
|
||||||
v-model="agentId"
|
v-model="agentId"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Please enter the agent ID"
|
placeholder="Please enter the agency ID"
|
||||||
class="agent-input"
|
class="agency-input"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -84,7 +84,7 @@
|
|||||||
<div v-if="showHelpModal" class="help-modal" @click="closeHelp">
|
<div v-if="showHelpModal" class="help-modal" @click="closeHelp">
|
||||||
<div class="help-content" @click.stop>
|
<div class="help-content" @click.stop>
|
||||||
<h3>Application Help</h3>
|
<h3>Application Help</h3>
|
||||||
<p>Enter your agent's ID and click Apply to submit your application.</p>
|
<p>Enter your agency's ID and click Apply to submit your application.</p>
|
||||||
<button class="close-btn" @click="closeHelp">Got it</button>
|
<button class="close-btn" @click="closeHelp">Got it</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -195,7 +195,7 @@ const searchTeamAccount = async (account) => {
|
|||||||
|
|
||||||
const submitApplication = async () => {
|
const submitApplication = async () => {
|
||||||
if (!agentId.value.trim()) {
|
if (!agentId.value.trim()) {
|
||||||
errorMessage.value = 'Please enter agent ID'
|
errorMessage.value = 'Please enter agency ID'
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,7 +205,7 @@ const submitApplication = async () => {
|
|||||||
try {
|
try {
|
||||||
const teamId = await searchTeamAccount(agentId.value.trim())
|
const teamId = await searchTeamAccount(agentId.value.trim())
|
||||||
if (!teamId) {
|
if (!teamId) {
|
||||||
errorMessage.value = 'Account not found or not an agent'
|
errorMessage.value = 'Account not found or not an agency'
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -346,7 +346,7 @@ usePageInitializationWithConfig('APPLY', {
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.agent-input {
|
.agency-input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
border: none;
|
border: none;
|
||||||
@ -356,11 +356,11 @@ usePageInitializationWithConfig('APPLY', {
|
|||||||
color: rgba(0, 0, 0, 0.4);
|
color: rgba(0, 0, 0, 0.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
.agent-input:focus {
|
.agency-input:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.agent-input::placeholder {
|
.agency-input::placeholder {
|
||||||
color: rgba(0, 0, 0, 0.4);
|
color: rgba(0, 0, 0, 0.4);
|
||||||
font-weight: 590;
|
font-weight: 590;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -86,7 +86,6 @@ const selectedCoin = ref(null)
|
|||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const isLoadingRole = ref(false)
|
const isLoadingRole = ref(false)
|
||||||
const userRole = ref('')
|
const userRole = ref('')
|
||||||
const selectedUserType = ref('')
|
|
||||||
|
|
||||||
// 金币选项
|
// 金币选项
|
||||||
const coinOptions = reactive([
|
const coinOptions = reactive([
|
||||||
@ -132,17 +131,9 @@ const checkUserRole = async () => {
|
|||||||
// 根据接口返回的role设置用户角色
|
// 根据接口返回的role设置用户角色
|
||||||
userRole.value = response.body.role || ''
|
userRole.value = response.body.role || ''
|
||||||
console.debug('用户角色:', userRole.value)
|
console.debug('用户角色:', userRole.value)
|
||||||
|
|
||||||
// 设置默认的用户类型
|
|
||||||
if (userRole.value === 'TEAM_OWN') {
|
|
||||||
selectedUserType.value = 'ANCHOR' // TEAM_OWN 默认选择 ANCHOR
|
|
||||||
} else {
|
|
||||||
selectedUserType.value = 'AGENT' // 其他角色默认选择 AGENT
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// 接口返回成功但没有有效数据的情况
|
// 接口返回成功但没有有效数据的情况
|
||||||
userRole.value = ''
|
userRole.value = ''
|
||||||
selectedUserType.value = 'USER'
|
|
||||||
router.back() // 对于其他严重错误,也建议退出页面
|
router.back() // 对于其他严重错误,也建议退出页面
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -163,7 +154,6 @@ const checkUserRole = async () => {
|
|||||||
|
|
||||||
// 清理状态
|
// 清理状态
|
||||||
userRole.value = ''
|
userRole.value = ''
|
||||||
selectedUserType.value = 'USER'
|
|
||||||
} finally {
|
} finally {
|
||||||
isLoadingRole.value = false
|
isLoadingRole.value = false
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,10 +3,10 @@
|
|||||||
<MobileHeader title="Host Setting" />
|
<MobileHeader title="Host Setting" />
|
||||||
|
|
||||||
<div style="padding: 16px; position: relative; z-index: 2">
|
<div style="padding: 16px; position: relative; z-index: 2">
|
||||||
<!-- My Agent 部分 -->
|
<!-- My Agency 部分 -->
|
||||||
<div style="margin-bottom: 20px">
|
<div style="margin-bottom: 20px">
|
||||||
<div style="display: flex; align-items: center; margin-bottom: 12px">
|
<div style="display: flex; align-items: center; margin-bottom: 12px">
|
||||||
<div style="font-size: 1.4em; font-weight: 600">My Agent</div>
|
<div style="font-size: 1.4em; font-weight: 600">My Agency</div>
|
||||||
<img src="/src/assets/icon/agency.png" alt="" height="25px" style="display: block" />
|
<img src="/src/assets/icon/agency.png" alt="" height="25px" style="display: block" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -29,7 +29,7 @@
|
|||||||
style="aspect-ratio: 1/1; border-radius: 50%; object-fit: cover"
|
style="aspect-ratio: 1/1; border-radius: 50%; object-fit: cover"
|
||||||
@error="defaultAvatarUrl"
|
@error="defaultAvatarUrl"
|
||||||
/>
|
/>
|
||||||
<div class="agent-details" style="flex: 1">
|
<div style="flex: 1">
|
||||||
<div style="margin-bottom: 4px; font-weight: 600">
|
<div style="margin-bottom: 4px; font-weight: 600">
|
||||||
{{ userInfo.name }}
|
{{ userInfo.name }}
|
||||||
</div>
|
</div>
|
||||||
@ -68,8 +68,8 @@ const defaultAvatarUrl = (e) => {
|
|||||||
|
|
||||||
// 方法
|
// 方法
|
||||||
const leaveAgent = () => {
|
const leaveAgent = () => {
|
||||||
if (confirm('Are you sure you want to leave this agent?')) {
|
if (confirm('Are you sure you want to leave this agency?')) {
|
||||||
showError('Leave agent request submitted')
|
showError('Leave agency request submitted')
|
||||||
// 这里可以添加实际的离开代理商逻辑
|
// 这里可以添加实际的离开代理商逻辑
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,7 +64,7 @@
|
|||||||
gap: 5px;
|
gap: 5px;
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<div style="font-weight: 600">Agent Salary</div>
|
<div style="font-weight: 600">Agency Salary</div>
|
||||||
<div style="font-weight: 500">${{ policy.ownSalary || 0 }}</div>
|
<div style="font-weight: 500">${{ policy.ownSalary || 0 }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex; flex-direction: column; align-items: center; gap: 5px">
|
<div style="display: flex; flex-direction: column; align-items: center; gap: 5px">
|
||||||
|
|||||||
@ -54,7 +54,7 @@
|
|||||||
>
|
>
|
||||||
<div style="display: flex">
|
<div style="display: flex">
|
||||||
<div style="display: flex; flex-direction: column; align-items: center; gap: 5px">
|
<div style="display: flex; flex-direction: column; align-items: center; gap: 5px">
|
||||||
<div class="team-des-title">Agent number</div>
|
<div class="team-des-title">Agency number</div>
|
||||||
<div class="team-des-value">{{ agentMonthTarget.agentQuantity }}</div>
|
<div class="team-des-value">{{ agentMonthTarget.agentQuantity }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user