implement dialog general fuction

Signed-off-by: Wangbaoyun <wangbaoyun@hhcn.com>