├── .idea
├── CCN.iml
├── encodings.xml
├── modules.xml
├── scopes
│ └── scope_settings.xml
└── vcs.xml
├── README.md
├── index.html
├── js.md
└── 简历-徐磊.pptx
/.idea/CCN.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/scopes/scope_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | #### CCN测试页面 调用Google API / 高德API
2 |
3 | 可以输入任何形式的文本:
4 | https://xulayen.github.io/CCN/CCN.GPS/Google.Gecoding.html?address=%E4%B8%8A%E6%B5%B7%E6%B5%A6%E4%B8%9C%E6%96%B0%E5%8C%BA
5 | 可以输入经纬度,格式:纬度,经度
6 | https://xulayen.github.io/CCN/CCN.GPS/Google.Gecoding.html?address=30.335165%2C112.239741
7 |
8 | #### Angular.Page
9 | https://xulayen.github.io/CCN/CCN.Agnualr.Page/app/views/index.html
10 |
11 | #### 优家会手机版
12 | https://xulayen.github.io/CCN/CCN.YJH.Wap/App/front/login.html
13 |
14 | #### 优家会PC版
15 | https://xulayen.github.io/CCN/CCN.YJH.Web/App/front/login.html
16 |
17 | #### 消费者忠诚度项目
18 | https://xulayen.github.io/CCN/CCN.MJN.Loyalty/App/front/gatherPage/index.html#/activity
19 |
20 | #### 老虎机摇奖
21 | https://xulayen.github.io/CCN/CCN.TiggerLottery/index.html
22 |
23 | #### 微信插件
24 | [WeChat](https://github.com/xulayen/WeChat)
25 |
26 | #### 花瓣下落背景
27 | https://xulayen.github.io/CCN/CCN.Flower.SlowDown/flower.html
28 |
29 | #### GitHub名片
30 | https://github.com/xulayen/github-widget-user
31 |
32 | #### 图片放大镜
33 | https://xulayen.github.io/CCN/CCN.Magnifier/index.html
34 |
35 | #### 选中变大
36 | https://xulayen.github.io/CCN/CCN.ZQJ.Demo/scale.html
37 |
38 | #### R5E
39 | https://xulayen.github.io/CCN/CCN.R5E/app/front/verify.html
40 |
41 | #### 美赞臣追溯1
42 | https://xulayen.github.io/CCN/CCN.MJN.ZS.S/app/front/Trace/zs.html
43 |
44 | #### 美赞臣追溯2
45 | https://xulayen.github.io/CCN/CCN.MJN.ZS.C/app/front/zs.html
46 |
47 | #### 泳鑫牛肉
48 | https://xulayen.github.io/CCN/CCN.YX/app/front/homePage.html
49 |
50 | #### 美光
51 | https://xulayen.github.io/CCN/CCN.MG/app/front/防伪查询.html
52 |
53 | #### 超凡喜力线上
54 | https://xulayen.github.io/CCN/CCN.CFXL/app/front/homepage_on.html
55 |
56 | #### 超凡喜力线下
57 | https://xulayen.github.io/CCN/CCN.CFXL/app/store/homepage.html
58 |
59 | #### 加油站
60 | https://xulayen.github.io/CCN/CCN.JYZ/app/store/homepage.html
61 |
62 | #### 曼牌
63 | https://xulayen.github.io/CCN/CCN.MP/app/front/homePage.html
64 |
65 | #### 蓝河
66 | https://xulayen.github.io/CCN/CCN.LH/app/front/ygyx.html
67 |
68 | #### 易到
69 | https://xulayen.github.io/CCN/CCN.YD/app/front/login.html
70 |
71 | #### 通行证
72 | https://xulayen.github.io/CCN/CCN.TXZ/app/front/homeOnline.html
73 |
74 | https://xulayen.github.io/CCN/CCN.TXZ/app/store/login.html
75 |
76 | #### 小松中国
77 | https://xulayen.github.io/CCN/CCN.XSChina/app/front/index.html
78 |
79 | #### 百适通
80 | https://xulayen.github.io/CCN/CCN.BST/app/front/index.html
81 |
82 | #### 防伪
83 | https://xulayen.github.io/CCN/CCN.Global.AC/app/front/index.html
84 |
85 | #### 马石油
86 | https://xulayen.github.io/CCN/CCN.MSY/app/front/index.html
87 |
88 | #### 中商数据大屏幕
89 | https://xulayen.github.io/CCN/CCN.Data/index.html
90 |
91 | #### 无锡君帆
92 | https://xulayen.github.io/CCN/CCN.Wxjf/app/front/menu.html
93 |
94 | #### 小罐茶
95 | https://xulayen.github.io/CCN/CCN.XGC/app/front/index.html
96 |
97 | #### 柳工
98 | https://xulayen.github.io/CCN/CCN.LG/app/front/index.html
99 |
100 | #### 小龙王圣诞
101 | https://xulayen.github.io/CCN/CCN.XLWSD/app/front/index.html
102 |
103 | #### 小龙王折线
104 | https://xulayen.github.io/CCN/CCN.XLWZX/index.html
105 |
106 | #### 趣自驾
107 | https://xulayen.github.io/CCN/CCN.QZJ/index.html
108 |
109 | #### 小龙王实物
110 | https://xulayen.github.io/CCN/CCN.XLWSW/index.html
111 |
112 | #### 小龙王热点图
113 | https://xulayen.github.io/CCN/CCN.XLWMAP/index.html
114 |
115 | #### 高峰论坛
116 | https://xulayen.github.io/CCN/CCN.GFLT/app/front/index.html
117 |
118 | #### 喜力
119 | https://xulayen.github.io/CCN/CCN.XL/app/front/register.html
120 |
121 | #### 用码
122 | https://xulayen.github.io/CCN/CCN.YM/app/front/index.html
123 |
124 |
125 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | github user widget
6 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/js.md:
--------------------------------------------------------------------------------
1 | # 以下是常用的代码收集,没有任何技术含量
2 |
3 |
4 | 1、金额大写转换函数
5 |
6 | ```js
7 |
8 | //格式转换
9 | function transform(tranvalue) {
10 | try {
11 | var i = 1;
12 | var dw2 = new Array("", "万", "亿"); //大单位
13 | var dw1 = new Array("拾", "佰", "仟"); //小单位
14 | var dw = new Array("零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"); //整数部分用
15 | //以下是小写转换成大写显示在合计大写的文本框中
16 | //分离整数与小数
17 | var source = splits(tranvalue);
18 | var num = source[0];
19 | var dig = source[1];
20 | //转换整数部分
21 | var k1 = 0; //计小单位
22 | var k2 = 0; //计大单位
23 | var sum = 0;
24 | var str = "";
25 | var len = source[0].length; //整数的长度
26 | for (i = 1; i <= len; i++) {
27 | var n = source[0].charAt(len - i); //取得某个位数上的数字
28 | var bn = 0;
29 | if (len - i - 1 >= 0) {
30 | bn = source[0].charAt(len - i - 1); //取得某个位数前一位上的数字
31 | }
32 | sum = sum + Number(n);
33 | if (sum != 0) {
34 | str = dw[Number(n)].concat(str); //取得该数字对应的大写数字,并插入到str字符串的前面
35 | if (n == '0') sum = 0;
36 | }
37 | if (len - i - 1 >= 0) { //在数字范围内
38 | if (k1 != 3) { //加小单位
39 | if (bn != 0) {
40 | str = dw1[k1].concat(str);
41 | }
42 | k1++;
43 | } else { //不加小单位,加大单位
44 | k1 = 0;
45 | var temp = str.charAt(0);
46 | if (temp == "万" || temp == "亿") //若大单位前没有数字则舍去大单位
47 | str = str.substr(1, str.length - 1);
48 | str = dw2[k2].concat(str);
49 | sum = 0;
50 | }
51 | }
52 | if (k1 == 3){ //小单位到千则大单位进一
53 | k2++;
54 | }
55 | }
56 | //转换小数部分
57 | var strdig = "";
58 | if (dig != "") {
59 | var n = dig.charAt(0);
60 | if (n != 0) {
61 | strdig += dw[Number(n)] + "角"; //加数字
62 | }
63 | var n = dig.charAt(1);
64 | if (n != 0) {
65 | strdig += dw[Number(n)] + "分"; //加数字
66 | }
67 | }
68 | str += "元" + strdig;
69 | } catch(e) {
70 | return "0元";
71 | }
72 | return str;
73 | }
74 | //拆分整数与小数
75 | function splits(tranvalue) {
76 | var value = new Array('', '');
77 | temp = tranvalue.split(".");
78 | for (var i = 0; i < temp.length; i++) {
79 | value = temp;
80 | }
81 | return value;
82 | }
83 |
84 | ```
85 |
86 | 2、数组去重
87 |
88 | ```js
89 |
90 | String.prototype.unique=function(){
91 | var x=this.split(/[\r\n]+/);
92 | var y='';
93 | for(var i=0;i 100) ? 'block': "none"
124 | }
125 | };
126 | backTop('goTop');
127 |
128 | ```
129 |
130 | 3、日期格式化
131 |
132 | ```js
133 |
134 | Date.prototype.format = function(format){
135 | var o = {
136 | "M+" : this.getMonth()+1, //month
137 | "d+" : this.getDate(), //day
138 | "h+" : this.getHours(), //hour
139 | "m+" : this.getMinutes(), //minute
140 | "s+" : this.getSeconds(), //second
141 | "q+" : Math.floor((this.getMonth()+3)/3), //quarter
142 | "S" : this.getMilliseconds() //millisecond
143 | };
144 | if(/(y+)/.test(format)) format=format.replace(RegExp.$1,
145 | (this.getFullYear()+"").substr(4 - RegExp.$1.length));
146 | for(var k in o){
147 | if(new RegExp("("+ k +")").test(format))
148 | format = format.replace(RegExp.$1,RegExp.$1.length==1 ? o[k] :("00"+ o[k]).substr((""+ o[k]).length));
149 | }
150 | return format;
151 | }
152 | //调用
153 | //new Date().format("yyyy-MM-dd hh:mm:ss");
154 |
155 | //类似
156 | Date.prototype.Format = function(formatStr) {
157 | var str = formatStr;
158 | var Week = ['日', '一', '二', '三', '四', '五', '六'];
159 | str = str.replace(/yyyy|YYYY/, this.getFullYear());
160 | str = str.replace(/yy|YY/, (this.getYear() % 100) > 9 ? (this.getYear() % 100).toString() : '0' + (this.getYear() % 100));
161 | str = str.replace(/MM/, (this.getMonth() + 1) > 9 ? (this.getMonth() + 1).toString() : '0' + (this.getMonth() + 1));
162 | str = str.replace(/M/g, (this.getMonth() + 1));
163 | str = str.replace(/w|W/g, Week[this.getDay()]);
164 | str = str.replace(/dd|DD/, this.getDate() > 9 ? this.getDate().toString() : '0' + this.getDate());
165 | str = str.replace(/d|D/g, this.getDate());
166 | str = str.replace(/hh|HH/, this.getHours() > 9 ? this.getHours().toString() : '0' + this.getHours());
167 | str = str.replace(/h|H/g, this.getHours());
168 | str = str.replace(/mm/, this.getMinutes() > 9 ? this.getMinutes().toString() : '0' + this.getMinutes());
169 | str = str.replace(/m/g, this.getMinutes());
170 | str = str.replace(/ss|SS/, this.getSeconds() > 9 ? this.getSeconds().toString() : '0' + this.getSeconds());
171 | str = str.replace(/s|S/g, this.getSeconds());
172 | return str
173 | }
174 |
175 |
176 | ```
177 |
178 | 4、动态加载脚本
179 |
180 | ```js
181 |
182 | function appendscript(src, text, reload, charset) {
183 | var id = hash(src + text);
184 | if(!reload && in_array(id, evalscripts)) return;
185 | if(reload && $(id)) {
186 | $(id).parentNode.removeChild($(id));
187 | }
188 |
189 | evalscripts.push(id);
190 | var scriptNode = document.createElement("script");
191 | scriptNode.type = "text/javascript";
192 | scriptNode.id = id;
193 | scriptNode.charset = charset ? charset : (BROWSER.firefox ? document.characterSet : document.charset);
194 | try {
195 | if(src) {
196 | scriptNode.src = src;
197 | scriptNode.onloadDone = false;
198 | scriptNode.onload = function () {
199 | scriptNode.onloadDone = true;
200 | JSLOADED[src] = 1;
201 | };
202 | scriptNode.onreadystatechange = function () {
203 | if((scriptNode.readyState == 'loaded' || scriptNode.readyState == 'complete') && !scriptNode.onloadDone) {
204 | scriptNode.onloadDone = true;
205 | JSLOADED[src] = 1;
206 | }
207 | };
208 | } else if(text){
209 | scriptNode.text = text;
210 | }
211 | document.getElementsByTagName('head')[0].appendChild(scriptNode);
212 | } catch(e) {}
213 | }
214 |
215 | ```
216 |
217 | 5、返回脚本内容
218 |
219 | ```js
220 |
221 | function evalscript(s) {
222 | if(s.indexOf('