xuqiang пре 4 година
родитељ
комит
5d7b6af34c

+ 14 - 0
project.private.config.json

@@ -26,6 +26,13 @@
                     "query": "",
                     "scene": null
                 },
+                {
+                    "id": -1,
+                    "name": "商家点餐",
+                    "pathName": "/pages/merchantorders",
+                    "query": "",
+                    "scene": null
+                },
                 {
                     "id": -1,
                     "name": "购物车",
@@ -33,6 +40,13 @@
                     "query": "",
                     "scene": null
                 },
+                {
+                    "id": -1,
+                    "name": "商品详情",
+                    "pathName": "/pages/storedetails",
+                    "query": "",
+                    "scene": null
+                },
                 {
                     "id": -1,
                     "name": "确认订单",

+ 2 - 0
src/main.js

@@ -36,6 +36,8 @@ export default {
             'pages/chooseAddress',
             'pages/receiving',
             'pages/allorder',
+            'pages/merchantorders',
+            'pages/storedetails',
             'pages/confirmorder',
             'pages/orderdetails',
             'pages/apply'

BIN
src/native/imgs/icon-shoucang@3x.png


BIN
src/native/imgs/icon-zan@3x.png


BIN
src/native/imgs/icon_inter@3x.png


BIN
src/native/imgs/info_icon_yidiancan@3x.png


+ 30 - 15
src/pages/confirmorder.vue

@@ -1,7 +1,6 @@
 <config>
 {
     "navigationBarTitleText": "确认订单",
-    "backgroundTextStyle":"light",
     "navigationStyle": "custom",
     "backgroundColorTop":'#159EFF',
 }
@@ -23,8 +22,7 @@
                             {{ item }}
                         </div>
                     </div>
-                    <div class="border1"></div>
-                    <div class="address">
+                    <div class="address" @click="navigateTo('/pages/chooseAddress')">
                         <div>
                             <div class="text">
                                 <img src="../native/imgs/icon_home_top_dingwei@3x.png" alt="" />
@@ -75,7 +73,10 @@
                 <div class="text1">¥{{ list.packPrice }}</div>
             </div>
             <div class="add">
-                <div class="text">合计:¥{{ list.total }}</div>
+                <div class="con">
+                    <div class="text">合计:</div>
+                    <div class="text1">¥{{ list.total }}</div>
+                </div>
             </div>
         </div>
         <div class="pay">
@@ -355,18 +356,17 @@ export default {
             background: #ffffff;
             border-radius: 12px;
             .tabs {
-                padding: 16px 59px;
+                padding: 16px 59px 0;
                 display: flex;
                 justify-content: space-between;
                 .tab {
                     &.active {
                         color: @prim;
-                        // border-bottom: 1px solid @prim;
+                        padding-bottom: 10px;
+                        border-bottom: 1px solid @prim;
                     }
                 }
-            }
-            .border1 {
-                border: 1px solid @bg;
+                border-bottom: 1px solid @bg;
                 margin: 0 12px 20px;
             }
         }
@@ -457,13 +457,22 @@ export default {
             }
         }
         .add {
-            text-align: right;
+            margin-left: 242px;
             padding: 0 16px;
-            .text {
-                font-size: 14px;
-                font-weight: bold;
-                color: #939599;
-                line-height: 24px;
+            .con {
+                .flex();
+                .text {
+                    font-size: 14px;
+                    font-weight: bold;
+                    color: #939599;
+                    line-height: 24px;
+                }
+                .text1 {
+                    font-size: 18px;
+                    font-weight: bold;
+                    color: #ff7f1f;
+                    line-height: 26px;
+                }
             }
         }
         .border {
@@ -538,6 +547,12 @@ export default {
                 font-weight: bold;
                 color: #000000;
                 line-height: 20px;
+                .message {
+                    font-size: 13px;
+                    font-weight: 400;
+                    color: #c8c9cc;
+                    line-height: 22px;
+                }
             }
             .text1 {
                 font-size: 13px;

+ 178 - 0
src/pages/merchantorders.vue

@@ -0,0 +1,178 @@
+<config>
+{
+    "navigationStyle": "custom",
+    "backgroundColorTop":'#159EFF'
+}
+</config>
+<template>
+    <div class="container">
+        <van-sticky>
+            <div class="top">
+                <img class="mytest" src="../native/imgs/img_home_top@4x.png" alt="" />
+                <div class="box">
+                    <div class="title">
+                        <div>
+                            <div class="text">
+                                <div class="text1">益禾堂 (一食堂)</div>
+                                <div class="text2">接受预定</div>
+                            </div>
+                            <div class="text1">起送20元/约20分钟送达/配送费2元</div>
+                            <div class="text2">公告:美好的一天从点心开始</div>
+                        </div>
+                        <div>1111</div>
+                    </div>
+                </div>
+            </div>
+        </van-sticky>
+        <div class="content"></div>
+        <div class="box-total">
+            <div class="ImgBox">
+                <img src="../native/imgs/info_icon_yidiancan@3x.png" alt="" />
+                <div>
+                    <div class="box-con-num">
+                        <img src="../native/imgs/icon_jiage@3x.png" alt="" />
+                        <p>22.00</p>
+                    </div>
+                    <div class="text1">另外配送费2元</div>
+                </div>
+            </div>
+            <van-button type="warning" @click="order">结算</van-button>
+        </div>
+    </div>
+</template>
+<script>
+import { mapState } from 'vuex';
+export default {
+    data() {
+        return {
+            tabs: ['点餐', '评价', '商家']
+        };
+    },
+    computed: {
+        ...mapState(['userInfo'])
+    },
+    methods: {}
+};
+</script>
+<style lang="less" scoped>
+.container {
+    padding-bottom: 150px;
+    /deep/ .van-button {
+        width: 120px;
+        height: 44px;
+        background: @prim;
+        border-radius: 8px;
+        font-size: 16px;
+        font-weight: 400;
+        color: #ffffff;
+        margin-right: 16px;
+        border: 0;
+    }
+    .top {
+        padding: 96px 0 0 16px;
+        .mytest {
+            position: absolute;
+            top: 0;
+            left: 0;
+            right: 0;
+            margin: auto;
+            width: 100%;
+            height: 155px;
+            z-index: -1;
+            img {
+                width: 100vw;
+                display: block;
+            }
+        }
+        .box {
+            width: 343px;
+            height: 120px;
+            background: #ffffff;
+            border-radius: 12px;
+            .title {
+                .flex();
+                justify-content: space-between;
+                padding: 20px 12px;
+                .text {
+                    display: flex;
+                    .text1 {
+                        font-size: 18px;
+                        font-weight: bold;
+                        color: #000000;
+                        line-height: 24px;
+                    }
+                    .text2 {
+                        width: 64px;
+                        height: 20px;
+                        background: #d3edff;
+                        font-size: 13px;
+                        border-radius: 2px;
+                        line-height: 20px;
+                        text-align: center;
+                        margin: 6px 0 0 12px;
+                        color: #159eff;
+                    }
+                }
+                .text1 {
+                    font-size: 13px;
+                    font-weight: 400;
+                    color: #4f4f4f;
+                    line-height: 22px;
+                    margin: 2px 0 10px;
+                }
+                .text2 {
+                    font-size: 13px;
+                    font-weight: 400;
+                    color: #939599;
+                    line-height: 22px;
+                }
+            }
+        }
+    }
+    .box-total {
+        .bottom();
+        .flex();
+        height: 56px;
+        justify-content: space-between;
+        background: #ffffff;
+        width: 100%;
+        position: fixed;
+        bottom: 0;
+        .ImgBox {
+            .flex();
+            img {
+                width: 72px;
+                height: 72px;
+                margin-bottom: 6px;
+            }
+            .box-con-num {
+                .flex();
+                span {
+                    font-size: 14px;
+                    font-weight: bold;
+                    color: #000000;
+                    line-height: 24px;
+                }
+                img {
+                    width: 13px;
+                    height: 13px;
+                    margin-top: 16px;
+                }
+                p {
+                    font-family: 'OSP';
+                    font-size: 34px;
+                    font-weight: normal;
+                    color: #ff7f1f;
+                    line-height: 34px;
+                }
+            }
+            .text1 {
+                font-size: 14px;
+                font-weight: 400;
+                color: #c8c9cc;
+                line-height: 24px;
+            }
+        }
+    }
+}
+</style>

+ 3 - 3
src/pages/orderdetails.vue

@@ -28,7 +28,7 @@
             <div v-for="(item, index) in takeout" :key="index">
                 <div class="content">
                     <div class="ImgBox">
-                        <img :src="item.imges" alt="" />
+                        <img :src="item.image" alt="" />
                         <div>
                             <div class="name">{{ item.name }}</div>
                             <div class="name1">共{{ item.num }}件</div>
@@ -118,14 +118,14 @@ export default {
                         price: '11',
                         name: '南瓜粥',
                         num: '1',
-                        imges:
+                        image:
                             'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-08-10-17-31-24egsujwUw.jpg'
                     },
                     {
                         price: '22',
                         name: '南瓜粥,八宝粥',
                         num: '2',
-                        imges:
+                        image:
                             'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-08-10-17-31-24egsujwUw.jpg'
                     }
                 ]

+ 493 - 0
src/pages/storedetails.vue

@@ -0,0 +1,493 @@
+<config>
+{
+    "navigationBarTitleText": "商品详情",
+    "navigationStyle": "custom",
+}
+</config>
+<template>
+    <div class="container">
+        <van-sticky>
+            <swiper class="swiper" @change="swiperChange" :current="current">
+                <swiper-item v-for="(item, index) in banners" :key="index">
+                    <img :src="item.image" alt="" />
+                </swiper-item>
+            </swiper>
+            <div class="index">{{ swiperCurrent + 1 }}/{{ banners.length }}</div>
+            <div class="title">
+                <div class="top">
+                    <div class="text1">茶树菇老鸭套餐</div>
+                    <div class="text">
+                        <img src="../native/imgs/icon-shoucang@3x.png" alt="" />
+                        <div class="text2">收藏</div>
+                    </div>
+                </div>
+                <div class="con">
+                    <div class="text1">已售 238</div>
+                    <div class="text1">赞 60</div>
+                </div>
+                <div class="buttom">
+                    <div class="text">
+                        <img src="../native/imgs/icon_jiage@3x.png" alt="" />
+                        <div class="text1">20.00</div>
+                        <div class="text2">另外配送费2元</div>
+                    </div>
+                    <div class="calculationCon">
+                        <div class="calculation" @click="calculation">-</div>
+                        <div class="num">{{ count }}</div>
+                        <div class="add" @click="count++">+</div>
+                    </div>
+                </div>
+            </div>
+        </van-sticky>
+        <div class="conTent">
+            <div class="text">详情</div>
+            <div class="border"></div>
+            <div class="box">
+                <div class="text1">掌柜描述:</div>
+                <div class="text2">一道经典的家常菜,吃完会不会想起妈妈的味道呢</div>
+            </div>
+            <div class="box">
+                <div class="text1">主料:</div>
+                <div class="text2">老鸭、百叶、青菜</div>
+            </div>
+            <div class="box">
+                <div class="text1">规格:</div>
+                <div class="text2">1人份 (200g)</div>
+            </div>
+        </div>
+        <div class="evaluate">
+            <div class="title1">
+                <div class="text">评价</div>
+                <div class="con">
+                    <div class="text1">更多</div>
+                    <img src="../native/imgs/icon_inter@3x.png" alt="" />
+                </div>
+            </div>
+            <div class="border"></div>
+            <div class="tabs">
+                <div
+                    class="tab"
+                    :class="{ active: item === active }"
+                    v-for="(item, index) in tabs"
+                    :key="index"
+                    @click="change(item)"
+                >
+                    {{ item }}
+                </div>
+            </div>
+            <div class="evaluateCon">
+                <img v-if="userInfo" :src="userInfo.avatar" alt="" />
+                <div class="conr">
+                    <div class="name">
+                        <div class="txt1" v-if="userInfo">{{ userInfo.nickname }}</div>
+                        <div class="text2">2021.07.03</div>
+                    </div>
+                    <!-- 点赞 -->
+                    <div class="give">
+                        <img src="../native/imgs/icon-zan@3x.png" alt="" />
+                        <div class="text1">赞了该商品</div>
+                    </div>
+                    <div class="remark">哇塞,太好吃了吧,下次还要点,收藏起来。</div>
+                    <div class="image">
+                        <div v-for="(item, index) in lists" :key="index">
+                            <img class="img" :src="item.image" alt="" />
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div class="box-total">
+            <div class="ImgBox">
+                <img src="../native/imgs/info_icon_yidiancan@3x.png" alt="" />
+                <div>
+                    <div class="box-con-num">
+                        <img src="../native/imgs/icon_jiage@3x.png" alt="" />
+                        <p>22.00</p>
+                    </div>
+                    <div class="text1">另外配送费2元</div>
+                </div>
+            </div>
+            <van-button type="warning" @click="order">结算</van-button>
+        </div>
+    </div>
+</template>
+<script>
+import { mapState } from 'vuex';
+export default {
+    data() {
+        return {
+            swiperCurrent: 0,
+            count: 1,
+            banners: [
+                {
+                    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-56-45UCHrCoTS.gif'
+                }
+            ],
+            lists: [
+                {
+                    price: '11',
+                    name: '南瓜粥',
+                    num: '1',
+                    image: 'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-08-13-15-54-36URxMKUXs.jpg'
+                },
+                {
+                    price: '22',
+                    name: '南瓜粥,八宝粥',
+                    num: '2',
+                    image: 'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-08-13-15-56-45UCHrCoTS.gif'
+                }
+            ],
+            tabs: ['全部', '最新', '有图'],
+            active: '全部'
+        };
+    },
+    computed: {
+        ...mapState(['userInfo'])
+    },
+    methods: {
+        change(e) {
+            this.active = e;
+        },
+        order() {
+            this.navigateTo('/pages/confirmorder');
+        },
+        calculation() {
+            if (this.count != 0) {
+                this.count--;
+            }
+        },
+        swiperChange(e) {
+            this.swiperCurrent = e.detail.current;
+        }
+    }
+};
+</script>
+<style lang="less" scoped>
+.container {
+    background: #f5f7fa;
+    padding-bottom: 150px;
+    /deep/ .van-button {
+        width: 120px;
+        height: 44px;
+        background: @prim;
+        border-radius: 8px;
+        font-size: 16px;
+        font-weight: 400;
+        color: #ffffff;
+        margin-right: 16px;
+        border: 0;
+    }
+    .swiper {
+        height: 375px;
+        img {
+            width: 100%;
+            height: 100%;
+        }
+    }
+    .index {
+        position: absolute;
+        right: 14px;
+        top: 333px;
+        z-index: 9999;
+        width: 44px;
+        height: 20px;
+        line-height: 20px;
+        text-align: center;
+        font-weight: bold;
+        color: #ffffff;
+        background: rgba(0, 0, 0, 0.3);
+        border-radius: 9px;
+    }
+    .title {
+        position: absolute;
+        z-index: 9999;
+        background: #ffffff;
+        border-radius: 12px;
+        padding: 20px 14px;
+        margin-top: -15px;
+        .top {
+            .flex();
+            width: 347px;
+            justify-content: space-between;
+            .text1 {
+                font-size: 20px;
+                font-weight: bold;
+                color: #000000;
+                line-height: 28px;
+            }
+            .text {
+                .flex();
+                img {
+                    width: 16px;
+                    height: 16px;
+                    margin-right: 8px;
+                }
+                .text2 {
+                    font-size: 13px;
+                    font-weight: 400;
+                    color: #939599;
+                    line-height: 24px;
+                }
+            }
+        }
+        .con {
+            .flex();
+            margin-top: 6px;
+            margin-bottom: 8px;
+            .text1 {
+                font-size: 14px;
+                font-weight: 400;
+                color: #c8c9cc;
+                line-height: 24px;
+                margin-right: 30px;
+            }
+        }
+        .buttom {
+            .flex();
+            justify-content: space-between;
+            .text {
+                .flex();
+                img {
+                    width: 13px;
+                    height: 13px;
+                    margin-top: 10px;
+                }
+                .text1 {
+                    font-size: 34px;
+                    font-family: 'OSP';
+                    font-weight: normal;
+                    color: #ff7f1f;
+                    line-height: 34px;
+                }
+                .text2 {
+                    font-size: 14px;
+                    font-weight: 400;
+                    color: #c8c9cc;
+                    line-height: 24px;
+                    margin-left: 8px;
+                }
+            }
+            .calculationCon {
+                .flex();
+                text-align: center;
+                .calculation {
+                    width: 24px;
+                    height: 24px;
+                    background: @prim;
+                    line-height: 24px;
+                    font-weight: bold;
+                    color: #fff;
+                }
+                .num {
+                    width: 28px;
+                    height: 24px;
+                    line-height: 24px;
+                    background: #f5f7fa;
+                    border-radius: 2px;
+                    margin: 0 4px;
+                }
+                .add {
+                    width: 24px;
+                    height: 24px;
+                    background: @prim;
+                    line-height: 24px;
+                    font-weight: bold;
+                    color: #fff;
+                }
+            }
+        }
+    }
+    .evaluate {
+        margin-top: 20px;
+        background: #ffffff;
+        border-radius: 12px;
+        padding: 20px 14px;
+        .title1 {
+            .flex();
+            justify-content: space-between;
+            .text {
+                font-size: 18px;
+                font-weight: bold;
+                color: #000000;
+                line-height: 24px;
+            }
+            .con {
+                .flex();
+                .text1 {
+                    font-size: 14px;
+                    font-weight: 400;
+                    color: #c8c9cc;
+                    line-height: 22px;
+                }
+                img {
+                    width: 24px;
+                    height: 24px;
+                    margin-right: -2px;
+                }
+            }
+        }
+        .border {
+            margin: 11px 0;
+            border: 1px solid @bg;
+        }
+        .tabs {
+            .flex();
+            .tab {
+                width: 38px;
+                height: 20px;
+                background: #d3edff;
+                border-radius: 2px;
+                margin-right: 20px;
+                font-size: 13px;
+                color: #939599;
+                text-align: center;
+                line-height: 20px;
+                &.active {
+                    color: @prim;
+                }
+            }
+        }
+        .evaluateCon {
+            display: flex;
+            margin-top: 20px;
+            img {
+                width: 36px;
+                height: 36px;
+                border-radius: 50%;
+                margin-right: 8px;
+            }
+            .conr {
+                width: 293px;
+                .name {
+                    .flex();
+                    justify-content: space-between;
+                    .text1 {
+                        font-size: 15px;
+                        font-weight: 400;
+                        color: #000000;
+                        line-height: 24px;
+                    }
+                    .text2 {
+                        font-size: 13px;
+                        font-weight: 400;
+                        color: #939599;
+                        line-height: 22px;
+                    }
+                }
+                .give {
+                    .flex();
+                    margin: 4px 0;
+                    img {
+                        width: 16px;
+                        height: 16px;
+                    }
+                    .text1 {
+                        font-size: 13px;
+                        font-weight: 400;
+                        color: #939599;
+                        line-height: 24px;
+                        margin-left: 4px;
+                    }
+                }
+                .remark {
+                    font-size: 13px;
+                    font-weight: 400;
+                    color: #000000;
+                    line-height: 22px;
+                }
+                .image {
+                    .flex();
+                    .img {
+                        width: 80px;
+                        height: 80px;
+                        border-radius: 8px;
+                        margin-right: 12px;
+                        margin-top: 5px;
+                    }
+                }
+            }
+        }
+    }
+    .conTent {
+        margin-top: 145px;
+        background: #ffffff;
+        border-radius: 12px;
+        padding: 20px 14px;
+        .text {
+            font-size: 18px;
+            font-weight: bold;
+            color: #000000;
+            line-height: 24px;
+        }
+        .border {
+            margin: 11px 0;
+            border: 1px solid @bg;
+        }
+        .box {
+            display: flex;
+            margin-bottom: 5px;
+            .text1 {
+                width: 79px;
+                font-size: 13px;
+                font-weight: 400;
+                color: #939599;
+                line-height: 22px;
+            }
+            .text2 {
+                font-size: 13px;
+                font-weight: bold;
+                color: #000000;
+                line-height: 22px;
+            }
+        }
+    }
+    .box-total {
+        .bottom();
+        .flex();
+        height: 56px;
+        justify-content: space-between;
+        background: #ffffff;
+        width: 100%;
+        position: fixed;
+        bottom: 0;
+        .ImgBox {
+            .flex();
+            img {
+                width: 72px;
+                height: 72px;
+                margin-bottom: 6px;
+            }
+            .box-con-num {
+                .flex();
+                span {
+                    font-size: 14px;
+                    font-weight: bold;
+                    color: #000000;
+                    line-height: 24px;
+                }
+                img {
+                    width: 13px;
+                    height: 13px;
+                    margin-top: 16px;
+                }
+                p {
+                    font-family: 'OSP';
+                    font-size: 34px;
+                    font-weight: normal;
+                    color: #ff7f1f;
+                    line-height: 34px;
+                }
+            }
+            .text1 {
+                font-size: 14px;
+                font-weight: 400;
+                color: #c8c9cc;
+                line-height: 24px;
+            }
+        }
+    }
+}
+</style>