|
@@ -671,7 +671,7 @@ function changeNotification(checked) {
|
|
|
putSetting({
|
|
|
params: { noticeSwitch }
|
|
|
}).then(res => {
|
|
|
- let { code, data } = res;
|
|
|
+ let { code } = res;
|
|
|
if (code === 0) {
|
|
|
state.notification_switch = checked
|
|
|
} else {
|
|
@@ -682,6 +682,10 @@ function changeNotification(checked) {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+function setNotification(req) {
|
|
|
+ state.notification_switch = req.status;
|
|
|
+}
|
|
|
+
|
|
|
async function clickReply(params) {
|
|
|
let _userInfo = await checkIsLogin()
|
|
|
if (!_userInfo) {
|
|
@@ -1901,6 +1905,9 @@ function onRuntimeMsg() {
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
+ case 'USER_SETTING':
|
|
|
+ setNotification(req.data)
|
|
|
+ break;
|
|
|
}
|
|
|
})
|
|
|
}
|