Przeglądaj źródła

call和sms的1|0 变为true|false

chengwb3 9 lat temu
rodzic
commit
203ff8410a

+ 2 - 2
display-client/assets/display-client/res/js/mobile/expand-mobile.js

@ -53,12 +53,12 @@ define(["require"],function(require) {
53 53
				execute("shock", [time],err);
54 54
			},call:function(sn,autoCall,err){
55 55
				if(autoCall==undefined){
56
					autoCall=1;//0-跳转至拨打界面,1-直接拨打
56
					autoCall=true;//0-跳转至拨打界面,1-直接拨打
57 57
				}
58 58
				execute("call", [sn,autoCall],err);
59 59
			},sms:function(sn,msg,autoSms,err){
60 60
				if(autoSms==undefined){
61
					autoSms=0;//0-跳转至短信界面,1-直接短信
61
					autoSms=false;//0-跳转至短信界面,1-直接短信
62 62
				}
63 63
				execute("sms", [sn,msg,autoSms],err);
64 64
			},openApp:function(appId,urlParams,installUrl,err){

+ 1 - 1
display-server/web/res/js/mobile/expand-mobile.js

@ -53,7 +53,7 @@ define(["require"],function(require) {
53 53
				execute("shock", [time],err);
54 54
			},call:function(sn,autoCall,err){
55 55
				if(autoCall==undefined){
56
					autoCall=1;//0-跳转至拨打界面,1-直接拨打
56
					autoCall=true;//0-跳转至拨打界面,1-直接拨打
57 57
				}
58 58
				execute("call", [sn,autoCall],err);
59 59
			},sms:function(sn,msg,autoSms,err){

+ 6 - 6
wade-mobile-func/src/com/wade/mobile/func/MobileBasic.java

@ -30,7 +30,7 @@ public class MobileBasic extends Plugin {
30 30
			throw new Exception(Messages.EXCEPTION_PARAM);
31 31
		}
32 32
		String sn = param.getString(0);
33
		int flag  = param.getInt(1);
33
		boolean flag  = param.getBoolean(1);
34 34
		call(sn, flag);
35 35
	}
36 36
	
@ -38,8 +38,8 @@ public class MobileBasic extends Plugin {
38 38
	 * 呼出电话
39 39
	 * @param sn
40 40
	 */
41
	public void call(String sn,int flag) {
42
		if(flag==1){
41
	public void call(String sn,boolean flag) {
42
		if(flag){
43 43
			/**权限:android.permission.CALL_PHONE*/
44 44
			Intent intent = new Intent(Intent.ACTION_CALL,Uri.parse("tel:"+ sn));
45 45
			this.context.startActivity(intent);
@ -56,15 +56,15 @@ public class MobileBasic extends Plugin {
56 56
		}
57 57
		String sn = param.getString(0);
58 58
		String message = param.getString(1);
59
		int flag  = param.getInt(2);
59
		boolean flag  = param.getBoolean(2);
60 60
		sms(sn,message, flag);
61 61
	}
62 62
	
63 63
	/**
64 64
	 * 短信
65 65
	 */
66
	public void sms(String sn,String message,int flag) {
67
		if(flag==1){
66
	public void sms(String sn,String message,boolean flag) {
67
		if(flag){
68 68
			/**权限:android.permission.SEND_SMS*/
69 69
			Intent intent = new Intent(Intent.ACTION_SENDTO);
70 70
			SmsManager smsManager = SmsManager.getDefault();