Commit a590115a by GiottoMaster

子账户

parent c77a7ed2
......@@ -67,8 +67,9 @@
},
"node_modules/@aximario/json-tree": {
"version": "2.2.4",
"resolved": "https://registry.npmmirror.com/@aximario/json-tree/-/json-tree-2.2.4.tgz",
"integrity": "sha512-XGMJ+zuVQ0CRizo1d3ZTUKEvrTqKYbm2a00T6DnRFR36mzV6mexLUKRIk6repj3JKgLrj3iwW8aUFrOS4P7CEA=="
"resolved": "https://registry.npmjs.org/@aximario/json-tree/-/json-tree-2.2.4.tgz",
"integrity": "sha512-XGMJ+zuVQ0CRizo1d3ZTUKEvrTqKYbm2a00T6DnRFR36mzV6mexLUKRIk6repj3JKgLrj3iwW8aUFrOS4P7CEA==",
"license": "MIT"
},
"node_modules/@babel/parser": {
"version": "7.24.7",
......
......@@ -15,7 +15,7 @@
<div class="label">{{ $t('main.agent.label4') }}</div>
</div>
<div class="block" :class="{ active: navActive === 3 }" @click="changeNav(3)">
<div class="label">下级</div>
<div class="label">{{ $t('main.agent.label13') }}</div>
</div>
</div>
......@@ -60,7 +60,7 @@
<div class="value">{{ fundsInfo.withdraw }}MYR</div>
</div>
</van-swipe-item>
<van-swipe-item>
<van-swipe-item style="overflow: auto;">
<AgentTree :data="childrenTree" @changeChildren="changeChildren"/>
</van-swipe-item>
</van-swipe>
......@@ -174,12 +174,14 @@ header {
height: 45px;
display: flex;
margin: 0 15px;
overflow-x: auto;
gap: 15px;
.block {
justify-content: center;
display: flex;
flex-wrap: wrap;
align-items: center;
margin-right: 20px;
// margin-right: 20px;
.label {
color: #606060;
width: 100%;
......
......@@ -2,8 +2,8 @@
<div class="treeWrap">
<div class="treeLable" @click.stop="getChildren(data)">
<div class="label">
<van-icon name="arrow" :class="{expand: expand}" v-if="!data.noChild && !loading"/>
<van-loading type="spinner" size="16" v-if="loading"/>
<!-- <van-icon name="arrow" :class="{expand: expand}" v-if="!data.noChild && !loading"/> -->
<!-- <van-loading type="spinner" size="16" v-if="loading"/> -->
<div class="name">{{ data.username }}</div>
</div>
<div class="value">{{ data.balance }}</div>
......@@ -32,6 +32,7 @@ export default {
},
methods: {
async getChildren(item) {
return
if(item.children && item.children.length > 0) {
this.expand = !this.expand
return
......@@ -79,7 +80,7 @@ export default {
}
}
.children {
margin-left: 10px;
margin-left: 30px;
}
.expand {
transform: rotate(90deg);
......
......@@ -125,6 +125,10 @@ import https from './http.js';
apiFun.transApi = (params) => {
return https.post('/api/agent_transfer', params)
}
// 下级
apiFun.agentChildrenApi = (params) => {
return https.get('/api/agent/children', params)
}
......
......@@ -754,6 +754,8 @@ export const main = {
label9: '请输入邀请码',
label10: '储值',
label11: '提款',
label12: '子账户',
label13: '直属子账户',
},
trans: {
......
......@@ -754,6 +754,8 @@ export const main = {
label9: 'Please enter the invitation code',
label10: 'Deposit',
label11: 'Withdrawal',
label12: 'Sub Accounts',
label13: 'Direct sub-account',
},
trans: {
......
......@@ -757,6 +757,8 @@ export const main = {
label9: '초대 코드를 입력하세요',
label10: '충전',
label11: '출금',
label12: '하위 계정',
label13: '직속 하위 계정',
},
trans: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment