mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-21 10:25:53 +08:00
所有页面res.code替换为res.success
This commit is contained in:
@@ -221,7 +221,7 @@ export default {
|
||||
content: '<p>确定要删除该商品吗?</p>',
|
||||
onOk: () => {
|
||||
APICart.delCartGoods({ skuIds: idArr.toString() }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.$Message.success('删除成功');
|
||||
this.getCartList();
|
||||
} else {
|
||||
@@ -237,7 +237,7 @@ export default {
|
||||
content: '<p>确定要清空购物车吗?清空后不可恢复</p>',
|
||||
onOk: () => {
|
||||
APICart.clearCart().then((res) => {
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.$Message.success('清空购物车成功');
|
||||
this.getCartList();
|
||||
} else {
|
||||
@@ -264,7 +264,7 @@ export default {
|
||||
console.log(val, id);
|
||||
APICart.setCartGoodsNum({ skuId: id, num: val }).then((res) => {
|
||||
console.log(res);
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.getCartList();
|
||||
}
|
||||
});
|
||||
@@ -288,7 +288,7 @@ export default {
|
||||
|
||||
async receiveShopCoupon (item) { // 领取优惠券
|
||||
let res = await APIMember.receiveCoupon(item.id)
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.$set(item, 'disabled', true)
|
||||
this.$Message.success('领取成功')
|
||||
} else {
|
||||
@@ -301,7 +301,7 @@ export default {
|
||||
try {
|
||||
let res = await APICart.cartGoodsAll();
|
||||
this.loading = false;
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.cartList = res.result.cartList;
|
||||
this.priceDetailDTO = res.result.priceDetailDTO;
|
||||
this.skuList = res.result.skuList;
|
||||
|
||||
@@ -70,7 +70,7 @@ export default {
|
||||
const params = this.$route.query
|
||||
goodsSkuDetail(params).then((res) => {
|
||||
this.isLoading = false;
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
const result = res.result;
|
||||
const cateName = res.result.categoryName;
|
||||
const cateId = result.data.categoryPath.split(',');
|
||||
|
||||
@@ -170,7 +170,7 @@ export default {
|
||||
apiGoods.goodsList(this.params)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.goodsList = res.result.content;
|
||||
this.total = res.result.totalElements;
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ export default {
|
||||
code: [{ required: true, message: '请输入手机验证码' }]
|
||||
},
|
||||
codeMsg: '发送验证码', // 验证码文字
|
||||
interval: '', // 定时器
|
||||
interval: null, // 定时器
|
||||
time: 60, // 倒计时
|
||||
logoImg: '' // logo图片
|
||||
};
|
||||
@@ -201,12 +201,12 @@ export default {
|
||||
let data = JSON.parse(JSON.stringify(this.formSms));
|
||||
apiLogin.smsLogin(data).then((res) => {
|
||||
this.$refs.verify.show = false;
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.$Message.success('登录成功');
|
||||
storage.setItem('accessToken', res.result.accessToken);
|
||||
storage.setItem('refreshToken', res.result.refreshToken);
|
||||
apiLogin.getMemberMsg().then((res) => {
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
storage.setItem('userInfo', res.result);
|
||||
let query = this.$route.query;
|
||||
if (query.rePath) {
|
||||
@@ -241,11 +241,10 @@ export default {
|
||||
verificationEnums: 'LOGIN'
|
||||
};
|
||||
sendSms(params).then(res => {
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.$Message.success('验证码发送成功');
|
||||
let that = this;
|
||||
this.interval = setInterval(() => {
|
||||
console.log(that.time);
|
||||
that.time--;
|
||||
if (that.time === 0) {
|
||||
that.time = 60;
|
||||
@@ -271,13 +270,13 @@ export default {
|
||||
this.$refs.verify.show = false;
|
||||
this.$Spin.show();
|
||||
apiLogin.login(data).then((res) => {
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.$Message.success('登录成功');
|
||||
storage.setItem('accessToken', res.result.accessToken);
|
||||
storage.setItem('refreshToken', res.result.refreshToken);
|
||||
apiLogin.getMemberMsg().then((res) => {
|
||||
this.$Spin.hide();
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
storage.setItem('userInfo', res.result);
|
||||
let query = this.$route.query;
|
||||
if (query.rePath) {
|
||||
@@ -313,12 +312,12 @@ export default {
|
||||
if (uuid) {
|
||||
storage.setItem('uuid', uuid);
|
||||
loginCallback(uuid).then(res => {
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
const result = res.result;
|
||||
storage.setItem('accessToken', result.accessToken);
|
||||
storage.setItem('refreshToken', result.refreshToken);
|
||||
apiLogin.getMemberMsg().then((res) => {
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
storage.setItem('userInfo', res.result);
|
||||
let query = this.$route.query;
|
||||
if (query.rePath) {
|
||||
|
||||
@@ -120,7 +120,7 @@ export default {
|
||||
},
|
||||
getGoodsList () { // 商品信息
|
||||
goodsList(this.params).then((res) => {
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.goodsList = res.result.content;
|
||||
this.total = res.result.totalElements;
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ export default {
|
||||
let data = JSON.parse(JSON.stringify(this.formRegist));
|
||||
data.password = md5(data.password);
|
||||
apiLogin.regist(data).then((res) => {
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.$Message.success('注册成功!');
|
||||
this.$router.push('login');
|
||||
} else {
|
||||
@@ -172,7 +172,7 @@ export default {
|
||||
verificationEnums: 'REGISTER'
|
||||
};
|
||||
sendSms(params).then(res => {
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.$Message.success('验证码发送成功');
|
||||
let that = this;
|
||||
this.interval = setInterval(() => {
|
||||
|
||||
@@ -160,7 +160,7 @@ export default {
|
||||
let data = JSON.parse(JSON.stringify(this.formFirst));
|
||||
apiLogin.validateCode(data).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
// this.$Message.success('');
|
||||
this.step = 1;
|
||||
} else {
|
||||
@@ -186,7 +186,7 @@ export default {
|
||||
apiLogin.resetPassword(params).then(res => {
|
||||
this.loading1 = false;
|
||||
console.log(res);
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.$Message.success('修改密码成功');
|
||||
this.$router.push('login');
|
||||
}
|
||||
@@ -209,7 +209,7 @@ export default {
|
||||
verificationEnums: 'FIND_USER'
|
||||
};
|
||||
sendSms(params).then(res => {
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.$Message.success('验证码发送成功');
|
||||
let that = this;
|
||||
this.interval = setInterval(() => {
|
||||
|
||||
@@ -88,14 +88,14 @@ export default {
|
||||
this.loading = true;
|
||||
if (this.$route.query.id) {
|
||||
editMemberAddress(params).then((res) => {
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.loading = false;
|
||||
this.$router.push('/home/MyAddress');
|
||||
}
|
||||
}).catch(() => { this.loading = false; });
|
||||
} else {
|
||||
newMemberAddress(params).then((res) => {
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.loading = false;
|
||||
this.$router.push('/home/MyAddress');
|
||||
}
|
||||
@@ -107,7 +107,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, ' ');
|
||||
|
||||
@@ -58,7 +58,7 @@ export default {
|
||||
content: '你确定删除这个收货地址',
|
||||
onOk: () => {
|
||||
delMemberAddress(id).then((res) => {
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.$Message.success('删除成功');
|
||||
this.getAddrList();
|
||||
}
|
||||
@@ -73,7 +73,7 @@ export default {
|
||||
// 获取地址列表
|
||||
memberAddress().then((res) => {
|
||||
console.log(res);
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.list = res.result.records;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -311,7 +311,7 @@ export default {
|
||||
content: '你确定删除这个收货地址',
|
||||
onOk: () => {
|
||||
delMemberAddress(item.id).then((res) => {
|
||||
if (res.code === 200) {
|
||||
if (res.success) {
|
||||
this.$Message.success('删除成功');
|
||||
this.getAddress();
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<span v-if="storeDisable == 'OPEN'">申请已通过,请联系管理员</span>
|
||||
<span v-if="storeDisable == 'CLOSED'">店铺已关闭,重申请联系管理员</span>
|
||||
</div>
|
||||
<Button v-if="currentIndex == 3" @click="currentIndex = 2">返回</Button>
|
||||
<Button v-if="currentIndex == 3" @click="$router.push('/')">返回</Button>
|
||||
</div>
|
||||
|
||||
<Modal
|
||||
|
||||
Reference in New Issue
Block a user