@@ -1,13 +1,6 @@ | |||||
const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} | const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} | ||||
let weappId; | |||||
let configUrls; | |||||
if (Object.keys(extConfig).length == 0){ | |||||
weappId = 'wx649b3be73c1afe47'; | |||||
configUrls = 'https://ctest.malls.iformall.com/C/api'; | |||||
}else{ | |||||
configUrls = extConfig.attr.configUrl; | |||||
weappId = extConfig.weappId; | |||||
} | |||||
let weappId = extConfig.weappId; | |||||
let configUrls = extConfig.attr.configUrl; | |||||
var config = { | var config = { | ||||
url: configUrls, | url: configUrls, | ||||
api: { | api: { | ||||
@@ -1,16 +1,16 @@ | |||||
{ | { | ||||
"extEnable": true, | "extEnable": true, | ||||
"extAppid": "wx6a2524a8286d687f", | |||||
"extAppid": "wx9b0a894a3bbe9627", | |||||
"ext": { | "ext": { | ||||
"weappId": "wx6a2524a8286d687f", | |||||
"name": "富茂链客生产版", | |||||
"appVersion": "C.nocar.4.1.7", | |||||
"weappId": "wx9b0a894a3bbe9627", | |||||
"name": "金泸商务", | |||||
"appVersion": "C.4.1.8", | |||||
"attr": { | "attr": { | ||||
"ifHaveCarModular": "0", | |||||
"etcpversion": "release", | |||||
"configUrl": "https://c.malls.iformall.com/C/api", | |||||
"passCarAppId": "wxc07f9d67923d676d", | |||||
"passCarreturnUrl": "https://admin.malls.iformall.com/api/carCallback/etcpPaidCallback" | |||||
"configUrl": "https://ctest.malls.iformall.com/C/api", | |||||
"ifHaveCarModular": "1", | |||||
"etcpVersion": "release", | |||||
"etcpAppId": "wx192b7d2e8dcbefd0", | |||||
"etcpCallbackUrl": "https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback" | |||||
} | } | ||||
}, | }, | ||||
"permission": { | "permission": { | ||||
@@ -62,7 +62,7 @@ Page({ | |||||
}, | }, | ||||
gotoetcp: function () { | gotoetcp: function () { | ||||
wx.navigateToMiniProgram({ | wx.navigateToMiniProgram({ | ||||
appId: that.data.passCarAppId, | |||||
appId: that.data.etcpAppId, | |||||
extraData: this.data.extraData, | extraData: this.data.extraData, | ||||
envVersion: 'release', | envVersion: 'release', | ||||
path: "pages/main/main", | path: "pages/main/main", | ||||
@@ -83,21 +83,12 @@ Page({ | |||||
onShow: function (options) { | onShow: function (options) { | ||||
var that = this; | var that = this; | ||||
console.log(that.data.ifHaveCarModular) | console.log(that.data.ifHaveCarModular) | ||||
if (Object.keys(extConfig).length != 0) { | |||||
that.setData({ | |||||
passCarAppId: extConfig.attr.passCarAppId, | |||||
etcpversion: extConfig.attr.etcpversion, | |||||
passCarreturnUrl: extConfig.attr.passCarreturnUrl, | |||||
ifHaveCarModular: extConfig.attr.ifHaveCarModular | |||||
}) | |||||
} else { | |||||
that.setData({ | |||||
passCarAppId:'wx192b7d2e8dcbefd0', | |||||
etcpversion:'release', | |||||
passCarreturnUrl:'https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback', | |||||
ifHaveCarModular:1 | |||||
}) | |||||
} | |||||
that.setData({ | |||||
etcpAppId: extConfig.attr.etcpAppId, | |||||
etcpVersion: extConfig.attr.etcpVersion, | |||||
etcpCallbackUrl: extConfig.attr.etcpCallbackUrl, | |||||
ifHaveCarModular: extConfig.attr.ifHaveCarModular | |||||
}) | |||||
console.log(that.data.ifHaveCarModular) | console.log(that.data.ifHaveCarModular) | ||||
if (app.globalData.token) { | if (app.globalData.token) { | ||||
that.getList(); | that.getList(); | ||||
@@ -570,7 +561,7 @@ Page({ | |||||
syncId: res.data.orderId, | syncId: res.data.orderId, | ||||
payType: 6, // 小程序支付 | payType: 6, // 小程序支付 | ||||
CarNumber: carNumber, | CarNumber: carNumber, | ||||
returnUrl: that.data.passCarreturnUrl, | |||||
returnUrl: that.data.etcpCallbackUrl, | |||||
source: "FUMAO-001", | source: "FUMAO-001", | ||||
actionId: "1" //操作ID,1:小程序支付 | actionId: "1" //操作ID,1:小程序支付 | ||||
} | } | ||||
@@ -53,7 +53,7 @@ | |||||
</view> | </view> | ||||
<view class="buy-view" wx:if="{{stopFees.orderId}}"> | <view class="buy-view" wx:if="{{stopFees.orderId}}"> | ||||
<navigator bindfail="bindfail" path="pages/main/main" wx:if="{{canIUse}}" class='buy' target="miniProgram" open-type="navigate" app-id="{{passCarAppId}}" extra-data='{{extraData}}' version="{{etcpversion}}"> | |||||
<navigator bindfail="bindfail" path="pages/main/main" wx:if="{{canIUse}}" class='buy' target="miniProgram" open-type="navigate" app-id="{{etcpAppId}}" extra-data='{{extraData}}' version="{{etcpVersion}}"> | |||||
立即支付 | 立即支付 | ||||
</navigator> | </navigator> | ||||
<view wx:if="{{!canIUse}}" class='buy' bindtap='gotoetcp'>立即支付</view> | <view wx:if="{{!canIUse}}" class='buy' bindtap='gotoetcp'>立即支付</view> | ||||
@@ -1,8 +1,4 @@ | |||||
const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} | const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} | ||||
let appVersion; | |||||
if (Object.keys(extConfig).length == 0) { | |||||
appVersion = 'C.4.1.1'; | |||||
} | |||||
var config = require("../../config/config.js"); | var config = require("../../config/config.js"); | ||||
var app = getApp(); | var app = getApp(); | ||||
const Http = require("../../utils/HttpBasics"); | const Http = require("../../utils/HttpBasics"); | ||||
@@ -106,7 +102,7 @@ Page({ | |||||
onShow: function() { | onShow: function() { | ||||
let that = this; | let that = this; | ||||
that.setData({ | that.setData({ | ||||
appVersion: extConfig.appVersion ? extConfig.appVersion : appVersion | |||||
appVersion: extConfig.appVersion | |||||
}) | }) | ||||
let num = wx.getStorageSync('couponNum'); | let num = wx.getStorageSync('couponNum'); | ||||
let num1 = wx.getStorageSync('couponNum2'); | let num1 = wx.getStorageSync('couponNum2'); | ||||
@@ -13,7 +13,7 @@ | |||||
}, | }, | ||||
"compileType": "miniprogram", | "compileType": "miniprogram", | ||||
"libVersion": "2.2.0", | "libVersion": "2.2.0", | ||||
"appid": "wx453ae0d37f3550d0", | |||||
"appid": "wxfa336cad86ed598d", | |||||
"projectname": "C%E7%AB%AF%E5%B0%8F%E7%A8%8B%E5%BA%8F", | "projectname": "C%E7%AB%AF%E5%B0%8F%E7%A8%8B%E5%BA%8F", | ||||
"isGameTourist": false, | "isGameTourist": false, | ||||
"condition": { | "condition": { | ||||