Browse Source

Merge remote-tracking branch 'origin/feature/v4.9.29' into feature/v4.9.29

renjiaojiao 1 năm trước cách đây
mục cha
commit
0563d433ce

+ 366 - 367
src/jfw/modules/subscribepay/src/config/config.go

@@ -1,353 +1,353 @@
 package config
 
 import (
-	"sort"
-	"time"
+    "sort"
+    "time"
 
-	"github.com/gogf/gf/v2/os/gctx"
+    "github.com/gogf/gf/v2/os/gctx"
 
-	qutil "app.yhyue.com/moapp/jybase/common"
-	. "app.yhyue.com/moapp/jybase/date"
-	"app.yhyue.com/moapp/jybase/mail"
-	qrpc "app.yhyue.com/moapp/jybase/rpc"
-	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/middleGround"
-	"app.yhyue.com/moapp/jypkg/middleground"
-	"github.com/gogf/gf/v2/frame/g"
-	"github.com/gogf/gf/v2/os/gcfg"
+    qutil "app.yhyue.com/moapp/jybase/common"
+    . "app.yhyue.com/moapp/jybase/date"
+    "app.yhyue.com/moapp/jybase/mail"
+    qrpc "app.yhyue.com/moapp/jybase/rpc"
+    "app.yhyue.com/moapp/jypkg/common/src/qfw/util/middleGround"
+    "app.yhyue.com/moapp/jypkg/middleground"
+    "github.com/gogf/gf/v2/frame/g"
+    "github.com/gogf/gf/v2/os/gcfg"
 )
 
 type config struct {
-	MongodbServers  string
-	MongodbPoolSize int
-	MongodbName     string
-	Mongoent        *mgoConf
-	Mongobidding    *mgoConf
-	Mongolog        *mgoConf
-	MongoQyfw       *mgoConf
-	Elasticsearch   string
-	ElasticPoolSize int
-	ElasticVersion  string
-	ElasticUserName string
-	ElasticPassword string
-	Redisaddrs      string
-	Appid           string
-	Appsecret       string
-	Webport         string
-	Webrpcport      string
-	Weixinrpc       string
-	Mysql           struct {
-		DbName       string
-		Address      string
-		UserName     string
-		PassWord     string
-		MaxOpenConns int
-		MaxIdleConns int
-	}
-	BaseMysql struct {
-		DbName       string
-		Address      string
-		UserName     string
-		PassWord     string
-		MaxOpenConns int
-		MaxIdleConns int
-	}
-	PushMysql struct {
-		DbName       string
-		Address      string
-		UserName     string
-		PassWord     string
-		MaxOpenConns int
-		MaxIdleConns int
-	}
-	InfoMysql struct {
-		DbName       string
-		Address      string
-		UserName     string
-		PassWord     string
-		MaxOpenConns int
-		MaxIdleConns int
-	}
-	ActivityMysql struct {
-		DbName       string
-		Address      string
-		UserName     string
-		PassWord     string
-		MaxOpenConns int
-		MaxIdleConns int
-	}
-	AppPushServiceRpc string
-	WebDomain         string
-	AppDomain         string
-	WxDomain          string
-	Mail              []struct {
-		Addr string
-		Port int
-		Pwd  string
-		User string
-	}
-	VipKeyMaxLength        int64
-	ExpireRemind           []int
-	WxTplExpire            string
-	TermValidity           int
-	OrderCountdown         interface{}
-	AllPayMoney            int
-	AutoMergeTime          int64
-	ProfitTitle            string
-	ProfitDescript         string
-	AccountMergeOnline     string
-	OptimalTime            string
-	ActivityName           string
-	ShareRedisName         string
-	Product                map[string]bool
-	SmsServiceRpc          string
-	Nsq                    string
-	Nsq_Topic              string
-	UserCenterApi          string
-	ActivityOrderCountdown int64
-	CompanySize            int64
-	WebSiteParameter       struct {
-		Addr       string
-		Action     string
-		Title      string
-		Content    string
-		Link       string
-		AndroidUrl string
-		IosUrl     string
-		WeChatUrl  string
-	}
-	KeywordsLimit     int
-	BreakRenewTipTime string
-	TaskStartTime     int64
-	FinanceMail       string
-	EquityActive      struct {
-		Open    bool `json:"open"` // 活动开关
-		SiteMsg struct {
-			CallPlatform string `json:"callPlatform"`
-			MsgType      int    `json:"msgType"`
-			Title        string `json:"title"`
-			Content      string `json:"content"`
-			Link         string `json:"link"`
-			AndroidUrl   string `json:"androidUrl"`
-			IosUrl       string `json:"iosUrl"`
-			WeChatUrl    string `json:"weChatUrl"`
-		} `json:"siteMsg"` // 站内信内容配置
-		MailAlarm struct {
-			To        []string `json:"to"`
-			Title     string   `json:"title"`
-			ReTry     int      `json:"reTry"`
-			Threshold map[string]struct {
-				Name  string `json:"name"`
-				Value int    `json:"value"`
-			} `json:"threshold"` // 库存剩余阈值
-		} `json:"mailAlarm"` // 库存告警
-		Sms struct {
-			Args []string `json:"args"` // 短信部分可配置参数
-			Tid  string   `json:"tid"`  // 短信模板id
-		} `json:"sms"` // 短信配置
-		SaleDep map[string]bool // 代用户下单业绩归属部门配置 只有业绩归属为运营部才赠送
-	} `json:"equityActive"` // p459赠送视频权益活动配置
-	PayRaffle struct {
-		Open    bool `json:"open"` // 活动开关
-		SiteMsg struct {
-			CallPlatform string `json:"callPlatform"`
-			MsgType      int    `json:"msgType"`
-			Title        string `json:"title"`
-			Content      string `json:"content"`
-			Link         string `json:"link"`
-			AndroidUrl   string `json:"androidUrl"`
-			IosUrl       string `json:"iosUrl"`
-			WeChatUrl    string `json:"weChatUrl"`
-		} `json:"siteMsg"`
-		Activity map[string]struct {
-			ActivityId bool   `json:"activityId"` // 是否去查数据库活动表
-			Name       string `json:"name"`
-		} `json:"activity"`
-	} `json:"payRaffle"`
-	NewOrderTime int64 `json:"newOrderTime"`
+    MongodbServers  string
+    MongodbPoolSize int
+    MongodbName     string
+    Mongoent        *mgoConf
+    Mongobidding    *mgoConf
+    Mongolog        *mgoConf
+    MongoQyfw       *mgoConf
+    Elasticsearch   string
+    ElasticPoolSize int
+    ElasticVersion  string
+    ElasticUserName string
+    ElasticPassword string
+    Redisaddrs      string
+    Appid           string
+    Appsecret       string
+    Webport         string
+    Webrpcport      string
+    Weixinrpc       string
+    Mysql           struct {
+        DbName       string
+        Address      string
+        UserName     string
+        PassWord     string
+        MaxOpenConns int
+        MaxIdleConns int
+    }
+    BaseMysql struct {
+        DbName       string
+        Address      string
+        UserName     string
+        PassWord     string
+        MaxOpenConns int
+        MaxIdleConns int
+    }
+    PushMysql struct {
+        DbName       string
+        Address      string
+        UserName     string
+        PassWord     string
+        MaxOpenConns int
+        MaxIdleConns int
+    }
+    InfoMysql struct {
+        DbName       string
+        Address      string
+        UserName     string
+        PassWord     string
+        MaxOpenConns int
+        MaxIdleConns int
+    }
+    ActivityMysql struct {
+        DbName       string
+        Address      string
+        UserName     string
+        PassWord     string
+        MaxOpenConns int
+        MaxIdleConns int
+    }
+    AppPushServiceRpc string
+    WebDomain         string
+    AppDomain         string
+    WxDomain          string
+    Mail              []struct {
+        Addr string
+        Port int
+        Pwd  string
+        User string
+    }
+    VipKeyMaxLength        int64
+    ExpireRemind           []int
+    WxTplExpire            string
+    TermValidity           int
+    OrderCountdown         interface{}
+    AllPayMoney            int
+    AutoMergeTime          int64
+    ProfitTitle            string
+    ProfitDescript         string
+    AccountMergeOnline     string
+    OptimalTime            string
+    ActivityName           string
+    ShareRedisName         string
+    Product                map[string]bool
+    SmsServiceRpc          string
+    Nsq                    string
+    Nsq_Topic              string
+    UserCenterApi          string
+    ActivityOrderCountdown int64
+    CompanySize            int64
+    WebSiteParameter       struct {
+        Addr       string
+        Action     string
+        Title      string
+        Content    string
+        Link       string
+        AndroidUrl string
+        IosUrl     string
+        WeChatUrl  string
+    }
+    KeywordsLimit     int
+    BreakRenewTipTime string
+    TaskStartTime     int64
+    FinanceMail       string
+    EquityActive      struct {
+        Open    bool `json:"open"` // 活动开关
+        SiteMsg struct {
+            CallPlatform string `json:"callPlatform"`
+            MsgType      int    `json:"msgType"`
+            Title        string `json:"title"`
+            Content      string `json:"content"`
+            Link         string `json:"link"`
+            AndroidUrl   string `json:"androidUrl"`
+            IosUrl       string `json:"iosUrl"`
+            WeChatUrl    string `json:"weChatUrl"`
+        } `json:"siteMsg"` // 站内信内容配置
+        MailAlarm struct {
+            To        []string `json:"to"`
+            Title     string   `json:"title"`
+            ReTry     int      `json:"reTry"`
+            Threshold map[string]struct {
+                Name  string `json:"name"`
+                Value int    `json:"value"`
+            } `json:"threshold"` // 库存剩余阈值
+        } `json:"mailAlarm"` // 库存告警
+        Sms struct {
+            Args []string `json:"args"` // 短信部分可配置参数
+            Tid  string   `json:"tid"`  // 短信模板id
+        } `json:"sms"` // 短信配置
+        SaleDep map[string]bool // 代用户下单业绩归属部门配置 只有业绩归属为运营部才赠送
+    } `json:"equityActive"` // p459赠送视频权益活动配置
+    PayRaffle struct {
+        Open    bool `json:"open"` // 活动开关
+        SiteMsg struct {
+            CallPlatform string `json:"callPlatform"`
+            MsgType      int    `json:"msgType"`
+            Title        string `json:"title"`
+            Content      string `json:"content"`
+            Link         string `json:"link"`
+            AndroidUrl   string `json:"androidUrl"`
+            IosUrl       string `json:"iosUrl"`
+            WeChatUrl    string `json:"weChatUrl"`
+        } `json:"siteMsg"`
+        Activity map[string]struct {
+            ActivityId bool   `json:"activityId"` // 是否去查数据库活动表
+            Name       string `json:"name"`
+        } `json:"activity"`
+    } `json:"payRaffle"`
+    NewOrderTime int64 `json:"newOrderTime"`
 }
 type mgoConf struct {
-	Address           string
-	Size              int
-	DbName            string
-	ReplSet           string
-	Collection        string
-	Collection_change string
-	UserName          string
-	Password          string
+    Address           string
+    Size              int
+    DbName            string
+    ReplSet           string
+    Collection        string
+    Collection_change string
+    UserName          string
+    Password          string
 }
 type timeTaskConfig struct {
-	IsRun          bool   //是否执行定时任务
-	ExpireRemind   string //到期提醒
-	SyncVipUpgrade string //同步未及时生效的数据
-	CheckIsExpire  string //定时更新用户vip状态
-	UnpaidRemind   struct {
-		//未支付订单提醒
-		AfterOrder            int64 //下单后n小时提醒
-		BeforeExpire          int64 //n小时自动关闭提醒
-		RemindDuration        int   //定时任务时间间隔
-		LoadOrderDuration     int   //定时任务时间间隔
-		LiveActiveAfterOrder  int64 //直播活动下单后n小时提醒
-		LiveActiveAfterOrders int64 //直播活动下单后n小时提醒(2次提醒)
-	}
-	CourseTask                         string //更新课程已下线状态
-	MemberExpire                       string //大会员gengx到期时间
-	MemberIsStart                      string //大会员用户开启时间
-	MemberServiceIsExpire              string //大会员用户服务开启或到期时间
-	DataExportSendMailDuringMinute     int    //数据导出发送邮件定时任务
-	UpdateDEStatus                     string //定时更新超时订单状态-2
-	ProvinceExpire                     string //省份订阅包
-	UpdateTimeLimitActivityOrderStatus string //限时活动取消订单定时任务
+    IsRun          bool   //是否执行定时任务
+    ExpireRemind   string //到期提醒
+    SyncVipUpgrade string //同步未及时生效的数据
+    CheckIsExpire  string //定时更新用户vip状态
+    UnpaidRemind   struct {
+        //未支付订单提醒
+        AfterOrder            int64 //下单后n小时提醒
+        BeforeExpire          int64 //n小时自动关闭提醒
+        RemindDuration        int   //定时任务时间间隔
+        LoadOrderDuration     int   //定时任务时间间隔
+        LiveActiveAfterOrder  int64 //直播活动下单后n小时提醒
+        LiveActiveAfterOrders int64 //直播活动下单后n小时提醒(2次提醒)
+    }
+    CourseTask                         string          //更新课程已下线状态
+    MemberExpire                       string          //大会员gengx到期时间
+    MemberIsStart                      string          //大会员用户开启时间
+    MemberServiceIsExpire              string          //大会员用户服务开启或到期时间
+    DataExportSendMailDuringMinute     int             //数据导出发送邮件定时任务
+    UpdateDEStatus                     string          //定时更新超时订单状态-2
+    ProvinceExpire                     string          //省份订阅包
+    UpdateTimeLimitActivityOrderStatus string          //限时活动取消订单定时任务
+    SubVipTipDuring                    SubVipTipDuring //超级订阅提醒
 }
 type messageConfig struct {
-	WxTpl_SoonExpire           *WxTplMsg       //微信-超级订阅-即将到期
-	WxTpl_Expired              *WxTplMsg       //微信-超级订阅-已到期
-	WxTpl_BigMember_SoonExpire *WxTplMsg       //微信-大会员-即将到期
-	WxTpl_BigMember_Expired    *WxTplMsg       //微信-大会员-已到期
-	WxTpl_Unpaid               *WxTplMsg       //未支付订单
-	WxTpl_PaySuccess           *WxTplMsg       //支付成功
-	WxTpl_DataReport           *WxTplMsg       //数据报告
-	App_OnTrial_SoonExpire     string          //app-超级订阅-试用即将到期
-	App_OnTrial_Expired        string          //app-超级订阅-试用已到期
-	App_SoonExpire             string          //app-超级订阅-即将到期
-	App_Expired                string          //app-超级订阅-已到期
-	App_BigMember_SoonExpire   string          //app-大会员-即将到期
-	App_BigMember_Expired      string          //app-大会员-已到期
-	App_Unpaid                 string          //app-订单未支付
-	App_PaySuccess             string          //app-订单支付成功
-	SubVipTipDuring            SubVipTipDuring //超级订阅提醒
+    WxTpl_SoonExpire           *WxTplMsg //微信-超级订阅-即将到期
+    WxTpl_Expired              *WxTplMsg //微信-超级订阅-已到期
+    WxTpl_BigMember_SoonExpire *WxTplMsg //微信-大会员-即将到期
+    WxTpl_BigMember_Expired    *WxTplMsg //微信-大会员-已到期
+    WxTpl_Unpaid               *WxTplMsg //未支付订单
+    WxTpl_PaySuccess           *WxTplMsg //支付成功
+    WxTpl_DataReport           *WxTplMsg //数据报告
+    App_OnTrial_SoonExpire     string    //app-超级订阅-试用即将到期
+    App_OnTrial_Expired        string    //app-超级订阅-试用已到期
+    App_SoonExpire             string    //app-超级订阅-即将到期
+    App_Expired                string    //app-超级订阅-已到期
+    App_BigMember_SoonExpire   string    //app-大会员-即将到期
+    App_BigMember_Expired      string    //app-大会员-已到期
+    App_Unpaid                 string    //app-订单未支付
+    App_PaySuccess             string    //app-订单支付成功
 }
 type SubVipTipDuring []struct {
-	Day   int64 `json:"day"`   //到期前x天提醒
-	Cycle int64 `json:"cycle"` //购买周期
+    Day   int64 `json:"day"`   //到期前x天提醒
+    Cycle int64 `json:"cycle"` //购买周期
 }
 
 type WxTplMsg struct {
-	Id        string
-	Keyword1  *qrpc.TmplItem
-	Keyword2  *qrpc.TmplItem
-	Keyword3  *qrpc.TmplItem
-	Keyword4  *qrpc.TmplItem
-	Keyword44 *qrpc.TmplItem
+    Id        string
+    Keyword1  *qrpc.TmplItem
+    Keyword2  *qrpc.TmplItem
+    Keyword3  *qrpc.TmplItem
+    Keyword4  *qrpc.TmplItem
+    Keyword44 *qrpc.TmplItem
 }
 type Invoice struct {
-	Invoice_manager           string
-	Invoice_name              string
-	Invoice_nature            string
-	Tax_rate                  string
-	Tax_policy                string
-	Invoice_interface_address string
-	Code                      string
-	Switch_paymch             struct {
-		Model int
-		Time  string
-	}
-	Invoice_switch     bool
-	Red_invoice_switch bool            //红冲发票是否可用开关
-	Red_invoice_msg    string          //提示信息
-	Third_party_switch bool            //第三方开票开关
-	Order_createtime   int64           //24年之前的订单不能开票
-	SigningSubject     string          `json:"signing_subject"` //管理后台订单发票签约主体配置
-	SubmitNum          int64           `json:"submit_num"`
-	Invoice_type       map[string]bool //发票类型
+    Invoice_manager           string
+    Invoice_name              string
+    Invoice_nature            string
+    Tax_rate                  string
+    Tax_policy                string
+    Invoice_interface_address string
+    Code                      string
+    Switch_paymch             struct {
+        Model int
+        Time  string
+    }
+    Invoice_switch     bool
+    Red_invoice_switch bool            //红冲发票是否可用开关
+    Red_invoice_msg    string          //提示信息
+    Third_party_switch bool            //第三方开票开关
+    Order_createtime   int64           //24年之前的订单不能开票
+    SigningSubject     string          `json:"signing_subject"` //管理后台订单发票签约主体配置
+    SubmitNum          int64           `json:"submit_num"`
+    Invoice_type       map[string]bool //发票类型
 }
 
 type entnicheConfig struct {
-	Price    map[string]float64
-	Discount float64
+    Price    map[string]float64
+    Discount float64
 }
 
 type memberConfig struct {
-	Price         map[string]float64
-	OriginalPrice map[string]float64
-	Power         struct {
-		Formal_fwinner      int //大会员正式用户中标预测项目数量
-		Trial_fwinner       int //大会员试用用户中标预测项目数量
-		Trial_dproject      int //大会员试用用户投标决策分析项目数量
-		Trial_potential     int //大会员试用用户潜在客户|竞争对手获取信息条数
-		Trial_bidfile       int //大会员试用用户文件解读次数
-		Formal_enterprise   int //大会员正式用户企业情报和监控功能企业数量
-		Formal_project      int //大会员正式用户关注项目数量
-		Formal_customer     int //大会员正式用户关注客户数量
-		Formal_package      int //大会员专家版2.0单日限量包数量
-		Business_enterprise int //大会员商机版本2.0企业情报和监控功能企业数量
-		Business_project    int //大会员商机版2.0关注项目数量
-		Business_package    int //大会员商机版2.0单日限量包数量
-	}
-	AiForecastPack float64 //AI预测包价格
+    Price         map[string]float64
+    OriginalPrice map[string]float64
+    Power         struct {
+        Formal_fwinner      int //大会员正式用户中标预测项目数量
+        Trial_fwinner       int //大会员试用用户中标预测项目数量
+        Trial_dproject      int //大会员试用用户投标决策分析项目数量
+        Trial_potential     int //大会员试用用户潜在客户|竞争对手获取信息条数
+        Trial_bidfile       int //大会员试用用户文件解读次数
+        Formal_enterprise   int //大会员正式用户企业情报和监控功能企业数量
+        Formal_project      int //大会员正式用户关注项目数量
+        Formal_customer     int //大会员正式用户关注客户数量
+        Formal_package      int //大会员专家版2.0单日限量包数量
+        Business_enterprise int //大会员商机版本2.0企业情报和监控功能企业数量
+        Business_project    int //大会员商机版2.0关注项目数量
+        Business_package    int //大会员商机版2.0单日限量包数量
+    }
+    AiForecastPack float64 //AI预测包价格
 }
 
 type bidfileConfig struct {
-	Price         float64
-	File_number   int
-	AttachmentRPC string
+    Price         float64
+    File_number   int
+    AttachmentRPC string
 }
 
 // 数据导出配置文件
 type DataExportConfig struct {
-	UnitPrice_normal   float64 `json:"unitPrice_normal"`
-	UnitPrice_senior   float64 `json:"unitPrice_senior"`
-	Discount           float64 `json:"discount"`
-	OrderMinPrice      float64 `json:"orderMinPrice"`
-	Packs_validityYear int     `json:"packs_validityYear"` //数据包有效期 暂时只有两年
-	Packs_showList     []struct {
-		PackNum         int     `json:"packNum"`
-		Normal_discount float64 `json:"normal_discount"`
-		Senior_discount float64 `json:"senior_discount"`
-	} `json:"packs_showList"` //在售数据包列表
-	MsgMaxCount                      int          `json:"msgMaxCount"`
-	Standard_Fields                  []*ExeclCell `json:"standard"`
-	Senior_Fields                    []*ExeclCell `json:"senior"`
-	Mail_attach_content              string       `json:"mail_attach_content"`
-	Mail_attach_pack_content         string       `json:"mail_attach_pack_content"`
-	Mail_attach_pack_attachment      string       `json:"mail_attach_pack_attachment"`
-	Mail_attach_common_attachment    string       `json:"mail_attach_common_attachment"`
-	Mail_attach_content_key          string       `json:"mail_attach_content_key"`
-	Mail_notice_content              string       `json:"mail_notice_content"`
-	Mail_notice_title                string       `json:"mail_notice_title"`
-	Mail_retry                       int          `json:"mail_retry"`
-	AuditPersons                     []string     `json:"auditPersons"`
-	Font                             Font         `json:"font"`
-	Mail_invoice_finance_content     string       `json:"mail_invoice_finance_content"`     //to北京财务订单内容
-	Mail_vip_invoice_finance_content string       `json:"mail_vip_invoice_finance_content"` //vip订单 to北京财务申请发票内容
-	Mail_ent_invoice_finance_content string       `json:"mail_ent_invoice_finance_content"` //企业商机管理 to北京财务申请发票内容
-	Mail_order_finance_content       string       `json:"mail_order_finance_content"`       //to北京财务申请发票内容
-	Finance_emails                   []string     `json:"finance_emails"`
-	ErrNote_emails                   []string     `json:"errNote_emails"` //数据导出异常通知邮箱
-	Qmxdomain                        string       `json:"qmxdomain"`
-	DataReportContent                string       `json:"dataReportContent"`
-	ExcelReadyPath                   string       `json:"excelReadyPath"`
-	ExcelPayedPath                   string       `json:"excelPayedPath"`
-	ExcelEntPath                     string       `json:"excelEntPath"`
+    UnitPrice_normal   float64 `json:"unitPrice_normal"`
+    UnitPrice_senior   float64 `json:"unitPrice_senior"`
+    Discount           float64 `json:"discount"`
+    OrderMinPrice      float64 `json:"orderMinPrice"`
+    Packs_validityYear int     `json:"packs_validityYear"` //数据包有效期 暂时只有两年
+    Packs_showList     []struct {
+        PackNum         int     `json:"packNum"`
+        Normal_discount float64 `json:"normal_discount"`
+        Senior_discount float64 `json:"senior_discount"`
+    } `json:"packs_showList"` //在售数据包列表
+    MsgMaxCount                      int          `json:"msgMaxCount"`
+    Standard_Fields                  []*ExeclCell `json:"standard"`
+    Senior_Fields                    []*ExeclCell `json:"senior"`
+    Mail_attach_content              string       `json:"mail_attach_content"`
+    Mail_attach_pack_content         string       `json:"mail_attach_pack_content"`
+    Mail_attach_pack_attachment      string       `json:"mail_attach_pack_attachment"`
+    Mail_attach_common_attachment    string       `json:"mail_attach_common_attachment"`
+    Mail_attach_content_key          string       `json:"mail_attach_content_key"`
+    Mail_notice_content              string       `json:"mail_notice_content"`
+    Mail_notice_title                string       `json:"mail_notice_title"`
+    Mail_retry                       int          `json:"mail_retry"`
+    AuditPersons                     []string     `json:"auditPersons"`
+    Font                             Font         `json:"font"`
+    Mail_invoice_finance_content     string       `json:"mail_invoice_finance_content"`     //to北京财务订单内容
+    Mail_vip_invoice_finance_content string       `json:"mail_vip_invoice_finance_content"` //vip订单 to北京财务申请发票内容
+    Mail_ent_invoice_finance_content string       `json:"mail_ent_invoice_finance_content"` //企业商机管理 to北京财务申请发票内容
+    Mail_order_finance_content       string       `json:"mail_order_finance_content"`       //to北京财务申请发票内容
+    Finance_emails                   []string     `json:"finance_emails"`
+    ErrNote_emails                   []string     `json:"errNote_emails"` //数据导出异常通知邮箱
+    Qmxdomain                        string       `json:"qmxdomain"`
+    DataReportContent                string       `json:"dataReportContent"`
+    ExcelReadyPath                   string       `json:"excelReadyPath"`
+    ExcelPayedPath                   string       `json:"excelPayedPath"`
+    ExcelEntPath                     string       `json:"excelEntPath"`
 }
 
 type ExeclCell struct {
-	Name   string  `json:"name"`   //名称
-	Filed  string  `json:"filed"`  //对应字段
-	Width  float64 `json:"width"`  //宽度
-	Color  string  `json:"color"`  //北京颜色
-	VMerge int     `json:"vMerge"` //垂直合并单元格
-	HMerge int     `json:"hMerge"` //水平合并单元格
+    Name   string  `json:"name"`   //名称
+    Filed  string  `json:"filed"`  //对应字段
+    Width  float64 `json:"width"`  //宽度
+    Color  string  `json:"color"`  //北京颜色
+    VMerge int     `json:"vMerge"` //垂直合并单元格
+    HMerge int     `json:"hMerge"` //水平合并单元格
 }
 
 type Font struct {
-	Enabled                 bool   `json:"enabled"`
-	ConvertVersionDefault   string `json:"convertVersionDefault"`
-	UnConvertVersionDefault string `json:"unConvertVersionDefault"`
-	MappingFileExt          string `json:"mappingFileExt"`
-	MappingFilePath         string `json:"mappingFilePath"`
-	RedisPool               string `json:"redisPool"`
-	RedisKey                string `json:"redisKey"`
+    Enabled                 bool   `json:"enabled"`
+    ConvertVersionDefault   string `json:"convertVersionDefault"`
+    UnConvertVersionDefault string `json:"unConvertVersionDefault"`
+    MappingFileExt          string `json:"mappingFileExt"`
+    MappingFilePath         string `json:"mappingFilePath"`
+    RedisPool               string `json:"redisPool"`
+    RedisKey                string `json:"redisKey"`
 }
 
 type Integral struct {
-	BasicIntegral            int    `json:"basicIntegral"`            //最低积分基础购买额度
-	BasicDiscount            int    `json:"basicDiscount"`            //基础折扣
-	ActiveIng                bool   `json:"activeIng"`                //活动是否进行
-	ActiveDiscount           int    `json:"activeDiscount"`           //活动折扣
-	SlewRate                 int    `json:"slewRate"`                 //积分购买转换率
-	IntegralHarvestHref      string `json:"integralHarvestHref"`      //调用充值积分接口
-	IntegralBalanceCheckHref string `json:"integralBalanceCheckHref"` //积分余额接口
-	Appid                    string `json:"appid"`                    //剑鱼标识,默认10000,其余待定
+    BasicIntegral            int    `json:"basicIntegral"`            //最低积分基础购买额度
+    BasicDiscount            int    `json:"basicDiscount"`            //基础折扣
+    ActiveIng                bool   `json:"activeIng"`                //活动是否进行
+    ActiveDiscount           int    `json:"activeDiscount"`           //活动折扣
+    SlewRate                 int    `json:"slewRate"`                 //积分购买转换率
+    IntegralHarvestHref      string `json:"integralHarvestHref"`      //调用充值积分接口
+    IntegralBalanceCheckHref string `json:"integralBalanceCheckHref"` //积分余额接口
+    Appid                    string `json:"appid"`                    //剑鱼标识,默认10000,其余待定
 }
 
 // 积分
@@ -355,25 +355,25 @@ var IntegralConfig *Integral
 
 // 卡卷
 type Coupon struct {
-	CouponUpdate      string             `json:"couponUpdate"` //卡卷中台api  修改卡卷状态地址
-	CouponInfo        string             `json:"couponInfo"`   //卡卷中台api  获取卡卷信息
-	AppId             string             `json:"appId"`
-	Products          map[string]string  `json:"products"`
-	Giveinfo          string             `json:"giveinfo"`          //中台 赠品api 获取赠品详情地址
-	FindUserLotteryId string             `json:"findUserLotteryId"` //获取user_prize的主键id
-	GetAllActivity    string             `json:"getAllActivity"`    //活动获取
-	LotteryReceive    string             `json:"lotteryReceive"`    //奖券领取
-	UserLottery       string             `json:"userLottery"`       //用户下的奖券
-	LotteryInfo       string             `json:"lotteryInfo"`       //奖券详情(新版)
-	ChoosedProductId  map[string][]int64 `json:"choosedProductId"`  //选中的商品
+    CouponUpdate      string             `json:"couponUpdate"` //卡卷中台api  修改卡卷状态地址
+    CouponInfo        string             `json:"couponInfo"`   //卡卷中台api  获取卡卷信息
+    AppId             string             `json:"appId"`
+    Products          map[string]string  `json:"products"`
+    Giveinfo          string             `json:"giveinfo"`          //中台 赠品api 获取赠品详情地址
+    FindUserLotteryId string             `json:"findUserLotteryId"` //获取user_prize的主键id
+    GetAllActivity    string             `json:"getAllActivity"`    //活动获取
+    LotteryReceive    string             `json:"lotteryReceive"`    //奖券领取
+    UserLottery       string             `json:"userLottery"`       //用户下的奖券
+    LotteryInfo       string             `json:"lotteryInfo"`       //奖券详情(新版)
+    ChoosedProductId  map[string][]int64 `json:"choosedProductId"`  //选中的商品
 }
 
 var CouponConfig *Coupon
 
 type ResourceCfg struct {
-	Product                 map[string]string `json:"product"`
-	AttachmentDownPackPrice map[string]int    `json:"attachmentDownPackPrice"`
-	BuyerPortraitPackPrice  map[string]int    `json:"buyerPortraitPackPrice"`
+    Product                 map[string]string `json:"product"`
+    AttachmentDownPackPrice map[string]int    `json:"attachmentDownPackPrice"`
+    BuyerPortraitPackPrice  map[string]int    `json:"buyerPortraitPackPrice"`
 }
 
 //数据导出配置文件-end
@@ -402,53 +402,52 @@ var AutoMergeTimeStamp int64
 var Middleground *middleground.Middleground
 
 func init() {
-	//程序配置文件
-	qutil.ReadConfig(&Config)
-	qutil.ReadConfig("./timetask.json", &TimeTaskConfig)
-	qutil.ReadConfig("./message.json", &MessageConfig)
-	qutil.ReadConfig("./entniche.json", &EntnicheConfig)
-	qutil.ReadConfig("./invoice.json", &InvoiceConfig)
-	qutil.ReadConfig("./member.json", &MemberConfig)
-	qutil.ReadConfig("./bidfile.json", &BidfileConfig)
-	qutil.ReadConfig("./dataexport.json", &ExConf)
-	qutil.ReadConfig("./integral.json", &IntegralConfig)
-	qutil.ReadConfig("./coupon.json", &CouponConfig)
-	qutil.ReadConfig("./resourcePack.json", &ResConf)
-	qutil.ReadConfig("./baseApi.json", &middleGround.JyApiConfig) //初始化中台请求接口
-	g.Cfg().GetAdapter().(*gcfg.AdapterFile).SetFileName("config.yaml")
-	var ctx = gctx.New()
-	Middleground = middleground.NewMiddleground(g.Cfg().MustGet(ctx, "etcd.hosts").Strings()).
-		RegUserCenter(g.Cfg().MustGet(ctx, "userCenterKey").String()).
-		RegPowerCheckCenter(g.Cfg().MustGet(ctx, "powerCheckCenterKey").String()).
-		RegActivity(g.Cfg().MustGet(ctx, "activityKey").String()).
-		RegJyBase(g.Cfg().MustGet(ctx, "bxbaseKey").String())
-	for _, v := range Config.Mail {
-		mail := &mail.GmailAuth{
-			SmtpHost: v.Addr,
-			SmtpPort: v.Port,
-			User:     v.User,
-			Pwd:      v.Pwd,
-		}
-		GmailAuth = append(GmailAuth, mail)
-	}
-	//支付配置文件
-	qutil.ReadConfig("./pay_config.json", &PayConf)
-	AliPayConf = PayConf["aliPay"].(map[string]interface{})
-	WxPayConf = PayConf["wxPay"].(map[string]interface{})
+    //程序配置文件
+    qutil.ReadConfig(&Config)
+    qutil.ReadConfig("./timetask.json", &TimeTaskConfig)
+    qutil.ReadConfig("./message.json", &MessageConfig)
+    qutil.ReadConfig("./entniche.json", &EntnicheConfig)
+    qutil.ReadConfig("./invoice.json", &InvoiceConfig)
+    qutil.ReadConfig("./member.json", &MemberConfig)
+    qutil.ReadConfig("./bidfile.json", &BidfileConfig)
+    qutil.ReadConfig("./dataexport.json", &ExConf)
+    qutil.ReadConfig("./integral.json", &IntegralConfig)
+    qutil.ReadConfig("./coupon.json", &CouponConfig)
+    qutil.ReadConfig("./resourcePack.json", &ResConf)
+    qutil.ReadConfig("./baseApi.json", &middleGround.JyApiConfig) //初始化中台请求接口
+    g.Cfg().GetAdapter().(*gcfg.AdapterFile).SetFileName("config.yaml")
+    var ctx = gctx.New()
+    Middleground = middleground.NewMiddleground(g.Cfg().MustGet(ctx, "etcd.hosts").Strings()).
+        RegUserCenter(g.Cfg().MustGet(ctx, "userCenterKey").String()).
+        RegPowerCheckCenter(g.Cfg().MustGet(ctx, "powerCheckCenterKey").String()).
+        RegActivity(g.Cfg().MustGet(ctx, "activityKey").String()).
+        RegJyBase(g.Cfg().MustGet(ctx, "bxbaseKey").String())
+    for _, v := range Config.Mail {
+        mail := &mail.GmailAuth{
+            SmtpHost: v.Addr,
+            SmtpPort: v.Port,
+            User:     v.User,
+            Pwd:      v.Pwd,
+        }
+        GmailAuth = append(GmailAuth, mail)
+    }
+    //支付配置文件
+    qutil.ReadConfig("./pay_config.json", &PayConf)
+    AliPayConf = PayConf["aliPay"].(map[string]interface{})
+    WxPayConf = PayConf["wxPay"].(map[string]interface{})
 
-	//微信
-	Wxoauth = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=` + Config.Appid + `&redirect_uri=%s&response_type=code&scope=snsapi_base&state=%s#wechat_redirect`
-	Wxoauthinfo = `https://api.weixin.qq.com/sns/oauth2/access_token?appid=` + Config.Appid + `&secret=` + Config.Appsecret + `&code=%s&grant_type=authorization_code`
+    //微信
+    Wxoauth = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=` + Config.Appid + `&redirect_uri=%s&response_type=code&scope=snsapi_base&state=%s#wechat_redirect`
+    Wxoauthinfo = `https://api.weixin.qq.com/sns/oauth2/access_token?appid=` + Config.Appid + `&secret=` + Config.Appsecret + `&code=%s&grant_type=authorization_code`
 
-	//账户合并
-	time, err := time.ParseInLocation(Date_Full_Layout, Config.AccountMergeOnline, time.Local)
-	if err != nil {
-		panic(err.(interface{}))
-	}
-	AutoMergeTimeStamp = time.Unix()
+    //账户合并
+    time, err := time.ParseInLocation(Date_Full_Layout, Config.AccountMergeOnline, time.Local)
+    if err != nil {
+        panic(err.(interface{}))
+    }
+    AutoMergeTimeStamp = time.Unix()
 
-	sort.Slice(MessageConfig.SubVipTipDuring, func(i, j int) bool {
-		return MessageConfig.SubVipTipDuring[i].Cycle > MessageConfig.SubVipTipDuring[j].Cycle
-	})
-	g.Dump(MessageConfig.SubVipTipDuring)
+    sort.Slice(TimeTaskConfig.SubVipTipDuring, func(i, j int) bool {
+        return TimeTaskConfig.SubVipTipDuring[i].Cycle > TimeTaskConfig.SubVipTipDuring[j].Cycle
+    })
 }

+ 1 - 6
src/jfw/modules/subscribepay/src/message.json

@@ -85,10 +85,5 @@
 	"App_BigMember_SoonExpire":"您的大会员服务即将到期,为了不影响您所获取更全面的招标信息,请您及时续费。",
 	"App_BigMember_Expired":"您的大会员服务已到期,如需获取更多精准招标信息,请再次购买。",
 	"App_Unpaid":"您的订单 %s 处于未支付状态,为了使您获取更多招标信息,请您及时付款。",
-	"App_PaySuccess":"您的订单 %s 已支付成功,剑鱼标讯将为您提供更多精准招标信息,感谢您的购买!",
-  "subVipTipDuring": [
-    {"day": 7,"cycle": 90},
-    {"day": 30,"cycle": 360},
-    {"day": 0,"cycle": 7}
-  ]
+	"App_PaySuccess":"您的订单 %s 已支付成功,剑鱼标讯将为您提供更多精准招标信息,感谢您的购买!"
 }

+ 3 - 2
src/jfw/modules/subscribepay/src/service/commodity.go

@@ -29,8 +29,6 @@ func init() {
 
 // 获取商品详情
 func (this *Coupon) Detail() {
-	_, aa := EventRenewalReminder(this.Session(), qutil.ObjToString(this.GetSession("userId")), -1)
-	fmt.Println(aa)
 	defer qutil.Catch()
 	userid := qutil.ObjToString(this.GetSession("userId"))
 	rData, errMsg := func() (interface{}, error) {
@@ -205,6 +203,9 @@ func EventRenewalReminder(session *httpsession.Session, userid string, areaCount
 									if discounts.Types == 3 {
 										discounts.Full = sku.OriginalPrice
 										discounts.Reduce = sku.OriginalPrice - discounts.PromotionalPrice
+									} else if discounts.Types == 2 && discounts.Time == 12 && discounts.TimeType == 2 {
+										discounts.Time = 1
+										discounts.TimeType = 3
 									}
 									if discounts.Types == 2 && discounts.Time%12 == 0 {
 										discounts.Time = discounts.Time / 12

+ 8 - 3
src/jfw/modules/subscribepay/src/timetask.json

@@ -1,5 +1,5 @@
 {
-	"isRun":true,
+	"isRun":false,
 	"expireRemind": "10:00",
 	"syncVipUpgrade": "00:00",
 	"checkIsExpire": "00:00",
@@ -18,5 +18,10 @@
 	"DataExportSendMailDuringMinute":1,
 	"updateDEStatus":"1h",
 	"provinceExpire":"00:00",
-	"updateTimeLimitActivityOrderStatus":"15s"
-}
+	"updateTimeLimitActivityOrderStatus":"15s",
+  "subVipTipDuring": [
+    {"day": 7,"cycle": 90},
+    {"day": 30,"cycle": 360},
+    {"day": 0,"cycle": 7}
+  ]
+}

+ 5 - 6
src/jfw/modules/subscribepay/src/timetask/timetask.go

@@ -307,8 +307,8 @@ func checkIsExpire(iy Identity) {
 			"$gt": 0,
 		}
 		queryEndTime := now_unix + threeday
-		if len(MessageConfig.SubVipTipDuring) > 0 {
-			queryEndTime = now_unix + oneDayLong*MessageConfig.SubVipTipDuring[0].Cycle
+		if len(TimeTaskConfig.SubVipTipDuring) > 0 {
+			queryEndTime = now_unix + oneDayLong*TimeTaskConfig.SubVipTipDuring[0].Cycle
 		}
 		query["l_vip_endtime"] = map[string]interface{}{
 			"$lte": queryEndTime,
@@ -359,15 +359,14 @@ func checkIsExpire(iy Identity) {
 				//(2) 仅购买个人超级订阅(包含企业身份下个人购买的订单)
 				//(3)老版本超级订阅不提醒(仅个人身份下有)
 				showTip := func(s, e int64) bool {
-					for _, cfg := range MessageConfig.SubVipTipDuring {
+					for _, cfg := range TimeTaskConfig.SubVipTipDuring {
 						if e-s >= cfg.Cycle*oneDayLong && (now_unix+oneDayLong*(cfg.Day+1) > e && now_unix+oneDayLong*cfg.Day < e) {
-							log.Println("用户", _id, i_vip_status, l_vip_endtime, "新增到期提醒", cfg.Day)
+							log.Println("用户 sVipTip", _id, i_vip_status, l_vip_endtime, "新增到期提醒", cfg.Day)
 							return true
 						}
 					}
 					return false
 				}(l_vip_starttime, l_vip_endtime)
-
 				if !showTip {
 					continue
 				}
@@ -406,7 +405,7 @@ func checkIsExpire(iy Identity) {
 				// 存入redis值,供前台弹框使用
 				redis.Put("newother", fmt.Sprintf("Expire_SubvipTip_%d", identity.PositionId), l_vip_endtime, qutil.IntAll(l_vip_endtime-now_unix))
 
-				log.Println("用户", _id, i_vip_status, l_vip_endtime, "修改即将到期状态", updateOk)
+				log.Println("用户 sVipTip", _id, identity.PositionId, i_vip_status, l_vip_endtime, "修改即将到期状态", updateOk)
 			}
 			m = make(map[string]interface{})
 		}

BIN
src/web/staticres/images/index/vip-expire-dialog-bg.png


+ 290 - 1
src/web/staticres/public-pc/js/check-power-and-switch.js

@@ -22,6 +22,36 @@ var checkPowerAndSwitchTemplate = `
     </div>
 </div>
 `
+var checkVipExpireDialogTemplate = `
+<div
+    class="modal fade check-vip-expire-modal"
+    id="checkVipExpireModal"
+    tabindex="-1"
+    role="dialog"
+    aria-labelledby="checkVipExpire"
+    aria-hidden="true"
+>
+    <div class="modal-dialog check-vip-expire-box is-show" style="width: 368px; height: 460px;">
+        <div class="check-vip-expire-container">
+            <div class="check-vip-expire-header"></div>
+            <div class="check-vip-expire-footer">
+                <div class="text-container">
+                    <p>为避免遗漏重大项目,请及时续费</p>
+                    <p class="activity-tip" style="display:none;"></p>
+                </div>
+                <button class="confirm-button clickable">
+                    立即续费
+                </button>
+            </div>
+        </div>
+        <div class="dialog-close pointer">
+            <img src="/images/pc/close-icon.png">
+        </div>
+    </div>
+</div>
+`
+
+
 var checkPowerAndSwitchStyle = `
 <style>
 .check-power-and-switch-box {
@@ -87,9 +117,100 @@ var checkPowerAndSwitchStyle = `
 </style>
 `
 
+var checkVipExpireStyle = `
+<style>
+.check-vip-expire-box {
+    position: relative;
+    margin: 0 auto;
+    border-radius: 8px;
+    background: transparent url(/images/index/vip-expire-dialog-bg.png) no-repeat center;
+    background-size: contain;
+}
+.check-vip-expire-modal {
+    left: 50%;
+    top: 50%;
+    transform: translate(-50%, -50%);
+}
+.check-vip-expire-container {
+    position: relative;
+    height: 340px;
+    width: 100%;
+    left: 0;
+    top: 100px;
+  }
+  
+.check-vip-expire-header,
+.check-vip-expire-footer {
+    position: absolute;
+    left: 0;
+    right: 0;
+    font-size: 16px;
+    line-height: 24px;
+    color: #5f391a;
+    text-align: center;
+    padding: 0 20px;
+}
+  
+.check-vip-expire-header {
+    top: 10px;
+}
+.check-vip-expire-header .time {
+    font-size: 18px;
+    font-weight: bold;
+}
+
+.check-vip-expire-footer {
+    bottom: 18px;
+}
+.text-container {
+    margin-bottom: 8px;
+}
+.text-container.expire-text-center {
+    margin-bottom: 20px;
+}
+  
+.activity-tip {
+    margin-top: 4px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    padding: 2px 0;
+    font-size: 14px;
+    line-height: 20px;
+    color: #fff;
+    border-radius: 4px;
+    background: linear-gradient(90deg, #FF9347 0%, #FF4236 100%);
+}
+  
+.confirm-button {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    width: 100%;
+    padding: 8px 0;
+    font-size: 16px;
+    line-height: 24px;
+    color: #fae7ca;
+    border-radius: 8px;
+    background: linear-gradient(117.49deg, #3E3835 8.4%, #242120 100%);
+}
+.check-vip-expire-box .dialog-close {
+    position: absolute;
+    bottom: -40px;
+    left: 50%;
+    transform: translateX(-50%);
+    display: block;
+    width: 24px;
+    height: 24px;
+}
+</style>
+`
+
 var checkPowerAndSwitch = {
     $modal: '',
     targetIdentity: {},
+    // 初始化下一个弹窗
+    showNext: function() {},
     init: function () {
         this.getUserHighestIdentity()
     },
@@ -203,8 +324,176 @@ var checkPowerAndSwitch = {
     }
 };
 
+var checkVipExpireDialog = {
+    $modal: '',
+    pInfo: {},
+    // 初始化下一个弹窗
+    showNext: function() {
+        checkPowerAndSwitch.init()
+    },
+    init: function () {
+        this.vipRenewReminder()
+    },
+    initDOM: function () {
+        this.insertHTMLToPage()
+        this.insertStyleSheet()
+        this.bindEvents()
+    },
+    insertHTMLToPage: function() {
+        var dom = $(checkVipExpireDialogTemplate)
+        $('body').append(dom)
+        dom.modal('show')
+        this.$modal = dom
+    },
+    insertStyleSheet: function() {
+        var stylesheet = $(checkVipExpireStyle)
+        $('head').append(stylesheet)
+    },
+    bindEvents: function() {
+        var _this = this
+        this.$modal.next('.modal-backdrop').on('click', function() {
+            _this.onDialogClose()
+        })
+        this.$modal.find('.confirm-button').on('click', function() {
+            _this.onClickConfirm()
+        })
+        this.$modal.find('.dialog-close').on('click', function() {
+            _this.onDialogClose()
+        })
+    },
+    showDialog(f) {
+        if (f) {
+            this.$modal.modal('show')
+        } else {
+            this.$modal.modal('hide')
+        }
+    },
+    onDialogClose: function() {
+        this.vipRenewReminder(true)
+        this.showDialog(false)
+        this.showNext()
+    },
+    onClickConfirm: function() {
+        this.rechargeNow()
+    },
+    renderDialogContentText: function() {
+        if (!this.$modal) return
+        var titleText = this.calcDialogTitleText()
+        this.$modal.find('.check-vip-expire-header').html(titleText)
+        var activityText = this.calcDialogActivityTipText()
+        if (activityText) {
+            this.$modal.find('.activity-tip').html(activityText).show()
+        } else {
+            this.$modal.find('.text-container').addClass('expire-text-center')
+        }
+    },
+    calcDialogTitleText: function() {
+        var endDays = this.pInfo.endDays
+        var t = endDays
+        var arr = []
+        if (t <= 1) {
+            arr = [
+                '您的超级订阅将于',
+                '<strong class="time"> 今天 </strong>',
+                '到期'
+            ]
+        } else {
+            arr = [
+                '您的超级订阅还有',
+                '<strong class="time"> '+t+'天 </strong>',
+                '到期'
+            ]
+        }
+        return arr.join('')
+    },
+    calcDialogActivityTipText: function() {
+        var activityInfo = this.pInfo.activityInfo || {}
+        var activity = activityInfo.activity
+        var arr = []
+        if ($.isArray(activity) && activity.length >= 1) {
+            var activity1 = activity[0]
+            var discount = activity1.discount
+            if ($.isArray(discount) && discount.length >= 1) {
+                arr.push('限时活动:')
+                var discount1 = discount[0]
+                // type 0满减、1折扣券、2满赠、3促销、4限时折扣、5限时减免
+                // type  035满减  14满折  2满赠
+                var lotteryType = discount1.type
+                if (lotteryType === 0 || lotteryType === 3 || lotteryType === 5) {
+                    // 满减:续费最高立减1999元(变量,小数不展示,不四舍五入)
+                    var reduce = discount1.reduce
+                    var text = '续费最高立减'+reduce+'元'
+                    arr.push(text)
+                } else if (lotteryType === 1 || lotteryType === 4) {
+                    // 满折:续费1年(变量)立享6折(变量)优惠
+                    var zhe = discount1.discount * 10
+                    var text = '续费'+activityInfo.info+'立享'+zhe+'折优惠'
+                    arr.push(text)
+                } else if (lotteryType === 2) {
+                    // 满赠:现在续费1年(变量)再送1年(注“12个月”按照1年展示)
+                    // timeType 时间类型:1/天、2/月,3/年
+                    var zengTime = discount1.time
+                    var zengTimeType = discount1.timeType
+                    var timeTypeMap = {
+                        1: '天',
+                        2: '个月',
+                        3: '年'
+                    }
+                    var suffixText = timeTypeMap[zengTimeType]
+                    var zeng = zengTime + suffixText
+                    if (zeng === '12个月') {
+                        zeng = '1年'
+                    }
+                    var text = '现在续费'+activityInfo.info+'再送'+zeng
+                    arr.push(text)
+                } else {
+                    arr = []
+                }
+            }
+        }
+        return arr.join('')
+    },
+    vipRenewReminder: function(clear) {
+        var _this = this
+        var payload = {
+            clearRedis: clear ? true : undefined
+        }
+        $.ajax({
+            url: '/subscribepay/vipsubscribe/vipRenewReminder',
+            type: 'POST',
+            data: payload,
+            success: function(res) {
+                if (res && res.data && res.data.endDays !== undefined) {
+                    _this.pInfo = res.data
+                    if (_this.pInfo.endDays >= 0) {
+                        _this.initDOM()
+                        _this.renderDialogContentText()
+                        _this.showDialog(true)
+                    }
+                } else {
+                    if (!clear) {
+                        _this.showNext()
+                    }
+                }
+            },
+            error: function() {
+                if (!clear) {
+                    _this.showNext()
+                }
+            }
+        })
+    },
+    rechargeNow: function() {
+        this.closeDialog()
+        setTimeout(() => {
+          window.open('/swordfish/page_big_pc/free/svip/buy?type=renew')
+        }, 50)
+    }
+};
+
 $(function() {
-    checkPowerAndSwitch.init();
+    checkVipExpireDialog.init();
+    // checkPowerAndSwitch.init();
 })
 
 

+ 3 - 0
src/web/templates/common/include-footer.html

@@ -32,6 +32,9 @@
 {{include "/common/baiducc.html"}}
 <!--E-百度统计-->
 <script>
+  $(function(){
+    $('.qr_box img[data-share-img]').attr('src', '/front/share/404')
+  })
   $('a').each(function () {
     $(this).attr('target', '_top')
   })