private async void uiButton1_Click_1(object sender, EventArgs e)
{
string goodId = "";
UIInputDialog.InputStringDialog(ref goodId, true, "请输入采集ID");
if (string.IsNullOrWhiteSpace(goodId))
{
ShowErrorNotifier("请输入采集ID再操作");
return;
}
var res = await PddApi.GetGoodsComments(goodId,"");
if (res.StatusCode != System.Net.HttpStatusCode.OK)
{
ShowErrorNotifier("采集失败");
return;
}
this.comment.Text = "";
string path = AppDomain.CurrentDomain.BaseDirectory + "订单好评";
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
path = AppDomain.CurrentDomain.BaseDirectory + "订单好评\\" + goodId;
if (!Directory.Exists(path))
当用户点击UIButton1时,程序会弹窗提示输入采集ID。如果未输入,则显示错误通知。否则,调用PddApi获取商品评论,若请求失败则显示错误。评论内容将保存到‘订单好评’目录下,按商品ID创建子目录存储。
154

被折叠的 条评论
为什么被折叠?



