Commit aaba3bc5 by 张立顺

fix 适配appid

1 parent 657f48e4
...@@ -119,16 +119,19 @@ export default { ...@@ -119,16 +119,19 @@ export default {
userCollaborationName: '', userCollaborationName: '',
userCollaborationCheck: false, userCollaborationCheck: false,
isYqType: true, isYqType: true,
merchantDisabled: false merchantDisabled: false,
appId: ''
} }
}, },
mounted() { mounted() {
const that = this const that = this
// console.log(baseConfig) console.log(baseConfig)
const { appId } = baseConfig const { appId } = baseConfig
// console.log(appId) // console.log(appId)
const { merchantName, merchantId, shopMerchantId, shopMerchantName, M, MN, SM, SMN, P } = this.getHrefParams() const { merchantName, merchantId, shopMerchantId, shopMerchantName, M, MN, SM, SMN, P } = this.getHrefParams()
this.paymentChannelId = P this.paymentChannelId = P
this.appId = baseConfig.appidMap[this.paymentChannelId] || appId
console.log(baseConfig.appidMap[this.paymentChannelId], this.appId)
// 区分是流量方还是导流方 // 区分是流量方还是导流方
// this.getMiniAppConfig() // this.getMiniAppConfig()
this.setMerchantDisabled(merchantId || shopMerchantId) this.setMerchantDisabled(merchantId || shopMerchantId)
...@@ -149,7 +152,7 @@ export default { ...@@ -149,7 +152,7 @@ export default {
try { try {
// 请求用户授权 // 请求用户授权
ap.getAuthCode({ ap.getAuthCode({
appId, appId: this.appId,
scopes: ['auth_base']// 主动授权:auth_user,静默授权:auth_base。或者其它scope scopes: ['auth_base']// 主动授权:auth_user,静默授权:auth_base。或者其它scope
}, function (res) { }, function (res) {
// ap.alert(JSON.stringify(res)) // ap.alert(JSON.stringify(res))
...@@ -291,12 +294,12 @@ export default { ...@@ -291,12 +294,12 @@ export default {
// merchantId, // merchantId,
// openId, // openId,
isMinipg: 1, isMinipg: 1,
appid: baseConfig.appId, appid: this.appId,
subOpenid: userId, subOpenid: userId,
oprBy: userId, oprBy: userId,
receivedMoney: payMoney * 100, receivedMoney: payMoney * 100,
payType: 4, payType: 4,
paymentChannelId: this.paymentChannelId paymentChannelId: this.paymentChannelId,
} }
if (this.isYqType) { if (this.isYqType) {
params.merchantId = this.merchantId params.merchantId = this.merchantId
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!