panhui 6 年 前
コミット
91c143ef93

+ 15 - 5
src/components/AdvertisingSpace.vue

@@ -1,11 +1,11 @@
 <template>
 <template>
     <div class="advertisingSpace">
     <div class="advertisingSpace">
-        <div class="topAd">
+        <div class="topAd" @click="goNext(3)">
             <img src="/static/images/home_banner_000.png" alt="">
             <img src="/static/images/home_banner_000.png" alt="">
         </div>
         </div>
 
 
         <div class="adList">
         <div class="adList">
-            <div class="ad-item" style="background-color:#FF7167">
+            <div class="ad-item" style="background-color:#FF7167" @click="goNext(2)">
                 <div class="left">
                 <div class="left">
                     <div class="title">新人专区</div>
                     <div class="title">新人专区</div>
                     <div class="subTitle">撒欢任性玩</div>
                     <div class="subTitle">撒欢任性玩</div>
@@ -16,7 +16,7 @@
                 <img class="adImg" src="/static/images/home_img_01.png" alt="">
                 <img class="adImg" src="/static/images/home_img_01.png" alt="">
             </div>
             </div>
             <div class="line"></div>
             <div class="line"></div>
-            <div class="ad-item" style="background-color:#9782F8">
+            <div class="ad-item" style="background-color:#9782F8" @click="goNext(1)">
                 <div class="left">
                 <div class="left">
                     <div class="title">好福利</div>
                     <div class="title">好福利</div>
                     <div class="subTitle">辅助文字内容</div>
                     <div class="subTitle">辅助文字内容</div>
@@ -34,6 +34,16 @@ export default {
     data() {
     data() {
         return {};
         return {};
     },
     },
+    methods: {
+        goNext(type) {
+            wx.navigateTo({
+                url:
+                    '/pages/productList/productList?serviceType=' +
+                    type +
+                    '&title=广告专区',
+            });
+        },
+    },
 };
 };
 </script>
 </script>
 <style lang='less' scoped>
 <style lang='less' scoped>
@@ -52,9 +62,9 @@ export default {
 .adList {
 .adList {
     display: flex;
     display: flex;
     justify-content: space-between;
     justify-content: space-between;
-    margin:0 0 30rpx;
+    margin: 0 0 30rpx;
 
 
-    .line{
+    .line {
         width: 18rpx;
         width: 18rpx;
         min-width: 18rpx;
         min-width: 18rpx;
     }
     }

+ 16 - 4
src/components/MenuList.vue

@@ -8,10 +8,10 @@
         <div class="menu-item">
         <div class="menu-item">
             <img src="/static/images/home_icon_zaixian.png" alt="">
             <img src="/static/images/home_icon_zaixian.png" alt="">
             <div>在线客服</div>
             <div>在线客服</div>
-             <button open-type="contact"> 客服</button>
+            <button open-type="contact"> 客服</button>
         </div>
         </div>
 
 
-        <div class="menu-item">
+        <div class="menu-item" @click="takePhone">
             <img src="/static/images/home_icon_lianxi.png" alt="">
             <img src="/static/images/home_icon_lianxi.png" alt="">
             <div>联系我们</div>
             <div>联系我们</div>
         </div>
         </div>
@@ -23,10 +23,22 @@
     </div>
     </div>
 </template>
 </template>
 <script>
 <script>
+import { mapState } from 'vuex';
 export default {
 export default {
     data() {
     data() {
         return {};
         return {};
     },
     },
+    computed: {
+        ...mapState(['storeInfo']),
+    },
+    methods: {
+        takePhone() {
+            console.log('打电话');
+            wx.makePhoneCall({
+                phoneNumber: this.storeInfo.telephone, //仅为示例,并非真实的电话号码
+            });
+        },
+    },
 };
 };
 </script>
 </script>
 <style lang='less' scoped>
 <style lang='less' scoped>
@@ -39,7 +51,7 @@ export default {
         display: flex;
         display: flex;
         flex-direction: column;
         flex-direction: column;
         align-items: center;
         align-items: center;
-        position:relative;
+        position: relative;
         img {
         img {
             width: 128rpx;
             width: 128rpx;
             height: 128rpx;
             height: 128rpx;
@@ -52,7 +64,7 @@ export default {
             transform: translateY(-10rpx);
             transform: translateY(-10rpx);
         }
         }
 
 
-        button{
+        button {
             position: absolute;
             position: absolute;
             left: 0;
             left: 0;
             right: 0;
             right: 0;

+ 28 - 17
src/components/OrderItem.vue

@@ -197,9 +197,9 @@ export default {
                 ];
                 ];
             } else if (this.info.statusFlag == OrderStatus.FINISH) {
             } else if (this.info.statusFlag == OrderStatus.FINISH) {
                 list = [
                 list = [
-                    {
-                        name: '删除订单',
-                    },
+                    // {
+                    //     name: '删除订单',
+                    // },
                     {
                     {
                         name: '查看订单',
                         name: '查看订单',
                         type: 'line',
                         type: 'line',
@@ -207,9 +207,9 @@ export default {
                 ];
                 ];
             } else if (this.info.statusFlag == OrderStatus.CANCEL) {
             } else if (this.info.statusFlag == OrderStatus.CANCEL) {
                 list = [
                 list = [
-                    {
-                        name: '删除订单',
-                    },
+                    // {
+                    //     name: '删除订单',
+                    // },
                     {
                     {
                         name: '查看订单',
                         name: '查看订单',
                         type: 'line',
                         type: 'line',
@@ -233,13 +233,19 @@ export default {
     },
     },
     methods: {
     methods: {
         goDetail() {
         goDetail() {
-            wx.navigateTo({
-                url:
-                    '/pages/orderDetail/orderDetail?orderId=' +
-                    this.info.id +
-                    '&index=' +
-                    (this.orderIndex || this.index),
-            });
+            if (this.statusName == '待支付') {
+                wx.navigateTo({
+                    url: '/pages/submit/submit?orderId=' + this.info.id,
+                });
+            } else {
+                wx.navigateTo({
+                    url:
+                        '/pages/orderDetail/orderDetail?orderId=' +
+                        this.info.id +
+                        '&index=' +
+                        (this.orderIndex || this.index),
+                });
+            }
         },
         },
         clickEvent(name) {
         clickEvent(name) {
             if (name == '立即支付') {
             if (name == '立即支付') {
@@ -267,9 +273,8 @@ export default {
                         '&index=' +
                         '&index=' +
                         (this.orderIndex || this.index),
                         (this.orderIndex || this.index),
                 });
                 });
-            }
-            else if(name=='查看订单'){
-                this.goDetail()
+            } else if (name == '查看订单') {
+                this.goDetail();
             }
             }
         },
         },
         bindDateChange(e) {
         bindDateChange(e) {
@@ -280,6 +285,9 @@ export default {
                 confirmColor: '#00C5F2',
                 confirmColor: '#00C5F2',
                 success(res) {
                 success(res) {
                     if (res.confirm) {
                     if (res.confirm) {
+                        // console.log(ref.orderIndex||ref.index)
+                        //    ref.$emit('update', ref.orderIndex||ref.index);
+                        // return
                         var data = {
                         var data = {
                             id: ref.info.id,
                             id: ref.info.id,
                         };
                         };
@@ -314,7 +322,10 @@ export default {
                             .then(res => {
                             .then(res => {
                                 wx.hideLoading();
                                 wx.hideLoading();
                                 if (res.success) {
                                 if (res.success) {
-                                    ref.$emit('update', ref.index);
+                                    ref.$emit(
+                                        'update',
+                                        ref.orderIndex || ref.index,
+                                    );
                                     wx.showToast({
                                     wx.showToast({
                                         title: '预约成功',
                                         title: '预约成功',
                                         icon: 'success',
                                         icon: 'success',

+ 2 - 2
src/components/ShoppingCart.vue

@@ -5,8 +5,8 @@
             <img v-else src="/static/images/gouwuche_icon_weixuanzhong.png" class="leftIcon" alt="">
             <img v-else src="/static/images/gouwuche_icon_weixuanzhong.png" class="leftIcon" alt="">
         </div>
         </div>
 
 
-        <img class="productImg" v-if="productInfo.image" :src="productInfo.image+'?x-oss-process=image/resize,m_fill,h_120,w_120'" background-size="cover" alt="">
-        <img class="productImg" v-else src="/static/images/icon_sirendingzhi.png" background-size="cover" alt="">
+        <img @click="choose" class="productImg" v-if="productInfo.image" :src="productInfo.image+'?x-oss-process=image/resize,m_fill,h_120,w_120'" background-size="cover" alt="">
+        <img @click="choose" class="productImg" v-else src="/static/images/icon_sirendingzhi.png" background-size="cover" alt="">
 
 
         <div class="content">
         <div class="content">
             <div class="title">{{productInfo.title}}</div>
             <div class="title">{{productInfo.title}}</div>

+ 2 - 1
src/pages/home/home.vue

@@ -29,7 +29,7 @@
             <advertisingSpace></advertisingSpace>
             <advertisingSpace></advertisingSpace>
 
 
             <div class="linearBg">
             <div class="linearBg">
-                <homeCoupon></homeCoupon>
+                <!-- <homeCoupon></homeCoupon> -->
 
 
                 <div class="hot">
                 <div class="hot">
                     <navigator url="/pages/productList/productList?serviceType=1&title=超值热卖" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
                     <navigator url="/pages/productList/productList?serviceType=1&title=超值热卖" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
@@ -175,6 +175,7 @@ export default {
                     console.log(e);
                     console.log(e);
                 });
                 });
         },
         },
+        
     },
     },
     components: {
     components: {
         menuList,
         menuList,

+ 420 - 11
src/pages/orderDetail/orderDetail.vue

@@ -14,21 +14,74 @@
         </div>
         </div>
 
 
         <div class="messageInfo">
         <div class="messageInfo">
-            <div class="text">订单支付成功,请联系客服确定好档期后点击下方预约按钮进行拍照时间预约</div>
+            <div class="bookingInfo" v-if="bookingTimeText">
+                <div>{{bookingTimeText}}</div>
+
+                <div>
+                    店铺地址:{{address}}
+                </div>
+
+                <img class="daohang" @click="goLocation" src="/static/images/icon_daohang (1).png" alt="">
+            </div>
+            <div class="text">{{text}}</div>
             <div class="btnList">
             <div class="btnList">
                 <div class="btn-item">
                 <div class="btn-item">
-                    <img src="/static/images/xiangqing_icon_kefu(1).png" alt="">
+                    <img src="/static/images/xiangqing_icon_kefu.png" alt="">
                     <span>在线咨询</span>
                     <span>在线咨询</span>
+                    <button open-type="contact" class="hide"> 客服</button>
                 </div>
                 </div>
 
 
-                <div class="btn-item">
-                    <img src="/static/images/xiangqing_icon_kefu.png" alt="">
+                <div class="btn-line"></div>
+
+                <div class="btn-item" @click="takePhone">
+                    <img src="/static/images/xiangqing_icon_kefu(1).png" alt="">
                     <span>拨打电话</span>
                     <span>拨打电话</span>
                 </div>
                 </div>
             </div>
             </div>
         </div>
         </div>
 
 
-        <subOrder :list='userOrderDetailList' :productMoney='productMoney' @changeMessage='changeMessage'></subOrder>
+        <div class="orderInfo">
+            <subOrder :list='userOrderDetailList' type='order' :productMoney='productMoney' @changeMessage='changeMessage'></subOrder>
+        </div>
+
+        <div class="payInfo">
+            <div class="order-item">
+                <div class="name">支付方式</div>
+                <div class="val">{{payMode}}</div>
+            </div>
+
+            <div class="line"></div>
+
+            <div class="sub">
+                <div class="order-item">
+                    <div class="name">订单号</div>
+                    <div class="val">{{orderInfo.orderCode}}</div>
+                </div>
+                <div class="order-item">
+                    <div class="name">创建时间</div>
+                    <div class="val">{{createTime}}</div>
+                </div>
+                <div class="order-item">
+                    <div class="name">付款时间</div>
+                    <div class="val">{{payTime}}</div>
+                </div>
+            </div>
+        </div>
+
+        <div class="fixedBottom">
+
+            <div class="submitBtn" v-if="hasBookBtn">
+                <button>{{btnText}}</button>
+                <picker class="picker" mode="date" :start="nowDate" @change="bindDateChange">
+                    <view>
+                        当前选择: {{date}}
+                    </view>
+                </picker>
+            </div>
+
+            <button v-if="statusName=='待评价'" class="submit" @click="goEvaluate">立即评价</button>
+
+        </div>
 
 
     </div>
     </div>
 </template>
 </template>
@@ -36,7 +89,8 @@
 <script>
 <script>
 import { mapState } from 'vuex';
 import { mapState } from 'vuex';
 import subOrder from '../../components/SubOrder';
 import subOrder from '../../components/SubOrder';
-import { OrderStatus } from '../../Constants';
+import { OrderStatus, PayMode } from '../../Constants';
+import { formatTime } from '../../time';
 export default {
 export default {
     data() {
     data() {
         return {
         return {
@@ -94,10 +148,14 @@ export default {
                     img: require('../../../static/images/dingdan_icon_paizhao(1).png'),
                     img: require('../../../static/images/dingdan_icon_paizhao(1).png'),
                 },
                 },
             ],
             ],
+            address: '',
+            latitude: '',
+            longitude: '',
+            storeName: '',
         };
         };
     },
     },
     computed: {
     computed: {
-        ...mapState(['userInfo']),
+        ...mapState(['userInfo', 'storeInfo']),
         transFormLeft() {
         transFormLeft() {
             var left = this.statusFlag * 66;
             var left = this.statusFlag * 66;
             var allLength = this.statusList.length * 66 - 30;
             var allLength = this.statusList.length * 66 - 30;
@@ -114,10 +172,159 @@ export default {
         statusFlag() {
         statusFlag() {
             return this.orderInfo.statusFlag || 0;
             return this.orderInfo.statusFlag || 0;
         },
         },
+        userOrderDetailList() {
+            return [this.orderInfo];
+        },
+        payMode() {
+            var mode = '';
+            if (PayMode.WEI_XIN == this.orderInfo.payMode) {
+                mode = '微信';
+            } else if (PayMode.COIN == this.orderInfo.payMode) {
+                mode = '余额';
+            }
+
+            return mode;
+        },
+        createTime() {
+            return formatTime(this.orderInfo.createTime);
+        },
+        payTime() {
+            return formatTime(this.orderInfo.payTime);
+        },
+        productInfo() {
+            return this.orderInfo.productInfo || {};
+        },
+        storeInfo() {
+            return this.productInfo.storeInfo || {};
+        },
+        statusName() {
+            var name = '';
+            if (this.orderInfo.statusFlag == OrderStatus.NOPAY) {
+                name = '待支付';
+            } else if (this.orderInfo.statusFlag == OrderStatus.PAYOVER) {
+                name = '待预约拍照';
+            } else if (this.orderInfo.statusFlag == OrderStatus.BOOKPHOTO) {
+                name = '待拍照';
+            } else if (this.orderInfo.statusFlag == OrderStatus.PHOTOOVER) {
+                name = '待预约选片';
+            } else if (this.orderInfo.statusFlag == OrderStatus.BOOKSELECT) {
+                name = '待选片';
+            } else if (this.orderInfo.statusFlag == OrderStatus.SELECTOVER) {
+                name = '待预约审片';
+            } else if (this.orderInfo.statusFlag == OrderStatus.BOOKCHECK) {
+                name = '待审片';
+            } else if (this.orderInfo.statusFlag == OrderStatus.CHECKOVER) {
+                name = '待预约取件';
+            } else if (this.orderInfo.statusFlag == OrderStatus.BOOKACCESS) {
+                name = '待取件';
+            } else if (this.orderInfo.statusFlag == OrderStatus.ACCESSOVER) {
+                name = '待评价';
+            } else if (this.orderInfo.statusFlag == OrderStatus.FINISH) {
+                name = '已完成';
+            } else if (this.orderInfo.statusFlag == OrderStatus.CANCEL) {
+                name = '取消';
+            }
+
+            return name;
+        },
+        hasBookBtn() {
+            return this.statusName.indexOf('预约') != -1;
+        },
+        text() {
+            if (this.statusName == '待预约拍照') {
+                return '订单支付成功,请联系客服确定好档期后点击下方预约按钮进行拍照时间预约';
+            } else if (this.statusName == '待拍照') {
+                return '请按照预约日期到达店铺进行拍照,若因故无法按时拍摄,请事先联系客服进行时间调整,感谢您的配合';
+            } else if (this.statusName == '待预约选片') {
+                return '照片已拍摄完毕,请预约选片日期';
+            } else if (this.statusName == '待选片') {
+                return '请按照预约日期到达店铺进行选片,感谢您的配合';
+            } else if (this.statusName == '待预约审片') {
+                return '照片选片已完成,请预约审片时间';
+            } else if (this.statusName == '待审片') {
+                return '请按照预约日期到达店铺进行审片,感谢您的配合';
+            } else if (this.statusName == '待预约取件') {
+                return '图片已全部审片完毕,请预约取件时间';
+            } else if (this.statusName == '待取件') {
+                return '请按照预约日期到达店铺进行取件,感谢您的配合';
+            } else if (this.statusName == '待评价') {
+                return '本次交易已完成,请对我们的服务进行评价';
+            } else if (this.statusName == '已完成') {
+                return '本次交易已完成,感谢您的支持';
+            } else if (this.statusName == '取消') {
+                return '本次交易已取消,感谢您的支持';
+            } else {
+                return '';
+            }
+        },
+        bookingTimeText() {
+            if (this.statusName == '待拍照') {
+                return (
+                    '拍照时间:' +
+                    formatTime(this.orderInfo.bookPhotoTime, 'YMD')
+                );
+            } else if (this.statusName == '待选片') {
+                return (
+                    '选片时间:' +
+                    formatTime(this.orderInfo.bookSelectTime, 'YMD')
+                );
+            } else if (this.statusName == '待审片') {
+                return (
+                    '审片时间:' +
+                    formatTime(this.orderInfo.bookCheckTime, 'YMD')
+                );
+            } else if (this.statusName == '待取件') {
+                return (
+                    '取件时间:' +
+                    formatTime(this.orderInfo.bookAccessTime, 'YMD')
+                );
+            } else {
+                return '';
+            }
+        },
+        btnText() {
+            if (this.statusName == '待预约拍照') {
+                return '立即预约拍照';
+            } else if (this.statusName == '待预约选片') {
+                return '立即预约选片';
+            } else if (this.statusName == '待预约审片') {
+                return '立即预约审片';
+            } else if (this.statusName == '待预约取件') {
+                return '立即预约取件';
+            } else {
+                return '';
+            }
+        },
+        nowDate() {
+            const date = new Date();
+            const year = date.getFullYear();
+            const month = date.getMonth() + 1;
+            const day = date.getDate() + 1;
+
+            return year + '-' + month + '-' + day;
+        },
     },
     },
     onLoad(options) {
     onLoad(options) {
         console.log(options);
         console.log(options);
         this.orderId = options.orderId;
         this.orderId = options.orderId;
+
+        this.$http
+            .get('/storeIntroduction/getOne', {
+                storeId: this.storeInfo.id || 13,
+            })
+            .then(res => {
+                if (res.success) {
+                    this.address = res.data.address;
+                    this.latitude = res.data.latitude;
+                    this.longitude = res.data.longitude;
+                    this.storeName = res.data.title;
+                }
+            })
+            .catch(e => {
+                console.log(e);
+            });
+    },
+    onShow() {
         this.getOrder();
         this.getOrder();
     },
     },
     methods: {
     methods: {
@@ -132,6 +339,87 @@ export default {
                     }
                     }
                 });
                 });
         },
         },
+        takePhone() {
+            console.log('打电话');
+            wx.makePhoneCall({
+                phoneNumber: this.storeInfo.telephone, //仅为示例,并非真实的电话号码
+            });
+        },
+        bindDateChange(e) {
+            var ref = this;
+            wx.showModal({
+                title: '已选择:' + e.mp.detail.value,
+                content: ' 确定要预约当前日期吗?',
+                confirmColor: '#00C5F2',
+                success(res) {
+                    if (res.confirm) {
+                        var data = {
+                            id: ref.orderInfo.id,
+                        };
+                        if (ref.statusName == '待预约拍照') {
+                            data.bookPhotoTime = Date.parse(
+                                new Date(e.mp.detail.value),
+                            );
+                            data.statusFlag = OrderStatus.BOOKPHOTO;
+                        } else if (ref.statusName == '待预约选片') {
+                            data.bookSelectTime = Date.parse(
+                                new Date(e.mp.detail.value),
+                            );
+                            data.statusFlag = OrderStatus.BOOKSELECT;
+                        } else if (ref.statusName == '待预约审片') {
+                            data.bookCheckTime = Date.parse(
+                                new Date(e.mp.detail.value),
+                            );
+                            data.statusFlag = OrderStatus.BOOKCHECK;
+                        } else if (ref.statusName == '待预约取件') {
+                            data.bookAccessTime = Date.parse(
+                                new Date(e.mp.detail.value),
+                            );
+                            data.statusFlag = OrderStatus.BOOKACCESS;
+                        }
+
+                        wx.showLoading({
+                            title: '加载中',
+                            mask: true,
+                        });
+                        ref.$http
+                            .post('/userOrderDetail/update', data)
+                            .then(res => {
+                                wx.hideLoading();
+                                if (res.success) {
+                                    ref.getOrder();
+                                    wx.showToast({
+                                        title: '预约成功',
+                                        icon: 'success',
+                                        duration: 1500,
+                                    });
+                                } else {
+                                    wx.showToast({
+                                        title: res.error,
+                                        icon: 'none',
+                                        duration: 1500,
+                                    });
+                                }
+                            });
+                    } else if (res.cancel) {
+                    }
+                },
+            });
+        },
+        goLocation() {
+            wx.openLocation({
+                latitude: Number(this.latitude),
+                longitude: Number(this.longitude),
+                name: this.storeName,
+                address: this.address,
+                scale: 14,
+            });
+        },
+        goEvaluate() {
+            wx.navigateTo({
+                url: '/pages/evaluate/evaluate?orderId=' + this.orderInfo.id,
+            });
+        },
     },
     },
     components: {
     components: {
         subOrder,
         subOrder,
@@ -144,6 +432,7 @@ export default {
 .container {
 .container {
     min-height: 100%;
     min-height: 100%;
     background-image: linear-gradient(#00c5f2 232rpx, #f2f4f5 232rpx, #f2f4f5);
     background-image: linear-gradient(#00c5f2 232rpx, #f2f4f5 232rpx, #f2f4f5);
+    box-sizing: border-box;
 }
 }
 
 
 .top {
 .top {
@@ -223,8 +512,6 @@ export default {
 }
 }
 
 
 .messageInfo {
 .messageInfo {
-    width: 345px;
-    height: 121px;
     background: rgba(255, 255, 255, 1);
     background: rgba(255, 255, 255, 1);
     border-radius: 8px;
     border-radius: 8px;
     margin: 0 15px;
     margin: 0 15px;
@@ -235,17 +522,19 @@ export default {
         font-weight: bold;
         font-weight: bold;
         color: rgba(0, 0, 0, 1);
         color: rgba(0, 0, 0, 1);
         line-height: 20px;
         line-height: 20px;
-        padding: 15px;
+        padding: 15px 0;
     }
     }
 
 
     .btnList {
     .btnList {
         display: flex;
         display: flex;
-            border-top:1px solid #F2F4F5;
+        border-top: 1px solid #f2f4f5;
+        height: 50px;
         .btn-item {
         .btn-item {
             width: 50%;
             width: 50%;
             display: flex;
             display: flex;
             align-items: center;
             align-items: center;
             justify-content: center;
             justify-content: center;
+            position: relative;
             img {
             img {
                 width: 24px;
                 width: 24px;
                 height: 24px;
                 height: 24px;
@@ -257,7 +546,127 @@ export default {
                 line-height: 18px;
                 line-height: 18px;
                 margin-left: 5px;
                 margin-left: 5px;
             }
             }
+
+            .hide {
+                position: absolute;
+                left: 0;
+                top: 0;
+                right: 0;
+                bottom: 0;
+                opacity: 0;
+            }
+        }
+
+        .btn-line {
+            width: 1px;
+            height: 12px;
+            background: rgba(242, 244, 245, 1);
+            align-self: center;
         }
         }
     }
     }
 }
 }
+
+.orderInfo {
+    margin: 15px 15px 0;
+}
+
+.payInfo {
+    background: rgba(255, 255, 255, 1);
+    border-radius: 8px;
+    margin: 10px 15px;
+    padding: 10px 15px;
+    .order-item {
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        height: 30px;
+
+        div {
+            font-size: 13px;
+            color: rgba(56, 56, 56, 1);
+            line-height: 18px;
+        }
+    }
+
+    .line {
+        height: 1px;
+        background: rgba(242, 244, 245, 1);
+        margin: 10px 0;
+    }
+
+    .sub {
+        .order-item {
+            div {
+                color: #999999;
+            }
+        }
+    }
+}
+.fixedBottom {
+    height: 56px;
+
+    .submit {
+        position: fixed;
+        bottom: 10px;
+        z-index: 20;
+        left: 15px;
+        width: 345px;
+        height: 40px;
+        background: rgba(0, 197, 242, 1);
+        border-radius: 22px;
+        text-align: center;
+        font-size: 15px;
+        font-weight: bold;
+        color: rgba(255, 255, 255, 1);
+        line-height: 40px;
+    }
+
+    .submitBtn {
+        position: fixed;
+        bottom: 10px;
+        z-index: 20;
+        left: 15px;
+        width: 345px;
+        height: 40px;
+        button {
+            width: 345px;
+            height: 40px;
+            background: rgba(0, 197, 242, 1);
+            border-radius: 22px;
+            text-align: center;
+            font-size: 15px;
+            font-weight: bold;
+            color: rgba(255, 255, 255, 1);
+            line-height: 40px;
+        }
+
+        .picker {
+            position: absolute;
+            left: 0;
+            right: 0;
+            bottom: 0;
+            top: 0;
+            opacity: 0;
+        }
+    }
+}
+
+.bookingInfo {
+    padding: 15px 0 0;
+    div {
+        font-size: 13px;
+        font-weight: bold;
+        color: rgba(0, 0, 0, 1);
+        line-height: 20px;
+    }
+    position: relative;
+}
+
+.daohang {
+    width: 24px;
+    height: 24px;
+    position: absolute;
+    right: 0;
+    bottom: 0;
+}
 </style>
 </style>

+ 48 - 19
src/pages/orderList/orderList.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
     <div class="container">
     <div class="container">
         <div class="top" id='top'>
         <div class="top" id='top'>
-            <div class="tabItem" :class="{select:item.orderStatus==chooseOrderStatus}" v-for='(item,index) in tabList' :key="index">
+            <div class="tabItem" @click="chooseTab(item)" :class="{select:item.orderStatus==chooseOrderStatus}" v-for='(item,index) in tabList' :key="index">
                 <div class="name">{{item.name}}</div>
                 <div class="name">{{item.name}}</div>
                 <div class="line"></div>
                 <div class="line"></div>
             </div>
             </div>
@@ -13,7 +13,7 @@
                 <userOrder v-for="(item,index) in orderList" :index='index' @update='update' :key="index" :info='item'></userOrder>
                 <userOrder v-for="(item,index) in orderList" :index='index' @update='update' :key="index" :info='item'></userOrder>
             </div>
             </div>
             <div v-else>
             <div v-else>
-                <orderItem v-for="(item,index) in orderList" :key="index" :info='item'></orderItem>
+                <orderItem v-for="(item,index) in orderList" :key="index" :index='index' @update='update' :info='item'></orderItem>
             </div>
             </div>
 
 
             <view class="weui-loadmore" v-if="isFinish">
             <view class="weui-loadmore" v-if="isFinish">
@@ -81,11 +81,27 @@ export default {
     },
     },
     onLoad(options) {
     onLoad(options) {
         if (options.orderStatus) {
         if (options.orderStatus) {
+            this.chooseOrderStatus = options.orderStatus;
         }
         }
-
+    },
+    onShow() {
+        this.orderList = [];
+        this.currentPage = 1;
+        this.isFinish = false;
+        this.flag = false;
         this.getOrderList();
         this.getOrderList();
     },
     },
     methods: {
     methods: {
+        chooseTab(info) {
+            console.log(info);
+            this.chooseOrderStatus = info.orderStatus;
+
+            this.orderList = [];
+            this.currentPage = 1;
+            this.isFinish = false;
+            this.flag = false;
+            this.getOrderList();
+        },
         update(index) {
         update(index) {
             console.log(index);
             console.log(index);
             if (this.chooseOrderStatus == -1 || this.chooseOrderStatus == 0) {
             if (this.chooseOrderStatus == -1 || this.chooseOrderStatus == 0) {
@@ -98,6 +114,16 @@ export default {
                             this.$set(this.orderList, index, res.data);
                             this.$set(this.orderList, index, res.data);
                         }
                         }
                     });
                     });
+            } else {
+                this.$http
+                    .get('/userOrderDetail/getOne', {
+                        id: this.orderList[index].id,
+                    })
+                    .then(res => {
+                        if (res.success) {
+                            this.$set(this.orderList, index, res.data);
+                        }
+                    });
             }
             }
         },
         },
         getOrderList() {
         getOrderList() {
@@ -110,14 +136,23 @@ export default {
             }
             }
 
 
             var data = {
             var data = {
-                // userId: this.userInfo.id,
+                userId: this.userInfo.id,
                 currentPage: this.currentPage,
                 currentPage: this.currentPage,
             };
             };
-            data.userId=84727
+            // data.userId = 84727;
 
 
-            if (this.chooseOrderStatus == OrderStatus.PAYOVER) {
+            if (this.chooseOrderStatus == OrderStatus.NOPAY) {
                 //未付款
                 //未付款
-                data.statusStr = OrderStatus.PAYOVER;
+                data.statusStr = OrderStatus.NOPAY;
+            } else if (this.chooseOrderStatus == OrderStatus.PAYOVER) {
+                data.statusStr =
+                    OrderStatus.PAYOVER +
+                    ',' +
+                    OrderStatus.PHOTOOVER +
+                    ',' +
+                    OrderStatus.SELECTOVER +
+                    ',' +
+                    OrderStatus.CHECKOVER;
             } else if (this.chooseOrderStatus == OrderStatus.BOOKPHOTO) {
             } else if (this.chooseOrderStatus == OrderStatus.BOOKPHOTO) {
                 //待预约
                 //待预约
                 data.statusStr =
                 data.statusStr =
@@ -126,26 +161,19 @@ export default {
                     OrderStatus.BOOKSELECT +
                     OrderStatus.BOOKSELECT +
                     ',' +
                     ',' +
                     OrderStatus.BOOKCHECK;
                     OrderStatus.BOOKCHECK;
-            } else if (this.chooseOrderStatus == OrderStatus.PHOTOOVER) {
-                data.statusStr =
-                    OrderStatus.PHOTOOVER +
-                    ',' +
-                    OrderStatus.SELECTOVER +
-                    ',' +
-                    OrderStatus.CHECKOVER;
             } else if (this.chooseOrderStatus == OrderStatus.BOOKACCESS) {
             } else if (this.chooseOrderStatus == OrderStatus.BOOKACCESS) {
-                data.statusStr = orderStatus.BOOKACCESS;
+                data.statusStr = OrderStatus.BOOKACCESS;
             } else if (this.chooseOrderStatus == OrderStatus.ACCESSOVER) {
             } else if (this.chooseOrderStatus == OrderStatus.ACCESSOVER) {
-                data.statusStr = orderStatus.ACCESSOVER;
+                data.statusStr = OrderStatus.ACCESSOVER;
             }
             }
 
 
             this.$http
             this.$http
                 .get(
                 .get(
                     this.chooseOrderStatus == -1 ||
                     this.chooseOrderStatus == -1 ||
-                    this.chooseOrderStatus == OrderStatus.PAYOVER
+                    this.chooseOrderStatus == OrderStatus.NOPAY
                         ? '/userOrder/page'
                         ? '/userOrder/page'
                         : '/userOrderDetail/page',
                         : '/userOrderDetail/page',
-                    data
+                    data,
                 )
                 )
                 .then(res => {
                 .then(res => {
                     if (res.success) {
                     if (res.success) {
@@ -165,7 +193,8 @@ export default {
                 });
                 });
         },
         },
         goHome() {
         goHome() {
-            wx.navigateTo({
+            console.log('aaaaaaaa');
+            wx.switchTab({
                 url: '/pages/home/home',
                 url: '/pages/home/home',
             });
             });
         },
         },

+ 2 - 1
src/pages/product/product.vue

@@ -59,7 +59,7 @@
                     产品详情
                     产品详情
                 </div>
                 </div>
                 <div class="tabItem" :class="{select:nowSelectTab==2}" @click="chooseTab(2)">
                 <div class="tabItem" :class="{select:nowSelectTab==2}" @click="chooseTab(2)">
-                    评价(256)
+                    评价({{productInfo.commentNum||0}})
                 </div>
                 </div>
 
 
                 <div class="line" :style="{left:(100*nowSelectTab+77.5)+'px'}"></div>
                 <div class="line" :style="{left:(100*nowSelectTab+77.5)+'px'}"></div>
@@ -390,6 +390,7 @@ export default {
                     //购物车存在该商品,增加商品数量
                     //购物车存在该商品,增加商品数量
                     var data = res;
                     var data = res;
                     data.amount = data.amount + this.chooseNum;
                     data.amount = data.amount + this.chooseNum;
+                    delete data.productInfo
                     this.$http
                     this.$http
                         .post('/shoppingCart/update', data)
                         .post('/shoppingCart/update', data)
                         .then(res => {
                         .then(res => {

+ 4 - 3
src/pages/shoppingCart/shoppingCart.vue

@@ -19,7 +19,7 @@
             <img src="/static/images/kong_icon_gouwuche.png" alt="">
             <img src="/static/images/kong_icon_gouwuche.png" alt="">
             <div class="title">购物车还没东西哦</div>
             <div class="title">购物车还没东西哦</div>
             <div class="sub">还没找到自己喜欢的东西吗</div>
             <div class="sub">还没找到自己喜欢的东西吗</div>
-            <button  @click="goHome">去逛逛</button>
+            <button @click="goHome">去逛逛</button>
         </div>
         </div>
 
 
         <div class="fixedBottom" v-if="!isConfig">
         <div class="fixedBottom" v-if="!isConfig">
@@ -119,8 +119,8 @@ export default {
             }
             }
             return money;
             return money;
         },
         },
-        goHome(){
-                wx.navigateTo({
+        goHome() {
+            wx.switchTab({
                 url: '/pages/home/home',
                 url: '/pages/home/home',
             });
             });
         },
         },
@@ -170,6 +170,7 @@ export default {
             if (this.isChooseAll) {
             if (this.isChooseAll) {
                 this.chooseList = [];
                 this.chooseList = [];
             } else {
             } else {
+                this.chooseList = [];
                 var list = [...this.cartList];
                 var list = [...this.cartList];
                 list.forEach(item => {
                 list.forEach(item => {
                     this.chooseList.push(item.id);
                     this.chooseList.push(item.id);

+ 1 - 0
src/pages/submit/submit.vue

@@ -108,6 +108,7 @@ export default {
         },
         },
     },
     },
     onLoad(options) {
     onLoad(options) {
+        this.message=''
         console.log(options);
         console.log(options);
         this.refreash();
         this.refreash();
         if (options.submitPage) {
         if (options.submitPage) {

+ 1 - 2
src/pages/successPage/successPage.vue

@@ -42,8 +42,7 @@ export default {
             if (this.sureBtn == '查看订单') {
             if (this.sureBtn == '查看订单') {
                 wx.redirectTo({
                 wx.redirectTo({
                     url:
                     url:
-                        '/pages/orderDetail/orderDetail?orderId=' +
-                        this.orderId,
+                        '/pages/orderList/orderList'
                 });
                 });
             }
             }
         },
         },

+ 11 - 4
src/pages/user/user.vue

@@ -15,7 +15,7 @@
         <div class="notice">
         <div class="notice">
             <img src="/static/images/info_icon_tongzhi.png" alt="">
             <img src="/static/images/info_icon_tongzhi.png" alt="">
             <div class="content">
             <div class="content">
-                活动或者订单通告
+                测试版上线了
             </div>
             </div>
 
 
             <div class="sub">查看</div>
             <div class="sub">查看</div>
@@ -54,18 +54,18 @@
         </div>
         </div>
 
 
         <div class="menuList">
         <div class="menuList">
-            <div class="menu-item">
+            <div class="menu-item" @click="goNext">
                 <img src="/static/images/info_icon_jifen.png" alt="">
                 <img src="/static/images/info_icon_jifen.png" alt="">
                 <div class="name">我的积分</div>
                 <div class="name">我的积分</div>
                 <img src="/static/images/icon_inter.png" alt="">
                 <img src="/static/images/icon_inter.png" alt="">
             </div>
             </div>
-            <div class="menu-item">
+            <div class="menu-item" @click="goNext">
                 <img src="/static/images/info_icon_jifen(1).png" alt="">
                 <img src="/static/images/info_icon_jifen(1).png" alt="">
                 <div class="name">我的优惠券</div>
                 <div class="name">我的优惠券</div>
                 <img src="/static/images/icon_inter.png" alt="">
                 <img src="/static/images/icon_inter.png" alt="">
             </div>
             </div>
 
 
-            <div class="menu-item">
+            <div class="menu-item" @click="goNext">
                 <img src="/static/images/info_icon_jifen(2).png" alt="">
                 <img src="/static/images/info_icon_jifen(2).png" alt="">
                 <div class="name">我的地址</div>
                 <div class="name">我的地址</div>
                 <img src="/static/images/icon_inter.png" alt="">
                 <img src="/static/images/icon_inter.png" alt="">
@@ -105,6 +105,13 @@ export default {
                 url: '/pages/orderList/orderList',
                 url: '/pages/orderList/orderList',
             });
             });
         },
         },
+        goNext() {
+            wx.showToast({
+                title: '敬请期待',
+                icon: 'none',
+                duration: 1500,
+            });
+        },
     },
     },
 };
 };
 </script>
 </script>

BIN
static/images/icon_daohang (1).png


+ 0 - 5
static/images/去除文件名中.bat

@@ -1,5 +0,0 @@
-@echo off& setlocal enabledelayedexpansion
-
-for /f "delims=" %%1 in ('dir /a /b') do (set wind=%%1
-
-ren "%%~1" "!wind:@3x=!")