Commit 74336131 by zhanghaozhe

bug

parent 64d11d04
{
"BargainMiddlePage.css": "/static/css/BargainMiddlePage.9e05243b.chunk.css",
"BargainMiddlePage.js": "/static/js/BargainMiddlePage.7dfab09b.chunk.js",
"BargainMiddlePage.js.map": "/static/js/BargainMiddlePage.7dfab09b.chunk.js.map",
"BargainMiddlePage.js": "/static/js/BargainMiddlePage.c8e3669c.chunk.js",
"BargainMiddlePage.js.map": "/static/js/BargainMiddlePage.c8e3669c.chunk.js.map",
"Classify.css": "/static/css/Classify.de22eb69.chunk.css",
"Classify.js": "/static/js/Classify.0c09c28b.chunk.js",
"Classify.js.map": "/static/js/Classify.0c09c28b.chunk.js.map",
......@@ -51,8 +51,8 @@
"purchased.css": "/static/css/purchased.4b0044ec.chunk.css",
"purchased.js": "/static/js/purchased.31fa5e4e.chunk.js",
"purchased.js.map": "/static/js/purchased.31fa5e4e.chunk.js.map",
"runtime~main.js": "/static/js/runtime~main.10478d36.js",
"runtime~main.js.map": "/static/js/runtime~main.10478d36.js.map",
"runtime~main.js": "/static/js/runtime~main.28b2be20.js",
"runtime~main.js.map": "/static/js/runtime~main.28b2be20.js.map",
"search.css": "/static/css/search.9fa57dd6.chunk.css",
"search.js": "/static/js/search.5e68d822.chunk.js",
"search.js.map": "/static/js/search.5e68d822.chunk.js.map",
......@@ -89,7 +89,7 @@
"static/js/30.3933456b.chunk.js": "/static/js/30.3933456b.chunk.js",
"static/js/30.3933456b.chunk.js.map": "/static/js/30.3933456b.chunk.js.map",
"index.html": "/index.html",
"precache-manifest.8e649038225c1a936e797ec1dd22eb2d.js": "/precache-manifest.8e649038225c1a936e797ec1dd22eb2d.js",
"precache-manifest.e9325da1e98dc149e2897e2041cc90bb.js": "/precache-manifest.e9325da1e98dc149e2897e2041cc90bb.js",
"service-worker.js": "/service-worker.js",
"static/css/24.257b0329.chunk.css.map": "/static/css/24.257b0329.chunk.css.map",
"static/css/25.4c706a4e.chunk.css.map": "/static/css/25.4c706a4e.chunk.css.map",
......
......@@ -4,7 +4,7 @@ self.__precacheManifest = [
"url": "/static/css/purchased.4b0044ec.chunk.css"
},
{
"revision": "8566774d4c7408d12630",
"revision": "4d2b1aa483d44cf3f28b",
"url": "/static/css/BargainMiddlePage.9e05243b.chunk.css"
},
{
......@@ -128,16 +128,16 @@ self.__precacheManifest = [
"url": "/static/js/myorders.10940b3d.chunk.js"
},
{
"revision": "8566774d4c7408d12630",
"url": "/static/js/BargainMiddlePage.7dfab09b.chunk.js"
"revision": "4d2b1aa483d44cf3f28b",
"url": "/static/js/BargainMiddlePage.c8e3669c.chunk.js"
},
{
"revision": "8bdb438efa9916303ed8",
"url": "/static/js/purchased.31fa5e4e.chunk.js"
},
{
"revision": "7402bf2e5f18add945a8",
"url": "/static/js/runtime~main.10478d36.js"
"revision": "2bac29fc9704c592d155",
"url": "/static/js/runtime~main.28b2be20.js"
},
{
"revision": "c45c1e264cf112a45edd",
......@@ -208,16 +208,16 @@ self.__precacheManifest = [
"url": "/static/js/27.fb848190.chunk.js"
},
{
"revision": "55ad4bbcfbe7879698a2538de5145a09",
"url": "/static/media/iconfont.55ad4bbc.ttf"
"revision": "10b7bd5b99a2a0a2f1a30d7ed72ec1a0",
"url": "/static/media/iconfont.10b7bd5b.eot"
},
{
"revision": "6b8bb5a84b3ddaed7458",
"url": "/static/js/28.d44dcc23.chunk.js"
},
{
"revision": "10b7bd5b99a2a0a2f1a30d7ed72ec1a0",
"url": "/static/media/iconfont.10b7bd5b.eot"
"revision": "55ad4bbcfbe7879698a2538de5145a09",
"url": "/static/media/iconfont.55ad4bbc.ttf"
},
{
"revision": "23851ab419d2d5bc7e46",
......@@ -256,7 +256,7 @@ self.__precacheManifest = [
"url": "/static/css/24.257b0329.chunk.css"
},
{
"revision": "af135c993c500854575aad0cec01b8ce",
"revision": "7bd59292e820326ba0e9b99336f61a53",
"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.8e649038225c1a936e797ec1dd22eb2d.js"
"/precache-manifest.e9325da1e98dc149e2897e2041cc90bb.js"
);
workbox.clientsClaim();
......
!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,25:1,27:1,28:1,29:1,30:1}[e]&&r.push(a[e]=new Promise(function(r,t){for(var n="static/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:"9e05243b",1:"de22eb69",2:"ce9acdcb",3:"2e7d81ca",4:"1a38e85d",5:"31d6cfe0",6:"6576554c",7:"31d6cfe0",8:"21570c76",9:"20451cd3",10:"b59ee96d",11:"a93db4c0",12:"bef8c404",13:"9ece7350",14:"deae77c4",16:"3ab93c8e",17:"4b0044ec",19:"9fa57dd6",20:"82081d02",21:"2f1e5759",22:"49988cae",23:"5463a623",25:"4c706a4e",26:"31d6cfe0",27:"694b4628",28:"5ed15c7e",29:"ecbb6f9a",30:"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+"static/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:"7dfab09b",1:"0c09c28b",2:"fcc26c19",3:"4d71b0d8",4:"04d34ba8",5:"d53d06e5",6:"f5e96bf7",7:"70b0db04",8:"5af8307e",9:"659805a5",10:"1240fd4e",11:"5b9868fb",12:"acf1ca74",13:"62c3afd6",14:"4ef70074",16:"10940b3d",17:"31fa5e4e",19:"5e68d822",20:"f667c34f",21:"55683afc",22:"38b70eb0",23:"371d8ec0",25:"6ccc443e",26:"7b048f4b",27:"fb848190",28:"d44dcc23",29:"f4c45245",30:"3933456b"}[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.10478d36.js.map
\ No newline at end of file
!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,25:1,27:1,28:1,29:1,30:1}[e]&&r.push(a[e]=new Promise(function(r,t){for(var n="static/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:"9e05243b",1:"de22eb69",2:"ce9acdcb",3:"2e7d81ca",4:"1a38e85d",5:"31d6cfe0",6:"6576554c",7:"31d6cfe0",8:"21570c76",9:"20451cd3",10:"b59ee96d",11:"a93db4c0",12:"bef8c404",13:"9ece7350",14:"deae77c4",16:"3ab93c8e",17:"4b0044ec",19:"9fa57dd6",20:"82081d02",21:"2f1e5759",22:"49988cae",23:"5463a623",25:"4c706a4e",26:"31d6cfe0",27:"694b4628",28:"5ed15c7e",29:"ecbb6f9a",30:"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+"static/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:"c8e3669c",1:"0c09c28b",2:"fcc26c19",3:"4d71b0d8",4:"04d34ba8",5:"d53d06e5",6:"f5e96bf7",7:"70b0db04",8:"5af8307e",9:"659805a5",10:"1240fd4e",11:"5b9868fb",12:"acf1ca74",13:"62c3afd6",14:"4ef70074",16:"10940b3d",17:"31fa5e4e",19:"5e68d822",20:"f667c34f",21:"55683afc",22:"38b70eb0",23:"371d8ec0",25:"6ccc443e",26:"7b048f4b",27:"fb848190",28:"d44dcc23",29:"f4c45245",30:"3933456b"}[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.28b2be20.js.map
\ No newline at end of file
import React, {Component} from 'react'
import React, { Component } from 'react'
import './bargain-middle-page.scss'
import {HeaderBar, VList} from '@common'
import {Course} from '@common'
import {api, getParam, http, browser} from "@/utils"
import {Toast} from "antd-mobile"
import {Link, withRouter} from "react-router-dom"
import { HeaderBar, VList } from '@common'
import { Course } from '@common'
import { api, getParam, http, browser } from "@/utils"
import { Toast } from "antd-mobile"
import { Link, withRouter } from "react-router-dom"
import Ranking from './ranking'
import {differenceInSeconds, differenceInMinutes, differenceInHours, differenceInDays} from "date-fns"
import { differenceInSeconds, differenceInMinutes, differenceInHours, differenceInDays } from "date-fns"
import Overlay from '../detail/overlay'
import {compose} from "redux"
import {connect} from "react-redux";
import { compose } from "redux"
import { connect } from "react-redux";
class BargainMiddlePage extends Component {
timer
constructor(props) {
super(props)
this.state = {
......@@ -58,6 +60,27 @@ class BargainMiddlePage extends Component {
limitPeople: res.data.data.course.limit_people,
bargainData: res.data.data.bargain,
width: (res.data.data.bargain.bargain_price / res.data.data.bargain.total_price).toFixed(2) * 100 + '%'
}, () => {
if (this.state.bargainData.expire_time) {
let date = this.state.bargainData.expire_time * 1000
let now = Date.now()
clearInterval(this.timer)
this.timer = setInterval(() => {
date -= 1000
let _d = new Date(date)
let s = differenceInSeconds(_d, now) % 60,
m = differenceInMinutes(_d, now) % 60,
h = differenceInHours(_d, now) % 24,
d = differenceInDays(_d, now) % 24
this.setState({
hour: h,
min: m,
sec: s,
day: d
})
}, 1000)
}
})
} else {
Toast.info(res.data.msg, 2)
......@@ -240,26 +263,6 @@ class BargainMiddlePage extends Component {
}
render() {
if (this.state.bargainData.expire_time) {
let date = this.state.bargainData.expire_time * 1000
let now = Date.now()
setInterval(() => {
date -= 1000
let s = differenceInSeconds(new Date(date), now) % 60,
m = differenceInMinutes(new Date(date), now) % 60,
h = differenceInHours(new Date(date), now) % 24,
d = differenceInDays(new Date(date), now) % 24
this.setState({
hour: h,
min: m,
sec: s,
day: d
})
}, 1000)
}
let thirdRow, btn
// is_artifact 0-再邀请多少人可以使用 1-可以使用未领取 2-已领取 3-已使用
......
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