liuxinyang 2 éve
szülő
commit
c4e65af6ae

+ 8 - 0
.editorconfig

@@ -0,0 +1,8 @@
+root = true  # 所在目录是项目根目录,此目录及子目录下保存的文件都会生效    
+ 
+[*]  # 对于所有文件
+indent_style = space  # 缩进风格
+tab_width = 2  # 缩进宽度
+charset = utf-8  # 文件编码格式,Visual Studio使用utf-8-bom,以防警告
+end_of_line = crlf  # 行尾格式,Windows一般为CRLF,Linux一般为LF,根据需要更改
+insert_final_newline = true   #文件结尾添加换行符,以防警告

+ 2 - 4
app.json

@@ -11,8 +11,8 @@
     "pages/order_details/order_details",
     "pages/order_search/order_search",
     "pages/add/add",
-    "pages/Store-Management/Store-Management"
-    
+    "pages/Store-Management/Store-Management",
+    "pages/change/change"
   ],
   "window": {
     "backgroundTextStyle": "light",
@@ -21,7 +21,6 @@
     "navigationBarTitleText": "商家端",
     "navigationBarTextStyle": "black"
   },
-  
   "tabBar": {
     "list": [
       {
@@ -60,6 +59,5 @@
     "van-calendar": "@vant/weapp/calendar/index",
     "van-uploader": "@vant/weapp/uploader/index"
   },
- 
   "sitemapLocation": "sitemap.json"
 }

+ 0 - 0
images/外卖小程序/麻辣烫-微辣.png → images/malatang.png


+ 0 - 0
pages/images/上传图片.svg → images/上传图片.svg


+ 0 - 0
pages/images/个人.svg → images/个人.svg


+ 0 - 0
pages/images/返回.png → images/返回.png


+ 17 - 2
pages/Store-Management/Store-Management.js

@@ -40,6 +40,7 @@ Page({
           },
       ]
   },
+
   acceptMission: function (e) {
     // 获取当前点击下标    
     var Index = e.currentTarget.dataset.index;
@@ -66,7 +67,15 @@ Page({
  
     
   
-  
+  return(event){
+    wx.switchTab({
+      url: '/pages/me/me',
+      success: (result)=>{},//成功回调
+      fail: ()=>{},//失败回调
+      complete: ()=>{},//无论成功还是失败都会执行
+  })
+},
+
   checkboxChange(e) {
       // console.log('checkbox发生change事件,携带value值为:', e.detail.value)
       const items = this.data.items
@@ -122,9 +131,15 @@ Page({
     // console.log(checkclo)
     // console.log(event)
   },
-  change:function(){
+  add:function(){
     wx.navigateTo({
       url: '../add/add',
     })
+  },
+  change:function(){
+    wx.navigateTo({
+      url: '../change/change',
+    })
   }
+
 })

+ 28 - 26
pages/Store-Management/Store-Management.wxml

@@ -1,7 +1,7 @@
 <view class="top">
-  <image src="/pages/images/返回.png" mode="" class="return" bindtap="return" />
+  <image src="/images/返回.png" mode="" class="return" bindtap="return" />
   <text class="top-title">商品管理</text>
-  <view class="top-button" bindtap="change">+ 添加商品</view>
+  <view class="top-button" bindtap="add">+ 添加商品</view>
 </view>
 
 <!-- 自定义导航栏 -->
@@ -26,31 +26,33 @@
         </view>
         <view class="weui-cells weui-cells_after-title">
           <checkbox-group bindchange="checkboxChange" class="checkbox">
-              <label class="weui-cell weui-check__label" data-id="{{item.id}}" wx:for="{{items}}" wx:key="{{item.value}}">
-                <view class="weui-cell__hd">
-                  <checkbox value="{{item.value}}" checked="{{item.checked}}" class="change" />
-                  <text class="weui-cell__bd">{{item.name}}</text>
-                  <text class="state" wx:if="{{item.state == '活动中'}}">{{item.state}}</text>
-                  <text class="state1" wx:if="{{item.state == '审核中'}}">{{item.state}}</text>
-                  <text class="state2" wx:if="{{item.state == '申请活动'}}">{{item.state}}</text>
-                  <view class="xian"></view>
-                  <view class="fa">
-                    <view class="gray"></view>
-                    <text class="price">价格:{{item.price}}</text>
-                    <switch  catchtap="acceptMission" data-index="{{index}}" checked bindchange="switch1Change" color="green" class="chance"/>
-                    <text wx:if="{{!item.checkclo1}}"  class="clt clect-2">下架</text>
-                    <text wx:if="{{item.checkclo1}}"  class="clt2 clect-2">下架</text>
-                    <text wx:if="{{item.checkclo1}}"  class="clt clect">上架\</text>
-                    <text wx:if="{{!item.checkclo1}}"  class="clt2 clect">上架\</text>
-                    <text class="card">原价:{{item.origin}}</text>
-                    <text class="fa-change">修改</text>
-                    <text class="card">积分:{{item.card}}</text>
-                    <text class="fa-change">删除</text>
-                    <text class="card">内容:{{item.content}}</text>
-                    <view class="kong"></view>
-                  </view>
+            <label class="weui-cell weui-check__label" data-id="{{item.id}}" wx:for="{{items}}" wx:key="value">
+              <view class="weui-cell__hd">
+                <checkbox value="{{item.value}}" checked="{{item.checked}}" class="change" />
+                <text class="weui-cell__bd">{{item.name}}</text>
+                <text class="state" wx:if="{{item.state == '活动中'}}">{{item.state}}</text>
+                <text class="state1" wx:if="{{item.state == '审核中'}}">{{item.state}}</text>
+                <text class="state2" wx:if="{{item.state == '申请活动'}}">{{item.state}}</text>
+                <view class="xian"></view>
+                <view class="fa">
+                  <view class="gray"></view>
+                  <text class="price">价格:{{item.price}}</text>
+                  <switch catchtap="acceptMission" data-index="{{index}}" checked bindchange="switch1Change" color="green" class="chance" />
+                  <text wx:if="{{!item.checkclo1}}" class="clt clect-2">下架</text>
+                  <text wx:if="{{item.checkclo1}}" class="clt2 clect-2">下架</text>
+                  <text wx:if="{{item.checkclo1}}" class="clt clect">上架\</text>
+                  <text wx:if="{{!item.checkclo1}}" class="clt2 clect">上架\</text>
+                  <text class="card">原价:{{item.origin}}</text>
+                  <!-- <text class="fa-change" bindtap="change">修改</text> -->
+                  <cover-view class="fa-change" catchtap='change'>修改
+                  </cover-view>
+                  <text class="card">积分:{{item.card}}</text>
+                  <text class="fa-change">删除</text>
+                  <text class="card">内容:{{item.content}}</text>
+                  <view class="kong"></view>
                 </view>
-              </label>
+              </view>
+            </label>
           </checkbox-group>
         </view>
       </view>

+ 9 - 1
pages/add/add.js

@@ -7,7 +7,15 @@ Page({
   data: {
 
   },
-
+  return(event){
+    wx.navigateBack({
+      // url: '/pages/Store-Management/Store-Management',
+      url:1,
+      success: (result)=>{},//成功回调
+      fail: ()=>{},//失败回调
+      complete: ()=>{},//无论成功还是失败都会执行
+  })
+},
   /**
    * 生命周期函数--监听页面加载
    */

+ 3 - 4
pages/add/add.wxml

@@ -1,14 +1,13 @@
 <view class="top">
+  <image src="/images/返回.png" mode="" class="return" bindtap="return" />
   <text class="top-title">商品管理</text>
 </view>
 <view class="main">
   <view class="store-pic">
     <text class="store-pic-con">商品图片</text>
     <view class="store-pic-right">
-      <image src="/pages/images/上传图片.svg" mode="" class="store-pic-right-img" />
-      <!-- <view>
-        <van-uploader file-list="{{ fileList }}" bind:after-read="afterRead" />
-      </view> -->
+      <image src="/images/上传图片.svg" mode="" class="store-pic-right-img" />
+      <!-- <image src="/images/上传图片.svg" mode="" class="store-pic-right-img" /> -->
       <text class="store-pic-right-go">上传照片</text>
     </view>
   </view>

+ 8 - 3
pages/add/add.wxss

@@ -8,8 +8,8 @@
 .top-title{
  line-height: 1.75rem;
  box-sizing: border-box;
- margin-left: 9.5rem;
- float: left;
+ margin-left: 7.3rem;
+ /* float: left; */
  font-weight: 600;
  color: #333333;
  font-size: large;
@@ -130,5 +130,10 @@
   display: flex;
   justify-content: space-around;
   margin-top: 270rpx;
-
+}
+.return{
+  width: 1.4rem;
+  height: 1.4rem;
+  margin-left: 1rem;
+  float: left;
 }

+ 93 - 0
pages/change/change.js

@@ -0,0 +1,93 @@
+// pages/change/change.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+        name:'麻辣烫重麻重辣',
+        price:'¥5.00',
+        message:'麻辣烫中麻中辣',
+        maxTextLen: 15,
+        textLen:7,
+  },
+  getIntroduce(e){
+    let page = this;
+    //设置最大字符串长度(为-1时,则不限制)
+    let maxTextLen = page.data.maxTextLen;
+    //文本长度
+    let textLen = e.detail.value.length;
+
+    page.setData({
+      maxTextLen : maxTextLen,
+      textLen: textLen
+    });
+  },
+  getTitle(e){
+    let page = this;
+    //设置最大字符串长度(为-1时,则不限制)
+    let maxTitleLen = page.data.maxTitleLen;
+    //文本长度
+    let textLen = e.detail.value.length;
+
+    page.setData({
+      maxTitleLen : maxTitleLen,
+      textLen: textLen
+    });
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 6 - 0
pages/change/change.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {},
+  "navigationStyle": "custom",
+  "navigationBarTitleText": "添加商品",
+  "navigationBarRightButton":{"hide":true}
+}

+ 31 - 0
pages/change/change.wxml

@@ -0,0 +1,31 @@
+<view class="top">
+  <text class="top-title">修改管理</text>
+</view>
+<view class="main">
+  <view class="store-pic">
+    <text class="store-pic-con">商品图片</text>
+    <image src="/images/tupian2.png" mode=""class="store-pic-right"/>
+  </view>
+  <view class="store-name">
+    <text class="store-pic-con">商品名称</text>
+    <view class="line"></view>
+    <view class="search">
+      <input type="text" placeholder="{{name}}" class="search-text" />
+    </view>
+    <view class="store-price">
+      <text class="store-pri-con">商品价格</text>
+      <view class="search">
+        <input type="number" placeholder="{{price}}" class="search-pri-text" />
+      </view>
+    </view>
+  </view>
+  <view class="store-content">
+    <text class="store-pri-content">商品内容</text>
+    <textarea bindinput="getIntroduce" maxlength='{{maxTextLen}}' class="theme-content" placeholder="{{message}}"/>
+  <view class="introduce-number">{{textLen}}/{{maxTextLen}}</view>
+  </view>
+  <view class="btn">
+    <van-button round size="normal" color="#A9A9A9">保存</van-button>
+    <van-button round size="normal" color="#FF8C00">提交</van-button>
+  </view>
+</view>

+ 131 - 0
pages/change/change.wxss

@@ -0,0 +1,131 @@
+.top{
+  height: 3rem;
+  margin-top: 2.3rem;
+  width: 100%;
+  position: relative;
+  z-index: 0;
+}
+.top-title{
+ line-height: 1.75rem;
+ box-sizing: border-box;
+ margin-left: 9.5rem;
+ float: left;
+ font-weight: 600;
+ color: #333333;
+ font-size: large;
+}
+.main{
+  background-color: rgb(223, 222, 222);
+  height:36.5rem;
+  width: 100%;
+}
+.store-pic{
+  width: 100%;
+  height: 8rem;
+  background-color: white;
+  position: relative;
+  top: 1rem;
+}
+.store-pic-con{
+  position: relative;
+  top: 1rem;
+  left: 1rem;
+  font-weight: 600;
+  color: #111111;
+}
+.store-pic-right{
+  width: 9rem;
+  height: 5rem;
+  float: right;
+  position: relative;
+  top: 1rem;
+  right: 1rem;
+}
+.store-pic-right-go{
+  font-size:0.8rem;
+  position: relative;
+  top: 1.7rem;
+  left: 1rem;
+}
+.store-name{
+  width: 100%;
+  height: 6rem;
+  background-color: white;
+  position: relative;
+  top: 2rem;
+  position: relative;
+}
+.line{
+  height: 0.1rem;
+  width: 22rem;
+  background-color: rgb(223, 222, 222);
+  position: relative;
+  top: 1rem;
+  margin: 0.3rem 0.8rem;
+}
+.search{
+  margin:1rem -0.5rem;
+}
+.search-text{
+  border-radius: 0.3rem;
+  line-height: 1.5rem;
+  padding-left: 1.5rem;
+  height: 3rem;
+}
+.store-price{
+  background-color: white;
+  width: 100%;
+  height: 3rem;
+}
+.store-pri-con{
+  position: relative;
+  top: 0.8rem;
+  left: 1rem;
+  font-weight: 600;
+  display: inline-block;
+  float: left;
+}
+.search-pri-text{
+  float: left;
+  display: inline-block;
+  position: relative;
+  left: 14rem;
+   top: 0.7rem;
+  color: red;
+}
+.store-content{
+  background-color: white;
+  width: 100%;
+  height: 10rem;
+  position: relative;
+  top: 6.5rem;
+}
+.store-pri-content{
+  position: relative;
+  top: 0.7rem;
+  right: 13.9rem;
+  font-weight: 600;
+  display: inline-block;
+}
+.theme-content{
+  border: 0.05rem solid rgb(134, 134, 134);
+  padding: 0.125rem;
+  height: 6rem;
+  margin: 1rem;
+  margin-bottom: 0.5rem;
+  border-radius: 0.5rem; 
+  width: 20rem;
+  position: relative;
+  left: 1rem;
+  top: 0.7rem;
+}
+.introduce-number{
+  position: relative;
+  left: 19.8rem;
+  top: -2rem;
+}
+.btn{
+  display: flex;
+  justify-content: space-around;
+  margin-top: 270rpx;
+}

+ 66 - 0
pages/home/home.js

@@ -0,0 +1,66 @@
+// pages/home/home.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 2 - 0
pages/home/home.wxml

@@ -0,0 +1,2 @@
+<!--pages/home/home.wxml-->
+<text>pages/home/home.wxml</text>

+ 1 - 1
pages/log-on/log-on.wxml

@@ -2,7 +2,7 @@
   <text class="top-title">登录</text>
 </view>
 <view class="hair">
-  <image src="/pages/images/个人.svg" mode="" class="hair-image"/>
+  <image src="/images/个人.svg" mode="" class="hair-image"/>
 </view>
 <view class="search">
   <input type="text" placeholder="输入你的账号" type="number" class="search-text"/>

+ 8 - 1
pages/me/me.js

@@ -9,7 +9,14 @@ Page({
       {url:'../../images/tupian2.png'}
     ]
   },
-
+  goshopmessage(event){
+    wx.navigateTo({
+      url: '/pages/Store-Management/Store-Management',
+      success: (result)=>{},//成功回调
+      fail: ()=>{},//失败回调
+      complete: ()=>{},//无论成功还是失败都会执行
+  })
+},
   /**
    * 生命周期函数--监听页面加载
    */

+ 1 - 1
pages/me/me.wxml

@@ -19,7 +19,7 @@
 
   <view>
     <view style="margin-bottom: 20rpx;">
-      <van-cell is-link icon="/images/shangpin.svg" title-class="title" title="商品管理" link-type="navigateTo" url="/pages/Store-Management/Store-Management" />
+      <van-cell is-link icon="/images/shangpin.svg" title-class="title" title="商品管理" link-type="navigateTo" url="/pages/Store-Management/Store-Management" bindtap="goshopmessage"/>
     </view>
 
     <view style="margin-bottom: 20rpx;">

+ 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() {
 
-        },
+  },
 
-    })
+})

+ 88 - 91
pages/order_details/order_details.wxml

@@ -1,104 +1,101 @@
-<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 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="content-box">
+    <view class="content-title">
+      <image class="img-1" src="../../images/malatang.png" alt="" />
+    </view>
+    <view style="width: 300rpx; float: left;">
+      <view class="content-detail" style="font-size: 29rpx;">
+        老式麻辣烫(微辣)
+      </view>
+      <view style="color:#8b8b8b;font-size: 26rpx;">
+        *2
+      </view>
+    </view>
+    <view class="order-money">
+      ¥9.9+20积分
+    </view>
 
+    <view class="divLine">
+    </view>
+    <view style="margin:3%">
+      <view class="card1" style=" margin-bottom: 8rpx;">
+        <text style="font-size:29rpx;color: #8b8b8b;line-height: 28px;">包装费</text>
+        <text style="font-size:29rpx;color: red;padding-right: 20rpx;">¥0</text>
+      </view>
+      <view class="card1">
+        <text style="font-size:29rpx;color: #8b8b8b;">配送费</text>
+        <text style="font-size:29rpx; color: red;font-weight: 500;  padding-right: 20rpx;">¥3</text>
+      </view>
     </view>
+  </view>
 
-    <view class="remark">
-        备注
-        <view class="remark-underline">
-        </view>
-        不要香菜,不要蒜
+  <view class="remark" style="font-size: 28rpx;">
+    备注
+    <view class="remark-underline">
     </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 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="logistics-box">
+    <view class="card1" style="padding-top: 20rpx;">
+      <text style="font-size:29rpx;color: #8b8b8b;">订单编号:</text>
+      <text style="font-size:26rpx; font-weight: 500; padding-right: 20rpx;">989898854952336</text>
+    </view>
+    <view style=" margin: 20rpx 0rpx; background: #E0E3DA;width: 95%;height: 1rpx">
+    </view>
+    <view class="card1" style="padding-top: 15rpx;">
+      <text style="font-size:29rpx;color: #8b8b8b;">交易时间:</text>
+      <text style="font-size:26rpx; font-weight: 500; padding-right: 20rpx;">2023-04-25 15:56:18</text>
+    </view>
+    <view style=" margin: 20rpx 0rpx; background: #E0E3DA;width: 95%;height: 1rpx;">
+    </view>
+    <view class="card1" style="padding-top: 15rpx;">
+      <text style="font-size:29rpx;color: #8b8b8b;">积分抵扣:</text>
+      <text style="font-size:26rpx; font-weight: 500; padding-right: 20rpx;">30积分</text>
+    </view>
+    <view style=" margin: 20rpx 0rpx; background: #E0E3DA;width: 95%;height: 1rpx;">
+    </view>
+    <view class="card1" style="padding-top: 15rpx;">
+      <text style="font-size:29rpx;color: #8b8b8b;padding-bottom: 20rpx;">实付金额:</text>
+      <text style="font-size:26rpx; font-weight: 500; padding-right: 20rpx;">¥21.98</text>
+    </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>
+  <!-- 点击  是否显示  配送人  通过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: 15rpx 0rpx; background: #E0E3DA;width: 95%;height: 1rpx;">
+    </view>
+    <view style="height: 40rpx; padding-bottom: 20rpx;">
+      <view class="logistic-information-left" style="width: 200rpx;">
+        {{peisongren}}
+      </view>
+    </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>
+  <!-- #end -->
+  <view class="tabbar">
+    <van-button color="#aeaeae" round custom-style="margin-right: 20rpx; width: 300rpx; font-size: 28rpx;" bind:click="onClickRefund"> {{tuikuan}} </van-button>
+    <van-button color="#ff8e0b" round custom-style="width: 300rpx; font-size: 28rpx;" bind:click="onClickrint">重新打印</van-button>
+  </view>
 
-        </view>
-    </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>
 </view>

+ 22 - 58
pages/order_details/order_details.wxss

@@ -1,16 +1,11 @@
-/* pages/order_details/order_details.wxss */
-
 page {
   background: #eff0f5;
 }
 
 .order_box {
   width: 690rpx;
-  /* height: 181rpx; */
   background: #ffffff;
   border-radius: 7px;
-  /* margin: 25rpx 30rpx 0rpx 30rpx; */
-  /* border: 2rpx solid #ccc; */
 }
 
 .order_title {
@@ -18,35 +13,27 @@ page {
   display: block;
   text-overflow: ellipsis;
   word-wrap: break-word;
-  /* padding: 48rpx 73rpx 24rpx 0rpx; */
-  font-size: 20px;
+  font-size: 40rpx;
   font-family: Source Han Sans CN, Source Han Sans CN-Medium;
   font-weight: 500;
   color: #3c3c3c;
-  /* line-height: 56rpx; */
   margin-bottom: 20rpx;
 }
 
 .order_smalltitle {
-  /* float: left; */
-  font-size: 13.5px;
-  /* padding-left: 37rpx; */
+  font-size: 27rpx;
 }
 
 .order_phone {
-  /* float: left; */
-  font-size: 14px;
-  /* padding-right: 150rpx */
+  font-size: 28rpx;
 }
 
 .content-box {
   width: 690rpx;
   background: #ffffff;
   border-radius: 7px;
-  /* border: 1px solid #ccc; */
-  /* margin: 16rpx 30rpx 16rpx 30rpx; */
   margin-top: 16rpx;
-  padding-bottom: 20rpx;
+  padding-bottom: 15rpx;
 }
 
 .content-title {
@@ -55,23 +42,22 @@ page {
 
 .img-1 {
   margin-left: 15rpx;
-  width: 57.5px;
-  height: 57.5px;
+  width: 115rpx;
+  height: 115rpx;
   float: left;
-  margin-right: 9.77px;
-
+  margin-right: 48rpx;
+  border-radius: 7px;
 }
 
 .order-money {
   float: right;
-  font-size: 14px;
+  font-size: 26rpx;
   color: red;
   font-weight: 800;
   margin-right: 38rpx;
 }
 
 .content-detail {
-  /* float: left; */
   width: 400rpx;
 }
 
@@ -82,35 +68,21 @@ page {
   margin: 125rpx auto 1rpx;
 }
 
-.content-left {
-  width: 100rpx;
-  /* height: 14px; */
-  font-size: 14.5px;
-  float: left;
-  color: #3c3c3c;
-  line-height: 28px;
-  padding-left: 10px;
-}
-.content-right {
-  float: right;
-  width: 15.5px;
-  font-size: 13px;
-  font-family: Source Han Sans CN, Source Han Sans CN-Bold;
-  line-height: 23px;
-  letter-spacing: 0.22px;
-  padding-right: 25px;
+.card1 {
+  display: flex;
+  justify-content: space-between;
+  color: #696969;
 }
 
 .remark {
   width: 690rpx;
-  /* height: 120rpx; */
   background: #ffffff;
   border-radius: 7px;
   margin-top: 20rpx;
   box-sizing: border-box;
   padding-left: 20rpx;
   padding-top: 20rpx;
-  padding-bottom: 5px;
+  padding-bottom: 10rpx;
   color: #8b8b8b;
 }
 
@@ -118,14 +90,14 @@ page {
   background: #E0E3DA;
   width: 95%;
   height: 1rpx;
-  margin: 20rpx 0rpx;
+  margin: 15rpx 0rpx;
 }
 
 .logistics-box {
   margin-top: 20rpx;
   padding-top: 10rpx;
   width: 690rpx;
-  /* height: 300rpx; */
+  font-size: 29rpx;
   background: #ffffff;
   border-radius: 7px;
   padding-left: 20rpx;
@@ -134,27 +106,19 @@ page {
 
 .logistic-information-left {
   float: left;
-  /* box-sizing: border-box; */
-  /* margin-left: 20rpx; */
   color: #8b8b8b;
 }
 
 .logistic-information-right {
   float: right;
   margin-right: 20rpx;
-  /* 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;
-}
+  margin-top: 15rpx;
+  padding-bottom: 10rpx;
+  display: flex;
+  justify-content: center;
+  margin-bottom: 0;
+}

+ 132 - 52
pages/order_search/order_search.js

@@ -3,59 +3,139 @@
 const app = getApp()
 
 Page({
-  data: {
-    motto: 'Hello World',
-    userInfo: {},
-    hasUserInfo: false,
-    canIUse: wx.canIUse('button.open-type.getUserInfo'),
-    canIUseGetUserProfile: false,
-    canIUseOpenData: wx.canIUse('open-data.type.userAvatarUrl') && wx.canIUse('open-data.type.userNickName') // 如需尝试获取用户信息可改为false
-  },
-  // 事件处理函数
-  bindViewTap() {
-    wx.navigateTo({
-      url: '../logs/logs'
-    })
-  },
-  onLoad() {
-    if (wx.getUserProfile) {
-      this.setData({
-        canIUseGetUserProfile: true
+
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        value: '',
+        showInput: "0rpx",
+        detail:"详情>",
+        totalList:[],
+        showList:[] ,
+        phone:""
+    },
+    onClickdetail(){
+      wx.navigateTo({
+        url: '../../pages/order_details/order_details'
       })
-    }
-  },
-  // 详情
-  detail:function(){
-    wx.navigateTo({
-      url: '/pages/order_details/order_details',
-    })
-  },
-  // 搜索
-  search:function(){
-    wx.navigateTo({
-      url: '/pages/order_search/order_search',
-    })
-  },
-  getUserProfile(e) {
-    // 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认,开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
-    wx.getUserProfile({
-      desc: '展示用户信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
-      success: (res) => {
-        console.log(res)
+    },
+    // 电话输入
+    mobileInput(e) {
+        //   console.log(e);
+        if (e.detail.value) {
+            this.setData({
+              showInput: "40rpx"
+            })
+        } else {
+            this.setData({
+              showInput: "0rpx"
+            })
+        }
+        this.setData({phone:e.detail.value})
+    },
+    // 清空 
+    clear() {
         this.setData({
-          userInfo: res.userInfo,
-          hasUserInfo: true
+            value: "",
+            showInput: "0rpx"
+        })
+
+    },
+    Search() {
+        // console.log("213213123131");
+        console.log(1);
+    // 获取后拼接/phone
+      wx.request({
+        url: `http://8.130.90.145:4849/user/select/`  + this.data.phone,
+        method: 'GET',
+        header: {
+            'content-type': 'application/json' // 默认值
+        },
+        success: (res => {
+          // 遍历数组 查他的手机相等不等你输入的手机号
+            console.log(res);
+            this.setData({
+              totalList : res.data.data
+            })
+            this.setData({
+              showList : this.data.totalList
+            })
+        })
+      })
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad(options) {
+        wx.setNavigationBarTitle({ title: '搜索' })
+
+        wx.request({
+          url: `http://8.130.90.145:4849/user/list` ,
+          method: 'GET',
+          header: {
+              'content-type': 'application/json' // 默认值
+          },
+          success: (res => {
+            // 遍历数组 查他的手机相等不等你输入的手机号
+              console.log(res);
+              this.setData({
+                totalList : res.data.data
+              })
+              this.setData({
+                showList : this.data.totalList
+              })
+          })
         })
-      }
-    })
-  },
-  getUserInfo(e) {
-    // 不推荐使用getUserInfo获取用户信息,预计自2021年4月13日起,getUserInfo将不再弹出弹窗,并直接返回匿名的用户个人信息
-    console.log(e)
-    this.setData({
-      userInfo: e.detail.userInfo,
-      hasUserInfo: true
-    })
-  },
-  
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload() {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh() {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom() {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage() {
+
+    }
 })

+ 6 - 1
pages/order_search/order_search.json

@@ -1,5 +1,10 @@
 {
   "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"
+
   }
 }

+ 30 - 34
pages/order_search/order_search.wxml

@@ -1,41 +1,37 @@
-<view>
-  <view class="ert">
-    <van-search value="{{ value }}" placeholder="13893029333" shape="round" />
-    <van-button color="#FF8C00" class="btn" round type="info" size="mini" >搜索</van-button>
+<view class="search-box">
+  <view class="search-top">
+    <input class="search-ipt" focus="true" placeholder="搜索用户手机号" type="text" value="{{value}}" bindinput="mobileInput" maxlength="11" type="number" placeholder-style="color:#b0b0b0" />
+    <!--  输入的时候显示  -->
+    <van-icon name="cross" size="{{showInput}}" custom-style="margin-top: 20rpx" bind:click="clear" />
+    <button class="search-btn" bindtap="Search">搜索</button>
   </view>
-  
-      <view style="background-color: #DCDCDC; width: 100%;height: 100vh; padding: 14rpx 0;">
-        <template is="card" data="" />
-        <template is="card" data="" />
-      </view>
-      <view style="background-color: #DCDCDC; width: 100%;height: 100vh; padding: 14rpx 0;">
-      </view>
-  <!-- <view slot="action" bind:tap="onClick">搜索</view> -->
 </view>
 
-<template name="card">
-  <view class="card" bindtap="detail">
-    <view class="card2">
-      <text style="font-size:12px;">订单编号:98989898989</text>
-      <text style="font-size:12px;">详情></text>
-    </view>
-    <van-divider />
-    <view class="card1">
-      <text style="font-size:12px;">姓名:吴迪(先生)</text>
-      <text style="font-size:12px; color: #FF6347;">待送达</text>
-    </view>
-    <view class="card1">
-      <text style="font-size:12px;">手机号:13912345678</text>
+<view style="margin: 4%;" wx:for="{{showList}}">
+  <view class="item-box">
+    <view style="color: #747474;font-size: 29rpx;">
+      订单编号 : {{item.oid}}
+      <view style="float: right;" bindtap="onClickdetail">
+        {{detail}}
+      </view>
     </view>
-    <view class="card1">
-      <text style="font-size:12px;">地址:哈尔滨</text>
+    <view style=" margin: 20rpx 0rpx; background: #E0E3DA;width: 100%;height: 1rpx">
     </view>
-    <view class="card1">
-      <text style="font-size:12px;">下单时间:2023-04-24 17:38:34</text>
-      <van-button color="#FF8C00" custom-style="border-radius:8px" class="btn1" round type="info" size="mini">重新打印</van-button>
+    <view>
+      <view class="card1">
+        <text style="font-size:26rpx;margin-bottom: 10rpx;color: #747474;">姓名:{{item.userName}}</text>
+        <text style="font-size:26rpx; color: #FF6347;">待送达</text>
+      </view>
+      <view class="card1">
+        <text style="font-size:26rpx;margin-bottom: 10rpx;color: #747474;">手机号:{{item.phone}}</text>
+      </view>
+      <view class="card1">
+        <text style="font-size:26rpx;margin-bottom: 10rpx;color: #747474;">地址:{{item.province}}</text>
+      </view>
+      <view class="card1">
+        <text style="font-size:26rpx;color: #747474;">下单时间:{{item.createTime}}</text>
+        <van-button color="#FF8C00" custom-style="border-radius:8px;font-size:20rpx" class="btn1" round type="info" size="mini">重新打印</van-button>
+      </view>
     </view>
   </view>
-</template>
-
-<van-button type="primary">按钮</van-button>
-
+</view>

+ 78 - 50
pages/order_search/order_search.wxss

@@ -1,58 +1,86 @@
 /* pages/order_search/order_search.wxss */
-/**index.wxss**/
-.userinfo {
+/* .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;
-  flex-direction: column;
+  justify-content: center;
   align-items: center;
-  color: #aaa;
-}
-
-.userinfo-avatar {
-  overflow: hidden;
-  width: 128rpx;
-  height: 128rpx;
-  margin: 20rpx;
-  border-radius: 50%;
-}
-
-.usermotto {
-  margin-top: 200px;
-}
-
-
-.ert{
-  position: relative;
-}
-.btn{
-  position: absolute;
-  right: 40rpx;
-  top: 32rpx;
-}
-.card{
-  width: 90%;
-  margin: auto;
-  height: 270rpx;
-  background: #fff;
-  border-radius: 10rpx;
-  margin-top: 18rpx;
-  padding: 20rpx 20rpx;
-  position: relative;
-  /* box-shadow: 5px 5px 5px #cdcfcf; */
- }
- .card1{
-   display: flex;
-   justify-content: space-between;
-   color: #696969;
-   margin-bottom: 8rpx;
- }
- .card2{
+  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;
+  margin-bottom: 30rpx;
+}
+
+.item-btn {
+  background-color: #ff8e0b;
+  font-size: 20rpx;
+  color: #fff8f3;
+  height: 60rpx;
+  margin-bottom: 20rpx;
+}
+
+.mini-btn {
+  background-color: #ff8e0b;
+  font-size: 10rpx;
+  color: #fff8f3;
+  margin-left: 20rpx;
+  float: right;
+}
+
+.card1 {
   display: flex;
   justify-content: space-between;
   color: #696969;
-  margin-bottom: -10rpx;
 }
- .btn1{
-  position: absolute;
-  right: 20rpx;
-  bottom: 25rpx;
+
+.card2 {
+  display: flex;
+  justify-content: space-between;
+  color: #696969;
+  margin-bottom: -10rpx;
 }

+ 2 - 1
project.private.config.json

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