Browse Source

搜索页面待++

LiShiwei 2 years ago
parent
commit
2d7ca3bb15
6 changed files with 137 additions and 9 deletions
  1. 10 7
      app.json
  2. 66 0
      pages/search/index.js
  3. 6 0
      pages/search/index.json
  4. 7 0
      pages/search/index.wxml
  5. 26 0
      pages/search/index.wxss
  6. 22 2
      project.private.config.json

+ 10 - 7
app.json

@@ -1,17 +1,20 @@
 {
-  "pages":[
+  "pages": [
+    "pages/search/index",
     "pages/index/index",
     "pages/logs/logs"
+    
   ],
-  "window":{
-    "backgroundTextStyle":"light",
+  "window": {
+    "backgroundTextStyle": "light",
     "navigationBarBackgroundColor": "#fff",
     "navigationBarTitleText": "Weixin",
-    "navigationBarTextStyle":"black"
+    "navigationBarTextStyle": "black"
   },
   "usingComponents": {
-    "van-button":"@vant/weapp/button"
-  },
+    "van-button": "@vant/weapp/button"
+   
 
+  },
   "sitemapLocation": "sitemap.json"
-}
+}

+ 66 - 0
pages/search/index.js

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

+ 6 - 0
pages/search/index.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {
+    "van-search":"@vant/weapp/search",
+    "van-icon":"@vant/weapp/icon"
+  }
+}

+ 7 - 0
pages/search/index.wxml

@@ -0,0 +1,7 @@
+<view class="search_container">
+  <view class="inputContent">
+    <van-icon name="search" />
+    <input type="text" placeholder="搜索商品名称" />
+    <button>搜索</button>
+  </view>
+</view>

+ 26 - 0
pages/search/index.wxss

@@ -0,0 +1,26 @@
+.inputContent {
+  width: 95%;
+  margin: 0 auto;
+  height: 80rpx;
+  background-color: #F4F4F4;
+  border-radius: 5%;
+  display: flex;
+  justify-content: space-around;
+  align-items: center;
+  border-radius: 60rpx;
+
+}
+.inputContent input{
+  font-size: 28rpx;
+}
+.inputContent button {
+  width: 60px;
+  height: 60rpx;
+  border-radius: 60rpx;
+  font-size: 30rpx;
+  color: white;
+  line-height: 60rpx;
+  background-color: orange;
+  margin-left: 0 !important;
+  margin-right: -30rpx !important;
+}

+ 22 - 2
project.private.config.json

@@ -1,8 +1,28 @@
 {
   "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
-  "projectname": "miniprogram",
+  "projectname": "delivery-customer",
   "setting": {
     "compileHotReLoad": true
   },
-  "libVersion": "2.19.6"
+  "libVersion": "2.19.6",
+  "condition": {
+    "miniprogram": {
+      "list": [
+        {
+          "name": "商家页面——搜索",
+          "pathName": "pages/merchant_page/index",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "",
+          "pathName": "pages/search/index",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        }
+      ]
+    }
+  }
 }