Commit ff13374a by FE

artifact

parent 6284deb8
...@@ -28,6 +28,9 @@ $z-max: 999999; //为了应付某些插件z-index 值过高的问题 ...@@ -28,6 +28,9 @@ $z-max: 999999; //为了应付某些插件z-index 值过高的问题
// -------------------------------------------------- // --------------------------------------------------
// //
body {
position: relative;
}
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
border: 0 none; border: 0 none;
font-size: inherit; font-size: inherit;
......
...@@ -9,6 +9,7 @@ import Ranking from "@/components/bargainMiddlePage/ranking" ...@@ -9,6 +9,7 @@ import Ranking from "@/components/bargainMiddlePage/ranking"
import { compose } from "redux" import { compose } from "redux"
import { withRouter } from 'react-router-dom' import { withRouter } from 'react-router-dom'
import {connect} from "react-redux"; import {connect} from "react-redux";
import { Object } from 'core-js'
class Bargain extends Component { class Bargain extends Component {
...@@ -65,7 +66,7 @@ class Bargain extends Component { ...@@ -65,7 +66,7 @@ class Bargain extends Component {
//获取砍价信息 //获取砍价信息
getBargainInfo = () => { getBargainInfo = (isFetch = true) => {
let data = { let data = {
courseId: getParam('id') courseId: getParam('id')
} }
...@@ -78,7 +79,7 @@ class Bargain extends Component { ...@@ -78,7 +79,7 @@ class Bargain extends Component {
// limitPeople: res.data.data.limit_people, // limitPeople: res.data.data.limit_people,
// bargainCode: res.data.data.bargain_code // bargainCode: res.data.data.bargain_code
}); });
if(isFetch) {
// 砍价状态 0-砍价中,1砍价结束,待支付,2砍价过期(没有砍价记录没有砍价信息),3已购买 // 砍价状态 0-砍价中,1砍价结束,待支付,2砍价过期(没有砍价记录没有砍价信息),3已购买
if (data.bargain_status === 0 || data.bargain_status === 1 ) { if (data.bargain_status === 0 || data.bargain_status === 1 ) {
this.getBargainRankList({ this.getBargainRankList({
...@@ -86,6 +87,7 @@ class Bargain extends Component { ...@@ -86,6 +87,7 @@ class Bargain extends Component {
bargain_code: data.bargain_code bargain_code: data.bargain_code
}); });
} }
}
} else { } else {
Toast.info(msg, 2); Toast.info(msg, 2);
} }
...@@ -113,8 +115,9 @@ class Bargain extends Component { ...@@ -113,8 +115,9 @@ class Bargain extends Component {
if (res.data.code === 200) { if (res.data.code === 200) {
this.setState({ this.setState({
isShowOverlay: true, isShowOverlay: true,
status: 1, status: 1
}) });
this.getBargainInfo(false);
} else { } else {
Toast.info(res.data.msg, 2) Toast.info(res.data.msg, 2)
} }
...@@ -431,13 +434,14 @@ function Artifact(props) { ...@@ -431,13 +434,14 @@ function Artifact(props) {
} }
function UseArtifact(props) { function UseArtifact(props) {
const { barInfo: {bargain_price = 0, amount = 0} } = this.props;
return ( return (
<div className='use-artifact-box'> <div className='use-artifact-box'>
<img className='top-img' src={require('./image/kanjia_cg_icon.png')} alt=""/> <img className='top-img' src={require('./image/kanjia_cg_icon.png')} alt=""/>
<p className='top-tip'>厉害了,又砍掉了10元!</p> <p className='top-tip'>厉害了,又砍掉了10元!</p>
<p className='middle-tip'> <p className='middle-tip'>
你已经砍了 你已经砍了
<span className={'indicator'}>109</span> <span className={'indicator'}>{amount - bargain_price}</span>
没见过你这么能砍的人... 没见过你这么能砍的人...
</p> </p>
<p className='btm-tip'> <p className='btm-tip'>
......
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