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
8bdb4fd5
Commit
8bdb4fd5
authored
Dec 20, 2019
by
程默
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
ea92cb7c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
6 deletions
+14
-6
src/pages/index/index.vue
+5
-1
src/pages/login/index.vue
+7
-5
src/utils/index.js
+2
-0
No files found.
src/pages/index/index.vue
View file @
8bdb4fd5
...
@@ -166,8 +166,12 @@ export default {
...
@@ -166,8 +166,12 @@ export default {
let
len
=
res
.
target
.
data
.
length
-
1
;
let
len
=
res
.
target
.
data
.
length
-
1
;
console
.
log
(
res
,
"h5消息"
,
res
.
target
.
data
[
len
]);
console
.
log
(
res
,
"h5消息"
,
res
.
target
.
data
[
len
]);
this
.
shareShopName
=
res
.
target
.
data
[
len
].
shareShopName
||
""
;
this
.
shareShopName
=
res
.
target
.
data
[
len
].
shareShopName
||
""
;
this
.
shareLogoUrl
=
DFSImg
(
res
.
target
.
data
[
len
].
shareLogoUrl
,
500
,
400
);
this
.
shareLogoUrl
=
res
.
target
.
data
[
len
].
shareLogoUrl
;
// this.shareLogoUrl = DFSImg(res.target.data[len].shareLogoUrl, 500, 400);
// console.log()
console
.
log
(
this
.
shareLogoUrl
,
'logourl'
);
}
}
},
},
onUnload
()
{
onUnload
()
{
...
...
src/pages/login/index.vue
View file @
8bdb4fd5
<
template
>
<
template
>
<div
class=
"domain"
>
<div
class=
"domain"
>
<div
class=
"toCLogin"
>
<div
class=
"toCLogin"
>
<image
class=
"img"
mode=
"aspectFit"
:src=
"logoUrl"
></image
>
<image
class=
"img"
mode=
"aspectFit"
:src=
"logoUrl"
/
>
<p
class=
"shopName"
v-if=
"shopName"
>
{{
shopName
}}
</p>
<p
class=
"shopName"
v-if=
"shopName"
>
{{
shopName
}}
</p>
<div
class=
"btn_info"
>
<div
class=
"btn_info"
>
<button
class=
"btn"
lang=
"zh_CN"
open-type=
"getUserInfo"
@
getuserinfo=
"getUserInfo"
>
微信一键登录
</button>
<button
class=
"btn"
lang=
"zh_CN"
open-type=
"getUserInfo"
@
getuserinfo=
"getUserInfo"
>
微信一键登录
</button>
...
@@ -120,11 +120,11 @@ export default {
...
@@ -120,11 +120,11 @@ export default {
});
});
},
},
getUserInfo
:
function
(
e
)
{
getUserInfo
:
function
(
e
)
{
//
wx.showLoading({
wx
.
showLoading
({
//
title: "加载中"
title
:
"加载中"
//
});
});
if
(
e
.
target
.
errMsg
==
"getUserInfo:ok"
&&
this
.
isShow
)
{
if
(
e
.
target
.
errMsg
==
"getUserInfo:ok"
&&
this
.
isShow
)
{
//
wx.hideLoading();
wx
.
hideLoading
();
if
(
this
.
isHaveUnion
)
{
if
(
this
.
isHaveUnion
)
{
//是会员 直接登录
//是会员 直接登录
wx
.
reLaunch
({
wx
.
reLaunch
({
...
@@ -174,6 +174,8 @@ export default {
...
@@ -174,6 +174,8 @@ export default {
this
.
isShowPhone
=
true
;
this
.
isShowPhone
=
true
;
}
}
}
}
}
else
{
wx
.
hideLoading
();
}
}
},
},
getPhoneNumber
(
e
)
{
getPhoneNumber
(
e
)
{
...
...
src/utils/index.js
View file @
8bdb4fd5
...
@@ -56,8 +56,10 @@ export function DFSImg(path, w, h) { //
...
@@ -56,8 +56,10 @@ export function DFSImg(path, w, h) { //
if
(
w
)
style
+=
',w_'
+
w
;
if
(
w
)
style
+=
',w_'
+
w
;
if
(
h
)
style
+=
',h_'
+
h
;
if
(
h
)
style
+=
',h_'
+
h
;
if
(
style
.
length
>
0
)
{
if
(
style
.
length
>
0
)
{
if
(
path
.
indexOf
(
'?x-oss-process'
)
==
-
1
){
path
+=
'?x-oss-process=image/resize,m_pad,limit_0'
+
style
path
+=
'?x-oss-process=image/resize,m_pad,limit_0'
+
style
}
}
}
if
(
path
.
indexOf
(
'http'
)
==
0
)
{
if
(
path
.
indexOf
(
'http'
)
==
0
)
{
return
path
;
return
path
;
}
}
...
...
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