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
9a541c6e
authored
Dec 13, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
理货记录
parent
4445cdd2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
89 additions
and
87 deletions
App.vue
assets/css/tallyReceive/record.scss
util/api.js
App.vue
View file @
9a541c6e
<
script
>
<
script
>
import
{
API
}
from
'@/util/api.js'
;
import
{
API
}
from
'@/util/api.js'
;
export
default
{
export
default
{
onLaunch
:
function
()
{
onLaunch
:
function
()
{
console
.
log
(
'App Launch'
);
console
.
log
(
'App Launch'
);
},
},
onShow
:
function
()
{
onShow
:
function
()
{
console
.
log
(
'App Show'
);
console
.
log
(
'App Show'
);
let
wms_version
=
uni
.
getStorageSync
(
'wms_version'
)
||
''
;
let
wms_version
=
uni
.
getStorageSync
(
'wms_version'
)
||
''
;
//获取系统版本
this
.
request
(
API
.
getLatestAppInfo
,
'POST'
,
{},
false
,
false
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
request
(
API
.
getLatestAppInfo
,
'POST'
,
{},
false
).
then
(
res
=>
{
if
(
wms_version
==
''
)
{
if
(
res
.
code
===
0
)
{
uni
.
setStorageSync
(
'wms_version'
,
res
.
data
.
latest_app_info
.
wms_version
);
if
(
wms_version
==
''
)
{
}
else
{
uni
.
setStorageSync
(
'wms_version'
,
res
.
data
.
latest_app_info
.
wms_version
);
//判断是否跟线上版本一样
}
else
{
if
(
wms_version
!=
res
.
data
.
latest_app_info
.
wms_version
)
{
//判断是否跟线上版本一样
uni
.
showModal
({
if
(
wms_version
!=
res
.
data
.
latest_app_info
.
wms_version
)
{
title
:
'更新提示'
,
uni
.
showModal
({
content
:
res
.
data
.
latest_app_info
.
remark
,
title
:
'更新提示'
,
confirmText
:
'确定更新'
,
content
:
res
.
data
.
latest_app_info
.
remark
,
cancelText
:
'取消更新'
,
confirmText
:
'确定更新'
,
success
:
data
=>
{
cancelText
:
'取消更新'
,
if
(
data
.
confirm
)
{
success
:
data
=>
{
uni
.
setStorageSync
(
'wms_version'
,
res
.
data
.
latest_app_info
.
wms_version
);
if
(
data
.
confirm
)
{
this
.
downloadApk
(
res
.
data
.
latest_app_info
.
download_url
);
uni
.
setStorageSync
(
'wms_version'
,
res
.
data
.
latest_app_info
.
wms_version
);
console
.
log
(
'用户点击确定'
);
this
.
downloadApk
(
res
.
data
.
latest_app_info
.
download_url
);
}
else
if
(
data
.
cancel
)
{
console
.
log
(
'用户点击确定'
);
console
.
log
(
'用户点击取消'
);
}
else
if
(
data
.
cancel
)
{
console
.
log
(
'用户点击取消'
);
}
}
}
}
}
);
}
);
}
}
}
}
}
}
});
},
onHide
:
function
()
{
console
.
log
(
'App Hide'
);
},
methods
:
{
//下载apk文件
downloadApk
(
url
)
{
uni
.
showLoading
({
title
:
'下载安装文件'
,
mask
:
true
});
let
dtask
=
plus
.
downloader
.
createDownload
(
url
,
{},
(
d
,
status
)
=>
{
if
(
status
==
200
)
{
//下载成功后调用安装方法
this
.
installApk
(
d
.
filename
);
uni
.
hideLoading
();
}
else
{
uni
.
showToast
({
title
:
'下载失败'
,
icon
:
'error'
});
console
.
log
(
'下载失败'
);
}
});
});
dtask
.
start
();
},
},
//安装apk文件
onHide
:
function
()
{
installApk
(
filePath
)
{
console
.
log
(
'App Hide'
);
plus
.
runtime
.
install
(
},
filePath
,
methods
:
{
{},
//下载apk文件
()
=>
{
downloadApk
(
url
)
{
console
.
log
(
'安装成功'
);
uni
.
showLoading
({
},
title
:
'下载安装文件'
,
e
=>
{
mask
:
true
uni
.
showToast
({
});
title
:
'安装失败'
,
let
dtask
=
plus
.
downloader
.
createDownload
(
url
,
{},
(
d
,
status
)
=>
{
icon
:
'error'
if
(
status
==
200
)
{
});
//下载成功后调用安装方法
console
.
log
(
'安装失败:'
+
JSON
.
stringify
(
e
));
this
.
installApk
(
d
.
filename
);
}
uni
.
hideLoading
();
);
}
else
{
uni
.
showToast
({
title
:
'下载失败'
,
icon
:
'error'
});
console
.
log
(
'下载失败'
);
}
});
dtask
.
start
();
},
//安装apk文件
installApk
(
filePath
)
{
plus
.
runtime
.
install
(
filePath
,
{},
()
=>
{
console
.
log
(
'安装成功'
);
},
e
=>
{
uni
.
showToast
({
title
:
'安装失败'
,
icon
:
'error'
});
console
.
log
(
'安装失败:'
+
JSON
.
stringify
(
e
));
}
);
}
}
}
}
};
};
</
script
>
</
script
>
<
style
>
<
style
>
@import
'./assets/css/font.css'
;
@import
'./assets/css/font.css'
;
page
{
height
:
100%
;
page
{
background
:
#f5f5f7
;
height
:
100%
;
}
background
:
#f5f5f7
;
</
style
>
}
</
style
>
\ No newline at end of file
assets/css/tallyReceive/record.scss
0 → 100644
View file @
9a541c6e
This diff is collapsed.
Click to expand it.
util/api.js
View file @
9a541c6e
const
API_BASE_USER
=
'http://user.liexindev.net'
;
//用户系统
//
const API_BASE_USER = 'http://user.liexindev.net'; //用户系统
const
API_BASE_PUR
=
'http://pur.liexindev.net'
;
//采购系统
//
const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统
const
API_BASE
=
'http://wms.liexindev.net'
;
//WMS系统
//
const API_BASE = 'http://wms.liexindev.net'; //WMS系统
const
API_BASE_OSS
=
'http://image.liexindev.net'
;
//oss系统
//
const API_BASE_OSS = 'http://image.liexindev.net'; //oss系统
//
const API_BASE_USER = 'https://user.ichunt.net'; //用户系统
const
API_BASE_USER
=
'https://user.ichunt.net'
;
//用户系统
//
const API_BASE_PUR = 'https://purchase.ichunt.net'; //采购系统
const
API_BASE_PUR
=
'https://purchase.ichunt.net'
;
//采购系统
//
const API_BASE = 'https://wms.ichunt.net'; //WMS系统
const
API_BASE
=
'https://wms.ichunt.net'
;
//WMS系统
//
const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
const
API_BASE_OSS
=
'https://image.ichunt.net'
;
//oss系统
const
API
=
{
const
API
=
{
...
...
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