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
0
Merge Requests
0
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
ffb43c6d
Commit
ffb43c6d
authored
Jul 29, 2025
by
yuzhenWang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug,发布测试
parent
390791bf
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
120 additions
and
34 deletions
+120
-34
App.vue
+17
-1
myPackageA/poster/poster.vue
+72
-32
myPackageA/setting/logOff.vue
+14
-0
pages/index/index.vue
+17
-1
static/images/sharePoster-tuya.webp
+0
-0
static/images/sharePoster.png
+0
-0
No files found.
App.vue
View file @
ffb43c6d
...
...
@@ -141,14 +141,30 @@
}
catch
(
err
)
{
console
.
error
(
'检查用户状态失败:'
,
err
);
}
}
return
}
else
{
this
.
checkToken
()
}
},
// 清除登录状态
clearLoginState
()
{
uni
.
clearStorageSync
();
uni
.
setStorageSync
(
'loginType'
,
'visitor'
);
this
.
checkToken
()
// 可以在这里添加其他需要清除的状态
},
// 未登录状态下需要重新获取token
checkToken
(){
api
.
checkToken
().
then
(
res
=>
{
if
(
res
[
'success'
]){}
else
{
api
.
obtainToken
().
then
(
res
=>
{
if
(
res
.
success
){
uni
.
setStorageSync
(
'uni-token'
,
res
.
data
[
'token'
]);
}
})
}
})
},
// 处理外部链接参数
handleExternalUrlParams
()
{
// #ifdef H5
...
...
myPackageA/poster/poster.vue
View file @
ffb43c6d
...
...
@@ -5,7 +5,7 @@
<view
class=
"imgContainer"
>
<image
style=
"display: block;"
src=
"@/static/images/share
Bg
.png"
src=
"@/static/images/share
Poster
.png"
mode=
"widthFix"
@
load=
"handleBgImageLoad"
@
error=
"handleBgImageError"
...
...
@@ -24,10 +24,6 @@
<view
class=
"preview-container"
v-if=
"generatedImage"
>
<image
:src=
"generatedImage"
mode=
"widthFix"
class=
"preview-image"
></image>
</view>
<view
class=
"bottomBox"
>
长按保存图片分享给好友
</view>
</view>
</
template
>
...
...
@@ -270,13 +266,68 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
//
.container
{
//
display
:
flex
;
//
flex-direction
:
column
;
//
height
:
100vh
;
//
width
:
100vw
;
//
.imgBox
{
//
position
:
relative
;
//
.imgContainer
{
//
position
:
relative
;
//
.qrcode-container
{
//
position
:
absolute
;
//
bottom
:
10
rpx
;
//
right
:
10
rpx
;
//
background
:
#fff
;
//
padding
:
10
rpx
;
//
border-radius
:
10
rpx
;
//
box-shadow
:
0
0
10
rpx
rgba
(
0
,
0
,
0
,
0.1
);
//
.qrcode-canvas
{
//
display
:
block
;
//
}
//
}
//
}
//
}
//
.preview-container
{
//
box-sizing
:
border-box
;
//
flex
:
1
;
//
padding
:
30
rpx
;
//
width
:
100%
;
//
height
:
100%
;
//
.preview-image
{
//
width
:
100%
;
//
height
:
auto
;
//
max-height
:
100%
;
//
object-fit
:
contain
;
//
}
//
}
//
}
.container
{
display
:
flex
;
flex-direction
:
column
;
height
:
100vh
;
width
:
100vw
;
overflow
:
hidden
;
.imgBox
{
position
:
relative
;
width
:
100%
;
height
:
auto
;
.imgContainer
{
width
:
100%
;
position
:
relative
;
image
{
width
:
100%
;
height
:
auto
;
display
:
block
;
}
.qrcode-container
{
position
:
absolute
;
bottom
:
10
rpx
;
...
...
@@ -285,38 +336,28 @@ export default {
padding
:
10
rpx
;
border-radius
:
10
rpx
;
box-shadow
:
0
0
10
rpx
rgba
(
0
,
0
,
0
,
0.1
);
.qrcode-canvas
{
display
:
block
;
}
}
}
}
.bottomBox
{
//
flex
:
1
;
border-radius
:
20
rpx
20
rpx
0
0
;
height
:
200
rpx
;
width
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
flex-direction
:
column
;
background-color
:
#fff
;
font-size
:
28
rpx
;
button
{
margin-top
:
20
rpx
;
.preview-container
{
flex
:
1
;
width
:
100%
;
height
:
100%
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
overflow
:
hidden
;
.preview-image
{
height
:
100%
;
/* 让高度占满屏幕 */
width
:
auto
;
/* 宽度自动调整 */
object-fit
:
fill
;
}
}
.preview-container
{
box-sizing
:
border-box
;
flex
:
1
;
padding
:
80
rpx
30
rpx
0
rpx
30
rpx
;
.preview-image
{
width
:
100%
;
}
}
}
</
style
>
\ No newline at end of file
myPackageA/setting/logOff.vue
View file @
ffb43c6d
...
...
@@ -265,6 +265,7 @@
}
})
this
.
releaseScroll
()
this
.
checkToken
()
}
})
},
...
...
@@ -273,6 +274,19 @@
delta
:
1
});
},
// 未登录状态下需要重新获取token
checkToken
(){
api
.
checkToken
().
then
(
res
=>
{
if
(
res
[
'success'
]){}
else
{
api
.
obtainToken
().
then
(
res
=>
{
if
(
res
.
success
){
uni
.
setStorageSync
(
'uni-token'
,
res
.
data
[
'token'
]);
uni
.
setStorageSync
(
'loginType'
,
'visitor'
);
}
})
}
})
},
cancel
(){
uni
.
navigateBack
({
delta
:
1
})
},
...
...
pages/index/index.vue
View file @
ffb43c6d
...
...
@@ -312,6 +312,7 @@
//分享
this
.
initShare
();
this
.
getOneProduct
()
},
onLoad
(
options
)
{
if
(
options
.
sharePoster
){
...
...
@@ -729,7 +730,22 @@
onChange
:
function
(
e
)
{
this
.
old
.
x
=
e
.
detail
.
x
this
.
old
.
y
=
e
.
detail
.
y
}
},
getOneProduct
()
{
api
.
courseList
().
then
(
res
=>
{
if
(
res
[
'success'
])
{
let
result
=
res
[
'data'
][
'data'
];
if
(
result
.
length
>
0
){
result
.
forEach
(
item
=>
{
if
(
item
.
productCode
&&
item
.
productCode
==
'C09'
){
this
.
productItem
=
item
uni
.
setStorageSync
(
'productItem'
,
this
.
productItem
);
}
})
}
}
})
},
},
}
</
script
>
...
...
static/images/sharePoster-tuya.webp
0 → 100644
View file @
ffb43c6d
File added
static/images/sharePoster.png
0 → 100644
View file @
ffb43c6d
This diff is collapsed.
Click to expand it.
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