修改bug

parent 16b39adc
......@@ -35,3 +35,6 @@ export const getCityNameByCodeApi = code => instance.post(`/dict/dictProvinceCit
// 专业目录
export const getMajorTreeApi = () => instance.post(`/dict/major/tree`);
// 用户申诉
export const appeal = params => instance.post(`/user/appeal`,params);
......@@ -18,41 +18,35 @@
<view class="content">
<view class="name">
<view class="t1">账户申述</view>
<textarea v-model="value" placeholder="请填写申述理由" />
<textarea v-model="reason" placeholder="请填写申述理由" />
</view>
</view>
<view class="btn-wrap flex-center">
<button class="bottom-btn" @tap="nextStep">提交</button>
<button class="bottom-btn" @tap="appealFn">提交</button>
</view>
</div>
</template>
<script setup>
import { ref } from "vue";
import { getLoginUserApi } from "@/api/user.js";
onLoad(() => {
});
onShow(() => {
getLoginUserApiFn();
});
function getLoginUserApiFn() {
getLoginUserApi().then(user => {
// if (user.code == 200 && user.data) {
// const { avatarPath, name, phone, position } = user.data;
// params.avatarPath = avatarPath;
// params.name = name;
// params.phone = phone;
// params.position = position;
// if (step.value !== 2) {
// if (name) {
// step.value = 3;
// }
// }
// }
import { appeal } from "@/api/user.js";
const reason = ref("");
onLoad(() => {});
const appealFn = () => {
appeal({ appealMessage: reason.value }).then(res => {
if (res.code === 200) {
xma.showToast({
title: res.message,
icon: "none",
duration: 1900
});
setTimeout(() => {
xma.reLaunch({
url: "/pages/login/index"
});
}, 2000);
}
});
}
const nextStep = () => {
};
</script>
......@@ -226,8 +220,8 @@ const nextStep = () => {
padding: 16rpx 0;
background-color: #ffffff;
border-top: 2rpx solid rgb(31 35 41 / 15%);
.bottom-btn{
background: #1F86FF;
.bottom-btn {
background: #1f86ff;
width: 622rpx;
height: 80rpx;
line-height: 80rpx;
......
This diff is collapsed.
......@@ -87,19 +87,19 @@ const navList = [
url: "/pages/login/index",
text: "退出登录"
},
{
icon: new URL("@/static/image/user/loginout.png", import.meta.url).href,
url: "/pages/test",
text: "测试页面"
},
{
icon: new URL("@/static/image/user/loginout.png", import.meta.url).href,
url: "/pages/login/test",
fn: () => {
removeToken();
},
text: "退出登录(去测试登录)"
}
// {
// icon: new URL("@/static/image/user/loginout.png", import.meta.url).href,
// url: "/pages/test",
// text: "测试页面"
// },
// {
// icon: new URL("@/static/image/user/loginout.png", import.meta.url).href,
// url: "/pages/login/test",
// fn: () => {
// removeToken();
// },
// text: "退出登录(去测试登录)"
// }
];
/* 个人信息 */
const realName = ref("");
......
import axios from "axios";
import { getToken } from "./token";
// const baseURL = "https://lygsh-api.wjzpgz.com/";
const baseURL = "http://192.168.11.48:8080/";
const baseURL = "https://lygsh-api.wjzpgz.com/";
// const baseURL = "http://192.168.11.48:8080/";
// 创建一个 axios 实例
const instance = axios.create({
baseURL, // 设置基础 URL
......@@ -36,13 +36,14 @@ instance.interceptors.request.use(
// 响应拦截器
instance.interceptors.response.use(
response => {
if (response.data.code === 4 || response.data.code === 8) {
let { code, message } = response.data;
if (code === 4 || code === 8) {
uni.showToast({
title: response.data.message,
title: message,
icon: "none"
});
}
if (response.data.code === 9) {
if (code === 9) {
const path = getCurrentPages()[0].$page.path
if(path === '/pages/user/resume/essentialInformation/index') return
uni.showModal({
......@@ -58,6 +59,21 @@ instance.interceptors.response.use(
}
}
});
} else if (code === 13) {
uni.showModal({
title: '您的帐号已失效',
content: '由于您超过1月未登录现已将您的账号禁用您可完成申述后继续使用',
showCancel: true,
confirmText: '立即申述',
success: function (confirm) {
if (confirm.confirm) {
xma.navigateTo({
url: '/pages/postionList/appeal/index'
})
}
}
});
}
uni.hideLoading()
// 在这里可以对响应数据进行预处理
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment