Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
梁建民
/
wmsApp
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
0469ac27
authored
Apr 17, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
js
parent
c5db6b3c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
11 deletions
pages/index/index.vue
pages/mine/login.vue
util/api.js
pages/index/index.vue
View file @
0469ac27
...
...
@@ -2,7 +2,7 @@
<view
class=
"index"
>
<view
class=
"head row bothSide"
>
<view
class=
"column"
>
<text
class=
"t1"
>
深圳市猎芯科技有限公司
</text>
<text
class=
"t1"
>
{{
company_id
==
1
?
'深圳市猎芯科技有限公司'
:
'深贸电子有限公司'
}}
</text>
<view
class=
"row verCenter"
>
<text
class=
"iconfont icon-juxing"
></text>
<text
class=
"t2"
>
{{
info
.
user_info
.
name
}}
</text>
...
...
@@ -59,10 +59,12 @@ import { API } from '@/util/api.js';
export
default
{
data
()
{
return
{
company_id
:
1
,
info
:
{}
};
},
onShow
()
{
this
.
company_id
=
uni
.
getStorageSync
(
'company_id'
)
||
1
;
this
.
getData
();
},
methods
:
{
...
...
pages/mine/login.vue
View file @
0469ac27
...
...
@@ -35,11 +35,34 @@ export default {
passwd
:
'123456789'
};
},
onLoad
()
{
uni
.
removeStorageSync
(
'oa_skey'
);
uni
.
removeStorageSync
(
'oa_user_id'
);
uni
.
removeStorageSync
(
'company_id'
);
},
methods
:
{
bindPickerChange
:
function
(
e
)
{
console
.
log
(
'picker发送选择改变,携带值为'
,
e
.
detail
.
value
);
this
.
index
=
e
.
detail
.
value
;
},
/**
* 组织切换
*/
changeOrgId
()
{
this
.
request
(
API
.
changeOrgId
,
'POST'
,
{
org_id
:
Number
(
this
.
index
)
+
1
},
false
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
}
else
{
uni
.
showModal
({
title
:
'提示'
,
content
:
res
.
msg
,
showCancel
:
false
});
}
});
},
/**
* 提交
*/
submit
()
{
if
(
!
this
.
name
)
{
uni
.
showToast
({
...
...
@@ -60,7 +83,8 @@ export default {
if
(
res
.
retcode
===
0
)
{
uni
.
setStorageSync
(
'oa_skey'
,
res
.
data
.
skey
);
uni
.
setStorageSync
(
'oa_user_id'
,
res
.
data
.
userId
);
uni
.
setStorageSync
(
'company_id'
,
Number
(
this
.
index
)
+
1
);
this
.
changeOrgId
();
uni
.
showToast
({
title
:
'登录成功'
,
icon
:
'success'
...
...
util/api.js
View file @
0469ac27
...
...
@@ -3,15 +3,7 @@ const API_BASE_ORDER = 'http://order.liexindev.net'; //订单系统
const
API_BASE_PUR
=
'http://pur.liexindev.net'
;
//采购系统
const
API_BASE_SUPPLIER
=
'http://supplier.liexin.net'
;
//供应商系统
const
API_BASE_CRM
=
'http://crmnew.liexindev.net'
;
//CRM系统
const
API_BASE
=
'http://api.liexin.com'
;
// const API_BASE_USER = 'https://user.ichunt.net'; //用户系统
// const API_BASE_ORDER = 'https://order.ichunt.net'; //订单系统
// const API_BASE_PUR = 'https://purchase.ichunt.net'; //采购系统
// const API_BASE_SUPPLIER = 'https://supplier.ichunt.net'; //供应商系统
// const API_BASE_CRM = 'https://crm.ichunt.net'; //CRM系统
// const API_BASE = 'https://api.ichunt.com';
const
API_BASE
=
'http://wms.liexindev.net'
;
//WMS系统
const
API
=
{
/**
...
...
@@ -22,6 +14,10 @@ const API = {
* 小程序审核数量统计
* */
getStatisticsInfo
:
API_BASE_PUR
+
'/api/approve/getStatisticsInfo'
,
/**
* 组织切换
* */
changeOrgId
:
API_BASE
+
'/api/index/changeOrgId'
,
}
...
...
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