Commit e12f6af6 by zhanghaozhe

cookie

parent 6dd7b3c9
...@@ -105,11 +105,23 @@ class BlessingPreheat extends Component { ...@@ -105,11 +105,23 @@ class BlessingPreheat extends Component {
} }
window['getNewData'] = result => { window['getNewData'] = result => {
http.post(`${API.home}/sys/add/blessing`, {
share_platform: '', // 1 朋友圈 2 微博 3 qq
type: 4 // 1:签到;3:分享;4:浏览课程;
}).then(res => {
const {code} = res.data
if (code === 200) {
Toast.info('+2点福气值~', 2, null, false)
}
})
this.fetchUserBlessing() this.fetchUserBlessing()
} }
window['QQWXWBshare'] = result => { window['QQWXWBshare'] = result => {
if (result != 0) {
this.handleToAddBlessing(result) this.handleToAddBlessing(result)
} }
this.fetchUserBlessing()
}
} }
...@@ -217,7 +229,6 @@ class BlessingPreheat extends Component { ...@@ -217,7 +229,6 @@ 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,
......
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