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
c304e772
Commit
c304e772
authored
Oct 25, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调试投放、登录、支付
parent
f3e7a126
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
160 additions
and
128 deletions
+160
-128
App.vue
vedio/App.vue
+3
-2
common.js
vedio/mixins/common.js
+3
-15
share.js
vedio/mixins/share.js
+2
-2
index.vue
vedio/pages/index/index.vue
+12
-12
loading.vue
vedio/pages/loading.vue
+88
-75
my.vue
vedio/pages/my/my.vue
+0
-2
vipPay.vue
vedio/pagesA/vipPay/vipPay.vue
+52
-20
No files found.
vedio/App.vue
View file @
c304e772
...
...
@@ -147,7 +147,8 @@
windowWidth
:
0
,
bottomSafePadding
:
12
,
h5Url
:
'https://api.mints-id.com/index.html'
,
baseUrl
:
'https://api.mints-tech.cn/camera-api/miniApi'
,
// baseUrl: 'https://api.mints-tech.cn/camera-api/miniApi',
baseUrl
:
'http://192.168.110.71:8301/miniApi'
,
// baseUrl: 'http://test.mints-id.com/ww-new/api',
titleButtonWidth
:
38
,
token
:
''
,
...
...
@@ -161,7 +162,7 @@
auth
:
false
,
// 三要素实名认证
userInfo
:
null
,
cardInfo
:
null
,
pkgName
:
'com.mints.
hel
ivideo'
pkgName
:
'com.mints.
min
ivideo'
}
};
</
script
>
...
...
vedio/mixins/common.js
View file @
c304e772
...
...
@@ -89,7 +89,6 @@ export default {
},
logout
()
{
app
.
globalData
.
userInfo
=
null
;
app
.
globalData
.
token
=
''
;
app
.
globalData
.
userId
=
0
;
app
.
globalData
.
auth
=
false
;
uni
.
removeStorageSync
(
'token'
);
...
...
@@ -125,18 +124,7 @@ 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('&')
// }
const
success
=
options
?.
success
;
const
fail
=
options
?.
fail
;
const
header
=
options
?.
header
??
{};
...
...
@@ -146,8 +134,8 @@ export default {
let
requestTask
;
Object
.
assign
(
header
,
{
// token: app.globalData.token
,
token
:
'AC8FA7EB65C3074472378362124462E70E762CAB0EAD1C6EABB742EB893A61C05F433703067DF5142735505C42F58997'
,
token
:
uni
.
getStorageSync
(
'token'
)
,
//
token: 'AC8FA7EB65C3074472378362124462E70E762CAB0EAD1C6EABB742EB893A61C05F433703067DF5142735505C42F58997',
pkgName
:
app
.
globalData
.
pkgName
})
...
...
vedio/mixins/share.js
View file @
c304e772
...
...
@@ -14,8 +14,8 @@ export default {
data
()
{
return
{
share
:
{
title
:
'
3D打印你的专属伴侣,点击立刻拥有她/他!
'
,
imageUrl
:
'http
://mints-sh.oss-cn-shanghai.aliyuncs.com/userImg/share.jp
g'
,
title
:
'
更多好剧,等你来看
'
,
imageUrl
:
'http
s://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/ic_movie.pn
g'
,
path
:
'/pages/loading?shareId='
+
getApp
().
globalData
.
userId
,
}
}
...
...
vedio/pages/index/index.vue
View file @
c304e772
...
...
@@ -218,18 +218,18 @@
this
.
topList
=
data
.
list
;
}
});
// 最近观看剧
this
.
post
({
url
:
'/vedio/newest'
,
data
:
{},
showLoading
:
false
,
success
:
({
data
})
=>
{
if
(
data
.
vedio
!=
null
)
{
this
.
newRecordBean
=
data
.
vedio
;
}
}
// 最近观看剧
this
.
post
({
url
:
'/vedio/newest'
,
data
:
{},
showLoading
:
false
,
success
:
({
data
})
=>
{
if
(
data
.
vedio
!=
null
)
{
this
.
newRecordBean
=
data
.
vedio
;
}
}
});
},
hide
()
{
...
...
vedio/pages/loading.vue
View file @
c304e772
...
...
@@ -36,83 +36,96 @@
export
default
{
name
:
'loading'
,
mixins
:
[
common
],
data
()
{
return
{
shareId
:
''
}
},
onLoad
(
options
)
{
// message.notify('分享id='+options.shareId);
this
.
shareId
=
options
.
shareId
;
},
onLaunch
(
options
)
{},
onShow
(
options
)
{
this
.
wxlogin
();
setTimeout
(()
=>
{
redirectTo
(
'home'
);
},
2300
);
data
()
{
return
{
tips1
:
''
}
},
onLoad
(
options
)
{
this
.
tips1
=
options
.
tips1
;
},
onShow
(
options
)
{
this
.
wxlogin
();
// setTimeout(() => {
// redirectTo('home');
// }, 2800);
},
methods
:
{
methods
:
{
wxlogin
()
{
var
that
=
this
;
var
obj
=
wx
.
getEnterOptionsSync
()
var
channel
=
''
// 渠道
var
clueToken
=
''
// 归因参数
var
adId
=
''
// 计划id
var
advertiserId
=
''
// 账号id
var
reqId
=
''
// 请求id
var
promotionId
=
''
// aid
var
productId
=
''
if
(
obj
.
query
.
clueToken
??
''
!=
''
)
{
channel
=
'tt'
clueToken
=
obj
.
query
.
clueToken
??
''
adId
=
obj
.
query
.
adId
??
''
advertiserId
=
obj
.
query
.
advertiserId
??
''
reqId
=
obj
.
query
.
reqId
??
''
promotionId
=
obj
.
query
.
promotionId
??
''
productId
=
obj
.
query
.
productId
??
''
}
if
(
obj
.
query
.
ksChannel
??
''
!=
''
)
{
channel
=
'kuaishou'
advertiserId
=
obj
.
query
.
accountid
??
''
clueToken
=
obj
.
query
.
callback
??
''
adId
=
obj
.
query
.
aid
??
''
}
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
,
productId
:
productId
,
},
showLoading
:
false
,
success
:
({
data
})
=>
{
app
.
globalData
.
token
=
data
.
token
;
app
.
globalData
.
userId
=
data
.
pk_id
;
app
.
globalData
.
userInfo
=
data
;
redirectTo
(
'home'
);
}
});
},
fail
:
function
(
err
)
{
// 登录授权失败
message
.
notify
(
'登录授权失败 错误码:'
+
err
.
code
);
}
});
var
that
=
this
;
// var obj = wx.getEnterOptionsSync()
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
=
''
;
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
??
''
}
if
(
obj
.
query
.
ksChannel
??
''
!=
''
)
{
channel
=
'kuaishou'
advertiserId
=
obj
.
query
.
accountid
??
''
clueToken
=
obj
.
query
.
callback
??
''
adId
=
obj
.
query
.
aid
??
''
}
if
(
this
.
tips1
==
'mints_vedio'
||
tips2
==
'mints_vedio'
){
toastMessage
(
"JSON.stringify(this.log)="
+
JSON
.
stringify
(
obj
.
query
)
+
"channel="
+
channel
+
"clueToken="
+
clueToken
+
"adId="
+
adId
+
"advertiserId="
+
advertiserId
+
"projectId="
+
projectId
+
"reqId="
+
reqId
+
"promotionId="
+
promotionId
);
}
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
,
},
showLoading
:
false
,
success
:
({
data
})
=>
{
uni
.
setStorage
({
key
:
'token'
,
data
:
data
.
token
});
app
.
globalData
.
userId
=
data
.
pk_id
;
app
.
globalData
.
userInfo
=
data
;
setTimeout
(()
=>
{
redirectTo
(
'home'
);
},
1500
);
}
});
},
fail
:
function
(
err
)
{
// 登录授权失败
message
.
notify
(
'登录授权失败 错误码:'
+
err
.
code
);
}
});
}
}
};
...
...
vedio/pages/my/my.vue
View file @
c304e772
...
...
@@ -5,7 +5,6 @@
<image
class=
"avatar"
src=
"@/static/logo-about.png"
></image>
<view>
<view
style=
"font-size: 26rpx;color: black;margin-left: 20rpx;"
>
用户ID:
{{
userBean
.
idcode
}}
</view>
<!--
<view
style=
"font-size: 32rpx;color: black;font-weight: 777;margin-left: 20rpx;"
>
未登录
</view>
-->
</view>
</view>
...
...
@@ -111,7 +110,6 @@
navigateTo
(
`/pagesA/vipPay/vipPay`
)
},
handlePhone
()
{
let
that
=
this
// 联系我们
this
.
post
({
url
:
'/app/customerServiceNumbers'
,
...
...
vedio/pagesA/vipPay/vipPay.vue
View file @
c304e772
...
...
@@ -34,7 +34,7 @@
<image
style=
"width: 100%;"
src=
"https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/bg_vip_0.png"
mode=
"widthFix"
/>
<image
style=
"width: 100%;"
src=
"https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/bg_vip_1.png"
mode=
"widthFix"
/>
<image
style=
"width: 100%;
margin-bottom: 80rpx;
"
src=
"https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/bg_vip_1.png"
mode=
"widthFix"
/>
</scroll-view>
</view>
</
template
>
...
...
@@ -75,26 +75,58 @@
choosePack
(
item
,
index
)
{
this
.
selectedIndex
=
index
;
},
handlePay
()
{
handlePay
()
{
let
that
=
this
;
let
vipBean
=
this
.
vipList
[
this
.
selectedIndex
];
message
.
notify
(
'vipBean 价格='
+
vipBean
.
firstPayPrice
);
// this.post({
// url: '/vip/getVipPayParams',
// data: {
// pid: vipBean.pid,
// payChannel: 'WEIXIN'
// },
// showLoading: false,
// success: ({
// data
// }) => {
// let wxParams = data.params
// // 发起微信支付
// }
// });
this
.
post
({
url
:
'/vip/getVipPayParams'
,
data
:
{
pid
:
vipBean
.
pid
,
payChannel
:
'WEIXIN'
},
showLoading
:
false
,
success
:
({
data
})
=>
{
that
.
wxPay
(
data
);
}
});
},
wxPay
(
wxData
){
let
wxParams
=
wxData
.
params
;
let
that
=
this
;
// 发起微信支付
wx
.
requestPayment
({
timeStamp
:
wxParams
.
timeStamp
,
nonceStr
:
wxParams
.
nonceStr
,
package
:
wxParams
.
packageStr
,
signType
:
wxParams
.
signType
,
paySign
:
wxParams
.
paySign
,
success
(
res
)
{
message
.
notify
(
'支付成功'
)
that
.
post
({
url
:
'/vip/queryVipOrder'
,
data
:
{
tid
:
wxData
.
tid
},
showLoading
:
false
,
success
:
({
data
})
=>
{
}
});
setTimeout
(()
=>
{
redirectTo
(
'home'
);
},
1000
);
},
fail
(
res
)
{
message
.
notify
(
'取消支付'
)
}
})
}
}
}
...
...
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