Skip to content

Commit

Permalink
修复商品数量的小问题
Browse files Browse the repository at this point in the history
修复背景图无法打包的问题
删除无用的物流api
  • Loading branch information
meiweiyuxian committed Apr 19, 2020
1 parent 72c82ce commit 0fc18e3
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 31 deletions.
42 changes: 19 additions & 23 deletions src/renderer/components/Goods/GoodsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@
</div>
<div class="content-main">
<div class="block">
<span class="wrapper">
<el-button :plain="true" type="primary" :class="activeClass == 1 ? 'active' : '' "
@click="sortOrder(1)" size="small">按销量排序</el-button>
<el-button :plain="true" type="primary" :class="activeClass == 2 ? 'active' : '' "
@click="sortOrder(2)" size="small">按售价排序</el-button>
<el-button :plain="true" type="primary" :class="activeClass == 3 ? 'active' : '' "
@click="sortOrder(3)" size="small">按库存排序</el-button>
<!--<el-button :plain="true" type="info" @click="sortOrder" data-index="3">信息按钮</el-button>-->
</span>
<span class="wrapper">
<el-button :plain="true" type="primary" :class="activeClass == 1 ? 'active' : '' "
@click="sortOrder(1)" size="small">按销量排序</el-button>
<el-button :plain="true" type="primary" :class="activeClass == 2 ? 'active' : '' "
@click="sortOrder(2)" size="small">按售价排序</el-button>
<el-button :plain="true" type="primary" :class="activeClass == 3 ? 'active' : '' "
@click="sortOrder(3)" size="small">按库存排序</el-button>
</span>
</div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="全部商品" name="first">
Expand Down Expand Up @@ -122,13 +121,9 @@
<el-input-number class="sort-width" size="mini" :min="1" :max="100" controls-position="right" v-model="scope.row.sort_order" placeholder="排序" @blur="submitSort(scope.$index, scope.row)" @change="submitSort(scope.$index, scope.row)"></el-input-number>
</template>
</el-table-column>
<!--<el-table-column prop="category_p_name" label="父类" width="100" sortable></el-table-column>-->
<!--<el-table-column prop="category_name" label="子类" width="100" sortable></el-table-column>-->
<el-table-column prop="sell_volume" label="销量" width="80" sortable></el-table-column>
<!--<el-table-column prop="retail_price" label="售价" width="80" sortable></el-table-column>-->
<el-table-column prop="goods_number" label="库存" width="80" sortable>
</el-table-column>
<!-- <el-table-column prop="has_done" label="完成" width="80" sortable></el-table-column> -->
<el-table-column label="首页显示" width="80">
<template scope="scope">
<el-switch
Expand Down Expand Up @@ -159,7 +154,7 @@
</el-table>
</div>
<div class="page-box">
<el-pagination @current-change="handlePageChange" :current-page="page" :page-size="50"
<el-pagination @current-change="handlePageChange" :current-page="page" :page-size="size"
layout="total, prev, pager, next, jumper" :total="total">
</el-pagination>
</div>
Expand All @@ -173,6 +168,7 @@
data() {
return {
page: 1,
size:10,
total: 0,
filterForm: {
name: ''
Expand Down Expand Up @@ -298,8 +294,7 @@
},
handleClick(tab, event) {
let pindex = tab._data.index;
localStorage.setItem('pIndex', pindex);
localStorage.setItem('goodsPage', 0)
this.page = 1;
this.activeClass = 0;
if (pindex == 0) {
this.getList();
Expand All @@ -320,11 +315,7 @@
},
handlePageChange(val) {
this.page = val;
//保存到localStorage
localStorage.setItem('goodsPage', this.page)
localStorage.setItem('goodsFilterForm', JSON.stringify(this.filterForm));
let nIndex = this.pIndex;
if (nIndex == 0) {
this.getList();
}
Expand Down Expand Up @@ -402,6 +393,7 @@
this.axios.get('goods', {
params: {
page: this.page,
size: this.size,
name: this.filterForm.name
}
}).then((response) => {
Expand All @@ -413,7 +405,8 @@
getOnSaleList() {
this.axios.get('goods/onsale', {
params: {
page: this.page
page: this.page,
size: this.size
}
}).then((response) => {
this.tableData = response.data.data.data
Expand All @@ -424,7 +417,8 @@
getOutList() {
this.axios.get('goods/out', {
params: {
page: this.page
page: this.page,
size: this.size
}
}).then((response) => {
this.tableData = response.data.data.data;
Expand All @@ -435,7 +429,8 @@
getDropList() {
this.axios.get('goods/drop', {
params: {
page: this.page
page: this.page,
size: this.size
}
}).then((response) => {
this.tableData = response.data.data.data;
Expand All @@ -450,6 +445,7 @@
this.axios.get('goods/sort', {
params: {
page: this.page,
size: this.size,
index: num
}
}).then((response) => {
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/components/LoginPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@
<style>
.login {
align-items: center;
background: url("/static/images/back1.jpg");
background: url("http://hiolabs.com/demo/static/images/back1.jpg");
/* 以上为登录背景,可以自己更换成自己喜欢的 */
background-size: 100%;
background-repeat:no-repeat;
display: flex;
Expand Down
15 changes: 8 additions & 7 deletions src/renderer/config/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ const rootUrl = 'http://www.hiolabs.com:8360/admin/';

const api = {
rootUrl : rootUrl,
express: {
// 快递物流信息查询使用的是快递鸟接口,申请地址:http://www.kdniao.com/
appid: '123', // 对应快递鸟用户后台 用户ID
appkey: '123123', // 对应快递鸟用户后台 API key
request_url: 'http://api.kdniao.cc/Ebusiness/EbusinessOrderHandle.aspx'
},
// express: {
// // 快递物流信息查询使用的是快递鸟接口,申请地址:http://www.kdniao.com/
// appid: '123', // 对应快递鸟用户后台 用户ID
// appkey: '123123', // 对应快递鸟用户后台 API key
// request_url: 'http://api.kdniao.cc/Ebusiness/EbusinessOrderHandle.aspx'
// },
// 4.19更新,物流查询不需要以上配置,只需要在server的config配置阿里云物流接口就可以
qiniu: 'http://up.qiniu.com',
// 请根据自己创建的七牛的区域进行设置:
// https://developer.qiniu.com/kodo/manual/1671/region-endpoint
qiniu: 'http://up.qiniu.com'
};


Expand Down

0 comments on commit 0fc18e3

Please sign in to comment.