Commit bb861dfe by 侯昆

Merge branch 'master' of http://gitlab.coralcodes.com:30000/shil0009/cihai

# Conflicts:
#	serverside/cihai-core/src/main/java/com/dookay/cihai/core/CihaiCoreApplication.java
2 parents 0767928c b62f49b0
package com.dookay.cihai.core; package com.dookay.cihai.core;
import com.dookay.coral.common.core.CoralCommonCoreMarker; import com.dookay.coral.common.core.CoralCommonCoreMarker;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
...@@ -11,7 +12,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; ...@@ -11,7 +12,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
CoralCommonCoreMarker.class, CoralCommonCoreMarker.class,
CiHaiCoreApplication.class CiHaiCoreApplication.class
}) })
@MapperScan(basePackageClasses = CiHaiCoreApplication.class)
public class CiHaiCoreApplication { public class CiHaiCoreApplication {
public static void main(String[] args) { public static void main(String[] args) {
......
...@@ -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
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);
}
});
}
});
})
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!