Browse Source

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

chengwb3 9 years ago
parent
commit
203ff8410a

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

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

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

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

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

30
			throw new Exception(Messages.EXCEPTION_PARAM);
30
			throw new Exception(Messages.EXCEPTION_PARAM);
31
		}
31
		}
32
		String sn = param.getString(0);
32
		String sn = param.getString(0);
33
		int flag  = param.getInt(1);
33
		boolean flag  = param.getBoolean(1);
34
		call(sn, flag);
34
		call(sn, flag);
35
	}
35
	}
36
	
36
	
38
	 * 呼出电话
38
	 * 呼出电话
39
	 * @param sn
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
			/**权限:android.permission.CALL_PHONE*/
43
			/**权限:android.permission.CALL_PHONE*/
44
			Intent intent = new Intent(Intent.ACTION_CALL,Uri.parse("tel:"+ sn));
44
			Intent intent = new Intent(Intent.ACTION_CALL,Uri.parse("tel:"+ sn));
45
			this.context.startActivity(intent);
45
			this.context.startActivity(intent);
56
		}
56
		}
57
		String sn = param.getString(0);
57
		String sn = param.getString(0);
58
		String message = param.getString(1);
58
		String message = param.getString(1);
59
		int flag  = param.getInt(2);
59
		boolean flag  = param.getBoolean(2);
60
		sms(sn,message, flag);
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
			/**权限:android.permission.SEND_SMS*/
68
			/**权限:android.permission.SEND_SMS*/
69
			Intent intent = new Intent(Intent.ACTION_SENDTO);
69
			Intent intent = new Intent(Intent.ACTION_SENDTO);
70
			SmsManager smsManager = SmsManager.getDefault();   
70
			SmsManager smsManager = SmsManager.getDefault();