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
4b0035ca
Commit
4b0035ca
authored
Oct 08, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口调试
parent
734d6e7d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
167 additions
and
189 deletions
+167
-189
App.vue
vedio/App.vue
+3
-2
common.js
vedio/mixins/common.js
+38
-41
index.vue
vedio/pages/index/index.vue
+42
-41
loading.vue
vedio/pages/loading.vue
+22
-25
spread.vue
vedio/pages/spread/spread.vue
+62
-80
No files found.
vedio/App.vue
View file @
4b0035ca
...
...
@@ -147,7 +147,7 @@
windowWidth
:
0
,
bottomSafePadding
:
12
,
h5Url
:
'https://api.mints-id.com/index.html'
,
baseUrl
:
'https://api.mints-
id.com/ww-new/a
pi'
,
baseUrl
:
'https://api.mints-
tech.cn/camera-api/miniA
pi'
,
// baseUrl: 'http://test.mints-id.com/ww-new/api',
titleButtonWidth
:
38
,
token
:
''
,
...
...
@@ -160,7 +160,8 @@
realNameStatus
:
false
,
auth
:
false
,
// 三要素实名认证
userInfo
:
null
,
cardInfo
:
null
cardInfo
:
null
,
pkgName
:
"com.mints.helivideo"
}
};
</
script
>
...
...
vedio/mixins/common.js
View file @
4b0035ca
...
...
@@ -23,21 +23,24 @@ export default {
},
onLoad
(
options
)
{
this
.
options
=
options
;
this
.
loadData
();
},
onShow
()
{
if
(
app
.
globalData
.
token
)
{
if
(
!
app
.
globalData
.
userInfo
)
{
// this.getUserInfo();
}
else
{
this
.
infoAuth
();
}
}
else
{
if
(
this
.
auth
)
{
this
.
login
();
}
else
{
this
.
loadData
();
}
}
// this.loadData();
// if (app.globalData.token) {
// if (!app.globalData.userInfo) {
// // this.getUserInfo();
// } else {
// this.infoAuth();
// }
// } else {
// if (this.auth) {
// this.login();
// } else {
// this.loadData();
// }
// }
},
onHide
()
{
if
(
this
.
xhrPool
.
size
)
{
...
...
@@ -186,50 +189,44 @@ export default {
data
,
auth
}
=
options
;
let
params
=
[];
if
(
data
)
{
for
(
let
key
in
data
)
{
params
.
push
(
`
${
key
}
=
${
data
[
key
]}
`
)
}
}
if
(
auth
)
{
params
.
push
(
`session=
${
app
.
globalData
.
token
}
`
)
}
if
(
params
.
length
)
{
url
+=
'?'
+
params
.
join
(
'&'
)
}
//
let params = [];
//
if (data) {
//
for (let key in data) {
//
params.push(`${key}=${data[key]}`)
//
}
//
}
//
if (auth) {
//
params.push(`session=${app.globalData.token}`)
//
}
//
if (params.length) {
//
url += '?' + params.join('&')
//
}
const
success
=
options
?.
success
;
const
fail
=
options
?.
fail
;
//
const header = options?.header ?? {};
const
header
=
options
?.
header
??
{};
showLoading
&&
loading
.
show
();
let
requestTask
;
// Object.assign(header, {
// token: app.globalData.token
// })
Object
.
assign
(
header
,
{
// token: app.globalData.token,
token
:
'AC8FA7EB65C3074472378362124462E70E762CAB0EAD1C6EABB742EB893A61C05F433703067DF5142735505C42F58997'
,
pkgName
:
app
.
globalData
.
pkgName
})
options
=
Object
.
assign
(
options
,
{
url
:
`
${
app
.
globalData
.
baseUrl
}${
url
}
`
,
// header,
header
,
data
,
success
:
(
res
)
=>
{
showLoading
&&
loading
.
hide
();
switch
(
res
.
data
.
code
)
{
case
'200'
:
case
'303'
:
case
'304'
:
switch
(
res
.
data
.
status
)
{
case
200
:
if
(
success
)
{
success
(
res
.
data
);
}
break
;
case
'40000'
:
if
(
fail
)
{
fail
(
res
.
data
.
msg
);
}
// this.logout();
// this.login();
break
;
default
:
if
(
fail
)
{
fail
(
res
.
data
.
msg
);
...
...
vedio/pages/index/index.vue
View file @
4b0035ca
<
template
>
<view
class=
"body"
>
首页
<!--
<z-paging
class=
"flex-1"
ref=
"paging"
v-model=
"dataList"
@
query=
"queryList"
>
-->
<view
class=
"content"
>
<swiper
class=
"banner"
:indicator-dots=
"true"
:autoplay=
"true"
:interval=
"2000"
:duration=
"500"
>
<swiper-item
v-for=
"banner in bannerList"
:key=
"banner.vedioId"
@
click=
"handleBanner(banner.vedioId)"
>
<image
class=
"banner-img"
:src=
"banner.coverImage"
mode=
"aspectFill"
></image>
</swiper-item>
</swiper>
</view>
<!--
</z-paging>
-->
</view>
</
template
>
<
script
>
import
common
from
'@/mixins/common'
;
import
{
base64Compress
,
imageCompress
,
getToLocal
}
from
"@/utils/utils.js"
...
...
@@ -29,56 +37,49 @@
mixins
:
[
common
],
data
()
{
return
{
showlip
:
false
showlip
:
false
,
dataList
:
[],
bannerList
:
[]
};
},
methods
:
{
show
()
{
// if (this.$refs.paging != null) {
// this.$refs.paging.refresh();
// }
// }
console
.
log
(
'showshowshow'
);
},
loadData
()
{
loadData
()
{
this
.
post
({
url
:
'/app/getVideoConfig'
,
data
:
{
session
:
app
.
globalData
.
token
},
url
:
'/vedio/topTabs'
,
showLoading
:
false
,
success
:
({
data
})
=>
{
// this.$refs.paging.complete(data.color);
// this.videoConfig = data
// this.dataList = data.color
// this.currentIndex = 0
// this.videoUrl = data.topVideo
// this.runingVideo = data.runingVideo
// this.currentImageUrl =
// 'https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg_companionx/ic_main_none_icon.png'
// this.jobId = ''
// this.isUpImg = false
// if (this.videoContext == '') {
// this.videoContext = uni.createVideoContext('homeVideo', this)
// }
// this.playVideo()
})
=>
{
console
.
log
(
data
);
// console.log("data.data.list="+data.data.list);
this
.
bannerList
=
data
.
list
;
}
});
},
downloadApp
()
{
if
(
app
.
globalData
.
userInfo
)
{
openUrl
(
app
.
globalData
.
downUrl
);
}
else
{
// navigateTo('user/login', {
// redirect: "index"
// });
}
},
// queryList(page, size) {
// // this.post({
// // url: '/nft/list',
// // data: {
// // page,
// // size
// // },
// // showLoading: false,
// // success: ({
// // data
// // }) => {
// // this.$refs.paging.complete(data);
// // }
// // });
// },
handleBanner
(
vedioId
)
{
}
}
};
...
...
@@ -88,4 +89,4 @@
.body
{
background-color
:
white
;
}
</
style
>
</
style
>
\ No newline at end of file
vedio/pages/loading.vue
View file @
4b0035ca
...
...
@@ -59,7 +59,7 @@
onShow
(
options
)
{
this
.
wxlogin
()
setTimeout
(()
=>
{
redirectTo
(
'home
?coupon='
+
this
.
coupon
);
redirectTo
(
'home
'
);
},
2300
);
},
methods
:
{
...
...
@@ -99,7 +99,8 @@
success
:
function
(
loginRes
)
{
that
.
post
({
url
:
'/app/wxLogin'
,
url
:
'/app/wxLogin'
,
data
:
{
channel
:
channel
,
clueToken
:
clueToken
,
...
...
@@ -115,33 +116,29 @@
data
})
=>
{
uni
.
setStorage
({
key
:
'token'
,
data
:
data
.
session
});
// 0 展示商品 1 展示换脸
uni
.
setStorage
({
key
:
'fromType'
,
data
:
''
+
data
.
fromType
});
//买家秀开关,1开,其它关
uni
.
setStorage
({
key
:
'buyerShowEnable'
,
data
:
data
.
buyerShowEnable
});
//推广开关,1开,其它关
uni
.
setStorage
({
key
:
'promotionEnable'
,
data
:
data
.
promotionEnable
});
//
uni.setStorage({
//
key: 'token',
//
data: data.session
//
});
//
//
0 展示商品 1 展示换脸
//
uni.setStorage({
//
key: 'fromType',
//
data: '' + data.fromType
//
});
//
//
买家秀开关,1开,其它关
//
uni.setStorage({
//
key: 'buyerShowEnable',
//
data: data.buyerShowEnable
//
});
//
//
推广开关,1开,其它关
//
uni.setStorage({
//
key: 'promotionEnable',
//
data: data.promotionEnable
//
});
app
.
globalData
.
token
=
data
.
session
;
app
.
globalData
.
userId
=
data
.
userId
;
app
.
globalData
.
userInfo
=
data
;
if
(
data
.
coupon
!=
null
)
{
that
.
coupon
=
data
.
coupon
.
price
}
}
});
...
...
vedio/pages/spread/spread.vue
View file @
4b0035ca
<
template
>
<view
class=
"body"
>
<status-title
:showBack=
"false"
>
推广
</status-title>
<z-paging
class=
"mt-30"
ref=
"paging"
style=
"height: 100%;"
v-model=
"dataList"
@
query=
"queryList"
:loading-more-enabled=
"false"
>
<view
class=
"item-wrap"
v-for=
"(item, index) in dataList"
:key=
"index"
@
click=
"itemClick(index)"
>
<image
:src=
"item.imgUrl"
></image>
<!--
<view
class=
"btn"
>
立即参与
</view>
-->
</view>
</z-paging>
推荐
</view>
</
template
>
<
script
>
import
common
from
'@/mixins/common'
;
import
{
base64Compress
,
imageCompress
,
getToLocal
}
from
"@/utils/utils.js"
import
{
navigateTo
,
message
,
alert
,
loading
}
from
'@/utils/fun.js'
;
import
{
openUrl
}
from
'@/utils/app+.js'
;
const
app
=
getApp
();
export
default
{
name
:
'index'
,
mixins
:
[
common
],
data
()
{
return
{
dataList
:
[
// {
// imgUrl: 'https://mints-sh.oss-cn-shanghai.aliyuncs.com/system/ww/1671448004109.jpeg',
// type: "sign"
// },
{
imgUrl
:
'https://mints-sh.oss-cn-shanghai.aliyuncs.com/system/ww/1671448035885.jpeg'
,
type
:
"spread"
},
{
imgUrl
:
'https://mints-sh.oss-cn-shanghai.aliyuncs.com/system/ww/1671448048068.jpeg'
,
type
:
"agency"
},
{
imgUrl
:
'https://mints-sh.oss-cn-shanghai.aliyuncs.com/system/ww/1671448057030.jpeg'
,
type
:
"cooperation"
}
]
}
showlip
:
false
};
},
methods
:
{
show
()
{
if
(
this
.
$refs
.
paging
!=
null
)
{
this
.
$refs
.
paging
.
refresh
();
}
this
.
loadData
()
//
if (this.$refs.paging != null) {
//
this.$refs.paging.refresh();
//
}
},
queryList
()
{
loadData
()
{
this
.
post
({
url
:
'/app/getVideoConfig'
,
data
:
{
session
:
app
.
globalData
.
token
},
showLoading
:
false
,
success
:
({
data
})
=>
{
// this.$refs.paging.complete(data.color);
// this.videoConfig = data
// this.dataList = data.color
// this.currentIndex = 0
// this.videoUrl = data.topVideo
// this.runingVideo = data.runingVideo
// this.currentImageUrl =
// 'https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg_companionx/ic_main_none_icon.png'
// this.jobId = ''
// this.isUpImg = false
// if (this.videoContext == '') {
// this.videoContext = uni.createVideoContext('homeVideo', this)
// }
// this.playVideo()
}
});
},
itemClick
(
val
)
{
if
(
val
==
0
)
{
// 个人推广
navigateTo
(
`/pagesC/spreadDetail/spreadDetail?id=`
+
val
)
}
else
if
(
val
==
1
)
{
// 成为代理
navigateTo
(
`/pagesC/spreadDetail/spreadDetail?id=`
+
val
)
}
else
if
(
val
==
2
)
{
// 体验馆合作
navigateTo
(
`/pagesC/spreadDetail/spreadDetail?id=`
+
val
)
downloadApp
()
{
if
(
app
.
globalData
.
userInfo
)
{
openUrl
(
app
.
globalData
.
downUrl
);
}
else
{
// navigateTo('user/login', {
// redirect: "index"
// });
}
}
}
}
}
;
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
scoped
>
.body
{
// background-color: #fff;
}
.item-wrap
{
border-radius
:
30rpx
;
height
:
320rpx
;
width
:
90%
;
margin-bottom
:
30rpx
;
margin-left
:
auto
;
margin-right
:
auto
;
position
:
relative
;
image
{
border-radius
:
30rpx
;
width
:
100%
;
height
:
320rpx
;
position
:
absolute
;
top
:
0
;
}
.btn
{
color
:
#163146
;
border-radius
:
300rpx
;
border
:
solid
1rpx
#163146
;
text-align
:
center
;
line-height
:
70rpx
;
background-color
:
aqua
;
left
:
50%
;
margin-left
:
-150rpx
;
bottom
:
30rpx
;
position
:
absolute
;
width
:
300rpx
;
height
:
70rpx
;
}
background-color
:
white
;
}
</
style
>
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