Commit 0580637c by wangshuo

测试

parent 09f013c0
...@@ -104,7 +104,7 @@ class Single extends Component { ...@@ -104,7 +104,7 @@ class Single extends Component {
let _this = this; let _this = this;
let weixin_code = getParam('code') let weixin_code = getParam('code')
if (weixin_code) { if (weixin_code) {
if (getParam('oid') === undefined) { if (!getParam('oid')) {
return return
} else { } else {
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) => {
...@@ -125,11 +125,13 @@ class Single extends Component { ...@@ -125,11 +125,13 @@ class Single extends Component {
Toast.info('支付成功', 2); Toast.info('支付成功', 2);
_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 => {
Toast.info(res.data.errno, 2);
if (res.data.errno === 401) { if (res.data.errno === 401) {
clearInterval(_this.intervalPayStatus); clearInterval(_this.intervalPayStatus);
_this.intervalPayStatus = null; _this.intervalPayStatus = null;
// 获取课程类型 // 获取课程类型
http.get(`${API['base-api']}/sys/orderStatus/${getParam('oid')}`).then((res) => { http.get(`${API['base-api']}/sys/orderStatus/${getParam('oid')}`).then((res) => {
Toast.info(res.data.data.errno, 2);
if (res.data.data.errno == '200') { if (res.data.data.errno == '200') {
// 正常购买单集成功 // 正常购买单集成功
this.setState({ this.setState({
......
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