Commit 1f7288c1 authored by 李明环(东信)'s avatar 李明环(东信)

新增个人页面

parent 7f06769f
......@@ -22,6 +22,7 @@
"@dcloudio/uni-mp-weixin": "3.0.0-4000720240327002",
"@dcloudio/uni-mp-xhs": "3.0.0-4000720240327002",
"@dcloudio/uni-quickapp-webview": "3.0.0-4000720240327002",
"axios": "^1.7.2",
"pinia": "2.0.36",
"vue": "^3.3.11",
"vue-i18n": "^9.1.9",
......@@ -39,16 +40,16 @@
"@vue/tsconfig": "^0.1.3",
"rexma-cli": "^1.9.3",
"sass": "^1.77.6",
"typescript": "^4.9.4",
"unplugin-auto-import": "^0.17.6",
"vite": "4.3.5",
"vue-tsc": "^1.0.24",
"stylelint": "^15.10.2",
"stylelint-config-html": "^1.1.0",
"stylelint-config-recess-order": "^4.3.0",
"stylelint-config-recommended-scss": "^12.0.0",
"stylelint-config-recommended-vue": "^1.5.0",
"stylelint-config-standard": "^34.0.0",
"stylelint-config-standard-scss": "^10.0.0"
"stylelint-config-standard-scss": "^10.0.0",
"typescript": "^4.9.4",
"unplugin-auto-import": "^0.17.6",
"vite": "4.3.5",
"vue-tsc": "^1.0.24"
}
}
......@@ -50,6 +50,9 @@ importers:
'@dcloudio/uni-quickapp-webview':
specifier: 3.0.0-4000720240327002
version: 3.0.0-4000720240327002(postcss@8.4.40)(rollup@3.29.4)(vue@3.4.34(typescript@4.9.5))
axios:
specifier: ^1.7.2
version: 1.7.2
pinia:
specifier: 2.0.36
version: 2.0.36(typescript@4.9.5)(vue@3.4.34(typescript@4.9.5))
......@@ -1591,6 +1594,9 @@ packages:
peerDependencies:
postcss: ^8.1.0
axios@1.7.2:
resolution: {integrity: sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==}
babel-jest@27.5.1:
resolution: {integrity: sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg==}
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
......@@ -2186,6 +2192,10 @@ packages:
resolution: {integrity: sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==}
engines: {node: '>= 6'}
form-data@4.0.0:
resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==}
engines: {node: '>= 6'}
forwarded@0.2.0:
resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==}
engines: {node: '>= 0.6'}
......@@ -3190,6 +3200,9 @@ packages:
resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==}
engines: {node: '>= 0.10'}
proxy-from-env@1.1.0:
resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==}
psl@1.9.0:
resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==}
......@@ -6349,6 +6362,14 @@ snapshots:
postcss: 8.4.40
postcss-value-parser: 4.2.0
axios@1.7.2:
dependencies:
follow-redirects: 1.15.6
form-data: 4.0.0
proxy-from-env: 1.1.0
transitivePeerDependencies:
- debug
babel-jest@27.5.1(@babel/core@7.24.9):
dependencies:
'@babel/core': 7.24.9
......@@ -6985,6 +7006,12 @@ snapshots:
combined-stream: 1.0.8
mime-types: 2.1.35
form-data@4.0.0:
dependencies:
asynckit: 0.4.0
combined-stream: 1.0.8
mime-types: 2.1.35
forwarded@0.2.0: {}
fraction.js@4.3.7: {}
......@@ -8170,6 +8197,8 @@ snapshots:
forwarded: 0.2.0
ipaddr.js: 1.9.1
proxy-from-env@1.1.0: {}
psl@1.9.0: {}
punycode@2.3.1: {}
......
<template>
</template>
<script setup lang="ts">
onLaunch(() => {
console.log("App Launch");
});
onShow(() => {
console.log("App Show");
});
onHide(() => {
console.log("App Hide");
});
</script>
<style></style>
<style lang="scss">
@import "@/static/style/common.scss";
.multi-line {
display: -webkit-box; /* 作为弹性伸缩盒子模型显示 */
overflow: hidden; /* 溢出隐藏 */
text-overflow: ellipsis; /* 溢出显示省略号 */
-webkit-box-orient: vertical; /* 垂直排列子元素 */
-webkit-line-clamp: 1; /* 显示的行数 */
}
</style>
<template>
<div class="nav-bar flex-between" :style="{ height: height }">
<div class="left">
<slot name="left"></slot>
</div>
<div class="left">
<slot name="title"></slot>
</div>
<div class="left">
<slot name="right"></slot>
</div>
</div>
</template>
<script setup>
const height = "44px";
</script>
<style lang="scss" scoped>
.nav-bar {
box-sizing: border-box;
width: 750rpx;
padding: 0 32rpx;
color: #ffffff;
}
</style>
{
"easycom": {
"autoscan": true,
"custom": {
"^wd-(.*)": "wot-design-uni/components/wd-$1/wd-$1.vue"
}
},
"pages": [
{
"path": "pages/postionList/index",
"style": {
"navigationBarTitleText": "职位"
}
},
{
"path": "pages/messageList/index",
"style": {
"navigationBarTitleText": "消息"
}
},
{
"path": "pages/user/index",
"style": {
"navigationBarTitleText": "我的"
}
},
{
"path": "pages/dynamic/index",
"style": {
"navigationBarTitleText": "动态"
}
},
{
"path": "pages/policy/index",
"style": {
"navigationBarTitleText": "政策"
}
}
],
"tabBar": {
"color": "#646A73",
"selectedColor": "#007AFF",
"borderStyle": "black",
"backgroundColor": "#FFFFFF",
"position": "bottom",
"list": [
{
"pagePath": "pages/postionList/index",
"iconPath": "static/image/tabBar/home.png",
"selectedIconPath": "static/image/tabBar/homeActive.png",
"text": "首页"
},
{
"pagePath": "pages/policy/index",
"iconPath": "static/image/tabBar/policy.png",
"selectedIconPath": "static/image/tabBar/policyActive.png",
"text": "政策"
},
{
"pagePath": "pages/dynamic/index",
"iconPath": "static/image/tabBar/community.png",
"selectedIconPath": "static/image/tabBar/communityActive.png",
"text": "动态"
},
{
"pagePath": "pages/messageList/index",
"iconPath": "static/image/tabBar/msg.png",
"selectedIconPath": "static/image/tabBar/msgActive.png",
"text": "消息"
},
{
"pagePath": "pages/user/index",
"iconPath": "static/image/tabBar/user.png",
"selectedIconPath": "static/image/tabBar/userActive.png",
"text": "我的"
}
]
},
"globalStyle": {
"navigationBarTitleText": "equipment-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
}
}
\ No newline at end of file
"easycom": {
"autoscan": true,
"custom": {
"^wd-(.*)": "wot-design-uni/components/wd-$1/wd-$1.vue"
}
},
"pages": [
{
"path": "pages/postionList/index",
"style": {
"navigationBarTitleText": "职位"
}
},
{
"path": "pages/messageList/index",
"style": {
"navigationBarTitleText": "消息"
}
},
{
"path": "pages/user/index",
"style": {
"navigationBarTitleText": "我的",
"navigationStyle": "custom"
}
},
{
"path": "pages/dynamic/index",
"style": {
"navigationBarTitleText": "动态"
}
},
{
"path": "pages/policy/index",
"style": {
"navigationBarTitleText": "政策"
}
}
],
"tabBar": {
"color": "#646A73",
"selectedColor": "#007AFF",
"borderStyle": "black",
"backgroundColor": "#FFFFFF",
"position": "bottom",
"list": [
{
"pagePath": "pages/postionList/index",
"iconPath": "static/image/tabBar/home.png",
"selectedIconPath": "static/image/tabBar/homeActive.png",
"text": "首页"
},
{
"pagePath": "pages/policy/index",
"iconPath": "static/image/tabBar/policy.png",
"selectedIconPath": "static/image/tabBar/policyActive.png",
"text": "政策"
},
{
"pagePath": "pages/dynamic/index",
"iconPath": "static/image/tabBar/community.png",
"selectedIconPath": "static/image/tabBar/communityActive.png",
"text": "动态"
},
{
"pagePath": "pages/messageList/index",
"iconPath": "static/image/tabBar/msg.png",
"selectedIconPath": "static/image/tabBar/msgActive.png",
"text": "消息"
},
{
"pagePath": "pages/user/index",
"iconPath": "static/image/tabBar/user.png",
"selectedIconPath": "static/image/tabBar/userActive.png",
"text": "我的"
}
]
},
"globalStyle": {
"navigationBarTitleText": "equipment-app",
"navigationBarBackgroundColor": "#fff",
"backgroundColor": "#F8F8F8"
}
}
<template>
<div class="b">
123
<div class="t">222</div>
<div class="b" :style="{ height: height + 'px' }">
{{ height }}
<div class="c" :style="{ height: height2 + 'px' }">
{{ height2 }}
</div>
</div>
</template>
<script setup></script>
<script setup>
import { ref } from "vue";
let a = uni.getWindowInfo();
console.log(a);
const height = ref(0);
const height2 = ref(0);
const pixelRatio = ref(a.pixelRatio);
height.value = a.screenTop;
height2.value = a.statusBarHeight;
</script>
<style lang="scss" scoped>
.b {
color: red;
:deep(.t) {
padding: 20px;
color: blue;
border: 1px solid red;
border: 1px solid red;
.c {
border: 1px solid #00ff00;
}
}
</style>
<template>
<div>
123
<div class="user-container">
<navBar>
<template #title>我的</template>
</navBar>
<view class="bg"></view>
<!-- 用户信息 -->
<view class="user-info flex-align-center">
<view class="avatar">
<!-- <image wx:if="{{avatarPath}}" src="{{imgPrefix}}/{{avatarPath}}" mode="" />
<image wx:else="" class="userinfo-avatar" src="{{ossImgPrefix}}/user/default-avatar.png"></image> -->
<img src="@/static/image/user/default-avatar.png" alt="" />
</view>
<view class="name">{{ realName || "未实名" }}</view>
<view class="education">{{ schoolName }} | {{ educationLevelText || "无" }}</view>
</view>
<!-- 我的简历 -->
<view class="my-resume">
<img src="@/static/image/user/resume.png" mode="" />
<view>
<view class="flex-between">
<text>我的简历</text>
<button>去完善</button>
</view>
<view class="t1">完善简历可获得更多机会哦~</view>
</view>
</view>
<!-- 导航 -->
<view class="nav">
<view class="item flex-between" v-for="(v, i) in navList" :key="i" @click="navigateTo(v.url)">
<view class="flex-align-center">
<img :src="v.icon" alt="" />
{{ v.text }}
</view>
<view class="arrow"></view>
</view>
</view>
</div>
</template>
<script setup>
import navBar from "@/components/navBar/index.vue";
import instance from "@/utils/request.js";
import axios from "axios";
instance.post("/job/getPageList").then(res => {
console.log(res);
});
axios
.post("https://gdlxy-api-test.wjzpgz.com/screen/lab/getLabDeviceState", {
labNum: 250
})
.then(res => {
console.log(res);
});
/* 路由 */
const navList = [
{
icon: new URL("@/static/image/user/history.png", import.meta.url).href,
url: "/subPackages/app/pages/myDelivery/myDelivery?type=我的投递",
text: "我的投递"
},
{
icon: new URL("@/static/image/user/feedback.png", import.meta.url).href,
url: "/subPackages/app/pages/myDelivery/myDelivery?type=我的面试",
text: "我的面试"
},
{
icon: new URL("@/static/image/user/question.png", import.meta.url).href,
url: "/pages/problemFeedbackList/problemFeedbackList",
text: "问题反馈"
},
{
icon: new URL("@/static/image/user/loginout.png", import.meta.url).href,
url: "",
text: "退出登录"
}
];
const navigateTo = url => {
uni.navigateTo({
url
});
};
/* 个人信息 */
const realName = "";
const schoolName = "";
const educationLevelText = "";
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
.user-container {
padding-top: 1rpx;
}
.nav-bar {
.text {
margin: 0 auto;
font-size: 36rpx;
color: #ffffff;
}
}
.bg {
position: absolute;
top: 0rpx;
left: 0rpx;
z-index: -1;
width: 750rpx;
height: 520rpx;
background: linear-gradient(180deg, #1f86ff 0%, #1f86ff 7%, rgb(241 248 255 / 0%) 90%);
}
.user-info {
flex-direction: column;
margin-top: 20rpx;
.avatar {
margin-bottom: 32rpx;
img {
width: 160rpx;
height: 160rpx;
border-radius: 50%;
}
}
.name {
font-size: 36rpx;
font-weight: 600;
color: #1b2026;
}
.education {
margin-top: 12rpx;
font-size: 24rpx;
line-height: 36rpx;
color: #1b2026;
}
}
.my-resume {
box-sizing: border-box;
display: flex;
width: 686rpx;
height: 194rpx;
padding: 36rpx 32rpx 0 16rpx;
margin: 32rpx auto 28rpx;
background: linear-gradient(255deg, #1f86ff 1%, #60a9ff 46%, #f8fbff 97%);
border-radius: 16rpx;
box-shadow: -2rpx 8rpx 23.6rpx 0rpx rgb(167 188 220 / 55%);
& > image {
width: 198rpx;
height: 150rpx;
margin-right: 12rpx;
}
& > view {
flex: 1;
}
.flex-between {
margin-top: 26rpx;
text {
font-size: 32rpx;
font-weight: 600;
line-height: 36rpx;
color: #ffffff;
}
button {
width: 130rpx;
height: 48rpx;
margin: 0;
font-size: 24rpx;
font-weight: 500;
line-height: 48rpx;
color: #2489ff;
background: #ffffff;
border-radius: 8rpx;
box-shadow: 0rpx 2rpx 2.6rpx rgb(127 187 231 / 49%);
}
}
.t1 {
margin-top: 20rpx;
font-size: 24rpx;
line-height: 36rpx;
color: #ffffff;
}
}
.nav {
background-color: #ffffff;
border-top: 16rpx solid #f3f4f8;
.item {
padding: 40rpx;
img {
width: 36rpx;
height: 36rpx;
margin-right: 24rpx;
}
.arrow {
border-color: #1b2026;
}
}
}
</style>
.flex-align-center {
display: flex;
align-items: center;
}
.flex-center {
display: flex;
align-items: center;
justify-content: center;
}
.flex-between {
display: flex;
align-items: center;
justify-content: space-between;
}
/* 箭头 */
.arrow {
box-sizing: border-box;
width: 16rpx;
height: 16rpx;
border: 2rpx solid #000000;
border-top-color: transparent !important;
border-left-color: transparent !important;
transform: rotateZ(-45deg);
}
/* 渐变色标题 */
.gradient-title {
position: relative;
z-index: 1;
font-size: 36rpx;
font-weight: bold;
color: #1b2026;
letter-spacing: 0;
}
.gradient-title::after {
position: absolute;
right: -8rpx;
bottom: 4rpx;
z-index: -1;
display: block;
width: 36px;
height: 8px;
content: "";
background: linear-gradient(90deg, rgb(241 246 251 / 0%) 0%, #76a5ff 100%);
}
......@@ -21,17 +21,17 @@ $uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d;
/* 文字基本颜色 */
$uni-text-color: #333; // 基本色
$uni-text-color-inverse: #fff; // 反色
$uni-text-color-grey: #999; // 辅助灰色,如加载更多的提示信息
$uni-text-color: #333333; // 基本色
$uni-text-color-inverse: #ffffff; // 反色
$uni-text-color-grey: #999999; // 辅助灰色,如加载更多的提示信息
$uni-text-color-placeholder: #808080;
$uni-text-color-disable: #c0c0c0;
/* 背景颜色 */
$uni-bg-color: #fff;
$uni-bg-color: #ffffff;
$uni-bg-color-grey: #f8f8f8;
$uni-bg-color-hover: #f1f1f1; // 点击状态颜色
$uni-bg-color-mask: rgba(0, 0, 0, 0.4); // 遮罩颜色
$uni-bg-color-mask: rgb(0 0 0 / 40%); // 遮罩颜色
/* 边框颜色 */
$uni-border-color: #c8c7cc;
......@@ -70,7 +70,7 @@ $uni-opacity-disabled: 0.3; // 组件禁用态的透明度
/* 文章场景相关 */
$uni-color-title: #2c405a; // 文章标题颜色
$uni-font-size-title: 20px;
$uni-color-subtitle: #555; // 二级标题颜色
$uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle: 18px;
$uni-color-paragraph: #3f536e; // 文章段落颜色
$uni-font-size-paragraph: 15px;
\ No newline at end of file
$uni-font-size-paragraph: 15px;
import axios from "axios";
// 创建一个 axios 实例
const instance = axios.create({
baseURL: "https://lygsh-api.wjzpgz.com/api", // 设置基础 URL
// baseURL: "http://192.168.11.63:8080/api", // 设置基础 URL
timeout: 5000, // 设置请求超时时间
headers: {
"Content-Type": "application/json" // 设置默认请求头
}
});
// 请求拦截器
instance.interceptors.request.use(
config => {
// 在这里可以添加请求发送前的处理逻辑,例如添加 token 等
// const token = localStorage.getItem('token');
// if (token) {
// config.headers.Authorization = `Bearer ${token}`;
// }
return config;
},
error => {
// 处理请求错误
return Promise.reject(error);
}
);
// 响应拦截器
instance.interceptors.response.use(
response => {
// 在这里可以对响应数据进行预处理
return response.data;
},
error => {
// 处理响应错误
// 例如根据不同的错误状态码进行相应的处理
return Promise.reject(error);
}
);
export default instance;
{
"extends": "@vue/tsconfig/tsconfig.json",
"compilerOptions": {
"composite": true,
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"noImplicitThis": true,
"allowSyntheticDefaultImports": true,
"allowJs": true,
"sourceMap": true,
"noImplicitAny": false,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
// "extends": "@vue/tsconfig/tsconfig.json",
"compilerOptions": {
"composite": true,
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"noImplicitThis": true,
"allowSyntheticDefaultImports": true,
"allowJs": true,
"sourceMap": true,
"noImplicitAny": false,
"baseUrl": "./",
"paths": {
"@/*": ["./src/*"]
},
"outDir": "dist",
"lib": ["esnext", "dom"],
"types": ["@dcloudio/types", "wot-design-uni/global.d.ts"]
},
"outDir": "dist",
"lib": ["esnext", "dom"],
"types": ["@dcloudio/types", "wot-design-uni/global.d.ts"]
},
"vueCompilerOptions": {
"target": 3,
"nativeTags": ["block", "template", "component", "slot"]
},
"exclude": ["node_modules"],
"include": [
"src/**/*.ts",
"src/**/*.js",
"src/**/*.d.ts",
"src/**/*.tsx",
"src/**/*.jsx",
"src/**/*.vue",
"src/**/*.json"
]
"vueCompilerOptions": {
"target": 3,
"nativeTags": ["block", "template", "component", "slot"]
},
"exclude": ["node_modules"],
"include": ["src/**/*.ts", "src/**/*.js", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.jsx", "src/**/*.vue", "src/**/*.json"]
}
import { defineConfig } from 'vite';
import uni from '@dcloudio/vite-plugin-uni';
import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";
import AutoImport from 'unplugin-auto-import/vite';
import AutoImport from "unplugin-auto-import/vite";
import legacy from '@vitejs/plugin-legacy';
import legacy from "@vitejs/plugin-legacy";
import { resolve } from "path";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
uni(),
AutoImport({
imports: [
'vue',
'uni-app',
{
'rexma-cli': ['xma'],
},
],
dts: 'src/declaration/auto-imports.d.ts',
}),
process.env.UNI_PLATFORM === 'h5' &&
legacy({
targets: ['defaults', 'not IE 11'],
}),
].filter(Boolean),
server: {
open: true,
// 代理配置
// proxy: {
// '/api': {
// target: 'https://www.api.com',
// changeOrigin: true,
// },
// },
},
plugins: [
uni(),
AutoImport({
imports: [
"vue",
"uni-app",
{
"rexma-cli": ["xma"]
}
],
dts: "src/declaration/auto-imports.d.ts"
}),
process.env.UNI_PLATFORM === "h5" &&
legacy({
targets: ["defaults", "not IE 11"]
})
].filter(Boolean),
resolve: {
alias: {
"@": resolve(__dirname, "./src")
}
},
server: {
open: true,
// 代理配置
proxy: {
"^/api": {
target: "https://lygsh-api.wjzpgz.com", // 后端服务实际地址
changeOrigin: true, //开启代理
// path是请求方法axios配置的baseUr中去除 协议+域名+端口 剩下的部分。例如http://127.0.0.1:9000/api,这里的path就是/api
rewrite: path => path.replace(/^\/api/, "") // 路径重写
}
}
}
});
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