-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7392157
commit 7e1434e
Showing
4 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ WeiboTask | |
|
||
### 💥主要功能 | ||
* [x] 微博超话签到 | ||
* [ ] 每日积分获取 | ||
|
||
</br> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// @Title ReceiveScore | ||
// @Description 每日积分获取 | ||
// @Author 星辰 | ||
// @Update | ||
package Tasks | ||
|
||
import ( | ||
"WeiboClient" | ||
"log" | ||
"sync" | ||
) | ||
|
||
// @title ReceiveScore | ||
// @description 每日积分获取 | ||
// @auth 星辰 | ||
// @param w *WeiboClient.WeiboClient 微博客户端 | ||
// @param wg *sync.WaitGroup 等待组,保持程序同步 | ||
// @return | ||
func ReceiveScore(w *WeiboClient.WeiboClient, wg *sync.WaitGroup) { | ||
if wg != nil { | ||
defer wg.Done() | ||
} | ||
data, err := w.SuperReceiveScore() | ||
if err != nil { | ||
log.Println("每日积分获取异常:"+err.Error()) | ||
return | ||
} | ||
if data["code"] == "100000" { | ||
data = data["data"].(map[string]interface{}) | ||
log.Println("每日积分获取增加:"+data["add_score"].(string)+"积分") | ||
}else{ | ||
log.Println("每日积分获取失败:"+data["msg"].(string)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters