页面调试
This commit is contained in:
parent
9e1f708f73
commit
e449c07ffc
26
src/app.js
26
src/app.js
@ -18,17 +18,17 @@ class App extends Component {
|
||||
|
||||
config = {
|
||||
pages: [
|
||||
'pages/index/index', // index页面
|
||||
'pages/home/home',//首页
|
||||
'pages/shop/shop',//店铺页面
|
||||
'pages/goods/goods',// 商品页面
|
||||
'pages/goodsPublish/goodsPublish',// 商品发布页面
|
||||
'pages/supplyDemandPublish/supplyDemandPublish',// 供求发布页面
|
||||
'pages/mySupplyDemand/mySupplyDemand',// 我的供求列表页面
|
||||
'pages/myGoodsEdit/myGoodsEdit',// 我的商品编辑页面
|
||||
'pages/allDemanding/allDemanding',// 所有供求页面
|
||||
'pages/myGoodList/myGoodList',// 我的商品列表页面
|
||||
'pages/myDemandSupplyEdit/myDemandSupplyEdit',// 我的供求编辑页面
|
||||
'pages/index/index', // index页面
|
||||
'pages/home/home',//首页 ---------------------
|
||||
'pages/shop/shop',//店铺页面 ---------------------
|
||||
'pages/goods/goods',// 商品页面 ---------------------
|
||||
'pages/goodsPublish/goodsPublish',// 商品发布页面 ---------------------
|
||||
'pages/supplyDemandPublish/supplyDemandPublish',// 供求发布页面 ---------------------
|
||||
'pages/mySupplyDemand/mySupplyDemand',// 我的供求列表页面 ---------------------
|
||||
'pages/myGoodsEdit/myGoodsEdit',// 我的商品编辑页面 ---------------------
|
||||
'pages/allDemanding/allDemanding',// 所有供求页面 ---------------------
|
||||
'pages/myGoodList/myGoodList',// 我的商品列表页面 --------------------- 编辑商品按键
|
||||
'pages/myDemandSupplyEdit/myDemandSupplyEdit',// 我的供求编辑页面 ---------------------
|
||||
'pages/supplyDemandView/supplyDemandView',// 查看单个供求页面
|
||||
'pages/grabOrderPage/grabOrderPage',// 抢单页面
|
||||
'pages/myNeeds/myNeeds',// 我的需求页面
|
||||
@ -41,8 +41,8 @@ class App extends Component {
|
||||
backgroundTextStyle: 'light',
|
||||
navigationBarBackgroundColor: '#fff',
|
||||
navigationBarTitleText: 'WeChat',
|
||||
navigationBarTextStyle: 'black'
|
||||
|
||||
navigationBarTextStyle: 'black',
|
||||
enablePullDownRefresh:true
|
||||
}
|
||||
,
|
||||
|
||||
|
38
src/app.scss
38
src/app.scss
@ -1,16 +1,44 @@
|
||||
|
||||
$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{
|
||||
color:#FF7142,
|
||||
}
|
||||
.blur{
|
||||
color:#FF7142;
|
||||
opacity: .65;
|
||||
|
||||
}
|
||||
|
||||
.orange-bg{
|
||||
background-color:#FF7142,
|
||||
}
|
||||
.green-bg{
|
||||
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
|
||||
}
|
@ -114,7 +114,7 @@ class recommondShop extends Component {
|
||||
.then(res => {
|
||||
console.log('购买咨询请求成功', res)
|
||||
if (res.statusCode === 200) {
|
||||
Taro.showToast({ title: res.data.err_msg,icon:'success' })
|
||||
Taro.showToast({ title: '咨询成功',icon:'success' })
|
||||
} else {
|
||||
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>
|
||||
</View>
|
||||
<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>
|
||||
|
@ -1,5 +1,5 @@
|
||||
.shop-list-box{
|
||||
border: 1px solid #ddd;
|
||||
border: 4rpx solid #ddd;
|
||||
border-radius: 3px;
|
||||
box-shadow: 0 5px 5px #ddd;
|
||||
margin-bottom: 10px;
|
||||
@ -24,7 +24,7 @@
|
||||
}
|
||||
|
||||
.header{
|
||||
border-bottom:1px solid #F2F2F2;
|
||||
border-bottom:4rpx solid #F2F2F2;
|
||||
display: flex;
|
||||
.title{
|
||||
|
||||
@ -33,10 +33,10 @@
|
||||
font-weight: bold;
|
||||
font-size: 30px;
|
||||
text-align: left;
|
||||
overflow:hidden;
|
||||
white-space:nowrap;
|
||||
|
||||
|
||||
overflow:hidden;
|
||||
white-space:nowrap;
|
||||
line-height:90rpx;
|
||||
margin-left:3%;
|
||||
}
|
||||
.consult-voucher-button{
|
||||
|
||||
@ -53,7 +53,7 @@ white-space:nowrap;
|
||||
width: 100px;
|
||||
line-height:50px;
|
||||
height:50px;
|
||||
margin-top:20px;
|
||||
margin-top:7%;
|
||||
}
|
||||
.voucher-button-text{
|
||||
color:white;
|
||||
@ -62,7 +62,7 @@ white-space:nowrap;
|
||||
width: 100px;
|
||||
line-height:50px;
|
||||
height:50px;
|
||||
margin-top:20px;
|
||||
margin-top:7%;
|
||||
|
||||
}
|
||||
.voucher{
|
||||
@ -71,7 +71,7 @@ white-space:nowrap;
|
||||
}
|
||||
}
|
||||
.body{
|
||||
border-bottom:1px solid #F2F2F2;
|
||||
border-bottom:4rpx solid #F2F2F2;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
font-size: 35px;
|
||||
|
@ -247,9 +247,9 @@ class AllDemanding extends Component {
|
||||
<View className='title'>{item.sd_title}</View>
|
||||
<View className='para'>{item.sd_desc}</View>
|
||||
{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' >
|
||||
<AtButton type='primary' size='small' className='blur'> 已抢单</AtButton>
|
||||
<Button size='mini' disabled={true} className='button-orange'> 已抢单</Button>
|
||||
</View>
|
||||
}
|
||||
</View>
|
||||
@ -317,15 +317,15 @@ class AllDemanding extends Component {
|
||||
|
||||
<View className='button-box'>
|
||||
<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>
|
||||
搜索</AtButton>
|
||||
搜索</Button>
|
||||
</View>
|
||||
|
||||
<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>
|
||||
清空</AtButton>
|
||||
清空</Button>
|
||||
</View>
|
||||
</View>
|
||||
{/* 供求页面的数据加载 */}
|
||||
|
@ -69,16 +69,21 @@ $themeColor: #FF7142;
|
||||
text-align: center;
|
||||
|
||||
|
||||
.at-button--primary{
|
||||
background-color:$themeColor;
|
||||
border:1PX solid $themeColor;
|
||||
}
|
||||
// .button-s{
|
||||
// // color:white;
|
||||
// // font-size: 30px;
|
||||
// // background:linear-gradient(to right, #FF9900, #FF7B00);
|
||||
// // width: 150px;
|
||||
// // margin:20px auto
|
||||
// // background-color:$themeColor;
|
||||
// // border:1PX solid $themeColor;
|
||||
// }
|
||||
|
||||
.button-b{
|
||||
|
||||
background-color:#d9534f;
|
||||
border:1PX solid #d9534f;
|
||||
}
|
||||
// .button-b{
|
||||
// width: 150px;
|
||||
// background-color:#d9534f;
|
||||
// border:1PX solid #d9534f;
|
||||
// }
|
||||
}
|
||||
}
|
||||
.demanding-box{
|
||||
@ -171,4 +176,7 @@ $themeColor: #FF7142;
|
||||
}
|
||||
.pagination-box{
|
||||
margin: 50px 0;
|
||||
}
|
||||
}
|
||||
.input-index--at-input__title{
|
||||
font-weight: bold
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Taro, { Component } from '@tarojs/taro'
|
||||
import { View, Text } from '@tarojs/components'
|
||||
import { AtInput, AtImagePicker, AtTextarea, AtButton, } from 'taro-ui'
|
||||
import { View, Text, Button } from '@tarojs/components'
|
||||
import { AtInput, AtImagePicker, AtTextarea, AtForm } from 'taro-ui'
|
||||
|
||||
|
||||
import ShopTypeInteractionComp from '../../component/shopTypeInteractionComp/shopTypeInteractionComp'
|
||||
@ -19,7 +19,7 @@ class GoodsPublish extends Component {
|
||||
constructor() {
|
||||
super(...arguments)
|
||||
this.state = {
|
||||
|
||||
|
||||
shopTypeSelected: { name: '选择店铺类型', id: '' },//已选的店铺分类
|
||||
goodsTypeSelected: { name: '选择商品分类', id: '' },// 已选的商品分类
|
||||
productName: '',
|
||||
@ -34,7 +34,7 @@ class GoodsPublish extends Component {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -133,10 +133,10 @@ class GoodsPublish extends Component {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
productNameChange(event) {
|
||||
this.setState({
|
||||
productName: event
|
||||
@ -199,7 +199,7 @@ class GoodsPublish extends Component {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onClickUploadGoods() {
|
||||
if (this.state.productName &&
|
||||
this.state.productPrice &&
|
||||
@ -260,14 +260,14 @@ class GoodsPublish extends Component {
|
||||
|
||||
return (
|
||||
<View className='goods-publish'>
|
||||
|
||||
<View className='goods-category'>
|
||||
{/* 商品分类开始 */}
|
||||
<GoodsTypeInteractionComp
|
||||
url={URL.GetProductCategoryList}
|
||||
onPassDataToChild={this.getDataFromGoodsChild.bind(this)}
|
||||
selectedValue={this.state.goodsTypeSelected}
|
||||
|
||||
></GoodsTypeInteractionComp>
|
||||
url={URL.GetProductCategoryList}
|
||||
onPassDataToChild={this.getDataFromGoodsChild.bind(this)}
|
||||
selectedValue={this.state.goodsTypeSelected}
|
||||
></GoodsTypeInteractionComp>
|
||||
{/* 商品分类结束 */}
|
||||
|
||||
<View className='input-box'>
|
||||
@ -277,6 +277,7 @@ class GoodsPublish extends Component {
|
||||
title='商品名称:'
|
||||
type='text'
|
||||
value={this.state.productName}
|
||||
border={false}
|
||||
onChange={this.productNameChange.bind(this)}
|
||||
/>
|
||||
</View>
|
||||
@ -288,6 +289,7 @@ class GoodsPublish extends Component {
|
||||
type='number'
|
||||
placeholder='¥'
|
||||
value={this.state.productPrice}
|
||||
border={false}
|
||||
onChange={this.productPriceChange.bind(this)}
|
||||
/>
|
||||
</View>
|
||||
@ -296,8 +298,9 @@ class GoodsPublish extends Component {
|
||||
<AtInput
|
||||
name='productUnit'
|
||||
title='商品单位:'
|
||||
type='text'
|
||||
type='number'
|
||||
value={this.state.productUnit}
|
||||
border={false}
|
||||
onChange={this.productUnitChange.bind(this)}
|
||||
/>
|
||||
</View>
|
||||
@ -342,13 +345,13 @@ class GoodsPublish extends Component {
|
||||
</View>
|
||||
<View className='button-box' >
|
||||
<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 className='button'>
|
||||
<AtButton type='primary' className='button-a' size='small' >发布并新增</AtButton>
|
||||
<Button type='primary' className='button-a' size='small' >发布并新增</Button>
|
||||
</View> */}
|
||||
<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>
|
||||
|
||||
|
||||
|
@ -108,4 +108,7 @@ $themeColor:#FF7142;
|
||||
color:red;
|
||||
line-height:100rpx;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
//grabOrderPage
|
||||
import Taro, { Component } from '@tarojs/taro'
|
||||
import { View, Text } from '@tarojs/components'
|
||||
import { AtButton, AtIcon } from 'taro-ui'
|
||||
import { View, Text, Button } from '@tarojs/components'
|
||||
import { AtModal, AtModalHeader, AtModalContent, AtModalAction, AtIcon } from 'taro-ui'
|
||||
|
||||
import URL from '../../serviceAPI.config'
|
||||
|
||||
@ -25,7 +25,8 @@ class GrabOrderPage extends Component {
|
||||
contactNumber: '',
|
||||
address: '',
|
||||
content: '',
|
||||
|
||||
isOpen: false, // 抢单消息提示
|
||||
grabOrderId:this.$router.params.orderId
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,9 +47,6 @@ class GrabOrderPage extends Component {
|
||||
})
|
||||
.then(res => {
|
||||
console.log('抢单详情获取成功', res)
|
||||
|
||||
|
||||
|
||||
this.setState({
|
||||
type: res.data.sdInfo.sd_type,
|
||||
title: res.data.sdInfo.sd_title,
|
||||
@ -65,14 +63,70 @@ class GrabOrderPage extends Component {
|
||||
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({
|
||||
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() {
|
||||
console.log(this.$router.params.orderId)
|
||||
|
||||
this.getGrabOrderInfo()
|
||||
}
|
||||
componentWillReceiveProps(nextProps) {
|
||||
@ -86,8 +140,18 @@ class GrabOrderPage extends Component {
|
||||
componentDidHide() { }
|
||||
|
||||
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 (
|
||||
<View className='grabOrderPage'>
|
||||
{modalMessageGrabElement}
|
||||
<View className='type box'>
|
||||
<Text className='title'>行业分类:</Text>
|
||||
<Text className='content'>{this.state.type}</Text>
|
||||
@ -117,10 +181,10 @@ class GrabOrderPage extends Component {
|
||||
<Text className='content'>{this.state.content}</Text>
|
||||
</View>
|
||||
<View className='button-box'>
|
||||
<View className='button' onClick={this.goToSDPublishPage.bind(this)}>
|
||||
<AtButton type='primary' size='small'>
|
||||
<View className='button' onClick={this.grabButtonHandler.bind(this)}>
|
||||
<Button size='mini' className='button-orange'>
|
||||
<AtIcon value='close' size='12' color='white'></AtIcon>
|
||||
抢单</AtButton>
|
||||
抢单</Button>
|
||||
</View>
|
||||
</View>
|
||||
<CopyrightComponent></CopyrightComponent>
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Taro, { Component } from '@tarojs/taro'
|
||||
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 BottomNav from '../../component/bottomNav/bottomNav'
|
||||
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 => {
|
||||
console.log('所有店铺的信息', res)
|
||||
Taro.hideLoading()
|
||||
if (res.data.err_msg === 'success'){
|
||||
if (res.data.err_msg === 'success') {
|
||||
if (res.data.shops.length) {
|
||||
this.setState({ shopsDetails: this.state.shopsDetails.concat(res.data.shops), isMore: 'more' }, () => {
|
||||
})
|
||||
|
||||
|
||||
} else {
|
||||
this.setState({ isMore: 'noMore' }, () => {
|
||||
console.log('ismore?', this.state.isMore)
|
||||
})
|
||||
}
|
||||
|
||||
}else{
|
||||
} else {
|
||||
Taro.showToast({
|
||||
title: res.data.err_msg,
|
||||
icon: 'none',
|
||||
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() {
|
||||
Taro.login({
|
||||
success(res) {
|
||||
|
||||
|
||||
if (res.code) {
|
||||
// 发起网络请求
|
||||
// console.log('手机端微信code:',res.code)
|
||||
@ -134,26 +185,26 @@ class Home extends Component {
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
if(response.data.err_msg==='success'){
|
||||
if (response.data.err_msg === 'success') {
|
||||
console.log('微信登入成功', response)
|
||||
Taro.showToast({
|
||||
title:'登入成功',
|
||||
icon:'success',
|
||||
duration:1500
|
||||
})
|
||||
// Taro.showToast({
|
||||
// title:'登入成功',
|
||||
// icon:'success',
|
||||
// duration:1500
|
||||
// })
|
||||
//储存后台返回的session_id 到local Storage
|
||||
Taro.setStorageSync('session_id', response.data.session_id)
|
||||
Taro.setStorageSync('shopInfo', response.data.shop_info)
|
||||
Taro.setStorageSync('userInfo', response.data.user_info)
|
||||
|
||||
}else{
|
||||
} else {
|
||||
Taro.showToast({
|
||||
title:'登入失败'+response.data.err_msg,
|
||||
icon:'none',
|
||||
duration:1500
|
||||
title: '登入失败' + response.data.err_msg,
|
||||
icon: 'none',
|
||||
duration: 1500
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
).catch(err => {
|
||||
console.log('登入微信失败', err)
|
||||
@ -220,15 +271,23 @@ class Home extends Component {
|
||||
const parentClass = item.parent_class_id
|
||||
const childClass = item.class_id
|
||||
this.setState({ subCate: item.children })
|
||||
this.getShops({ parent_supply_class: parentClass, supply_class: childClass })
|
||||
this.getShops({ parent_supply_class: parentClass, supply_class: childClass })
|
||||
this.getShopsInfo({ parent_supply_class: parentClass, supply_class: childClass })
|
||||
|
||||
}
|
||||
// 点击子类
|
||||
onClickChildCate(item) {
|
||||
const parentClass = item.parent_class_id
|
||||
const childClass = item.class_id
|
||||
// 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() {
|
||||
@ -306,7 +365,7 @@ class Home extends Component {
|
||||
<AtModalHeader>提示</AtModalHeader>
|
||||
<AtModalContent>
|
||||
确认抢单?
|
||||
</AtModalContent>
|
||||
</AtModalContent>
|
||||
<AtModalAction> <Button onClick={this.handleGrabModalCancel.bind(this)}>取消</Button> <Button className='orange' onClick={this.handleGrabConfirm.bind(this)}>确定</Button> </AtModalAction>
|
||||
</AtModal>
|
||||
|
||||
@ -346,13 +405,14 @@ class Home extends Component {
|
||||
|
||||
// 这里应该代码可以优化-----
|
||||
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} />
|
||||
<View>{item.class_name}</View>
|
||||
</View>
|
||||
}) : null
|
||||
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>{item.class_name}</View>
|
||||
</View>
|
||||
@ -394,6 +454,7 @@ class Home extends Component {
|
||||
{/* 第二行图片滚动条 */}
|
||||
<View className='second-banner'>
|
||||
<Swiper
|
||||
style='height:180px;'
|
||||
className='swipper'
|
||||
indicatorColor='#999'
|
||||
indicatorActiveColor='#333'
|
||||
@ -449,6 +510,7 @@ class Home extends Component {
|
||||
</View>
|
||||
<View className='customer-demanding'>
|
||||
<Swiper
|
||||
style='height:180px;'
|
||||
className='swipper swiper-sub'
|
||||
indicatorColor='#999'
|
||||
indicatorActiveColor='#333'
|
||||
|
@ -53,7 +53,7 @@ $themeColor: #FF7142;
|
||||
.customer-demanding{
|
||||
padding:0 20px;
|
||||
.demanding-item{
|
||||
border: #eee solid 1px;
|
||||
border: 3rpx solid #ddd;
|
||||
text-align: center;
|
||||
.item-tag{
|
||||
color:white;
|
||||
@ -83,6 +83,9 @@ $themeColor: #FF7142;
|
||||
padding-top: 5px;
|
||||
font-size: 35px;
|
||||
// margin-top: 10px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.item-button-box{
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
import Taro, { Component } from '@tarojs/taro'
|
||||
import { View, Text } from '@tarojs/components'
|
||||
import { AtInput, AtImagePicker, AtTextarea, AtButton, Picker, AtToast } from 'taro-ui'
|
||||
import { View, Text,Button } from '@tarojs/components'
|
||||
import { AtInput, AtImagePicker, AtTextarea, Picker } from 'taro-ui'
|
||||
|
||||
import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
|
||||
import URL from '../../serviceAPI.config'
|
||||
@ -294,7 +294,9 @@ class MyDemandSupplyEdit extends Component {
|
||||
title='需求标题:'
|
||||
type='text'
|
||||
value={this.state.title}
|
||||
border={false}
|
||||
onChange={this.titleChange.bind(this)}
|
||||
|
||||
/>
|
||||
</View>
|
||||
<View className='input-box'>
|
||||
@ -304,6 +306,7 @@ class MyDemandSupplyEdit extends Component {
|
||||
title='联系人:'
|
||||
type='text'
|
||||
value={this.state.contactName}
|
||||
border={false}
|
||||
onChange={this.contactNameChange.bind(this)}
|
||||
/>
|
||||
</View>
|
||||
@ -314,6 +317,7 @@ class MyDemandSupplyEdit extends Component {
|
||||
title='联系电话:'
|
||||
type='number'
|
||||
value={this.state.contactNumber}
|
||||
border={false}
|
||||
onChange={this.contactNumberChange.bind(this)}
|
||||
/>
|
||||
</View>
|
||||
@ -374,14 +378,14 @@ class MyDemandSupplyEdit extends Component {
|
||||
|
||||
<View className='button-box'>
|
||||
<View className='button' onClick={this.uploadSupplyDemand.bind(this)}>
|
||||
<AtButton type='primary' size='small'>保存</AtButton>
|
||||
<Button size='mini' className='button-orange'>保存</Button>
|
||||
</View>
|
||||
{/* <View className='button'>
|
||||
|
||||
<AtButton type='primary' className='button-a' size='small'>保存并新增</AtButton>
|
||||
<Button className='button-a' size='mini' className='button-orange'>保存并新增</Button>
|
||||
</View> */}
|
||||
<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>
|
||||
<CopyrightComponent></CopyrightComponent>
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Taro, { Component } from '@tarojs/taro'
|
||||
import { View, Radio, } from '@tarojs/components'
|
||||
import { AtInput, Text, AtButton, AtIcon, Picker, Image, AtPagination, AtModal, AtModalHeader, AtModalContent, AtModalAction, Button } from 'taro-ui'
|
||||
import { View, Radio,Button } from '@tarojs/components'
|
||||
import { AtInput, Text, AtIcon, Picker, Image, AtPagination, AtModal, AtModalHeader, AtModalContent, AtModalAction } from 'taro-ui'
|
||||
import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
|
||||
import URL from '../../serviceAPI.config'
|
||||
|
||||
@ -540,17 +540,20 @@ class MyGoodList extends Component {
|
||||
//等待接口数据
|
||||
const goodListElementArray = this.state.myGoodList.map((item, index) => {
|
||||
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>
|
||||
{/* onClick={this.handleCheckChange.bind(this,item.goods_id)} */}
|
||||
<View className='good-container-a'>
|
||||
<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)}>
|
||||
<Image mode='aspectFit' className='img' style='height:50px;width:50px' src={URL.Base + item.goods_url} />
|
||||
</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='quantity-box'>{item.sales_volume}</View>
|
||||
|
||||
</View>
|
||||
|
||||
<View className='button-box1' onClick={this.goToGoodEditPage.bind(this, item.goods_id)}>
|
||||
<AtButton type='primary' className='button-a' size='small'>
|
||||
编辑商品</AtButton>
|
||||
<Button className='button-orange' size='mini'>
|
||||
编辑商品</Button>
|
||||
</View>
|
||||
</View>
|
||||
})
|
||||
@ -593,19 +596,23 @@ class MyGoodList extends Component {
|
||||
<AtInput
|
||||
name='value'
|
||||
title='宝贝名称:'
|
||||
placeholder='宝贝名称'
|
||||
type='text'
|
||||
value={this.state.productName}
|
||||
onChange={this.productNameChange.bind(this)}
|
||||
border={false}
|
||||
/>
|
||||
</View>
|
||||
<View className='input-box'>
|
||||
<View className='border-box'>
|
||||
<AtInput
|
||||
name='value'
|
||||
title='最低价:'
|
||||
className='input'
|
||||
|
||||
type='number'
|
||||
value={this.state.lowestPrice}
|
||||
onChange={this.lowestPriceChange.bind(this)}
|
||||
border={false}
|
||||
/>
|
||||
<AtInput
|
||||
name='value'
|
||||
@ -613,6 +620,7 @@ class MyGoodList extends Component {
|
||||
className='input'
|
||||
type='number'
|
||||
value={this.state.heightestPrice}
|
||||
border={false}
|
||||
onChange={this.heightestPriceChange.bind(this)}
|
||||
/>
|
||||
</View>
|
||||
@ -623,6 +631,7 @@ class MyGoodList extends Component {
|
||||
className='input'
|
||||
type='number'
|
||||
value={this.state.minimumSold}
|
||||
border={false}
|
||||
onChange={this.minimumSoldChange.bind(this)}
|
||||
/>
|
||||
<AtInput
|
||||
@ -631,6 +640,7 @@ class MyGoodList extends Component {
|
||||
className='input'
|
||||
type='number'
|
||||
value={this.state.maximumSold}
|
||||
border={false}
|
||||
onChange={this.maximumSoldChange.bind(this)}
|
||||
/>
|
||||
</View>
|
||||
@ -640,9 +650,10 @@ class MyGoodList extends Component {
|
||||
border={false}
|
||||
name='value'
|
||||
title='商品编码:'
|
||||
type='text'
|
||||
type='number'
|
||||
value={this.state.productId}
|
||||
onChange={this.productIdChange.bind(this)}
|
||||
border={false}
|
||||
/>
|
||||
</View>
|
||||
<View className='page-section'>
|
||||
@ -659,14 +670,14 @@ class MyGoodList extends Component {
|
||||
</View>
|
||||
<View className='button-box'>
|
||||
<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>
|
||||
搜索</AtButton>
|
||||
搜索</Button>
|
||||
</View>
|
||||
<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>
|
||||
|
||||
@ -681,13 +692,12 @@ class MyGoodList extends Component {
|
||||
<View className='sub-filter'>
|
||||
<Radio className='radio' checked={this.state.isCheckAll} onClick={this.checkAllHandler.bind(this)}>全选</Radio>
|
||||
<View className='button' onClick={this.deleteGoodsHandler.bind(this)}>
|
||||
<AtButton type='primary' size='small'>
|
||||
删除</AtButton>
|
||||
<Button size='mini' className='button-orange'>
|
||||
删除</Button>
|
||||
</View>
|
||||
<View className='button' onClick={this.offStockGoodHandler.bind(this)}>
|
||||
<AtButton type='primary' className='button-a' size='small'>
|
||||
|
||||
下架</AtButton>
|
||||
<Button size='mini' className='button-green'>
|
||||
下架</Button>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
|
@ -46,23 +46,13 @@ $themeColor:#FF7142;
|
||||
|
||||
.radio{
|
||||
margin-left: 10px;
|
||||
margin-top:4%;
|
||||
margin-top:3%;
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.button{
|
||||
margin-top:4%;
|
||||
margin-left:2%;
|
||||
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;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
.button-box1{
|
||||
flex:1;
|
||||
margin-top: 7%;
|
||||
}
|
||||
.good-container-a{
|
||||
flex:3;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: row;
|
||||
font-size: 30px;
|
||||
height: 200px;
|
||||
@ -168,17 +166,10 @@ $themeColor:#FF7142;
|
||||
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{
|
||||
font-size: 32rpx;
|
||||
font-size: 25rpx;
|
||||
margin-top: 40px;
|
||||
text-align: center
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Taro, { Component, UpdateManager } from '@tarojs/taro'
|
||||
import { View, Text, Radio, RadioGroup, Label } from '@tarojs/components'
|
||||
import { AtInput, AtImagePicker, AtTextarea, AtButton, Picker, AtToast } from 'taro-ui'
|
||||
import Taro, { Component } from '@tarojs/taro'
|
||||
import { View, Text } from '@tarojs/components'
|
||||
import { AtInput, AtImagePicker, AtTextarea, Button, } from 'taro-ui'
|
||||
|
||||
import ShopTypeInteractionComp from '../../component/shopTypeInteractionComp/shopTypeInteractionComp'
|
||||
|
||||
@ -339,7 +339,10 @@ class MyGoodsEdit extends Component {
|
||||
title='商品名称:'
|
||||
type='text'
|
||||
value={this.state.productName}
|
||||
border={false}
|
||||
onChange={this.productNameChange.bind(this)}
|
||||
|
||||
|
||||
/>
|
||||
</View>
|
||||
<View className='input-box'>
|
||||
@ -350,6 +353,7 @@ class MyGoodsEdit extends Component {
|
||||
type='number'
|
||||
placeholder='¥'
|
||||
value={this.state.productPrice}
|
||||
border={false}
|
||||
onChange={this.productPriceChange.bind(this)}
|
||||
/>
|
||||
</View>
|
||||
@ -358,8 +362,9 @@ class MyGoodsEdit extends Component {
|
||||
<AtInput
|
||||
name='productUnit'
|
||||
title='商品单位:'
|
||||
type='text'
|
||||
type='number'
|
||||
value={this.state.productUnit}
|
||||
border={false}
|
||||
onChange={this.productUnitChange.bind(this)}
|
||||
/>
|
||||
</View>
|
||||
@ -402,13 +407,13 @@ class MyGoodsEdit extends Component {
|
||||
</View>
|
||||
<View className='button-box' >
|
||||
<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 className='button'>
|
||||
<AtButton type='primary' className='button-a' size='small' >发布并新增</AtButton>
|
||||
<Button className='button-a' size='mini' >发布并新增</Button>
|
||||
</View> */}
|
||||
<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>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
//myNeeds
|
||||
import Taro, { Component } from '@tarojs/taro'
|
||||
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 InteractionComponent from '../../component/interactionComponent/interactionComponent'
|
||||
@ -289,17 +289,17 @@ class MyNeeds extends Component {
|
||||
</View>
|
||||
{item.state === '0'||item.state === '1' ? <View className='info-button-box'>
|
||||
<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 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 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 className='info-button-box'>
|
||||
<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>
|
||||
}
|
||||
@ -383,19 +383,19 @@ class MyNeeds extends Component {
|
||||
|
||||
<View className='button-box'>
|
||||
<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>
|
||||
搜索</AtButton>
|
||||
搜索</Button>
|
||||
</View>
|
||||
<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>
|
||||
新增</AtButton>
|
||||
新增</Button>
|
||||
</View>
|
||||
<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>
|
||||
清空</AtButton>
|
||||
清空</Button>
|
||||
</View>
|
||||
</View>
|
||||
<View className='total'>
|
||||
|
@ -90,20 +90,7 @@ $themeColor:#FF7142;
|
||||
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{
|
||||
margin-top: 10px;
|
||||
border: 1px solid #ddd;
|
||||
border: 3rpx solid #ddd;
|
||||
margin-bottom: 8px;
|
||||
box-shadow: 0 8px 8px #ddd;
|
||||
padding: 10px;
|
||||
font-size: 25rpx;
|
||||
|
||||
.box{
|
||||
margin-top: 10px;
|
||||
font-size: 28px;
|
||||
|
||||
}
|
||||
.needs-title{
|
||||
.content{
|
||||
@ -140,29 +128,13 @@ $themeColor:#FF7142;
|
||||
.button{
|
||||
// flex:1;
|
||||
text-align: right;
|
||||
margin:2% 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;
|
||||
}
|
||||
}
|
||||
margin:0 1% 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}}
|
||||
.nomore{
|
||||
text-align: center;
|
||||
font-size: 35px;
|
||||
font-size: 25rpx;
|
||||
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
import Taro, { Component } from '@tarojs/taro'
|
||||
import { View, Text } from '@tarojs/components'
|
||||
import { AtInput, AtImagePicker, AtTextarea, AtButton, Picker, AtToast } from 'taro-ui'
|
||||
import { View, Text,Button } from '@tarojs/components'
|
||||
import { AtInput, AtImagePicker, AtTextarea, Picker } from 'taro-ui'
|
||||
|
||||
import InteractionComponent from '../../component/interactionComponent/interactionComponent'
|
||||
import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
|
||||
@ -321,8 +321,11 @@ class MyNeedsEdit extends Component {
|
||||
title='需求标题:'
|
||||
type='text'
|
||||
value={this.state.title}
|
||||
border={false}
|
||||
onChange={this.titleChange.bind(this)}
|
||||
|
||||
/>
|
||||
|
||||
</View>
|
||||
<View className='input-box'>
|
||||
<Text className='require'>*</Text>
|
||||
@ -331,6 +334,7 @@ class MyNeedsEdit extends Component {
|
||||
title='联系人:'
|
||||
type='text'
|
||||
value={this.state.contactName}
|
||||
border={false}
|
||||
onChange={this.contactNameChange.bind(this)}
|
||||
/>
|
||||
</View>
|
||||
@ -341,6 +345,7 @@ class MyNeedsEdit extends Component {
|
||||
title='联系电话:'
|
||||
type='number'
|
||||
value={this.state.contactNumber}
|
||||
border={false}
|
||||
onChange={this.contactNumberChange.bind(this)}
|
||||
/>
|
||||
</View>
|
||||
@ -401,14 +406,14 @@ class MyNeedsEdit extends Component {
|
||||
|
||||
<View className='button-box'>
|
||||
<View className='button' onClick={this.uploadMyNeedsButton.bind(this)}>
|
||||
<AtButton type='primary' size='small'>保存</AtButton>
|
||||
<Button size='mini' className='button-orange'>保存</Button>
|
||||
</View>
|
||||
{/* <View className='button'>
|
||||
|
||||
<AtButton type='primary' className='button-a' size='small'>保存并新增</AtButton>
|
||||
<Button className='button-a' size='mini'>保存并新增</Button>
|
||||
</View> */}
|
||||
<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>
|
||||
<CopyrightComponent></CopyrightComponent>
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
import Taro, { Component } from '@tarojs/taro'
|
||||
import { View, Text } from '@tarojs/components'
|
||||
import { AtInput, AtImagePicker, AtTextarea, AtButton, Picker, AtToast } from 'taro-ui'
|
||||
import { View, Text ,Button} from '@tarojs/components'
|
||||
import { AtInput, AtImagePicker, AtTextarea, Picker } from 'taro-ui'
|
||||
|
||||
import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
|
||||
import URL from '../../serviceAPI.config'
|
||||
@ -256,7 +256,9 @@ class MyNeedsPublish extends Component {
|
||||
title='需求标题:'
|
||||
type='text'
|
||||
value={this.state.title}
|
||||
border={false}
|
||||
onChange={this.titleChange.bind(this)}
|
||||
|
||||
/>
|
||||
</View>
|
||||
<View className='input-box'>
|
||||
@ -266,6 +268,7 @@ class MyNeedsPublish extends Component {
|
||||
title='联系人:'
|
||||
type='text'
|
||||
value={this.state.contactName}
|
||||
border={false}
|
||||
onChange={this.contactNameChange.bind(this)}
|
||||
/>
|
||||
</View>
|
||||
@ -276,6 +279,7 @@ class MyNeedsPublish extends Component {
|
||||
title='联系电话:'
|
||||
type='number'
|
||||
value={this.state.contactNumber}
|
||||
border={false}
|
||||
onChange={this.contactNumberChange.bind(this)}
|
||||
/>
|
||||
</View>
|
||||
@ -336,14 +340,14 @@ class MyNeedsPublish extends Component {
|
||||
|
||||
<View className='button-box'>
|
||||
<View className='button' onClick={this.uploadMyNeedsButton.bind(this)}>
|
||||
<AtButton type='primary' size='small'>发布</AtButton>
|
||||
<Button size='mini'className='button-orange' >发布</Button>
|
||||
</View>
|
||||
{/* <View className='button'>
|
||||
|
||||
<AtButton type='primary' className='button-a' size='small'>保存并新增</AtButton>
|
||||
<Button className='button-a' size='mini' >保存并新增</Button>
|
||||
</View> */}
|
||||
<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>
|
||||
<CopyrightComponent></CopyrightComponent>
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
import Taro, { Component } from '@tarojs/taro'
|
||||
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 CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
|
||||
@ -245,25 +245,25 @@ class SupplyDemandView extends Component {
|
||||
|
||||
<View className='button-box'>
|
||||
<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>
|
||||
新增</AtButton>
|
||||
新增</Button>
|
||||
</View>
|
||||
<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>
|
||||
我的需求</AtButton>
|
||||
我的需求</Button>
|
||||
</View>
|
||||
<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>
|
||||
修改</AtButton>
|
||||
修改</Button>
|
||||
</View>
|
||||
|
||||
<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>
|
||||
删除</AtButton>
|
||||
删除</Button>
|
||||
</View>
|
||||
</View>
|
||||
<CopyrightComponent></CopyrightComponent>
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Taro, { Component } from '@tarojs/taro'
|
||||
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 CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
|
||||
@ -243,6 +243,7 @@ class MySupplyDemand extends Component {
|
||||
Taro.showLoading({ title: '加载中' })
|
||||
this.setState({ currentPage: type.current, }, () => {
|
||||
this.getMySupplyDemand({ curr_page: this.state.currentPage })
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
@ -308,13 +309,13 @@ class MySupplyDemand extends Component {
|
||||
</View>
|
||||
<View className='info-button-box'>
|
||||
<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 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 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>
|
||||
|
||||
@ -365,6 +366,7 @@ class MySupplyDemand extends Component {
|
||||
type='text'
|
||||
value={this.state.title}
|
||||
onChange={this.titleChange.bind(this)}
|
||||
border={false}
|
||||
/>
|
||||
</View>
|
||||
{/* 开始和结束日期 */}
|
||||
@ -391,19 +393,19 @@ class MySupplyDemand extends Component {
|
||||
|
||||
<View className='button-box'>
|
||||
<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>
|
||||
搜索</AtButton>
|
||||
搜索</Button>
|
||||
</View>
|
||||
<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>
|
||||
新增</AtButton>
|
||||
新增</Button>
|
||||
</View>
|
||||
<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>
|
||||
清空</AtButton>
|
||||
清空</Button>
|
||||
</View>
|
||||
</View>
|
||||
<View className='total-count'>一共<Text className='number'>{this.state.totalDemandSupply}</Text> 条记录</View>
|
||||
|
@ -99,10 +99,10 @@ $themeColor:#FF7142;
|
||||
}
|
||||
|
||||
.info-box{
|
||||
font-size: 30px;
|
||||
font-size: 25rpx;
|
||||
|
||||
.info-container{
|
||||
border: 1px solid #ddd;
|
||||
border: 3rpx solid #ddd;
|
||||
margin-bottom: 8px;
|
||||
box-shadow: 0 8px 8px #ddd;
|
||||
padding: 10px;
|
||||
@ -124,16 +124,8 @@ $themeColor:#FF7142;
|
||||
// flex:1;
|
||||
text-align: center;
|
||||
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{
|
||||
text-align: center;
|
||||
font-size: 30px;
|
||||
font-size: 25rpx;
|
||||
|
||||
}
|
||||
.pagination-box{
|
||||
|
@ -6,8 +6,8 @@ import URL from '../../serviceAPI.config'
|
||||
|
||||
import './shop.scss'
|
||||
import ShopItem from '../../component/shopItemComponent/shopItemComponent'
|
||||
import bottomNav from '../../component/bottomNav/bottomNav'
|
||||
import copyrightComponent from '../../component/copyrightComponent/copyrightComponent'
|
||||
import BottomNav from '../../component/bottomNav/bottomNav'
|
||||
import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
|
||||
import ShopDescription from '../shopDescription/shopDescription';
|
||||
|
||||
class Shop extends Component {
|
||||
@ -59,7 +59,7 @@ class Shop extends Component {
|
||||
curr_page: 1,
|
||||
page_count: 10,
|
||||
shop_name: false,
|
||||
shop_id: Taro.getStorageSync('shopInfo').shop_id,
|
||||
shop_id: this.$router.params.id,
|
||||
config_id: 4,
|
||||
shop_class_id: '',
|
||||
order: '',
|
||||
@ -192,7 +192,6 @@ class Shop extends Component {
|
||||
config_id = this.state.config_id,
|
||||
shop_class_id = this.state.shop_class_id,
|
||||
order = this.state.order,
|
||||
currPage = this.state.currPage,
|
||||
goods_class_id = this.state.goods_class_id,
|
||||
goodsSpec = this.state.goodsSpec,
|
||||
goodsParam = this.state.goodsParam,
|
||||
@ -210,7 +209,6 @@ class Shop extends Component {
|
||||
config_id: config_id,
|
||||
shop_class_id: shop_class_id,
|
||||
order: order,
|
||||
currPage: currPage,
|
||||
goods_class_id: goods_class_id,
|
||||
}),
|
||||
goodsRegion: JSON.stringify({}),
|
||||
@ -224,6 +222,7 @@ class Shop extends Component {
|
||||
}
|
||||
})
|
||||
.then(res => {
|
||||
console.log('searchGood',res)
|
||||
Taro.hideLoading()
|
||||
this.setState({ shopItem: res.data.goods, total: res.data.goodsCount, filterCondition: order }, () => {
|
||||
|
||||
@ -461,7 +460,6 @@ class Shop extends Component {
|
||||
|
||||
handleOnPageChange(value) {
|
||||
Taro.showLoading({ title: '加载中' })
|
||||
this.setState({ currentPage: value.current })
|
||||
this.goodsSearch({ curr_page: value.current, order: this.state.filterCondition })
|
||||
}
|
||||
showHomePage() {
|
||||
@ -736,10 +734,10 @@ class Shop extends Component {
|
||||
</View>
|
||||
{/* 显示店铺首页或者店铺详情 */}
|
||||
{this.state.showShopHomePage ? shopHomepageElement : shopDescriptionElement}
|
||||
<copyrightComponent></copyrightComponent>
|
||||
<CopyrightComponent></CopyrightComponent>
|
||||
|
||||
<View className='bottom-nav-box'>
|
||||
<bottomNav otherData={{ menu: [{ name: '首页' }, { name: '分类' }, { name: '购物车' }, { name: '教程软件' }, { name: '更多' }] }} />
|
||||
<BottomNav otherData={{ menu: [{ name: '首页' }, { name: '分类' }, { name: '购物车' }, { name: '教程软件' }, { name: '更多' }] }} />
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
import Taro, { Component } from '@tarojs/taro'
|
||||
import { View, Text } from '@tarojs/components'
|
||||
import { AtInput, AtImagePicker, AtTextarea, AtButton, Picker, AtToast } from 'taro-ui'
|
||||
import { View, Text,Button } from '@tarojs/components'
|
||||
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'
|
||||
|
||||
|
||||
@ -237,6 +237,7 @@ class SupplyDemand extends Component {
|
||||
type='text'
|
||||
value={this.state.title}
|
||||
onChange={this.titleChange.bind(this)}
|
||||
border={false}
|
||||
/>
|
||||
</View>
|
||||
<View className='input-box'>
|
||||
@ -247,6 +248,7 @@ class SupplyDemand extends Component {
|
||||
type='text'
|
||||
value={this.state.contactName}
|
||||
onChange={this.contactNameChange.bind(this)}
|
||||
border={false}
|
||||
/>
|
||||
</View>
|
||||
<View className='input-box'>
|
||||
@ -257,6 +259,7 @@ class SupplyDemand extends Component {
|
||||
type='number'
|
||||
value={this.state.contactNumber}
|
||||
onChange={this.contactNumberChange.bind(this)}
|
||||
border={false}
|
||||
/>
|
||||
</View>
|
||||
<View className='demanding-box'>
|
||||
@ -316,17 +319,17 @@ class SupplyDemand extends Component {
|
||||
|
||||
<View className='button-box'>
|
||||
<View className='button' onClick={this.uploadSupplyDemand.bind(this)}>
|
||||
<AtButton type='primary' size='small'>发布</AtButton>
|
||||
<Button size='mini' className='button-orange' >发布</Button>
|
||||
</View>
|
||||
{/* <View className='button'>
|
||||
|
||||
<AtButton type='primary' className='button-a' size='small'>发布并新增</AtButton>
|
||||
<Button size='mini' className='button-a' >发布并新增</Button>
|
||||
</View> */}
|
||||
<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>
|
||||
<copyrightComponent></copyrightComponent>
|
||||
<CopyrightComponent></CopyrightComponent>
|
||||
|
||||
|
||||
</View>
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
import Taro, { Component } from '@tarojs/taro'
|
||||
import { View, Text, Image } from '@tarojs/components'
|
||||
import { AtButton, AtIcon,AtModal, AtModalHeader, AtModalContent, AtModalAction } from 'taro-ui'
|
||||
import { View, Text, Image,Button } from '@tarojs/components'
|
||||
import { AtIcon,AtModal, AtModalHeader, AtModalContent, AtModalAction } from 'taro-ui'
|
||||
|
||||
import URL from '../../serviceAPI.config'
|
||||
import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
|
||||
@ -221,24 +221,24 @@ class SupplyDemandView extends Component {
|
||||
|
||||
<View className='button-box'>
|
||||
<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>
|
||||
新增</AtButton>
|
||||
新增</Button>
|
||||
</View>
|
||||
<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>
|
||||
修改</AtButton>
|
||||
修改</Button>
|
||||
</View>
|
||||
<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>
|
||||
我的供求</AtButton>
|
||||
我的供求</Button>
|
||||
</View>
|
||||
<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>
|
||||
删除</AtButton>
|
||||
删除</Button>
|
||||
</View>
|
||||
</View>
|
||||
<CopyrightComponent></CopyrightComponent>
|
||||
|
Loading…
Reference in New Issue
Block a user