Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CFFP-HB
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chao Sun
CFFP-HB
Commits
21086680
Commit
21086680
authored
Jul 09, 2026
by
yuzhenWang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wyz' into 'test'
Wyz See merge request
!122
parents
52e7c894
cc6d6067
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
93 additions
and
7 deletions
+93
-7
myPackageA/businessCard/businessCard.vue
+0
-0
myPackageA/myTeam/myTeam.vue
+3
-3
myPackageA/poster/poster.vue
+2
-2
pages/courseDetail/courseDetail.vue
+40
-2
pages/personalCenter/detail.vue
+1
-0
pages/personalCenter/personalCenter.vue
+3
-0
pages/personalCenter/system/settings.vue
+2
-0
util/previewImage.js
+42
-0
No files found.
myPackageA/businessCard/businessCard.vue
View file @
21086680
This diff is collapsed.
Click to expand it.
myPackageA/myTeam/myTeam.vue
View file @
21086680
...
@@ -643,7 +643,7 @@
...
@@ -643,7 +643,7 @@
return
data
.
map
(
item
=>
{
return
data
.
map
(
item
=>
{
// 创建 remarkName
// 创建 remarkName
const
remarkName
=
item
.
name
?
const
remarkName
=
item
.
name
?
(
item
.
name
.
length
>
3
?
item
.
name
.
substring
(
0
,
3
)
+
'...'
:
item
.
name
)
:
(
item
.
name
.
length
>
5
?
item
.
name
.
substring
(
0
,
5
)
+
'...'
:
item
.
name
)
:
''
;
''
;
// 创建新对象,保持原数据不变
// 创建新对象,保持原数据不变
...
@@ -966,12 +966,12 @@
...
@@ -966,12 +966,12 @@
justify-content
:
space-between
;
justify-content
:
space-between
;
margin-top
:
20
rpx
;
margin-top
:
20
rpx
;
.left{
.left{
width
:
76
%
;
width
:
100
%
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
flex-start
;
justify-content
:
flex-start
;
.line{
.line{
width
:
20
%
;
width
:
18
%
;
display
:
flex
;
display
:
flex
;
justify-content
:
flex-end
;
justify-content
:
flex-end
;
margin-top
:
-40
rpx
;
margin-top
:
-40
rpx
;
...
...
myPackageA/poster/poster.vue
View file @
21086680
...
@@ -378,7 +378,7 @@ export default {
...
@@ -378,7 +378,7 @@ export default {
height
:
100%
;
height
:
100%
;
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
flex-start
;
overflow
:
hidden
;
overflow
:
hidden
;
.preview-image
{
.preview-image
{
...
@@ -493,7 +493,7 @@ export default {
...
@@ -493,7 +493,7 @@ export default {
height
:
100%
;
height
:
100%
;
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
flex-start
;
overflow
:
hidden
;
overflow
:
hidden
;
.preview-image
{
.preview-image
{
...
...
pages/courseDetail/courseDetail.vue
View file @
21086680
...
@@ -91,7 +91,10 @@
...
@@ -91,7 +91,10 @@
<view
class=
"tabContent"
>
<view
class=
"tabContent"
>
<!-- 课程介绍 -->
<!-- 课程介绍 -->
<view
class=
"courseIntroContent"
v-if=
"tabType===1"
style=
"margin-top: 20rpx;"
>
<view
class=
"courseIntroContent"
v-if=
"tabType===1"
style=
"margin-top: 20rpx;"
>
<view
v-html=
"courseInfo.fileIntroduce"
class=
"richTextContent"
></view>
<!--
<view
v-html=
"courseInfo.fileIntroduce"
class=
"richTextContent"
></view>
-->
<image
class=
"imageStyle"
v-for=
"(item,index) in imagesList"
:key=
"index"
style=
"width: 100%"
:src=
"item"
mode=
"widthFix"
@
click=
"previewImage(index)"
>
</image>
</view>
</view>
<!-- 服务流程 -->
<!-- 服务流程 -->
<view
class=
"courseIntroContent"
v-if=
"tabType===4"
style=
"margin-top: 20rpx;"
>
<view
class=
"courseIntroContent"
v-if=
"tabType===4"
style=
"margin-top: 20rpx;"
>
...
@@ -265,6 +268,7 @@
...
@@ -265,6 +268,7 @@
import
loadingIcon
from
'@/components/loading/loading.vue'
;
import
loadingIcon
from
'@/components/loading/loading.vue'
;
import
ShareGuide
from
'@/components/ShareGuide/ShareGuide.vue'
;
import
ShareGuide
from
'@/components/ShareGuide/ShareGuide.vue'
;
import
wx
from
'weixin-js-sdk'
import
wx
from
'weixin-js-sdk'
import
{
previewImages
}
from
'@/util/previewImage.js'
;
export
default
{
export
default
{
components
:
{
components
:
{
UniShareWx
,
UniShareWx
,
...
@@ -357,10 +361,22 @@
...
@@ -357,10 +361,22 @@
isOrderLoading
:
false
,
isOrderLoading
:
false
,
posterShareTxt
:
'长按图片分享给朋友'
,
posterShareTxt
:
'长按图片分享给朋友'
,
orderCodeUrl
:
''
,
orderCodeUrl
:
''
,
posterImgType
:
'sharePoster'
posterImgType
:
'sharePoster'
,
imagesList
:[]
};
};
},
},
methods
:
{
methods
:
{
previewImage
(
index
)
{
// 过滤掉无效的图片地址(空字符串或非http开头)
const
validUrls
=
this
.
imagesList
.
filter
(
url
=>
url
&&
url
.
trim
()
!==
''
);
if
(
validUrls
.
length
===
0
)
{
uni
.
showToast
({
title
:
'暂无图片'
,
icon
:
'none'
});
return
;
}
// 确保索引有效
const
idx
=
Math
.
min
(
index
,
validUrls
.
length
-
1
);
previewImages
(
validUrls
,
idx
);
},
gotoJoinPartner
()
{
gotoJoinPartner
()
{
dataHandling
.
pocessTracking
(
dataHandling
.
pocessTracking
(
'加盟'
,
'加盟'
,
...
@@ -782,6 +798,16 @@
...
@@ -782,6 +798,16 @@
}
}
})
})
},
},
extractImageUrls
(
htmlString
)
{
if
(
!
htmlString
)
return
[];
const
imgRegex
=
/<img
[^
>
]
+src=
[
"'
]([^
"'
]
+
)[
"'
]
/g
;
const
urls
=
[];
let
match
;
while
((
match
=
imgRegex
.
exec
(
htmlString
))
!==
null
)
{
urls
.
push
(
match
[
1
]);
}
return
urls
;
},
// 课程详情页面
// 课程详情页面
courseDetail
()
{
courseDetail
()
{
this
.
userId
=
uni
.
getStorageSync
(
'cffp_userId'
)
this
.
userId
=
uni
.
getStorageSync
(
'cffp_userId'
)
...
@@ -798,6 +824,10 @@
...
@@ -798,6 +824,10 @@
this
.
bannerViewType
=
"2"
;
this
.
bannerViewType
=
"2"
;
this
.
getBanner
(
Number
(
this
.
courseInfo
.
filePathOss
));
this
.
getBanner
(
Number
(
this
.
courseInfo
.
filePathOss
));
}
}
if
(
this
.
courseInfo
.
fileIntroduce
){
this
.
imagesList
=
this
.
extractImageUrls
(
this
.
courseInfo
.
fileIntroduce
)
console
.
log
(
' this.imagesList'
,
this
.
imagesList
);
}
//this.courseInfo.serviceContent = res['data']['data']['filePathOss'];
//this.courseInfo.serviceContent = res['data']['data']['filePathOss'];
this
.
lecturerId
=
res
[
'data'
][
'data'
][
'fileLecturerId'
];
this
.
lecturerId
=
res
[
'data'
][
'data'
][
'fileLecturerId'
];
// this.lecturerQuery();
// this.lecturerQuery();
...
@@ -1501,6 +1531,14 @@
...
@@ -1501,6 +1531,14 @@
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.imageStyle
{
display
:
block
;
/* 将图像转为块级元素以去除底部空白 */
width
:
100%
;
/* 确保图像宽度适应容器 */
margin-top
:
-1
rpx
;
}
.container
{
.container
{
width
:
100%
;
width
:
100%
;
height
:
auto
;
height
:
auto
;
...
...
pages/personalCenter/detail.vue
View file @
21086680
...
@@ -263,6 +263,7 @@
...
@@ -263,6 +263,7 @@
};
};
const
initPdfAfterPermission
=
()
=>
{
const
initPdfAfterPermission
=
()
=>
{
console
.
log
(
'initPdfAfterPermission执行了'
);
loading
.
value
=
true
;
loading
.
value
=
true
;
const
filteredTabs
=
filteredCurrentTabs
.
value
;
const
filteredTabs
=
filteredCurrentTabs
.
value
;
if
(
currentType
.
value
>=
2
&&
currentType
.
value
<=
4
)
{
if
(
currentType
.
value
>=
2
&&
currentType
.
value
<=
4
)
{
...
...
pages/personalCenter/personalCenter.vue
View file @
21086680
...
@@ -484,6 +484,9 @@
...
@@ -484,6 +484,9 @@
},
},
gotoPoster
()
{
gotoPoster
()
{
if
(
!
uni
.
getStorageSync
(
'loginType'
)
||
uni
.
getStorageSync
(
'loginType'
)
==
'visitor'
)
{
if
(
!
uni
.
getStorageSync
(
'loginType'
)
||
uni
.
getStorageSync
(
'loginType'
)
==
'visitor'
)
{
uni
.
redirectTo
({
url
:
'/myPackageA/login/login'
})
uni
.
setStorageSync
(
'loginType'
,
'visitor'
)
uni
.
setStorageSync
(
'loginType'
,
'visitor'
)
uni
.
setStorageSync
(
'islogin'
,
'1'
)
uni
.
setStorageSync
(
'islogin'
,
'1'
)
}
}
...
...
pages/personalCenter/system/settings.vue
View file @
21086680
...
@@ -138,6 +138,8 @@
...
@@ -138,6 +138,8 @@
console
.
log
(
e
)
console
.
log
(
e
)
// error
// error
}
}
console
.
log
(
'退出登录'
);
uni
.
clearStorageSync
();
uni
.
redirectTo
({
uni
.
redirectTo
({
url
:
'/myPackageA/login/login'
url
:
'/myPackageA/login/login'
})
})
...
...
util/previewImage.js
0 → 100644
View file @
21086680
/**
* 图片预览
* @param {String|Array} images - 图片列表,可以是字符串URL数组,或对象数组(需指定urlKey)
* @param {Number} current - 当前显示图片的索引(从0开始)
* @param {Object} options - 其他配置
* @param {String} options.urlKey - 当images为对象数组时,指定url字段名,默认 'url'
* @param {String} options.indicator - 指示器样式,可选 'default'、'number'、'none'
* @param {Boolean} options.loop - 是否循环播放,默认 false
*/
export
function
previewImages
(
images
,
current
=
0
,
options
=
{})
{
const
{
urlKey
=
'url'
,
indicator
=
'default'
,
loop
=
false
}
=
options
;
// 统一转换为字符串数组
let
urls
=
[];
if
(
Array
.
isArray
(
images
))
{
if
(
typeof
images
[
0
]
===
'string'
)
{
urls
=
images
;
}
else
if
(
typeof
images
[
0
]
===
'object'
)
{
urls
=
images
.
map
(
item
=>
item
[
urlKey
]);
}
}
else
if
(
typeof
images
===
'string'
)
{
urls
=
[
images
];
}
if
(
urls
.
length
===
0
)
{
console
.
warn
(
'预览图片列表为空'
);
return
;
}
// 确保 current 在有效范围
const
index
=
Math
.
min
(
Math
.
max
(
current
,
0
),
urls
.
length
-
1
);
console
.
log
(
'urls'
,
urls
);
uni
.
previewImage
({
urls
,
current
:
index
,
indicator
,
loop
,
// 长按可自定义菜单,但一般使用默认
// 支持 success/fail/complete 回调
});
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment