Skip to content

Commit

Permalink
search page backgroundColor
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven committed Sep 27, 2018
1 parent 099862e commit ae68303
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
2 changes: 2 additions & 0 deletions 直捣电影/pages/main/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ Page({
success: function(res){
var subjects=res.data.subjects;
subjectUtil.processSubjects(subjects);
//为搜索页面临时展示
wx.setStorageSync('initMovies', subjects);
page.setData({
movies:subjects,
hidden:true
Expand Down
2 changes: 1 addition & 1 deletion 直捣电影/pages/main/main.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<swiper class="swiper" indicator-color="rgba(255,255,255,.3)" indicator-active-color="rgba(255,255,255,.8)" indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" catchtap="toOtherApp">
<block wx:for="{{imgUrls}}">
<swiper-item>
<image src="{{item.img}}" class="slide-image" style='width:100%;' mode='widthFix' data-postid="{{item.id}}"/>
<image src="{{item.img}}" class="slide-image" style='width:100%; height:100%;' mode='scaleToFill' data-postid="{{item.id}}"/>
</swiper-item>
</block>
</swiper>
Expand Down
3 changes: 3 additions & 0 deletions 直捣电影/pages/search/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ Page({
wx.setNavigationBarTitle({
title: "搜索电影"
});
this.setData({
movies: wx.getStorageSync('movies')
});
},
onReady:function(){
// 页面渲染完成
Expand Down
3 changes: 2 additions & 1 deletion 直捣电影/pages/search/search.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"navigationBarBackgroundColor": "#09BB07",
"navigationBarTextStyle": "white"
"navigationBarTextStyle": "white",
"backgroundColor": "#09BB07"
}
13 changes: 7 additions & 6 deletions 直捣电影/pages/search/search.wxml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<!--pages/search/search.wxml-->
<view class="content">
<view class="top">
<view class='icon_search'><icon type='search' size='20' color='#d2d2d2'></icon></view>
<input class="srk" placeholder="{{placeholder}}" type="text" placeholder-style="color:#d2d2d2; font-size:10pt; text-align:left;" maxlength="{{maxlength}}" focus="true" bindinput="bindInputKey" confirm-type="{{confirm}}" bindconfirm='searchMovies' />
<!-- <view class="btn" bindtap="searchMovies">完 成</view> -->
</view>
<!-- <view class='header'> -->
<view class="header-top">
<view class='icon_search'><icon type='search' size='20' color='#d2d2d2'></icon></view>
<input class="srk" placeholder="{{placeholder}}" type="text" placeholder-style="color:#d2d2d2; font-size:10pt; text-align:left;" maxlength="{{maxlength}}" focus="true" bindinput="bindInputKey" confirm-type="{{confirm}}" bindconfirm='searchMovies' />
<!-- <view class="inputValue">您查找的内容是: {{inputValue}}</view> -->
<view class="separator"></view>
</view>
<!-- </view> -->
<view class="separator"></view>

<import src="../template/movietpl.wxml" />
<template is="movies" data="{{movies}}" />
Expand Down
2 changes: 1 addition & 1 deletion 直捣电影/pages/search/search.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ page{
min-height: 100%;
min-width: 100%;
}
.top{
.header-top{
display: flex;
flex-direction: row;
width: 100%;
Expand Down

0 comments on commit ae68303

Please sign in to comment.