|  | @@ -605,43 +605,8 @@ class CreateAd:
 | 
	
		
			
				|  |  |          # 特殊情况下,上传本地视频
 | 
	
		
			
				|  |  |          pass
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    def get_layout(self):
 | 
	
		
			
				|  |  | +    def get_layout(self,layout):
 | 
	
		
			
				|  |  |          # TODO:设置重试机制,然后错误后试错几次,查看是否成功
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        # 得到编排
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        layout = {-2: {'bc_color': True},
 | 
	
		
			
				|  |  | -                  -1: {'page': '/usr/share/wallpapers/deepin/Beach_by_Samuel_Scrimshaw.jpg'},
 | 
	
		
			
				|  |  | -                  0: {'title': '这是标题'},
 | 
	
		
			
				|  |  | -                  1: {'content': '这是文本'},
 | 
	
		
			
				|  |  | -                  2: {'follow_button': 1},
 | 
	
		
			
				|  |  | -                  3: {'title': '这是标题'},
 | 
	
		
			
				|  |  | -                  4: {'content': '这是文本'},
 | 
	
		
			
				|  |  | -                  5: {'page': '/usr/share/wallpapers/deepin/Beach_by_Samuel_Scrimshaw.jpg'},
 | 
	
		
			
				|  |  | -                  6: {'page': '/usr/share/wallpapers/deepin/Beach_by_Samuel_Scrimshaw.jpg'},
 | 
	
		
			
				|  |  | -                  7: {'follow_button': 2},
 | 
	
		
			
				|  |  | -                  8: {'follow_button': 3},
 | 
	
		
			
				|  |  | -                  }
 | 
	
		
			
				|  |  | -        # TODO:测试,多图,测试,图文表
 | 
	
		
			
				|  |  | -        layout = {-1: {'multi_page': ['/usr/share/wallpapers/deepin/Beach_by_Samuel_Scrimshaw.jpg',
 | 
	
		
			
				|  |  | -                                      '/usr/share/wallpapers/deepin/Sunset_of_the_Lake_Nam_by_Wang_Jinyu.jpg',
 | 
	
		
			
				|  |  | -                                      '/usr/share/wallpapers/deepin/The_Gongga_Mountain_by_wangjinyu.jpg',
 | 
	
		
			
				|  |  | -                                      '/usr/share/wallpapers/deepin/Reflection_of_the_Kanas_Lake_by_Wang_Jinyu.jpg']},
 | 
	
		
			
				|  |  | -                  0: {'page': '/usr/share/wallpapers/deepin/Beach_by_Samuel_Scrimshaw.jpg'}
 | 
	
		
			
				|  |  | -                  }
 | 
	
		
			
				|  |  | -        layout = {
 | 
	
		
			
				|  |  | -            -2: {'bc_color': True},
 | 
	
		
			
				|  |  | -            -1: {'movie': '/home/cxyu/Downloads/老奶奶.mp4'},
 | 
	
		
			
				|  |  | -            0: {'title': '第一章'},
 | 
	
		
			
				|  |  | -            1: {'content': 'asdfasdf'},
 | 
	
		
			
				|  |  | -            2: {'follow_button': 1},
 | 
	
		
			
				|  |  | -            3: {'page': '/usr/share/wallpapers/deepin/Reflection_of_the_Kanas_Lake_by_Wang_Jinyu.jpg'},
 | 
	
		
			
				|  |  | -            4: {'title': '第二章'},
 | 
	
		
			
				|  |  | -            5: {'content': 'asdfadsfasdfasd'},
 | 
	
		
			
				|  |  | -            6: {'follow_button': 2},
 | 
	
		
			
				|  |  | -            7: {'follow_button': 3},
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |          # self.send_file_alone(layout)
 | 
	
		
			
				|  |  |          self.set_head_assemb(layout[-1])
 | 
	
		
			
				|  |  |          if -2 in layout.keys():
 | 
	
	
		
			
				|  | @@ -675,5 +640,3 @@ if __name__ == '__main__':
 | 
	
		
			
				|  |  |          format="%(asctime)s - %(levelname)s %(filename)s %(funcName)s %(lineno)s - %(message)s"
 | 
	
		
			
				|  |  |      )
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    create_ad = CreateAd()
 | 
	
		
			
				|  |  | -    create_ad.get_layout()
 |