Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
______--______
ShopXO
提交
acfcdacb
ShopXO
项目概览
______--______
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
acfcdacb
编写于
7月 16, 2019
作者:
G
gongfuxiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
baidu mini app
上级
c0de45f0
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
37 addition
and
34 deletion
+37
-34
application/api/controller/User.php
application/api/controller/User.php
+8
-4
config/shopxo.php
config/shopxo.php
+1
-1
config/shopxo.sql
config/shopxo.sql
+19
-19
extend/base/BaiduAuth.php
extend/base/BaiduAuth.php
+1
-1
public/appmini/old/baidu/app.css
public/appmini/old/baidu/app.css
+1
-1
public/appmini/old/baidu/app.js
public/appmini/old/baidu/app.js
+1
-1
public/appmini/old/baidu/pages/answer-list/answer-list.swan
public/appmini/old/baidu/pages/answer-list/answer-list.swan
+1
-1
public/appmini/old/baidu/pages/login/login.js
public/appmini/old/baidu/pages/login/login.js
+3
-4
public/appmini/old/baidu/pages/user/user.swan
public/appmini/old/baidu/pages/user/user.swan
+1
-1
public/appmini/old/baidu/project.swan.json
public/appmini/old/baidu/project.swan.json
+1
-1
未找到文件。
application/api/controller/User.php
浏览文件 @
acfcdacb
...
...
@@ -231,14 +231,18 @@ class User extends Common
//$_POST['config'] = MyC('baidu_mini_program_config');
$_POST
[
'config'
]
=
[
'key'
=>
'C9Gg744cBqQ3zvbC5uOPMg9yWpmuQ8O7'
,
'secret'
=>
'Uibe5l1p4Wxjq5Gqp1xDucWBVfBH9i30'
,
// 'id' => '16634987',
// 'key' => 'G8x7Q2oSIo2Egcps7QB8fQGCQrUDjwNN',
// 'secret' => 'T5PXvGwDxci6GVAeQErigGvTRK48MVRz',
'id'
=>
'14675874'
,
'key'
=>
'G8x7Q2oSIo2Egcps7QB8fQGCQrUDjwNN'
,
'secret'
=>
'T5PXvGwDxci6GVAeQErigGvTRK48MVRz'
,
];
$result
=
(
new
\
base\BaiduAuth
())
->
GetAuthUserInfo
(
$_POST
);
//print_r($result);die;
if
(
$result
[
'status'
]
==
0
)
{
return
UserService
::
AuthUserProgram
(
$result
,
'baidu_openid'
);
return
UserService
::
AuthUserProgram
(
$result
[
'data'
]
,
'baidu_openid'
);
}
return
DataReturn
(
$result
[
'msg'
],
-
10
);
}
...
...
config/shopxo.php
浏览文件 @
acfcdacb
...
...
@@ -15,7 +15,7 @@
return
[
// 开发模式
'is_develop'
=>
fals
e
,
'is_develop'
=>
tru
e
,
// 默认编码
'default_charset'
=>
'utf-8'
,
...
...
config/shopxo.sql
浏览文件 @
acfcdacb
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
extend/base/BaiduAuth.php
浏览文件 @
acfcdacb
...
...
@@ -47,7 +47,7 @@ class BaiduAuth
'client_id'
=>
$params
[
'config'
][
'key'
],
'sk'
=>
$params
[
'config'
][
'secret'
],
];
$result
=
$this
->
HttpRequest
(
'https://
openapi.baidu.com/nalogin/getSessionKeyByCode
'
,
$data
);
$result
=
$this
->
HttpRequest
(
'https://
spapi.baidu.com/oauth/jscode2sessionkey
'
,
$data
);
if
(
empty
(
$result
[
'openid'
]))
{
return
[
'status'
=>-
1
,
'msg'
=>
$result
[
'error_description'
]];
...
...
public/appmini/old/baidu/app.css
浏览文件 @
acfcdacb
...
...
@@ -329,7 +329,7 @@ button[disabled].bg-primary {
right
:
10
rpx
;
bottom
:
35%
;
line-height
:
30
rpx
;
border-radius
:
50%
;
border-radius
:
50%
!important
;
}
.common-online-service
image
{
width
:
60
rpx
;
...
...
public/appmini/old/baidu/app.js
浏览文件 @
acfcdacb
...
...
@@ -57,7 +57,7 @@ App({
// 请求地址
// request_url: "{{request_url}}",
request_url
:
'
http://tp5-dev.com/
'
,
request_url
:
'
https://test.shopxo.net/
'
,
//
request_url: 'https://test.shopxo.net/',
// 基础信息
application_title
:
"
{{application_title}}
"
,
...
...
public/appmini/old/baidu/pages/answer-list/answer-list.swan
浏览文件 @
acfcdacb
...
...
@@ -2,7 +2,7 @@
<view class="item bg-white spacing-mb" s-if="data_list.length > 0" s-for="item, index in data_list">
<view class="base">
<view class="oh">
<image class="avatar fl" src="{{item.avatar}}" mode="widthFix" data-index="{{index}}" bind
E
rror="user_avatar_error" />
<image class="avatar fl" src="{{item.avatar}}" mode="widthFix" data-index="{{index}}" bind
e
rror="user_avatar_error" />
<view class="desc fr tl">{{item.content}}</view>
</view>
<view class="cr-888 tr">{{item.add_time}}</view>
...
...
public/appmini/old/baidu/pages/login/login.js
浏览文件 @
acfcdacb
...
...
@@ -30,7 +30,6 @@ Page({
* 登录授权事件
*/
get_user_info_event
()
{
console
.
log
(
1
)
app
.
user_auth_login
(
this
,
'
user_auth_back_event
'
);
},
...
...
@@ -108,14 +107,14 @@ Page({
var
params
=
swan
.
getStorageSync
(
app
.
data
.
cache_launch_info_key
)
||
null
;
console
.
log
(
params
);
// 数据验证
var
validation
=
[{
fields
:
'
mobile
'
,
msg
:
'
请填写手机号码
'
},
{
fields
:
'
verify
'
,
msg
:
'
请填写验证码
'
},
{
fields
:
'
weixin
_openid
'
,
msg
:
'
授权id不能为空
'
}];
e
.
detail
.
value
[
'
weixin_openid
'
]
=
this
.
data
.
user
.
weixin
_openid
;
var
validation
=
[{
fields
:
'
mobile
'
,
msg
:
'
请填写手机号码
'
},
{
fields
:
'
verify
'
,
msg
:
'
请填写验证码
'
},
{
fields
:
'
baidu
_openid
'
,
msg
:
'
授权id不能为空
'
}];
e
.
detail
.
value
[
'
baidu_openid
'
]
=
this
.
data
.
user
.
baidu
_openid
;
e
.
detail
.
value
[
'
nickname
'
]
=
this
.
data
.
user
.
nickname
;
e
.
detail
.
value
[
'
avatar
'
]
=
this
.
data
.
user
.
avatar
;
e
.
detail
.
value
[
'
province
'
]
=
this
.
data
.
user
.
province
;
e
.
detail
.
value
[
'
city
'
]
=
this
.
data
.
user
.
city
;
e
.
detail
.
value
[
'
gender
'
]
=
this
.
data
.
user
.
gender
;
e
.
detail
.
value
[
'
app_type
'
]
=
'
weixin
'
;
e
.
detail
.
value
[
'
app_type
'
]
=
'
baidu
'
;
e
.
detail
.
value
[
'
referrer
'
]
=
params
==
null
?
this
.
data
.
user
.
referrer
||
0
:
params
.
data
.
referrer
||
0
;
if
(
app
.
fields_check
(
e
.
detail
.
value
,
validation
))
{
swan
.
showLoading
({
title
:
'
处理中...
'
});
...
...
public/appmini/old/baidu/pages/user/user.swan
浏览文件 @
acfcdacb
<!-- 头部 -->
<view class="head-box bg-main">
<view class="head-item oh tc">
<image bindtap="preview_event" class="avatar" src="{{avatar}}" mode="widthFix" bind
E
rror="user_avatar_error" />
<image bindtap="preview_event" class="avatar" src="{{avatar}}" mode="widthFix" bind
e
rror="user_avatar_error" />
<text class="item-name dis-block cr-fff">{{nickname}}</text>
</view>
...
...
public/appmini/old/baidu/project.swan.json
浏览文件 @
acfcdacb
{
"appid"
:
"16634987"
,
"cloudTesting"
:{
"forcePreview"
:
false
},
"host"
:
"baiduboxapp"
,
"preview"
:{
"packageId"
:
218648
},
"setting"
:{
"urlCheck"
:
false
},
"swan"
:{
"baiduboxapp"
:{
"extensionJsVersion"
:
""
,
"swanJsVersion"
:
"3.30.43"
}}}
\ No newline at end of file
{
"appid"
:
"14675874"
,
"cloudTesting"
:{
"forcePreview"
:
false
},
"host"
:
"baiduboxapp"
,
"preview"
:{
"packageId"
:
218648
},
"setting"
:{
"urlCheck"
:
false
},
"swan"
:{
"baiduboxapp"
:{
"swanJsVersion"
:
"3.30.43"
,
"extensionJsVersion"
:
""
}}}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录