|
|
@@ -21,13 +21,18 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view v-else>
|
|
|
- <view style="text-align:center;margin:20upx auto 10upx auto;">
|
|
|
- <view class="balance" style="margin-bottom:30upx;">扫二维码付款</view>
|
|
|
+ <view style="text-align:center;margin:10upx auto 10upx auto;">
|
|
|
+ <view class="balance" style="margin-bottom:25upx;">扫二维码付款</view>
|
|
|
<view style="margin-bottom:20upx;">
|
|
|
- <button @click="changePayWay(0)" class="admin-button-com mini-btn" :class="payWay == 0 ? 'blue' : 'default'">微信</button>
|
|
|
- <button @click="changePayWay(1)" style="margin-left:20upx;" class="admin-button-com mini-btn" :class="payWay == 1 ? 'blue' : 'default'">支付宝</button>
|
|
|
+ <button @click="changePayWay(0)" class="admin-button-com middle" :class="payWay == 0 ? 'blue' : 'default'">微信</button>
|
|
|
+ <button @click="changePayWay(1)" style="margin-left:40upx;" class="admin-button-com middle" :class="payWay == 1 ? 'blue' : 'default'">支付宝</button>
|
|
|
+ <button @click="changePayWay(2)" style="margin-left:40upx;" class="admin-button-com middle" :class="payWay == 2 ? 'blue' : 'default'">欠款</button>
|
|
|
</view>
|
|
|
- <image mode="widthFix" style="width:400upx;margin:0 auto;" :src="payQrCodeUrl"></image>
|
|
|
+ <image mode="widthFix" style="width:350upx;margin:0 auto;" :src="payQrCodeUrl"></image>
|
|
|
+ <view style="margin-top:35upx;">
|
|
|
+ <button style="width:25vh;" @click="goBack()" class="admin-button-com big default">返回首页</button>
|
|
|
+ </view>
|
|
|
+ <view style="color:#CCCCCC;margin-top:20upx;">15分钟后,订单自动变成欠款单 <text @click="cancelOrder()" style="color:#666666;margin-left:10upx;text-decoration:underline;">取消订单</text></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -35,7 +40,7 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { codePayCheck,scanPay,scanPayCheck} from "@/api/order/index";
|
|
|
+import { codePayCheck,scanPay,scanPayCheck,cancel,debtPay} from "@/api/order/index";
|
|
|
export default {
|
|
|
name: "toPay",
|
|
|
components: {
|
|
|
@@ -97,7 +102,22 @@ export default {
|
|
|
},
|
|
|
changePayWay(payWay){
|
|
|
this.payWay = payWay
|
|
|
- this.toScanPay()
|
|
|
+ let that = this
|
|
|
+ if(payWay == 2){
|
|
|
+ that.$util.confirmModal({content:'确认欠款?'},() => {
|
|
|
+ clearInterval(this.INT)
|
|
|
+ debtPay({id:this.orderId}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ that.$msg(res.msg)
|
|
|
+ setTimeout(function(){
|
|
|
+ uni.navigateBack()
|
|
|
+ },1000)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.toScanPay()
|
|
|
+ }
|
|
|
},
|
|
|
toScanPay(){
|
|
|
let that = this
|
|
|
@@ -134,6 +154,23 @@ export default {
|
|
|
},
|
|
|
handPay(){
|
|
|
this.requestCodePay('123')
|
|
|
+ },
|
|
|
+ goBack(){
|
|
|
+ uni.navigateBack()
|
|
|
+ },
|
|
|
+ cancelOrder(){
|
|
|
+ let that = this
|
|
|
+ that.$util.confirmModal({content:'确认取消?'},() => {
|
|
|
+ clearInterval(this.INT)
|
|
|
+ cancel({id:this.orderId}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ that.$msg(res.msg)
|
|
|
+ setTimeout(function(){
|
|
|
+ uni.navigateBack()
|
|
|
+ },1000)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
};
|
|
|
@@ -141,7 +178,7 @@ export default {
|
|
|
<style lang="scss" scoped>
|
|
|
.app-content {
|
|
|
.callback-wrap {
|
|
|
- padding-top: 50upx;
|
|
|
+ padding-top: 30upx;
|
|
|
background-repeat: no-repeat;
|
|
|
background-size: 100% auto;
|
|
|
position: relative;
|
|
|
@@ -210,8 +247,8 @@ export default {
|
|
|
margin: 20upx 0;
|
|
|
}
|
|
|
.balance{
|
|
|
- margin-top:40upx;
|
|
|
- font-size:36upx;
|
|
|
+ margin-top:30upx;
|
|
|
+ font-size:33upx;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
</style>
|