Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
A
az-uniapp-wechat-web
Project
Project
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
李智书
az-uniapp-wechat-web
Commits
a2b4b281
Commit
a2b4b281
authored
May 17, 2021
by
李智书
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.新增小程序通知详情页面
parent
3c14375a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
107 additions
and
0 deletions
+107
-0
pages.json
pages.json
+14
-0
pages/NoticeInfo/NoticeInfo.vue
pages/NoticeInfo/NoticeInfo.vue
+93
-0
No files found.
pages.json
View file @
a2b4b281
...
...
@@ -66,6 +66,20 @@
}
}
},
{
"path"
:
"pages/NoticeInfo/NoticeInfo"
,
"style"
:
{
"navigationBarTitleText"
:
"通知公告"
,
"enablePullDownRefresh"
:
false
,
"usingComponents"
:
{
},
"h5"
:
{
"titleNView"
:
"transparent"
}
}
}
],
"globalStyle"
:
{
...
...
pages/NoticeInfo/NoticeInfo.vue
0 → 100644
View file @
a2b4b281
<
template
>
<view
class=
"container"
>
<view
class=
"NoticeInfo"
v-html=
"NoticeInfo"
>
</view>
</view>
</
template
>
<
script
>
let
gHost
=
"
https://
"
+
window
.
location
.
host
;
if
(
window
.
location
.
protocol
!=
"
https:
"
)
{
gHost
=
"
https://fpdev.xiaopay.net
"
;
}
//获取参数
function
getQueryParams
(
params
)
{
let
href
=
window
.
location
.
href
let
query
=
href
.
substring
(
href
.
indexOf
(
'
?
'
)
+
1
);
let
vars
=
query
.
split
(
"
&
"
);
for
(
var
i
=
0
;
i
<
vars
.
length
;
i
++
)
{
let
pair
=
vars
[
i
].
split
(
"
=
"
);
if
(
pair
[
0
]
==
params
)
{
return
pair
[
1
];
}
}
return
(
false
);
}
export
default
{
name
:
"
NoticeInfo
"
,
data
()
{
return
{
NoticeInfo
:
""
}
},
onLoad
:
function
(
options
)
{
console
.
log
(
options
);
if
(
!
options
.
sessionid
)
{
uni
.
showModal
({
title
:
"
系统提示
"
,
showCancel
:
false
,
content
:
"
参数错误
"
,
})
return
}
this
.
selectNoticeByOrgId
(
options
.
sessionid
,
options
.
schoolid
,
options
.
operatorId
)
},
methods
:
{
// 小程序端查询通知公告
async
selectNoticeByOrgId
(
sessionid
,
schoolid
,
operatorId
)
{
let
this_
=
this
;
try
{
await
new
Promise
((
resolve
,
reject
)
=>
{
// 二维码加密内容获取token
$
.
ajax
({
url
:
'
http://192.168.0.54:8092/notice/noticeConfig/selectNoticeByOrgId
'
,
//开发者服务器接口地址",
type
:
"
post
"
,
dataType
:
'
json
'
,
contentType
:
'
application/json; charset=UTF-8
'
,
cache
:
false
,
data
:
JSON
.
stringify
({
schoolid
,
operatorId
,
sessionid
}),
success
:
function
(
res
)
{
if
(
res
.
code
==
10000
)
{
resolve
(
res
)
}
else
{
reject
(
res
)
}
},
error
:
function
(
error
)
{
reject
(
error
)
}
})
})
}
catch
(
err
)
{
//TODO handle the exception
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
err
.
message
})
}
}
}
}
</
script
>
<
style
scoped
>
</
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