|
|
@@ -12,6 +12,7 @@ import ( |
|
|
|
"encoding/json" |
|
|
|
"fmt" |
|
|
|
"github.com/gin-gonic/gin" |
|
|
|
"strings" |
|
|
|
"time" |
|
|
|
) |
|
|
|
|
|
|
@@ -154,13 +155,21 @@ func TaskBase(c *gin.Context) { |
|
|
|
} |
|
|
|
taskAllCate[k]["list"] = listTmp |
|
|
|
} |
|
|
|
storeId := svc.GetCampStoreId(c) |
|
|
|
var store models.CampTaskStoreUser |
|
|
|
svc.MasterDb(c).Where("id=?", storeId).Get(&store) |
|
|
|
settleType := []map[string]string{ |
|
|
|
{"name": "T+1", "value": "0"}, |
|
|
|
} |
|
|
|
if strings.Contains(store.TaskType, "1") { |
|
|
|
settleType = append(settleType, map[string]string{"name": "T+7", "value": "1"}) |
|
|
|
} |
|
|
|
if strings.Contains(store.TaskType, "2") { |
|
|
|
settleType = append(settleType, map[string]string{"name": "T+30", "value": "2"}) |
|
|
|
} |
|
|
|
res := map[string]interface{}{ |
|
|
|
"all_cate_list": taskAllCate, |
|
|
|
"settle_type": []map[string]string{ |
|
|
|
{"name": "T+1", "value": "0"}, |
|
|
|
{"name": "T+7", "value": "1"}, |
|
|
|
{"name": "T+30", "value": "2"}, |
|
|
|
}, |
|
|
|
"settle_type": settleType, |
|
|
|
"audit_type": []map[string]string{ |
|
|
|
{"name": "待审核", "value": "0"}, |
|
|
|
{"name": "审核通过", "value": "1"}, |
|
|
|