修改 图标,登入转跳
@ -74,12 +74,12 @@ class App extends Component {
|
||||
, {
|
||||
pagePath: "pages/myNeeds/myNeeds",
|
||||
text: "我的需求",
|
||||
iconPath: "./icons/user.png",
|
||||
selectedIconPath: "./icons/user-actived.png"
|
||||
iconPath: "./icons/needs.png",
|
||||
selectedIconPath: "./icons/needs-actived.png"
|
||||
}
|
||||
],
|
||||
color: '#333',
|
||||
selectedColor: '#333',
|
||||
selectedColor: '#FF7142',
|
||||
backgroundColor: '#fff',
|
||||
borderStyle: 'black'
|
||||
}
|
||||
|
@ -134,24 +134,8 @@ class recommondShop extends Component {
|
||||
})
|
||||
}
|
||||
|
||||
// 优惠卷弹框。取消。确认
|
||||
isOpenVoucher() {
|
||||
this.setState({
|
||||
isOpenVoucher: true,
|
||||
userName: Taro.getStorageSync('user_identity').username,
|
||||
userPhone: Taro.getStorageSync('user_identity').userphone,
|
||||
})
|
||||
|
||||
|
||||
this.getVoucherInfo({})
|
||||
}
|
||||
voucherModalClose() {
|
||||
this.setState({ isOpenVoucher: false })
|
||||
}
|
||||
voucherModalConfirm() {
|
||||
this.setState({ isOpenVoucher: false })
|
||||
this.buyConsult({ user: this.state.userName, phone: this.state.userPhone })
|
||||
}
|
||||
// 咨询弹框。取消。确认
|
||||
isOpenConsult() {
|
||||
this.setState({
|
||||
@ -165,9 +149,24 @@ class recommondShop extends Component {
|
||||
this.setState({ isOpenConsult: false })
|
||||
}
|
||||
consultModalConfirm() {
|
||||
if(!this.state.userName){
|
||||
Taro.showToast({
|
||||
title: '请填写姓名',
|
||||
icon: 'none',
|
||||
})
|
||||
|
||||
}else if(!this.state.userPhone){
|
||||
Taro.showToast({
|
||||
title: '请填写电话',
|
||||
icon: 'none',
|
||||
})
|
||||
|
||||
}else{
|
||||
this.setState({ isOpenConsult: false })
|
||||
this.buyConsult({ user: this.state.userName, phone: this.state.userPhone })
|
||||
}
|
||||
|
||||
}
|
||||
handleInputCsultName(e) {
|
||||
this.setState({ userName: e.detail.value })
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
$linearBlue:linear-gradient(to right, #337ab7, #337ab7);
|
||||
|
||||
.shop-list-box{
|
||||
border: 4rpx solid #ddd;
|
||||
border: 2rpx solid #ddd;
|
||||
border-radius: 3px;
|
||||
box-shadow: 0 5px 5px #ddd;
|
||||
margin-bottom: 10px;
|
||||
@ -26,7 +26,7 @@ $linearBlue:linear-gradient(to right, #337ab7, #337ab7);
|
||||
}
|
||||
|
||||
.header{
|
||||
border-bottom:4rpx solid #F2F2F2;
|
||||
border-bottom:2rpx solid #F2F2F2;
|
||||
display: flex;
|
||||
.button-container{
|
||||
flex:1;
|
||||
@ -100,7 +100,7 @@ $linearBlue:linear-gradient(to right, #337ab7, #337ab7);
|
||||
}
|
||||
}
|
||||
.body{
|
||||
border-bottom:4rpx solid #F2F2F2;
|
||||
border-bottom:2rpx solid #F2F2F2;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
font-size: 35px;
|
||||
|
@ -73,12 +73,12 @@ class VoucherPoster extends Component {
|
||||
if (!this.state.voucherName) {
|
||||
Taro.showToast({
|
||||
title: '请填写姓名',
|
||||
icon: 'fail',
|
||||
icon: 'none',
|
||||
})
|
||||
} else if (!this.state.voucherPhone) {
|
||||
Taro.showToast({
|
||||
title: '请填写电话号码',
|
||||
icon: 'fail',
|
||||
icon: 'none',
|
||||
})
|
||||
} else {
|
||||
this.buyConsult({ user: this.state.voucherName, phone: this.state.voucherPhone })
|
||||
|
@ -41,13 +41,15 @@ class GoodsTypeInteractionComp extends Component {
|
||||
}
|
||||
})
|
||||
.then(res => {
|
||||
|
||||
if (res.data.err_msg === 'success') {
|
||||
console.log('商品分类目录', res)
|
||||
|
||||
const recursionInteractionData=this.recursionInteraction(res.data.data)
|
||||
this.recursionInitialized(res.data.data) //
|
||||
this.setState({
|
||||
interactionMultiArray: this.recursionInteraction(res.data.data),
|
||||
interactionMultiArray: recursionInteractionData,
|
||||
multiIndex: this.recursionDepth(res.data.data),
|
||||
initailMultiArray: this.recursionInitialized(res.data.data).reverse()
|
||||
initailMultiArray:initialDataArray.reverse()
|
||||
}, () => {
|
||||
initialDataArray=[]// 把全局变变量赋值给state之后,初始化商品分类为空, 不然第二次进去的时候会自动添加进去
|
||||
// console.log('联动数据', this.state.interactionMultiArray)
|
||||
@ -55,7 +57,8 @@ class GoodsTypeInteractionComp extends Component {
|
||||
|
||||
|
||||
}) // 用递归来整理无限层次的数据
|
||||
|
||||
// console.log('联动数据', this.recursionInteraction(res.data.data))
|
||||
// console.log('初始数据', this.recursionInitialized(res.data.data).reverse())
|
||||
} else {
|
||||
Taro.showToast({
|
||||
title: res.data.err_msg,
|
||||
@ -74,7 +77,8 @@ class GoodsTypeInteractionComp extends Component {
|
||||
|
||||
//联动确认
|
||||
bindMultiPickerChange(e) {
|
||||
console.log('e', e)
|
||||
// 如果没有上商品 那就不执行
|
||||
if(Taro.getStorageSync('shopInfo').shop_id){
|
||||
this.setState({
|
||||
multiIndex: e.detail.value.map(item => { if (item === null) { item = 0 } return item })
|
||||
}, () => {
|
||||
@ -83,6 +87,7 @@ class GoodsTypeInteractionComp extends Component {
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
returnResultToParent() {
|
||||
let selected = this.state.interactionMultiArray
|
||||
for (let index of this.state.multiIndex) {
|
||||
@ -94,6 +99,22 @@ class GoodsTypeInteractionComp extends Component {
|
||||
}
|
||||
}
|
||||
}
|
||||
// 递归整理无限层初始数据,将整理好的数据赋值给initialDataArray
|
||||
recursionInitialized(data) {
|
||||
const arrayTem = []
|
||||
if (data.length) {
|
||||
for (let item of data) {
|
||||
arrayTem.push({ name: item.class_name, id: item.class_id })
|
||||
}
|
||||
|
||||
}
|
||||
if(data[0].children.length){
|
||||
this.recursionInitialized(data[0].children)
|
||||
}
|
||||
initialDataArray.push(arrayTem)
|
||||
return arrayTem
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 递归整理无限层联动数据
|
||||
@ -111,20 +132,21 @@ class GoodsTypeInteractionComp extends Component {
|
||||
// return arrayTem
|
||||
}
|
||||
// 递归整理无限层初始数据
|
||||
recursionInitialized(data) {
|
||||
const arrayTem = []
|
||||
const childrenHolderArray = []
|
||||
if (data.length) {
|
||||
for (let item of data) {
|
||||
arrayTem.push({ name: item.class_name, id: item.class_id })
|
||||
item.children ? childrenHolderArray.push(...item.children) : null
|
||||
}
|
||||
this.recursionInitialized(childrenHolderArray)
|
||||
}
|
||||
// recursionInitialized(data) {
|
||||
// const arrayTem = []
|
||||
// const childrenHolderArray = []
|
||||
// if (data.length) {
|
||||
// for (let item of data) {
|
||||
// arrayTem.push({ name: item.class_name, id: item.class_id })
|
||||
// item.children ? childrenHolderArray.push(...item.children) : null
|
||||
// }
|
||||
// this.recursionInitialized(childrenHolderArray)
|
||||
// }
|
||||
|
||||
// arrayTem.length ? initialDataArray.push(arrayTem) : null // 数组为空则不添加
|
||||
// return initialDataArray
|
||||
// }
|
||||
|
||||
arrayTem.length ? initialDataArray.push(arrayTem) : null // 数组为空则不添加
|
||||
return initialDataArray
|
||||
}
|
||||
// 递归整理无限层初始数据
|
||||
recursionDepth(data) {
|
||||
const arrayTem = []
|
||||
@ -180,9 +202,6 @@ class GoodsTypeInteractionComp extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// switch (e.detail.column) {// 移动了第几列
|
||||
// case 0:
|
||||
// switch (data.multiIndex[0]) { // 第一个index 是多少
|
||||
@ -292,12 +311,13 @@ class GoodsTypeInteractionComp extends Component {
|
||||
this.setState({ multiIndex: data.multiIndex })
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
componentDidMount() {
|
||||
this.getProductCateList(this.props.url)
|
||||
|
||||
if(Taro.getStorageSync('shopInfo').shop_id){
|
||||
this.getProductCateList(this.props.url)
|
||||
}else{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
// 当然父组件有新的props的 会从新渲染组件
|
||||
@ -314,7 +334,6 @@ class GoodsTypeInteractionComp extends Component {
|
||||
return (
|
||||
<View class='page-section'>
|
||||
<Picker
|
||||
|
||||
rangeKey='name'
|
||||
mode='multiSelector'
|
||||
onChange={this.bindMultiPickerChange.bind(this)}
|
||||
|
@ -43,9 +43,8 @@ class Interaction extends Component {
|
||||
console.log('行业分类目录', res)
|
||||
let initailMultiArray = this.recursionInitialized(res.data.data)
|
||||
initialDataArray[1].unshift({ name: '全部', id: '-1' }) // 默认
|
||||
|
||||
this.setState({
|
||||
initailMultiArray: initailMultiArray.reverse(),
|
||||
initailMultiArray: [initailMultiArray[1]], //initailMultiArray.reverse(),
|
||||
interactionMultiArray: [{ name: '全部', id: '-1', children: [{ name: '', id: '' }] }, ...this.recursionInteraction(res.data.data)],
|
||||
multiIndex: this.recursionDepth(res.data.data),
|
||||
|
||||
|
@ -135,6 +135,7 @@ class ShopTypeInteractionComp extends Component {
|
||||
}
|
||||
bindMultiPickerChange(e) {
|
||||
// console.log('picker发送选择改变,携带值为', e.detail.value)
|
||||
if (Taro.getStorageSync('shopInfo').shop_id) {
|
||||
this.setState({
|
||||
multiIndex: e.detail.value,
|
||||
}, () => {
|
||||
@ -147,6 +148,9 @@ class ShopTypeInteractionComp extends Component {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//--------------------结束-行业分类picker
|
||||
passDataToParent(industryTypeSelected) {
|
||||
this.props.onPassDataToChild(industryTypeSelected)
|
||||
|
Before Width: | Height: | Size: 382 B After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 392 B After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 358 B After Width: | Height: | Size: 529 B |
Before Width: | Height: | Size: 375 B After Width: | Height: | Size: 512 B |
BIN
src/icons/needs-actived.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
src/icons/needs-actived1.png
Normal file
After Width: | Height: | Size: 700 B |
BIN
src/icons/needs.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
src/icons/needs1.png
Normal file
After Width: | Height: | Size: 737 B |
Before Width: | Height: | Size: 481 B After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 511 B After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1003 B |
Before Width: | Height: | Size: 1012 B |
Before Width: | Height: | Size: 687 B |
Before Width: | Height: | Size: 681 B |
@ -31,7 +31,6 @@ class AllDemanding extends Component {
|
||||
grabOrderId: '',//抢到订单的id
|
||||
isGrabOrderSuccess: false,// 是否显示轻提示
|
||||
grabOrderSuccess: '无法显示绑定后的字段',// 抢单成功返回字段
|
||||
currentPage: 1,
|
||||
isAddToList: false,// / 请求业主需求的时候是否添加到旧列表里
|
||||
isShowTopNav: false,// 是否显示返回顶部按钮
|
||||
loadMorePageIndex: 1
|
||||
@ -141,14 +140,19 @@ class AllDemanding extends Component {
|
||||
}
|
||||
})
|
||||
.then(res => {
|
||||
let textTip = res.data.err_msg
|
||||
this.setState({ grabOrderSuccess: textTip, isGrabOrderSuccess: true }, () => {
|
||||
setTimeout(() => {
|
||||
|
||||
this.setState({ isGrabOrderSuccess: false })
|
||||
|
||||
}, 2000)
|
||||
if (res.data.err_code === 0) {
|
||||
Taro.showToast({
|
||||
title: res.data.err_msg === 'success' ? '抢单成功' : res.data.err_msg,
|
||||
icon: res.data.err_msg === 'success' ? 'success' : 'none'
|
||||
})
|
||||
this.searchDemanding({ curr_page:1 })
|
||||
} else {
|
||||
Taro.showToast({
|
||||
title: res.data.err_msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
|
||||
console.log('抢单请求:', res)
|
||||
})
|
||||
|
||||
@ -164,7 +168,6 @@ class AllDemanding extends Component {
|
||||
}
|
||||
handleGrabConfirm() {
|
||||
this.setState({ isOpenedGrabModal: false })
|
||||
|
||||
this.GrabDemand({ demandId: this.state.grabOrderId })
|
||||
}
|
||||
searchHanlder() {
|
||||
@ -248,12 +251,7 @@ class AllDemanding extends Component {
|
||||
</AtModalContent>
|
||||
<AtModalAction> <Button onClick={this.handleGrabModalCancel.bind(this)}>取消</Button> <Button className='orange' onClick={this.handleGrabConfirm.bind(this)}>确定</Button> </AtModalAction>
|
||||
</AtModal>
|
||||
// 抢单返回轻提示
|
||||
const grabOrderSuccessElement = <AtToast
|
||||
isOpened={this.state.isGrabOrderSuccess}
|
||||
text={this.state.grabOrderSuccess}
|
||||
duration={2000}
|
||||
></AtToast>
|
||||
|
||||
const allDemandingElementArray = this.state.supplys.length ? this.state.supplys.map((item, index) => {
|
||||
return <View className='demanding-info' key={index}>
|
||||
<View className='header'>
|
||||
@ -293,8 +291,7 @@ class AllDemanding extends Component {
|
||||
<View className='allDemanding'>
|
||||
{/* 模态框 */}
|
||||
{modalMessageGrabElement}
|
||||
{/* 轻提示 */}
|
||||
{grabOrderSuccessElement}
|
||||
|
||||
<View className='page-section'>
|
||||
{/* 供求状态选择 */}
|
||||
<View>
|
||||
|
@ -307,8 +307,6 @@ class GoodsPublish extends Component {
|
||||
}
|
||||
}
|
||||
componentDidMount() {
|
||||
// this.getProductCateList()
|
||||
// this.getShopCateList()
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
@ -318,7 +316,12 @@ class GoodsPublish extends Component {
|
||||
componentWillUnmount() { }
|
||||
|
||||
componentDidShow() {
|
||||
|
||||
if(!Taro.getStorageSync('shopInfo').shop_id&&Taro.getStorageSync('userInfo').user_id){
|
||||
Taro.showToast({
|
||||
title:'您还没有店铺,不能使用该功能,快去申请吧',
|
||||
icon:'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
componentDidHide() { }
|
||||
|
@ -236,12 +236,12 @@ class GrabOrderPage extends Component {
|
||||
新增</Button>
|
||||
</View>
|
||||
<View className='button' onClick={this.goToMyNeedsPage.bind(this)}>
|
||||
<Button size='mini' className='button-green'>
|
||||
<Button size='mini' className='button-orange'>
|
||||
<AtIcon value='' size='12' color='white'></AtIcon>
|
||||
我的需求</Button>
|
||||
</View>
|
||||
<View className='button' onClick={this.goMyNeedEditPage.bind(this)}>
|
||||
<Button size='mini' className='button-orange'>
|
||||
<Button size='mini' className='button-blue'>
|
||||
<AtIcon value='settings' size='12' color='white'></AtIcon>
|
||||
修改</Button>
|
||||
</View>
|
||||
@ -260,7 +260,7 @@ class GrabOrderPage extends Component {
|
||||
新增</Button>
|
||||
</View>
|
||||
<View className='button' onClick={this.goToMyNeedsPage.bind(this)}>
|
||||
<Button size='mini' className='button-green'>
|
||||
<Button size='mini' className='button-orange'>
|
||||
<AtIcon value='' size='12' color='white'></AtIcon>
|
||||
我的需求</Button>
|
||||
</View>
|
||||
|
@ -16,7 +16,7 @@
|
||||
.image-wrapper{
|
||||
display: flex;
|
||||
justify-content:center;
|
||||
border: 4rpx solid #ddd;
|
||||
border: 2rpx solid #ddd;
|
||||
margin-top: 10px
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
.button{
|
||||
|
||||
text-align: center;
|
||||
.button-orange,.button-green,.button-dark-red{
|
||||
.button-orange,.button-green,.button-dark-red,.button-blue{
|
||||
font-size: 27rpx
|
||||
}
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ class RenderingView extends Component {
|
||||
onClose={this.onCloseCurtain.bind(this)}
|
||||
>
|
||||
<Image
|
||||
style='width:100%;height:250px'
|
||||
style='width:100%;max-height:100%'
|
||||
src={this.state.image}
|
||||
/>
|
||||
</AtCurtain>
|
||||
@ -70,7 +70,6 @@ class RenderingView extends Component {
|
||||
{curtainElement}
|
||||
{renderingElementArray}
|
||||
</View>
|
||||
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -2,9 +2,9 @@
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row;
|
||||
border: 4rpx solid #ddd;
|
||||
border:2rpx solid #ddd;
|
||||
.image-wrapper{
|
||||
border: 4rpx solid #ddd;
|
||||
border: 2rpx solid #ddd;
|
||||
margin-top: 10px;
|
||||
box-sizing: border-box;
|
||||
width: 30%;
|
||||
|
@ -107,9 +107,9 @@ class Home extends Component {
|
||||
.then(res => {
|
||||
console.log('所有店铺的信息', res)
|
||||
Taro.hideLoading()
|
||||
if (res.data.err_msg === 'success') {
|
||||
if (res.data.err_code === 0) {
|
||||
if (this.state.isAddToList) {
|
||||
if (res.data.shops.length) {
|
||||
if (res.data.shops) {
|
||||
this.setState({ shops: this.state.shops.concat(res.data.shops), isAddToList: false })
|
||||
} else {
|
||||
Taro.showToast({
|
||||
@ -191,7 +191,6 @@ class Home extends Component {
|
||||
})
|
||||
console.log('item', item)
|
||||
this.setState({ parentClass: item.class_id, childClass: item.class_id, supplyLevel: 1, subCate: item.children || [] }, () => {
|
||||
console.log('parentClass', this.state.parentClass, this.state.childClass)
|
||||
this.getShops({})
|
||||
})
|
||||
|
||||
@ -255,8 +254,9 @@ class Home extends Component {
|
||||
})
|
||||
}
|
||||
goToMyNeedsPublish() {
|
||||
// 传参数给myNeedsPublish页面- 显示效果图选项
|
||||
Taro.navigateTo({
|
||||
url: '/pages/myNeedsPublish/myNeedsPublish'
|
||||
url: '/pages/myNeedsPublish/myNeedsPublish?id=1'
|
||||
})
|
||||
|
||||
}
|
||||
@ -384,7 +384,7 @@ class Home extends Component {
|
||||
shop={item}
|
||||
key={index}
|
||||
></FilteredShopComponent>
|
||||
}) : <View className='no-more-title'> 没有更多了</View>
|
||||
}) : <View className='no-more-title top'> 没有更多了</View>
|
||||
const subCateElementsArray = this.state.subCate.length ? this.state.subCate.map((item, index) => {
|
||||
return <SwiperItem key={index} onClick={this.onClickChildCate.bind(this, item)}>
|
||||
<View className='text'>{item.class_name}</View>
|
||||
|
@ -49,7 +49,7 @@ $themeColor: #FF7142;
|
||||
.customer-demanding{
|
||||
padding:0 20px;
|
||||
.demanding-item{
|
||||
border: 3rpx solid #ddd;
|
||||
border: 2rpx solid #ddd;
|
||||
border-right:0px;
|
||||
text-align: center;
|
||||
.item-tag{
|
||||
@ -98,7 +98,7 @@ $themeColor: #FF7142;
|
||||
|
||||
}
|
||||
.last{
|
||||
border-right: 3rpx solid #ddd;
|
||||
border-right: 2rpx solid #ddd;
|
||||
}
|
||||
|
||||
}
|
||||
@ -111,6 +111,9 @@ $themeColor: #FF7142;
|
||||
|
||||
}
|
||||
}
|
||||
.top{
|
||||
margin-top: 250px;
|
||||
}
|
||||
.gap{
|
||||
|
||||
height:150px;
|
||||
|
@ -135,9 +135,7 @@ class Login extends Component {
|
||||
<View className='password'>
|
||||
<Input type='password' name='password' placeholder='请输入密码' value={this.state.password} onInput={this.passwordHandler} />
|
||||
</View>
|
||||
<Text className='register'>
|
||||
立即注册
|
||||
</Text>
|
||||
|
||||
<Button className='button button-orange' onClick={this.loginHandler}>登录</Button>
|
||||
</View>
|
||||
</View>
|
||||
|
@ -267,7 +267,7 @@ class MyDemandSupplyEdit extends Component {
|
||||
this.setState({ contactName: event })
|
||||
}
|
||||
contactNumberChange(event) {
|
||||
this.setState({ contactNumber: event })
|
||||
this.setState({ contactNumber: event.detail.value })
|
||||
}
|
||||
contactAddressChange(event) {
|
||||
this.setState({ contactAddress: event.target.value })
|
||||
@ -403,7 +403,7 @@ class MyDemandSupplyEdit extends Component {
|
||||
maxLength='11'
|
||||
type='number'
|
||||
value={this.state.contactNumber}
|
||||
onInput={this.handleInputCsultName.bind(this)}
|
||||
onInput={this.contactNumberChange.bind(this)}
|
||||
/></View>
|
||||
</View>
|
||||
<View className='demanding-box'>
|
||||
|
@ -119,12 +119,21 @@ class MyNeeds extends Component {
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
if(JSON.parse(res.data).err_code===88888){
|
||||
Taro.showToast({
|
||||
title: JSON.parse(res.data).err_msg,
|
||||
icon: 'none'
|
||||
})
|
||||
|
||||
}else{
|
||||
Taro.showToast({
|
||||
title: res.data.err_msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
@ -184,12 +193,7 @@ class MyNeeds extends Component {
|
||||
class_id: this.state.industryTypeSelected.id === '-1' ? '' : this.state.industryTypeSelected.id,
|
||||
state: this.state.needsStateSelected.id
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
@ -252,6 +252,12 @@ class MyNeedsPublish extends Component {
|
||||
// console.log('this.$router.params.sdId',this.$router.params.sdId)
|
||||
// Taro.showLoading({title:'加载中'})
|
||||
// this.getSupplyDemandInfo()
|
||||
// 如果路由参数为1 就默认显示 效果图,反之 显示业主需求
|
||||
const isRenderingPic=this.$router.params.id
|
||||
console.log(parseInt(isRenderingPic))
|
||||
if(parseInt(isRenderingPic)){
|
||||
this.setState({needsTypeSelected:{ name: '效果图', id: '5' }})
|
||||
}
|
||||
}
|
||||
componentWillReceiveProps(nextProps) {
|
||||
console.log(this.props, nextProps)
|
||||
|
@ -28,6 +28,6 @@ $themeColor:#FF7142;
|
||||
}
|
||||
}
|
||||
.image-wrapper{
|
||||
border: 4rpx solid #ddd;
|
||||
border: 2rpx solid #ddd;
|
||||
margin-top: 10px
|
||||
}
|
||||
|
@ -267,6 +267,12 @@ class MySupplyDemand extends Component {
|
||||
LoginService()
|
||||
return
|
||||
}
|
||||
if(!Taro.getStorageSync('shopInfo').shop_id&&Taro.getStorageSync('userInfo').user_id){
|
||||
Taro.showToast({
|
||||
title:'您还没有店铺,不能使用该功能,快去申请吧',
|
||||
icon:'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
componentDidHide() { }
|
||||
|
@ -34,9 +34,6 @@ class SupplyDemand extends Component {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 这个需要写一个uploadDemSup 上传供求 的api
|
||||
uploadDemSup({ sd_type = this.state.demandingSupplyCateSelected.id,
|
||||
sd_title = this.state.title,
|
||||
@ -264,6 +261,12 @@ class SupplyDemand extends Component {
|
||||
LoginService()
|
||||
return
|
||||
}
|
||||
if(!Taro.getStorageSync('shopInfo').shop_id&&Taro.getStorageSync('userInfo').user_id){
|
||||
Taro.showToast({
|
||||
title:'您还没有店铺,不能使用该功能,快去申请吧',
|
||||
icon:'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
componentDidHide() { }
|
||||
|
@ -220,12 +220,12 @@ class SupplyDemandView extends Component {
|
||||
|
||||
<View className='button-box'>
|
||||
<View className='button' onClick={this.goToSDPublishPage.bind(this)}>
|
||||
<Button className='button-orange' size='mini'>
|
||||
<Button className='button-green' size='mini' >
|
||||
<AtIcon value='add' size='12' color='white'></AtIcon>
|
||||
新增</Button>
|
||||
</View>
|
||||
<View className='button' onClick={this.goToMyDSEditPage.bind(this)}>
|
||||
<Button className='button-orange' size='mini'>
|
||||
<Button className='button-blue' size='mini'>
|
||||
<AtIcon value='settings' size='12' color='white'></AtIcon>
|
||||
修改</Button>
|
||||
</View>
|
||||
|
@ -19,12 +19,12 @@ $themeColor:#FF7142;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: row;
|
||||
margin: 40px 0 0;
|
||||
|
||||
justify-content: space-around;
|
||||
.button{
|
||||
flex:1;
|
||||
// flex:1;
|
||||
text-align: center;
|
||||
|
||||
.button-orange,.button-green,.button-dark-red{
|
||||
.button-orange,.button-green,.button-dark-red,.button-blue{
|
||||
font-size: 27rpx
|
||||
}
|
||||
}
|
||||
|