alipay encodeUIR and decodeURI

This commit is contained in:
郑茂强 2019-03-19 09:50:11 +08:00
parent b7e393a651
commit d42da99c54
15 changed files with 43 additions and 33 deletions

View File

@ -43,7 +43,6 @@ class recommondShop extends Component {
}
}
goToShop(e) {
const value = onClickValueService(e)
Taro.navigateTo({
url: '/pages/shop/shop?id=' + value.shop_id

View File

@ -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
})
}

View File

@ -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({

View File

@ -299,7 +299,6 @@ class GoodsPublish extends Component {
}
componentDidMount() {
}
componentWillReceiveProps(nextProps) {
// console.log(this.props, nextProps)
}

View File

@ -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'),

View File

@ -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
})

View File

@ -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,

View File

@ -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
})
}

View File

@ -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() {

View File

@ -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',

View File

@ -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' } })
}

View File

@ -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',

View File

@ -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
})

View File

@ -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: '',

View File

@ -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
})
}