如何在6和7每天刷新页面

时间:2015-08-17 13:12:48

标签: javascript jquery

使用jquery和间隔函数无论如何我可以每天在6和7刷新页面,还是我需要使用另一种更好的方法?

1 个答案:

答案 0 :(得分:0)

用于此类自定义要求

你需要这样的东西

class CreatePlan
def self.call(options={})
    plan = Plan.new(options)

    if !plan.valid?
    return plan
end

begin
    Stripe::Plan.create(
                    id: options[:stripe_id],
                    amount: options[:amount],
                    currency: 'eur',
                    interval: options[:interval],
                    name: options[:name],
                    price: options[:price],
                    )
                    rescue Stripe::StripeError => e
                    plan.errors[:base] << e.message
                    return plan
    end

    plan.save

    return plan
end
end

这可能适合你:)

相关问题