Commit 97e9fd9a authored by 18224442217's avatar 18224442217

加密

parent 56233e2f
<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;">
<img :src="pageinfo.pic_url" mode="widthFix" />
<!-- #ifdef MP-WEIXIN -->
......@@ -17,6 +17,7 @@
<script>
import coupon from "@/components/coupons/coupons";
export default {
components: {
coupon,
......@@ -36,18 +37,19 @@
};
},
created() {
this.pageinfo = uni.getStorageSync("basedata") ?
uni.getStorageSync("basedata").auth_page : {};
if (wx.getUserProfile) {
this.canIUseGetUserProfile = true;
}
// #ifdef MP-ALIPAY
this.canIUseGetUserProfile = true;
// #endif
let x = this.pageinfo.hotspot;
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.cancelStyle = `height:${y.height}rpx;width:${y.width}rpx;left:${y.left}rpx;top:${y.top}rpx;`;
// this.pageinfo = uni.getStorageSync("basedata") ?
// uni.getStorageSync("basedata").auth_page : {};
// if (wx.getUserProfile) {
// this.canIUseGetUserProfile = true;
// }
// // #ifdef MP-ALIPAY
// this.canIUseGetUserProfile = true;
// // #endif
// let x = this.pageinfo.hotspot;
// 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.cancelStyle = `height:${y.height}rpx;width:${y.width}rpx;left:${y.left}rpx;top:${y.top}rpx;`;
this.getUserInfo()
},
methods: {
getoldUser() {
......@@ -94,44 +96,66 @@
},
});
},
getUserInfo(info) {
getUserInfo() {
var that = this;
that.showDialog = true;
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",
});
}
wx.login({
success: (res) => {
//console.log(res)
let obj = {
Source: 1,
OpenId: "",
Name: '微信小程序用户',
Photo: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1695262844000_280.png',
Gender: 0,
Moblie: "",
SuperiorId: 0,
code: res.code,
};
that.getCode(obj);
},
});
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() {
this.showDialog = false;
......
......@@ -69,9 +69,9 @@
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "wx5564525562e92ddb",
"appid" : "wxcf0727a7c78b501e",
"setting" : {
"urlCheck" : false,
"urlCheck" : true,
"minified" : false
},
"usingComponents" : true,
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment