Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
梁建民
/
wmsMin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ffeadea4
authored
Dec 06, 2021
by
liangjianmin
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
js
parent
f88e01a1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
69 deletions
assets/css/font.css
pages/home/index.vue
pages/mine/index.vue
pages/mine/login.vue
static/iconfont.ttf
util/api.js
assets/css/font.css
View file @
ffeadea4
...
...
@@ -11,6 +11,14 @@
-moz-osx-font-smoothing
:
grayscale
;
}
.icon-riqi
:before
{
content
:
"\e770"
;
}
.icon-a-riqi1
:before
{
content
:
"\e771"
;
}
.icon-juxing2
:before
{
content
:
"\e76f"
;
}
...
...
pages/home/index.vue
View file @
ffeadea4
...
...
@@ -2,7 +2,7 @@
<view
class=
"home-index"
>
<view
class=
"head"
>
<!-- 未登录 -->
<navigator
class=
"row verCenter box"
v-if=
"!is_login"
url=
"/pages/mine/
auth
"
>
<navigator
class=
"row verCenter box"
v-if=
"!is_login"
url=
"/pages/mine/
login"
hover-class=
"none
"
>
<view
class=
"row verCenter"
>
<text
class=
"iconfont icon-juxing"
></text>
<text
class=
"t1"
>
未登录
</text>
...
...
@@ -11,13 +11,12 @@
<!-- 已登录 -->
<view
class=
"row bothSide verCenter box"
v-else
>
<view
class=
"row verCenter"
>
<text
class=
"iconfont icon-juxing"
></text>
<view
class=
"column"
>
<text
class=
"t1"
>
张同学
</text>
<text
class=
"t2"
>
cwl@ichunt.com
</text>
</view>
<text
class=
"iconfont icon-juxing"
></text>
<view
class=
"column"
>
<text
class=
"t1"
>
{{
userInfo
.
name
}}
</text>
<text
class=
"t2"
>
{{
userInfo
.
email
}}
</text>
</view>
</view>
<text
class=
"t3"
>
仓储部门 -工号0005
</text>
</view>
</view>
<view
class=
"fast-entry"
>
...
...
@@ -50,14 +49,24 @@ import { API } from '@/util/api.js';
export
default
{
data
()
{
return
{
is_login
:
false
is_login
:
false
,
userInfo
:
{}
};
},
onShow
()
{
this
.
getData
();
},
methods
:
{
getData
()
{}
getData
()
{
this
.
request
(
API
.
userInfo
,
'POST'
,
{},
false
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
userInfo
=
res
.
data
;
this
.
is_login
=
true
;
}
else
{
this
.
is_login
=
false
;
}
});
}
}
};
</
script
>
...
...
pages/mine/index.vue
View file @
ffeadea4
<
template
>
<view
class=
"mine-index"
>
<template
v-if=
"!is
L
ogin"
>
<template
v-if=
"!is
_l
ogin"
>
<view
class=
"not-logged-in row verCenter"
@
click=
"toUrl"
>
<view
class=
"row verCenter"
>
<image
class=
"uni-img"
src=
"http://img.ichunt.com/images/ichunt/minProgram/scm/14ec21333cd69cc5269772811b46b7ac.png"
mode=
"aspectFill"
></image>
...
...
@@ -17,20 +17,12 @@
mode=
"aspectFill"
></image>
<view
class=
"text column"
>
<text
class=
"t1"
>
{{
user
Data
.
company_
name
}}
</text>
<text
class=
"t2"
>
cwl@ichunt.com
</text>
<text
class=
"t1"
>
{{
user
Info
.
name
}}
</text>
<text
class=
"t2"
>
{{
userInfo
.
email
}}
</text>
</view>
</view>
</view>
<view
class=
"list column"
>
<view
class=
"box row bothSide verCenter"
>
<view
class=
"row verCenter"
>
<text
class=
"iconfont icon-juxing1"
></text>
<text
class=
"tt"
>
所属部门
</text>
</view>
<view
class=
"text"
>
仓储部门 -工号0005
</view>
</view>
</view>
<view
class=
"list column"
></view>
<view
class=
"exit row rowCenter verCenter"
@
click=
"exit()"
>
退出账号
</view>
</
template
>
</view>
...
...
@@ -41,34 +33,27 @@ import { API } from '@/util/api.js';
export
default
{
data
()
{
return
{
is
L
ogin
:
false
,
user
Data
:
{}
is
_l
ogin
:
false
,
user
Info
:
{}
};
},
onLoad
(
options
)
{},
onShow
()
{
this
.
getData
();
},
onShareTimeline
(
res
)
{
return
{
title
:
''
,
imageUrl
:
''
};
},
methods
:
{
getData
()
{
this
.
request
(
API
.
userInfo
,
'POST'
,
{},
false
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
user
Data
=
res
.
data
;
this
.
is
L
ogin
=
true
;
this
.
user
Info
=
res
.
data
;
this
.
is
_l
ogin
=
true
;
}
else
{
this
.
is
L
ogin
=
false
;
this
.
is
_l
ogin
=
false
;
}
});
},
toUrl
()
{
uni
.
navigateTo
({
url
:
'/pages/mine/
auth
'
url
:
'/pages/mine/
login
'
});
},
exit
()
{
...
...
pages/mine/login.vue
View file @
ffeadea4
<
template
>
<view
class=
"page-auth column rowCenter verCenter"
>
<text
class=
"logo"
></text>
<text
class=
"title"
>
SCM商务
系统
</text>
<text
class=
"title"
>
猎芯面单
系统
</text>
<view
class=
"form-box column rowCenter verCenter"
>
<view
class=
"input-box row verCenter"
>
<text
class=
"iconfont icon-riqi
1
"
></text>
<text
class=
"iconfont icon-riqi"
></text>
<input
type=
"text"
placeholder=
"请输入登录账号"
v-model=
"account"
/>
</view>
<view
class=
"input-box row verCenter"
>
<text
class=
"iconfont icon-a-riqi1
1
"
></text>
<input
type=
"password"
placeholder=
"请输入登录密码"
v-model=
"pwd"
/>
<text
class=
"iconfont icon-a-riqi1"
></text>
<input
type=
"password"
placeholder=
"请输入登录密码"
v-model=
"p
ass
wd"
/>
</view>
<button
class=
"btn row rowCenter verCenter"
@
click=
"submit()"
>
绑定账号
</button>
<button
class=
"btn row rowCenter verCenter"
@
click=
"submit()"
>
登录
</button>
</view>
<view
class=
"copyright"
>
©2021深圳市猎芯供应链有限公司 ALL RIGHTS RESERVED
</view>
</view>
...
...
@@ -24,8 +24,7 @@ export default {
data
()
{
return
{
account
:
''
,
pwd
:
''
,
wechat_unique_id
:
''
passwd
:
''
};
},
onLoad
(
options
)
{},
...
...
@@ -45,7 +44,7 @@ export default {
return
false
;
}
if
(
!
this
.
pwd
)
{
if
(
!
this
.
p
ass
wd
)
{
uni
.
showToast
({
title
:
'请输入登录密码'
,
icon
:
'none'
...
...
@@ -53,21 +52,7 @@ export default {
return
false
;
}
let
openid
=
uni
.
getStorageSync
(
'openid'
);
let
session_key
=
uni
.
getStorageSync
(
'session_key'
);
let
unionid
=
uni
.
getStorageSync
(
'unionid'
);
this
.
request
(
API
.
Login
,
'POST'
,
{
account
:
this
.
account
,
pwd
:
this
.
pwd
,
openid
:
openid
,
session_key
:
session_key
,
unionid
:
unionid
},
true
).
then
(
res
=>
{
this
.
request
(
API
.
login
,
'POST'
,
{
account
:
this
.
account
,
passwd
:
this
.
passwd
}).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
uni
.
setStorageSync
(
'token'
,
res
.
data
.
token
);
uni
.
navigateBack
({
...
...
static/iconfont.ttf
View file @
ffeadea4
No preview for this file type
util/api.js
View file @
ffeadea4
...
...
@@ -2,25 +2,17 @@
const
API_BASE
=
'http://supplyapi.liexin.com'
const
API
=
{
/**
*
绑定微信号
*
上传数据
* */
BindWechat
:
API_BASE
+
'/supplywechatorder/bindWechat'
,
/**
* 获取openid
* */
getOpenId
:
API_BASE
+
'/supplywechatorder/getOpenId'
,
uploadSignForInfo
:
API_BASE
+
'/supplywechatsignfor/uploadSignForInfo'
,
/**
* 会员中心获取
* */
userInfo
:
API_BASE
+
'/supplywechat
orde
r/userInfo'
,
userInfo
:
API_BASE
+
'/supplywechat
signfo
r/userInfo'
,
/**
* 小程序登录
* */
Login
:
API_BASE
+
'/supplywechatorder/login'
,
/**
* 公告信息获取
* */
GetNotice
:
API_BASE
+
'/supplywechat/getNotice'
login
:
API_BASE
+
'/supplywechatsignfor/login'
,
}
...
...
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