From fdd712effe29e4290e749083062554431d46503e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BE=90=E9=A3=9E=E6=B4=8B?=
<15778543+xufeiyang6017@user.noreply.gitee.com>
Date: Wed, 28 Jan 2026 16:19:11 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=AE=A4=E8=AF=81=E7=9B=B8?=
=?UTF-8?q?=E5=85=B3=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/profile/authentication/index.js | 41 +++++--
pages/profile/authentication/index.wxml | 50 +++-----
pages/profile/index.wxml | 2 +-
pages/profile/index.wxss | 152 +++++++++++++++++++++++-
4 files changed, 197 insertions(+), 48 deletions(-)
diff --git a/pages/profile/authentication/index.js b/pages/profile/authentication/index.js
index 78adfc7..18ee7f1 100644
--- a/pages/profile/authentication/index.js
+++ b/pages/profile/authentication/index.js
@@ -7,8 +7,10 @@ Page({
data: {
idCardFront: '', // 身份证人像面
idCardBack: '', // 身份证国徽面
+ businessLicense: '', // 营业执照
idcard1: null, // 身份证正面文件信息
idcard2: null, // 身份证反面文件信息
+ businessLicenseFile: null, // 营业执照文件信息
name: '', // 姓名
idNumber: '', // 身份证号
address: '', // 居住地址
@@ -37,6 +39,13 @@ Page({
this.uploadImage('idCardBack');
},
+ /**
+ * 上传营业执照
+ */
+ uploadBusinessLicense() {
+ this.uploadImage('businessLicense');
+ },
+
/**
* 通用图片上传方法
* @param {string} field - 上传的字段名
@@ -50,17 +59,27 @@ Page({
success: (res) => {
const tempFilePaths = res.tempFilePaths;
if (tempFilePaths && tempFilePaths.length > 0) {
- // 更新页面数据
- _this.setData({
- [field === 'idCardFront' ? 'idCardFront' : 'idCardBack']: tempFilePaths[0],
- [field === 'idCardFront' ? 'idcard1' : 'idcard2']: {
- path: tempFilePaths[0],
- name: `身份证${field === 'idCardFront' ? '正面' : '反面'}_${new Date().getTime()}.jpg`
- }
- });
-
- // 模拟识别成功后填充信息
- _this.simulateOcrResult();
+ // 根据字段类型更新页面数据
+ if (field === 'businessLicense') {
+ _this.setData({
+ businessLicense: tempFilePaths[0],
+ businessLicenseFile: {
+ path: tempFilePaths[0],
+ name: `营业执照_${new Date().getTime()}.jpg`
+ }
+ });
+ } else {
+ _this.setData({
+ [field === 'idCardFront' ? 'idCardFront' : 'idCardBack']: tempFilePaths[0],
+ [field === 'idCardFront' ? 'idcard1' : 'idcard2']: {
+ path: tempFilePaths[0],
+ name: `身份证${field === 'idCardFront' ? '正面' : '反面'}_${new Date().getTime()}.jpg`
+ }
+ });
+
+ // 模拟识别成功后填充信息
+ _this.simulateOcrResult();
+ }
}
},
fail: (err) => {
diff --git a/pages/profile/authentication/index.wxml b/pages/profile/authentication/index.wxml
index dffee09..f73dc6c 100644
--- a/pages/profile/authentication/index.wxml
+++ b/pages/profile/authentication/index.wxml
@@ -1,13 +1,4 @@
-
-
-
@@ -43,35 +34,24 @@
-
-
-
-
- 姓名
- {{name || '上传图片后自动获取'}}
-
-
- 身份证号
- {{idNumber || '上传图片后自动获取'}}
-
-
- 居住地址
- {{address || '上传图片后自动获取'}}
-
-
- 有效期开始时间
- {{validStart || '上传图片后自动获取'}}
-
-
- 有效期结束时间
- {{validEnd || '上传图片后自动获取'}}
+
+
+
+ 营业执照
+ 上传您的营业执照
+
+
+
+
+
+ +
+
+ 点击上传营业执照
+
+
-
-
-
- 为了给您提供更好的服务,请选择您当前服务所在区域
diff --git a/pages/profile/index.wxml b/pages/profile/index.wxml
index acd2f76..635b06e 100644
--- a/pages/profile/index.wxml
+++ b/pages/profile/index.wxml
@@ -55,7 +55,7 @@
-
+
个人认证
>
diff --git a/pages/profile/index.wxss b/pages/profile/index.wxss
index 8aba164..b0eee65 100644
--- a/pages/profile/index.wxss
+++ b/pages/profile/index.wxss
@@ -1 +1,151 @@
-/* pages/profile/index.wxss */
\ No newline at end of file
+/* pages/profile/index.wxss */
+
+/* 全局样式重置 */
+page {
+ background-color: #f5f5f5;
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
+}
+
+/* 容器样式 */
+.container {
+ padding: 20rpx;
+ width: 100%;
+ max-width: 100vw;
+ overflow-x: hidden;
+ box-sizing: border-box;
+ background-color: #f5f5f5;
+}
+
+/* 卡片样式 */
+.card {
+ background-color: white;
+ border-radius: 20rpx;
+ padding: 30rpx;
+ margin-bottom: 20rpx;
+ box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
+ transition: all 0.3s ease;
+}
+
+.card:hover {
+ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.12);
+ transform: translateY(-2rpx);
+}
+
+/* 标题样式 */
+.title {
+ font-size: 32rpx;
+ font-weight: bold;
+ color: #333;
+ margin-bottom: 20rpx;
+ position: relative;
+ padding-bottom: 10rpx;
+}
+
+.title::after {
+ content: '';
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ width: 80rpx;
+ height: 4rpx;
+ background: linear-gradient(90deg, #1677ff, #1890ff);
+ border-radius: 2rpx;
+}
+
+/* 按钮样式 */
+.btn {
+ width: 100%;
+ padding: 20rpx;
+ border-radius: 10rpx;
+ font-size: 28rpx;
+ font-weight: bold;
+ transition: all 0.3s ease;
+ margin-bottom: 20rpx;
+ border: none;
+ outline: none;
+}
+
+.btn:hover {
+ opacity: 0.9;
+ transform: scale(1.02);
+}
+
+.btn:active {
+ transform: scale(0.98);
+}
+
+/* 标签样式 */
+.tag {
+ display: flex;
+ align-items: center;
+ padding: 12rpx 24rpx;
+ border-radius: 24rpx;
+ margin: 10rpx;
+ font-size: 26rpx;
+ font-weight: bold;
+ box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
+ cursor: pointer;
+ transition: all 0.3s ease;
+}
+
+.tag:hover {
+ transform: translateY(-2rpx);
+ box-shadow: 0 6rpx 16rpx rgba(0, 0, 0, 0.15);
+}
+
+.tag:active {
+ transform: scale(0.98);
+}
+
+/* 链接项样式 */
+.link-item {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 30rpx 0;
+ cursor: pointer;
+ transition: all 0.3s ease;
+}
+
+.link-item:hover {
+ background-color: rgba(22, 119, 255, 0.05);
+ border-radius: 10rpx;
+}
+
+/* 退出登录按钮样式 */
+.logout-btn {
+ background-color: #ff4d4f;
+ color: white;
+ padding: 12rpx 4rpx;
+ border-radius: 20rpx;
+ font-size: 20rpx;
+ width: 176rpx;
+ display: block;
+ box-sizing: border-box;
+ transition: all 0.3s ease;
+ border: none;
+ outline: none;
+}
+
+.logout-btn:hover {
+ background-color: #ff7875;
+ transform: scale(1.05);
+}
+
+.logout-btn:active {
+ transform: scale(0.95);
+}
+
+/* 授权登录按钮样式 */
+.auth-btn {
+ margin: 20rpx 0;
+ transition: all 0.3s ease;
+}
+
+.auth-btn:hover {
+ transform: scale(1.02);
+}
+
+.auth-btn:active {
+ transform: scale(0.98);
+}
\ No newline at end of file