Commit 87fc3cc7 by xuzhenghua

bug

parent 18394e59
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -147,11 +147,9 @@ class MyTreasure extends Component { ...@@ -147,11 +147,9 @@ class MyTreasure extends Component {
// 拆宝箱--拆 // 拆宝箱--拆
toSplitTreasure = (params) => { toSplitTreasure = (params) => {
alert('split')
http.post(`${API.home}/sys/split_treasure`, params).then(res => { http.post(`${API.home}/sys/split_treasure`, params).then(res => {
const { code, data } = res.data; const { code, data } = res.data;
if(code === 200) { if(code === 200) {
alert(JSON.stringify(data))
// 拆宝箱弹窗--成功 // 拆宝箱弹窗--成功
this.showSuccessSplit(data); this.showSuccessSplit(data);
...@@ -394,9 +392,7 @@ class MyTreasure extends Component { ...@@ -394,9 +392,7 @@ class MyTreasure extends Component {
// 第三:奖品,现金红包--提现 // 第三:奖品,现金红包--提现
toFecthMoney = () => { toFecthMoney = () => {
const { history } = this.props; const { history } = this.props;
alert(getParam('version'));
if(getParam('version')) { if(getParam('version')) {
alert(0);
SendMessageToApp('toAccount') SendMessageToApp('toAccount')
}else { }else {
history.push('/scholarship'); history.push('/scholarship');
...@@ -412,15 +408,15 @@ class MyTreasure extends Component { ...@@ -412,15 +408,15 @@ class MyTreasure extends Component {
render() { render() {
const { history, userInfo, country } = this.props; const { history, userInfo, country } = this.props;
const { const {
isEnd, isEnd,
isEmpty, isEmpty,
seconds, seconds,
teams, teams,
ids, ids,
isPhone, isPhone,
isAddress, isAddress,
isConfirm, isConfirm,
isSplit, isSplit,
splitInfo = {}, splitInfo = {},
confirmInfo: { confirmInfo: {
...@@ -468,7 +464,7 @@ class MyTreasure extends Component { ...@@ -468,7 +464,7 @@ class MyTreasure extends Component {
owner_uid: item.captain_uid owner_uid: item.captain_uid
})} })}
> >
<PrizeStatus <PrizeStatus
data={{ data={{
bind_phone: item.bind_phone, bind_phone: item.bind_phone,
bind_address: item.bind_address, bind_address: item.bind_address,
...@@ -487,7 +483,7 @@ class MyTreasure extends Component { ...@@ -487,7 +483,7 @@ class MyTreasure extends Component {
{/* 拆宝箱--弹窗,成功 */} {/* 拆宝箱--弹窗,成功 */}
<Mask visible={isSplit} handleToHide={() => this.handleToHideWindow('isSplit')}> <Mask visible={isSplit} handleToHide={() => this.handleToHideWindow('isSplit')}>
<SplitSuccess <SplitSuccess
ids={ids} ids={ids}
data={splitInfo} data={splitInfo}
handleToInvite={() => this.handleToInvite(splitInfo.treasure_code)} handleToInvite={() => this.handleToInvite(splitInfo.treasure_code)}
...@@ -495,7 +491,7 @@ class MyTreasure extends Component { ...@@ -495,7 +491,7 @@ class MyTreasure extends Component {
handleToBindAddress={this.handleToBindAddress} handleToBindAddress={this.handleToBindAddress}
successSplitTreasure={this.successSplitTreasure} successSplitTreasure={this.successSplitTreasure}
> >
<PrizeStatus <PrizeStatus
data={splitInfo} data={splitInfo}
handleToBindPhone={this.handleToBindPhone} handleToBindPhone={this.handleToBindPhone}
handleToBindAddress={this.handleToBindAddress} handleToBindAddress={this.handleToBindAddress}
...@@ -526,14 +522,14 @@ class MyTreasure extends Component { ...@@ -526,14 +522,14 @@ class MyTreasure extends Component {
{/* 绑定手机号--弹窗,确认 */} {/* 绑定手机号--弹窗,确认 */}
<Mask visible={isConfirm} handleToHide={() => this.handleToHideWindow('isConfirm')}> <Mask visible={isConfirm} handleToHide={() => this.handleToHideWindow('isConfirm')}>
<ConfirmPhone <ConfirmPhone
data={params} data={params}
bindInfo={bindInfo} bindInfo={bindInfo}
handleToCancle={() => this.handleToHideWindow('isConfirm')} handleToCancle={() => this.handleToHideWindow('isConfirm')}
successBindPhone={this.successBindPhone} successBindPhone={this.successBindPhone}
/> />
</Mask> </Mask>
{/* 绑定地址--弹窗 */} {/* 绑定地址--弹窗 */}
<Mask visible={isAddress} handleToHide={() => this.handleToHideWindow('isAddress')}> <Mask visible={isAddress} handleToHide={() => this.handleToHideWindow('isAddress')}>
<AddressPopup <AddressPopup
...@@ -550,8 +546,8 @@ class MyTreasure extends Component { ...@@ -550,8 +546,8 @@ class MyTreasure extends Component {
{/* 组队成功 */} {/* 组队成功 */}
<Mask visible={isCreate} handleToHide={() => this.handleToHideWindow('isCreate')}> <Mask visible={isCreate} handleToHide={() => this.handleToHideWindow('isCreate')}>
<CreateSuccess <CreateSuccess
data={createInfo} data={createInfo}
handleToInvite={() => { handleToInvite={() => {
this.handleToInvite(createInfo.treasure_code); this.handleToInvite(createInfo.treasure_code);
this.handleToHideWindow('isCreate'); this.handleToHideWindow('isCreate');
......
...@@ -63,6 +63,7 @@ class YearCourse extends Component { ...@@ -63,6 +63,7 @@ class YearCourse extends Component {
key: "" key: ""
}, },
followBarcode: '', followBarcode: '',
qrUrl:'',
sum:'', sum:'',
removable:'', removable:'',
currentId:'' currentId:''
...@@ -298,6 +299,9 @@ class YearCourse extends Component { ...@@ -298,6 +299,9 @@ class YearCourse extends Component {
.then(res => { .then(res => {
const {errno, data, msg} = res.data const {errno, data, msg} = res.data
if (errno == 0) { if (errno == 0) {
this.setState({
qrUrl:data.url
})
QRCode.toDataURL(data.url, (err, url) => { QRCode.toDataURL(data.url, (err, url) => {
this.setState({ this.setState({
followBarcode: url, followBarcode: url,
...@@ -380,7 +384,7 @@ class YearCourse extends Component { ...@@ -380,7 +384,7 @@ class YearCourse extends Component {
saveImage = () => { saveImage = () => {
let version = getParam('version') let version = getParam('version')
version = typeof version === 'string' ? version.replace('.', '').replace('.', '').slice(0, 3) : '' version = typeof version === 'string' ? version.replace('.', '').replace('.', '').slice(0, 3) : ''
const QRCodeUrl = '//julyedu-cdn.oss-cn-beijing.aliyuncs.com/2018christyear/h5/qrcode.jpg' const QRCodeUrl = this.state.qrUrl
if (version && parseInt(version) < 451) { if (version && parseInt(version) < 451) {
Toast.info('当前不支持此功能,升级到最新版本app可以点击保存二维码!', 3, null, false) Toast.info('当前不支持此功能,升级到最新版本app可以点击保存二维码!', 3, null, false)
} else { } else {
......
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