diff --git a/common/common.js b/common/common.js
index a54e292..c325a6a 100644
--- a/common/common.js
+++ b/common/common.js
@@ -1,38 +1,40 @@
import md5 from './md5.min.js';
-
// 江阴正式环境
var serverUrl = "https://bus.jycrtc.com";
-
//江阴微信小程序appid
const hs_wxPay_appId = 'wxfdc1af620d3ab750';
-
// 江阴慧停车orgId
const public_orgId = '10107';
const appName = '江阴慧停车';
const ACompany = '©江阴慧停车管理有限公司';
const BCompany = '由中兴智能交通股份有限公司提供技术支持';
const appVerson = '1.0.0';
-
const SetToken = uni.getStorageSync("globalUser").token;
-
// ----江阴项目 接口----
// 商户登录
const userLogin = serverUrl + "/business/h5/index/login";
-
// 获取已登录商户用户信息
const indexInfo = serverUrl + "/business/h5/index/info";
-
// 商户退出登录
const userLoginout = serverUrl + "/business/h5/index/logout";
-
// 商户关于我们
const useraboutUs = serverUrl + "/business/h5/index/aboutUs";
-
// 商户账户余额信息
const walletAccount = serverUrl + "/business/h5/wallet/account";
-
// 商户充值金额列表
const rechargeList = serverUrl + "/business/h5/wallet/rechargeList";
+// 通过商户ID查询停车记录信息
+const getBusinessParkOrderByBusIdForPage = serverUrl + "/business/h5/order/getBusinessParkOrderByBusIdForPage";
+// 通过商户ID查询停车记录信息
+const getPayOrderByOrderId = serverUrl + "/business/h5/order/getPayOrderByOrderId";
+//刘淇接口
+
+
+// 商户卡券-可以购买卡券列表-分页
+const couponRuleParkPage = serverUrl + "business/h5/coupon/couponRuleParkPage";
+
+
+//陈彪接口
// 余额明细下拉框选择列表
const walletKindType = serverUrl + "/business/h5/wallet/kindType";
@@ -46,19 +48,11 @@ const walletDetailsPage = serverUrl + "/business/h5/wallet/detailsPage";
// 钱包充值-微信
const publicUnifiedOrder = serverUrl + "/business/h5/pay/weixinpay/publicUnifiedOrder";
-// 通过商户ID查询停车记录信息
-const getBusinessParkOrderByBusIdForPage = serverUrl + "/business/h5/order/getBusinessParkOrderByBusIdForPage";
-
-// 通过商户ID查询停车记录信息
-const getPayOrderByOrderId = serverUrl + "/business/h5/order/getPayOrderByOrderId";
-
-//
-const requestSign = function(inputData) {
+const requestSign = function (inputData) {
var jsonList = inputData || {};
-
jsonList.orgId = public_orgId;
jsonList.sign_type = "md5";
jsonList.app_id = "0eca8f5373ca4866aec2f8e9d9367104";
@@ -68,7 +62,6 @@ const requestSign = function(inputData) {
// jsonList.token = getGlobalUser("globalUser").token;
jsonList.token = getGlobalUser("globalUser").token;
// jsonList.token = 'af7ed65335f842ee8f754e841ff940ea';
-
var arrData = [];
for (var key in jsonList) {
var obj = {};
@@ -83,11 +76,9 @@ const requestSign = function(inputData) {
jsonList.sign = sign;
return jsonList;
}
-
-
//获取sign
-var getSign = function(objb) {
- var compare = function(obj1, obj2) {
+var getSign = function (objb) {
+ var compare = function (obj1, obj2) {
var val1 = obj1.keyname;
var val2 = obj2.keyname;
if (val1 < val2) {
@@ -111,9 +102,8 @@ var getSign = function(objb) {
strmd5 = strmd5.toUpperCase();
return strmd5;
}
-
//获取盐值
-var getSalt = function() {
+var getSalt = function () {
var len = parseInt(32);
var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
var maxPos = $chars.length;
@@ -124,8 +114,7 @@ var getSalt = function() {
// console.log(pwd);
return pwd;
}
-
-var getGlobalUser = function(key) {
+var getGlobalUser = function (key) {
var userInfo = uni.getStorageSync("globalUser");
if (userInfo != null && userInfo != "" && userInfo != undefined) {
return userInfo;
@@ -133,58 +122,52 @@ var getGlobalUser = function(key) {
return '';
}
}
-
// 除了金额
-var moneyFormat = function(val) {
+var moneyFormat = function (val) {
return (val / 100).toFixed(2)
}
-
-var dateFormat = function(msd) { // 时间转换
- var time = msd
+var dateFormat = function (msd) { // 时间转换
+ var time =msd
if (null != time && "" != time) {
-
if (time > 60 && time < 60 * 60) {
-
time = parseInt(time / 60.0) + "分钟" + parseInt((parseFloat(time / 60.0) -
parseInt(time / 60.0)) * 60) + "秒";
- } else if (time >= 60 * 60 && time < 60 * 60 * 24) {
+ }
+ else if (time >= 60 * 60 && time < 60 * 60 * 24) {
time = parseInt(time / 3600.0) + "小时" + parseInt((parseFloat(time / 3600.0) -
- parseInt(time / 3600.0)) * 60) + "分钟" +
+ parseInt(time / 3600.0)) * 60) + "分钟" +
parseInt((parseFloat((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60) -
parseInt((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60)) * 60) + "秒";
} else if (time >= 60 * 60 * 24) {
+ time = parseInt(time / 3600.0/24) + "天" +parseInt((parseFloat(time / 3600.0/24)-
- time = parseInt(time / 3600.0 / 24) + "天" + parseInt((parseFloat(time / 3600.0 / 24) -
-
- parseInt(time / 3600.0 / 24)) * 24) + "小时" + parseInt((parseFloat(time / 3600.0) -
+ parseInt(time / 3600.0/24))*24) + "小时" + parseInt((parseFloat(time / 3600.0) -
- parseInt(time / 3600.0)) * 60) + "分钟" +
+ parseInt(time / 3600.0)) * 60) + "分钟" +
parseInt((parseFloat((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60) -
parseInt((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60)) * 60) + "秒";
- } else {
+ }
+ else {
time = parseInt(time) + "秒";
}
}
-
return time;
}
-
export default {
-
// deviceInfo,
hs_wxPay_appId,
public_orgId,
@@ -195,7 +178,7 @@ export default {
SetToken,
requestSign,
moneyFormat,
-
+ dateFormat,
// 接口
userLogin,
indexInfo,
@@ -208,17 +191,11 @@ export default {
-
-
-
-
-
-
//陈彪接口
rechargeList,
walletKindType,
detailSummary,
walletDetailsPage,
publicUnifiedOrder,
-
+
}
diff --git a/pages/businessCard/businessCard.vue b/pages/businessCard/businessCard.vue
index 01dcbc5..6661293 100644
--- a/pages/businessCard/businessCard.vue
+++ b/pages/businessCard/businessCard.vue
@@ -2,17 +2,9 @@
-
-
-
-
-
-
-
-
-
+
-
+
@@ -49,7 +41,7 @@
-
+
@@ -77,7 +69,7 @@
-
+
@@ -106,7 +98,7 @@
-
+
@@ -135,7 +127,7 @@
-
+
@@ -163,7 +155,7 @@
-
+
@@ -179,138 +171,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -329,109 +189,62 @@ export default {
indexWay: 0,
benginDate: currentDate,
overDate: currentDate,
- rows:[],
- pageNum:1,//当前页
- pageSize:1,//每页条数
- reload:false,
- status:'more',
- contentText:{
- contentdown:'上拉加载更多~',
- contentrefresh:'正在加载更多~',
- contentmore:'我是有底线的~'
+ rows: [],
+ pageNum: 1,//当前页
+ pageSize: 1,//每页条数
+ reload: false,
+ status: 'more',
+ contentText: {
+ contentdown: '上拉加载更多~',
+ contentrefresh: '正在加载更多~',
+ contentmore: '我是有底线的~'
},
- iconType:'auto', // 图标样式
+ iconType: 'auto', // 图标样式
}
},
onLoad(params) {
wx.showShareMenu({
withShareTicket: true
})
- // this.mycarNumber = params.carNumber;
- // this.myorderId = params.orderId;
- // this.myparkCode = params.parkCode;
- // this.myorderState = params.orderState;
- // this.totalFee = params.totalFee
- // this.unPayFee = params.unPayFee
- // if (params.orderState == 5) {
- // //停车补缴单 103
- // this.mypaySrcType = '103'
- // } else {
- // this.mypaySrcType = '101'
- // }
- // // this.GetbillQueryInfo(this.mycarNumber, this.myorderId, this.myparkCode);
- // this.getWxCode();
- // this.PDlogin();
- //console.log("xxxmake = "+this.makedateFormat());
+ this.couponRuleParkPage()
},
onShow() {
var me = this;
- var userInfo = me.getGlobalUser("globalUser");
- if (userInfo != null) {
- me.phoneNumb = userInfo.userPhone;
- }
- var pages = getCurrentPages();
- var currPage = pages[pages.length - 1]; //当前页面
- console.log('currPage.data.selCoupon = ' + currPage.data.selCoupon);
- me.selCoupon = currPage.data.selCoupon;
- console.log(JSON.stringify(me.selCoupon));
- // me.GetbillQueryInfo(me.mycarNumber, me.myorderId, me.myparkCode, me.selCoupon.cardNo, me.selCoupon.couponType, me.selCoupon
- // .discValue);
- // GetbillQueryInfo(carnum, orderId, parkCode, cardNo, couponType, disValue) {
+
},
computed: {
- startDate() {
- return this.getDate('start');
- },
- endDate() {
- return this.getDate('end');
- }
+
},
methods: {
- actionsClick(text){
- uni.showToast({
- title:text,
- icon:'none'
- })
- },
- bindPickerChange: function (e) {
- console.log('picker发送选择改变,携带值为', e.detail.value)
- this.index = e.detail.value
- },
- bindPickerChangeWay: function (e) {
- console.log('picker发送选择改变,携带值为', e.detail.value)
- this.indexWay = e.detail.value
- },
- bindStartDateChange: function (e) {
- this.benginDate = e.detail.value
- },
- bindEndDateChange: function (e) {
- this.overDate = e.detail.value
- },
- getDate(type) {
- const date = new Date();
- let year = date.getFullYear();
- let month = date.getMonth() + 1;
- let day = date.getDate();
- if (type === 'start') {
- year = year - 60;
- } else if (type === 'end') {
- year = year + 2;
+ // 通过商户ID查询停车记录信息
+ couponRuleParkPage() {
+ let that = this
+ let paramsData = {
+ pageNum: '1',
+ pageSize: '10'
}
- month = month > 9 ? month : '0' + month;
- day = day > 9 ? day : '0' + day;
- return `${year}-${month}-${day}`;
+ // 首页信息获取 接口
+ that.$myRequest({
+ url: that.$common.getBusinessParkOrderByBusIdForPage,
+ method: 'POST',
+ data: that.$common.requestSign(paramsData)
+ }).then(res => {
+ this.recordList = res.data.dataList
+ })
},
+
}
}