feat(ui): 新增/优化界面样式、图标及交互组件
- 新增多个功能图标(箭头、盾牌、位置等) - 优化全局按钮、标签、输入框等组件样式 - 修复导航栏高度计算逻辑,适配微信小程序 - 优化消息页、订单页、个人中心等页面布局 - 修复微信支付配置及通知接口问题
这个提交包含在:
@@ -1,13 +1,10 @@
|
||||
<template>
|
||||
<view class="workbench-view">
|
||||
<!-- 1. 师傅顶部一体化沉浸名片区(单一大背景贯穿,彻底消除分层断层) -->
|
||||
<view class="profile-hero">
|
||||
<view class="hero-deco d1"></view>
|
||||
<view class="hero-deco d2"></view>
|
||||
|
||||
<!-- 沉浸式透明导航栏 -->
|
||||
<YjyfNavBar theme="transparent" title="师傅工作台" :fixed="false" />
|
||||
<!-- 1. 顶部统一固定吸顶导航栏(与其他页面 100% 统一,固定在手机顶部不随滚动划出) -->
|
||||
<YjyfNavBar theme="orange" title="师傅工作台" :fixed="true" :placeholder="true" />
|
||||
|
||||
<!-- 师傅顶部名片区(与顶部导航栏共享连续渐变零断层接壤) -->
|
||||
<view class="profile-hero" :style="{ marginTop: (-navHeight) + 'px', paddingTop: navHeight + 'px' }">
|
||||
<view class="hero-body">
|
||||
<view class="user-block">
|
||||
<view class="avatar-wrap">
|
||||
@@ -17,13 +14,11 @@
|
||||
<view class="name-row">
|
||||
<text class="user-name">{{ info ? info.realname : '师傅' }}</text>
|
||||
<view class="auth-tag">
|
||||
<image class="auth-ico" src="/static/icons/shield.svg" mode="aspectFit" />
|
||||
<image class="auth-ico" src="/static/icons/shield-white.svg" mode="aspectFit" />
|
||||
<text class="auth-txt">实名认证师傅</text>
|
||||
</view>
|
||||
</view>
|
||||
<text class="user-level" v-if="info">
|
||||
等级 Lv{{ info.level }} · 综合评分 {{ info.score }} 分 · 履约 {{ info.order_count }} 单
|
||||
</text>
|
||||
<text class="user-level" v-if="info">等级 Lv{{ info.level }} · 综合评分 {{ info.score }} 分 · 履约 {{ info.order_count }} 单</text>
|
||||
</view>
|
||||
<view class="status-pill clickable-hover" :class="{ off: info && info.work_status === 'off' }" @tap="toggleWork">
|
||||
<view class="status-dot"></view>
|
||||
@@ -37,7 +32,7 @@
|
||||
<text class="asset-title">可提现工钱(元)</text>
|
||||
<view class="bill-link clickable-hover" @tap="go('/pages/master/wallet')">
|
||||
<text class="bill-txt">账单明细</text>
|
||||
<image class="arrow-ico" src="/static/icons/arrow-right.svg" mode="aspectFit" />
|
||||
<image class="arrow-ico" src="/static/icons/arrow-right-white.svg" mode="aspectFit" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="asset-main">
|
||||
@@ -120,7 +115,7 @@
|
||||
<!-- 5. 身份切换通道(对标工奇兵我要下单找师傅) -->
|
||||
<view class="switch-role-card clickable-hover" @tap="backToUser">
|
||||
<view class="src-left">
|
||||
<image class="src-ico" src="/static/icons/role-switch.svg" mode="aspectFit" />
|
||||
<image class="src-ico" src="/static/icons/master/role-switch-orange.svg" mode="aspectFit" />
|
||||
<view class="src-text">
|
||||
<text class="src-title">我要下单找师傅</text>
|
||||
<text class="src-desc">切换至业主身份发布安装维修需求</text>
|
||||
@@ -136,9 +131,11 @@
|
||||
import api from '@/utils/api.js';
|
||||
import { isLogin, toLogin } from '@/utils/request.js';
|
||||
import { setRole } from '@/utils/role.js';
|
||||
import { getNavBarMetrics } from '@/utils/system.js';
|
||||
import YjyfNavBar from '@/components/YjyfNavBar.vue';
|
||||
|
||||
const emit = defineEmits(['switch-tab']);
|
||||
const navHeight = ref(getNavBarMetrics().totalNavHeight);
|
||||
|
||||
const info = ref(null);
|
||||
const credit = ref(null);
|
||||
@@ -208,6 +205,7 @@
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
navHeight.value = getNavBarMetrics().totalNavHeight;
|
||||
load();
|
||||
});
|
||||
|
||||
@@ -217,19 +215,27 @@
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.workbench-view { min-height: 100vh; background: #F5F6F8; padding-bottom: 40rpx; }
|
||||
.workbench-view {
|
||||
min-height: calc(100vh - 104rpx - env(safe-area-inset-bottom));
|
||||
width: 100%;
|
||||
overflow-x: hidden;
|
||||
box-sizing: border-box;
|
||||
background: #F5F6F8;
|
||||
padding-bottom: 40rpx;
|
||||
}
|
||||
|
||||
/* 顶部名片(单一连续大渐变) */
|
||||
/* 顶部名片(单一连续大渐变,与 TopBar 共享连续渐变起点) */
|
||||
.profile-hero {
|
||||
position: relative; overflow: hidden; padding-bottom: 30rpx;
|
||||
background: linear-gradient(135deg, #FFA93F 0%, #F0710D 100%);
|
||||
background-color: #F0710D;
|
||||
background-image: linear-gradient(135deg, #FFA93F 0%, #F0710D 100%);
|
||||
background-size: 100% 600rpx;
|
||||
background-position: 0 0;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.hero-body {
|
||||
position: relative; z-index: 2; padding: 10rpx 28rpx 0;
|
||||
position: relative; z-index: 2; padding: 16rpx 24rpx 0;
|
||||
}
|
||||
.hero-deco { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.13); }
|
||||
.d1 { width: 320rpx; height: 320rpx; right: -120rpx; top: -130rpx; }
|
||||
.d2 { width: 180rpx; height: 180rpx; left: -80rpx; bottom: -60rpx; }
|
||||
|
||||
.user-block { position: relative; display: flex; align-items: center; justify-content: space-between; }
|
||||
.avatar-wrap {
|
||||
@@ -242,21 +248,21 @@
|
||||
.name-row { display: flex; align-items: center; }
|
||||
.user-name { font-size: 36rpx; font-weight: 700; color: #fff; }
|
||||
.auth-tag {
|
||||
margin-left: 12rpx; display: flex; align-items: center; padding: 2rpx 12rpx;
|
||||
border-radius: 8rpx; background: rgba(255,255,255,0.22);
|
||||
margin-left: 12rpx; display: inline-flex; align-items: center; justify-content: center; height: 36rpx; padding: 0 12rpx;
|
||||
border-radius: 8rpx; background: rgba(255,255,255,0.22); line-height: 1;
|
||||
}
|
||||
.auth-ico { width: 20rpx; height: 20rpx; margin-right: 6rpx; }
|
||||
.auth-txt { font-size: 18rpx; color: #fff; font-weight: 600; }
|
||||
.auth-txt { font-size: 22rpx; color: #fff; font-weight: 600; line-height: 1; }
|
||||
.user-level { margin-top: 8rpx; font-size: 22rpx; color: rgba(255,255,255,0.92); }
|
||||
|
||||
.status-pill {
|
||||
display: flex; align-items: center; padding: 0 22rpx; height: 54rpx;
|
||||
border-radius: 27rpx; background: #fff; box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.08);
|
||||
display: inline-flex; align-items: center; justify-content: center; padding: 0 22rpx; height: 54rpx;
|
||||
border-radius: 27rpx; background: #fff; box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.08); line-height: 1;
|
||||
}
|
||||
.status-pill.off { background: rgba(255,255,255,0.35); }
|
||||
.status-dot { width: 12rpx; height: 12rpx; border-radius: 50%; background: #2FA84F; margin-right: 8rpx; }
|
||||
.status-pill.off .status-dot { background: #E8331B; }
|
||||
.status-txt { font-size: 22rpx; font-weight: 600; color: #E36B0C; }
|
||||
.status-txt { font-size: 22rpx; font-weight: 600; color: #E36B0C; line-height: 1; }
|
||||
.status-pill.off .status-txt { color: #fff; }
|
||||
|
||||
/* 资产大卡 */
|
||||
@@ -271,16 +277,16 @@
|
||||
.bill-txt { font-size: 22rpx; color: #fff; font-weight: 500; }
|
||||
.arrow-ico { width: 22rpx; height: 22rpx; margin-left: 4rpx; }
|
||||
|
||||
.asset-main { display: flex; align-items: baseline; justify-content: space-between; margin-top: 10rpx; }
|
||||
.asset-main { display: flex; align-items: center; justify-content: space-between; margin-top: 10rpx; }
|
||||
.asset-val { font-size: 56rpx; font-weight: 700; color: #fff; line-height: 1.1; }
|
||||
.withdraw-btn {
|
||||
padding: 0 32rpx; height: 56rpx; line-height: 56rpx; border-radius: 28rpx;
|
||||
padding: 0 32rpx; height: 56rpx; display: inline-flex; align-items: center; justify-content: center; line-height: 1; border-radius: 28rpx;
|
||||
background: #fff; color: #E36B0C; font-size: 24rpx; font-weight: 700;
|
||||
box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.08);
|
||||
}
|
||||
.asset-sub { display: flex; align-items: center; margin-top: 14rpx; padding-top: 14rpx; border-top: 1rpx solid rgba(255,255,255,0.22); }
|
||||
.sub-item { font-size: 22rpx; color: rgba(255,255,255,0.9); }
|
||||
.sub-divider { margin: 0 16rpx; font-size: 18rpx; color: rgba(255,255,255,0.5); }
|
||||
.sub-divider { margin: 0 16rpx; font-size: 22rpx; color: rgba(255,255,255,0.5); }
|
||||
|
||||
/* 菜单组 */
|
||||
.menu-card {
|
||||
@@ -297,8 +303,9 @@
|
||||
.mi-title { font-size: 28rpx; font-weight: 600; color: #2C2C2E; }
|
||||
.mi-right { display: flex; align-items: center; }
|
||||
.mi-badge {
|
||||
padding: 2rpx 14rpx; border-radius: 14rpx; background: #FDEEEB;
|
||||
color: #E8331B; font-size: 20rpx; font-weight: 600; margin-right: 8rpx;
|
||||
height: 38rpx; line-height: 38rpx; text-align: center; padding: 0 14rpx; border-radius: 19rpx; background: #FDEEEB;
|
||||
display: inline-flex; align-items: center; justify-content: center;
|
||||
color: #E8331B; font-size: 22rpx; font-weight: 600; margin-right: 8rpx;
|
||||
}
|
||||
.mi-tip { font-size: 24rpx; color: #9A9A9A; margin-right: 8rpx; }
|
||||
.mi-arrow { width: 24rpx; height: 24rpx; }
|
||||
@@ -313,7 +320,7 @@
|
||||
.card-tip { font-size: 22rpx; color: #9A9A9A; }
|
||||
.skills-box { display: flex; flex-wrap: wrap; }
|
||||
.skill-tag {
|
||||
padding: 0 22rpx; line-height: 52rpx; margin: 0 12rpx 12rpx 0;
|
||||
padding: 0 22rpx; height: 52rpx; line-height: 52rpx; text-align: center; display: inline-flex; align-items: center; justify-content: center; margin: 0 12rpx 12rpx 0;
|
||||
border-radius: 26rpx; background: #FFF3E6; color: #C4580A; font-size: 22rpx; font-weight: 500;
|
||||
}
|
||||
.skill-tag.empty { background: #F5F5F5; color: #9A9A9A; }
|
||||
|
||||
在新工单中引用
屏蔽一个用户