|
@@ -1,15 +1,16 @@
|
|
|
package front
|
|
|
|
|
|
import (
|
|
|
- "fmt"
|
|
|
- "github.com/gogf/gf/v2/util/gconv"
|
|
|
- "jy/src/jfw/config"
|
|
|
- "strings"
|
|
|
- "time"
|
|
|
+ "app.yhyue.com/moapp/jypkg/public"
|
|
|
+ "fmt"
|
|
|
+ "github.com/gogf/gf/v2/util/gconv"
|
|
|
+ "jy/src/jfw/config"
|
|
|
+ "strings"
|
|
|
+ "time"
|
|
|
|
|
|
- qutil "app.yhyue.com/moapp/jybase/common"
|
|
|
+ qutil "app.yhyue.com/moapp/jybase/common"
|
|
|
|
|
|
- "app.yhyue.com/moapp/jybase/go-xweb/xweb"
|
|
|
+ "app.yhyue.com/moapp/jybase/go-xweb/xweb"
|
|
|
)
|
|
|
|
|
|
type JyOrder struct {
|
|
@@ -44,22 +45,31 @@ func (this *JyOrder) OrderPay(orderType, orderCode string) error {
|
|
|
|
|
|
// pc支付成功页面
|
|
|
func (this *JyOrder) PaySuccess(orderType, orderCode string) error {
|
|
|
- userId := qutil.ObjToString(this.GetSession("userId"))
|
|
|
- if userId == "" {
|
|
|
- return this.Redirect("/notin/page")
|
|
|
- }
|
|
|
- this.T["payway"] = qutil.If(strings.Index(this.GetString("payway"), "wx") > -1, "微信", "支付宝")
|
|
|
- this.T["email"] = this.GetString("email")
|
|
|
- if payTime, err := this.GetInt("payTime"); err == nil {
|
|
|
- this.T["payTime"] = time.Unix(payTime, 0).Format("2006年01月02日")
|
|
|
- }
|
|
|
- positionType := gconv.String(this.GetSession("positionType"))
|
|
|
- this.T["price"] = this.GetString("price")
|
|
|
- this.T["shareid"] = "10"
|
|
|
- this.T["positionType"] = positionType
|
|
|
- this.T["orderType"] = orderType
|
|
|
- this.T["orderCode"] = orderCode
|
|
|
- return this.Render("/order/pc/paySuccess.html")
|
|
|
+ userId := qutil.ObjToString(this.GetSession("userId"))
|
|
|
+ if userId == "" {
|
|
|
+ return this.Redirect("/notin/page")
|
|
|
+ }
|
|
|
+ this.T["payway"] = qutil.If(strings.Index(this.GetString("payway"), "wx") > -1, "微信", "支付宝")
|
|
|
+ this.T["email"] = this.GetString("email")
|
|
|
+ if payTime, err := this.GetInt("payTime"); err == nil {
|
|
|
+ this.T["payTime"] = time.Unix(payTime, 0).Format("2006年01月02日")
|
|
|
+ }
|
|
|
+ positionType := gconv.String(this.GetSession("positionType"))
|
|
|
+ this.T["price"] = this.GetString("price")
|
|
|
+ this.T["shareid"] = "10"
|
|
|
+ this.T["positionType"] = positionType
|
|
|
+ this.T["orderType"] = orderType
|
|
|
+ this.T["orderCode"] = orderCode
|
|
|
+ //订单详情查询
|
|
|
+ data := public.Mysql.FindOne("dataexport_order", map[string]interface{}{
|
|
|
+ "order_code": orderCode,
|
|
|
+ }, "vip_type", "")
|
|
|
+ vipType := int64(0)
|
|
|
+ if data != nil && len(*data) > 0 {
|
|
|
+ vipType = gconv.Int64((*data)["vip_type"])
|
|
|
+ }
|
|
|
+ this.T["vipType"] = vipType
|
|
|
+ return this.Render("/order/pc/paySuccess.html")
|
|
|
}
|
|
|
|
|
|
// 我的订单
|