Files
lucky_shop/pages_tool/member/cancelrefuse.vue
ZF sun 783c10fc62 refactor: 统一项目内国际化key的命名空间格式
本次提交对全项目的国际化调用进行了规范化重构:
1. 为中文/英文语言包新增了avatar和gender的别名映射,兼容旧有headImg/sex写法
2. 修正了lang.js中的注释路径错误
3. 将所有页面和组件内的$lang调用从短路径改为带业务模块前缀的完整命名空间路径,例如将$lang('title')改为$lang('article.list.title')
4. 优化了i18n-lazy.js的注释说明,补充了正确的key命名格式示例
5. 统一了分销、订单、会员等模块的国际化key层级,确保所有语言调用路径一致
2026-07-04 09:24:35 +08:00

118 lines
2.4 KiB
Vue

<template>
<view class="container" :style="themeColor">
<view class="cancel-wrap">
<view class="cancel-img"><image :src="$util.img('public/uniapp/member/refuse.png')" show-menu-by-longpress></image></view>
<view class="cancel-title">{{ $lang('member.cancelrefuse.title') }}</view>
<view class="cancel-reason">{{ $lang('member.cancelrefuse.cancelrefuse.reasonPrefix') }}{{ reason }}</view>
<view class="cancel-btn">
<button type="primary" @click="toIndex">{{ $lang('member.cancelrefuse.cancelrefuse.back') }}</button>
<button class="color-base-bg" @click="apply">{{ $lang('member.cancelrefuse.cancelrefuse.reapply') }}</button>
</view>
</view>
</view>
</template>
<script>
export default {
components: {},
data() {
return {
reason: ''
};
},
onLoad(option) {
if (option.back) this.back = option.back;
// 判断登录
if (!this.storeToken) {
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL);
} else {
this.getStatus();
}
},
methods: {
getStatus() {
this.$api.sendRequest({
url: '/membercancel/api/membercancel/info',
success: res => {
if (res.code >= 0) {
this.reason = res.data.reason;
} else if (res.code == -1) {
this.$store.commit('setToken', '');
this.$store.commit('setMemberInfo', '');
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL);
}
}
});
},
toIndex() {
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
},
apply() {
this.$util.redirectTo('/pages_tool/member/cancellation');
}
}
};
</script>
<style lang="scss" scoped>
.cancel-wrap {
padding-top: 300rpx;
text-align: center;
.cancel-img {
width: 150rpx;
height: 150rpx;
display: inline-block;
image {
width: 100%;
height: 100%;
}
}
.cancel-title {
text-align: center;
font-size: 32rpx;
line-height: 32rpx;
margin-top: 30rpx;
}
.cancel-reason {
color: #838383;
font-size: 28rpx;
line-height: 50rpx;
margin-top: 20rpx;
padding: 0 75rpx;
}
.cancel-btn {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
margin-top: 173rpx;
button {
width: 300rpx;
height: 84rpx;
font-size: 28rpx;
line-height: 84rpx;
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>