Commit 6fcea6f4 by liangjianmin

feat: 更新下载模板链接,支持不同环境下的模板下载

parent 6b63c904
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<!--操作区--> <!--操作区-->
<div class="operation-area row"> <div class="operation-area row">
<el-button type="primary" @click="importChange">导入</el-button> <el-button type="primary" @click="importChange">导入</el-button>
<a href="/uploadSku.csv" class="downTemplate">下载模版</a> <a :href="skuHref" class="downTemplate">下载模版</a>
<el-button type="danger" @click="del">删除</el-button> <el-button type="danger" @click="del">删除</el-button>
</div> </div>
<!--列表区--> <!--列表区-->
...@@ -114,6 +114,7 @@ export default { ...@@ -114,6 +114,7 @@ export default {
name: "enter", name: "enter",
data() { data() {
return { return {
skuHref: location.hostname === 'xinlian.ichunt.com' ? '//cloud.liexindev.net/template/芯链SKU上传模板.csv' : 'https://cloud.ichunt.com/template/芯链SKU上传模板.csv',
cp_time_day: localStorage.getItem('cp_time_day') || '', cp_time_day: localStorage.getItem('cp_time_day') || '',
futures_cp_time_day: localStorage.getItem('futures_cp_time_day') || '', futures_cp_time_day: localStorage.getItem('futures_cp_time_day') || '',
uploading: false, uploading: false,
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<div class="operation-area row verCenter bothSide"> <div class="operation-area row verCenter bothSide">
<div class="operation-button row verCenter"> <div class="operation-button row verCenter">
<el-button type="primary" @click="importChange">导入</el-button> <el-button type="primary" @click="importChange">导入</el-button>
<a href="/寄售商品导入.csv" download style="text-decoration: none;margin-left: 10px;"> <a :href="jsHref" download style="text-decoration: none;margin-left: 10px;">
<el-button type="primary">下载模板</el-button> <el-button type="primary">下载模板</el-button>
</a> </a>
</div> </div>
...@@ -98,6 +98,7 @@ export default { ...@@ -98,6 +98,7 @@ export default {
name: "consignmentImport", name: "consignmentImport",
data() { data() {
return { return {
jsHref: location.hostname === 'xinlian.ichunt.com' ? '//cloud.liexindev.net/template/芯链寄售商品导入模板.csv' : 'https://cloud.ichunt.com/template/芯链寄售商品导入模板.csv',
cp_time_day: localStorage.getItem('cp_time_day') || '',//现货最高天数 cp_time_day: localStorage.getItem('cp_time_day') || '',//现货最高天数
futures_cp_time_day: localStorage.getItem('futures_cp_time_day') || '',//期货最高天数 futures_cp_time_day: localStorage.getItem('futures_cp_time_day') || '',//期货最高天数
uploadUrl: NODE_ENVS + '/api/uploadSku/import',//上传接口 uploadUrl: NODE_ENVS + '/api/uploadSku/import',//上传接口
...@@ -126,7 +127,7 @@ export default { ...@@ -126,7 +127,7 @@ export default {
}, },
methods: { methods: {
getData() { getData() {
var params = Object.assign({}, {page: this.page, limit: this.limit, source: 12, status: this.formParam.status, action_time: this.formParam.date[0], end_time: this.formParam.date[1]}); var params = Object.assign({}, { page: this.page, limit: this.limit, source: 12, status: this.formParam.status, action_time: this.formParam.date[0], end_time: this.formParam.date[1] });
this.$http('GET', "/api/uploadSku/list", params).then(res => { this.$http('GET', "/api/uploadSku/list", params).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.list = res.data.list || []; this.list = res.data.list || [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment