lbj преди 2 години
родител
ревизия
7d2561807b

+ 77 - 55
pages/order_details/order_details.js

@@ -1,65 +1,87 @@
 // pages/order_details/order_details.js
-Page({ 
-    /**
-     * 页面的初始数据
-     */
-    data: {
-        tuikuan: '退 款',
-    },
-    async onClickRefund(e) {
-        if(this.data.tuikuan == "已退款"){
-          return 
-        }
-        let res = await wx.showModal({
-            title: '确认退款',
-        })
-        console.log(res)
-        if (res.cancel) return;
-     
-        wx.showToast({
-            title: '退款成功',
-            icon: 'success'
-        })
-        this.setData({
-          tuikuan: '已退款'
-        })
-    },
-    changValue() {
-        if(onClickRefund(e)){
-            this.setData({
-                tuikuan: '已退款'
-            })
+Page({
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    tuikuan: '退 款',
+    yipeisong: false,
+    peisongren :""
+  },
+  async onClickRefund(e) {
+    if (this.data.tuikuan == "已退款") {
+      return
+    }
+    let res = await wx.showModal({
+      title: '确认退款',
+    })
+    console.log(res)
+    if (res.cancel) return;
+
+    wx.showToast({
+      title: '退款成功',
+      icon: 'success'
+    })
+    this.setData({
+      tuikuan: '已退款'
+    })
+  },
+  changValue() {
+    if (onClickRefund(e)) {
+      this.setData({
+        tuikuan: '已退款'
+      })
+    }
+  },
+  //   // 
+  // },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    // 后期接口出来如果直接调用接口 if 已经配送 那么  yipeisong = true 
+    // 默认不显示 false 
+    wx.request({
+      url: 'https://www.fastmock.site/mock/f528b4a479c72409aace9493f1c0e880/waimai/getWaiMaiName',
+      method: 'GET',
+      header: {
+        'content-type': 'application/json' // 默认值
+      },
+      success: (res => {
+        console.log(res);
+        res.data.isPei = true
+        if (res.data.isPei == true) {
+          this.setData({
+            yipeisong :true,
+            peisongren : res.data.peisongName
+          })
         }
-    },
-        //   // 
-        // },
+      }),
+    })
 
-        /**
-         * 生命周期函数--监听页面加载
-         */
-        onLoad(options) {
-            wx.setNavigationBarTitle({ title: '订单详情' })
-        },
+    wx.setNavigationBarTitle({ title: '订单详情' })
+  },
 
-        /**
-         * 生命周期函数--监听页面初次渲染完成
-         */
-        onReady() {
+  /**
+   * 生命周期函数--监听页面初次渲染完 成
+   */
+  onReady() {
 
-        },
+  },
 
-        /**
-         * 生命周期函数--监听页面显示
-         */
-        onShow() {
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
 
-        },
+  },
 
-        /**
-         * 生命周期函数--监听页面隐藏
-         */
-        onHide() {
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
 
-        },
+  },
 
-    })
+})

+ 106 - 88
pages/order_details/order_details.wxml

@@ -1,104 +1,122 @@
-<view style="margin: 5%;">
-    <view class="order_box" style="padding: 30rpx;box-sizing: border-box;">
-        <view class="order_title">
-            哈尔滨师范大学第一公寓2门321</view>
-        <view style="display: flex; justify-content: left;">
-            <view class="order_smalltitle">
-                颜值在线(女士)
-            </view>
-            <view class="order_phone">
-                18959372145
-            </view>
-        </view>
+<view style="margin: 5%; ">
+  <view class="order_box" style="padding: 30rpx;box-sizing: border-box;">
+    <view class="order_title">
+      哈尔滨师范大学第一公寓2门321</view>
+    <view style="display: flex; justify-content: left;">
+      <view class="order_smalltitle">
+        颜值在线(女士)
+      </view>
+      <view class="order_phone">
+        15639670876
+      </view>
     </view>
+  </view>
 
-    <view class="content-box">
-        <view class="content-title">
-            <image class="img-1" src="../../images/外卖小程序/麻辣烫-微辣.png" alt="" />
-        </view>
-        <view style="width: 300rpx; float: left;">
-            <view class="content-detail">
-                老式麻辣烫(微辣)
-            </view>
-            <view style="color:#8b8b8b;font-size: 13px;">
-                *2
-            </view>
-        </view>
-
-        <view class="order-money">
-            ¥9.9+20积分
-        </view>
-
-        <view class="divLine">
-        </view>
+  <view class="content-box">
+    <view class="content-title">
+      <image class="img-1" src="../../images/外卖小程序/麻辣烫-微辣.png" alt="" />
+    </view>
+    <view style="width: 300rpx; float: left;">
+      <view class="content-detail">
+        老式麻辣烫(微辣)
+      </view>
+      <view style="color:#8b8b8b;font-size: 13px;">
+        *2
+      </view>
+    </view>
 
-        <view style="height: 100rpx">
-            <view class="content-left" style="color: #8b8b8b;">
-                包装费:
-                配送费:
-            </view>
-            <view class="content-right" style="color: red;font-weight: 500;">
-                ¥0
-                ¥3
-            </view>
-        </view>
+    <view class="order-money">
+      ¥9.9+20积分
+    </view>
 
+    <view class="divLine">
     </view>
 
-    <view class="remark">
-        备注
-        <view class="remark-underline">
-        </view>
-        不要香菜,不要蒜
+    <view style="height: 100rpx">
+      <view class="content-left" style="color: #8b8b8b;">
+        包装费:
+        配送费:
+      </view>
+      <view class="content-right" style="color: red;font-weight: 500;">
+        ¥0
+        ¥3
+      </view>
     </view>
 
-    <view class="logistics-box">
-        <view style="height: 40rpx; padding-top: 20rpx;">
-            <view class="logistic-information-left">
-                订单编号:
-            </view>
-            <view class="logistic-information-right">
-                9898988549523365891
-            </view>
-        </view>
-        <view style=" margin: 20rpx 0rpx; background: #E0E3DA;width: 95%;height: 1rpx;">
-        </view>
+  </view>
 
-        <view style="height: 40rpx; padding-top: 20rpx;">
-            <view class="logistic-information-left">
-                交易时间:
-            </view>
-            <view class="logistic-information-right">
-                2023-04-25 15:56:18
-            </view>
-        </view>
-        <view style=" margin: 20rpx 0rpx; background: #E0E3DA;width: 95%;height: 1rpx;">
-        </view>
+  <view class="remark">
+    备注
+    <view class="remark-underline">
+    </view>
+    不要香菜,不要蒜
+  </view>
 
-        <view style="height: 40rpx; padding-top: 20rpx;">
-            <view class="logistic-information-left" style="width: 200rpx;">
-                积分抵扣:
-            </view>
-            <view class="logistic-information-right">
-                30积分
-            </view>
-        </view>
-        <view style=" margin: 20rpx 0rpx; background: #E0E3DA;width: 95%;height: 1rpx;">
-        </view>
+  <view class="logistics-box">
+    <view style="height: 40rpx; padding-top: 20rpx;">
+      <view class="logistic-information-left">
+        订单编号:
+      </view>
+      <view class="logistic-information-right">
+        989898854952336
+      </view>
+    </view>
+    <view style=" margin: 20rpx 0rpx; background: #E0E3DA;width: 95%;height: 1rpx">
+    </view>
 
-        <view style="height: 40rpx; padding-top: 20rpx; padding-bottom: 20rpx;">
-            <view class="logistic-information-left">
-                实付金额:
-            </view>
-            <view class="logistic-information-right" style="color:red;">
-                ¥21.98
-            </view>
+    <view style="height: 40rpx; padding-top: 20rpx;">
+      <view class="logistic-information-left">
+        交易时间:
+      </view>
+      <view class="logistic-information-right">
+        2023-04-25 15:56:18
+      </view>
+    </view>
+    <view style=" margin: 20rpx 0rpx; background: #E0E3DA;width: 95%;height: 1rpx;">
+    </view>
+
+    <view style="height: 40rpx; padding-top: 20rpx;">
+      <view class="logistic-information-left" style="width: 200rpx;">
+        积分抵扣:
+      </view>
+      <view class="logistic-information-right">
+        30积分
+      </view>
+    </view>
+    <view style=" margin: 20rpx 0rpx; background: #E0E3DA;width: 95%;height: 1rpx;">
+    </view>
 
-        </view>
+    <view style="height: 40rpx; padding-top: 20rpx; padding-bottom: 20rpx;">
+      <view class="logistic-information-left">
+        实付金额:
+      </view>
+      <view class="logistic-information-right" style="color:red;">
+        ¥21.98
+      </view>
+    </view>
+  </view>
+  <!-- 点击  是否显示  配送人  通过wx:if = {{yipeisong}}   if yipeisong == true  显示  -->
+  <view  class="logistics-box" wx:if="{{yipeisong}}">
+    <view style="height: 40rpx; padding-top: 20rpx;">
+      <view class="logistic-information-left">
+        配送人
+      </view>
+      
+    </view>
+    <view style=" margin: 20rpx 0rpx; background: #E0E3DA;width: 95%;height: 1rpx;">
     </view>
 
-    <view class="tabbar" style="display: flex;justify-content: center;">
-        <van-button color="#aeaeae" round custom-style="margin-right: 20rpx; width: 300rpx" bind:click="onClickRefund"> {{tuikuan}} </van-button>
-        <van-button color="#ff8e0b" round custom-style="width: 300rpx" bind:click="onClickrint">重新打印</van-button>
+    <view style="height: 40rpx; padding-top: 20rpx;">
+      <view class="logistic-information-left" style="width: 200rpx;">
+        {{peisongren}}
+      </view>
     </view>
+  </view>
+  <!-- #end -->
+  <view class="tabbar" style="margin-top: 15rpx ; padding-bottom: 10rpx;  display: flex;justify-content: center;margin-bottom: 0;">
+    <van-button color="#aeaeae" round custom-style="margin-right: 20rpx; width: 300rpx" bind:click="onClickRefund"> {{tuikuan}} </van-button>
+    <van-button color="#ff8e0b" round custom-style="width: 300rpx" bind:click="onClickrint">重新打印</van-button>
+  </view>
+
+
 </view>

+ 0 - 12
pages/order_details/order_details.wxss

@@ -145,16 +145,4 @@ page {
   /* box-sizing: border-box; */
   /* margin-left: 20rpx; */
   color: #8b8b8b;
-}
-
-/* .tab-bar1 {
-  margin: 100rpx 50rpx;
-} */
-
-.tabbar {
-  position: fixed;
-  left: 0;
-  bottom: 40rpx;
-  width: 100%;
-  height: 90rpx;
 }

+ 91 - 62
pages/order_search/order_search.js

@@ -1,66 +1,95 @@
 // pages/order_search/order_search.js
 Page({
 
-  /**
-   * 页面的初始数据
-   */
-  data: {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad(options) {
-    wx.setNavigationBarTitle({ title: '搜索' })
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload() {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh() {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom() {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage() {
-
-  }
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        value: '',
+        showShuRu: "0rpx",
+        detail:"详情>"
+    },
+    onClickdetail(){
+      wx.navigateTo({
+        url: '../../pages/order_details/order_details'
+      })
+    },
+    // 电话输入
+    mobileInput(e) {
+        //   console.log(e);
+        if (e.detail.value) {
+            this.setData({
+                showShuRu: "40rpx"
+            })
+        } else {
+            this.setData({
+                showShuRu: "0rpx"
+            })
+        }
+    },
+    // 清空 
+    clear() {
+        this.setData({
+            value: "",
+            showShuRu: "0rpx"
+        })
+    },
+    sousuo() {
+        // console.log("213213123131");
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad(options) {
+        wx.setNavigationBarTitle({ title: '搜索' })
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload() {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh() {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom() {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage() {
+
+    }
 })

+ 5 - 1
pages/order_search/order_search.json

@@ -1,5 +1,9 @@
 {
   "usingComponents": {
-    "van-search": "@vant/weapp/search/index"
+    "van-search": "@vant/weapp/search/index",
+    "van-button": "@vant/weapp/button/index",
+    "van-icon": "@vant/weapp/icon/index",
+    "van-row": "@vant/weapp/row/index",
+    "van-col": "@vant/weapp/col/index"
   }
 }

+ 83 - 0
pages/order_search/order_search.wxml

@@ -1,2 +1,85 @@
 <!--pages/order_search/order_search.wxml-->
+<!-- <van-search
+  value="{{ value }}"
+  placeholder="请输入搜索关键词"
+  use-action-slot
+  background="#4fc08d"
+  bind:change="onChange"
+  bind:search="onSearch"
+  shape="round"
+>
+  <view slot="action" style="position:flex; right : 10rpx" bind:tap="onClick">搜索</view>
+</van-search> -->
+<view class="search-box">
+  <view class="search-top">
+    <input class="search-ipt" placeholder="搜索用户手机号" value="{{value}}" bindinput="mobileInput" maxlength="11" type="number" placeholder-style="color:#b0b0b0" />
+    <!--  输入的时候显示  -->
+    <van-icon name="cross" size="{{showShuRu}}" custom-style="margin-top : 20rpx" bind:click="clear" />
+    <button class="search-btn" bindtap="sousuo">搜索</button>
+  </view>
+</view>
 
+<view style="margin: 4%;">
+  <view class="item-box">
+    <view style="color: #747474;">
+      订单编号 : 989898854952336
+      <view style="float: right;"  bindtap="onClickdetail">
+        {{detail}}
+      </view>
+    </view>
+    <view style=" margin: 20rpx 0rpx; background: #E0E3DA;width: 95%;height: 1rpx">
+    </view>
+    <view>
+      <view style="margin-bottom: 10rpx;color: #747474;">
+        姓名:颜值在线(女士)
+        <view style="float: right;color: #ff992f;">
+          待送达
+        </view>
+      </view>
+      <view style="margin-bottom: 10rpx;color: #747474;">
+        手机号:15639670876
+      </view>
+      <view style="margin-bottom: 10rpx;color: #747474;">
+        地址:哈尔滨师范大学第一公寓2门321
+      </view>
+      <view style="margin-bottom: 10rpx;">
+        <view style="margin-right: 20rpx;color: #747474;float: left;">
+          下单时间:2023-4-26 9:54:34
+        </view>
+        <button class="mini-btn">重新打印</button>
+      </view>
+    </view>
+  </view>
+  <view class="item-box">
+    <view style="color: #747474;">
+      订单编号 : 989898854952336
+      <view style="float: right;" bindtap="onClickdetail">
+        {{detail}}
+      </view>
+    </view>
+    <view style=" margin: 20rpx 0rpx; background: #E0E3DA;width: 95%;height: 1rpx">
+    </view>
+    <view>
+      <view style="margin-bottom: 10rpx;color: #747474;">
+        姓名:颜值在线(女士)
+        <view style="float: right;color: #ff992f;">
+          待送达
+        </view>
+      </view>
+      <view style="margin-bottom: 10rpx;color: #747474;">
+        手机号:15639670876
+      </view>
+      <view style="margin-bottom: 10rpx;color: #747474;">
+        地址:哈尔滨师范大学第一公寓2门321
+      </view>
+      <view style="margin-bottom: 10rpx;">
+        <view style="margin-right: 20rpx;color: #747474;">
+          下单时间:2023-4-26 9:54:34
+          <view>
+            <button class="mini-btn" size="mini">重新打印</button>
+          </view>
+        </view>
+      </view>
+    </view>
+  </view>
+</view>

+ 81 - 1
pages/order_search/order_search.wxss

@@ -1 +1,81 @@
-/* pages/order_search/order_search.wxss */
+/* pages/order_search/order_search.wxss */
+/* .search-table{
+  width: 100%;
+  border: 1rpx solid;
+} */
+page {
+  background: #eff0f5;
+}
+
+.search-box {
+  padding-top: 10rpx;
+  padding-bottom: 10rpx;
+  width: 100%;
+  background-color: #ffffff;
+}
+
+.search-top {
+  width: 700rpx;
+  height: 80rpx;
+  border: 1px solid #e1e1e1;
+  border-radius: 50rpx;
+  margin: 3%;
+}
+
+.search-ipt {
+  width: 474rpx;
+  height: 80rpx;
+  border: none;
+  float: left;
+  font-size: 29rpx;
+  /* 去掉获取焦点的蓝边 */
+  outline: none;
+  /* text-indent: 20rpx; */
+  padding-left: 30rpx;
+}
+
+.search-btn {
+  border-radius: 50rpx;
+  width: 151rpx;
+  height: 80rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  float: right;
+  background: #ff8e0b;
+  color: #fff;
+  font-size: 29rpx;
+}
+
+.item-box {
+  width: 100%;
+  background-color: #ffffff;
+  box-sizing: border-box;
+  padding: 20rpx;
+  border-radius: 20rpx;
+  padding-bottom: 50rpx;
+  margin-bottom: 30rpx;
+}
+
+.item-btn {
+  /* color: #ff8e0b; */
+  background-color: #ff8e0b;
+  font-size: 20rpx;
+  color: #fff8f3;
+  /* margin-left: 10rpx; */
+  height: 60rpx;
+  margin-bottom: 20rpx;
+}
+
+.mini-btn {
+  /* color: #ff8e0b; */
+  background-color: #ff8e0b;
+  font-size: 10rpx;
+  /* margin-bottom: 20rpx; */
+  color: #fff8f3;
+  margin-left: 20rpx;
+  /* height:60rpx; */
+
+  float: right;
+
+}

+ 2 - 1
project.private.config.json

@@ -4,7 +4,8 @@
   "setting": {
     "compileHotReLoad": true,
     "bigPackageSizeSupport": true,
-    "autoAudits": true
+    "autoAudits": true,
+    "urlCheck": false
   },
   "condition": {
     "miniprogram": {