Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mini_own
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
geruidan
mini_own
Commits
7750ba44
Commit
7750ba44
authored
Mar 16, 2023
by
珠峰架构
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
授权秀爱
parent
ea73a5b2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
38 deletions
+62
-38
pages/h5/index.vue
pages/h5/index.vue
+18
-4
pages/h5/pay.vue
pages/h5/pay.vue
+26
-28
pages/index/index.vue
pages/index/index.vue
+13
-4
shopro/request/apis.js
shopro/request/apis.js
+5
-2
No files found.
pages/h5/index.vue
View file @
7750ba44
...
...
@@ -5,6 +5,7 @@
</
template
>
<
script
>
import
http
from
'
@/shopro/request/index
'
;
export
default
{
data
()
{
return
{
...
...
@@ -13,8 +14,7 @@
}
,
onReady
(){
// this.webUrl = "http://172.18.0.147:8000/#/?time="+new Date().getTime()
console
.
log
(
this
.
webUrl
)
this
.
webUrl
=
"
https://wxcs.zhonghuihaotai.com/webpage/wxdist/index.html#/?mallId=171795610000098&time=
"
+
new
Date
().
getTime
()
// this.webUrl = "https://wxcs.zhonghuihaotai.com/webpage/wxdist/index.html#/?mallId=171795610000098&time="+new Date().getTime()
// this.webUrl = "https://wx.zhonghuihaotai.com/webpage/wxdist/index.html#/?mallId=134581110000230&companyId=00000310&time="+new Date().getTime()
},
methods
:{
...
...
@@ -22,12 +22,26 @@
console
.
log
(
e
)
console
.
log
(
'
接收到消息:
'
+
JSON
.
stringify
(
e
.
detail
.
data
));
uni
.
navigateToMiniProgram
({
orderId
:
data
.
orderId
,
orderId
:
data
.
orderId
,
});
},
saveMiniCode
(){
let
fsCode
=
uni
.
getStorageSync
(
'
token
'
);
http
(
'
user.miniCode
'
,
{
fsCode
:
fsCode
}).
then
(
res
=>
{
if
(
!
res
.
code
&&
res
.
data
)
{
let
code
=
res
.
data
.
sfCode
;
let
time
=
new
Date
().
getTime
();
this
.
webUrl
=
`https://wxcs.zhonghuihaotai.com/webpage/wxdist/index.html#/?mallId=106975910000477&companyId=999999998&time=
${
time
}
&sfCode=
${
code
}
`
// this.webUrl = `https://wxcs.zhonghuihaotai.com/webpage/wxdist/index.html#/?mallId=106975910000477&companyId=999999998&time=${time}&sfCode=${code}`
}
else
{
}
})
}
},
onLoad
(){
uni
.
hideTabBar
();
uni
.
hideTabBar
();
this
.
saveMiniCode
();
},
onLaunch
(){
}
...
...
pages/h5/pay.vue
View file @
7750ba44
...
...
@@ -8,44 +8,42 @@
export
default
{
data
()
{
return
{
params
:{}
}
},
methods
:
{
pay
()
{
let
params
=
{
"
prepay_id
"
:
"
wx151613092294758229d4369b2a414d0000
"
,
"
appId
"
:
"
wx60c6530c49c52ff7
"
,
"
timeStamp
"
:
"
1678867989
"
,
"
nonceStr
"
:
"
1gaLpfAGDaG70y7SlQMd4GDfd0SzhP8j
"
,
"
package
"
:
"
prepay_id=wx151613092294758229d4369b2a414d0000
"
,
"
signType
"
:
"
RSA
"
,
"
paySign
"
:
"
DEZRfCE2eCZ5Oi+jzEx2qtnSZiDzqy0GE7GRHOfjf1zmwZXpE+OgW6+7ExpmHInNWmiBRoxuDX6TpjM1O/B1241yNi47buf2IsuLE49nlPqw/o0lv1o9zBav/7elM0o3d7jLTljhR6GguEpcBmwNkaFJGYmvO2kS3Llzwl+RHJUPTcfs3YgWFtdJTRhul9aBuIs0ZUAG3qSWIawipBfFBGUYBLusn6+ebYh+SRzOEPZSV8N5lEbLd8CqYq7CxNuJVG5IYZlva3cWRmK8f3R6F/t2gTQveFlI8jEl1OK5ZqEjvYi1ct64DHYtbUl/kzl4pMJAZweQnNbZk8bYQwPGsA==
"
}
console
.
log
(
params
)
console
.
log
(
this
.
params
)
wx
.
requestPayment
({
appId
:
params
.
appId
,
timeStamp
:
params
.
timeStamp
,
nonceStr
:
params
.
nonceStr
,
package
:
params
.
nonceStr
,
signType
:
params
.
signType
,
paySign
:
params
.
paySign
,
success
(
res
)
{
console
.
log
(
"
小程序成功。。。。
"
)
appId
:
this
.
params
.
appId
,
timeStamp
:
this
.
params
.
timeStamp
,
nonceStr
:
this
.
params
.
nonceStr
,
package
:
this
.
params
.
nonceStr
,
signType
:
this
.
params
.
signType
,
paySign
:
this
.
params
.
paySign
,
success
(
res
)
{
console
.
log
(
"
小程序成功。。。。
"
)
console
.
log
(
res
)
console
.
log
(
res
)
},
fail
(
res
)
{
console
.
log
(
"
shibai 。。。。
"
)
console
.
log
(
res
)
},
fail
(
res
)
{
console
.
log
(
"
shibai 。。。。
"
)
console
.
log
(
res
)
}
}
})
}
},
})
}
},
onLoad
(
option
){
let
{
data
,
orderId
}
=
option
;
console
.
log
(
option
);
this
.
params
=
JSON
.
parse
(
decodeURIComponent
(
data
));
console
.
log
(
this
.
params
);
}
}
</
script
>
<
style
>
...
...
pages/index/index.vue
View file @
7750ba44
...
...
@@ -83,10 +83,19 @@
this
.
tabBarVal
=
name
;
console
.
log
(
name
)
if
(
name
==
'
商城
'
)
{
uni
.
navigateTo
({
url
:
'
/pages/h5/index
'
,
})
}
// let fsCode = uni.getStorageSync('token');
// http('user.miniCode', {fsCode:fsCode}).then(res => {
// if (!res.code && res.data) {
uni
.
navigateTo
({
url
:
'
/pages/h5/index
'
,
})
// } else {
// that.todayNum = 0;
// }
// })
}
},
getPhoneNumber
(
e
)
{
if
(
!
e
.
detail
.
code
){
...
...
shopro/request/apis.js
View file @
7750ba44
...
...
@@ -28,9 +28,12 @@ export default {
url
:
'
mall/miniProgram/wxRun
'
,
auth
:
true
,
method
:
"
post
"
},
miniCode
:{
url
:
'
mall/miniCode
'
,
auth
:
true
,
method
:
"
get
"
}
},
index
:{
...
...
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