Ver a proveniência

[将测试环境的代码整合到项目中]

tags/富茂链客4.1.0
meo há 6 anos
ascendente
cometimento
a4d8d519fc
7 ficheiros alterados com 2749 adições e 23 eliminações
  1. +9
    -3
      config/config.js
  2. +4
    -4
      ext.json
  3. +21
    -13
      pages/passCar/passCar.js
  4. +0
    -1
      pages/passCar/passCar.wxml
  5. +9
    -1
      pages/user/index.js
  6. +1
    -1
      project.config.json
  7. +2705
    -0
      typings/wx.d.ts

+ 9
- 3
config/config.js Ver ficheiro

@@ -1,9 +1,15 @@
const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {}
let weappId = extConfig.weappId; let weappId = extConfig.weappId;
console.log(extConfig)
let configUrl;
if (Object.keys(extConfig).length == 0){
weappId = 'wx649b3be73c1afe47';
configUrl = 'https://ctest.malls.iformall.com/C/api';
}else{
configUrl = extConfig.attr.configUrl;
}
var config = { var config = {
url: extConfig.attr.configUrl,
api: {
url: configUrl,
api: {
/** /**
* 接口用途:login * 接口用途:login
*/ */


+ 4
- 4
ext.json Ver ficheiro

@@ -3,14 +3,14 @@
"extAppid": "wxea71200db93d756b", "extAppid": "wxea71200db93d756b",
"ext": { "ext": {
"weappId": "wxea71200db93d756b", "weappId": "wxea71200db93d756b",
"name": "富茂链客生产版",
"appVersion": "C.nocar.3.5.1",
"name": "富茂客官开发",
"appVersion": "C.3.4.1",
"attr": { "attr": {
"ifHaveCarModular": "0",
"ifHaveCarModular": "1",
"etcpversion": "release", "etcpversion": "release",
"configUrl": "https://ciformall.youlane.cn/C/api", "configUrl": "https://ciformall.youlane.cn/C/api",
"passCarAppId": "wx192b7d2e8dcbefd0", "passCarAppId": "wx192b7d2e8dcbefd0",
"passCarreturnUrl": "https://admin.malls.iformall.com/api/carCallback/etcpPaidCallback"
"passCarreturnUrl": "https://ciformall.youlane.cn/api/carCallback/etcpPaidCallback"
} }
}, },
"permission": { "permission": {


+ 21
- 13
pages/passCar/passCar.js Ver ficheiro

@@ -30,6 +30,7 @@ Page({
current: 0, current: 0,
stopFees: {}, stopFees: {},
scroll: true, scroll: true,
ifHaveCarModular:"",
canIUse: wx.canIUse("navigator") canIUse: wx.canIUse("navigator")
}, },
/** /**
@@ -60,7 +61,6 @@ Page({
console.log(res) console.log(res)
}, },
gotoetcp: function () { gotoetcp: function () {
console.log(this.data.passCarAppId)
wx.navigateToMiniProgram({ wx.navigateToMiniProgram({
appId: that.data.passCarAppId, appId: that.data.passCarAppId,
extraData: this.data.extraData, extraData: this.data.extraData,
@@ -82,14 +82,23 @@ Page({
}, },
onShow: function (options) { onShow: function (options) {
var that = this; var that = this;
console.log(extConfig);
that.setData({
passCarAppId: extConfig.attr.passCarAppId,
etcpversion: extConfig.attr.etcpversion,
passCarreturnUrl: extConfig.attr.passCarreturnUrl,
ifHaveCarModular: extConfig.attr.ifHaveCarModular
})
console.log("停车");
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
})
}
console.log(that.data.ifHaveCarModular)
if (app.globalData.token) { if (app.globalData.token) {
that.getList(); that.getList();
that.init(); that.init();
@@ -549,20 +558,19 @@ Page({
carNumber: carNumber, carNumber: carNumber,
outCarId: outCarId outCarId: outCarId
}; };
console.log(that.data.passCarreturnUrl)
console.log("获得停车费用")
Http.post({ Http.post({
url: config.api.getCarStopFee, url: config.api.getCarStopFee,
data: postData data: postData
}) })
.then(res => { .then(res => {
console.log(res)
var extraDataStr = { var extraDataStr = {
params: { params: {
token: app.globalData.etcpToken, token: app.globalData.etcpToken,
syncId: res.data.orderId, syncId: res.data.orderId,
payType: 6, // 小程序支付 payType: 6, // 小程序支付
CarNumber: carNumber, CarNumber: carNumber,
returnUrl: passCarreturnUrl,
returnUrl: that.data.passCarreturnUrl,
source: "FUMAO-001", source: "FUMAO-001",
actionId: "1" //操作ID,1:小程序支付 actionId: "1" //操作ID,1:小程序支付
} }
@@ -572,12 +580,12 @@ Page({
stopFees: res.data, stopFees: res.data,
timecha: Util.timecha(res.data.exitTime, res.data.entranceTime) timecha: Util.timecha(res.data.exitTime, res.data.entranceTime)
}); });
console.log(that.data.stopFees)
that.setData({ that.setData({
scroll: true scroll: true
}) })
}) })
.catch(error => { .catch(error => {
console.log(error)
that.setData({ that.setData({
stopFees: {}, stopFees: {},
scroll: true scroll: true


+ 0
- 1
pages/passCar/passCar.wxml Ver ficheiro

@@ -52,7 +52,6 @@
<text class='fr' style='color:#ff4949;'>{{stopFees.remainingFee}}<text class='yuan'>元</text></text> <text class='fr' style='color:#ff4949;'>{{stopFees.remainingFee}}<text class='yuan'>元</text></text>
</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="{{passCarAppId}}" extra-data='{{extraData}}' version="{{etcpversion}}">
立即支付 立即支付


+ 9
- 1
pages/user/index.js Ver ficheiro

@@ -1,5 +1,11 @@
const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {}
console.log(extConfig) console.log(extConfig)
let appVersion;
if (Object.keys(extConfig).length == 0) {
appVersion = 'C.3.3.8';
} else {
configUrl = extConfig.attr.configUrl;
}
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");
@@ -32,6 +38,7 @@ Page({
canvasHidden: false, canvasHidden: false,
maskHidden: true, maskHidden: true,
imagePath: '', imagePath: '',
appVersion:"",
showmemberqrcode: false, showmemberqrcode: false,
placeholder: ''//默认二维码生成文本 placeholder: ''//默认二维码生成文本
}, },
@@ -100,8 +107,9 @@ Page({
onShow: function() { onShow: function() {
let that = this; let that = this;
console.log(extConfig.appVersion) console.log(extConfig.appVersion)
console.log(appVersion)
that.setData({ that.setData({
appVersion: extConfig.appVersion
appVersion: extConfig.appVersion ? extConfig.appVersion : appVersion
}) })
let num = wx.getStorageSync('couponNum'); let num = wx.getStorageSync('couponNum');
let num1 = wx.getStorageSync('couponNum2'); let num1 = wx.getStorageSync('couponNum2');


+ 1
- 1
project.config.json Ver ficheiro

@@ -13,7 +13,7 @@
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.0.9", "libVersion": "2.0.9",
"appid": "wx453ae0d37f3550d0",
"appid": "wx649b3be73c1afe47",
"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": {


+ 2705
- 0
typings/wx.d.ts
A apresentação das diferenças no ficheiro foi suprimida por ser demasiado grande
Ver ficheiro


Carregando…
Cancelar
Guardar