钱包、会员等级支付模块优化
parent
6c34f5bdd9
commit
8536186e3c
|
|
@ -12,7 +12,7 @@
|
|||
<div class="am-form-group am-form-group-refreshing am-margin-bottom-0 am-form-file">
|
||||
<button type="button" class="am-btn am-btn-default am-btn-sm am-radius">
|
||||
<i class="am-icon-cloud-upload"></i> 选择文件</button>
|
||||
<input type="file" name="file" class="file-event" data-tips-tag="#form-file-tips" data-validation-message="请选择需要上传的文件" accept=".zip" multiple required />
|
||||
<input type="file" name="file" class="file-event" data-tips-tag="#form-file-tips" data-validation-message="请选择需要上传的文件" accept=".zip" required />
|
||||
<span class="tips am-text-xs">上传一个zip压缩格式的应用安装包</span>
|
||||
<div id="form-file-tips" class="am-margin-top-xs"></div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<div class="am-form-group am-form-group-refreshing am-margin-bottom-0 am-form-file">
|
||||
<button type="button" class="am-btn am-btn-default am-btn-sm am-radius">
|
||||
<i class="am-icon-cloud-upload"></i> 选择文件</button>
|
||||
<input type="file" name="theme" class="file-event" data-tips-tag="#form-theme-tips" data-validation-message="请选择需要上传的文件" accept=".zip" multiple required />
|
||||
<input type="file" name="theme" class="file-event" data-tips-tag="#form-theme-tips" data-validation-message="请选择需要上传的文件" accept=".zip" required />
|
||||
<span class="tips am-text-xs">上传一个zip压缩格式的主题安装包</span>
|
||||
<div id="form-theme-tips" class="am-margin-top-xs"></div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -52,5 +52,17 @@ return array (
|
|||
array (
|
||||
0 => 'app\\plugins\\share\\Hook',
|
||||
),
|
||||
'plugins_service_users_center_left_menu_handle' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\wallet\\Hook',
|
||||
),
|
||||
'plugins_service_header_navigation_top_right_handle' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\wallet\\Hook',
|
||||
),
|
||||
'plugins_service_user_register_end' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\wallet\\Hook',
|
||||
),
|
||||
);
|
||||
?>
|
||||
|
|
@ -95,16 +95,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
*/
|
||||
.am-form-file input[type="file"] {
|
||||
width: 92px;
|
||||
height: 28px;
|
||||
margin-top: 5px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除modal
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -2,7 +2,4 @@
|
|||
.am-gallery-desc * { font-size: 12px; }
|
||||
.am-gallery-item:hover { border: 1px solid #f60; }
|
||||
.theme-active { border: 3px solid #5eb95e !important; }
|
||||
#form-theme-tips { }
|
||||
input[name="theme"] { width: 105px !important; height: 32px; }
|
||||
.am-gallery-title .submit-delete { color:#C13932 !important; }
|
||||
input.file-event { margin-top: 0 !important; }
|
||||
.am-gallery-title .submit-delete { color:#C13932 !important; }
|
||||
|
|
@ -208,7 +208,7 @@ iframe { border: 0; }
|
|||
/**
|
||||
* 公共图片上传
|
||||
*/
|
||||
.am-form-file input[type="file"] { overflow:hidden; }
|
||||
.am-form-file input[type="file"] { overflow:hidden; width: 96px !important; height: 28px; top: 10px; }
|
||||
.am-form-file input.original-images-url { display: -webkit-inline-box !important; width: calc(100% - 110px) !important; background: #f5f5f5 !important; float: right; }
|
||||
.am-form-file i.original-images-url-delete { position: absolute; right: 3px; margin-top: 5px; cursor: pointer; background: #f5f5f5; padding: 0px 10px; }
|
||||
.am-form-file input.original-images-url-delete { padding-right: 35px !important; }
|
||||
|
|
|
|||
|
|
@ -224,8 +224,9 @@ Page({
|
|||
success: res => {
|
||||
my.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data.data;
|
||||
my.tradePay({
|
||||
tradeNO: res.data.data,
|
||||
tradeNO: data,
|
||||
success: res => {
|
||||
// 数据设置
|
||||
if (res.resultCode == 9000) {
|
||||
|
|
|
|||
|
|
@ -220,8 +220,9 @@ Page({
|
|||
success: res => {
|
||||
my.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data.data;
|
||||
my.tradePay({
|
||||
tradeNO: res.data.data,
|
||||
tradeNO: data,
|
||||
success: res => {
|
||||
// 数据设置
|
||||
if (res.resultCode == 9000) {
|
||||
|
|
|
|||
|
|
@ -220,8 +220,9 @@ Page({
|
|||
success: res => {
|
||||
qq.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data.data;
|
||||
qq.requestPayment({
|
||||
package: res.data.data,
|
||||
package: data,
|
||||
success: function (res) {
|
||||
// 数据设置
|
||||
self.order_item_pay_success_handle(index);
|
||||
|
|
|
|||
|
|
@ -244,48 +244,33 @@ Page({
|
|||
tt.hideLoading();
|
||||
|
||||
if (res.data.code == 0) {
|
||||
// 支付方式类型
|
||||
switch (res.data.data.is_payment_type) {
|
||||
// 正常线上支付
|
||||
case 0:
|
||||
tt.pay({
|
||||
orderInfo: res.data.data.order_info,
|
||||
service: res.data.data.service,
|
||||
success(res) {
|
||||
// if (res.code == 0) {
|
||||
// // 数据设置
|
||||
// self.order_item_pay_success_handle(index); // 跳转支付页面
|
||||
var data = res.data.data;
|
||||
tt.pay({
|
||||
orderInfo: data.order_info,
|
||||
service: data.service,
|
||||
success(res) {
|
||||
// if (res.code == 0) {
|
||||
// // 数据设置
|
||||
// self.order_item_pay_success_handle(index); // 跳转支付页面
|
||||
|
||||
// tt.navigateTo({
|
||||
// url: "/pages/paytips/paytips?code=9000&total_price=" + self.data.data_list[index]['price']
|
||||
// });
|
||||
// } else {
|
||||
// app.showToast('支付失败');
|
||||
// }
|
||||
// tt.navigateTo({
|
||||
// url: "/pages/paytips/paytips?code=9000&total_price=" + self.data.data_list[index]['price']
|
||||
// });
|
||||
// } else {
|
||||
// app.showToast('支付失败');
|
||||
// }
|
||||
|
||||
// 由于头条支付无法监听支付状态,这里就不做接口轮询了,直接刷新页面
|
||||
self.setData({
|
||||
data_page: 1
|
||||
});
|
||||
self.get_data_list(1);
|
||||
},
|
||||
fail(res) {
|
||||
console.log(res, 'pay-fail')
|
||||
app.showToast('调起收银台失败-'+res.data.code);
|
||||
}
|
||||
// 由于头条支付无法监听支付状态,这里就不做接口轮询了,直接刷新页面
|
||||
self.setData({
|
||||
data_page: 1
|
||||
});
|
||||
break;
|
||||
|
||||
// 钱包支付
|
||||
case 2:
|
||||
self.order_item_pay_success_handle(index);
|
||||
app.showToast('支付成功', 'success');
|
||||
break;
|
||||
|
||||
// 默认
|
||||
default:
|
||||
app.showToast('支付类型有误');
|
||||
}
|
||||
self.get_data_list(1);
|
||||
},
|
||||
fail(res) {
|
||||
console.log(res, 'pay-fail')
|
||||
app.showToast('调起收银台失败-'+res.data.code);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
app.showToast(res.data.msg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -238,42 +238,33 @@ Page({
|
|||
tt.hideLoading();
|
||||
|
||||
if (res.data.code == 0) {
|
||||
// 支付方式类型
|
||||
switch (res.data.data.is_payment_type) {
|
||||
// 正常线上支付
|
||||
case 0:
|
||||
tt.pay({
|
||||
orderInfo: res.data.data.order_info,
|
||||
service: res.data.data.service,
|
||||
success(res) {
|
||||
// if (res.code == 0) {
|
||||
// // 数据设置
|
||||
// self.order_item_pay_success_handle(index); // 跳转支付页面
|
||||
var data = res.data.data;
|
||||
tt.pay({
|
||||
orderInfo: data.order_info,
|
||||
service: data.service,
|
||||
success(res) {
|
||||
// if (res.code == 0) {
|
||||
// // 数据设置
|
||||
// self.order_item_pay_success_handle(index); // 跳转支付页面
|
||||
|
||||
// tt.navigateTo({
|
||||
// url: "/pages/paytips/paytips?code=9000&total_price=" + self.data.data_list[index]['money']
|
||||
// });
|
||||
// } else {
|
||||
// app.showToast('支付失败');
|
||||
// }
|
||||
// tt.navigateTo({
|
||||
// url: "/pages/paytips/paytips?code=9000&total_price=" + self.data.data_list[index]['money']
|
||||
// });
|
||||
// } else {
|
||||
// app.showToast('支付失败');
|
||||
// }
|
||||
|
||||
// 由于头条支付无法监听支付状态,这里就不做接口轮询了,直接刷新页面
|
||||
self.setData({
|
||||
data_page: 1
|
||||
});
|
||||
self.get_data_list(1);
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log(res, 'pay-fail')
|
||||
app.showToast('调起收银台失败-'+res.data.code);
|
||||
}
|
||||
// 由于头条支付无法监听支付状态,这里就不做接口轮询了,直接刷新页面
|
||||
self.setData({
|
||||
data_page: 1
|
||||
});
|
||||
break;
|
||||
|
||||
// 默认
|
||||
default:
|
||||
app.showToast('支付类型有误');
|
||||
}
|
||||
self.get_data_list(1);
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log(res, 'pay-fail')
|
||||
app.showToast('调起收银台失败-'+res.data.code);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
app.showToast(res.data.msg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -222,12 +222,13 @@ Page({
|
|||
success: res => {
|
||||
wx.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data.data;
|
||||
wx.requestPayment({
|
||||
timeStamp: res.data.data.timeStamp,
|
||||
nonceStr: res.data.data.nonceStr,
|
||||
package: res.data.data.package,
|
||||
signType: res.data.data.signType,
|
||||
paySign: res.data.data.paySign,
|
||||
timeStamp: data.timeStamp,
|
||||
nonceStr: data.nonceStr,
|
||||
package: data.package,
|
||||
signType: data.signType,
|
||||
paySign: data.paySign,
|
||||
success: function (res) {
|
||||
// 数据设置
|
||||
self.order_item_pay_success_handle(index);
|
||||
|
|
|
|||
|
|
@ -220,12 +220,13 @@ Page({
|
|||
success: res => {
|
||||
wx.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data.data;
|
||||
wx.requestPayment({
|
||||
timeStamp: res.data.data.timeStamp,
|
||||
nonceStr: res.data.data.nonceStr,
|
||||
package: res.data.data.package,
|
||||
signType: res.data.data.signType,
|
||||
paySign: res.data.data.paySign,
|
||||
timeStamp: data.timeStamp,
|
||||
nonceStr: data.nonceStr,
|
||||
package: data.package,
|
||||
signType: data.signType,
|
||||
paySign: data.paySign,
|
||||
success: function (res) {
|
||||
// 数据设置
|
||||
self.order_item_pay_success_handle(index);
|
||||
|
|
|
|||
Loading…
Reference in New Issue