|
@@ -77,23 +77,23 @@ namespace molilian.api.Controllers
|
|
|
var channel = form.Read("c", string.Empty);
|
|
var channel = form.Read("c", string.Empty);
|
|
|
var ip = form.Read("ip", string.Empty);
|
|
var ip = form.Read("ip", string.Empty);
|
|
|
var oaid = form.Read("oaid", string.Empty);
|
|
var oaid = form.Read("oaid", string.Empty);
|
|
|
-// var count = form.Read<int>("i", 1);
|
|
|
|
|
-
|
|
|
|
|
-//#if DEBUG
|
|
|
|
|
-// ActionResult result = null;
|
|
|
|
|
-// for (var i = 0; i < count; i++)
|
|
|
|
|
-// {
|
|
|
|
|
-// result = await UnionParseCore.UnionParseAsync(content, channel, ip, oaid);
|
|
|
|
|
-// }
|
|
|
|
|
-// if (result != null) return result;
|
|
|
|
|
-// return new APIResult(new
|
|
|
|
|
-// {
|
|
|
|
|
-// success = true,
|
|
|
|
|
-// message = "ok"
|
|
|
|
|
-// });
|
|
|
|
|
-//#else
|
|
|
|
|
|
|
+ // var count = form.Read<int>("i", 1);
|
|
|
|
|
+
|
|
|
|
|
+ //#if DEBUG
|
|
|
|
|
+ // ActionResult result = null;
|
|
|
|
|
+ // for (var i = 0; i < count; i++)
|
|
|
|
|
+ // {
|
|
|
|
|
+ // result = await UnionParseCore.UnionParseAsync(content, channel, ip, oaid);
|
|
|
|
|
+ // }
|
|
|
|
|
+ // if (result != null) return result;
|
|
|
|
|
+ // return new APIResult(new
|
|
|
|
|
+ // {
|
|
|
|
|
+ // success = true,
|
|
|
|
|
+ // message = "ok"
|
|
|
|
|
+ // });
|
|
|
|
|
+ //#else
|
|
|
return await UnionParseCore.UnionParseAsync(content, channel, ip, oaid);
|
|
return await UnionParseCore.UnionParseAsync(content, channel, ip, oaid);
|
|
|
-//#endif
|
|
|
|
|
|
|
+ //#endif
|
|
|
}
|
|
}
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
/// 第三方调用
|
|
/// 第三方调用
|
|
@@ -495,5 +495,70 @@ namespace molilian.api.Controllers
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ [HttpGet]
|
|
|
|
|
+ public async Task<ActionResult> dplist([FromQuery] string a = "", [FromQuery] int t = 0, [FromQuery] string sign = "")
|
|
|
|
|
+ {
|
|
|
|
|
+ //验证签名
|
|
|
|
|
+ if (string.IsNullOrEmpty(a) || string.IsNullOrEmpty(sign))
|
|
|
|
|
+ {
|
|
|
|
|
+ return new APIResult(new { success = false, message = "验证错误" }, APIResultCodeEnum.Unauthorized);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ DateTime time1 = t.Convert2Datetime();
|
|
|
|
|
+ if (time1 < DateTime.Now.AddMinutes(-10))
|
|
|
|
|
+ {
|
|
|
|
|
+ return new APIResult(new { success = false, message = "验证错误2" }, APIResultCodeEnum.Unauthorized);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ var account = ApiAccountCore.GetOne(a);
|
|
|
|
|
+ if (account == null)
|
|
|
|
|
+ {
|
|
|
|
|
+ return new APIResult(new { success = false, message = "验证错误3" }, APIResultCodeEnum.Unauthorized);
|
|
|
|
|
+ }
|
|
|
|
|
+ string app_sign = $"{account.api_secret}@{t}".MD5();
|
|
|
|
|
+ if (sign != app_sign)
|
|
|
|
|
+ {
|
|
|
|
|
+ return new APIResult(new { success = false, message = "验证错误4" }, APIResultCodeEnum.Unauthorized);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ List<object> list = [];
|
|
|
|
|
+
|
|
|
|
|
+ Random rand = new Random();
|
|
|
|
|
+ if (rand.Next(0, 10) < 2)
|
|
|
|
|
+ {
|
|
|
|
|
+ list =
|
|
|
|
|
+ [
|
|
|
|
|
+ new
|
|
|
|
|
+ {
|
|
|
|
|
+ url = "tbopen://m.taobao.com/tbopen/index.html?action=ali.open.nav&module=h5&h5Url=https%3A%2F%2Fs.click.taobao.com%2FgRtQClt&backURL=__back_url__",
|
|
|
|
|
+ count = 1,
|
|
|
|
|
+ },
|
|
|
|
|
+ new
|
|
|
|
|
+ {
|
|
|
|
|
+ url = "tbopen://m.taobao.com/tbopen/index.html?action=ali.open.nav&module=h5&h5Url=https%3A%2F%2Fs.click.taobao.com%2FDZLLYkt&backURL=__back_url__",
|
|
|
|
|
+ count = 1,
|
|
|
|
|
+ },
|
|
|
|
|
+ new
|
|
|
|
|
+ {
|
|
|
|
|
+ url = "tbopen://m.taobao.com/tbopen/index.html?action=ali.open.nav&module=h5&h5Url=https%3A%2F%2Fs.click.taobao.com%2FtLVLYkt&backURL=__back_url__",
|
|
|
|
|
+ count = 1,
|
|
|
|
|
+ },
|
|
|
|
|
+ ];
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return new APIResult(new
|
|
|
|
|
+ {
|
|
|
|
|
+ success = true,
|
|
|
|
|
+ message = "ok",
|
|
|
|
|
+ data = list,
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|