Commit a6c5d23a authored by 潘永坪's avatar 潘永坪

景区单产品页面新增

parent 2638b57e
......@@ -276,6 +276,15 @@
}
}
,{
"path" : "pages/scenic/scenicSingleOrder/scenicSingleOrder",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
"navigationBarTextStyle": "white",
......
<template>
<view>
<web-view :src="outUrl"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
enterUrl:"",//进入页面路由
outUrl:"",//跳出页面路由
}
},
onLoad(option) {
//#ifdef MP-WEIXIN
this.enterUrl=option.q
//#endif
//#ifdef MP-ALIPAY
this.enterUrl=uni.getStorageSync("alipayQrCode")
//#endif
if(this.enterUrl){//普通二维码扫码进入
let merchantId=this.getUrlKey("merchantId")
let productId=this.getUrlKey("productId")
let orderSource=this.getUrlKey("orderSource")
let companyId=this.getUrlKey("companyId")
let pdOpenid=uni.getStorageSync("openid")//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let pdToken=uni.getStorageSync("token")
let pdCreateUserId=uni.getStorageSync("createUserId")
let pdUserId=uni.getStorageSync("userId")
this.outUrl="https://wx.pangdly.com/#/scenicSingleOrder?merchantId="+merchantId+"&productId="+productId+"&orderSource="+orderSource+"&companyId="+companyId+"&pdOpenid="+pdOpenid+"&pdToken="+pdToken+"&pdCreateUserId="+pdCreateUserId+"&pdUserId="+pdUserId
}else{//小程序页面跳转进入
let merchantId=option.merchantId
let productId=option.productId
let orderSource=option.orderSource
let companyId=option.companyId
let pdOpenid=uni.getStorageSync("openid")//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let pdToken=uni.getStorageSync("token")
let pdCreateUserId=uni.getStorageSync("createUserId")
let pdUserId=uni.getStorageSync("userId")
this.outUrl="https://wx.pangdly.com/#/scenicSingleOrder?merchantId="+merchantId+"&productId="+productId+"&orderSource="+orderSource+"&companyId="+companyId+"&pdOpenid="+pdOpenid+"&pdToken="+pdToken+"&pdCreateUserId="+pdCreateUserId+"&pdUserId="+pdUserId
}
},
methods: {
getUrlKey(name){//---------------------------------------------------------------获取url
return(new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(decodeURIComponent(this.enterUrl)) || [, ""])[1].replace(/\+/g, '%20') || "";
},
}
}
</script>
<style>
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment