Browse Source

增加比价端

master
feng 3 years ago
parent
commit
5708de2c21
  1. 4
      src/Coldairarrow.Api/Controllers/HuiYan/pricetasklogController.cs
  2. 4
      src/Coldairarrow.Business/HuiYan/pricetasklogBusiness.cs
  3. 2
      src/Coldairarrow.IBusiness/HuiYan/IpricetasklogBusiness.cs
  4. 2
      客户端/齐越慧眼/齐越慧眼/ApiHelper.cs
  5. 1
      客户端/齐越慧眼/齐越慧眼/vuepage/client/src/api/http.js
  6. 66
      客户端/齐越慧眼/齐越慧眼/vuepage/client/src/views/pricetask/Index.vue
  7. 2
      客户端/齐越慧眼/齐越慧眼/vuepage/dist/js/app.js
  8. 2
      客户端/齐越慧眼/齐越慧眼/vuepage/dist/js/app.js.map

4
src/Coldairarrow.Api/Controllers/HuiYan/pricetasklogController.cs

@ -90,9 +90,9 @@ namespace Coldairarrow.Api.Controllers.HuiYan
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
public PageResult<TeamitemDto> GetItems(PageInput<ConditionDTO> input)
public PageResult<TeamitemDto> GetItems(PageInput<ConditionDTO> input, string keyWord)
{
return _pricetasklogBus.GetItems(input);
return _pricetasklogBus.GetItems(input, keyWord);
}
/// <summary>

4
src/Coldairarrow.Business/HuiYan/pricetasklogBusiness.cs

@ -79,7 +79,7 @@ namespace Coldairarrow.Business.HuiYan
}
public PageResult<TeamitemDto> GetItems(PageInput<ConditionDTO> input)
public PageResult<TeamitemDto> GetItems(PageInput<ConditionDTO> input,string keyWord)
{
Expression<Func<teamitems, items, pricetasklog, TeamitemDto>> select = (a, b, c) => new TeamitemDto
{
@ -110,6 +110,8 @@ namespace Coldairarrow.Business.HuiYan
where = where.And(c => c.PriceTaskState == state);
where = where.AndIf(!string.IsNullOrEmpty(keyWord), d => d.Title.Contains(keyWord));
var list = q.Where(where).GetPageResultAsync(input).Result;
return list;

2
src/Coldairarrow.IBusiness/HuiYan/IpricetasklogBusiness.cs

@ -14,7 +14,7 @@ namespace Coldairarrow.Business.HuiYan
Task UpdateDataAsync(pricetasklog data);
Task DeleteDataAsync(List<string> ids);
PageResult<TeamitemDto> GetItems(PageInput<ConditionDTO> input);
PageResult<TeamitemDto> GetItems(PageInput<ConditionDTO> input,string keyWord);
AjaxResult AddTask(string teamItemId);
AjaxResult GetTaskCount();

2
客户端/齐越慧眼/齐越慧眼/ApiHelper.cs

@ -27,6 +27,8 @@ namespace 齐越慧眼
{
#if DEBUG
return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNTAwNjY3OTAyNDU2NTAwMjI0IiwidGVhbUlkIjoiMTQ2MzAyOTM1NTEwNDk2NDYwOCIsImV4cCI6MTY4MzM0NDg3Nn0.6AsD6DK9Or05w8HPhjb9tQY8RJAT4zo4ouH9sasl_Rk";
return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNDM5OTA3NDY1MDMzNDIwODAwIiwidGVhbUlkIjoiMTQzNjI4ODUwMDIzNTI0MzUyMCIsImV4cCI6MTY3MTAwOTkyM30.p3yLjbeUilDZxkfRv4GaCvIYJ_jFoe_8Sw8hY18swdA";
#endif

1
客户端/齐越慧眼/齐越慧眼/vuepage/client/src/api/http.js

@ -11,6 +11,7 @@ let $httpVue = null, currentToken = '';
if (process.env.NODE_ENV == 'development') {
axios.defaults.baseURL = 'http://hyapi.qiyue666.com/';
currentToken='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNDM5OTA3NDY1MDMzNDIwODAwIiwidGVhbUlkIjoiMTQzNjI4ODUwMDIzNTI0MzUyMCIsImV4cCI6MTY3MTAwOTkyM30.p3yLjbeUilDZxkfRv4GaCvIYJ_jFoe_8Sw8hY18swdA'
currentToken='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNTAwNjY3OTAyNDU2NTAwMjI0IiwidGVhbUlkIjoiMTQ2MzAyOTM1NTEwNDk2NDYwOCIsImV4cCI6MTY4MzM0NDg3Nn0.6AsD6DK9Or05w8HPhjb9tQY8RJAT4zo4ouH9sasl_Rk'
}
else if (process.env.NODE_ENV == 'production') {
axios.defaults.baseURL = 'http://hyapi.qiyue666.com/';

66
客户端/齐越慧眼/齐越慧眼/vuepage/client/src/views/pricetask/Index.vue

@ -23,6 +23,21 @@
</a-tab-pane>
</a-tabs>
<a-row :gutter="10" style="margin-bottom:10px">
<a-col :span="5">
<a-input
v-model="catKeyWord"
placeholder="搜索品类词"
>
</a-input>
</a-col>
<a-col :span="5">
<a-button @click="searchDatas">搜索</a-button>
</a-col>
</a-row>
<div class="border">
<a-row>
<a-col :span="4">
@ -278,8 +293,12 @@
"
>
<a target="_black" :href="item.RivalGoodsId">
<img src="/jp.png" width="200" height="165"
/></a>
<img v-if="item.RivalImg" :src="item.RivalImg" width="200" height="165"/>
<img v-else src="/jp.png" width="200" height="165"/>
</a>
<a-row>
<a-col :span="12" style="text-align: left"
>¥{{ item.RivalPrice }}</a-col
@ -380,9 +399,11 @@
</a-row>
</a-col>
<a-col :span="4">
<a class="borderNoTop itemtitle" :title="item.RivalTitle">{{
<a v-if="item.RivalTitle&&!item.isEdit" class="borderNoTop itemtitle" :title="item.RivalTitle">{{
item.RivalTitle
}}</a>
<a-button v-else-if="item.isEdit" @click="openItemInfoWeb(item)">自动获取对标信息</a-button>
</a-col>
</a-row>
</a-col>
@ -420,12 +441,14 @@ export default {
selectedRowKeys: [],
currentTab: "0",
lastEditData: undefined,
catKeyWord:undefined,
extFormList: ["以图搜款"],
stateList: [],
platformList: [
{ id: 0, name: "淘宝" },
{ id: 1, name: "京东" },
{ id: 2, name: "1688" },
{ id: 3, name: "拼多多" },
],
};
},
@ -478,14 +501,49 @@ export default {
this.currentTab = e;
this.pagination.current = 1;
},
searchDatas(){
this.pagination.current = 1;
this.getDatas(this.currentTab);
},
changePage(page, pageSize) {
this.pagination.current = page;
this.getDatas(this.currentTab);
},
openItemInfoWeb(item){
if(item==undefined||item.RivalGoodsId==undefined||item.RivalGoodsId==null)
{
this.$message.error("请先输入竞品链接!");
return
}
hyCoreModel.getItemInfoByUrl(item.RivalGoodsId).then(res=>{
var result= JSON.parse(res)
if(result.success)
{
var data=result.data
item.RivalTitle=data.title
item.RivalPrice=data.price
item.RivalPLCount=data.commont
item.RivalImg=data.img
console.log(item,'获取的商品信息')
this.$message.success("获取成功");
}else{
this.$message.error(result.msg);
}
})
},
getDatas(type) {
var that = this;
var url='/HuiYan/pricetasklog/GetItems'
if(this.catKeyWord&&this.catKeyWord.length>0)
{
url="/HuiYan/pricetasklog/GetItems?keyword="+this.catKeyWord
}
this.http
.post("/HuiYan/pricetasklog/GetItems", {
.post(url, {
PageIndex: this.pagination.current,
PageRows: this.pagination.pageSize,
SortField: this.sorter.field || "Id",

2
客户端/齐越慧眼/齐越慧眼/vuepage/dist/js/app.js

File diff suppressed because one or more lines are too long

2
客户端/齐越慧眼/齐越慧眼/vuepage/dist/js/app.js.map

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save