|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- package md
-
- import "applet/app/utils"
-
- // 拉新
- type AcquisitionCfg struct {
- Id string `json:"id"`
- Status string `json:"status"`
- Time int `json:"time"`
- StartTime string `json:"start_time"`
- EndTime string `json:"end_time"`
- SuccessConditions struct {
- Register struct {
- Open string `json:"open"`
- } `json:"register"`
- TaobaoAuthorization struct {
- Open string `json:"open"`
- } `json:"taobao_authorization"`
- BindPhone struct {
- Open string `json:"open"`
- } `json:"bind_phone"`
- FirstOrder struct {
- Open string `json:"open"`
- Day string `json:"day"`
- Status string `json:"status"`
- } `json:"first_order"`
- SelfOrder struct {
- Open string `json:"open"`
- Money string `json:"money"`
- } `json:"self_order"`
- OrderPay struct {
- Open string `json:"open"`
- Money string `json:"money"`
- } `json:"order_pay"`
- OrderStatus struct {
- Open string `json:"open"`
- Status string `json:"status"`
- } `json:"order_status"`
- } `json:"success_conditions"`
- RewardAccountDay string `json:"reward_account_day"`
- AdSetting struct {
- Status string `json:"status"`
- AdData string `json:"ad_data"`
- } `json:"ad_setting"`
- RewardRule struct {
- DirectTime string `json:"direct_time"`
- IndirectTime string `json:"indirect_time"`
- DirectSuccess string `json:"direct_success"`
- IndirectSuccess string `json:"indirect_success"`
- InvitedReward string `json:"invited_reward"`
- DirectSuccessMax string `json:"direct_success_max"`
- IndirectSuccessMax string `json:"indirect_success_max"`
- InvitedRewardMax string `json:"invited_reward_max"`
- RewardType string `json:"reward_type"`
- RewardCoinId string `json:"reward_coin_id"`
- NewRewardCoinId string `json:"new_reward_coin_id"`
- CoinList []RewardRuleCoinList `json:"coin_list"`
- } `json:"reward_rule"`
- ExtraRewardSetting struct {
- Status string `json:"status"`
- RewardStep []struct {
- Number string `json:"number"`
- Money string `json:"money"`
- Lv string `json:"lv"`
- CoinList []ExtraRewardSettingCoinList `json:"coin_list"`
- } `json:"reward_step"`
- } `json:"extra_reward_setting"`
- RankRule struct {
- Status string `json:"status"`
- ActivityCycle string `json:"activity_cycle"`
- EndTime string `json:"end_time"`
- RankData string `json:"rank_data"`
- FirstAwardMoney string `json:"first_award_money"`
- SecondAwardMoney string `json:"second_award_money"`
- ThirdAwardMoney string `json:"third_award_money"`
- FirstAwardExtendCount string `json:"first_award_extend_count"`
- SecondAwardExtendCount string `json:"second_award_extend_count"`
- ThirdAwardExtendCount string `json:"third_award_extend_count"`
- CoinList []RankRuleCoinList `json:"coin_list"`
- } `json:"rank_rule"`
- RankData string `json:"rank_data"`
- }
- type ExtraRewardSettingCoinList struct {
- CoinId string `json:"coin_id"`
- Money string `json:"money"`
- }
- type RankRuleCoinList struct {
- CoinId string `json:"coin_id"`
- FirstAwardMoney string `json:"first_award_money"`
- SecondAwardMoney string `json:"second_award_money"`
- ThirdAwardMoney string `json:"third_award_money"`
- }
- type RewardRuleCoinList struct {
- CoinId string `json:"coin_id"`
- DirectSuccess string `json:"direct_success"`
- IndirectSuccess string `json:"indirect_success"`
- InvitedReward string `json:"invited_reward"`
- DirectSuccessMax string `json:"direct_success_max"`
- IndirectSuccessMax string `json:"indirect_success_max"`
- InvitedRewardMax string `json:"invited_reward_max"`
- }
- type AcquisitionRankModData struct {
- CommonStyle struct {
- RankTitleImg string `json:"rank_title_img"`
- BackTitleImg string `json:"back_title_img"`
- HeadTitleImg string `json:"head_title_img"`
- FirstImg string `json:"first_img"`
- SecondImg string `json:"second_img"`
- ThirdImg string `json:"third_img"`
- FirstRewardImg string `json:"first_reward_img"`
- SecondRewardImg string `json:"second_reward_img"`
- ThirdRewardImg string `json:"third_reward_img"`
- } `json:"common_style"`
- VirtualUsers []AcquisitionRankVirtualUser `json:"virtual_users"`
- }
-
- type AcquisitionRankVirtualUser struct {
- HeadImg string `json:"head_img"`
- Name string `json:"name"`
- VirtualMoney string `json:"virtual_money"`
- Status string `json:"status"`
- }
-
- type AcquisitionRankUser struct {
- AvatarUrl string `json:"avatar_url"`
- Username string `json:"username"`
- Money string `json:"money"`
- Count string `json:"count"`
- Uid string `json:"uid"`
- }
-
- type AcquisitionRankUserList []AcquisitionRankUser
-
- func (p AcquisitionRankUserList) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
- func (p AcquisitionRankUserList) Len() int { return len(p) }
- func (p AcquisitionRankUserList) Less(i, j int) bool {
- iMoney := utils.AnyToFloat64(p[i].Money)
- jMoney := utils.AnyToFloat64(p[j].Money)
- return iMoney > jMoney
- }
-
- const (
- AcqRegister = "register"
- AcqTaobaoAuth = "taobaoAuth"
- AcqFirstOrder = "firstOrder"
- KaoLaCtrl = "kaola"
- MeituanCtrl = "meituan"
- OilCtrl = "oil"
- KfcCtrl = "kfc"
- CinemaCtrl = "cinema"
- )
|