bug修改
parent
eb5816ff80
commit
f2f2984c3e
|
@ -69,7 +69,7 @@
|
||||||
>人评价
|
>人评价
|
||||||
</div>
|
</div>
|
||||||
<div class="goods-show-seller">
|
<div class="goods-show-seller">
|
||||||
<span>{{ item.storeName }}</span>
|
<Tag v-if="item.selfOperated" style="padding:0 4px;" size="small" color="error">自营</Tag><span>{{ item.storeName }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -142,6 +142,8 @@ service.interceptors.response.use(
|
||||||
refresh(error)
|
refresh(error)
|
||||||
isRefreshToken = 0;
|
isRefreshToken = 0;
|
||||||
}
|
}
|
||||||
|
} else if (errorResponse.status === 404) {
|
||||||
|
// 避免刷新token时也提示报错信息
|
||||||
} else {
|
} else {
|
||||||
if (error.message) {
|
if (error.message) {
|
||||||
let _message =
|
let _message =
|
||||||
|
|
|
@ -64,14 +64,6 @@ service.interceptors.response.use(
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
break;
|
break;
|
||||||
case 403:
|
|
||||||
// 权限不足
|
|
||||||
if (data.message !== null) {
|
|
||||||
Message.error(data.message);
|
|
||||||
} else {
|
|
||||||
Message.error("权限不足");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 500:
|
case 500:
|
||||||
// 系统异常
|
// 系统异常
|
||||||
if (data.message !== null) {
|
if (data.message !== null) {
|
||||||
|
@ -89,6 +81,8 @@ service.interceptors.response.use(
|
||||||
if (error.response) {
|
if (error.response) {
|
||||||
if (error.response.status === 401) {
|
if (error.response.status === 401) {
|
||||||
// 这种情况一般调到登录页
|
// 这种情况一般调到登录页
|
||||||
|
} else if (error.response.status === 404) {
|
||||||
|
// 避免刷新token报错
|
||||||
} else if (error.response.status === 403) {
|
} else if (error.response.status === 403) {
|
||||||
isRefreshToken++;
|
isRefreshToken++;
|
||||||
if(isRefreshToken === 1) {
|
if(isRefreshToken === 1) {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
<div class="upload-pic-thumb">
|
||||||
<vuedraggable
|
<vuedraggable
|
||||||
:list="uploadList"
|
:list="uploadList"
|
||||||
:disabled="!draggable||!multiple"
|
:disabled="!draggable||!multiple"
|
||||||
|
@ -41,7 +42,7 @@
|
||||||
<Icon type="md-camera" size="20"></Icon>
|
<Icon type="md-camera" size="20"></Icon>
|
||||||
</div>
|
</div>
|
||||||
</Upload>
|
</Upload>
|
||||||
|
</div>
|
||||||
<Modal title="图片预览" v-model="viewImage" :styles="{top: '30px'}" draggable>
|
<Modal title="图片预览" v-model="viewImage" :styles="{top: '30px'}" draggable>
|
||||||
<img :src="imgUrl" alt="无效的图片链接" style="width: 100%;margin: 0 auto;display: block;" />
|
<img :src="imgUrl" alt="无效的图片链接" style="width: 100%;margin: 0 auto;display: block;" />
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
|
@ -242,6 +243,9 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.upload-pic-thumb{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
.upload-list {
|
.upload-list {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 60px;
|
width: 60px;
|
||||||
|
@ -255,6 +259,7 @@ export default {
|
||||||
position: relative;
|
position: relative;
|
||||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
.upload-list img {
|
.upload-list img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -18,14 +18,14 @@ export default {
|
||||||
* @description api请求基础路径
|
* @description api请求基础路径
|
||||||
*/
|
*/
|
||||||
api_dev: {
|
api_dev: {
|
||||||
common: 'https://common-api.pickmall.cn',
|
// common: 'https://common-api.pickmall.cn',
|
||||||
buyer: 'https://buyer-api.pickmall.cn',
|
// buyer: 'https://buyer-api.pickmall.cn',
|
||||||
seller: 'https://store-api.pickmall.cn',
|
// seller: 'https://store-api.pickmall.cn',
|
||||||
manager: 'https://admin-api.pickmall.cn',
|
// manager: 'https://admin-api.pickmall.cn',
|
||||||
// common: 'http://192.168.0.109:8890',
|
common: 'http://192.168.0.109:8890',
|
||||||
// buyer: 'http://192.168.0.109:8888',
|
buyer: 'http://192.168.0.109:8888',
|
||||||
// seller: 'http://192.168.0.109:8889',
|
seller: 'http://192.168.0.109:8889',
|
||||||
// manager: 'http://192.168.0.109:8887'
|
manager: 'http://192.168.0.109:8887'
|
||||||
},
|
},
|
||||||
api_prod: {
|
api_prod: {
|
||||||
common: 'https://common-api.pickmall.cn',
|
common: 'https://common-api.pickmall.cn',
|
||||||
|
|
|
@ -69,14 +69,6 @@ service.interceptors.response.use(
|
||||||
router.push("/login");
|
router.push("/login");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 403:
|
|
||||||
// 权限不足
|
|
||||||
if (data.message !== null) {
|
|
||||||
Message.error(data.message);
|
|
||||||
} else {
|
|
||||||
Message.error("权限不足");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 500:
|
case 500:
|
||||||
// 系统异常
|
// 系统异常
|
||||||
if (data.message !== null) {
|
if (data.message !== null) {
|
||||||
|
@ -94,6 +86,8 @@ service.interceptors.response.use(
|
||||||
if (error.response) {
|
if (error.response) {
|
||||||
if (error.response.status === 401) {
|
if (error.response.status === 401) {
|
||||||
// 这种情况一般调到登录页
|
// 这种情况一般调到登录页
|
||||||
|
} else if (error.response.status === 404) {
|
||||||
|
// 避免刷新token报错
|
||||||
} else if (error.response.status === 403) {
|
} else if (error.response.status === 403) {
|
||||||
isRefreshToken++;
|
isRefreshToken++;
|
||||||
if (isRefreshToken === 1) {
|
if (isRefreshToken === 1) {
|
||||||
|
|
|
@ -54,20 +54,20 @@ export const result = [
|
||||||
children: null,
|
children: null,
|
||||||
permTypes: []
|
permTypes: []
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
name: "daft-goods",
|
// name: "daft-goods",
|
||||||
showAlways: true,
|
// showAlways: true,
|
||||||
level: 2,
|
// level: 2,
|
||||||
type: 0,
|
// type: 0,
|
||||||
title: "草稿商品",
|
// title: "草稿商品",
|
||||||
path: "daft-goods",
|
// path: "daft-goods",
|
||||||
component: "goods/goods-seller/draftGoods",
|
// component: "goods/goods-seller/draftGoods",
|
||||||
icon: "md-person",
|
// icon: "md-person",
|
||||||
isMenu: true,
|
// isMenu: true,
|
||||||
url: "",
|
// url: "",
|
||||||
children: null,
|
// children: null,
|
||||||
permTypes: []
|
// permTypes: []
|
||||||
},
|
// },
|
||||||
|
|
||||||
{
|
{
|
||||||
path: "template-goods",
|
path: "template-goods",
|
||||||
|
|
|
@ -5,7 +5,7 @@ export const loginRouter = {
|
||||||
path: "/login",
|
path: "/login",
|
||||||
name: "login",
|
name: "login",
|
||||||
meta: {
|
meta: {
|
||||||
title: "登录 - lili商家后台 "
|
title: "登录 - lili商家后台"
|
||||||
},
|
},
|
||||||
component: () => import("@/views/login.vue")
|
component: () => import("@/views/login.vue")
|
||||||
};
|
};
|
||||||
|
|
|
@ -395,11 +395,11 @@ div.base-info-item {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
display: inline-flex;
|
display: inline-block;
|
||||||
flex-direction: column;
|
|
||||||
background: #fff;
|
background: #fff;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
|
vertical-align: bottom;
|
||||||
}
|
}
|
||||||
.demo-upload-list img {
|
.demo-upload-list img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -317,7 +317,7 @@
|
||||||
<editor id="mobileIntr" v-model="baseInfoForm.mobileIntro"></editor>
|
<editor id="mobileIntr" v-model="baseInfoForm.mobileIntro"></editor>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="this.baseInfoForm.goodsType!='VIRTUAL_GOODS'">
|
<div v-if="baseInfoForm.goodsType!='VIRTUAL_GOODS'">
|
||||||
<h4>商品物流信息</h4>
|
<h4>商品物流信息</h4>
|
||||||
<div class="form-item-view">
|
<div class="form-item-view">
|
||||||
<FormItem class="form-item-view-el" label="商品重量" prop="weight">
|
<FormItem class="form-item-view-el" label="商品重量" prop="weight">
|
||||||
|
@ -325,24 +325,11 @@
|
||||||
<span slot="append">kg</span>
|
<span slot="append">kg</span>
|
||||||
</Input>
|
</Input>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem class="form-item-view-el" label="运费" prop="skuList">
|
|
||||||
<RadioGroup type="button" button-style="solid"
|
|
||||||
@on-change="logisticsTemplateChange"
|
|
||||||
v-model="baseInfoForm.freightPayer"
|
|
||||||
>
|
|
||||||
<Radio label="STORE">
|
|
||||||
<span>卖家承担运费</span>
|
|
||||||
</Radio>
|
|
||||||
<Radio label="BUYER">
|
|
||||||
<span>使用物流规则</span>
|
|
||||||
</Radio>
|
|
||||||
</RadioGroup>
|
|
||||||
</FormItem>
|
|
||||||
<FormItem
|
<FormItem
|
||||||
class="form-item-view-el"
|
class="form-item-view-el"
|
||||||
label="物流模板"
|
label="物流模板"
|
||||||
prop="templateId"
|
prop="templateId"
|
||||||
v-if="logisticsTemplateShow"
|
|
||||||
>
|
>
|
||||||
<Select v-model="baseInfoForm.templateId" style="width: 200px">
|
<Select v-model="baseInfoForm.templateId" style="width: 200px">
|
||||||
<Option
|
<Option
|
||||||
|
@ -431,10 +418,11 @@
|
||||||
<Button type="primary" @click="save" :loading="submitLoading" v-if="activestep === 1">
|
<Button type="primary" @click="save" :loading="submitLoading" v-if="activestep === 1">
|
||||||
{{ this.goodsId ? "保存" : "保存商品" }}
|
{{ this.goodsId ? "保存" : "保存商品" }}
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="primary" @click="saveToDraft('TEMPLATE')" v-if="activestep === 1">保存为模版
|
<Button type="primary" @click="saveToDraft('TEMPLATE')" v-if="activestep === 1">
|
||||||
</Button>
|
保存为模版
|
||||||
<Button type="primary" @click="saveToDraft('DRAFT')" v-if="activestep === 1 && !isOperationGoods">保存至草稿箱
|
|
||||||
</Button>
|
</Button>
|
||||||
|
<!-- <Button type="primary" @click="saveToDraft('DRAFT')" v-if="activestep === 1 && !isOperationGoods">保存至草稿箱
|
||||||
|
</Button> -->
|
||||||
</ButtonGroup>
|
</ButtonGroup>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -632,8 +620,6 @@ export default {
|
||||||
salesModel: "RETAIL",
|
salesModel: "RETAIL",
|
||||||
/** 商品参数列表 */
|
/** 商品参数列表 */
|
||||||
goodsParamsList: [],
|
goodsParamsList: [],
|
||||||
/** 运费承担者 */
|
|
||||||
// freightPayer: "STORE",
|
|
||||||
/** 商品重量 */
|
/** 商品重量 */
|
||||||
weight: "",
|
weight: "",
|
||||||
/** 商品相册列表 */
|
/** 商品相册列表 */
|
||||||
|
@ -710,9 +696,6 @@ export default {
|
||||||
/** 当前百分比 */
|
/** 当前百分比 */
|
||||||
currentPercent: 0,
|
currentPercent: 0,
|
||||||
|
|
||||||
/** 物流模板是否展示 **/
|
|
||||||
logisticsTemplateShow: false,
|
|
||||||
|
|
||||||
/** 运费模板 **/
|
/** 运费模板 **/
|
||||||
logisticsTemplate: [],
|
logisticsTemplate: [],
|
||||||
|
|
||||||
|
@ -779,6 +762,12 @@ export default {
|
||||||
this.accessToken = {
|
this.accessToken = {
|
||||||
accessToken: this.getStore("accessToken"),
|
accessToken: this.getStore("accessToken"),
|
||||||
};
|
};
|
||||||
|
// 获取运费模板
|
||||||
|
API_Shop.getShipTemplate().then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.logisticsTemplate = res.result;
|
||||||
|
}
|
||||||
|
})
|
||||||
//编辑商品
|
//编辑商品
|
||||||
if (this.$route.query.id) {
|
if (this.$route.query.id) {
|
||||||
this.activestep = 1;
|
this.activestep = 1;
|
||||||
|
@ -786,7 +775,7 @@ export default {
|
||||||
this.GET_GoodData();
|
this.GET_GoodData();
|
||||||
this.selectGoodsType = false;
|
this.selectGoodsType = false;
|
||||||
}
|
}
|
||||||
//编辑模版/草稿
|
//编辑模版
|
||||||
else if (this.$route.query.draftId) {
|
else if (this.$route.query.draftId) {
|
||||||
this.draftId = this.$route.query.draftId;
|
this.draftId = this.$route.query.draftId;
|
||||||
this.activestep = 1;
|
this.activestep = 1;
|
||||||
|
@ -806,7 +795,6 @@ export default {
|
||||||
this.baseInfoForm = {
|
this.baseInfoForm = {
|
||||||
salesModel: "RETAIL",
|
salesModel: "RETAIL",
|
||||||
goodsParamsList: [],
|
goodsParamsList: [],
|
||||||
// freightPayer: "STORE",
|
|
||||||
weight: "",
|
weight: "",
|
||||||
goodsGalleryFiles: [],
|
goodsGalleryFiles: [],
|
||||||
release: "true",
|
release: "true",
|
||||||
|
@ -984,20 +972,7 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//选择运费模板则展示运费规则
|
|
||||||
logisticsTemplateChange(v) {
|
|
||||||
if (v == "BUYER") {
|
|
||||||
// 如果买家承担运费 则需要查询运费规则
|
|
||||||
API_Shop.getShipTemplate().then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.logisticsTemplate = res.result;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.logisticsTemplateShow = true;
|
|
||||||
} else {
|
|
||||||
this.logisticsTemplateShow = false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
gotoGoodsList() {
|
gotoGoodsList() {
|
||||||
this.$router.push({ name: "goods" });
|
this.$router.push({ name: "goods" });
|
||||||
},
|
},
|
||||||
|
@ -1053,15 +1028,8 @@ export default {
|
||||||
...this.baseInfoForm,
|
...this.baseInfoForm,
|
||||||
...response.result,
|
...response.result,
|
||||||
};
|
};
|
||||||
console.warn(this.baseInfoForm);
|
// console.warn(this.baseInfoForm);
|
||||||
// if (this.baseInfoForm.freightPayer === "BUYER") {
|
|
||||||
// API_Shop.getShipTemplate().then((res) => {
|
|
||||||
// if (res.success) {
|
|
||||||
// this.logisticsTemplate = res.result;
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// this.logisticsTemplateShow = true;
|
|
||||||
// }
|
|
||||||
this.baseInfoForm.release = "true";
|
this.baseInfoForm.release = "true";
|
||||||
this.baseInfoForm.recommend = this.baseInfoForm.recommend
|
this.baseInfoForm.recommend = this.baseInfoForm.recommend
|
||||||
? "true"
|
? "true"
|
||||||
|
@ -1555,7 +1523,6 @@ export default {
|
||||||
},
|
},
|
||||||
/** 下一步*/
|
/** 下一步*/
|
||||||
next() {
|
next() {
|
||||||
console.log(111);
|
|
||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
if (this.activestep === 0 && this.draftId) {
|
if (this.activestep === 0 && this.draftId) {
|
||||||
this.activestep = 1;
|
this.activestep = 1;
|
||||||
|
@ -1666,10 +1633,6 @@ export default {
|
||||||
this.submitLoading = false;
|
this.submitLoading = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//如果选择的是卖家承担运费 则运费模板重置为0
|
|
||||||
// if (this.baseInfoForm.freightPayer !== "BUYER") {
|
|
||||||
// this.baseInfoForm.templateId = 0;
|
|
||||||
// }
|
|
||||||
|
|
||||||
this.baseInfoForm.skuList = this.skuTableData.map((sku) => {
|
this.baseInfoForm.skuList = this.skuTableData.map((sku) => {
|
||||||
delete sku._index;
|
delete sku._index;
|
||||||
|
@ -1762,7 +1725,7 @@ export default {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
SAVE_DRAFT_GOODS() {
|
SAVE_DRAFT_GOODS() { // 保存草稿商品
|
||||||
API_GOODS.saveDraftGoods(this.baseInfoForm).then((res) => {
|
API_GOODS.saveDraftGoods(this.baseInfoForm).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$Message.info("保存成功!");
|
this.$Message.info("保存成功!");
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
<div class="upload-pic-thumb">
|
||||||
<vuedraggable
|
<vuedraggable
|
||||||
:list="uploadList"
|
:list="uploadList"
|
||||||
:disabled="!draggable||!multiple"
|
:disabled="!draggable||!multiple"
|
||||||
|
@ -43,7 +44,7 @@
|
||||||
<Icon type="md-camera" size="20"></Icon>
|
<Icon type="md-camera" size="20"></Icon>
|
||||||
</div>
|
</div>
|
||||||
</Upload>
|
</Upload>
|
||||||
|
</div>
|
||||||
<Modal title="图片预览" v-model="viewImage" :styles="{top: '30px'}" draggable>
|
<Modal title="图片预览" v-model="viewImage" :styles="{top: '30px'}" draggable>
|
||||||
<img :src="imgUrl" alt="无效的图片链接" style="width: 100%;margin: 0 auto;display: block;" />
|
<img :src="imgUrl" alt="无效的图片链接" style="width: 100%;margin: 0 auto;display: block;" />
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
|
@ -252,10 +253,12 @@ export default {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.upload-pic-thumb{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
.upload-list {
|
.upload-list {
|
||||||
display: inline-block;
|
display: inline-flex;
|
||||||
width: 60px;
|
width: 60px;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -267,6 +270,7 @@ export default {
|
||||||
position: relative;
|
position: relative;
|
||||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
.upload-list img {
|
.upload-list img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
Loading…
Reference in New Issue