chore(组件): 组件尽量使用异步导入模式

This commit is contained in:
2026-01-04 14:40:00 +08:00
parent 4da852944e
commit 9415f397d2
172 changed files with 11520 additions and 10979 deletions

View File

@@ -1,48 +1,48 @@
<template>
<view>
<view class="error-msg">{{errorMsg}}</view>
<view class="error-msg">{{ errorMsg }}</view>
</view>
</template>
<script>
export default {
data() {
return {
outTradeNo:'',
errorMsg:'',
}
},
onLoad(option) {
if (option.merchant_trade_no){
this.outTradeNo = option.merchant_trade_no;
this.getOrderDetailPath();
}else{
this.errorMsg = '缺少merchant_trade_no参数';
}
},
methods: {
getOrderDetailPath(){
this.$api.sendRequest({
url: '/api/pay/outTradeNoToOrderDetailPath',
data:{
out_trade_no : this.outTradeNo,
},
success: res => {
if (res.code < 0) {
this.errorMsg = res.message || '未知错误';
}else{
this.$util.redirectTo(res.data);
}
export default {
data() {
return {
outTradeNo: '',
errorMsg: '',
}
},
onLoad(option) {
if (option.merchant_trade_no) {
this.outTradeNo = option.merchant_trade_no;
this.getOrderDetailPath();
} else {
this.errorMsg = '缺少merchant_trade_no参数';
}
},
methods: {
getOrderDetailPath() {
this.$api.sendRequest({
url: '/api/pay/outTradeNoToOrderDetailPath',
data: {
out_trade_no: this.outTradeNo,
},
success: res => {
if (res.code < 0) {
this.errorMsg = res.message || '未知错误';
} else {
this.$util.redirectTo(res.data);
}
});
},
}
});
},
}
},
}
</script>
<style>
.error-msg{
text-align: center;
padding-top: 10vh;
}
.error-msg {
text-align: center;
padding-top: 10vh;
}
</style>