Commit 3ce67a1c by zhanghaozhe

a

parents a95dfebb 30fab16e
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){function r(r){for(var n,a,i=r[0],d=r[1],u=r[2],f=0,l=[];f<i.length;f++)a=i[f],o[a]&&l.push(o[a][0]),o[a]=0;for(n in d)Object.prototype.hasOwnProperty.call(d,n)&&(e[n]=d[n]);for(s&&s(r);l.length;)l.shift()();return c.push.apply(c,u||[]),t()}function t(){for(var e,r=0;r<c.length;r++){for(var t=c[r],n=!0,a=1;a<t.length;a++){var d=t[a];0!==o[d]&&(n=!1)}n&&(c.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},a={18:0},o={18:0},c=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.e=function(e){var r=[];a[e]?r.push(a[e]):0!==a[e]&&{0:1,1:1,2:1,3:1,4:1,6:1,8:1,9:1,10:1,11:1,12:1,13:1,14:1,16:1,17:1,19:1,20:1,21:1,22:1,23:1,26:1,28:1,29:1,30:1,31:1}[e]&&r.push(a[e]=new Promise(function(r,t){for(var n="mrstatic/css/"+({0:"BargainMiddlePage",1:"Classify",2:"CourseList",3:"DrawDocument",4:"Examination",5:"MyEdit",6:"Order",7:"Orderinfo",8:"PayOrder",9:"Preferential",10:"SearchResult",11:"ShopCart",12:"aist-share",13:"coupons",14:"detail",16:"myorders",17:"purchased",19:"search",20:"shareposter",21:"study",22:"togroup",23:"video"}[e]||e)+"."+{0:"718dff83",1:"f2f19957",2:"462fc81e",3:"2e7d81ca",4:"f2cc3163",5:"31d6cfe0",6:"8bb031ea",7:"31d6cfe0",8:"e5315535",9:"7456653e",10:"1ad68937",11:"3a4dbb7a",12:"bef8c404",13:"9ece7350",14:"955f7c3d",16:"3ae12dec",17:"1daf107b",19:"fab97849",20:"f09a5959",21:"5e9927d1",22:"49988cae",23:"b57a1aec",25:"31d6cfe0",26:"4c706a4e",27:"31d6cfe0",28:"694b4628",29:"5ed15c7e",30:"ecbb6f9a",31:"bc06dce4"}[e]+".chunk.css",o=i.p+n,c=document.getElementsByTagName("link"),d=0;d<c.length;d++){var u=(s=c[d]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(u===n||u===o))return r()}var f=document.getElementsByTagName("style");for(d=0;d<f.length;d++){var s;if((u=(s=f[d]).getAttribute("data-href"))===n||u===o)return r()}var l=document.createElement("link");l.rel="stylesheet",l.type="text/css",l.onload=r,l.onerror=function(r){var n=r&&r.target&&r.target.src||o,c=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");c.request=n,delete a[e],l.parentNode.removeChild(l),t(c)},l.href=o,document.getElementsByTagName("head")[0].appendChild(l)}).then(function(){a[e]=0}));var t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise(function(r,n){t=o[e]=[r,n]});r.push(t[2]=n);var c,d=document.createElement("script");d.charset="utf-8",d.timeout=120,i.nc&&d.setAttribute("nonce",i.nc),d.src=function(e){return i.p+"mrstatic/js/"+({0:"BargainMiddlePage",1:"Classify",2:"CourseList",3:"DrawDocument",4:"Examination",5:"MyEdit",6:"Order",7:"Orderinfo",8:"PayOrder",9:"Preferential",10:"SearchResult",11:"ShopCart",12:"aist-share",13:"coupons",14:"detail",16:"myorders",17:"purchased",19:"search",20:"shareposter",21:"study",22:"togroup",23:"video"}[e]||e)+"."+{0:"9f3e27f6",1:"51bce74c",2:"db4ba68d",3:"113d69a8",4:"a60fe795",5:"f6d34e3e",6:"5a8c9fba",7:"4dd8d9ca",8:"7b05186c",9:"92af0cc8",10:"70289b63",11:"6af00095",12:"2c3354f3",13:"c1321e17",14:"3d22c0e9",16:"4ecf30b6",17:"27a8a491",19:"a5240cdd",20:"db70f8ec",21:"2d4cd384",22:"f58422bd",23:"3c67fe6e",25:"6003e343",26:"1949e975",27:"a5cba87a",28:"ae06d342",29:"98a708a6",30:"02cebc42",31:"59cf128e"}[e]+".chunk.js"}(e),c=function(r){d.onerror=d.onload=null,clearTimeout(u);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src,c=new Error("Loading chunk "+e+" failed.\n("+n+": "+a+")");c.type=n,c.request=a,t[1](c)}o[e]=void 0}};var u=setTimeout(function(){c({type:"timeout",target:d})},12e4);d.onerror=d.onload=c,document.head.appendChild(d)}return Promise.all(r)},i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,function(r){return e[r]}.bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="/",i.oe=function(e){throw console.error(e),e};var d=window.webpackJsonp=window.webpackJsonp||[],u=d.push.bind(d);d.push=r,d=d.slice();for(var f=0;f<d.length;f++)r(d[f]);var s=u;t()}([]);
//# sourceMappingURL=runtime~main.1c00c991.js.map
\ No newline at end of file
!function(e){function r(r){for(var n,a,i=r[0],f=r[1],u=r[2],d=0,l=[];d<i.length;d++)a=i[d],o[a]&&l.push(o[a][0]),o[a]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(s&&s(r);l.length;)l.shift()();return c.push.apply(c,u||[]),t()}function t(){for(var e,r=0;r<c.length;r++){for(var t=c[r],n=!0,a=1;a<t.length;a++){var f=t[a];0!==o[f]&&(n=!1)}n&&(c.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},a={18:0},o={18:0},c=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.e=function(e){var r=[];a[e]?r.push(a[e]):0!==a[e]&&{0:1,1:1,2:1,3:1,4:1,6:1,8:1,9:1,10:1,11:1,12:1,13:1,14:1,16:1,17:1,19:1,20:1,21:1,22:1,23:1,26:1,28:1,29:1,30:1,31:1}[e]&&r.push(a[e]=new Promise(function(r,t){for(var n="mrstatic/css/"+({0:"BargainMiddlePage",1:"Classify",2:"CourseList",3:"DrawDocument",4:"Examination",5:"MyEdit",6:"Order",7:"Orderinfo",8:"PayOrder",9:"Preferential",10:"SearchResult",11:"ShopCart",12:"aist-share",13:"coupons",14:"detail",16:"myorders",17:"purchased",19:"search",20:"shareposter",21:"study",22:"togroup",23:"video"}[e]||e)+"."+{0:"f15334d9",1:"4393f5d0",2:"3e2390c5",3:"58508f31",4:"02475a25",5:"31d6cfe0",6:"5199031c",7:"31d6cfe0",8:"4a91788c",9:"aced1689",10:"bbdc2bc7",11:"f39ca42e",12:"01bc9663",13:"c48c0144",14:"1eb8b1b7",16:"1dbd49e2",17:"a14c858f",19:"85280180",20:"4618854a",21:"d12e7b47",22:"acc61e40",23:"c8ab98be",25:"31d6cfe0",26:"2833f269",27:"31d6cfe0",28:"415f421f",29:"fd1b61f1",30:"44620a41",31:"ffbe0560"}[e]+".chunk.css",o=i.p+n,c=document.getElementsByTagName("link"),f=0;f<c.length;f++){var u=(s=c[f]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(u===n||u===o))return r()}var d=document.getElementsByTagName("style");for(f=0;f<d.length;f++){var s;if((u=(s=d[f]).getAttribute("data-href"))===n||u===o)return r()}var l=document.createElement("link");l.rel="stylesheet",l.type="text/css",l.onload=r,l.onerror=function(r){var n=r&&r.target&&r.target.src||o,c=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");c.request=n,delete a[e],l.parentNode.removeChild(l),t(c)},l.href=o,document.getElementsByTagName("head")[0].appendChild(l)}).then(function(){a[e]=0}));var t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise(function(r,n){t=o[e]=[r,n]});r.push(t[2]=n);var c,f=document.createElement("script");f.charset="utf-8",f.timeout=120,i.nc&&f.setAttribute("nonce",i.nc),f.src=function(e){return i.p+"mrstatic/js/"+({0:"BargainMiddlePage",1:"Classify",2:"CourseList",3:"DrawDocument",4:"Examination",5:"MyEdit",6:"Order",7:"Orderinfo",8:"PayOrder",9:"Preferential",10:"SearchResult",11:"ShopCart",12:"aist-share",13:"coupons",14:"detail",16:"myorders",17:"purchased",19:"search",20:"shareposter",21:"study",22:"togroup",23:"video"}[e]||e)+"."+{0:"7fcbd8ac",1:"cee9d5dc",2:"52ccbef6",3:"c5cbe776",4:"84e67410",5:"2ca30246",6:"602623f9",7:"3c63e388",8:"c5fc2fd7",9:"a0faaa16",10:"a86c22ba",11:"c147e61b",12:"6c8b180d",13:"aa018222",14:"ff2cc9e0",16:"f456ed7a",17:"2dd435a7",19:"132c4e8e",20:"e653f23d",21:"f7b51591",22:"30664e8c",23:"33d62c42",25:"40f604ee",26:"a09b12f5",27:"db33da73",28:"19f209d3",29:"ac9bf503",30:"dea15458",31:"b32e549c"}[e]+".chunk.js"}(e),c=function(r){f.onerror=f.onload=null,clearTimeout(u);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src,c=new Error("Loading chunk "+e+" failed.\n("+n+": "+a+")");c.type=n,c.request=a,t[1](c)}o[e]=void 0}};var u=setTimeout(function(){c({type:"timeout",target:f})},12e4);f.onerror=f.onload=c,document.head.appendChild(f)}return Promise.all(r)},i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,function(r){return e[r]}.bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="/",i.oe=function(e){throw console.error(e),e};var f=window.webpackJsonp=window.webpackJsonp||[],u=f.push.bind(f);f.push=r,f=f.slice();for(var d=0;d<f.length;d++)r(f[d]);var s=u;t()}([]);
//# sourceMappingURL=runtime~main.3d2b38c9.js.map
\ No newline at end of file
self.__precacheManifest = [
{
"revision": "6ef699f4001576777052",
"url": "/mrstatic/js/purchased.2dd435a7.chunk.js"
},
{
"revision": "f55adc110e27ead0d43b",
"url": "/mrstatic/css/BargainMiddlePage.f15334d9.chunk.css"
},
{
"revision": "4a9f70a91713c1d27fe8",
"url": "/mrstatic/css/Classify.4393f5d0.chunk.css"
},
{
"revision": "4a9f70a91713c1d27fe8",
"url": "/mrstatic/js/Classify.cee9d5dc.chunk.js"
},
{
"revision": "6bef61b3a2e393b21429",
"url": "/mrstatic/css/CourseList.3e2390c5.chunk.css"
},
{
"revision": "6bef61b3a2e393b21429",
"url": "/mrstatic/js/CourseList.52ccbef6.chunk.js"
},
{
"revision": "90e191818f3a47fed698",
"url": "/mrstatic/css/DrawDocument.58508f31.chunk.css"
},
{
"revision": "90e191818f3a47fed698",
"url": "/mrstatic/js/DrawDocument.c5cbe776.chunk.js"
},
{
"revision": "c7d6b93956d442504a02",
"url": "/mrstatic/css/Examination.02475a25.chunk.css"
},
{
"revision": "c7d6b93956d442504a02",
"url": "/mrstatic/js/Examination.84e67410.chunk.js"
},
{
"revision": "abc009c8babaeeba5500",
"url": "/mrstatic/js/MyEdit.2ca30246.chunk.js"
},
{
"revision": "1d30fd1e3ae6ca9db14e",
"url": "/mrstatic/css/Order.5199031c.chunk.css"
},
{
"revision": "1d30fd1e3ae6ca9db14e",
"url": "/mrstatic/js/Order.602623f9.chunk.js"
},
{
"revision": "0c681ff8e36c66ca1c17",
"url": "/mrstatic/js/Orderinfo.3c63e388.chunk.js"
},
{
"revision": "c52f1aa10ab922b9b424",
"url": "/mrstatic/css/PayOrder.4a91788c.chunk.css"
},
{
"revision": "c52f1aa10ab922b9b424",
"url": "/mrstatic/js/PayOrder.c5fc2fd7.chunk.js"
},
{
"revision": "45bdc4b0da9e1ae20ea5",
"url": "/mrstatic/css/Preferential.aced1689.chunk.css"
},
{
"revision": "45bdc4b0da9e1ae20ea5",
"url": "/mrstatic/js/Preferential.a0faaa16.chunk.js"
},
{
"revision": "a2686e25b62d71892af6",
"url": "/mrstatic/css/SearchResult.bbdc2bc7.chunk.css"
},
{
"revision": "a2686e25b62d71892af6",
"url": "/mrstatic/js/SearchResult.a86c22ba.chunk.js"
},
{
"revision": "e4c5440325953ae42896",
"url": "/mrstatic/css/ShopCart.f39ca42e.chunk.css"
},
{
"revision": "e4c5440325953ae42896",
"url": "/mrstatic/js/ShopCart.c147e61b.chunk.js"
},
{
"revision": "19532be65d68627b5641",
"url": "/mrstatic/css/aist-share.01bc9663.chunk.css"
},
{
"revision": "19532be65d68627b5641",
"url": "/mrstatic/js/aist-share.6c8b180d.chunk.js"
},
{
"revision": "8f4d88e76da29f010054",
"url": "/mrstatic/css/coupons.c48c0144.chunk.css"
},
{
"revision": "8f4d88e76da29f010054",
"url": "/mrstatic/js/coupons.aa018222.chunk.js"
},
{
"revision": "54c751c638288e7b780a",
"url": "/mrstatic/css/detail.1eb8b1b7.chunk.css"
},
{
"revision": "54c751c638288e7b780a",
"url": "/mrstatic/js/detail.ff2cc9e0.chunk.js"
},
{
"revision": "3d907cacdbd0f1630011",
"url": "/mrstatic/css/main.eb1f7717.chunk.css"
},
{
"revision": "3d907cacdbd0f1630011",
"url": "/mrstatic/js/main.1310a6b9.chunk.js"
},
{
"revision": "1789ee08741096ff04c0",
"url": "/mrstatic/css/myorders.1dbd49e2.chunk.css"
},
{
"revision": "1789ee08741096ff04c0",
"url": "/mrstatic/js/myorders.f456ed7a.chunk.js"
},
{
"revision": "6ef699f4001576777052",
"url": "/mrstatic/css/purchased.a14c858f.chunk.css"
},
{
"revision": "f55adc110e27ead0d43b",
"url": "/mrstatic/js/BargainMiddlePage.7fcbd8ac.chunk.js"
},
{
"revision": "7256f6b8894b6454fa5c",
"url": "/mrstatic/js/runtime~main.3d2b38c9.js"
},
{
"revision": "3d499f5aa8cfd4232849",
"url": "/mrstatic/css/search.85280180.chunk.css"
},
{
"revision": "3d499f5aa8cfd4232849",
"url": "/mrstatic/js/search.132c4e8e.chunk.js"
},
{
"revision": "35d245b5cd02a1bcf1e8",
"url": "/mrstatic/css/shareposter.4618854a.chunk.css"
},
{
"revision": "35d245b5cd02a1bcf1e8",
"url": "/mrstatic/js/shareposter.e653f23d.chunk.js"
},
{
"revision": "4f36495eae5ab42379b9",
"url": "/mrstatic/css/study.d12e7b47.chunk.css"
},
{
"revision": "4f36495eae5ab42379b9",
"url": "/mrstatic/js/study.f7b51591.chunk.js"
},
{
"revision": "2d457d689961aedbe1d2",
"url": "/mrstatic/css/togroup.acc61e40.chunk.css"
},
{
"revision": "2d457d689961aedbe1d2",
"url": "/mrstatic/js/togroup.30664e8c.chunk.js"
},
{
"revision": "29484c1ef4ebe6f2294d",
"url": "/mrstatic/css/video.c8ab98be.chunk.css"
},
{
"revision": "29484c1ef4ebe6f2294d",
"url": "/mrstatic/js/video.33d62c42.chunk.js"
},
{
"revision": "80011994e30adf599e5f47fcc81bc06d",
"url": "/mrstatic/media/progress-share-bg.80011994.png"
},
{
"revision": "c3ed76cc455a4cc2f766",
"url": "/mrstatic/js/24.0da503e7.chunk.js"
},
{
"revision": "1b6bcf68e45ff6c1428a",
"url": "/mrstatic/js/25.40f604ee.chunk.js"
},
{
"revision": "81a489ac63f2f2df5ab412e0782bd54c",
"url": "/mrstatic/media/kanjia_cg_icon.81a489ac.png"
},
{
"revision": "d1f32885754a70b53dce",
"url": "/mrstatic/js/26.a09b12f5.chunk.js"
},
{
"revision": "0da9f3f8bc86bcbdb1c1",
"url": "/mrstatic/js/27.db33da73.chunk.js"
},
{
"revision": "f983caa7c06f105373e7e1aec42da261",
"url": "/mrstatic/media/iconfont.f983caa7.svg"
},
{
"revision": "36823808109be8d35341",
"url": "/mrstatic/js/28.19f209d3.chunk.js"
},
{
"revision": "145742789ab409c81f28938b15b5dee7",
"url": "/mrstatic/media/iconfont.14574278.ttf"
},
{
"revision": "eae42206e2b7b820970c",
"url": "/mrstatic/js/29.ac9bf503.chunk.js"
},
{
"revision": "cd1c41437a2e35a283e4b16b620a8c9e",
"url": "/mrstatic/media/iconfont.cd1c4143.eot"
},
{
"revision": "f2edd646000c2e576950",
"url": "/mrstatic/js/30.dea15458.chunk.js"
},
{
"revision": "7b542c778563daa7cc420d21ed1601b3",
"url": "/mrstatic/media/iconfont.7b542c77.woff"
},
{
"revision": "40d57f8549c18e427bee",
"url": "/mrstatic/js/31.b32e549c.chunk.js"
},
{
"revision": "40d57f8549c18e427bee",
"url": "/mrstatic/css/31.ffbe0560.chunk.css"
},
{
"revision": "f2edd646000c2e576950",
"url": "/mrstatic/css/30.44620a41.chunk.css"
},
{
"revision": "eae42206e2b7b820970c",
"url": "/mrstatic/css/29.fd1b61f1.chunk.css"
},
{
"revision": "36823808109be8d35341",
"url": "/mrstatic/css/28.415f421f.chunk.css"
},
{
"revision": "d1f32885754a70b53dce",
"url": "/mrstatic/css/26.2833f269.chunk.css"
},
{
"revision": "c3ed76cc455a4cc2f766",
"url": "/mrstatic/css/24.62b6292a.chunk.css"
},
{
"revision": "9392f1619fe0868a64ab9bde162657d9",
"url": "/index.html"
}
];
\ No newline at end of file
......@@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js");
importScripts(
"/precache-manifest.599a7007b40444e357479f5e23af48cc.js"
"/precache-manifest.9ba803186e98b13ae9518db44b47827d.js"
);
workbox.clientsClaim();
......
import React, {Component} from 'react'
import React, { Component } from 'react'
import './index.scss'
import Bargain from './bargain'
import Group from './group'
import OutLine from './outline'
import {HeaderBar, CallApp} from '../../common'
import { HeaderBar, CallApp } from '../../common'
import ShareRank from "./shareRank"
import Audition from "./audition"
import Single from "./single"
import SingleSuccess from './single/singleSuccess';
import BtnStatus from "./btnstatus"
import Carouselw from "./carousel"
import {connect} from "react-redux"
import {getCourses, addCourseToCart} from "./actions"
import {getParam, http, browser,wxShare} from "@/utils"
import {Toast} from 'antd-mobile'
import {compose, bindActionCreators} from "redux";
import { connect } from "react-redux"
import { getCourses, addCourseToCart } from "./actions"
import { getParam, http, browser, wxShare } from "@/utils"
import { Toast } from 'antd-mobile'
import { compose, bindActionCreators } from "redux";
class Detail extends Component {
......@@ -47,8 +47,8 @@ class Detail extends Component {
componentDidMount() {
this.fetchCourseInfo();
const { location: { state = {} } } = this.props;
if(state.oid) {
const {location: {state = {}}} = this.props;
if (state.oid) {
this.check(state.oid);
}
if (getParam('is_class') === 1 || getParam('weixinpay')) {
......@@ -60,16 +60,16 @@ class Detail extends Component {
}
componentDidUpdate(prevProps) {
if(prevProps.user.hasError !== this.props.user.hasError){
if (prevProps.user.hasError !== this.props.user.hasError) {
this.fetchCourseInfo()
}
}
payCallback =() => {
payCallback = () => {
const _this = this;
if(!getParam('oid')) {
if (!getParam('oid')) {
return;
}else{
} else {
this.setState({
singMess: JSON.parse(window.localStorage.getItem('singMess'))
})
......@@ -112,7 +112,7 @@ class Detail extends Component {
}, 1000)
}
};
isweixinPay =()=> {
isweixinPay = () => {
let _this = this;
let weixin_code = getParam('code');
if (weixin_code) {
......@@ -126,6 +126,7 @@ class Detail extends Component {
http.get(`${API['base-api']}/pay/wxpay/pub_charge/oid/${getParam('oid')}/code/${weixin_code}`).then((res) => {
if (res.data.errno === 0) {
const data = res.data.data;
function onBridgeReady() {
WeixinJSBridge.invoke(
'getBrandWCPayRequest', {
......@@ -182,6 +183,7 @@ class Detail extends Component {
}
)
}
if (typeof WeixinJSBridge == "undefined") {
if (document.addEventListener) {
document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false)
......@@ -239,13 +241,13 @@ class Detail extends Component {
payCallBack = (singleType, nowPrice, laterPrice) => {
// Toast.info(singleType, 2);
const _this = this;
if(singleType === 2) {
if (singleType === 2) {
_this.setState({
singleType,
nowPrice,
laterPrice
})
}else{
} else {
_this.setState({
singleType,
})
......@@ -261,6 +263,7 @@ class Detail extends Component {
});
if (data.course_info) {
let course_info = data.course_info;
document.title = `${course_info.course_title} - 七月在线`;
if (course_info.group_status === 3 || course_info.group_status === 4) {
let endTime = course_info.pdd_group_info.groupon_member.end_time;
let date = endTime * 1000,
......@@ -281,7 +284,7 @@ class Detail extends Component {
title: course_info.course_title,
desc: course_info.index_description,
link: encodeURI(location.origin + '/detail?id=' + getParam('id')),
imgUrl:course_info.image_name
imgUrl: course_info.image_name
});
}
......@@ -342,7 +345,7 @@ class Detail extends Component {
// 加入购物车 type:1 加入购物车,2加入购物车并跳转到购物车页面去支付
toCart = (type) => {
const { history, addCourseToCart } = this.props;
const {history, addCourseToCart} = this.props;
let data = {
course_id: getParam('id')
};
......@@ -355,7 +358,8 @@ class Detail extends Component {
addCourseToCart();
this.fetchCourseInfo();
} else {
history.replace('/shopcart');ß
history.replace('/shopcart');
ß
}
} else if (res.data.code === 15001) {
history.replace('/shopcart');
......@@ -379,9 +383,9 @@ class Detail extends Component {
// } else {
// Toast.info('请在微信中使用分享功能!', 2);
// }
const { history } = this.props;
const { course = {} } = this.state;
if(course.course_info && course.course_info.self_oid) {
const {history} = this.props;
const {course = {}} = this.state;
if (course.course_info && course.course_info.self_oid) {
history.push(`/togroup?id=${course.course_info.self_oid}`);
}
}
......@@ -398,7 +402,7 @@ class Detail extends Component {
}
render() {
const { course: { course_info={} }, barInfo, singleBox, singleType } = this.state;
const {course: {course_info = {}}, barInfo, singleBox, singleType} = this.state;
let courseInfo = '',
service = '',
number = 0,
......@@ -412,15 +416,15 @@ class Detail extends Component {
// }
const {share, countdown, list, outList} = this.state;
let href = '';
const { location: { state = {}} } = this.props;
if(state.to && state.to === 'classify') {
const {location: {state = {}}} = this.props;
if (state.to && state.to === 'classify') {
href = '/classify'
}
if(state.oid) {
href='/classify'
if (state.oid) {
href = '/classify'
}
if(getParam('dist_code')) {
href='/'
if (getParam('dist_code')) {
href = '/'
}
return (
<div>
......@@ -431,18 +435,18 @@ class Detail extends Component {
cart={true}
toHref={href}
/>
<CallApp className='toapp' />
<CallApp className='toapp'/>
{/*弹幕*/}
<Carouselw />
<Carouselw/>
{/*课程*/}
<div className='course-content'>
<div className='cover'>
<img src={course_info.image_name} alt="" />
<img src={course_info.image_name} alt=""/>
{
course_info.is_aist &&
<span className='return_cash' />
<span className='return_cash'/>
}
</div>
<div className="info">
......@@ -533,7 +537,7 @@ class Detail extends Component {
{/*分享赚钱*/}
{
course_info.is_dist &&
<ShareRank courseInfo={course_info} />
<ShareRank courseInfo={course_info}/>
}
{/**
......@@ -554,7 +558,7 @@ class Detail extends Component {
{/*砍价*/}
{
course_info.is_baoming === 0 && (!course_info.is_aist) && course_info.is_bargain &&
<Bargain />
<Bargain/>
}
{/*课程介绍、大纲*/}
......@@ -589,7 +593,7 @@ class Detail extends Component {
{`还差${number}人,分享到3个群,成团率高达98%`}
</div>
<div className='tipArrow'>
<i className='iconfont iconyindao' />
<i className='iconfont iconyindao'/>
</div>
</div>
) : null
......
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