页面调试

This commit is contained in:
郑茂强 2019-01-10 17:36:45 +08:00
parent 9e1f708f73
commit e449c07ffc
25 changed files with 420 additions and 263 deletions

View File

@ -18,17 +18,17 @@ class App extends Component {
config = { config = {
pages: [ pages: [
'pages/index/index', // index页面 'pages/index/index', // index页面
'pages/home/home',//首页 'pages/home/home',//首页 ---------------------
'pages/shop/shop',//店铺页面 'pages/shop/shop',//店铺页面 ---------------------
'pages/goods/goods',// 商品页面 'pages/goods/goods',// 商品页面 ---------------------
'pages/goodsPublish/goodsPublish',// 商品发布页面 'pages/goodsPublish/goodsPublish',// 商品发布页面 ---------------------
'pages/supplyDemandPublish/supplyDemandPublish',// 供求发布页面 'pages/supplyDemandPublish/supplyDemandPublish',// 供求发布页面 ---------------------
'pages/mySupplyDemand/mySupplyDemand',// 我的供求列表页面 'pages/mySupplyDemand/mySupplyDemand',// 我的供求列表页面 ---------------------
'pages/myGoodsEdit/myGoodsEdit',// 我的商品编辑页面 'pages/myGoodsEdit/myGoodsEdit',// 我的商品编辑页面 ---------------------
'pages/allDemanding/allDemanding',// 所有供求页面 'pages/allDemanding/allDemanding',// 所有供求页面 ---------------------
'pages/myGoodList/myGoodList',// 我的商品列表页面 'pages/myGoodList/myGoodList',// 我的商品列表页面 --------------------- 编辑商品按键
'pages/myDemandSupplyEdit/myDemandSupplyEdit',// 我的供求编辑页面 'pages/myDemandSupplyEdit/myDemandSupplyEdit',// 我的供求编辑页面 ---------------------
'pages/supplyDemandView/supplyDemandView',// 查看单个供求页面 'pages/supplyDemandView/supplyDemandView',// 查看单个供求页面
'pages/grabOrderPage/grabOrderPage',// 抢单页面 'pages/grabOrderPage/grabOrderPage',// 抢单页面
'pages/myNeeds/myNeeds',// 我的需求页面 'pages/myNeeds/myNeeds',// 我的需求页面
@ -41,8 +41,8 @@ class App extends Component {
backgroundTextStyle: 'light', backgroundTextStyle: 'light',
navigationBarBackgroundColor: '#fff', navigationBarBackgroundColor: '#fff',
navigationBarTitleText: 'WeChat', navigationBarTitleText: 'WeChat',
navigationBarTextStyle: 'black' navigationBarTextStyle: 'black',
enablePullDownRefresh:true
} }
, ,

View File

@ -1,16 +1,44 @@
$themeColor: #FF7142; $themeColor: #FF7142;
$themeColor: #FF7142;
$linearOrange:linear-gradient(to right, #FF7142, #FF7142);
$linearDarkRed:linear-gradient(to right, #d9534f, #d9534f);;
$linearGreen:linear-gradient(to right, #5cb85c, #5cb85c);;
.input-index--at-input__title{
font-weight: bold
}
.orange{ .orange{
color:#FF7142, color:#FF7142,
} }
.blur{
color:#FF7142;
opacity: .65;
}
.orange-bg{ .orange-bg{
background-color:#FF7142, background-color:#FF7142,
} }
.green-bg{ .green-bg{
background-color: #5cb85c background-color: #5cb85c
}
.button-green{
color:white;
font-size: 28px;
background:$linearGreen;
margin:20px auto
}
.button-dark-red{
color:white;
font-size: 28px;
background:$linearDarkRed;
margin:20px auto
}
.button-orange{
color:white;
font-size: 28px;
background:$linearOrange;
margin:20px auto
}
.button-no-margin{
margin:10px 0
} }

View File

@ -114,7 +114,7 @@ class recommondShop extends Component {
.then(res => { .then(res => {
console.log('购买咨询请求成功', res) console.log('购买咨询请求成功', res)
if (res.statusCode === 200) { if (res.statusCode === 200) {
Taro.showToast({ title: res.data.err_msg,icon:'success' }) Taro.showToast({ title: '咨询成功',icon:'success' })
} else { } else {
Taro.showToast({ title: res.data.err_msg,icon:'none' }) Taro.showToast({ title: res.data.err_msg,icon:'none' })
@ -262,10 +262,10 @@ class recommondShop extends Component {
<Text style='margin-left:2px; vertical-align: middle;'> {title}</Text> <Text style='margin-left:2px; vertical-align: middle;'> {title}</Text>
</View> </View>
<View className='consult-voucher-button' style='margin-right:5px'> <View className='consult-voucher-button' style='margin-right:5px'>
{voucherLeft ? <Button onClick={this.isOpenVoucher.bind(this)} style='padding:0' className='voucher-button-text voucher' >优惠卷</Button> : <Button style='padding:0' className='voucher-button-text'></Button>} {voucherLeft ? <Button onClick={this.isOpenVoucher.bind(this)} size='mini' className='button-orange voucher-button-text voucher' >优惠卷</Button> : <Button size='mini' className='button-orange voucher-button-text'></Button>}
<Button onClick={this.isOpenConsult.bind(this)} style='padding:0' className='consult-button-text'>询价</Button> <Button onClick={this.isOpenConsult.bind(this)} size='mini' className='button-orange consult-button-text'>询价</Button>
</View> </View>
</View> </View>

View File

@ -1,5 +1,5 @@
.shop-list-box{ .shop-list-box{
border: 1px solid #ddd; border: 4rpx solid #ddd;
border-radius: 3px; border-radius: 3px;
box-shadow: 0 5px 5px #ddd; box-shadow: 0 5px 5px #ddd;
margin-bottom: 10px; margin-bottom: 10px;
@ -24,7 +24,7 @@
} }
.header{ .header{
border-bottom:1px solid #F2F2F2; border-bottom:4rpx solid #F2F2F2;
display: flex; display: flex;
.title{ .title{
@ -33,10 +33,10 @@
font-weight: bold; font-weight: bold;
font-size: 30px; font-size: 30px;
text-align: left; text-align: left;
overflow:hidden; overflow:hidden;
white-space:nowrap; white-space:nowrap;
line-height:90rpx;
margin-left:3%;
} }
.consult-voucher-button{ .consult-voucher-button{
@ -53,7 +53,7 @@ white-space:nowrap;
width: 100px; width: 100px;
line-height:50px; line-height:50px;
height:50px; height:50px;
margin-top:20px; margin-top:7%;
} }
.voucher-button-text{ .voucher-button-text{
color:white; color:white;
@ -62,7 +62,7 @@ white-space:nowrap;
width: 100px; width: 100px;
line-height:50px; line-height:50px;
height:50px; height:50px;
margin-top:20px; margin-top:7%;
} }
.voucher{ .voucher{
@ -71,7 +71,7 @@ white-space:nowrap;
} }
} }
.body{ .body{
border-bottom:1px solid #F2F2F2; border-bottom:4rpx solid #F2F2F2;
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
font-size: 35px; font-size: 35px;

View File

@ -247,9 +247,9 @@ class AllDemanding extends Component {
<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>
{item.state_name === '在用' ? <View className='button' onClick={this.grabOrder.bind(this, item.sd_id)}> {item.state_name === '在用' ? <View className='button' onClick={this.grabOrder.bind(this, item.sd_id)}>
<AtButton type='primary' size='small' className='orange'>抢单</AtButton> <Button size='mini' className='button-orange'>抢单</Button>
</View> : <View className='button' > </View> : <View className='button' >
<AtButton type='primary' size='small' className='blur'> 已抢单</AtButton> <Button size='mini' disabled={true} className='button-orange'> 已抢单</Button>
</View> </View>
} }
</View> </View>
@ -317,15 +317,15 @@ class AllDemanding extends Component {
<View className='button-box'> <View className='button-box'>
<View className='button' onClick={this.searchHanlder.bind(this)}> <View className='button' onClick={this.searchHanlder.bind(this)}>
<AtButton type='primary' size='small'> <Button type='primary' size='mini' className='button-orange' >
<AtIcon value='search' size='12' color='white'></AtIcon> <AtIcon value='search' size='12' color='white'></AtIcon>
搜索</AtButton> 搜索</Button>
</View> </View>
<View className='button' onClick={this.emptyFilter.bind(this)}> <View className='button' onClick={this.emptyFilter.bind(this)}>
<AtButton type='primary' className='button-b' size='small'> <Button type='primary' size='mini' className='button-dark-red' >
<AtIcon value='trash' size='12' color='white'></AtIcon> <AtIcon value='trash' size='12' color='white'></AtIcon>
清空</AtButton> 清空</Button>
</View> </View>
</View> </View>
{/* 供求页面的数据加载 */} {/* 供求页面的数据加载 */}

View File

@ -69,16 +69,21 @@ $themeColor: #FF7142;
text-align: center; text-align: center;
.at-button--primary{ // .button-s{
background-color:$themeColor; // // color:white;
border:1PX solid $themeColor; // // font-size: 30px;
} // // background:linear-gradient(to right, #FF9900, #FF7B00);
// // width: 150px;
// // margin:20px auto
// // background-color:$themeColor;
// // border:1PX solid $themeColor;
// }
.button-b{ // .button-b{
// width: 150px;
background-color:#d9534f; // background-color:#d9534f;
border:1PX solid #d9534f; // border:1PX solid #d9534f;
} // }
} }
} }
.demanding-box{ .demanding-box{
@ -171,4 +176,7 @@ $themeColor: #FF7142;
} }
.pagination-box{ .pagination-box{
margin: 50px 0; margin: 50px 0;
} }
.input-index--at-input__title{
font-weight: bold
}

View File

@ -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, Button } from '@tarojs/components'
import { AtInput, AtImagePicker, AtTextarea, AtButton, } from 'taro-ui' import { AtInput, AtImagePicker, AtTextarea, AtForm } from 'taro-ui'
import ShopTypeInteractionComp from '../../component/shopTypeInteractionComp/shopTypeInteractionComp' import ShopTypeInteractionComp from '../../component/shopTypeInteractionComp/shopTypeInteractionComp'
@ -19,7 +19,7 @@ class GoodsPublish extends Component {
constructor() { constructor() {
super(...arguments) super(...arguments)
this.state = { this.state = {
shopTypeSelected: { name: '选择店铺类型', id: '' },//已选的店铺分类 shopTypeSelected: { name: '选择店铺类型', id: '' },//已选的店铺分类
goodsTypeSelected: { name: '选择商品分类', id: '' },// 已选的商品分类 goodsTypeSelected: { name: '选择商品分类', id: '' },// 已选的商品分类
productName: '', productName: '',
@ -34,7 +34,7 @@ class GoodsPublish extends Component {
} }
@ -133,10 +133,10 @@ class GoodsPublish extends Component {
}) })
} }
productNameChange(event) { productNameChange(event) {
this.setState({ this.setState({
productName: event productName: event
@ -199,7 +199,7 @@ class GoodsPublish extends Component {
}) })
} }
} }
onClickUploadGoods() { onClickUploadGoods() {
if (this.state.productName && if (this.state.productName &&
this.state.productPrice && this.state.productPrice &&
@ -260,14 +260,14 @@ class GoodsPublish extends Component {
return ( return (
<View className='goods-publish'> <View className='goods-publish'>
<View className='goods-category'> <View className='goods-category'>
{/* 商品分类开始 */} {/* 商品分类开始 */}
<GoodsTypeInteractionComp <GoodsTypeInteractionComp
url={URL.GetProductCategoryList} url={URL.GetProductCategoryList}
onPassDataToChild={this.getDataFromGoodsChild.bind(this)} onPassDataToChild={this.getDataFromGoodsChild.bind(this)}
selectedValue={this.state.goodsTypeSelected} selectedValue={this.state.goodsTypeSelected}
></GoodsTypeInteractionComp>
></GoodsTypeInteractionComp>
{/* 商品分类结束 */} {/* 商品分类结束 */}
<View className='input-box'> <View className='input-box'>
@ -277,6 +277,7 @@ class GoodsPublish extends Component {
title='商品名称:' title='商品名称:'
type='text' type='text'
value={this.state.productName} value={this.state.productName}
border={false}
onChange={this.productNameChange.bind(this)} onChange={this.productNameChange.bind(this)}
/> />
</View> </View>
@ -288,6 +289,7 @@ class GoodsPublish extends Component {
type='number' type='number'
placeholder='¥' placeholder='¥'
value={this.state.productPrice} value={this.state.productPrice}
border={false}
onChange={this.productPriceChange.bind(this)} onChange={this.productPriceChange.bind(this)}
/> />
</View> </View>
@ -296,8 +298,9 @@ class GoodsPublish extends Component {
<AtInput <AtInput
name='productUnit' name='productUnit'
title='商品单位:' title='商品单位:'
type='text' type='number'
value={this.state.productUnit} value={this.state.productUnit}
border={false}
onChange={this.productUnitChange.bind(this)} onChange={this.productUnitChange.bind(this)}
/> />
</View> </View>
@ -342,13 +345,13 @@ class GoodsPublish extends Component {
</View> </View>
<View className='button-box' > <View className='button-box' >
<View className='button' > <View className='button' >
<AtButton type='primary' size='small' onClick={this.onClickUploadGoods.bind(this)}>发布</AtButton> <Button size='mini' className='button-orange' onClick={this.onClickUploadGoods.bind(this)}>发布</Button>
</View> </View>
{/* <View className='button'> {/* <View className='button'>
<AtButton type='primary' className='button-a' size='small' >发布并新增</AtButton> <Button type='primary' className='button-a' size='small' >发布并新增</Button>
</View> */} </View> */}
<View className='button' onClick={this.goToMyGoodListPage.bind(this)}> <View className='button' onClick={this.goToMyGoodListPage.bind(this)}>
<AtButton type='primary' className='button-a' size='small'>商品列表</AtButton> <Button size='mini' className='button-green'>商品列表</Button>
</View> </View>

View File

@ -108,4 +108,7 @@ $themeColor:#FF7142;
color:red; color:red;
line-height:100rpx; line-height:100rpx;
} }

View File

@ -1,7 +1,7 @@
//grabOrderPage //grabOrderPage
import Taro, { Component } from '@tarojs/taro' import Taro, { Component } from '@tarojs/taro'
import { View, Text } from '@tarojs/components' import { View, Text, Button } from '@tarojs/components'
import { AtButton, AtIcon } from 'taro-ui' import { AtModal, AtModalHeader, AtModalContent, AtModalAction, AtIcon } from 'taro-ui'
import URL from '../../serviceAPI.config' import URL from '../../serviceAPI.config'
@ -25,7 +25,8 @@ class GrabOrderPage extends Component {
contactNumber: '', contactNumber: '',
address: '', address: '',
content: '', content: '',
isOpen: false, // 抢单消息提示
grabOrderId:this.$router.params.orderId
} }
} }
@ -46,9 +47,6 @@ class GrabOrderPage extends Component {
}) })
.then(res => { .then(res => {
console.log('抢单详情获取成功', res) console.log('抢单详情获取成功', res)
this.setState({ this.setState({
type: res.data.sdInfo.sd_type, type: res.data.sdInfo.sd_type,
title: res.data.sdInfo.sd_title, title: res.data.sdInfo.sd_title,
@ -65,14 +63,70 @@ class GrabOrderPage extends Component {
console.log('抢单详情获取失败', error) console.log('抢单详情获取失败', error)
}) })
} }
callPhoneNumber(){ //抢单请求
GrabDemand({ demandId = 218 }) {
Taro.request({
url: URL.GrabDemand,
method: 'POST',
dataType: 'json',
data: {
demandId: demandId
},
header: {
'content-type': 'application/x-www-form-urlencoded',
'Cookie': 'PFWSSS=' + Taro.getStorageSync('session_id'),
'X-Requested-With': 'XMLHttpRequest'
}
})
.then(res => {
if(res.data.err_msg === 'success'){
Taro.showToast({
title: '抢单成功' ,
icon: 'success',
duration: 1500
})
setTimeout(() => {
Taro.navigateTo({
url:'/pages/home/home'
})
}, 1500);
}else{
Taro.showToast({
title: res.data.err_msg ,
icon: 'none',
duration: 1500
})
}
console.log('抢单请求:', res)
})
}
callPhoneNumber() {
Taro.makePhoneCall({ Taro.makePhoneCall({
phoneNumber: this.state.contactNumber phoneNumber: this.state.contactNumber
}) })
} }
grabButtonHandler() {
this.setState({ isOpen: true })
}
handleGrabModalClose() {
this.setState({ isOpen: false })
}
handleGrabModalCancel() {
this.setState({ isOpen: false })
}
handleGrabConfirm() {
this.setState({ isOpen: false })
// 确认抢单之后
this.GrabDemand({ demandId: this.state.grabOrderId })
}
componentDidMount() { componentDidMount() {
console.log(this.$router.params.orderId)
this.getGrabOrderInfo() this.getGrabOrderInfo()
} }
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
@ -86,8 +140,18 @@ class GrabOrderPage extends Component {
componentDidHide() { } componentDidHide() { }
render() { render() {
// 提示模态弹窗element
const modalMessageGrabElement = <AtModal isOpened={this.state.isOpen}>
<AtModalHeader>提示</AtModalHeader>
<AtModalContent>
确认抢单
</AtModalContent>
<AtModalAction> <Button onClick={this.handleGrabModalCancel.bind(this)}>取消</Button> <Button className='orange' onClick={this.handleGrabConfirm.bind(this)}></Button> </AtModalAction>
</AtModal>
return ( return (
<View className='grabOrderPage'> <View className='grabOrderPage'>
{modalMessageGrabElement}
<View className='type box'> <View className='type box'>
<Text className='title'>行业分类</Text> <Text className='title'>行业分类</Text>
<Text className='content'>{this.state.type}</Text> <Text className='content'>{this.state.type}</Text>
@ -117,10 +181,10 @@ class GrabOrderPage extends Component {
<Text className='content'>{this.state.content}</Text> <Text className='content'>{this.state.content}</Text>
</View> </View>
<View className='button-box'> <View className='button-box'>
<View className='button' onClick={this.goToSDPublishPage.bind(this)}> <View className='button' onClick={this.grabButtonHandler.bind(this)}>
<AtButton type='primary' size='small'> <Button size='mini' className='button-orange'>
<AtIcon value='close' size='12' color='white'></AtIcon> <AtIcon value='close' size='12' color='white'></AtIcon>
抢单</AtButton> 抢单</Button>
</View> </View>
</View> </View>
<CopyrightComponent></CopyrightComponent> <CopyrightComponent></CopyrightComponent>

View File

@ -1,6 +1,6 @@
import Taro, { Component } from '@tarojs/taro' import Taro, { Component } from '@tarojs/taro'
import { View, Button, Text, Swiper, SwiperItem, Image, } from '@tarojs/components' import { View, Button, Text, Swiper, SwiperItem, Image, } from '@tarojs/components'
import { AtModal, AtButton, AtToast, AtModalHeader, AtModalContent, AtModalAction, AtLoadMore } from 'taro-ui' import { AtModal, AtModalHeader, AtModalContent, AtModalAction, AtLoadMore } from 'taro-ui'
import FilteredShopComponent from '../../component/filteredShopComponent/filteredShopComponent' import FilteredShopComponent from '../../component/filteredShopComponent/filteredShopComponent'
import BottomNav from '../../component/bottomNav/bottomNav' import BottomNav from '../../component/bottomNav/bottomNav'
import URL from '../../serviceAPI.config' import URL from '../../serviceAPI.config'
@ -31,6 +31,16 @@ class Home extends Component {
} }
} }
onPullDownRefresh() {
Taro.showLoading({ title: '加载中' })
this.login().then(() => {
this.getShops({})
this.getHomeCategoriesInfo()
}).catch(err => console.log('微信登入失败:', err))
Taro.stopPullDownRefresh()
}
@ -89,26 +99,67 @@ class Home extends Component {
.then(res => { .then(res => {
console.log('所有店铺的信息', res) console.log('所有店铺的信息', res)
Taro.hideLoading() Taro.hideLoading()
if (res.data.err_msg === 'success'){ if (res.data.err_msg === 'success') {
if (res.data.shops.length) { if (res.data.shops.length) {
this.setState({ shopsDetails: this.state.shopsDetails.concat(res.data.shops), isMore: 'more' }, () => { this.setState({ shopsDetails: this.state.shopsDetails.concat(res.data.shops), isMore: 'more' }, () => {
}) })
} else { } else {
this.setState({ isMore: 'noMore' }, () => { this.setState({ isMore: 'noMore' }, () => {
console.log('ismore?', this.state.isMore) console.log('ismore?', this.state.isMore)
}) })
} }
}else{ } else {
Taro.showToast({ Taro.showToast({
title: res.data.err_msg, title: res.data.err_msg,
icon: 'none', icon: 'none',
duration: 1500 duration: 1500
}) })
} }
}
)
}
getShopsInfo({ parent_supply_class = 0, supply_class = '-1', supply_level = 1, curr_page = 1,
page_count = 20, action = "2" }) {
Taro.request({
url: URL.ShopSupplyShops,
method: 'POST',
dataType: 'json',
data: {
param: JSON.stringify({
curr_page: curr_page,
page_count: page_count,
parent_supply_class: parent_supply_class, //父级class id
supply_class: supply_class,// 子级class id
supply_level: supply_level,// 层级
action: action
})
},
header: {
'content-type': 'application/x-www-form-urlencoded',
'Cookie': 'PFWSSS=' + Taro.getStorageSync('session_id'),
}
})
.then(res => {
console.log('所有店铺的信息', res)
Taro.hideLoading()
if (res.data.err_msg === 'success') {
this.setState({ shopsDetails: res.data.shops })
} else {
Taro.showToast({
title: res.data.err_msg,
icon: 'none',
duration: 1500
})
}
} }
) )
@ -118,7 +169,7 @@ class Home extends Component {
async login() { async login() {
Taro.login({ Taro.login({
success(res) { success(res) {
if (res.code) { if (res.code) {
// 发起网络请求 // 发起网络请求
// console.log('手机端微信code',res.code) // console.log('手机端微信code',res.code)
@ -134,26 +185,26 @@ class Home extends Component {
} }
}) })
.then(response => { .then(response => {
if(response.data.err_msg==='success'){ if (response.data.err_msg === 'success') {
console.log('微信登入成功', response) console.log('微信登入成功', response)
Taro.showToast({ // Taro.showToast({
title:'登入成功', // title:'登入成功',
icon:'success', // icon:'success',
duration:1500 // duration:1500
}) // })
//储存后台返回的session_id 到local Storage //储存后台返回的session_id 到local Storage
Taro.setStorageSync('session_id', response.data.session_id) Taro.setStorageSync('session_id', response.data.session_id)
Taro.setStorageSync('shopInfo', response.data.shop_info) Taro.setStorageSync('shopInfo', response.data.shop_info)
Taro.setStorageSync('userInfo', response.data.user_info) Taro.setStorageSync('userInfo', response.data.user_info)
}else{ } else {
Taro.showToast({ Taro.showToast({
title:'登入失败'+response.data.err_msg, title: '登入失败' + response.data.err_msg,
icon:'none', icon: 'none',
duration:1500 duration: 1500
}) })
} }
} }
).catch(err => { ).catch(err => {
console.log('登入微信失败', err) console.log('登入微信失败', err)
@ -220,15 +271,23 @@ class Home extends Component {
const parentClass = item.parent_class_id const parentClass = item.parent_class_id
const childClass = item.class_id const childClass = item.class_id
this.setState({ subCate: item.children }) this.setState({ subCate: item.children })
this.getShops({ parent_supply_class: parentClass, supply_class: childClass }) this.getShopsInfo({ parent_supply_class: parentClass, supply_class: childClass })
this.getShops({ parent_supply_class: parentClass, supply_class: childClass })
} }
// 点击子类 // 点击子类
onClickChildCate(item) { onClickChildCate(item) {
const parentClass = item.parent_class_id const parentClass = item.parent_class_id
const childClass = item.class_id const childClass = item.class_id
// this.getShops(item.parent_class_id, item.class_id, 2) // this.getShops(item.parent_class_id, item.class_id, 2)
this.getShops({ parent_supply_class: parentClass, supply_class: childClass, supply_level: 2 }) this.getShopsInfo({ parent_supply_class: parentClass, supply_class: childClass, supply_level: 2 })
}
scrollToSubCate(item) {
Taro.pageScrollTo({
scrollTop: 400,
duration: 300
})
this.onClickParentCate(item)
} }
// 转到其他页面 // 转到其他页面
goToAllDemandingPage() { goToAllDemandingPage() {
@ -306,7 +365,7 @@ class Home extends Component {
<AtModalHeader>提示</AtModalHeader> <AtModalHeader>提示</AtModalHeader>
<AtModalContent> <AtModalContent>
确认抢单 确认抢单
</AtModalContent> </AtModalContent>
<AtModalAction> <Button onClick={this.handleGrabModalCancel.bind(this)}>取消</Button> <Button className='orange' onClick={this.handleGrabConfirm.bind(this)}></Button> </AtModalAction> <AtModalAction> <Button onClick={this.handleGrabModalCancel.bind(this)}>取消</Button> <Button className='orange' onClick={this.handleGrabConfirm.bind(this)}></Button> </AtModalAction>
</AtModal> </AtModal>
@ -346,13 +405,14 @@ class Home extends Component {
// 这里应该代码可以优化----- // 这里应该代码可以优化-----
const categoriesElementsArray1 = this.state.categories.length ? this.state.categories[0].map((item, index) => { const categoriesElementsArray1 = this.state.categories.length ? this.state.categories[0].map((item, index) => {
return <View className='category-item' key={index} onClick={this.onClickParentCate.bind(this, item)}> return <View className='category-item' key={index} onClick={this.scrollToSubCate.bind(this, item)}>
{/* onClick={this.onClickParentCate.bind(this, item)}> */}
<Image className='cate-img' src={URL.Base + item.icon} /> <Image className='cate-img' src={URL.Base + item.icon} />
<View>{item.class_name}</View> <View>{item.class_name}</View>
</View> </View>
}) : null }) : null
const categoriesElementsArray2 = this.state.categories.length ? this.state.categories[1].map((item, index) => { const categoriesElementsArray2 = this.state.categories.length ? this.state.categories[1].map((item, index) => {
return <View className='category-item' key={index} onClick={this.onClickParentCate.bind(this, item)}> return <View className='category-item' key={index} onClick={this.scrollToSubCate.bind(this, item)}>
<View> <Image className='cate-img' src={URL.Base + item.icon} /></View> <View> <Image className='cate-img' src={URL.Base + item.icon} /></View>
<View>{item.class_name}</View> <View>{item.class_name}</View>
</View> </View>
@ -394,6 +454,7 @@ class Home extends Component {
{/* 第二行图片滚动条 */} {/* 第二行图片滚动条 */}
<View className='second-banner'> <View className='second-banner'>
<Swiper <Swiper
style='height:180px;'
className='swipper' className='swipper'
indicatorColor='#999' indicatorColor='#999'
indicatorActiveColor='#333' indicatorActiveColor='#333'
@ -449,6 +510,7 @@ class Home extends Component {
</View> </View>
<View className='customer-demanding'> <View className='customer-demanding'>
<Swiper <Swiper
style='height:180px;'
className='swipper swiper-sub' className='swipper swiper-sub'
indicatorColor='#999' indicatorColor='#999'
indicatorActiveColor='#333' indicatorActiveColor='#333'

View File

@ -53,7 +53,7 @@ $themeColor: #FF7142;
.customer-demanding{ .customer-demanding{
padding:0 20px; padding:0 20px;
.demanding-item{ .demanding-item{
border: #eee solid 1px; border: 3rpx solid #ddd;
text-align: center; text-align: center;
.item-tag{ .item-tag{
color:white; color:white;
@ -83,6 +83,9 @@ $themeColor: #FF7142;
padding-top: 5px; padding-top: 5px;
font-size: 35px; font-size: 35px;
// margin-top: 10px; // margin-top: 10px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
.item-button-box{ .item-button-box{

View File

@ -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,Button } from '@tarojs/components'
import { AtInput, AtImagePicker, AtTextarea, AtButton, Picker, AtToast } from 'taro-ui' import { AtInput, AtImagePicker, AtTextarea, 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'
@ -294,7 +294,9 @@ class MyDemandSupplyEdit extends Component {
title='需求标题:' title='需求标题:'
type='text' type='text'
value={this.state.title} value={this.state.title}
border={false}
onChange={this.titleChange.bind(this)} onChange={this.titleChange.bind(this)}
/> />
</View> </View>
<View className='input-box'> <View className='input-box'>
@ -304,6 +306,7 @@ class MyDemandSupplyEdit extends Component {
title='联系人:' title='联系人:'
type='text' type='text'
value={this.state.contactName} value={this.state.contactName}
border={false}
onChange={this.contactNameChange.bind(this)} onChange={this.contactNameChange.bind(this)}
/> />
</View> </View>
@ -314,6 +317,7 @@ class MyDemandSupplyEdit extends Component {
title='联系电话:' title='联系电话:'
type='number' type='number'
value={this.state.contactNumber} value={this.state.contactNumber}
border={false}
onChange={this.contactNumberChange.bind(this)} onChange={this.contactNumberChange.bind(this)}
/> />
</View> </View>
@ -374,14 +378,14 @@ class MyDemandSupplyEdit extends Component {
<View className='button-box'> <View className='button-box'>
<View className='button' onClick={this.uploadSupplyDemand.bind(this)}> <View className='button' onClick={this.uploadSupplyDemand.bind(this)}>
<AtButton type='primary' size='small'>保存</AtButton> <Button size='mini' className='button-orange'>保存</Button>
</View> </View>
{/* <View className='button'> {/* <View className='button'>
<AtButton type='primary' className='button-a' size='small'>保存并新增</AtButton> <Button className='button-a' size='mini' className='button-orange'>保存并新增</Button>
</View> */} </View> */}
<View className='button' onClick={this.goToMyDemSupPage.bind(this)}> <View className='button' onClick={this.goToMyDemSupPage.bind(this)}>
<AtButton type='primary' className='button-a' size='small'>我的供求</AtButton> <Button size='mini' className='button-green'>我的供求</Button>
</View> </View>
</View> </View>
<CopyrightComponent></CopyrightComponent> <CopyrightComponent></CopyrightComponent>

View File

@ -1,6 +1,6 @@
import Taro, { Component } from '@tarojs/taro' import Taro, { Component } from '@tarojs/taro'
import { View, Radio, } from '@tarojs/components' import { View, Radio,Button } from '@tarojs/components'
import { AtInput, Text, AtButton, AtIcon, Picker, Image, AtPagination, AtModal, AtModalHeader, AtModalContent, AtModalAction, Button } from 'taro-ui' import { AtInput, Text, AtIcon, Picker, Image, AtPagination, AtModal, 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'
@ -540,17 +540,20 @@ class MyGoodList extends Component {
//等待接口数据 //等待接口数据
const goodListElementArray = this.state.myGoodList.map((item, index) => { const goodListElementArray = this.state.myGoodList.map((item, index) => {
return <View key={index} className='good-container'> return <View key={index} className='good-container'>
<Radio className='radio' value={item.goods_id} checked={item.checked} onClick={this.handleCheckChange.bind(this, item.goods_id)} ></Radio> <View className='good-container-a'>
{/* onClick={this.handleCheckChange.bind(this,item.goods_id)} */} <Radio className='radio' value={item.goods_id} checked={item.checked} onClick={this.handleCheckChange.bind(this, item.goods_id)} ></Radio>
<View className='img-box' onClick={this.goToGoodspage.bind(this, item.goods_id)}> <View className='img-box' onClick={this.goToGoodspage.bind(this, item.goods_id)}>
<Image mode='aspectFit' className='img' style='height:50px;width:50px' src={URL.Base + item.goods_url} /> <Image mode='aspectFit' className='img' style='height:50px;width:50px' src={URL.Base + item.goods_url} />
</View> </View>
<View className='name-box' onClick={this.goToGoodspage.bind(this, item.goods_id)} >{item.goods_name}</View> <View className='name-box' onClick={this.goToGoodspage.bind(this, item.goods_id)} >{item.goods_name}</View>
<View className='price-box'>{item.goods_price}</View> <View className='price-box'>{item.goods_price}</View>
<View className='quantity-box'>{item.sales_volume}</View> <View className='quantity-box'>{item.sales_volume}</View>
</View>
<View className='button-box1' onClick={this.goToGoodEditPage.bind(this, item.goods_id)}> <View className='button-box1' onClick={this.goToGoodEditPage.bind(this, item.goods_id)}>
<AtButton type='primary' className='button-a' size='small'> <Button className='button-orange' size='mini'>
编辑商品</AtButton> 编辑商品</Button>
</View> </View>
</View> </View>
}) })
@ -593,19 +596,23 @@ class MyGoodList extends Component {
<AtInput <AtInput
name='value' name='value'
title='宝贝名称:' title='宝贝名称:'
placeholder='宝贝名称'
type='text' type='text'
value={this.state.productName} value={this.state.productName}
onChange={this.productNameChange.bind(this)} onChange={this.productNameChange.bind(this)}
border={false}
/> />
</View> </View>
<View className='input-box'> <View className='border-box'>
<AtInput <AtInput
name='value' name='value'
title='最低价:' title='最低价:'
className='input' className='input'
type='number' type='number'
value={this.state.lowestPrice} value={this.state.lowestPrice}
onChange={this.lowestPriceChange.bind(this)} onChange={this.lowestPriceChange.bind(this)}
border={false}
/> />
<AtInput <AtInput
name='value' name='value'
@ -613,6 +620,7 @@ class MyGoodList extends Component {
className='input' className='input'
type='number' type='number'
value={this.state.heightestPrice} value={this.state.heightestPrice}
border={false}
onChange={this.heightestPriceChange.bind(this)} onChange={this.heightestPriceChange.bind(this)}
/> />
</View> </View>
@ -623,6 +631,7 @@ class MyGoodList extends Component {
className='input' className='input'
type='number' type='number'
value={this.state.minimumSold} value={this.state.minimumSold}
border={false}
onChange={this.minimumSoldChange.bind(this)} onChange={this.minimumSoldChange.bind(this)}
/> />
<AtInput <AtInput
@ -631,6 +640,7 @@ class MyGoodList extends Component {
className='input' className='input'
type='number' type='number'
value={this.state.maximumSold} value={this.state.maximumSold}
border={false}
onChange={this.maximumSoldChange.bind(this)} onChange={this.maximumSoldChange.bind(this)}
/> />
</View> </View>
@ -640,9 +650,10 @@ class MyGoodList extends Component {
border={false} border={false}
name='value' name='value'
title='商品编码:' title='商品编码:'
type='text' type='number'
value={this.state.productId} value={this.state.productId}
onChange={this.productIdChange.bind(this)} onChange={this.productIdChange.bind(this)}
border={false}
/> />
</View> </View>
<View className='page-section'> <View className='page-section'>
@ -659,14 +670,14 @@ class MyGoodList extends Component {
</View> </View>
<View className='button-box'> <View className='button-box'>
<View className='button' onClick={this.searchButtonHandler.bind(this)}> <View className='button' onClick={this.searchButtonHandler.bind(this)}>
<AtButton type='primary' size='small'> <Button size='mini' className='button-orange'>
<AtIcon value='search' size='12' color='white'></AtIcon> <AtIcon value='search' size='12' color='white'></AtIcon>
搜索</AtButton> 搜索</Button>
</View> </View>
<View className='button' onClick={this.emptyButtonHanlder.bind(this)}> <View className='button' onClick={this.emptyButtonHanlder.bind(this)}>
<AtButton type='primary' className='button-a' size='small'> <Button className='button-green' size='mini'>
清空条件</AtButton> 清空条件</Button>
</View> </View>
</View> </View>
@ -681,13 +692,12 @@ class MyGoodList extends Component {
<View className='sub-filter'> <View className='sub-filter'>
<Radio className='radio' checked={this.state.isCheckAll} onClick={this.checkAllHandler.bind(this)}>全选</Radio> <Radio className='radio' checked={this.state.isCheckAll} onClick={this.checkAllHandler.bind(this)}>全选</Radio>
<View className='button' onClick={this.deleteGoodsHandler.bind(this)}> <View className='button' onClick={this.deleteGoodsHandler.bind(this)}>
<AtButton type='primary' size='small'> <Button size='mini' className='button-orange'>
删除</AtButton> 删除</Button>
</View> </View>
<View className='button' onClick={this.offStockGoodHandler.bind(this)}> <View className='button' onClick={this.offStockGoodHandler.bind(this)}>
<AtButton type='primary' className='button-a' size='small'> <Button size='mini' className='button-green'>
下架</Button>
下架</AtButton>
</View> </View>
</View> </View>
</View> </View>

View File

@ -46,23 +46,13 @@ $themeColor:#FF7142;
.radio{ .radio{
margin-left: 10px; margin-left: 10px;
margin-top:4%; margin-top:3%;
font-size: 30px; font-size: 30px;
font-weight: bold; font-weight: bold;
} }
.button{ .button{
margin-top:4%; margin-left:2%;
text-align: center; text-align: center;
.at-button--primary{
margin-left: 20px;
background-color:#ac2925;
border:1PX solid #ac2925;
}
.button-a{
margin-left: 10px;
background-color:#5bc0de;
border:1PX solid #5bc0de;
}
} }
} }
@ -139,6 +129,14 @@ $themeColor:#FF7142;
border-top: 0px; border-top: 0px;
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
.button-box1{
flex:1;
margin-top: 7%;
}
.good-container-a{
flex:3;
display: flex;
flex-wrap: nowrap;
flex-direction: row; flex-direction: row;
font-size: 30px; font-size: 30px;
height: 200px; height: 200px;
@ -168,17 +166,10 @@ $themeColor:#FF7142;
flex:1; flex:1;
} }
.button-box1{
flex:1;
padding-top: 3%;
padding-right: 2%;
.button-a{
background-color:$themeColor;
border:1PX solid $themeColor;
}
} }
} }
} }
@ -189,7 +180,7 @@ $themeColor:#FF7142;
} }
.nomore{ .nomore{
font-size: 32rpx; font-size: 25rpx;
margin-top: 40px; margin-top: 40px;
text-align: center text-align: center
} }

View File

@ -1,6 +1,6 @@
import Taro, { Component, UpdateManager } from '@tarojs/taro' import Taro, { Component } from '@tarojs/taro'
import { View, Text, Radio, RadioGroup, Label } from '@tarojs/components' import { View, Text } from '@tarojs/components'
import { AtInput, AtImagePicker, AtTextarea, AtButton, Picker, AtToast } from 'taro-ui' import { AtInput, AtImagePicker, AtTextarea, Button, } from 'taro-ui'
import ShopTypeInteractionComp from '../../component/shopTypeInteractionComp/shopTypeInteractionComp' import ShopTypeInteractionComp from '../../component/shopTypeInteractionComp/shopTypeInteractionComp'
@ -339,7 +339,10 @@ class MyGoodsEdit extends Component {
title='商品名称:' title='商品名称:'
type='text' type='text'
value={this.state.productName} value={this.state.productName}
border={false}
onChange={this.productNameChange.bind(this)} onChange={this.productNameChange.bind(this)}
/> />
</View> </View>
<View className='input-box'> <View className='input-box'>
@ -350,6 +353,7 @@ class MyGoodsEdit extends Component {
type='number' type='number'
placeholder='¥' placeholder='¥'
value={this.state.productPrice} value={this.state.productPrice}
border={false}
onChange={this.productPriceChange.bind(this)} onChange={this.productPriceChange.bind(this)}
/> />
</View> </View>
@ -358,8 +362,9 @@ class MyGoodsEdit extends Component {
<AtInput <AtInput
name='productUnit' name='productUnit'
title='商品单位:' title='商品单位:'
type='text' type='number'
value={this.state.productUnit} value={this.state.productUnit}
border={false}
onChange={this.productUnitChange.bind(this)} onChange={this.productUnitChange.bind(this)}
/> />
</View> </View>
@ -402,13 +407,13 @@ class MyGoodsEdit extends Component {
</View> </View>
<View className='button-box' > <View className='button-box' >
<View className='button' > <View className='button' >
<AtButton type='primary' size='small' onClick={this.onClickUploadGoods.bind(this)}>保存</AtButton> <Button size='mini' className='button-orange' onClick={this.onClickUploadGoods.bind(this)}>保存</Button>
</View> </View>
{/* <View className='button'> {/* <View className='button'>
<AtButton type='primary' className='button-a' size='small' >发布并新增</AtButton> <Button className='button-a' size='mini' >发布并新增</Button>
</View> */} </View> */}
<View className='button' onClick={this.goToMyGoodListPage.bind(this)}> <View className='button' onClick={this.goToMyGoodListPage.bind(this)}>
<AtButton type='primary' className='button-a' size='small'>商品列表</AtButton> <Button className='button-green' size='mini'>商品列表</Button>
</View> </View>
</View> </View>

View File

@ -1,7 +1,7 @@
//myNeeds //myNeeds
import Taro, { Component } from '@tarojs/taro' import Taro, { Component } from '@tarojs/taro'
import { View, Text, Button } from '@tarojs/components' import { View, Text, Button } from '@tarojs/components'
import { AtInput, AtButton, Picker, AtIcon, AtModal, AtModalHeader, AtModalContent, AtModalAction, AtPagination } from 'taro-ui' import { AtInput, Picker, AtIcon, AtModal, AtModalHeader, AtModalContent, AtModalAction, AtPagination } from 'taro-ui'
import URL from '../../serviceAPI.config' import URL from '../../serviceAPI.config'
import InteractionComponent from '../../component/interactionComponent/interactionComponent' import InteractionComponent from '../../component/interactionComponent/interactionComponent'
@ -289,17 +289,17 @@ class MyNeeds extends Component {
</View> </View>
{item.state === '0'||item.state === '1' ? <View className='info-button-box'> {item.state === '0'||item.state === '1' ? <View className='info-button-box'>
<View className='button' onClick={this.goToMyNeedsViewPage.bind(this, item.sd_id)}> <View className='button' onClick={this.goToMyNeedsViewPage.bind(this, item.sd_id)}>
<AtButton type='primary' size='small'>查看</AtButton> <Button size='mini' className='button-orange button-no-margin'>查看</Button>
</View> </View>
<View className='button' onClick={this.goToMyNeedsEditPage.bind(this, item.sd_id)}> <View className='button' onClick={this.goToMyNeedsEditPage.bind(this, item.sd_id)}>
<AtButton type='primary' size='small'>编辑</AtButton> <Button size='mini' className='button-orange button-no-margin'>编辑</Button>
</View> </View>
<View className='button-a' onClick={this.deleteButton.bind(this, item)}> <View className='button-a' onClick={this.deleteButton.bind(this, item)}>
<AtButton type='primary' size='small'>删除</AtButton> <Button size='mini' className='button-dark-red button-no-margin' >删除</Button>
</View> </View>
</View > : <View className='info-button-box'> </View > : <View className='info-button-box'>
<View className='button' onClick={this.goToMyNeedsViewPage.bind(this, item.sd_id)}> <View className='button' onClick={this.goToMyNeedsViewPage.bind(this, item.sd_id)}>
<AtButton type='primary' size='small'>查看</AtButton> <Button size='mini' className='button-orange button-no-margin'>查看</Button>
</View> </View>
</View> </View>
} }
@ -383,19 +383,19 @@ class MyNeeds extends Component {
<View className='button-box'> <View className='button-box'>
<View className='button' onClick={this.onSearchButtonHandler.bind(this)}> <View className='button' onClick={this.onSearchButtonHandler.bind(this)}>
<AtButton type='primary' size='small'> <Button size='mini' className='button-orange'>
<AtIcon value='search' size='12' color='white'></AtIcon> <AtIcon value='search' size='12' color='white'></AtIcon>
搜索</AtButton> 搜索</Button>
</View> </View>
<View className='button' onClick={this.addNeeds.bind(this)}> <View className='button' onClick={this.addNeeds.bind(this)}>
<AtButton type='primary' className='button-a' size='small'> <Button size='mini' className='button-green'>
<AtIcon value='add' size='12' color='white'></AtIcon> <AtIcon value='add' size='12' color='white'></AtIcon>
新增</AtButton> 新增</Button>
</View> </View>
<View className='button' onClick={this.emptyFilter.bind(this)}> <View className='button' onClick={this.emptyFilter.bind(this)}>
<AtButton type='primary' className='button-b' size='small'> <Button size='mini' className='button-dark-red'>
<AtIcon value='trash' size='12' color='white'></AtIcon> <AtIcon value='trash' size='12' color='white'></AtIcon>
清空</AtButton> 清空</Button>
</View> </View>
</View> </View>
<View className='total'> <View className='total'>

View File

@ -90,20 +90,7 @@ $themeColor:#FF7142;
text-align: center; text-align: center;
.at-button--primary{
background-color:$themeColor;
border:1PX solid $themeColor;
}
.button-a{
background-color:#5cb85c;
border:1PX solid #5cb85c;
}
.button-b{
background-color:#d9534f;
border:1PX solid #d9534f;
}
} }
} }
@ -115,14 +102,15 @@ $themeColor:#FF7142;
.needs-box{ .needs-box{
margin-top: 10px; margin-top: 10px;
border: 1px solid #ddd; border: 3rpx solid #ddd;
margin-bottom: 8px; margin-bottom: 8px;
box-shadow: 0 8px 8px #ddd; box-shadow: 0 8px 8px #ddd;
padding: 10px; padding: 10px;
font-size: 25rpx;
.box{ .box{
margin-top: 10px; margin-top: 10px;
font-size: 28px;
} }
.needs-title{ .needs-title{
.content{ .content{
@ -140,29 +128,13 @@ $themeColor:#FF7142;
.button{ .button{
// flex:1; // flex:1;
text-align: right; text-align: right;
margin:2% 1% 0; margin:0 1% 0;
.at-button--primary{
background-color:#FF9500;
border:1PX solid #FF9500;
}
}
.button-a{
// flex:1;
text-align: right;
margin:2% 1% 0;
.at-button--primary{
background-color:#d9534f;
border:1PX solid #d9534f;
}
}
} }
}
}} }}
.nomore{ .nomore{
text-align: center; text-align: center;
font-size: 35px; font-size: 25rpx;
} }

View File

@ -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,Button } from '@tarojs/components'
import { AtInput, AtImagePicker, AtTextarea, AtButton, Picker, AtToast } from 'taro-ui' import { AtInput, AtImagePicker, AtTextarea, Picker } from 'taro-ui'
import InteractionComponent from '../../component/interactionComponent/interactionComponent' import InteractionComponent from '../../component/interactionComponent/interactionComponent'
import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent' import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
@ -321,8 +321,11 @@ class MyNeedsEdit extends Component {
title='需求标题:' title='需求标题:'
type='text' type='text'
value={this.state.title} value={this.state.title}
border={false}
onChange={this.titleChange.bind(this)} onChange={this.titleChange.bind(this)}
/> />
</View> </View>
<View className='input-box'> <View className='input-box'>
<Text className='require'>*</Text> <Text className='require'>*</Text>
@ -331,6 +334,7 @@ class MyNeedsEdit extends Component {
title='联系人:' title='联系人:'
type='text' type='text'
value={this.state.contactName} value={this.state.contactName}
border={false}
onChange={this.contactNameChange.bind(this)} onChange={this.contactNameChange.bind(this)}
/> />
</View> </View>
@ -341,6 +345,7 @@ class MyNeedsEdit extends Component {
title='联系电话:' title='联系电话:'
type='number' type='number'
value={this.state.contactNumber} value={this.state.contactNumber}
border={false}
onChange={this.contactNumberChange.bind(this)} onChange={this.contactNumberChange.bind(this)}
/> />
</View> </View>
@ -401,14 +406,14 @@ class MyNeedsEdit extends Component {
<View className='button-box'> <View className='button-box'>
<View className='button' onClick={this.uploadMyNeedsButton.bind(this)}> <View className='button' onClick={this.uploadMyNeedsButton.bind(this)}>
<AtButton type='primary' size='small'>保存</AtButton> <Button size='mini' className='button-orange'>保存</Button>
</View> </View>
{/* <View className='button'> {/* <View className='button'>
<AtButton type='primary' className='button-a' size='small'>保存并新增</AtButton> <Button className='button-a' size='mini'>保存并新增</Button>
</View> */} </View> */}
<View className='button' onClick={this.goToMyNeedsPage.bind(this)}> <View className='button' onClick={this.goToMyNeedsPage.bind(this)}>
<AtButton type='primary' className='button-a' size='small'>我的需求</AtButton> <Button className='button-green' size='mini'>我的需求</Button>
</View> </View>
</View> </View>
<CopyrightComponent></CopyrightComponent> <CopyrightComponent></CopyrightComponent>

View File

@ -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 ,Button} from '@tarojs/components'
import { AtInput, AtImagePicker, AtTextarea, AtButton, Picker, AtToast } from 'taro-ui' import { AtInput, AtImagePicker, AtTextarea, 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'
@ -256,7 +256,9 @@ class MyNeedsPublish extends Component {
title='需求标题:' title='需求标题:'
type='text' type='text'
value={this.state.title} value={this.state.title}
border={false}
onChange={this.titleChange.bind(this)} onChange={this.titleChange.bind(this)}
/> />
</View> </View>
<View className='input-box'> <View className='input-box'>
@ -266,6 +268,7 @@ class MyNeedsPublish extends Component {
title='联系人:' title='联系人:'
type='text' type='text'
value={this.state.contactName} value={this.state.contactName}
border={false}
onChange={this.contactNameChange.bind(this)} onChange={this.contactNameChange.bind(this)}
/> />
</View> </View>
@ -276,6 +279,7 @@ class MyNeedsPublish extends Component {
title='联系电话:' title='联系电话:'
type='number' type='number'
value={this.state.contactNumber} value={this.state.contactNumber}
border={false}
onChange={this.contactNumberChange.bind(this)} onChange={this.contactNumberChange.bind(this)}
/> />
</View> </View>
@ -336,14 +340,14 @@ class MyNeedsPublish extends Component {
<View className='button-box'> <View className='button-box'>
<View className='button' onClick={this.uploadMyNeedsButton.bind(this)}> <View className='button' onClick={this.uploadMyNeedsButton.bind(this)}>
<AtButton type='primary' size='small'>发布</AtButton> <Button size='mini'className='button-orange' >发布</Button>
</View> </View>
{/* <View className='button'> {/* <View className='button'>
<AtButton type='primary' className='button-a' size='small'>保存并新增</AtButton> <Button className='button-a' size='mini' >保存并新增</Button>
</View> */} </View> */}
<View className='button' onClick={this.goToMyNeedsPage.bind(this)}> <View className='button' onClick={this.goToMyNeedsPage.bind(this)}>
<AtButton type='primary' className='button-a' size='small'>我的需求</AtButton> <Button className='button-green' size='mini' >我的需求</Button>
</View> </View>
</View> </View>
<CopyrightComponent></CopyrightComponent> <CopyrightComponent></CopyrightComponent>

View File

@ -1,7 +1,7 @@
import Taro, { Component } from '@tarojs/taro' import Taro, { Component } from '@tarojs/taro'
import { View, Text, Image, Button } from '@tarojs/components' import { View, Text, Image, Button } from '@tarojs/components'
import { AtButton, AtIcon, AtModal, AtModalHeader, AtModalContent, AtModalAction } from 'taro-ui' import { AtIcon, AtModal, AtModalHeader, AtModalContent, AtModalAction } 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'
@ -245,25 +245,25 @@ class SupplyDemandView extends Component {
<View className='button-box'> <View className='button-box'>
<View className='button' onClick={this.goMyNeedsPublishPage.bind(this)}> <View className='button' onClick={this.goMyNeedsPublishPage.bind(this)}>
<AtButton type='primary' size='small'> <Button size='mini' className='button-green'>
<AtIcon value='add' size='12' color='white'></AtIcon> <AtIcon value='add' size='12' color='white'></AtIcon>
新增</AtButton> 新增</Button>
</View> </View>
<View className='button' onClick={this.goToMyNeedsPage.bind(this)}> <View className='button' onClick={this.goToMyNeedsPage.bind(this)}>
<AtButton type='primary' className='button' size='small'> <Button className='button' size='mini' className='button-green'>
<AtIcon value='' size='12' color='white'></AtIcon> <AtIcon value='' size='12' color='white'></AtIcon>
我的需求</AtButton> 我的需求</Button>
</View> </View>
<View className='button' onClick={this.goMyNeedEditPage.bind(this)}> <View className='button' onClick={this.goMyNeedEditPage.bind(this)}>
<AtButton type='primary' className='button' size='small'> <Button className='button' size='mini' className='button-orange'>
<AtIcon value='settings' size='12' color='white'></AtIcon> <AtIcon value='settings' size='12' color='white'></AtIcon>
修改</AtButton> 修改</Button>
</View> </View>
<View className='button' onClick={this.deleteButton.bind(this)}> <View className='button' onClick={this.deleteButton.bind(this)}>
<AtButton type='primary' className='button-a' size='small'> <Button className='button-a' size='mini' className='button-dark-red'>
<AtIcon value='close' size='12' color='white'></AtIcon> <AtIcon value='close' size='12' color='white'></AtIcon>
删除</AtButton> 删除</Button>
</View> </View>
</View> </View>
<CopyrightComponent></CopyrightComponent> <CopyrightComponent></CopyrightComponent>

View File

@ -1,6 +1,6 @@
import Taro, { Component } from '@tarojs/taro' import Taro, { Component } from '@tarojs/taro'
import { View, Text, Button } from '@tarojs/components' import { View, Text, Button } from '@tarojs/components'
import { AtInput, AtButton, Picker, AtIcon, AtModal, AtModalHeader, AtModalContent, AtModalAction, AtPagination } from 'taro-ui' import { AtInput, Picker, AtIcon, AtModal, AtModalHeader, AtModalContent, AtModalAction, AtPagination } 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'
@ -243,6 +243,7 @@ class MySupplyDemand extends Component {
Taro.showLoading({ title: '加载中' }) Taro.showLoading({ title: '加载中' })
this.setState({ currentPage: type.current, }, () => { this.setState({ currentPage: type.current, }, () => {
this.getMySupplyDemand({ curr_page: this.state.currentPage }) this.getMySupplyDemand({ curr_page: this.state.currentPage })
}) })
} }
@ -308,13 +309,13 @@ class MySupplyDemand extends Component {
</View> </View>
<View className='info-button-box'> <View className='info-button-box'>
<View className='button' onClick={this.goSupplyDemandView.bind(this, item.sd_id)}> <View className='button' onClick={this.goSupplyDemandView.bind(this, item.sd_id)}>
<AtButton type='primary' size='small'>查看</AtButton> <Button size='mini' className='button-orange button-no-margin'>查看</Button>
</View> </View>
<View className='button' onClick={this.goToMyDSEditPage.bind(this, item.sd_id)} > <View className='button' onClick={this.goToMyDSEditPage.bind(this, item.sd_id)} >
<AtButton type='primary' size='small'>编辑</AtButton> <Button size='mini' className='button-orange button-no-margin'>编辑</Button>
</View> </View>
<View className='button' onClick={this.handleOnDelete.bind(this, item.sd_id, item.sd_title)}> <View className='button' onClick={this.handleOnDelete.bind(this, item.sd_id, item.sd_title)}>
<AtButton type='primary' className='button-a' size='small'>删除</AtButton> <Button size='mini' className='button-dark-red button-no-margin'>删除</Button>
</View> </View>
</View> </View>
@ -365,6 +366,7 @@ class MySupplyDemand extends Component {
type='text' type='text'
value={this.state.title} value={this.state.title}
onChange={this.titleChange.bind(this)} onChange={this.titleChange.bind(this)}
border={false}
/> />
</View> </View>
{/* 开始和结束日期 */} {/* 开始和结束日期 */}
@ -391,19 +393,19 @@ class MySupplyDemand extends Component {
<View className='button-box'> <View className='button-box'>
<View className='button' onClick={this.onSearchButtonHandler.bind(this)}> <View className='button' onClick={this.onSearchButtonHandler.bind(this)}>
<AtButton type='primary' size='small'> <Button size='mini' className='button-orange' >
<AtIcon value='search' size='12' color='white'></AtIcon> <AtIcon value='search' size='12' color='white'></AtIcon>
搜索</AtButton> 搜索</Button>
</View> </View>
<View className='button' onClick={this.addDemandSupply.bind(this)}> <View className='button' onClick={this.addDemandSupply.bind(this)}>
<AtButton type='primary' className='button-a' size='small'> <Button className='button-a' size='mini' className='button-green'>
<AtIcon value='add' size='12' color='white'></AtIcon> <AtIcon value='add' size='12' color='white'></AtIcon>
新增</AtButton> 新增</Button>
</View> </View>
<View className='button' onClick={this.emptyFilter.bind(this)}> <View className='button' onClick={this.emptyFilter.bind(this)}>
<AtButton type='primary' className='button-b' size='small'> <Button className='button-b' size='mini' className='button-dark-red'>
<AtIcon value='trash' size='12' color='white'></AtIcon> <AtIcon value='trash' size='12' color='white'></AtIcon>
清空</AtButton> 清空</Button>
</View> </View>
</View> </View>
<View className='total-count'>一共<Text className='number'>{this.state.totalDemandSupply}</Text> </View> <View className='total-count'>一共<Text className='number'>{this.state.totalDemandSupply}</Text> </View>

View File

@ -99,10 +99,10 @@ $themeColor:#FF7142;
} }
.info-box{ .info-box{
font-size: 30px; font-size: 25rpx;
.info-container{ .info-container{
border: 1px solid #ddd; border: 3rpx solid #ddd;
margin-bottom: 8px; margin-bottom: 8px;
box-shadow: 0 8px 8px #ddd; box-shadow: 0 8px 8px #ddd;
padding: 10px; padding: 10px;
@ -124,16 +124,8 @@ $themeColor:#FF7142;
// flex:1; // flex:1;
text-align: center; text-align: center;
margin:1% 1% 0; margin:1% 1% 0;
.at-button--primary{
background-color:#FF9500;
border:1PX solid #FF9500;
}
.button-a{
background-color:#d9534f;
border:1PX solid #d9534f;
}
} }
} }
@ -142,7 +134,7 @@ $themeColor:#FF7142;
.title{ .title{
text-align: center; text-align: center;
font-size: 30px; font-size: 25rpx;
} }
.pagination-box{ .pagination-box{

View File

@ -6,8 +6,8 @@ import URL from '../../serviceAPI.config'
import './shop.scss' import './shop.scss'
import ShopItem from '../../component/shopItemComponent/shopItemComponent' import ShopItem from '../../component/shopItemComponent/shopItemComponent'
import bottomNav from '../../component/bottomNav/bottomNav' import BottomNav from '../../component/bottomNav/bottomNav'
import copyrightComponent from '../../component/copyrightComponent/copyrightComponent' import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
import ShopDescription from '../shopDescription/shopDescription'; import ShopDescription from '../shopDescription/shopDescription';
class Shop extends Component { class Shop extends Component {
@ -59,7 +59,7 @@ class Shop extends Component {
curr_page: 1, curr_page: 1,
page_count: 10, page_count: 10,
shop_name: false, shop_name: false,
shop_id: Taro.getStorageSync('shopInfo').shop_id, shop_id: this.$router.params.id,
config_id: 4, config_id: 4,
shop_class_id: '', shop_class_id: '',
order: '', order: '',
@ -192,7 +192,6 @@ class Shop extends Component {
config_id = this.state.config_id, config_id = this.state.config_id,
shop_class_id = this.state.shop_class_id, shop_class_id = this.state.shop_class_id,
order = this.state.order, order = this.state.order,
currPage = this.state.currPage,
goods_class_id = this.state.goods_class_id, goods_class_id = this.state.goods_class_id,
goodsSpec = this.state.goodsSpec, goodsSpec = this.state.goodsSpec,
goodsParam = this.state.goodsParam, goodsParam = this.state.goodsParam,
@ -210,7 +209,6 @@ class Shop extends Component {
config_id: config_id, config_id: config_id,
shop_class_id: shop_class_id, shop_class_id: shop_class_id,
order: order, order: order,
currPage: currPage,
goods_class_id: goods_class_id, goods_class_id: goods_class_id,
}), }),
goodsRegion: JSON.stringify({}), goodsRegion: JSON.stringify({}),
@ -224,6 +222,7 @@ class Shop extends Component {
} }
}) })
.then(res => { .then(res => {
console.log('searchGood',res)
Taro.hideLoading() Taro.hideLoading()
this.setState({ shopItem: res.data.goods, total: res.data.goodsCount, filterCondition: order }, () => { this.setState({ shopItem: res.data.goods, total: res.data.goodsCount, filterCondition: order }, () => {
@ -461,7 +460,6 @@ class Shop extends Component {
handleOnPageChange(value) { handleOnPageChange(value) {
Taro.showLoading({ title: '加载中' }) Taro.showLoading({ title: '加载中' })
this.setState({ currentPage: value.current })
this.goodsSearch({ curr_page: value.current, order: this.state.filterCondition }) this.goodsSearch({ curr_page: value.current, order: this.state.filterCondition })
} }
showHomePage() { showHomePage() {
@ -736,10 +734,10 @@ class Shop extends Component {
</View> </View>
{/* 显示店铺首页或者店铺详情 */} {/* 显示店铺首页或者店铺详情 */}
{this.state.showShopHomePage ? shopHomepageElement : shopDescriptionElement} {this.state.showShopHomePage ? shopHomepageElement : shopDescriptionElement}
<copyrightComponent></copyrightComponent> <CopyrightComponent></CopyrightComponent>
<View className='bottom-nav-box'> <View className='bottom-nav-box'>
<bottomNav otherData={{ menu: [{ name: '首页' }, { name: '分类' }, { name: '购物车' }, { name: '教程软件' }, { name: '更多' }] }} /> <BottomNav otherData={{ menu: [{ name: '首页' }, { name: '分类' }, { name: '购物车' }, { name: '教程软件' }, { name: '更多' }] }} />
</View> </View>
</View> </View>
) )

View File

@ -1,9 +1,9 @@
import Taro, { Component } from '@tarojs/taro' import Taro, { Component } from '@tarojs/taro'
import { View, Text } from '@tarojs/components' import { View, Text,Button } from '@tarojs/components'
import { AtInput, AtImagePicker, AtTextarea, AtButton, Picker, AtToast } from 'taro-ui' import { AtInput, AtImagePicker, AtTextarea, 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'
@ -237,6 +237,7 @@ class SupplyDemand extends Component {
type='text' type='text'
value={this.state.title} value={this.state.title}
onChange={this.titleChange.bind(this)} onChange={this.titleChange.bind(this)}
border={false}
/> />
</View> </View>
<View className='input-box'> <View className='input-box'>
@ -247,6 +248,7 @@ class SupplyDemand extends Component {
type='text' type='text'
value={this.state.contactName} value={this.state.contactName}
onChange={this.contactNameChange.bind(this)} onChange={this.contactNameChange.bind(this)}
border={false}
/> />
</View> </View>
<View className='input-box'> <View className='input-box'>
@ -257,6 +259,7 @@ class SupplyDemand extends Component {
type='number' type='number'
value={this.state.contactNumber} value={this.state.contactNumber}
onChange={this.contactNumberChange.bind(this)} onChange={this.contactNumberChange.bind(this)}
border={false}
/> />
</View> </View>
<View className='demanding-box'> <View className='demanding-box'>
@ -316,17 +319,17 @@ class SupplyDemand extends Component {
<View className='button-box'> <View className='button-box'>
<View className='button' onClick={this.uploadSupplyDemand.bind(this)}> <View className='button' onClick={this.uploadSupplyDemand.bind(this)}>
<AtButton type='primary' size='small'>发布</AtButton> <Button size='mini' className='button-orange' >发布</Button>
</View> </View>
{/* <View className='button'> {/* <View className='button'>
<AtButton type='primary' className='button-a' size='small'>发布并新增</AtButton> <Button size='mini' className='button-a' >发布并新增</Button>
</View> */} </View> */}
<View className='button' onClick={this.goToMyDemSupPage.bind(this)}> <View className='button' onClick={this.goToMyDemSupPage.bind(this)}>
<AtButton type='primary' className='button-a' size='small'>我的供求</AtButton> <Button size='mini' className='button-green' >我的供求</Button>
</View> </View>
</View> </View>
<copyrightComponent></copyrightComponent> <CopyrightComponent></CopyrightComponent>
</View> </View>

View File

@ -1,7 +1,7 @@
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 { AtButton, AtIcon,AtModal, AtModalHeader, AtModalContent, AtModalAction } from 'taro-ui' import { AtIcon,AtModal, AtModalHeader, AtModalContent, AtModalAction } 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'
@ -221,24 +221,24 @@ class SupplyDemandView extends Component {
<View className='button-box'> <View className='button-box'>
<View className='button' onClick={this.goToSDPublishPage.bind(this)}> <View className='button' onClick={this.goToSDPublishPage.bind(this)}>
<AtButton type='primary' className='button-g' size='small'> <Button className='button-green' size='mini'>
<AtIcon value='add' size='12' color='white'></AtIcon> <AtIcon value='add' size='12' color='white'></AtIcon>
新增</AtButton> 新增</Button>
</View> </View>
<View className='button' onClick={this.goToMyDSEditPage.bind(this)}> <View className='button' onClick={this.goToMyDSEditPage.bind(this)}>
<AtButton type='primary' className='button' size='small'> <Button className='button-orange' size='mini'>
<AtIcon value='settings' size='12' color='white'></AtIcon> <AtIcon value='settings' size='12' color='white'></AtIcon>
修改</AtButton> 修改</Button>
</View> </View>
<View className='button' onClick={this.goToMySDPage.bind(this)}> <View className='button' onClick={this.goToMySDPage.bind(this)}>
<AtButton type='primary' className='button' size='small'> <Button className='button-green' size='mini'>
<AtIcon value='' size='12' color='white'></AtIcon> <AtIcon value='' size='12' color='white'></AtIcon>
我的供求</AtButton> 我的供求</Button>
</View> </View>
<View className='button' onClick={this.deleteButton.bind(this)}> <View className='button' onClick={this.deleteButton.bind(this)}>
<AtButton type='primary' className='button-a' size='small'> <Button className='button-dark-red' size='mini'>
<AtIcon value='close' size='12' color='white'></AtIcon> <AtIcon value='close' size='12' color='white'></AtIcon>
删除</AtButton> 删除</Button>
</View> </View>
</View> </View>
<CopyrightComponent></CopyrightComponent> <CopyrightComponent></CopyrightComponent>