添加注释

This commit is contained in:
mabo
2021-07-31 09:49:17 +08:00
parent ff92fd8d76
commit 2792d24e98
20 changed files with 39 additions and 139 deletions

View File

@@ -219,8 +219,8 @@ export default {
}
});
},
// 清空购物车
clearCart () {
// 清空购物车
this.$Modal.confirm({
title: '提示',
content: '<p>确定要清空购物车吗?清空后不可恢复</p>',
@@ -248,8 +248,8 @@ export default {
showCoupon (storeId, index) {
this.couponAvailable = index;
},
// 设置购买数量
changeNum (val, id) {
// 设置购买数量
console.log(val, id);
APICart.setCartGoodsNum({ skuId: id, num: val }).then((res) => {
console.log(res);
@@ -258,8 +258,8 @@ export default {
}
});
},
// 设置商品选中状态
async changeChecked (status, type, id) {
// 设置商品选中状态
const check = status ? 1 : 0;
if (type === 'all') {
// 全选
@@ -274,9 +274,8 @@ export default {
this.getCartList();
},
// 领取优惠券
async receiveShopCoupon (item) {
// 领取优惠券
let res = await APIMember.receiveCoupon(item.id);
if (res.success) {
this.$set(item, 'disabled', true);
@@ -285,8 +284,8 @@ export default {
this.$Message.error(res.message);
}
},
// 购物车列表
async getCartList () {
// 购物车列表
this.loading = true;
try {
let res = await APICart.cartGoodsAll();

View File

@@ -54,6 +54,7 @@ export default {
};
},
methods: {
// 获取商品详情
getGoodsDetail () {
this.isLoading = true;
const params = this.$route.query
@@ -142,12 +143,6 @@ export default {
color: #2c2c2c;
}
.like {
width: 100%;
padding: 20px 0;
@include white_background_color();
}
.shop-nav-container {
width: 1200px;
margin: 0 auto;

View File

@@ -77,6 +77,7 @@
</div>
<div class="goods-page">
<Page
show-total
show-sizer
@on-change="changePageNum"
@on-page-size-change="changePageSize"
@@ -126,6 +127,7 @@ export default {
}
},
methods: {
// 搜索
handleSearch (key) {
this.params.keyword = key
this.params.pageNumber = 0
@@ -156,15 +158,18 @@ export default {
});
window.open(routeUrl.href, '_blank');
},
// 分页 修改页码
changePageNum (val) {
this.params.pageNumber = val;
this.getGoodsList();
},
// 分页 修改页数
changePageSize (val) {
this.params.pageNumber = 1;
this.params.pageSize = val;
this.getGoodsList();
},
// 获取商品列表
getGoodsList () {
this.loading = true;
apiGoods.goodsList(this.params)
@@ -194,7 +199,6 @@ export default {
}
this.getGoodsList()
},
mounted () {},
components: {
GoodsClassNav
}

View File

@@ -73,42 +73,6 @@ export default {
.container {
@include sub_background_color($light_background_color);
}
/** 商品分类 */
.nav-con {
width: 1200px;
height: 40px;
background: #eee;
margin: 0 auto;
display: flex;
.all-categories {
width: 200px;
line-height: 40px;
color: #fff;
background-color: $theme_color;
text-align: center;
font-size: 16px;
}
.nav-item {
width: 1000px;
height: 40px;
line-height: 40px;
overflow: hidden;
list-style: none;
background-color: #eee;
display: flex;
li {
width: 50px;
font-size: 16px;
font-weight: bold;
margin-left: 15px;
color: rgb(89, 88, 88);
font-size: 15px;
&:hover {
color: $theme_color;
}
}
}
}
</style>
<style>
.hover-search {

View File

@@ -133,7 +133,7 @@
<router-link to="/article?id=1371992704333905920" class="item" target="_blank">条款</router-link>
</Row>
<Row type="flex" justify="center" class="copyright">
Copyright © 2021 - Present
Copyright © {{year}} - Present
<a href="https://pickmall.cn" target="_blank" style="margin: 0 5px">lili-shop</a>
版权所有
</Row>
@@ -186,7 +186,8 @@ export default {
},
codeMsg: '发送验证码', // 验证码文字
interval: null, // 定时器
time: 60 // 倒计时
time: 60, // 倒计时
year: new Date().getFullYear()
};
},
methods: {
@@ -220,8 +221,6 @@ export default {
}
});
}
} else {
// this.$Message.error('请填写正确的用户名或密码');
}
});
},

View File

@@ -102,8 +102,6 @@ export default {
this.getCateList()
this.getGoodsList()
},
mounted () {
},
methods: {
getStoreMsg () { // 店铺信息
getDetailById(this.$route.query.id).then(res => {
@@ -154,10 +152,12 @@ export default {
this.cateName = cate.labelName
this.getGoodsList()
},
// 分页 修改页码
changePageNum (val) {
this.params.pageNumber = val;
this.getGoodsList();
},
// 分页 修改页数
changePageSize (val) {
this.params.pageNumber = 1;
this.params.pageSize = val;

View File

@@ -43,6 +43,7 @@
<Page :total="total" @on-change="changePageNum"
@on-page-size-change="changePageSize"
:page-size="params.pageSize"
show-total
show-sizer>
</Page>
</div>

View File

@@ -53,9 +53,6 @@ export default {
mounted () {
let detail = this.$route.query.detail;
if (detail) this.detail = detail;
},
methods: {
}
};
</script>

View File

@@ -88,7 +88,7 @@
<router-link to="/article?id=1371992704333905920" class="item" target="_blank">条款</router-link>
</Row>
<Row type="flex" justify="center" class="copyright">
Copyright © 2021 - Present
Copyright © {{year}} - Present
<a href="https://pickmall.cn" target="_blank" style="margin: 0 5px">lili-shop</a>
版权所有
</Row>
@@ -107,6 +107,7 @@ export default {
components: { Verify },
data () {
return {
year: new Date().getFullYear(),
formRegist: {
// 注册表单
mobilePhone: '',
@@ -156,6 +157,7 @@ export default {
} else {}
});
},
// 发送短信验证码
sendCode () {
if (this.time === 60) {
if (this.formRegist.mobilePhone === '') {
@@ -191,14 +193,13 @@ export default {
});
}
},
handleCancel () {
this.$refs.formRegist.resetFields();
},
// 图片验证码成功回调
verifyChange (con) {
if (!con.status) return;
this.$refs.verify.show = false;
this.verifyStatus = true;
},
// 打开图片验证码
verifyBtnClick () {
if (!this.verifyStatus) {
this.$refs.verify.init();

View File

@@ -241,6 +241,7 @@ export default {
}
},
mounted () {
document.querySelector('.forget-password').style.height = window.innerHeight + 'px'
this.$refs.formFirst.resetFields();
},
watch: {
@@ -250,7 +251,7 @@ export default {
<style scoped lang="scss">
.forget-password{
height: 100%;
min-height: 700px;
}
.logo-box {
width: 600px;

View File

@@ -66,6 +66,7 @@ export default {
};
},
methods: {
// 获取订单详情
getTradeDetail () {
const params = this.$route.query;
params.clientType = 'PC'

View File

@@ -46,9 +46,9 @@ export default {
};
},
methods: {
// 获取支付二维码
handlePay () {
const params = this.$route.query;
pay(params).then(res => {
if (res.success) {
this.qrcode = res.result;

View File

@@ -65,7 +65,7 @@ export default {
};
},
computed: {
userInfo () {
userInfo () { // 用户信息
return JSON.parse(Storage.getItem('userInfo'));
}
},