add view files route func, template not fin

This commit is contained in:
Jay
2019-02-26 14:34:11 +08:00
parent 21987754f1
commit 155e41f618
6 changed files with 98 additions and 52 deletions
-3
View File
@@ -1,9 +1,7 @@
package context
import (
"fmt"
"net/http"
"reflect"
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"
@@ -52,7 +50,6 @@ func (p *Context) BindData(i interface{}) error {
// Success -
func (p *Context) Success(res ...interface{}) {
fmt.Println("get type ", reflect.TypeOf(res[0]))
var resBody interface{}
if len(res) > 0 {
resBody = parseResponse(res[0])