mirror of
https://github.com/kongyuebin1/dongfeng-pay.git
synced 2026-04-04 07:54:12 +08:00
提交新项目
This commit is contained in:
40
shop/controllers/page_controller.go
Normal file
40
shop/controllers/page_controller.go
Normal file
@@ -0,0 +1,40 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...收银台对接快一
|
||||
** @Time : 2018-8-27 13:50
|
||||
** @Author : Joker
|
||||
** @File : home_action
|
||||
** @Last Modified by : Joker
|
||||
** @Last Modified time: 2018-08-29 17:59:48
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego"
|
||||
"github.com/kvpay/goutils"
|
||||
)
|
||||
|
||||
type HomeAction struct {
|
||||
beego.Controller
|
||||
}
|
||||
|
||||
/*加载首页及数据*/
|
||||
func (c *HomeAction) ShowHome() {
|
||||
//取值
|
||||
siteName := beego.AppConfig.String("site.name")
|
||||
orderNo := goutils.NewContext("Joker").GetUUID()
|
||||
productName := "测试应用-支付功能体验(非商品消费)"
|
||||
|
||||
//数据回显
|
||||
c.Data["siteName"] = siteName
|
||||
c.Data["pname"] = productName
|
||||
c.Data["orderNo"] = orderNo
|
||||
c.TplName = "index.html"
|
||||
}
|
||||
|
||||
func (c *HomeAction) ErrorPage() {
|
||||
flash := beego.ReadFromRequest(&c.Controller)
|
||||
error := flash.Data["error"]
|
||||
c.Data["error"] = error
|
||||
c.TplName = "error.html"
|
||||
}
|
||||
Reference in New Issue
Block a user