revert: 所有代码与custom/common分支同
This commit is contained in:
@@ -7,17 +7,15 @@
|
||||
<text class="unit price-font">¥</text>
|
||||
<text class="money price-font">{{ payInfo.pay_money | moneyFormat }}</text>
|
||||
</view>
|
||||
|
||||
|
||||
<block v-if="payTypeList.length > 0">
|
||||
<view class="pay-type">
|
||||
<view class="payment-item" v-for="(item, index) in payTypeList" :key="index"
|
||||
@click="payIndex = index">
|
||||
<view class="payment-item" v-for="(item, index) in payTypeList" :key="index" @click="payIndex = index">
|
||||
<view>
|
||||
<text class="iconfont" :class="item.icon"></text>
|
||||
<text class="name">{{ item.name }}</text>
|
||||
</view>
|
||||
<text class="iconfont"
|
||||
:class="payIndex == index ? 'icon-yuan_checked color-base-text' : 'icon-checkboxblank'"></text>
|
||||
<text class="iconfont" :class="payIndex == index ? 'icon-yuan_checked color-base-text' : 'icon-checkboxblank'"></text>
|
||||
</view>
|
||||
</view>
|
||||
<button type="primary" @click="confirm">确认支付</button>
|
||||
@@ -33,13 +31,11 @@
|
||||
|
||||
<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 {
|
||||
components: {
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
},
|
||||
components: { nsLogin, nsEmpty },
|
||||
data() {
|
||||
return {
|
||||
payIndex: 0,
|
||||
@@ -90,7 +86,7 @@ export default {
|
||||
this.autoPay();
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -110,10 +106,10 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
autoPay() {
|
||||
autoPay(){
|
||||
if (!this.payTypeList.length) return;
|
||||
if (this.$util.isWeiXin()) {
|
||||
this.payTypeList.forEach((item, index) => {
|
||||
this.payTypeList.forEach((item, index) => {
|
||||
if (item.type == 'wechatpay') {
|
||||
this.payIndex = index;
|
||||
this.confirm();
|
||||
@@ -290,7 +286,7 @@ export default {
|
||||
// #endif
|
||||
},
|
||||
watch: {
|
||||
storeToken: function (nVal, oVal) {
|
||||
storeToken: function(nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.getPayInfo();
|
||||
}
|
||||
@@ -314,7 +310,6 @@ export default {
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
padding: 80rpx 26rpx;
|
||||
|
||||
.content {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
@@ -323,16 +318,13 @@ export default {
|
||||
padding: 0 60rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.money-wrap {
|
||||
font-weight: bold;
|
||||
margin: 40rpx 0;
|
||||
|
||||
.unit {
|
||||
font-size: 40rpx;
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
|
||||
.money {
|
||||
font-size: 70rpx;
|
||||
}
|
||||
@@ -342,7 +334,6 @@ export default {
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.payment-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -350,43 +341,34 @@ export default {
|
||||
height: 90rpx;
|
||||
border-bottom: 2rpx solid $color-line;
|
||||
padding: 20rpx 30rpx;
|
||||
|
||||
&:last-of-type {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
>view {
|
||||
> view {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.name {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-size: 64rpx;
|
||||
}
|
||||
|
||||
.icon-weixin1 {
|
||||
color: #24af41;
|
||||
}
|
||||
|
||||
.icon-zhifubaozhifu- {
|
||||
color: #00a0e9;
|
||||
}
|
||||
|
||||
.icon-yuan_checked {
|
||||
font-size: 40rpx;
|
||||
color: $base-color;
|
||||
}
|
||||
|
||||
.icon-checkboxblank {
|
||||
font-size: 40rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
width: 100%;
|
||||
margin-top: 80rpx !important;
|
||||
|
||||
Reference in New Issue
Block a user