An approximate method for solving a class of weakly-singular Volterra integro-differential equations