Commit 437700d1 by xuzhenghua

cookie

parents f2e3e265 7b4a11ae
...@@ -56,8 +56,8 @@ ...@@ -56,8 +56,8 @@
"aist-share.js": "/mrstatic/js/aist-share.9b0b8e4a.chunk.js", "aist-share.js": "/mrstatic/js/aist-share.9b0b8e4a.chunk.js",
"aist-share.js.map": "/mrstatic/js/aist-share.9b0b8e4a.chunk.js.map", "aist-share.js.map": "/mrstatic/js/aist-share.9b0b8e4a.chunk.js.map",
"blessing-preheat.css": "/mrstatic/css/blessing-preheat.3ea8b615.chunk.css", "blessing-preheat.css": "/mrstatic/css/blessing-preheat.3ea8b615.chunk.css",
"blessing-preheat.js": "/mrstatic/js/blessing-preheat.9ccd3be5.chunk.js", "blessing-preheat.js": "/mrstatic/js/blessing-preheat.35e14e77.chunk.js",
"blessing-preheat.js.map": "/mrstatic/js/blessing-preheat.9ccd3be5.chunk.js.map", "blessing-preheat.js.map": "/mrstatic/js/blessing-preheat.35e14e77.chunk.js.map",
"blessing-rank.css": "/mrstatic/css/blessing-rank.edf00bf8.chunk.css", "blessing-rank.css": "/mrstatic/css/blessing-rank.edf00bf8.chunk.css",
"blessing-rank.js": "/mrstatic/js/blessing-rank.9174b63e.chunk.js", "blessing-rank.js": "/mrstatic/js/blessing-rank.9174b63e.chunk.js",
"blessing-rank.js.map": "/mrstatic/js/blessing-rank.9174b63e.chunk.js.map", "blessing-rank.js.map": "/mrstatic/js/blessing-rank.9174b63e.chunk.js.map",
...@@ -85,8 +85,8 @@ ...@@ -85,8 +85,8 @@
"purchased.css": "/mrstatic/css/purchased.bb758677.chunk.css", "purchased.css": "/mrstatic/css/purchased.bb758677.chunk.css",
"purchased.js": "/mrstatic/js/purchased.9b5805d0.chunk.js", "purchased.js": "/mrstatic/js/purchased.9b5805d0.chunk.js",
"purchased.js.map": "/mrstatic/js/purchased.9b5805d0.chunk.js.map", "purchased.js.map": "/mrstatic/js/purchased.9b5805d0.chunk.js.map",
"runtime~main.js": "/mrstatic/js/runtime~main.17a9c214.js", "runtime~main.js": "/mrstatic/js/runtime~main.3c2e30c0.js",
"runtime~main.js.map": "/mrstatic/js/runtime~main.17a9c214.js.map", "runtime~main.js.map": "/mrstatic/js/runtime~main.3c2e30c0.js.map",
"search.css": "/mrstatic/css/search.5716d9b3.chunk.css", "search.css": "/mrstatic/css/search.5716d9b3.chunk.css",
"search.js": "/mrstatic/js/search.ab9c2341.chunk.js", "search.js": "/mrstatic/js/search.ab9c2341.chunk.js",
"search.js.map": "/mrstatic/js/search.ab9c2341.chunk.js.map", "search.js.map": "/mrstatic/js/search.ab9c2341.chunk.js.map",
...@@ -166,6 +166,6 @@ ...@@ -166,6 +166,6 @@
"mrstatic/media/iconfont.css": "/mrstatic/media/iconfont.e0655d4d.woff", "mrstatic/media/iconfont.css": "/mrstatic/media/iconfont.e0655d4d.woff",
"mrstatic/media/kanjia_cg_icon.png": "/mrstatic/media/kanjia_cg_icon.81a489ac.png", "mrstatic/media/kanjia_cg_icon.png": "/mrstatic/media/kanjia_cg_icon.81a489ac.png",
"mrstatic/media/video.scss": "/mrstatic/media/progress-share-bg.80011994.png", "mrstatic/media/video.scss": "/mrstatic/media/progress-share-bg.80011994.png",
"precache-manifest.a6c71a5f511af7733e28a7d35f63c5fd.js": "/precache-manifest.a6c71a5f511af7733e28a7d35f63c5fd.js", "precache-manifest.8bd65c75e23583859daaeef0c7542744.js": "/precache-manifest.8bd65c75e23583859daaeef0c7542744.js",
"service-worker.js": "/service-worker.js" "service-worker.js": "/service-worker.js"
} }
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -148,8 +148,8 @@ self.__precacheManifest = [ ...@@ -148,8 +148,8 @@ self.__precacheManifest = [
"url": "/mrstatic/js/38.502eb04c.chunk.js" "url": "/mrstatic/js/38.502eb04c.chunk.js"
}, },
{ {
"revision": "84d86eaed0663180b349", "revision": "b11118c32942940a3e08",
"url": "/mrstatic/js/blessing-preheat.9ccd3be5.chunk.js" "url": "/mrstatic/js/blessing-preheat.35e14e77.chunk.js"
}, },
{ {
"revision": "71d97cf00cf6d7c0538e", "revision": "71d97cf00cf6d7c0538e",
...@@ -208,8 +208,8 @@ self.__precacheManifest = [ ...@@ -208,8 +208,8 @@ self.__precacheManifest = [
"url": "/mrstatic/js/myorders.e40b0b0b.chunk.js" "url": "/mrstatic/js/myorders.e40b0b0b.chunk.js"
}, },
{ {
"revision": "198fc401252f9c07fbaf", "revision": "8cebdd3e7d4a0ab7cfc4",
"url": "/mrstatic/js/runtime~main.17a9c214.js" "url": "/mrstatic/js/runtime~main.3c2e30c0.js"
}, },
{ {
"revision": "2cab426b993b45c13c5b", "revision": "2cab426b993b45c13c5b",
...@@ -288,7 +288,7 @@ self.__precacheManifest = [ ...@@ -288,7 +288,7 @@ self.__precacheManifest = [
"url": "/mrstatic/css/38.bff100af.chunk.css" "url": "/mrstatic/css/38.bff100af.chunk.css"
}, },
{ {
"revision": "84d86eaed0663180b349", "revision": "b11118c32942940a3e08",
"url": "/mrstatic/css/blessing-preheat.3ea8b615.chunk.css" "url": "/mrstatic/css/blessing-preheat.3ea8b615.chunk.css"
}, },
{ {
...@@ -372,7 +372,7 @@ self.__precacheManifest = [ ...@@ -372,7 +372,7 @@ self.__precacheManifest = [
"url": "/mrstatic/css/2.bf839917.chunk.css" "url": "/mrstatic/css/2.bf839917.chunk.css"
}, },
{ {
"revision": "96f983837ad809022b01108c4c37622a", "revision": "9b204ca2c8d1a4190ca3a91a06937d51",
"url": "/index.html" "url": "/index.html"
} }
]; ];
\ No newline at end of file
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js"); importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js");
importScripts( importScripts(
"/precache-manifest.a6c71a5f511af7733e28a7d35f63c5fd.js" "/precache-manifest.8bd65c75e23583859daaeef0c7542744.js"
); );
workbox.clientsClaim(); workbox.clientsClaim();
......
...@@ -117,11 +117,13 @@ class BlessingPreheat extends Component { ...@@ -117,11 +117,13 @@ class BlessingPreheat extends Component {
loginInfo = (result) => { loginInfo = (result) => {
this.setState({ this.setState({
userInfoList: result userInfoList: result
}) }, () => {
if (this.state.userInfoList.length !== 0) { if(this.state.userInfoList.length){
this.props.startFetchUser() this.props.startFetchUser()
this.appLogin() this.appLogin()
} }
})
} }
// 保存cookie // 保存cookie
appLogin = () => { appLogin = () => {
...@@ -133,8 +135,6 @@ class BlessingPreheat extends Component { ...@@ -133,8 +135,6 @@ class BlessingPreheat extends Component {
cookie.set("uid", item.uid, {expires, path: '/', domain: '.julyedu.com'}); cookie.set("uid", item.uid, {expires, path: '/', domain: '.julyedu.com'});
cookie.set("uname", item.uname, {expires, path: '/', domain: '.julyedu.com'}); cookie.set("uname", item.uname, {expires, path: '/', domain: '.julyedu.com'});
cookie.set("avatar_file", item.avatar_file, {expires, path: '/', domain: '.julyedu.com'}); cookie.set("avatar_file", item.avatar_file, {expires, path: '/', domain: '.julyedu.com'});
alert(cookie.get("uid"))
}); });
if (cookie.get("token") && cookie.get("uid")) { if (cookie.get("token") && cookie.get("uid")) {
...@@ -218,6 +218,7 @@ class BlessingPreheat extends Component { ...@@ -218,6 +218,7 @@ class BlessingPreheat extends Component {
const {userInfo} = this.state; const {userInfo} = this.state;
http.get(`${API.home}/sys/user/blessing`).then(res => { http.get(`${API.home}/sys/user/blessing`).then(res => {
const {code, data} = res.data const {code, data} = res.data
alert(code)
if (code === 200) { if (code === 200) {
this.setState({ this.setState({
isSign: !!data.today_signed, isSign: !!data.today_signed,
...@@ -228,6 +229,7 @@ class BlessingPreheat extends Component { ...@@ -228,6 +229,7 @@ class BlessingPreheat extends Component {
inviteBlessing: (data.types_total_blessing_value && data.types_total_blessing_value.invite) ? data.types_total_blessing_value.invite : 0, inviteBlessing: (data.types_total_blessing_value && data.types_total_blessing_value.invite) ? data.types_total_blessing_value.invite : 0,
}) })
}) })
alert(cookie.get('uid'))
if (data.is_login === 1) { if (data.is_login === 1) {
this.handleToSign() this.handleToSign()
} }
......
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