Commit 751729cb by caixinyu

更改python课领券后不跳转问题

parent c0e99de2
......@@ -115,8 +115,8 @@
"python-class.css": "/mrstaticcss/python-class.af18e67a.chunk.css",
"python-class.js": "/mrstaticjs/python-class.b9b43a65.chunk.js",
"python-class.js.map": "/mrstaticjs/python-class.b9b43a65.chunk.js.map",
"runtime-main.js": "/mrstaticjs/runtime-main.8cf0bc63.js",
"runtime-main.js.map": "/mrstaticjs/runtime-main.8cf0bc63.js.map",
"runtime-main.js": "/mrstaticjs/runtime-main.53636695.js",
"runtime-main.js.map": "/mrstaticjs/runtime-main.53636695.js.map",
"search.css": "/mrstaticcss/search.b0c8ab06.chunk.css",
"search.js": "/mrstaticjs/search.aaab04ef.chunk.js",
"search.js.map": "/mrstaticjs/search.aaab04ef.chunk.js.map",
......@@ -201,8 +201,8 @@
"mrstaticjs/69.80788432.chunk.js": "/mrstaticjs/69.80788432.chunk.js",
"mrstaticjs/69.80788432.chunk.js.map": "/mrstaticjs/69.80788432.chunk.js.map",
"mrstaticcss/70.148c23dc.chunk.css": "/mrstaticcss/70.148c23dc.chunk.css",
"mrstaticjs/70.85fc8cf1.chunk.js": "/mrstaticjs/70.85fc8cf1.chunk.js",
"mrstaticjs/70.85fc8cf1.chunk.js.map": "/mrstaticjs/70.85fc8cf1.chunk.js.map",
"mrstaticjs/70.975bf368.chunk.js": "/mrstaticjs/70.975bf368.chunk.js",
"mrstaticjs/70.975bf368.chunk.js.map": "/mrstaticjs/70.975bf368.chunk.js.map",
"mrstaticcss/71.9cd15945.chunk.css": "/mrstaticcss/71.9cd15945.chunk.css",
"mrstaticjs/71.d42b5c06.chunk.js": "/mrstaticjs/71.d42b5c06.chunk.js",
"mrstaticjs/71.d42b5c06.chunk.js.map": "/mrstaticjs/71.d42b5c06.chunk.js.map",
......@@ -278,11 +278,11 @@
"mrstaticmedia/iconfont.css": "/mrstaticmedia/iconfont.fa64fbc4.ttf",
"mrstaticmedia/kanjia_cg_icon.png": "/mrstaticmedia/kanjia_cg_icon.81a489ac.png",
"mrstaticmedia/video.scss": "/mrstaticmedia/progress-share-bg.80011994.png",
"precache-manifest.cdc0a0fa438ad275b2a99b909b70196d.js": "/precache-manifest.cdc0a0fa438ad275b2a99b909b70196d.js",
"precache-manifest.b971fbfc9deaa88403f2b36a62d43ca0.js": "/precache-manifest.b971fbfc9deaa88403f2b36a62d43ca0.js",
"service-worker.js": "/service-worker.js"
},
"entrypoints": [
"mrstaticjs/runtime-main.8cf0bc63.js",
"mrstaticjs/runtime-main.53636695.js",
"mrstaticcss/51.ee6d5e86.chunk.css",
"mrstaticjs/51.54378fc2.chunk.js",
"mrstaticcss/main.a40f1613.chunk.css",
......
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "384930d05959056d0f34561db88e1e7c",
"revision": "f951eb6ffcfffd4300c3cd8072129ae1",
"url": "/index.html"
},
{
......@@ -80,7 +80,7 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
"url": "/mrstaticcss/69.c310b129.chunk.css"
},
{
"revision": "fe9eb9f0fcf475a75fa7",
"revision": "b9fe940bae09f1b5a407",
"url": "/mrstaticcss/70.148c23dc.chunk.css"
},
{
......@@ -372,8 +372,8 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
"url": "/mrstaticjs/69.80788432.chunk.js"
},
{
"revision": "fe9eb9f0fcf475a75fa7",
"url": "/mrstaticjs/70.85fc8cf1.chunk.js"
"revision": "b9fe940bae09f1b5a407",
"url": "/mrstaticjs/70.975bf368.chunk.js"
},
{
"revision": "7ffdaed4606960c92d03",
......@@ -520,8 +520,8 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
"url": "/mrstaticjs/python-class.b9b43a65.chunk.js"
},
{
"revision": "a20fe3da493510045fdb",
"url": "/mrstaticjs/runtime-main.8cf0bc63.js"
"revision": "d95c0768deee565d33b6",
"url": "/mrstaticjs/runtime-main.53636695.js"
},
{
"revision": "25ba20eaf7742efc8166",
......
......@@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
importScripts(
"/precache-manifest.cdc0a0fa438ad275b2a99b909b70196d.js"
"/precache-manifest.b971fbfc9deaa88403f2b36a62d43ca0.js"
);
self.addEventListener('message', (event) => {
......
......@@ -6,19 +6,19 @@ import { http, getParam } from "src/utils"
import "./index.scss"
import { connect } from "react-redux"
let courseObj = [{
url:'/getDetail?id=224',
url:'/getDetail?id=224&distcode=0&ccode=62d62d586cdd8',
prise:"99.00",
name:'人工智能',
code:"B4C719F1D6"
},
{
url:'/getDetail?id=328',
url:'/getDetail?id=461&distcode=0&ccode=62d62d586cdd8',
prise:"199.00",
name:'数据分析',
code:"7DE0F40CE5"
},
{
url:'/getDetail?id=280',
url:'/getDetail?id=280&distcode=0&ccode=62d62d586cdd8',
prise:"99.00",
name:'机器学习',
code:"8AED2B4DE5"
......@@ -43,8 +43,12 @@ class PythonCourse extends Component {
componentDidMount() {
const { user } = this.props
const uid = user && user.data && user.data.uid
if (!uid) {
console.log('未登录');
this.props.history.push("/passport")
}else{
console.log('登了');
}
}
showQuan=(id)=> {
......@@ -61,9 +65,10 @@ class PythonCourse extends Component {
let _this = this;
http.get(`${API.home}/m/user_info_sample/0`).then((res) => {
if(res.code === 200){
console.log('已经登录');
}else{
//为登录,去登录
console.log('去登录');
this.props.history.push("/passport")
}
})
......@@ -80,11 +85,13 @@ class PythonCourse extends Component {
const data = res.data
if (data.code === 200) {
Toast.info('领取成功',2)
console.log('领取成功');
} else {
Toast.info(data.msg)
console.log('领取过了');
Toast.info("您已成功领券,请勿重复领取")
}
history.push(_this.CourseUrl)
console.log('进入详情页');
history.push(_this.state.CourseUrl)
})
// this.$Message.success({
......
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