diff --git a/.env.development b/.env.development
index 4b7a4662..9db6bab1 100644
--- a/.env.development
+++ b/.env.development
@@ -9,14 +9,12 @@ ENV = 'development'
# VITE_APP_BASE_API_Url = 'http://25.64.16.133:9786'
-# VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
+VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
app入口
-<<<<<<< HEAD
- VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
-=======
+
# VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
# VITE_APP_BASE_API_Url = 'http://25.16.122.65:7001'
# VITE_APP_BASE_API_Url = 'http://25.18.122.66:9786'
->>>>>>> f9ef91e5fe7dbec56a29867b9d2d9f7e3792f0f4
+
diff --git a/src/api/login.js b/src/api/login.js
index 43953fab..648f0013 100644
--- a/src/api/login.js
+++ b/src/api/login.js
@@ -2,9 +2,12 @@ import request from '@/api/request'
import common from "@/common/common";
import {
setToken,
- setUserInfo
+ setUserInfo,
+ getUserInfo
} from "@/common/common";
-
+import {
+ get_base_url
+} from '@/api/request.js'
// 账号登录接口
export const useAccountLoginApp = (data) => request({
@@ -17,17 +20,10 @@ export const useAccountLoginApp = (data) => request({
}) => {
if (rtnCode === '0000') {
setToken(body)
- // deptId: ""
- // deptName: null
- // loginName: "ADMIN" // todo id
- // orgId: "00E200"
- // orgName: "金融科技部"
- // userId: "USER001"
- // userName: "ADMIN" / todo name
- // userStatus: "01"
+
const user_data = await queryCurrentUser()
- setUserInfo(user_data.body)
- return user_data.body
+ return user_data
+
}
return Promise.reject({
rtnCode,
@@ -49,14 +45,14 @@ export const useAccountLoginApp = (data) => request({
rtnCode: "9999"
rtnTime: "2025-06-24 08:54:52"
*/
-
+
return Promise.reject(res)
})
/**
* 获取个人信息
* 入参
- gender F是女 M男
+ gender f是女 m男
imageAddr: 图片
loginName ID
userName 姓名
@@ -65,6 +61,64 @@ export const queryCurrentUser = (data) => request({
url: '/traapp/access/queryCurrentUser',
method: 'post',
data
+}).then(res => {
+ // deptId: ""
+ // deptName: null
+ // loginName: "ADMIN" // todo id
+ // orgId: "00E200"
+ // orgName: "金融科技部"
+ // userId: "USER001"
+ // userName: "ADMIN" / todo name
+ // userStatus: "01"
+ setUserInfo(res.body)
+ console.log('预加载头像');
+ const base_url = get_base_url()
+ // 预加载头像
+ // #ifdef APP-PLUS
+ const updateUserAvatar = (imagePath) => {
+ const userInfo = getUserInfo()
+ setUserInfo({
+ ...userInfo,
+ 'imagePath': imagePath
+ })
+ }
+
+ try {
+ const pathName = res.body.imageAddr
+ const url = base_url + pathName
+ // 生成唯一文件名,避免冲突
+ const filename = pathName.split('/').pop()
+ const localFilePath = '_downloads/' + filename
+
+ // 先检查是否存在
+ uni.getFileInfo({
+ filePath: localFilePath,
+ success: () => {
+ console.log('头像已存在,无需下载');
+ updateUserAvatar(localFilePath)
+ },
+ fail: () => {
+ console.log('开始下载头像:', url);
+ const dtask = plus.downloader.createDownload(
+ url, {
+ method: 'GET',
+ filename: '_downloads/' + filename
+ },
+ (download, status) => {
+ if (status === 200) {
+ console.log('头像下载成功:', download.filename);
+ updateUserAvatar(download.filename)
+ }
+ }
+ )
+ dtask.start();
+ }
+ })
+ } catch (error) {
+ console.error('头像预加载过程发生错误:', error);
+ }
+ // #endif
+ return res.body
})
//获取隐私协议
diff --git a/src/api/request.js b/src/api/request.js
index 7b232585..4b061c66 100644
--- a/src/api/request.js
+++ b/src/api/request.js
@@ -50,7 +50,8 @@ export default function request({
meta,
isStream,
suppressErrors,
- header = {}
+ header = {},
+ timeout = 6000
}) {
const base_url = get_base_url(url);
@@ -70,6 +71,7 @@ export default function request({
data: data,
method: method,
header: headers_base,
+ timeout:timeout,
success: (response) => {
if (isStream) { // 流式传输,直接返回
return resolve(response);
@@ -92,11 +94,14 @@ export default function request({
if (REQUES_ERROR_CODES['NO_LOGIN'].includes(res.rtnCode)) {
goto_login_fun()
}
-
+ if (res?.rtnCode === '9999') {
+ common.msg("系统异常.")
+ }
return reject(res)
},
fail(res) {
console.log('请求错误', res, url, base_url);
+ return reject(res)
}
});
})
diff --git a/src/api/user.js b/src/api/user.js
index 61674f89..87aa7224 100644
--- a/src/api/user.js
+++ b/src/api/user.js
@@ -12,7 +12,28 @@ export const queryTraStdyStatisticsSelf = (data) => {
return request({
url: '/traapp/traStdyInfo/queryTraStdyStatisticsSelf',
method: 'post',
- data,
- suppressErrors: true
+ data
});
-};
\ No newline at end of file
+};
+
+// 更新性别
+export const updateDfSysUserExtandInfoGender = (data) => {
+ /**
+
+ **/
+ return request({
+ url: '/traapp/dfSysUserInfo/updateDfSysUserExtandInfoGender ',
+ method: 'post',
+ data
+ });
+};
+
+ // 更新照片
+ export const updateDfSysUserExtandInfoImageAddr = (data) => {
+ return request({
+ url: '/traapp/dfSysUserInfo/updateDfSysUserExtandInfoImageAddr',
+ method: 'post',
+ data
+ });
+ };
+
\ No newline at end of file
diff --git a/src/components/avatar-cropper/avatar-cropper.vue b/src/components/avatar-cropper/avatar-cropper.vue
new file mode 100644
index 00000000..c66776b9
--- /dev/null
+++ b/src/components/avatar-cropper/avatar-cropper.vue
@@ -0,0 +1,1300 @@
+
+
+
+
+
+
+
+
+
+
+
+ touchStart(e, 'body')"
+ @touchmove="touchMove"
+ @touchend="touchEnd"
+ @touchcancel="touchCancel"
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ touchStart(e, 'left-top')"
+ >
+ touchStart(e, 'left-bottom')"
+ >
+ touchStart(e, 'right-top')"
+ >
+ touchStart(e, 'right-bottom')"
+ >
+
+
+
+
+ 取消
+
+
+
+ 确定
+
+
+
+
+
+
+
+
+
diff --git a/src/components/avatar-cropper/rotate.svg b/src/components/avatar-cropper/rotate.svg
new file mode 100644
index 00000000..0143706c
--- /dev/null
+++ b/src/components/avatar-cropper/rotate.svg
@@ -0,0 +1,15 @@
+
+
+
diff --git a/src/components/image-preview/image-preview.vue b/src/components/image-preview/image-preview.vue
index 8a87ce8b..a90318a2 100644
--- a/src/components/image-preview/image-preview.vue
+++ b/src/components/image-preview/image-preview.vue
@@ -4,6 +4,7 @@
diff --git a/src/components/picture-upload/picture-upload.vue b/src/components/picture-upload/picture-upload.vue
index ee23a749..058b5973 100644
--- a/src/components/picture-upload/picture-upload.vue
+++ b/src/components/picture-upload/picture-upload.vue
@@ -109,25 +109,15 @@
const data = {
bizScen: 'S3005'
}
+ console.log(tempFilePaths[0]);
const upload_map = tempFilePaths.map((file) => uploadFile(file, data))
Promise.all(upload_map).then(res => {
fileList.push(...res)
emits('update:modelValue', fileList.map(res => res.fileId))
- console.log('res, res', res);
+
}).catch(() => {
})
-
- // for (file of tempFilePaths) {
- // try {
- // const res = await uploadFile(file, data)
- // console.log('res', res);
- // fileList.push(res)
- // } catch (error) {
- // console.error('文件上传失败', error)
- // }
- // }
- // emits('upload_success', fileList.value)
}
})
}
diff --git a/src/enum.js b/src/enum.js
index 5739aa2d..33eb71b4 100644
--- a/src/enum.js
+++ b/src/enum.js
@@ -1,7 +1,16 @@
-
-MaxUploadPictureSize = 2048 // 最大图片上传限制
-MaxUploadDocumentMaxSize = 102400 // 最大文档上传限制
-
-
-500
-
+export const MAX_UPLOAD_PICTURE_SIZE = 2048 // 最大图片上传限制
+export const Max_Upload_Document_Size = 102400 // 最大文档上传限制
+export const TextareaInputLimitCharacter = 160 // 全局多行文本输入框限制字数
+export const GENDER = [{
+ value: "m",
+ label: "男性",
+ },
+ {
+ value: "f",
+ label: "女性",
+ },
+ {
+ value: "o",
+ label: "其他",
+ }
+] // 性别
\ No newline at end of file
diff --git a/src/pages/courseDetail/components/comment.vue b/src/pages/courseDetail/components/comment.vue
index ff16c150..802319e5 100644
--- a/src/pages/courseDetail/components/comment.vue
+++ b/src/pages/courseDetail/components/comment.vue
@@ -15,7 +15,7 @@
{{item.bbsContent}}
- azf
+
diff --git a/src/pages/courseDetail/index.vue b/src/pages/courseDetail/index.vue
index 914a9633..50018643 100644
--- a/src/pages/courseDetail/index.vue
+++ b/src/pages/courseDetail/index.vue
@@ -1,6 +1,9 @@
+
+
+
{{ form.crsName }}
@@ -101,6 +104,37 @@
+
+ .detail-main {
+ background-color: #F6F8FF;
+ }
+
+ // .detail-body {
+ // box-sizing: border-box;
+ // min-height: calc(100vh - (var(--status-bar-height)+50rpx));
+ // // padding: 29rpx 37rpx;
+ // width: 100%;
+ // display: flex;
+ // flex-direction: column;
+ // padding-top: 0rpx;
+
+
+ // }
+
+ .title {
+ color: #000000;
+ font-size: 34rpx;
+ height: 34rpx;
+ font-weight: 600;
+ // margin-bottom: 30rpx;
+ line-height: 34rpx;
+ }
+
+ .fixed_search_div {
+ padding: calc(10rpx + var(--status-bar-height)) 15rpx 24rpx 30rpx;
+ display: flex;
+ align-items: center;
+ background-color: #f6f7f8;
+
+ .back_div {
+ margin-right: 10rpx;
+
+ .back-icon {
+ position: relative;
+ width: 40rpx;
+ height: 40rpx;
+ cursor: pointer;
+ display: flex;
+ align-items: center;
+ }
+
+ .back-icon::before,
+ .back-icon::after {
+ content: '';
+ position: absolute;
+ transition: all 0.3s ease;
+ }
+
+ .back-icon::after {
+ top: 25%;
+ left: 25%;
+ width: 40%;
+ height: 40%;
+ border-top: 4rpx solid #2b2c2e;
+ border-left: 4rpx solid #2b2c2e;
+ transform: rotate(-45deg);
+ }
+ }
+ }
+
\ No newline at end of file
diff --git a/src/uni_modules/t-cropper/changelog.md b/src/uni_modules/t-cropper/changelog.md
new file mode 100644
index 00000000..93d6a425
--- /dev/null
+++ b/src/uni_modules/t-cropper/changelog.md
@@ -0,0 +1,18 @@
+## 1.0.8(2024-09-13)
+新增矩形框最大缩放、修复图片旋转时居中
+## 1.0.7(2024-08-08)
+优化选择大文件图片后,无法在Image中直接显示图片,提供针对大图片压缩思路
+## 1.0.6(2024-06-16)
+优化确定按钮,快速重复点击出现多个裁剪图片,更新了文档
+## 1.0.5(2023-11-16)
+优化裁剪框圆角/裁剪图片圆角,更新了文档
+## 1.0.4(2023-11-14)
+支持图片最大缩放功能,优化App端图标问题,
+## 1.0.3(2023-11-11)
+新增图片旋转图标rotate.svg
+## 1.0.2(2023-11-11)
+新增H5端和App端(Android端通过自测,Ios端没有设备暂未自测)
+## 1.0.1(2023-11-10)
+新增项目示例
+## 1.0.0(2023-11-10)
+图片裁剪工具
diff --git a/src/uni_modules/t-cropper/components/t-cropper/t-cropper.scss b/src/uni_modules/t-cropper/components/t-cropper/t-cropper.scss
new file mode 100644
index 00000000..35b63621
--- /dev/null
+++ b/src/uni_modules/t-cropper/components/t-cropper/t-cropper.scss
@@ -0,0 +1,202 @@
+$clipper-edge-border-width: 6rpx !default;
+
+.t-cropper {
+ position: fixed;
+ width: 100%;
+ height: 100%;
+ top: 0;
+ bottom: 0;
+ z-index: 1000;
+ overflow: hidden;
+ .canvas {
+ position: absolute;
+ top: 5000px;
+ left: 5000px;
+ }
+ // 裁剪区域
+ .t-preview-container {
+ position: fixed;
+ width: 100%;
+ height: 100%;
+ top: 0;
+ bottom: 0;
+ z-index: 1000;
+ opacity: 0;
+ overflow: hidden;
+
+ .preview-body {
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ background: #000;
+ overflow: hidden;
+ .mask-model {
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ background: #000;
+ opacity: 0.4;
+ pointer-events: none;
+ }
+ .image-wrap {
+ position: absolute;
+ .image {
+ position: absolute;
+ }
+ }
+ // 裁剪框盒子
+ .frame-box {
+ position: absolute;
+ left: 100px;
+ top: 100px;
+ width: 200px;
+ height: 200px;
+ // 矩形图片
+ .rect {
+ position: absolute;
+ left: -2px;
+ top: -2px;
+ width: 100%;
+ height: 100%;
+ border: 2rpx solid white;
+ overflow: hidden;
+ box-sizing: content-box;
+ .image-rect {
+ position: absolute;
+ .rect-img {
+ position: absolute;
+ }
+ }
+ }
+ //裁剪框线条
+ .line-one {
+ position: absolute;
+ width: 100%;
+ border-top: 1px dashed #ccc;
+ left: 0;
+ top: 33.3%;
+ box-sizing: content-box;
+ }
+ .line-two {
+ position: absolute;
+ width: 100%;
+ border-top: 1px dashed #ccc;
+ left: 0;
+ top: 66.7%;
+ box-sizing: content-box;
+ }
+ .line-three {
+ position: absolute;
+ height: 100%;
+ border-right: 1px dashed #ccc;
+ top: 0;
+ left: 33.3%;
+ box-sizing: content-box;
+ }
+ .line-four {
+ position: absolute;
+ height: 100%;
+ border-right: 1px dashed #ccc;
+ top: 0;
+ left: 66.7%;
+ box-sizing: content-box;
+ }
+ .frame-left-top {
+ position: absolute;
+ width: 20px;
+ height: 20px;
+ left: -8rpx;
+ top: -8rpx;
+ border-left: 4rpx solid #fff;
+ border-top: 4rpx solid #fff;
+ box-sizing: content-box;
+ }
+ .frame-left-bottom {
+ position: absolute;
+ width: 20px;
+ height: 20px;
+ left: -8rpx;
+ bottom: -4rpx;
+ border-left: 4rpx solid #fff;
+ border-bottom: 4rpx solid #fff;
+ box-sizing: content-box;
+ }
+ .frame-right-top {
+ position: absolute;
+ width: 20px;
+ height: 20px;
+ right: -4rpx;
+ top: -8rpx;
+ border-right: 4rpx solid #fff;
+ border-top: 4rpx solid #fff;
+ box-sizing: content-box;
+ }
+ .frame-right-bottom {
+ position: absolute;
+ width: 20px;
+ height: 20px;
+ right: -4rpx;
+ bottom: -4rpx;
+ border-right: 4rpx solid #fff;
+ border-bottom: 4rpx solid #fff;
+ box-sizing: content-box;
+ }
+ }
+ }
+
+ // 底部工具栏
+ .toolbar {
+ position: absolute;
+ width: calc(100% - 64rpx);
+ height: 100rpx;
+ left: 0;
+ bottom: 10rpx;
+ text-align: center;
+ display: flex;
+ justify-content: space-between;
+ padding: 0 32rpx;
+ align-items: center;
+ // IOS 底部安全距离
+ padding-bottom: constant(safe-area-inset-bottom);
+ padding-bottom: env(safe-area-inset-bottom);
+ .btn-cancel {
+ width: 112rpx;
+ font-size: 28rpx;
+ color: #d5dfe5;
+ font-weight: bold;
+ }
+ .btn-rotate {
+ width: 112rpx;
+ font-size: 28rpx;
+ color: #d5dfe5;
+ font-weight: bold;
+ image {
+ width: 60rpx;
+ height: 60rpx;
+ }
+ }
+ .btn-confirm {
+ font-size: 28rpx;
+ color: #ffffff;
+ font-weight: bold;
+ width: 112rpx;
+ height: 60rpx;
+ line-height: 60rpx;
+ background: #07c160;
+ border-radius: 6rpx;
+ text-align: center;
+ }
+ }
+
+ .transit {
+ transition: width 0.3s, height 0.3s, left 0.3s, top 0.3s, transform 0.3s;
+ }
+ }
+ .showPage {
+ opacity: 1 !important;
+ }
+}
diff --git a/src/uni_modules/t-cropper/components/t-cropper/t-cropper.vue b/src/uni_modules/t-cropper/components/t-cropper/t-cropper.vue
new file mode 100644
index 00000000..32376617
--- /dev/null
+++ b/src/uni_modules/t-cropper/components/t-cropper/t-cropper.vue
@@ -0,0 +1,1098 @@
+
+
+
+
+
+
+
+
+
+
+
+ touchStart(e, 'body')"
+ @touchmove="touchMove"
+ @touchend="touchEnd"
+ @touchcancel="touchCancel"
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ touchStart(e, 'left-top')"
+ >
+ touchStart(e, 'left-bottom')"
+ >
+ touchStart(e, 'right-top')"
+ >
+ touchStart(e, 'right-bottom')"
+ >
+
+
+
+
+ 取消
+
+
+
+ 确定
+
+
+
+
+
+
+
+
+
diff --git a/src/uni_modules/t-cropper/package.json b/src/uni_modules/t-cropper/package.json
new file mode 100644
index 00000000..37290087
--- /dev/null
+++ b/src/uni_modules/t-cropper/package.json
@@ -0,0 +1,85 @@
+{
+ "id": "t-cropper",
+ "displayName": "t-cropper图片裁剪插件",
+ "version": "1.0.8",
+ "description": "vue3图片裁剪插件,头像裁剪、支持自定义尺寸、等比例缩放、拖动、图片翻转、剪切圆形/圆角图片,高性能裁剪图片插件",
+ "keywords": [
+ "图片裁剪",
+ ",头像裁剪,缩放,旋转,拖动",
+ ""
+],
+ "repository": "",
+ "engines": {
+ "HBuilderX": "^3.1.0"
+ },
+ "dcloudext": {
+ "type": "component-vue",
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "无",
+ "permissions": "无"
+ },
+ "npmurl": ""
+ },
+ "uni_modules": {
+ "dependencies": [],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y",
+ "alipay": "n"
+ },
+ "client": {
+ "Vue": {
+ "vue2": "n",
+ "vue3": "y"
+ },
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "u",
+ "app-uvue": "u"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "微信浏览器(Android)": "y",
+ "QQ浏览器(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "u",
+ "IE": "u",
+ "Edge": "u",
+ "Firefox": "u",
+ "Safari": "u"
+ },
+ "小程序": {
+ "微信": "y",
+ "阿里": "y",
+ "百度": "u",
+ "字节跳动": "u",
+ "QQ": "u",
+ "钉钉": "u",
+ "快手": "u",
+ "飞书": "u",
+ "京东": "u"
+ },
+ "快应用": {
+ "华为": "u",
+ "联盟": "u"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/uni_modules/t-cropper/readme.md b/src/uni_modules/t-cropper/readme.md
new file mode 100644
index 00000000..7a6e1a6f
--- /dev/null
+++ b/src/uni_modules/t-cropper/readme.md
@@ -0,0 +1,186 @@
+# t-cropper
+
+> **t-cropper 一款高性能移动端图片裁剪工具**
+
+## 平台兼容
+
+| App | H5 | 微信小程序 | 支付宝小程序 |
+| :---: | :---: | :----------: | :-----------: |
+| √ | √ | √ | √ |
+
+### 属性说明
+
+|属性 |类型 |默认 |备注 |
+| :--------: | :-----: | :----: | :----: |
+| mode |String | "ratio" | 裁剪模式|
+| imageUrl |String | " " | 需要裁剪的图片路径|
+| width |Number | 200 | 图片裁剪后的宽度,固定大小时有效|
+| height |Number | 200 | 图片裁剪后的高度,固定大小时有效|
+| maxWidth |Number | 1024 | 图片裁剪后的最大宽度 |
+| maxHeight |Number | 1024 | 图片裁剪后的最大高度 |
+| scaleRatio |Number | 0.7 | 裁剪比列缩放,建议不超过0.95 |
+| minRatio |Number | 1 | 最小缩放 |
+| maxRatio |Number | 3 | 最大缩放 |
+| radius |Number | 0 | 裁剪图片圆角半径,单位px |
+| delay |Number | 250 | 确定按钮快速重复点击时间 |
+| isRotateBtn |Boolean | true | 是否显示旋转按钮 |
+
+### mode有效值
+
+| 模式 |值 |说明 |
+| :-----: | :-----: | :----: |
+| 固定模式 |fixed | 裁剪出指定大小的图片,一般用于头像上传 |
+| 等比缩放 |ratio | 限定宽高比,裁剪大小不固定 |
+| 自由模式 |free | 不限定宽高比,裁剪大小不固定 |
+
+### 事件说明
+
+|事件名称 |说明 |返回 |
+| :--------: | :-----: | :----: |
+| confirm |点击确定按钮 | object |
+| cancel |点击取消按钮 | - |
+
+### 示例
+
+```html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+### 注意
+
+1.uni-app版本不断更新,插件有时无法适应新版本,感谢大家及时提交bug,但希望大家手下留情,不要轻易给差评!
diff --git a/src/uni_modules/t-cropper/static/svg/rotate.svg b/src/uni_modules/t-cropper/static/svg/rotate.svg
new file mode 100644
index 00000000..0143706c
--- /dev/null
+++ b/src/uni_modules/t-cropper/static/svg/rotate.svg
@@ -0,0 +1,15 @@
+
+
+
diff --git a/src/uni_modules/uv-textarea/components/uv-textarea/props.js b/src/uni_modules/uv-textarea/components/uv-textarea/props.js
index b0c78899..f79e52ac 100644
--- a/src/uni_modules/uv-textarea/components/uv-textarea/props.js
+++ b/src/uni_modules/uv-textarea/components/uv-textarea/props.js
@@ -101,7 +101,7 @@ export default {
// 最大输入长度,设置为 -1 的时候不限制最大长度
maxlength: {
type: [String, Number],
- default: 140
+ default: 160
},
// 边框类型,surround-四周边框,bottom-底部边框
border: {