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

@@ -19,8 +19,7 @@
<view class="cancelstatus-box-line color-base-bg" :class="{ 'opacity-4': state == 0 }"></view>
</view>
<view class="cancelstatus-box cancelstatus-box-last">
<view class="cancelstatus-box-sort color-base-bg" :class="[ state == 1 ? 'opacity': 'opacity-4' ]">
3
<view class="cancelstatus-box-sort color-base-bg" :class="[state == 1 ? 'opacity' : 'opacity-4']">
</view>
<view class="cancelstatus-box-con">
<view class="cancelstatus-box-name">审核通过注销完成</view>
@@ -37,153 +36,153 @@
</template>
<script>
export default {
data() {
return {
state: 0
};
},
onLoad(option) {
// 判断登录
if (!this.storeToken) {
this.$util.redirectTo('/pages_tool/login/login');
} else {
this.getStatus();
}
},
onShow() {
export default {
data() {
return {
state: 0
};
},
onLoad(option) {
// 判断登录
if (!this.storeToken) {
this.$util.redirectTo('/pages_tool/login/login');
} else {
this.getStatus();
},
methods: {
getStatus() {
this.$api.sendRequest({
url: '/membercancel/api/membercancel/info',
success: res => {
if (res.code >= 0 && res.data) {
this.state = res.data.status;
if (this.state == -1) {
this.$util.redirectTo('/pages_tool/member/cancelrefuse');
}
}
if (res.code == -1) {
this.$store.commit('setToken', '');
this.$store.commit('setMemberInfo', '');
this.$store.commit('setMemberInfo', '');
this.$store.dispatch('emptyCart');
this.$util.redirectTo('/pages/index/index');
}
}
});
},
back() {
this.$util.redirectTo('/pages/member/index');
},
revoke() {
uni.showModal({
title: '风险提示',
content: '确定要撤销申请吗?',
confirmColor: '#000000',
success: res => {
if (res.confirm) {
this.$api.sendRequest({
url: '/membercancel/api/membercancel/cancelApply',
success: res => {
if (res.code >= 0) {
this.$util.redirectTo('/pages/member/index');
}
}
});
}
}
});
}
}
};
},
onShow() {
this.getStatus();
},
methods: {
getStatus() {
this.$api.sendRequest({
url: '/membercancel/api/membercancel/info',
success: res => {
if (res.code >= 0 && res.data) {
this.state = res.data.status;
if (this.state == -1) {
this.$util.redirectTo('/pages_tool/member/cancelrefuse');
}
}
if (res.code == -1) {
this.$store.commit('setToken', '');
this.$store.commit('setMemberInfo', '');
this.$store.commit('setMemberInfo', '');
this.$store.dispatch('emptyCart');
this.$util.redirectTo('/pages/index/index');
}
}
});
},
back() {
this.$util.redirectTo('/pages/member/index');
},
revoke() {
uni.showModal({
title: '风险提示',
content: '确定要撤销申请吗?',
confirmColor: '#000000',
success: res => {
if (res.confirm) {
this.$api.sendRequest({
url: '/membercancel/api/membercancel/cancelApply',
success: res => {
if (res.code >= 0) {
this.$util.redirectTo('/pages/member/index');
}
}
});
}
}
});
}
}
};
</script>
<style lang="scss" scoped>
.cancelstatus-wrap {
.cancelstatus-block {
padding: 50rpx;
.cancelstatus-wrap {
.cancelstatus-block {
padding: 50rpx;
}
.cancelstatus-box {
position: relative;
display: flex;
height: 200rpx;
.cancelstatus-box-sort {
width: 36rpx;
height: 36rpx;
text-align: center;
line-height: 36rpx;
border-radius: 50%;
color: #ffffff;
margin-right: 17rpx;
font-size: 24rpx;
}
.cancelstatus-box {
position: relative;
display: flex;
height: 200rpx;
.opacity {
opacity: 1;
.cancelstatus-box-sort {
width: 36rpx;
height: 36rpx;
text-align: center;
line-height: 36rpx;
border-radius: 50%;
color: #ffffff;
margin-right: 17rpx;
font-size: 24rpx;
}
.opacity {
opacity: 1;
&-4 {
opacity: 0.4;
}
}
.cancelstatus-box-name {
font-size: 32rpx;
line-height: 32rpx;
margin-top: 3rpx;
}
.cancelstatus-box-info {
margin-top: 15rpx;
color: #666666;
font-size: 28rpx;
}
.cancelstatus-box-line {
position: absolute;
width: 2rpx;
height: 164rpx;
top: 36rpx;
left: 18rpx;
}
&.cancelstatus-box-last {
height: 80rpx;
&-4 {
opacity: 0.4;
}
}
.cancelstatus-btn {
display: flex;
justify-content: center;
align-items: center;
position: fixed;
bottom: 0;
width: 100%;
height: 150rpx;
.cancelstatus-box-name {
font-size: 32rpx;
line-height: 32rpx;
margin-top: 3rpx;
}
button {
width: 300rpx;
height: 80rpx;
font-size: 28rpx;
line-height: 80rpx;
margin: 0 15rpx;
border-radius: $border-radius;
}
.cancelstatus-box-info {
margin-top: 15rpx;
color: #666666;
font-size: 28rpx;
}
button[type='primary'] {
background-color: unset !important;
color: #333333;
border: 2rpx solid #dddddd;
}
.cancelstatus-box-line {
position: absolute;
width: 2rpx;
height: 164rpx;
top: 36rpx;
left: 18rpx;
}
button:nth-child(2) {
color: #ffffff;
}
&.cancelstatus-box-last {
height: 80rpx;
}
}
.cancelstatus-btn {
display: flex;
justify-content: center;
align-items: center;
position: fixed;
bottom: 0;
width: 100%;
height: 150rpx;
button {
width: 300rpx;
height: 80rpx;
font-size: 28rpx;
line-height: 80rpx;
margin: 0 15rpx;
border-radius: $border-radius;
}
button[type='primary'] {
background-color: unset !important;
color: #333333;
border: 2rpx solid #dddddd;
}
button:nth-child(2) {
color: #ffffff;
}
}
}
</style>