Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
ai-card
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 91cbecf7
authored
Jun 07, 2023
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
分享bug修复
1 parent
ac9f9b55
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
11 deletions
app.js
components/proDetail/proDetail.js
packagesList/pages/productDetail/productDetail.js
packagesList/pages/videoDetal/videoDetal.js
app.js
View file @
91cbecf
...
@@ -88,6 +88,12 @@ App({
...
@@ -88,6 +88,12 @@ App({
case
'SHARE_D'
:
case
'SHARE_D'
:
wx
.
$storage
.
set
(
'scene'
,
wx
.
$trackData
)
wx
.
$storage
.
set
(
'scene'
,
wx
.
$trackData
)
break
break
case
'SHARE_PRO'
:
wx
.
$storage
.
set
(
'scene'
,
wx
.
$trackData
)
break
case
'SHARE_VIDEO'
:
wx
.
$storage
.
set
(
'scene'
,
wx
.
$trackData
)
break
default
:
default
:
if
(
wx
.
$trackData
.
cardId
)
{
if
(
wx
.
$trackData
.
cardId
)
{
wx
.
$storage
.
set
(
'scene'
,
wx
.
$trackData
)
wx
.
$storage
.
set
(
'scene'
,
wx
.
$trackData
)
...
...
components/proDetail/proDetail.js
View file @
91cbecf
...
@@ -16,6 +16,10 @@ Component({
...
@@ -16,6 +16,10 @@ Component({
proDetail
:
{
proDetail
:
{
type
:
Object
,
type
:
Object
,
value
:
{}
value
:
{}
},
cardInfo
:
{
type
:
Object
,
value
:
{}
}
}
},
},
...
...
packagesList/pages/productDetail/productDetail.js
View file @
91cbecf
...
@@ -81,11 +81,11 @@ Page({
...
@@ -81,11 +81,11 @@ Page({
//接受跳转的路由参数(小程序页面跳转)
//接受跳转的路由参数(小程序页面跳转)
async
onRoute
(
options
)
{
async
onRoute
(
options
)
{
console
.
log
(
options
);
if
(
!
options
||
utils
.
isEmptyObj
(
options
))
return
;
if
(
!
options
||
utils
.
isEmptyObj
(
options
))
return
;
let
{
hasPhoneNumber
,
id
}
=
options
;
let
{
hasPhoneNumber
,
id
}
=
options
;
let
proData
=
await
this
.
getProductDetail
(
id
);
let
proData
=
await
this
.
getProductDetail
(
id
);
if
(
!
proData
)
{
// proData?.status 1-上架 2-下架
if
(
!
proData
||
proData
?.
status
==
2
)
{
this
.
setData
({
this
.
setData
({
isLoadding
:
false
,
isLoadding
:
false
,
hasProduct
:
false
hasProduct
:
false
...
@@ -163,7 +163,8 @@ Page({
...
@@ -163,7 +163,8 @@ Page({
wx
.
$storage
.
set
(
"scene"
,
options
);
wx
.
$storage
.
set
(
"scene"
,
options
);
const
{
id
}
=
options
;
const
{
id
}
=
options
;
let
proData
=
await
this
.
getProductDetail
(
id
);
let
proData
=
await
this
.
getProductDetail
(
id
);
if
(
!
proData
)
{
// proData?.status 1-上架 2-下架
if
(
!
proData
||
proData
?.
status
==
2
)
{
this
.
setData
({
this
.
setData
({
isLoadding
:
false
,
isLoadding
:
false
,
hasProduct
:
false
hasProduct
:
false
...
...
packagesList/pages/videoDetal/videoDetal.js
View file @
91cbecf
...
@@ -21,10 +21,11 @@ Page({
...
@@ -21,10 +21,11 @@ Page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
async
onLoad
(
options
)
{
async
onLoad
(
options
)
{
if
(
!
options
&&
options
.
cardId
)
return
if
(
!
options
?.
cardId
&&
!
options
?.
shareType
)
return
const
{
id
}
=
options
;
const
{
id
}
=
options
;
let
videoData
=
await
this
.
getDetailWithLike
(
id
);
let
videoData
=
await
this
.
getDetailWithLike
(
id
);
if
(
!
videoData
)
{
// videoData?.status 1-上架 2-下架
if
(
!
videoData
||
videoData
?.
status
==
2
)
{
this
.
setData
({
this
.
setData
({
isLoadding
:
false
,
isLoadding
:
false
,
hasProduct
:
false
hasProduct
:
false
...
@@ -37,7 +38,7 @@ Page({
...
@@ -37,7 +38,7 @@ Page({
isLoadding
:
false
isLoadding
:
false
});
});
setTimeout
(()
=>
{
setTimeout
(()
=>
{
utils
.
setNavigationBarTitle
(
videoData
.
titl
e
)
utils
.
setNavigationBarTitle
(
videoData
.
proNam
e
)
},
100
)
},
100
)
getApp
()
getApp
()
.
login
()
.
login
()
...
@@ -54,7 +55,8 @@ Page({
...
@@ -54,7 +55,8 @@ Page({
if
(
!
options
||
utils
.
isEmptyObj
(
options
))
return
;
if
(
!
options
||
utils
.
isEmptyObj
(
options
))
return
;
let
{
id
}
=
options
;
let
{
id
}
=
options
;
let
videoData
=
await
this
.
getDetailWithLike
(
id
);
let
videoData
=
await
this
.
getDetailWithLike
(
id
);
if
(
!
videoData
)
{
// videoData?.status 1-上架 2-下架
if
(
!
videoData
||
videoData
?.
status
==
2
)
{
this
.
setData
({
this
.
setData
({
isLoadding
:
false
,
isLoadding
:
false
,
hasProduct
:
false
hasProduct
:
false
...
@@ -67,7 +69,7 @@ Page({
...
@@ -67,7 +69,7 @@ Page({
videoId
:
id
videoId
:
id
});
});
setTimeout
(()
=>
{
setTimeout
(()
=>
{
utils
.
setNavigationBarTitle
(
videoData
.
titl
e
)
utils
.
setNavigationBarTitle
(
videoData
.
proNam
e
)
},
100
)
},
100
)
},
},
...
@@ -88,7 +90,6 @@ Page({
...
@@ -88,7 +90,6 @@ Page({
const
_this
=
this
const
_this
=
this
let
{
videoId
}
=
this
.
data
let
{
videoId
}
=
this
.
data
const
{
vedioUrl
}
=
this
.
data
.
videoData
.
likeList
.
find
(
item
=>
item
.
id
==
videoId
)
const
{
vedioUrl
}
=
this
.
data
.
videoData
.
likeList
.
find
(
item
=>
item
.
id
==
videoId
)
console
.
log
(
vedioUrl
,
'000'
);
wx
.
getSetting
({
wx
.
getSetting
({
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
if
(
res
.
authSetting
[
'scope.writePhotosAlbum'
]
===
false
){
if
(
res
.
authSetting
[
'scope.writePhotosAlbum'
]
===
false
){
...
@@ -124,12 +125,12 @@ Page({
...
@@ -124,12 +125,12 @@ Page({
// 点击猜你喜欢视频
// 点击猜你喜欢视频
chooseVideo
(
e
)
{
chooseVideo
(
e
)
{
const
{
titl
e
,
id
}
=
e
.
detail
const
{
proNam
e
,
id
}
=
e
.
detail
this
.
setData
({
this
.
setData
({
videoId
:
id
videoId
:
id
})
})
setTimeout
(()
=>
{
setTimeout
(()
=>
{
utils
.
setNavigationBarTitle
(
titl
e
)
utils
.
setNavigationBarTitle
(
proNam
e
)
},
100
)
},
100
)
},
},
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment