mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-19 01:15:53 +08:00
所有页面res.code替换为res.success
This commit is contained in:
@@ -99,7 +99,7 @@ export default {
|
||||
if (this.id) {
|
||||
editMemberAddress(params).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.$Message.success('编辑地址成功');
|
||||
this.$emit('change', true);
|
||||
this.hide();
|
||||
@@ -108,7 +108,7 @@ export default {
|
||||
} else {
|
||||
newMemberAddress(params).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.$Message.success('新增地址成功');
|
||||
this.$emit('change', true);
|
||||
this.hide();
|
||||
@@ -121,7 +121,7 @@ export default {
|
||||
getAddrById (id) {
|
||||
// 获取地址详情
|
||||
getAddrDetail(id).then((res) => {
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
console.log(res);
|
||||
const data = res.result;
|
||||
data.address = res.result.consigneeAddressPath.replace(/,/g, ' ');
|
||||
@@ -131,7 +131,6 @@ export default {
|
||||
},
|
||||
getAddress (item) {
|
||||
// 获取地图选择信息
|
||||
console.log(item);
|
||||
this.mapMsg = item;
|
||||
this.$set(this.formData, 'address', item.addr);
|
||||
this.$set(this.formData, 'consigneeAddressIdPath', item.addrId);
|
||||
|
||||
@@ -164,7 +164,7 @@ export default {
|
||||
// 删除商品
|
||||
delGoods (id) {
|
||||
delCartGoods({ skuIds: id }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.$Message.success('删除成功');
|
||||
this.getCartList();
|
||||
cartCount().then(res => {
|
||||
@@ -231,7 +231,7 @@ export default {
|
||||
this.loading = true;
|
||||
addCartGoods(params).then(res => {
|
||||
this.loading = false;
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.$Message.success('商品已成功添加到购物车')
|
||||
} else {
|
||||
this.$Message.warning(res.message);
|
||||
|
||||
@@ -224,7 +224,7 @@ export default {
|
||||
this.loading = true;
|
||||
addCartGoods(params).then(res => {
|
||||
this.loading = false;
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.$router.push({path: '/shoppingCart', query: {detail: this.skuDetail, count: this.count}});
|
||||
} else {
|
||||
this.$Message.warning(res.message);
|
||||
@@ -240,7 +240,7 @@ export default {
|
||||
this.loading1 = true;
|
||||
addCartGoods(params).then(res => {
|
||||
this.loading1 = false;
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.$router.push({path: '/pay', query: {way: 'BUY_NOW'}});
|
||||
} else {
|
||||
this.$Message.warning(res.message);
|
||||
|
||||
@@ -144,13 +144,13 @@ export default {
|
||||
getList () { // 获取评论列表
|
||||
this.commentParams.goodsId = this.skuDetail.goodsId;
|
||||
goodsComment(this.commentParams).then(res => {
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.commentList = res.result.records;
|
||||
this.commentTotal = res.result.total;
|
||||
}
|
||||
});
|
||||
goodsCommentNum(this.skuDetail.goodsId).then(res => {
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.commentTypeNum = res.result;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -72,7 +72,7 @@ export default {
|
||||
if (this.useApi) {
|
||||
handleRegion(params).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.showMap = false;
|
||||
this.addrContent.addr = res.result.name.replace(/,/g, ' ');
|
||||
this.addrContent.addrId = res.result.id;
|
||||
|
||||
@@ -358,7 +358,7 @@ export default {
|
||||
getFilterList (params) {
|
||||
// 筛选、分类 列表
|
||||
APIGoods.filterList(params).then((res) => {
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
const data = res.result;
|
||||
this.tagsContent = [{
|
||||
key: '品牌',
|
||||
|
||||
Reference in New Issue
Block a user