Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uniapp_vedio
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
uniapp_vedio
Commits
9183be10
Commit
9183be10
authored
Dec 25, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
抖音添加短视频挂载
parent
08aa6009
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
186 deletions
+57
-186
index.vue
vedio/components/home/index.vue
+34
-25
common.js
vedio/mixins/common.js
+2
-15
waterfall.js
vedio/mixins/waterfall.js
+1
-8
loading.vue
vedio/pages/loading.vue
+20
-138
No files found.
vedio/components/home/index.vue
View file @
9183be10
...
@@ -339,31 +339,40 @@
...
@@ -339,31 +339,40 @@
})
=>
{}
})
=>
{}
});
});
},
},
showFirstDialog
()
{
showFirstDialog
()
{
let
that
=
this
;
let
that
=
this
;
// 匹配用户展示视频
let
loadEpisode_id
=
uni
.
getStorageSync
(
'tt_episode_id'
)
||
''
;
let
showFirstVedio
=
uni
.
getStorageSync
(
'showFirstVedio'
)
||
''
;
let
loadAlbum_id
=
uni
.
getStorageSync
(
'tt_album_id'
)
||
''
;
if
(
showFirstVedio
==
''
)
{
setTimeout
(()
=>
{
uni
.
setStorage
({
that
.
post
({
key
:
'showFirstVedio'
,
url
:
'/vedio/firstVedio'
,
data
:
'true'
data
:
{
});
episode_id
:
loadEpisode_id
,
setTimeout
(()
=>
{
album_id
:
loadAlbum_id
that
.
post
({
},
url
:
'/vedio/firstVedio'
,
showLoading
:
false
,
data
:
{},
success
:
({
showLoading
:
false
,
data
success
:
({
})
=>
{
data
if
(
data
.
vedioMsg
!=
null
)
{
})
=>
{
navigateTo
(
`/pagesC/ttvideo/ttVideoDetail?data=`
+
encodeURIComponent
(
if
(
data
.
vedioMsg
!=
null
)
{
JSON
.
stringify
(
data
.
vedioMsg
))
+
navigateTo
(
`/pagesC/ttvideo/ttVideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
data
.
vedioMsg
))
+
'&tt_album_id='
+
data
.
vedioMsg
.
douyinAlbumId
+
'&tt_album_id='
+
data
.
vedioMsg
.
douyinAlbumId
+
'&tt_episode_id='
+
data
.
vedioMsg
.
douyinEpisodeId
);
'&tt_episode_id='
+
data
.
vedioMsg
.
douyinEpisodeId
);
}
}
// 重置短视频挂载id
});
uni
.
setStorage
({
},
800
);
key
:
'tt_album_id'
,
}
data
:
''
});
uni
.
setStorage
({
key
:
'tt_episode_id'
,
data
:
''
});
}
}
});
},
800
);
}
}
}
}
};
};
...
...
vedio/mixins/common.js
View file @
9183be10
...
@@ -35,22 +35,10 @@ export default {
...
@@ -35,22 +35,10 @@ export default {
},
},
methods
:
{
methods
:
{
authTo
(
url
)
{
//登录校验
authTo
(
url
)
{
//登录校验
if
(
app
.
globalData
.
userInfo
)
{
navigateTo
(
url
);
}
else
{
// navigateTo('user/login', {
// redirect: url
// });
}
},
},
authToNs
(
url
)
{
//登录校验不保留当前页面
authToNs
(
url
)
{
//登录校验不保留当前页面
if
(
app
.
globalData
.
userInfo
)
{
redirectTo
(
url
);
}
else
{
// navigateTo('user/login', {
// redirect: url
// });
}
},
},
loadData
()
{},
loadData
()
{},
startPay
()
{
startPay
()
{
...
@@ -88,7 +76,6 @@ export default {
...
@@ -88,7 +76,6 @@ export default {
// navigateTo('user/login?redirect=' + encodeURIComponent(redirect));
// navigateTo('user/login?redirect=' + encodeURIComponent(redirect));
},
},
logout
()
{
logout
()
{
app
.
globalData
.
userInfo
=
null
;
uni
.
removeStorageSync
(
'token'
);
uni
.
removeStorageSync
(
'token'
);
},
},
put
(
options
)
{
put
(
options
)
{
...
...
vedio/mixins/waterfall.js
View file @
9183be10
...
@@ -26,16 +26,9 @@ export default {
...
@@ -26,16 +26,9 @@ export default {
}
}
},
},
loadData
()
{
loadData
()
{
if
(
!
app
.
globalData
.
userInfo
)
{
// redirectTo('user/login');
return
;
}
},
},
queryList
(
page
,
size
)
{
queryList
(
page
,
size
)
{
if
(
!
app
.
globalData
.
userInfo
)
{
this
.
$refs
.
paging
.
complete
([]);
return
;
}
this
.
tempList
=
[];
this
.
tempList
=
[];
this
.
current
=
0
;
this
.
current
=
0
;
if
(
page
===
1
)
{
if
(
page
===
1
)
{
...
...
vedio/pages/loading.vue
View file @
9183be10
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
// #endif
// #endif
// #ifdef MP-WEIXIN
// #ifdef MP-WEIXIN
this
.
wxlogin
()
//
this.wxlogin()
// #endif
// #endif
},
},
methods
:
{
methods
:
{
...
@@ -86,6 +86,9 @@
...
@@ -86,6 +86,9 @@
var
mid3
=
""
;
var
mid3
=
""
;
var
mid4
=
""
;
var
mid4
=
""
;
var
mid5
=
""
;
var
mid5
=
""
;
var
thirdParam
=
""
;
var
album_id
=
""
;
var
episode_id
=
""
;
zs_os
=
wx
.
getSystemInfoSync
().
platform
;
zs_os
=
wx
.
getSystemInfoSync
().
platform
;
// 判断渠道来源
// 判断渠道来源
...
@@ -135,6 +138,19 @@
...
@@ -135,6 +138,19 @@
}
}
thirdParam
=
JSON
.
stringify
(
obj
.
query
);
album_id
=
obj
.
query
.
tt_album_id
??
''
episode_id
=
obj
.
query
.
tt_episode_id
??
''
uni
.
setStorage
({
key
:
'tt_album_id'
,
data
:
album_id
});
uni
.
setStorage
({
key
:
'tt_episode_id'
,
data
:
episode_id
});
// 打印渠道参数
// 打印渠道参数
if
(
this
.
tips1
==
'mints_vedio'
||
tips2
==
'mints_vedio'
)
{
if
(
this
.
tips1
==
'mints_vedio'
||
tips2
==
'mints_vedio'
)
{
this
.
slotParam
=
JSON
.
stringify
(
obj
.
query
);
this
.
slotParam
=
JSON
.
stringify
(
obj
.
query
);
...
@@ -170,7 +186,8 @@
...
@@ -170,7 +186,8 @@
mid2
:
mid2
,
mid2
:
mid2
,
mid3
:
mid3
,
mid3
:
mid3
,
mid4
:
mid4
,
mid4
:
mid4
,
mid5
:
mid5
,
mid5
:
mid5
,
thirdParam
:
thirdParam
,
zsChannel
:
zs_channel
zsChannel
:
zs_channel
},
},
showLoading
:
false
,
showLoading
:
false
,
...
@@ -181,10 +198,9 @@
...
@@ -181,10 +198,9 @@
key
:
'token'
,
key
:
'token'
,
data
:
data
.
token
data
:
data
.
token
});
});
app
.
globalData
.
userInfo
=
data
;
setTimeout
(()
=>
{
setTimeout
(()
=>
{
redirectTo
(
'home'
);
redirectTo
(
'home'
);
},
1
5
00
);
},
1
0
00
);
}
}
});
});
},
},
...
@@ -193,140 +209,6 @@
...
@@ -193,140 +209,6 @@
},
},
});
});
},
wxlogin
()
{
var
that
=
this
;
var
obj
=
wx
.
getLaunchOptionsSync
()
var
channel
=
'mints'
// 渠道
var
clueToken
=
''
// 归因参数
var
adId
=
''
// 计划id
var
advertiserId
=
''
// 账号id
var
reqId
=
''
// 请求id
var
promotionId
=
''
// aid
var
projectId
=
''
;
var
tips2
=
''
;
// 投放测试标记
var
product_type
=
''
;
//自有产品
var
zs_channel
=
''
;
// 自有渠道
var
vedio_id
=
''
;
// 自有剧
var
zs_os
=
''
;
// 当前系统
var
vedio_index
=
''
;
// 自有剧
var
free_index
=
''
;
// 自有剧
var
remark1
=
''
;
// 预留
var
remark2
=
''
;
// 预留
var
remark3
=
''
;
// 预留
var
mid1
=
""
;
var
mid2
=
""
;
var
mid3
=
""
;
var
mid4
=
""
;
var
mid5
=
""
;
zs_os
=
wx
.
getSystemInfoSync
().
platform
;
// 判断渠道来源
if
(
obj
.
query
.
clue_token
??
''
!=
''
)
{
// 头条渠道参数
channel
=
'tt'
clueToken
=
obj
.
query
.
clue_token
??
''
adId
=
obj
.
query
.
ad_id
??
''
advertiserId
=
obj
.
query
.
advertiser_id
??
''
reqId
=
obj
.
query
.
req_id
??
''
promotionId
=
obj
.
query
.
promotion_id
??
''
projectId
=
obj
.
query
.
project_id
??
''
tips2
=
obj
.
query
.
tips2
??
''
product_type
=
obj
.
query
.
product_type
??
''
zs_channel
=
obj
.
query
.
zs_channel
??
''
vedio_id
=
obj
.
query
.
vedio_id
??
''
free_index
=
obj
.
query
.
free_index
??
''
remark1
=
obj
.
query
.
remark1
??
''
remark2
=
obj
.
query
.
remark2
??
''
remark3
=
obj
.
query
.
remark3
??
''
vedio_index
=
obj
.
query
.
vedio_index
??
''
mid1
=
obj
.
query
.
mid1
??
''
mid2
=
obj
.
query
.
mid2
??
''
mid3
=
obj
.
query
.
mid3
??
''
mid4
=
obj
.
query
.
mid4
??
''
mid5
=
obj
.
query
.
mid5
??
''
}
else
if
(
obj
.
query
.
ksChannel
??
''
!=
''
)
{
// 快手渠道参数
channel
=
'kuaishou'
adId
=
obj
.
query
.
ksUnitId
??
''
//组id
advertiserId
=
obj
.
query
.
ksSiteAccountId
??
''
//账户id
clueToken
=
obj
.
query
.
callback
??
''
//快手归因参数
reqId
=
obj
.
query
.
ksCampaignId
??
''
//计划id
promotionId
=
obj
.
query
.
ksPageId
??
''
//落地页id
tips2
=
obj
.
query
.
tips2
??
''
projectId
=
obj
.
query
.
ksCreativeId
??
''
//创意id
product_type
=
obj
.
query
.
product_type
??
''
zs_channel
=
obj
.
query
.
zs_channel
??
''
vedio_id
=
obj
.
query
.
vedio_id
??
''
remark1
=
obj
.
query
.
remark1
??
''
remark2
=
obj
.
query
.
remark2
??
''
remark3
=
obj
.
query
.
remark3
??
''
vedio_index
=
obj
.
query
.
vedio_index
??
''
free_index
=
obj
.
query
.
free_index
??
''
}
else
{
// 自有渠道
}
// 打印渠道参数
if
(
this
.
tips1
==
'mints_vedio'
||
tips2
==
'mints_vedio'
)
{
this
.
slotParam
=
JSON
.
stringify
(
obj
.
query
);
this
.
$refs
.
select
.
open
(
'center'
);
}
uni
.
login
({
provider
:
'weixin'
,
success
:
function
(
loginRes
)
{
that
.
post
({
url
:
'/user/wechatlogin'
,
data
:
{
channel
:
channel
,
clueToken
:
clueToken
,
code
:
loginRes
.
code
,
adId
:
adId
,
advertiserId
:
advertiserId
,
reqId
:
reqId
,
promotionId
:
promotionId
,
projectId
:
projectId
,
productType
:
product_type
,
vedioId
:
vedio_id
,
remark1
:
remark1
,
remark2
:
remark2
,
remark3
:
remark3
,
os
:
zs_os
,
vedioIndex
:
vedio_index
,
freeIndex
:
free_index
,
mid1
:
mid1
,
mid2
:
mid2
,
mid3
:
mid3
,
mid4
:
mid4
,
mid5
:
mid5
,
zsChannel
:
zs_channel
},
showLoading
:
false
,
success
:
({
data
})
=>
{
uni
.
setStorage
({
key
:
'token'
,
data
:
data
.
token
});
app
.
globalData
.
userInfo
=
data
;
setTimeout
(()
=>
{
redirectTo
(
'home'
);
},
1500
);
}
});
},
fail
:
function
(
err
)
{
// 登录授权失败
message
.
notify
(
'登录授权失败 错误码:'
+
err
.
code
);
}
});
}
}
}
}
};
};
...
...
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