diff --git a/src/app.js b/src/app.js
index d647d93..22a1e50 100644
--- a/src/app.js
+++ b/src/app.js
@@ -21,12 +21,12 @@ class App extends Component {
pages: [
//'pages/index/index', // index页面
-
+ 'pages/goodsPublish/goodsPublish',// 商品发布页面 ---------------------
'pages/home/home',//首页 ---------------------
'pages/login/login',//登入页面 ---------------------
'pages/shop/shop',//店铺页面 ---------------------
'pages/goods/goods',// 商品页面 ---------------------
- 'pages/goodsPublish/goodsPublish',// 商品发布页面 ---------------------
+
'pages/supplyDemandPublish/supplyDemandPublish',// 供求发布页面 ---------------------
'pages/mySupplyDemand/mySupplyDemand',// 我的供求列表页面 ---------------------
'pages/myGoodsEdit/myGoodsEdit',// 我的商品编辑页面 ---------------------
diff --git a/src/component/goodsTypeInteractionComp/goodsTypeInteractionComp.js b/src/component/goodsTypeInteractionComp/goodsTypeInteractionComp.js
index eb452c0..83e7026 100644
--- a/src/component/goodsTypeInteractionComp/goodsTypeInteractionComp.js
+++ b/src/component/goodsTypeInteractionComp/goodsTypeInteractionComp.js
@@ -1,7 +1,6 @@
import Taro, { Component } from '@tarojs/taro'
-import { View, Text } from '@tarojs/components'
+import { View, Text,Picker} from '@tarojs/components'
-import { Picker } from 'taro-ui'
import './goodsTypeInteractionComp.scss'
import loginExpired from '../../util/loginExpired'
diff --git a/src/component/interactionComponent/interactionComponent.js b/src/component/interactionComponent/interactionComponent.js
index 11935cd..2b46f5e 100644
--- a/src/component/interactionComponent/interactionComponent.js
+++ b/src/component/interactionComponent/interactionComponent.js
@@ -1,8 +1,6 @@
import Taro, { Component } from '@tarojs/taro'
-import { View, Text } from '@tarojs/components'
-
-import { Picker } from 'taro-ui'
+import { View, Text,Picker } from '@tarojs/components'
import './interactionComponent.scss'
import loginExpired from '../../util/loginExpired';
diff --git a/src/component/shopItemComponent/shopItemComponent.js b/src/component/shopItemComponent/shopItemComponent.js
index aa394a2..2cb2f42 100644
--- a/src/component/shopItemComponent/shopItemComponent.js
+++ b/src/component/shopItemComponent/shopItemComponent.js
@@ -20,7 +20,7 @@ class ShopItem extends Component {
shopOnClickHanlder(){
let goodId=this.props.item.goods_id
Taro.navigateTo({
- url: '/pages/goods/goods?id='+goodId
+ url: '/pages/goods/goods?id='+encodeURIComponent(goodId)
})
}
componentDidMount(){
diff --git a/src/component/shopTypeInteractionComp/shopTypeInteractionComp.js b/src/component/shopTypeInteractionComp/shopTypeInteractionComp.js
index 245caa8..3dc7253 100644
--- a/src/component/shopTypeInteractionComp/shopTypeInteractionComp.js
+++ b/src/component/shopTypeInteractionComp/shopTypeInteractionComp.js
@@ -1,7 +1,6 @@
import Taro, { Component } from '@tarojs/taro'
-import { View, Text } from '@tarojs/components'
+import { View, Text,Picker } from '@tarojs/components'
-import { Picker } from 'taro-ui'
import './shopTypeInteractionComp.scss'
import loginExpired from '../../util/loginExpired';
@@ -52,9 +51,10 @@ class ShopTypeInteractionComp extends Component {
}
this.setState({
interactionMultiArray: this.interactionData(res.data.data),
- initailMultiArray: this.initializedData(res.data.data),
+ initailMultiArray: this.initializedData(res.data.data)[0],
}, () => {
+ console.log('state',this.state.initailMultiArray,this.state.interactionMultiArray)
// this.passDataToParent(this.state.initailMultiArray)
//返回初始选项在 在商品编辑页面
diff --git a/src/pages/allDemanding/allDemanding.js b/src/pages/allDemanding/allDemanding.js
index 2de1116..f3c4021 100644
--- a/src/pages/allDemanding/allDemanding.js
+++ b/src/pages/allDemanding/allDemanding.js
@@ -1,6 +1,6 @@
import Taro, { Component } from '@tarojs/taro'
-import { View, Text, Image, Button } from '@tarojs/components'
-import { AtInput, Picker, AtIcon, AtModal, AtModalHeader, AtModalContent, AtModalAction } from 'taro-ui'
+import { View, Text, Image, Button,Picker } from '@tarojs/components'
+import { AtInput, AtIcon, AtModal, AtModalHeader, AtModalContent, AtModalAction } from 'taro-ui'
import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
import ScrollToTopComponent from '../../component/scrollToTopComponent/scrollToTopComponent'
diff --git a/src/pages/goods/goods.js b/src/pages/goods/goods.js
index 3f36b1c..664068c 100644
--- a/src/pages/goods/goods.js
+++ b/src/pages/goods/goods.js
@@ -1,7 +1,7 @@
import Taro, { Component } from '@tarojs/taro'
-import { View, Text, Image, Swiper, SwiperItem } from '@tarojs/components'
+import { View, Text, Image, Swiper, SwiperItem,Picker } from '@tarojs/components'
-import { AtTabs, AtTabsPane, AtSegmentedControl, AtIcon, Picker } from 'taro-ui'
+import { AtIcon } from 'taro-ui'
import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
import LoginService from '../../util/LoginService'
@@ -41,15 +41,19 @@ class Goods extends Component {
// 商品详情api
getGoodDescription() {
+ console.log('goods',this.$router.params.id)
+ let goodId=decodeURIComponent(this.$router.params.id)
+
Taro.request({
url: URL.GetShopItemDetail,
method: 'POST',
dataType: 'json',
data: {
- goodsID: escape(this.$router.params.id).replace('+', '%2B'),
+ goodsID: goodId,
},
header: {
- 'content-type': 'application/x-www-form-urlencoded',
+
+ 'content-type': 'application/x-www-form-urlencoded',
'Cookie': 'PFWSSS=' + getGlobalStorage('session_id'),
}
})
diff --git a/src/pages/grabOrderPage/grabOrderPage.js b/src/pages/grabOrderPage/grabOrderPage.js
index 941e4fd..445ebcd 100644
--- a/src/pages/grabOrderPage/grabOrderPage.js
+++ b/src/pages/grabOrderPage/grabOrderPage.js
@@ -251,57 +251,57 @@ class GrabOrderPage extends Component {
let ButtonElement
- if (localStoageUserId === this.state.userId && this.state.stateId === '1') {
- ButtonElement =
-
-
-
-
-
-
- {/*
-
-
+ // if (localStoageUserId === this.state.userId && this.state.stateId === '1') {
+ // ButtonElement =
+ //
+ //
+ //
+ //
+ //
+ //
+ // {/*
+ //
+ //
-
-
- */}
-
- } else if (localStoageUserId === this.state.userId && this.state.stateId != '1') {
- ButtonElement =
-
-
-
-
-
-
-
- } else if (this.state.stateId === '1') {
- ButtonElement =
-
-
+ //
+ //
+ // */}
+ //
+ // } else if (localStoageUserId === this.state.userId && this.state.stateId != '1') {
+ // ButtonElement =
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ // } else if (this.state.stateId === '1') {
+ // ButtonElement =
+ //
+ //
- } else if (this.state.stateId === '2') {
- ButtonElement =
-
-
- } else if (this.state.stateId === '3') {
- ButtonElement =
-
-
- }
+ // } else if (this.state.stateId === '2') {
+ // ButtonElement =
+ //
+ //
+ // } else if (this.state.stateId === '3') {
+ // ButtonElement =
+ //
+ //
+ // }
diff --git a/src/pages/home/home.js b/src/pages/home/home.js
index 26b3dc5..87dcb44 100644
--- a/src/pages/home/home.js
+++ b/src/pages/home/home.js
@@ -331,9 +331,7 @@ class Home extends Component {
}
componentWillMount() {
- Taro.navigateTo({
- url: '/pages/goods/goods?id=4a0eQpU8YI68yN2ZTc5rchTiEzCAaaiK0UEeWzvDPE0bVw'
- })
+
}
componentWillUnmount() { }
diff --git a/src/pages/home/mainCateSlider/mainCateSlider.js b/src/pages/home/mainCateSlider/mainCateSlider.js
index a61459e..a6cd674 100644
--- a/src/pages/home/mainCateSlider/mainCateSlider.js
+++ b/src/pages/home/mainCateSlider/mainCateSlider.js
@@ -1,6 +1,6 @@
import Taro, { Component } from '@tarojs/taro'
-import { View } from '@tarojs/components'
-import { AtGrid, Swiper, SwiperItem } from 'taro-ui'
+import { View , Swiper, SwiperItem } from '@tarojs/components'
+import { AtGrid} from 'taro-ui'
import URL from '../../../serviceAPI.config'
import './mainCateSlider.scss'
diff --git a/src/pages/home/subCateSlider/subCateSlider.js b/src/pages/home/subCateSlider/subCateSlider.js
index f741fc7..051ce75 100644
--- a/src/pages/home/subCateSlider/subCateSlider.js
+++ b/src/pages/home/subCateSlider/subCateSlider.js
@@ -1,6 +1,6 @@
import Taro, { Component } from '@tarojs/taro'
-import { View } from '@tarojs/components'
-import { AtGrid, Swiper, SwiperItem } from 'taro-ui'
+import { View , Swiper, SwiperItem} from '@tarojs/components'
+import { AtGrid } from 'taro-ui'
import URL from '../../../serviceAPI.config'
import './subCateSlider.scss'
diff --git a/src/pages/myDemandSupplyEdit/myDemandSupplyEdit.js b/src/pages/myDemandSupplyEdit/myDemandSupplyEdit.js
index 918cadf..c291661 100644
--- a/src/pages/myDemandSupplyEdit/myDemandSupplyEdit.js
+++ b/src/pages/myDemandSupplyEdit/myDemandSupplyEdit.js
@@ -1,7 +1,7 @@
import Taro, { Component } from '@tarojs/taro'
-import { View, Text, Button, Input } from '@tarojs/components'
-import { AtInput, AtImagePicker, AtTextarea, Picker, AtModal, AtModalHeader, AtModalContent, AtModalAction } from 'taro-ui'
+import { View, Text, Button, Input,Picker } from '@tarojs/components'
+import { AtInput, AtImagePicker, AtTextarea, AtModal, AtModalHeader, AtModalContent, AtModalAction } from 'taro-ui'
import PictureUploadComponent from '../../component/pictureUploadComponent/pictureUploadComponent'
import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
import URL from '../../serviceAPI.config'
diff --git a/src/pages/myGoodList/myGoodList.js b/src/pages/myGoodList/myGoodList.js
index efa6865..c6d053e 100644
--- a/src/pages/myGoodList/myGoodList.js
+++ b/src/pages/myGoodList/myGoodList.js
@@ -1,6 +1,6 @@
import Taro, { Component } from '@tarojs/taro'
-import { View, Button, MovableArea, MovableView, CheckboxGroup, Checkbox } from '@tarojs/components'
-import { AtInput, Text, AtIcon, Picker, Image, AtModal, AtModalHeader, AtModalContent, AtModalAction } from 'taro-ui'
+import { View, Button, MovableArea, MovableView, CheckboxGroup, Checkbox ,Picker, Image , Text} from '@tarojs/components'
+import { AtInput, AtIcon, AtModal, AtModalHeader, AtModalContent, AtModalAction } from 'taro-ui'
import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
import ScrollToTopComponent from '../../component/scrollToTopComponent/scrollToTopComponent'
@@ -143,13 +143,15 @@ class MyGoodList extends Component {
'X-Requested-With': 'XMLHttpRequest'
}
}).then(res => {
- const data = JSON.parse(res.data)
+ Taro.hideLoading()
+
+ const data = res.data
if (data.err_code === 88888) {
loginExpired(data)
} else if (data.err_code != 10) {
- console.log('我的商品列表', JSON.parse(res.data))
+ console.log(res.data)
- Taro.hideLoading()
+
if (data.goodsCount != '0' && data.goods.length) {
data.goods.forEach(item => {
item.checked = false
@@ -555,6 +557,7 @@ class MyGoodList extends Component {
}
goToGoodspage(e) {
const goodId = onClickValueService(e)
+
Taro.navigateTo({
url: '/pages/goods/goods?id=' + goodId
})
diff --git a/src/pages/myGoodsEdit/myGoodsEdit.js b/src/pages/myGoodsEdit/myGoodsEdit.js
index bf25a98..76cd3aa 100644
--- a/src/pages/myGoodsEdit/myGoodsEdit.js
+++ b/src/pages/myGoodsEdit/myGoodsEdit.js
@@ -1,6 +1,6 @@
import Taro, { Component } from '@tarojs/taro'
-import { View, Text } from '@tarojs/components'
-import { AtInput, AtImagePicker, AtTextarea, Button, } from 'taro-ui'
+import { View, Text , Button} from '@tarojs/components'
+import { AtInput, AtImagePicker, AtTextarea, } from 'taro-ui'
import ShopTypeInteractionComp from '../../component/shopTypeInteractionComp/shopTypeInteractionComp'
import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
diff --git a/src/pages/myNeeds/myNeeds.js b/src/pages/myNeeds/myNeeds.js
index 72dd020..dec29ef 100644
--- a/src/pages/myNeeds/myNeeds.js
+++ b/src/pages/myNeeds/myNeeds.js
@@ -1,7 +1,7 @@
//myNeeds
import Taro, { Component } from '@tarojs/taro'
-import { View, Text, Button } from '@tarojs/components'
-import { AtInput, Picker, AtIcon, AtModal, AtModalHeader, AtModalContent, AtModalAction } from 'taro-ui'
+import { View, Text, Button, Picker, Input } from '@tarojs/components'
+import { AtInput, AtIcon, AtModal, AtModalHeader, AtModalContent, AtModalAction } from 'taro-ui'
import URL from '../../serviceAPI.config'
import ScrollToTopComponent from '../../component/scrollToTopComponent/scrollToTopComponent'
import InteractionComponent from '../../component/interactionComponent/interactionComponent'
@@ -187,7 +187,7 @@ class MyNeeds extends Component {
// 搜索按钮
onSearchButtonHandler() {
- showLoading({ title: '加载中' }).then(() => {
+ showLoading({ title: '加载中' }).then(() => {
this.setState({ currentPage: 1, loadMorePageIndex: 1 }, () => {
this.getMyNeedsList({
curr_page: this.state.currentPage,
@@ -285,15 +285,15 @@ class MyNeeds extends Component {
componentDidMount() {
- isUserLogin().then(res=>{
+ isUserLogin().then(res => {
return res
- }).then(res=>{
- showLoading({
- title: '加载中'
+ }).then(res => {
+ showLoading({
+ title: '加载中'
+ })
+ this.getMyNeedsList({})
})
- this.getMyNeedsList({})
- })
-
+
}
componentWillReceiveProps(nextProps) {
@@ -318,7 +318,7 @@ class MyNeeds extends Component {
}
// 底部加载
onReachBottom() {
- showLoading({
+ showLoading({
title: '加载中'
})
this.setState({ isAddToList: true, loadMorePageIndex: this.state.loadMorePageIndex + 1 }, () => {
@@ -386,6 +386,7 @@ class MyNeeds extends Component {
title='需求标题:'
placeholder='需求标题·'
type='text'
+ border={false}
value={this.state.title}
onChange={this.titleChange.bind(this)}
/>
diff --git a/src/pages/myNeedsEdit/myNeedsEdit.js b/src/pages/myNeedsEdit/myNeedsEdit.js
index bea1c36..da0aa1c 100644
--- a/src/pages/myNeedsEdit/myNeedsEdit.js
+++ b/src/pages/myNeedsEdit/myNeedsEdit.js
@@ -1,7 +1,7 @@
import Taro, { Component } from '@tarojs/taro'
-import { View, Text, Button, Input } from '@tarojs/components'
-import { AtInput, AtTextarea, Picker, AtModal, AtModalHeader, AtModalContent, AtModalAction } from 'taro-ui'
+import { View, Text, Button, Input,Picker } from '@tarojs/components'
+import { AtInput, AtTextarea, AtModal, AtModalHeader, AtModalContent, AtModalAction } from 'taro-ui'
import InteractionComponent from '../../component/interactionComponent/interactionComponent'
import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
diff --git a/src/pages/myNeedsPublish/myNeedsPublish.js b/src/pages/myNeedsPublish/myNeedsPublish.js
index c3ac7ad..beb388b 100644
--- a/src/pages/myNeedsPublish/myNeedsPublish.js
+++ b/src/pages/myNeedsPublish/myNeedsPublish.js
@@ -1,7 +1,7 @@
import Taro, { Component } from '@tarojs/taro'
-import { View, Text, Button, Input, } from '@tarojs/components'
-import { AtInput, AtTextarea, Picker } from 'taro-ui'
+import { View, Text, Button, Input, Picker } from '@tarojs/components'
+import { AtInput, AtTextarea} from 'taro-ui'
import PictureUploadComponent from '../../component/pictureUploadComponent/pictureUploadComponent'
diff --git a/src/pages/mySupplyDemand/mySupplyDemand.js b/src/pages/mySupplyDemand/mySupplyDemand.js
index 29d32ed..46c4811 100644
--- a/src/pages/mySupplyDemand/mySupplyDemand.js
+++ b/src/pages/mySupplyDemand/mySupplyDemand.js
@@ -1,6 +1,6 @@
import Taro, { Component } from '@tarojs/taro'
-import { View, Text, Button, MovableArea, MovableView } from '@tarojs/components'
-import { AtInput, Picker, AtIcon, AtModal, AtModalHeader, AtModalContent, AtModalAction } from 'taro-ui'
+import { View, Text, Button, MovableArea, MovableView ,Picker } from '@tarojs/components'
+import { AtInput, AtIcon, AtModal, AtModalHeader, AtModalContent, AtModalAction } from 'taro-ui'
import URL from '../../serviceAPI.config'
import ScrollToTopComponent from '../../component/scrollToTopComponent/scrollToTopComponent'
diff --git a/src/pages/supplyDemandPublish/supplyDemandPublish.js b/src/pages/supplyDemandPublish/supplyDemandPublish.js
index a5ab5e0..ef7a2d8 100644
--- a/src/pages/supplyDemandPublish/supplyDemandPublish.js
+++ b/src/pages/supplyDemandPublish/supplyDemandPublish.js
@@ -1,7 +1,7 @@
import Taro, { Component } from '@tarojs/taro'
-import { View, Text, Button, Input } from '@tarojs/components'
-import { AtInput, AtImagePicker, AtTextarea, Picker } from 'taro-ui'
+import { View, Text, Button, Input , Picker} from '@tarojs/components'
+import { AtInput, AtImagePicker, AtTextarea } from 'taro-ui'
import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
diff --git a/src/util/onClickValueService.js b/src/util/onClickValueService.js
index 1284623..838cd44 100644
--- a/src/util/onClickValueService.js
+++ b/src/util/onClickValueService.js
@@ -1,13 +1,13 @@
-export default function onClickValueService(e) {
- let value
+export default function onClickValueService(value) {
+
if (process.env.TARO_ENV === 'alipay') {
- value = e.currentTarget.dataset.eOnTapAA
+ return value
} else if (process.env.TARO_ENV === 'weapp') {
- value = e.currentTarget.dataset.eTapAA
+ return value
}
- value=typeof(value)==='string'?encodeURIComponent(value):value
- return value
+
+
}
\ No newline at end of file