支付适配抖音通用行业交易系统
parent
3356bde116
commit
e2d3950055
|
|
@ -34,8 +34,10 @@
|
|||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<component-nav-back propClass="bg-white" propNameClass="cr-black" propName="购物车" :propFixed="false" :propIsShowBack="false" :propIsRightSlot="false"></component-nav-back>
|
||||
<block v-else>
|
||||
<!-- #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU || H5 || APP -->
|
||||
<component-nav-back propClass="bg-white" propNameClass="cr-black" propName="购物车" :propFixed="false" :propIsShowBack="false" :propIsRightSlot="false"></component-nav-back>
|
||||
<!-- #endif -->
|
||||
</block>
|
||||
</block>
|
||||
|
||||
|
|
|
|||
|
|
@ -347,9 +347,17 @@
|
|||
case 0:
|
||||
var data = res.data.data;
|
||||
// #ifdef APP
|
||||
this.app_pay_handle(this, data, order_id);
|
||||
this.app_pay_handle(this, data, order_id);
|
||||
// #endif
|
||||
// #ifdef MP-TOUTIAO
|
||||
// 头条是否非普通版本支持
|
||||
if(parseInt(data.data.pay_type || 0) == 1) {
|
||||
this.toutiao_transaction_pay_handle(this, data, order_id);
|
||||
} else {
|
||||
this.mp_pay_handle(this, data, order_id);
|
||||
}
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN || MP-ALIPAY || MP-BAIDU || MP-TOUTIAO
|
||||
// #ifdef MP-WEIXIN || MP-ALIPAY || MP-BAIDU
|
||||
this.mp_pay_handle(this, data, order_id);
|
||||
// #endif
|
||||
// #ifdef MP-KUAISHOU
|
||||
|
|
@ -465,6 +473,32 @@
|
|||
self.order_item_pay_fail_handle(data, order_id, '支付失败');
|
||||
},
|
||||
});
|
||||
},
|
||||
// 头条小程序非普通交易支付处理
|
||||
toutiao_transaction_pay_handle(self, data, order_id) {
|
||||
if(!uni.canIUse('requestOrder') || !uni.canIUse('getOrderPayment')) {
|
||||
app.globalData.showToast('请使用真机操作、或小程序基础版本太低!');
|
||||
return false;
|
||||
}
|
||||
uni.requestOrder({
|
||||
data: data.data.data,
|
||||
byteAuthorization: data.data.auth,
|
||||
success: (res) => {
|
||||
uni.getOrderPayment({
|
||||
orderId: res.orderId,
|
||||
success: (res) => {
|
||||
// 数据设置
|
||||
self.order_item_pay_success_handle(data, order_id);
|
||||
},
|
||||
fail: (res) => {
|
||||
self.order_item_pay_fail_handle(data, order_id, '支付失败');
|
||||
}
|
||||
});
|
||||
},
|
||||
fail: (res) => {
|
||||
app.globalData.showToast(res.errMsg+'('+res.errNo+')');
|
||||
}
|
||||
});
|
||||
},
|
||||
// 小程序: 微信、支付宝、百度、头条、QQ
|
||||
mp_pay_handle(self, data, order_id) {
|
||||
|
|
|
|||
|
|
@ -168,7 +168,10 @@
|
|||
* 商品列表模式
|
||||
*/
|
||||
.category-content {
|
||||
height: 100vh;
|
||||
/* #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU || MP-ALIPAY || APP */
|
||||
height: calc(100vh - 134rpx - var(--window-bottom));
|
||||
/* #endif */
|
||||
/* #ifdef H5 */
|
||||
height: calc(100vh - 104rpx - var(--window-bottom));
|
||||
/* #endif */
|
||||
|
|
|
|||
|
|
@ -471,8 +471,11 @@
|
|||
popup_status: false,
|
||||
// 获取搜索框高度
|
||||
search_height: 0,
|
||||
// 底部tab高度 - 只有H5下有值
|
||||
window_bottom_height: uni.getWindowInfo().windowBottom || 0,
|
||||
// 底部tab高度 - 只有H5下有值
|
||||
window_bottom_height: 0,
|
||||
// #ifdef H5
|
||||
window_bottom_height: uni.getWindowInfo().windowBottom || 0,
|
||||
// #endif
|
||||
};
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -51,15 +51,9 @@
|
|||
*/
|
||||
.search-fixed-seat {
|
||||
padding-top: 78rpx;
|
||||
/* #ifdef MP-TOUTIAO */
|
||||
padding-top: 58rpx;
|
||||
/* #endif */
|
||||
}
|
||||
.search-fixed-seat.nav-enable-search {
|
||||
padding-top: 146rpx;
|
||||
/* #ifdef MP-TOUTIAO */
|
||||
padding-top: 88rpx;
|
||||
/* #endif */
|
||||
}
|
||||
.search-content-fixed {
|
||||
position: fixed !important;
|
||||
|
|
|
|||
|
|
@ -316,6 +316,9 @@
|
|||
is_single_page: app.globalData.is_current_single_page() || 0,
|
||||
// 顶部导航返回按钮
|
||||
is_realstore_top_nav_back: app.globalData.data.is_realstore_top_nav_back || 0,
|
||||
// #ifdef MP-TOUTIAO
|
||||
is_realstore_top_nav_back : 0,
|
||||
// #endif
|
||||
is_realstore_top_search_scan: app.globalData.data.is_realstore_top_search_scan || 0,
|
||||
};
|
||||
},
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@
|
|||
app.globalData.showToast(res.data.msg, 'success');
|
||||
setTimeout(function () {
|
||||
uni.redirectTo({
|
||||
url: '/pages/plugins/wallet/user-cash/user-cash',
|
||||
url: '/pages/plugins/wallet/user/user?type=2',
|
||||
});
|
||||
}, 1000);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -8,42 +8,41 @@
|
|||
min-height: 300rpx;
|
||||
}
|
||||
.top-content .content .user-top {
|
||||
/* #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU || MP-ALIPAY || H5 || APP */
|
||||
padding-top: var(--status-bar-height);
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 头部
|
||||
*/
|
||||
.head-base {
|
||||
padding: 40rpx 40rpx 22rpx 40rpx;
|
||||
/* #ifdef MP */
|
||||
/* #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU || MP-ALIPAY || H5 || APP */
|
||||
padding-top: 120rpx;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.head-base .head-id {
|
||||
height: 36rpx;
|
||||
line-height: 36rpx;
|
||||
background: linear-gradient(90deg, #FFE3DC 0%, #FF9F67 100%);
|
||||
}
|
||||
|
||||
.head-avatar {
|
||||
width: 116rpx;
|
||||
height: 116rpx !important;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 头部右上角
|
||||
*/
|
||||
.head-right {
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.head-right .item .badge-icon {
|
||||
top: -10px;
|
||||
right: -2px;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 会员码
|
||||
*/
|
||||
|
|
@ -53,25 +52,22 @@
|
|||
background-size: 100% 100%;
|
||||
color: #FEF6CF;
|
||||
}
|
||||
|
||||
.qrcode-content.divider-r::after {
|
||||
right: 50%;
|
||||
height: 30%;
|
||||
background: #FEF6CF;
|
||||
}
|
||||
|
||||
.qrcode .icon {
|
||||
width: 48rpx;
|
||||
margin-right: 18rpx;
|
||||
position: relative;
|
||||
top: 6rpx;
|
||||
}
|
||||
|
||||
.qrcode .iconfont {
|
||||
top: calc(50% - 10rpx);
|
||||
right: 48rpx;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 底部内容
|
||||
*/
|
||||
|
|
@ -83,7 +79,7 @@
|
|||
.user-bottom.box-shadow {
|
||||
box-shadow: 0px -8px 8px 2px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 行内导航列表
|
||||
*/
|
||||
|
|
@ -91,7 +87,6 @@
|
|||
width: 138rpx;
|
||||
padding: 16rpx 16rpx 16rpx 12rpx;
|
||||
}
|
||||
|
||||
.nav-content .nav-all-order-goods::before {
|
||||
content: '';
|
||||
width: 26rpx;
|
||||
|
|
@ -105,42 +100,35 @@
|
|||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.nav-list .nav-item {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.nav-list .nav-item .item-icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
.nav-list .nav-item .item-desc {
|
||||
margin-right: 50rpx;
|
||||
margin-top: 2rpx;
|
||||
width: calc(100% - 300rpx);
|
||||
}
|
||||
|
||||
.nav-list .nav-item .item-arrow {
|
||||
width: 25rpx;
|
||||
}
|
||||
|
||||
.nav-list-sub {
|
||||
padding: 16rpx 16rpx 16rpx 0;
|
||||
}
|
||||
|
||||
.nav-content .nav-all-order-goods .item .item-icon,
|
||||
.nav-list-sub .item .item-icon {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
}
|
||||
|
||||
.nav-list-sub .item .badge-icon {
|
||||
top: -2px;
|
||||
left: calc(50% + 35rpx);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 聚合导航
|
||||
*/
|
||||
|
|
@ -148,18 +136,15 @@
|
|||
box-sizing: border-box;
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.nav-box .nav-item .item-icon {
|
||||
width: 52rpx;
|
||||
height: 52rpx !important;
|
||||
}
|
||||
|
||||
.nav-box .nav-item .item-desc {
|
||||
margin-right: 50rpx;
|
||||
margin-top: 2rpx;
|
||||
width: calc(100% - 300rpx);
|
||||
}
|
||||
|
||||
.service-nav .show-type-submit {
|
||||
width: 50rpx;
|
||||
height: 50rpx !important;
|
||||
|
|
|
|||
Loading…
Reference in New Issue