alipay style config 1.0.1

This commit is contained in:
郑茂强 2019-03-08 14:38:48 +08:00
parent bf08b9d9d4
commit c8aa3e1c7a
18 changed files with 136 additions and 96 deletions

View File

@ -42,7 +42,7 @@ class recommondShop extends Component {
} }
} }
goToShop(e) { goToShop(e) {
const value = onClickValueService(e) const value = onClickValueService(e)
Taro.navigateTo({ Taro.navigateTo({
url: '/pages/shop/shop?id=' + value.shop_id url: '/pages/shop/shop?id=' + value.shop_id
@ -117,7 +117,7 @@ class recommondShop extends Component {
} }
}) })
.then(res => { .then(res => {
this.setState({ consultTip: res.data.tips,isCanConsult:res.data.canConsult }) this.setState({ consultTip: res.data.tips, isCanConsult: res.data.canConsult })
console.log('咨询请求', res) console.log('咨询请求', res)
}) })
} }
@ -195,7 +195,7 @@ class recommondShop extends Component {
this.setState({ isOpenConsult: false }) this.setState({ isOpenConsult: false })
this.buyConsult({}) this.buyConsult({})
} }
} }
handleInputCsultName(e) { handleInputCsultName(e) {
@ -246,8 +246,8 @@ class recommondShop extends Component {
const goodsElementsArray = goods !== null ? slicedGoods.map((item, index) => { const goodsElementsArray = goods !== null ? slicedGoods.map((item, index) => {
return <View className='goods-img-box' key={index}> return <View className='goods-img-box' key={index}>
<Image className='goods-img' onClick={this.goToShop.bind(this, this.props.shop)} <Image className='goods-img' onClick={this.goToShop.bind(this, this.props.shop)}
mode='aspectFit' style='max-height: 100%; max-width: 100%;' mode='aspectFit' style='max-height: 100%; max-width: 100%;'
src={URL.Base + item.goods_url} src={URL.Base + item.goods_url}
/> />
</View> </View>
}) : null }) : null
@ -260,34 +260,39 @@ class recommondShop extends Component {
<AtNoticebar > <AtNoticebar >
<Text >提示:{this.state.consultTip}</Text> <Text >提示:{this.state.consultTip}</Text>
</AtNoticebar> </AtNoticebar>
<View className='input-box' style='display:flex; align-items:center; font-size:28rpx; margin:2% 2%'> <View className='input-box' >
<View className='title'> <View className='title' >
<Text>联系人</Text> <Text>联系人</Text>
</View> </View>
<View className='value'>
<Input name='value' <Input name='value'
type='text' type='text'
value={this.state.userName} value={this.state.userName}
placeholder='请输入联系人' placeholder='请输入联系人'
onInput={this.handleInputCsultName.bind(this)} onInput={this.handleInputCsultName.bind(this)}
/> />
</View>
</View> </View>
<View className='input-box' style='display:flex; align-items:center; font-size:28rpx; margin-left:2%'> <View className='input-box'>
<View className='title'> <View className='title'>
<Text>联系电话</Text> <Text>联系电话</Text>
</View> </View>
<View className='value'>
<Input name='value' <Input name='value'
type='number' type='number'
maxLength='11' maxLength='11'
value={this.state.userPhone} value={this.state.userPhone}
placeholder='请输入联系电话' placeholder='请输入联系电话'
onInput={this.handleInputCsultPhone.bind(this)} onInput={this.handleInputCsultPhone.bind(this)}
/> />
</View>
</View> </View>
</AtModalContent> </AtModalContent>
<AtModalAction> <AtModalAction>
<Button onClick={this.consultModalClose.bind(this)} >取消</Button> <Button onClick={this.consultModalClose.bind(this)} >取消</Button>
<Button disabled={!this.state.isCanConsult} className={!this.state.isCanConsult?'confirm_button blur':'confirm_button'} onClick={this.consultModalConfirm.bind(this)}>确定</Button> <Button disabled={!this.state.isCanConsult} className={!this.state.isCanConsult ? 'confirm_button blur' : 'confirm_button'} onClick={this.consultModalConfirm.bind(this)}>确定</Button>
</AtModalAction> </AtModalAction>
</AtModal> </AtModal>
@ -297,16 +302,16 @@ class recommondShop extends Component {
<View className='shop-list-box' > <View className='shop-list-box' >
{consultModalElement} {consultModalElement}
<VoucherPosterComponent <VoucherPosterComponent
name={this.state.userName} name={this.state.userName}
phone={this.state.userPhone} phone={this.state.userPhone}
shopId={this.props.shop.shop_id} shopId={this.props.shop.shop_id}
isCanVoucher={this.state.isCanVoucher} isCanVoucher={this.state.isCanVoucher}
isVoucherPoster={this.state.isOpenVoucher} isVoucherPoster={this.state.isOpenVoucher}
onPassDataToChild={this.getDataFromChild.bind(this)} onPassDataToChild={this.getDataFromChild.bind(this)}
voucherLeft={this.props.shop.left_nums} voucherLeft={this.props.shop.left_nums}
voucherResponseMsg={this.state.voucherResponseMsg} voucherResponseMsg={this.state.voucherResponseMsg}
categoryLevel={this.props.categoryLevel} categoryLevel={this.props.categoryLevel}
classId={this.props.classId === '-1' ? '' : this.props.classId} classId={this.props.classId === '-1' ? '' : this.props.classId}
></VoucherPosterComponent> ></VoucherPosterComponent>
<View className='header'> <View className='header'>

View File

@ -5,6 +5,7 @@ $linearBlue:linear-gradient(to right, #337ab7, #337ab7);
border-radius: 3px; border-radius: 3px;
box-shadow: 0 5px 5px #ddd; box-shadow: 0 5px 5px #ddd;
margin-bottom: 10px; margin-bottom: 10px;
.confirm_button{ .confirm_button{
color:#FF7142!important color:#FF7142!important
} }
@ -73,6 +74,7 @@ $linearBlue:linear-gradient(to right, #337ab7, #337ab7);
margin-bottom:2%; margin-bottom:2%;
padding:0; padding:0;
} }
.button-container{ .button-container{
flex:1; flex:1;
//margin-top: 20px ; //margin-top: 20px ;
@ -170,4 +172,17 @@ $linearBlue:linear-gradient(to right, #337ab7, #337ab7);
.at-noticebar { .at-noticebar {
color:red; color:red;
}
.input-box{
display:flex;
align-items:center;
font-size:28px;
margin:2% 2%;
.title{
flex:1;
padding: 10px
}
.value{
flex:2
}
} }

View File

@ -94,7 +94,7 @@ class AllDemanding extends Component {
} }
} else if (res.data.err_code === 88888) { } else if (res.data.err_code === 88888) {
loginExpired(res) loginExpired(res)
}else { } else {
Taro.showToast({ Taro.showToast({
title: res.data.err_msg, title: res.data.err_msg,
icon: 'none', icon: 'none',
@ -329,20 +329,26 @@ class AllDemanding extends Component {
{/* 开始和结束日期选择 */} {/* 开始和结束日期选择 */}
<View className='page-section'> <View className='page-section'>
<View className='picker-box'> <View className='picker-box'>
<Picker mode='date' className='picker-container' style=' width: 56px' onChange={this.onStartDateChange}> <View className='picker-wrapper'>
<View className='picker'> <Picker mode='date' className='picker-container' onChange={this.onStartDateChange}>
<View className='title-box'> <View className='picker'>
<Text className='title'>开始日期:</Text> <Text className='date'>{this.state.startDateSel}</Text> <View className='title-box'>
<Text className='title'>开始日期:</Text> <Text className='date'>{this.state.startDateSel}</Text>
</View>
</View> </View>
</View> </Picker>
</Picker> </View>
<Picker className='picker-container' mode='date' start={this.state.startDateSel} onChange={this.onEndDateChange}>
<View className='picker'> <View className='picker-wrapper'>
<View className='title-box'> <Picker className='picker-container' mode='date' start={this.state.startDateSel} onChange={this.onEndDateChange}>
<Text className='title'>结束日期:</Text> <Text className='date'>{this.state.endDateSel}</Text> <View className='picker'>
<View className='title-box'>
<Text className='title'>结束日期:</Text> <Text className='date'>{this.state.endDateSel}</Text>
</View>
</View> </View>
</View> </Picker>
</Picker> </View>
</View> </View>
</View> </View>
{/* 行业分类选择 */} {/* 行业分类选择 */}

View File

@ -53,8 +53,8 @@ $themeColor: #FF7142;
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
flex-direction: row; flex-direction: row;
.picker-container{ .picker-wrapper{
width: 56px flex:1 ;
} }
} }
.button-box{ .button-box{

View File

@ -313,9 +313,7 @@ class GrabOrderPage extends Component {
</AtModal> </AtModal>
const imageElementArray = this.state.images.map((item, index) => { const imageElementArray = this.state.images.map((item, index) => {
return <View className='image-wrapper' key={index}> return <View className='image-wrapper' key={index}>
<Image mode='aspectFit' src={URL.Base + item.file_path} style='max-width:100%; max-height:100%;' /> <Image mode='aspectFit' src={URL.Base + item.file_path} style='max-width:100%; max-height:100%;' />
</View> </View>
}) })
@ -325,7 +323,7 @@ class GrabOrderPage extends Component {
{modalMessageGrabElement} {modalMessageGrabElement}
{deleteModalWindowElement} {deleteModalWindowElement}
{this.state.isShowRendering ? <RenderingView rendering={this.state.renderingImage}></RenderingView> : null} {this.state.isShowRendering ? <RenderingView rendering={this.state.renderingImage}></RenderingView> : null}
{this.state.stateId === '3' && !this.state.isShowRendering ? <View className='button-box show-image-button'><View className='button' onClick={this.showImageButton.bind(this)}> {this.state.stateId === '3' && !this.state.isShowRendering&&this.state.renderingImage.length ? <View className='button-box show-image-button'><View className='button' onClick={this.showImageButton.bind(this)}>
<Button className='button-orange'>查看效果图</Button> <Button className='button-orange'>查看效果图</Button>
</View></View> : null} </View></View> : null}
<View className='type box'> <View className='type box'>

View File

@ -20,7 +20,7 @@ class RenderingView extends Component {
super(props) super(props)
this.state = { this.state = {
image: '', image: '',
isOpened:false isOpened: false
} }
} }
@ -29,12 +29,12 @@ class RenderingView extends Component {
const item = onClickValueService(e) const item = onClickValueService(e)
this.setState({ this.setState({
image: URL.Base + item.file_path, image: URL.Base + item.file_path,
isOpened:true isOpened: true
}) })
} }
onCloseCurtain(){ onCloseCurtain() {
this.setState({ this.setState({
isOpened:false isOpened: false
}) })
} }
componentDidMount() { componentDidMount() {
@ -69,7 +69,7 @@ class RenderingView extends Component {
</AtCurtain> </AtCurtain>
return ( return (
<View className='rendering-container'> <View className='rendering-container'>
{curtainElement} {curtainElement}
{renderingElementArray} {renderingElementArray}
</View> </View>
) )

View File

@ -216,6 +216,7 @@ class Home extends Component {
// 点击大类icon // 点击大类icon
onClickParentCate(e) { onClickParentCate(e) {
const item = onClickValueService(e) const item = onClickValueService(e)
Taro.showLoading({ Taro.showLoading({
title: '加载中' title: '加载中'
}) })

View File

@ -32,7 +32,7 @@ $themeColor: #FF7142;
//margin-top: 30px; //margin-top: 30px;
.title{ .title{
padding:20px 20px; padding:10px 10px;
.title-block{ .title-block{
background-color: #3C98FF; background-color: #3C98FF;
@ -113,12 +113,11 @@ $themeColor: #FF7142;
} }
.shop-box{ .shop-box{
padding:0 20px; padding:0 10px;
.title{ .title{
text-align: center; text-align: center;
color: #999; color: #999;
font-size: 25px; font-size: 25px;
} }
} }
.top{ .top{

View File

@ -14,7 +14,7 @@ class MainCateSlider extends Component {
this.props.onScrollFromChild(e) this.props.onScrollFromChild(e)
} }
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
console.log(this.props, nextProps) // console.log(this.props, nextProps)
} }
componentWillUnmount() { } componentWillUnmount() { }

View File

@ -14,7 +14,8 @@ class Login extends Component {
this.state = { this.state = {
username: '', username: '',
password: '', password: '',
backgroundImage: 'background-image:url(' + URL.Base + '/Public/images/bg3.jpg);' backgroundImage: 'background-image:url(' + URL.Base + 'Public/images/bg3.jpg);',
logoIcon:'background-image:url(' + URL.Base + 'Public/images/com-logo.png);'
} }
} }
@ -79,7 +80,7 @@ class Login extends Component {
<View className='logo'> <View className='logo'>
<View className='image-wrapper'> <View className='image-wrapper'>
<View className='image-inner-wrapper'> <View className='image-inner-wrapper'>
<Image style='width: 240px;height: 80px;background: #fff;' src={URL.Base + '/Public/images/com-logo.png'} /> <Image className='icon' style={this.state.logoIcon} />
</View> </View>
<View className='title'>全屋定制商城</View> <View className='title'>全屋定制商城</View>

View File

@ -15,10 +15,17 @@
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
flex-direction: row; flex-direction: row;
height: 100%;
align-items: center; align-items: center;
.image-inner-wrapper{ .image-inner-wrapper{
flex:2; flex:2;
.icon{
margin-top: 10px;
width: 400px;
height: 150px;
background: #fff;
}
} }
.title{ .title{
flex:1; flex:1;

View File

@ -122,7 +122,7 @@ class MyNeeds extends Component {
} }
} else if (JSON.parse(res.data).err_code === 88888) { } else if (JSON.parse(res.data).err_code === 88888) {
const response={data:JSON.parse(res.data)} const response = { data: JSON.parse(res.data) }
loginExpired(response) loginExpired(response)
} }
@ -388,22 +388,25 @@ class MyNeeds extends Component {
{/* 开始和结束日期 */} {/* 开始和结束日期 */}
<View className='page-section'> <View className='page-section'>
<View className='picker-box'> <View className='picker-box'>
<Picker mode='date' className='picker-container' onChange={this.onStartDateChange}> <View className='picker-wrapper'>
<View className='picker'> <Picker mode='date' className='picker-container' onChange={this.onStartDateChange}>
<View className='title-box'> <View className='picker'>
开始日期:<Text className='selected date'>{this.state.startDateSel}</Text> <View className='title-box'>
开始日期:<Text className='selected date'>{this.state.startDateSel}</Text>
</View>
</View> </View>
</Picker>
</View>
<View className='picker-wrapper'>
</View> <Picker className='picker-container' mode='date' start={this.state.startDateSel} onChange={this.onEndDateChange}>
</Picker> <View className='picker'>
<Picker className='picker-container' mode='date' start={this.state.startDateSel} onChange={this.onEndDateChange}> <View className='title-box'>
<View className='picker'> 结束日期: <Text className='selected date'>{this.state.endDateSel}</Text>
<View className='title-box'> </View>
结束日期: <Text className='selected date'>{this.state.endDateSel}</Text>
</View> </View>
</View> </Picker>
</Picker> </View>
</View> </View>
</View> </View>
{/* 行业分类开始 */} {/* 行业分类开始 */}

View File

@ -76,7 +76,7 @@ $themeColor:#FF7142;
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
flex-direction: row; flex-direction: row;
.picker-container{ .picker-wrapper{
flex:1 flex:1
} }

View File

@ -228,7 +228,7 @@ class MySupplyDemand extends Component {
this.setState({ isConfirmWindow: false }) this.setState({ isConfirmWindow: false })
Taro.showLoading({ Taro.showLoading({
title: '加载中' title: '加载中'
}) })
this.onDelete({ sdID: this.state.demandSupplyId }) this.onDelete({ sdID: this.state.demandSupplyId })
} }
@ -434,22 +434,25 @@ class MySupplyDemand extends Component {
{/* 开始和结束日期 */} {/* 开始和结束日期 */}
<View className='page-section'> <View className='page-section'>
<View className='picker-box'> <View className='picker-box'>
<Picker mode='date' className='picker-container' onChange={this.onStartDateChange}> <View className='picker-wrapper'>
<View className='picker'> <Picker mode='date' className='picker-container' onChange={this.onStartDateChange}>
<View className='title-box'> <View className='picker'>
<Text className='title'><Text className='require'>*</Text>:</Text> <Text className='date'>{this.state.startDateSel}</Text> <View className='title-box'>
</View> <Text className='title'><Text className='require'>*</Text>:</Text> <Text className='date'>{this.state.startDateSel}</Text>
</View>
</View>
</Picker>
<Picker className='picker-container' mode='date' start={this.state.startDateSel} onChange={this.onEndDateChange}>
<View className='picker'>
<View className='title-box'>
<Text className='title'><Text className='require'>*</Text>:</Text> <Text className='date'>{this.state.endDateSel}</Text>
</View> </View>
</View> </Picker>
</Picker> </View>
<View className='picker-wrapper'>
<Picker className='picker-container' mode='date' start={this.state.startDateSel} onChange={this.onEndDateChange}>
<View className='picker'>
<View className='title-box'>
<Text className='title'><Text className='require'>*</Text>:</Text> <Text className='date'>{this.state.endDateSel}</Text>
</View>
</View>
</Picker>
</View>
</View> </View>
</View> </View>

View File

@ -82,7 +82,7 @@ $themeColor:#FF7142;
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
flex-direction: row; flex-direction: row;
.picker-container{ .picker-wrapper{
flex:1 flex:1
} }

View File

@ -806,14 +806,14 @@ class Shop extends Component {
<View className='nav-box'> <View className='nav-box'>
<View className='nav'> <View className='nav'>
<View className='shop-cate'> <View className='shop-cate'>
<View> <View className='interaction'>
<ShopTypeInteractionComp <ShopTypeInteractionComp
url={URL.GetShopCategoryList} style='position:absolute;z-index:2;opacity:0;left:0' url={URL.GetShopCategoryList}
shopId={this.state.shop_id} shopId={this.state.shop_id}
onPassDataToChild={this.getDataFromShopChild.bind(this)} onPassDataToChild={this.getDataFromShopChild.bind(this)}
></ShopTypeInteractionComp> ></ShopTypeInteractionComp>
</View> </View>
<View className='interactive' onClick={this.showPopUp.bind(this)}> <View >
<Text className='text'> <Text className='text'>
店铺全部分类 店铺全部分类
</Text> </Text>

View File

@ -46,7 +46,7 @@ $themeColor:#FF7142;
line-height: 55px; line-height: 55px;
text-align: center; text-align: center;
overflow:hidden; overflow:hidden;
height:60rpx; height:60rpx;
.text{ .text{
color:white; color:white;
@ -57,10 +57,9 @@ height:60rpx;
flex:1; flex:1;
margin-left: 30px; margin-left: 30px;
position: relative; position: relative;
.interactive{ .interaction{
position: absolute; position: absolute;
left: 0; opacity: 0;
top:0;
} }
} }
.homepage-link{ .homepage-link{

View File

@ -4,8 +4,11 @@ export default function onClickValueService(e) {
let value let value
if (process.env.TARO_ENV === 'alipay') { if (process.env.TARO_ENV === 'alipay') {
value = e.currentTarget.dataset.eOnTapAA value = e.currentTarget.dataset.eOnTapAA
} else if (process.env.TARO_ENV === 'weapp') { } else if (process.env.TARO_ENV === 'weapp') {
value = e.currentTarget.dataset.eTapAA value = e.currentTarget.dataset.eTapAA
} }
value=typeof(value)==='string'?encodeURIComponent(value):value
console.log('value',value)
return value return value
} }