wechat mini
parent
e440f8c7b0
commit
b6f984d4fc
|
|
@ -130,7 +130,7 @@ class User extends Common
|
|||
*/
|
||||
public function WechatUserInfo()
|
||||
{
|
||||
$result = (new \base\Wechat('wxdaafcb5682165b02', 'e6e46d2f4b04078771a2cd78c95d400b'))->DecryptData(R('encrypted_data'), input('iv'), input('openid'));
|
||||
$result = (new \base\Wechat('wxdaafcb5682165b02', 'e6e46d2f4b04078771a2cd78c95d400b'))->DecryptData(input('encrypted_data'), input('iv'), input('openid'));
|
||||
|
||||
if(is_array($result))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -65,15 +65,6 @@ App({
|
|||
// 设置设备信息
|
||||
this.set_system_info();
|
||||
|
||||
// 初始化用户信息、未授权用户唤醒授权操作
|
||||
let user = this.GetUserCacheInfo();
|
||||
|
||||
// // 用户缓存不存在则唤醒用户授权
|
||||
if (user == false) {
|
||||
// 用户信息为空则唤醒授权
|
||||
this.UserAuthCode();
|
||||
}
|
||||
|
||||
// 启动query参数处理
|
||||
this.startup_query(options);
|
||||
},
|
||||
|
|
@ -244,10 +235,11 @@ App({
|
|||
wx.getSetting({
|
||||
success(res) {
|
||||
console.log('app.js 授权部分');
|
||||
wx.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
});
|
||||
|
||||
if (!res.authSetting['scope.userInfo']) {
|
||||
wx.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
});
|
||||
// wx.authorize({
|
||||
// scope: 'scope.userInfo',
|
||||
// success() {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"pages": ["pages/cart/cart",
|
||||
"pages": [
|
||||
"pages/index/index",
|
||||
"pages/goods-category/goods-category",
|
||||
|
||||
"pages/cart/cart",
|
||||
"pages/user/user",
|
||||
"pages/web-view/web-view",
|
||||
"pages/login/login",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<view wx:if="{{data_list.length > 0}}" class="page">
|
||||
<view wx:for="{{data_list}}" wx:key="key" class="goods-item oh bg-white">
|
||||
<view wx:for="{{data_list}}" class="goods-item oh bg-white">
|
||||
<!-- 选择 -->
|
||||
<view bindtap="selectedt_event" data-type="node" data-index="{{index}}" class="fl selected">
|
||||
<image wx:if="{{(item.selected || false)}}" class="icon" src="/images/default-select-active-icon.png" mode="widthFix" />
|
||||
|
|
|
|||
|
|
@ -31,7 +31,8 @@ Page({
|
|||
*/
|
||||
get_user_info_event(e) {
|
||||
console.log(e, e.detail.userInfo)
|
||||
}
|
||||
app.user_auth_login();
|
||||
},
|
||||
|
||||
/**
|
||||
* 输入手机号码事件
|
||||
|
|
|
|||
Loading…
Reference in New Issue