alipay encodeUIR and decodeURI
This commit is contained in:
parent
b7e393a651
commit
d42da99c54
@ -43,7 +43,6 @@ class recommondShop extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
goToShop(e) {
|
goToShop(e) {
|
||||||
|
|
||||||
const value = onClickValueService(e)
|
const value = onClickValueService(e)
|
||||||
Taro.navigateTo({
|
Taro.navigateTo({
|
||||||
url: '/pages/shop/shop?id=' + value.shop_id
|
url: '/pages/shop/shop?id=' + value.shop_id
|
||||||
|
@ -208,8 +208,9 @@ class AllDemanding extends Component {
|
|||||||
|
|
||||||
goToGrabOrderPage(e) {
|
goToGrabOrderPage(e) {
|
||||||
const id = onClickValueService(e)
|
const id = onClickValueService(e)
|
||||||
|
let orderId=encodeURIComponent(id)
|
||||||
Taro.navigateTo({
|
Taro.navigateTo({
|
||||||
url: '/pages/grabOrderPage/grabOrderPage?orderId=' + id
|
url: '/pages/grabOrderPage/grabOrderPage?orderId=' + orderId
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ class Goods extends Component {
|
|||||||
|
|
||||||
// 商品详情api
|
// 商品详情api
|
||||||
getGoodDescription() {
|
getGoodDescription() {
|
||||||
console.log('goods',this.$router.params.id)
|
|
||||||
let goodId=decodeURIComponent(this.$router.params.id)
|
let goodId=decodeURIComponent(this.$router.params.id)
|
||||||
|
|
||||||
Taro.request({
|
Taro.request({
|
||||||
|
@ -299,7 +299,6 @@ class GoodsPublish extends Component {
|
|||||||
}
|
}
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
componentWillReceiveProps(nextProps) {
|
||||||
// console.log(this.props, nextProps)
|
// console.log(this.props, nextProps)
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,6 @@ class GrabOrderPage extends Component {
|
|||||||
content: '',
|
content: '',
|
||||||
images: [],
|
images: [],
|
||||||
isOpen: false, // 抢单消息提示
|
isOpen: false, // 抢单消息提示
|
||||||
grabOrderId: this.$router.params.orderId,
|
|
||||||
stateId: '',
|
stateId: '',
|
||||||
stateName: '',
|
stateName: '',
|
||||||
userId: '',
|
userId: '',
|
||||||
@ -41,12 +40,13 @@ class GrabOrderPage extends Component {
|
|||||||
|
|
||||||
//获取抢单信息api supplyDemandDetails
|
//获取抢单信息api supplyDemandDetails
|
||||||
getGrabOrderInfo() {
|
getGrabOrderInfo() {
|
||||||
|
let orderId=decodeURIComponent(this.$router.params.orderId)
|
||||||
Taro.request({
|
Taro.request({
|
||||||
url: URL.supplyDemandDetails,
|
url: URL.supplyDemandDetails,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: {
|
data: {
|
||||||
demandId: this.$router.params.orderId,
|
demandId: orderId,
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
'content-type': 'application/x-www-form-urlencoded',
|
'content-type': 'application/x-www-form-urlencoded',
|
||||||
@ -89,12 +89,13 @@ class GrabOrderPage extends Component {
|
|||||||
}
|
}
|
||||||
//抢单请求
|
//抢单请求
|
||||||
GrabDemand({ demandId = 218 }) {
|
GrabDemand({ demandId = 218 }) {
|
||||||
|
let id=encodeURIComponent(demandId)
|
||||||
Taro.request({
|
Taro.request({
|
||||||
url: URL.GrabDemand,
|
url: URL.GrabDemand,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: {
|
data: {
|
||||||
demandId: demandId
|
demandId: id
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
'content-type': 'application/x-www-form-urlencoded',
|
'content-type': 'application/x-www-form-urlencoded',
|
||||||
@ -157,7 +158,8 @@ class GrabOrderPage extends Component {
|
|||||||
showLoading({
|
showLoading({
|
||||||
title: '加载中'
|
title: '加载中'
|
||||||
})
|
})
|
||||||
this.GrabDemand({ demandId: this.state.grabOrderId })
|
|
||||||
|
this.GrabDemand({ demandId: this.$router.params.orderId })
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
@ -186,7 +188,7 @@ class GrabOrderPage extends Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
goMyNeedEditPage() {
|
goMyNeedEditPage() {
|
||||||
let id = this.$router.params.orderId
|
let id = encodeURIComponent(this.$router.params.orderId)
|
||||||
Taro.navigateTo({
|
Taro.navigateTo({
|
||||||
url: '/pages/myNeedsEdit/myNeedsEdit?id=' + id
|
url: '/pages/myNeedsEdit/myNeedsEdit?id=' + id
|
||||||
})
|
})
|
||||||
@ -198,16 +200,18 @@ class GrabOrderPage extends Component {
|
|||||||
this.setState({ isDeleteModal: false })
|
this.setState({ isDeleteModal: false })
|
||||||
}
|
}
|
||||||
handleWindowConfirm() {
|
handleWindowConfirm() {
|
||||||
|
|
||||||
this.setState({ isDeleteModal: false })
|
this.setState({ isDeleteModal: false })
|
||||||
this.deleteMyNeeds({ demandId: this.$router.params.orderId })
|
this.deleteMyNeeds({ demandId: this.$router.params.orderId })
|
||||||
}
|
}
|
||||||
deleteMyNeeds({ demandId }) {
|
deleteMyNeeds({ demandId }) {
|
||||||
|
let id=encodeURIComponent(demandId)
|
||||||
Taro.request({
|
Taro.request({
|
||||||
url: URL.DeleteMyNeeds,
|
url: URL.DeleteMyNeeds,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: {
|
data: {
|
||||||
demandId: demandId
|
demandId: id
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
'Cookie': 'PFWSSS=' + getGlobalStorage('session_id'),
|
'Cookie': 'PFWSSS=' + getGlobalStorage('session_id'),
|
||||||
|
@ -12,7 +12,8 @@ class ClientDemanding extends Component {
|
|||||||
}
|
}
|
||||||
// 导航去抢单页面
|
// 导航去抢单页面
|
||||||
goToGrabOrderPage(e) {
|
goToGrabOrderPage(e) {
|
||||||
const orderId = onClickValueService(e)
|
const id = onClickValueService(e)
|
||||||
|
let orderId=encodeURIComponent(id)
|
||||||
Taro.navigateTo({
|
Taro.navigateTo({
|
||||||
url: '/pages/grabOrderPage/grabOrderPage?orderId=' + orderId
|
url: '/pages/grabOrderPage/grabOrderPage?orderId=' + orderId
|
||||||
})
|
})
|
||||||
|
@ -45,12 +45,13 @@ class MyDemandSupplyEdit extends Component {
|
|||||||
}
|
}
|
||||||
//获取商品信息api GetProductInfo
|
//获取商品信息api GetProductInfo
|
||||||
getSupplyDemandInfo() {
|
getSupplyDemandInfo() {
|
||||||
|
let sdId=decodeURIComponent(this.$router.params.sdId)
|
||||||
Taro.request({
|
Taro.request({
|
||||||
url: URL.GetSupplyDemandInfo,
|
url: URL.GetSupplyDemandInfo,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: {
|
data: {
|
||||||
sdID: this.$router.params.sdId,
|
sdID:sdId ,
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
'content-type': 'application/x-www-form-urlencoded',
|
'content-type': 'application/x-www-form-urlencoded',
|
||||||
@ -102,7 +103,7 @@ class MyDemandSupplyEdit extends Component {
|
|||||||
user_address = this.state.contactAddress,
|
user_address = this.state.contactAddress,
|
||||||
sd_desc = this.state.content,
|
sd_desc = this.state.content,
|
||||||
state = this.state.demandingSupplyStateSelected.id }) {
|
state = this.state.demandingSupplyStateSelected.id }) {
|
||||||
|
let sd_id=decodeURIComponent(this.$router.params.sdId)
|
||||||
const file_path = [];
|
const file_path = [];
|
||||||
this.state.ImagesInfo.forEach((item) => {
|
this.state.ImagesInfo.forEach((item) => {
|
||||||
file_path.push({
|
file_path.push({
|
||||||
@ -119,7 +120,7 @@ class MyDemandSupplyEdit extends Component {
|
|||||||
data: {
|
data: {
|
||||||
action: 2,
|
action: 2,
|
||||||
sdInfo: JSON.stringify({
|
sdInfo: JSON.stringify({
|
||||||
sd_id: this.$router.params.sdId,
|
sd_id:sd_id ,
|
||||||
sd_type: sd_type,
|
sd_type: sd_type,
|
||||||
sd_title: sd_title,
|
sd_title: sd_title,
|
||||||
user_name: user_name,
|
user_name: user_name,
|
||||||
|
@ -340,10 +340,6 @@ class MyGoodList extends Component {
|
|||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 搜索
|
// 搜索
|
||||||
searchButtonHandler() {
|
searchButtonHandler() {
|
||||||
Taro.showLoading({
|
Taro.showLoading({
|
||||||
@ -541,11 +537,11 @@ class MyGoodList extends Component {
|
|||||||
}
|
}
|
||||||
// 导航到商品编辑页面myGoodsEdit
|
// 导航到商品编辑页面myGoodsEdit
|
||||||
goToGoodEditPage(e) {
|
goToGoodEditPage(e) {
|
||||||
console.log('e', e)
|
|
||||||
const goodId = onClickValueService(e)
|
const goodId = onClickValueService(e)
|
||||||
console.log('goodId', goodId)
|
const id=encodeURIComponent(goodId)
|
||||||
Taro.navigateTo({
|
Taro.navigateTo({
|
||||||
url: '/pages/myGoodsEdit/myGoodsEdit?id=' + goodId
|
url: '/pages/myGoodsEdit/myGoodsEdit?id=' + id
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 导航到商品发布页面
|
// 导航到商品发布页面
|
||||||
@ -557,9 +553,9 @@ class MyGoodList extends Component {
|
|||||||
}
|
}
|
||||||
goToGoodspage(e) {
|
goToGoodspage(e) {
|
||||||
const goodId = onClickValueService(e)
|
const goodId = onClickValueService(e)
|
||||||
|
const id=encodeURIComponent(goodId)
|
||||||
Taro.navigateTo({
|
Taro.navigateTo({
|
||||||
url: '/pages/goods/goods?id=' + goodId
|
url: '/pages/goods/goods?id=' + id
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,12 +38,13 @@ class MyGoodsEdit extends Component {
|
|||||||
|
|
||||||
//获取商品信息api GetProductInfo
|
//获取商品信息api GetProductInfo
|
||||||
getGoodsInfo() {
|
getGoodsInfo() {
|
||||||
|
let goodsID=decodeURIComponent(this.$router.params.id)
|
||||||
Taro.request({
|
Taro.request({
|
||||||
url: URL.GetProductInfo,
|
url: URL.GetProductInfo,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: {
|
data: {
|
||||||
goodsID: this.$router.params.id,
|
goodsID:goodsID ,
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
'content-type': 'application/x-www-form-urlencoded',
|
'content-type': 'application/x-www-form-urlencoded',
|
||||||
@ -363,8 +364,9 @@ class MyGoodsEdit extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
goToGoodsDetailPage() {
|
goToGoodsDetailPage() {
|
||||||
|
let goodsID=encodeURIComponent(this.$router.params.id)
|
||||||
Taro.navigateTo({
|
Taro.navigateTo({
|
||||||
url: '/pages/goods/goods?id=' + this.$router.params.id
|
url: '/pages/goods/goods?id=' +goodsID
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
goToMyGoodListPage() {
|
goToMyGoodListPage() {
|
||||||
|
@ -47,12 +47,13 @@ class MyNeedsEdit extends Component {
|
|||||||
}
|
}
|
||||||
//获取需求信息api
|
//获取需求信息api
|
||||||
getMyNeedEditInfo() {
|
getMyNeedEditInfo() {
|
||||||
|
let id=decodeURIComponent(this.$router.params.id)
|
||||||
Taro.request({
|
Taro.request({
|
||||||
url: URL.EditMyNeeds,
|
url: URL.EditMyNeeds,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: {
|
data: {
|
||||||
demandId: this.$router.params.id,
|
demandId: id,
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
'content-type': 'application/x-www-form-urlencoded',
|
'content-type': 'application/x-www-form-urlencoded',
|
||||||
|
@ -274,7 +274,7 @@ class MyNeedsPublish extends Component {
|
|||||||
// Taro.showLoading({title:'加载中'})
|
// Taro.showLoading({title:'加载中'})
|
||||||
// this.getSupplyDemandInfo()
|
// this.getSupplyDemandInfo()
|
||||||
// 如果路由参数为1 就默认显示 效果图,反之 显示业主需求
|
// 如果路由参数为1 就默认显示 效果图,反之 显示业主需求
|
||||||
const isRenderingPic = this.$router.params.id
|
const isRenderingPic = decodeURIComponent(this.$router.params.id)
|
||||||
if (parseInt(isRenderingPic)) {
|
if (parseInt(isRenderingPic)) {
|
||||||
this.setState({ needsTypeSelected: { name: '效果图', id: '5' } })
|
this.setState({ needsTypeSelected: { name: '效果图', id: '5' } })
|
||||||
}
|
}
|
||||||
|
@ -43,13 +43,14 @@ class SupplyDemandView extends Component {
|
|||||||
}
|
}
|
||||||
//获取需求信息api
|
//获取需求信息api
|
||||||
getSingleMyNeedInfo() {
|
getSingleMyNeedInfo() {
|
||||||
|
let id=decodeURIComponent(this.$router.params.id)
|
||||||
Taro.request({
|
Taro.request({
|
||||||
// url: URL.EditMyNeeds,
|
// url: URL.EditMyNeeds,
|
||||||
url: URL.supplyDemandDetails,
|
url: URL.supplyDemandDetails,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: {
|
data: {
|
||||||
demandId: this.$router.params.id,
|
demandId:id ,
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
'content-type': 'application/x-www-form-urlencoded',
|
'content-type': 'application/x-www-form-urlencoded',
|
||||||
|
@ -247,7 +247,8 @@ class MySupplyDemand extends Component {
|
|||||||
|
|
||||||
// 跳转到我的供求编辑页面
|
// 跳转到我的供求编辑页面
|
||||||
goToMyDSEditPage(e) {
|
goToMyDSEditPage(e) {
|
||||||
const sdId = onClickValueService(e)
|
let id = onClickValueService(e)
|
||||||
|
let sdId=encodeURIComponent(id)
|
||||||
Taro.navigateTo({
|
Taro.navigateTo({
|
||||||
url: '/pages/myDemandSupplyEdit/myDemandSupplyEdit?sdId=' + sdId
|
url: '/pages/myDemandSupplyEdit/myDemandSupplyEdit?sdId=' + sdId
|
||||||
})
|
})
|
||||||
@ -255,7 +256,8 @@ class MySupplyDemand extends Component {
|
|||||||
}
|
}
|
||||||
// 转到供求查看页面
|
// 转到供求查看页面
|
||||||
goSupplyDemandView(e) {
|
goSupplyDemandView(e) {
|
||||||
const sdId = onClickValueService(e)
|
let id = onClickValueService(e)
|
||||||
|
let sdId=encodeURIComponent(id)
|
||||||
Taro.navigateTo({
|
Taro.navigateTo({
|
||||||
url: '/pages/supplyDemandView/supplyDemandView?sdId=' + sdId
|
url: '/pages/supplyDemandView/supplyDemandView?sdId=' + sdId
|
||||||
})
|
})
|
||||||
|
@ -63,7 +63,7 @@ class Shop extends Component {
|
|||||||
curr_page: 1,
|
curr_page: 1,
|
||||||
page_count: 10,
|
page_count: 10,
|
||||||
shop_name: false,
|
shop_name: false,
|
||||||
shop_id: this.$router.params.id,
|
shop_id: decodeURIComponent(this.$router.params.id),
|
||||||
config_id: 4,
|
config_id: 4,
|
||||||
shop_class_id: '',
|
shop_class_id: '',
|
||||||
order: '',
|
order: '',
|
||||||
|
@ -36,12 +36,14 @@ class SupplyDemandView extends Component {
|
|||||||
}
|
}
|
||||||
//获取商品信息api GetProductInfo
|
//获取商品信息api GetProductInfo
|
||||||
getSupplyDemandInfo() {
|
getSupplyDemandInfo() {
|
||||||
|
|
||||||
|
let sdId=decodeURIComponent(this.$router.params.sdId)
|
||||||
Taro.request({
|
Taro.request({
|
||||||
url: URL.GetSupplyDemandInfo,
|
url: URL.GetSupplyDemandInfo,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: {
|
data: {
|
||||||
sdID: this.$router.params.sdId,
|
sdID: sdId,
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
'content-type': 'application/x-www-form-urlencoded',
|
'content-type': 'application/x-www-form-urlencoded',
|
||||||
@ -130,8 +132,9 @@ class SupplyDemandView extends Component {
|
|||||||
}
|
}
|
||||||
// 跳转到我的供求编辑页面
|
// 跳转到我的供求编辑页面
|
||||||
goToMyDSEditPage() {
|
goToMyDSEditPage() {
|
||||||
|
let sdId=encodeURIComponent(this.state.itemId)
|
||||||
Taro.redirectTo({
|
Taro.redirectTo({
|
||||||
url: '/pages/myDemandSupplyEdit/myDemandSupplyEdit?sdId=' + this.state.itemId
|
url: '/pages/myDemandSupplyEdit/myDemandSupplyEdit?sdId=' + sdId
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user