The function If is not well suited for symbolic computation. I would use something like Max instead. I doubt that those integrals can be computed symbolically. You can compute them numerically in a reasonable time:
e1[x_, \[Phi]r_] := Exp[I (x + \[Phi]r)];
e2[x_, \[Phi]p_, \[CapitalDelta]e_] := (1 + \[CapitalDelta]e) Exp[
I (x + \[Phi]p)];
Int = (e1[x, \[Phi]r] +
e2[x, \[Phi]p, de]) Conjugate[(e1[x, \[Phi]r] +
e2[x, \[Phi]p, de])];
res1 = ExpToTrig[Simplify[Int]];
res2 = Simplify[res1 /. x -> 0];
\[Phi][t_, \[Phi]0_, n_] = Sqrt[Max[0, 1 - (Abs[t])^n]];
g[t_, de_, \[Phi]r_, a_, dt_,
n_] = (res2 /. \[Phi]p -> \[Phi][a (t + dt), \[Phi]0, n]);
function[t_Real, w_, de_, \[Phi]r_, a_, dt_, n_] :=
NIntegrate[
g[s + t, de, \[Phi]r, a, dt, n]*Exp[-((s)/w)^2], {s, -w, w}];
Plot[function[t, 1, 0, 0, 1, 0, 2], {t, 0, 1}]