|
@@ -168,6 +168,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
//
|
|
|
//
|
|
|
//
|
|
|
+//
|
|
|
var _default = {
|
|
|
data: function data() {
|
|
|
return {
|
|
@@ -303,6 +304,77 @@ var _default = {
|
|
|
}, _callee4);
|
|
|
}))();
|
|
|
},
|
|
|
+ // 支付
|
|
|
+ toPay: function toPay() {
|
|
|
+ var _this2 = this;
|
|
|
+ return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
|
+ var that;
|
|
|
+ return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
|
+ while (1) {
|
|
|
+ switch (_context5.prev = _context5.next) {
|
|
|
+ case 0:
|
|
|
+ that = _this2; // 支付信息
|
|
|
+ uni.request({
|
|
|
+ url: "https://broadcast.waityou24.cn/wechat/api/pay/payOrder",
|
|
|
+ method: 'POST',
|
|
|
+ data: {
|
|
|
+ config: 'newCourtApp',
|
|
|
+ money: 0.01,
|
|
|
+ openid: 'wx34436977cd1e02e4',
|
|
|
+ order_no: String(Date.now())
|
|
|
+ },
|
|
|
+ header: {},
|
|
|
+ success: function success(res) {
|
|
|
+ console.log(res);
|
|
|
+ // if (pay.errcode == '0' && pay.data.paySign) {
|
|
|
+ // // 微信支付
|
|
|
+ // uni.showLoading({
|
|
|
+ // title: '加载中'
|
|
|
+ // })
|
|
|
+ // uni.requestPayment({
|
|
|
+ // "provider": "wxpay",
|
|
|
+ // ...pay.data,
|
|
|
+ // success: function(res) {
|
|
|
+ // uni.showToast({
|
|
|
+ // title: '支付成功',
|
|
|
+ // icon: 'none'
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ // fail: function(err) {
|
|
|
+ // uni.showToast({
|
|
|
+ // title: `支付失败`,
|
|
|
+ // icon: 'none'
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ // complete: function() {
|
|
|
+ // uni.hideLoading();
|
|
|
+ // that.clearPage();
|
|
|
+ // that.search()
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // } else {
|
|
|
+ // uni.showToast({
|
|
|
+ // title: pay.errmsg || '错误信息',
|
|
|
+ // icon: 'none'
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ },
|
|
|
+
|
|
|
+ fail: function fail(err) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请求接口失败',
|
|
|
+ icon: 'fail'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ case 2:
|
|
|
+ case "end":
|
|
|
+ return _context5.stop();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, _callee5);
|
|
|
+ }))();
|
|
|
+ },
|
|
|
// 输入框
|
|
|
toInput: function toInput(e) {
|
|
|
var that = this;
|