红绿项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

94 lines
1.8 KiB

<template>
<view class="">
<balance @send="getSonValue" :currencySymbol="currencySymbol" :currentBalance="currentBalance"></balance>
<view class="index-body">
<view class="index-body-p1">
Game
</view>
<view class="index-body-img" @click="goColor">
<image src="../../../static/home/[email protected]" mode=""></image>
</view>
</view>
</view>
</template>
<script>
import Vue from 'vue';
import balance from "@/components/balance/balance.vue"
import api from '@/utils/api'
export default {
data() {
return {
currencySymbol:'',
currentBalance:'',
}
},
onLoad() {
this.currencySymbol=uni.getStorageSync('siteInfo').currencySymbol;
const post = api.withdrawConfig({
"ticket": uni.getStorageSync('logInfo').data,
})
post.then(res => {
if(res.data!=undefined){
this.currentBalance=res.data.currentBalance;
uni.setStorage({
key: 'currentBalance',
data: this.currentBalance,
success: function() {
console.log('success')
}
});
}
})
.catch(e => {
console.log(e)
})
const post2 = api.userInfo({
"ticket": uni.getStorageSync('logInfo').data,
})
post2.then(res => {
uni.setStorage({
key: 'MyInfo',
data: res.data,
success: function() {
console.log('success')
}
});
console.log(res.data)
})
.catch(e => {
uni.showToast({
title: e,
icon: 'none',
duration: 2500
})
})
},
methods: {
getSonValue(){
uni.reLaunch({
url:'../recharge/index'
})
},
goColor(){
uni.reLaunch({
url:'../color/index'
})
},
}
}
</script>
<style>
@import './index.css';
</style>