diff --git a/App.vue b/App.vue
index c85253e..751aaba 100644
--- a/App.vue
+++ b/App.vue
@@ -5,15 +5,15 @@
// brestUrl: 'http://192.168.3.4:9302/brest',
// imgUrl: 'https://192.168.3.4:9301/filesystem/',
//正式
- // url: 'https://hsg.dctpay.com/crest',
- // imgUrl: 'https://hsg.dctpay.com/filesystem/',
- // brestUrl : 'https://hsg.dctpay.com/brest',
- // imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/',
+ url: 'https://hsg.dctpay.com/crest',
+ imgUrl: 'https://hsg.dctpay.com/filesystem/',
+ brestUrl : 'https://hsg.dctpay.com/brest',
+ imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/',
//测试
- url: 'https://hsgcs.dctpay.com/crest',
- brestUrl : 'https://hsgcs.dctpay.com/brest',
- imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
- imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/',
+ // url: 'https://hsgcs.dctpay.com/crest',
+ // brestUrl : 'https://hsgcs.dctpay.com/brest',
+ // imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
+ // imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/',
userInfo: "",
brestUserInfo : '',
openId: '',
diff --git a/manifest.json b/manifest.json
index eacb442..ad3a13f 100644
--- a/manifest.json
+++ b/manifest.json
@@ -83,11 +83,11 @@
"title" : "嗨加油",
"router" : {
"mode" : "hash",
- "base" : "/hsg-h5"
+ "base" : "/hsgH5"
},
"devServer" : {
"port" : "",
- "https" : false
+ "https" : true
},
"domain" : "https://hsgcs.dctpay.com",
"template" : ""
diff --git a/pages/goods/refuel-confirm/refuel-confirm.vue b/pages/goods/refuel-confirm/refuel-confirm.vue
index a289b14..588450e 100644
--- a/pages/goods/refuel-confirm/refuel-confirm.vue
+++ b/pages/goods/refuel-confirm/refuel-confirm.vue
@@ -269,12 +269,22 @@
})
return;
}
- if (that.paytype == 'weixin') {
- let params = {
- "orderId": that.orderNo,
- "openId": app.globalData.openId,
- "orderScene": "GOODS_ORDER"
- }
+ if (that.paytype == 'weixin') {
+ // #ifdef H5
+ let params = {
+ "orderId": that.orderNo,
+ "openId": app.globalData.openId,
+ "orderScene": "GOODS_ORDER",
+ "openIdType": 2
+ }
+ // #endif
+ // #ifdef MP
+ let params = {
+ "orderId": that.orderNo,
+ "openId": app.globalData.openId,
+ "orderScene": "GOODS_ORDER"
+ }
+ // #endif
orderToPay(params).then(res => {
if (res.return_code == '000000') {
// #ifdef MP
diff --git a/pages/login/register.vue b/pages/login/register.vue
index beb98cc..167d15b 100644
--- a/pages/login/register.vue
+++ b/pages/login/register.vue
@@ -15,16 +15,7 @@
-
立即注册
-
-
-
-
@@ -52,6 +43,7 @@
}
},
onLoad() {
+
},
methods: {
Timer() {},
@@ -74,6 +66,7 @@
phone: this.phoneNumber
}
sendSmsCode(params).then(res => {
+ uni.hideLoading();
if (res.return_code == '000000') {
this.getCodeisWaiting = true;
this.getCodeBtnColor = "rgba(255,255,255,0.5)"
@@ -82,8 +75,6 @@
icon: "none"
});
this.setTimer();
- } else {
- uni.hideLoading()
}
})
},
@@ -127,9 +118,8 @@
phone: this.phoneNumber,
code: this.code
}
- // if (this.Typeid == 1) {
H5login(params).then(res => {
- uni.hideLoading()
+ uni.hideLoading();
if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data
.object
@@ -145,7 +135,9 @@
key: "token",
data: res.return_data.uniqueCode
})
- uni.navigateBack({})
+ uni.navigateBack({
+ delta:2
+ });
} else {
uni.showToast({
title: res.return_msg,
@@ -153,55 +145,7 @@
});
}
})
- // } else {
- // bindUserPhone(params).then(res => {
- // uni.hideLoading()
- // if (res.return_code == '000000') {
- // app.globalData.userInfo = res.return_data
- // .object
- // .highUser;
- // app.globalData.token = res.return_data.uniqueCode;
- // uni.setStorage({
- // key: "user",
- // data: res.return_data
- // .object
- // .highUser
- // })
- // uni.setStorage({
- // key: "token",
- // data: res.return_data.uniqueCode
- // })
- // uni.navigateBack({})
- // } else {
- // uni.showToast({
- // title: res.return_msg,
- // icon: "none"
- // });
- // }
- // })
- // }
- },
- //微信内核浏览器
- isWeiXinLogin() {
- var ua = navigator.userAgent.toLowerCase();
- if (ua.search(/MicroMessenger/i) > -1) {
- return true;
- } else {
- return false;
- }
- },
- //微信登录
- openWx() {
- location.href =
- 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa075e8509802f826&redirect_uri=https%3A%2F%2Fhsgcs.dctpay.com%2FH5%2Findex.html%23%2F&response_type=code&scope=snsapi_userinfo&state=2#wechat_redirect';
- },
- toLogin() {
- uni.hideKeyboard()
- uni.redirectTo({
- url: 'login'
- });
- uni.navigateBack();
}
}
}
diff --git a/pages/login/updatePas/updatePas.vue b/pages/login/updatePas/updatePas.vue
index 3173c93..9038572 100644
--- a/pages/login/updatePas/updatePas.vue
+++ b/pages/login/updatePas/updatePas.vue
@@ -76,7 +76,13 @@
uni.showToast({
title: '设置成功',
icon: "none",
- duration: 2000
+ duration: 2000,
+ success() {
+ setTimeout(() => {
+ uni.navigateBack({
+ })
+ }, 800);
+ }
});
app.globalData.userInfo = res.return_data
.object
@@ -87,12 +93,17 @@
.object
.highUser
})
- uni.navigateBack({})
} else {
uni.hideLoading();
uni.showToast({
title: res.return_msg,
- icon: "none"
+ icon: "none",
+ success() {
+ setTimeout(() => {
+ uni.navigateBack({
+ })
+ }, 800);
+ }
})
}
})
diff --git a/pages/order/confirmation.vue b/pages/order/confirmation.vue
index bbb604d..fe698e1 100644
--- a/pages/order/confirmation.vue
+++ b/pages/order/confirmation.vue
@@ -295,13 +295,11 @@
let params = {
couponId: this.couponId
}
- getCouponById(params).then(res => {
+ getCouponById(params).then(res => {
+ uni.hideLoading();
if (res.return_code == '000000') {
this.couponList = res.return_data;
this.paytheprice = res.return_data.discountPrice;
- uni.hideLoading()
- } else {
- uni.hideLoading()
}
})
},
@@ -436,9 +434,9 @@
"storeId": this.storeId
}]
}
- addOrder(goods).then(res => {
+ addOrder(goods).then(res => {
+ uni.hideLoading();
if (res.return_code == '000000') {
- uni.hideLoading();
// uni.redirectTo({
// url: '../pay/payment/payment?amount=' + res.return_data.payPrice +
// '&paytype=' + this.couponList.payType + '&orderId=' + res.return_data.id +
@@ -450,7 +448,6 @@
this.orderDetails = res.return_data;
this.orderToPay(res.return_data);
} else {
- uni.hideLoading();
uni.showToast({
title: res.return_msg,
icon: 'none',
@@ -495,7 +492,7 @@
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER"
}
- // #endif
+ // #endif
orderToPay(params).then(res => {
if (res.return_code == '000000') {
// #ifdef MP
diff --git a/pages/pay/payment/payment.vue b/pages/pay/payment/payment.vue
index 56dea76..2224e8a 100644
--- a/pages/pay/payment/payment.vue
+++ b/pages/pay/payment/payment.vue
@@ -18,7 +18,7 @@
-
+
@@ -29,7 +29,7 @@
-
+
@@ -40,7 +40,7 @@
-
+
@@ -111,15 +111,34 @@
this.paytype = 'jinbi'
} else {
this.paytype = ''
+ }
+ if (!app.globalData.userInfo) {
+ this.findUser()
}
this.amount = parseFloat(e.amount).toFixed(2);
},
onShow() {
let that = this;
that.user = app.globalData.userInfo;
- that.getHuiLianTongCardBalance();
+ that.getHuiLianTongCardBalance();
+ if (app.globalData.userInfo) {
+ this.findUser();
+ }
},
- methods: {
+ methods: {
+ findUser() {
+ let params;
+ findUser(params).then(res => {
+ if (res.return_code == '000000') {
+ app.globalData.userInfo = res.return_data;
+ this.user = res.return_data;
+ uni.setStorage({
+ key: "user",
+ data: res.return_data
+ })
+ }
+ });
+ },
//获取选择支付方式
changeRiado() {
if (!this.user.isSetHltCard) {
@@ -155,12 +174,21 @@
orderToPay() {
let that = this;
if (that.paytype == 'wxpay') {
-
+ // #ifdef H5
+ let params = {
+ "orderId": that.orderNo,
+ "openId": app.globalData.openId,
+ "orderScene": "GOODS_ORDER",
+ "openIdType": 2
+ }
+ // #endif
+ // #ifdef MP
let params = {
"orderId": that.orderNo,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER"
- }
+ }
+ // #endif
orderToPay(params).then(res => {
if (res.return_code == '000000') {
// #ifdef MP
@@ -344,7 +372,7 @@
title: '支付中...'
})
jweixin.config({
- // debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
+ // debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
appId: self.return_data.appId, // 必填,公众号的唯一标识
timestamp: self.return_data.timeStamp, // 必填,生成签名的时间戳
nonceStr: self.return_data.nonceStr, // 必填,生成签名的随机串
diff --git a/pages/qianZhuPay/qianZhuPay.vue b/pages/qianZhuPay/qianZhuPay.vue
index 544b80c..948b8d1 100644
--- a/pages/qianZhuPay/qianZhuPay.vue
+++ b/pages/qianZhuPay/qianZhuPay.vue
@@ -31,11 +31,21 @@
//获取订单数据
orderToPay() {
let that = this;
+ // #ifdef H5
+ let params = {
+ "orderId": that.orderNo,
+ "openId": app.globalData.openId,
+ "orderScene": that.source,
+ "openIdType": 2
+ }
+ // #endif
+ // #ifdef MP
let params = {
"orderNo": that.orderNo,
"openId": app.globalData.openId,
"source": that.source
}
+ // #endif
qzOrderToPay(params).then(res => {
if (res.return_code == '000000') {
// #ifdef MP
diff --git a/pages/tabBar/category/category.vue b/pages/tabBar/category/category.vue
index cca8c1c..5e1d1a8 100644
--- a/pages/tabBar/category/category.vue
+++ b/pages/tabBar/category/category.vue
@@ -61,11 +61,11 @@
-->
-
-
-
+
+
+
@@ -267,6 +267,27 @@
url: '../../goods/HM-search/HM-search'
})
// uni.showToast({title: "建议跳转到新页面做搜索功能"});
+ },
+ //拨打客服电话
+ playPhone() {
+ uni.showModal({
+ title: '客服',
+ content: '4006780738',
+ success: function(res) {
+ if (res.confirm) {
+ uni.makePhoneCall({
+ phoneNumber: '4006780738', //电话号码
+ success: function(e) {
+ console.log(e);
+ },
+ fail: function(e) {
+ console.log(e);
+
+ }
+ })
+ }
+ }
+ })
}
}
}
@@ -275,14 +296,13 @@
page {
background-color: #f1f3f5;
}
-
- .H5xfimg {
- width: 80rpx;
- bottom: 140rpx;
- position: fixed;
- right: 40rpx;
+
+ .h5xfimg {
+ width: 80rpx;
+ bottom: 140rpx;
+ position: fixed;
+ right: 40rpx;
}
-
.xfimg {
width: 80rpx;
bottom: 60rpx;
diff --git a/pages/tabBar/home/home.vue b/pages/tabBar/home/home.vue
index c727994..8680892 100644
--- a/pages/tabBar/home/home.vue
+++ b/pages/tabBar/home/home.vue
@@ -85,14 +85,14 @@
-
-
- 点击获取信息
- {{user.name}}
+
+
+ 点击获取信息
+ {{user.name}}
+
+
+ {{user.name}}
+
积分: 0
积分: {{user.gold}} 个
@@ -366,10 +371,10 @@
})
},
//跳转用户信息
- jumplogin() {
+ jumplogin() {
uni.navigateTo({
url: '../../userLogin/userLogin'
- })
+ })
},
//消息列表
toMsg() {
@@ -418,7 +423,28 @@
url: url
})
}
-
+ // #ifdef H5
+ if (item == '客服') {
+ uni.showModal({
+ title: '客服',
+ content: '4006780738',
+ success: function(res) {
+ if (res.confirm) {
+ uni.makePhoneCall({
+ phoneNumber: '4006780738', //电话号码
+ success: function(e) {
+ console.log(e);
+ },
+ fail: function(e) {
+ console.log(e);
+
+ }
+ })
+ }
+ }
+ })
+ }
+ // #endif
}
}
}
diff --git a/pages/user/coupon/coupon.vue b/pages/user/coupon/coupon.vue
index 7512244..bbc1e71 100644
--- a/pages/user/coupon/coupon.vue
+++ b/pages/user/coupon/coupon.vue
@@ -1,22 +1,19 @@
-
- 可用({{couponcout}})
- 已失效
-
+
+
+ 待使用
+ 已使用
+ 已过期
-
+
-
-
@@ -26,43 +23,38 @@
截止时间:{{row.useEndTime | formatDate('-')}}
-
-
{{row.highDiscount.discountPrice * 10}}
-
-
- {{row.highDiscount.discountPrice}}
+
+
+ {{row.highDiscount.discountPrice}}
折
-
-
- 元
+
+
+ 元
-
+
去使用
-
+
+
-
-
@@ -70,13 +62,43 @@
{{row.highDiscount.discountName}}
- 截止时间:{{row.highDiscount.salesEndTime | formatDate('-')}}
+ 使用时间:{{row.useTime | formatDate('-')}}
-
-
+
+
+
+
+ {{row.highDiscount.discountPrice}}
+
+
+ 元
+
+
+
+ {{row.highDiscount.discountName}}
+
+
+ 已使用
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{row.highDiscount.discountName}}
+
+
+ 过期时间:{{row.useEndTime | formatDate('-')}}
-
-
@@ -91,7 +113,7 @@
{{row.highDiscount.discountName}}
- 已失效
+ 已过期
@@ -112,8 +134,9 @@
return {
couponValidList: [],
couponinvalidList: [],
+ couponnoinvalidList: [],
imagewxUrl: app.globalData.imageWxImg,
- imgadres:'noorder.png',
+ imgadres: 'noorder.png',
headerTop: 0,
//控制滑动效果
typeClass: 'valid',
@@ -124,8 +147,8 @@
pageNum: 1,
pageSize: 10,
isNoMoreData: false,
- loadingText: '',
- couponcout:0
+ loadingText: '',
+ couponcout: 0
}
},
onPageScroll(e) {
@@ -172,8 +195,10 @@
onReachBottom() {
if (this.typeClass == 'valid') {
this.getUserDiscountList(1);
- } else {
+ } else if (this.typeClass == 'invalid') {
this.getUserDiscountList(2);
+ } else {
+ this.getUserDiscountList(0);
}
},
methods: {
@@ -201,31 +226,34 @@
this.isNoMoreData = true;
}
if (this.typeClass == 'valid') {
- this.couponValidList = this.couponValidList.concat(res.return_data.list);
+ this.couponValidList = this.couponValidList.concat(res.return_data.list);
this.couponcout = res.return_data.total;
- } else {
+ } else if (this.typeClass == 'invalid') {
this.couponinvalidList = this.couponinvalidList.concat(res.return_data.list);
+ } else {
+ this.couponnoinvalidList = this.couponnoinvalidList.concat(res.return_data.list);
}
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum;
} else {
this.couponValidList = [];
this.couponinvalidList = [];
+ this.couponnoinvalidList = [];
uni.hideLoading()
}
})
},
//跳转详情
- jumpcoupons(e) {
- if(e.highDiscount.useScope == 3){
- uni.navigateTo({
- url: '../../../subPages/recharge/recharge'
- })
- }else{
- uni.navigateTo({
- url: '../mineCouponsDestails/mineCouponsDestails?id=' + e.id
- })
+ jumpcoupons(e) {
+ if (e.highDiscount.useScope == 3) {
+ uni.navigateTo({
+ url: '../../../subPages/recharge/recharge'
+ })
+ } else {
+ uni.navigateTo({
+ url: '../mineCouponsDestails/mineCouponsDestails?id=' + e.id
+ })
}
-
+
},
switchType(type) {
if (this.typeClass == type) {
@@ -237,91 +265,28 @@
})
this.typeClass = type;
this.subState = this.typeClass == '' ? '' : 'show' + type;
- setTimeout(() => {
- this.oldIndex = null;
- this.theIndex = null;
- this.subState = this.typeClass == 'valid' ? '' : this.subState;
- }, 200)
+ // setTimeout(() => {
+ // this.oldIndex = null;
+ // this.theIndex = null;
+ // this.subState = this.typeClass == 'valid' ? '' : this.subState;
+ // }, 200)
if (this.typeClass == 'valid') {
this.pageNum = 1;
this.couponValidList = []
this.isNoMoreData = false;
this.getUserDiscountList(1);
- } else {
+ } else if (this.typeClass == 'invalid') {
this.pageNum = 1;
this.couponinvalidList = []
this.isNoMoreData = false;
this.getUserDiscountList(2);
+ } else {
+ this.pageNum = 1;
+ this.couponnoinvalidList = []
+ this.isNoMoreData = false;
+ this.getUserDiscountList(0);
}
- },
- //控制左滑删除效果-begin
- touchStart(index, event) {
- //多点触控不触发
- if (event.touches.length > 1) {
- this.isStop = true;
- return;
- }
- this.oldIndex = this.theIndex;
- this.theIndex = null;
- //初始坐标
- this.initXY = [event.touches[0].pageX, event.touches[0].pageY];
- },
- touchMove(index, event) {
- //多点触控不触发
- if (event.touches.length > 1) {
- this.isStop = true;
- return;
- }
- let moveX = event.touches[0].pageX - this.initXY[0];
- let moveY = event.touches[0].pageY - this.initXY[1];
-
- if (this.isStop || Math.abs(moveX) < 5) {
- return;
- }
- if (Math.abs(moveY) > Math.abs(moveX)) {
- // 竖向滑动-不触发左滑效果
- this.isStop = true;
- return;
- }
-
- if (moveX < 0) {
- this.theIndex = index;
- this.isStop = true;
- } else if (moveX > 0) {
- if (this.theIndex != null && this.oldIndex == this.theIndex) {
- this.oldIndex = index;
- this.theIndex = null;
- this.isStop = true;
- setTimeout(() => {
- this.oldIndex = null;
- }, 150)
- }
- }
- },
-
- touchEnd(index, $event) {
- //解除禁止触发状态
- this.isStop = false;
- },
-
- //删除商品
- deleteCoupon(id, List) {
- let len = List.length;
- for (let i = 0; i < len; i++) {
- if (id == List[i].id) {
- List.splice(i, 1);
- break;
- }
- }
- this.oldIndex = null;
- this.theIndex = null;
- },
-
- discard() {
- //丢弃
}
-
-
}
}
@@ -357,7 +322,7 @@
z-index: 10;
view {
- width: 50%;
+ width: 33.3%;
height: 90upx;
justify-content: center;
align-items: center;
@@ -367,16 +332,7 @@
.on {
color: #0083f5;
- }
-
- .border {
- height: 4upx;
- background-color: #0083f5;
- transition: all .3s ease-out;
-
- &.invalid {
- transform: translate3d(100%, 0, 0);
- }
+ border-bottom: 2px solid #0083f5;
}
}
@@ -407,6 +363,16 @@
}
}
+ @keyframes shownoInvalid {
+ 0% {
+ transform: translateX(0);
+ }
+
+ 100% {
+ transform: translateX(-200%);
+ }
+ }
+
.sub-list {
&.invalid {
position: absolute;
@@ -425,6 +391,11 @@
animation: showInvalid 0.20s linear both;
}
+ &.shownoinvalid {
+ display: flex;
+ animation: shownoInvalid 0.20s linear both;
+ }
+
width: 100%;
padding: 20upx 0 120upx 0;
@@ -605,35 +576,6 @@
}
}
- /*
-
-
-
- 10元日常用品类
-
-
- 2019-04-01~2019-05-30
-
-
-
-
-
- 10
-
-
- 元
-
-
-
- 满50使用
-
-
- 去使用
-
-
-
- *
- * */
}
}
diff --git a/pages/user/deposit/deposit.vue b/pages/user/deposit/deposit.vue
index 9d376aa..979ac4c 100644
--- a/pages/user/deposit/deposit.vue
+++ b/pages/user/deposit/deposit.vue
@@ -126,12 +126,22 @@
addOrder(goods).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
- //模板模拟支付,实际应用请调起微信/支付宝
+ //模板模拟支付,实际应用请调起微信/支付宝
+ // #ifdef H5
+ let params = {
+ "orderId": res.return_data.id,
+ "openId": app.globalData.openId,
+ "orderScene": "GOODS_ORDER",
+ "openIdType": 2
+ }
+ // #endif
+ // #ifdef MP
let params = {
"orderId": res.return_data.id,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER"
- }
+ }
+ // #endif
orderToPay(params).then(res => {
if (res.return_code == '000000') {
// #ifdef MP
diff --git a/subPages/trade-union-recharge/trade-union-recharge.vue b/subPages/trade-union-recharge/trade-union-recharge.vue
index dd56537..e69fa45 100644
--- a/subPages/trade-union-recharge/trade-union-recharge.vue
+++ b/subPages/trade-union-recharge/trade-union-recharge.vue
@@ -156,12 +156,22 @@
addOrder(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
- //模板模拟支付,实际应用请调起微信/支付宝
+ //模板模拟支付,实际应用请调起微信/支付宝
+ // #ifdef H5
+ let params = {
+ "orderId": res.return_data.id,
+ "openId": app.globalData.openId,
+ "orderScene": "GOODS_ORDER",
+ "openIdType": 2
+ }
+ // #endif
+ // #ifdef MP
let params = {
"orderId": res.return_data.id,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER"
- }
+ }
+ // #endif
orderToPay(params).then(res => {
if (res.return_code == '000000') {
// #ifdef MP
diff --git a/subPages/unionComfirmation/unionComfirmation.vue b/subPages/unionComfirmation/unionComfirmation.vue
index b57f01e..e394b41 100644
--- a/subPages/unionComfirmation/unionComfirmation.vue
+++ b/subPages/unionComfirmation/unionComfirmation.vue
@@ -330,7 +330,42 @@
duration: 2000
})
return;
- }
+ }
+ // #ifdef H5
+ uni.showLoading({
+ title: '提交订单中...'
+ })
+ let params = {
+ "memDiscountId": that.memDiscountId,
+ "orderPrice": that.orderPrice,
+ "payPrice": that.payPrice,
+ "rechargeContent": that.rechargeContent,
+ "rechargeModel": that.rechargeModel,
+ "agentKey": that.agentKey,
+ "objectId": that.objectId,
+ "identificationCode": app.globalData.identificationCode
+ }
+ addOrderPay(params).then(res => {
+ if (res.return_code == '000000') {
+ uni.hideLoading();
+ that.orderId = res.return_data.id;
+ let params = {
+ "orderId": res.return_data.id,
+ "openId": app.globalData.openId,
+ "openIdType": 2
+ }
+ that.orderToUNionPay(params);
+ } else {
+ uni.hideLoading();
+ uni.showToast({
+ title: res.return_msg,
+ icon: 'none',
+ duration: 2000
+ });
+ }
+ })
+ // #endif
+ // #ifdef MP
uni.requestSubscribeMessage({
tmplIds: ['ZO6kC3oJv0zj9QzL0htsF-mM9vAElcgPZEcUGglxsoU'],
success(res) {
@@ -351,10 +386,10 @@
if (res.return_code == '000000') {
uni.hideLoading();
that.orderId = res.return_data.id;
- let params = {
- "orderId": res.return_data.id,
- "openId": app.globalData.openId
- }
+ let params = {
+ "orderId": res.return_data.id,
+ "openId": app.globalData.openId
+ }
that.orderToUNionPay(params);
} else {
uni.hideLoading();
@@ -366,8 +401,10 @@
}
})
},
- fail(res) {},
- })
+ fail(res) {
+ },
+ })
+ // #endif
},
//获取选择支付方式
changeRiado() {
@@ -392,11 +429,11 @@
this.$refs.popup.show();
},
//获取订单数据
- orderToUNionPay(item) {
+ orderToUNionPay(item) {
let that = this;
if (that.paytype == 'weixin') {
orderToUNionPay(item).then(res => {
- if (res.return_code == '000000') {
+ if (res.return_code == '000000') {
// #ifdef MP
uni.showLoading({
title: '支付中...'
@@ -579,7 +616,7 @@
},
payRequest: function(self) {
- let that = this;
+ let that = this;
uni.showLoading({
title: '支付中...'
})