Commit 78aa23cb by zhanghui1

解决组件命名address会报错

parent f6890a49
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
<div class="c">{{query_coin_type|uppercase}}收益地址</div> <div class="c">{{query_coin_type|uppercase}}收益地址</div>
</div> </div>
<div class="page-content bg-blue"> <div class="page-content bg-blue">
<!-- {{puid}} {{query_type}} {{query_coin_type}} -->
<div class="address"> <div class="address">
<label>当前收益地址</label> <label>当前收益地址</label>
<div class="mock-input">{{address}}</div> <div class="mock-input">{{address}}</div>
...@@ -17,10 +16,9 @@ ...@@ -17,10 +16,9 @@
<script> <script>
import fn from '@/utils/function.js' import fn from '@/utils/function.js'
export default { export default {
name: 'address', name: 'modifyAddress',
data() { data() {
return { return {
ttt: {},
address: '', address: '',
} }
}, },
...@@ -42,12 +40,13 @@ export default { ...@@ -42,12 +40,13 @@ export default {
getUser() { getUser() {
fn.getUser(this.puid).then(res => { fn.getUser(this.puid).then(res => {
if (res.data.err_no == 0) { if (res.data.err_no == 0) {
this.ttt = res.data.data
if (res.data.data.coins.hasOwnProperty(this.query_coin_type)) { if (res.data.data.coins.hasOwnProperty(this.query_coin_type)) {
this.address = res.data.data.coins[this.query_coin_type].address this.address = res.data.data.coins[this.query_coin_type].address
} else { } else {
this.address = '未设置' this.address = '未设置'
} }
}else{
this.$toast("获取用户信息错误!")
} }
}) })
} }
......
...@@ -114,7 +114,7 @@ const router = new Router({ ...@@ -114,7 +114,7 @@ const router = new Router({
}] }]
},{ },{
path: '/address', path: '/address',
name: 'address', name: 'modifyAddress',
component: resolve => require(['@/components/Settings/Address.vue'], resolve), component: resolve => require(['@/components/Settings/Address.vue'], resolve),
meta: { meta: {
title: 'Address.vue' title: 'Address.vue'
......
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 sign in to comment