Commit 8d41c4fb authored by xhx's avatar xhx

fix:调整

parent 31622bc7
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript> </noscript>
<div id="app"></div> <div id="app"></div>
<script>
console.log('v1.0.2')
</script>
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
</body> </body>
</html> </html>
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
// 优化进入的请求逻辑,promise.all, 失败刷新
import Vue from 'vue' import Vue from 'vue'
import { isBind } from '@/service/pool' import { isBind } from '@/service/pool'
import service from '@/service/chain33' import service from '@/service/chain33'
...@@ -29,9 +30,6 @@ export default Vue.extend({ ...@@ -29,9 +30,6 @@ export default Vue.extend({
if (walletRes.data.result?.datas) { if (walletRes.data.result?.datas) {
// 查询到存在冷钱包,跳转空白页(即存在挖矿用户,为票池地址) // 查询到存在冷钱包,跳转空白页(即存在挖矿用户,为票池地址)
this.$router.replace({ path: '/noPage', query: { type: '3', status: '1' }}) this.$router.replace({ path: '/noPage', query: { type: '3', status: '1' }})
} else {
// 多账户切换时重定向
this.$router.replace({ path: '/' })
} }
// 若存在地址,判断此地址是否属于当前项目,catch 表明不是当前项目用户 // 若存在地址,判断此地址是否属于当前项目,catch 表明不是当前项目用户
if (_result) { if (_result) {
...@@ -46,7 +44,10 @@ export default Vue.extend({ ...@@ -46,7 +44,10 @@ export default Vue.extend({
}).then(() => { }).then(() => {
// 多账户切换时重定向 // 多账户切换时重定向
this.$router.replace({ path: '/' }) this.$router.replace({ path: '/' })
}) })
}
if (!walletRes.data.result?.datas && !_result) {
this.getInfo()
} }
} catch (e) { } catch (e) {
Toast({ Toast({
...@@ -70,7 +71,6 @@ export default Vue.extend({ ...@@ -70,7 +71,6 @@ export default Vue.extend({
} }
}) })
}, },
}, },
mounted() { mounted() {
getCurrentBTYAddress('',(res: string) => { getCurrentBTYAddress('',(res: string) => {
...@@ -80,7 +80,7 @@ export default Vue.extend({ ...@@ -80,7 +80,7 @@ export default Vue.extend({
console.log(ret, 'DEVICEID') console.log(ret, 'DEVICEID')
this.$store.commit('app/SET_DEVICEID', ret) this.$store.commit('app/SET_DEVICEID', ret)
this.hasPoolAddr(res) this.hasPoolAddr(res)
this.getInfo()
}) })
}) })
// this.$store.commit('app/SET_ADDRESS', test.addr) // this.$store.commit('app/SET_ADDRESS', test.addr)
......
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