Commit 1f429d3f11179055c4b1b97cf7f459446913de6b

Authored by yvan.ni
1 parent bbae3170

啦一下

pages/giftpack/giftpacklist/giftpacklist.js
... ... @@ -957,9 +957,6 @@ Page({
957 957 var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" +
958 958 os.stoid + "?sceneValue=" + scene + "&pageValue=pages/giftpack/giftpacklist/giftpacklist";
959 959  
960   - console.log("11111");
961   - console.log(path3);
962   -
963 960 // 读取文件成功则OK--
964 961 wx.getImageInfo({
965 962 src: path3,
... ... @@ -982,9 +979,6 @@ Page({
982 979 canvasId: 'share',
983 980 success: function (res) {
984 981  
985   -
986   - console.log(res.tempFilePath)
987   -
988 982 that.setData({
989 983 shareImgPath: res.tempFilePath,
990 984 canvasHidden: true
... ...
utils/common.js
... ... @@ -13,7 +13,6 @@ module.exports = {
13 13 app: function() {
14 14 return getApp();
15 15 },
16   -
17 16 //------------获取全路径的图片地址-----------
18 17 getFullUrl: function(e) {
19 18 if(e==undefined || e=="") return "";
... ... @@ -21,11 +20,7 @@ module.exports = {
21 20 e=this.app().globalData.setting.imghost + e;
22 21 return e;
23 22 },
24   - getConfigByName: function(e, t, r) {
25   - for (var a = 0; a < e.length; a++) if (e[a].name === t && (void 0 === r || void 0 !== r && e[a].inc_type === r)) return e[a].value;
26   - return console.warn(t), console.warn(e), null;
27   - },
28   -
  23 +
29 24 //--------跳转到支付页面--------
30 25 jumpToCart4: function(e, r) {
31 26 var a = {
... ... @@ -43,9 +38,6 @@ module.exports = {
43 38 url: n
44 39 });
45 40 },
46   - getCapache: function() {
47   - return this.app().request.modifyUrl("/api/user/verify?is_image=1&t=" + Date.parse(new Date()));
48   - },
49 41 wxParseAddFullImageUrl: function(t, r) {
50 42 if (void 0 !== t.data[r].images) {
51 43 for (var a = t.data[r], n = 0; n < a.images.length; n++) a.images[n].attr.src = this.getFullUrl(a.images[n].attr.src),
... ... @@ -53,35 +45,6 @@ module.exports = {
53 45 console.log(a), t.setData(e({}, r, a));
54 46 }
55 47 },
56   - sendSmsCode: function(e, t, r) {
57   - a = this;
58   - if (!e) return a.app().showWarning("手机号码不能为空");
59   - void 0 !== t && null !== t || (t = 6);
60   - var a = this;
61   - this.app().request.post("/home/api/send_validate_code", {
62   - data: {
63   - mobile: e,
64   - scene: t,
65   - type: "mobile"
66   - },
67   - success: function(e) {
68   - "function" == typeof r && r(), a.app().confirmBox(e.data.msg);
69   - }
70   - });
71   - },
72   - sendBindSmsCode: function(e, t) {
73   - r = this;
74   - if (!e) return r.app().showWarning("手机号码不能为空");
75   - var r = this;
76   - this.app().request.post("/home/api/send_validate_code", {
77   - data: {
78   - mobile: e,
79   - scene: "1",
80   - type: "user_reg"
81   - },
82   - success: function(e) {
83   - "function" == typeof t && t(), r.app().confirmBox(e.data.msg);
84   - }
85   - });
86   - }
  48 +
  49 +
87 50 };
88 51 \ No newline at end of file
... ...
utils/phpSerializer.js deleted
1   -// {{{ HTML_AJAX_Serialize_PHP
2   -/**
3   - * PHP serializer
4   - *
5   - * This class can be used to serialize and unserialize data in a
6   - * format compatible with PHP's native serialization functions.
7   - *
8   - * @version 0.0.3
9   - * @copyright 2005 Arpad Ray <arpad@php.net>
10   - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
11   - *
12   - * See Main.js for Author/license details
13   - */
14   -
15   -function utf16to8(str) {
16   - var out, i, len, c;
17   -
18   - out = "";
19   - len = str.length;
20   - for (i = 0; i < len; i++) {
21   - c = str.charCodeAt(i);
22   - if ((c >= 0x0001) && (c <= 0x007F)) {
23   - out += str.charAt(i);
24   - } else if (c > 0x07FF) {
25   - out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
26   - out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));
27   - out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
28   - } else {
29   - out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));
30   - out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
31   - }
32   - }
33   - return out;
34   -}
35   -
36   -function utf8to16(str) {
37   - var out, i, len, c;
38   - var char2, char3;
39   -
40   - out = "";
41   - len = str.length;
42   - i = 0;
43   - while (i < len) {
44   - c = str.charCodeAt(i++);
45   - switch (c >> 4) {
46   - case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7:
47   - // 0xxxxxxx
48   - out += str.charAt(i - 1);
49   - break;
50   - case 12: case 13:
51   - // 110x xxxx 10xx xxxx
52   - char2 = str.charCodeAt(i++);
53   - out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F));
54   - break;
55   - case 14:
56   - // 1110 xxxx 10xx xxxx 10xx xxxx
57   - char2 = str.charCodeAt(i++);
58   - char3 = str.charCodeAt(i++);
59   - out += String.fromCharCode(((c & 0x0F) << 12) |
60   - ((char2 & 0x3F) << 6) |
61   - ((char3 & 0x3F) << 0));
62   - break;
63   - }
64   - }
65   - return out;
66   -}
67   -
68   -
69   -function HTML_AJAX_Serialize_PHP() {}
70   -HTML_AJAX_Serialize_PHP.prototype = {
71   - error: false,
72   - message: "",
73   - cont: "",
74   - defaultEncoding: 'UTF-8',
75   - contentType: 'application/php-serialized; charset: UTF-8',
76   - // {{{ serialize
77   - /**
78   - * Serializes a variable
79   - *
80   - * @param mixed inp the variable to serialize
81   - * @return string a string representation of the input,
82   - * which can be reconstructed by unserialize()
83   - * @author Arpad Ray <arpad@rajeczy.com>
84   - * @author David Coallier <davidc@php.net>
85   - */
86   - serialize: function(inp) {
87   - var type = HTML_AJAX_Util.getType(inp);
88   - var val;
89   - switch (type) {
90   - case "undefined":
91   - val = "N";
92   - break;
93   - case "boolean":
94   - val = "b:" + (inp ? "1" : "0");
95   - break;
96   - case "number":
97   - val = (Math.round(inp) == inp ? "i" : "d") + ":" + inp;
98   - break;
99   - case "string":
100   - val = "s:" + inp.length + ":\"" + inp + "\"";
101   - break;
102   - case "array":
103   - val = "a";
104   - case "object":
105   - if (type == "object") {
106   - var objname = inp.constructor.toString().match(/(\w+)\(\)/);
107   - if (objname == undefined) {
108   - return;
109   - }
110   - objname[1] = this.serialize(objname[1]);
111   - val = "O" + objname[1].substring(1, objname[1].length - 1);
112   - }
113   - var count = 0;
114   - var vals = "";
115   - var okey;
116   - for (key in inp) {
117   - okey = (key.match(/^[0-9]+$/) ? parseInt(key) : key);
118   - vals += this.serialize(okey) +
119   - this.serialize(inp[key]);
120   - count++;
121   - }
122   - val += ":" + count + ":{" + vals + "}";
123   - break;
124   - }
125   - if (type != "object" && type != "array") val += ";";
126   - return val;
127   - },
128   - // }}}
129   - // {{{ unserialize
130   - /**
131   - * Reconstructs a serialized variable
132   - *
133   - * @param string inp the string to reconstruct
134   - * @return mixed the variable represented by the input string, or void on failure
135   - */
136   - unserialize: function(inp) {
137   - this.error = 0;
138   - if (inp == "" || inp.length < 2) {
139   - this.raiseError("input is too short");
140   - return;
141   - }
142   - var val, kret, vret, cval;
143   - var type = inp.charAt(0);
144   - var cont = inp.substring(2);
145   - var size = 0, divpos = 0, endcont = 0, rest = "", next = "";
146   -
147   - switch (type) {
148   - case "N": // null
149   - if (inp.charAt(1) != ";") {
150   - this.raiseError("missing ; for null", cont);
151   - }
152   - // leave val undefined
153   - rest = cont;
154   - break;
155   - case "b": // boolean
156   - if (!/[01];/.test(cont.substring(0,2))) {
157   - this.raiseError("value not 0 or 1, or missing ; for boolean", cont);
158   - }
159   - val = (cont.charAt(0) == "1");
160   - rest = cont.substring(1);
161   - break;
162   - case "s": // string
163   - val = "";
164   - divpos = cont.indexOf(":");
165   - if (divpos == -1) {
166   - this.raiseError("missing : for string", cont);
167   - break;
168   - }
169   - size = parseInt(cont.substring(0, divpos));
170   - if (size == 0) {
171   - if (cont.length - divpos < 4) {
172   - this.raiseError("string is too short", cont);
173   - break;
174   - }
175   - rest = cont.substring(divpos + 4);
176   - break;
177   - }
178   - if ((cont.length - divpos - size) < 4) {
179   - this.raiseError("string is too short", cont);
180   - break;
181   - }
182   - if (cont.substring(divpos + 2 + size, divpos + 4 + size) != "\";") {
183   - this.raiseError("string is too long, or missing \";", cont);
184   - }
185   - val = cont.substring(divpos + 2, divpos + 2 + size);
186   - rest = cont.substring(divpos + 4 + size);
187   - break;
188   - case "i": // integer
189   - case "d": // float
190   - var dotfound = 0;
191   - for (var i = 0; i < cont.length; i++) {
192   - cval = cont.charAt(i);
193   - if (isNaN(parseInt(cval)) && !(type == "d" && cval == "." && !dotfound++)) {
194   - endcont = i;
195   - break;
196   - }
197   - }
198   - if (!endcont || cont.charAt(endcont) != ";") {
199   - this.raiseError("missing or invalid value, or missing ; for int/float", cont);
200   - }
201   - val = cont.substring(0, endcont);
202   - val = (type == "i" ? parseInt(val) : parseFloat(val));
203   - rest = cont.substring(endcont + 1);
204   - break;
205   - case "a": // array
206   - if (cont.length < 4) {
207   - this.raiseError("array is too short", cont);
208   - return;
209   - }
210   - divpos = cont.indexOf(":", 1);
211   - if (divpos == -1) {
212   - this.raiseError("missing : for array", cont);
213   - return;
214   - }
215   - size = parseInt(cont.substring(0, divpos));
216   - cont = cont.substring(divpos + 2);
217   - val = new Array();
218   - if (cont.length < 1) {
219   - this.raiseError("array is too short", cont);
220   - return;
221   - }
222   - for (var i = 0; i < size; i++) {
223   - kret = this.unserialize(cont, 1);
224   - if (this.error || kret[0] == undefined || kret[1] == "") {
225   - this.raiseError("missing or invalid key, or missing value for array", cont);
226   - return;
227   - }
228   - vret = this.unserialize(kret[1], 1);
229   - if (this.error) {
230   - this.raiseError("invalid value for array", cont);
231   - return;
232   - }
233   - val[kret[0]] = vret[0];
234   - cont = vret[1];
235   - }
236   - if (cont.charAt(0) != "}") {
237   - this.raiseError("missing ending }, or too many values for array", cont);
238   - return;
239   - }
240   - rest = cont.substring(1);
241   - break;
242   - case "O": // object
243   - divpos = cont.indexOf(":");
244   - if (divpos == -1) {
245   - this.raiseError("missing : for object", cont);
246   - return;
247   - }
248   - size = parseInt(cont.substring(0, divpos));
249   - var objname = cont.substring(divpos + 2, divpos + 2 + size);
250   - if (cont.substring(divpos + 2 + size, divpos + 4 + size) != "\":") {
251   - this.raiseError("object name is too long, or missing \":", cont);
252   - return;
253   - }
254   - var objprops = this.unserialize("a:" + cont.substring(divpos + 4 + size), 1);
255   - if (this.error) {
256   - this.raiseError("invalid object properties", cont);
257   - return;
258   - }
259   - rest = objprops[1];
260   - var objout = "function " + objname + "(){";
261   - for (key in objprops[0]) {
262   - objout += "this." + key + "=objprops[0]['" + key + "'];";
263   - }
264   - objout += "}val=new " + objname + "();";
265   - eval(objout);
266   - break;
267   - default:
268   - this.raiseError("invalid input type", cont);
269   - }
270   - return (arguments.length == 1 ? val : [val, rest]);
271   - },
272   - // }}}
273   - // {{{ getError
274   - /**
275   - * Gets the last error message
276   - *
277   - * @return string the last error message from unserialize()
278   - */
279   - getError: function() {
280   - return this.message + "\n" + this.cont;
281   - },
282   - // }}}
283   - // {{{ raiseError
284   - /**
285   - * Raises an eror (called by unserialize().)
286   - *
287   - * @param string message the error message
288   - * @param string cont the remaining unserialized content
289   - */
290   - raiseError: function(message, cont) {
291   - this.error = 1;
292   - this.message = message;
293   - this.cont = cont;
294   - }
295   - // }}}
296   -}
297   -// }}}
298   -
utils/weapp-icon.wxss
... ... @@ -6,21 +6,9 @@
6 6 background-position: center;
7 7 background-size: 100%;
8 8 }
9   -
10   -
11   -
12 9 .t-icon-gowudai {
13 10 background: url(data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3Csvg%20version%3D%221.1%22%20width%3D%27100%25%27%20height%3D%27100%25%27%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20id%3D%22t-icon-gowudai%22%20viewBox%3D%220%200%201024%201024%22%3E%3Cpath%20d%3D%22M150.72-1.06666667l-5.86666667%20169.49333334%20738.13333334%2016.53333333L870.4-1.06666667z%22%20fill%3D%22%23cdcdcd%22%20%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M150.72-1.06666667l72.64%2049.38666667-78.50666667%20106.56z%22%20fill%3D%22%23A2A2A2%22%20%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M120.64%201025.70666667L69.33333333%20969.49333333h884.37333334l-54.29333334%2056.21333334z%22%20fill%3D%22%23bfbfbf%22%20%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M223.36%2047.36l-20.37333333%20113.38666667-103.57333334-8.74666667z%22%20fill%3D%22%23AEADAD%22%20%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M870.4-1.06666667l-71.68%2049.38666667%2084.26666667%20108.48z%22%20fill%3D%22%23A2A2A2%22%20%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M798.72%2048.32l20.37333333%20112.42666667%20105.49333334-8.74666667z%22%20fill%3D%22%23AEADAD%22%20%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M99.41333333%20152h825.17333334L954.66666667%20969.49333333H69.33333333z%22%20fill%3D%22%23dbdbdb%22%20%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M718.82666667%20256.10666667H770.13333333v255.68c0%20141.22666667-114.45333333%20255.68-255.68%20255.68S258.66666667%20653.01333333%20258.66666667%20511.78666667V256.10666667h51.30666666v255.68c0%20112.85333333%2091.52%20204.37333333%20204.37333334%20204.37333333s204.37333333-91.52%20204.37333333-204.37333333V256.10666667z%22%20fill%3D%22%23A5A5A5%22%20%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M718.82666667%20312.32H770.13333333v149.12c0%20141.22666667-114.45333333%20255.68-255.68%20255.68S258.66666667%20602.66666667%20258.66666667%20461.44V312.32h51.30666666v149.12c0%20112.85333333%2091.52%20204.37333333%20204.37333334%20204.37333333s204.37333333-91.52%20204.37333333-204.37333333V312.32z%22%20fill%3D%22%23FFFFFF%22%20%3E%3C%2Fpath%3E%3C%2Fsvg%3E);
14 11 }
15   -
16   -/* .t-icon-liwu {
17   - background: url(data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3Csvg%20version%3D%221.1%22%20width%3D%27100%25%27%20height%3D%27100%25%27%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20id%3D%22t-icon-liwu%22%20viewBox%3D%220%200%201024%201024%22%3E%3Cpath%20d%3D%22M85.93%20950.016c0%2024.576%207.126%2031.317%2029.44%2031.317h353.366V511.744H85.931v438.272z%20m469.334%2031.317h353.365c22.358%200%2029.44-6.698%2029.44-31.317V511.744H555.221v469.59zM938.667%20256H725.333c51.499-11.733%20105.899-49.707%20112.598-94.293%207.85-50.859-52.566-127.958-125.654-118.187-87.424%2012.117-151.509%2089.259-196.736%20149.077C470.656%20133.931%20412.16%2065.408%20328.363%2045.483c-81.152-19.2-136.747%2064.938-135.254%20116.992%201.451%2044.245%2052.608%2081.834%20105.558%2093.525H85.333c-26.368%200-42.666%2014.848-42.666%2042.667v170.581l426.666%200.085V256h85.334v213.333l426.666-0.085V298.667c0-27.819-16.341-42.667-42.666-42.667z%20m-687.019-77.824c-14.763-16.427-4.779-38.741%204.48-55.595%2017.024-29.696%2040.747-47.744%2081.152-30.933%2056.32%2023.51%2097.792%2073.216%20131.584%20117.803-71.552%207.893-178.304%2010.965-217.216-31.275z%20m311.296%2030.507c34.816-44.63%2075.221-89.942%20131.157-117.803%2058.582-28.97%20113.024%2049.323%2085.206%2086.912-21.419%2028.544-89.259%2031.232-125.91%2032.853-30.08%201.536-60.501%200.811-90.453-1.962z%22%20fill%3D%22%22%20%3E%3C%2Fpath%3E%3C%2Fsvg%3E);
18   -}
19   -
20   -.t-icon-echarts {
21   - background: url(data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3Csvg%20version%3D%221.1%22%20width%3D%27100%25%27%20height%3D%27100%25%27%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20id%3D%22t-icon-echarts%22%20viewBox%3D%220%200%201024%201024%22%3E%3Cpath%20d%3D%22M436.59925293%20533.33333333c0-65.04312613%2035.34952507-123.72333775%2088.37381267-153.41693881l-206.44122641-353.49525068c-282.79620057%20159.07286282-376.82593725%20518.22403753-217.75307443%20801.02023808l359.15117471-206.44122642c-11.31184801-22.62369604-23.33068654-52.31729711-23.33068654-87.66682217z%22%20fill%3D%22%23DADADA%22%20%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M613.34687829%20356.58570799c65.04312613%200%20123.72333775%2035.34952507%20153.41693879%2088.37381266l253.1025995-147.05402428C890.48715482%2073.78950741%20602.03503025-2.56546674%20377.91904132%20126.81379502l147.05402428%20253.1025995c24.03767705-11.31184801%2059.38720211-23.33068654%2088.37381269-23.33068653z%22%20fill%3D%22%23EBEBEB%22%20%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M701.72069095%20686.75027214c-23.33068654%2017.67476253-58.68021163%2023.33068654-88.37381266%2023.33068653-65.04312613%200-123.72333775-35.34952507-153.41693882-88.37381266L201.17141596%20775.12408481c41.00544908%2070.69905013%20100.3926512%20129.37926176%20171.09170135%20171.09170134%20153.41693881%2088.37381268%20335.82048816%2082.71788866%20477.21858844-5.65592402l-147.7610148-253.80958999z%22%20fill%3D%22%23B8B8B8%22%20%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M920.18075589%20356.58570799L766.76381708%20444.95952065c12.01883853%2029.69360106%2023.33068654%2058.68021163%2023.33068654%2088.37381268%200%2065.04312613-35.34952507%20123.72333775-88.37381267%20153.41693881l88.37381267%20153.41693881c171.09170134-100.3926512%20229.77191295-312.48980161%20130.08625227-483.58150296z%22%20fill%3D%22%23C7C7C7%22%20%3E%3C%2Fpath%3E%3C%2Fsvg%3E);
22   -} */
23   -
24 12 .t-icon-sort-up {
25 13 background: url(data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3Csvg%20version%3D%221.1%22%20width%3D%27100%25%27%20height%3D%27100%25%27%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20id%3D%22t-icon-sort-up%22%20viewBox%3D%220%200%201024%201024%22%3E%3Cpath%20d%3D%22M-109.37837037-109.37837037h1242.75674074v1242.75674074H-109.37837037z%22%20fill%3D%22%23FFFFFF%22%20fill-opacity%3D%220%22%20%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M242.7360391%20615.56306132h538.5279218a20.71261275%2020.71261275%200%200%201%2016.57008947%2033.14018016l-269.2639609%20359.05313542a20.71261275%2020.71261275%200%200%201-33.14017894%200L226.16594963%20648.70324148A20.71261275%2020.71261275%200%200%201%20242.7360391%20615.56306132z%22%20fill%3D%22%23C7C7C7%22%20%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M528.57008947%2016.2436231l269.2639609%20359.05313542A20.71261275%2020.71261275%200%200%201%20781.2639609%20408.43693868H242.7360391a20.71261275%2020.71261275%200%200%201-16.57008947-33.14018016l269.2639609-359.05313542a20.71261275%2020.71261275%200%200%201%2033.14017894%200z%22%20fill%3D%22%235A5A5A%22%20%3E%3C%2Fpath%3E%3C%2Fsvg%3E);
26 14 }
... ...