Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
上
上药订单生命周期升级
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sph
上药订单生命周期升级
Commits
6cb69fc2
Commit
6cb69fc2
authored
Apr 07, 2021
by
xiejb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加二维码 扫描下载页面
parent
d1b8eb13
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
232 additions
and
4 deletions
+232
-4
config/index.js
config/index.js
+1
-1
src/api/scanQRCode.js
src/api/scanQRCode.js
+10
-0
src/assets/img/icon_sph.png
src/assets/img/icon_sph.png
+0
-0
src/main.js
src/main.js
+3
-2
src/router/index.js
src/router/index.js
+4
-1
src/router/scanQRCode/index.js
src/router/scanQRCode/index.js
+13
-0
src/views/scanQRCode/index.vue
src/views/scanQRCode/index.vue
+201
-0
No files found.
config/index.js
View file @
6cb69fc2
...
...
@@ -19,7 +19,7 @@ module.exports = {
// Various Dev Server settings
host
:
'
0.0.0.0
'
,
// can be overwritten by process.env.HOST
// host: '1
0.1.56.78
', // can be overwritten by process.env.HOST
// host: '1
92.168.1.150
', // can be overwritten by process.env.HOST
port
:
8080
,
// can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser
:
false
,
disableHostCheck
:
true
,
...
...
src/api/scanQRCode.js
0 → 100644
View file @
6cb69fc2
import
{
fetch
}
from
'
@/utils
'
// 获取下载链接
export
function
activityQueryDocList
(
params
)
{
return
fetch
({
url
:
'
/enterprise/activity/queryDoc
'
,
method
:
'
post
'
,
data
:
params
,
loading
:
true
})
}
src/assets/img/icon_sph.png
0 → 100644
View file @
6cb69fc2
99.3 KB
src/main.js
View file @
6cb69fc2
...
...
@@ -56,7 +56,8 @@ import {
SwipeCell
,
Dialog
,
Stepper
,
Skeleton
Skeleton
,
NoticeBar
}
from
'
vant
'
Vue
.
use
(
Button
).
use
(
Icon
).
use
(
Field
).
use
(
Row
).
use
(
Col
).
use
(
NavBar
).
use
(
CellGroup
).
use
(
Empty
)
.
use
(
Toast
).
use
(
Search
).
use
(
List
).
use
(
PullRefresh
).
use
(
Popup
).
use
(
Cell
).
use
(
Tab
).
use
(
Tabs
)
...
...
@@ -64,7 +65,7 @@ Vue.use(Button).use(Icon).use(Field).use(Row).use(Col).use(NavBar).use(CellGroup
.
use
(
Steps
).
use
(
Step
).
use
(
Card
).
use
(
Swipe
).
use
(
SwipeItem
).
use
(
Slider
).
use
(
DropdownMenu
)
.
use
(
DropdownItem
).
use
(
Grid
).
use
(
GridItem
).
use
(
Tag
).
use
(
ImagePreview
).
use
(
Divider
).
use
(
Loading
)
.
use
(
Checkbox
).
use
(
CheckboxGroup
).
use
(
SwipeCell
).
use
(
IndexBar
).
use
(
IndexAnchor
).
use
(
Uploader
).
use
(
Dialog
)
.
use
(
Stepper
).
use
(
Skeleton
)
.
use
(
Stepper
).
use
(
Skeleton
)
.
use
(
NoticeBar
)
Vue
.
use
(
Container
)
Object
.
keys
(
filter
).
forEach
(
k
=>
Vue
.
filter
(
k
,
filter
[
k
]))
...
...
src/router/index.js
View file @
6cb69fc2
...
...
@@ -8,6 +8,8 @@ import saleSituation from './saleSituation'
import
myOrder
from
'
./myOrder
'
// 我的发票
import
myInvoice
from
'
./myInvoice
'
// 二维码扫描
import
scanQRCode
from
'
./scanQRCode
'
import
{
GetQueryString
}
from
'
@/utils/common
'
// http://mobileportal.shaphar.com:8020/SYERP/newerp/#/requireGoods
Vue
.
use
(
Router
)
...
...
@@ -20,7 +22,8 @@ const routerList = [
...
todo
,
...
saleSituation
,
...
myOrder
,
...
myInvoice
...
myInvoice
,
...
scanQRCode
]
const
router
=
new
Router
({
...
...
src/router/scanQRCode/index.js
0 → 100644
View file @
6cb69fc2
const
scanQRCode
=
[
{
path
:
'
/scanQRCode
'
,
name
:
'
scanQRCode
'
,
meta
:
{
title
:
'
二维码扫描
'
,
auth
:
false
,
keepAlive
:
true
},
component
:
resolve
=>
require
([
'
@/views/scanQRCode
'
],
resolve
)
}
]
export
default
scanQRCode
src/views/scanQRCode/index.vue
0 → 100644
View file @
6cb69fc2
<
template
>
<div
id=
"scanQRCode"
>
<!--
<h1>
{{
activeTab
}}
</h1>
-->
<van-notice-bar
v-if=
"isShowNoticeBar"
:scrollable=
"false"
text=
"请使用默认浏览器打开本页面!"
/>
<van-empty
class=
"custom_image"
:description=
"activeTab"
:image=
"sphImage"
>
<div
slot=
"description"
class=
"description"
>
<div
class=
"subTitle"
>
上药移动
</div>
<!--
<div
class=
"sub"
>
{{
activeTab
}}
</div>
-->
</div>
</van-empty>
</div>
</
template
>
<
script
>
import
{
activityQueryDocList
}
from
'
@/api/scanQRCode
'
import
{
getFormateDate
}
from
'
@/utils/common
'
import
{
bridge
}
from
"
@/utils
"
;
export
default
{
name
:
'
ScanQRCode
'
,
components
:
{
},
data
()
{
return
{
tabsTitle
:
[],
moreSearchShow
:
false
,
activeTab
:
''
,
isFirst
:
false
,
isShowNoticeBar
:
false
,
sphImage
:
require
(
'
@/assets/img/icon_sph.png
'
)
}
},
computed
:
{
linkInfo
()
{
return
this
.
$store
.
state
.
linkInfo
},
routKey
()
{
return
this
.
$route
.
path
},
searchTime
()
{
let
time
=
this
.
time
.
start
+
'
/
'
+
this
.
time
.
end
return
time
}
},
activated
()
{
// let _this = this
// 设置标题栏关闭返回按钮
this
.
$store
.
commit
(
'
setNavBar
'
,
{
show
:
false
,
leftArrow
:
false
,
rightIcon
:
false
,
title
:
'
二维码扫描
'
,
leftText
:
''
,
leftClick
:
this
.
closeAppPage
,
rightClick
:
this
.
onMoreSearch
})
// 给window添加一个popstate事件,拦截返回键,执行this.onBrowserBack事件,addEventListener需要指向一个方法
window
.
addEventListener
(
'
popstate
'
,
this
.
onBrowserBack
,
false
)
},
deactivated
()
{
// 当页面销毁必须要移除这个事件,vue不刷新页面,不移除会重复执行这个事件
window
.
removeEventListener
(
'
popstate
'
,
this
.
onBrowserBack
,
false
)
},
mounted
()
{
// this.moreSearchShow = true
this
.
getJudgeBrowserAction
()
// this.tabsTitleData()
},
destroyed
()
{
},
methods
:
{
getJudgeBrowserAction
()
{
this
.
activeTab
=
''
var
browser
=
{
versions
:
function
()
{
var
u
=
navigator
.
userAgent
console
.
log
(
u
)
return
{
trident
:
u
.
indexOf
(
'
Trident
'
)
>
-
1
,
//IE内核
presto
:
u
.
indexOf
(
'
Presto
'
)
>
-
1
,
//opera内核
webKit
:
u
.
indexOf
(
'
AppleWebKit
'
)
>
-
1
,
//苹果、谷歌内核
gecko
:
u
.
indexOf
(
'
Gecko
'
)
>
-
1
&&
u
.
indexOf
(
'
KHTML
'
)
==
-
1
,
//火狐内核
mobile
:
!!
u
.
match
(
/AppleWebKit.*Mobile.*/
),
//是否为移动终端
ios
:
!!
u
.
match
(
/
\(
i
[^
;
]
+;
(
U;
)?
CPU.+Mac OS X/
),
//ios终端
android
:
u
.
indexOf
(
'
Android
'
)
>
-
1
||
u
.
indexOf
(
'
Adr
'
)
>
-
1
,
//android终端
iPhone
:
u
.
indexOf
(
'
iPhone
'
)
>
-
1
,
//是否为iPhone或者QQHD浏览器
iPad
:
u
.
indexOf
(
'
iPad
'
)
>
-
1
,
//是否iPad
webApp
:
u
.
indexOf
(
'
Safari
'
)
==
-
1
,
//是否web应该程序,没有头部与底部
Safari
:
u
.
indexOf
(
'
Safari
'
)
>
-
1
,
//是否web应该程序,没有头部与底部
weixin
:
u
.
indexOf
(
'
MicroMessenger
'
)
>
-
1
,
//是否微信 (2015-01-22新增)
qq
:
u
.
match
(
/
\s
QQ/i
)
==
"
qq
"
,
//是否QQ
isBaidu
:
u
.
indexOf
(
'
baiduboxapp
'
)
!==
-
1
,
//是否为百度浏览器
isqqBrowser
:
u
.
indexOf
(
'
mqqbrowser
'
)
!==
-
1
,
//是否为qq浏览器
isWxBrowser
:
u
.
indexOf
(
'
micromessenger
'
)
!==
-
1
,
//是否为微信浏览器
isUc
:
u
.
indexOf
(
'
ucbrowser
'
)
!==
-
1
,
//是否为uc浏览器
};
}(),
}
if
(
browser
.
versions
.
webKit
)
{
this
.
activeTab
=
'
苹果、谷歌内核
'
if
(
browser
.
versions
.
mobile
)
{
this
.
activeTab
=
this
.
activeTab
+
'
/移动
'
if
(
browser
.
versions
.
ios
)
{
this
.
activeTab
=
this
.
activeTab
+
'
/ios
'
if
(
browser
.
versions
.
weixin
)
{
this
.
activeTab
=
this
.
activeTab
+
'
/weixin
'
this
.
isShowNoticeBar
=
true
}
if
(
browser
.
versions
.
Safari
)
{
this
.
activeTab
=
this
.
activeTab
+
'
/Safari
'
// window.location.href = 'https://www.baidu.com/'
this
.
versionUpdateHttpAction
(
'
41
'
)
}
}
if
(
browser
.
versions
.
android
)
{
this
.
activeTab
=
this
.
activeTab
+
'
/android
'
this
.
versionUpdateHttpAction
(
'
40
'
)
}
}
}
else
if
(
browser
.
versions
.
weixin
){
this
.
activeTab
=
'
weixin
'
}
},
// 版本更新接口
versionUpdateHttpAction
(
type
)
{
let
_this
=
this
let
dict
=
{
'
attr
'
:{
'
empid
'
:
''
},
'
filters
'
:[
{
'
key
'
:
'
type
'
,
'
opt
'
:
'
LIKE
'
,
'
type
'
:
'
S
'
,
'
value
'
:
type
}
],
'
logic
'
:
'
or
'
,
'
sort
'
:
'
desc
'
,
'
orderby
'
:
'
createon
'
,
'
pageNum
'
:
1
,
'
pageSize
'
:
10
}
activityQueryDocList
(
dict
).
then
(
rt
=>
{
if
(
rt
)
{
window
.
location
.
href
=
rt
.
list
[
0
].
comments
// _this.$toast(rt.list[0].comments)
}
else
{
_this
.
$toast
(
rt
.
message
)
}
}).
catch
(
e
=>
{
this
.
$toast
(
'
获取信息失败!
'
)
})
},
postDataListAction
(
item
)
{
const
removeItem
=
item
removeItem
.
cellId
=
item
.
id
+
item
.
erp_user
return
item
},
openPager
(
path
)
{
this
.
$router
.
push
({
path
:
path
,
query
:
this
.
$store
.
state
.
linkInfo
})
},
onBrowserBack
()
{
if
(
this
.
moreSearchShow
)
{
this
.
moreSearchShow
=
false
return
}
this
.
$router
.
go
(
-
1
)
},
onSearch
()
{
},
closeAppPage
()
{
console
.
log
(
'
关闭页面
'
)
bridge
.
closeWindow_c
()
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
#scanQRCode
{
height
:
100%
;
.van-empty
{
height
:
100%
;
.description
{
font-size
:
16px
;
color
:
#666666
;
text-align
:
center
;
.subTitle
{
padding
:
5px
;
color
:
#333333
;
font-size
:
20px
;
font-weight
:
600
;
}
.sub
{
padding
:
5px
;
}
}
/
deep
/
.van-empty__image
{
margin-top
:
-150px
;
}
}
}
</
style
>
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