Parcourir la source

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

tags/富茂链客4.1.0
meo il y a 6 ans
Parent
révision
a4d8d519fc
7 fichiers modifiés avec 2749 ajouts et 23 suppressions
  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 Voir le fichier

@@ -1,9 +1,15 @@
const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {}
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 = {
url: extConfig.attr.configUrl,
api: {
url: configUrl,
api: {
/**
* 接口用途:login
*/


+ 4
- 4
ext.json Voir le fichier

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


+ 21
- 13
pages/passCar/passCar.js Voir le fichier

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


+ 0
- 1
pages/passCar/passCar.wxml Voir le fichier

@@ -52,7 +52,6 @@
<text class='fr' style='color:#ff4949;'>{{stopFees.remainingFee}}<text class='yuan'>元</text></text>
</view>


<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}}">
立即支付


+ 9
- 1
pages/user/index.js Voir le fichier

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


+ 1
- 1
project.config.json Voir le fichier

@@ -13,7 +13,7 @@
},
"compileType": "miniprogram",
"libVersion": "2.0.9",
"appid": "wx453ae0d37f3550d0",
"appid": "wx649b3be73c1afe47",
"projectname": "C%E7%AB%AF%E5%B0%8F%E7%A8%8B%E5%BA%8F",
"isGameTourist": false,
"condition": {


+ 2705
- 0
typings/wx.d.ts
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


Chargement…
Annuler
Enregistrer