Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
石磊
/
cihai
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6cd3fbaf
authored
Dec 07, 2017
by
石头
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
首页整合
1 parent
c72ee280
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
13 deletions
serverside/cihai-wechat/src/main/webapp/WEB-INF/jsp/portal/home/index.jsp
serverside/cihai-wechat/src/main/webapp/WEB-INF/jsp/portal/theme/detail.jsp
serverside/cihai-wechat/src/main/webapp/static/js/index.js
serverside/cihai-wechat/src/main/webapp/WEB-INF/jsp/portal/home/index.jsp
View file @
6cd3fba
...
@@ -53,4 +53,4 @@
...
@@ -53,4 +53,4 @@
</div>
</div>
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script src="/wechat/jsConfig"></script>
<script src="/wechat/jsConfig"></script>
<jsp:include page="/WEB-INF/jsp/include/footer.jsp"/>
<jsp:include page="/WEB-INF/jsp/include/footer.jsp"/>
\ No newline at end of file
\ No newline at end of file
serverside/cihai-wechat/src/main/webapp/WEB-INF/jsp/portal/theme/detail.jsp
View file @
6cd3fba
This diff is collapsed.
Click to expand it.
serverside/cihai-wechat/src/main/webapp/static/js/index.js
View file @
6cd3fba
var
$
=
Dom7
;
var
$
=
Dom7
;
var
myApp
=
new
Framework7
({
var
myApp
=
new
Framework7
({
root
:
'#app'
,
root
:
'#app'
,
theme
:
'ios'
,
theme
:
'ios'
,
routes
:
routes
,
routes
:
routes
,
});
});
var
$loading
=
$
(
'#loading'
);
var
$loading
=
$
(
'#loading'
);
$loading
.
addClass
(
'fade-out'
);
$loading
.
addClass
(
'fade-out'
);
setTimeout
(
function
()
{
setTimeout
(
function
()
{
$loading
.
remove
();
$loading
.
remove
();
},
300
);
},
300
);
$
(
'.search-area-inner'
).
on
(
'click'
,
function
()
{
$
(
'.search-area-inner'
).
on
(
'click'
,
function
()
{
wx
.
startRecord
();
wx
.
startRecord
();
myApp
.
dialog
.
create
({
myApp
.
dialog
.
create
({
...
@@ -17,7 +17,7 @@ $('.search-area-inner').on('click', function () {
...
@@ -17,7 +17,7 @@ $('.search-area-inner').on('click', function () {
buttons
:
[
buttons
:
[
{
{
text
:
'完成'
,
text
:
'完成'
,
onClick
:
function
()
{
onClick
:
function
()
{
wx
.
stopRecord
({
wx
.
stopRecord
({
success
:
function
(
res
)
{
success
:
function
(
res
)
{
myApp
.
dialog
.
preloader
();
myApp
.
dialog
.
preloader
();
...
@@ -27,13 +27,14 @@ $('.search-area-inner').on('click', function () {
...
@@ -27,13 +27,14 @@ $('.search-area-inner').on('click', function () {
localId
:
localId
,
// 需要识别的音频的本地Id,由录音相关接口获得
localId
:
localId
,
// 需要识别的音频的本地Id,由录音相关接口获得
isShowProgressTips
:
0
,
// 默认为1,显示进度提示
isShowProgressTips
:
0
,
// 默认为1,显示进度提示
success
:
function
(
res
)
{
success
:
function
(
res
)
{
jQuery
.
get
(
"/home/search"
,
{
keyword
:
res
.
translateResult
},
function
(
data
)
{
jQuery
.
get
(
"/home/search"
,
{
keyword
:
res
.
translateResult
},
function
(
data
)
{
myApp
.
dialog
.
close
();
myApp
.
dialog
.
close
();
if
(
data
.
code
==
"OK"
){
if
(
data
.
code
==
"OK"
)
{
myApp
.
view
.
main
.
router
.
load
({
// myApp.view.main.router.load({
url
:
data
.
data
// url:data.data
});
// });
}
else
{
location
.
href
=
data
.
data
;
}
else
{
myApp
.
dialog
.
alert
(
data
.
message
);
myApp
.
dialog
.
alert
(
data
.
message
);
$
(
'.j_search_input'
).
val
(
res
.
translateResult
);
$
(
'.j_search_input'
).
val
(
res
.
translateResult
);
}
}
...
@@ -51,4 +52,30 @@ $('.search-area-inner').on('click', function () {
...
@@ -51,4 +52,30 @@ $('.search-area-inner').on('click', function () {
]
]
}).
open
();
}).
open
();
});
});
$
(
'.brand-index'
).
on
(
'click'
,
function
()
{
wx
.
chooseImage
({
count
:
1
,
// 默认9
sizeType
:
[
'compressed'
],
// 可以指定是原图还是压缩图,默认二者都有
sourceType
:
[
'album'
,
'camera'
],
// 可以指定来源是相册还是相机,默认二者都有
success
:
function
(
res
)
{
var
localIds
=
res
.
localIds
;
// 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
wx
.
getLocalImgData
({
localId
:
localIds
[
0
],
// 图片的localID
success
:
function
(
res
)
{
var
localData
=
res
.
localData
;
// localData是图片的base64数据,可以用img标签显示
alert
(
localData
);
}
});
}
});
})
Write
Preview
Markdown
is supported
Attach a file
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 post a comment