Browse Source

修复法人身份证上传功能,将其与动物检疫合格证明合并到同一个字段proofurl中

pull/1/head
徐飞洋 3 months ago
parent
commit
0cfe63e05f
  1. 129
      pages/seller/index.wxml
  2. 619
      pages/seller/index.wxss
  3. 19
      pages/settlement/index.js
  4. 4
      pages/settlement/index.wxml

129
pages/seller/index.wxml

@ -1,16 +1,16 @@
<view class="container {{pageScrollLock ? 'page-scroll-lock' : ''}}"
style="align-items: flex-start; padding: 20rpx; width: 100%; max-width: 100vw; overflow-x: hidden; position: relative; box-sizing: border-box;"
catchtouchmove="{{touchMoveBlocked ? 'preventTouchMove' : ''}}">
<view style="display: flex; justify-content: space-between; align-items: center; width: 95%; margin-bottom: 24rpx;">
<view style="display: flex; justify-content: space-between; align-items: center; width: 90%; margin-bottom: 20rpx;">
<view class="title">我的货源</view>
<view style="display: flex; align-items: center; gap: 16rpx;">
<view style="display: flex; align-items: center; gap: 10rpx;">
<button
bindtap="contactCustomerService"
class="customer-service-btn"
>
联系客服
</button>
<view class="settlement-status {{partnerstatus === 'approved' ? 'approved' : 'pending'}}">
<view style="color: {{partnerstatus === 'approved' ? '#52c41a' : '#f5222d'}}; font-size: 24rpx;">
{{partnerstatus === 'approved' ? '已入驻' : '未入驻'}}
</view>
<button
@ -23,19 +23,21 @@
</view>
<!-- 搜索框 -->
<view class="search-container" style="width: 95%; margin: 0 auto 32rpx;">
<input
class="search-input"
placeholder="搜索货源名称或品种"
bindinput="onSearchInput"
value="{{searchKeyword}}"
/>
<button
class="search-btn"
bindtap="searchSupplies"
>
搜索
</button>
<view style="width: 100%; display: flex; justify-content: center; margin-bottom: 20rpx;">
<view style="width: 90%; display: flex; border: 1rpx solid #ddd; border-radius: 40rpx; overflow: hidden;">
<input
style="flex: 1; padding: 20rpx 30rpx;"
placeholder="搜索货源名称或品种"
bindinput="onSearchInput"
value="{{searchKeyword}}"
/>
<button
style="background-color: #52c41a; color: white; font-size: 26rpx; height: 80rpx; line-height: 80rpx; padding: 0 30rpx;"
bindtap="searchSupplies"
>
搜索
</button>
</view>
</view>
<button
@ -47,18 +49,18 @@
</button>
<!-- 已上架货源 -->
<view style="margin-top: 30rpx; width: 95%; margin-left: auto; margin-right: auto;">
<view class="category-title">
<text>已上架货源 <span class="count">({{publishedSupplies.length}})</span></text>
<view class="toggle-btn" bindtap="togglePublishedExpand">
<text wx:if="{{isPublishedExpanded}}" style="color: var(--primary-color);">▼</text>
<text wx:else style="color: var(--primary-color);">▲</text>
<view style="margin-top: 30rpx; width: 100%;">
<view style="font-size: 28rpx; font-weight: bold; color: #52c41a; margin-bottom: 15rpx; display: flex; justify-content: space-between; align-items: center;">
<text>已上架货源 ({{publishedSupplies.length}})</text>
<view bindtap="togglePublishedExpand" style="width: 40rpx; height: 40rpx; display: flex; align-items: center; justify-content: center;">
<text wx:if="{{isPublishedExpanded}}" style="color: #52c41a; font-size: 28rpx;">▼</text>
<text wx:else style="color: #52c41a; font-size: 28rpx;">▲</text>
</view>
</view>
<block wx:if="{{isPublishedExpanded}}">
<block wx:if="{{publishedSupplies.length > 0}}">
<view wx:for="{{publishedSupplies}}" wx:key="id" class="card" style="width: 100%; margin-bottom: 24rpx;">
<view wx:for="{{publishedSupplies}}" wx:key="id" class="card" style="width: 100%;">
<!-- 图片和信息1:1比例并排显示 -->
<view style="display: flex; width: 100%; border-radius: 8rpx; overflow: hidden; background-color: #f5f5f5;">
<!-- 左侧图片区域 50%宽度 -->
@ -460,81 +462,84 @@
</view>
<!-- 创建货源弹窗 -->
<view class="modal" wx:if="{{showModal}}" catchtouchmove="true" bindtouchstart="onModalTouchStart" bindtouchmove="onModalTouchMove">
<view class="modal-content">
<view class="modal" wx:if="{{showModal}}" style="position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; z-index: 999;" catchtouchmove="true" bindtouchstart="onModalTouchStart" bindtouchmove="onModalTouchMove">
<view class="modal-content" style="width: 92%; max-width: 600rpx; background: white; padding: 40rpx; border-radius: 20rpx; max-height: 85vh; position: relative; box-shadow: 0 10rpx 40rpx rgba(0,0,0,0.15); transform: translateZ(0); -webkit-transform: translateZ(0);">
<!-- 固定的关闭按钮 -->
<view class="modal-close" bindtap="hideModal">×</view>
<view style="position: absolute; top: 20rpx; right: 20rpx; background-color: #f5f5f5; color: #666; width: 60rpx; height: 60rpx; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 36rpx; z-index: 10;" bindtap="hideModal">×</view>
<scroll-view scroll-y="true" style="height: 950rpx; overflow-y: scroll; -webkit-overflow-scrolling: touch; transform: translateZ(0); -webkit-transform: translateZ(0);" catchtouchmove="true" bindtouchstart="onModalTouchStart" bindtouchmove="onModalTouchMove">
<view class="modal-title">创建货源</view>
<view class="title" style="text-align: center; font-size: 36rpx; font-weight: bold; color: #333; margin-bottom: 30rpx; margin-top: 10rpx;">创建货源</view>
<!-- 照片上传区域 -->
<view class="form-label">商品图片</view>
<view class="upload-area">
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-top: 10rpx;">商品图片</view>
<view class="upload-area" style="width: 100%; margin: 0 auto; margin-bottom: 30rpx; border: 1rpx dashed #ddd; border-radius: 12rpx; padding: 24rpx;">
<view style="display: flex; flex-wrap: wrap;">
<!-- 已上传的图片 -->
<view wx:for="{{newSupply.imageUrls}}" wx:key="index" class="upload-item">
<view wx:for="{{newSupply.imageUrls}}" wx:key="index" style="position: relative; width: 160rpx; height: 160rpx; margin: 10rpx; border-radius: 12rpx; overflow: hidden; box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.1);">
<image src="{{item}}" mode="aspectFill" style="width: 100%; height: 100%;" bindtap="previewImage" data-urls="{{newSupply.imageUrls}}" data-index="{{index}}"></image>
<view class="delete-icon" bindtap="deleteImage" data-index="{{index}}" data-type="new">×</view>
<view class="delete-icon" style="position: absolute; top: 8rpx; right: 8rpx; background-color: rgba(0,0,0,0.6); color: white; width: 44rpx; height: 44rpx; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28rpx;" bindtap="deleteImage" data-index="{{index}}" data-type="new">×</view>
</view>
<!-- 上传按钮 -->
<view wx:if="{{newSupply.imageUrls.length < 5}}" class="upload-btn" bindtap="chooseImage" data-type="new">
<text style="font-size: 60rpx;">+</text>
<view wx:if="{{newSupply.imageUrls.length < 5}}" style="width: 160rpx; height: 160rpx; margin: 10rpx; border: 2rpx dashed #1677ff; border-radius: 12rpx; display: flex; align-items: center; justify-content: center; background-color: #f0f8ff;" bindtap="chooseImage" data-type="new">
<text style="font-size: 60rpx; color: #1677ff;">+</text>
</view>
</view>
<view class="upload-hint">最多上传5张图片</view>
<view style="font-size: 22rpx; color: #999; margin-top: 16rpx; text-align: center;">最多上传5张图片</view>
</view>
<view class="form-label">商品名称</view>
<view class="selector" bindtap="openNameSelectModal">
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">商品名称</view>
<view
bindtap="openNameSelectModal"
style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block; background: white; position: relative;">
<view style="display: flex; justify-content: space-between; align-items: center;">
<text>{{newSupply.name || '请选择商品名称'}}</text>
<text class="arrow">▼</text>
<text style="color: #999;">▼</text>
</view>
</view>
<view class="form-label">蛋黄</view>
<view class="selector" bindtap="openYolkSelectModal">
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">蛋黄</view>
<view bindtap="openYolkSelectModal" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block; background: white; position: relative;">
<view style="display: flex; justify-content: space-between; align-items: center;">
<text>{{newSupply.yolk || '请选择蛋黄类型'}}</text>
<text class="arrow">▼</text>
<text style="color: #999;">▼</text>
</view>
</view>
<view class="form-label">规格</view>
<!-- 修改为可点击的视图,点击后打开自定义弹窗 -->
<view class="selector" bindtap="onSpecChange" style="z-index: 1;">
<view style="display: flex; justify-content: space-between; align-items: center;">
<text>{{newSupply.spec || '请选择规格'}}</text>
<text class="arrow">▼</text>
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">规格</view>
<!-- 修改为可点击的视图,点击后打开自定义弹窗 -->
<view bindtap="onSpecChange" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block; background: white; position: relative; z-index: 1;">
<view style="display: flex; justify-content: space-between; align-items: center;">
<text>{{newSupply.spec || '请选择规格'}}</text>
<text style="color: #999;">▼</text>
</view>
</view>
</view>
<!-- 搜索功能已移至弹窗内 -->
<view class="form-label">价格</view>
<input class="form-input" type="text" placeholder="请输入价格" bindinput="onInput" data-field="price" value="{{newSupply.price}}" placeholder-style="font-size: 24rpx;" catchtouchmove="true" bindtouchstart="onInputTouchStart" bindtouchmove="onInputTouchMove"></input>
<!-- 搜索功能已移至弹窗内 -->
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">价格</view>
<input class="input" type="text" placeholder="请输入价格" bindinput="onInput" data-field="price" value="{{newSupply.price}}" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block;" placeholder-style="font-size: 24rpx; color: #999; text-align: left;" catchtouchmove="true" bindtouchstart="onInputTouchStart" bindtouchmove="onInputTouchMove"></input>
<view class="form-label">件数</view>
<input class="form-input" type="number" placeholder="请输入件数" bindinput="onInput" data-field="minOrder" value="{{newSupply.minOrder}}" placeholder-style="font-size: 24rpx;" catchtouchmove="true" bindtouchstart="onInputTouchStart" bindtouchmove="onInputTouchMove"></input>
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">件数</view>
<input class="input" type="number" placeholder="请输入件数" bindinput="onInput" data-field="minOrder" value="{{newSupply.minOrder}}" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block;" placeholder-style="font-size: 24rpx; color: #999; text-align: left;" catchtouchmove="true" bindtouchstart="onInputTouchStart" bindtouchmove="onInputTouchMove"></input>
<view class="form-label">斤重</view>
<input class="form-input" type="text" placeholder="请输入斤重" bindinput="onInput" data-field="grossWeight" value="{{newSupply.grossWeight || ''}}" placeholder-style="font-size: 24rpx;" catchtouchmove="true" bindtouchstart="onInputTouchStart" bindtouchmove="onInputTouchMove"></input>
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">斤重</view>
<input class="input" type="text" placeholder="请输入斤重" bindinput="onInput" data-field="grossWeight" value="{{newSupply.grossWeight || ''}}" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block;" placeholder-style="font-size: 24rpx; color: #999; text-align: left;" catchtouchmove="true" bindtouchstart="onInputTouchStart" bindtouchmove="onInputTouchMove"></input>
<view class="form-label">地区</view>
<input class="form-input" placeholder="请输入地区" bindinput="onInput" data-field="region" value="{{newSupply.region}}" placeholder-style="font-size: 24rpx;" catchtouchmove="true" bindtouchstart="onInputTouchStart" bindtouchmove="onInputTouchMove"></input>
<view class="form-actions">
<button class="btn btn-outline" bindtap="hideModal">取消</button>
<button class="btn btn-primary" bindtap="addSupply">创建</button>
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">地区</view>
<input class="input" placeholder="请输入地区" bindinput="onInput" data-field="region" value="{{newSupply.region}}" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block;" placeholder-style="font-size: 24rpx; color: #999; text-align: left;" catchtouchmove="true" bindtouchstart="onInputTouchStart" bindtouchmove="onInputTouchMove"></input>
<view style="display: flex; justify-content: space-between; margin-top: 20rpx; margin-bottom: 20rpx; gap: 20rpx;">
<button bindtap="hideModal" style="flex: 1; height: 90rpx; line-height: 90rpx; background-color: #f5f5f5; color: #666; font-size: 30rpx; border-radius: 12rpx; margin: 0; display: flex; align-items: center; justify-content: center;">取消</button>
<button bindtap="addSupply" style="flex: 1; height: 90rpx; line-height: 90rpx; background-color: #07c160; color: white; font-size: 30rpx; border-radius: 12rpx; margin: 0; display: flex; align-items: center; justify-content: center;">创建</button>
</view>
</scroll-view>
</view>
</view>
<!-- 编辑货源弹窗 -->
<view class="modal" wx:if="{{showEditModal}}" catchtouchmove="true" bindtouchstart="onModalTouchStart" bindtouchmove="onModalTouchMove">
<view class="modal-content">
<view class="modal" wx:if="{{showEditModal}}" style="position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; z-index: 999;" catchtouchmove="true" bindtouchstart="onModalTouchStart" bindtouchmove="onModalTouchMove">
<view class="modal-content" style="width: 92%; max-width: 600rpx; background: white; padding: 40rpx; border-radius: 20rpx; max-height: 85vh; position: relative; box-shadow: 0 10rpx 40rpx rgba(0,0,0,0.15); transform: translateZ(0); -webkit-transform: translateZ(0);">
<!-- 固定的关闭按钮 -->
<view class="modal-close" bindtap="hideEditModal">×</view>
<view style="position: absolute; top: 20rpx; right: 20rpx; background-color: #f5f5f5; color: #666; width: 60rpx; height: 60rpx; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 36rpx; z-index: 10;" bindtap="hideEditModal">×</view>
<scroll-view scroll-y="true" style="height: 950rpx; overflow-y: scroll; -webkit-overflow-scrolling: touch; transform: translateZ(0); -webkit-transform: translateZ(0);" catchtouchmove="true" bindtouchstart="onModalTouchStart" bindtouchmove="onModalTouchMove">
<view class="title" style="text-align: center; font-size: 36rpx; font-weight: bold; color: #333; margin-bottom: 30rpx; margin-top: 10rpx;">编辑货源</view>

619
pages/seller/index.wxss

@ -1,45 +1,4 @@
/* pages/seller/index.wxss */
/* 全局样式重置 */
page {
background-color: #f5f7fa;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
/* 主色调定义 */
:root {
--primary-color: #1677ff;
--success-color: #52c41a;
--warning-color: #faad14;
--error-color: #f5222d;
--text-primary: #333333;
--text-secondary: #666666;
--text-tertiary: #999999;
--border-color: #e8e8e8;
--background-color: #ffffff;
--light-background: #f5f7fa;
--shadow-sm: 0 2rpx 8rpx rgba(0, 0, 0, 0.08);
--shadow-md: 0 4rpx 16rpx rgba(0, 0, 0, 0.12);
--shadow-lg: 0 8rpx 32rpx rgba(0, 0, 0, 0.16);
--border-radius-sm: 8rpx;
--border-radius-md: 12rpx;
--border-radius-lg: 16rpx;
--transition: all 0.3s ease;
}
/* 容器样式优化 */
.container {
background-color: var(--light-background);
min-height: 100vh;
}
/* 页面标题样式 */
.title {
font-size: 40rpx;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 24rpx;
}
/* 立体玻璃质感按钮基础样式 */
.glass-btn {
position: relative;
@ -48,10 +7,13 @@ page {
padding: 28rpx 40rpx;
font-size: 32rpx;
font-weight: 600;
border-radius: var(--border-radius-lg);
box-shadow: var(--shadow-md);
border-radius: 16rpx;
box-shadow:
0 8rpx 24rpx rgba(0, 0, 0, 0.15),
0 0 0 1rpx rgba(255, 255, 255, 0.3) inset,
0 1rpx 0 rgba(255, 255, 255, 0.2) inset;
text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.2);
transition: var(--transition);
transition: all 0.3s ease;
background: rgba(255, 255, 255, 0.8);
backdrop-filter: blur(10rpx);
-webkit-backdrop-filter: blur(10rpx);
@ -64,118 +26,47 @@ page {
/* 按压效果 */
.glass-btn:active {
transform: translateY(2rpx);
box-shadow: var(--shadow-sm);
box-shadow:
0 4rpx 12rpx rgba(0, 0, 0, 0.1),
0 0 0 1rpx rgba(255, 255, 255, 0.2) inset,
0 1rpx 0 rgba(255, 255, 255, 0.1) inset;
}
/* 主按钮 - 蓝色玻璃效果 */
.primary-glass-btn {
background: linear-gradient(135deg, var(--primary-color), #4096ff);
color: white;
box-shadow: 0 8rpx 24rpx rgba(22, 119, 255, 0.3);
}
/* 按钮基础样式 */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 16rpx 32rpx;
font-size: 28rpx;
font-weight: 500;
border-radius: var(--border-radius-md);
border: none;
transition: var(--transition);
cursor: pointer;
text-align: center;
box-sizing: border-box;
}
/* 按钮变体 */
.btn-primary {
background-color: var(--primary-color);
color: white;
box-shadow: var(--shadow-sm);
}
.btn-primary:active {
background-color: #4096ff;
box-shadow: var(--shadow-sm);
}
.btn-success {
background-color: var(--success-color);
background: rgba(22, 119, 255, 0.7);
color: white;
box-shadow: var(--shadow-sm);
}
.btn-success:active {
background-color: #73d13d;
}
.btn-warning {
background-color: var(--warning-color);
color: white;
box-shadow: var(--shadow-sm);
}
.btn-warning:active {
background-color: #ffc53d;
}
.btn-danger {
background-color: var(--error-color);
color: white;
box-shadow: var(--shadow-sm);
}
.btn-danger:active {
background-color: #ff4d4f;
}
.btn-outline {
background-color: transparent;
color: var(--primary-color);
border: 2rpx solid var(--primary-color);
}
.btn-outline:active {
background-color: rgba(22, 119, 255, 0.1);
}
/* 按钮尺寸 */
.btn-sm {
padding: 12rpx 24rpx;
font-size: 24rpx;
border-radius: var(--border-radius-sm);
}
.btn-lg {
padding: 20rpx 48rpx;
font-size: 32rpx;
border-radius: var(--border-radius-lg);
box-shadow:
0 8rpx 24rpx rgba(22, 119, 255, 0.3),
0 0 0 1rpx rgba(255, 255, 255, 0.3) inset,
0 1rpx 0 rgba(255, 255, 255, 0.2) inset;
}
/* 联系客服按钮样式 */
.customer-service-btn {
background: var(--background-color);
color: var(--text-primary);
font-size: 28rpx;
width: 120rpx;
height: 64rpx;
line-height: 64rpx;
background: #f0f0f0;
color: black;
font-size: 30rpx;
width: 70rpx;
height: 80rpx;
line-height: 70rpx;
padding: 0;
border-radius: var(--border-radius-full, 32rpx);
border: 2rpx solid var(--border-color);
box-shadow: var(--shadow-sm);
transition: var(--transition);
border-radius: 500rpx;
border: 1rpx solid #d9d9d9;
box-shadow:
0 4rpx 16rpx rgba(0, 0, 0, 0.1),
0 1rpx 0 rgba(255, 255, 255, 0.5) inset;
transition: all 0.3s ease;
white-space: nowrap;
text-align: center;
}
.customer-service-btn:active {
transform: translateY(2rpx);
background: var(--light-background);
box-shadow: var(--shadow-sm);
background: #f5f5f5;
box-shadow:
0 2rpx 8rpx rgba(0, 0, 0, 0.08),
0 1rpx 0 rgba(255, 255, 255, 0.3) inset;
}
/* 服务区域容器 */
@ -185,405 +76,31 @@ page {
gap: 20rpx;
}
/* 入驻状态样式 */
.settlement-status {
/* 入驻状态样式 */
.no-settlement-status {
font-size: 24rpx;
padding: 4rpx 16rpx;
border-radius: 16rpx;
font-weight: 500;
}
.settlement-status.approved {
color: var(--success-color);
background-color: rgba(82, 196, 26, 0.1);
}
.settlement-status.pending {
color: var(--warning-color);
background-color: rgba(250, 173, 20, 0.1);
color: #ff4d4f;
padding: 0 10rpx;
}
/* 入驻按钮样式 */
.apply-settlement-btn {
background: var(--primary-color);
background: #1677ff;
color: white;
font-size: 28rpx;
padding: 12rpx 24rpx;
border-radius: var(--border-radius-md);
padding: 10rpx 20rpx;
border-radius: 8rpx;
border: none;
box-shadow: var(--shadow-sm);
transition: var(--transition);
min-width: 120rpx;
box-shadow: none;
transition: all 0.2s ease;
min-width: 100rpx;
text-align: center;
}
.apply-settlement-btn:active {
background: #4096ff;
transform: translateY(2rpx);
box-shadow: var(--shadow-sm);
}
/* 搜索框样式 */
.search-container {
display: flex;
align-items: center;
width: 100%;
margin-bottom: 32rpx;
background-color: var(--background-color);
border-radius: var(--border-radius-lg);
padding: 12rpx 20rpx;
box-shadow: var(--shadow-sm);
box-sizing: border-box;
}
.search-input {
flex: 1;
border: none;
outline: none;
font-size: 28rpx;
color: var(--text-primary);
background: transparent;
padding: 12rpx 0;
}
.search-input::placeholder {
color: var(--text-tertiary);
}
.search-btn {
background-color: var(--primary-color);
color: white;
border: none;
border-radius: var(--border-radius-md);
padding: 12rpx 24rpx;
font-size: 28rpx;
font-weight: 500;
box-shadow: var(--shadow-sm);
transition: var(--transition);
}
.search-btn:active {
background-color: #4096ff;
transform: translateY(2rpx);
}
/* 卡片样式 */
.card {
background-color: var(--background-color);
border-radius: var(--border-radius-lg);
box-shadow: var(--shadow-sm);
margin-bottom: 24rpx;
overflow: hidden;
transition: var(--transition);
}
.card:hover {
box-shadow: var(--shadow-md);
transform: translateY(-2rpx);
}
/* 分类标题样式 */
.category-title {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 32rpx;
font-weight: 600;
color: var(--text-primary);
margin-bottom: 20rpx;
padding: 0 4rpx;
}
.category-title .count {
font-size: 24rpx;
font-weight: 400;
color: var(--text-secondary);
}
.category-title .toggle-btn {
width: 48rpx;
height: 48rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
color: var(--text-tertiary);
transition: var(--transition);
}
.category-title .toggle-btn:active {
color: var(--primary-color);
transform: rotate(180deg);
}
/* 模态框样式 */
.modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 999;
backdrop-filter: blur(4rpx);
animation: fadeIn 0.3s ease;
}
.modal-content {
width: 92%;
max-width: 600rpx;
background: white;
padding: 40rpx;
border-radius: var(--border-radius-lg);
max-height: 85vh;
position: relative;
box-shadow: var(--shadow-lg);
transform: translateZ(0);
-webkit-transform: translateZ(0);
animation: slideUp 0.3s ease;
}
/* 表单元素样式 */
.form-group {
margin-bottom: 30rpx;
}
.form-label {
display: block;
font-size: 28rpx;
font-weight: 500;
color: var(--text-primary);
margin-bottom: 12rpx;
margin-left: 10rpx;
}
.form-input {
width: 100%;
height: 90rpx;
line-height: 90rpx;
padding: 0 24rpx;
font-size: 30rpx;
border: 2rpx solid var(--border-color);
border-radius: var(--border-radius-md);
box-sizing: border-box;
background: white;
transition: var(--transition);
outline: none;
}
.form-input:focus {
border-color: var(--primary-color);
box-shadow: 0 0 0 4rpx rgba(22, 119, 255, 0.1);
}
/* 上传区域样式 */
.upload-area {
width: 100%;
margin: 0 auto 30rpx;
border: 2rpx dashed var(--border-color);
border-radius: var(--border-radius-md);
padding: 24rpx;
box-sizing: border-box;
background-color: #fafafa;
transition: var(--transition);
}
.upload-area:hover {
border-color: var(--primary-color);
background-color: rgba(22, 119, 255, 0.05);
}
.upload-item {
position: relative;
width: 160rpx;
height: 160rpx;
margin: 10rpx;
border-radius: var(--border-radius-md);
overflow: hidden;
box-shadow: var(--shadow-sm);
transition: var(--transition);
}
.upload-item:hover {
box-shadow: var(--shadow-md);
}
.upload-item .delete-icon {
position: absolute;
top: 8rpx;
right: 8rpx;
background-color: rgba(0, 0, 0, 0.6);
color: white;
width: 44rpx;
height: 44rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
transition: var(--transition);
cursor: pointer;
}
.upload-item .delete-icon:active {
background-color: rgba(0, 0, 0, 0.8);
transform: scale(0.9);
}
.upload-btn {
width: 160rpx;
height: 160rpx;
margin: 10rpx;
border: 2rpx dashed var(--primary-color);
border-radius: var(--border-radius-md);
display: flex;
align-items: center;
justify-content: center;
background-color: rgba(22, 119, 255, 0.05);
transition: var(--transition);
cursor: pointer;
}
.upload-btn:hover {
background-color: rgba(22, 119, 255, 0.1);
transform: scale(1.05);
}
.upload-btn:active {
transform: scale(0.95);
}
/* 选择器样式 */
.selector {
width: 100%;
height: 90rpx;
line-height: 90rpx;
padding: 0 24rpx;
font-size: 30rpx;
border: 2rpx solid var(--border-color);
border-radius: var(--border-radius-md);
box-sizing: border-box;
background: white;
display: flex;
justify-content: space-between;
align-items: center;
transition: var(--transition);
cursor: pointer;
}
.selector:hover {
border-color: var(--primary-color);
}
.selector:active {
background-color: rgba(22, 119, 255, 0.05);
}
.selector .arrow {
color: var(--text-tertiary);
font-size: 24rpx;
transition: var(--transition);
}
.selector:active .arrow {
transform: rotate(180deg);
}
/* 动画效果 */
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(40rpx);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes pulse {
0%, 100% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}
/* 加载更多样式 */
.load-more {
text-align: center;
padding: 32rpx 0;
color: var(--text-tertiary);
font-size: 28rpx;
}
.load-more .loading-text {
display: flex;
align-items: center;
justify-content: center;
gap: 12rpx;
}
.load-more .loading-text::before {
content: '';
width: 24rpx;
height: 24rpx;
border: 2rpx solid var(--text-tertiary);
border-top-color: var(--primary-color);
border-radius: 50%;
animation: spin 1s linear infinite;
}
.load-more .load-more-text {
color: var(--primary-color);
cursor: pointer;
transition: var(--transition);
}
.load-more .load-more-text:active {
opacity: 0.7;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* 空状态样式 */
.empty-state {
text-align: center;
padding: 80rpx 0;
color: var(--text-tertiary);
}
.empty-state .icon {
font-size: 120rpx;
margin-bottom: 24rpx;
opacity: 0.5;
}
.empty-state .text {
font-size: 28rpx;
margin-bottom: 16rpx;
}
.empty-state .subtext {
font-size: 24rpx;
opacity: 0.8;
transform: none;
box-shadow: none;
}
/* 登录授权弹窗样式 - 专门用于登录相关弹窗 */
@ -598,16 +115,13 @@ page {
justify-content: center;
align-items: center;
z-index: 999;
animation: fadeIn 0.3s ease;
}
.auth-modal-container {
background-color: var(--background-color);
border-radius: var(--border-radius-lg);
background-color: white;
border-radius: 16rpx;
width: 80%;
padding: 40rpx;
box-shadow: var(--shadow-lg);
animation: slideUp 0.3s ease;
}
.auth-modal-title {
@ -618,13 +132,12 @@ page {
.auth-modal-title text {
font-size: 36rpx;
font-weight: bold;
color: var(--text-primary);
}
.auth-modal-content {
text-align: center;
margin-bottom: 40rpx;
color: var(--text-secondary);
color: #666;
}
.auth-modal-content text {
@ -636,35 +149,18 @@ page {
}
.auth-primary-button {
background-color: var(--primary-color);
background-color: #1677ff;
color: white;
width: 100%;
border-radius: var(--border-radius-md);
border-radius: 8rpx;
margin-bottom: 20rpx;
border: none;
padding: 20rpx;
font-size: 32rpx;
font-weight: 500;
box-shadow: var(--shadow-sm);
transition: var(--transition);
}
.auth-primary-button:active {
background-color: #4096ff;
transform: translateY(2rpx);
}
.auth-cancel-button {
background: none;
color: var(--text-secondary);
color: #666;
border: none;
padding: 16rpx;
font-size: 28rpx;
transition: var(--transition);
}
.auth-cancel-button:active {
color: var(--text-primary);
}
/* 头像选择样式 */
@ -683,7 +179,6 @@ page {
width: 160rpx;
height: 160rpx;
border-radius: 50%;
box-shadow: var(--shadow-sm);
}
/* 表单样式 */
@ -695,26 +190,14 @@ page {
font-size: 28rpx;
margin-bottom: 10rpx;
display: block;
color: var(--text-primary);
}
.auth-form-input {
border: 2rpx solid var(--border-color);
border-radius: var(--border-radius-md);
border: 1rpx solid #eee;
border-radius: 8rpx;
padding: 20rpx;
width: 100%;
max-width: 100%;
font-size: 28rpx;
color: var(--text-primary);
transition: var(--transition);
box-sizing: border-box;
}
.auth-form-input:focus {
border-color: var(--primary-color);
box-shadow: 0 0 0 4rpx rgba(22, 119, 255, 0.1);
outline: none;
}
box-sizing: border-box;
font-size: 28rpx;
}

19
pages/settlement/index.js

@ -28,7 +28,7 @@ Page({
// 上传资料
businesslicenseurl: null, // 营业执照URL (原businessLicenseFile)
proofurl: null, // 动物检疫证明URL (原animalQuarantineFile)
idCardFile: null, // 身份证文件 (保持不变)
// idCardFile: null, // 已移除,法人身份证现在使用proofurl字段
brandurl: null, // 品牌授权链URL (原brandAuthFile)
// 审核状态
@ -122,7 +122,7 @@ Page({
cooperation: settlementData.cooperation || settlementData.selectedCooperation,
businesslicenseurl: settlementData.businesslicenseurl || settlementData.businessLicenseFile,
proofurl: settlementData.proofurl || settlementData.animalQuarantineFile,
idCardFile: settlementData.idCardFile,
// idCardFile: settlementData.idCardFile, // 已移除,法人身份证现在使用proofurl字段
brandurl: settlementData.brandurl || settlementData.brandAuthFile,
agreementChecked: settlementData.agreementChecked,
partnerstatus: settlementData.partnerstatus || settlementData.auditStatus
@ -145,8 +145,7 @@ Page({
detailedaddress: this.data.detailedaddress, // 详细地址 (原detailAddress)
cooperation: this.data.cooperation, // 合作模式 (原selectedCooperation)
businesslicenseurl: this.data.businesslicenseurl, // 营业执照URL (原businessLicenseFile)
proofurl: this.data.proofurl, // 动物检疫证明URL (原animalQuarantineFile)
idCardFile: this.data.idCardFile,
proofurl: this.data.proofurl, // 动物检疫证明或法人身份证URL (原animalQuarantineFile)
brandurl: this.data.brandurl, // 品牌授权链URL (原brandAuthFile)
agreementChecked: this.data.agreementChecked,
partnerstatus: this.data.partnerstatus // 合作商状态 (原auditStatus)
@ -416,7 +415,7 @@ Page({
success: (res) => {
const tempFilePaths = res.tempFilePaths;
this.setData({
idCardFile: {
proofurl: { // 使用与动物检疫合格证明相同的字段名
path: tempFilePaths[0],
name: `法人身份证_${new Date().getTime()}.jpg`
}
@ -427,7 +426,7 @@ Page({
// 删除法人身份证
deleteIdCard() {
this.setData({ idCardFile: null });
this.setData({ proofurl: null }); // 使用与动物检疫合格证明相同的字段名
},
// 上传品牌授权链文件
@ -528,11 +527,11 @@ Page({
);
}
// 上传动物检疫合格证明
// 上传动物检疫合格证明或法人身份证(两者共用一个字段)
if (this.data.proofurl) { // 使用数据库字段名
uploadedFiles.animalQuarantineFile = await this.uploadFileToServer(
this.data.proofurl.path,
'animalQuarantine'
'animalQuarantine' // 保持原有的文件类型,或者可以根据实际情况调整
);
}
@ -588,7 +587,7 @@ Page({
cooperation: this.data.cooperation === '货源委托' ? 'wholesale' : this.data.cooperation, // 合作模式映射为后端期望的值
phoneNumber: contactPhone, // 后端期望的字段名是phoneNumber
businesslicenseurl: uploadedFiles.businessLicenseFile || '', // 营业执照URL
proofurl: uploadedFiles.animalQuarantineFile || '', // 动物检疫证明URL
proofurl: uploadedFiles.animalQuarantineFile || '', // 动物检疫证明或法人身份证URL(两者共用一个字段)
brandurl: uploadedFiles.brandAuthFile || '', // 品牌授权链URL
userId: userId
};
@ -1147,7 +1146,7 @@ Page({
showCooperationError: false,
businesslicenseurl: null, // 使用数据库字段名 (原businessLicenseFile)
proofurl: null, // 使用数据库字段名 (原animalQuarantineFile)
idCardFile: null,
// idCardFile: null, // 已移除,法人身份证现在使用proofurl字段
brandurl: null, // 使用数据库字段名 (原brandAuthFile)
partnerstatus: 'underreview', // 使用数据库字段名 (原auditStatus)
showAuthModal: false,

4
pages/settlement/index.wxml

@ -232,10 +232,10 @@
<view class="upload-text">点击上传法人身份证正反面</view>
<view class="upload-tip">支持jpg、png格式,大小不超过5M</view>
</view>
<view wx:if="{{idCardFile}}">
<view wx:if="{{proofurl}}">
<view class="uploaded-file">
<view class="file-icon">📄</view>
<view class="file-name">{{idCardFile.name}}</view>
<view class="file-name">{{proofurl.name}}</view>
<view class="file-delete" bindtap="deleteIdCard">删除</view>
</view>
</view>

Loading…
Cancel
Save