Documentation
¶
Index ¶
- Constants
- Variables
- type Address
- type AddressData
- type AddressItem
- type AddressLocation
- type AddressResult
- type AddressStationInfo
- type Config
- type ReserveTime
- type Session
- func (s *Session) CartAllCheck(ctx context.Context) error
- func (s *Session) CheckOrder(ctx context.Context, cartData map[string]interface{}, reserveTime *ReserveTime) (map[string]interface{}, error)
- func (s *Session) Choose() error
- func (s *Session) CreateOrder(ctx context.Context, cartData map[string]interface{}, ...) error
- func (s *Session) GetAddress() (map[string]AddressItem, error)
- func (s *Session) GetCart(ctx context.Context) (map[string]interface{}, error)
- func (s *Session) GetMultiReserveTime(ctx context.Context, products []map[string]interface{}) ([]ReserveTime, error)
- func (s *Session) GetUser() error
- func (s *Session) Run(ctx context.Context) error
- type UserBalance
- type UserData
- type UserInfo
- type UserResult
- type UserSign
- type UserVIP
Constants ¶
View Source
const ( PaymentAlipay = "alipay" PaymentAlipayStr = "支付宝" PaymentWechat = "wechat" PaymentWechatStr = "微信" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { Id string `json:"id"` Name string `json:"name"` StationId string `json:"station_id"` CityNumber string `json:"city_number"` Longitude float64 `json:"longitude"` Latitude float64 `json:"latitude"` UserName string `json:"user_name"` Mobile string `json:"mobile"` Address string `json:"address"` AddrDetail string `json:"addr_detail"` }
type AddressData ¶
type AddressData struct { ValidAddress []AddressItem `json:"valid_address"` InvalidAddress []AddressItem `json:"invalid_address"` MaxAddressCount int `json:"max_address_count"` CanAddAddress bool `json:"can_add_address"` }
type AddressItem ¶
type AddressItem struct { Id string `json:"id"` Gender int `json:"gender"` Mobile string `json:"mobile"` Location AddressLocation `json:"location"` Label string `json:"label"` UserName string `json:"user_name"` AddrDetail string `json:"addr_detail"` StationId string `json:"station_id"` StationName string `json:"station_name"` IsDefault bool `json:"is_default"` CityNumber string `json:"city_number"` InfoStatus int `json:"info_status"` StationInfo AddressStationInfo `json:"station_info"` VillageId string `json:"village_id"` }
type AddressLocation ¶
type AddressResult ¶
type AddressResult struct { Success bool `json:"success"` Code int `json:"code"` Message string `json:"message"` Data AddressData `json:"data"` }
type AddressStationInfo ¶
type ReserveTime ¶
type Session ¶
type Session struct { UserID string PayType int64 Address *AddressItem // contains filtered or unexported fields }
func (*Session) CheckOrder ¶
func (*Session) CreateOrder ¶
func (*Session) GetAddress ¶
func (s *Session) GetAddress() (map[string]AddressItem, error)
func (*Session) GetMultiReserveTime ¶
type UserBalance ¶
type UserData ¶
type UserData struct { DoingRefundNum int `json:"doing_refund_num"` NoCommentOrderPoint int `json:"no_comment_order_point"` NameNotice string `json:"name_notice"` NoPayOrderNum int `json:"no_pay_order_num"` DoingOrderNum int `json:"doing_order_num"` UserVip UserVIP `json:"user_vip"` UserSign UserSign `json:"user_sign"` NotOnionTip int `json:"not_onion_tip"` NoDrawCouponMoney string `json:"no_draw_coupon_money"` PointNum int `json:"point_num"` Balance UserBalance `json:"balance"` UserInfo UserInfo `json:"user_info"` CouponNum int `json:"coupon_num"` NoCommentOrderNum int `json:"no_comment_order_num"` }
type UserInfo ¶
type UserInfo struct { Birthday string `json:"birthday"` ShowInviteCode bool `json:"show_invite_code"` NameInCheck string `json:"name_in_check"` InviteCodeUrl string `json:"invite_code_url"` Sex int `json:"sex"` Mobile string `json:"mobile"` Avatar string `json:"avatar"` ImUid int `json:"im_uid"` BindStatus int `json:"bind_status"` NameStatus int `json:"name_status"` NewRegister bool `json:"new_register"` ImSecret string `json:"im_secret"` Name string `json:"name"` Id string `json:"id"` Introduction string `json:"introduction"` }
type UserResult ¶
type UserVIP ¶
type UserVIP struct { IsRenew int `json:"is_renew"` VipSaveMoneyDescription string `json:"vip_save_money_description"` VipDescription string `json:"vip_description"` VipStatus int `json:"vip_status"` VipNotice string `json:"vip_notice"` VipExpireTimeDescription string `json:"vip_expire_time_description"` VipUrl string `json:"vip_url"` }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.