更新
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
<el-alert
|
||||||
|
title="采集一个商品添加进草稿箱,将消耗20金币"
|
||||||
|
type="success"
|
||||||
|
:closable="false">
|
||||||
|
</el-alert>
|
||||||
<el-form class="ai-form" :model="form" label-width="140px" ref="form">
|
<el-form class="ai-form" :model="form" label-width="140px" ref="form">
|
||||||
<el-form-item label="来源:" style="width: 100%;" prop="type" :rules="[{ required: true, message: '请选择来源', trigger: 'blur' }]">
|
<el-form-item label="来源:" style="width: 100%;" prop="type" :rules="[{ required: true, message: '请选择来源', trigger: 'blur' }]">
|
||||||
<el-radio-group v-model="form.type" size="medium">
|
<el-radio-group v-model="form.type" size="medium">
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
<i class="el-icon-magic-stick"></i>
|
<i class="el-icon-magic-stick"></i>
|
||||||
<span slot="title">选品采集</span>
|
<span slot="title">选品采集</span>
|
||||||
</template>
|
</template>
|
||||||
<el-menu-item index="/niubiCopy">智能复制</el-menu-item>
|
<el-menu-item index="/niubiCopy">商品采集</el-menu-item>
|
||||||
<el-menu-item index="/storeTrack">店铺跟踪</el-menu-item>
|
<el-menu-item index="/storeTrack">店铺跟踪</el-menu-item>
|
||||||
<el-menu-item index="/keywordTrack">关键字跟踪</el-menu-item>
|
<el-menu-item index="/keywordTrack">关键字跟踪</el-menu-item>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ import AiCopyFromTemu from "@/components/AiCopyFromTemu.vue";
|
|||||||
{ slot: 'url', label: '商品地址', align: 'left' },
|
{ slot: 'url', label: '商品地址', align: 'left' },
|
||||||
{ prop: 'type', label: '来源', width: '100px', align: 'left',format: v => this.$dict.getLabel('copy_from', v), },
|
{ prop: 'type', label: '来源', width: '100px', align: 'left',format: v => this.$dict.getLabel('copy_from', v), },
|
||||||
{ prop: 'mallName', label: '店铺名称', width: '200px', align: 'left'},
|
{ prop: 'mallName', label: '店铺名称', width: '200px', align: 'left'},
|
||||||
{ prop: 'createTime', label: '复制时间', width: '180px', fixed: 'right'}
|
{ prop: 'createTime', label: '复制时间', width: '180px'}
|
||||||
],
|
],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
|
|||||||
@@ -20,6 +20,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<el-pagination
|
||||||
|
layout="prev, pager, next"
|
||||||
|
style="position: absolute; bottom: 0px; right: 40px;"
|
||||||
|
:total="total"
|
||||||
|
:page-size.sync="search.size"
|
||||||
|
:current-page.sync="search.current"
|
||||||
|
@current-change="getList">
|
||||||
|
<div class="paginationPre-total">共<label class="color-primary">{{ total }}</label>条记录
|
||||||
|
</div>
|
||||||
|
</el-pagination>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</ai-list>
|
</ai-list>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<ai-list class="list">
|
<ai-list class="list" v-loading="isLoading" element-loading-text="正在采集中……" element-loading-spinner="el-icon-loading">
|
||||||
<ai-title
|
<ai-title
|
||||||
slot="title"
|
slot="title"
|
||||||
title="关键字跟踪"
|
title="关键字跟踪"
|
||||||
@@ -45,6 +45,11 @@
|
|||||||
width="790px"
|
width="790px"
|
||||||
customFooter
|
customFooter
|
||||||
@close="isDlgShow = false">
|
@close="isDlgShow = false">
|
||||||
|
<el-alert
|
||||||
|
title="添加一个关键字跟踪,将消耗200金币"
|
||||||
|
type="success"
|
||||||
|
:closable="false">
|
||||||
|
</el-alert>
|
||||||
<el-form class="ai-form" :model="form" label-width="120px" ref="form">
|
<el-form class="ai-form" :model="form" label-width="120px" ref="form">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
prop="content"
|
prop="content"
|
||||||
@@ -52,6 +57,12 @@
|
|||||||
:rules="[{ required: true, message: '请输入关键字', trigger: 'blur' }]">
|
:rules="[{ required: true, message: '请输入关键字', trigger: 'blur' }]">
|
||||||
<el-input placeholder="请输入关键字" v-model="form.content"></el-input>
|
<el-input placeholder="请输入关键字" v-model="form.content"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
prop="orderType"
|
||||||
|
label="排序方式"
|
||||||
|
:rules="[{ required: true, message: '请选择排序方式', trigger: 'blur' }]">
|
||||||
|
<ai-select :selectList="$dict.getDict('monitor_order_type')" v-model="form.orderType"></ai-select>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div class="dialog-footer" slot="footer">
|
<div class="dialog-footer" slot="footer">
|
||||||
<el-button @click="isDlgShow = false">取 消</el-button>
|
<el-button @click="isDlgShow = false">取 消</el-button>
|
||||||
@@ -76,6 +87,7 @@ import {sendTemuAPIMessage} from '@/api/chromeApi'
|
|||||||
},
|
},
|
||||||
colConfigs: [
|
colConfigs: [
|
||||||
{ prop: 'content', label: '关键字', align: 'left' },
|
{ prop: 'content', label: '关键字', align: 'left' },
|
||||||
|
{ prop: 'orderType', label: '排序方式', align: 'left', format: v => this.$dict.getLabel('monitor_order_type', v) },
|
||||||
{ prop: 'lastUpdateTime', label: '最后一次更新时间', align: 'left' },
|
{ prop: 'lastUpdateTime', label: '最后一次更新时间', align: 'left' },
|
||||||
{ prop: 'status', label: '状态', align: 'left', format: v => this.$dict.getLabel('monitor_status', v), },
|
{ prop: 'status', label: '状态', align: 'left', format: v => this.$dict.getLabel('monitor_status', v), },
|
||||||
{ prop: 'expireTime', label: '失效时间', align: 'left' },
|
{ prop: 'expireTime', label: '失效时间', align: 'left' },
|
||||||
@@ -85,18 +97,21 @@ import {sendTemuAPIMessage} from '@/api/chromeApi'
|
|||||||
total: 0,
|
total: 0,
|
||||||
|
|
||||||
form: {
|
form: {
|
||||||
content: ''
|
content: '',
|
||||||
|
orderType: '0:1'
|
||||||
},
|
},
|
||||||
|
|
||||||
isDlgShow: false,
|
isDlgShow: false,
|
||||||
detailsVo: {},
|
detailsVo: {},
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 120
|
pageSize: 120,
|
||||||
|
|
||||||
|
isLoading: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
created () {
|
created () {
|
||||||
this.$dict.load('monitor_status');
|
this.$dict.load('monitor_status', 'monitor_order_type');
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -116,7 +131,7 @@ import {sendTemuAPIMessage} from '@/api/chromeApi'
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http.post('/api/monitor/check',null, {params: {type: 0}}).then(res => {
|
this.$http.post('/api/monitor/check',null, {params: {type: 0}}).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.$http.post(`/api/monitor/add`, {content: this.form.content, type: this.search.type}).then(res => {
|
this.$http.post(`/api/monitor/add`, {content: this.form.content, orderType: this.form.orderType, type: this.search.type}).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.$message.success('添加成功!')
|
this.$message.success('添加成功!')
|
||||||
this.$store.dispatch('getUserInfo')
|
this.$store.dispatch('getUserInfo')
|
||||||
@@ -181,6 +196,7 @@ import {sendTemuAPIMessage} from '@/api/chromeApi'
|
|||||||
this.detailsVo.monitorId = row.id
|
this.detailsVo.monitorId = row.id
|
||||||
this.detailsVo.details = []
|
this.detailsVo.details = []
|
||||||
this.pageNo = 1
|
this.pageNo = 1
|
||||||
|
this.isLoading = true
|
||||||
|
|
||||||
this.beginCollect(row)
|
this.beginCollect(row)
|
||||||
},
|
},
|
||||||
@@ -194,12 +210,12 @@ import {sendTemuAPIMessage} from '@/api/chromeApi'
|
|||||||
"offset": (this.pageNo-1) * this.pageSize,
|
"offset": (this.pageNo-1) * this.pageSize,
|
||||||
"pageSize": 120,
|
"pageSize": 120,
|
||||||
"query": row.content,
|
"query": row.content,
|
||||||
"filterItems": "0:1",
|
"filterItems": row.orderType,
|
||||||
"searchMethod": "suggest"
|
"searchMethod": "suggest"
|
||||||
}}).then((res) => {
|
}}).then((res) => {
|
||||||
|
this.isLoading = false
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
res.result.data.goods_list.map(item => {
|
res.result.data.goods_list.map(item => {
|
||||||
console.log(item.sales_tip_text[0])
|
|
||||||
let total = 0
|
let total = 0
|
||||||
if (item.sales_tip_text[0]) {
|
if (item.sales_tip_text[0]) {
|
||||||
total = item.sales_tip_text[0]
|
total = item.sales_tip_text[0]
|
||||||
@@ -230,6 +246,8 @@ import {sendTemuAPIMessage} from '@/api/chromeApi'
|
|||||||
this.getList()
|
this.getList()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.error("采集失败,请检查网络情况")
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<el-pagination
|
||||||
|
layout="prev, pager, next"
|
||||||
|
style="position: absolute; bottom: 0px; right: 40px;"
|
||||||
|
:total="total"
|
||||||
|
:page-size.sync="search.size"
|
||||||
|
:current-page.sync="search.current"
|
||||||
|
@current-change="getList">
|
||||||
|
</el-pagination>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</ai-list>
|
</ai-list>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<ai-list class="list">
|
<ai-list class="list" v-loading="isLoading" element-loading-text="正在采集中……" element-loading-spinner="el-icon-loading">
|
||||||
<ai-title
|
<ai-title
|
||||||
slot="title"
|
slot="title"
|
||||||
title="店铺跟踪"
|
title="店铺跟踪"
|
||||||
@@ -45,6 +45,11 @@
|
|||||||
width="790px"
|
width="790px"
|
||||||
customFooter
|
customFooter
|
||||||
@close="isDlgShow = false">
|
@close="isDlgShow = false">
|
||||||
|
<el-alert
|
||||||
|
title="添加一个店铺跟踪,将消耗300金币"
|
||||||
|
type="success"
|
||||||
|
:closable="false">
|
||||||
|
</el-alert>
|
||||||
<el-form class="ai-form" :model="form" label-width="120px" ref="form">
|
<el-form class="ai-form" :model="form" label-width="120px" ref="form">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
prop="mallId"
|
prop="mallId"
|
||||||
@@ -91,7 +96,9 @@ import {sendTemuAPIMessage} from '@/api/chromeApi'
|
|||||||
isDlgShow: false,
|
isDlgShow: false,
|
||||||
detailsVo: {},
|
detailsVo: {},
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 120
|
pageSize: 120,
|
||||||
|
|
||||||
|
isLoading: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -182,6 +189,8 @@ import {sendTemuAPIMessage} from '@/api/chromeApi'
|
|||||||
this.detailsVo.details = []
|
this.detailsVo.details = []
|
||||||
this.pageNo = 1
|
this.pageNo = 1
|
||||||
|
|
||||||
|
this.isLoading = true
|
||||||
|
|
||||||
this.beginCollect(row)
|
this.beginCollect(row)
|
||||||
},
|
},
|
||||||
beginCollect(row) {
|
beginCollect(row) {
|
||||||
@@ -196,7 +205,9 @@ import {sendTemuAPIMessage} from '@/api/chromeApi'
|
|||||||
}}).then((res) => {
|
}}).then((res) => {
|
||||||
if (res.errorCode == 1000000) {
|
if (res.errorCode == 1000000) {
|
||||||
res.result.data.goods_list.map(item => {
|
res.result.data.goods_list.map(item => {
|
||||||
let total = item.sales_tip_text[0]
|
let total = 0
|
||||||
|
if (item.sales_tip_text[0]) {
|
||||||
|
total = item.sales_tip_text[0]
|
||||||
total = total.replace('+', '')
|
total = total.replace('+', '')
|
||||||
if (total.indexOf('K') != -1) {
|
if (total.indexOf('K') != -1) {
|
||||||
total = total.replace('K', '')
|
total = total.replace('K', '')
|
||||||
@@ -205,6 +216,7 @@ import {sendTemuAPIMessage} from '@/api/chromeApi'
|
|||||||
total = total.replace('M', '')
|
total = total.replace('M', '')
|
||||||
total = total * 1000000
|
total = total * 1000000
|
||||||
}
|
}
|
||||||
|
}
|
||||||
this.detailsVo.details.push({
|
this.detailsVo.details.push({
|
||||||
url: item.link_url,
|
url: item.link_url,
|
||||||
price: item.price_info.price_schema,
|
price: item.price_info.price_schema,
|
||||||
@@ -219,6 +231,7 @@ import {sendTemuAPIMessage} from '@/api/chromeApi'
|
|||||||
this.pageNo = this.pageNo + 1
|
this.pageNo = this.pageNo + 1
|
||||||
this.beginCollect(row)
|
this.beginCollect(row)
|
||||||
} else {
|
} else {
|
||||||
|
this.isLoading = false
|
||||||
this.$http.post('/api/monitorDetail/addDetails',this.detailsVo
|
this.$http.post('/api/monitorDetail/addDetails',this.detailsVo
|
||||||
).then(res => {
|
).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
@@ -227,6 +240,9 @@ import {sendTemuAPIMessage} from '@/api/chromeApi'
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.isLoading = false
|
||||||
|
this.$message.error("采集失败,请检查网络情况")
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user