Commit 98d8d876 authored by wildfirecode13's avatar wildfirecode13

111

parent 6dd68507
...@@ -11,7 +11,7 @@ import getQueryParams from "./utils/getQueryParams"; ...@@ -11,7 +11,7 @@ import getQueryParams from "./utils/getQueryParams";
console.log('getQueryParams()', getQueryParams()) console.log('getQueryParams()', getQueryParams())
const { page, modal, ddd } = getQueryParams(); const { page, modal, ddd } = getQueryParams();
import Fuck from './pages/fuck/fuck.jsx';
import Index from './pages/index/index.jsx'; import Index from './pages/index/index.jsx';
class App extends Component { class App extends Component {
...@@ -21,9 +21,9 @@ class App extends Component { ...@@ -21,9 +21,9 @@ class App extends Component {
let current; let current;
switch (page) { switch (page) {
case 'fuck': // case 'fuck':
current = <Fuck /> // current = <Fuck />
break; // break;
default: default:
current = <Index /> current = <Index />
break; break;
......
'use strict';
import React from 'react';
import { RES_PATH } from '../../../sparkrc.js';
import { observer } from 'mobx-react';
import store from '../../store/index';
import modalStore from '@src/store/modal';
import API from '../../api';
import './alert.less';
@observer
class Alert extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div className="alert">
<span className="alert_bg"></span>
<span className="alert_ok"></span>
<span className="alert_close"></span>
</div>
);
}
}
export default Alert;
@import "../../res.less";
.alert {
width: 659px;
height: 489px;
left: 46px;
top: 527px;
position: absolute;
.alert_bg {
width: 657px;
height: 482px;
left: 0px;
top: 7px;
position: absolute;
.sparkBg("alert/alert_bg.png");
}
.alert_ok {
width: 415px;
height: 101px;
left: 122px;
top: 301px;
position: absolute;
.sparkBg("alert/alert_ok.png");
}
.alert_close {
width: 82px;
height: 82px;
left: 577px;
top: 0px;
position: absolute;
.sparkBg("alert/alert_close.png");
}
}
import React, { Component } from "react"; import React, { Component } from "react";
import Alert from "../components/alert/alert";
import Rule from "../components/rule/rule"; import Rule from "../components/rule/rule";
import './modal.less'; import './modal.less';
import { observer } from 'mobx-react'; import { observer } from 'mobx-react';
import modalStore from '../store/modal'; import modalStore from '../store/modal';
import { toJS } from 'mobx'; import { toJS } from 'mobx';
export const cfg = { export const cfg = {
Rule: Rule Rule: Rule,
Alert: Alert
}; };
@observer @observer
......
'use strict';
import API from '@src/api';
import { ajaxImg } from '@src/utils/ajaxImg';
import { observer } from 'mobx-react';
import React, { Component } from 'react';
import modalStore from '../../store/modal';
import './fuck.less';
import { gettestbase64 } from './testbase64';
@observer
class Fuck extends Component {
constructor(props) {
super(props);
this.state = {
currentCity: 'loading....',
pic: null
}
window.API=API;
}
componentDidMount() {
// modalStore.pushPop('Award')
// modalStore.pushPop('Doassist', { })
// console.log('gettestbase64', gettestbase64())
// API.imgUrl(
// {
// img64: gettestbase64()
// }
// );
ajaxImg(
'/customActivity/duiba/imgUrl',
JSON.stringify({ img64: gettestbase64() })
);
API.getBase64Img({ }).then((data) => {
console.log('getBase64Img', data.data)
this.setState({ pic: `data:image/png;charset=utf-8;base64,${data.data}` })
})
API.getQrcode({
content: 'https://www.baidu.com/',
with: 200,
height: 200,
}).then((data) => {
console.log('getQrcode', data.data)
// this.setState({ pic: data.data })
})
}
onClick_join = () => {
console.log('onClick_join', this.refs.join.value);
API.join({ city: this.refs.join.value });
}
onClick_rankInfo = () => {
modalStore.pushPop("Firstlight", {
value: 5,
});
console.log('onClick_rankInfo')
API.rankInfo();
}
onClick_hljurl = () => {
const { go, hljurl } = window.hlj_open_sdk;
console.log('go',go);
console.log('hljurl',hljurl);
const url ='hljclient://page?jsonData={"type":7,"pageName":"HTML","data":{"url1":"https://m.helijia.com/mine/index.html?channel=923shiyongyouhuiquan#/coupon"}}';
go(hljurl(url));
}
render() {
const { currentCity, pic } = this.state;
return (
<div className="sha1repage">
{/* <span className="sharepagebg"></span> */}
<button onClick={this.onClick_hljurl}>hljurl</button>
<button onClick={this.onClick_rankInfo}>API.rankInfo</button>
<br />
<button onClick={this.onClick_join}>API.join</button> <input ref="join" type="text" />
<img src={pic}></img>
</div>
);
}
}
export default Fuck;
@import "../../res.less";
.sharepage {
width: 750px;
height: 1624px;
left: 0px;
top: 0px;
position: absolute;
.sharepagebg {
width: 750px;
height: 1624px;
left: 0px;
top: 0px;
position: absolute;
.sparkBg("sharepage/sharepagebg.png");
}
}
export const gettestbase64 = ()=>{
return 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB8AAAAhCAYAAAAh3nDkAAAGD0lEQVRYhbWXeVRUZRTAf294I4ikDMiqIoGAaJmaC0a4ZJ6TaVGRSy5li3XKk8kpMTvYcankZGaR2eppO1HkhkdJCheM476EC4obw7BYOjowwwww4Mz0xwyPN7wZoGPdv967c+/9fd+997vvG0F34opDoBMRFA/ON1WnDu1d3F7FroHbrLoE9PDqSSV2xv4vxNsGbwv+1HNp1BnrAJg3+wVmPDGrCytxpc5hV8JN9UYaGho6rbPNZqPmarWkt9ls/H3tL4VL+137iGpCeoeCoEKoPHHF0frDho3Z5G7N6Xz1tynjUh7gvWXvI7WPxWLml20//e9ggP3FewFZzfUGPQ6HMwmiKHJX4pCuR+v0yDjLcqb0FAA9/Hu44C7Hm4abkmFEWCTZaz7zTvEC86h2Ncl1/TXSZk8BICgo2AV3ubR2LYAmUOM9bFfBsoGgAgyGG7L4QSAIbWm3WMz06BEAQGRkXwCefnEmTU2N3onepJ35R1mfYjbXE+CK3yfCGV+oPFnuaLdQAKzNzUx6NOXfQb1I/qZCAnu5sim0rczrsDTIeuB2RBRFj2AAoaqk3KF08Vzj6/prrM3O4tDRA5Ju8qSpvLV4OdDBTgTPZevSeNVWXGF7/jZ2FuTR3Nws6ccmjycjPbNDX0uDha07NqOr1JKZsaJtPSoFXMBiMXP17xq0unJKz5/hxJ/HqKzWeQxcXlGO1dqEKAYodn25/BJ5+Vso2P0rjY0NANyXlMLE8Q9KNhLc2mzl4bQHaWlppiO5f8xYzpWdxVBroLqmkvVffsSS9EzsDjuXr1ziwJFidhf9ToWuXOFbuHdXe7izHgaDwSs4LDSc8SkPMPWhVKL7x1J6/gyvpD+P3W4nv2A7RmMtp8+WYDQZPfrfO3Qkc2bOY/TIJJlWds7rjLVoAjVoNMEEBwXTN7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/OfeZmE+ERGjRgtlcbbAFFeXAS6+/kr/8hede3c3gHc7dXNqCtwweOtzAH8A1CfIeJ/pWO7AAAAAElFTkSuQmCC'
}
\ No newline at end of file
...@@ -4,57 +4,61 @@ import modalStore from '@src/store/modal'; ...@@ -4,57 +4,61 @@ import modalStore from '@src/store/modal';
import { observer } from 'mobx-react'; import { observer } from 'mobx-react';
import React from 'react'; import React from 'react';
import './index.less'; import './index.less';
@observer @observer
class Index extends React.Component { class Index extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
isOn: 1 isOn: 1,
} };
} }
onclick_rank=()=>{ onclick_rank = () => {
console.warn('onclick_rank') console.warn('onclick_rank');
} };
onclick_start = () => {
console.warn('onclick_start');
};
onclick_start=()=>{ openMusic(isOn) {
console.warn('onclick_start') console.warn('isOn', isOn ? '开' : '关');
} }
openMusic(isOn){ componentDidMount() {
console.warn('isOn',isOn ? '开':'关');
}
componentDidMount(){
this.openMusic(1); this.openMusic(1);
} }
onClick_music_on = () => { onClick_music_on = () => {
this.setState({isOn:0}); this.setState({
this.openMusic(0) isOn: 0,
} });
this.openMusic(0);
};
onClick_music_off = () => { onClick_music_off = () => {
this.setState({isOn:1}) this.setState({
this.openMusic(1) isOn: 1,
} });
this.openMusic(1);
};
onclick_record = () => { onclick_record = () => {
console.warn('onclick_record') console.warn('onclick_record');
} };
onclick_rule = () => { onclick_rule = () => {
modalStore.pushPop("Rule"); modalStore.pushPop('Rule');
} };
render() { render() {
const { isOn } = this.state; const { isOn } = this.state;
return ( return (
<div className="index"> <div className="index">
<span className="index_bg"></span> <span className="index_bg"></span>
<span onClick={this.onclick_rank} className="index_rankbtn"></span> <span onClick={this.onclick_rank} className="index_rankbtn"></span>
{ {isOn ? (
isOn ? (<span onClick={this.onClick_music_on} className="index_on"></span>) <span onClick={this.onClick_music_on} className="index_on"></span>
: ) : (
(<span onClick={this.onClick_music_off} className="index_f"></span>) <span onClick={this.onClick_music_off} className="index_f"></span>
} )}
<span onClick={this.onclick_record} className="index_record"></span> <span onClick={this.onclick_record} className="index_record"></span>
<span onClick={this.onclick_rule} className="index_rule"></span> <span onClick={this.onclick_rule} className="index_rule"></span>
<span className="index_tips">今日剩余X次</span> <span className="index_tips">今日剩余X次</span>
......
...@@ -22,21 +22,21 @@ ...@@ -22,21 +22,21 @@
position: absolute; position: absolute;
.sparkBg("index/index_rankbtn.png"); .sparkBg("index/index_rankbtn.png");
} }
.index_f { .index_on {
width: 57px; width: 57px;
height: 57px; height: 57px;
left: 672px; left: 672px;
top: 231px; top: 231px;
position: absolute; position: absolute;
.sparkBg("index/index_off.png"); .sparkBg("index/index_on.png");
} }
.index_on { .index_f {
width: 57px; width: 57px;
height: 57px; height: 57px;
left: 672px; left: 672px;
top: 231px; top: 231px;
position: absolute; position: absolute;
.sparkBg("index/index_on.png"); .sparkBg("index/index_off.png");
} }
.index_record { .index_record {
width: 145px; width: 145px;
......
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