接入api 和店铺页面的店铺所有分类
This commit is contained in:
parent
6c6f3df246
commit
48894c62fe
@ -1,3 +1,5 @@
|
|||||||
|
|
||||||
|
$themeColor: #FF7142;
|
||||||
.orange{
|
.orange{
|
||||||
color:#FF7142,
|
color:#FF7142,
|
||||||
}
|
}
|
||||||
|
@ -1,52 +0,0 @@
|
|||||||
|
|
||||||
import Taro, { Component } from '@tarojs/taro'
|
|
||||||
import { View } from '@tarojs/components'
|
|
||||||
import { AtSearchBar } from 'taro-ui'
|
|
||||||
|
|
||||||
|
|
||||||
import './searchBarComponent.scss'
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class SearchBarComponent extends Component {
|
|
||||||
|
|
||||||
|
|
||||||
config = {
|
|
||||||
navigationBarTitleText: 'searchBarComponent'
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
constructor() {
|
|
||||||
|
|
||||||
super(...arguments)
|
|
||||||
this.state = {
|
|
||||||
value: ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
onChange(value) {
|
|
||||||
this.setState({
|
|
||||||
value: value
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<View className='searchBarComponent'>
|
|
||||||
<View className='searchBar-box'>
|
|
||||||
<AtSearchBar className='search-button'
|
|
||||||
showActionButton
|
|
||||||
actionName='搜索'
|
|
||||||
value={this.state.value}
|
|
||||||
onChange={this.onChange.bind(this)}
|
|
||||||
onActionClick={this.onActionClick.bind(this)}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
|
|
||||||
</View>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default SearchBarComponent
|
|
@ -1,17 +0,0 @@
|
|||||||
|
|
||||||
// 整个样式和shoppage 一样但是不生效
|
|
||||||
// .searchBarComponent{
|
|
||||||
// .search-button{
|
|
||||||
// .at-search-bar__action{
|
|
||||||
// background-color:#FF9900
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
|
|
||||||
.search-button{
|
|
||||||
font-size: 100px
|
|
||||||
}
|
|
@ -1,6 +1,6 @@
|
|||||||
import Taro, { Component } from '@tarojs/taro'
|
import Taro, { Component } from '@tarojs/taro'
|
||||||
import { View, Text, Image } from '@tarojs/components'
|
import { View, Text, Image,Button } from '@tarojs/components'
|
||||||
import { AtInput, AtButton, Picker, AtIcon, AtLoadMore, AtModal, AtToast } from 'taro-ui'
|
import { AtInput, AtButton, Picker, AtIcon, AtLoadMore, AtModal, AtToast,AtModalHeader ,AtModalContent ,AtModalAction } from 'taro-ui'
|
||||||
import copyrightComponent from '../../component/copyrightComponent/copyrightComponent'
|
import copyrightComponent from '../../component/copyrightComponent/copyrightComponent'
|
||||||
|
|
||||||
import URL from '../../serviceAPI.config'
|
import URL from '../../serviceAPI.config'
|
||||||
@ -25,7 +25,6 @@ class AllDemanding extends Component {
|
|||||||
industryCateSelected: '全部', // 当前行业分类状态
|
industryCateSelected: '全部', // 当前行业分类状态
|
||||||
startDateSel: '2018-04-22',
|
startDateSel: '2018-04-22',
|
||||||
endDateSel: '2018-04-22',
|
endDateSel: '2018-04-22',
|
||||||
startValidDate:'',
|
|
||||||
isOpenedGrabModal: false,
|
isOpenedGrabModal: false,
|
||||||
grabOrderId: '',//抢到订单的id
|
grabOrderId: '',//抢到订单的id
|
||||||
isGrabOrderSuccess: false,// 是否显示轻提示
|
isGrabOrderSuccess: false,// 是否显示轻提示
|
||||||
@ -153,16 +152,15 @@ class AllDemanding extends Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
// 提示模态弹窗element
|
// 提示模态弹窗element
|
||||||
const modalMessageGrabElement = <AtModal className='modal'
|
|
||||||
isOpened={this.state.isOpenedGrabModal}
|
|
||||||
title='提示'
|
const modalMessageGrabElement=<AtModal isOpened={this.state.isOpenedGrabModal}>
|
||||||
cancelText='取消'
|
<AtModalHeader>提示</AtModalHeader>
|
||||||
confirmText='确认'
|
<AtModalContent>
|
||||||
onClose={this.handleGrabModalClose}
|
确认抢单?
|
||||||
onCancel={this.handleGrabModalCancel}
|
</AtModalContent>
|
||||||
onConfirm={this.handleGrabConfirm.bind(this)}
|
<AtModalAction> <Button onClick={this.handleGrabModalCancel.bind(this)}>取消</Button> <Button className='orange' onClick={this.handleGrabConfirm.bind(this)}>确定</Button> </AtModalAction>
|
||||||
content='确认抢单?\n'
|
</AtModal>
|
||||||
/>
|
|
||||||
// 抢单返回轻提示
|
// 抢单返回轻提示
|
||||||
const grabOrderSuccessElement = <AtToast
|
const grabOrderSuccessElement = <AtToast
|
||||||
isOpened={this.state.isGrabOrderSuccess}
|
isOpened={this.state.isGrabOrderSuccess}
|
||||||
@ -183,13 +181,13 @@ class AllDemanding extends Component {
|
|||||||
</View>
|
</View>
|
||||||
<View className='body'>
|
<View className='body'>
|
||||||
<View className='image-container'>
|
<View className='image-container'>
|
||||||
<Image style='width:90px;height:60px' src={URL.Base + item.file_path[0].thumb_path} />
|
<Image style='width:110px;height:80px' src={URL.Base + item.file_path[0].thumb_path} />
|
||||||
</View>
|
</View>
|
||||||
<View className='detail'>
|
<View className='detail'>
|
||||||
<View className='title'>{item.sd_title}</View>
|
<View className='title'>{item.sd_title}</View>
|
||||||
<View className='para'>{item.sd_desc}</View>
|
<View className='para'>{item.sd_desc}</View>
|
||||||
<View className='button' onClick={this.grabOrder.bind(this, item.sd_id)}>
|
<View className='button' onClick={this.grabOrder.bind(this, item.sd_id)}>
|
||||||
<AtButton type='primary' size='small'> {item.state_name === '在用' ? '抢单' : '已抢单'}</AtButton>
|
<AtButton type='primary' size='small' className='orange'> {item.state_name === '在用' ? '抢单' : '已抢单'}</AtButton>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
|
||||||
|
$themeColor: #FF7142;
|
||||||
.allDemanding{
|
.allDemanding{
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
@ -57,8 +59,8 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
.at-button--primary{
|
.at-button--primary{
|
||||||
background-color:#FF9500;
|
background-color:$themeColor;
|
||||||
border:1PX solid #FF9500;
|
border:1PX solid $themeColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,7 +97,7 @@
|
|||||||
border-bottom: 1px solid #F2F2F2;
|
border-bottom: 1px solid #F2F2F2;
|
||||||
margin:20px 0;
|
margin:20px 0;
|
||||||
.image-container{
|
.image-container{
|
||||||
padding: 10px;
|
margin: 20px;
|
||||||
flex:1;
|
flex:1;
|
||||||
}
|
}
|
||||||
.detail{
|
.detail{
|
||||||
@ -144,3 +146,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.button{
|
||||||
|
.at-button--primary{
|
||||||
|
background-color:$themeColor;
|
||||||
|
border:1PX solid $themeColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import Taro, { Component } from '@tarojs/taro'
|
import Taro, { Component } from '@tarojs/taro'
|
||||||
import { View, Text, Image , Swiper, SwiperItem} from '@tarojs/components'
|
import { View, Text, Image , Swiper, SwiperItem} from '@tarojs/components'
|
||||||
|
|
||||||
import { AtTabs, AtTabsPane, AtSegmentedControl, AtIcon, AtToast, Picker,AtSearchBar } from 'taro-ui'
|
import { AtTabs, AtTabsPane, AtSegmentedControl, AtIcon, AtToast, Picker } from 'taro-ui'
|
||||||
import copyrightComponent from '../../component/copyrightComponent/copyrightComponent'
|
import copyrightComponent from '../../component/copyrightComponent/copyrightComponent'
|
||||||
|
|
||||||
import URL from '../../serviceAPI.config'
|
import URL from '../../serviceAPI.config'
|
||||||
@ -32,10 +32,9 @@ class Goods extends Component {
|
|||||||
monthSold: '',//月销量
|
monthSold: '',//月销量
|
||||||
totalSold: '',//总销量
|
totalSold: '',//总销量
|
||||||
browsingCount: '',// 浏览数
|
browsingCount: '',// 浏览数
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 商品详情api
|
// 商品详情api
|
||||||
getShopDescription() {
|
getShopDescription() {
|
||||||
Taro.request({
|
Taro.request({
|
||||||
@ -129,14 +128,7 @@ class Goods extends Component {
|
|||||||
})
|
})
|
||||||
return (
|
return (
|
||||||
<View className='gooods=container'>
|
<View className='gooods=container'>
|
||||||
<View className='searchBar-box'>
|
<View className='img-box'>
|
||||||
<AtSearchBar className='search-button'
|
|
||||||
actionName='搜索'
|
|
||||||
value={this.state.value}
|
|
||||||
onChange={this.onChange.bind(this)}
|
|
||||||
onActionClick={this.onActionClick.bind(this)}
|
|
||||||
/>
|
|
||||||
</View> <View className='img-box'>
|
|
||||||
{/* <Image className='img' src={URL.Base + this.state.productImagesUrl}></Image> */}
|
{/* <Image className='img' src={URL.Base + this.state.productImagesUrl}></Image> */}
|
||||||
<Swiper
|
<Swiper
|
||||||
className='swipper'
|
className='swipper'
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
// border: 1px solid #ddd;
|
// border: 1px solid #ddd;
|
||||||
// padding: 5px 0;
|
// padding: 5px 0;
|
||||||
.search-button{
|
|
||||||
.at-search-bar__action{
|
$themeColor:#FF7142;
|
||||||
background-color:#FF7142
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.img-box{
|
.img-box{
|
||||||
// border: 1px solid #ddd;
|
// border: 1px solid #ddd;
|
||||||
padding: 20px 0;
|
padding: 20px 0;
|
||||||
@ -126,7 +124,7 @@
|
|||||||
.at-tabs{
|
.at-tabs{
|
||||||
|
|
||||||
.at-tabs__item--active{
|
.at-tabs__item--active{
|
||||||
color:#FF7142
|
color:$themeColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.description-title{
|
.description-title{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import Taro, { Component } from '@tarojs/taro'
|
import Taro, { Component } from '@tarojs/taro'
|
||||||
import { View, Text, Radio, RadioGroup, Label } from '@tarojs/components'
|
import { View, Text, Radio, RadioGroup, Label } from '@tarojs/components'
|
||||||
import { AtInput, AtImagePicker, AtTextarea, AtButton, Picker, AtToast, AtSearchBar } from 'taro-ui'
|
import { AtInput, AtImagePicker, AtTextarea, AtButton, Picker, AtToast } from 'taro-ui'
|
||||||
|
|
||||||
import URL from '../../serviceAPI.config'
|
import URL from '../../serviceAPI.config'
|
||||||
|
|
||||||
@ -189,7 +189,6 @@ class GoodsPublish extends Component {
|
|||||||
for (let innerItem of middleItem.children) {
|
for (let innerItem of middleItem.children) {
|
||||||
thirdColumn.push({ id: innerItem.class_id, class_name: innerItem.class_name })
|
thirdColumn.push({ id: innerItem.class_id, class_name: innerItem.class_name })
|
||||||
}
|
}
|
||||||
break
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -452,14 +451,7 @@ class GoodsPublish extends Component {
|
|||||||
<View className='goods-publish'>
|
<View className='goods-publish'>
|
||||||
{imageUploadSuccess}
|
{imageUploadSuccess}
|
||||||
{productUploadSuccess}
|
{productUploadSuccess}
|
||||||
<View className='searchBar-box'>
|
|
||||||
<AtSearchBar className='search-button'
|
|
||||||
actionName='搜索'
|
|
||||||
value={this.state.value}
|
|
||||||
onChange={this.onChange.bind(this)}
|
|
||||||
onActionClick={this.onActionClick.bind(this)}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
<View className='goods-category'>
|
<View className='goods-category'>
|
||||||
<View className='page-section'>
|
<View className='page-section'>
|
||||||
<View>
|
<View>
|
||||||
@ -474,7 +466,10 @@ class GoodsPublish extends Component {
|
|||||||
<View className='picker'>
|
<View className='picker'>
|
||||||
<View className='title-box'>
|
<View className='title-box'>
|
||||||
<Text className='title'><Text className='require'>*</Text>商品分类:</Text> <Text className='selected'>
|
<Text className='title'><Text className='require'>*</Text>商品分类:</Text> <Text className='selected'>
|
||||||
{this.state.objectMultiArray[0][this.state.multiIndex[0]].class_name}{this.state.objectMultiArray[1][this.state.multiIndex[1]].class_name}{this.state.objectMultiArray[2][this.state.multiIndex[2]].class_name}
|
{this.state.objectMultiArray[0]?this.state.objectMultiArray[0][this.state.multiIndex[0]].class_name:''}
|
||||||
|
&{this.state.objectMultiArray[1]?this.state.objectMultiArray[1][this.state.multiIndex[1]].class_name:''}
|
||||||
|
&{this.state.objectMultiArray[2]?this.state.objectMultiArray[2][this.state.multiIndex[2]].class_name:''}
|
||||||
|
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
@ -486,7 +481,7 @@ class GoodsPublish extends Component {
|
|||||||
<View className='input-box'>
|
<View className='input-box'>
|
||||||
<Text className='require'>*</Text>
|
<Text className='require'>*</Text>
|
||||||
<AtInput
|
<AtInput
|
||||||
name='value'
|
name='productName'
|
||||||
title='商品名称:'
|
title='商品名称:'
|
||||||
type='text'
|
type='text'
|
||||||
value={this.state.productName}
|
value={this.state.productName}
|
||||||
@ -496,7 +491,7 @@ class GoodsPublish extends Component {
|
|||||||
<View className='input-box'>
|
<View className='input-box'>
|
||||||
<Text className='require'>*</Text>
|
<Text className='require'>*</Text>
|
||||||
<AtInput
|
<AtInput
|
||||||
name='value'
|
name='productPrice'
|
||||||
title='商品价格:'
|
title='商品价格:'
|
||||||
type='number'
|
type='number'
|
||||||
placeholder='¥'
|
placeholder='¥'
|
||||||
@ -507,7 +502,7 @@ class GoodsPublish extends Component {
|
|||||||
<View className='input-box'>
|
<View className='input-box'>
|
||||||
<Text className='require'>*</Text>
|
<Text className='require'>*</Text>
|
||||||
<AtInput
|
<AtInput
|
||||||
name='value'
|
name='productUnit'
|
||||||
title='商品单位:'
|
title='商品单位:'
|
||||||
type='text'
|
type='text'
|
||||||
value={this.state.productUnit}
|
value={this.state.productUnit}
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
.search-button{
|
$themeColor:#FF7142;
|
||||||
.at-search-bar__action{
|
|
||||||
background-color:#FF7142
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.goods-category{
|
.goods-category{
|
||||||
@ -85,8 +82,8 @@ background-color:#FF7142
|
|||||||
flex:1;
|
flex:1;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
.at-button--primary{
|
.at-button--primary{
|
||||||
background-color:#FF7142;
|
background-color:$themeColor;
|
||||||
border:1PX solid #FF7142;
|
border:1PX solid $themeColor;
|
||||||
}
|
}
|
||||||
.button-a{
|
.button-a{
|
||||||
background-color:#5cb85c;
|
background-color:#5cb85c;
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
$themeColor: #FF7142;
|
||||||
.home{
|
.home{
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
.first-banner ,.third-banner{
|
.first-banner ,.third-banner{
|
||||||
@ -14,7 +15,7 @@
|
|||||||
.at-modal-footer--simple{
|
.at-modal-footer--simple{
|
||||||
.at-modal-action{
|
.at-modal-action{
|
||||||
button:last-child:nth-child(2){
|
button:last-child:nth-child(2){
|
||||||
color:#FF7142
|
color:$themeColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -60,14 +61,14 @@
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
.item-tag-text{
|
.item-tag-text{
|
||||||
padding:5px;
|
padding:5px;
|
||||||
background-color: #FF7142;
|
background-color: $themeColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.item-title{
|
.item-title{
|
||||||
font-size: 50px;
|
font-size: 50px;
|
||||||
min-height: 21px;
|
min-height: 21px;
|
||||||
clear: both;
|
clear: both;
|
||||||
color: #FF7142;
|
color: $themeColor;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@ -28,8 +28,8 @@ class Index extends Component {
|
|||||||
//http://ihome6.com/Shop-supplyShops
|
//http://ihome6.com/Shop-supplyShops
|
||||||
componentDidMount(){
|
componentDidMount(){
|
||||||
Taro.navigateTo({
|
Taro.navigateTo({
|
||||||
url: '/pages/goodsPublish/goodsPublish'
|
// url: '/pages/goodsPublish/goodsPublish'
|
||||||
// url: '/pages/mySupplyDemand/mySupplyDemand'
|
url: '/pages/home/home'
|
||||||
// url:'/pages/supplyDemandPublish/supplyDemandPublish'
|
// url:'/pages/supplyDemandPublish/supplyDemandPublish'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import Taro, { Component } from '@tarojs/taro'
|
import Taro, { Component } from '@tarojs/taro'
|
||||||
import { View, Text } from '@tarojs/components'
|
import { View, Text } from '@tarojs/components'
|
||||||
import { AtInput, AtButton, Picker, AtIcon, AtModal, AtToast ,AtSearchBar} from 'taro-ui'
|
import { AtInput, AtButton, Picker, AtIcon, AtModal, AtToast } from 'taro-ui'
|
||||||
import URL from '../../serviceAPI.config'
|
import URL from '../../serviceAPI.config'
|
||||||
|
|
||||||
import copyrightComponent from '../../component/copyrightComponent/copyrightComponent'
|
import copyrightComponent from '../../component/copyrightComponent/copyrightComponent'
|
||||||
@ -282,14 +282,7 @@ class MySupplyDemand extends Component {
|
|||||||
{toastElement}
|
{toastElement}
|
||||||
|
|
||||||
|
|
||||||
<View className='searchBar-box'>
|
|
||||||
<AtSearchBar className='search-button'
|
|
||||||
actionName='搜索'
|
|
||||||
value={this.state.value}
|
|
||||||
onChange={this.onChange.bind(this)}
|
|
||||||
onActionClick={this.onActionClick.bind(this)}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
{/* 供求类型 */}
|
{/* 供求类型 */}
|
||||||
<View className='page-section'>
|
<View className='page-section'>
|
||||||
<View>
|
<View>
|
||||||
@ -339,7 +332,7 @@ class MySupplyDemand extends Component {
|
|||||||
|
|
||||||
</View>
|
</View>
|
||||||
</Picker>
|
</Picker>
|
||||||
<Picker className='picker-container' mode='date' onChange={this.onEndDateChange}>
|
<Picker className='picker-container' mode='date' start={this.state.startDateSel} onChange={this.onEndDateChange}>
|
||||||
<View className='picker'>
|
<View className='picker'>
|
||||||
<View className='title-box'>
|
<View className='title-box'>
|
||||||
<Text className='title'><Text className='require'>*</Text>结束日期:</Text> <Text className='selected'>{this.state.endDateSel}</Text>
|
<Text className='title'><Text className='require'>*</Text>结束日期:</Text> <Text className='selected'>{this.state.endDateSel}</Text>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
$themeColor:#FF7142;
|
||||||
|
|
||||||
.mySupplyDemand{
|
.mySupplyDemand{
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
@ -6,11 +8,7 @@
|
|||||||
line-height:100rpx;
|
line-height:100rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
.search-button{
|
|
||||||
.at-search-bar__action{
|
|
||||||
background-color:#FF7142
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.total-count{
|
.total-count{
|
||||||
text-align: right;
|
text-align: right;
|
||||||
margin: 20px;
|
margin: 20px;
|
||||||
@ -77,8 +75,8 @@ background-color:#FF7142
|
|||||||
flex:1;
|
flex:1;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
.at-button--primary{
|
.at-button--primary{
|
||||||
background-color:#FF7142;
|
background-color:$themeColor;
|
||||||
border:1PX solid #FF7142;
|
border:1PX solid $themeColor;
|
||||||
}
|
}
|
||||||
.button-a{
|
.button-a{
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import Taro, { Component } from '@tarojs/taro'
|
import Taro, { Component } from '@tarojs/taro'
|
||||||
import { View, Button, Text, Image } from '@tarojs/components'
|
import { View, Button, Text, Image } from '@tarojs/components'
|
||||||
import { AtSearchBar, AtTag, AtIcon, AtPagination } from 'taro-ui'
|
import { AtTag, AtIcon, AtPagination, AtActionSheet, AtActionSheetItem } from 'taro-ui'
|
||||||
import URL from '../../serviceAPI.config'
|
import URL from '../../serviceAPI.config'
|
||||||
|
|
||||||
|
|
||||||
@ -54,20 +54,13 @@ class Shop extends Component {
|
|||||||
filterCondition: '',// 筛选条件
|
filterCondition: '',// 筛选条件
|
||||||
total: 0,// 信息条数
|
total: 0,// 信息条数
|
||||||
currentPage: 1,// 当前页
|
currentPage: 1,// 当前页
|
||||||
|
isShowShopAllCate: false,
|
||||||
|
shopAllInnerCate: '',
|
||||||
|
isBlurWindow:false,
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 搜索栏值的改变方法
|
|
||||||
onChange(value) {
|
|
||||||
this.setState({
|
|
||||||
value: value
|
|
||||||
}, () => {
|
|
||||||
console.log(this.state.value)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//api 搜索栏的方法请求
|
//api 搜索栏的方法请求
|
||||||
getSearchBarkeyWords() {
|
getSearchBarkeyWords() {
|
||||||
Taro.request({
|
Taro.request({
|
||||||
@ -179,6 +172,43 @@ class Shop extends Component {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
// api 获取店铺内的店铺分类请求 GetShopCategoryList
|
||||||
|
getShopInnerCate({ id = 808 }) {
|
||||||
|
Taro.request({
|
||||||
|
url: URL.GetShopCategoryList,
|
||||||
|
method: 'POST',
|
||||||
|
dataType: 'json',
|
||||||
|
data: {
|
||||||
|
id: id,
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
'content-type': 'application/x-www-form-urlencoded',
|
||||||
|
'X-Requested-With': 'XMLHttpRequest'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
if (res.statusCode === 200) {
|
||||||
|
const originalData = res.data.data
|
||||||
|
const sortedData = []
|
||||||
|
for (let item in originalData) {
|
||||||
|
let each = originalData[item]
|
||||||
|
each['id'] = item
|
||||||
|
sortedData.push(each)
|
||||||
|
}
|
||||||
|
console.log('sorteddata', sortedData)
|
||||||
|
this.setState({ shopAllInnerCate: sortedData })
|
||||||
|
|
||||||
|
} else {
|
||||||
|
console.log('获取店铺内部分类失败')
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 产品排序
|
// 产品排序
|
||||||
accendingDescending(value) {
|
accendingDescending(value) {
|
||||||
@ -295,30 +325,40 @@ class Shop extends Component {
|
|||||||
showDescriptionPage() {
|
showDescriptionPage() {
|
||||||
this.setState({ showShopHomePage: false })
|
this.setState({ showShopHomePage: false })
|
||||||
}
|
}
|
||||||
|
isShowShopAllCate() {
|
||||||
|
this.setState({ isShowShopAllCate: !this.state.isShowShopAllCate,isBlurWindow:true })
|
||||||
|
|
||||||
|
}
|
||||||
|
handleShopInnerCate(id){
|
||||||
|
this.setState({
|
||||||
|
isShowShopAllCate: false,isBlurWindow:false
|
||||||
|
})
|
||||||
|
this.goodsSearch({shop_class_id:id,shop_id: this.$router.params.id})
|
||||||
|
|
||||||
|
}
|
||||||
|
closeBgWindow(){
|
||||||
|
this.setState({
|
||||||
|
isShowShopAllCate: false,isBlurWindow:false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
|
|
||||||
}
|
}
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.setState({ shopId: this.$router.params.id, shopName: this.$router.params.name }) // 输出 { id: 2, type: 'test' }
|
|
||||||
//页面加载之后 得到指定店铺的商品 和 筛选标签
|
//页面加载之后 得到指定店铺的商品 和 筛选标签
|
||||||
this.goodsSearch({})
|
this.goodsSearch({ shop_id: this.$router.params.id }) // 加载店铺商品
|
||||||
this.getSearchParams({})
|
this.getSearchParams({})// 加载筛选项
|
||||||
this.getShopDescription({})
|
this.getShopDescription({ shopID: this.$router.params.id }) // 加载店铺说明
|
||||||
// this.getSearchBarkeyWords()
|
// this.getSearchBarkeyWords()
|
||||||
|
this.getShopInnerCate({id:this.$router.params.id})
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidShow() { }
|
componentDidShow() { }
|
||||||
|
|
||||||
componentDidHide() { }
|
componentDidHide() { }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
||||||
|
|
||||||
const ShopItemElementsArray = this.state.shopItem.length ? this.state.shopItem.map((item, index) => {
|
const ShopItemElementsArray = this.state.shopItem.length ? this.state.shopItem.map((item, index) => {
|
||||||
return <View key={index} className='shop-item' >
|
return <View key={index} className='shop-item' >
|
||||||
<ShopItem item={item}></ShopItem>
|
<ShopItem item={item}></ShopItem>
|
||||||
@ -463,31 +503,29 @@ class Shop extends Component {
|
|||||||
<View className='img-box'> <Image mode='aspectFit' src={URL.Base + 'Public/images/shop/bg_banner.png'} style='max-width: 100%;max-height:100%;' /></View>
|
<View className='img-box'> <Image mode='aspectFit' src={URL.Base + 'Public/images/shop/bg_banner.png'} style='max-width: 100%;max-height:100%;' /></View>
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
const shopAllCateElementArray = this.state.shopAllInnerCate.map((item, index) => {
|
||||||
|
return <View key={index} className='item' onClick={this.handleShopInnerCate.bind(this,item.id)}> <Text>{item.n}</Text> </View>
|
||||||
|
})
|
||||||
return (
|
return (
|
||||||
<View className='shop' >
|
<View className='shop' >
|
||||||
<View className='searchBar-box'>
|
|
||||||
<AtSearchBar className='search-button'
|
<View onClick={this.state.closeBgWindow.bind(this)} className={this.state.isBlurWindow?'show-blur':''}></View>
|
||||||
actionName='搜索'
|
|
||||||
value={this.state.value}
|
|
||||||
onChange={this.onChange.bind(this)}
|
|
||||||
onActionClick={this.onActionClick.bind(this)}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
<View className='banner-box'>
|
<View className='banner-box'>
|
||||||
<Image src={URL.Base + 'Public/visual_editing/img/ksh_bg.jpg'} mode='aspectFill' style='height:120px' />
|
<Image src={URL.Base + 'Public/visual_editing/img/ksh_bg.jpg'} mode='aspectFill' style='height:120px' />
|
||||||
<View className='shop-name'>{shopName}</View>
|
<View className='shop-name'>{this.state.shopName}</View>
|
||||||
</View>
|
</View>
|
||||||
<View className='nav-box'>
|
<View className='nav-box'>
|
||||||
<View className='nav'>
|
<View className='nav'>
|
||||||
<View className='shop-cate'>
|
<View className='shop-cate' onClick={this.isShowShopAllCate.bind(this)}>
|
||||||
<Text className='text'>
|
<Text className='text'>
|
||||||
店铺全部分类
|
店铺全部分类
|
||||||
</Text>
|
</Text>
|
||||||
<AtIcon value='menu' size='10' color='white'></AtIcon>
|
<AtIcon value='menu' size='10' color='white'></AtIcon>
|
||||||
</View>
|
</View>
|
||||||
|
<View className={this.state.isShowShopAllCate ? 'shopcate-selection show' : 'shopcate-selection'}>
|
||||||
|
{shopAllCateElementArray}</View>
|
||||||
<View className='homepage-link' onClick={this.showHomePage.bind()}>
|
<View className='homepage-link' onClick={this.showHomePage.bind()}>
|
||||||
<Text className='text'>
|
<Text className='text'>
|
||||||
首页
|
首页
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
|
$themeColor:#FF7142;
|
||||||
|
|
||||||
|
|
||||||
.shop{
|
|
||||||
.search-button{
|
|
||||||
.at-search-bar__action{
|
|
||||||
background-color:#FF7142
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.banner-box{
|
.banner-box{
|
||||||
position: relative;
|
position: relative;
|
||||||
.shop-name{
|
.shop-name{
|
||||||
@ -16,9 +11,36 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.show-blur{
|
||||||
|
background-color: white;
|
||||||
|
opacity: 0;
|
||||||
|
z-index: 9;
|
||||||
|
position: absolute;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%
|
||||||
|
}
|
||||||
.nav-box{
|
.nav-box{
|
||||||
|
|
||||||
background-color: black;
|
background-color: black;
|
||||||
|
position: relative;
|
||||||
|
.shopcate-selection{
|
||||||
|
z-index: 10;
|
||||||
|
position: absolute ;
|
||||||
|
top:55px;
|
||||||
|
width: 30%;
|
||||||
|
background-color: red;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.show{
|
||||||
|
display: block;
|
||||||
|
.item{
|
||||||
|
background-color: #777;
|
||||||
|
text-align: center;
|
||||||
|
color: white;
|
||||||
|
font-size: 25px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.nav{
|
.nav{
|
||||||
display: flex;
|
display: flex;
|
||||||
line-height: 55px;
|
line-height: 55px;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
import Taro, { Component } from '@tarojs/taro'
|
import Taro, { Component } from '@tarojs/taro'
|
||||||
import { View, Text } from '@tarojs/components'
|
import { View, Text } from '@tarojs/components'
|
||||||
import { AtInput, AtImagePicker, AtTextarea, AtButton, Picker, AtToast,AtSearchBar } from 'taro-ui'
|
import { AtInput, AtImagePicker, AtTextarea, AtButton, Picker, AtToast } from 'taro-ui'
|
||||||
|
|
||||||
import copyrightComponent from '../../component/copyrightComponent/copyrightComponent'
|
import copyrightComponent from '../../component/copyrightComponent/copyrightComponent'
|
||||||
import URL from '../../serviceAPI.config'
|
import URL from '../../serviceAPI.config'
|
||||||
@ -139,6 +139,11 @@ class SupplyDemand extends Component {
|
|||||||
contentChange(event) {
|
contentChange(event) {
|
||||||
this.setState({ content: event.target.value })
|
this.setState({ content: event.target.value })
|
||||||
}
|
}
|
||||||
|
goToMyDemSupPage(){
|
||||||
|
Taro.navigateTo({
|
||||||
|
url: '/pages/mySupplyDemand/mySupplyDemand'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
@ -171,14 +176,7 @@ class SupplyDemand extends Component {
|
|||||||
{imageUploadSuccessElement}
|
{imageUploadSuccessElement}
|
||||||
{/* 商品发布模态框 */}
|
{/* 商品发布模态框 */}
|
||||||
{demandSupplyUploadSuccessElement}
|
{demandSupplyUploadSuccessElement}
|
||||||
<View className='searchBar-box'>
|
|
||||||
<AtSearchBar className='search-button'
|
|
||||||
actionName='搜索'
|
|
||||||
value={this.state.value}
|
|
||||||
onChange={this.onChange.bind(this)}
|
|
||||||
onActionClick={this.onActionClick.bind(this)}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
<View className='page-section'>
|
<View className='page-section'>
|
||||||
<View>
|
<View>
|
||||||
<Picker mode='selector' range={this.state.demandingSupplyCate} onChange={this.demandingSupplyCate.bind(this)}>
|
<Picker mode='selector' range={this.state.demandingSupplyCate} onChange={this.demandingSupplyCate.bind(this)}>
|
||||||
@ -252,6 +250,7 @@ class SupplyDemand extends Component {
|
|||||||
<View className='img-container'>
|
<View className='img-container'>
|
||||||
<AtImagePicker
|
<AtImagePicker
|
||||||
multiple
|
multiple
|
||||||
|
showAddBtn={this.state.pickerImageUrl.length<4}
|
||||||
files={this.state.pickerImageUrl}
|
files={this.state.pickerImageUrl}
|
||||||
onChange={this.onChangeImg.bind(this)}
|
onChange={this.onChangeImg.bind(this)}
|
||||||
onFail={this.onFail.bind(this)}
|
onFail={this.onFail.bind(this)}
|
||||||
@ -282,8 +281,8 @@ class SupplyDemand extends Component {
|
|||||||
|
|
||||||
<AtButton type='primary' className='button-a' size='small'>发布并新增</AtButton>
|
<AtButton type='primary' className='button-a' size='small'>发布并新增</AtButton>
|
||||||
</View>
|
</View>
|
||||||
<View className='button'>
|
<View className='button' onClick={this.goToMyDemSupPage.bind(this)}>
|
||||||
<AtButton type='primary' className='button-a' size='small'>商品列表</AtButton>
|
<AtButton type='primary' className='button-a' size='small'>我的供求</AtButton>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
|
$themeColor:#FF7142;
|
||||||
|
|
||||||
.supply-demand{
|
.supply-demand{
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
.search-button{
|
|
||||||
.at-search-bar__action{
|
|
||||||
background-color:#FF7142
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.border-box{
|
.border-box{
|
||||||
border-bottom: 1Px solid #d6e4ef;
|
border-bottom: 1Px solid #d6e4ef;
|
||||||
display: flex
|
display: flex
|
||||||
@ -33,8 +31,8 @@
|
|||||||
flex:1;
|
flex:1;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
.at-button--primary{
|
.at-button--primary{
|
||||||
background-color:#FF7142,;
|
background-color:$themeColor,;
|
||||||
border:1PX solid #FF7142,;
|
border:1PX solid $themeColor,;
|
||||||
}
|
}
|
||||||
.button-a{
|
.button-a{
|
||||||
background-color:#5cb85c;
|
background-color:#5cb85c;
|
||||||
|
@ -5,8 +5,11 @@ const URL = {
|
|||||||
Login: LOCALURL + 'Applet-login', //登入接口
|
Login: LOCALURL + 'Applet-login', //登入接口
|
||||||
ShopWxStore: LOCALURL + 'Shop-wxStore', //商城首页信息
|
ShopWxStore: LOCALURL + 'Shop-wxStore', //商城首页信息
|
||||||
ShopSupplyShops: LOCALURL + 'Shop-supplyShops',// 商城店铺信息
|
ShopSupplyShops: LOCALURL + 'Shop-supplyShops',// 商城店铺信息
|
||||||
|
// 店铺信息
|
||||||
GoodsSearch: LOCALURL + 'GoodsSearch-search',// 店铺页面的信息
|
GoodsSearch: LOCALURL + 'GoodsSearch-search',// 店铺页面的信息
|
||||||
GetSearchParam: LOCALURL + 'GoodsSearch-getSearchParam',// sidebar筛选的字段
|
GetSearchParam: LOCALURL + 'GoodsSearch-getSearchParam',// sidebar筛选的字段
|
||||||
|
GetShopCategoryList: LOCALURL + 'Shop-ajaxShopCartgory',// 店铺内分类目录
|
||||||
|
GetProductCategoryList: LOCALURL + 'applet-getGoodsClass',// 商品分类目录
|
||||||
SearchResult: LOCALURL + 'GoodsSearch-search',// 得到搜索结果
|
SearchResult: LOCALURL + 'GoodsSearch-search',// 得到搜索结果
|
||||||
SearchBarKeyWords: LOCALURL + 'Search-getKeywords',// 搜索栏接口
|
SearchBarKeyWords: LOCALURL + 'Search-getKeywords',// 搜索栏接口
|
||||||
GetAllDemanding: LOCALURL + 'supply-allDemandList',// 获取所有业主需求
|
GetAllDemanding: LOCALURL + 'supply-allDemandList',// 获取所有业主需求
|
||||||
@ -19,8 +22,7 @@ const URL = {
|
|||||||
GetShopItemDetail: LOCALURL + 'GoodsQuery-wxGoodsDetail',// 商品详情
|
GetShopItemDetail: LOCALURL + 'GoodsQuery-wxGoodsDetail',// 商品详情
|
||||||
// 商品发布api接口
|
// 商品发布api接口
|
||||||
|
|
||||||
GetShopCategoryList: LOCALURL + 'Shop-ajaxShopCartgory',// 商品分类目录
|
|
||||||
GetProductCategoryList: LOCALURL + 'applet-getGoodsClass',// 商品分类目录
|
|
||||||
UploadPorductImage: LOCALURL + 'Goods-fileUpload',// 上传商品图片
|
UploadPorductImage: LOCALURL + 'Goods-fileUpload',// 上传商品图片
|
||||||
UploadProduct: LOCALURL + 'Goods-phonePost',// 上传商品
|
UploadProduct: LOCALURL + 'Goods-phonePost',// 上传商品
|
||||||
UploadSupplyDemand: LOCALURL + 'Supply-post',// 上传供求
|
UploadSupplyDemand: LOCALURL + 'Supply-post',// 上传供求
|
||||||
|
@ -1,13 +1,24 @@
|
|||||||
todo list:
|
todo list:
|
||||||
|
|
||||||
搜索栏的search button 样式
|
首页:
|
||||||
首页:
|
|
||||||
优惠卷和询价接口
|
优惠卷和询价接口
|
||||||
商品发布页面:
|
联系人和联系电话 改动?
|
||||||
商品分类三级联动 // 改变新的multiObject 之后 三级联动就失效了
|
店铺页面:
|
||||||
商品价格无法设定为数字
|
侧边筛选
|
||||||
|
|
||||||
|
商品发布页面:
|
||||||
|
商品分类三级联动 // 有bug
|
||||||
|
店铺分类选项 二级联动// 需要修改
|
||||||
|
商品价格无法设定为数字 // 有bug
|
||||||
|
|
||||||
|
需要写商品列表页面吗?
|
||||||
|
|
||||||
|
供求发布页面
|
||||||
|
等待后台- 供求类型 和供求状态
|
||||||
|
联系电话无法设置为数字 // 有bug type=‘password’ 可以
|
||||||
全部业主需求页面:
|
全部业主需求页面:
|
||||||
供求状态 和行业分类--等待后台接口
|
供求状态 和行业分类--等待后台接口
|
||||||
搜索api
|
|
||||||
我的供求页面:
|
我的供求页面:
|
||||||
搜索接口--等待后台
|
搜索接口--等待后台
|
||||||
|
我的供求 -查看和编辑页面
|
||||||
|
Loading…
Reference in New Issue
Block a user