Bladeren bron

小程序:样式

panyong 2 jaren geleden
bovenliggende
commit
bb0605d821

+ 5 - 1
htmldev/wxMini/app.wxss

@@ -75,7 +75,7 @@ view.footer-fixed-bottom button[type='default'] {
   background-color: #DDDDDD;
 }
 
-.page-header-search {
+.app_page-header-search {
   display: flex;
   align-items: center;
   justify-content: center;
@@ -90,6 +90,10 @@ view.footer-fixed-bottom button[type='default'] {
   background: #F6F7FA;
 }
 
+.app_page-header-search-warp.app_width-690 {
+  width: 690rpx;
+}
+
 .app_page-header-search-warp label {
   width: 66rpx;
 }

+ 9 - 0
htmldev/wxMini/pages/business/business.js

@@ -94,6 +94,15 @@ Page({
    */
   onShareAppMessage() {
 
+  },
+  handleNav(e) {
+    const {
+      item
+    } = e.currentTarget.dataset
+
+    this.setData({
+      currentCategory: item.id
+    })
   },
   jumpBusinessDetail(e) {
     const {

+ 11 - 4
htmldev/wxMini/pages/business/business.wxml

@@ -1,13 +1,20 @@
-<view class="page-header-search">
-  <view class="app_page-header-search-warp">
+<view class="app_page-header-search">
+  <view class="app_page-header-search-warp app_width-690 page-header-search">
     <label for="header-search">
       <image src=""></image>
     </label>
     <input placeholder-class="app_header-search-placeholder" value="" placeholder="搜索信息"></input>
   </view>
 </view>
-<scroll-view class="app_nav-wrap" scroll-x="{{true}}">
-  <view class="nav {{currentCategory === item.id ? 'active' : ''}}" wx:for="{{category}}" wx:key="id">
+<scroll-view
+  class="app_nav-wrap"
+  scroll-x="{{true}}">
+  <view
+    class="nav {{currentCategory === item.id ? 'active' : ''}}"
+    wx:for="{{category}}"
+    wx:key="id"
+    data-item="{{item}}"
+    bind:tap="handleNav">
     <view class="photo">
       <image src=""></image>
     </view>

+ 0 - 4
htmldev/wxMini/pages/business/business.wxss

@@ -2,10 +2,6 @@
   padding: 20rpx 0 28rpx;
 }
 
-.app_page-header-search-warp {
-  width: 690rpx;
-}
-
 .list {
   padding: 38rpx 0;
 }

+ 1 - 1
htmldev/wxMini/pages/guide/guide.wxml

@@ -1,5 +1,5 @@
 <view class="wrapper">
-  <view class="page-header-search">
+  <view class="app_page-header-search">
     <view class="app_page-header-search-warp">
       <label for="header-search">
         <image src=""></image>

+ 1 - 1
htmldev/wxMini/pages/home/home.wxml

@@ -1,5 +1,5 @@
 <view class="home-wrapper">
-  <view class="page-header-search">
+  <view class="app_page-header-search">
     <view class="app_page-header-search-warp">
       <label for="header-search">
         <image src=""></image>

+ 2 - 2
htmldev/wxMini/pages/leavingAMessage/leavingAMessage.wxml

@@ -1,6 +1,6 @@
 <view class="wrapper">
-  <view class="page-header-search">
-    <view class="app_page-header-search-warp">
+  <view class="app_page-header-search">
+    <view class="app_page-header-search-warp app_width-690">
       <label for="header-search">
         <image src=""></image>
       </label>

+ 0 - 4
htmldev/wxMini/pages/leavingAMessage/leavingAMessage.wxss

@@ -8,10 +8,6 @@ page {
   padding-bottom: 152rpx;
 }
 
-.app_page-header-search-warp {
-  width: 690rpx;
-}
-
 .nav-wrap {
   display: flex;
   align-items: center;

+ 1 - 1
htmldev/wxMini/project.private.config.json

@@ -8,7 +8,7 @@
       "list": [
         {
           "name": "111",
-          "pathName": "pages/guide/guide",
+          "pathName": "pages/business/business",
           "query": "",
           "launchMode": "default",
           "scene": null