예제 #1
0
 def set_repeat_count(self, repeat_count):
     """
     重复执行次数
     :param repeat_count:
     :return:
     """
     if Utils.is_numeric(repeat_count):
         self.data['repeatCount'] = repeat_count
예제 #2
0
    def set_duration(self, duration):
        """
        设置动画执行的时间
        :param duration:
        :return:
        """

        if Utils.is_numeric(duration):
            self.data['duration'] = duration
예제 #3
0
    def set_value(self, value):
        """
        设置切换步长
        :param value:
        :return:
        """

        if Utils.is_numeric(value):
            self.data['value'] = value
예제 #4
0
    def set_index(self, index):
        """
        设置index索引值
        :param index:
        :return:
        """

        if Utils.is_numeric(index):
            self.data['index'] = index
예제 #5
0
    def set_delay_in_milliseconds(self, delay):
        """
        设置延迟时间间隔
        :param delay:
        :return:
        """

        if Utils.is_numeric(delay):
            self.data['delayInMilliseconds'] = delay
예제 #6
0
    def set_duration_in_millisecond(self, duration):
        """
        设置切换间隔
        :param duration:
        :return:
        """

        if Utils.is_numeric(duration):
            self.data['durationInMillisecond'] = duration
예제 #7
0
 def set_amount(self, amount, currency_code=CODE_CNY):
     """
     设置支付金额
     :param amount:
     :param currency_code:
     :return:
     """
     if Utils.is_numeric(amount) and currency_code and isinstance(
             currency_code, str):
         self.data['payload']['chargeBaiduPay']['authorizeAttributes'][
             'authorizationAmount']['amount'] = str(amount)
         self.data['payload']['chargeBaiduPay']['authorizeAttributes'][
             'authorizationAmount']['currencyCode'] = currency_code