diff --git a/pages/giftpack/giftpacklist/giftpacklist.js b/pages/giftpack/giftpacklist/giftpacklist.js index e2f275f..151aa6d 100644 --- a/pages/giftpack/giftpacklist/giftpacklist.js +++ b/pages/giftpack/giftpacklist/giftpacklist.js @@ -957,9 +957,6 @@ Page({ var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + os.stoid + "?sceneValue=" + scene + "&pageValue=pages/giftpack/giftpacklist/giftpacklist"; - console.log("11111"); - console.log(path3); - // 读取文件成功则OK-- wx.getImageInfo({ src: path3, @@ -982,9 +979,6 @@ Page({ canvasId: 'share', success: function (res) { - - console.log(res.tempFilePath) - that.setData({ shareImgPath: res.tempFilePath, canvasHidden: true diff --git a/utils/common.js b/utils/common.js index 2af9ffd..503da19 100644 --- a/utils/common.js +++ b/utils/common.js @@ -13,7 +13,6 @@ module.exports = { app: function() { return getApp(); }, - //------------获取全路径的图片地址----------- getFullUrl: function(e) { if(e==undefined || e=="") return ""; @@ -21,11 +20,7 @@ module.exports = { e=this.app().globalData.setting.imghost + e; return e; }, - getConfigByName: function(e, t, r) { - 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; - return console.warn(t), console.warn(e), null; - }, - + //--------跳转到支付页面-------- jumpToCart4: function(e, r) { var a = { @@ -43,9 +38,6 @@ module.exports = { url: n }); }, - getCapache: function() { - return this.app().request.modifyUrl("/api/user/verify?is_image=1&t=" + Date.parse(new Date())); - }, wxParseAddFullImageUrl: function(t, r) { if (void 0 !== t.data[r].images) { 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 = { console.log(a), t.setData(e({}, r, a)); } }, - sendSmsCode: function(e, t, r) { - a = this; - if (!e) return a.app().showWarning("手机号码不能为空"); - void 0 !== t && null !== t || (t = 6); - var a = this; - this.app().request.post("/home/api/send_validate_code", { - data: { - mobile: e, - scene: t, - type: "mobile" - }, - success: function(e) { - "function" == typeof r && r(), a.app().confirmBox(e.data.msg); - } - }); - }, - sendBindSmsCode: function(e, t) { - r = this; - if (!e) return r.app().showWarning("手机号码不能为空"); - var r = this; - this.app().request.post("/home/api/send_validate_code", { - data: { - mobile: e, - scene: "1", - type: "user_reg" - }, - success: function(e) { - "function" == typeof t && t(), r.app().confirmBox(e.data.msg); - } - }); - } + + }; \ No newline at end of file diff --git a/utils/phpSerializer.js b/utils/phpSerializer.js deleted file mode 100644 index 59f9aa3..0000000 --- a/utils/phpSerializer.js +++ /dev/null @@ -1,298 +0,0 @@ -// {{{ HTML_AJAX_Serialize_PHP -/** - * PHP serializer - * - * This class can be used to serialize and unserialize data in a - * format compatible with PHP's native serialization functions. - * - * @version 0.0.3 - * @copyright 2005 Arpad Ray - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * - * See Main.js for Author/license details - */ - -function utf16to8(str) { - var out, i, len, c; - - out = ""; - len = str.length; - for (i = 0; i < len; i++) { - c = str.charCodeAt(i); - if ((c >= 0x0001) && (c <= 0x007F)) { - out += str.charAt(i); - } else if (c > 0x07FF) { - out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F)); - out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F)); - out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F)); - } else { - out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F)); - out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F)); - } - } - return out; -} - -function utf8to16(str) { - var out, i, len, c; - var char2, char3; - - out = ""; - len = str.length; - i = 0; - while (i < len) { - c = str.charCodeAt(i++); - switch (c >> 4) { - case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: - // 0xxxxxxx - out += str.charAt(i - 1); - break; - case 12: case 13: - // 110x xxxx 10xx xxxx - char2 = str.charCodeAt(i++); - out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F)); - break; - case 14: - // 1110 xxxx 10xx xxxx 10xx xxxx - char2 = str.charCodeAt(i++); - char3 = str.charCodeAt(i++); - out += String.fromCharCode(((c & 0x0F) << 12) | - ((char2 & 0x3F) << 6) | - ((char3 & 0x3F) << 0)); - break; - } - } - return out; -} - - -function HTML_AJAX_Serialize_PHP() {} -HTML_AJAX_Serialize_PHP.prototype = { - error: false, - message: "", - cont: "", - defaultEncoding: 'UTF-8', - contentType: 'application/php-serialized; charset: UTF-8', - // {{{ serialize - /** - * Serializes a variable - * - * @param mixed inp the variable to serialize - * @return string a string representation of the input, - * which can be reconstructed by unserialize() - * @author Arpad Ray - * @author David Coallier - */ - serialize: function(inp) { - var type = HTML_AJAX_Util.getType(inp); - var val; - switch (type) { - case "undefined": - val = "N"; - break; - case "boolean": - val = "b:" + (inp ? "1" : "0"); - break; - case "number": - val = (Math.round(inp) == inp ? "i" : "d") + ":" + inp; - break; - case "string": - val = "s:" + inp.length + ":\"" + inp + "\""; - break; - case "array": - val = "a"; - case "object": - if (type == "object") { - var objname = inp.constructor.toString().match(/(\w+)\(\)/); - if (objname == undefined) { - return; - } - objname[1] = this.serialize(objname[1]); - val = "O" + objname[1].substring(1, objname[1].length - 1); - } - var count = 0; - var vals = ""; - var okey; - for (key in inp) { - okey = (key.match(/^[0-9]+$/) ? parseInt(key) : key); - vals += this.serialize(okey) + - this.serialize(inp[key]); - count++; - } - val += ":" + count + ":{" + vals + "}"; - break; - } - if (type != "object" && type != "array") val += ";"; - return val; - }, - // }}} - // {{{ unserialize - /** - * Reconstructs a serialized variable - * - * @param string inp the string to reconstruct - * @return mixed the variable represented by the input string, or void on failure - */ - unserialize: function(inp) { - this.error = 0; - if (inp == "" || inp.length < 2) { - this.raiseError("input is too short"); - return; - } - var val, kret, vret, cval; - var type = inp.charAt(0); - var cont = inp.substring(2); - var size = 0, divpos = 0, endcont = 0, rest = "", next = ""; - - switch (type) { - case "N": // null - if (inp.charAt(1) != ";") { - this.raiseError("missing ; for null", cont); - } - // leave val undefined - rest = cont; - break; - case "b": // boolean - if (!/[01];/.test(cont.substring(0,2))) { - this.raiseError("value not 0 or 1, or missing ; for boolean", cont); - } - val = (cont.charAt(0) == "1"); - rest = cont.substring(1); - break; - case "s": // string - val = ""; - divpos = cont.indexOf(":"); - if (divpos == -1) { - this.raiseError("missing : for string", cont); - break; - } - size = parseInt(cont.substring(0, divpos)); - if (size == 0) { - if (cont.length - divpos < 4) { - this.raiseError("string is too short", cont); - break; - } - rest = cont.substring(divpos + 4); - break; - } - if ((cont.length - divpos - size) < 4) { - this.raiseError("string is too short", cont); - break; - } - if (cont.substring(divpos + 2 + size, divpos + 4 + size) != "\";") { - this.raiseError("string is too long, or missing \";", cont); - } - val = cont.substring(divpos + 2, divpos + 2 + size); - rest = cont.substring(divpos + 4 + size); - break; - case "i": // integer - case "d": // float - var dotfound = 0; - for (var i = 0; i < cont.length; i++) { - cval = cont.charAt(i); - if (isNaN(parseInt(cval)) && !(type == "d" && cval == "." && !dotfound++)) { - endcont = i; - break; - } - } - if (!endcont || cont.charAt(endcont) != ";") { - this.raiseError("missing or invalid value, or missing ; for int/float", cont); - } - val = cont.substring(0, endcont); - val = (type == "i" ? parseInt(val) : parseFloat(val)); - rest = cont.substring(endcont + 1); - break; - case "a": // array - if (cont.length < 4) { - this.raiseError("array is too short", cont); - return; - } - divpos = cont.indexOf(":", 1); - if (divpos == -1) { - this.raiseError("missing : for array", cont); - return; - } - size = parseInt(cont.substring(0, divpos)); - cont = cont.substring(divpos + 2); - val = new Array(); - if (cont.length < 1) { - this.raiseError("array is too short", cont); - return; - } - for (var i = 0; i < size; i++) { - kret = this.unserialize(cont, 1); - if (this.error || kret[0] == undefined || kret[1] == "") { - this.raiseError("missing or invalid key, or missing value for array", cont); - return; - } - vret = this.unserialize(kret[1], 1); - if (this.error) { - this.raiseError("invalid value for array", cont); - return; - } - val[kret[0]] = vret[0]; - cont = vret[1]; - } - if (cont.charAt(0) != "}") { - this.raiseError("missing ending }, or too many values for array", cont); - return; - } - rest = cont.substring(1); - break; - case "O": // object - divpos = cont.indexOf(":"); - if (divpos == -1) { - this.raiseError("missing : for object", cont); - return; - } - size = parseInt(cont.substring(0, divpos)); - var objname = cont.substring(divpos + 2, divpos + 2 + size); - if (cont.substring(divpos + 2 + size, divpos + 4 + size) != "\":") { - this.raiseError("object name is too long, or missing \":", cont); - return; - } - var objprops = this.unserialize("a:" + cont.substring(divpos + 4 + size), 1); - if (this.error) { - this.raiseError("invalid object properties", cont); - return; - } - rest = objprops[1]; - var objout = "function " + objname + "(){"; - for (key in objprops[0]) { - objout += "this." + key + "=objprops[0]['" + key + "'];"; - } - objout += "}val=new " + objname + "();"; - eval(objout); - break; - default: - this.raiseError("invalid input type", cont); - } - return (arguments.length == 1 ? val : [val, rest]); - }, - // }}} - // {{{ getError - /** - * Gets the last error message - * - * @return string the last error message from unserialize() - */ - getError: function() { - return this.message + "\n" + this.cont; - }, - // }}} - // {{{ raiseError - /** - * Raises an eror (called by unserialize().) - * - * @param string message the error message - * @param string cont the remaining unserialized content - */ - raiseError: function(message, cont) { - this.error = 1; - this.message = message; - this.cont = cont; - } - // }}} -} -// }}} - diff --git a/utils/weapp-icon.wxss b/utils/weapp-icon.wxss index 7d685e4..3a02023 100644 --- a/utils/weapp-icon.wxss +++ b/utils/weapp-icon.wxss @@ -6,21 +6,9 @@ background-position: center; background-size: 100%; } - - - .t-icon-gowudai { 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); } - -/* .t-icon-liwu { - 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); -} - -.t-icon-echarts { - 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); -} */ - .t-icon-sort-up { 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); }