修复云仓 收藏 只绑定主账号
This commit is contained in:
1 parent
6e6ba151da
commit
6b15be41f6
1 file changed
+9
-4
@@ -20,7 +20,7 @@ namespace Work.Services
|
|||||||
{
|
{
|
||||||
if (EnvironmentHelper.IsDevelopment)
|
if (EnvironmentHelper.IsDevelopment)
|
||||||
{
|
{
|
||||||
ServerUrl = "http://localhost:9001";
|
ServerUrl = "http://localhost:14312";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static async Task<PageData<CloudGoods>> GetGoods(GoodsSearchRequest request)
|
public static async Task<PageData<CloudGoods>> GetGoods(GoodsSearchRequest request)
|
||||||
@@ -55,7 +55,7 @@ namespace Work.Services
|
|||||||
/// <exception cref="Exception"></exception>
|
/// <exception cref="Exception"></exception>
|
||||||
public static async Task<PageData<CloudGoods>> SearchFavorites(UserFavoritesGoodsSearchRequest request)
|
public static async Task<PageData<CloudGoods>> SearchFavorites(UserFavoritesGoodsSearchRequest request)
|
||||||
{
|
{
|
||||||
request.UserName = BaseClass.UserName;
|
request.UserName = GetUserName();
|
||||||
var html = await GetHtml.PostJsonAsync(ServerUrl + "/api/CloudGoods/SearchFavorites", request);
|
var html = await GetHtml.PostJsonAsync(ServerUrl + "/api/CloudGoods/SearchFavorites", request);
|
||||||
|
|
||||||
var ret = JsonConvert.DeserializeObject<Result<PageData<CloudGoods>>>(html);
|
var ret = JsonConvert.DeserializeObject<Result<PageData<CloudGoods>>>(html);
|
||||||
@@ -77,7 +77,7 @@ namespace Work.Services
|
|||||||
{
|
{
|
||||||
var html = await GetHtml.PostJsonAsync(ServerUrl + $"/api/CloudGoods/AddFavorite", new
|
var html = await GetHtml.PostJsonAsync(ServerUrl + $"/api/CloudGoods/AddFavorite", new
|
||||||
{
|
{
|
||||||
UserName = BaseClass.UserName,
|
UserName = GetUserName(),
|
||||||
GoodsIds = goodsIds,
|
GoodsIds = goodsIds,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ namespace Work.Services
|
|||||||
{
|
{
|
||||||
var html = await GetHtml.PostJsonAsync(ServerUrl + $"/api/CloudGoods/RemoveFavorites", new
|
var html = await GetHtml.PostJsonAsync(ServerUrl + $"/api/CloudGoods/RemoveFavorites", new
|
||||||
{
|
{
|
||||||
UserName = BaseClass.UserName,
|
UserName = GetUserName(),
|
||||||
GoodsIds = goodsIds,
|
GoodsIds = goodsIds,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -111,6 +111,11 @@ namespace Work.Services
|
|||||||
return ret.Data;
|
return ret.Data;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
public static string GetUserName()
|
||||||
|
{
|
||||||
|
return string.IsNullOrEmpty(BaseClass.ParentUserName) ? BaseClass.UserName : BaseClass.ParentUserName;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 商品搜索请求
|
/// 商品搜索请求
|
||||||
|
|||||||
Reference in new issue
Block a user