为服务列表页面+按钮增加登录判断
This commit is contained in:
parent
0c0d35dff7
commit
f367bee247
|
@ -7,6 +7,7 @@
|
||||||
<view class="thumb-box" v-for="(item, index) in data.child" :key="index">
|
<view class="thumb-box" v-for="(item, index) in data.child" :key="index">
|
||||||
<service-preview-item :data="item" @clickItem="clickItem" />
|
<service-preview-item :data="item" @clickItem="clickItem" />
|
||||||
<widget-count-modify
|
<widget-count-modify
|
||||||
|
:auth="true"
|
||||||
:init="briefCart.list[item.id] || 0"
|
:init="briefCart.list[item.id] || 0"
|
||||||
class="component-add"
|
class="component-add"
|
||||||
@change="changeCount($event, item.id)"
|
@change="changeCount($event, item.id)"
|
||||||
|
|
|
@ -111,6 +111,10 @@ export default {
|
||||||
* 数量改变
|
* 数量改变
|
||||||
*/
|
*/
|
||||||
changeNumber(e, id) {
|
changeNumber(e, id) {
|
||||||
|
if (e.type == "nologin") {
|
||||||
|
this.$store.commit("user/showLoginModal", true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (e.value > 0) {
|
if (e.value > 0) {
|
||||||
if (e.type == "add" && e.value == 1) {
|
if (e.type == "add" && e.value == 1) {
|
||||||
this.$models.cart.toCart(id).then(() => {
|
this.$models.cart.toCart(id).then(() => {
|
||||||
|
|
Loading…
Reference in New Issue