Commit 5c5c61ca authored by 潘永坪's avatar 潘永坪

支付页面参数修改

parent 3ad0f954
<script> <script>
// 1、uni-app的页面生命周期仅在page页面有效,而单独封装的组件中【页面周期无效】, // 1、uni-app的页面生命周期仅在page页面有效,而单独封装的组件中【页面周期无效】,
//但是Vue的生命周期依然有效 【Vue的生命周期在任何地方都是有效的,即你仍然可以在uni-app项目中使用Vue生命周期,但是不建议这么做】 //但是Vue的生命周期依然有效 【Vue的生命周期在任何地方都是有效的,即你仍然可以在uni-app项目中使用Vue生命周期,但是不建议这么做】
// 2、推荐使用uni-app里面的onLoad 代替 vue 里面的 created // 2、推荐使用uni-app里面的onLoad 代替 vue 里面的 created
// 3、推荐使用uni-app里面的onReady 代替 vue 里面的 mounted // 3、推荐使用uni-app里面的onReady 代替 vue 里面的 mounted
//4.setStorageSync与setStorage的区别:如果后续的操作需要使用更新storage后保存的data,则使用setStorageSync使用异步性能更好,使用同步数据更安全 //4.setStorageSync与setStorage的区别:如果后续的操作需要使用更新storage后保存的data,则使用setStorageSync使用异步性能更好,使用同步数据更安全
export default { export default {
onLaunch: function(options) { //初始化完成时触发(全局只触发一次 onLaunch: function(options) { //初始化完成时触发(全局只触发一次
let today = this.$commonjs.today() let today = this.$commonjs.today()
let oldDate = uni.getStorageSync('oldDate') let oldDate = uni.getStorageSync('oldDate')
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
//#endif //#endif
//#ifdef MP-ALIPAY //#ifdef MP-ALIPAY
uni.setStorageSync('appid', '2021001194629244')
if (options.query && options.query.qrCode) { if (options.query && options.query.qrCode) {
uni.setStorageSync('alipayQrCode', options.query.qrCode) uni.setStorageSync('alipayQrCode', options.query.qrCode)
} else { } else {
...@@ -71,7 +72,7 @@ ...@@ -71,7 +72,7 @@
onHide: function() { onHide: function() {
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
......
...@@ -40,9 +40,11 @@ export default { ...@@ -40,9 +40,11 @@ export default {
let data = { let data = {
code: res.code, code: res.code,
source, //微信小程序3,支付宝小程序4 source, //微信小程序3,支付宝小程序4
companyId:uni.getStorageSync('enterOptions').query.companyId||'',
appid:uni.getStorageSync('appid')||'' appid:uni.getStorageSync('appid')||''
} }
if(uni.getStorageSync('enterOptions').query){
data.companyId=uni.getStorageSync('enterOptions').query.companyId||''
}
_this.$request('wechat/wx/getUserInfoByCode', data).then(res => { _this.$request('wechat/wx/getUserInfoByCode', data).then(res => {
if (res.code == '00') { if (res.code == '00') {
let openid = res.data.openid let openid = res.data.openid
......
...@@ -140,9 +140,11 @@ export default { ...@@ -140,9 +140,11 @@ export default {
let data = { let data = {
code: res.code, code: res.code,
source, //微信小程序3,支付宝小程序4 source, //微信小程序3,支付宝小程序4
companyId:uni.getStorageSync('enterOptions').query.companyId||'',
appid:uni.getStorageSync('appid')||'' appid:uni.getStorageSync('appid')||''
} }
if(uni.getStorageSync('enterOptions').query){
data.companyId=uni.getStorageSync('enterOptions').query.companyId||''
}
_this.$request('wechat/wx/getUserInfoByCode', data) _this.$request('wechat/wx/getUserInfoByCode', data)
.then(res => { .then(res => {
if (res.code == '00') { if (res.code == '00') {
......
This diff is collapsed.
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
} }
this.ticketStatus() this.ticketStatus()
intFun() intFun()
}, 1200) }, 2000)
} }
intFun() intFun()
}, },
......
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