Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_Travel
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
zhengke
jz_Travel
Commits
97e9fd9a
Commit
97e9fd9a
authored
Jan 18, 2024
by
18224442217
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加密
parent
56233e2f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2105 additions
and
410 deletions
+2105
-410
index.vue
components/auth/index.vue
+72
-48
manifest.json
manifest.json
+2
-2
api.js
plugin/api.js
+390
-360
xhs.js
static/xhs.js
+1641
-0
No files found.
components/auth/index.vue
View file @
97e9fd9a
<
template
>
<
template
>
<div
class=
"auth-page"
>
<div
class=
"auth-page"
v-if=
"false"
>
<u-popup
v-model=
"showDialog"
mode=
"center"
:mask-close-able=
"false"
custom-style=
"padding:0;background:none;"
>
<u-popup
v-model=
"showDialog"
mode=
"center"
:mask-close-able=
"false"
custom-style=
"padding:0;background:none;"
>
<img
:src=
"pageinfo.pic_url"
mode=
"widthFix"
/>
<img
:src=
"pageinfo.pic_url"
mode=
"widthFix"
/>
<!-- #ifdef MP-WEIXIN -->
<!-- #ifdef MP-WEIXIN -->
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
<
script
>
<
script
>
import
coupon
from
"@/components/coupons/coupons"
;
import
coupon
from
"@/components/coupons/coupons"
;
export
default
{
export
default
{
components
:
{
components
:
{
coupon
,
coupon
,
...
@@ -36,18 +37,19 @@
...
@@ -36,18 +37,19 @@
};
};
},
},
created
()
{
created
()
{
this
.
pageinfo
=
uni
.
getStorageSync
(
"basedata"
)
?
// this.pageinfo = uni.getStorageSync("basedata") ?
uni
.
getStorageSync
(
"basedata"
).
auth_page
:
{};
// uni.getStorageSync("basedata").auth_page : {};
if
(
wx
.
getUserProfile
)
{
// if (wx.getUserProfile) {
this
.
canIUseGetUserProfile
=
true
;
// this.canIUseGetUserProfile = true;
}
// }
// #ifdef MP-ALIPAY
// // #ifdef MP-ALIPAY
this
.
canIUseGetUserProfile
=
true
;
// this.canIUseGetUserProfile = true;
// #endif
// // #endif
let
x
=
this
.
pageinfo
.
hotspot
;
// let x = this.pageinfo.hotspot;
let
y
=
this
.
pageinfo
.
hotspot_cancel
;
// let y = this.pageinfo.hotspot_cancel;
this
.
sureStyle
=
`height:
${
x
.
height
}
rpx;width:
${
x
.
width
}
rpx;left:
${
x
.
left
}
rpx;top:
${
x
.
top
}
rpx;`
;
// this.sureStyle = `height:${x.height}rpx;width:${x.width}rpx;left:${x.left}rpx;top:${x.top}rpx;`;
this
.
cancelStyle
=
`height:
${
y
.
height
}
rpx;width:
${
y
.
width
}
rpx;left:
${
y
.
left
}
rpx;top:
${
y
.
top
}
rpx;`
;
// this.cancelStyle = `height:${y.height}rpx;width:${y.width}rpx;left:${y.left}rpx;top:${y.top}rpx;`;
this
.
getUserInfo
()
},
},
methods
:
{
methods
:
{
getoldUser
()
{
getoldUser
()
{
...
@@ -94,44 +96,66 @@
...
@@ -94,44 +96,66 @@
},
},
});
});
},
},
getUserInfo
(
info
)
{
getUserInfo
()
{
var
that
=
this
;
var
that
=
this
;
that
.
showDialog
=
true
;
that
.
showDialog
=
true
;
uni
.
getProvider
({
wx
.
login
({
service
:
"oauth"
,
success
:
(
res
)
=>
{
success
:
function
(
res
)
{
//console.log(res)
if
(
~
res
.
provider
.
indexOf
(
"weixin"
))
{
let
obj
=
{
uni
.
login
({
Source
:
1
,
provider
:
"weixin"
,
OpenId
:
""
,
success
:
(
res
)
=>
{
Name
:
'微信小程序用户'
,
//这里请求接口
Photo
:
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1695262844000_280.png'
,
let
obj
=
{
Gender
:
0
,
Source
:
1
,
Moblie
:
""
,
OpenId
:
""
,
SuperiorId
:
0
,
Name
:
info
.
userInfo
.
nickName
,
code
:
res
.
code
,
Photo
:
info
.
userInfo
.
avatarUrl
,
};
Gender
:
info
.
userInfo
.
gender
,
that
.
getCode
(
obj
);
Moblie
:
""
,
SuperiorId
:
0
,
code
:
res
.
code
,
};
that
.
getCode
(
obj
);
},
fail
:
()
=>
{
uni
.
showToast
({
title
:
"微信登录授权失败"
,
icon
:
"none"
,
});
},
});
}
else
{
uni
.
showToast
({
title
:
"请先安装微信或升级版本"
,
icon
:
"none"
,
});
}
},
},
});
fail
()
{
that
.
showDialog
=
false
uni
.
showToast
({
title
:
'微信登录失败'
})
}
})
// uni.getProvider({
// service: "oauth",
// success: function(res) {
// if (~res.provider.indexOf("weixin")) {
// uni.login({
// provider: "weixin",
// success: (res) => {
// //这里请求接口
// let obj = {
// Source: 1,
// OpenId: "",
// Name: info.userInfo.nickName,
// Photo: info.userInfo.avatarUrl,
// Gender: info.userInfo.gender,
// Moblie: "",
// SuperiorId: 0,
// code: res.code,
// };
// that.getCode(obj);
// },
// fail: () => {
// uni.showToast({
// title: "微信登录授权失败",
// icon: "none",
// });
// },
// });
// } else {
// uni.showToast({
// title: "请先安装微信或升级版本",
// icon: "none",
// });
// }
// },
// });
},
},
close
()
{
close
()
{
this
.
showDialog
=
false
;
this
.
showDialog
=
false
;
...
...
manifest.json
View file @
97e9fd9a
...
@@ -69,9 +69,9 @@
...
@@ -69,9 +69,9 @@
"quickapp"
:
{},
"quickapp"
:
{},
/*
小程序特有相关
*/
/*
小程序特有相关
*/
"mp-weixin"
:
{
"mp-weixin"
:
{
"appid"
:
"wx
5564525562e92ddb
"
,
"appid"
:
"wx
cf0727a7c78b501e
"
,
"setting"
:
{
"setting"
:
{
"urlCheck"
:
fals
e
,
"urlCheck"
:
tru
e
,
"minified"
:
false
"minified"
:
false
},
},
"usingComponents"
:
true
,
"usingComponents"
:
true
,
...
...
plugin/api.js
View file @
97e9fd9a
This diff is collapsed.
Click to expand it.
static/xhs.js
0 → 100644
View file @
97e9fd9a
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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