Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* eslint-disable */
- import React from 'react';
- import connect from '@vkontakte/vk-connect';
- import { View, platform, ModalRoot, ModalPage, ModalCard, Div, Avatar, Root, ActionSheet, ActionSheetItem, Button, ScreenSpinner, ConfigProvider, List, Cell, InfoRow, Snackbar, HeaderButton, TabbarItem, Epic, Tabbar, FormLayoutGroup, ModalPageHeader, Input, FormLayout, Alert} from '@vkontakte/vkui';
- import '@vkontakte/vkui/dist/vkui.css';
- import qr from '@vkontakte/vk-qr';
- import eruda from 'eruda'
- import Icon24Dismiss from '@vkontakte/icons/dist/24/dismiss';
- import Icon24Home from '@vkontakte/icons/dist/24/home';
- import Icon24Bug from '@vkontakte/icons/dist/24/bug';
- import Icon56GiftOutline from '@vkontakte/icons/dist/56/gift_outline';
- import Icon16Done from '@vkontakte/icons/dist/16/done';
- import Home from './panels/Home';
- import Persik from './panels/Persik';
- import Icon56CheckCircleDeviceOutline from '@vkontakte/icons/dist/56/check_circle_device_outline';
- import SystemFunctions from "./SystemFunctions";
- import House from './panels/House';
- import Pet from './panels/Pet';
- import MyPet from './panels/MyPet';
- import MyHouse from './panels/MyHouse';
- import Test from './panels/Test';
- import Dop from './panels/Dop';
- import Top from './panels/Top';
- import Reit from './panels/Reit';
- import Sett from './panels/Sett';
- import Referals from './panels/Referals';
- import Cases from './panels/Cases';
- import Chat from './panels/Chat';
- import ChangeNickname from './panels/ChangeNickname';
- import Transfer from './panels/Transfer';
- import TransferTest from './panels/TransferTest';
- import Transferinfo from './panels/Transferinfo';
- import Admin from './panels/Admin';
- import Katalog from './panels/Katalog';
- import Imus from './panels/Imus';
- import Icon28HelpOutline from '@vkontakte/icons/dist/28/help_outline';
- const MODAL_PAGE_FILTERS = 'filters';
- import vkConnect from '@vkontakte/vk-connect';
- const MODAL_PAGE_USER_INFO = 'user-info';
- import Upgrade from './panels/Upgrade';
- import Bonuse from './panels/Bonuse';
- function openTab(url) {
- // Create link in memory
- let a = window.document.createElement("a");
- a.target = '_blank';
- a.href = url;
- // Dispatch fake click
- let e = window.document.createEvent("MouseEvents");
- e.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
- a.dispatchEvent(e);
- };
- const blueBackground = {
- backgroundColor: 'var(--accent)'
- };
- const MODAL_CARD_MONEY_SEND = 'money-send';
- var ua = window.navigator.userAgent;
- class App extends React.Component {
- constructor(props) {
- super(props);
- this.state = {
- activePanel: 'home',
- activeTab1: 'recomendations',
- activeTab2: 'all',
- activeTab3: 'all',
- activeTab4: 'test',
- activeTab5: 'events',
- app_id: 7003049,
- activeTab6: 'all',
- contextOpened: true,
- fetchedUser: null,
- userAcc: null,
- activeTab6: 'all',
- qr_data: null,
- qrSvg: null,
- qrSvgProfile: null,
- qrSvgUser: null,
- clicks: 0,
- bank: null,
- reputation: 0,
- speed: 0,
- ban: false,
- activeModal: null,
- aspeed: 0,
- priv: null,
- name: false,
- popout: null,
- calcRep: 0,
- nick: null,
- toid: 0,
- stageTimer: SystemFunctions.calcCloseData(1584284400),
- history: 0,
- history1: null,
- history2: null,
- history3: null,
- history4: null,
- history5: null,
- history6: null,
- history7: null,
- history8: null,
- history9: null,
- activeStory: 'home',
- history10: null,
- h_id1: 0,
- h_id2: 0,
- promo1: 0,
- promo2: 0,
- promo3: 0,
- promo_s1: 0,
- promo_s2:0,
- promo_s3:0,
- h_id3: 0,
- h_id4: 0,
- h_id5: 0,
- h_id6: 0,
- h_id7: 0,
- h_id8: 0,
- h_id9: 0,
- h_id10: 0,
- h_s1: 0,
- h_s2: 0,
- h_s3: 0,
- h_s4: 0,
- h_s5: 0,
- h_s6: 0,
- qr_data: null,
- qrSvg: null,
- qrSvgProfile: null,
- qrSvgUser: null,
- h_s7: 0,
- h_s8: 0,
- h_s9: 0,
- h_s10: 0,
- viv: 0,
- indexStringProgress : 0,
- v1: null,
- v2: null,
- v3: null,
- v4: null,
- v5: null,
- v6: null,
- v7: null,
- v8: null,
- v9: null,
- v10: null,
- v_id1: 0,
- v_id2: 0,
- v_id3: 0,
- v_id4: 0,
- v_id5: 0,
- v_id6: 0,
- v_id7: 0,
- v_id8: 0,
- v_id9: 0,
- v_id10: 0,
- v_s1: 0,
- v_s2: 0,
- v_s3: 0,
- v_s4: 0,
- modalHistory: [],
- v_s5: 0,
- v_s6: 0,
- v_s7: 0,
- v_s8: 0,
- v_s9: 0,
- v_s10: 0,
- transferCoins: 0,
- qr_data: null,
- qrSvg: null,
- qrSvgProfile: null,
- qrSvgUser: null,
- usersTop: null,
- groupsTop: null,
- activeTabUpgrades: 'click',
- activeTabTop: 'users',
- text: '',
- snackbar: null,
- activeTabTrans: 'ishod',
- upgradesOne: null,
- text: '',
- snackbar: null,
- upgradesTwo: null,
- usersTopReputation: null,
- usersTopAutomine: null,
- chat_u1: 0,
- chat_u2: 0,
- chat_u3: 0,
- chat_u4: 0,
- chat_u5: 0,
- chat_u6: 0,
- chat_u7: 0,
- chat_u8: 0,
- chat_u9: 0,
- chat_u10: 0,
- chat_un1: 0,
- chat_un2: 0,
- chat_un3: 0,
- chat_un4: 0,
- chat_un5: 0,
- chat_un6: 0,
- chat_un7: 0,
- chat_un8: 0,
- chat_un9: 0,
- chat_un10: 0,
- chat_message1:0,
- chat_message2:0,
- chat_message3:0,
- chat_message4:0,
- chat_message5:0,
- chat_message6:0,
- chat_message7:0,
- chat_message8:0,
- chat_message9:0,
- chat_message10:0,
- chat_d1:0,
- chat_d2:0,
- chat_d3:0,
- chat_d4:0,
- chat_d5:0,
- chat_d6:0,
- chat_d7:0,
- chat_d8:0,
- chat_d9:0,
- chat_d10:0,
- sp: 0
- };
- this.openDefault = this.openDefault.bind(this);
- this.openDefaulte = this.openDefaulte.bind(this);
- this.openDef = this.openDef.bind(this);
- this.openBase = this.openBase.bind(this);
- this.closePopout = this.closePopout.bind(this);
- this.clickQrcode = this.clickQrcode.bind(this);
- this.stories = this.stories.bind(this);
- this.buyCase = this.buyCase.bind(this);
- this.post = this.post.bind(this);
- this.buyBonuse = this.buyBonuse.bind(this);
- this.handleReputationChange = this.handleReputationChange.bind(this);
- this.handleReputationSubmit = this.handleReputationSubmit.bind(this);
- this.handleNickChange = this.handleNickChange.bind(this);
- this.handleNickSubmit = this.handleNickSubmit.bind(this);
- this.onChangeText = this.onChangeText.bind(this);
- this.handleTransferChange = this.handleTransferChange.bind(this);
- this.handleTransferSubmit = this.handleTransferSubmit.bind(this);
- this.handlePromoChange = this.handlePromoChange.bind(this);
- this.handlePromoSubmit = this.handlePromoSubmit.bind(this);
- this.handleTransferChangee = this.handleTransferChange.bind(this);
- this.handleeTransferSubmit = this.handleTransferSubmit.bind(this);
- this.buyPet = this.buyPet.bind(this);
- this.sellPet = this.sellPet.bind(this);
- this.pohodPet = this.pohodPet.bind(this);
- this.buyHouse = this.buyHouse.bind(this);
- this.onStoryChange = this.onStoryChange.bind(this);
- this.sellHouse = this.sellHouse.bind(this);
- this.pohodHouse = this.pohodHouse.bind(this);
- this.setActiveTabUpgrades = this.setActiveTabUpgrades.bind(this);
- this.setActiveTabTop = this.setActiveTabTop.bind(this);
- this.setActiveTabTrans = this.setActiveTabTrans.bind(this);
- this.buyUpgrade = this.buyUpgrade.bind(this);
- this.openDestructive = this.openDestructive.bind(this);
- this.openDestructiv = this.openDestructiv.bind(this);
- this.toggleContext = this.toggleContext.bind(this);
- this.clickShare = this.clickShare.bind(this);
- this.select = this.select.bind(this);
- this.openBase = this.openBase.bind(this);
- this.getUpgradesOne = this.getUpgradesOne.bind(this);
- this.getUpgradesTwo = this.getUpgradesTwo.bind(this);
- this.autoMine = this.autoMine.bind(this);
- this.onRefresh = () => {
- this.getUsersTop();
- this.getGroupsTop();
- }
- this.modalBack = () => {
- this.setActiveModal(this.state.modalHistory[this.state.modalHistory.length - 2]);
- }
- setInterval(() => {
- this.setState({
- stageTimer: SystemFunctions.calcCloseData(1584284400),
- });
- }, 1000);
- }
- // Поделиться приложением
- clickShare() {
- connect.subscribe((e) => {
- switch (e.detail.type) {
- case 'VKWebAppShowWallPostBoxResult':
- this.setState({
- popout: <Alert
- actions={[{
- title: 'Закрыть',
- autoclose: true,
- style: 'cancel'
- }]}
- onClose={this.closePopout}
- >
- <h2>Успешно</h2>
- <p>Вы успешно опубликовали ссылку для перевода Вам монет, проверьте свою стену.</p>
- </Alert>
- })
- break;
- case 'VKWebAppShowWallPostBoxFailed':
- // Не опубликовал
- break;
- default:
- console.log(e.detail.type);
- }
- });
- connect.send("VKWebAppShowWallPostBox", {
- "link_title": "FastClick",
- "link_image": "https://sun9-55.userapi.com/c857028/v857028809/deb7b/1G-0k8UwblE.jpg",
- "attachments": "https://vk.com/app" + this.state.app_id + "#u=" + this.state.fetchedUser.id,
- "message": "#FastClick",
- "link_button": "open_url"
- });
- }
- openBase (title, msg, actions) {
- if (this.state.snackbar) return;
- this.setState({ snackbar:
- <Snackbar
- layout="vertical"
- onClose={() => this.setState({ snackbar: null })}
- before={<Avatar size={24} style={blueBackground}><Icon16Done fill="#fff" width={14} height={14} /></Avatar>}
- >
- {msg}
- </Snackbar>
- });
- }
- setActiveModal(activeModal) {
- activeModal = activeModal || null;
- let modalHistory = this.state.modalHistory ? [...this.state.modalHistory] : [];
- if (activeModal === null) {
- modalHistory = [];
- } else if (modalHistory.indexOf(activeModal) !== -1) {
- modalHistory = modalHistory.splice(0, modalHistory.indexOf(activeModal) + 1);
- } else {
- modalHistory.push(activeModal);
- }
- this.setState({
- activeModal,
- modalHistory
- });
- };
- onChangeText() {
- var summ_trans = document.getElementById('summ_trans').value;
- if (summ_trans > 0) {
- this.setState({ summ_trans: summ_trans });
- } else {
- this.setState({ summ_trans: null });
- }
- }
- openDefault(title, msg, actions) {
- this.setState({
- popout:
- <Alert
- actions={[actions]}
- onClose={this.closePopout}
- >
- <h2>{title}</h2>
- <p>{msg}</p>
- </Alert>
- });
- }
- story() {
- let url = `https://vk.com/app7003049`
- connect.send("VKWebAppShowStoryBox", { "background_type" : "image", "url" : "https://sun9-55.userapi.com/c857720/v857720739/180c3e/JHc_Yxj7Los.jpg", "locked" : "true", "attachment" : {
- "text": "open",
- "type": "url",
- "url": url
- } });
- }
- vkpost() {
- connect.send("VKWebAppShowWallPostBox", {"message": "Привет! Я играю в сервис FastClick! Давай и ты! Прокачивавай свой профиль, покупай ускорители, выходи в ТОП! Ссылка - https://vk.com/app7003049 #FastClick"});
- }
- openDestructive () {
- this.setState({ popout:
- <Alert
- actionsLayout="vertical"
- actions={[{
- title: 'Понятно',
- autoclose: true,
- style: 'cancel'
- }]}
- onClose={this.closePopout}
- >
- <h2>Обновление</h2>
- <p>Достижения станут активными через: {this.state.stageTimer}</p>
- </Alert>
- });
- }
- openDestructiv () {
- this.setState({ popout:
- <Alert
- actionsLayout="vertical"
- actions={[{
- title: 'Продолжить',
- autoclose: true,
- style: 'cancel'
- }]}
- onClose={this.closePopout}
- >
- <h2>С возвращением! </h2>
- <p>{`${fetchedUser.first_name} ${fetchedUser.last_name}`}, здравствуйте! </p>
- </Alert>
- });
- }
- res () {
- window.location.reload()
- }
- openDef(title, msg, actions) {
- this.setState({
- popout:
- <Alert
- actions={[actions]}
- onClose={this.closePopout}
- >
- <h2>тест</h2>
- <p>тест</p>
- </Alert>
- });
- }
- closePopout() {
- this.setState({ popout: null });
- }
- openBase () {
- if (this.state.snackbar) return;
- this.setState({ snackbar:
- <Snackbar
- layout="vertical"
- onClose={() => this.setState({ snackbar: null })}
- before={<Avatar size={24} style={blueBackground}><Icon16Done fill="#fff" width={14} height={14} /></Avatar>}
- >
- Уведомления о подкастах включены
- </Snackbar>
- });
- }
- componentDidMount() {
- window.addEventListener('popstate', e => e.preventDefault() & this.menu(e));
- window.history.pushState( { panel: 'home' }, `home` );
- connect.subscribe((e) => {
- switch (e.detail.type) {
- case 'VKWebAppGetUserInfoResult':
- this.setState({ fetchedUser: e.detail.data });
- // if (navigator.userAgent.match(/(android|iphone|ipad|ipod)/i) == null) {
- // this.setState({ activePanel : 'admin' })
- // }
- let hash = this.getLocationHash()
- if (hash === 'profile') {
- this.setState({ activePanel : 'katalog' })
- }
- if (this.state.status === true) {
- this.setState({ activePanel : 'admin' })
- }
- if (hash === 'transfer') {
- this.setState({ activePanel : 'TransferTest' })
- }
- if (hash === 'banned') {
- this.setState({ activePanel : 'admin' })
- }
- if (hash === 'case') {
- this.setState({ activePanel : 'cases' })
- }
- if (hash === 'games') {
- this.setState({ activePanel : 'sett' })
- }
- if (hash === 'bank') {
- this.setState({ activePanel : 'imus' })
- }
- if (hash === 'progress') {
- this.setState({ activePanel : 'myHouse' })
- }
- if (hash === 'shop') {
- this.setState({ activePanel : 'persik' })
- }
- if (hash === 'home') {
- this.setState({ activePanel : 'home' })
- }
- if (hash === 'top') {
- this.setState({ activePanel : 'top' })
- }
- if (hash === 'help') {
- this.setState({ activePanel : 'Test' })
- }
- if (hash === 'test_scheme_android') {
- document.body.setAttribute('scheme', 'android_theme')
- connect.send('VKWebAppSetViewSettings', { 'status_bar_style': 'dark', 'action_bar_color': '#ffcc00' })
- }
- console.log(e.detail.data)
- this.createUser(e.detail.data);
- this.openBase()
- this.setState({ popout: <ScreenSpinner /> });
- setTimeout(() => {
- this.setState({ popout: null }) }, 2000);
- this.getUsersTop();
- this.getGroupsTop();
- this.getUsersTopReputation();
- this.getUsersTopAutomine();
- this.getUpgradesOne()
- this.getUpgradesTwo()
- // Создаем QR-code
- var text = 'https://vk.com/app' + this.state.app_id + '#u=' + this.state.fetchedUser.id;
- var isShowVkLogo = true;
- var qrSvg = qr.createQR(text, 256, 'qr-code-class', isShowVkLogo)
- var qrSvg = qr.createQR(text, 256, 'qr-code-class', isShowVkLogo);
- this.setState({ qrSvgProfile: qrSvg })
- this.setState({ qrSvgUser: qrSvg })
- break;
- case 'VKWebAppShowStoryBoxResult':
- this.stories();
- break;
- case 'VKWebAppShowWallPostBoxResult':
- this.post();
- break;
- case 'VKWebAppGetClientVersion':
- break;
- default:
- console.log(e.detail.type);
- }
- });
- connect.send('VKWebAppGetUserInfo', {});
- console.log(window.location)
- setInterval(() => {
- //this.autoMine();
- this.getChat();
- this.getGroupsTop();
- this.getUsersTopAutomine();
- this.getUsersTopReputation();
- console.log(1);
- }, 1000)
- }
- go = (e) => {
- window.history.pushState( { panel: e.currentTarget.dataset.to }, `${e.currentTarget.dataset.to}` );
- this.setState({ popout: <ScreenSpinner /> });
- setTimeout(() => { this.setState({ popout: null }) }, 500);
- this.setState({ activePanel: e.currentTarget.dataset.to })
- if(e.currentTarget.dataset.to === "top") {
- this.getUsersTop();
- this.getGroupsTop();
- }
- }
- storywin = () => {
- let clicks = Number(this.state.clicks) + 7777;
- //this.setState({ clicks: clicks })
- this.updateUserClicks(this.state.fetchedUser.id, clicks)
- }
- menu (e) {
- if(e.state) {
- this.setState( { activePanel: e.state.panel } );
- } else {
- this.setState( { activePanel: 'home', search: '' } );
- window.history.pushState( { panel: 'home' }, `home` );
- }
- }
- getChat = async (id, toid, count) => {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=get.chat.message`
- })
- .then((response) => response.json())
- .then((response) => {
- console.log("CHAT!!!");
- console.log(response)
- switch (response.status) {
- case 'success':
- this.openDefault("Успех", response.msg, {
- title: 'ОК',
- autoclose: true,
- })
- break;
- case 'error':
- this.openDefault("Ошибка", response.msg, {
- title: 'ОК',
- autoclose: true,
- style: "destructive"
- })
- break;
- default: break;
- }
- this.setState({ userAcc: response })
- this.setState({chat_photo1: response[0].photo})
- this.setState({chat_photo2: response[1].photo})
- this.setState({chat_photo3: response[2].photo})
- this.setState({chat_photo4: response[3].photo})
- this.setState({chat_photo5: response[4].photo})
- this.setState({chat_photo6: response[5].photo})
- this.setState({chat_photo7: response[6].photo})
- this.setState({chat_photo8: response[7].photo})
- this.setState({chat_photo9: response[8].photo})
- this.setState({chat_photo10: response[9].photo})
- this.setState({ chat_u1: response[0].user, chat_un1: response[0].username, chat_message1: response[0].sms, chat_d1: response[0].date })
- this.setState({ chat_u2: response[1].user, chat_un2: response[1].username, chat_message2: response[1].sms, chat_d2: response[1].date })
- this.setState({ chat_u3: response[2].user, chat_un3: response[2].username, chat_message3: response[2].sms, chat_d3: response[2].date })
- this.setState({ chat_u4: response[3].user, chat_un4: response[3].username, chat_message4: response[3].sms, chat_d4: response[3].date })
- this.setState({ chat_u5: response[4].user, chat_un5: response[4].username, chat_message5: response[4].sms, chat_d5: response[4].date })
- this.setState({ chat_u6: response[5].user, chat_un6: response[5].username, chat_message6: response[5].sms, chat_d6: response[5].date })
- this.setState({ chat_u7: response[6].user, chat_un7: response[6].username, chat_message7: response[6].sms, chat_d7: response[6].date })
- this.setState({ chat_u8: response[7].user, chat_un8: response[7].username, chat_message8: response[7].sms, chat_d8: response[7].date })
- this.setState({ chat_u9: response[8].user, chat_un9: response[8].username, chat_message9: response[8].sms, chat_d9: response[8].date })
- this.setState({ chat_u10: response[9].user, chat_un10: response[9].username, chat_message10: response[9].sms, chat_d10: response[9].date })
- })
- .catch((error) => {
- console.error(error)
- })
- }
- getUsersTopReputation = () => {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=get.users.top.reputation`
- })
- .then((response) => response.json())
- .then((response) => {
- this.setState({ usersTopReputation: response });
- console.log('reputation', response)
- })
- .catch((error) => {
- console.error(error)
- })
- }
- getUsersTopAutomine = () => {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=get.users.top.automine`
- })
- .then((response) => response.json())
- .then((response) => {
- this.setState({ usersTopAutomine: response });
- console.log('reputation', response)
- })
- .catch((error) => {
- console.error(error)
- })
- }
- clickQrcode() {
- connect.subscribe((e) => {
- switch (e.detail.type) {
- case 'VKWebAppOpenQRResult':
- this.setState({ qr_data: e.detail.data });
- const link = e.detail.data.qr_data;
- var urlapi = require('url'),
- url = urlapi.parse(link);
- var app_id = url.pathname.replace(/^.{4}/, '');
- if (url.hash != null) {
- var hash = url.hash.replace(/^.{1}/, '');
- } else {
- var hash = null;
- }
- connect.send("VKWebAppOpenApp", { "app_id": app_id, link: hash });
- break;
- case 'VKWebAppOpenQRFailed':
- // alert('QR-code не был отсканирован');
- break;
- default:
- console.log(e.detail.type);
- }
- });
- connect.send("VKWebAppOpenQR");
- }
- dont = ()=> {
- this.setState({activePanel: "katalog"})
- }
- share = (e) => {
- connect.send("VKWebAppShowStoryBox", { "background_type" : "image", "url" : "https://sun9-65.userapi.com/c850136/v850136098/1b77eb/0YK6suXkY24.jpg" });
- }
- buyCase(case_id) {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=user.buy.case&user_vk=${this.state.fetchedUser.id}&case_id=${case_id}`
- })
- .then((response) => response.json())
- .then((response) => {
- //console.log(response)
- switch(response.status) {
- case 'success':
- this.openDefault("Успех", response.msg, {
- title: 'ОК',
- autoclose: true,
- })
- break;
- case 'error':
- this.openDefault("Ошибка", response.msg, {
- title: 'ОК',
- autoclose: true,
- style: "destructive"
- })
- break;
- default: break;
- }
- this.setState({ userAcc: response })
- this.setState({ clicks: response.clicks, reputation: response.reputation, speed: response.speed, aspeed: response.aspeed })
- })
- .catch((error) => {
- console.error(error)
- })
- }
- buyBonuse(bonuse_id) {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=user.bonuse&user_vk=${this.state.fetchedUser.id}&bonuse_id=${bonuse_id}`
- })
- .then((response) => response.json())
- .then((response) => {
- //console.log(response)
- switch(response.status) {
- case 'success':
- this.openDefault("Успех", response.msg, {
- title: 'ОК',
- autoclose: true,
- })
- break;
- case 'error':
- this.openDefault("Ошибка", response.msg, {
- title: 'ОК',
- autoclose: true,
- style: "destructive"
- })
- break;
- default: break;
- }
- this.setState({ userAcc: response })
- this.setState({ clicks: response.clicks, reputation: response.reputation, speed: response.speed, aspeed: response.aspeed })
- })
- .catch((error) => {
- console.error(error)
- })
- }
- createUser = (data) => {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=user.create`
- })
- .then((response) => response.json())
- .then((response) => {
- this.setState({ ban: response.ban })
- this.setState({ history: response.history })
- this.setState({ bank: response.bank })
- this.setState({ history1: response.history1 })
- this.setState({ history2: response.history2 })
- this.setState({ history3: response.history3 })
- this.setState({ history4: response.history4 })
- this.setState({ history5: response.history5 })
- this.setState({ promo1: response.promo1 })
- this.setState({ promo2: response.promo2 })
- this.setState({ promo3: response.promo3})
- this.setState({ history6: response.history6 })
- this.setState({ history7: response.history7 })
- this.setState({ history8: response.history8 })
- this.setState({ history9: response.history9 })
- this.setState({ history10: response.history10 })
- this.setState({ h_id1: response.h_id1 })
- this.setState({ h_id2: response.h_id2 })
- this.setState({ h_id3: response.h_id3 })
- this.setState({ h_id4: response.h_id4 })
- this.setState({ h_id5: response.h_id5 })
- this.setState({ h_id7: response.h_id7 })
- this.setState({ h_id8: response.h_id8 })
- this.setState({ h_id9: response.h_id9 })
- this.setState({ h_id10: response.h_id10 })
- this.setState({ h_id6: response.h_id6 })
- this.setState({ h_s1: response.h_s1 })
- this.setState({ h_s2: response.h_s2 })
- this.setState({ h_s3: response.h_s3 })
- this.setState({ h_s4: response.h_s4 })
- this.setState({ h_s5: response.h_s5 })
- this.setState({ h_s6: response.h_s6 })
- this.setState({ h_s7: response.h_s7 })
- this.setState({ h_s8: response.h_s8 })
- this.setState({ h_s9: response.h_s9 })
- this.setState({ h_s10: response.h_s10 })
- this.setState({ viv: response.viv })
- this.setState({ v1: response.v1 })
- this.setState({ v2: response.v2 })
- this.setState({ v3: response.v3 })
- this.setState({ v4: response.v4 })
- this.setState({ v5: response.v5 })
- this.setState({ v6: response.v6 })
- this.setState({ v7: response.v7 })
- this.setState({ v8: response.v8 })
- this.setState({ v9: response.v9 })
- this.setState({ v10: response.v10 })
- this.setState({ v_id1: response.v_id1 })
- this.setState({ v_id2: response.v_id2 })
- this.setState({ v_id3: response.v_id3 })
- this.setState({ v_id4: response.v_id4 })
- this.setState({ v_id5: response.v_id5 })
- this.setState({ v_id7: response.v_id7 })
- this.setState({ v_id8: response.v_id8 })
- this.setState({ v_id9: response.v_id9 })
- this.setState({ v_id10: response.v_id10 })
- this.setState({ v_id6: response.v_id6 })
- this.setState({ v_s1: response.v_s1 })
- this.setState({ v_s2: response.v_s2 })
- this.setState({ v_s3: response.v_s3 })
- this.setState({ v_s4: response.v_s4 })
- this.setState({ v_s5: response.v_s5 })
- this.setState({ v_s6: response.v_s6 })
- this.setState({ v_s7: response.v_s7 })
- this.setState({ v_s8: response.v_s8 })
- this.setState({ v_s9: response.v_s9 })
- this.setState({ v_s10: response.v_s10 })
- // console.log(response)
- this.setState({ userAcc: response })
- this.setState({ clicks: response.clicks, reputation: response.reputation, speed: response.speed, aspeed: response.aspeed })
- //console.log(this.state.userAcc)
- })
- .catch((error) => {
- console.log(error)
- })
- }
- getLocationHash() {
- return window.location.hash.replace('#','')
- }
- updateUserClicks = async (id) => {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=user.update.click&user_vk=${id}`
- })
- .then((response) => response.json())
- .then((response) => {
- //console.log('user', response)
- this.setState({ userAcc: response })
- this.setState({ clicks: response.clicks, reputation: response.reputation, speed: response.speed, aspeed: response.aspeed })
- this.setState({ history: response.history })
- this.setState({ history1: response.history1 })
- this.setState({ bank: response.bank })
- this.setState({ ban: response.ban })
- this.setState({ history2: response.history2 })
- this.setState({ history3: response.history3 })
- this.setState({ history4: response.history4 })
- this.setState({ history5: response.history5 })
- this.setState({ history6: response.history6 })
- this.setState({ history7: response.history7 })
- this.setState({ history8: response.history8 })
- this.setState({ history9: response.history9 })
- this.setState({ history10: response.history10 })
- this.setState({ h_id1: response.h_id1 })
- this.setState({ h_id2: response.h_id2 })
- this.setState({ h_id3: response.h_id3 })
- this.setState({ h_id4: response.h_id4 })
- this.setState({ h_id5: response.h_id5 })
- this.setState({ h_id7: response.h_id7 })
- this.setState({ h_id8: response.h_id8 })
- this.setState({ h_id9: response.h_id9 })
- this.setState({ h_id10: response.h_id10 })
- this.setState({ h_id6: response.h_id6 })
- this.setState({ h_s1: response.h_s1 })
- this.setState({ h_s2: response.h_s2 })
- this.setState({ h_s3: response.h_s3 })
- this.setState({ h_s4: response.h_s4 })
- this.setState({ h_s5: response.h_s5 })
- this.setState({ h_s6: response.h_s6 })
- this.setState({ h_s7: response.h_s7 })
- this.setState({ h_s8: response.h_s8 })
- this.setState({ h_s9: response.h_s9 })
- this.setState({ h_s10: response.h_s10 })
- this.setState({ viv: response.viv })
- this.setState({ v1: response.v1 })
- this.setState({ v2: response.v2 })
- this.setState({ v3: response.v3 })
- this.setState({ v4: response.v4 })
- this.setState({ v5: response.v5 })
- this.setState({ v6: response.v6 })
- this.setState({ v7: response.v7 })
- this.setState({ v8: response.v8 })
- this.setState({ v9: response.v9 })
- this.setState({ v10: response.v10 })
- this.setState({ v_id1: response.v_id1 })
- this.setState({ v_id2: response.v_id2 })
- this.setState({ v_id3: response.v_id3 })
- this.setState({ v_id4: response.v_id4 })
- this.setState({ v_id5: response.v_id5 })
- this.setState({ v_id7: response.v_id7 })
- this.setState({ v_id8: response.v_id8 })
- this.setState({ v_id9: response.v_id9 })
- this.setState({ v_id10: response.v_id10 })
- this.setState({ v_id6: response.v_id6 })
- this.setState({ v_s1: response.v_s1 })
- this.setState({ v_s2: response.v_s2 })
- this.setState({ v_s3: response.v_s3 })
- this.setState({ v_s4: response.v_s4 })
- this.setState({ v_s5: response.v_s5 })
- this.setState({ v_s6: response.v_s6 })
- this.setState({ v_s7: response.v_s7 })
- this.setState({ v_s8: response.v_s8 })
- this.setState({ v_s9: response.v_s9 })
- this.setState({ v_s10: response.v_s10 })
- })
- .catch((error) => {
- console.error(error)
- })
- }
- BankUserPlus = async (id) => {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=user.bank.plus&user_vk=${id}`
- })
- .then((response) => response.json())
- .then((response) => {
- //console.log('user', response)
- this.setState({ userAcc: response })
- this.setState({ clicks: response.clicks, reputation: response.reputation, speed: response.speed, aspeed: response.aspeed })
- this.setState({ history: response.history })
- this.setState({ history1: response.history1 })
- this.setState({ bank: response.bank })
- this.setState({ history2: response.history2 })
- this.setState({ history3: response.history3 })
- this.setState({ history4: response.history4 })
- this.setState({ history5: response.history5 })
- this.setState({ history6: response.history6 })
- this.setState({ history7: response.history7 })
- this.setState({ history8: response.history8 })
- this.setState({ history9: response.history9 })
- this.setState({ history10: response.history10 })
- this.setState({ h_id1: response.h_id1 })
- this.setState({ h_id2: response.h_id2 })
- this.setState({ h_id3: response.h_id3 })
- this.setState({ h_id4: response.h_id4 })
- this.setState({ h_id5: response.h_id5 })
- this.setState({ h_id7: response.h_id7 })
- this.setState({ h_id8: response.h_id8 })
- this.setState({ h_id9: response.h_id9 })
- this.setState({ h_id10: response.h_id10 })
- this.setState({ h_id6: response.h_id6 })
- this.setState({ h_s1: response.h_s1 })
- this.setState({ h_s2: response.h_s2 })
- this.setState({ h_s3: response.h_s3 })
- this.setState({ h_s4: response.h_s4 })
- this.setState({ h_s5: response.h_s5 })
- this.setState({ h_s6: response.h_s6 })
- this.setState({ h_s7: response.h_s7 })
- this.setState({ h_s8: response.h_s8 })
- this.setState({ h_s9: response.h_s9 })
- this.setState({ h_s10: response.h_s10 })
- this.setState({ viv: response.viv })
- this.setState({ v1: response.v1 })
- this.setState({ v2: response.v2 })
- this.setState({ v3: response.v3 })
- this.setState({ v4: response.v4 })
- this.setState({ v5: response.v5 })
- this.setState({ v6: response.v6 })
- this.setState({ v7: response.v7 })
- this.setState({ v8: response.v8 })
- this.setState({ v9: response.v9 })
- this.setState({ v10: response.v10 })
- this.setState({ v_id1: response.v_id1 })
- this.setState({ v_id2: response.v_id2 })
- this.setState({ v_id3: response.v_id3 })
- this.setState({ v_id4: response.v_id4 })
- this.setState({ v_id5: response.v_id5 })
- this.setState({ v_id7: response.v_id7 })
- this.setState({ v_id8: response.v_id8 })
- this.setState({ v_id9: response.v_id9 })
- this.setState({ v_id10: response.v_id10 })
- this.setState({ v_id6: response.v_id6 })
- this.setState({ v_s1: response.v_s1 })
- this.setState({ v_s2: response.v_s2 })
- this.setState({ v_s3: response.v_s3 })
- this.setState({ v_s4: response.v_s4 })
- this.setState({ v_s5: response.v_s5 })
- this.setState({ v_s6: response.v_s6 })
- this.setState({ v_s7: response.v_s7 })
- this.setState({ v_s8: response.v_s8 })
- this.setState({ v_s9: response.v_s9 })
- this.setState({ v_s10: response.v_s10 })
- this.setState({ bank: response.bank })
- })
- .catch((error) => {
- console.error(error)
- })
- }
- Ban = async (id) => {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=user.bank.plus&user_vk=${id}`
- })
- .then((response) => response.json())
- .then((response) => {
- //console.log('user', response)
- this.setState({ ban: response.ban })
- })
- .catch((error) => {
- console.error(error)
- })
- }
- UserNewBank = (id, bankkk) => {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=user.bank&user_vk=${id}&bank=${bankkk}`
- })
- .then((response) => response.json())
- .then((response) => {
- //console.log(response)
- switch (response.status) {
- case 'success':
- this.openDefault("Успешно", response.msg, {
- title: 'ОК',
- autoclose: true,
- })
- break;
- case 'error':
- this.openDefault("Ошибка", response.msg, {
- title: 'ОК',
- autoclose: true,
- style: "destructive"
- })
- break;
- }
- this.setState({ bank: response.bank })
- this.setState({ history: response.history })
- this.setState({ history1: response.history1 })
- this.setState({ history2: response.history2 })
- this.setState({ history3: response.history3 })
- this.setState({ history4: response.history4 })
- this.setState({ history5: response.history5 })
- this.setState({ history6: response.history6 })
- this.setState({ history7: response.history7 })
- this.setState({ history8: response.history8 })
- this.setState({ history9: response.history9 })
- this.setState({ history10: response.history10 })
- this.setState({ h_id1: response.h_id1 })
- this.setState({ h_id2: response.h_id2 })
- this.setState({ h_id3: response.h_id3 })
- this.setState({ h_id4: response.h_id4 })
- this.setState({ h_id5: response.h_id5 })
- this.setState({ h_id7: response.h_id7 })
- this.setState({ h_id8: response.h_id8 })
- this.setState({ h_id9: response.h_id9 })
- this.setState({ h_id10: response.h_id10 })
- this.setState({ h_id6: response.h_id6 })
- this.setState({ h_s1: response.h_s1 })
- this.setState({ h_s2: response.h_s2 })
- this.setState({ h_s3: response.h_s3 })
- this.setState({ h_s4: response.h_s4 })
- this.setState({ h_s5: response.h_s5 })
- this.setState({ h_s6: response.h_s6 })
- this.setState({ h_s7: response.h_s7 })
- this.setState({ h_s8: response.h_s8 })
- this.setState({ h_s9: response.h_s9 })
- this.setState({ h_s10: response.h_s10 })
- this.setState({ viv: response.viv })
- this.setState({ v1: response.v1 })
- this.setState({ v2: response.v2 })
- this.setState({ v3: response.v3 })
- this.setState({ v4: response.v4 })
- this.setState({ v5: response.v5 })
- this.setState({ v6: response.v6 })
- this.setState({ v7: response.v7 })
- this.setState({ v8: response.v8 })
- this.setState({ v9: response.v9 })
- this.setState({ v10: response.v10 })
- this.setState({ v_id1: response.v_id1 })
- this.setState({ v_id2: response.v_id2 })
- this.setState({ v_id3: response.v_id3 })
- this.setState({ v_id4: response.v_id4 })
- this.setState({ v_id5: response.v_id5 })
- this.setState({ v_id7: response.v_id7 })
- this.setState({ v_id8: response.v_id8 })
- this.setState({ v_id9: response.v_id9 })
- this.setState({ v_id10: response.v_id10 })
- this.setState({ v_id6: response.v_id6 })
- this.setState({ v_s1: response.v_s1 })
- this.setState({ v_s2: response.v_s2 })
- this.setState({ v_s3: response.v_s3 })
- this.setState({ v_s4: response.v_s4 })
- this.setState({ v_s5: response.v_s5 })
- this.setState({ v_s6: response.v_s6 })
- this.setState({ v_s7: response.v_s7 })
- this.setState({ v_s8: response.v_s8 })
- this.setState({ v_s9: response.v_s9 })
- this.setState({ v_s10: response.v_s10 })
- })
- .catch((error) => {
- console.error(error)
- })
- }
- updateUserReputation = (id, reputation) => {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=user.update.reputation&user_vk=${id}&reputation_new=${reputation}`
- })
- .then((response) => response.json())
- .then((response) => {
- //console.log(response)
- switch (response.status) {
- case 'success':
- this.openDefault("Успех", response.msg, {
- title: 'ОК',
- autoclose: true,
- })
- break;
- case 'error':
- this.openDefault("Ошибка", response.msg, {
- title: 'ОК',
- autoclose: true,
- style: "destructive"
- })
- break;
- default: break;
- }
- this.setState({ userAcc: response })
- this.setState({ clicks: response.clicks, reputation: response.reputation, speed: response.speed, aspeed: response.aspeed })
- this.setState({ history: response.history })
- this.setState({ history1: response.history1 })
- this.setState({ history2: response.history2 })
- this.setState({ history3: response.history3 })
- this.setState({ history4: response.history4 })
- this.setState({ history5: response.history5 })
- this.setState({ history6: response.history6 })
- this.setState({ history7: response.history7 })
- this.setState({ history8: response.history8 })
- this.setState({ history9: response.history9 })
- this.setState({ history10: response.history10 })
- this.setState({ h_id1: response.h_id1 })
- this.setState({ h_id2: response.h_id2 })
- this.setState({ h_id3: response.h_id3 })
- this.setState({ h_id4: response.h_id4 })
- this.setState({ h_id5: response.h_id5 })
- this.setState({ h_id7: response.h_id7 })
- this.setState({ h_id8: response.h_id8 })
- this.setState({ h_id9: response.h_id9 })
- this.setState({ h_id10: response.h_id10 })
- this.setState({ h_id6: response.h_id6 })
- this.setState({ h_s1: response.h_s1 })
- this.setState({ h_s2: response.h_s2 })
- this.setState({ h_s3: response.h_s3 })
- this.setState({ h_s4: response.h_s4 })
- this.setState({ h_s5: response.h_s5 })
- this.setState({ h_s6: response.h_s6 })
- this.setState({ h_s7: response.h_s7 })
- this.setState({ h_s8: response.h_s8 })
- this.setState({ h_s9: response.h_s9 })
- this.setState({ h_s10: response.h_s10 })
- this.setState({ viv: response.viv })
- this.setState({ v1: response.v1 })
- this.setState({ v2: response.v2 })
- this.setState({ v3: response.v3 })
- this.setState({ v4: response.v4 })
- this.setState({ v5: response.v5 })
- this.setState({ v6: response.v6 })
- this.setState({ v7: response.v7 })
- this.setState({ v8: response.v8 })
- this.setState({ v9: response.v9 })
- this.setState({ v10: response.v10 })
- this.setState({ v_id1: response.v_id1 })
- this.setState({ v_id2: response.v_id2 })
- this.setState({ v_id3: response.v_id3 })
- this.setState({ v_id4: response.v_id4 })
- this.setState({ v_id5: response.v_id5 })
- this.setState({ v_id7: response.v_id7 })
- this.setState({ v_id8: response.v_id8 })
- this.setState({ v_id9: response.v_id9 })
- this.setState({ v_id10: response.v_id10 })
- this.setState({ v_id6: response.v_id6 })
- this.setState({ v_s1: response.v_s1 })
- this.setState({ v_s2: response.v_s2 })
- this.setState({ v_s3: response.v_s3 })
- this.setState({ v_s4: response.v_s4 })
- this.setState({ v_s5: response.v_s5 })
- this.setState({ v_s6: response.v_s6 })
- this.setState({ v_s7: response.v_s7 })
- this.setState({ v_s8: response.v_s8 })
- this.setState({ v_s9: response.v_s9 })
- this.setState({ v_s10: response.v_s10 })
- })
- .catch((error) => {
- console.error(error)
- })
- }
- updateUserNickname = (id, nickname) => {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=user.update.nickname&user_vk=${id}&nickname=${nickname}`
- })
- .then((response) => response.json())
- .then((response) => {
- //console.log(response)
- switch (response.status) {
- case 'success':
- this.openDefault("Успех", response.msg, {
- title: 'ОК',
- autoclose: true,
- })
- break;
- case 'error':
- this.openDefault("Ошибка", response.msg, {
- title: 'ОК',
- autoclose: true,
- style: "destructive"
- })
- break;
- default: break;
- }
- this.setState({ userAcc: response })
- this.setState({ clicks: response.clicks, reputation: response.reputation, speed: response.speed, aspeed: response.aspeed })
- })
- .catch((error) => {
- console.error(error)
- })
- }
- addv = () => {
- connect.send("VKWebAppAddToCommunity", {});
- }
- sendTransfer = async (id, toid, count) => {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=user.send.transfer&user_vk=${id}&toid=${toid}&count=${count}`
- })
- .then((response) => response.json())
- .then((response) => {
- //console.log(response)
- switch (response.status) {
- case 'success':
- this.openDefault("Успех", response.msg, {
- title: 'ОК',
- autoclose: true,
- })
- break;
- case 'error':
- this.openDefault("Ошибка", response.msg, {
- title: 'ОК',
- autoclose: true,
- style: "destructive"
- })
- break;
- default: break;
- }
- this.setState({ userAcc: response })
- this.setState({ clicks: response.clicks, reputation: response.reputation, speed: response.speed, aspeed: response.aspeed })
- this.setState({ history: response.history })
- this.setState({ history1: response.history1 })
- this.setState({ history2: response.history2 })
- this.setState({ history3: response.history3 })
- this.setState({ history4: response.history4 })
- this.setState({ history5: response.history5 })
- this.setState({ history6: response.history6 })
- this.setState({ history7: response.history7 })
- this.setState({ history8: response.history8 })
- this.setState({ history9: response.history9 })
- this.setState({ history10: response.history10 })
- this.setState({ h_id1: response.h_id1 })
- this.setState({ h_id2: response.h_id2 })
- this.setState({ h_id3: response.h_id3 })
- this.setState({ h_id4: response.h_id4 })
- this.setState({ h_id5: response.h_id5 })
- this.setState({ h_id7: response.h_id7 })
- this.setState({ h_id8: response.h_id8 })
- this.setState({ h_id9: response.h_id9 })
- this.setState({ h_id10: response.h_id10 })
- this.setState({ h_id6: response.h_id6 })
- this.setState({ h_s1: response.h_s1 })
- this.setState({ h_s2: response.h_s2 })
- this.setState({ h_s3: response.h_s3 })
- this.setState({ h_s4: response.h_s4 })
- this.setState({ h_s5: response.h_s5 })
- this.setState({ h_s6: response.h_s6 })
- this.setState({ h_s7: response.h_s7 })
- this.setState({ h_s8: response.h_s8 })
- this.setState({ h_s9: response.h_s9 })
- this.setState({ h_s10: response.h_s10 })
- this.setState({ viv: response.viv })
- this.setState({ v1: response.v1 })
- this.setState({ v2: response.v2 })
- this.setState({ v3: response.v3 })
- this.setState({ v4: response.v4 })
- this.setState({ v5: response.v5 })
- this.setState({ v6: response.v6 })
- this.setState({ v7: response.v7 })
- this.setState({ v8: response.v8 })
- this.setState({ v9: response.v9 })
- this.setState({ v10: response.v10 })
- this.setState({ v_id1: response.v_id1 })
- this.setState({ v_id2: response.v_id2 })
- this.setState({ v_id3: response.v_id3 })
- this.setState({ v_id4: response.v_id4 })
- this.setState({ v_id5: response.v_id5 })
- this.setState({ v_id7: response.v_id7 })
- this.setState({ v_id8: response.v_id8 })
- this.setState({ v_id9: response.v_id9 })
- this.setState({ v_id10: response.v_id10 })
- this.setState({ v_id6: response.v_id6 })
- this.setState({ v_s1: response.v_s1 })
- this.setState({ v_s2: response.v_s2 })
- this.setState({ v_s3: response.v_s3 })
- this.setState({ v_s4: response.v_s4 })
- this.setState({ v_s5: response.v_s5 })
- this.setState({ v_s6: response.v_s6 })
- this.setState({ v_s7: response.v_s7 })
- this.setState({ v_s8: response.v_s8 })
- this.setState({ v_s9: response.v_s9 })
- this.setState({ v_s10: response.v_s10 })
- })
- .catch((error) => {
- console.error(error)
- })
- }
- getUsersTop = async () => {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=get.users.top`
- })
- .then((response) => response.json())
- .then((response) => {
- this.setState({ usersTop: response })
- })
- .catch((error) => {
- console.error(error)
- })
- }
- getUsersTopRating = async () => {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=get.users.toprating`
- })
- .then((response) => response.json())
- .then((response) => {
- this.setState({ usersTop: response })
- })
- .catch((error) => {
- console.error(error)
- })
- }
- getGroupsTop = () => {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=get.groups.top`
- })
- .then((response) => response.json())
- .then((response) => {
- this.setState({ groupsTop: response });
- })
- .catch((error) => {
- console.error(error)
- })
- }
- handleReputationChange(event) {
- const price = event.target.value;
- this.setState({ calcRep: price * 10000});
- this.setState({ sp: price });
- }
- handleReputationSubmit(event) {
- if (this.state.clicks < 9999) {
- this.openDefault("Ошибка!!", "Недостаточно денег для покупки рейтинга. Курс: 1 рейтинг = 10000 FC", {
- title: 'ОК',
- autoclose: true,
- style: "destructive"
- })
- }
- else {
- this.updateUserReputation(this.state.fetchedUser.id, this.state.sp)
- }
- event.preventDefault();
- }
- handleNickChange(event) {
- //console.log(event.target)
- this.setState({ nick: event.target.value})
- }
- handleNickSubmit(event) {
- if (this.state.nick === null || this.state.nick === "") {
- return this.openDefault("Ошибка", "Введите ник", {
- title: 'ОК',
- autoclose: true,
- style: "destructive"
- })
- }
- else this.updateUserNickname(this.state.fetchedUser.id, this.state.nick)
- event.preventDefault();
- }
- handlePromoChange(event) {
- //console.log(event.target)
- const target = event.target;
- const name = target.name;
- const value = target.value;
- this.setState({ [name]: value })
- }
- handlePromoSubmit(event) {
- if (!this.state.toId) {
- return this.openDefault("Ошибка", "Введите промокод", {
- title: 'ОК',
- autoclose: true,
- style: "destructive"
- })
- }
- this.sendPromo(this.state.fetchedUser.id, this.state.toId)
- this.setState({ promo1: response.promo1 })
- this.setState({ promo2: response.promo2 })
- this.setState({ promo3: response.promo3})
- this.setState({ promo_s1: response.promo_s1 })
- this.setState({ promo_s2: response.promo_s2 })
- this.setState({ promo_s3: response.promo_s3 })
- event.preventDefault();
- }
- handleTransferChange(event) {
- //console.log(event.target)
- const target = event.target;
- const name = target.name;
- const value = target.value;
- this.setState({ [name]: value })
- }
- handleTransferSubmit(event) {
- if (this.state.toid === 0 && this.state.transferCoins === 0) return false
- else this.sendTransfer(this.state.fetchedUser.id, this.state.toId, this.state.transferCoins)
- event.preventDefault();
- }
- handleeTransferChange(event) {
- //console.log(event.target)
- var hash = url.hash.replace(/^.{1}/, '');
- const target = event.target;
- const name = target.name;
- const value = target.value;
- this.setState({ [name]: value })
- }
- handleeTransferSubmit(event) {
- if (this.state.toid === 0 && this.state.transferCoins === 0) return false
- else this.sendTransfer(this.state.fetchedUser.id, this.state.hash, this.state.transferCoins)
- event.preventDefault();
- }
- buyPet(pet_id) {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=user.buy.pet&user_vk=${this.state.fetchedUser.id}&pet_id=${pet_id}`
- })
- .then((response) => response.json())
- .then((response) => {
- //console.log(response)
- switch(response.status) {
- case 'success':
- this.openDefault("Успех", response.msg, {
- title: 'ОК',
- autoclose: true,
- })
- break;
- case 'error':
- this.openDefault("Ошибка", response.msg, {
- title: 'ОК',
- autoclose: true,
- style: "destructive"
- })
- break;
- default: break;
- }
- this.setState({ userAcc: response })
- this.setState({ clicks: response.clicks, reputation: response.reputation, speed: response.speed, aspeed: response.aspeed })
- })
- .catch((error) => {
- console.error(error)
- })
- }
- sellPet(pet_id) {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=user.sell.pet&user_vk=${this.state.fetchedUser.id}&pet_id=${pet_id}`
- })
- .then((response) => response.json())
- .then((response) => {
- //console.log(response)
- switch (response.status) {
- case 'success':
- this.openDefault("Успех", response.msg, {
- title: 'ОК',
- autoclose: true,
- })
- break;
- case 'error':
- this.openDefault("Ошибка", response.msg, {
- title: 'ОК',
- autoclose: true,
- style: "destructive"
- })
- break;
- default: break;
- }
- this.setState({ userAcc: response })
- this.setState({ clicks: response.clicks, reputation: response.reputation, speed: response.speed, aspeed: response.aspeed })
- this.setState({ activePanel: "home" })
- })
- .catch((error) => {
- console.error(error)
- })
- }
- pohodPet() {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=user.pohod.pet&user_vk=${this.state.fetchedUser.id}`
- })
- .then((response) => response.json())
- .then((response) => {
- //console.log(response)
- switch (response.status) {
- case 'success':
- this.openDefault("Успех", response.msg, {
- title: 'ОК',
- autoclose: true,
- })
- break;
- case 'error':
- this.openDefault("Ошибка", response.msg, {
- title: 'ОК',
- autoclose: true,
- style: "destructive"
- })
- break;
- default: break;
- }
- this.setState({ userAcc: response })
- this.setState({ clicks: response.clicks, reputation: response.reputation, speed: response.speed, aspeed: response.aspeed })
- })
- .catch((error) => {
- console.error(error)
- })
- }
- stories() {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=user.bonuse.stories&user_vk=${this.state.fetchedUser.id}`
- })
- .then((response) => response.json())
- .then((response) => {
- //console.log(response)
- switch (response.status) {
- case 'success':
- this.openDefault("Успех", response.msg, {
- title: 'ОК',
- autoclose: true,
- })
- break;
- case 'error':
- this.openDefault("Ошибка", response.msg, {
- title: 'ОК',
- autoclose: true,
- style: "destructive"
- })
- break;
- default: break;
- }
- this.setState({ userAcc: response })
- this.setState({ clicks: response.clicks, reputation: response.reputation, speed: response.speed, aspeed: response.aspeed })
- })
- .catch((error) => {
- console.error(error)
- })
- }
- post () {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=user.bonuse.post&user_vk=${this.state.fetchedUser.id}`
- })
- .then((response) => response.json())
- .then((response) => {
- //console.log(response)
- switch (response.status) {
- case 'success':
- this.openDefault("Успех", response.msg, {
- title: 'ОК',
- autoclose: true,
- })
- break;
- case 'error':
- this.openDefault("Ошибка", response.msg, {
- title: 'ОК',
- autoclose: true,
- style: "destructive"
- })
- break;
- default: break;
- }
- this.setState({ userAcc: response })
- this.setState({ clicks: response.clicks, reputation: response.reputation, speed: response.speed, aspeed: response.aspeed })
- })
- .catch((error) => {
- console.error(error)
- })
- }
- buyHouse(house_id) {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=user.buy.house&user_vk=${this.state.fetchedUser.id}&house_id=${house_id}`
- })
- .then((response) => response.json())
- .then((response) => {
- //console.log(response)
- switch(response.status) {
- case 'success':
- this.openDefault("Успех", response.msg, {
- title: 'ОК',
- autoclose: true,
- })
- break;
- case 'error':
- this.openDefault("Ошибка", response.msg, {
- title: 'ОК',
- autoclose: true,
- style: "destructive"
- })
- break;
- default: break;
- }
- this.setState({ userAcc: response })
- this.setState({ clicks: response.clicks, reputation: response.reputation, speed: response.speed, aspeed: response.aspeed })
- })
- .catch((error) => {
- console.error(error)
- })
- }
- sellHouse(house_id) {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=user.sell.house&user_vk=${this.state.fetchedUser.id}&house_id=${house_id}`
- })
- .then((response) => response.json())
- .then((response) => {
- //console.log(response)
- switch (response.status) {
- case 'success':
- this.openDefault("Успех", response.msg, {
- title: 'ОК',
- autoclose: true,
- })
- break;
- case 'error':
- this.openDefault("Ошибка", response.msg, {
- title: 'ОК',
- autoclose: true,
- style: "destructive"
- })
- break;
- default: break;
- }
- this.setState({ userAcc: response })
- this.setState({ clicks: response.clicks, reputation: response.reputation, speed: response.speed, aspeed: response.aspeed })
- this.setState({ activePanel: "home" })
- })
- .catch((error) => {
- console.error(error)
- })
- }
- pohodHouse() {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=user.pohod.house&user_vk=${this.state.fetchedUser.id}`
- })
- .then((response) => response.json())
- .then((response) => {
- //console.log(response)
- switch (response.status) {
- case 'success':
- this.openDefault("Успех", response.msg, {
- title: 'ОК',
- autoclose: true,
- })
- break;
- case 'error':
- this.openDefault("Ошибка", response.msg, {
- title: 'ОК',
- autoclose: true,
- style: "destructive"
- })
- break;
- default: break;
- }
- this.setState({ userAcc: response })
- this.setState({ clicks: response.clicks, reputation: response.reputation, speed: response.speed, aspeed: response.aspeed })
- })
- .catch((error) => {
- console.error(error)
- })
- }
- buyUpgrade(type, name) {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=user.buy.upgrade&user_vk=${this.state.fetchedUser.id}&type=${type}&up_name=${name}`
- })
- .then((response) => response.json())
- .then((response) => {
- //console.log(response)
- switch(response.status) {
- case 'error':
- this.openDefault("Ошибка", response.msg, {
- title: 'ОК',
- autoclose: true,
- style: "destructive"
- })
- break;
- }
- this.setState({ userAcc: response })
- this.setState({ clicks: response.clicks, reputation: response.reputation, speed: response.speed, aspeed: response.aspeed })
- this.getUpgradesOne()
- this.getUpgradesTwo()
- })
- .catch((error) => {
- console.error(error)
- })
- }
- getUpgradesOne() {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=get.upgrades.one`
- })
- .then((response) => response.json())
- .then((response) => {
- console.log(response)
- this.setState({ upgradesOne: response });
- })
- .catch((error) => {
- console.error(error)
- })
- }
- getUpgradesTwo() {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=get.upgrades.two`
- })
- .then((response) => response.json())
- .then((response) => {
- console.log(response)
- this.setState({ upgradesTwo: response });
- })
- .catch((error) => {
- console.error(error)
- })
- }
- autoMine() {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=user.auto.mine&user_vk=${this.state.fetchedUser.id}`
- })
- .then((response) => response.json())
- .then((response) => {
- console.log(response)
- this.setState({ userAcc: response })
- this.setState({ promo1: response.promo1 })
- this.setState({ promo2: response.promo2 })
- this.setState({ promo3: response.promo3})
- this.setState({ promo_s1: response.promo_s1 })
- this.setState({ promo_s2: response.promo_s2 })
- this.setState({ promo_s3: response.promo_s3 })
- this.setState({chat_photo1: response[0].photo})
- this.setState({chat_photo2: response[1].photo})
- this.setState({chat_photo3: response[2].photo})
- this.setState({chat_photo4: response[3].photo})
- this.setState({chat_photo5: response[4].photo})
- this.setState({chat_photo6: response[5].photo})
- this.setState({chat_photo7: response[6].photo})
- this.setState({chat_photo8: response[7].photo})
- this.setState({chat_photo9: response[8].photo})
- this.setState({chat_photo10: response[9].photo})
- this.setState({ chat_u1: response[0].user, chat_un1: response[0].username, chat_message1: response[0].sms, chat_d1: response[0].date })
- this.setState({ chat_u2: response[1].user, chat_un2: response[1].username, chat_message2: response[1].sms, chat_d2: response[1].date })
- this.setState({ chat_u3: response[2].user, chat_un3: response[2].username, chat_message3: response[2].sms, chat_d3: response[2].date })
- this.setState({ chat_u4: response[3].user, chat_un4: response[3].username, chat_message4: response[3].sms, chat_d4: response[3].date })
- this.setState({ chat_u5: response[4].user, chat_un5: response[4].username, chat_message5: response[4].sms, chat_d5: response[4].date })
- this.setState({ chat_u6: response[5].user, chat_un6: response[5].username, chat_message6: response[5].sms, chat_d6: response[5].date })
- this.setState({ chat_u7: response[6].user, chat_un7: response[6].username, chat_message7: response[6].sms, chat_d7: response[6].date })
- this.setState({ chat_u8: response[7].user, chat_un8: response[7].username, chat_message8: response[7].sms, chat_d8: response[7].date })
- this.setState({ chat_u9: response[8].user, chat_un9: response[8].username, chat_message9: response[8].sms, chat_d9: response[8].date })
- this.setState({ chat_u10: response[9].user, chat_un10: response[9].username, chat_message10: response[9].sms, chat_d10: response[9].date })
- this.setState({ clicks: response.clicks, reputation: response.reputation, speed: response.speed, aspeed: response.aspeed })
- })
- .catch((error) => {
- console.error(error)
- })
- }
- setActiveTabUpgrades = (value) => {
- this.setState({ activeTabUpgrades: `${value}` });
- }
- setActiveTabTop = (value) => {
- this.setState({ activeTabTop: `${value}` });
- }
- setActiveTabTrans = (value) => {
- this.setState({ activeTabTrans: `${value}` });
- }
- add1 = () => {
- this.updateUserClicks(this.state.fetchedUser.id)
- this.setState({chat_photo1: response[0].photo})
- this.setState({chat_photo2: response[1].photo})
- this.setState({chat_photo3: response[2].photo})
- this.setState({chat_photo4: response[3].photo})
- this.setState({chat_photo5: response[4].photo})
- this.setState({chat_photo6: response[5].photo})
- this.setState({chat_photo7: response[6].photo})
- this.setState({chat_photo8: response[7].photo})
- this.setState({chat_photo9: response[8].photo})
- this.setState({chat_photo10: response[9].photo})
- this.setState({ chat_u1: response[0].user, chat_un1: response[0].username, chat_message1: response[0].sms, chat_d1: response[0].date })
- this.setState({ chat_u2: response[1].user, chat_un2: response[1].username, chat_message2: response[1].sms, chat_d2: response[1].date })
- this.setState({ chat_u3: response[2].user, chat_un3: response[2].username, chat_message3: response[2].sms, chat_d3: response[2].date })
- this.setState({ chat_u4: response[3].user, chat_un4: response[3].username, chat_message4: response[3].sms, chat_d4: response[3].date })
- this.setState({ chat_u5: response[4].user, chat_un5: response[4].username, chat_message5: response[4].sms, chat_d5: response[4].date })
- this.setState({ chat_u6: response[5].user, chat_un6: response[5].username, chat_message6: response[5].sms, chat_d6: response[5].date })
- this.setState({ chat_u7: response[6].user, chat_un7: response[6].username, chat_message7: response[6].sms, chat_d7: response[6].date })
- this.setState({ chat_u8: response[7].user, chat_un8: response[7].username, chat_message8: response[7].sms, chat_d8: response[7].date })
- this.setState({ chat_u9: response[8].user, chat_un9: response[8].username, chat_message9: response[8].sms, chat_d9: response[8].date })
- this.setState({ chat_u10: response[9].user, chat_un10: response[9].username, chat_message10: response[9].sms, chat_d10: response[9].date })
- }
- dark = () => {
- document.body.setAttribute( 'scheme','client_dark' );
- }
- onStoryChange (e) {
- this.setState({ activeStory: e.currentTarget.dataset.story })
- this.setState({ popout: <ScreenSpinner /> });
- setTimeout(() => { this.setState({ popout: null }) }, 200);
- }
- share = () => {
- connect.send("VKWebAppShowWallPostBox", {"message": "Привет! Я играю в сервисе - https://vk.com/app7003049! Тематика простая: кликаешь, зарабатываешь FC! #FastClick"});
- }
- toggleContext () {
- this.setState({ contextOpened: !this.state.contextOpened });
- }
- select (e) {
- const mode = e.currentTarget.dataset.mode;
- this.setState({ mode });
- requestAnimationFrame(this.toggleContext);
- }
- bbank = () => {
- function bankk(length) {
- var result = '';
- var characters = '123456789';
- var charactersLength = characters.length;
- for ( var i = 0; i < length; i++ ) {
- result += characters.charAt(Math.floor(Math.random() * charactersLength));
- }
- return result;
- }
- if (this.state.bank_ > 1) {
- this.openDefault("Ошибка", "Токен уже получали.", {
- title: 'ОК',
- autoclose: true,
- style: "destructive"
- })
- }
- else {
- let bankkk = bankk(18);
- //this.setState({ clicks: clicks })
- this.UserNewBank(this.state.fetchedUser.id, bankkk)
- }
- }
- shares = () => {
- connect.send("VKWebAppCopyText", {text: "Этот текст будет скопирован в буфер обмена."});
- }
- ttoken = () => {
- function tokenn(length) {
- var result = '';
- var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#%^&*{}[]';
- var charactersLength = characters.length;
- for ( var i = 0; i < length; i++ ) {
- result += characters.charAt(Math.floor(Math.random() * charactersLength));
- }
- return result;
- }
- if (this.state.token_ > 1) {
- this.openDefault("Ошибка", "Токен уже получали.", {
- title: 'ОК',
- autoclose: true,
- style: "destructive"
- })
- }
- else {
- let tokennn = tokenn(20);
- //this.setState({ clicks: clicks })
- this.UserNewToken(this.state.fetchedUser.id, tokennn)
- }
- }
- openDefaulte () {
- this.setState({ popout:
- <Alert
- actions={[{
- title: 'Отмена',
- autoclose: true,
- mode: 'cancel'
- }, {
- title: 'Повторить',
- autoclose: true,
- action: () => this.openDefaulte,
- }]}
- onClose={this.closePopout}
- >
- <h2>Возникла ошибка! </h2>
- <p>Возникла ошибка при активации промокода, возможно: <br /> — Промокод неактивен <br /> — Ошибка на сервере <br /> — Активации промокода закончились </p>
- </Alert>
- });
- }
- sendPromo = async (id, toid, count) => {
- fetch("/api.php", {
- method: 'post',
- headers: {
- "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
- },
- body: `method=user.promo.activ&user_vk=${id}&promo=${toid}`
- })
- .then((response) => response.json())
- .then((response) => {
- console.log("PROMO!!!");
- console.log(response)
- switch (response.status) {
- case 'success':
- this.openDefault("Успех", response.msg, {
- title: 'ОК',
- autoclose: true,
- })
- break;
- case 'error':
- this.openDefault("Ошибка", response.msg, {
- title: 'ОК',
- autoclose: true,
- style: "destructive"
- })
- break;
- default: break;
- }
- this.setState({ userAcc: response })
- this.setState({ clicks: response.clicks, reputation: response.reputation, speed: response.speed, aspeed: response.aspeed })
- this.setState({ history: response.history })
- this.setState({ history1: response.history1 })
- this.setState({ history2: response.history2 })
- this.setState({ history3: response.history3 })
- this.setState({ history4: response.history4 })
- this.setState({ history5: response.history5 })
- this.setState({ history6: response.history6 })
- this.setState({ history7: response.history7 })
- this.setState({ history8: response.history8 })
- this.setState({ history9: response.history9 })
- this.setState({ history10: response.history10 })
- this.setState({ h_id1: response.h_id1 })
- this.setState({ h_id2: response.h_id2 })
- this.setState({ h_id3: response.h_id3 })
- this.setState({ h_id4: response.h_id4 })
- this.setState({ h_id5: response.h_id5 })
- this.setState({ h_id7: response.h_id7 })
- this.setState({ h_id8: response.h_id8 })
- this.setState({ h_id9: response.h_id9 })
- this.setState({ h_id10: response.h_id10 })
- this.setState({ h_id6: response.h_id6 })
- this.setState({ h_s1: response.h_s1 })
- this.setState({ h_s2: response.h_s2 })
- this.setState({ h_s3: response.h_s3 })
- this.setState({ h_s4: response.h_s4 })
- this.setState({ h_s5: response.h_s5 })
- this.setState({ h_s6: response.h_s6 })
- this.setState({ h_s7: response.h_s7 })
- this.setState({ h_s8: response.h_s8 })
- this.setState({ h_s9: response.h_s9 })
- this.setState({ h_s10: response.h_s10 })
- this.setState({ viv: response.viv })
- this.setState({ v1: response.v1 })
- this.setState({ v2: response.v2 })
- this.setState({ v3: response.v3 })
- this.setState({ v4: response.v4 })
- this.setState({ v5: response.v5 })
- this.setState({ v6: response.v6 })
- this.setState({ v7: response.v7 })
- this.setState({ v8: response.v8 })
- this.setState({ v9: response.v9 })
- this.setState({ v10: response.v10 })
- this.setState({ v_id1: response.v_id1 })
- this.setState({ v_id2: response.v_id2 })
- this.setState({ v_id3: response.v_id3 })
- this.setState({ v_id4: response.v_id4 })
- this.setState({ v_id5: response.v_id5 })
- this.setState({ v_id7: response.v_id7 })
- this.setState({ v_id8: response.v_id8 })
- this.setState({ v_id9: response.v_id9 })
- this.setState({ v_id10: response.v_id10 })
- this.setState({ v_id6: response.v_id6 })
- this.setState({ v_s1: response.v_s1 })
- this.setState({ v_s2: response.v_s2 })
- this.setState({ v_s3: response.v_s3 })
- this.setState({ v_s4: response.v_s4 })
- this.setState({ v_s5: response.v_s5 })
- this.setState({ v_s6: response.v_s6 })
- this.setState({ v_s7: response.v_s7 })
- this.setState({ v_s8: response.v_s8 })
- this.setState({ v_s9: response.v_s9 })
- this.setState({ v_s10: response.v_s10 })
- })
- .catch((error) => {
- console.error(error)
- })
- }
- render() {
- const MODAL_PAGE_USER_INFO = 'user-info';
- const modal = (
- <ModalRoot activeModal={this.state.activeModal}>
- <ModalCard
- id={MODAL_CARD_MONEY_SEND}
- onClose={() => this.setActiveModal(null)}
- icon={<Icon56GiftOutline />}
- title="Доступен новый дизайн! "
- actions={[{
- title: 'Попробовать',
- mode: 'primary',
- action: () => {
- document.body.setAttribute('scheme', 'android_theme');
- connect.send('VKWebAppSetViewSettings', { 'status_bar_style': 'dark', 'action_bar_color': '#ffcc00' });
- this.setActiveModal(null);
- }
- }]}
- >
- </ModalCard>
- </ModalRoot>
- );
- return (
- <View modal={modal} popout={this.state.popout} activePanel={this.state.activePanel}>
- <Home id="home" tokenn={this.tokenn} token={this.token} openDestructive={this.openDestructive} stageTimer={this.stageTimer} story={this.story} usersTop={this.state.usersTop} getUsersTopRating={this.state.getUsersTopRating} groupsTop={this.state.groupsTop} activeTab={this.state.activeTabTop} setTab={this.setActiveTabTop} activeTab={this.state.activeTabTop} setTab={this.setActiveTabTop} usersTop={this.state.usersTop} groupsTop={this.state.groupsTop} addv={this.addv}res={this.res} share={this.share} add1={this.add1} userAcc={this.state.userAcc} dark={this.dark} light={this.light} clicks={this.state.clicks} speed={this.state.speed} aspeed={this.state.aspeed} reputation={this.state.reputation} name={this.name} fetchedUser={this.state.fetchedUser} go={this.go} />
- <Persik id="persik" go={this.go} name={this.name} fetchedUser={this.state.fetchedUser} userAcc={this.state.userAcc} />
- <Transfer id="Transfer" clickShare={this.clickShare} qr_data={this.state.qr_data} qrSvg={this.state.qrSvg} qrSvgUser={this.state.qrSvgUser} clickQrcode={this.clickQrcode} shares={this.shares} activeTab4={this.activeTab4} fetchedUser={this.state.fetchedUser} setTab={this.setActiveTabTrans} go={this.go} handleTransferChange={this.handleTransferChange} clicks={this.state.clicks} fetchedUser={this.state.fetchedUser} h_id1={this.state.h_id1} h_id2={this.state.h_id2} h_id3={this.state.h_id3} h_id4={this.state.h_id4} h_id5={this.state.h_id5} h_id6={this.state.h_id6} h_id7={this.state.h_id7} h_id8={this.state.h_id8} h_id9={this.state.h_id9} h_id10={this.state.h_id10} h_s1={this.state.h_s1} h_s2={this.state.h_s2} h_s3={this.state.h_s3} h_s4={this.state.h_s4} h_s5={this.state.h_s5} h_s6={this.state.h_s6} h_s7={this.state.h_s7} h_s8={this.state.h_s8} h_s9={this.state.h_s9} h_s10={this.state.h_s10} history={this.state.history} history1={this.state.history1} history2={this.state.history2} history3={this.state.history3} history4={this.state.history4} history5={this.state.history5} history6={this.state.history6} history7={this.state.history7} history8={this.state.history8} history9={this.state.history9} history10={this.state.history10} v_id1={this.state.v_id1} v_id2={this.state.v_id2} v_id3={this.state.v_id3} v_id4={this.state.v_id4} v_id5={this.state.v_id5} v_id6={this.state.v_id6} v_id7={this.state.v_id7} v_id8={this.state.v_id8} v_id9={this.state.v_id9} v_id10={this.state.v_id10} v_s1={this.state.v_s1} v_s2={this.state.v_s2} v_s3={this.state.v_s3} v_s4={this.state.v_s4} v_s5={this.state.v_s5} v_s6={this.state.v_s6} v_s7={this.state.v_s7} v_s8={this.state.v_s8} v_s9={this.state.v_s9} v_s10={this.state.v_s10} viv={this.state.viv} v1={this.state.v1} v2={this.state.v2} v3={this.state.v3} v4={this.state.v4} v5={this.state.v5} v6={this.state.v6} v7={this.state.v7} v8={this.state.v8} v9={this.state.v9} v10={this.state.v10} handleTransferSubmit={this.handleTransferSubmit} userAcc={this.state.userAcc} />
- <Transferinfo id="Transferinfo" clickShare={this.clickShare} qr_data={this.state.qr_data} qrSvg={this.state.qrSvg} qrSvgUser={this.state.qrSvgUser} clickQrcode={this.clickQrcode} shares={this.shares} activeTab4={this.activeTab4} fetchedUser={this.state.fetchedUser} setTab={this.setActiveTabTrans} go={this.go} handleTransferChange={this.handleTransferChange} clicks={this.state.clicks} fetchedUser={this.state.fetchedUser} h_id1={this.state.h_id1} h_id2={this.state.h_id2} h_id3={this.state.h_id3} h_id4={this.state.h_id4} h_id5={this.state.h_id5} h_id6={this.state.h_id6} h_id7={this.state.h_id7} h_id8={this.state.h_id8} h_id9={this.state.h_id9} h_id10={this.state.h_id10} h_s1={this.state.h_s1} h_s2={this.state.h_s2} h_s3={this.state.h_s3} h_s4={this.state.h_s4} h_s5={this.state.h_s5} h_s6={this.state.h_s6} h_s7={this.state.h_s7} h_s8={this.state.h_s8} h_s9={this.state.h_s9} h_s10={this.state.h_s10} history={this.state.history} history1={this.state.history1} history2={this.state.history2} history3={this.state.history3} history4={this.state.history4} history5={this.state.history5} history6={this.state.history6} history7={this.state.history7} history8={this.state.history8} history9={this.state.history9} history10={this.state.history10} v_id1={this.state.v_id1} v_id2={this.state.v_id2} v_id3={this.state.v_id3} v_id4={this.state.v_id4} v_id5={this.state.v_id5} v_id6={this.state.v_id6} v_id7={this.state.v_id7} v_id8={this.state.v_id8} v_id9={this.state.v_id9} v_id10={this.state.v_id10} v_s1={this.state.v_s1} v_s2={this.state.v_s2} v_s3={this.state.v_s3} v_s4={this.state.v_s4} v_s5={this.state.v_s5} v_s6={this.state.v_s6} v_s7={this.state.v_s7} v_s8={this.state.v_s8} v_s9={this.state.v_s9} v_s10={this.state.v_s10} viv={this.state.viv} v1={this.state.v1} v2={this.state.v2} v3={this.state.v3} v4={this.state.v4} v5={this.state.v5} v6={this.state.v6} v7={this.state.v7} v8={this.state.v8} v9={this.state.v9} v10={this.state.v10} handleTransferSubmit={this.handleTransferSubmit} userAcc={this.state.userAcc} />
- <House id="house" onChangeText={this.onChangeText} go={this.go} buy={this.buyHouse} />
- <Imus id="imus" activeTabik1={this.state.activeTabik1} activeTabik2={this.state.activeTabik2} clicks={this.state.clicks} bbank={this.bbank} bank={this.state.bank} go={this.go} />
- <MyHouse id="myHouse" go={this.go} userAcc={this.state.userAcc} sell={this.sellHouse} pohod={this.pohodHouse} />
- <MyPet id="myPet" go={this.go} userAcc={this.state.userAcc} sell={this.sellPet} pohod={this.pohodPet} />
- <Upgrade id="upgrades" userAcc={this.state.userAcc} sell={this.sellHouse} pohod={this.pohodHouse} buy={this.buyHouse} upgradesOne={this.state.upgradesOne} upgradesTwo={this.state.upgradesTwo} go={this.go} activeTab={this.state.activeTabUpgrades} setTab={this.setActiveTabUpgrades} buyUpgrade={this.buyUpgrade} />
- <Pet id="pet" go={this.go} buy={this.buyPet} />
- <Dop id="dop" go={this.go} />
- <Bonuse id="bonuse" story={this.story} vkpost={this.vkpost} buy={this.buyBonuse} go={this.go} />
- <Test id="Test" promo1={this.state.promo1} promo2={this.state.promo2} promo3={this.state.promo3} promo_s1={this.state.promo_s1} promo_s2={this.state.promo_s2} promo_s3={this.state.promo_s3} handlePromoSubmit={this.handlePromoSubmit} handlePromoChange={this.handlePromoChange} openDefaulte={this.openDefaulte} go={this.go} />
- <Admin id="admin" go={this.go} />
- <Referals id="referals" clickShare={this.clickShare} qr_data={this.state.qr_data} qrSvg={this.state.qrSvg} qrSvgUser={this.state.qrSvgUser} clickQrcode={this.clickQrcode} shares={this.shares} activeTab4={this.activeTab4} fetchedUser={this.state.fetchedUser} setTab={this.setActiveTabTrans} go={this.go} handleTransferChange={this.handleTransferChange} clicks={this.state.clicks} fetchedUser={this.state.fetchedUser} h_id1={this.state.h_id1} h_id2={this.state.h_id2} h_id3={this.state.h_id3} h_id4={this.state.h_id4} h_id5={this.state.h_id5} h_id6={this.state.h_id6} h_id7={this.state.h_id7} h_id8={this.state.h_id8} h_id9={this.state.h_id9} h_id10={this.state.h_id10} h_s1={this.state.h_s1} h_s2={this.state.h_s2} h_s3={this.state.h_s3} h_s4={this.state.h_s4} h_s5={this.state.h_s5} h_s6={this.state.h_s6} h_s7={this.state.h_s7} h_s8={this.state.h_s8} h_s9={this.state.h_s9} h_s10={this.state.h_s10} history={this.state.history} history1={this.state.history1} history2={this.state.history2} history3={this.state.history3} history4={this.state.history4} history5={this.state.history5} history6={this.state.history6} history7={this.state.history7} history8={this.state.history8} history9={this.state.history9} history10={this.state.history10} v_id1={this.state.v_id1} v_id2={this.state.v_id2} v_id3={this.state.v_id3} v_id4={this.state.v_id4} v_id5={this.state.v_id5} v_id6={this.state.v_id6} v_id7={this.state.v_id7} v_id8={this.state.v_id8} v_id9={this.state.v_id9} v_id10={this.state.v_id10} v_s1={this.state.v_s1} v_s2={this.state.v_s2} v_s3={this.state.v_s3} v_s4={this.state.v_s4} v_s5={this.state.v_s5} v_s6={this.state.v_s6} v_s7={this.state.v_s7} v_s8={this.state.v_s8} v_s9={this.state.v_s9} v_s10={this.state.v_s10} viv={this.state.viv} v1={this.state.v1} v2={this.state.v2} v3={this.state.v3} v4={this.state.v4} v5={this.state.v5} v6={this.state.v6} v7={this.state.v7} v8={this.state.v8} v9={this.state.v9} v10={this.state.v10} handleTransferSubmit={this.handleTransferSubmit} userAcc={this.state.userAcc} />
- <Chat id="chat" chat_photo1={this.state.chat_photo1} chat_photo2={this.state.chat_photo2} chat_photo3={this.state.chat_photo3} chat_photo4={this.state.chat_photo4} chat_photo5={this.state.chat_photo5} chat_photo6={this.state.chat_photo6} chat_photo7={this.state.chat_photo7} chat_photo8={this.state.chat_photo8} chat_photo9={this.state.chat_photo9} chat_photo10={this.state.chat_photo10} chat_u1={this.state.chat_u1} chat_u2={this.state.chat_u2} chat_u3={this.state.chat_u3} chat_u4={this.state.chat_u4} chat_u5={this.state.chat_u5} chat_u6={this.state.chat_u6} chat_u7={this.state.chat_u7} chat_u8={this.state.chat_u8} chat_u9={this.state.chat_u9} chat_u10={this.state.chat_u10} chat_un1={this.state.chat_un1} chat_un2={this.state.chat_un2} chat_un3={this.state.chat_un3} chat_un4={this.state.chat_un4} chat_un5={this.state.chat_un5} chat_un6={this.state.chat_un6} chat_un7={this.state.chat_un7} chat_un8={this.state.chat_un8} chat_un9={this.state.chat_un9} chat_un10={this.state.chat_un10} chat_d1={this.state.chat_d1} chat_d2={this.state.chat_d2} chat_d3={this.state.chat_d3} chat_d4={this.state.chat_d4} chat_d5={this.state.chat_d5} chat_d6={this.state.chat_d6} chat_d7={this.state.chat_d7} chat_d8={this.state.chat_d8} chat_d9={this.state.chat_d9} chat_d10={this.state.chat_d10} chat_message1={this.state.chat_message1} chat_message2={this.state.chat_message2} chat_message3={this.state.chat_message3} chat_message4={this.state.chat_message4} chat_message5={this.state.chat_message5} chat_message6={this.state.chat_message6} chat_message7={this.state.chat_message7} chat_message8={this.state.chat_message8} chat_message9={this.state.chat_message9} chat_message10={this.state.chat_message10} stageTimer={this.stageTimer} calcChat={this.calcChat} handleChatChange={this.handleChatChange} go={this.go} />
- <Cases id="cases" buy={this.buyCase} go={this.go} />
- <TransferTest id="TransferTest" handleTransferChangee={this.handleTransferChangee} handleeTransferChange={this.handleeTransferChange} go={this.go} />
- <Top id="top" usersTopAutomine={this.state.usersTopAutomine} usersTopReputation={this.state.usersTopReputation} onRefresh={this.onRefresh} go={this.go} usersTop={this.state.usersTop} groupsTop={this.state.groupsTop} activeTab={this.state.activeTabTop} setTab={this.setActiveTabTop} />
- <Reit id="reit" clicks={this.state.clicks} reputation={this.state.reputation} go={this.go} handleReputationChange={this.handleReputationChange} handleReputationSubmit={this.handleReputationSubmit} calcRep={this.state.calcRep} />
- <Sett id="sett" go={this.go} dark={this.dark} light={this.light} />
- <ChangeNickname id="changeNickname" go={this.go} handleNickChange={this.handleNickChange} handleNickSubmit={this.handleNickSubmit} userAcc={this.state.userAcc} />
- <Katalog id="katalog" buy={this.buyBonuse} token={this.token} setActiveModal={this.setActiveModal} fetchedUser={this.state.fetchedUser} reputation={this.state.reputation} clicks={this.state.clicks} speed={this.state.speed} aspeed={this.state.aspeed} reputation={this.state.reputation} go={this.go} />
- </View>
- );
- }
- }
- export default App;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement