|
|
@@ -1,13 +1,12 @@
|
|
|
<config>
|
|
|
{
|
|
|
"navigationStyle": "custom",
|
|
|
- "navigationBarTextStyle": "white",
|
|
|
- "backgroundColorTop":'#159EFF'
|
|
|
+ "navigationBarTextStyle": "white"
|
|
|
}
|
|
|
</config>
|
|
|
<template>
|
|
|
<div class="container">
|
|
|
- <nav-merchantir></nav-merchantir>
|
|
|
+ <nav-header></nav-header>
|
|
|
<van-sticky>
|
|
|
<div class="top">
|
|
|
<img
|
|
|
@@ -205,72 +204,21 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="box-total">
|
|
|
- <div class="ImgBox">
|
|
|
- <img
|
|
|
- :src="
|
|
|
- `https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/${
|
|
|
- tal ? '2021-09-15-13-52-40fgNrakko.png' : '2021-09-01-16-30-03wvZqsAeX.png'
|
|
|
- }`
|
|
|
- "
|
|
|
- alt=""
|
|
|
- @click="addFlag"
|
|
|
- />
|
|
|
- <div>
|
|
|
- <div class="box-num">
|
|
|
- <img
|
|
|
- src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-09-02-16-03-40cShzZQEk.png"
|
|
|
- alt=""
|
|
|
- />
|
|
|
- <p>{{ tal }}</p>
|
|
|
- <div class="text1">.00</div>
|
|
|
- </div>
|
|
|
- <div class="text1">另外配送费2元</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <van-button :disabled="!canSubmit" type="warning" @click="order">结算</van-button>
|
|
|
- </div>
|
|
|
- <van-popup :show="show" position="bottom" @close="show = false">
|
|
|
- <div class="popupTop">
|
|
|
- <div class="text1">已选商品</div>
|
|
|
- <div class="text2">(包装费 </div>
|
|
|
- <div class="text3">¥5)</div>
|
|
|
- </div>
|
|
|
- <div 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>
|
|
|
- <van-stepper
|
|
|
- :min="min"
|
|
|
- disable-input
|
|
|
- @minus="minus(item.price)"
|
|
|
- @plus="add(item.price)"
|
|
|
- @change="onChange"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </van-popup>
|
|
|
+ <orderBtn :tal="tal" :count="count" :merchantorLists="merchantorLists"></orderBtn>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import { mapState } from 'vuex';
|
|
|
-import NavMerchantir from '../components/NavMerchantir.vue';
|
|
|
+import NavHeader from '../components/NavHeader.vue';
|
|
|
+import orderBtn from '../components/orderBtn.vue';
|
|
|
export default {
|
|
|
- components: { NavMerchantir },
|
|
|
+ components: { NavHeader, orderBtn },
|
|
|
data() {
|
|
|
return {
|
|
|
active: '点餐',
|
|
|
active2: '全部',
|
|
|
falg: 0,
|
|
|
min: 0,
|
|
|
- or_amount: 0,
|
|
|
- // now_amount: 0,
|
|
|
- show: false,
|
|
|
count: 0,
|
|
|
tal: 0,
|
|
|
tabs: ['点餐', '评价', '商家'],
|
|
|
@@ -344,26 +292,16 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapState(['userInfo']),
|
|
|
- canSubmit() {
|
|
|
- if (this.tal) {
|
|
|
- return true;
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
+ ...mapState(['userInfo'])
|
|
|
+ // canSubmit() {
|
|
|
+ // if (this.tal) {
|
|
|
+ // return true;
|
|
|
+ // } else {
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
},
|
|
|
methods: {
|
|
|
- order() {
|
|
|
- if (!this.tal) {
|
|
|
- wx.showToast({
|
|
|
- icon: 'none',
|
|
|
- title: '请选择商品'
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- this.navigateTo('/pages/confirmorder');
|
|
|
- },
|
|
|
tab(item) {
|
|
|
this.active = item;
|
|
|
},
|
|
|
@@ -376,15 +314,7 @@ export default {
|
|
|
onChange(e) {
|
|
|
this.count = e.detail;
|
|
|
},
|
|
|
- addFlag() {
|
|
|
- if (this.count > 0) {
|
|
|
- if (this.show === true) {
|
|
|
- this.show = false;
|
|
|
- } else {
|
|
|
- this.show = true;
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
+
|
|
|
falgs(price) {
|
|
|
this.tal = price * 1;
|
|
|
this.count = 1;
|
|
|
@@ -676,96 +606,5 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .box-total {
|
|
|
- .bottom();
|
|
|
- .flex();
|
|
|
- z-index: 101;
|
|
|
- box-shadow: 0px -1px 2px 0px rgba(0, 0, 0, 0.04);
|
|
|
- .btn();
|
|
|
- .ImgBox {
|
|
|
- .flex();
|
|
|
- img {
|
|
|
- width: 72px;
|
|
|
- height: 72px;
|
|
|
- margin-bottom: 6px;
|
|
|
- }
|
|
|
- .box-num {
|
|
|
- .flex();
|
|
|
- span {
|
|
|
- .span();
|
|
|
- }
|
|
|
- img {
|
|
|
- width: 13px;
|
|
|
- height: 13px;
|
|
|
- margin-top: 16px;
|
|
|
- }
|
|
|
- p {
|
|
|
- .p();
|
|
|
- }
|
|
|
- .text1 {
|
|
|
- .text10();
|
|
|
- }
|
|
|
- }
|
|
|
- .text1 {
|
|
|
- font-size: 14px;
|
|
|
- font-weight: 400;
|
|
|
- color: #c8c9cc;
|
|
|
- line-height: 24px;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- .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;
|
|
|
- }
|
|
|
- .text3 {
|
|
|
- color: #ff7f1f;
|
|
|
- }
|
|
|
- }
|
|
|
- .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 {
|
|
|
- .span();
|
|
|
- color: #1c1c1c;
|
|
|
- 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 {
|
|
|
- .price();
|
|
|
- }
|
|
|
- .add {
|
|
|
- .add();
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
</style>
|