chore(代码合并): 代码从Custom/common分支合并
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="cashier">
|
||||
<view class="cashier" :style="themeColor">
|
||||
<block v-if="payInfo">
|
||||
<block v-if="payInfo.pay_status == 0">
|
||||
<text class="content">{{ payInfo.pay_body }}</text>
|
||||
@@ -31,11 +30,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Weixin } from 'common/js/wx-jssdk.js';
|
||||
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||
|
||||
export default {
|
||||
import { Weixin } from 'common/js/wx-jssdk.js';
|
||||
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||
|
||||
export default {
|
||||
components: { nsLogin, nsEmpty },
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<scroll-view scroll-y="true" class="pay-container">
|
||||
<view class="payment-amount">
|
||||
<text class="amount-tit">{{ $lang('paymentAmount') }}</text>
|
||||
<view class="amount-num">
|
||||
{{ $lang('common.currencySymbol') }}
|
||||
<text>{{ payInfo.pay_money }}</text>
|
||||
<view :style="themeColor">
|
||||
<scroll-view scroll-y="true" class="pay-container">
|
||||
<view class="payment-amount">
|
||||
<text class="amount-tit">{{ $lang('paymentAmount') }}</text>
|
||||
<view class="amount-num">
|
||||
{{ $lang('common.currencySymbol') }}
|
||||
<text>{{ payInfo.pay_money }}</text>
|
||||
</view>
|
||||
<view class="payment-name">{{ payInfo.pay_body }}</view>
|
||||
</view>
|
||||
<view class="payment-name">{{ payInfo.pay_body }}</view>
|
||||
</view>
|
||||
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
|
||||
</scroll-view>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script>
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
@@ -71,38 +72,45 @@ export default {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
@mixin flex-column {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
@mixin flex-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.payment-amount {
|
||||
@include flex-column;
|
||||
margin: $margin-updown $margin-both;
|
||||
border-radius: 8rpx;
|
||||
padding: 20rpx 0 58rpx 0;
|
||||
background-color: #fff;
|
||||
|
||||
.amount-tit {
|
||||
font-size: $font-size-base;
|
||||
color: #838383;
|
||||
line-height: 1;
|
||||
margin-top: 44rpx;
|
||||
}
|
||||
|
||||
.amount-num {
|
||||
color: #000;
|
||||
margin-top: 36rpx;
|
||||
line-height: 1;
|
||||
|
||||
text {
|
||||
font-size: $font-size-toolbar;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
|
||||
.amount-desc {
|
||||
font-size: $font-size-tag;
|
||||
color: #838383;
|
||||
@@ -111,6 +119,7 @@ export default {
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
line-height: 1;
|
||||
|
||||
text {
|
||||
width: 100%;
|
||||
display: block;
|
||||
@@ -119,6 +128,7 @@ export default {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.payment-name {
|
||||
width: 90%;
|
||||
overflow: hidden;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="container">
|
||||
<view class="container" :style="themeColor">
|
||||
<template v-if="payInfo.pay_status != undefined">
|
||||
<view class="result-box">
|
||||
<template v-if="payInfo.pay_status">
|
||||
|
||||
@@ -1,94 +1,93 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="launch-mask" v-if="show == true">
|
||||
<view class="mask-img">
|
||||
<image :src="$util.img('public/uniapp/pay/invite_friends_share.png')" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="mask-word">点击右上角跳转到浏览器打开</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'wx_pay',
|
||||
data() {
|
||||
return {
|
||||
show : true,
|
||||
wx_alipay : "",
|
||||
out_trade_no : ""
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.wx_alipay = options.wx_alipay || '';
|
||||
this.out_trade_no = options.out_trade_no || '';
|
||||
if(!this.$util.isWeiXin() && this.wx_alipay){
|
||||
this.show = false;
|
||||
location.href = this.wx_alipay;
|
||||
}
|
||||
this.checkPayStatus();
|
||||
},
|
||||
methods: {
|
||||
getPayInfo(out_trade_no) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/pay/info',
|
||||
data: {
|
||||
out_trade_no
|
||||
},
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.checkPayStatus();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
checkPayStatus() {
|
||||
var that = this;
|
||||
var timer = setInterval(() => {
|
||||
that.$api.sendRequest({
|
||||
url: '/api/pay/status',
|
||||
data: { out_trade_no: that.out_trade_no },
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
if (res.data.pay_status == 2) {
|
||||
clearInterval(timer);
|
||||
that.$util.redirectTo('/pages_tool/pay/result', { code: that.out_trade_no }, '', 'redirectTo');
|
||||
}
|
||||
} else {
|
||||
clearInterval(timer);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.launch-mask{
|
||||
position:fixed;
|
||||
top:0px;
|
||||
left: 0px;
|
||||
width:100%;
|
||||
height: 100%;
|
||||
background:rgba(0,0,0,0.8);
|
||||
.mask-img{
|
||||
text-align: right;
|
||||
margin:10% 10px 10px 30px;
|
||||
image{
|
||||
width: 50px;
|
||||
height:117px;
|
||||
margin-right:9%
|
||||
}
|
||||
}
|
||||
.mask-word{
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
text{
|
||||
color:#FF0036 !important
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<view class="launch-mask" v-if="show == true" :style="themeColor">
|
||||
<view class="mask-img">
|
||||
<image :src="$util.img('public/uniapp/pay/invite_friends_share.png')" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="mask-word">点击右上角跳转到浏览器打开</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'wx_pay',
|
||||
data() {
|
||||
return {
|
||||
show : true,
|
||||
wx_alipay : "",
|
||||
out_trade_no : ""
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.wx_alipay = options.wx_alipay || '';
|
||||
this.out_trade_no = options.out_trade_no || '';
|
||||
if(!this.$util.isWeiXin() && this.wx_alipay){
|
||||
this.show = false;
|
||||
location.href = this.wx_alipay;
|
||||
}
|
||||
this.checkPayStatus();
|
||||
},
|
||||
methods: {
|
||||
getPayInfo(out_trade_no) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/pay/info',
|
||||
data: {
|
||||
out_trade_no
|
||||
},
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.checkPayStatus();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
checkPayStatus() {
|
||||
var that = this;
|
||||
var timer = setInterval(() => {
|
||||
that.$api.sendRequest({
|
||||
url: '/api/pay/status',
|
||||
data: { out_trade_no: that.out_trade_no },
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
if (res.data.pay_status == 2) {
|
||||
clearInterval(timer);
|
||||
that.$util.redirectTo('/pages_tool/pay/result', { code: that.out_trade_no }, '', 'redirectTo');
|
||||
}
|
||||
} else {
|
||||
clearInterval(timer);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.launch-mask{
|
||||
position:fixed;
|
||||
top:0px;
|
||||
left: 0px;
|
||||
width:100%;
|
||||
height: 100%;
|
||||
background:rgba(0,0,0,0.8);
|
||||
.mask-img{
|
||||
text-align: right;
|
||||
margin:10% 10px 10px 30px;
|
||||
image{
|
||||
width: 50px;
|
||||
height:117px;
|
||||
margin-right:9%
|
||||
}
|
||||
}
|
||||
.mask-word{
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
text{
|
||||
color:#FF0036 !important
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user