修改bug

parent 16b39adc
...@@ -35,3 +35,6 @@ export const getCityNameByCodeApi = code => instance.post(`/dict/dictProvinceCit ...@@ -35,3 +35,6 @@ export const getCityNameByCodeApi = code => instance.post(`/dict/dictProvinceCit
// 专业目录 // 专业目录
export const getMajorTreeApi = () => instance.post(`/dict/major/tree`); export const getMajorTreeApi = () => instance.post(`/dict/major/tree`);
// 用户申诉
export const appeal = params => instance.post(`/user/appeal`,params);
...@@ -18,41 +18,35 @@ ...@@ -18,41 +18,35 @@
<view class="content"> <view class="content">
<view class="name"> <view class="name">
<view class="t1">账户申述</view> <view class="t1">账户申述</view>
<textarea v-model="value" placeholder="请填写申述理由" /> <textarea v-model="reason" placeholder="请填写申述理由" />
</view> </view>
</view> </view>
<view class="btn-wrap flex-center"> <view class="btn-wrap flex-center">
<button class="bottom-btn" @tap="nextStep">提交</button> <button class="bottom-btn" @tap="appealFn">提交</button>
</view> </view>
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref } from "vue"; import { ref } from "vue";
import { getLoginUserApi } from "@/api/user.js"; import { appeal } from "@/api/user.js";
onLoad(() => { const reason = ref("");
onLoad(() => {});
}); const appealFn = () => {
onShow(() => { appeal({ appealMessage: reason.value }).then(res => {
getLoginUserApiFn(); if (res.code === 200) {
}); xma.showToast({
function getLoginUserApiFn() { title: res.message,
getLoginUserApi().then(user => { icon: "none",
// if (user.code == 200 && user.data) { duration: 1900
// const { avatarPath, name, phone, position } = user.data; });
// params.avatarPath = avatarPath; setTimeout(() => {
// params.name = name; xma.reLaunch({
// params.phone = phone; url: "/pages/login/index"
// params.position = position; });
// if (step.value !== 2) { }, 2000);
// if (name) { }
// step.value = 3;
// }
// }
// }
}); });
}
const nextStep = () => {
}; };
</script> </script>
...@@ -226,8 +220,8 @@ const nextStep = () => { ...@@ -226,8 +220,8 @@ const nextStep = () => {
padding: 16rpx 0; padding: 16rpx 0;
background-color: #ffffff; background-color: #ffffff;
border-top: 2rpx solid rgb(31 35 41 / 15%); border-top: 2rpx solid rgb(31 35 41 / 15%);
.bottom-btn{ .bottom-btn {
background: #1F86FF; background: #1f86ff;
width: 622rpx; width: 622rpx;
height: 80rpx; height: 80rpx;
line-height: 80rpx; line-height: 80rpx;
......
This diff is collapsed.
...@@ -87,19 +87,19 @@ const navList = [ ...@@ -87,19 +87,19 @@ const navList = [
url: "/pages/login/index", url: "/pages/login/index",
text: "退出登录" text: "退出登录"
}, },
{ // {
icon: new URL("@/static/image/user/loginout.png", import.meta.url).href, // icon: new URL("@/static/image/user/loginout.png", import.meta.url).href,
url: "/pages/test", // url: "/pages/test",
text: "测试页面" // text: "测试页面"
}, // },
{ // {
icon: new URL("@/static/image/user/loginout.png", import.meta.url).href, // icon: new URL("@/static/image/user/loginout.png", import.meta.url).href,
url: "/pages/login/test", // url: "/pages/login/test",
fn: () => { // fn: () => {
removeToken(); // removeToken();
}, // },
text: "退出登录(去测试登录)" // text: "退出登录(去测试登录)"
} // }
]; ];
/* 个人信息 */ /* 个人信息 */
const realName = ref(""); const realName = ref("");
......
import axios from "axios"; import axios from "axios";
import { getToken } from "./token"; import { getToken } from "./token";
// const baseURL = "https://lygsh-api.wjzpgz.com/"; const baseURL = "https://lygsh-api.wjzpgz.com/";
const baseURL = "http://192.168.11.48:8080/"; // const baseURL = "http://192.168.11.48:8080/";
// 创建一个 axios 实例 // 创建一个 axios 实例
const instance = axios.create({ const instance = axios.create({
baseURL, // 设置基础 URL baseURL, // 设置基础 URL
...@@ -36,13 +36,14 @@ instance.interceptors.request.use( ...@@ -36,13 +36,14 @@ instance.interceptors.request.use(
// 响应拦截器 // 响应拦截器
instance.interceptors.response.use( instance.interceptors.response.use(
response => { response => {
if (response.data.code === 4 || response.data.code === 8) { let { code, message } = response.data;
if (code === 4 || code === 8) {
uni.showToast({ uni.showToast({
title: response.data.message, title: message,
icon: "none" icon: "none"
}); });
} }
if (response.data.code === 9) { if (code === 9) {
const path = getCurrentPages()[0].$page.path const path = getCurrentPages()[0].$page.path
if(path === '/pages/user/resume/essentialInformation/index') return if(path === '/pages/user/resume/essentialInformation/index') return
uni.showModal({ uni.showModal({
...@@ -58,6 +59,21 @@ instance.interceptors.response.use( ...@@ -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() 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