front

package
v0.0.0-...-33ecd2b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

README

Go2o - 前端应用

目录说明

master -> 管理中心 partner -> 商户管理中心 ucenter -> 会员中心 webui/mobi -> 移动端前台 webui/weixin -> 微信开放平台 webui/www -> PC端应用

目录组成

每个端均有控制器(*_c.go文件),路由(route.go)组成。 #定义控制器 type HomeController struct{} func (this *HomeController) Index(ctx *web.Context){ //your code } #定义一个路由表 var routes *mvc.Route = mvc.NewRoute(nil) routes.RegisterController("buy",new(HomeController)) ## 通过路径 /Home/Index 访问到HomeController的Index方法

可通过定义筛选器,控制器实现mvc.Filter接口,来实现对请求的拦截。可 做会话验证等操作。

Documentation

Overview

*

  • Copyright 2014 @ z3q.net.
  • name :
  • author : jarryliu
  • date : 2014-01-22 21:08
  • description :
  • history :

*

  • Copyright 2014 @ z3q.net.
  • name :
  • author : jarryliu
  • date : 2014-01-22 21:08
  • description :
  • history :

*

  • Copyright 2015 @ z3q.net.
  • name : sorter.go
  • author : jarryliu
  • date : 2015-08-17 16:19
  • description :
  • history :

*

  • Copyright 2014 @ z3q.net.
  • name :
  • author : jarryliu
  • date : 2014-01-22 21:08
  • description :
  • history :

Index

Constants

View Source
const (
	UPLOAD_DIR = "static/uploads/"
)

Variables

View Source
var GoodsListSortItems []*SortItem = []*SortItem{
	{Name: "price", Text: "价格", Option: true},
	{Name: "sale", Text: "销量", Option: true},
}

todo: 条件需要加上

Functions

func GetSorterHtml

func GetSorterHtml(items []*SortItem, selected string, urlPath string) string

Types

type Pager

type Pager struct {
	Total int                      `json:"total"`
	Rows  []map[string]interface{} `json:"rows"`
	Text  string                   `json:"text"`
}

type SortItem

type SortItem struct {
	Name   string
	Text   string
	Option bool
}

type WebCgi

type WebCgi struct{}

Web同一网关接口

func (*WebCgi) GeoLocation

func (this *WebCgi) GeoLocation(ctx *web.Context)

获取位置

func (*WebCgi) Upload

func (this *WebCgi) Upload(key string, ctx *web.Context, savedir string) []byte

Directories

Path Synopsis
* * Copyright 2015 @ z3q.net.
* * Copyright 2015 @ z3q.net.
dao
* * Copyright 2014 @ z3q.net.
* * Copyright 2014 @ z3q.net.
dao/entity
* * Copyright 2014 @ z3q.net.
* * Copyright 2014 @ z3q.net.
* * Copyright 2014 @ z3q.net.
* * Copyright 2014 @ z3q.net.
* 包含PC,移动端,微信的WEB UI * pcs : PC端线上商店
* 包含PC,移动端,微信的WEB UI * pcs : PC端线上商店
ofs
* * Copyright 2015 @ z3q.net.
* * Copyright 2015 @ z3q.net.
ols
* * Copyright 2015 @ z3q.net.
* * Copyright 2015 @ z3q.net.
ols/mos
* * Copyright 2015 @ z3q.net.
* * Copyright 2015 @ z3q.net.
wxs
* * Copyright 2015 @ z3q.net.
* * Copyright 2015 @ z3q.net.
* * Copyright 2014 @ z3q.net.
* * Copyright 2014 @ z3q.net.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL