Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
momo的小宝贝
vue2-elm
提交
3163e0f0
V
vue2-elm
项目概览
momo的小宝贝
/
vue2-elm
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vue2-elm
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3163e0f0
编写于
2月 15, 2017
作者:
M
maguohua
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
complete profile
上级
9d0a891b
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
782 addition
and
549 deletion
+782
-549
README.md
README.md
+11
-1
index.html
index.html
+8
-0
src/page/login/login.vue
src/page/login/login.vue
+2
-7
src/page/profile/children/balance.vue
src/page/profile/children/balance.vue
+50
-0
src/page/profile/children/benefit.vue
src/page/profile/children/benefit.vue
+50
-0
src/page/profile/children/info.vue
src/page/profile/children/info.vue
+50
-0
src/page/profile/children/points.vue
src/page/profile/children/points.vue
+50
-0
src/page/profile/children/service.vue
src/page/profile/children/service.vue
+50
-0
src/page/profile/profile.vue
src/page/profile/profile.vue
+325
-27
src/page/shop/children/foodDetail.vue
src/page/shop/children/foodDetail.vue
+0
-1
src/router/router.js
src/router/router.js
+88
-33
src/service/getData.js
src/service/getData.js
+68
-16
src/service/tempdata/login.js
src/service/tempdata/login.js
+29
-27
src/style/mixin.scss
src/style/mixin.scss
+1
-0
src/test.js
src/test.js
+0
-437
未找到文件。
README.md
浏览文件 @
3163e0f0
...
...
@@ -27,7 +27,7 @@ vue2 + vue-rotuer2 + vuex + webpack + ES6/7 + fetch + sass + flex + svg + http-p
-
[x] 商家详情页 -- 完成
-
[x] 登陆、注册 -- 完成
-
[ ] 修改密码
-
[
] 个人中心
-
[
x] 个人中心 -- 完成
-
[ ] 帐户信息
-
[ ] 服务中心
-
[ ] 添加、删除、修改收货地址
...
...
@@ -73,6 +73,13 @@ vue2 + vue-rotuer2 + vuex + webpack + ES6/7 + fetch + sass + flex + svg + http-p
| |-- msite // 商铺列表页
| |-- order // 订单列表页
| |-- profile // 个人中心
| |--children
| |--balance //我的余额
| |--benefit //我的优惠
| |--info //帐户信息
| |--points //我的积分
| |--service //服务中心
|
| |-- search // 搜索页
| |-- shop // 商铺筛选页
| |-- children
...
...
@@ -212,4 +219,7 @@ npm run build
如果觉得不错,请star一下吧 😊
index.html
浏览文件 @
3163e0f0
...
...
@@ -112,6 +112,14 @@
</symbol>
<symbol
viewBox=
"0 0 1024 1024"
id=
"res-well"
><path
fill=
"#7ED321"
fill-rule=
"evenodd"
d=
"M512 0C229.376 0 0 229.376 0 512s229.376 512 512 512 512-229.376 512-512S794.624 0 512 0zM247.808 402.432c0-36.864 39.936-93.184 93.184-93.184s93.184 56.32 93.184 93.184c0 11.264-9.216 20.48-20.48 20.48-11.264 0-20.48-9.216-20.48-20.48 0-16.384-24.576-52.224-52.224-52.224-27.648 0-52.224 35.84-52.224 52.224 0 11.264-9.216 20.48-20.48 20.48-11.264 0-20.48-9.216-20.48-20.48zM512 800.768c-132.096 0-239.616-96.256-239.616-215.04 0-11.264 9.216-20.48 20.48-20.48 11.264 0 20.48 9.216 20.48 20.48 0 96.256 89.088 174.08 198.656 174.08 109.568 0 198.656-77.824 198.656-174.08 0-11.264 9.216-20.48 20.48-20.48 11.264 0 20.48 9.216 20.48 20.48 0 117.76-107.52 215.04-239.616 215.04zm243.712-377.856c-11.264 0-20.48-9.216-20.48-20.48 0-17.408-24.576-52.224-52.224-52.224-28.672 0-52.224 34.816-52.224 52.224 0 11.264-9.216 20.48-20.48 20.48-11.264 0-20.48-9.216-20.48-20.48 0-36.864 39.936-93.184 93.184-93.184s93.184 56.32 93.184 93.184c0 11.264-9.216 20.48-20.48 20.48z"
></path></symbol>
<symbol
viewBox=
"0 0 1024 1024"
id=
"res-bad"
><path
fill=
"#D0021B"
fill-rule=
"evenodd"
d=
"M512 0C230.326 0 0 230.326 0 512s230.573 512 512 512 512-230.326 512-512S793.674 0 512 0zM240.694 373.755l158.735-56.285 15.306 46.164L256 419.919l-15.306-46.164zm440.409 384.123c-10.122 0-20.49-10.122-25.674-20.49-10.122-10.122-61.47-25.674-148.366-25.674-86.896 0-138.245 15.306-148.366 25.674 0 10.122-10.122 20.49-25.674 20.49s-25.674-10.122-25.674-25.674c0-71.591 174.041-71.591 194.53-71.591 20.489 0 194.53 0 194.53 71.591 10.122 10.368 0 25.674-15.306 25.674zM768 419.919l-163.672-61.47 15.306-46.164 158.735 56.285-10.368 51.348-.001.001z"
></path></symbol>
<symbol
viewBox=
"0 0 122 122"
id=
"avatar-default"
><path
fill=
"#DCDCDC"
fill-rule=
"evenodd"
d=
"M61 121.5c33.413 0 60.5-27.087 60.5-60.5S94.413.5 61 .5.5 27.587.5 61s27.087 60.5 60.5 60.5zm12.526-45.806c-.019 3.316-.108 6.052.237 9.825 3.286 8.749 18.816 9.407 28.468 17.891-1.833 1.998-6.768 6.788-15 10.848-7.02 3.463-16.838 6.416-24.831 6.416-17.366 0-32.764-7.149-42.919-17.264 9.713-8.407 25.49-9.173 28.769-17.891.345-3.773.258-6.509.24-9.825l-.004-.002c-1.903-.985-5.438-7.268-6.01-12.571-1.492-.12-3.843-1.561-4.534-7.247-.37-3.053 1.107-4.77 2.004-5.31-5.046-19.212 1.507-33.16 20.749-34.406 5.753 0 10.18 1.52 11.909 4.523 15.35 2.702 11.756 22.658 9.328 29.882.899.54 2.376 2.258 2.004 5.31-.689 5.687-3.042 7.127-4.534 7.248-.575 5.305-3.25 10.82-5.873 12.57l-.003.003zM61 120.5C28.14 120.5 1.5 93.86 1.5 61S28.14 1.5 61 1.5s59.5 26.64 59.5 59.5-26.64 59.5-59.5 59.5z"
></path></symbol>
<symbol
viewBox=
"0 0 655 1024"
id=
"mobile"
><path
d=
"M0 122.501v778.998C0 968.946 55.189 1024 123.268 1024h408.824c68.52 0 123.268-54.846 123.268-122.501V122.501C655.36 55.054 600.171 0 532.092 0H123.268C54.748 0 0 54.846 0 122.501zM327.68 942.08c-22.622 0-40.96-18.338-40.96-40.96s18.338-40.96 40.96-40.96 40.96 18.338 40.96 40.96-18.338 40.96-40.96 40.96zM81.92 163.84h491.52V819.2H81.92V163.84z"
></path></symbol>
<symbol
viewBox=
"0 0 1024 1024"
id=
"arrow-right"
class=
"icon"
><path
d=
"M716.298 417.341l-.01.01L307.702 7.23l-94.295 94.649 408.591 410.117-408.591 410.137 94.295 94.639 502.891-504.76z"
class=
"selected"
></path></symbol>
<symbol
viewBox=
"0 0 40 40"
id=
"order"
><path
d=
"M31.5 3h-23C6 3 4 5.1 4 7.7v24.7C4 34.9 6 37 8.5 37h23c2.5 0 4.5-2.1 4.5-4.7V7.7C36 5.1 34 3 31.5 3zM11.8 28.2c-1.1 0-2-.9-2-2.1 0-1.1.9-2.1 2-2.1s2 .9 2 2.1c0 1.2-.9 2.1-2 2.1zm0-6.1c-1.1 0-2-.9-2-2.1 0-1.1.9-2.1 2-2.1s2 .9 2 2.1c0 1.1-.9 2.1-2 2.1zm0-6.2c-1.1 0-2-.9-2-2.1 0-1.1.9-2.1 2-2.1s2 .9 2 2.1c0 1.2-.9 2.1-2 2.1zm5.1 11.9h13.5v-2.6H16.9v2.6zm0-6.5h13.5v-2.6H16.9v2.6zm0-6.6h13.5v-2.6H16.9v2.6z"
></path></symbol>
<symbol
viewBox=
"0 0 40 40"
id=
"point"
><path
d=
"M34.6 7.1c0-1.1-1-2.1-2.1-2.1h-24c-1.1 0-2 1-2.1 2.1l-1.6 25C4.6 34.3 6.3 36 8.5 36h24c2.2 0 3.9-1.7 3.7-3.9l-1.6-25zm-5.9 6.1c-.2 4.6-3.7 8.2-8.3 8.2-4.6 0-8.2-3.7-8.4-8.3-.3-.2-.5-.6-.5-1 0-.7.6-1.2 1.3-1.2s1.3.6 1.3 1.2c0 .5-.3.9-.7 1.1.2 3.8 3.2 6.8 7.1 6.8 3.9 0 6.8-3.1 7-6.9-.4-.2-.6-.6-.6-1.1 0-.7.6-1.2 1.3-1.2s1.3.6 1.3 1.2c-.2.6-.4 1-.8 1.2z"
></path></symbol>
<symbol
viewBox=
"0 0 40 40"
id=
"vip"
><path
d=
"M7 33.4c0 1.1.9 1.6 2 1.6h22c1.1 0 2-.5 2-1.6V31H7v2.4z"
></path><path
d=
"M32.1 14.3c-.6 2.3-2.6 4-5.1 4-2.9 0-5.3-2.3-5.3-5.2v-.2c-.5.2-1 .3-1.6.3-.6 0-1.1-.1-1.7-.3v.2c0 2.9-2.4 5.2-5.3 5.2-2.5 0-4.6-1.7-5.1-4.1-.5.4-1.2.6-1.8.6-.3 0-.5.1-.8 0L7.2 29h26l1.7-14.2c-.3.1-.5.1-.8.1-.8 0-1.5-.2-2-.6z"
class=
"st0"
></path><ellipse
cx=
"20.1"
cy=
"8.2"
rx=
"3.2"
ry=
"3.2"
></ellipse><ellipse
cx=
"6.4"
cy=
"10.5"
rx=
"2.4"
ry=
"2.4"
></ellipse><ellipse
cx=
"33.8"
cy=
"10.5"
rx=
"2.4"
ry=
"2.4"
></ellipse></symbol>
<symbol
viewBox=
"0 0 40 40"
id=
"download"
><path
d=
"M30 5H10c-2.8 0-5 2.2-5 5v20c0 2.8 2.2 5 5 5h20c2.8 0 5-2.2 5-5V10c0-2.8-2.2-5-5-5zm-3.9 22.7c-.1.2-.3.4-.6.5-4.3 2.8-10.1 1.6-13-2.8-2.8-4.3-1.6-10.2 2.8-13 4.3-2.8 10.2-1.6 13 2.8.2.2.3.5.4.8.1.2 0 .5-.2.7l-8.8 5.7c-.2.2-.6.1-.7-.2l-.5-.7c-.4-.6-.2-1.5.4-1.9l5.6-3.6c.2-.2.3-.5.2-.7l-.1-.1c-2.2-1.8-5.4-2.1-7.9-.4-3.1 2-4 6.1-2 9.2 2 3.1 6.1 4 9.2 2 .6-.4 1.3-.2 1.7.4l.3.7c.1.2.4.5.2.6zm3.1-4.4l-.9.6c-.2.2-.6.1-.7-.2L26.5 22c-.2-.2-.1-.6.2-.7l1.8-1.1c.2-.2.6-.1.7.2l.6.9c.3.6.1 1.5-.6 2z"
></path></symbol>
<symbol
viewBox=
"0 0 40 40"
id=
"service"
><g
id=
"service_XMLID_1_"
><path
id=
"service_XMLID_6_"
d=
"M32.2 9.5c-.2-.7-.1-.7-.4-.9-1.7-1.2-5.3.2-6.7 1.9-.8-3.8-3.8-6.1-4.7-5.9-.9-.2-4 2.1-4.8 5.9-1.3-1.7-5-3.1-6.7-1.9-.1.1-.5.6-.5.7C5.4 20.7 15 24.6 19 25.7v8.7c0 .7.3 1.2 1 1.2s1-.5 1-1.2v-8.6c4-1 14.2-4.8 11.2-16.3z"
></path><path
id=
"service_XMLID_7_"
d=
"M6 25c-.9 0-1.6.7-1.6 1.5.1.8.7 1.5 1.6 1.5 3.1 0 6.5 1.5 8.5 3.7.3.3.7.6 1.1.6.4 0 .7-.1 1-.4.6-.6.6-1.6.1-2.3C14.1 26.8 10 25 6 25z"
></path><path
id=
"service_XMLID_8_"
d=
"M34.6 25c-4 0-8.1 1.9-10.7 4.6-.6.6-.5 1.6.1 2.2.3.3.7.4 1 .4.4 0 .8-.3 1.1-.6 2-2.1 5.3-3.7 8.4-3.7h.1c.8 0 1.5-.7 1.5-1.5 0-.7-.7-1.4-1.5-1.4z"
></path></g><path
d=
"M0 0h40v40H0z"
class=
"st1"
></path></symbol>
</defs>
</svg>
<router-view></router-view>
...
...
src/page/login/login.vue
浏览文件 @
3163e0f0
...
...
@@ -113,10 +113,6 @@
this
.
validate_token
=
res
.
validate_token
;
}
},
changeuserAccount
(
event
){
console
.
log
(
4444
)
console
.
log
(
event
.
target
.
value
)
},
async
mobileLogin
(){
if
(
this
.
loginWay
)
{
if
(
!
this
.
rightPhoneNumber
)
{
...
...
@@ -146,13 +142,12 @@
this
.
userInfo
=
await
accountLogin
(
this
.
userAccount
,
this
.
passWord
,
this
.
codeNumber
);
}
if
(
this
.
userInfo
.
message
)
{
if
(
!
this
.
userInfo
.
user_id
)
{
this
.
showAlert
=
true
;
this
.
alertText
=
this
.
userInfo
.
message
;
if
(
!
this
.
loginWay
)
this
.
getCaptchaCode
();
}
else
{
this
.
RECORD_USERINFO
(
this
.
uerInfo
);
this
.
RECORD_USERINFO
(
this
.
u
s
erInfo
);
this
.
$router
.
go
(
-
1
);
}
...
...
src/page/profile/children/balance.vue
0 → 100644
浏览文件 @
3163e0f0
<
template
>
<div
class=
"rating_page"
>
<head-top
head-title=
"我的余额"
go-back=
'true'
></head-top>
<section>
我的余额
</section>
</div>
</
template
>
<
script
>
import
headTop
from
'
../../../components/header/head
'
import
{
getImgPath
}
from
'
../../../components/common/mixin
'
export
default
{
data
(){
return
{
}
},
created
(){
},
mixins
:
[
getImgPath
],
components
:
{
headTop
,
},
props
:[],
methods
:
{
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'../../../style/mixin.scss'
;
.rating_page
{
position
:
absolute
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
background-color
:
#fff
;
z-index
:
202
;
padding-top
:
1
.95rem
;
p
,
span
{
font-family
:
Helvetica
Neue
,
Tahoma
,
Arial
;
}
}
</
style
>
src/page/profile/children/benefit.vue
0 → 100644
浏览文件 @
3163e0f0
<
template
>
<div
class=
"rating_page"
>
<head-top
head-title=
"我的优惠"
go-back=
'true'
></head-top>
<section>
我的优惠
</section>
</div>
</
template
>
<
script
>
import
headTop
from
'
../../../components/header/head
'
import
{
getImgPath
}
from
'
../../../components/common/mixin
'
export
default
{
data
(){
return
{
}
},
created
(){
},
mixins
:
[
getImgPath
],
components
:
{
headTop
,
},
props
:[],
methods
:
{
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'../../../style/mixin.scss'
;
.rating_page
{
position
:
absolute
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
background-color
:
#fff
;
z-index
:
202
;
padding-top
:
1
.95rem
;
p
,
span
{
font-family
:
Helvetica
Neue
,
Tahoma
,
Arial
;
}
}
</
style
>
src/page/profile/children/info.vue
0 → 100644
浏览文件 @
3163e0f0
<
template
>
<div
class=
"rating_page"
>
<head-top
head-title=
"帐户信息"
go-back=
'true'
></head-top>
<section>
账户信息页
</section>
</div>
</
template
>
<
script
>
import
headTop
from
'
../../../components/header/head
'
import
{
getImgPath
}
from
'
../../../components/common/mixin
'
export
default
{
data
(){
return
{
}
},
created
(){
},
mixins
:
[
getImgPath
],
components
:
{
headTop
,
},
props
:[],
methods
:
{
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'../../../style/mixin.scss'
;
.rating_page
{
position
:
absolute
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
background-color
:
#fff
;
z-index
:
202
;
padding-top
:
1
.95rem
;
p
,
span
{
font-family
:
Helvetica
Neue
,
Tahoma
,
Arial
;
}
}
</
style
>
src/page/profile/children/points.vue
0 → 100644
浏览文件 @
3163e0f0
<
template
>
<div
class=
"rating_page"
>
<head-top
head-title=
"我的积分"
go-back=
'true'
></head-top>
<section>
我的积分
</section>
</div>
</
template
>
<
script
>
import
headTop
from
'
../../../components/header/head
'
import
{
getImgPath
}
from
'
../../../components/common/mixin
'
export
default
{
data
(){
return
{
}
},
created
(){
},
mixins
:
[
getImgPath
],
components
:
{
headTop
,
},
props
:[],
methods
:
{
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'../../../style/mixin.scss'
;
.rating_page
{
position
:
absolute
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
background-color
:
#fff
;
z-index
:
202
;
padding-top
:
1
.95rem
;
p
,
span
{
font-family
:
Helvetica
Neue
,
Tahoma
,
Arial
;
}
}
</
style
>
src/page/profile/children/service.vue
0 → 100644
浏览文件 @
3163e0f0
<
template
>
<div
class=
"rating_page"
>
<head-top
head-title=
"我的积分"
go-back=
'true'
></head-top>
<section>
我的积分
</section>
</div>
</
template
>
<
script
>
import
headTop
from
'
../../../components/header/head
'
import
{
getImgPath
}
from
'
../../../components/common/mixin
'
export
default
{
data
(){
return
{
}
},
created
(){
},
mixins
:
[
getImgPath
],
components
:
{
headTop
,
},
props
:[],
methods
:
{
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'../../../style/mixin.scss'
;
.rating_page
{
position
:
absolute
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
background-color
:
#fff
;
z-index
:
202
;
padding-top
:
1
.95rem
;
p
,
span
{
font-family
:
Helvetica
Neue
,
Tahoma
,
Arial
;
}
}
</
style
>
src/page/profile/profile.vue
浏览文件 @
3163e0f0
<
template
>
<ul>
<router-link
tag=
'li'
to=
'home'
>
首页
</router-link>
<router-link
tag=
'li'
to=
'city'
>
城市页面
</router-link>
<router-link
tag=
'li'
to=
'msite'
>
商店列表
</router-link>
<router-link
tag=
'li'
to=
'shop'
>
商铺详情
</router-link>
<router-link
tag=
'li'
to=
'search'
>
搜索
</router-link>
<router-link
tag=
'li'
to=
'login'
>
登陆
</router-link>
<router-link
tag=
'li'
to=
'checkout'
>
确认订单
</router-link>
<router-link
tag=
'li'
to=
'forget'
>
忘记密码
</router-link>
<router-link
tag=
'li'
to=
'profile'
>
个人信息
</router-link>
<router-link
tag=
'li'
to=
'order'
>
订单列表
</router-link>
<router-link
tag=
'li'
to=
'vipcard'
>
会员卡
</router-link>
</ul>
</
template
>
<
script
>
export
default
{
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
<
template
>
<div>
<head-top
go-back=
'true'
:head-title=
"profiletitle"
></head-top>
<section
class=
"profile-number"
>
<router-link
to=
"/profile/info"
class=
"profile-link"
>
<span
class=
"privateImage"
>
<svg
class=
"privateImage-svg"
>
<use
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xlink:href=
"#avatar-default"
></use>
</svg>
</span>
<div
class=
"user-info"
>
<p>
3adc5bfcd
</p>
<p>
<span
class=
"user-icon"
>
<svg
class=
"icon-mobile"
fill=
"#fff"
>
<use
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xlink:href=
"#mobile"
></use>
</svg>
</span>
<span
class=
"icon-mobile-number"
>
15800319949
</span>
</p>
</div>
<span
class=
"arrow"
>
<svg
class=
"arrow-svg"
fill=
"#fff"
>
<use
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xlink:href=
"#arrow-right"
></use>
</svg>
</span>
</router-link>
</section>
<section
class=
"info-data"
>
<ul
class=
"clear"
>
<router-link
to=
"/profile/balance"
tag=
"li"
class=
"info-data-link"
>
<span
class=
"info-data-top"
><b>
0.00
</b>
元
</span>
<span
class=
"info-data-bottom"
>
我的余额
</span>
</router-link>
<router-link
to=
"/profile/benefit"
tag=
"li"
class=
"info-data-link"
>
<span
class=
"info-data-top"
><b>
1
</b>
个
</span>
<span
class=
"info-data-bottom"
>
我的优惠
</span>
</router-link>
<router-link
to=
"/profile/points"
tag=
"li"
class=
"info-data-link"
>
<span
class=
"info-data-top"
><b>
1010
</b>
分
</span>
<span
class=
"info-data-bottom"
>
我的积分
</span>
</router-link>
</ul>
</section>
<section
class=
"profile-1reTe"
>
<!-- 我的订单 -->
<router-link
to=
'/order'
class=
"myorder"
>
<aside>
<svg
fill=
"#4aa5f0"
>
<use
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xlink:href=
"#order"
></use>
</svg>
</aside>
<div
class=
"myorder-div"
>
<span>
我的订单
</span>
<span
class=
"myorder-divsvg"
>
<svg
fill=
"#bbb"
>
<use
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xlink:href=
"#arrow-right"
></use>
</svg>
</span>
</div>
</router-link>
<!-- 积分商城 -->
<router-link
to=
'/order'
class=
"myorder"
>
<aside>
<svg
fill=
"#fc7b53"
>
<use
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xlink:href=
"#point"
></use>
</svg>
</aside>
<div
class=
"myorder-div"
>
<span>
积分商城
</span>
<span
class=
"myorder-divsvg"
>
<svg
fill=
"#bbb"
>
<use
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xlink:href=
"#arrow-right"
></use>
</svg>
</span>
</div>
</router-link>
<!-- 饿了么会员卡 -->
<router-link
to=
'/vipcard'
class=
"myorder"
>
<aside>
<svg
fill=
"#ffc636"
>
<use
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xlink:href=
"#vip"
></use>
</svg>
</aside>
<div
class=
"myorder-div"
>
<span>
饿了么会员卡
</span>
<span
class=
"myorder-divsvg"
>
<svg
fill=
"#bbb"
>
<use
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xlink:href=
"#arrow-right"
></use>
</svg>
</span>
</div>
</router-link>
</section>
<section
class=
"profile-1reTe"
>
<!-- 服务中心 -->
<router-link
to=
'/profile/service'
class=
"myorder"
>
<aside>
<svg
fill=
"#4aa5f0"
>
<use
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xlink:href=
"#service"
></use>
</svg>
</aside>
<div
class=
"myorder-div"
>
<span>
服务中心
</span>
<span
class=
"myorder-divsvg"
>
<svg
fill=
"#bbb"
>
<use
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xlink:href=
"#arrow-right"
></use>
</svg>
</span>
</div>
</router-link>
<!-- 下载饿了么APP -->
<router-link
to=
'/profile/service'
class=
"myorder"
>
<aside>
<svg
fill=
"#3cabff"
>
<use
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xlink:href=
"#download"
></use>
</svg>
</aside>
<div
class=
"myorder-div"
style=
"border-bottom:0;"
>
<span>
下载饿了么APP
</span>
<span
class=
"myorder-divsvg"
>
<svg
fill=
"#bbb"
>
<use
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xlink:href=
"#arrow-right"
></use>
</svg>
</span>
</div>
</router-link>
</section>
<transition
name=
"router-slid"
>
<router-view></router-view>
</transition>
</div>
</
template
>
<
script
>
import
headTop
from
'
../../components/header/head
'
import
{
mapState
}
from
'
vuex
'
export
default
{
data
(){
return
{
profiletitle
:
'
我的
'
,
count
:
''
,
//优惠券个数
pontNumber
:
''
,
//积分
}
},
mounted
(){
console
.
log
(
this
.
userInfo
)
},
components
:{
headTop
},
computed
:{
...
mapState
([
'
userInfo
'
]),
},
methods
:{
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'../../style/mixin'
;
.profile-number
{
padding-top
:
1
.95rem
;
.profile-link
{
display
:block
;
display
:flex
;
box-align
:
center
;
-webkit-box-align
:
center
;
-ms-flex-align
:
center
;
align-items
:
center
;
background
:
$blue
;
padding
:
.666667rem
.6rem
;
.privateImage
{
display
:inline-block
;
@include
wh
(
2
.5rem
,
2
.5rem
);
border-radius
:
50%
;
vertical-align
:middle
;
.privateImage-svg
{
background
:
$fc
;
border-radius
:
50%
;
@include
wh
(
2
.5rem
,
2
.5rem
);
}
}
.user-info
{
margin-left
:
.48rem
;
-webkit-box-flex
:
1
;
-ms-flex-positive
:
1
;
flex-grow
:
1
;
p
{
font-weight
:
700
;
@include
sc
(
.8rem
,
$fc
);
.user-icon
{
@include
wh
(
0
.5rem
,
0
.75rem
);
display
:inline-block
;
vertical-align
:middle
;
line-height
:
0
.75rem
;
.icon-mobile
{
@include
wh
(
100%
,
100%
);
}
}
.icon-mobile-number
{
display
:inline-block
;
@include
sc
(
.57333rem
,
$fc
);
}
}
}
.arrow
{
@include
wh
(
.46667rem
,.
98rem
);
display
:inline-block
;
svg
{
@include
wh
(
100%
,
100%
);
}
}
}
}
.info-data
{
width
:
100%
;
background
:
$fc
;
box-sizing
:
border-box
;
ul
{
.info-data-link
{
float
:left
;
width
:
33
.33%
;
display
:inline-block
;
border-right
:
1px
solid
#f1f1f1
;
span
{
display
:block
;
width
:
100%
;
text-align
:center
;
}
.info-data-top
{
@include
sc
(
.55rem
,
#333
);
padding
:
.853333rem
0
.453333rem
;
b
{
display
:inline-block
;
@include
sc
(
1
.2rem
,
#f90
);
font-weight
:
700
;
line-height
:
1rem
;
font-family
:
Helvetica
Neue
,
Tahoma
;
}
}
.info-data-bottom
{
@include
sc
(
.57333rem
,
#666
);
font-weight
:
400
;
padding-bottom
:
.453333rem
;
}
}
.info-data-link
:nth-of-type
(
2
)
{
.info-data-top
{
b
{
color
:
#ff5f3e
;
}
}
}
.info-data-link
:nth-of-type
(
3
)
{
border
:
0
;
.info-data-top
{
b
{
color
:
#6ac20b
;
}
}
}
}
}
.profile-1reTe
{
margin-top
:
.4rem
;
background
:
$fc
;
.myorder
{
padding-left
:
1
.6rem
;
display
:flex
;
align-items
:
center
;
aside
{
@include
wh
(
.7rem
,.
7rem
);
margin-left
:
-.866667rem
;
margin-right
:
.266667rem
;
display
:flex
;
align-items
:
center
;
svg
{
@include
wh
(
100%
,
100%
);
}
}
.myorder-div
{
width
:
100%
;
border-bottom
:
1px
solid
#f1f1f1
;
padding
:
.433333rem
.266667rem
.433333rem
0
;
@include
sc
(
.7rem
,
#333
);
display
:flex
;
justify-content
:space-between
;
span
{
display
:block
;
}
.myorder-divsvg
{
@include
wh
(
.46667rem
,.
466667rem
);
svg
{
@include
wh
(
100%
,
100%
);
}
}
}
}
.myorder
:nth-of-type
(
3
)
.myorder-div
{
border
:
0
;
}
}
.router-slid-enter-active
,
.router-slid-leave-active
{
transition
:
all
.4s
;
}
.router-slid-enter
,
.router-slid-leave-active
{
transform
:
translateX
(
100%
);
}
</
style
>
src/page/shop/children/foodDetail.vue
浏览文件 @
3163e0f0
...
...
@@ -60,7 +60,6 @@
this
.
satisfy_rate
=
this
.
$route
.
query
.
satisfy_rate
;
this
.
foods
=
this
.
$route
.
query
.
foods
;
this
.
shopId
=
this
.
$route
.
query
.
shopId
;
console
.
log
(
this
.
foods
)
},
mixins
:
[
getImgPath
],
components
:
{
...
...
src/router/router.js
浏览文件 @
3163e0f0
...
...
@@ -15,41 +15,96 @@ const confirmOrder = r => require.ensure([], () => r(require('../page/confirmOrd
const
foodDetail
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
../page/shop/children/foodDetail
'
)),
'
foodDetail
'
)
const
shopDetail
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
../page/shop/children/shopDetail
'
)),
'
shopDetail
'
)
const
shopSafe
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
../page/shop/children/shopSafe
'
)),
'
shopSafe
'
)
const
info
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
../page/profile/children/info
'
)),
'
info
'
)
const
balance
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
../page/profile/children/balance
'
)),
'
balance
'
)
const
benefit
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
../page/profile/children/benefit
'
)),
'
benefit
'
)
const
points
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
../page/profile/children/points
'
)),
'
points
'
)
const
service
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
../page/profile/children/service
'
)),
'
service
'
)
export
default
[{
path
:
'
/
'
,
component
:
App
,
//顶层路由,对应index.html
children
:
[
//二级路由。对应App.vue
{
path
:
''
,
redirect
:
'
/home
'
},
//地址为空时跳转home页面
{
path
:
'
/home
'
,
component
:
home
},
//首页城市列表页
{
path
:
'
/city/:cityid
'
,
component
:
city
},
//当前选择城市页
{
path
:
'
/msite
'
,
component
:
msite
,
},
//所有商铺列表页
{
path
:
'
/food
'
,
component
:
food
},
//特色商铺列表页
{
path
:
'
/search/:geohash
'
,
component
:
search
},
//搜索页
{
path
:
'
/shop
'
,
component
:
shop
,
children
:
[
{
path
:
'
foodDetail
'
,
component
:
foodDetail
,
},
{
path
:
'
shopDetail
'
,
component
:
shopDetail
,
children
:
[
{
path
:
'
shopSafe
'
,
component
:
shopSafe
,
},
]
}
]
},
//商铺详情页
{
path
:
'
/confirmOrder
'
,
component
:
confirmOrder
},
//确认订单页
{
path
:
'
/login
'
,
component
:
login
},
//登陆注册页
{
path
:
'
/profile
'
,
component
:
profile
},
//个人信息页
{
path
:
'
/forget
'
,
component
:
forget
},
//修改密码页
{
path
:
'
/order
'
,
component
:
order
},
//订单列表页
{
path
:
'
/vipcard
'
,
component
:
vipcard
},
//vip卡页
path
:
'
/
'
,
component
:
App
,
//顶层路由,对应index.html
children
:
[
//二级路由。对应App.vue
{
path
:
''
,
redirect
:
'
/home
'
},
//地址为空时跳转home页面
{
path
:
'
/home
'
,
component
:
home
},
//首页城市列表页
{
path
:
'
/city/:cityid
'
,
component
:
city
},
//当前选择城市页
{
path
:
'
/msite
'
,
component
:
msite
,
},
//所有商铺列表页
{
path
:
'
/food
'
,
component
:
food
},
//特色商铺列表页
{
path
:
'
/search/:geohash
'
,
component
:
search
},
//搜索页
{
path
:
'
/shop
'
,
component
:
shop
,
children
:
[{
path
:
'
foodDetail
'
,
component
:
foodDetail
,
},
{
path
:
'
shopDetail
'
,
component
:
shopDetail
,
children
:
[{
path
:
'
shopSafe
'
,
component
:
shopSafe
,
},
]
}]
},
//商铺详情页
{
path
:
'
/confirmOrder
'
,
component
:
confirmOrder
},
//确认订单页
{
path
:
'
/login
'
,
component
:
login
},
//登陆注册页
{
path
:
'
/profile
'
,
component
:
profile
,
children
:
[{
path
:
'
info
'
,
component
:
info
,
},
{
path
:
'
balance
'
,
component
:
balance
,
},
{
path
:
'
benefit
'
,
component
:
benefit
,
},
{
path
:
'
points
'
,
component
:
points
,
},
{
path
:
'
service
'
,
component
:
service
,
}]
},
//个人信息页
{
path
:
'
/forget
'
,
component
:
forget
},
//修改密码页
{
path
:
'
/order
'
,
component
:
order
},
//订单列表页
{
path
:
'
/vipcard
'
,
component
:
vipcard
},
//vip卡页
]
}]
\ No newline at end of file
src/service/getData.js
浏览文件 @
3163e0f0
...
...
@@ -10,27 +10,37 @@ import * as login from './tempdata/login'
/**
* 获取首页默认地址
*/
export
const
cityGuess
=
()
=>
fetch
(
'
GET
'
,
'
/v1/cities
'
,
{
type
:
'
guess
'
});
export
const
cityGuess
=
()
=>
fetch
(
'
GET
'
,
'
/v1/cities
'
,
{
type
:
'
guess
'
});
/**
* 获取首页热门城市
*/
export
const
hotcity
=
()
=>
fetch
(
'
GET
'
,
'
/v1/cities
'
,
{
type
:
'
hot
'
});
export
const
hotcity
=
()
=>
fetch
(
'
GET
'
,
'
/v1/cities
'
,
{
type
:
'
hot
'
});
/**
* 获取首页所有城市
*/
export
const
groupcity
=
()
=>
fetch
(
'
GET
'
,
'
/v1/cities
'
,
{
type
:
'
group
'
});
export
const
groupcity
=
()
=>
fetch
(
'
GET
'
,
'
/v1/cities
'
,
{
type
:
'
group
'
});
/**
* 获取当前所在城市
*/
export
const
currentcity
=
number
=>
fetch
(
'
GET
'
,
'
/v1/cities/
'
+
number
,
{});
/**
/**
* 获取搜索地址
*/
export
const
searchplace
=
(
cityid
,
value
)
=>
fetch
(
'
GET
'
,
'
/v1/pois
'
,
{
type
:
'
search
'
,
city_id
:
cityid
,
keyword
:
value
});
export
const
searchplace
=
(
cityid
,
value
)
=>
fetch
(
'
GET
'
,
'
/v1/pois
'
,
{
type
:
'
search
'
,
city_id
:
cityid
,
keyword
:
value
});
/**
* 获取msite页面地址信息
...
...
@@ -40,7 +50,11 @@ export const msiteAdress = geohash => fetch('GET', '/v2/pois/' + geohash, {});
/**
* 获取msite页面食品分类列表
*/
export
const
msiteFoodTypes
=
geohash
=>
fetch
(
'
GET
'
,
'
/v2/index_entry
'
,
{
geohash
,
group_type
:
'
1
'
,
'
flags[]
'
:
'
F
'
});
export
const
msiteFoodTypes
=
geohash
=>
fetch
(
'
GET
'
,
'
/v2/index_entry
'
,
{
geohash
,
group_type
:
'
1
'
,
'
flags[]
'
:
'
F
'
});
/**
* 获取msite商铺列表
...
...
@@ -52,42 +66,79 @@ export const shopList = (latitude, longitude, offset, restaurant_category_id = '
supportStr
+=
'
&support_ids[]=
'
+
item
.
id
;
}
});
let
data
=
{
latitude
,
longitude
,
offset
,
limit
:
'
20
'
,
'
extras[]
'
:
'
activities
'
,
keyword
:
''
,
restaurant_category_id
,
'
restaurant_category_ids[]
'
:
restaurant_category_ids
,
order_by
,
'
delivery_mode[]
'
:
delivery_mode
+
supportStr
};
let
data
=
{
latitude
,
longitude
,
offset
,
limit
:
'
20
'
,
'
extras[]
'
:
'
activities
'
,
keyword
:
''
,
restaurant_category_id
,
'
restaurant_category_ids[]
'
:
restaurant_category_ids
,
order_by
,
'
delivery_mode[]
'
:
delivery_mode
+
supportStr
};
return
fetch
(
'
GET
'
,
'
/shopping/restaurants
'
,
data
);
};
};
/**
* 获取search页面搜索结果
*/
export
const
searchRestaurant
=
(
geohash
,
keyword
)
=>
fetch
(
'
GET
'
,
'
/v4/restaurants
'
,
{
'
extras[]
'
:
'
restaurant_activity
'
,
geohash
,
keyword
,
type
:
'
search
'
});
export
const
searchRestaurant
=
(
geohash
,
keyword
)
=>
fetch
(
'
GET
'
,
'
/v4/restaurants
'
,
{
'
extras[]
'
:
'
restaurant_activity
'
,
geohash
,
keyword
,
type
:
'
search
'
});
/**
* 获取food页面的 category 种类列表
*/
export
const
foodCategory
=
(
latitude
,
longitude
)
=>
fetch
(
'
GET
'
,
'
/shopping/v2/restaurant/category
'
,
{
latitude
,
longitude
});
export
const
foodCategory
=
(
latitude
,
longitude
)
=>
fetch
(
'
GET
'
,
'
/shopping/v2/restaurant/category
'
,
{
latitude
,
longitude
});
/**
* 获取food页面的配送方式
*/
export
const
foodDelivery
=
(
latitude
,
longitude
)
=>
fetch
(
'
GET
'
,
'
/shopping/v1/restaurants/delivery_modes
'
,
{
latitude
,
longitude
,
kw
:
''
});
export
const
foodDelivery
=
(
latitude
,
longitude
)
=>
fetch
(
'
GET
'
,
'
/shopping/v1/restaurants/delivery_modes
'
,
{
latitude
,
longitude
,
kw
:
''
});
/**
* 获取food页面的商家属性活动列表
*/
export
const
foodActivity
=
(
latitude
,
longitude
)
=>
fetch
(
'
GET
'
,
'
/shopping/v1/restaurants/activity_attributes
'
,
{
latitude
,
longitude
,
kw
:
''
});
export
const
foodActivity
=
(
latitude
,
longitude
)
=>
fetch
(
'
GET
'
,
'
/shopping/v1/restaurants/activity_attributes
'
,
{
latitude
,
longitude
,
kw
:
''
});
/**
* 获取shop页面商铺详情
*/
export
const
shopDetails
=
(
shopid
,
latitude
,
longitude
)
=>
fetch
(
'
GET
'
,
'
/shopping/restaurant/
'
+
shopid
,
{
latitude
,
longitude
:
longitude
+
'
&extras[]=activities&extras[]=album&extras[]=license&extras[]=identification&extras[]=statistics
'
});
export
const
shopDetails
=
(
shopid
,
latitude
,
longitude
)
=>
fetch
(
'
GET
'
,
'
/shopping/restaurant/
'
+
shopid
,
{
latitude
,
longitude
:
longitude
+
'
&extras[]=activities&extras[]=album&extras[]=license&extras[]=identification&extras[]=statistics
'
});
/**
* 获取food页面的商家属性活动列表
*/
export
const
foodMenu
=
restaurant_id
=>
fetch
(
'
GET
'
,
'
/shopping/v2/menu
'
,
{
restaurant_id
});
export
const
foodMenu
=
restaurant_id
=>
fetch
(
'
GET
'
,
'
/shopping/v2/menu
'
,
{
restaurant_id
});
/**
* 获取商铺评价列表
*/
export
const
getRatingList
=
(
offset
,
tag_name
=
''
)
=>
fetch
(
'
GET
'
,
'
/ugc/v2/restaurants/834828/ratings
'
,
{
has_content
:
true
,
offset
,
limit
:
10
,
tag_name
});
export
const
getRatingList
=
(
offset
,
tag_name
=
''
)
=>
fetch
(
'
GET
'
,
'
/ugc/v2/restaurants/834828/ratings
'
,
{
has_content
:
true
,
offset
,
limit
:
10
,
tag_name
});
/**
* 获取商铺评价分数
*/
...
...
@@ -111,7 +162,7 @@ export const getcaptchas = () => fetch('POST', '/v1/captchas', {});
/**
* 账号密码登陆
*/
export
const
accountLogin
=
(
username
,
password
,
captcha_code
)
=>
fetch
(
'
POST
'
,
'
/v2/login
'
,
{
username
,
password
,
captcha_code
});
//
export const accountLogin = (username, password, captcha_code) => fetch('POST', '/v2/login', {username, password, captcha_code});
...
...
@@ -143,3 +194,4 @@ const setpromise = data => {
// export const ratingTags = shopid => setpromise(shop.tage);
export
const
mobileCode
=
phone
=>
setpromise
(
login
.
validate_token
);
export
const
sendLogin
=
(
code
,
mobile
,
validate_token
)
=>
setpromise
(
login
.
userInfo
);
export
const
accountLogin
=
(
username
,
password
,
captcha_code
)
=>
setpromise
(
login
.
userInfo
);
\ No newline at end of file
src/service/tempdata/login.js
浏览文件 @
3163e0f0
export
const
validate_token
=
{
"
validate_token
"
:
"
cd8f6585f98d503935bd175295b37ae621c0bf06949a46c226125f28d8efd0a9
"
};
export
const
validate_token
=
{
"
validate_token
"
:
"
cd8f6585f98d503935bd175295b37ae621c0bf06949a46c226125f28d8efd0a9
"
};
export
const
userInfo
=
{
"
user_id
"
:
109065163
,
"
mobile
"
:
"
13681711254
"
,
"
is_mobile_valid
"
:
true
,
"
email
"
:
""
,
"
is_email_valid
"
:
false
,
"
avatar
"
:
""
,
"
username
"
:
"
32f7e5896
"
,
"
is_active
"
:
true
,
"
brand_member
"
:
false
,
"
point
"
:
960
,
"
brand_member_new
"
:
0
,
"
column_desc
"
:{
"
gift_mall_desc
"
:
"
0
\
u5143
\
u597d
\
u7269
\
u5728
\
u8fd9
\
u91cc!
"
,
"
game_desc
"
:
"
\
u73a9
\
u6e38
\
u620f
\
u9886
\
u7ea2
\
u5305
"
,
"
game_is_show
"
:
1
,
"
game_link
"
:
"
https:
\
/
\
/gamecenter.faas.ele.me
"
,
"
game_image_hash
"
:
"
05f108ca4e0c543488799f0c7c708cb1jpeg
"
"
user_id
"
:
109065163
,
"
mobile
"
:
"
13681711254
"
,
"
is_mobile_valid
"
:
true
,
"
email
"
:
""
,
"
is_email_valid
"
:
false
,
"
avatar
"
:
""
,
"
username
"
:
"
32f7e5896
"
,
"
is_active
"
:
true
,
"
brand_member
"
:
false
,
"
point
"
:
960
,
"
brand_member_new
"
:
0
,
"
column_desc
"
:
{
"
gift_mall_desc
"
:
"
0
\
u5143
\
u597d
\
u7269
\
u5728
\
u8fd9
\
u91cc!
"
,
"
game_desc
"
:
"
\
u73a9
\
u6e38
\
u620f
\
u9886
\
u7ea2
\
u5305
"
,
"
game_is_show
"
:
1
,
"
game_link
"
:
"
https:
\
/
\
/gamecenter.faas.ele.me
"
,
"
game_image_hash
"
:
"
05f108ca4e0c543488799f0c7c708cb1jpeg
"
},
"
pay_without_password
"
:
null
,
"
delivery_card_expire_days
"
:
0
,
"
balance
"
:
0
,
"
payment_quota
"
:
50
,
"
current_address_id
"
:
0
,
"
current_invoice_id
"
:
0
,
"
referal_code
"
:
""
,
"
gift_amount
"
:
2
};
"
pay_without_password
"
:
null
,
"
delivery_card_expire_days
"
:
0
,
"
balance
"
:
0
,
"
payment_quota
"
:
50
,
"
current_address_id
"
:
0
,
"
current_invoice_id
"
:
0
,
"
referal_code
"
:
""
,
"
gift_amount
"
:
2
};
\ No newline at end of file
src/style/mixin.scss
浏览文件 @
3163e0f0
$blue
:
#3190e8
;
$bc
:
#e4e4e4
;
$fc
:
#fff
;
// 背景图片地址和大小
@mixin
bis
(
$url
)
{
...
...
src/test.js
已删除
100644 → 0
浏览文件 @
9d0a891b
webpackJsonp
([
23
],
{
0
:
function
(
t
,
e
,
a
)
{
t
.
exports
=
a
(
176
)
},
113
:
function
(
t
,
e
)
{
"
use strict
"
;
Object
.
defineProperty
(
e
,
"
__esModule
"
,
{
value
:
!
0
});
var
a
=
function
(
t
)
{
var
e
=
document
.
createElement
(
"
a
"
);
e
.
href
=
t
;
var
a
=
[
"
http:
"
,
"
https:
"
,
"
eleme:
"
];
return
a
.
indexOf
(
e
.
protocol
)
!==
-
1
&&
!
(
e
.
hostname
&&
!
e
.
hostname
.
match
(
/
(
^|
\.)
ele
(
net
)?\.
me$/
))
};
e
.
default
=
{
post
:
function
(
t
,
e
)
{
var
a
=
{
method
:
"
POST
"
,
credentials
:
"
include
"
,
body
:
JSON
.
stringify
(
e
)
};
return
window
.
fetch
(
t
,
a
).
then
(
function
(
t
)
{
var
e
=
t
.
json
();
return
t
.
ok
?
e
:
e
.
then
(
Promise
.
reject
.
bind
(
Promise
))
})
},
redirect
:
function
()
{
var
t
=
(
new
window
.
UParams
).
redirect
;
t
&&
a
(
t
)
||
(
t
=
"
/msite/
"
),
location
.
href
=
t
}
}
},
140
:
function
(
t
,
e
,
a
)
{
var
s
,
o
,
i
=
{};
a
(
559
),
s
=
a
(
329
),
o
=
a
(
878
),
t
.
exports
=
s
||
{},
t
.
exports
.
__esModule
&&
(
t
.
exports
=
t
.
exports
.
default
);
var
c
=
"
function
"
==
typeof
t
.
exports
?
t
.
exports
.
options
||
(
t
.
exports
.
options
=
{})
:
t
.
exports
;
o
&&
(
c
.
template
=
o
),
c
.
computed
||
(
c
.
computed
=
{}),
Object
.
keys
(
i
).
forEach
(
function
(
t
)
{
var
e
=
i
[
t
];
c
.
computed
[
t
]
=
function
()
{
return
e
}
})
},
176
:
function
(
t
,
e
,
a
)
{
"
use strict
"
;
var
s
=
a
(
1006
)
,
o
=
babelHelpers
.
interopRequireDefault
(
s
);
new
Vue
({
el
:
"
body
"
,
components
:
{
App
:
o
.
default
}
})
},
328
:
function
(
t
,
e
,
a
)
{
"
use strict
"
;
Object
.
defineProperty
(
e
,
"
__esModule
"
,
{
value
:
!
0
});
var
s
=
a
(
1007
)
,
o
=
babelHelpers
.
interopRequireDefault
(
s
)
,
i
=
a
(
1008
)
,
c
=
babelHelpers
.
interopRequireDefault
(
i
)
,
n
=
a
(
4
);
e
.
default
=
{
components
:
{
ElemeHeader
:
n
.
ElemeHeader
,
Message
:
o
.
default
,
Password
:
c
.
default
},
data
:
function
()
{
return
{
apihost
:
"
//mainsite-restapi.ele.me
"
,
current
:
"
message
"
,
toast
:
""
,
timer
:
null
,
showToast
:
!
1
,
isApp
:
/Eleme/
.
test
(
navigator
.
userAgent
)
}
},
computed
:
{
headerOpt
:
function
()
{
return
{
message
:
{
title
:
"
登录
"
,
switchName
:
"
密码登录
"
,
switchTarget
:
"
password
"
},
password
:
{
title
:
"
密码登录
"
,
switchName
:
"
短信登录
"
,
switchTarget
:
"
message
"
}
}[
this
.
current
]
}
},
methods
:
{
switchTo
:
function
(
t
)
{
this
.
current
=
t
}
},
events
:
{
setToast
:
function
(
t
)
{
var
e
=
this
;
clearTimeout
(
this
.
timer
),
this
.
toast
=
t
,
this
.
showToast
=
!
0
,
this
.
timer
=
setTimeout
(
function
()
{
e
.
showToast
=
!
1
},
2
e3
)
}
}
}
},
329
:
function
(
t
,
e
)
{
"
use strict
"
;
Object
.
defineProperty
(
e
,
"
__esModule
"
,
{
value
:
!
0
}),
e
.
default
=
{
props
:
{
apihost
:
{
type
:
String
,
default
:
"
//mainsite-restapi.ele.me
"
},
confirmButton
:
{
type
:
Function
,
default
:
function
()
{}
},
cancelButton
:
{
type
:
Function
,
default
:
function
()
{}
}
},
data
:
function
()
{
return
{
captchaCode
:
""
,
userCaptcha
:
""
}
},
computed
:
{
captchaImage
:
function
()
{
if
(
this
.
captchaCode
)
return
this
.
apihost
+
"
/v1/captchas/
"
+
this
.
captchaCode
}
},
methods
:
{
$fetch
:
function
(
t
,
e
)
{
return
window
.
fetch
(
t
,
e
).
then
(
function
(
t
)
{
var
e
=
t
.
json
();
return
t
.
status
>=
200
&&
t
.
status
<
300
?
e
:
e
.
then
(
Promise
.
reject
.
bind
(
Promise
))
})
},
reloadCaptcha
:
function
()
{
this
.
$emit
(
"
getCaptcha
"
)
},
submitCaptcha
:
function
()
{
return
this
.
userCaptcha
?
void
this
.
confirmButton
(
this
.
userCaptcha
,
this
.
captchaCode
)
:
this
.
$dispatch
(
"
setToast
"
,
"
请填写验证码
"
)
}
},
events
:
{
getCaptcha
:
function
()
{
var
t
=
this
;
this
.
userCaptcha
=
""
,
this
.
$fetch
(
this
.
apihost
+
"
/v1/captchas
"
,
{
method
:
"
POST
"
,
credentials
:
"
include
"
}).
then
(
function
(
e
)
{
t
.
captchaCode
=
e
.
code
}).
catch
(
function
()
{
return
{}
})
}
}
}
},
330
:
function
(
t
,
e
,
a
)
{
"
use strict
"
;
Object
.
defineProperty
(
e
,
"
__esModule
"
,
{
value
:
!
0
});
var
s
=
a
(
140
)
,
o
=
babelHelpers
.
interopRequireDefault
(
s
)
,
i
=
a
(
113
)
,
c
=
babelHelpers
.
interopRequireDefault
(
i
);
e
.
default
=
{
components
:
{
Captcha
:
o
.
default
},
props
:
[
"
apihost
"
,
"
current
"
,
"
is-app
"
],
data
:
function
()
{
return
{
isShowLayer
:
void
0
,
interval
:
null
,
countdown
:
0
,
mobilePhone
:
""
,
msgCaptcha
:
""
,
msgToken
:
""
}
},
computed
:
{
isMobile
:
function
t
()
{
var
t
=
/
(
^
(
13
\d
|15
[^
4,
\D]
|17
[
13678
]
|18
\d)\d{8}
|170
[^
346,
\D]\d{7})
$/
;
return
t
.
test
(
this
.
mobilePhone
)
},
enableShowLayer
:
function
()
{
return
!
this
.
isShowLayer
&&
this
.
isMobile
},
buttonText
:
function
()
{
return
"
undefined
"
==
typeof
this
.
isShowLayer
?
"
获取验证码
"
:
this
.
isShowLayer
?
"
发送中...
"
:
"
重新获取
"
}
},
methods
:
{
showLayer
:
function
()
{
this
.
enableShowLayer
&&
(
this
.
$broadcast
(
"
getCaptcha
"
),
this
.
isShowLayer
=
!
0
)
},
hideLayer
:
function
()
{
this
.
isShowLayer
=
!
1
},
getMsgCaptcha
:
function
(
t
)
{
var
e
=
this
,
a
=
{
mobile
:
this
.
mobilePhone
,
scene
:
"
login
"
,
type
:
"
sms
"
};
t
&&
(
this
.
isShowLayer
=
!
1
,
a
.
captcha_code
=
t
),
c
.
default
.
post
(
this
.
apihost
+
"
/v4/mobile/verify_code/send
"
,
a
).
then
(
function
(
t
)
{
e
.
setCountdown
(),
e
.
msgToken
=
t
.
validate_token
,
e
.
isShowLayer
=
!
1
}).
catch
(
function
(
t
)
{
"
NEED_CAPTCHA
"
===
t
.
name
?
e
.
showLayer
()
:
e
.
$dispatch
(
"
setToast
"
,
t
.
message
)
})
},
setCountdown
:
function
()
{
var
t
=
this
,
e
=
function
()
{
if
(
t
.
countdown
--
,
t
.
countdown
<=
0
)
return
clearInterval
(
t
.
interval
)
};
this
.
countdown
=
30
,
this
.
interval
=
setInterval
(
e
,
1
e3
)
},
loginByMsg
:
function
()
{
var
t
=
this
;
return
this
.
mobilePhone
?
this
.
isMobile
?
this
.
msgToken
?
this
.
msgCaptcha
?
void
c
.
default
.
post
(
this
.
apihost
+
"
/v1/login/app_mobile
"
,
{
validate_token
:
this
.
msgToken
,
code
:
this
.
msgCaptcha
,
mobile
:
this
.
mobilePhone
}).
then
(
function
()
{
c
.
default
.
redirect
()
}).
catch
(
function
(
e
)
{
t
.
msgCaptcha
=
""
,
t
.
$dispatch
(
"
setToast
"
,
e
.
message
)
})
:
this
.
$dispatch
(
"
setToast
"
,
"
请填写验证码
"
)
:
this
.
$dispatch
(
"
setToast
"
,
"
请获取验证码
"
)
:
this
.
$dispatch
(
"
setToast
"
,
"
请填写合法的手机号
"
)
:
this
.
$dispatch
(
"
setToast
"
,
"
请填写手机号
"
)
}
}
}
},
331
:
function
(
t
,
e
,
a
)
{
"
use strict
"
;
Object
.
defineProperty
(
e
,
"
__esModule
"
,
{
value
:
!
0
});
var
s
=
a
(
140
)
,
o
=
babelHelpers
.
interopRequireDefault
(
s
)
,
i
=
a
(
1009
)
,
c
=
babelHelpers
.
interopRequireDefault
(
i
)
,
n
=
a
(
113
)
,
r
=
babelHelpers
.
interopRequireDefault
(
n
);
e
.
default
=
{
components
:
{
Captcha
:
o
.
default
,
Switch
:
c
.
default
},
props
:
[
"
apihost
"
,
"
current
"
,
"
is-app
"
],
data
:
function
()
{
return
{
captchaCode
:
""
,
userId
:
""
,
userPw
:
""
,
userCaptcha
:
""
,
showPwText
:
!
1
}
},
computed
:
{
captchaImage
:
function
()
{
return
this
.
captchaCode
?
this
.
apihost
+
"
/v1/captchas/
"
+
this
.
captchaCode
:
void
0
}
},
methods
:
{
getCaptchaCode
:
function
()
{
var
t
=
this
;
this
.
userCaptcha
=
""
,
r
.
default
.
post
(
this
.
apihost
+
"
/v1/captchas
"
).
then
(
function
(
e
)
{
t
.
captchaCode
=
e
.
code
}).
catch
(
function
()
{
return
{}
})
},
loginByUserId
:
function
()
{
var
t
=
this
,
e
=
this
.
captchaCode
&&
this
.
userCaptcha
||
!
this
.
captchaCode
;
return
this
.
userId
?
this
.
userPw
?
e
?
void
r
.
default
.
post
(
this
.
apihost
+
"
/v2/login
"
,
{
username
:
this
.
userId
,
password
:
this
.
userPw
,
captcha_code
:
this
.
userCaptcha
}).
then
(
function
()
{
r
.
default
.
redirect
()
}).
catch
(
function
(
e
)
{
t
.
getCaptchaCode
(),
t
.
$dispatch
(
"
setToast
"
,
e
.
message
)
})
:
this
.
$dispatch
(
"
setToast
"
,
"
请填写验证码
"
)
:
this
.
$dispatch
(
"
setToast
"
,
"
密码不能为空
"
)
:
this
.
$dispatch
(
"
setToast
"
,
"
手机/邮箱/用户名 不能为空
"
)
}
}
}
},
332
:
function
(
t
,
e
)
{
"
use strict
"
;
Object
.
defineProperty
(
e
,
"
__esModule
"
,
{
value
:
!
0
}),
e
.
default
=
{
props
:
{
value
:
{
type
:
Boolean
,
twoWay
:
!
0
}
},
methods
:
{
switchValue
:
function
()
{
this
.
value
=
!
this
.
value
}
}
}
},
448
:
function
(
t
,
e
)
{},
449
:
function
(
t
,
e
)
{},
450
:
function
(
t
,
e
)
{},
559
:
function
(
t
,
e
)
{},
581
:
function
(
t
,
e
)
{},
788
:
function
(
t
,
e
)
{
t
.
exports
=
"
<div> <eleme-header :data=headerOpt> <span class=header-right slot=right @click=switchTo(headerOpt.switchTarget)>{{ headerOpt.switchName }}</span> </eleme-header> <component :is=current :current.sync=current :is-app=isApp :apihost=apihost></component> <div class=toast-wrap v-show=showToast transition=toast> <div class=toast-text v-text=toast></div> </div> </div>
"
},
789
:
function
(
t
,
e
)
{
t
.
exports
=
"
<div> <div class=form> <div class=form-line> <input type=tel maxlength=11 placeholder=手机号 v-model=mobilePhone> <div class=msg-form-btn v-if=countdown>已发送({{ countdown }}s)</div> <div v-else class=msg-form-btn :class=
\"
{ 'msg-form-enable': enableShowLayer }
\"
@click=getMsgCaptcha()>{{ buttonText }} </div> </div> <div class=form-line> <input type=text maxlength=8 placeholder=验证码 v-model=msgCaptcha> </div> </div> <div class=msg-tips> 温馨提示:未注册饿了么帐号的手机号,登录时将自动注册,且代表您已同意<a href=//h5.ele.me/service/agreement/ target=_blank>《用户服务协议》</a> </div> <div class=form-login @click=loginByMsg>登录</div> <div class=password-forget v-if=isApp> <a href=javascript: @click=
\"
current = 'password'
\"
>密码登录</a> </div> <captcha v-show=isShowLayer :apihost=apihost :confirm-button=getMsgCaptcha :cancel-button=hideLayer> </captcha> </div>
"
},
790
:
function
(
t
,
e
)
{
t
.
exports
=
"
<div class=form> <div class=form-line> <input type=text placeholder=手机/邮箱/用户名 v-model=userId> </div> <div class=form-line> <input placeholder=密码 v-model=userPw :type=
\"
showPwText ? 'text' : 'password'
\"
> <switch :value.sync=showPwText></switch> </div> <div class=form-line v-if=captchaCode> <input type=text placeholder=验证码 v-model=userCaptcha> <img class=password-img-captcha :src=captchaImage @click=getCaptchaCode()> <div class=password-img-change @click=getCaptchaCode()> 看不清<br> <span>换一张</span> </div> </div> <div class=
\"
form-login password-login
\"
@click=loginByUserId()>登录</div> <div class=password-forget> <a href=javascript: @click=
\"
current = 'message'
\"
v-if=isApp>短信登录</a> <a href=//m.ele.me/forget/ target=_blank>忘记密码?</a> </div> </div>
"
},
878
:
function
(
t
,
e
)
{
t
.
exports
=
'
<div class=captcha-mask _v-49aa31ab=""> <div class=captcha-wrap _v-49aa31ab=""> <h3 _v-49aa31ab="">请填写图形验证码</h3> <div class=captcha-form _v-49aa31ab=""> <input type=text maxlength=10 v-model=userCaptcha @keyup.enter=submitCaptcha() _v-49aa31ab=""> <img :src=captchaImage @click=reloadCaptcha() _v-49aa31ab=""> </div> <div class=captcha-confirm _v-49aa31ab=""> <span @click=cancelButton() _v-49aa31ab="">取消</span> <span @click=submitCaptcha() _v-49aa31ab="">确定</span> </div> </div> </div>
'
},
900
:
function
(
t
,
e
)
{
t
.
exports
=
'
<div class=switch-wrap :class="{
\'
switch-true
\'
: value }" @click=switchValue() _v-6afc61da=""> <div class=switch-cycle _v-6afc61da=""></div> <div class=switch-left _v-6afc61da="">abc</div> <div class=switch-right _v-6afc61da="">···</div> </div>
'
},
1006
:
function
(
t
,
e
,
a
)
{
var
s
,
o
,
i
=
{};
a
(
450
),
s
=
a
(
328
),
o
=
a
(
788
),
t
.
exports
=
s
||
{},
t
.
exports
.
__esModule
&&
(
t
.
exports
=
t
.
exports
.
default
);
var
c
=
"
function
"
==
typeof
t
.
exports
?
t
.
exports
.
options
||
(
t
.
exports
.
options
=
{})
:
t
.
exports
;
o
&&
(
c
.
template
=
o
),
c
.
computed
||
(
c
.
computed
=
{}),
Object
.
keys
(
i
).
forEach
(
function
(
t
)
{
var
e
=
i
[
t
];
c
.
computed
[
t
]
=
function
()
{
return
e
}
})
},
1007
:
function
(
t
,
e
,
a
)
{
var
s
,
o
,
i
=
{};
a
(
448
),
s
=
a
(
330
),
o
=
a
(
789
),
t
.
exports
=
s
||
{},
t
.
exports
.
__esModule
&&
(
t
.
exports
=
t
.
exports
.
default
);
var
c
=
"
function
"
==
typeof
t
.
exports
?
t
.
exports
.
options
||
(
t
.
exports
.
options
=
{})
:
t
.
exports
;
o
&&
(
c
.
template
=
o
),
c
.
computed
||
(
c
.
computed
=
{}),
Object
.
keys
(
i
).
forEach
(
function
(
t
)
{
var
e
=
i
[
t
];
c
.
computed
[
t
]
=
function
()
{
return
e
}
})
},
1008
:
function
(
t
,
e
,
a
)
{
var
s
,
o
,
i
=
{};
a
(
449
),
s
=
a
(
331
),
o
=
a
(
790
),
t
.
exports
=
s
||
{},
t
.
exports
.
__esModule
&&
(
t
.
exports
=
t
.
exports
.
default
);
var
c
=
"
function
"
==
typeof
t
.
exports
?
t
.
exports
.
options
||
(
t
.
exports
.
options
=
{})
:
t
.
exports
;
o
&&
(
c
.
template
=
o
),
c
.
computed
||
(
c
.
computed
=
{}),
Object
.
keys
(
i
).
forEach
(
function
(
t
)
{
var
e
=
i
[
t
];
c
.
computed
[
t
]
=
function
()
{
return
e
}
})
},
1009
:
function
(
t
,
e
,
a
)
{
var
s
,
o
,
i
=
{};
a
(
581
),
s
=
a
(
332
),
o
=
a
(
900
),
t
.
exports
=
s
||
{},
t
.
exports
.
__esModule
&&
(
t
.
exports
=
t
.
exports
.
default
);
var
c
=
"
function
"
==
typeof
t
.
exports
?
t
.
exports
.
options
||
(
t
.
exports
.
options
=
{})
:
t
.
exports
;
o
&&
(
c
.
template
=
o
),
c
.
computed
||
(
c
.
computed
=
{}),
Object
.
keys
(
i
).
forEach
(
function
(
t
)
{
var
e
=
i
[
t
];
c
.
computed
[
t
]
=
function
()
{
return
e
}
})
}
});
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录