roose 5 年之前
父节点
当前提交
1859b01986
共有 3 个文件被更改,包括 18 次插入7 次删除
  1. 3 3
      components/cu-custom/cu-custom.js
  2. 10 2
      pages/my/index.js
  3. 5 2
      pages/my/index.wxml

+ 3 - 3
components/cu-custom/cu-custom.js

@@ -56,9 +56,9 @@ Component({
     },
     handleNotice(){
       console.log("通知信息")
-      wx.navigateTo({
-        url: '/pages/messageInfo/index'
-      })
+      // wx.navigateTo({
+      //   url: '/pages/messageInfo/index'
+      // })
     }
   }
 })

+ 10 - 2
pages/my/index.js

@@ -13,14 +13,22 @@ Page({
     //   height: app.globalData.height * 2 + 20,
     // },
     active: 4,
-    ColorList: app.globalData.ColorList    
+    ColorList: app.globalData.ColorList,
+    searchValue:'', 
+  },
+  changeSearch(){
+    console.log(this.data.searchValue);
+  },
+  onChange(e){
+    this.setData({
+      searchValue: e.detail,
+    });
   },
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
   },
-
   /**
    * 生命周期函数--监听页面初次渲染完成
    */

+ 5 - 2
pages/my/index.wxml

@@ -8,9 +8,12 @@
 	</view>
 </cu-custom>
 <view class="bigcontainer">
+	<van-search value="{{ searchValue }}"  bind:change="onChange"  use-action-slot  shape="round" background="#4fc08d" placeholder="请输入搜索关键词" >
+		  <view slot="action" bind:tap="changeSearch">搜索</view>
+	</van-search>
 	<view class="content0">
-		<view >aa</view>
-		<view >aa</view>
+		<view>aa</view>
+		<view>aa</view>
 	</view>
 	<view class="content1">
 		<view class="left">撒旦撒旦撒</view>