Authored by QC-L

修复UI显示不正确的问题 review by 黄敬囿

... ... @@ -2,3 +2,4 @@
dist/
.temp/
node_modules/
*error.log
... ...
... ... @@ -105,7 +105,7 @@ export default class filterMenu extends Component {
curType = curType === curOrder ? 'price' : curType;
return (
<View className="tabs-nav" style={fromPage === 'index' ? "height: 100px;" : ""}>
<View className="tabs-nav">
<View className="tabs">
{
tabs.map(item => {
... ...
.tabs-nav {
width: 100%;
height: 120px;
padding: 0 5px;
box-sizing: border-box;
background: #fff;
... ...
... ... @@ -4,7 +4,7 @@
.product-item {
width: 374px;
height: 560px;
height: 520px;
float: left;
border-bottom: 2px solid #ddd;
border-right: 2px solid #ddd;
... ...
.hot-series {
margin-top: 60px;
margin-top: 40px;
padding: 0 40px;
.title {
... ... @@ -11,7 +11,7 @@
}
.scrollview {
height: 210px;
height:175px;
text-align: left;
margin-top: 20px;
white-space: nowrap;
... ... @@ -35,6 +35,7 @@
color: #000;
letter-spacing: 0;
width: 144px;
margin-left:10rpx;
// margin-bottom: 20rpx;
}
}
... ...
... ... @@ -12,16 +12,17 @@ export default class SearchBar extends Component {
}
static defaultProps = {
classname: ''
classname: '',
disabled: false
}
render() {
let {classname, value} = this.props;
let { classname, value, height, disabled} = this.props;
return (
<View className={classname + ' search'}>
<View style= { height ? `width: ${height}rpx` : ''} className={classname + ' search'}>
<Image src={searchIcon} className="search-icon"/>
<Input type='text' placeholder='Search' value={value ? value : ''} onInput={this.props.onInputAction} onConfirm={this.props.onComplate}/>
<Input type='text' placeholder = 'Search' value = { value? value : ''} onInput = { this.props.onInputAction } onConfirm = { this.props.onComplate } disabled={disabled} />
</View>
)
}
... ...
... ... @@ -6,7 +6,9 @@ import config from '../config';
function getQRCodeSource(code) {
return new Promise(function (resolve, reject) {
let param = {
params: {
md5Param: code,
},
url: config.domains.yohoApi +'/wechat/miniapp/getMiniAppRealParam'
}
... ...
import Taro, {Component} from '@tarojs/taro';
import {View, Image} from '@tarojs/components';
import contentCode from '../../utils/content-code';
import { Resources, ProductList, FilterMenu } from '../../components';
import { Resources, ProductList, FilterMenu, SearchBar } from '../../components';
import searchImg from '../../static/images/search.png';
import goYohoBuy from '../../assets/images/goYohoBuy@3x.png';
import {common as commonModel} from '../../models';
... ... @@ -42,7 +42,7 @@ export default class Index extends Component {
}
config = {
navigationBarTitleText: 'UFO',
navigationBarTitleText: '飞碟好物',
enablePullDownRefresh: true,
backgroundTextStyle: "dark",
onReachBottomDistance: 50
... ... @@ -198,9 +198,8 @@ export default class Index extends Component {
lowerThreshold='20'
onScrollToLower={this.onScrollToLower}>
<View className="header-nav">
<Text className="page-label">飞碟好物</Text>
<View onClick={this.goToSearch} className="search" hover-class="none"><Image className="search-btn" src={searchImg}></Image></View>
<View className="header-nav" onClick={this.goToSearch}>
<SearchBar height={655} disabled={true}></SearchBar>
</View>
<Resources code={contentCode.index}></Resources>
... ...