Ejemplo n.º 1
0
// 会员基本信息
func (this *memberC) Member_basic(ctx *web.Context) {
	memberId, _ := strconv.Atoi(ctx.Request.URL.Query().Get("member_id"))
	m := dps.MemberService.GetMember(memberId)
	if m == nil {
		ctx.Response.Write([]byte("no such member"))
	} else {

		lv := dps.PartnerService.GetLevel(this.GetPartnerId(ctx), m.Level)

		ctx.App.Template().Execute(ctx.Response,
			gof.TemplateDataMap{
				"m":  m,
				"lv": lv,
				"sexName": gfmt.BoolString(m.Sex == 1, "先生",
					gfmt.BoolString(m.Sex == 2, "女士", "-")),
				"lastLoginTime": format.HanUnixDateTime(m.LastLoginTime),
				"regTime":       format.HanUnixDateTime(m.RegTime),
			}, "views/partner/member/basic_info.html")
	}
}
Ejemplo n.º 2
0
// 会员账户信息
func (this *memberC) Member_account(ctx *web.Context) {
	memberId, _ := strconv.Atoi(ctx.Request.URL.Query().Get("member_id"))
	acc := dps.MemberService.GetAccount(memberId)
	if acc != nil {

		ctx.App.Template().Execute(ctx.Response,
			gof.TemplateDataMap{
				"acc": acc,
				"balanceAccountAlias": variable.AliasBalanceAccount,
				"presentAccountAlias": variable.AliasPresentAccount,
				"flowAccountAlias":    variable.AliasFlowAccount,
				"growAccountAlias":    variable.AliasGrowAccount,
				"integralAlias":       variable.AliasIntegral,
				"updateTime":          format.HanUnixDateTime(acc.UpdateTime),
			}, "views/partner/member/account_info.html")
	}
}