|
@@ -212,6 +212,7 @@
|
|
|
}`
|
|
}`
|
|
|
"
|
|
"
|
|
|
alt=""
|
|
alt=""
|
|
|
|
|
+ @click="addFlag"
|
|
|
/>
|
|
/>
|
|
|
<div>
|
|
<div>
|
|
|
<div class="box-con-num">
|
|
<div class="box-con-num">
|
|
@@ -226,6 +227,38 @@
|
|
|
</div>
|
|
</div>
|
|
|
<van-button :disabled="!canSubmit" type="warning" @click="order">结算</van-button>
|
|
<van-button :disabled="!canSubmit" type="warning" @click="order">结算</van-button>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <van-popup :show="show" position="bottom" @close="show = false">
|
|
|
|
|
+ <div class="popupTop">
|
|
|
|
|
+ <div class="text1">已选商品</div>
|
|
|
|
|
+ <div class="text2">(包装费 ¥5)</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ @click="navigateTo('/pages/storedetails')"
|
|
|
|
|
+ class="popup"
|
|
|
|
|
+ v-for="(item, index) in merchantorLists"
|
|
|
|
|
+ :key="index"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="merchantroCon">
|
|
|
|
|
+ <img :src="item.image" alt="" />
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <div class="text1">{{ item.name }}</div>
|
|
|
|
|
+ <div class="bottom" @click.stop>
|
|
|
|
|
+ <div class="price">¥{{ item.price }}.00</div>
|
|
|
|
|
+ <div v-if="count == 0">
|
|
|
|
|
+ <div class="add" @click="falgs(item.price)">+</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <van-stepper
|
|
|
|
|
+ v-else
|
|
|
|
|
+ :min="min"
|
|
|
|
|
+ @minus="minus(item.price)"
|
|
|
|
|
+ @plus="add(item.price)"
|
|
|
|
|
+ @change="onChange"
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </van-popup>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
@@ -239,6 +272,7 @@ export default {
|
|
|
active2: '全部',
|
|
active2: '全部',
|
|
|
falg: 0,
|
|
falg: 0,
|
|
|
min: 0,
|
|
min: 0,
|
|
|
|
|
+ show: false,
|
|
|
count: 0,
|
|
count: 0,
|
|
|
tal: 0,
|
|
tal: 0,
|
|
|
tabs: ['点餐', '评价', '商家'],
|
|
tabs: ['点餐', '评价', '商家'],
|
|
@@ -254,13 +288,13 @@ export default {
|
|
|
lists: [
|
|
lists: [
|
|
|
{
|
|
{
|
|
|
price: '11',
|
|
price: '11',
|
|
|
- name: '南瓜粥',
|
|
|
|
|
|
|
+ name: '寿司',
|
|
|
num: '1',
|
|
num: '1',
|
|
|
image: 'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-08-13-15-54-36URxMKUXs.jpg'
|
|
image: 'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-08-13-15-54-36URxMKUXs.jpg'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
price: '22',
|
|
price: '22',
|
|
|
- name: '南瓜粥,八宝粥',
|
|
|
|
|
|
|
+ name: '寿司,八宝粥',
|
|
|
num: '2',
|
|
num: '2',
|
|
|
image: 'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-08-13-15-56-45UCHrCoTS.gif'
|
|
image: 'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-08-13-15-56-45UCHrCoTS.gif'
|
|
|
}
|
|
}
|
|
@@ -286,7 +320,7 @@ export default {
|
|
|
],
|
|
],
|
|
|
merchantorLists: [
|
|
merchantorLists: [
|
|
|
{
|
|
{
|
|
|
- name: '南瓜粥',
|
|
|
|
|
|
|
+ name: '寿司',
|
|
|
image: 'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-08-13-15-54-36URxMKUXs.jpg',
|
|
image: 'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-08-13-15-54-36URxMKUXs.jpg',
|
|
|
num: '226',
|
|
num: '226',
|
|
|
price: 20
|
|
price: 20
|
|
@@ -341,6 +375,15 @@ export default {
|
|
|
onChange(e) {
|
|
onChange(e) {
|
|
|
this.count = e.detail;
|
|
this.count = e.detail;
|
|
|
},
|
|
},
|
|
|
|
|
+ addFlag() {
|
|
|
|
|
+ if (this.count > 0) {
|
|
|
|
|
+ if (this.show === true) {
|
|
|
|
|
+ this.show = false;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.show = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
falgs(price) {
|
|
falgs(price) {
|
|
|
this.tal = price * 1;
|
|
this.tal = price * 1;
|
|
|
this.count = 1;
|
|
this.count = 1;
|
|
@@ -370,8 +413,12 @@ export default {
|
|
|
margin-right: 16px;
|
|
margin-right: 16px;
|
|
|
border: 0;
|
|
border: 0;
|
|
|
}
|
|
}
|
|
|
|
|
+ /deep/ .van-popup {
|
|
|
|
|
+ margin-bottom: 73px;
|
|
|
|
|
+ border-radius: 12px 12px 0 0;
|
|
|
|
|
+ }
|
|
|
/deep/ .van-tree-select {
|
|
/deep/ .van-tree-select {
|
|
|
- margin: 21px -20px 0 -20px;
|
|
|
|
|
|
|
+ margin: 21px -20px 0;
|
|
|
}
|
|
}
|
|
|
/deep/ .van-sidebar-item {
|
|
/deep/ .van-sidebar-item {
|
|
|
padding: 8px 0 8px 16px;
|
|
padding: 8px 0 8px 16px;
|
|
@@ -620,8 +667,7 @@ export default {
|
|
|
width: 80px;
|
|
width: 80px;
|
|
|
height: 80px;
|
|
height: 80px;
|
|
|
border-radius: 8px;
|
|
border-radius: 8px;
|
|
|
- margin-right: 12px;
|
|
|
|
|
- margin-top: 5px;
|
|
|
|
|
|
|
+ margin: 5px 12px 0 0;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -672,6 +718,7 @@ export default {
|
|
|
.bottom();
|
|
.bottom();
|
|
|
.flex();
|
|
.flex();
|
|
|
height: 56px;
|
|
height: 56px;
|
|
|
|
|
+ z-index: 101;
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
background: #ffffff;
|
|
background: #ffffff;
|
|
|
box-shadow: 0px -1px 2px 0px rgba(0, 0, 0, 0.04);
|
|
box-shadow: 0px -1px 2px 0px rgba(0, 0, 0, 0.04);
|
|
@@ -714,5 +761,66 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ .popupTop {
|
|
|
|
|
+ .flex();
|
|
|
|
|
+ margin: 16px 0 0 16px;
|
|
|
|
|
+ font-size: 13px;
|
|
|
|
|
+ font-weight: 400;
|
|
|
|
|
+ line-height: 18px;
|
|
|
|
|
+ .text1 {
|
|
|
|
|
+ color: #1c1c1c;
|
|
|
|
|
+ margin-right: 6px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .text2 {
|
|
|
|
|
+ color: #939599;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .popup {
|
|
|
|
|
+ padding: 0 16px 0 16px;
|
|
|
|
|
+ .merchantroCon {
|
|
|
|
|
+ .flex();
|
|
|
|
|
+ margin-top: 20px;
|
|
|
|
|
+ img {
|
|
|
|
|
+ width: 80px;
|
|
|
|
|
+ height: 80px;
|
|
|
|
|
+ border-radius: 8px;
|
|
|
|
|
+ margin: 0 10px 0 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ .text1 {
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ color: #1c1c1c;
|
|
|
|
|
+ line-height: 24px;
|
|
|
|
|
+ margin-bottom: 32px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .text2 {
|
|
|
|
|
+ font-size: 13px;
|
|
|
|
|
+ font-weight: 400;
|
|
|
|
|
+ color: #939599;
|
|
|
|
|
+ line-height: 18px;
|
|
|
|
|
+ margin: 2px 0 6px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .bottom {
|
|
|
|
|
+ .flex();
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ width: 252px;
|
|
|
|
|
+ .price {
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ font-weight: 400;
|
|
|
|
|
+ color: #ff7f1f;
|
|
|
|
|
+ line-height: 24px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add {
|
|
|
|
|
+ width: 24px;
|
|
|
|
|
+ height: 24px;
|
|
|
|
|
+ background: @prim;
|
|
|
|
|
+ line-height: 24px;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|