|
|
@@ -5,7 +5,7 @@
|
|
|
<image class="img" :src="`${constant.imgUrl}/icon/scan/scan.png`" mode="scaleToFill" />
|
|
|
<view class="show-code">请出示付款码</view>
|
|
|
<view class="btn-default result" @click="checkPay()">查询结果</view>
|
|
|
- <view @click="cancelPay" class="btn-default result">取消</view>
|
|
|
+ <view @click="cancelPayFn" class="btn-default result">取消</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view v-else>
|
|
|
@@ -17,6 +17,11 @@
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
+
|
|
|
+ <uni-popup ref="cancelPayRef" type="dialog">
|
|
|
+ <uni-popup-dialog type="info" cancelText="取消" confirmText="确认" title="提示" content="确认取消?" @confirm="confirmToCancel"></uni-popup-dialog>
|
|
|
+ </uni-popup>
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -81,7 +86,25 @@ export default {
|
|
|
payFinish(){
|
|
|
this.$emit('payFinish')
|
|
|
},
|
|
|
- cancelPay(){
|
|
|
+ cancelPayFn(){
|
|
|
+ let that = this
|
|
|
+ uni.showLoading({title: '确认中',mask:true})
|
|
|
+ codePayCheck({id:this.orderId}).then(res=>{
|
|
|
+ uni.hideLoading()
|
|
|
+ console.log(res)
|
|
|
+ if(res.code == 1){
|
|
|
+ if(res.data.returnStatus == 'SUCCESS'){
|
|
|
+ that.showSuccess = true
|
|
|
+ setTimeout(function(){
|
|
|
+ that.payFinish()
|
|
|
+ },1500)
|
|
|
+ }else{
|
|
|
+ that.$refs.cancelPayRef.open('center')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ confirmToCancel(){
|
|
|
this.$emit('cancelPay')
|
|
|
}
|
|
|
},
|