diff --git a/src/component/filteredShopComponent/filteredShopComponent.js b/src/component/filteredShopComponent/filteredShopComponent.js index 9273020..aa5995a 100644 --- a/src/component/filteredShopComponent/filteredShopComponent.js +++ b/src/component/filteredShopComponent/filteredShopComponent.js @@ -43,7 +43,6 @@ class recommondShop extends Component { } } goToShop(e) { - const value = onClickValueService(e) Taro.navigateTo({ url: '/pages/shop/shop?id=' + value.shop_id diff --git a/src/pages/allDemanding/allDemanding.js b/src/pages/allDemanding/allDemanding.js index f3c4021..95a15bd 100644 --- a/src/pages/allDemanding/allDemanding.js +++ b/src/pages/allDemanding/allDemanding.js @@ -208,8 +208,9 @@ class AllDemanding extends Component { goToGrabOrderPage(e) { const id = onClickValueService(e) + let orderId=encodeURIComponent(id) Taro.navigateTo({ - url: '/pages/grabOrderPage/grabOrderPage?orderId=' + id + url: '/pages/grabOrderPage/grabOrderPage?orderId=' + orderId }) } diff --git a/src/pages/goods/goods.js b/src/pages/goods/goods.js index 664068c..be90ee7 100644 --- a/src/pages/goods/goods.js +++ b/src/pages/goods/goods.js @@ -41,7 +41,7 @@ class Goods extends Component { // 商品详情api getGoodDescription() { - console.log('goods',this.$router.params.id) + let goodId=decodeURIComponent(this.$router.params.id) Taro.request({ diff --git a/src/pages/goodsPublish/goodsPublish.js b/src/pages/goodsPublish/goodsPublish.js index e7d5b4f..7f1958d 100644 --- a/src/pages/goodsPublish/goodsPublish.js +++ b/src/pages/goodsPublish/goodsPublish.js @@ -299,7 +299,6 @@ class GoodsPublish extends Component { } componentDidMount() { } - componentWillReceiveProps(nextProps) { // console.log(this.props, nextProps) } diff --git a/src/pages/grabOrderPage/grabOrderPage.js b/src/pages/grabOrderPage/grabOrderPage.js index 6ff0564..f592565 100644 --- a/src/pages/grabOrderPage/grabOrderPage.js +++ b/src/pages/grabOrderPage/grabOrderPage.js @@ -30,7 +30,6 @@ class GrabOrderPage extends Component { content: '', images: [], isOpen: false, // 抢单消息提示 - grabOrderId: this.$router.params.orderId, stateId: '', stateName: '', userId: '', @@ -41,12 +40,13 @@ class GrabOrderPage extends Component { //获取抢单信息api supplyDemandDetails getGrabOrderInfo() { + let orderId=decodeURIComponent(this.$router.params.orderId) Taro.request({ url: URL.supplyDemandDetails, method: 'GET', dataType: 'json', data: { - demandId: this.$router.params.orderId, + demandId: orderId, }, header: { 'content-type': 'application/x-www-form-urlencoded', @@ -89,12 +89,13 @@ class GrabOrderPage extends Component { } //抢单请求 GrabDemand({ demandId = 218 }) { + let id=encodeURIComponent(demandId) Taro.request({ url: URL.GrabDemand, method: 'POST', dataType: 'json', data: { - demandId: demandId + demandId: id }, header: { 'content-type': 'application/x-www-form-urlencoded', @@ -157,7 +158,8 @@ class GrabOrderPage extends Component { showLoading({ title: '加载中' }) - this.GrabDemand({ demandId: this.state.grabOrderId }) + + this.GrabDemand({ demandId: this.$router.params.orderId }) } componentDidMount() { @@ -186,7 +188,7 @@ class GrabOrderPage extends Component { }) } goMyNeedEditPage() { - let id = this.$router.params.orderId + let id = encodeURIComponent(this.$router.params.orderId) Taro.navigateTo({ url: '/pages/myNeedsEdit/myNeedsEdit?id=' + id }) @@ -198,16 +200,18 @@ class GrabOrderPage extends Component { this.setState({ isDeleteModal: false }) } handleWindowConfirm() { + this.setState({ isDeleteModal: false }) this.deleteMyNeeds({ demandId: this.$router.params.orderId }) } deleteMyNeeds({ demandId }) { + let id=encodeURIComponent(demandId) Taro.request({ url: URL.DeleteMyNeeds, method: 'POST', dataType: 'json', data: { - demandId: demandId + demandId: id }, header: { 'Cookie': 'PFWSSS=' + getGlobalStorage('session_id'), diff --git a/src/pages/home/clientDemanding/clientDemanding.js b/src/pages/home/clientDemanding/clientDemanding.js index 3c0054a..2b91f87 100644 --- a/src/pages/home/clientDemanding/clientDemanding.js +++ b/src/pages/home/clientDemanding/clientDemanding.js @@ -12,7 +12,8 @@ class ClientDemanding extends Component { } // 导航去抢单页面 goToGrabOrderPage(e) { - const orderId = onClickValueService(e) + const id = onClickValueService(e) + let orderId=encodeURIComponent(id) Taro.navigateTo({ url: '/pages/grabOrderPage/grabOrderPage?orderId=' + orderId }) diff --git a/src/pages/myDemandSupplyEdit/myDemandSupplyEdit.js b/src/pages/myDemandSupplyEdit/myDemandSupplyEdit.js index c291661..3960dfc 100644 --- a/src/pages/myDemandSupplyEdit/myDemandSupplyEdit.js +++ b/src/pages/myDemandSupplyEdit/myDemandSupplyEdit.js @@ -45,12 +45,13 @@ class MyDemandSupplyEdit extends Component { } //获取商品信息api GetProductInfo getSupplyDemandInfo() { + let sdId=decodeURIComponent(this.$router.params.sdId) Taro.request({ url: URL.GetSupplyDemandInfo, method: 'GET', dataType: 'json', data: { - sdID: this.$router.params.sdId, + sdID:sdId , }, header: { 'content-type': 'application/x-www-form-urlencoded', @@ -102,7 +103,7 @@ class MyDemandSupplyEdit extends Component { user_address = this.state.contactAddress, sd_desc = this.state.content, state = this.state.demandingSupplyStateSelected.id }) { - + let sd_id=decodeURIComponent(this.$router.params.sdId) const file_path = []; this.state.ImagesInfo.forEach((item) => { file_path.push({ @@ -119,7 +120,7 @@ class MyDemandSupplyEdit extends Component { data: { action: 2, sdInfo: JSON.stringify({ - sd_id: this.$router.params.sdId, + sd_id:sd_id , sd_type: sd_type, sd_title: sd_title, user_name: user_name, diff --git a/src/pages/myGoodList/myGoodList.js b/src/pages/myGoodList/myGoodList.js index c6d053e..3dab597 100644 --- a/src/pages/myGoodList/myGoodList.js +++ b/src/pages/myGoodList/myGoodList.js @@ -340,10 +340,6 @@ class MyGoodList extends Component { }) } - - - - // 搜索 searchButtonHandler() { Taro.showLoading({ @@ -541,11 +537,11 @@ class MyGoodList extends Component { } // 导航到商品编辑页面myGoodsEdit goToGoodEditPage(e) { - console.log('e', e) + const goodId = onClickValueService(e) - console.log('goodId', goodId) + const id=encodeURIComponent(goodId) Taro.navigateTo({ - url: '/pages/myGoodsEdit/myGoodsEdit?id=' + goodId + url: '/pages/myGoodsEdit/myGoodsEdit?id=' + id }) } // 导航到商品发布页面 @@ -557,9 +553,9 @@ class MyGoodList extends Component { } goToGoodspage(e) { const goodId = onClickValueService(e) - + const id=encodeURIComponent(goodId) Taro.navigateTo({ - url: '/pages/goods/goods?id=' + goodId + url: '/pages/goods/goods?id=' + id }) } diff --git a/src/pages/myGoodsEdit/myGoodsEdit.js b/src/pages/myGoodsEdit/myGoodsEdit.js index 10d92c1..69a5c1d 100644 --- a/src/pages/myGoodsEdit/myGoodsEdit.js +++ b/src/pages/myGoodsEdit/myGoodsEdit.js @@ -38,12 +38,13 @@ class MyGoodsEdit extends Component { //获取商品信息api GetProductInfo getGoodsInfo() { + let goodsID=decodeURIComponent(this.$router.params.id) Taro.request({ url: URL.GetProductInfo, method: 'GET', dataType: 'json', data: { - goodsID: this.$router.params.id, + goodsID:goodsID , }, header: { 'content-type': 'application/x-www-form-urlencoded', @@ -363,8 +364,9 @@ class MyGoodsEdit extends Component { } goToGoodsDetailPage() { + let goodsID=encodeURIComponent(this.$router.params.id) Taro.navigateTo({ - url: '/pages/goods/goods?id=' + this.$router.params.id + url: '/pages/goods/goods?id=' +goodsID }) } goToMyGoodListPage() { diff --git a/src/pages/myNeedsEdit/myNeedsEdit.js b/src/pages/myNeedsEdit/myNeedsEdit.js index da0aa1c..3cbfd6c 100644 --- a/src/pages/myNeedsEdit/myNeedsEdit.js +++ b/src/pages/myNeedsEdit/myNeedsEdit.js @@ -47,12 +47,13 @@ class MyNeedsEdit extends Component { } //获取需求信息api getMyNeedEditInfo() { + let id=decodeURIComponent(this.$router.params.id) Taro.request({ url: URL.EditMyNeeds, method: 'GET', dataType: 'json', data: { - demandId: this.$router.params.id, + demandId: id, }, header: { 'content-type': 'application/x-www-form-urlencoded', diff --git a/src/pages/myNeedsPublish/myNeedsPublish.js b/src/pages/myNeedsPublish/myNeedsPublish.js index beb388b..c5e2376 100644 --- a/src/pages/myNeedsPublish/myNeedsPublish.js +++ b/src/pages/myNeedsPublish/myNeedsPublish.js @@ -274,7 +274,7 @@ class MyNeedsPublish extends Component { // Taro.showLoading({title:'加载中'}) // this.getSupplyDemandInfo() // 如果路由参数为1 就默认显示 效果图,反之 显示业主需求 - const isRenderingPic = this.$router.params.id + const isRenderingPic = decodeURIComponent(this.$router.params.id) if (parseInt(isRenderingPic)) { this.setState({ needsTypeSelected: { name: '效果图', id: '5' } }) } diff --git a/src/pages/myNeedsView/myNeedsView.js b/src/pages/myNeedsView/myNeedsView.js index 0a90794..0a7ff31 100644 --- a/src/pages/myNeedsView/myNeedsView.js +++ b/src/pages/myNeedsView/myNeedsView.js @@ -43,13 +43,14 @@ class SupplyDemandView extends Component { } //获取需求信息api getSingleMyNeedInfo() { + let id=decodeURIComponent(this.$router.params.id) Taro.request({ // url: URL.EditMyNeeds, url: URL.supplyDemandDetails, method: 'GET', dataType: 'json', data: { - demandId: this.$router.params.id, + demandId:id , }, header: { 'content-type': 'application/x-www-form-urlencoded', diff --git a/src/pages/mySupplyDemand/mySupplyDemand.js b/src/pages/mySupplyDemand/mySupplyDemand.js index 46c4811..18b90d9 100644 --- a/src/pages/mySupplyDemand/mySupplyDemand.js +++ b/src/pages/mySupplyDemand/mySupplyDemand.js @@ -247,7 +247,8 @@ class MySupplyDemand extends Component { // 跳转到我的供求编辑页面 goToMyDSEditPage(e) { - const sdId = onClickValueService(e) + let id = onClickValueService(e) + let sdId=encodeURIComponent(id) Taro.navigateTo({ url: '/pages/myDemandSupplyEdit/myDemandSupplyEdit?sdId=' + sdId }) @@ -255,7 +256,8 @@ class MySupplyDemand extends Component { } // 转到供求查看页面 goSupplyDemandView(e) { - const sdId = onClickValueService(e) + let id = onClickValueService(e) + let sdId=encodeURIComponent(id) Taro.navigateTo({ url: '/pages/supplyDemandView/supplyDemandView?sdId=' + sdId }) diff --git a/src/pages/shop/shop.js b/src/pages/shop/shop.js index 7b8e499..3f56760 100644 --- a/src/pages/shop/shop.js +++ b/src/pages/shop/shop.js @@ -63,7 +63,7 @@ class Shop extends Component { curr_page: 1, page_count: 10, shop_name: false, - shop_id: this.$router.params.id, + shop_id: decodeURIComponent(this.$router.params.id), config_id: 4, shop_class_id: '', order: '', diff --git a/src/pages/supplyDemandView/supplyDemandView.js b/src/pages/supplyDemandView/supplyDemandView.js index bae8d97..f63af88 100644 --- a/src/pages/supplyDemandView/supplyDemandView.js +++ b/src/pages/supplyDemandView/supplyDemandView.js @@ -36,12 +36,14 @@ class SupplyDemandView extends Component { } //获取商品信息api GetProductInfo getSupplyDemandInfo() { + + let sdId=decodeURIComponent(this.$router.params.sdId) Taro.request({ url: URL.GetSupplyDemandInfo, method: 'GET', dataType: 'json', data: { - sdID: this.$router.params.sdId, + sdID: sdId, }, header: { 'content-type': 'application/x-www-form-urlencoded', @@ -130,8 +132,9 @@ class SupplyDemandView extends Component { } // 跳转到我的供求编辑页面 goToMyDSEditPage() { + let sdId=encodeURIComponent(this.state.itemId) Taro.redirectTo({ - url: '/pages/myDemandSupplyEdit/myDemandSupplyEdit?sdId=' + this.state.itemId + url: '/pages/myDemandSupplyEdit/myDemandSupplyEdit?sdId=' + sdId }) }