Ver Código Fonte

Merge branch 'master' of http://114.215.100.48:3000/ipu/android-share

kevin 9 anos atrás
pai
commit
df3081ae63
65 arquivos alterados com 1258 adições e 316 exclusões
  1. 2 6
      display-client/AndroidManifest.xml
  2. 20 6
      display-server/web/res/js/base/jcl.js
  3. 49 2
      ipu-client/AndroidManifest.xml
  4. 10 0
      ipu-client/assets/mobile-action.xml
  5. 0 3
      ipu-client/lint.xml
  6. 0 9
      ipu-client/mac.bak.classpath
  7. BIN
      ipu-client/res/drawable-hdpi/ic_launcher.png
  8. BIN
      ipu-client/res/drawable-ldpi/map_mark.png
  9. BIN
      ipu-client/res/drawable-mdpi/ic_launcher.png
  10. BIN
      ipu-client/res/drawable-xhdpi/ic_launcher.png
  11. BIN
      ipu-client/res/drawable-xxhdpi/ic_launcher.png
  12. 1 3
      ipu-client/res/menu/main.xml
  13. 8 0
      ipu-client/res/values-sw600dp/dimens.xml
  14. 9 0
      ipu-client/res/values-sw720dp-land/dimens.xml
  15. 0 62
      ipu-client/src/MainActivity.java.local
  16. 0 23
      ipu-client/src/com/ipu/client/MainActivity.java
  17. 1 2
      ipu-server/.gitignore
  18. 2 2
      ipu-server/etc/database.xml
  19. 0 8
      ipu-server/web/biz/js/VerifyCodeImage.js
  20. 9 1
      ipu-server/web/biz/js/common/biz-mobile.js
  21. 85 76
      ipu-server/web/biz/js/common/common.js
  22. BIN
      ipu-server/web/biz/temp/female.png
  23. BIN
      ipu-server/web/biz/temp/male.png
  24. BIN
      ipu-server/web/biz/temp/photo1.jpg
  25. BIN
      ipu-server/web/biz/temp/photo2.jpg
  26. BIN
      ipu-server/web/biz/temp/photo3.jpg
  27. BIN
      ipu-server/web/biz/temp/product1.jpg
  28. BIN
      ipu-server/web/biz/temp/product2.jpg
  29. BIN
      ipu-server/web/biz/temp/product3.jpg
  30. BIN
      ipu-server/web/biz/temp/product4.jpg
  31. BIN
      ipu-server/web/biz/temp/product5.jpg
  32. BIN
      ipu-server/web/biz/temp/product6.jpg
  33. BIN
      ipu-server/web/biz/temp/qr.png
  34. BIN
      ipu-server/web/biz/temp/slider1.jpg
  35. BIN
      ipu-server/web/biz/temp/slider2.jpg
  36. BIN
      ipu-server/web/biz/temp/slider3.jpg
  37. BIN
      ipu-server/web/biz/temp/slider4.jpg
  38. 174 1
      ipu-server/web/res/css/base.css
  39. 0 60
      ipu-server/web/res/css/bizIco-sn.css
  40. 20 8
      ipu-server/web/res/js/base/jcl.js
  41. 6 2
      ipu-server/web/res/js/mobile/expand-mobile.js
  42. 15 0
      ipu-server/web/res/js/mobile/mobile-browser.js
  43. 15 0
      ipu-server/web/res/js/mobile/mobile-client.js
  44. 4 2
      ipu-server/web/res/js/require-config.js
  45. 80 0
      ipu-server/web/res/js/ui/wm-dialog2.js
  46. 11 1
      ipu-server/web/template/common/Head.html
  47. 0 14
      ipu-server/web/template/common/IpuHead.html
  48. 63 0
      ipu-server/web/template/lua/tag/WmDialog.lua
  49. 107 0
      ipu-server/web/template/lua/tag/WmDialog2.lua
  50. 132 0
      ipu-server/web/template/lua/tag/WmDropmenu.lua
  51. 19 0
      ipu-server/web/template/lua/tag/WmDropmenuItem.lua
  52. 96 0
      ipu-server/web/template/lua/tag/WmNavBar.lua
  53. 84 0
      ipu-server/web/template/lua/tag/WmNavBarItem.lua
  54. 55 0
      ipu-server/web/template/lua/tag/WmProgress.lua
  55. 65 0
      ipu-server/web/template/lua/tag/WmRefresh.lua
  56. 59 0
      ipu-server/web/template/lua/tag/WmSegment.lua
  57. 54 0
      ipu-server/web/template/lua/tag/WmToolTip.lua
  58. 0 18
      ipu-server/web/template/webapp/ipu/VerifyCodeImage.html
  59. BIN
      wade-mobile-common/libs/wade-mobile-com.jar
  60. BIN
      wade-mobile-func/libs/unirest-java-1.3.2-SNAPSHOT-withDependency-ShadedForAndroid.jar
  61. BIN
      wade-mobile-func/libs/wade-mobile-com.jar
  62. 2 2
      wade-mobile-func/src/com/wade/mobile/func/MobileKeyboard.java
  63. 1 5
      wade-mobile-func/src/com/wade/mobile/func/MobileNetWork.java
  64. BIN
      wade-mobile-library/common/wade-mobile-server.jar
  65. BIN
      wade-mobile-push-yunba/libs/android-support-v4.jar

+ 2 - 6
display-client/AndroidManifest.xml

@ -2,7 +2,7 @@
2 2
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 3
    package="com.ai.mobile.display"
4 4
    android:versionCode="1"
5
    android:versionName="1.3" >
5
    android:versionName="1.0" >
6 6

7 7
    <uses-sdk
8 8
        android:minSdkVersion="8"
@ -105,10 +105,6 @@
105 105
            android:name="com.wade.mobile.common.audio.activity.AudioPlayerActivity"
106 106
            android:theme="@style/AudioDialogTheme" >
107 107
        </activity>
108
        <activity
109
            android:name="com.wade.mobile.common.simplemedia.activity.SARecorder"
110
            android:theme="@style/AudioDialogTheme" >
111
        </activity>
112 108
        <!-- 标记地图 -->
113 109
        <activity android:name="com.wade.mobile.common.map.activity.MarkMapActivity">
114 110
        </activity>
@ -122,7 +118,7 @@
122 118
        </activity>
123 119
        
124 120
        <!-- 键盘 -->
125
        <activity android:name="com.wade.mobile.common.keyboard.keyboardActivity"
121
        <activity android:name="com.wade.mobile.common.keyboard.KeyboardActivity"
126 122
            android:theme="@android:style/Theme.Translucent">
127 123
        </activity>
128 124
        <!-- 手势锁 -->

+ 20 - 6
display-server/web/res/js/base/jcl.js

@ -519,7 +519,8 @@ define(["zepto"],function($){
519 519
			if ( /^[\],:{}\s]*$/.test(data.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@")
520 520
				.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]")
521 521
				.replace(/(?:^|:|,)(?:\s*\[)+/g, "")) ) {
522

522
						
523
				console.log("########data");
523 524
				//先尝试使用浏览器内部JSON解析器
524 525
				return window.JSON && window.JSON.parse ?
525 526
					window.JSON.parse( data ) :
@ -580,7 +581,8 @@ define(["zepto"],function($){
580 581
			str=str.replace(/\\\":(null|undefined)(,|})/g,"\\\":\\\"\\\"$2"); //处理KEY值里放IData或IDataset的toString串里的空值
581 582
			str=str.replace(/\\\":(true|false)(,|})/g,"\\\":\\\"$1\\\"$2"); //处理KEY值里放IData或IDataset的toString串里的布尔值
582 583
			str=str.replace(/\\\":(-)?([0-9\.]+)(,|})/g,"\\\":\\\"$1$2\\\"$3"); //处理KEY值里放IData或IDataset的toString串里的数值
583
			str=str.replace(/\\\"/g,"!~b~!"); //把字符串中原有的 \" 替换,处理KEY值里放IData或IDataset的toString串的情况
584
			//ybf326
585
			//str=str.replace(/\\\"/g,"!~b~!"); //把字符串中原有的 \" 替换,处理KEY值里放IData或IDataset的toString串的情况
584 586
			
585 587
			str=str.replace(/:(null|undefined)(,|})/g,":\"\"$2");    //将null或undefined替换为空字符
586 588
			str=str.replace(/:(true|false)(,|})/g,":\"$1\"$2");      //将true|false替换为字符串
@ -617,9 +619,10 @@ define(["zepto"],function($){
617 619
					case "\n":
618 620
						out +="\u005Cn";
619 621
						break;
620
					case "\"":
622
					//ybf326
623
					/*case "\"":
621 624
						out +="!~a~!";
622
						break;
625
						break;*/
623 626
					default:
624 627
						out += chr;
625 628
					break;
@ -627,6 +630,8 @@ define(["zepto"],function($){
627 630
			}
628 631
			str = out;
629 632
		
633
			//ybf326
634
			/*
630 635
			//第一次替换处理JSON格式的双引号字符
631 636
			str=str.replace(/{!~a~!/g,"{\""); //处理 {"
632 637
			str=str.replace(/!~a~!}/g,"\"}");  //处理 "}
@ -641,6 +646,7 @@ define(["zepto"],function($){
641 646
			str=str.replace(/\u005C!~a~!/g,"\u005C\""); //本身就有\的还原
642 647
			str=str.replace(/!~a~!/g,"\u005C\"");    //其它的加上\符号
643 648
			str=str.replace(/!~b~!/g,"\u005C\"");   //恢复 !~b~! 为 \"
649
			*/
644 650
			
645 651
			//str=str.replace(/\r/g,"\u005Cr");		
646 652
			//str=str.replace(/\n/g,"\u005Cn");	
@ -678,6 +684,10 @@ define(["zepto"],function($){
678 684
					case "\"":
679 685
						out +="\u005C\"";
680 686
						break;
687
					//ybf326
688
					case "\\":
689
						out += "\u005C\u005C";
690
						break;
681 691
					default:
682 692
						out += chr;
683 693
					break;
@ -711,7 +721,9 @@ define(["zepto"],function($){
711 721
		},
712 722
		parseString:function(str){
713 723
			str=$.parseJsonString(str);
714
			(new Function("this.parseObject(" +str+")")).apply(this);
724
			console.log("#####this.parseObject");
725
			return window.JSON && window.JSON.parse ? this.parseObject(window.JSON.parse(str)) 
726
					: (new Function("this.parseObject(" +str+")")).apply(this);
715 727
			//if(typeof(o)=="object")this.parseObject(o);
716 728
		},
717 729
		parseObject:function(obj){
@ -800,7 +812,9 @@ define(["zepto"],function($){
800 812
		},	
801 813
		parseString:function(str){
802 814
			str=$.parseJsonString(str);
803
			(new Function("this.parseArray(" +str+")")).apply(this);	
815
			console.log("#####this.parseArray");
816
			return window.JSON && window.JSON.parse ? this.parseArray(window.JSON.parse(str)) : 
817
				(new Function("this.parseArray(" +str+")")).apply(this);	
804 818
		},
805 819
		parseArray:function(o){
806 820
			for(var i=0;i<o.length;i++){

+ 49 - 2
ipu-client/AndroidManifest.xml

@ -36,6 +36,9 @@
36 36
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
37 37
    <uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
38 38
    <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
39
    
40
    <uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
41
    <uses-permission android:name="android.permission.WAKE_LOCK" />
39 42
40 43
    <application
41 44
        android:allowBackup="false"
@ -57,6 +60,10 @@
57 60
                <category android:name="android.intent.category.LAUNCHER" />
58 61
            </intent-filter>
59 62
        </activity>
63
        
64
        <!-- 注册推送服务 -->
65
        <service android:name="com.ai.mobile.im.PushService" android:process=":WmPush" />
66
        
60 67
        <!-- 对话框 -->
61 68
        <activity
62 69
            android:name="com.wade.mobile.ui.activity.CustomDialogActivity"
@ -83,24 +90,64 @@
83 90
        </activity>
84 91
        <!-- 音乐播放服务 -->
85 92
        <service android:name="com.wade.mobile.common.audio.play.AudioPlayerService" />
86
        <!-- 录制声音 -->
93
        <!-- 录制声音
87 94
        <activity
88 95
            android:name="com.wade.mobile.common.audio.activity.AudioRecorderActivity"
89 96
            android:theme="@style/AudioDialogTheme" >
97
        </activity> -->
98
         <activity
99
            android:name="com.wade.mobile.common.simplemedia.activity.SARecorder"
100
            android:theme="@style/AudioDialogTheme" >
90 101
        </activity>
91 102
		<!-- 播放音乐 -->
92 103
        <activity
93 104
            android:name="com.wade.mobile.common.audio.activity.AudioPlayerActivity"
94 105
            android:theme="@style/AudioDialogTheme" >
95 106
        </activity>
107
        <activity
108
            android:name="com.wade.mobile.common.simplemedia.activity.SARecorder"
109
            android:theme="@style/AudioDialogTheme" >
110
        </activity>
96 111
        <!-- 标记地图 -->
97 112
        <activity android:name="com.wade.mobile.common.map.activity.MarkMapActivity">
98 113
        </activity>
99
        <activity android:name="com.ipu.client.test.TestActivity" ></activity>
114
        <!-- 通讯录UI -->
115
        <activity android:name="com.wade.mobile.common.contacts.activity.ContactsActivity">
116
        </activity>
100 117
        <!-- 设定位置 -->
101 118
        <activity
102 119
            android:name="com.wade.mobile.common.map.activity.SelectLocationActivity"
103 120
            android:screenOrientation="portrait" >
104 121
        </activity>
122
        
123
        <!-- 键盘 -->
124
        <activity android:name="com.wade.mobile.common.keyboard.KeyboardActivity"
125
            android:theme="@android:style/Theme.Translucent">
126
        </activity>
127
        <!-- 手势锁 -->
128
        <activity android:name="com.wade.mobile.common.screenlock.ScreenUnlockActivity" 
129
            android:theme="@android:style/Theme.NoTitleBar">
130
        </activity> 
131
        <activity android:name="com.wade.mobile.common.screenlock.SetScreenLockActivity" 
132
            android:theme="@android:style/Theme.NoTitleBar">
133
        </activity>
134
        
135
         <!-- YunBa Start -->
136
137
        <meta-data
138
            android:name="YUNBA_APPKEY"
139
            android:value="5630418ff085fc471efdf2c9" />
140
141
        <service android:name="io.yunba.android.core.YunBaService" >
142
        </service>
143
144
        <receiver android:name="io.yunba.android.core.YunBaReceiver" >
145
            <intent-filter>
146
                <action android:name="android.intent.action.USER_PRESENT" />
147
                <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
148
            </intent-filter>
149
        </receiver>
150
        
151
        <!-- YunBa End -->
105 152
    </application>
106 153
</manifest>

+ 10 - 0
ipu-client/assets/mobile-action.xml

@ -115,5 +115,15 @@
115 115
	<action name="setCallbackForPushWithYunba" class="com.ai.ipu.mobile.push.YunBaPush" method="setCallbackForPush"></action>
116 116
	
117 117
	<action name="getContacts" class="com.wade.mobile.func.MobileContactDetail" method="getContacts"></action>
118
	
119
	<!-- keyboard -->
120
	<action name="openKeyboard" class="com.wade.mobile.func.MobileKeyboard" method="openKeyboard"></action>
121
	
122
	<action name="setScreeLock" class="com.wade.mobile.func.MobileScreenLock" method="setScreeLock"></action>
123
	<action name="screeUnlock" class="com.wade.mobile.func.MobileScreenLock" method="screeUnlock"></action>
124
	
125
	<action name="openNative" class="com.ai.mobile.func.MobileOpenApp" method="openNative"></action>
126
	
118 127
	<action name="openBrowser" class="com.ipu.func.Util" method="openBrowser" ></action>
128

119 129
</actions>

+ 0 - 3
ipu-client/lint.xml

@ -1,3 +0,0 @@
1
<?xml version="1.0" encoding="UTF-8"?>
2
<lint>
3
</lint>

+ 0 - 9
ipu-client/mac.bak.classpath

@ -1,9 +0,0 @@
1
<?xml version="1.0" encoding="UTF-8"?>
2
<classpath>
3
	<classpathentry kind="src" path="src"/>
4
	<classpathentry kind="src" path="gen"/>
5
	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
6
	<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
7
	<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
8
	<classpathentry kind="output" path="bin/classes"/>
9
</classpath>

BIN
ipu-client/res/drawable-hdpi/ic_launcher.png


BIN
ipu-client/res/drawable-ldpi/map_mark.png


BIN
ipu-client/res/drawable-mdpi/ic_launcher.png


BIN
ipu-client/res/drawable-xhdpi/ic_launcher.png


BIN
ipu-client/res/drawable-xxhdpi/ic_launcher.png


+ 1 - 3
ipu-client/res/menu/main.xml

@ -1,6 +1,4 @@
1
<menu xmlns:android="http://schemas.android.com/apk/res/android"
2
    xmlns:tools="http://schemas.android.com/tools"
3
    tools:context="com.ai.wm_base_client.MainActivity" >
1
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
4 2

5 3
    <item
6 4
        android:id="@+id/action_settings"

+ 8 - 0
ipu-client/res/values-sw600dp/dimens.xml

@ -0,0 +1,8 @@
1
<resources>
2

3
    <!--
4
         Customize dimensions originally defined in res/values/dimens.xml (such as
5
         screen margins) for sw600dp devices (e.g. 7" tablets) here.
6
    -->
7

8
</resources>

+ 9 - 0
ipu-client/res/values-sw720dp-land/dimens.xml

@ -0,0 +1,9 @@
1
<resources>
2

3
    <!--
4
         Customize dimensions originally defined in res/values/dimens.xml (such as
5
         screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
6
    -->
7
    <dimen name="activity_horizontal_margin">128dp</dimen>
8

9
</resources>

+ 0 - 62
ipu-client/src/MainActivity.java.local

@ -1,62 +0,0 @@
1

2

3
import android.os.Bundle;
4
import android.view.KeyEvent;
5

6
import com.wade.mobile.app.AppRecord;
7
import com.wade.mobile.app.MobileUtil;
8
import com.wade.mobile.frame.activity.TemplateMainActivity;
9
import com.wade.mobile.frame.activity.TemplateMobileActivity;
10
import com.wade.mobile.frame.config.ServerConfig;
11
import com.wade.mobile.frame.template.TemplateManager;
12
import com.wade.mobile.func.MobileUI;
13
import com.wade.mobile.ui.comp.dialog.ConfirmBlockDialog;
14
import com.wade.mobile.ui.view.FlipperLayout;
15
import com.wade.mobile.util.Messages;
16

17
public class MainActivity extends TemplateMobileActivity {
18
	@Override
19
	public void onCreate(Bundle savedInstanceState) {
20
		setTheme(R.style.Theme_Sherlock_Light);
21
		//设置本地的密钥
22
		TemplateManager.initResKey("abcdefgh");
23
		if (AppRecord.isFirst(this) && !MobileUtil.checkWifiActive(this)) {
24
			ConfirmBlockDialog dialog = new ConfirmBlockDialog(this, "下载提醒",
25
					"即将下载应用资源,连接wifi将为您节省流量,是否继续下载");
26
			dialog.show();
27
			if (dialog.getResult() == ConfirmBlockDialog.Result.OK) {
28
				super.onCreate(savedInstanceState);
29
			} else {
30
				android.os.Process.killProcess(android.os.Process.myPid());// 同一线程调用会导致异常
31
				System.exit(0); // 经典退出
32
			}
33
		} else {
34
			super.onCreate(savedInstanceState);
35
		}
36
	}
37
	
38
	@Override
39
	public boolean onKeyDown(int keyCode, KeyEvent event) {
40
		if (keyCode == KeyEvent.KEYCODE_BACK) {
41
			FlipperLayout flipperLayout= getFlipperLayout();
42
			if(flipperLayout!=null){
43
				//回到首页的时候就直接退出应用
44
				String indexPage = ServerConfig.getInstance().getValue("indexPage");
45
				String tagPage = flipperLayout.getCurrView().getTag().toString();
46
				if(flipperLayout.isCanBack()&&!indexPage.equals(tagPage)){
47
					flipperLayout.back();
48
					return true;
49
				}
50
			}
51
			getWadeMobileClient().shutdownByConfirm(Messages.CONFIRM_CLOSE);
52
			return true;
53
		}
54
		return false;
55
	}
56
	
57
	@Override
58
	protected void initBasePath() {
59
		// TODO Auto-generated method stub
60
		TemplateManager.initBasePath("assets/");
61
	}
62
}

+ 0 - 23
ipu-client/src/com/ipu/client/MainActivity.java

@ -4,16 +4,12 @@ import java.net.ConnectException;
4 4
import java.net.SocketTimeoutException;
5 5

6 6
import android.os.Bundle;
7
import android.view.View;
8 7

9 8
import com.wade.mobile.app.AppRecord;
10 9
import com.wade.mobile.app.MobileOperation;
11 10
import com.wade.mobile.app.MobileUtil;
12 11
import com.wade.mobile.frame.activity.TemplateMainActivity;
13
import com.wade.mobile.frame.config.ServerConfig;
14 12
import com.wade.mobile.ui.comp.dialog.ConfirmBlockDialog;
15
import com.wade.mobile.ui.view.FlipperLayout;
16
import com.wade.mobile.util.Messages;
17 13

18 14
public class MainActivity extends TemplateMainActivity {
19 15
	@Override
@ -34,25 +30,6 @@ public class MainActivity extends TemplateMainActivity {
34 30
	}
35 31
	
36 32
	@Override
37
	public void onBackPressed() {
38
		try {
39
			FlipperLayout flipperLayout= getFlipperLayout();
40
			if(flipperLayout!=null){
41
				//回到首页的时候就直接退出应用
42
				String indexPage = ServerConfig.getInstance().getValue("indexPage");
43
				View currView = flipperLayout.getCurrView();
44
				if(flipperLayout.isCanBack()&& currView != null && (!indexPage.equals(currView.getTag().toString()))){
45
					flipperLayout.back();
46
					return;
47
				}
48
			}
49
			getWadeMobileClient().shutdownByConfirm(Messages.CONFIRM_CLOSE);
50
		} catch (Exception e) {
51
			getWadeMobileClient().shutdownByConfirm(Messages.CONFIRM_CLOSE);
52
		}
53
	}
54

55
	@Override
56 33
	protected void error(Exception e) {
57 34
		if (e instanceof ConnectException || e  instanceof SocketTimeoutException) {
58 35
			MainActivity.this.runOnUiThread(new Runnable() {

+ 1 - 2
ipu-server/.gitignore

@ -4,8 +4,7 @@
4 4

5 5
/ipu-server.war
6 6

7
/web
8
/res.version.properties
7
/web/res.version.properties
9 8
10 9
/.DS_Store
11 10

+ 2 - 2
ipu-server/etc/database.xml

@ -1,9 +1,9 @@
1 1
<?xml version="1.0" encoding="UTF-8"?>
2 2
<database>
3
 <ipuOracle
3
	<ipuOracle
4 4
		type="dbcp"
5 5
		driver="oracle.jdbc.driver.OracleDriver"
6
		url="jdbc:oracle:thin:@10.7.5.75:1521:ncrmdb"
6
		url="jdbc:oracle:thin:@127.0.0.1:1521:ncrmdb"
7 7
		user="bband"
8 8
		passwd="bband-123"
9 9
		initialSize="5"

+ 0 - 8
ipu-server/web/biz/js/VerifyCodeImage.js

@ -1,8 +0,0 @@
1
require(["mobile","zepto","common"],function(Mobile,$,Common){
2
	$("#verifyIMG").click(function(){
3
		Common.callSvc("VerifyCodeImage.generateImage", null, function(data){
4
			var resultData = new Wade.DataMap(data);
5
			$("#verifyIMG").attr("src", "data:image/png;base64, " + resultData.get("VERIFY_IMG"));
6
		});
7
	});
8
});

+ 9 - 1
ipu-server/web/biz/js/common/biz-mobile.js

@ -10,6 +10,8 @@ define(["require"],function(require) {
10 10
				execute("openAnimation", [],err);
11 11
			},shutAnimation:function(err){ //关闭动画
12 12
				execute("shutAnimation", [],err);
13
			},openNative:function(data,err){
14
				execute("openNative", [data], err);
13 15
			}
14 16
		};
15 17
	})();
@ -20,8 +22,14 @@ define(["require"],function(require) {
20 22
		if(!WadeMobile){
21 23
			WadeMobile = require("wadeMobile")
22 24
		}
25
        return WadeMobile.execute(action, args, error, success)
26
	}
27
	function storageCallback(action,callback,isEscape,isBase64) {
23 28
		/*循环依赖,懒加载*/
24
		return require("wadeMobile").execute(action, args, error, success);
29
		if(!WadeMobile){
30
			WadeMobile = require("wadeMobile")
31
		}
32
		WadeMobile.callback.storageCallback(action,callback,isEscape,isBase64)
25 33
	}
26 34
	
27 35
	return BizMobile;

+ 85 - 76
ipu-server/web/biz/js/common/common.js

@ -1,132 +1,139 @@
1 1
/**
2
 * 将一些公共的业务处理放入此对象中
2
 * 将一些公共的业务处理放入此对象中 
3 3
 */
4
define([ "jcl", "mobile", "clientTool" ], function(Wade, Mobile, ClientTool) {
5
	var Common = new function() {
6
		/* 调用服务 */
7
		this.callSvc = function(action, param, callback, isEscape, error) {
4
define(["jcl","mobile","clientTool"],function(Wade,Mobile,ClientTool) {
5
	var Common = new function(){
6
		/*调用服务*/
7
		this.callSvc = function(action,param,callback,isEscape,error){
8 8
			param = param ? param : new Wade.DataMap();
9
			error = error ? error : function(x_code, x_info) {
9
            error = error ? error : function(x_info, x_code) {
10 10
				Mobile.loadingStop();
11
				alert(action + "请求失败\n错误编码:[" + x_code + "]\n错误信息:" + x_info);
12
				if (x_code == -100) {
13
					Mobile.openPage("SessionErr");
11
				if(x_code){
12
					alert("错误编码:[" + x_code + "]\n错误信息:" + x_info);
13
				}else{
14
					alert("错误信息:" + x_info);
15
				}
16
				if(x_code==-100){
17
					Mobile.openPage("Login");
14 18
				}
15 19
			};
16

20
            
17 21
			Common.get(function(data) {
18 22
				if (typeof data == "string") {
19 23
					data = new Wade.DataMap(data);
20 24
				}
21
				if (!param.get("SESSION_ID") && data.get("SESSION_ID")) {
22
					param.put("SESSION_ID", data.get("SESSION_ID"));
25
				if (data.get(Constant.SESSION_ID)) {
26
					param.put(Constant.SESSION_ID, data.get(Constant.SESSION_ID));
23 27
				}
24
				if ( !param.get("USER_NAME") && data.get("USER_NAME")) {
25
					param.put("USER_NAME", data.get("USER_NAME"));
28
				if (data.get(Constant.STAFF_ID)) {
29
					param.put(Constant.STAFF_ID, data.get(Constant.STAFF_ID));
26 30
				}
27 31
				callSvc(action, param, callback, isEscape, error);
28
			}, [ "SESSION_ID", "USER_NAME" ]);
29

30
			function callSvc(_action, _param, _callback, _isEscape, _error) {
31
				Mobile.dataRequest(_action, _param, _callback, _isEscape,
32
						function(errMsg) {
33
							if (typeof (errMsg) == "string") {
34
								errMsg = new Wade.DataMap(errMsg);
35
							}
36
							x_resultcode = errMsg.get("X_RESULTCODE");
37
							x_resultinfo = errMsg.get("X_RESULTINFO");
38
							_error(x_resultcode, x_resultinfo)
39
						});
32
			}, [Constant.SESSION_ID,Constant.STAFF_ID]);
33
			
34
			function callSvc(_action,_param,_callback,_isEscape,_error){
35
				Mobile.dataRequest(_action,_param,function(resultData){
36
					if (typeof (resultData) == "string") {
37
						resultData = new Wade.DataMap(resultData);
38
					}
39
					var x_resultcode = resultData.get(Constant.X_RESULTCODE);
40
					var x_resultinfo = resultData.get(Constant.X_RESULTINFO);
41
					if(x_resultcode<0){
42
						_error(x_resultinfo, x_resultcode);//接口异常则回调报错函数
43
					}else{
44
						_callback(resultData);
45
					}
46
				}, _isEscape, _error);
40 47
			}
41 48
		};
42 49

43 50
		this.openPage = function(action, param, error) {
44 51
			param = param ? param : new Wade.DataMap();
45
			error = error ? error
46
					: function(x_code, x_info) {
47
						Mobile.loadingStop();
48
						alert(action + "页面请求失败\n错误编码:[" + x_code + "]\n错误信息:"
49
								+ x_info);
50
						if (x_code == -100) {
51
							Mobile.openPage("SessionErr");
52
						}
53
					};
52
			error = error ? error : function(x_info, x_code) {
53
				Mobile.loadingStop();
54
				if(x_code){
55
					alert("错误编码:[" + x_code + "]\n错误信息:" + x_info);
56
				}else{
57
					alert("错误信息:" + x_info);
58
				}
59
				if(x_code==-100){
60
					Mobile.openPage("Login");
61
				}
62
			};
54 63

55 64
			Common.get(function(data) {
56 65
				if (typeof data == "string") {
57 66
					data = new Wade.DataMap(data);
58 67
				}
59
				var sessionId = data.get("SESSION_ID");
60
				var userName = data.get("USER_NAME");
61
				if (!param.get("SESSION_ID") && data.get("SESSION_ID")) {
62
					param.put("SESSION_ID", data.get("SESSION_ID"));
68
				if (data.get(Constant.SESSION_ID)) {
69
					param.put(Constant.SESSION_ID, data.get(Constant.SESSION_ID));
63 70
				}
64
				if ( !param.get("USER_NAME") && data.get("USER_NAME")) {
65
					param.put("USER_NAME", data.get("USER_NAME"));
71
				if (data.get(Constant.STAFF_ID)) {
72
					param.put(Constant.STAFF_ID, data.get(Constant.STAFF_ID));
66 73
				}
67 74
				openPage(action, param, error);
68
			}, [ "SESSION_ID", "USER_NAME" ]);
75
			}, [Constant.SESSION_ID,Constant.STAFF_ID]);
69 76

70 77
			function openPage(_action, _param, _error) {
71 78
				Mobile.openPage(_action, _param, function(errMsg) {
72 79
					if (typeof (errMsg) == "string") {
73 80
						errMsg = new Wade.DataMap(errMsg);
74 81
					}
75
					x_resultcode = errMsg.get("X_RESULTCODE");
76
					x_resultinfo = errMsg.get("X_RESULTINFO");
77
					_error(x_resultcode, x_resultinfo)
82
					var x_resultcode = errMsg.get("X_RESULTCODE");
83
					var x_resultinfo = errMsg.get("X_RESULTINFO");
84
					_error(x_resultinfo, x_resultcode);
78 85
				});
79 86
			}
80 87
		};
81

82
		this.closeApp = function() {
83
			if (confirm("确定要退出应用程序吗?")) {
88
		
89
		this.closeApp = function(){
90
			if(confirm("确定要退出应用程序吗?")){
84 91
				Mobile.closeApp();
85 92
			}
86 93
		};
87

88
		this.logoutAccount = function() {
89
			if (confirm("确定要注销该工号吗?")) {
94
		
95
		this.logoutAccount = function(){
96
			if(confirm("确定要注销该工号吗?")){
90 97
				Common.remove(Constant.SESSION_ID);
91 98
				Mobile.openTemplate("Home");
92 99
			}
93 100
		};
94

101
		
95 102
		this.put = function(key, value) {
96
			if (!checkMapKey(key)) {
103
			if(!checkMapKey(key)){
97 104
				return;
98 105
			}
99 106
			Mobile.setMemoryCache(key, value);
100 107
		};
101 108
		this.get = function(callback, key, value) {
102
			if (!checkArrayKey(key)) {
109
			if(!checkArrayKey(key)){
103 110
				return;
104 111
			}
105 112
			Mobile.getMemoryCache(callback, key, value);
106 113
		};
107 114
		this.remove = function(key) {
108
			if (!checkArrayKey(key)) {
115
			if(!checkArrayKey(key)){
109 116
				return;
110 117
			}
111 118
			Mobile.removeMemoryCache(key);
112 119
		};
113 120
		this.clear = function() {
114
			Mobile.clearMemoryCache();
121
		    Mobile.clearMemoryCache();
115 122
		};
116 123
		this.putLocal = function(key, value) {
117
			if (!checkMapKey(key)) {
124
			if(!checkMapKey(key)){
118 125
				return;
119 126
			}
120 127
			Mobile.setOfflineCache(key, value);
121 128
		};
122 129
		this.getLocal = function(callback, key, value) {
123
			if (!checkArrayKey(key)) {
130
			if(!checkArrayKey(key)){
124 131
				return;
125 132
			}
126
			Mobile.getOfflineCache(callback, key, value);
133
			Mobile.getOfflineCache(callback, key,value);
127 134
		};
128 135
		this.removeLocal = function(key) {
129
			if (!checkArrayKey(key)) {
136
			if(!checkArrayKey(key)){
130 137
				return;
131 138
			}
132 139
			Mobile.removeOfflineCache(key);
@ -134,38 +141,40 @@ define([ "jcl", "mobile", "clientTool" ], function(Wade, Mobile, ClientTool) {
134 141
		this.clearLocal = function() {
135 142
			Mobile.clearOfflineCache();
136 143
		};
137

138
		function checkMapKey(key) {
139
			if (!key
140
					|| (typeof (key) != "string" && !ClientTool.tool
141
							.isDataMap(key))) {
142
				alert(key + "参数类型异常");
144
		/*数据库操作*/
145
		var dbName = "IPU";
146
		this.execSQL = function(sql,bindArgs,callback,err){
147
			Mobile.execSQL(dbName,sql,bindArgs,callback,err);
148
		};
149
		
150
		function checkMapKey(key){
151
			if (!key || (typeof (key) != "string" && !ClientTool.tool.isDataMap(key))) {
152
				alert(key+"参数类型异常");
143 153
				return false;
144 154
			} else {
145 155
				return true;
146 156
			}
147 157
		}
148

149
		function checkArrayKey(key) {
150
			if (!key
151
					|| (typeof (key) != "string" && !ClientTool.tool
152
							.isArray(key))) {
153
				alert(key + "参数类型异常");
158
		
159
		function checkArrayKey(key){
160
			if (!key || (typeof (key) != "string" && !ClientTool.tool.isArray(key))) {
161
				alert(key+"参数类型异常");
154 162
				return false;
155 163
			} else {
156 164
				return true;
157 165
			}
158 166
		}
159 167
	}
160

168
	
161 169
	window.Constant = {
162
		USER_NAME : "USER_NAME",
170
		OPEN_PAGE_KEY : "OPEN_PAGE_KEY",
171
		STAFF_ID : "STAFF_ID",
163 172
		SESSION_ID : "SESSION_ID",
164 173
		X_RECORDNUM : "X_RECORDNUM",
165 174
		X_RESULTCODE : "X_RESULTCODE",
166 175
		X_RESULTINFO : "X_RESULTINFO",
167 176
		X_RESULTCAUSE : "X_RESULTCAUSE"
168 177
	}
169

178
	
170 179
	return Common;
171
});
180
});

BIN
ipu-server/web/biz/temp/female.png


BIN
ipu-server/web/biz/temp/male.png


BIN
ipu-server/web/biz/temp/photo1.jpg


BIN
ipu-server/web/biz/temp/photo2.jpg


BIN
ipu-server/web/biz/temp/photo3.jpg


BIN
ipu-server/web/biz/temp/product1.jpg


BIN
ipu-server/web/biz/temp/product2.jpg


BIN
ipu-server/web/biz/temp/product3.jpg


BIN
ipu-server/web/biz/temp/product4.jpg


BIN
ipu-server/web/biz/temp/product5.jpg


BIN
ipu-server/web/biz/temp/product6.jpg


BIN
ipu-server/web/biz/temp/qr.png


BIN
ipu-server/web/biz/temp/slider1.jpg


BIN
ipu-server/web/biz/temp/slider2.jpg


BIN
ipu-server/web/biz/temp/slider3.jpg


BIN
ipu-server/web/biz/temp/slider4.jpg


+ 174 - 1
ipu-server/web/res/css/base.css

@ -921,4 +921,177 @@ input[type="checkbox"]:checked { opacity:1; }
921 921
.l_page-current-2 { left:-100%;}
922 922
.l_page-current-3 { left:-200%;}
923 923
.l_page-current-4 { left:-400%;}
924
.l_page-current-5 { left:-500%;}
924
.l_page-current-5 { left:-500%;}
925

926
/* custome dialog */
927
.s-dialog {
928
	position: fixed;
929
	top: 50%;
930
	left: 50%;
931
	width: 80%;
932
	min-width: 320px;
933
	height: auto;
934
	z-index: 2000;
935
	visibility: hidden;
936
	-webkit-backface-visibility: hidden;
937
	-moz-backface-visibility: hidden;
938
	backface-visibility: hidden;
939
	-webkit-transform: translateX(-50%) translateY(-50%);
940
	-moz-transform: translateX(-50%) translateY(-50%);
941
	-ms-transform: translateX(-50%) translateY(-50%);
942
	transform: translateX(-50%) translateY(-50%);
943
}
944

945
.s-dialog-show {
946
	visibility: visible;
947
}
948

949
.s-dialog-content {
950
	color: #fff;
951
	background: #0085d0;
952
	position: relative;
953
	border-radius: 3px;
954
	margin: 0 auto;
955
}
956

957
.s-dialog-content h3 {
958
	margin: 0;
959
	padding: 0.4em;
960
	text-align: center;
961
	font-size: 2.4em;
962
	font-weight: 300;
963
	opacity: 0.8;
964
	background: rgba(0,0,0,0.1);
965
	border-radius: 3px 3px 0 0;
966
}
967

968
.s-dialog-content > div {
969
	padding: 15px 40px 30px;
970
	margin: 0;
971
	font-weight: 300;
972
	font-size: 1.15em;
973
}
974

975
.s-dialog .s-dialog-mainview{
976
	min-height: 1.15rem;
977
}
978

979
.s-dialog-content > .s-dialog-buttons{
980
	text-align: center;
981
	margin:0 auto;
982
}
983

984
.s-dialog-buttons button {
985
	border: none;
986
	padding: 3% 3%;
987
	background: #0085ff;
988
	color: #fff;
989
	letter-spacing: 1px;
990
	cursor: pointer;
991
	border-radius: 2px;
992
	display: inline-block;
993
	margin: 0 0.05rem;
994
	font-size: 0.8em;
995
	box-shadow: 7px 7px 5px #216AAD;
996
	width:45%;
997
}
998

999
.s-dialog-buttons button:hover {
1000
	background: #216AAD;
1001
}
1002

1003
.s-dialog-buttons .s-dialog-ok{
1004
	background: #92E818;
1005
	box-shadow: 7px 7px 5px #78C30D;
1006
}
1007
.s-dialog-buttons .s-dialog-ok:hover{
1008
	background: #78C30D;
1009
}
1010

1011
.s-dialog-slip .s-dialog-content {
1012
	-webkit-transform: translateY(20%);
1013
	-moz-transform: translateY(20%);
1014
	-ms-transform: translateY(20%);
1015
	transform: translateY(20%);
1016
	
1017
	opacity: 0;
1018
	-webkit-transition: all 0.3s;
1019
	-moz-transition: all 0.3s;
1020
	transition: all 0.3s;
1021
}
1022

1023
.s-dialog-show.s-dialog-slip .s-dialog-content {				
1024
	-webkit-transform: translateY(0);
1025
	-moz-transform: translateY(0);
1026
	-ms-transform: translateY(0);
1027
	transform: translateY(0);
1028
	
1029
	opacity: 1;
1030
}
1031

1032
/*8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
1033
8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
1034
8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
1035
8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
1036
8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888*/
1037

1038
.c-refresh-container { position:absolute !important; top:0.62rem; bottom:0px; width:100%;}
1039

1040
[id*="c-refresh-wrapper"] { position:relative; overflow:auto;}
1041
.m_wrapper { height:100%; overflow:auto; position:relative;}
1042

1043

1044
/*下拉刷新*/
1045
#pullDown, #pullUp {
1046
	background:#fff;
1047
	height:2.22em;
1048
	line-height:2.22em;
1049
	padding:0.28em 0.56em;
1050
	border-bottom:1px solid #ccc;
1051
	font-weight:bold;
1052
	color:#888;
1053
}
1054
#pullDown .pullDownIcon, #pullUp .pullUpIcon  {
1055
	display:block; float:left;
1056
	width:2.22em; height:2.22em;
1057
	background:url(../img/pull.png) 0 0 no-repeat;
1058
	-webkit-background-size:100% 100%; background-size:100% 100%;
1059
	-webkit-transition-property:-webkit-transform;
1060
	-webkit-transition-duration:250ms;	
1061
}
1062
#pullDown .pullDownIcon {
1063
	-webkit-transform:rotate(0deg) translateZ(0);
1064
}
1065
#pullUp .pullUpIcon  {
1066
	-webkit-transform:rotate(-180deg) translateZ(0);
1067
}
1068

1069
#pullDown.flip .pullDownIcon {
1070
	-webkit-transform:rotate(-180deg) translateZ(0);
1071
}
1072

1073
#pullUp.flip .pullUpIcon {
1074
	-webkit-transform:rotate(0deg) translateZ(0);
1075
}
1076

1077
#pullDown.loading .pullDownIcon, #pullUp.loading .pullUpIcon {
1078
	background-image:url(../img/pullLoading.png);
1079
	-webkit-transform:rotate(0deg) translateZ(0);
1080
	-webkit-transition-duration:0ms;
1081

1082
	-webkit-animation-name:loading;
1083
	-webkit-animation-duration:2s;
1084
	-webkit-animation-iteration-count:infinite;
1085
	-webkit-animation-timing-function:linear;
1086
}
1087
@-webkit-keyframes loading {
1088
	from { -webkit-transform:rotate(0deg) translateZ(0); }
1089
	to { -webkit-transform:rotate(360deg) translateZ(0); }
1090
}
1091

1092

1093

1094

1095

1096

1097


+ 0 - 60
ipu-server/web/res/css/bizIco-sn.css

@ -1,60 +0,0 @@
1
/*查询类*/
2
.e_bizIco-G3PaymentHistory:before        { content:"\e600"; color:#8fc320;}/*缴费历史查询*/
3
.e_bizIco-G3FreeResource:before          { content:"\e999"; color:#c37c20;}/*免费资源查询★已合并此功能至套餐余量查询★*/
4
.e_bizIco-G3QueryFeeRemain:before        { content:"\e609"; color:#c33f20;}/*话费余额查询*/
5
.e_bizIco-G3QueryCustInf:before          { content:"\e999"; color:#0085d0;}/*客户资料查询★此功能已移至侧栏★*/
6
.e_bizIco-G3QryOrderProduct:before       { content:"\e62b"; color:#e40077;}/*订购产品查询*/
7
.e_bizIco-G3QryBill:before               { content:"\e602"; color:#1ca98d;}/*账单查询*/
8
.e_bizIco-G3BlackList:before             { content:"\e62a"; color:#333333;}/*黑名单查询*/
9
.e_bizIco-G3Qryscore:before              { content:"\e629"; color:#c4a426;}/*积分\M值查询*/
10
.e_bizIco-G3QrySale:before               { content:"\e628"; color:#a64d9d;}/*营销活动查询*/
11
.e_bizIco-G3QryFamily:before             { content:"\e627"; color:#e69020;}/*亲情号码查询*/
12
.e_bizIco-G3Display:before               { content:"\e999"; color:#ef432c;}/*业务展示★已删除此蛋疼功能★*/
13
.e_bizIco-G3QryFee:before                { content:"\e601"; color:#a5af36;}/*实时话费*/
14
.e_bizIco-G3BusCount:before              { content:"\e626"; color:#8fc320;}/*业务统计*/
15
.e_bizIco-G3QryPUK:before                { content:"\e625"; color:#c37c20;}/*puk码查询*/
16
.e_bizIco-G3QryTerminalInventory:before  { content:"\e624"; color:#c33f20;}/*终端库存查询*/
17
.e_bizIco-G3GprsQry:before               { content:"\e999"; color:#0085d0;}/*数据流程查询★已合并此功能至套餐余量查询★*/
18
.e_bizIco-G3AgentRechargeDetails:before  { content:"\e623"; color:#e40077;}/*代理商缴费查询*/
19
.e_bizIco-G3SaleCard:before              { content:"\e622"; color:#1ca98d;}/*销售号卡查询*/
20
.e_bizIco-G3AgentFee:before              { content:"\e621"; color:#4489ac;}/*代理商余额查询*/
21
.e_bizIco-G3QryOverage:before            { content:"\e606"; color:#4489ac;}/*★套餐余量查询*/
22
/*办理类*/
23
.e_bizIco-G3Payment:before               { content:"\e608"; color:#8fc320;}/*营业缴费*/
24
.e_bizIco-G3MakeNewAccount:before        { content:"\e605"; color:#c37c20;}/*入网开户*/
25
.e_bizIco-G3ScoreExchange:before         { content:"\e620"; color:#c33f20;}/*积分M值兑换*/
26
.e_bizIco-G3ChangeProduct:before         { content:"\e603"; color:#0085d0;}/*产品变更*/
27
.e_bizIco-G3MonternetPortal:before       { content:"\e61f"; color:#e40077;}/*梦网查询*/
28
.e_bizIco-G3FamilyMember:before          { content:"\e61e"; color:#1ca98d;}/*家庭成员管理*/
29
.e_bizIco-G3Pick:before                  { content:"\e61d"; color:#4489ac;}/*号码预约*/
30
.e_bizIco-G3ServeOpenClose:before        { content:"\e61c"; color:#c4a426;}/*申请停开机*/
31
.e_bizIco-G3ChangePassword:before        { content:"\e999"; color:#a64d9d;}/*密码变更★简单业务放菜单页★*/
32
.e_bizIco-G3MarketActivity:before        { content:"\e607"; color:#e69020;}/*营销活动*/
33
.e_bizIco-G3BalanceReminder:before       { content:"\e999"; color:#ef432c;}/*余额提醒服务定制★简单业务放菜单页★*/
34
.e_bizIco-G3BillSender:before            { content:"\e999"; color:#a5af36;}/*账单寄送服务定制★简单业务放菜单页★*/
35
.e_bizIco-G3Vnet:before                  { content:"\e61b"; color:#8fc320;}/*校园V网*/
36
.e_bizIco-G3InterCruise:before           { content:"\e61a"; color:#c37c20;}/*国际漫游*/
37
.e_bizIco-G3BackOpenUser:before          { content:"\e619"; color:#c33f20;}/*返单开户*/
38
.e_bizIco-G3ReIssueCard:before           { content:"\e618"; color:#0085d0;}/*换卡*/
39
.e_bizIco-G3AoProductChange:before       { content:"\e999"; color:#e40077;}/*附加产品变更★合并至产品变更★*/
40
.e_bizIco-G3ChangeCard:before            { content:"\e618"; color:#1ca98d;}/*以卡换卡★同换卡(颜色会不一样)★*/
41
.e_bizIco-G3TerminalSale:before          { content:"\e62d"; color:#4489ac;}/*终端销售???*/
42
.e_bizIco-G3TerminalBack:before          { content:"\e617"; color:#c4a426;}/*终端返销*/
43
.e_bizIco-G3GoodsReceive:before          { content:"\e616"; color:#a64d9d;}/*货品领取*/
44
.e_bizIco-G3RealNameReg:before           { content:"\e62c"; color:#e69020;}/*实名登记???*/
45
.e_bizIco-G3AgentMarketActivity:before   { content:"\e607"; color:#ef432c;}/*代理商营销活动★同营销活动(颜色会不一样)★*/
46
.e_bizIco-G3BareMachineSale:before       { content:"\e615"; color:#a5af36;}/*裸机销售*/
47
.e_bizIco-G3ContractSale:before          { content:"\e604"; color:#8fc320;}/*合约计划销售*/
48
.e_bizIco-G3NewNetAcct:before            { content:"\e614"; color:#c37c20;}/*宽带开户业务*/
49
.e_bizIco-G3ChangeWidePassWord:before    { content:"\e613"; color:#c33f20;}/*宽带密码变更*/
50
.e_bizIco-G3TerminalInstock:before       { content:"\e612"; color:#0085d0;}/*终端入库*/
51
.e_bizIco-G3PaymentBuyBack:before        { content:"\e611"; color:#e40077;}/*缴费返销*/
52
.e_bizIco-G3AgentPayment:before          { content:"\e608"; color:#1ca98d;}/*代理商代缴费★同营业缴费★*/
53
.e_bizIco-G3BusinessRecommend:before     { content:"\e610"; color:#4489ac;}/*新业务推荐*/
54
/*管理类*/
55
.e_bizIco-G3ChannelWarning:before        { content:"\e60f"; color:#c4a426;}/*渠道预警*/
56
.e_bizIco-G3ChannelInformation:before    { content:"\e60e"; color:#a64d9d;}/*渠道信息查询*/
57
.e_bizIco-G3Remuneration:before          { content:"\e60d"; color:#e69020;}/*酬金查询*/
58
.e_bizIco-G3InformationCollection:before { content:"\e60c"; color:#ef432c;}/*信息采集*/
59
.e_bizIco-G3Inspection:before            { content:"\e60b"; color:#a5af36;}/*巡检管理*/
60
.e_bizIco-G3AmountOfPayment:before       { content:"\e60a"; color:#8fc320;}/*量酬查询*/

+ 20 - 8
ipu-server/web/res/js/base/jcl.js

@ -519,7 +519,8 @@ define(["zepto"],function($){
519 519
			if ( /^[\],:{}\s]*$/.test(data.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@")
520 520
				.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]")
521 521
				.replace(/(?:^|:|,)(?:\s*\[)+/g, "")) ) {
522

522
						
523
				console.log("########data");
523 524
				//先尝试使用浏览器内部JSON解析器
524 525
				return window.JSON && window.JSON.parse ?
525 526
					window.JSON.parse( data ) :
@ -580,7 +581,8 @@ define(["zepto"],function($){
580 581
			str=str.replace(/\\\":(null|undefined)(,|})/g,"\\\":\\\"\\\"$2"); //处理KEY值里放IData或IDataset的toString串里的空值
581 582
			str=str.replace(/\\\":(true|false)(,|})/g,"\\\":\\\"$1\\\"$2"); //处理KEY值里放IData或IDataset的toString串里的布尔值
582 583
			str=str.replace(/\\\":(-)?([0-9\.]+)(,|})/g,"\\\":\\\"$1$2\\\"$3"); //处理KEY值里放IData或IDataset的toString串里的数值
583
			str=str.replace(/\\\"/g,"!~b~!"); //把字符串中原有的 \" 替换,处理KEY值里放IData或IDataset的toString串的情况
584
			//ybf326
585
			//str=str.replace(/\\\"/g,"!~b~!"); //把字符串中原有的 \" 替换,处理KEY值里放IData或IDataset的toString串的情况
584 586
			
585 587
			str=str.replace(/:(null|undefined)(,|})/g,":\"\"$2");    //将null或undefined替换为空字符
586 588
			str=str.replace(/:(true|false)(,|})/g,":\"$1\"$2");      //将true|false替换为字符串
@ -617,9 +619,10 @@ define(["zepto"],function($){
617 619
					case "\n":
618 620
						out +="\u005Cn";
619 621
						break;
620
					case "\"":
622
					//ybf326
623
					/*case "\"":
621 624
						out +="!~a~!";
622
						break;
625
						break;*/
623 626
					default:
624 627
						out += chr;
625 628
					break;
@ -627,14 +630,14 @@ define(["zepto"],function($){
627 630
			}
628 631
			str = out;
629 632
		
633
			//ybf326
634
			/*
630 635
			//第一次替换处理JSON格式的双引号字符
631 636
			str=str.replace(/{!~a~!/g,"{\""); //处理 {"
632 637
			str=str.replace(/!~a~!}/g,"\"}");  //处理 "}
633 638
			str=str.replace(/!~a~!,!~a~!/g,"\",\"");   //处理 ","
634 639
			str=str.replace(/!~a~!:!~a~!/g,"\":\"");   //处理 ":"
635
			str=str.replace(/!~a~!:\[!~a~!/g,"\":[\"");   //处理 ":["
636 640
			str=str.replace(/!~a~!:\[/g,"\":[");   //处理 ":[
637
			str=str.replace(/!~a~!\],!~a~!/g,"\"],\"");   //处理 "],"
638 641
			str=str.replace(/\],!~a~!/g,"],\"");   //处理 ],"
639 642
			str=str.replace(/!~a~!:{/g,"\":{");    //处理 ":{
640 643
			str=str.replace(/},!~a~!/g,"},\"");    //处理 },"
@ -643,6 +646,7 @@ define(["zepto"],function($){
643 646
			str=str.replace(/\u005C!~a~!/g,"\u005C\""); //本身就有\的还原
644 647
			str=str.replace(/!~a~!/g,"\u005C\"");    //其它的加上\符号
645 648
			str=str.replace(/!~b~!/g,"\u005C\"");   //恢复 !~b~! 为 \"
649
			*/
646 650
			
647 651
			//str=str.replace(/\r/g,"\u005Cr");		
648 652
			//str=str.replace(/\n/g,"\u005Cn");	
@ -680,6 +684,10 @@ define(["zepto"],function($){
680 684
					case "\"":
681 685
						out +="\u005C\"";
682 686
						break;
687
					//ybf326
688
					case "\\":
689
						out += "\u005C\u005C";
690
						break;
683 691
					default:
684 692
						out += chr;
685 693
					break;
@ -713,7 +721,9 @@ define(["zepto"],function($){
713 721
		},
714 722
		parseString:function(str){
715 723
			str=$.parseJsonString(str);
716
			(new Function("this.parseObject(" +str+")")).apply(this);
724
			console.log("#####this.parseObject");
725
			return window.JSON && window.JSON.parse ? this.parseObject(window.JSON.parse(str)) 
726
					: (new Function("this.parseObject(" +str+")")).apply(this);
717 727
			//if(typeof(o)=="object")this.parseObject(o);
718 728
		},
719 729
		parseObject:function(obj){
@ -802,7 +812,9 @@ define(["zepto"],function($){
802 812
		},	
803 813
		parseString:function(str){
804 814
			str=$.parseJsonString(str);
805
			(new Function("this.parseArray(" +str+")")).apply(this);	
815
			console.log("#####this.parseArray");
816
			return window.JSON && window.JSON.parse ? this.parseArray(window.JSON.parse(str)) : 
817
				(new Function("this.parseArray(" +str+")")).apply(this);	
806 818
		},
807 819
		parseArray:function(o){
808 820
			for(var i=0;i<o.length;i++){

+ 6 - 2
ipu-server/web/res/js/mobile/expand-mobile.js

@ -287,8 +287,12 @@ define(["require"],function(require) {
287 287
			},getContacts:function(callback,err){
288 288
				storageCallback("getContacts",callback);
289 289
				execute("getContacts",[], err);	
290
			},openBrowser:function(url,err){
291
				execute("openBrowser",[url],err);
290
			},openKeyboard:function(value,err){
291
				execute("openKeyboard",[value],err);
292
			},setScreeLock:function(dataAction,param,indexPage,err){
293
				execute("setScreeLock",[dataAction,param,indexPage],err);
294
			},screeUnlock:function(screenUnlockType, forgetPageAction, err){
295
				execute("screeUnlock",[screenUnlockType, forgetPageAction],err);
292 296
			}
293 297
		};
294 298
	})();

+ 15 - 0
ipu-server/web/res/js/mobile/mobile-browser.js

@ -203,6 +203,21 @@ define(["browserTool","jcl"],function(browserTool,Wade) {
203 203
		this.selectFirst = function(dbName,table,columns,conds,callback,err){
204 204
			alert("等待实现");
205 205
		};
206
		// 设置手势锁
207
		this.setScreeLock = function(dataAction,param,indexPage,err) {
208
			alert("等待实现");
209
		}
210
		// 解锁
211
		this.screeUnlock = function(screenUnlockType, forgetPageAction, err){
212
			alert("等待实现");
213
		}
214
		// 打开小键盘
215
		this.openKeyboard = function(value,err){
216
			alert("等待实现");
217
		}
218
		this.openNative = function(data,err){
219
			alert("等待实现");
220
		}
206 221
	}
207 222
	
208 223
	return Mobile;

+ 15 - 0
ipu-server/web/res/js/mobile/mobile-client.js

@ -166,6 +166,21 @@ define(["wadeMobile","clientTool"],function(WadeMobile,clientTool) {
166 166
		this.selectFirst = function(dbName,sql,bindArgs,callback,err){
167 167
			WadeMobile.selectFirst(dbName,sql,bindArgs,callback,err);
168 168
		};
169
		// 设置手势锁
170
		this.setScreeLock = function(dataAction,param,indexPage,err) {
171
			WadeMobile.setScreeLock(dataAction,param.toString(),indexPage,err);
172
		}
173
		// 解锁
174
		this.screeUnlock = function(screenUnlockType, forgetPageAction, err){
175
			WadeMobile.screeUnlock(screenUnlockType, forgetPageAction, err);
176
		}
177
		// 打开小键盘
178
		this.openKeyboard = function(value,err){
179
			WadeMobile.openKeyboard(value,err);
180
		}
181
		this.openNative = function(data,err){
182
			WadeMobile.openNative(data.toString(),err);
183
		}
169 184
	};
170 185
	
171 186
	return Mobile;

+ 4 - 2
ipu-server/web/res/js/require-config.js

@ -16,7 +16,7 @@ require.config({
16 16
		'iScroll5' : 'base/iscroll5',
17 17
		'hammer' : 'base/hammer',
18 18
		'o' : 'frame/o',
19
		'oEvent' : 'frame/o-event',
19
		//'oEvent' : 'frame/o-event',
20 20
		'oInput' : 'frame/o-input',
21 21
		'tap' : 'frame/tap',
22 22
		'browserTool' : 'mobile/browser-toolkit',
@ -43,7 +43,9 @@ require.config({
43 43
		'wmProgress' : 'ui/wm-progress',
44 44
		'wmSegment' : 'ui/wm-segment',
45 45
		'wmDialog' : 'ui/wm-dialog',
46
		'wmDropmenu' : 'ui/wm-dropmenu'
46
		'wmDialog2' : 'ui/wm-dialog2',
47
		'wmDropmenu' : 'ui/wm-dropmenu',
48
		'wmRefresh' : 'ui/wm-refresh'
47 49
		
48 50
	},
49 51
	deps: [],

+ 80 - 0
ipu-server/web/res/js/ui/wm-dialog2.js

@ -0,0 +1,80 @@
1
/*引入util对应的js文件*/
2
define(['util'], function(){
3
	var isClose = true;
4
	/*WmNavBar对象定义*/
5
	function WmDialog2(id){
6
		this.listeners = new Array(); //存储监听事件
7
		this.id = id;
8
		/*常用对象*/
9
		this.box = (function(obj){
10
			if(typeof(obj)=="object"){
11
				obj = $(obj);
12
			}else if(typeof(obj)=="string"){
13
				obj = $("#"+obj);
14
			}else{
15
				alert("没有匹配类型");
16
				return null;
17
			}
18
			return obj;
19
		})(id);
20
		this.negativeButton = this.box.find(".s-dialog-cancle");
21
		this.positiveButton = this.box.find(".s-dialog-ok");
22
		this.title = this.box.find('.s-dialog-title');
23
		this.mainView = this.box.find('.s-dialog-mainview');
24
		
25
		var that = this;
26
		this.negativeButton.tap(function(){
27
			that.hide();
28
		});
29
	}
30
	
31
	WmDialog2.prototype.show = function(){
32
		this.box.addClass('s-dialog-show');
33
	}
34
	
35
	WmDialog2.prototype.hide = function(){
36
		this.box.removeClass('s-dialog-show');
37
	}
38
	
39
	WmDialog2.prototype.setPositiveAction = function(action,isHide){
40
		var that = this;
41
		if(this.positiveButton.length != 0){
42
			this.positiveButton.tap(function(){
43
				if(typeof(action) == "function") {
44
					action();
45
				}
46
				if(isHide){
47
					that.hide();
48
				}
49
			});
50
		}
51
	}
52
	
53
	WmDialog2.prototype.setNegativeAction = function(action,isHide){
54
		var that = this;
55
		if(this.negativeButton.length != 0){
56
			this.negativeButton.tap(function(){
57
				if(typeof(action) == "function") {
58
					action();
59
				}
60
				if(isHide){
61
					that.hide();
62
				}
63
			});
64
		}
65
	}
66
	
67
	WmDialog2.prototype.setTitle = function(title){
68
		this.title.text(title);
69
	}
70
	/*设置内容*/
71
	WmDialog2.prototype.setContentView = function(str,setBy) {
72
		if (setBy == "html") {
73
			this.mainView.html($("#" + str).html());
74
		} else {
75
			this.mainView.html("<div>" + str + "</div>");
76
		}
77
	}
78
	
79
	return WmDialog2;
80
});

+ 11 - 1
ipu-server/web/template/common/Head.html

@ -1,4 +1,14 @@
1 1
<script src="res/js/base/require.js"></script>
2 2
<script src="res/js/require-config.js" ></script>
3 3
<script src="biz/js/common/require-config.js" ></script>
4

4
<link rel="stylesheet" type="text/css" href="res/css/base.css"/>
5
	<!--注:由于html页面会被加密,不能使用双斜杠作为注释符号-->
6
	<script language="javascript">
7
	/*自定义增加每个页面需要执行的公共逻辑*/
8
	require(["domReady!","mobile","jcl","tap"],function(doc, Mobile, $) {
9
		/*每个页面的back样式都需要执行回退*/
10
		$(".c_navBar").find(".back").tap(function(){
11
			Mobile.back();
12
		});
13
	}); 
14
</script>

+ 0 - 14
ipu-server/web/template/common/IpuHead.html

@ -1,14 +0,0 @@
1
<script src="res/js/base/require.js"></script>
2
<script src="res/js/require-config.js" ></script>
3
<script src="biz/js/common/require-config.js" ></script>
4
<link rel="stylesheet" type="text/css" href="res/css/base.css"/>
5
	<!--注:由于html页面会被加密,不能使用双斜杠作为注释符号-->
6
	<script language="javascript">
7
	/*自定义增加每个页面需要执行的公共逻辑*/
8
	require(["domReady!","mobile","jcl","tap"],function(doc, Mobile, $) {
9
		/*每个页面的back样式都需要执行回退*/
10
		$(".c_navBar").find(".back").tap(function(){
11
			Mobile.back();
12
		});
13
	}); 
14
</script>

+ 63 - 0
ipu-server/web/template/lua/tag/WmDialog.lua

@ -0,0 +1,63 @@
1
local Class = require("util.Class")
2
local Tag = require("engine.Tag")
3
local WmDialog = Class(Tag)
4

5
function WmDialog:createNew(obj,htmlbuff)
6
  self.htmlbuff=htmlbuff
7
end
8

9
function WmDialog:doStartTag(attr)
10
	if not (attr.id and attr.title) then
11
		monitor:error("WmDialog组件 id、title属性不能为空 ")
12
		return nil
13
	end
14
	self.attr = attr
15
	self.htmlbuff:append('<div class="c_dialog" id="'..attr.id..'">')
16
	self.htmlbuff:append('<div class="wrapper">')
17
	self.htmlbuff:append('<div class="title">')
18
	self.htmlbuff:append('<div class="text">'..attr.title..'</div>')
19
	self.htmlbuff:append('<a href="#nogo" class="close"></a>')
20
	self.htmlbuff:append('</div>')
21
	self.htmlbuff:append('<div class="content">')
22
	if attr.contentText then
23
		self.htmlbuff:append(attr.contentText)
24
	end 
25
end
26

27
function WmDialog:doEndTag()
28
	local attr = self.attr
29
	self.htmlbuff:append('</div>')
30
	self.htmlbuff:append([[
31
		<div class="submit">
32
			<ul>
33
				<li><span class="e_button e_button-cancel">取消</span></li>
34
				<li><span class="e_button e_button-ok" id="btn">确定</span></li>
35
			</ul>
36
		</div>]])
37
	self.htmlbuff:append('</div></div>')
38
	self.htmlbuff:append('')
39

40
	self.htmlbuff:append('<script type="text/javascript">')
41
	self.htmlbuff:append('require(["wmDialog","wmWebUI"],function(WmDialog,WmWebUI) {')
42
	self.htmlbuff:append('var dialog_'..attr.id..' = new WmDialog("'..attr.id..'");')
43
	if attr.contentId then
44
		self.htmlbuff:append(' dialog_'..attr.id..'.setContent("'..attr.contentId..'","html");')
45
	end
46
	if attr.cancelAction then
47
		self.htmlbuff:append(' dialog_'..attr.id..'.cancelAction(function(){ return '..attr.cancelAction..'.apply(window,arguments);});')		
48
	end
49
	if attr.submitAction then
50
		self.htmlbuff:append(' dialog_'..attr.id..'.submitAction(function(){ return '..attr.submitAction..'.apply(window,arguments);});')
51
	end
52
	if attr.hideAction then
53
		self.htmlbuff:append(' dialog_'..attr.id..'.setHideAction(function(){ return '..attr.hideAction..'.apply(window,arguments);});')
54
	end
55
	if attr.showAction then
56
		self.htmlbuff:append(' dialog_'..attr.id..'.setShowAction(function(){ return '..attr.showAction..'.apply(window,arguments);});')
57
	end
58
	self.htmlbuff:append('WmWebUI.store("'..attr.id..'",dialog_'..attr.id..');')
59
	self.htmlbuff:append('})')
60
	self.htmlbuff:append('</script>')
61
end
62

63
return WmDialog

+ 107 - 0
ipu-server/web/template/lua/tag/WmDialog2.lua

@ -0,0 +1,107 @@
1
local Class = require("util.Class")
2
local Tag = require("engine.Tag")
3
local WmDialog2 = Class(Tag)
4

5
function WmDialog2:createNew(obj,htmlbuff)
6
  self.htmlbuff=htmlbuff
7
end
8

9
function WmDialog2:doStartTag(attr)
10
	if not (attr.id and attr.title) then
11
		monitor:error("WmDialog2组件 id、title属性不能为空 ")
12
		return nil
13
	end
14
	
15
	self.attr = attr
16
	self.htmlbuff:append('<div class="s-dialog s-dialog-slip" id="'..attr.id..'">')
17
	self.htmlbuff:append('<div class="s-dialog-content">')
18
	self.htmlbuff:append('<h3 class="s-dialog-title">'..attr.title..'</h3>')
19
	self.htmlbuff:append('<div class="s-dialog-mainview">')
20
	--this is the content area
21
	
22
	
23
end
24

25
function WmDialog2:doEndTag()
26
	local attr = self.attr
27
	
28
	self.htmlbuff:append('</div>')
29
	
30
	self.htmlbuff:append('<div class="s-dialog-buttons">')
31
	
32
	local n_action = nil
33
	local p_action = nil
34
	local p_closeDialg = 'true'
35
	if (not attr.negativeAction) and (not attr.positiveAction) then
36
		self.htmlbuff:append('<button class="s-dialog-cancle">确定</button>')
37
	else
38
		if attr.negativeAction then
39
			local negative = string.split(attr.negativeAction,",")
40
			local n_text = negative[1]
41
			n_action = negative[2]
42
			
43
			if n_text then
44
				self.htmlbuff:append('<button class="s-dialog-cancle">'..n_text..'</button>')
45
			end
46
		end
47
		
48
		if attr.positiveAction then
49
			local positive = string.split(attr.positiveAction,",")
50
			local p_text = positive[1]
51
			p_action = positive[2]
52
			
53
			if positive[3] then
54
				p_closeDialg = positive[3]
55
			end
56
			
57
			if p_text then
58
				self.htmlbuff:append('<button class="s-dialog-ok">'..p_text..'</button>')
59
			end
60
		end
61
		
62
		
63
	end
64
	
65
	self.htmlbuff:append('</div>')	
66
	
67
	self.htmlbuff:append('</div>')
68
	self.htmlbuff:append('</div>')
69
	
70
	
71
	self.htmlbuff:append('<script type="text/javascript">')
72
	self.htmlbuff:append('require(["wmDialog2","wmWebUI"],function(WmDialog2,WmWebUI) {')
73
	self.htmlbuff:append('var dialog_'..attr.id..' = new WmDialog2("'..attr.id..'");')
74
	
75
	if n_action then
76
		self.htmlbuff:append('dialog_'..attr.id..'.setNegativeAction('..n_action..',true);')
77
	end
78
	
79
	if p_action then
80
		self.htmlbuff:append('dialog_'..attr.id..'.setPositiveAction('..p_action..','..p_closeDialg..');')
81
	end
82
	
83
	if attr.contentview then
84
		local contentView = string.split(attr.contentview,",")
85
		local id = contentView[1]
86
		local type = contentView[2]
87
		
88
		self.htmlbuff:append('dialog_'..attr.id..'.setContentView("'..id..'","'..type..'");')
89
	end
90
	
91
	self.htmlbuff:append('WmWebUI.store("'..attr.id..'",dialog_'..attr.id..');')
92
	self.htmlbuff:append('})')
93
	self.htmlbuff:append('</script>')
94
end
95

96
function string.split(str, delimiter)	
97
	if str==nil or str=='' or delimiter==nil then		
98
		return nil	
99
	end	    
100
	local result = {}    
101
	for match in (str..delimiter):gmatch("(.-)"..delimiter) do        
102
		table.insert(result, match)    
103
	end    
104
	return result
105
end
106

107
return WmDialog2

+ 132 - 0
ipu-server/web/template/lua/tag/WmDropmenu.lua

@ -0,0 +1,132 @@
1
local Class = require("util.Class")
2
local Tag = require("engine.Tag")
3
local WmDropmenu = Class(Tag)
4

5
--htmlbuff
6
function WmDropmenu:createNew(obj,htmlbuff)
7
  self.htmlbuff = htmlbuff
8
  self.actions = {}
9
end
10

11
--attr所有属性
12
function WmDropmenu:doStartTag(attr)
13
  --属性初始化
14
  attr.closeAction = attr.closeAction
15
  attr.openAction = attr.oppenAction
16
  self.attr = attr
17
  self.htmlbuff:append('<div id="')
18
  self.htmlbuff:append(attr.id)
19
  self.htmlbuff:append('">','\n')
20
  self.htmlbuff:append([[
21
  	<div class="fn">
22
		<span class="e_button"><span>]])
23
  self.htmlbuff:append(attr.label)
24
  self.htmlbuff:append([[</span><span class="e_ico-unfold"></span></span>
25
	</div>
26
	<div class="c_dropmenu">
27
      	<ul>
28
    ]])
29
end
30

31
function WmDropmenu:doEndTag()
32
  self.htmlbuff:append([[
33
     	</ul>
34
      </div>
35
    </div>
36
  ]])
37
    
38
  self.htmlbuff:append([[
39
<script type="text/javascript">
40
  require(["wmDropmenu"],function(WmDropmenu) {
41
      var wmDropmenu=new WmDropmenu("]])
42
  self.htmlbuff:append(self.attr.id)
43
  self.htmlbuff:append('");','\n')
44
  self.htmlbuff:append([[
45
  	wmDropmenu.create();
46
  ]])
47
  
48
  if self.attr.openAction then
49
  	self.htmlbuff:append([[
50
      wmDropmenu.setOpenAction(function(){
51
    ]])
52
	self.htmlbuff:append(self.attr.openAction,'\n')
53
	self.htmlbuff:append('});','\n')
54
  end
55
  if self.attr.closeAction then
56
  	self.htmlbuff:append([[
57
	  wmDropmenu.setCloseAction(function(){
58
    ]])
59
 	self.htmlbuff:append(self.attr.closeAction,'\n')
60
	self.htmlbuff:append('});','\n')
61
  end
62
 
63
 self.htmlbuff:append('		var items = wmDropmenu.getDropmenuItems();','\n')
64
 for k,v in pairs(self.actions) do
65
    if v~=-1 then
66
      self.htmlbuff:append('items[')
67
      self.htmlbuff:append(k-1)
68
      self.htmlbuff:append('].setAction(function(){')
69
      self.htmlbuff:append(v)
70
      self.htmlbuff:append('});','\n')
71
    end
72
  end
73
  self.htmlbuff:append([[
74
	});
75
	</script>
76
  ]])
77
end
78

79
function WmDropmenu:addActions(action)
80
  table.insert(self.actions, action)
81
end
82

83
return WmDropmenu
84

85
--[[
86
require(["wmDropmenu","util"],function(WmDropmenu) {
87
  var wmDropmenu=new WmDropmenu(dropmenu01);
88
  wmDropmenu.create();
89
  wmDropmenu.setLabel("下拉菜单01");
90
  wmDropmenu.setCloseAction(function(){
91
    console.log("closeAction");
92
  });
93
  wmDropmenu.setOpenAction(function(){
94
    console.log("openAction");
95
    console.log(wmDropmenu.getLabel());
96
  });
97
  var items=wmDropmenu.getItems();
98
  for(var i=0;i<items.length;i++){
99
    console.log("index:"+items[i].getIndex());
100
    console.log("parent:"+items[i].getParent());
101
    items[i].setAction(function(obj){
102
      alert(obj.html());
103
    });
104
  }
105
  console.log("length:"+items.length);
106
  items[2].remove();
107
  console.log("length:"+items.length);
108
  for(var i=0;i<items.length;i++){
109
    //alert(items[i].html());
110
  }
111
  //wmDropmenu.removeAll();
112
  var item1=wmDropmenu.push("111");
113
  item1.setAction(function(obj){
114
    alert("我是新来的1");
115
  });
116
  var item2=wmDropmenu.push("22222");
117
  item2.setAction(function(obj){
118
    alert("我是新来的2");
119
  });
120
  item1.remove();
121
  //wmDropmenu.getItems()[0].remove();
122
  $("#testbtn").setAction(function(){
123
    if(wmDropmenu.Invisible()){
124
      wmDropmenu.show();
125
    }else{
126
      wmDropmenu.hidden();
127
    }
128
  });
129
});
130

131
]]
132


+ 19 - 0
ipu-server/web/template/lua/tag/WmDropmenuItem.lua

@ -0,0 +1,19 @@
1
local Class = require("util.Class")
2
local Tag = require("engine.Tag")
3
local WmDropmenuItem = Class(Tag)
4

5
function WmDropmenuItem:createNew(obj,htmlbuff)
6
  self.htmlbuff = htmlbuff
7
end
8

9
function WmDropmenuItem:doStartTag(attr)
10
  self.parent:addActions(attr.action or -1);
11
  self.htmlbuff:append('<li ontap>')
12
 
13
end
14

15
function WmDropmenuItem:doEndTag()
16
 self.htmlbuff:append('</li>');
17
end
18

19
return WmDropmenuItem

+ 96 - 0
ipu-server/web/template/lua/tag/WmNavBar.lua

@ -0,0 +1,96 @@
1
local Class = require("util.Class")
2
local Tag = require("engine.Tag")
3
local WmNavBar = Class(Tag)
4

5
function WmNavBar:createNew(obj,htmlbuff)
6
  self.htmlbuff=htmlbuff
7
  monitor:debug("------------------------")
8
 -- monitor:debug("htmlbuff length:"..#self.htmlbuff)
9
  self.bottoms = {}
10
end
11

12
function WmNavBar:doStartTag(attr)
13
	self.id = attr.id
14
	self.bottoms = {}
15
	self.htmlbuff:append('<div class="c_navBar" id="'.. self.id ..'">')
16
end
17

18
function WmNavBar:doEndTag()
19
	self.htmlbuff:append('</div>')
20
	self.htmlbuff:append('<script type="text/javascript">')
21
	self.htmlbuff:append('require(["wmNavBar"],function(WmNavBar) {')
22
	self.htmlbuff:append('var navbar_'..self.id..' = new WmNavBar("'..self.id..'");')
23
	local groupCount = 0
24
	for i=1,#self.bottoms do
25
		local attr = self.bottoms[i]
26
		if attr.action and attr.action~="" then
27
			if attr.type == "icon" then
28
				local icons = self.Split(attr.icons, ",");
29
				local actions = self.Split(attr.action, ",");
30
				for i=1,#icons do
31
					if icons[i]~="" then
32
						self:setAction(icons[i],actions[i])
33
					end
34
				end 
35
			elseif attr.type == "tab" then
36
				local actions = self.Split(attr.action, ",");
37
				for i=1,#actions do
38
					self.htmlbuff:append('navbar_'..self.id..'.setTabItemAction('..(i-1)..',function(){ return '..actions[i]..'.apply(window,arguments);});')
39
				end
40
			elseif attr.type == "tabgroup" then
41
				if groupCount==0 then
42
					self.htmlbuff:append('navbar_'..self.id..'.initTabGroup();')
43
				end
44
				local actions = self.Split(attr.action, ",");
45
				for i=1,#actions do
46
					self.htmlbuff:append('navbar_'..self.id..'.setTabGroupItemAction('..groupCount..','..(i-1)..',function(){ return '..actions[i]..'.apply(window,arguments);});')
47
				end
48
				groupCount = groupCount+1
49
			else
50
				self:setAction(attr.type,attr.action)
51
			end
52
		end 
53
	end 
54
	self.htmlbuff:append('WmWebUI.store("'..self.id..'",navbar_'..self.id..');')
55
	self.htmlbuff:append('});')
56
	self.htmlbuff:append('</script>')
57
end
58

59
function WmNavBar:setAction(type,action)
60
	if action and action~="" then
61
		action = 'function(){ return '..action..'.apply(window,arguments);}'
62
		if type == "back" then
63
			self.htmlbuff:append('navbar_'..self.id..'.setBackAction('..action..');')
64
		elseif type == "add"  then
65
			self.htmlbuff:append('navbar_'..self.id..'.setAddAction('..action..');')
66
		elseif type == "delete" then
67
			self.htmlbuff:append('navbar_'..self.id..'.setDelAction('..action..');')
68
		elseif type == "date" then
69
			self.htmlbuff:append('navbar_'..self.id..'.setDateAction('..action..');')
70
		elseif type == "search" then
71
			self.htmlbuff:append('navbar_'..self.id..'.setSearchAction('..action..');')
72
		end
73
	end
74
end
75
function WmNavBar:addBottom(bottom)
76
  table.insert(self.bottoms, bottom)
77
end
78

79
function WmNavBar.Split(szFullString, szSeparator)
80
	local nFindStartIndex = 1
81
	local nSplitIndex = 1
82
	local nSplitArray = {}
83
	while true do
84
		local nFindLastIndex = string.find(szFullString, szSeparator, nFindStartIndex)
85
		if not nFindLastIndex then
86
			nSplitArray[nSplitIndex] = string.sub(szFullString, nFindStartIndex, string.len(szFullString))
87
			break
88
		end
89
		nSplitArray[nSplitIndex] = string.sub(szFullString, nFindStartIndex, nFindLastIndex - 1)
90
		nFindStartIndex = nFindLastIndex + string.len(szSeparator)
91
		nSplitIndex = nSplitIndex + 1
92
	end
93
	return nSplitArray
94
end
95

96
return WmNavBar

+ 84 - 0
ipu-server/web/template/lua/tag/WmNavBarItem.lua

@ -0,0 +1,84 @@
1
local Class = require("util.Class")
2
local Tag = require("engine.Tag")
3
local WmNavBarItem = Class(Tag)
4

5
function WmNavBarItem:createNew(obj,htmlbuff)
6
  self.htmlbuff=htmlbuff
7
end
8

9
function WmNavBarItem:doStartTag(attr)
10
	if attr.type == "back" then
11
		self.htmlbuff:append('<div class="left"><div class="back"><span class="e_ico-back"></span>')
12
		if attr.title then
13
			self.htmlbuff:append('<span class="text">'..attr.title..'</span>')
14
		end
15
		self.htmlbuff:append('</div></div>')
16
	elseif attr.type == "add" or attr.type == "delete" or attr.type == "date" then
17
		if attr.position then
18
			self.htmlbuff:append('<div class="'..attr.position..'">')
19
		else
20
			self.htmlbuff:append('<div class="right">')
21
		end 
22
		self.htmlbuff:append('<button><span class="e_ico-'..attr.type..'"></span>')
23
		if attr.text then
24
			self.htmlbuff:append(attr.text)
25
		end 
26
		self.htmlbuff:append('</button></div>')
27
	elseif attr.type == "title" then
28
		self.htmlbuff:append('<div class="center"><div class="title">'..attr.text..'</div></div>')
29
	elseif attr.type == "icon" then
30
		if attr.position then
31
			self.htmlbuff:append('<div class="'..attr.position..'">')
32
		else
33
			self.htmlbuff:append('<div class="right">')
34
		end
35
		self.htmlbuff:append('<div class="icon">')
36
		local icons = self.parent.Split(attr.icons, ",");
37
		for i=1,#icons do
38
			if icons[i]~="" then
39
				self.htmlbuff:append('<span class="e_ico-'..icons[i]..'"></span>')
40
			end
41
		end 
42
		self.htmlbuff:append('</div></div>')
43
	elseif attr.type == "tab" then
44
		if attr.position then
45
			self.htmlbuff:append('<div class="'..attr.position..'">')
46
		end 
47
		self.htmlbuff:append('<div class="tab"><ul>')
48
		local items = self.parent.Split(attr.items, ",");
49
		for i=1,#items do
50
			if i==1 then
51
				self.htmlbuff:append('<li class="on">'..items[i]..'</li>')
52
			else
53
				if items[i]~="" then
54
					self.htmlbuff:append('<li>'..items[i]..'</li>')
55
				end
56
			end
57
		end 
58
		self.htmlbuff:append('</ul></div>')
59
		if attr.position then
60
			self.htmlbuff:append('</div>')
61
		end 
62
	elseif attr.type == "tabgroup" then
63
		self.htmlbuff:append('<div class="'..attr.position..'">')
64
		self.htmlbuff:append('<div class="buttonList">')
65
		self.htmlbuff:append('<div class="tip">'..attr.text..'<span class="e_ico-unfold"></span></div>')
66
		self.htmlbuff:append('<div class="option" style="display:none;"><ul>')
67
		local items = self.parent.Split(attr.items, ",");
68
		for i=1,#items do
69
			if items[i]~="" then
70
				self.htmlbuff:append('<li>'..items[i]..'</li>')
71
			end
72
		end 
73
		self.htmlbuff:append('</ul></div></div></div>')
74
	end
75
	
76
	self.parent:addBottom(attr)
77
	
78
end
79

80
function WmNavBarItem:doEndTag()
81

82
end
83

84
return WmNavBarItem

+ 55 - 0
ipu-server/web/template/lua/tag/WmProgress.lua

@ -0,0 +1,55 @@
1
local Class = require("util.Class")
2
local Tag = require("engine.Tag")
3
local WmProgress = Class(Tag)
4

5
function WmProgress:createNew(obj,htmlbuff)
6
  self.htmlbuff=htmlbuff
7
end
8

9
function WmProgress:doStartTag(attr)
10

11
	if not (attr.id and attr.progress) then
12
		monitor:error("WmProgress组件 id、progress属性不能为空 ")
13
		return nil
14
	end
15
		
16
	self.htmlbuff:append('<div class="e_progress" id="'..attr.id..'">')
17
	if attr.pastTip then
18
		self.htmlbuff:append([[
19
			<div class="e_progressUse">
20
				<div class="e_progressUseValue"></div>
21
				<div class="e_progressUseTip">]]..attr.pastTip..[[</div>
22
			</div>
23
		]])
24
	end
25
	self.htmlbuff:append('<div class="e_progressBar"><span></span></div>')
26
	if attr.totalTip then
27
		self.htmlbuff:append('<div class="e_progressTotal">'..attr.totalTip..'</div>')
28
	end
29
	if attr.spaceTip then
30
		self.htmlbuff:append([[
31
			<div class="e_progressSurplus">
32
				<div class="e_progressSurplusTip">]]..attr.spaceTip..[[</div>
33
				<div class="e_progressSurplusValue"></div>
34
			</div>
35
		]])
36
	end
37
	self.htmlbuff:append('</div>\n')
38

39
	self.htmlbuff:append('<script type="text/javascript">')
40
	self.htmlbuff:append('require(["wmProgress"],function(WmProgress) {')
41
	self.htmlbuff:append('var progress_'..attr.id..' = new WmProgress("'..attr.id..'");')
42
	self.htmlbuff:append('progress_'..attr.id..'.setProgress("'..attr.progress..'");')
43
	if attr.level then
44
		self.htmlbuff:append('progress_'..attr.id..'.setLevel("'..attr.level..'");')
45
	end
46
	self.htmlbuff:append('WmWebUI.store("'..attr.id..'",progress_'..attr.id..');')
47
	self.htmlbuff:append('})')
48
	self.htmlbuff:append('</script>')
49
end
50

51
function WmProgress:doEndTag()
52

53
end
54

55
return WmProgress

+ 65 - 0
ipu-server/web/template/lua/tag/WmRefresh.lua

@ -0,0 +1,65 @@
1
local Class = require("util.Class")
2
local Tag = require("engine.Tag")
3
local WmRefresh = Class(Tag)
4

5
function WmRefresh:createNew(obj,htmlbuff)
6
  self.htmlbuff=htmlbuff
7
end
8

9
function WmRefresh:doStartTag(attr)
10
	if not (attr.id) then
11
		monitor:error("WmRefresh组件 id属性不能为空 ")
12
		return nil
13
	end
14
	
15
	self.attr = attr
16
	self.htmlbuff:append('<div class="c-refresh-container" id="'..attr.id..'">')
17
	self.htmlbuff:append('<div id="c-refresh-wrapper" style="height:200px;">')
18
	self.htmlbuff:append('<div id="c-refresh-scroller">')
19
	self.htmlbuff:append('<div id="pullDown">')
20
	self.htmlbuff:append('<span class="pullDownIcon"></span><span class="pullDownLabel">下拉刷新...</span>')
21
	self.htmlbuff:append('</div>')
22
	self.htmlbuff:append('<div class="c_list">')
23
	--this is the content area
24
	
25
	
26
end
27

28
function WmRefresh:doEndTag()
29
	local attr = self.attr
30
	
31
	self.htmlbuff:append('</div>')
32
	
33
	self.htmlbuff:append('<div id="pullUp">')
34
	self.htmlbuff:append('<span class="pullUpIcon"></span><span class="pullUpLabel">上拉加载更多...</span>')
35
	self.htmlbuff:append('</div> </div> </div> </div>')
36
	
37
	self.htmlbuff:append('<script type="text/javascript">')
38
	self.htmlbuff:append('require([ "wmRefresh","wmWebUI" ], function(WmRefresh,WmWebUI) {')
39
	self.htmlbuff:append('var refresh_'..attr.id..' = new WmRefresh("'..attr.id..'");')
40
	
41
	if attr.pullDownAction then
42
		self.htmlbuff:append('refresh_'..attr.id..'.setPullDownAction('..attr.pullDownAction..');')
43
	end
44
	
45
	if attr.pullUpAction then
46
		self.htmlbuff:append('refresh_'..attr.id..'.setPullUpAction('..attr.pullUpAction..');')
47
	end
48
	
49
	self.htmlbuff:append('WmWebUI.store("'..attr.id..'",refresh_'..attr.id..');')
50
	self.htmlbuff:append('})')
51
	self.htmlbuff:append('</script>')
52
end
53

54
function string.split(str, delimiter)	
55
	if str==nil or str=='' or delimiter==nil then		
56
		return nil	
57
	end	    
58
	local result = {}    
59
	for match in (str..delimiter):gmatch("(.-)"..delimiter) do        
60
		table.insert(result, match)    
61
	end    
62
	return result
63
end
64

65
return WmRefresh

+ 59 - 0
ipu-server/web/template/lua/tag/WmSegment.lua

@ -0,0 +1,59 @@
1
local Class = require("util.Class")
2
local Tag = require("engine.Tag")
3
local WmSegment = Class(Tag)
4

5
function WmSegment:createNew(obj,htmlbuff)
6
  self.htmlbuff=htmlbuff
7
end
8

9
function WmSegment:doStartTag(attr)
10
	local texts = self.Split(attr.texts, ",")
11
	local values = self.Split(attr.values, ",")
12
	self.htmlbuff:append('<span class="e_segment" id="'..attr.id..'"><span class="e_segmentWrapper">')
13
	for i=1,#texts do
14
		self.htmlbuff:append('<span class="e_segmentLi" segValue="'..values[i]..'">'..texts[i]..'</span>')
15
	end 
16
	self.htmlbuff:append('</span></span>\n')
17
	self.htmlbuff:append('<input type="hidden" id="'..attr.name..'" name="'..attr.name..'" value="" />')
18
	
19
	
20
	self.htmlbuff:append('<script type="text/javascript">\n')
21
	self.htmlbuff:append('require(["wmSegment"],function(WmSegment) {\n')
22
	self.htmlbuff:append('var segment_'..attr.id..' = new WmSegment("'..attr.id..'","'..attr.name..'",false);\n')
23
	if attr.selected then
24
		self.htmlbuff:append('segment_'..attr.id..'.activeItem("'..attr.selected..'");\n')
25
	else
26
		self.htmlbuff:append('segment_'..attr.id..'.activeItemIndex(0);\n')
27
	end 
28
	if attr.action then
29
		self.htmlbuff:append('segment_'..attr.id..'.setAction(function(){ return '..attr.action..'.apply(window,arguments);})\n')
30
	else
31
		self.htmlbuff:append('segment_'..attr.id..'.setAction();\n')
32
	end 
33
	self.htmlbuff:append('WmWebUI.store("'..attr.id..'",segment_'..attr.id..');\n')
34
	self.htmlbuff:append('})\n')
35
	self.htmlbuff:append('</script>')
36
end
37

38
function WmSegment:doEndTag()
39

40
end
41

42
function WmSegment.Split(szFullString, szSeparator)
43
	local nFindStartIndex = 1
44
	local nSplitIndex = 1
45
	local nSplitArray = {}
46
	while true do
47
		local nFindLastIndex = string.find(szFullString, szSeparator, nFindStartIndex)
48
		if not nFindLastIndex then
49
			nSplitArray[nSplitIndex] = string.sub(szFullString, nFindStartIndex, string.len(szFullString))
50
			break
51
		end
52
		nSplitArray[nSplitIndex] = string.sub(szFullString, nFindStartIndex, nFindLastIndex - 1)
53
		nFindStartIndex = nFindLastIndex + string.len(szSeparator)
54
		nSplitIndex = nSplitIndex + 1
55
	end
56
	return nSplitArray
57
end
58

59
return WmSegment

+ 54 - 0
ipu-server/web/template/lua/tag/WmToolTip.lua

@ -0,0 +1,54 @@
1
local Class = require("util.Class")
2
local Tag = require("engine.Tag")
3
local WmToolTip = Class(Tag)
4

5
function WmToolTip:createNew(obj,htmlbuff)
6
  self.htmlbuff=htmlbuff
7
end
8

9

10
function WmToolTip:doStartTag(attr)
11
	self.id = attr.id
12
	local align = ""
13
	if attr.align=="right" then
14
		align = "c_toolTip-arrowRight"
15
	elseif attr.align=="left" then
16
		align = "c_toolTip-arrowLeft"
17
	end
18
	local position = ""
19
	if attr.position=="up" then
20
		position = "c_toolTip-positionBottom"
21
	end
22
	self.htmlbuff:append('<div class="c_toolTip '..align..' '..position..'" id="'.. self.id ..'" >')
23
	self.htmlbuff:append('<div class="pointer"></div>')
24
	self.htmlbuff:append('<div class="content" >')
25
	self.htmlbuff:append('<div class="ico"><span class="e_ico-swipe"></span></div>')
26
	local textAlign = ""
27
	if attr.textAlign == "center" then
28
		textAlign = "e_center"
29
	end
30
	self.htmlbuff:append('<div class="detail '..textAlign..'">'..attr.text..'</div>')
31
	if attr.buttonText then
32
		self.htmlbuff:append('<div class="submit"><span class="e_button">'..attr.buttonText..'</span></div>')
33
	end
34
	self.htmlbuff:append('</div></div>')
35
	self.htmlbuff:append('<script type="text/javascript">')
36
	self.htmlbuff:append('require(["wmToolTip","wmWebUI"],function(WmToolTip,WmWebUI) {')
37
	self.htmlbuff:append('var tooltip_'..self.id..' = new WmToolTip("'..self.id..'");')
38
	if attr.action then
39
		self.htmlbuff:append('tooltip_'..self.id..'.setCloseAction(function(){ return '..attr.action..'.apply(window,arguments);});')
40
	else
41
		self.htmlbuff:append('tooltip_'..self.id..'.setCloseAction();')
42
	end
43
	self.htmlbuff:append('tooltip_'..self.id..'.setBaseElement("'..attr.baseId..'");')
44
	self.htmlbuff:append('tooltip_'..self.id..'.show();')
45
	self.htmlbuff:append('WmWebUI.store("'..attr.id..'",tooltip_'..attr.id..');')
46
	self.htmlbuff:append('})')
47
	self.htmlbuff:append('</script>')
48
end
49

50
function WmToolTip:doEndTag()
51

52
end
53

54
return WmToolTip

+ 0 - 18
ipu-server/web/template/webapp/ipu/VerifyCodeImage.html

@ -1,18 +0,0 @@
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<meta charset="utf-8">
5
<meta name="viewport"
6
	content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
7
<!--1,引入CSS文件 -->
8
{%>template/common/Head.html%}
9
<script type="text/javascript" src="biz/js/VerifyCodeImage.js"></script>
10
<title>验证码图片demo</title>
11
</head>
12
<body>
13
	<div>
14
		<img id="verifyIMG" alt="点击更换验证码"
15
			src="data:image/png;base64, {%VERIFY_IMG%}">
16
	</div>
17
</body>
18
</html>

BIN
wade-mobile-common/libs/wade-mobile-com.jar


BIN
wade-mobile-func/libs/unirest-java-1.3.2-SNAPSHOT-withDependency-ShadedForAndroid.jar


BIN
wade-mobile-func/libs/wade-mobile-com.jar


+ 2 - 2
wade-mobile-func/src/com/wade/mobile/func/MobileKeyboard.java

@ -7,7 +7,7 @@ import android.os.Bundle;
7 7
import android.os.Handler;
8 8

9 9
import com.wade.mobile.common.keyboard.KeyboardConstants;
10
import com.wade.mobile.common.keyboard.keyboardActivity;
10
import com.wade.mobile.common.keyboard.KeyboardActivity;
11 11
import com.wade.mobile.frame.IWadeMobile;
12 12
import com.wade.mobile.frame.plugin.Plugin;
13 13
import com.wade.mobile.util.EscapeUnescape;
@ -25,7 +25,7 @@ public class MobileKeyboard extends Plugin {
25 25
		functionName = param.getString(0);
26 26
		KeyboardConstants.handler = handler;
27 27

28
		Intent intent = new Intent(context, keyboardActivity.class);
28
		Intent intent = new Intent(context, KeyboardActivity.class);
29 29
		startActivityForResult(intent, KEYBORAD);
30 30
	}
31 31


+ 1 - 5
wade-mobile-func/src/com/wade/mobile/func/MobileNetWork.java

@ -201,9 +201,7 @@ public class MobileNetWork extends Plugin {
201 201

202 202
	private String requestBizData(String dataAction, IData param) throws Exception {
203 203
		Map<String,String> postData = transPostData(dataAction, param);
204
		String encode = MobileConfig.getInstance().getEncode();
205
		String dataUrl = HttpTool.toQueryString(postData);
206
		dataUrl = HttpTool.urlEncode(dataUrl, encode);
204
		String dataUrl = HttpTool.toQueryStringWithEncode(postData);
207 205
		String result = HttpTool.httpRequest(MobileConfig.getInstance().getRequestUrl(),
208 206
				dataUrl, Constant.HTTP_POST);
209 207
		if (ServerDataConfig.isEncrypt(dataAction)) {
@ -220,12 +218,10 @@ public class MobileNetWork extends Plugin {
220 218
			MobileSecurity.init(context);
221 219
			/* 参数加密处理 */
222 220
			String key = MobileSecurity.getDesKey();
223
			key = key.replace("+", "-");//将+号全部转换成-号
224 221
			postData.put(Constant.Server.KEY, key);
225 222
			
226 223
			if(dataParam!=null){
227 224
				String encryptData = MobileSecurity.requestEncrypt(dataParam.toString());
228
				encryptData = encryptData.replace("+", "-");
229 225
				postData.put(Constant.Server.DATA, encryptData);
230 226
			}
231 227
		} else {

BIN
wade-mobile-library/common/wade-mobile-server.jar


BIN
wade-mobile-push-yunba/libs/android-support-v4.jar