diff --git a/common/common.js b/common/common.js
index d7fabaa..296d728 100644
--- a/common/common.js
+++ b/common/common.js
@@ -28,6 +28,9 @@ const userLoginout = serverUrl + "/business/h5/index/logout";
// 商户关于我们
const useraboutUs = serverUrl + "/business/h5/index/aboutUs";
+// 商户账户余额信息
+const walletAccount = serverUrl + "/business/h5/wallet/account";
+
//
const requestSign = function(inputData) {
@@ -122,4 +125,5 @@ export default {
indexInfo,
userLoginout,
useraboutUs,
+ walletAccount,
}
diff --git a/common/requestServer.js b/common/requestServer.js
index c556bd9..1e7e4d6 100644
--- a/common/requestServer.js
+++ b/common/requestServer.js
@@ -1,60 +1,76 @@
import common from "./common.js";
export const myRequest = (options) => {
- // 调接口加载
- uni.showLoading({
- title: "加载中",
- mask: true,
- });
- return new Promise((resolve, reject) => {
- uni.request({
- url: options.url,
- //默认参数
- data: options.data || {},
- // 配置请求头参数-例如token
- header: {
- 'content-type': 'application/json',
- // Accept: 'application/json',
- // 'Content-Type': 'application/json',
- // 'X-Requested-With': 'XMLHttpRequest'
- },
- dataType: "json",
- method: options.method || 'GET',
- // sslVerify: true,
- // 接口请求成功
- success: (res) => {
- // 关闭加载
- uni.hideLoading();
- // 调用成功且有数据 返回数据 组件内通过 .then() 或者async await 接受异步返回数据
- //resolve(res.data)
- //在接口200 调用成功后 才能进行判断接口内的状态码 return_code 以此判定作何操作和提示
- let result = res.data
- console.log(result);
-
- if (result.code == 0) {
- resolve(res.data)
- } else {
- uni.hideLoading();
- uni.showToast({
- title: result.message,
- icon: 'error',
- duration: 2000
- });
- }
-
- },
- // 接口接口失败
- fail: (error) => {
- // 关闭加载
- uni.hideLoading();
- console.log("请求失败", error);
- uni.showToast({
- title: error.message,
- icon: 'error',
- duration: 2000
- })
- // 失败数据
- reject(error)
- }
- })
- })
-}
\ No newline at end of file
+ // 调接口加载
+ uni.showLoading({
+ title: "加载中",
+ mask: true,
+ });
+ return new Promise((resolve, reject) => {
+ uni.request({
+ url: options.url,
+ //默认参数
+ data: options.data || {},
+ // 配置请求头参数-例如token
+ header: {
+ 'content-type': 'application/json',
+ // Accept: 'application/json',
+ // 'Content-Type': 'application/json',
+ // 'X-Requested-With': 'XMLHttpRequest'
+ },
+ dataType: "json",
+ method: options.method || 'GET',
+ // sslVerify: true,
+ // 接口请求成功
+ success: (res) => {
+ // 关闭加载
+ uni.hideLoading();
+ // 调用成功且有数据 返回数据 组件内通过 .then() 或者async await 接受异步返回数据
+ //resolve(res.data)
+ //在接口200 调用成功后 才能进行判断接口内的状态码 return_code 以此判定作何操作和提示
+ let result = res.data
+ console.log(result);
+
+ if (result.code == 0) {
+ resolve(result)
+ } else if (result.code == -10000) {
+ uni.showModal({
+ title: '提示',
+ content: result.message,
+ showCancel: false,
+ success: function(res) {
+ if (res.confirm) {
+ console.log('登录失效');
+ uni.clearStorageSync();
+ uni.reLaunch({
+ url: "../pages/index/index"
+ })
+ uni.hideLoading();
+ }
+ }
+ });
+ } else {
+ uni.hideLoading();
+ uni.showToast({
+ title: result.message,
+ icon: 'error',
+ duration: 2000
+ });
+ }
+
+ },
+ // 接口接口失败
+ fail: (error) => {
+ // 关闭加载
+ uni.hideLoading();
+ console.log("请求失败", error);
+ uni.showToast({
+ title: error.message,
+ icon: 'error',
+ duration: 2000
+ })
+ // 失败数据
+ reject(error)
+ }
+ })
+ })
+}
diff --git a/main.js b/main.js
index e4eba40..fff4540 100644
--- a/main.js
+++ b/main.js
@@ -1,12 +1,19 @@
import App from './App'
import store from './store'
-import common from "./common/common.js";
// 引入封装的接口api
+import common from "./common/common.js";
import { myRequest } from './common/requestServer.js'
+//引入封装的过滤器 filters
+import * as filters from './common/filters.js'
// 挂在Vue属性 全局通过this.$myRequest()可以访问到
Vue.prototype.$common = common
Vue.prototype.$myRequest = myRequest
+// 添加全局filter
+Object.keys(filters).map(v => {
+ Vue.filter(v, filters[v])
+})
+
// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
diff --git a/pages.json b/pages.json
index 68d5d05..3dee268 100644
--- a/pages.json
+++ b/pages.json
@@ -79,7 +79,7 @@
{
"path": "pages/moneyRecharge/moneyRecharge",
"style": {
- "navigationBarTitleText": "钱包充值"
+ "navigationBarTitleText": "我的钱包"
}
},
{
diff --git a/pages/aboutOur/aboutOur.vue b/pages/aboutOur/aboutOur.vue
index ac78f3a..f84a427 100644
--- a/pages/aboutOur/aboutOur.vue
+++ b/pages/aboutOur/aboutOur.vue
@@ -11,15 +11,15 @@
微信公众号
- 江阴慧停车
+ {{officialAccountName}}
-
+
客服电话
- 400900800
+ {{customerServicePhone}}
门户网站
- 暂无
+ {{website}}
@@ -42,9 +42,36 @@
return {
appName: '江阴慧停车',
apptitle: '江阴慧停车·智慧便捷',
+ officialAccountName: '',
+ customerServicePhone: '',
+ website: '',
}
},
+ mounted() {
+ this.aboutUs()
+ },
methods: {
+ call(){
+ var me = this;
+ uni.makePhoneCall({
+ phoneNumber: me.customerServicePhone
+ });
+ },
+ aboutUs() {
+ let that = this;
+ that.$myRequest({
+ url: that.$common.useraboutUs,
+ method: 'POST',
+ data: that.$common.requestSign()
+ }).then(res => {
+
+ console.log(res)
+ let aboutInfo = res.data;
+ that.officialAccountName = aboutInfo.officialAccountName;
+ that.customerServicePhone = aboutInfo.customerServicePhone;
+ that.website = aboutInfo.website;
+ })
+ },
}
}
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 15ef52b..af22923 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -54,7 +54,7 @@
停车记录
-
+
@@ -175,6 +175,12 @@
});
},
+ toPursePage() {
+ uni.navigateTo({
+ url: '../moneyRecharge/moneyRecharge'
+
+ });
+ },
toInvoicePage() {
uni.navigateTo({
url: '../invoiceClaim/invoiceClaim'
@@ -187,6 +193,7 @@
});
},
+
}
}
diff --git a/pages/moneyRecharge/moneyRecharge.vue b/pages/moneyRecharge/moneyRecharge.vue
index 7721a3d..5884c42 100644
--- a/pages/moneyRecharge/moneyRecharge.vue
+++ b/pages/moneyRecharge/moneyRecharge.vue
@@ -1,19 +1,14 @@
-
-
-
+
- 明细 >
- ¥17.34
+ 明细 >
+ ¥{{acctBalance}}
-
-
-
+
-
+
{{item.text}}
@@ -26,30 +21,21 @@
-
-
支付方法
-
+
微信支付
-
-
-
-
-
+
-
- 请先登录
-
+
@@ -58,6 +44,7 @@ import common from "../../common/common.js";
export default {
data() {
return {
+ acctBalance:'0.00',
ListData: [
{
text: '100元'
@@ -79,636 +66,43 @@ export default {
},
],
currentIndex: 0,
- mycarNumber: '',
- myorderId: '',
- myparkCode: '',
- myorderinfo1: {},
- myorderinfo: {},
- payWaysSel: 0,
- myorderState: 0,
- mypaySrcType: '',
- selCoupon: {},
- appOrderTimeout: '',
- loginflag: 0,
- phoneNumb: '',
- totalFee: '', //应收
- alertFlag: false,
- unPayFee: '' //实收
+
}
},
- 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());
+ onLoad() {
+
},
- 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) {
+ mounted() {
+ this.recharge()
},
methods: {
+ recharge() {
+ let that = this;
+ that.$myRequest({
+ url: that.$common.walletAccount,
+ method: 'POST',
+ data: that.$common.requestSign()
+ }).then(res => {
+
+ console.log(res)
+ let data = res.data;
+ that.acctBalance = data.acctBalance;
+
+ })
+ },
+
change(e) {
let {
index
} = e.detail
- // this.list[index].badge && this.list[index].badge++
+
this.currentIndex = index
- uni.showToast({
- title: `点击第${index + 1}个宫格`,
- icon: 'none'
- })
- },
- PDlogin() {
- var me = this;
- // var loginflag = 0;
- var globalUser = me.getGlobalUser("globalUser");
- if (globalUser == undefined || globalUser == null || globalUser.token == null || globalUser.token == undefined ||
- globalUser.token.length == 0) {
- me.loginflag = 0;
- } else {
- me.loginflag = 1;
- }
- },
- //选择优惠券
- DiscountClick() {
- console.log("gotoDiscountView");
- var me = this;
- if (me.loginflag == 0) {
- uni.showToast({
- title: '请先登录',
- icon: 'none',
- duration: 4000
- })
- return;
- }
- var myurl = 'use_couponList/use_couponList?plNo=' + me.myparkCode + '&parkingDura=' + me.myorderinfo.staytime +
- '&parkingFee=' + me.myorderinfo.orderTotalFee + '&carNumber=' + me.mycarNumber + '&carType=' + me.myorderinfo.carType;
- uni.navigateTo({
- url: myurl
- });
- },
- //选择支付方式
- selPaywaysClick(selNumb) {
- let me = this
- this.payWaysSel = selNumb;
- console.log("this.payWaysSel: " + this.payWaysSel);
- console.log(me.loginflag)
- if (this.payWaysSel == 1) {
- if (me.loginflag == 0) {
- uni.showToast({
- title: '请先登录',
- icon: 'none',
- duration: 2000
- })
- return;
- }
- }
- },
- payClick() {
- var me = this;
- me.goPay_billQueryInfo(me.mycarNumber, me.myorderId, me.myparkCode, me.selCoupon.cardNo, me.selCoupon.couponType,
- me.selCoupon.discValue);
- // if(me.myorderinfo.orderFee == 0){
- // uni.showModal({
- // title: '提示',
- // content: '0元无需支付',
- // showCancel: false,
- // success: function(res) {
- // if (res.confirm) {
- // console.log('0元无需支付');
- // me.GetbillQueryInfo(me.mycarNumber, me.myorderId, me.myparkCode ,me.selCoupon.cardNo ,me.selCoupon.couponType ,me.selCoupon.discValue);
- // }
- // }
- // });
- // return;
- // }
- // //用户选择微信支付
- // if (me.payWaysSel == 0) {
- // me.getWxPayinfo();
- // } else {
- // me.UseAccountPay();
- // }
- },
- getWxPayinfo() {
- var me = this;
- uni.showLoading({
- mask: true,
- title: "请稍后..."
- });
- uni.showNavigationBarLoading();
- var getwxpayinfoUrl = common.getwxpayinfoUrl;
- if (me.mypaySrcType == 101) {
- me.payQuery(100)
- } else {
- me.rltOrderId()
- }
- },
- rltOrderId() {
- var me = this;
- console.log(me.totalFee)
- console.log(me.unPayFee)
- var jsondata = {
- parkOrderIds: [me.myorderId],
- orderBigType: 100,
- payOrderType: 103,
- terminalSource: 11,
- operCode: me.phoneNumb,//订单生成操作人 如果是车主 传 custId
- operName: me.phoneNumb,//订单生成操作人名称 如果是车主 传车主名称或手机号
- orgId: common.public_orgId,
- orderActFee: me.myorderinfo.orderFee,
- orderTotalFee: me.unPayFee,
- };
- uni.request({
- url: common.doOrderCreate,
- data: JSON.stringify(jsondata),
- // url: getwxPayUnifiedorderUrl,
- // data: JSON.stringify(common.requestSign(jsondata)),
- dataType: "json",
- method: "POST",
- success: (res) => {
- if (res.data.code == 0) {
- console.log(res.data.data.rltOrderId);
- me.myorderId = res.data.data.rltOrderId
- console.log(me.myorderId)
- me.payQuery(100)
- // uni.hideNavigationBarLoading();
- // uni.hideLoading();
- } else {
- uni.showModal({
- title: '提示',
- content: res.data.message,
- showCancel: false,
- success: function (res) {
- }
- });
- // uni.showToast({
- // title: res.data.message,
- // // icon: none;
- // duration: 2000
- // })
- }
- },
- complete: () => {
- // uni.hideNavigationBarLoading();
- // uni.hideLoading();
- }
- });
- },
- payQuery(_orderBigType) {
- var me = this;
- console.log(me.totalFee)
- console.log(me.unPayFee)
- console.log(me.mypaySrcType)
- var jsondata = {
- orderBigType: _orderBigType,
- payOrderType: me.mypaySrcType,
- rltOrderId: me.myorderId,
- payType: 2,
- terminalSource: 11,
- orderActFee: me.myorderinfo.orderFee,
- orderTotalFee: me.unPayFee,
- // totalFee: '', //应收
- // unPayFee: '' //实收
- payUserId: me.getWxOpenid("WxOpenid"),
- terminalOS: uni.getSystemInfoSync().platform == 'android' ? 'AND' : 'IOS',
- //terminalOS:isAndroid?'AND':'IOS',
- //uni.getSystemInfoSync().platform
- };
- uni.request({
- //url: getwxpayinfoUrl,
- url: common.doPayUrl,
- data: JSON.stringify(jsondata),
- //data: JSON.stringify(common.requestSign(jsondata)),
- header: {
- 'content-type': 'application/json'
- },
- dataType: "json",
- method: "POST",
- success: (res) => {
- console.log(res)
- if (res.statusCode == 200) {
- me.myorderinfo1 = res.data;
- // var code = res.data.code;
- console.log(JSON.stringify(res.data));
- // var mydata = res.data;
- var mydata = JSON.parse(res.data.data.jsPayRequest);
- me.MakeWxPay(mydata);
- uni.hideNavigationBarLoading();
- uni.hideLoading();
- }
- },
- complete: () => {
- uni.hideNavigationBarLoading();
- uni.hideLoading();
- }
- });
- },
- // 调用微信支付
- MakeWxPay(mydata) {
- console.log('3')
- var me = this;
- uni.requestPayment({
- provider: 'wxpay',
- timeStamp: mydata.timeStamp,
- //随机字符串,长度为32个字符以下
- nonceStr: mydata.nonceStr,
- //统一下单接口返回的 prepay_id 参数值,提交格式如:prepay_id=xx。
- package: mydata.package,
- signType: mydata.signType,
- paySign: mydata.paySign,
- success: function (res) {
- console.log('success:' + JSON.stringify(res));
- var myurl = '../wxPaySuccess/wxPaySuccess?carNumber=' + me.mycarNumber + '&payWays=微信&payMoney=' + me.myorderinfo
- .orderFee + '&appOrderTimeout=' + me.appOrderTimeout;
- uni.reLaunch({
- url: myurl
- });
- },
- fail: function (err) {
- console.log('fail:' + JSON.stringify(err));
- uni.showModal({
- title: '提示',
- content: '支付失败/取消',
- showCancel: false,
- success: function (res) {
- if (res.confirm) {
- console.log('支付失败');
- }
- }
- });
- }
- });
- },
- goPay_billQueryInfo(carnum, orderId, parkCode, cardNo, couponType, disValue) {
- var me = this;
- // uni.showLoading({
- // mask: true,
- // title: "请稍后..."
- // });
- uni.showNavigationBarLoading();
- var billQueryUrl = common.billQueryUrl;
- var jsondata = {
- carNumber: carnum,
- orderId: orderId,
- terminalSource: '11',
- parkCode: parkCode,
- cardNo: cardNo,
- couponType: couponType,
- disValue: disValue
- }
- uni.request({
- url: billQueryUrl,
- // data: JSON.stringify(jsondata),
- data: JSON.stringify(common.requestSign(jsondata)),
- header: {
- 'content-type': 'application/json'
- },
- dataType: "json",
- method: "POST",
- success: (res) => {
- console.log(JSON.stringify(res.data));
- uni.hideNavigationBarLoading();
- uni.hideLoading();
- if (res.data.code == 0) {
- me.myorderinfo = res.data.data;
- me.appOrderTimeout = res.data.data.appOrderTimeout;
- if (me.myorderinfo.orderFee == 0) {
-
-
- // 101:停车付款单,102:停车预付单,103:停车补缴单,201:余额充值单,202:押金充值;301:会员卡购买单,302:会员卡续费
- //个人使用的卡券cardId
- // couponPersonId:
- // paySrcType: me.mypaySrcType,
- me.zeroPayUrl(me.mypaySrcType, res.data.data.orderId, me.selCoupon.custCardId);
- } else {
- //用户选择微信支付
- if (me.payWaysSel == 0) {
- me.getWxPayinfo();
- } else {
- me.UseAccountPay();
- }
- }
- // me.myorderinfo1 = res.data.data ;
- //
- // var code = res.data.code;
- //console.log(JSON.stringify(res.data));
- } else if (res.data.code == -10000) {
- uni.showModal({
- title: '提示',
- content: res.data.message,
- showCancel: false,
- success: function (res) {
- if (res.confirm) {
- console.log('登录失效');
- uni.clearStorageSync();
- }
- }
- });
- }
- },
- complete: () => {
- uni.hideNavigationBarLoading();
- uni.hideLoading();
- }
- });
- },
- // 0元支付
- zeroPayUrl(payOrderType, orderId, couponPersonId) {
- var me = this;
- uni.showLoading({
- mask: true,
- title: "请稍后..."
- });
- uni.showNavigationBarLoading();
- var zeroPayUrl = common.zeroPayUrl;
- var jsondata = {
- payOrderType: payOrderType,
- orderId: orderId,
- terminalSource: '11',
- couponPersonId: couponPersonId
- }
- uni.request({
- url: zeroPayUrl,
- // data: JSON.stringify(jsondata),
- data: JSON.stringify(common.requestSign(jsondata)),
- header: {
- 'content-type': 'application/json'
- },
- dataType: "json",
- method: "POST",
- success: (res) => {
- console.log(JSON.stringify(res.data));
- uni.hideNavigationBarLoading();
- uni.hideLoading();
- if (res.data.code == 0) {
- uni.showModal({
- title: '提示',
- content: '支付成功!',
- showCancel: false,
- success: function (res) {
- me.GetbillQueryInfo(me.mycarNumber, me.myorderId, me.myparkCode, me.selCoupon.cardNo, me.selCoupon.couponType,
- me.selCoupon
- .discValue);
- }
- });
- // me.myorderinfo = res.data.data;
- // me.appOrderTimeout = res.data.data.appOrderTimeout;
- // // me.myorderinfo1 = res.data.data ;
- //
- // var code = res.data.code;
- //console.log(JSON.stringify(res.data));
- } else if (res.data.code == -10000) {
- uni.showModal({
- title: '提示',
- content: res.data.message,
- showCancel: false,
- success: function (res) {
- if (res.confirm) {
- console.log('登录失效');
- uni.clearStorageSync();
- }
- }
- });
- } else {
- uni.showModal({
- title: '提示',
- content: res.data.message,
- showCancel: false,
- success: function (res) {
- me.GetbillQueryInfo(me.mycarNumber, me.myorderId, me.myparkCode, me.selCoupon.cardNo, me.selCoupon.couponType,
- me.selCoupon
- .discValue);
- }
- });
- }
- },
- complete: () => {
- uni.hideNavigationBarLoading();
- uni.hideLoading();
- }
- });
- },
- //初始化订单信息
- GetbillQueryInfo(carnum, orderId, parkCode, cardNo, couponType, disValue) {
- var me = this;
- uni.showLoading({
- mask: true,
- title: "请稍后..."
- });
- uni.showNavigationBarLoading();
- var billQueryUrl = common.billQueryUrl;
- var jsondata = {
- carNumber: carnum,
- orderId: orderId,
- terminalSource: '11',
- parkCode: parkCode,
- cardNo: cardNo,
- couponType: couponType,
- disValue: disValue
- }
- uni.request({
- url: billQueryUrl,
- // data: JSON.stringify(jsondata),
- data: JSON.stringify(common.requestSign(jsondata)),
- header: {
- 'content-type': 'application/json'
- },
- dataType: "json",
- method: "POST",
- success: (res) => {
- console.log(JSON.stringify(res.data));
- uni.hideNavigationBarLoading();
- uni.hideLoading();
- if (res.data.code == 0) {
- me.myorderinfo = res.data.data;
- me.appOrderTimeout = res.data.data.appOrderTimeout;
- // me.myorderinfo1 = res.data.data ;
- //
- // var code = res.data.code;
- //console.log(JSON.stringify(res.data));
- } else if (res.data.code == -10000) {
- uni.showModal({
- title: '提示',
- content: res.data.message,
- showCancel: false,
- success: function (res) {
- if (res.confirm) {
- console.log('登录失效');
- uni.clearStorageSync();
- }
- }
- });
- }
- },
- complete: () => {
- uni.hideNavigationBarLoading();
- uni.hideLoading();
- }
- });
- },
- // 获取openid
- getWxCode() {
- var that = this;
- uni.login({
- provider: 'weixin',
- success: function (loginRes) {
- console.log(JSON.stringify(loginRes));
- console.log(loginRes.code);
- that.get_WxOpenid(loginRes.code);
- }
- });
+ console.log(index+1)
+
},
- get_WxOpenid(code) {
- var me = this;
- console.log('123456');
- uni.showLoading({
- mask: true,
- title: "请稍后..."
- });
- uni.showNavigationBarLoading();
- var getOpenidUrl = common.getOpenidUrl;
- uni.request({
- url: getOpenidUrl,
- data: {
- appId: common.hs_wxPay_appId,
- code: code
- },
- header: {
- 'content-type': 'application/json'
- },
- dataType: "json",
- method: "POST",
- success: (res) => {
- console.log(res)
- if (res.data.code == 0) {
- console.log('id')
- // me.myorderinfo = res.data.data;
- // // var code = res.data.code;
- uni.setStorageSync("WxOpenid", res.data.data.openid);
- console.log(JSON.stringify(res.data));
- console.log("wxopenid = " + res.data.data.openid);
- uni.hideNavigationBarLoading();
- uni.hideLoading();
- }
- },
- complete: () => {
- uni.hideNavigationBarLoading();
- uni.hideLoading();
- }
- });
- },
- // 使用余额支付
- UseAccountPay() {
- var me = this;
- console.log(me.loginflag + 'aaaaa')
- if (me.loginflag == 0) {
- console.log('123123')
- // this.alertFlag = true
- // uni.showToast({
- // title: '请先登录',
- // icon: 'none',
- // duration: 4000
- // })
- uni.showModal({
- title: '提示',
- showCancel: false,
- content: '未登录状态,请先登录!',
- success: function (res) {
- if (res.confirm) {
- console.log('用户点击确定');
- }
- }
- });
- } else {
- console.log('bbbb')
- uni.showLoading({
- mask: true,
- title: "请稍后...",
- duration: 4000
- });
- uni.showNavigationBarLoading();
- var accountPayUrl = common.accountPayUrl;
- var jsondata = {
- payType: '5', //支付方式-- 1:支付宝 2:微信 3:银联 4:微信公众号 5 个人账户
- orderId: me.myorderId,
- payFee: me.myorderinfo.orderFee,
- //支付单来源 101:停车付款单 102:停车预付单 103:停车补缴单 104 共享车位 201 余额充值单 202 押金充值单 301 会员卡购买单 302 会员卡续费
- paySrcType: me.mypaySrcType,
- terminalSource: '11', //小程序
- //个人使用的卡券cardId
- couponPersonId: me.selCoupon.custCardId,
- carNumber: me.mycarNumber,
- orderId: me.myorderId,
- paySource: '3',
- sourceType: '3',
- terminalSource: '11', //小程序
- recordArreaInfos: JSON.stringify([{
- "orderId": me.myorderId,
- "orderNotPayFee": me.myorderinfo.orderFee,
- "parkId": me.myparkCode
- }])
- };
- uni.request({
- url: accountPayUrl,
- data: JSON.stringify(common.requestSign(jsondata)),
- header: {
- 'content-type': 'application/json'
- },
- dataType: "json",
- method: "POST",
- success: (res) => {
- uni.hideNavigationBarLoading();
- uni.hideLoading();
- console.log('余额支付 = ' + JSON.stringify(res.data));
- if (res.data.code == 0) {
- var myurl = '../wxPaySuccess/wxPaySuccess?carNumber=' + me.mycarNumber + '&payWays=余额&payMoney=' + me.myorderinfo
- .orderFee + '&appOrderTimeout=' + me.appOrderTimeout;
- uni.reLaunch({
- url: myurl
- });
- } else {
- uni.showToast({
- title: res.data.message,
- icon: 'none',
- duration: 4000
- })
- }
- },
- complete: () => {
- // uni.hideNavigationBarLoading();
- // uni.hideLoading();
- }
- });
- }
- }
- }
+
+ }
}
diff --git a/pages/setting/setting.vue b/pages/setting/setting.vue
index a14e118..a502954 100644
--- a/pages/setting/setting.vue
+++ b/pages/setting/setting.vue
@@ -1,71 +1,86 @@
-
-
+
+
+
-
+
-
+
-
+