按意图重做在 huakui 代码底: - 删除数据埋点逻辑:移除 pub/dataReport、reportser、srv_report、 eventmod、上报定时任务及注册/登录/点赞/收藏/评论/解锁/订单处的 上报调用和 reportSdkConfig 配置下发 - app 认证改为按设备ID识别用户:去掉 token 校验、Register/Login/ ResetPassword/GuestLogin 接口,新增 ResolveDeviceUser 和设备缓存 - 广告改为按 AppId 从媒资中心拉取:pub/storage 新增 QueryAdvitise, UpdateAdvitiseData 替代 UpdateAdvitiseDataFromJt - 后台登录取消谷歌二次验证,密码正确即登录 - 短剧/专题 slug 改为 10 位大小写字母+数字混合 - 本地 app.yaml/web.yaml 保留 HKDJNET_* 模板(不提交生产凭据) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
54 lines
1.6 KiB
Go
54 lines
1.6 KiB
Go
package pubdef
|
|
|
|
type Page struct {
|
|
PageNum int64 `form:"pageNum" json:"pageNum,omitempty"`
|
|
PageSize int64 `form:"pageSize" json:"pageSize,omitempty"`
|
|
}
|
|
|
|
const (
|
|
OutputDir = "../h5/templates/page/"
|
|
DateISO = "2006-01-02"
|
|
TimeISO = "2006-01-02 15:04:05"
|
|
AppId = 4001
|
|
AppName = "花魁短剧web站点"
|
|
AppNameZhifu = "花魁短剧web站点"
|
|
OrderPrefix = "CZ-HKDJWEB-"
|
|
DefaultChannelCode = ""
|
|
|
|
// CompanyPlatform 是内容中台授权的产品名,对应 company_platform 字段
|
|
CompanyPlatform = "花魁短剧web站点"
|
|
// seoPushEnabled 对外推送总开关。需要推送时改为 true 后重新发版。
|
|
// false 时不登记任务,开启后再按当前页面地址生成并推送。
|
|
// 真正提交还要求 runMod=prod,测试环境即使打开开关也只 dry-run。
|
|
seoPushEnabled = false
|
|
)
|
|
|
|
// Enabled 业务开关是否打开(不含环境判断)。
|
|
func Enabled() bool {
|
|
return seoPushEnabled
|
|
}
|
|
|
|
const PageSize int64 = 36
|
|
|
|
func GetTotalPage(total int64, page int64) int64 {
|
|
totalPage := total / PageSize
|
|
if total%PageSize > 0 {
|
|
totalPage++
|
|
}
|
|
return totalPage
|
|
}
|
|
|
|
type SeoValue struct {
|
|
Title string `json:"title" bson:"webTitle"` // 网站SEO标题
|
|
Keyworld []string `json:"keyworld" bson:"webKeyworld"` // 网站SEO关键字
|
|
Description string `json:"description" bson:"webDescription"` // 网站SEO描述
|
|
}
|
|
|
|
type TranslationType int64
|
|
|
|
const (
|
|
TranslationTypeUrl TranslationType = 1 // URL模式
|
|
TranslationTypeSub TranslationType = 2 // 二级导航
|
|
TranslationTypeBottom TranslationType = 3 // 底部导航
|
|
)
|