Browse Source

修复roll房奖励方案

neo 1 year ago
parent
commit
6f352cd9ca
2 changed files with 4 additions and 3 deletions
  1. 2 1
      models/rollaward.go
  2. 2 2
      views/rollaward.tpl

+ 2 - 1
models/rollaward.go

@@ -74,7 +74,7 @@ func InitRollAwardInfo() {
74
 	}
74
 	}
75
 
75
 
76
 	for i := 0; i < len(vals)/2; i++ {
76
 	for i := 0; i < len(vals)/2; i++ {
77
-		id := utils.StringToInt(vals[i*2].([]byte))
77
+		id := utils.StringToInt(string(vals[i*2].([]byte)))
78
 		var itemIdList []int
78
 		var itemIdList []int
79
 		err = json.Unmarshal(vals[i*2+1].([]byte), &itemIdList)
79
 		err = json.Unmarshal(vals[i*2+1].([]byte), &itemIdList)
80
 		if err != nil {
80
 		if err != nil {
@@ -86,6 +86,7 @@ func InitRollAwardInfo() {
86
 			Id:         id,
86
 			Id:         id,
87
 			ItemIdList: itemIdList,
87
 			ItemIdList: itemIdList,
88
 		})
88
 		})
89
+		log.Printf("InitRollAwardInfo id[%d] itemIdList[%v]", id, itemIdList)
89
 	}
90
 	}
90
 
91
 
91
 	beego.Info("load roll award info", len(rollAwardList))
92
 	beego.Info("load roll award info", len(rollAwardList))

+ 2 - 2
views/rollaward.tpl

@@ -71,7 +71,7 @@
71
     <div class="x-body layui-anim layui-anim-up">
71
     <div class="x-body layui-anim layui-anim-up">
72
         <blockquote class="layui-elem-quote">
72
         <blockquote class="layui-elem-quote">
73
           <input class="layui-btn" type="button" onclick="OpenAddItem()" value=新增>
73
           <input class="layui-btn" type="button" onclick="OpenAddItem()" value=新增>
74
-              
74
+
75
           <input class="layui-btn" type="button" onclick="Refresh()" value=刷新>
75
           <input class="layui-btn" type="button" onclick="Refresh()" value=刷新>
76
         </blockquote>
76
         </blockquote>
77
     </div>
77
     </div>
@@ -79,7 +79,7 @@
79
       <thead>
79
       <thead>
80
         <th style="width:256px;">操作</th>
80
         <th style="width:256px;">操作</th>
81
         <th style="width:64px;">ID</th>
81
         <th style="width:64px;">ID</th>
82
-        <th style="width:512px;">奖励列表</th>
82
+        <th style="width:1024px;">奖励列表</th>
83
       </thead>
83
       </thead>
84
       <tbody>
84
       <tbody>
85
         {{range .infoList}}
85
         {{range .infoList}}