Skip to content

Commit 98e58ca

Browse files
committed
feat: -
1 parent e7699dc commit 98e58ca

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

.github/workflows/deploy.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ jobs:
2323
- name: Build
2424
run: |
2525
make build_server
26-
make build_client
2726
tar -zcvf release.tgz output
2827
2928
- name: Create release

internal/app/routes.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ func SetupRoutes() *gin.Engine {
2626

2727
r.GET("/api/problem/common/daily", handler.GetCommonDailyProblem)
2828
r.GET("/api/problem/common/userid", handler.GetUserIDByWxNick)
29+
r.GET("/api/problem/common/finish", handler.FinishProblem)
2930
r.GET("/api/note/update", handler.UpdateNote)
3031

3132
userRouter := r.Group("/api/user")

wx/pages/problem/problem.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ Page({
2424
this.setData({userid: app.globalData.userid})
2525
},
2626
finishProblem() {
27+
let that = this
2728
let p = app.globalData.problems[this.data.idx]
28-
let url = '/api/user/problem/finish?problem_id=' + p.ID + '&userid=' + app.globalData.userid
29+
let url = '/api/problem/common/finish?problem_id=' + p.ID + '&userid=' + app.globalData.userid
2930
util.request(wx, url, 'GET', {}, function (result) {
30-
this.setData({
31-
finished: true
32-
})
31+
that.setData({finished: true})
32+
util.toast(wx, 'finish', 500)
3333
})
3434
},
3535
preProblem() {

wx/utils/util.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const host = 'https://sslapi.chaosi-zju.com'
2-
// const host = 'http://127.0.0.1:5001'
1+
// const host = 'https://sslapi.chaosi-zju.com'
2+
const host = 'http://127.0.0.1:5001'
33

44
const request = function (wx, path, method, data, func, noloading) {
55
if (noloading == null || !noloading) {

0 commit comments

Comments
 (0)