shop_main.go 358 B

123456789101112131415
  1. package shop
  2. import "fmt"
  3. func GetProductName(productId string) string {
  4. return getShopManager().getProductName(productId)
  5. }
  6. func GetProductFormatStr(productId string) string {
  7. item := getShopManager().getProduct(productId)
  8. if item == nil {
  9. return ""
  10. }
  11. return fmt.Sprintf("%s&nbsp;<font color='gray'>(id:%s)</font>", item.ProductDesc, productId)
  12. }