Commit 9c8cacc5 by wangshuo

单集购买

parent 3eabffcd
...@@ -150,8 +150,10 @@ class Video extends Component { ...@@ -150,8 +150,10 @@ class Video extends Component {
console.log(item); console.log(item);
this.setState({ this.setState({
singleBox: true, singleBox: true,
singleType: 1,
singMess: item singMess: item
}) })
window.localStorage.setItem('singMess', JSON.stringify(item))
} }
// 自组件传给父组件的boxHide // 自组件传给父组件的boxHide
...@@ -165,6 +167,9 @@ class Video extends Component { ...@@ -165,6 +167,9 @@ class Video extends Component {
if(!getParam('oid')) { if(!getParam('oid')) {
return; return;
}else{ }else{
this.setState({
singMess: JSON.parse(window.localStorage.getItem('singMess'))
})
_this.intervalPayStatus = setInterval(function () { _this.intervalPayStatus = setInterval(function () {
http.get(`${API['base-api']}/m/orderState/oid/${getParam('oid')}`).then(res => { http.get(`${API['base-api']}/m/orderState/oid/${getParam('oid')}`).then(res => {
if (res.data.errno === 401) { if (res.data.errno === 401) {
...@@ -211,6 +216,9 @@ class Video extends Component { ...@@ -211,6 +216,9 @@ class Video extends Component {
if (!getParam('oid')) { if (!getParam('oid')) {
return return
} else { } else {
this.setState({
singMess: JSON.parse(window.localStorage.getItem('singMess'))
})
// this.props.weixinPay(weixin_code) // this.props.weixinPay(weixin_code)
http.get(`${API['base-api']}/pay/wxpay/pub_charge/oid/${getParam('oid')}/code/${weixin_code}`).then((res) => { http.get(`${API['base-api']}/pay/wxpay/pub_charge/oid/${getParam('oid')}/code/${weixin_code}`).then((res) => {
if (res.data.errno === 0) { if (res.data.errno === 0) {
...@@ -289,6 +297,9 @@ class Video extends Component { ...@@ -289,6 +297,9 @@ class Video extends Component {
}; };
// 判断支付是否成功 // 判断支付是否成功
check = (oid) => { check = (oid) => {
this.setState({
singMess: JSON.parse(window.localStorage.getItem('singMess'))
})
http.get(`${API['base-api']}/class_order_status/${oid}`).then((res) => { http.get(`${API['base-api']}/class_order_status/${oid}`).then((res) => {
if (Number(res.data.data.errno) === 200) { if (Number(res.data.data.errno) === 200) {
// 正常购买单集成功 // 正常购买单集成功
......
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