Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
b4a1e9ea
Commit
b4a1e9ea
authored
Dec 02, 2021
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
index页面接口修改
parent
fbaba097
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
src/api/login.js
+5
-1
src/pages/index/index.vue
+3
-2
src/pages/login/index.vue
+7
-1
No files found.
src/api/login.js
View file @
b4a1e9ea
...
...
@@ -32,6 +32,9 @@ console.log(process.env,'-----------------config------')
mini_certified
(
options
)
{
return
requestPOST
(
`
${
process
.
env
.
OLSHOP_URL
}
wx/mini_certified`
,
options
)
},
//获取openid
get_open_id_by_code
(
options
){
return
requestGET
(
`
${
process
.
env
.
OLSHOP_URL
}
/wx/get_open_id_by_code?code=
${
options
.
code
}
&channel=1`
,)
},
}
\ No newline at end of file
src/pages/index/index.vue
View file @
b4a1e9ea
...
...
@@ -107,11 +107,12 @@ export default {
wx
.
login
({
success
:
res
=>
{
this
.
code
=
res
.
code
;
login
.
miniLogin
({
code
:
this
.
code
}).
then
(
res1
=>
{
console
.
log
(
this
.
code
,
'-----------------------------110---code'
)
login
.
get_open_id_by_code
({
code
:
this
.
code
}).
then
(
res1
=>
{
if
(
res1
.
data
.
code
==
200
)
{
wx
.
setStorage
({
key
:
"openid"
,
data
:
res1
.
data
.
data
.
openid
data
:
res1
.
data
.
data
});
}
this
.
params
+=
'&open_id='
+
wx
.
getStorageSync
(
"openid"
);
...
...
src/pages/login/index.vue
View file @
b4a1e9ea
...
...
@@ -11,7 +11,7 @@
<div
class=
"btn_info1"
>
<h1>
绑定手机号
</h1>
<p
class=
"hint"
>
绑定手机号,同步历史订单
</p>
<button
class=
"btn"
open-type=
"getPhoneNumber"
@
getphonenumber=
"getPhoneNumber"
>
微信授权一键绑定
</button>
<button
class=
"btn"
v-if=
"showGetPhoneBtn"
open-type=
"getPhoneNumber"
@
getphonenumber=
"getPhoneNumber"
>
微信授权一键绑定
</button>
<div
class=
"btn2"
@
click=
"handbindHandle"
>
手动绑定手机号
</div>
<div
class=
"cancelLogin"
@
click=
"cancelLogin"
>
暂不登录
</div>
</div>
...
...
@@ -85,6 +85,12 @@ export default {
queryOptions
:{},
};
},
computed
:
{
showGetPhoneBtn
()
{
// 梵蜜琳隐藏一键获取手机号
return
this
.
$store
.
state
.
mixid
!=
'sivrl5'
;
}
},
onShow
()
{
wx
.
checkSession
({
success
:
()
=>
{
...
...
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