commit 8001f8eaebfea374d9793d27a84094b21395860d Author: XiaoMo Date: Sat Apr 5 23:47:00 2025 +0800 0000 diff --git a/@babel/runtime/helpers/arrayLikeToArray.js b/@babel/runtime/helpers/arrayLikeToArray.js new file mode 100644 index 0000000..1c5f132 --- /dev/null +++ b/@babel/runtime/helpers/arrayLikeToArray.js @@ -0,0 +1,7 @@ +function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = new Array(a); e < a; e++) n[e] = r[e]; + return n; +} + +module.exports = _arrayLikeToArray; \ No newline at end of file diff --git a/@babel/runtime/helpers/arrayWithHoles.js b/@babel/runtime/helpers/arrayWithHoles.js new file mode 100644 index 0000000..51833e6 --- /dev/null +++ b/@babel/runtime/helpers/arrayWithHoles.js @@ -0,0 +1,5 @@ +function _arrayWithHoles(r) { + if (Array.isArray(r)) return r; +} + +module.exports = _arrayWithHoles; \ No newline at end of file diff --git a/@babel/runtime/helpers/arrayWithoutHoles.js b/@babel/runtime/helpers/arrayWithoutHoles.js new file mode 100644 index 0000000..1a850a8 --- /dev/null +++ b/@babel/runtime/helpers/arrayWithoutHoles.js @@ -0,0 +1,7 @@ +var arrayLikeToArray = require("./arrayLikeToArray"); + +function _arrayWithoutHoles(r) { + if (Array.isArray(r)) return arrayLikeToArray(r); +} + +module.exports = _arrayWithoutHoles; \ No newline at end of file diff --git a/@babel/runtime/helpers/asyncToGenerator.js b/@babel/runtime/helpers/asyncToGenerator.js new file mode 100644 index 0000000..080f2bb --- /dev/null +++ b/@babel/runtime/helpers/asyncToGenerator.js @@ -0,0 +1,26 @@ +function asyncGeneratorStep(n, e, r, t, o, a, c) { + try { + var i = n[a](c), u = i.value; + } catch (n) { + return void r(n); + } + i.done ? e(u) : Promise.resolve(u).then(t, o); +} + +function _asyncToGenerator(n) { + return function() { + var e = this, r = arguments; + return new Promise(function(t, o) { + var a = n.apply(e, r); + function c(n) { + asyncGeneratorStep(a, t, o, c, i, "next", n); + } + function i(n) { + asyncGeneratorStep(a, t, o, c, i, "throw", n); + } + c(void 0); + }); + }; +} + +module.exports = _asyncToGenerator; \ No newline at end of file diff --git a/@babel/runtime/helpers/defineProperty.js b/@babel/runtime/helpers/defineProperty.js new file mode 100644 index 0000000..6a29aa9 --- /dev/null +++ b/@babel/runtime/helpers/defineProperty.js @@ -0,0 +1,10 @@ +function _defineProperty(e, r, n) { + return r in e ? Object.defineProperty(e, r, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0 + }) : e[r] = n, e; +} + +module.exports = _defineProperty; \ No newline at end of file diff --git a/@babel/runtime/helpers/interopRequireDefault.js b/@babel/runtime/helpers/interopRequireDefault.js new file mode 100644 index 0000000..44ddf0a --- /dev/null +++ b/@babel/runtime/helpers/interopRequireDefault.js @@ -0,0 +1,7 @@ +function _interopRequireDefault(e) { + return e && e.__esModule ? e : { + default: e + }; +} + +module.exports = _interopRequireDefault; \ No newline at end of file diff --git a/@babel/runtime/helpers/iterableToArray.js b/@babel/runtime/helpers/iterableToArray.js new file mode 100644 index 0000000..0332bea --- /dev/null +++ b/@babel/runtime/helpers/iterableToArray.js @@ -0,0 +1,5 @@ +function _iterableToArray(r) { + if ("undefined" != typeof Symbol && Symbol.iterator in Object(r)) return Array.from(r); +} + +module.exports = _iterableToArray; \ No newline at end of file diff --git a/@babel/runtime/helpers/iterableToArrayLimit.js b/@babel/runtime/helpers/iterableToArrayLimit.js new file mode 100644 index 0000000..ed2539e --- /dev/null +++ b/@babel/runtime/helpers/iterableToArrayLimit.js @@ -0,0 +1,20 @@ +function _iterableToArrayLimit(r, t) { + if ("undefined" != typeof Symbol && Symbol.iterator in Object(r)) { + var e = [], i = !0, o = !1, l = void 0; + try { + for (var n, a = r[Symbol.iterator](); !(i = (n = a.next()).done) && (e.push(n.value), + !t || e.length !== t); i = !0) ; + } catch (r) { + o = !0, l = r; + } finally { + try { + i || null == a.return || a.return(); + } finally { + if (o) throw l; + } + } + return e; + } +} + +module.exports = _iterableToArrayLimit; \ No newline at end of file diff --git a/@babel/runtime/helpers/nonIterableRest.js b/@babel/runtime/helpers/nonIterableRest.js new file mode 100644 index 0000000..57bc057 --- /dev/null +++ b/@babel/runtime/helpers/nonIterableRest.js @@ -0,0 +1,5 @@ +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} + +module.exports = _nonIterableRest; \ No newline at end of file diff --git a/@babel/runtime/helpers/nonIterableSpread.js b/@babel/runtime/helpers/nonIterableSpread.js new file mode 100644 index 0000000..bfc8a87 --- /dev/null +++ b/@babel/runtime/helpers/nonIterableSpread.js @@ -0,0 +1,5 @@ +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} + +module.exports = _nonIterableSpread; \ No newline at end of file diff --git a/@babel/runtime/helpers/slicedToArray.js b/@babel/runtime/helpers/slicedToArray.js new file mode 100644 index 0000000..16c4b65 --- /dev/null +++ b/@babel/runtime/helpers/slicedToArray.js @@ -0,0 +1,7 @@ +var arrayWithHoles = require("./arrayWithHoles"), iterableToArrayLimit = require("./iterableToArrayLimit"), unsupportedIterableToArray = require("./unsupportedIterableToArray"), nonIterableRest = require("./nonIterableRest"); + +function _slicedToArray(r, e) { + return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); +} + +module.exports = _slicedToArray; \ No newline at end of file diff --git a/@babel/runtime/helpers/toConsumableArray.js b/@babel/runtime/helpers/toConsumableArray.js new file mode 100644 index 0000000..3eaf17a --- /dev/null +++ b/@babel/runtime/helpers/toConsumableArray.js @@ -0,0 +1,7 @@ +var arrayWithoutHoles = require("./arrayWithoutHoles"), iterableToArray = require("./iterableToArray"), unsupportedIterableToArray = require("./unsupportedIterableToArray"), nonIterableSpread = require("./nonIterableSpread"); + +function _toConsumableArray(r) { + return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread(); +} + +module.exports = _toConsumableArray; \ No newline at end of file diff --git a/@babel/runtime/helpers/typeof.js b/@babel/runtime/helpers/typeof.js new file mode 100644 index 0000000..e7239d1 --- /dev/null +++ b/@babel/runtime/helpers/typeof.js @@ -0,0 +1,18 @@ +function _typeof2(o) { + "@babel/helpers - typeof"; + return (_typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { + return typeof o; + } : function(o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + })(o); +} + +function _typeof(o) { + return "function" == typeof Symbol && "symbol" === _typeof2(Symbol.iterator) ? module.exports = _typeof = function(o) { + return _typeof2(o); + } : module.exports = _typeof = function(o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : _typeof2(o); + }, _typeof(o); +} + +module.exports = _typeof; diff --git a/@babel/runtime/helpers/unsupportedIterableToArray.js b/@babel/runtime/helpers/unsupportedIterableToArray.js new file mode 100644 index 0000000..8ced7d7 --- /dev/null +++ b/@babel/runtime/helpers/unsupportedIterableToArray.js @@ -0,0 +1,11 @@ +var arrayLikeToArray = require("./arrayLikeToArray"); + +function _unsupportedIterableToArray(r, e) { + if (r) { + if ("string" == typeof r) return arrayLikeToArray(r, e); + var t = Object.prototype.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, e) : void 0; + } +} + +module.exports = _unsupportedIterableToArray; \ No newline at end of file diff --git a/@babel/runtime/regenerator.js b/@babel/runtime/regenerator.js new file mode 100644 index 0000000..a78ec5e --- /dev/null +++ b/@babel/runtime/regenerator.js @@ -0,0 +1,273 @@ +!function(t) { + "use strict"; + var r, e = Object.prototype, n = e.hasOwnProperty, o = "function" == typeof Symbol ? Symbol : {}, i = o.iterator || "@@iterator", a = o.asyncIterator || "@@asyncIterator", c = o.toStringTag || "@@toStringTag", u = "object" == typeof module, h = t.regeneratorRuntime; + if (h) u && (module.exports = h); else { + (h = t.regeneratorRuntime = u ? module.exports : {}).wrap = w; + var f = "suspendedStart", s = "suspendedYield", l = "executing", p = "completed", y = {}, v = {}; + v[i] = function() { + return this; + }; + var d = Object.getPrototypeOf, g = d && d(d(P([]))); + g && g !== e && n.call(g, i) && (v = g); + var m = b.prototype = x.prototype = Object.create(v); + E.prototype = m.constructor = b, b.constructor = E, b[c] = E.displayName = "GeneratorFunction", + h.isGeneratorFunction = function(t) { + var r = "function" == typeof t && t.constructor; + return !!r && (r === E || "GeneratorFunction" === (r.displayName || r.name)); + }, h.mark = function(t) { + return Object.setPrototypeOf ? Object.setPrototypeOf(t, b) : (t.__proto__ = b, c in t || (t[c] = "GeneratorFunction")), + t.prototype = Object.create(m), t; + }, h.awrap = function(t) { + return { + __await: t + }; + }, _(j.prototype), j.prototype[a] = function() { + return this; + }, h.AsyncIterator = j, h.async = function(t, r, e, n) { + var o = new j(w(t, r, e, n)); + return h.isGeneratorFunction(r) ? o : o.next().then(function(t) { + return t.done ? t.value : o.next(); + }); + }, _(m), m[c] = "Generator", m[i] = function() { + return this; + }, m.toString = function() { + return "[object Generator]"; + }, h.keys = function(t) { + var r = []; + for (var e in t) r.push(e); + return r.reverse(), function e() { + for (;r.length; ) { + var n = r.pop(); + if (n in t) return e.value = n, e.done = !1, e; + } + return e.done = !0, e; + }; + }, h.values = P, N.prototype = { + constructor: N, + reset: function(t) { + if (this.prev = 0, this.next = 0, this.sent = this._sent = r, this.done = !1, this.delegate = null, + this.method = "next", this.arg = r, this.tryEntries.forEach(G), !t) for (var e in this) "t" === e.charAt(0) && n.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = r); + }, + stop: function() { + this.done = !0; + var t = this.tryEntries[0].completion; + if ("throw" === t.type) throw t.arg; + return this.rval; + }, + dispatchException: function(t) { + if (this.done) throw t; + var e = this; + function o(n, o) { + return c.type = "throw", c.arg = t, e.next = n, o && (e.method = "next", e.arg = r), + !!o; + } + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var a = this.tryEntries[i], c = a.completion; + if ("root" === a.tryLoc) return o("end"); + if (a.tryLoc <= this.prev) { + var u = n.call(a, "catchLoc"), h = n.call(a, "finallyLoc"); + if (u && h) { + if (this.prev < a.catchLoc) return o(a.catchLoc, !0); + if (this.prev < a.finallyLoc) return o(a.finallyLoc); + } else if (u) { + if (this.prev < a.catchLoc) return o(a.catchLoc, !0); + } else { + if (!h) throw new Error("try statement without catch or finally"); + if (this.prev < a.finallyLoc) return o(a.finallyLoc); + } + } + } + }, + abrupt: function(t, r) { + for (var e = this.tryEntries.length - 1; e >= 0; --e) { + var o = this.tryEntries[e]; + if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { + var i = o; + break; + } + } + i && ("break" === t || "continue" === t) && i.tryLoc <= r && r <= i.finallyLoc && (i = null); + var a = i ? i.completion : {}; + return a.type = t, a.arg = r, i ? (this.method = "next", this.next = i.finallyLoc, + y) : this.complete(a); + }, + complete: function(t, r) { + if ("throw" === t.type) throw t.arg; + return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, + this.method = "return", this.next = "end") : "normal" === t.type && r && (this.next = r), + y; + }, + finish: function(t) { + for (var r = this.tryEntries.length - 1; r >= 0; --r) { + var e = this.tryEntries[r]; + if (e.finallyLoc === t) return this.complete(e.completion, e.afterLoc), G(e), y; + } + }, + catch: function(t) { + for (var r = this.tryEntries.length - 1; r >= 0; --r) { + var e = this.tryEntries[r]; + if (e.tryLoc === t) { + var n = e.completion; + if ("throw" === n.type) { + var o = n.arg; + G(e); + } + return o; + } + } + throw new Error("illegal catch attempt"); + }, + delegateYield: function(t, e, n) { + return this.delegate = { + iterator: P(t), + resultName: e, + nextLoc: n + }, "next" === this.method && (this.arg = r), y; + } + }; + } + function w(t, r, e, n) { + var o = r && r.prototype instanceof x ? r : x, i = Object.create(o.prototype), a = new N(n || []); + return i._invoke = function(t, r, e) { + var n = f; + return function(o, i) { + if (n === l) throw new Error("Generator is already running"); + if (n === p) { + if ("throw" === o) throw i; + return F(); + } + for (e.method = o, e.arg = i; ;) { + var a = e.delegate; + if (a) { + var c = O(a, e); + if (c) { + if (c === y) continue; + return c; + } + } + if ("next" === e.method) e.sent = e._sent = e.arg; else if ("throw" === e.method) { + if (n === f) throw n = p, e.arg; + e.dispatchException(e.arg); + } else "return" === e.method && e.abrupt("return", e.arg); + n = l; + var u = L(t, r, e); + if ("normal" === u.type) { + if (n = e.done ? p : s, u.arg === y) continue; + return { + value: u.arg, + done: e.done + }; + } + "throw" === u.type && (n = p, e.method = "throw", e.arg = u.arg); + } + }; + }(t, e, a), i; + } + function L(t, r, e) { + try { + return { + type: "normal", + arg: t.call(r, e) + }; + } catch (t) { + return { + type: "throw", + arg: t + }; + } + } + function x() {} + function E() {} + function b() {} + function _(t) { + [ "next", "throw", "return" ].forEach(function(r) { + t[r] = function(t) { + return this._invoke(r, t); + }; + }); + } + function j(t) { + var r; + this._invoke = function(e, o) { + function i() { + return new Promise(function(r, i) { + !function r(e, o, i, a) { + var c = L(t[e], t, o); + if ("throw" !== c.type) { + var u = c.arg, h = u.value; + return h && "object" == typeof h && n.call(h, "__await") ? Promise.resolve(h.__await).then(function(t) { + r("next", t, i, a); + }, function(t) { + r("throw", t, i, a); + }) : Promise.resolve(h).then(function(t) { + u.value = t, i(u); + }, function(t) { + return r("throw", t, i, a); + }); + } + a(c.arg); + }(e, o, r, i); + }); + } + return r = r ? r.then(i, i) : i(); + }; + } + function O(t, e) { + var n = t.iterator[e.method]; + if (n === r) { + if (e.delegate = null, "throw" === e.method) { + if (t.iterator.return && (e.method = "return", e.arg = r, O(t, e), "throw" === e.method)) return y; + e.method = "throw", e.arg = new TypeError("The iterator does not provide a 'throw' method"); + } + return y; + } + var o = L(n, t.iterator, e.arg); + if ("throw" === o.type) return e.method = "throw", e.arg = o.arg, e.delegate = null, + y; + var i = o.arg; + return i ? i.done ? (e[t.resultName] = i.value, e.next = t.nextLoc, "return" !== e.method && (e.method = "next", + e.arg = r), e.delegate = null, y) : i : (e.method = "throw", e.arg = new TypeError("iterator result is not an object"), + e.delegate = null, y); + } + function k(t) { + var r = { + tryLoc: t[0] + }; + 1 in t && (r.catchLoc = t[1]), 2 in t && (r.finallyLoc = t[2], r.afterLoc = t[3]), + this.tryEntries.push(r); + } + function G(t) { + var r = t.completion || {}; + r.type = "normal", delete r.arg, t.completion = r; + } + function N(t) { + this.tryEntries = [ { + tryLoc: "root" + } ], t.forEach(k, this), this.reset(!0); + } + function P(t) { + if (t) { + var e = t[i]; + if (e) return e.call(t); + if ("function" == typeof t.next) return t; + if (!isNaN(t.length)) { + var o = -1, a = function e() { + for (;++o < t.length; ) if (n.call(t, o)) return e.value = t[o], e.done = !1, e; + return e.value = r, e.done = !0, e; + }; + return a.next = a; + } + } + return { + next: F + }; + } + function F() { + return { + value: r, + done: !0 + }; + } +}(function() { + return this || "object" == typeof self && self; +}() || Function("return this")()); \ No newline at end of file diff --git a/app.js b/app.js new file mode 100644 index 0000000..b311b4a --- /dev/null +++ b/app.js @@ -0,0 +1,64 @@ +var t = require("./utils/login.js"); + +// 引入 +require("./utils/xstat.js"); + + +App({ + xstatConfig: { + appKey: wx.getAccountInfoSync().miniProgram.appId, // 自动获取 小程序appid + debug: true, //是否打开调试模式 + // 上报地址 + LOG_URL: 'https://t-jm.v0750.com/send', + }, + onLaunch: function(e) { + console.log("options", e), this.globalData.options = e, t.getLogin(this, !0); + try { + var o = wx.getSystemInfoSync(); + this.computeNavigateBarHeight(o); + } catch (t) { + this.setData({ + windowHeight: 812, + totalTopHeight: 68, + statusBarHeight: 20, + titleBarHeight: 48 + }); + } + }, + onShow: function(e) { + console.log("onshowwwwwwwoptions", e); + var o = e.scene; + [ 1011, 1012, 1013, 1024, 1047, 1048, 1049 ].indexOf(o) > -1 && (console.log("扫码进入的"), + t.getDevicecode(this, e)); + }, + computeNavigateBarHeight: function(t) { + var e = wx.getMenuButtonBoundingClientRect(), o = e.bottom + 6, i = t.windowHeight, n = e.top, a = e.height; + i < 10 && (i = t.windowHeight, a = o - (n = t.statusBarHeight)), o < 10 && (console.log("更新"), + o = 68, /iPhone X|MI 8|PAAM00|COR-AL00/.test(t.model) ? o = 88 : /iPhone/.test(t.model) && (o = 64)); + var s = t.windowWidth; + this.globalData.screen_data = { + windowWidth: s, + windowHeight: i, + totalTopHeight: o, + statusBarHeight: n, + titleBarHeight: a, + titleWidth: e.width + }; + }, + globalData: { + userInfo: null, + canGetData: !1, + screen_data: {}, + options: {}, + route: {}, + user: {}, + isUserAuthorization: 0, + servicetel: "", + code: "", + isneedUpload: !1, + needJumpUrl: !1, + devicecode: "", + protocol: {}, + tips: "" + } +}); \ No newline at end of file diff --git a/app.json b/app.json new file mode 100644 index 0000000..f229d7d --- /dev/null +++ b/app.json @@ -0,0 +1,47 @@ +{ + "pages": [ + "pages/index/index", + "pages/mall/mall", + "pages/goodsDetails/goodsDetails", + "pages/orderDetails/orderDetails", + "pages/map/map", + "pages/orderPaySuccess/orderPaySuccess", + "pages/orderPay/orderPay", + "pages/goodsSearch/goodsSearch", + "pages/orderIndex/orderIndex", + "pages/orderList/orderList", + "pages/myAddress/myAddress", + "pages/addAddress/addAddress", + "pages/voucher/voucher", + "pages/listDetail/listDetail", + "pages/register/register", + "pages/singleStart/singleStart", + "pages/myDiscount/myDiscount", + "pages/washCodeList/washCodeList", + "pages/washCodeDetail/washCodeDetail", + "pages/login/login", + "pages/user/user", + "pages/webview/webview", + "pages/wangdian/wangdian", + "pages/duiquan/duiquan" + ], + "window": { + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#fff", + "navigationBarTitleText": "聚美汽服", + "navigationBarTextStyle": "black" + }, + "permission": { + "scope.address": { + "desc": "获取您的通讯地址" + }, + "scope.userLocation": { + "desc": "你的位置信息将用于定位效果展示" + } + }, + "requiredPrivateInfos": [ + "chooseAddress", + "getLocation", + "chooseLocation" + ] +} \ No newline at end of file diff --git a/app.wxss b/app.wxss new file mode 100644 index 0000000..d58b555 --- /dev/null +++ b/app.wxss @@ -0,0 +1,322 @@ +@font-face { + font-family: iconfont; + src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAABUsAAsAAAAAJHgAABTfAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACGJgq1cKseATYCJANkCzQABCAFhGcHgnMbLx5FRoaNAxDk8TDZ/4fkDVj8pBpUNrQ6wVQziYfP4yULDRufDam/NqlUoPugcVhSA37UtO/jC8N2/PqJaraJZYFLhiNnMZWa6TNDKeH5b7//7TNzbeaafzFpgmryJBoikZAgJbpFVodOvlS8vv+dyyMckYowx27ICu1e2tAv5HdpcmQnzIydUhNybnbC8qDOUjpYpEDBjo+5+EBsOHggziKt0mpInOcmfPyAZBjLc4exhLT7XWOMOIoklIgDb3h+m73/vwXCp0ol0ijAaGhtRLCxTtBZyarR7U63xlWWuwzPRSUBUID/OUDgm+Yz53/NfdrkWJIwpTt29WZ3k4O3u/9PNintT+kQktJPkeRVnetUkbvWdibJESUlPEBXEJJ1VYWpML66QtnqnEqZP61CFsKuGcmm92EmiK5NIYMgHp/JmyDA2rErN0+v7zIzm1qd2VDgDxQcjpYNkmYqlxanpkAESY932mZ5oRTqqHfwNvvy8vdSAcUd+E91e52wjO6PhlEt/Z03w52F4RXgAhrYWNhO+V9v/1TARsYsyxtfgLkZ8uekBs0oBeETCaWQLEOOEmVqjH3nDAxe/aX4D1aYW9kK/gMPPFKyvAiJMXQRAT5l6+JQN5ZKk4B44MgIQHa8ro6BqAoeDFKFFAYlyMA1BDm4B0EB7kMQggcQxOAGlIyX0KbhUxBE4LOgdOELoAzF10Hx+D4ELfgRBC74FQgc8BsQ1OD3IWjAH0JgwR9DUIG/RhU0/HhfiQTha2UQhG+6g9jQJ9PswStgtsD+8xOfM6lxA6kIYGuEZvqCKRMkEXh3zHfyl3brOo/NfNlG41Ge9+mqjqNorItb6+jFuj889duattPGzOVRLJxHI4syO5tbpznI/NDvi2zTLE8YU2e6ObMkmI7T/kI78MoMPo0IL/bi0ng3TuVKScnNI6ODqZ7lU83P54qbT2TH3MgSSmjKmZTWL3EfYnkIaYHnAMA8R7LH+Men9MkH9u4Refxe4/fJPfaAPtyh2neQD5trfTwqIApit8rk2KWh2zjM745c2ctdF4wiky9aOF4IUt/fo6MQsyXNwvjxitt8mj8Pc1Ex9lmMAs0jxLIkt6OYPkBIJJ+OJ/8CJcTugfXkPg7yh3BncCknoADL08IOPSeLxGx8359GTiA6J31t+rl+Ts4d63UWUc0wjEqHLONQgA3D0g7tgOQwjut5Aao1uC/nq1FQQsZeX+Kl1W+CyuYm2o70IMTyfTmusLYFUm12EynU85jjADLWHivT48O9Py8kInZF4aqsx+KiISJLshJ2JD0M6Vf+GZBBZQjcs98uHci6aGAuaXrpXQVIO2bmEWtTpquzLEOcYZDtu5TtsrZmG9NBUSslpM89xS26XPh0Bp+Ff59fYTE1t6ncT+XT7j6FVNCbrjGfTUz/AhETkMdTbiuxWzeGL4zcvF3uy7X+JyObXvxh6QdXnrb6wwS6SurxpXtNjnNM1uctJG0voSBJV46cYsvf6ULQ2JzHM+7zWQ/nPf1loGBv5Yde9macXn3LX49t18xe6zV0ym2X+9Pu0ql3VHNn4j2fkAJEyDY5iHkT0x0mpK2ZSTvVlBaiSAPrq9KR/KbSpmUw5u+7hzgzAKRNR/0MAUx7hjvy2xtJEDHB7Mdnaw3y7nh5EZmcRCr/TD6xL/RrMI+3D19vTt0vj5eXKxwbolFeFCq25IN8PFG7WJt42JpR7JZ0iylEaLJNF2IA0+1hoAvdETHNSFRNHAJUFCMjY4dqCrogK9yVkjQN9GnSUDTPskCD9Avaqt4JFLPTmpSxEGKvHoEiixI4aF9LDCGCeF9l4q3rlsmDvyZbTDuREQ3JqtQsO50UyvSkaUu9Kb+y0rJNWkkLLbFA08gYUoxXXXLMbd5VQu6hAHsAS+nDIVP3wfqxNXMO2BQoCUbxTUjzi+7IAjIBa4kafDaVx0kMIUB0ZkKImE0TGGdYpWpCaFYDW5Bxs9shAtGQkXlK6ZfZPAdAZX3fyoiwfRsvLraUfQAdMU9abFdSEjUR7ZEsGKfiaIC9q9IBmAHenX5kYMG3yywLgH7T8PDaNoggzxkdr4iraxQ0P6TrEwCyILrGGXGegMWaZb0msJKueLae9exTFbrwBVk4uZiEf6zF599j/vYqHX8jS4m4cTKQu1SSwphrRHoEUpvFAED3vNu/efPWcJ87TiLBLaKBIZe29WJoOebvRVCDlkTNtCCrZlLXRUEBCOg6MUSAizOwYXBLwrANnkQ4zrlw3XPh++fS8zYoOTtU/ZLlhkFAjBRfK2C104P77JEKrXf5lFS7UUNKS4asGJ76hi2+1RWLxfv2Vt9LKx88gnhLmrgHWb/qdFJmQQHpZEyMN+d4Z0bvwo4hzaKRDhNBtgKSutt0IiqIyZEayq4tSMz4MjC0LVQX1jaofixB9ZupABGN5lR7DpC2WBPKGkPmt6PYLXeG6YhM3Ck6cDS861NvKtSEn7nlRNtEQxRzTpt+DZ2LHZ+cDjPSMv+js96XGtaRj070Oi1J6viiem8GbsVd09751X93MJ3taxK60LytrdngqkCyOsivcIdOju5M2GYkfYlt8gI1/tG8x5y2NnG6+sBzQroz2sfrKrifq6+H7vZ4+Rqj1Xr1D1LNRCEjKgYv0EMmrWa+JF67enXW8b54fqc2Q86S+7xzliZZXFTE9s6R7bPoS4pFxFfzs17hk/ht9PxvfCbcvPfaM1h5LK9/FssqjWXf9LDXGiOGYUYnYJ6xqJ3e5Y5b0jZNZOpUEf3GF3GKaSHK7pURUe63CtAevnFNmE2cuNirWpA+aErfGiRDt1v7jJycwgrSAH9IH6D1oX7XlwN9xmtj+/qQmYzp2w4pPKdHOhS4MVwLL4xMCid+CD17caFWG+lU8cuJRntcVFzlijqsVngdT1CIverKysLoj4jdGs97e8JoXZEuks/m4rAiQds+JAhbdeRAzHn87uKZ93TzM69nuHEP2rTuxz+5mD/iOGru+dunkF6ITDcAiSXTkYPX/ZEnnjP4+P+Nwxsnb5gwYf2kTb/LmLChy26c9MemSesn6KW69TbOpsmH/lu/smd5V9fynpW3HBUCmte/de2zTL8dmh9+FJ5fncY5Yz9mzXxQsq35n5lLZ/699O+VS1f+0/S6UpkYRMpn5m9+4hOYyUypbrKGpAcbDbKMkK1CQI3mZ2ptTK3BMDf+mlZ5lzrwN2dmwD8DsSurNC1qdYvmG1VZtK4gKYWYmxUXpTZU2DWqllb10u+aiTMJD+emVTWgabf/nVhdpop4HYMfp62aA3YMHSW5BC5SErgiOzHAGRjtK3VIj0ZBvumBzgAgD3AFPM3j3pqTj2oDtWg+QRGomK7FC1ErqkAhHGpFhSgEBotzSuPxkCn1FdIyybffSsqkFT8KFep7l0kqpD8yPqjp/DsUMU5suwwRL9vMODPlbrUbaJh6xnPGBIaH0TcfT8QtWIMHLCIenJPtO+DGb+Lm3uZO4N3O5erxEJPU2ZOZkfFBjCPhdhyDRcwWPLhKL0JZEH5Z7XIckUXCLS+n/ftTiMxgkBUI1QaFcOusd4zJPhDuOg7yCSu6Y62ri+yqUVuGGiY29Fnza2Ykj2FJHDkOCWtM+HkchN+Bh1jgbH4BsFsAJFuc4u7FevEWyRDSwACJw3NYHdwAUl1db5raoR3VWa2EAwoeb0zM5XYpqNl1e5/7e8Jugo7QawpK1XygS/w9rcd/mYgsbBCSRZNFAuE4fw8t+XqZRirVyPRrheruGqletra0LqbJYQtUr8j40Sl/YZT0ZLoS89eUUTz5lWrB5z9mdF8+g993ZPpCo9K8sbI+uiTSmi+3KM8DwYi0zqj12pwsuCspX33reGT1Hby9bYM1sijyMhBQx8Tb71RHHr9FMVXOAv2Wx4+HAnWB7rs+uPO6oe88kuQA+/HKjJrk8dlKnvbK44UzOwO/WTTj8xG+VpmdPL5mRkZ1IO500mlcUo4bSPcZaf353GCgSvjX4SHOKX20hx/olzoy0cFH8tVTg4P+w3j9tftdEXNKahtuzrvTD7z8jj/9c80aJWc+iHs+lyzJe5P1OtdLd43MzQrl+ZF2omkLDtHDhCvC5l3CL56kStv5Knyc4u+NyZNIzeJlv8mTrD6z4e2E1cx9oXwGkIaQp4LiUD/yskKRID1I3s//3uDzvz6qJ8Pbjm6Skc0A69VecJi42rQaYZAn3owaNAP4x6vbhp/MmHCkFSs8u3r1mgO64dYZtGH6t29NQjwfj+KXCst8gHyv8tB+gfzlQgjSr9/oWqtju04fXtC2h3p4vytYP9+1YSPQQ9DrcovELdkq3ko5rTdK9NIOiOwWucl20Dr4INynFv8Dv9WXN5nnU8Vv41f58CI/zf4IaB59eaniUjVfI4tLsJtPTjdNoXbub3/195zPSTtHzk96lE59l2/MMT7T0b4eNOa/oxkPTvowsrIlrGDe5s/vOmlTTNNH/jE8Tg9V/XXqnbNuDNujmqztzgb60zAqTzaAvnLdZu1mIH855FvNo1rIdsp0Kp+P40sYwj1ChmT3b/4vmuf+tQWYT/UjjLnW/3lL8SASr66iwcl4QXUW2Ew2J22U4axorMdWBmOBIxAoa17Pk+gl8qiaxHMTrcQl/51IBtPaNOD8QRJkmxYhLnu/P/H61/nEQmIfmY+i18cI7b+CUrlFsWhmSRwGnPwPKG+8jhEERMGIViwXx4iWX5pI4V0eiyrRcMKKGEtQEMJRRfhOf4BrQrWoiaBARaiB6eDbgQMMgOsRKUTFYrSHiRTiYixcGw4wN6KCAGGAIkAOlGvf/ivWiqdvq7GAQiwFN8oYxSObq6btwvQ7J/ziqAB4Xw/gvMUKl3fIbeew83UwL/d26u1cnmRk/Y8LR6RcKixoC8MT7ol4Fv7sQk6CSE2fcQT/FsawM5wFW3HPu+e4XEcNS4LPY4SQKFtEEpwHQKYzaL8gHos1bweqo09Jh9CgrK1RPC/grVavHp3iC+f3k4YxhRRbGUT1wpwg2vNNhRYrbxsaA6orKTYofw6h3wzZBDaoejw6vhqylUP0Q4RNEqicDcR24whA9N4j8mCdVKoLRoJvSicNpjJkqixAspT/lC/nj/CRyEqKfKOqi4zjsQMYyodV2MjEmpc/dHFzU8a22Oud9o6T+mUZTZuXDV27cbZr4sDErrM3/l6W7S2LRiGqDEr2eKO6/cKYKX6U94MYIapTrzp0YbzI8VfAldqYCQcGyhrPVZzT/nxeZkIZWLA8u7zWQDLADl+ANbQ6W5wOP4CNhU+d5bW52GNYFvY3CZsKWYA5Tm51HFPQxA7+RyoCKS2J1JUioZhkIjOvZGRWJpwAw+LQ3hcf4FvBK1hxVjAvBcz8oL5nz5DHF9yaSXaT/42MmbfGAHu8+TqmGST+1Kl9xheTcmDj0LEgEt01jJLjiHiSr8CAXDQr8E8V5osGhMwQXnXRXekb96gbTs+JUYwo6inZ5AxyZhotbZDp5PSnF6/XausWyBbKmlopWdQM6RLn9aUct4gEU8SK/wl97CtYT3OXlLswMHtJ1bvZJjOdXlpWqIq+1oH898bp55jMS9mu0vJCk+q4l1dhqc11n+HKs6tlO/W/DmmcKNJ9zxp+iTbCowPXNTp3J7eDa7Fye4J6tipGtOYDRphCryYzTEJ6fv9zS90Itf24WmUvLR+LgQYHaZvNJrOdpTjzpiwx/vP68VWp7cdOQ4bCOqeaxHyIqDnoami+rnkVxOpjyT3FpVQXe+m+Q7BdO8ovKONbgAqaRbRyrUQE6U2yJ9TUxNuTni6jJqHtJPvTkpLw0Hr9idYgK9H/U0K0+mZ9s7GJYA2yECq6u7YEKE67x/ZywdyByqAdbS1FBEuQldBu7MB+eEdZ9QHb0YEqA5VoRzMGs4oyiKlcYb3hCMZvCmUKBoMQdOsX0YB+/gL0bt6AQbMuaAuK2p5Xbwl4QCB7z1h1yKMLInvuH/hnlY3APfKjWq0J0dz0jlvhVejfaFX4+28SdCTlSNClhGnWhsN5Fw5N2Oa1Aplw+fywORa6ujvjHPNcxp5rpF5BDwkCQ1EviD9DN+AfialfOxAi2vPStMeg2M5LZH1ZGnZ3eVxeWllCxUG22leYvVGWlaPhlkesmJEk0E0e+YvAOnMUpa5EDk0Yx2RJ6/J6pRi/64N98b1ITc7C2DFd23K6ZPpkBzdbUgprEQPHr1c70J3mywFtxOLwJVuIsDlpXHRtdtO/kt+CsyYEZNUozEXhLQ3Wa7MFXOrtJ/8vRbF7JArHM/UkLQ7dnxuQBIPJnk8EAM8dy5HAzPHYFoQF/E1IMvzMEzzZCyBTAfDsdwhRY/PrYjeCc/zsD4QO0AivgNfx2nXwJ1K0H75WJIPvSSX8Ep1/4yAS2rbBd1C0Fn5dtBF+VrQeflcwC/5s99k7ZepHd3l2eqYswZ7azqxgste/+j8nw4EWI9FWSUh+4+f/B0vLbcrWX8hOT0nf8u0DBL/l2oJ/ReT6/lmjvD3ffRP0/WH57OgGo+XLCcg0hKiXvyW46X0F/HYFbHAARuRA4WNZiZJb/48oUR6KFd84aFb2HDjIXit2hfbAQ/ZxsbXuZOZQKZEnNcCSZxSLzGuxkvgAGtlv4CD7vdjV+AQP2f/F1p3go4WW4h8ZTi1nxJsQ8FELJW022BsuXURNVdsDNylYC+m1u6c9Z1xz08cE6VD2rRVEGIzJ6fnT8ShCkhgMuG/bytpks9MRrAnaPsaZIwZH2aQ8Q3gm2wMf0sT1Lf3t3eAkJ0IZTvVBGqlHyOCJnrYuh3rGNNd5F+JNDUl9lkiBRGAIxEXi9F5yUdCJiIQ9VIDzWW2qQ3tiU4dcT/Cy9vSJ2CIYendBf/JtveREiyOueOJLIObnSpAvRYsqiaSSybwsyKIsybKsyKqsybps4KcKAqC6zEDLEYeZbFJGdQTcA4ozjKKiJS11z0oHvuJcVHeAUj3OG3K9ndnjeotufNkhJ+hmlP7SLePF7SODqYJ8d6c/yxwoR/VUoZZj0EvtfNKj2NyFgkMMjONLGj3QrOE3wK2mDSBytcEuoyCoclh/Ei4cgjVu61OFrlKpEm7cl1lLF6kt0KxP2AKeGlo9QhX28DXE7GRlcJitvXoyJ7M6Xh/hNzM=') format('woff2'); +} + +.iconfont { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-family: iconfont!important; + font-size: 16px; + font-style: normal; +} + +.icon-shijian:before { + content: "\100d0"; +} + +.icon-dingwei:before { + content: "\100d1"; +} + +.icon-dingdanliebiao:before { + content: "\e679"; +} + +.icon-daohangdaohang:before { + content: "\e649"; +} + +.icon-guichengwenjian:before { + content: "\e63c"; +} + +.icon-bianji:before { + content: "\e600"; +} + +.icon-10:before { + content: "\e624"; +} + +.icon-jiantouxiangyou:before { + content: "\e621"; +} + +.icon-icon-GIS_dizhi:before { + content: "\e609"; +} + +.icon-002:before { + content: "\e65b"; +} + +.icon-duihuanzhongxin:before { + content: "\e607"; +} + +.icon-qianbaoxiaofeimingxi:before { + content: "\e61e"; +} + +.icon-nobind:before { + content: "\e608"; +} + +.icon-chongzhijilu:before { + content: "\e7ae"; +} + +.icon-31daifahuo:before { + content: "\e601"; +} + +.icon-31daifukuan:before { + content: "\e602"; +} + +.icon-31daishouhuo:before { + content: "\e603"; +} + +.icon-31hongbao:before { + content: "\e606"; +} + +.icon-shangcheng:before { + content: "\e62b"; +} + +.icon-youhuiquan1:before { + content: "\e662"; +} + +.icon-shangjiajiameng:before { + content: "\e64d"; +} + +.icon-chongzhi:before { + content: "\e659"; +} + +.icon-huiyuanzhongxin:before { + content: "\e633"; +} + +.icon-xichequan:before { + content: "\e613"; +} + + +.container { + background: #fafafa; + border-top: 1px solid #ccc; + box-sizing: border-box; + font-family: microsoft yahei; + padding: 0 0 170rpx; +} + +.hover { + background: transparent; +} + +.scan-btn { + background-color: #0056A3; + bottom: 0; + color: #fff; + font-size: 44rpx; + height: 126rpx; + left: 0; + line-height: 106rpx; + position: fixed; + text-align: center; + width: 100vw; + z-index: 6; + border-radius: 40rpx 40rpx 0 0; +} +.scan-btn .sha { + animation: shake 2s infinite; +} + +@keyframes shake { + 0%, 100% { transform: translate(0, 0); } + 10%, 30%, 50%, 70%, 90% { transform: translate(0, -2rpx); } + 20%, 40%, 60%, 80% { transform: translate(0, 2rpx); } +} + +@-webkit-keyframes marqueeAnimation { + 0% { + transform: translateX(100%); + } + + 100% { + transform: translateX(-100%); + } +} + +@keyframes marqueeAnimation { + 0% { + transform: translateX(100%); + } + + 100% { + transform: translateX(-100%); + } +} + +.video { + height: 50px; + width: 50px; +} + +.marquee-wrap { + color: #242424; + line-height: 22px; + padding-top: 10px; + width: 100%; +} + +.service-tel { + align-items: center; + color: #999; + flex-direction: column; + font-size: 26rpx; + justify-content: center; + line-height: 40rpx; +} + +.index-href-box,.service-tel { + display: flex; +} + +.index-href-box { + flex-wrap: wrap; + justify-content: space-between; + padding: 0 0 20rpx; +} + +.index-href-box .item { + flex-direction: column; + font-size: 28rpx; + margin: 30rpx 0 0 4%; + text-align: left; + width: 28%; + height: 120rpx; + border-radius: 20rpx; + box-shadow: 0 6rpx 10rpx rgba(0, 0, 0, .4); + background-image: linear-gradient(to bottom, #C7E1F9, #fff); +} + +.index-href-box .item_b { + width: 100%; + height: 100%; + background-size: cover; + padding: 14rpx; + box-sizing: border-box; + background-position: right; +} + +/* .index-href-box .item,.index-href-box .item .btn { + align-items: center; + display: inline-flex; + justify-content: center; +} */ + +.index-href-box .item .btn { + background-color: #4cadf1; + border-radius: 18rpx; + height: 146rpx; + width: 146rpx; +} + +.index-href-box .item .name { + /* display: inline-flex; */ + color: #0056A3; +} + +.index-href-box .item .dsc { + /* display: inline-flex; */ + color: #999; + font-size: 24rpx; +} + +.index-href-box .item:nth-child(3n+1) { + /* align-items: flex-start; */ +} + +.index-href-box .item:nth-child(3n+3) { + /* align-items: flex-end; */ + margin-right: 4%; +} + +.index-href-box .iconfont { + color: #fff; + font-size: 76rpx; +} + +.placeholder { + color: #999; +} + +.no-content { + align-items: center; + color: #999; + display: flex; + flex-direction: column; + font-size: 32rpx; + justify-content: center; + line-height: 56rpx; + padding: 100px 0; + text-align: center; +} + +.no-content image { + height: 200rpx; + margin-bottom: 30rpx; + width: 316rpx; +} + +.provision-box { + background: rgba(0,0,0,.5); + height: 100vh; + left: 0; + position: fixed; + top: 0; + width: 100vw; + z-index: 1000; +} + +.provision-box .inner { + background: #fff; + border-radius: 10rpx; + box-sizing: border-box; + left: 5vw; + max-height: 90vh; + overflow-y: scroll; + padding: 30rpx 80rpx; + position: fixed; + top: 50%; + transform: translateY(-50%); + width: 90vw; +} + +.provision-box .inner .title { + color: #333; + display: block; + font-size: 38rpx; + font-weight: 600; + line-height: 50px; + margin-bottom: 10rpx; + text-align: center; +} + +.provision-box .inner .richbox { + color: #666; + font-size: 26rpx; + line-height: 1.8; + word-break: break-all; +} + +.provision-box .inner .richbox image { + max-width: 100%; +} \ No newline at end of file diff --git a/img/car.png b/img/car.png new file mode 100644 index 0000000..31a5f34 Binary files /dev/null and b/img/car.png differ diff --git a/img/carcode.png b/img/carcode.png new file mode 100644 index 0000000..8ec64ed Binary files /dev/null and b/img/carcode.png differ diff --git a/img/delete.png b/img/delete.png new file mode 100644 index 0000000..c723f40 Binary files /dev/null and b/img/delete.png differ diff --git a/img/discount.png b/img/discount.png new file mode 100644 index 0000000..3e138f5 Binary files /dev/null and b/img/discount.png differ diff --git a/img/edit.png b/img/edit.png new file mode 100644 index 0000000..2944672 Binary files /dev/null and b/img/edit.png differ diff --git a/img/font2/iconfont---.svg b/img/font2/iconfont---.svg new file mode 100644 index 0000000..922286c --- /dev/null +++ b/img/font2/iconfont---.svg @@ -0,0 +1,29 @@ + + + + + +Created by iconfont + + + + + + + + + + + + + + diff --git a/img/hot.png b/img/hot.png new file mode 100644 index 0000000..63d1d9a Binary files /dev/null and b/img/hot.png differ diff --git a/img/hotsale-bg.png b/img/hotsale-bg.png new file mode 100644 index 0000000..dde3191 Binary files /dev/null and b/img/hotsale-bg.png differ diff --git a/img/iconfont---.svg b/img/iconfont---.svg new file mode 100644 index 0000000..dbfacb8 --- /dev/null +++ b/img/iconfont---.svg @@ -0,0 +1,83 @@ + + + + + +Created by iconfont + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/img/issaled.png b/img/issaled.png new file mode 100644 index 0000000..e60f18a Binary files /dev/null and b/img/issaled.png differ diff --git a/img/jiameng.png b/img/jiameng.png new file mode 100644 index 0000000..fc864f2 Binary files /dev/null and b/img/jiameng.png differ diff --git a/img/local.png b/img/local.png new file mode 100644 index 0000000..b8d66ec Binary files /dev/null and b/img/local.png differ diff --git a/img/location-blue.png b/img/location-blue.png new file mode 100644 index 0000000..9a6f320 Binary files /dev/null and b/img/location-blue.png differ diff --git a/img/location-red.png b/img/location-red.png new file mode 100644 index 0000000..91ed6a9 Binary files /dev/null and b/img/location-red.png differ diff --git a/img/location.png b/img/location.png new file mode 100644 index 0000000..9bf5844 Binary files /dev/null and b/img/location.png differ diff --git a/img/login-bg.png b/img/login-bg.png new file mode 100644 index 0000000..d0d7f44 Binary files /dev/null and b/img/login-bg.png differ diff --git a/img/logo.png b/img/logo.png new file mode 100644 index 0000000..e73743a Binary files /dev/null and b/img/logo.png differ diff --git a/img/logo2.jpeg b/img/logo2.jpeg new file mode 100644 index 0000000..78257df Binary files /dev/null and b/img/logo2.jpeg differ diff --git a/img/mall.png b/img/mall.png new file mode 100644 index 0000000..84ba6fb Binary files /dev/null and b/img/mall.png differ diff --git a/img/menberc.png b/img/menberc.png new file mode 100644 index 0000000..099bffd Binary files /dev/null and b/img/menberc.png differ diff --git a/img/nocontent.png b/img/nocontent.png new file mode 100644 index 0000000..e5c8786 Binary files /dev/null and b/img/nocontent.png differ diff --git a/img/pageList/dui.png b/img/pageList/dui.png new file mode 100644 index 0000000..5e8033d Binary files /dev/null and b/img/pageList/dui.png differ diff --git a/img/pageList/juan.png b/img/pageList/juan.png new file mode 100644 index 0000000..ab18691 Binary files /dev/null and b/img/pageList/juan.png differ diff --git a/img/pageList/kefu.png b/img/pageList/kefu.png new file mode 100644 index 0000000..e55c323 Binary files /dev/null and b/img/pageList/kefu.png differ diff --git a/img/pageList/member.png b/img/pageList/member.png new file mode 100644 index 0000000..4bada49 Binary files /dev/null and b/img/pageList/member.png differ diff --git a/img/pageList/xi.png b/img/pageList/xi.png new file mode 100644 index 0000000..567711b Binary files /dev/null and b/img/pageList/xi.png differ diff --git a/img/pageList/you.png b/img/pageList/you.png new file mode 100644 index 0000000..c60c8cf Binary files /dev/null and b/img/pageList/you.png differ diff --git a/img/phone.png b/img/phone.png new file mode 100644 index 0000000..7d4a756 Binary files /dev/null and b/img/phone.png differ diff --git a/img/right.png b/img/right.png new file mode 100644 index 0000000..5eb44db Binary files /dev/null and b/img/right.png differ diff --git a/img/scan.png b/img/scan.png new file mode 100644 index 0000000..d177126 Binary files /dev/null and b/img/scan.png differ diff --git a/img/search.png b/img/search.png new file mode 100644 index 0000000..dd9f553 Binary files /dev/null and b/img/search.png differ diff --git a/img/service.png b/img/service.png new file mode 100644 index 0000000..c4e3d30 Binary files /dev/null and b/img/service.png differ diff --git a/img/shop.png b/img/shop.png new file mode 100644 index 0000000..60bba15 Binary files /dev/null and b/img/shop.png differ diff --git a/img/sun.jpeg b/img/sun.jpeg new file mode 100644 index 0000000..39193b7 Binary files /dev/null and b/img/sun.jpeg differ diff --git a/img/top.png b/img/top.png new file mode 100644 index 0000000..7f2f597 Binary files /dev/null and b/img/top.png differ diff --git a/img/video.png b/img/video.png new file mode 100644 index 0000000..caad7fc Binary files /dev/null and b/img/video.png differ diff --git a/img/voucher.png b/img/voucher.png new file mode 100644 index 0000000..a8d4ea1 Binary files /dev/null and b/img/voucher.png differ diff --git a/pages/addAddress/addAddress.js b/pages/addAddress/addAddress.js new file mode 100644 index 0000000..dbad1c3 --- /dev/null +++ b/pages/addAddress/addAddress.js @@ -0,0 +1,175 @@ +var t = getApp(), i = require("../../utils/login.js"); + +Page({ + data: { + showLoding: !0, + loading: !1, + isrefusedAuthLocation: 0, + data: [], + show: "index", + isdefault: 0, + region: [], + info: { + cityname: null, + countryname: null, + detailinfo: null, + provincename: null, + telnumber: null, + username: null + }, + issubmit: !1, + show_comfirm: { + show: !1, + tips: "" + }, + uniqid: "", + selectAddressUniqid: "", + id: "" + }, + onLoad: function(t) { + console.log(t), wx.showLoading({ + title: "" + }), this.setData({ + id: t.id || "", + show: t.id ? "edit" : "plus" + }), this.getContent(), wx.setNavigationBarTitle({ + title: t.id ? "编辑地址" : "新增地址" + }); + }, + getContent: function() { + var e = this; + i.request(t.globalData.config.address.plus, { + id: this.data.id + }).then(function(t) { + if (wx.hideLoading(), 200 != t.code) return wx.showToast({ + title: t.message + }), !1; + e.setData({ + showLoding: !1, + info: t.data, + isdefault: t.isdefault || 0, + token: t.token + }); + }).catch(function(t) { + wx.hideLoading(); + }); + }, + checkboxChange: function(t) { + this.setData({ + isdefault: t.detail.value[0] || 0 + }); + }, + bindRegionChange: function(t) { + this.data.info.provincename = t.detail.value[0], this.data.info.cityname = t.detail.value[1], + this.data.info.countryname = t.detail.value[2], this.setData({ + info: this.data.info + }); + }, + input: function(t) { + var i = t.currentTarget.dataset.input; + this.data.info[i] = t.detail.value, this.setData({ + info: this.data.info + }); + }, + submit: function() { + if (this.data.issubmit) return !1; + this.setData({ + issubmit: !0 + }); + var e = this; + i.request(t.globalData.config.address.submit, { + session: wx.getStorageSync("session"), + info: this.data.info, + isdefault: this.data.isdefault, + token: this.data.token, + uniqid: this.data.uniqid + }).then(function(t) { + wx.hideLoading(), e.setData({ + issubmit: !1 + }), 200 == t.code ? wx.navigateBack() : wx.showToast({ + title: t.message, + icon: "none" + }); + }).catch(function(t) { + wx.hideLoading(), e.setData({ + issubmit: !1 + }); + }); + }, + delAddress: function() { + if (this.data.issubmit) return !1; + var e = this; + wx.showModal({ + title: "是否删除该地址?", + content: "", + confirmColor: "#EF8176", + cancelColor: "#999999", + success: function(a) { + a.confirm && (e.setData({ + issubmit: !0 + }), i.request(t.globalData.config.address.delete, { + id: e.data.id + }).then(function(t) { + 200 == t.code ? (wx.showToast({ + title: "删除成功" + }), wx.navigateBack()) : wx.showModal({ + title: "提示", + content: t.message, + confirmColor: "#EF8176", + cancelColor: "#999999" + }); + }).catch(function(t) { + e.setData({ + issubmit: !1 + }); + })); + }, + fail: function(t) { + console.log("fail"); + } + }); + }, + getSystemAddress: function() { + var t = this; + wx.chooseAddress({ + success: function(i) { + console.log(i), t.data.info = { + cityname: i.cityName, + countryname: i.countyName, + detailinfo: i.detailInfo, + provincename: i.provinceName, + telnumber: i.telNumber, + username: i.userName + }, t.setData({ + info: t.data.info + }); + }, + fail: function(i) { + console.log(i), t.setData({ + isrefusedAuthLocation: 1 + }), wx.showToast({ + title: "获取地址失败", + icon: "none" + }); + } + }); + }, + bindopensetting: function(t) { + res.detail.authSetting["scope.address"] ? (wx.showToast({ + title: "授权成功,请再次点击导入微信地址" + }), this.setData({ + isrefusedAuthLocation: 0 + })) : wx.showToast({ + title: "授权失败", + icon: "none" + }); + }, + select: function(i) { + var e = i.currentTarget.dataset.index; + "user" != this.data.selectAddressUniqid && (this.setData({ + selectAddressUniqid: i.currentTarget.dataset.uniqid + }), t.globalData.selectAddress = this.data.data[e], setTimeout(function(i) { + t.globalData.selectAddress = {}; + }, 2e3), wx.navigateBack({})); + } +}); \ No newline at end of file diff --git a/pages/addAddress/addAddress.json b/pages/addAddress/addAddress.json new file mode 100644 index 0000000..5c63bab --- /dev/null +++ b/pages/addAddress/addAddress.json @@ -0,0 +1,6 @@ +{ + "navigationBarTitleText": "地址", + "usingComponents": { + "page-loding": "../../template/pageLoding/pageLoding" + } +} \ No newline at end of file diff --git a/pages/addAddress/addAddress.wxml b/pages/addAddress/addAddress.wxml new file mode 100644 index 0000000..8eeb13f --- /dev/null +++ b/pages/addAddress/addAddress.wxml @@ -0,0 +1,42 @@ + + + + + + 所在地区 + + 所在地区 + {{info.provincename}} {{info.cityname}} {{info.countryname}} + + + + + 详细地址 + + + + + + 姓名 + + + + + + 手机号码 + + + + + + + + 导入微信地址 + 立即保存 + + + diff --git a/pages/addAddress/addAddress.wxss b/pages/addAddress/addAddress.wxss new file mode 100644 index 0000000..64fcd4a --- /dev/null +++ b/pages/addAddress/addAddress.wxss @@ -0,0 +1,134 @@ +.edit-box { + background: #fafafa; + box-sizing: border-box; + min-height: 100vh; + padding: 20rpx; +} + +.edit-box .del { + height: 70rpx; + line-height: 70rpx; + margin: 20px; + padding: 20px; +} + +.add-form { + background: #fff; + border: 1px solid #f2f2f2; + border-radius: 20rpx; + font-size: 28rpx; + padding: 20px; +} + +.placeholder { + color: #ccc; +} + +.add-form .item { + align-items: center; + border-bottom: 1px solid #f2f2f2; + display: flex; + padding: 44rpx 0; + position: relative; +} + +.add-form .item .name { + width: 150rpx; +} + +.add-form .item .content,.add-form .item .name { + align-items: center; + display: inline-flex; +} + +.add-form .item .content { + flex: 1; + height: 70rpx; +} + +.add-form .item input { + width: 100%; +} + +.add-form .item .right { + position: absolute; + right: 0; + top: 49rpx; +} + +.add-form .item .right image { + height: 40rpx; + transform: rotateZ(-90deg); + width: 40rpx; +} + +.add-form .checkbox { + color: #999; + font-size: 28rpx; + margin: 20rpx 0; + padding: 20rpx 0; + text-align: left; +} + +.add-form .btn { + background-color: #4cadf1; + border-radius: 90rpx; + color: #fff; + font-size: 44rpx; + line-height: 90rpx; + margin: 0 auto; + text-align: center; + width: 372rpx; +} + +checkbox { + transform: scale(.7); +} + +.add-form .btn.submit { + opacity: .5; +} + +.edit-box .del { + background: #fff; + border: 1px solid #f2f2f2; + border-radius: 20rpx; + color: #333; + font-size: 32rpx; + margin: 20px auto; + padding: 20rpx; + text-align: center; + width: 200rpx; +} + +.edit-box .del image { + display: inline-block; + height: 30rpx; + margin-right: 10rpx; + position: relative; + top: -2rpx; + vertical-align: middle; + width: 30rpx; +} + +.btn-box { + display: flex; + justify-content: space-between; + margin-top: 30rpx; +} + +.btn-box .btn { + align-items: center; + background: #f60; + border-radius: 10rpx; + color: #fff; + display: inline-flex; + font-size: 34rpx; + height: 100rpx; + justify-content: center; + width: calc(50% - 10rpx); +} + +.btn-box .btn.submit { + background: #4cadf1; +} \ No newline at end of file diff --git a/pages/common/common.wxml b/pages/common/common.wxml new file mode 100644 index 0000000..04989c5 --- /dev/null +++ b/pages/common/common.wxml @@ -0,0 +1,13 @@ + diff --git a/pages/common/common.wxss b/pages/common/common.wxss new file mode 100644 index 0000000..e69de29 diff --git a/pages/duiquan/duiquan.js b/pages/duiquan/duiquan.js new file mode 100644 index 0000000..ccee57e --- /dev/null +++ b/pages/duiquan/duiquan.js @@ -0,0 +1,66 @@ +// pages/duiquan/duiquan.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + pic:"https://jm-static.v0750.com/image/dui.jpg" + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/duiquan/duiquan.json b/pages/duiquan/duiquan.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/duiquan/duiquan.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/duiquan/duiquan.wxml b/pages/duiquan/duiquan.wxml new file mode 100644 index 0000000..14227f0 --- /dev/null +++ b/pages/duiquan/duiquan.wxml @@ -0,0 +1,24 @@ + + + + 请输入券码 +
+ + +
+ + + 温馨提示: + 1、卡券一经兑换,不作退换; + 2、请在有效期内、在对应网点使用; + 3、请按网点内安全指引操作洗车机; + 4、洗车场地湿滑,请小心滑倒; + 5、不要在洗车场内奔跑、玩耍; + 6、禁止攀爬; + 7、照看好老人、小孩; + 8、喷枪水压极大,禁止使用喷枪对着人体喷水; + 9、驶出洗车场时注意四周行人及车辆; + 10、请保管好您的财物,请勿离开洗车区域. + +
+
\ No newline at end of file diff --git a/pages/duiquan/duiquan.wxss b/pages/duiquan/duiquan.wxss new file mode 100644 index 0000000..7142362 --- /dev/null +++ b/pages/duiquan/duiquan.wxss @@ -0,0 +1,34 @@ +.contain { + box-sizing: border-box; + min-height: 100vh; + background-color: #fafafa; +} +.pic { + width: 100%; +} + +.content { + padding: 60rpx 40rpx; +} + +.title { + font-size: 36rpx; + line-height: 1; + font-weight: 700; + color: #0056A3; +} + +.input { + margin: 30rpx 0; + padding: 22rpx; + border-radius: 10rpx; + background-color: #fff; + border: 2rpx solid #eee; + box-shadow: 0 6rpx 10rpx rgba(0, 0, 0, 0.1); +} + +.tips { + color: #999; + line-height: 2; + font-size: 28rpx; +} \ No newline at end of file diff --git a/pages/goodsDetails/goodsDetails.js b/pages/goodsDetails/goodsDetails.js new file mode 100644 index 0000000..0415505 --- /dev/null +++ b/pages/goodsDetails/goodsDetails.js @@ -0,0 +1,137 @@ +var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), t = require("../../@babel/runtime/helpers/slicedToArray"), a = require("../../@babel/runtime/helpers/asyncToGenerator"), r = require("../../@babel/runtime/helpers/defineProperty"), n = (getApp(), +require("../../utils/login.js")), i = require("../../utils/common.js"); + +Page({ + data: r({ + showLoding: !0, + tapid: "", + scrollid: "", + id: "", + user: {}, + info: {}, + share: {}, + formData: [], + merchantList: [], + token: "", + recommendedList: [], + scrolltocontent: !1, + height: { + merchantList: "", + needknow: "", + infomes: "" + } + }, "formData", []), + onLoad: function(e) { + this.setData({ + id: e.id || "1" + }), this.getData(); + }, + onShareAppMessage: function() { + return { + title: this.data.share.title || this.data.info.name, + imageUrl: this.data.share.pic + }; + }, + getData: function() { + var s = this; + return a(e.default.mark(function a() { + var o, c; + return e.default.wrap(function(e) { + for (;;) switch (e.prev = e.next) { + case 0: + return s, e.prev = 1, e.next = 4, n.request(n.baseUrl + "shop/details", { + id: s.data.id + }, !0); + + case 4: + o = e.sent, (c = o.data).recommendedList.forEach(function(e) { + var a = e.price.split("."), r = t(a, 2); + e.price_buck = r[0], e.price_cent = r[1]; + }), c.info.message && (c.info.message = i.replaceDetail(c.info.message)), s.setData(r({ + showLoding: !1, + formData: c.formData, + info: c.info, + merchantList: c.merchantList, + share: c.share, + user: c.user, + token: c.token, + recommendedList: c.recommendedList + }, "formData", c.formData)), s.watchView(), e.next = 15; + break; + + case 12: + e.prev = 12, e.t0 = e.catch(1), console.log(e.t0); + + case 15: + case "end": + return e.stop(); + } + }, a, null, [ [ 1, 12 ] ]); + }))(); + }, + watchView: function() { + var t = this; + return a(e.default.mark(function a() { + var r, n, i, s, o; + return e.default.wrap(function(e) { + for (;;) switch (e.prev = e.next) { + case 0: + r = t, e.prev = 1, n = [ "header", "title", "merchantList", "needknow", "infomes" ], + i = 0, s = 0; + + case 5: + if (!(i < n.length)) { + e.next = 15; + break; + } + return e.next = 8, r.getHeight(n[i]); + + case 8: + o = e.sent, console.log("height", o), i >= 2 && (r.data.height[n[i]] = s, r.setData({ + height: t.data.height + })), s += o, i++, e.next = 5; + break; + + case 15: + e.next = 20; + break; + + case 17: + e.prev = 17, e.t0 = e.catch(1), console.log(e.t0); + + case 20: + case "end": + return e.stop(); + } + }, a, null, [ [ 1, 17 ] ]); + }))(); + }, + getHeight: function(e) { + return new Promise(function(t, a) { + var r = wx.createSelectorQuery(); + r.select("#".concat(e)).boundingClientRect(), r.exec(function(e) { + t(e[0].height); + }); + }); + }, + toId: function(e) { + var t = e.currentTarget.dataset.id; + this.setData({ + tapid: t, + scrollid: t + }); + }, + bindscroll: function(e) { + var t = this, a = e.detail.scrollTop; + [ "infomes", "needknow", "merchantList" ].every(function(e) { + return !(a > t.data.height[e]) || (t.setData({ + tapid: e, + scrolltocontent: !0 + }), !0, !1); + }), a >= this.data.height.merchantList ? this.setData({ + scrolltocontent: !0 + }) : this.setData({ + scrolltocontent: !1 + }); + } +}); \ No newline at end of file diff --git a/pages/goodsDetails/goodsDetails.json b/pages/goodsDetails/goodsDetails.json new file mode 100644 index 0000000..27ce444 --- /dev/null +++ b/pages/goodsDetails/goodsDetails.json @@ -0,0 +1,14 @@ +{ + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTitleText": "聚美汽服", + "enablePullDownRefresh": false, + "usingComponents": { + "page-header": "./pageHeader/pageHeader", + "kefu-box": "./kefuBox/kefuBox", + "match-wrap": "./matchWrap/matchWrap", + "shop-add": "./shopAdd/shopAdd", + "recomond-list": "./recomondList/recomondList", + "page-bottom": "./pageBottom/pageBottom", + "page-loding": "../../template/pageLoding/pageLoding" + } +} \ No newline at end of file diff --git a/pages/goodsDetails/goodsDetails.wxml b/pages/goodsDetails/goodsDetails.wxml new file mode 100644 index 0000000..cd1af2e --- /dev/null +++ b/pages/goodsDetails/goodsDetails.wxml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + {{info.name}} + + + 已售{{info.num_buy+info.unit_name}} + + + {{item}} + + + + + + + + + 购买须知 + + + + + + + + + 商品详情 + + + + + + + + + 价格说明 + + + + + + + + + + 为您推荐 + + + + + + + + + diff --git a/pages/goodsDetails/goodsDetails.wxss b/pages/goodsDetails/goodsDetails.wxss new file mode 100644 index 0000000..12bd510 --- /dev/null +++ b/pages/goodsDetails/goodsDetails.wxss @@ -0,0 +1,216 @@ +.info-main { + padding-bottom: 12.8vw; +} + +.info-main .info-content { + padding: 4vw 0 0; + position: relative; +} + +.info-main .info-content .info-wrap.__nospace { + border-top: 0; + padding: 0 4vw 5.333vw; +} + +.info-main .info-content .info-title { + color: #292929; + font-size: 4.8vw; + font-weight: 500; + line-height: 6.133vw; +} + +.info-main .info-content .info-inventory { + -webkit-box-pack: justify; + -ms-flex-pack: justify; + color: #969696; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + font-size: 3.2vw; + justify-content: space-between; + margin-top: 2.133vw; +} + +.info-main .info-content .goods-tags { + margin-left: -1.467vw; + margin-top: 2.667vw; +} + +.info-main .info-content .goods-tags .tag { + background: rgba(235,82,82,.1); + border-radius: .667vw; + color: #eb5252; + display: inline-block; + font-size: 2.933vw; + height: 4.267vw; + line-height: 4.267vw; + margin-left: 1.467vw; + margin-top: 1.333vw; + padding: 0 1.333vw; + text-align: center; +} + +.step-box { + border-top: 2.667vw solid #f8f8f8; +} + +.step-packs { + background-color: #fff; + padding: 0 5.333vw; +} + +.step-packs .item { + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + align-items: center; + border-bottom: 1px solid #eee; + box-sizing: border-box; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + justify-content: space-between; + padding: 5.333vw 0; +} + +.item .left .desc { + color: #969696; + font-size: 3.2vw; +} + +.item .left .price { + color: #eb5252; + font-size: 4.267vw; + font-weight: 500; +} + +.item .content { + color: #2a2a2a; + font-size: 3.733vw; + text-align: right; +} + +.item .content .num view { + color: #eb5252; + display: inline; +} + +.item .progress-box { + background: #eee; + border-radius: .667vw; + height: 1.333vw; + margin-top: 1.333vw; + overflow: hidden; + width: 25.067vw; +} + +.item .progress-box .progress { + background-color: #06a2b3; + border-radius: .667vw; + height: 1.333vw; +} + +.info-wrap { + border-top: 2.667vw solid #f8f8f8; + padding: 0 4vw 5.333vw; +} + +.m-title { + padding: 4.267vw 0; + text-align: center; +} + +.m-title .bd { + color: #2a2a2a; + display: inline-block; + font-size: 4.8vw; + font-weight: 500; + line-height: 1; + padding: 0 1.333vw .533vw; + position: relative; + vertical-align: top; + z-index: 0; +} + +.m-title .line { + background-color: rgba(6,162,179,.6); + border-radius: 1.6vw; + bottom: 0; + height: 1.6vw; + left: 0; + position: absolute; + width: 100%; + z-index: -1; +} + +.richbox { + word-break: break-all; +} + +.info-picrule { + color: #787878; + font-size: 3.2vw; + line-height: 4.533vw; +} + +.info-picrule .title { + font-size: 4vw; + font-weight: 500; + margin: 5.333vw 0 4vw; +} + +.info-picrule .section { + margin-bottom: 2.667vw; +} + +.info-picrule .section .little { + font-weight: 500; + margin-bottom: 1.867vw; +} + +.scrollview { + height: 100vh; + padding-bottom: 12.8vw; +} + +.position-top-tab { + background: #fff; + display: flex; + height: 40px; + left: 0; + position: fixed; + top: 0; + width: 100vw; + z-index: 100; +} + +.position-top-tab .tab { + align-items: center; + display: inline-flex; + flex: 1; + font-size: 14px; + justify-content: center; + position: relative; +} + +.position-top-tab .active { + color: #eb5252; +} + +.position-top-tab .active:after { + background: #eb5252; + border-radius: 2px; + bottom: 0; + content: ""; + height: 2px; + left: calc(50% - 10px); + position: absolute; + width: 20px; +} + +.richbox image { + max-width: 100%; +} \ No newline at end of file diff --git a/pages/goodsDetails/kefuBox/kefuBox.js b/pages/goodsDetails/kefuBox/kefuBox.js new file mode 100644 index 0000000..d544c30 --- /dev/null +++ b/pages/goodsDetails/kefuBox/kefuBox.js @@ -0,0 +1,7 @@ +Component({ + properties: {}, + data: { + showDialog: !1 + }, + methods: {} +}); \ No newline at end of file diff --git a/pages/goodsDetails/kefuBox/kefuBox.json b/pages/goodsDetails/kefuBox/kefuBox.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/pages/goodsDetails/kefuBox/kefuBox.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/goodsDetails/kefuBox/kefuBox.wxml b/pages/goodsDetails/kefuBox/kefuBox.wxml new file mode 100644 index 0000000..392c918 --- /dev/null +++ b/pages/goodsDetails/kefuBox/kefuBox.wxml @@ -0,0 +1,37 @@ + + + + + + + + 霸王餐福利 + 加客服进「声色福利群」 + + + 点我添加 + + + + + + + + + + + 购买须知 + + + + 此券属平台与商家补贴,一经售出无法退款,请确认后再下单。 + + + + + + + + + + diff --git a/pages/goodsDetails/kefuBox/kefuBox.wxss b/pages/goodsDetails/kefuBox/kefuBox.wxss new file mode 100644 index 0000000..d90d54f --- /dev/null +++ b/pages/goodsDetails/kefuBox/kefuBox.wxss @@ -0,0 +1,189 @@ +.keufubox:last-child { + margin-bottom: -5.333vw; +} + +.kebox { + border-radius: 1.6vw; + width: 92vw; +} + +.kebox,.mykefu { + background: #fff; +} + +.mykefu { + -webkit-box-pack: justify; + -ms-flex-pack: justify; + height: 17.067vw; + justify-content: space-between; +} + +.mykefu .le { + -webkit-box-flex: 1; + flex: 1; +} + +.mykefu,.mykefu .le { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} + +.mykefu .le image { + border-radius: 50%; + height: 9.6vw; + margin-right: 3.467vw; + max-width: 100%; + width: 9.6vw; +} + +.mykefu .le .box { + width: 57.333vw; +} + +.mykefu .le .title { + color: #2a2a2a; + font-size: 3.733vw; +} + +.mykefu .le .desc,.mykefu .le .title { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.mykefu .le .desc { + color: #969696; + font-size: 3.2vw; + line-height: 4.133vw; + width: 57.333vw; +} + +.kebox .btn { + border-radius: 6.667vw; + color: #fff; + font-size: 3.2vw; + height: 8.667vw; + line-height: 8.667vw; + position: relative; + text-align: center; +} + +.mykefu .btn { + background: #28c418; + font-size: 3.2vw; + width: 18.267vw; +} + +.modal-dialog { + position: fixed; + z-index: 20; +} + +.modal-dialog,.modal-dialog .modal { + height: 100%; + left: 0; + top: 0; + width: 100%; +} + +.modal-dialog .modal { + background: rgba(0,0,0,.5); + position: absolute; + transition: all .3s; +} + +.infopop-wrap { + left: 50%; + position: absolute; + top: 45%; + transform: translate(-50%,-50%); +} + +.infopop-content { + background-color: #fff; + border-radius: 2.133vw; + color: #666; + font-size: 4vw; + line-height: 5.333vw; + overflow: hidden; + padding-bottom: 6.667vw; + text-align: center; + width: 69.867vw; +} + +.info-buy_notice .top { + color: #fff; + height: 21.867vw; + margin-bottom: 3.467vw; + overflow: hidden; + position: relative; +} + +.info-buy_notice ._top { + background: #06a2b3; + border-radius: 0 0 50% 50%; + height: 100%; + left: 50%; + margin-bottom: 4vw; + position: absolute; + top: 0; + transform: translateX(-50%); + width: 120%; +} + +.info-buy_notice .top .title { + color: #fff; + font-size: 4.8vw; + left: 0; + position: absolute; + text-align: center; + top: 50%; + transform: translateY(-50%); + width: 100%; +} + +.info-buy_notice .txt { + font-size: 3.733vw; + line-height: 5.333vw; + padding: 0 4vw; + text-align: left; +} + +.info-buy_notice .btn { + background-color: #06a2b3; + border-radius: 10.667vw; + color: #fff; + font-size: 4vw; + height: 10.667vw; + line-height: 10.667vw; + margin-bottom: -2.133vw; + margin-top: 5.333vw; + text-align: center; + width: 34.667vw; +} + +.infopop-close { + background-color: #fff; + border-radius: 50%; + color: rgba(0,0,0,.6); + font-size: 8.267vw; + height: 8.533vw; + left: 50%; + line-height: 8.033vw; + margin: 4.267vw 0 0 -4.267vw; + padding: 0; + position: absolute; + text-align: center; + top: 100%; + width: 8.533vw; +} + +.info-buy_notice .btn::after,.info-buy_notice .btn::before { + background: transparent; + border: none; +} \ No newline at end of file diff --git a/pages/goodsDetails/matchWrap/matchWrap.js b/pages/goodsDetails/matchWrap/matchWrap.js new file mode 100644 index 0000000..a85704f --- /dev/null +++ b/pages/goodsDetails/matchWrap/matchWrap.js @@ -0,0 +1,5 @@ +Component({ + properties: {}, + data: {}, + methods: {} +}); \ No newline at end of file diff --git a/pages/goodsDetails/matchWrap/matchWrap.json b/pages/goodsDetails/matchWrap/matchWrap.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/pages/goodsDetails/matchWrap/matchWrap.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/goodsDetails/matchWrap/matchWrap.wxml b/pages/goodsDetails/matchWrap/matchWrap.wxml new file mode 100644 index 0000000..2b3e41c --- /dev/null +++ b/pages/goodsDetails/matchWrap/matchWrap.wxml @@ -0,0 +1,34 @@ + + + + + 为您搭配更优惠 + + + + + + + + 【新会】椰子鸡再次返场!9.9元起抢「骨汁恋·星汇店」100元代金券! + + + + + ¥ + 9. + 90 + + + ¥100.00 + + + + 立即抢购 + + + + + + + diff --git a/pages/goodsDetails/matchWrap/matchWrap.wxss b/pages/goodsDetails/matchWrap/matchWrap.wxss new file mode 100644 index 0000000..5274675 --- /dev/null +++ b/pages/goodsDetails/matchWrap/matchWrap.wxss @@ -0,0 +1,171 @@ +.match-wrap { + border-top: 2.667vw solid #f8f8f8; +} + +.goods-match { + background-color: #fff; + border-radius: 2.133vw; + display: block; + padding: 12vw 3.6vw 3.6vw; + position: relative; +} + +.goods-match .til { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + background-color: #06a2b3; + border-radius: .533vw 2.933vw 2.933vw .533vw; + color: #fff; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + font-size: 3.2vw; + height: 5.867vw; + left: -.267vw; + padding-left: 1.467vw; + position: absolute; + top: 2.667vw; + width: 33.333vw; +} + +.goods-match .til view { + margin-right: 1.333vw; +} + +.goods-match .item { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} + +.goods-match .hd { + -webkit-box-flex: 25.333vw; + border-radius: 1.6vw; + flex: 25.333vw 0 0; + height: 25.333vw; + overflow: hidden; + width: 25.333vw; +} + +.image-box.__100 { + padding-top: 100%; +} + +.image-box { + background-color: #ebebeb; + height: 0; + overflow: hidden; + position: relative; +} + +.image-box image { + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} + +.goods-match .bd { + -webkit-box-flex: 1; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + flex: 1; + flex-direction: column; + justify-content: space-between; + padding: 0 0 0 2.667vw; +} + +.goods-match .bd_name { + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + color: #2a2a2a; + display: -webkit-box; + font-size: 3.733vw; + height: 16vw; + line-height: 5.333vw; + overflow: hidden; + text-overflow: ellipsis; + word-break: break-all; +} + +.goods-match .bd ._btm { + -webkit-box-align: end; + -ms-flex-align: end; + align-items: flex-end; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} + +.goods-match .bd ._btm_lt { + -webkit-box-flex: 1; + flex: 1; +} + +.goods-match .bd_price { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} + +.now-price { + color: #eb5252; + font-family: DIN; + font-size: 3.2vw; + line-height: 1.75em; +} + +.goods-match .bd_price .old { + color: #9b9b9b; + font-family: DIN; + font-size: 3.2vw; + margin-left: 1.333vw; + text-decoration: line-through; +} + +.goods-match .bd_btn { + background-color: #06a2b3; + border-radius: 3.333vw; + color: #fff; + font-size: 3.2vw; + height: 6.667vw; + line-height: 6.667vw; + padding: 0 3.6vw; + text-align: center; +} + +.now-price .symbol { + display: inline; + margin: 0 .267vw 0 0; +} + +.now-price.__normal .buck { + display: inline; + font-size: 4.8vw; +} + +.cent { + display: inline; +} + +.hot { + display: inline-block; + height: 13px; + margin-right: 4px; + width: 13px; +} \ No newline at end of file diff --git a/pages/goodsDetails/pageBottom/pageBottom.js b/pages/goodsDetails/pageBottom/pageBottom.js new file mode 100644 index 0000000..469fdc3 --- /dev/null +++ b/pages/goodsDetails/pageBottom/pageBottom.js @@ -0,0 +1,15 @@ +Component({ + properties: { + info: Object, + token: String + }, + data: {}, + methods: { + order: function() { + if (0 == this.properties.info.stock || 1 != this.properties.info.status) return !1; + wx.navigateTo({ + url: "/pages/orderIndex/orderIndex?token=".concat(this.properties.token) + }); + } + } +}); \ No newline at end of file diff --git a/pages/goodsDetails/pageBottom/pageBottom.json b/pages/goodsDetails/pageBottom/pageBottom.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/pages/goodsDetails/pageBottom/pageBottom.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/goodsDetails/pageBottom/pageBottom.wxml b/pages/goodsDetails/pageBottom/pageBottom.wxml new file mode 100644 index 0000000..aec3944 --- /dev/null +++ b/pages/goodsDetails/pageBottom/pageBottom.wxml @@ -0,0 +1,36 @@ + + + + + 首页 + + + + + + 我的 + + + + + + + + + ¥ + {{info.price}} + + + 立即购买 + 还未开售 + 抢购已结束 + 已售罄 + + + + diff --git a/pages/goodsDetails/pageBottom/pageBottom.wxss b/pages/goodsDetails/pageBottom/pageBottom.wxss new file mode 100644 index 0000000..0e0439f --- /dev/null +++ b/pages/goodsDetails/pageBottom/pageBottom.wxss @@ -0,0 +1,121 @@ +.bottom-bar { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + background: #fff; + bottom: 0; + display: flex; + height: 12.8vw; + position: fixed; + width: 100%; + z-index: 1; +} + +.thin-border_t { + border-color: #f4f4f4; + position: relative; +} + +.bottom-bar .left { + color: #666; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + font-size: 2.667vw; + height: 100%; + width: 50%; +} + +.thin-border_t:before { + border-bottom: .267vw solid; + border-color: inherit; + content: ""; + left: 0; + position: absolute; + top: 0; + transform: scaleY(.5); + width: 100%; +} + +.bottom-bar .left .bottom-bar-btn { + color: #666; + font-size: 2.667vw; + line-height: 2.667vw; + text-align: center; + width: 33%; +} + +.bottom-bar .left button,.bottom-bar .left button::after,.bottom-bar .left button::before { + background: transparent; + border: none; +} + +.bottom-bar .left .icon { + height: 5.067vw; + margin-bottom: .8vw; + margin-top: 1.867vw; + max-width: 100%; + width: 5.067vw; +} + +.bottom-bar .right { + color: #fff; + font-size: 4.533vw; + height: 100%; + line-height: 12.8vw; + text-align: center; + width: 50%; +} + +.menu-btns .btn { + -webkit-box-flex: 1; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + background-color: initial; + border-radius: 0; + color: #fff; + display: -webkit-inline-box; + display: -ms-inline-flexbox; + display: -webkit-inline-flex; + display: inline-flex; + flex: 1; + flex-direction: column; + font-size: 3.733vw; + height: 100%; + justify-content: center; + line-height: 4.8vw; + padding: 0; + text-align: center; +} + +.menu-btns .btn-pri,.menu-btns .btn-yuyue { + background-color: #06a2b3; + color: #fff; +} + +.menu-btns .btn:only-child { + font-size: 4.267vw; +} + +.menu-btns { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + height: 100%; + width: 50vw; +} + +.dollar,.price { + display: inline; +} + +.bg-grey { + background: #999!important; +} \ No newline at end of file diff --git a/pages/goodsDetails/pageHeader/pageHeader.js b/pages/goodsDetails/pageHeader/pageHeader.js new file mode 100644 index 0000000..e8ccb14 --- /dev/null +++ b/pages/goodsDetails/pageHeader/pageHeader.js @@ -0,0 +1,53 @@ +Component({ + properties: { + info: Object, + formData: Array + }, + data: { + day: "", + hour: "", + minute: "", + second: "", + swiperHeight: 240, + sell_times: null, + startTime: [] + }, + observers: { + info: function(t) { + 1 == t.status ? this.setTime() : -1 == t.status ? this.setStartTime(t.sell_times[0]) : -2 == t.status && this.setStartTime(t.sell_times[1]); + } + }, + timer: null, + methods: { + setStartTime: function(t) { + var e = new Date(1e3 * t), i = [ e.getFullYear(), this.changeNum(e.getMonth() + 1), this.changeNum(e.getDate()) ].join("/"), s = [ this.changeNum(e.getHours()), this.changeNum(e.getMinutes()), this.changeNum(e.getSeconds()) ].join(":"); + console.log(i), console.log(s), this.setData({ + startTime: [ i, s ] + }); + }, + changeNum: function(t) { + return t > 9 ? t : "0" + t; + }, + setTime: function() { + var t = 1e3 * this.properties.info.sell_times[1] - new Date().getTime(); + if (t <= 0) clearTimeout(this.timer); else { + var e, i, s, a, o = t / 1e3 / 3600 / 24, n = 24 * (o - (e = Math.floor(o))), r = 60 * (n - (i = Math.floor(n))), h = 60 * (r - (s = Math.floor(r))); + a = Math.floor(h), this.setData({ + day: (e + "").padStart(2, "0"), + hour: (i + "").padStart(2, "0"), + minute: (s + "").padStart(2, "0"), + second: (a + "").padStart(2, "0") + }); + } + setTimeout(function() { + this.setTime(); + }.bind(this), 1e3); + }, + load: function(t) { + var e = wx.getSystemInfoSync().windowWidth; + this.setData({ + swiperHeight: Math.max(e * t.detail.height / t.detail.width, this.data.swiperHeight) + }); + } + } +}); \ No newline at end of file diff --git a/pages/goodsDetails/pageHeader/pageHeader.json b/pages/goodsDetails/pageHeader/pageHeader.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/pages/goodsDetails/pageHeader/pageHeader.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/goodsDetails/pageHeader/pageHeader.wxml b/pages/goodsDetails/pageHeader/pageHeader.wxml new file mode 100644 index 0000000..b2b892b --- /dev/null +++ b/pages/goodsDetails/pageHeader/pageHeader.wxml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + {{s.nickname}} 刚刚购买了本商品 + + + + + + + + + + + + + ¥ + {{info.price}} + + + ¥{{info.marketprice}} + + + + + + 距结束还剩 + {{day}} + + {{hour}} + : + {{minute}} + : + {{second}} + + + + + + {{info.status==-1?'开始':'结束'}}时间 {{startTime[0]}} {{startTime[1]}} + + + + + diff --git a/pages/goodsDetails/pageHeader/pageHeader.wxss b/pages/goodsDetails/pageHeader/pageHeader.wxss new file mode 100644 index 0000000..958d5ef --- /dev/null +++ b/pages/goodsDetails/pageHeader/pageHeader.wxss @@ -0,0 +1,245 @@ +.swiper-item-img { + width: 100%; +} + +.top-swiper { + animation: fadein 5s infinite; + background-color: rgba(0,0,0,.6); + border-radius: 3.733vw; + box-sizing: border-box; + color: #fff; + font-size: 2.933vw; + height: 7.467vw; + left: 4vw; + opacity: 0; + padding: 0 .8vw; + position: fixed; + top: 10.667vw; + width: 50.667vw; + z-index: 5; +} + +@-webkit-keyframes fadein { + 0% { + opacity: 0; + } + + 10% { + opacity: 1; + } + + 70% { + opacity: 1; + } + + 75% { + opacity: 0; + } + + 100% { + opacity: 0; + } +} + +@keyframes fadein { + 0% { + opacity: 0; + } + + 10% { + opacity: 1; + } + + 70% { + opacity: 1; + } + + 75% { + opacity: 0; + } + + 100% { + opacity: 0; + } +} + +.swperitem { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} + +.top-swiper swiper-item { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} + +.top-swiper .avatar { + border-radius: 50%; + height: 6.4vw; + margin-right: 2.667vw; + width: 6.4vw; +} + +.top-swiper .txt { + -webkit-box-flex: 1; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + display: -webkit-box; + flex: 1; + height: 4.533vw; + line-height: 4.533vw; + overflow: hidden; + padding-right: 2.667vw; + text-overflow: ellipsis; + word-break: break-all; +} + +.fade-in { + opacity: 1; +} + +.header .like { + -webkit-box-pack: center; + -ms-flex-pack: center; + background-color: rgba(42,42,42,.7); + border-radius: 3.333vw 0 0 3.333vw; + font-size: 3.2vw; + height: 6.667vw; + justify-content: center; + position: absolute; + right: 0; + text-align: center; + top: 81%; + width: 24vw; + z-index: 5; +} + +.header .like,.type-bar { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + color: #fff; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} + +.type-bar { + -webkit-box-pack: justify; + -ms-flex-pack: justify; + background: rgba(6,162,179,.1); + font-size: 3.733vw; + height: 12.8vw; + justify-content: space-between; + line-height: 5.333vw; +} + +.type-bar .lt { + background: #06a2b3; + border-radius: 0 1.6vw 1.6vw 0; + color: #fff; + height: 100%; + padding-left: 4vw; + width: 70.4vw; +} + +.type-bar .lt .info-price { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + flex-wrap: wrap; + height: 100%; + width: 60vw; +} + +.type-bar .lt .count { + display: inline-block; + font-family: DIN; +} + +.type-bar .lt .discount { + display: inline-block; + font-size: 3.467vw; + font-weight: 500; +} + +.type-bar .lt .discount .doller { + display: inline-block; + font-size: 4vw; +} + +.type-bar .lt .discount ._price_free,.type-bar .lt .discount .now { + display: inline-block; + font-size: 6.667vw; +} + +.type-bar .lt .discount .is-qi { + display: inline-block; + font-size: 2.667vw; +} + +.type-bar .lt .original { + display: inline-block; + font-size: 3.2vw; + height: 4vw; + margin-left: 1.867vw; + text-decoration: line-through; +} + +.type-bar .rt { + color: #2a2a2a; + font-size: 2.667vw; + line-height: 4vw; + text-align: center; + width: 29.6vw; +} + +.type-bar .rt .time { + font-size: 18rpx; +} + +.countdown { + display: inline-block; + vertical-align: top; +} + +.time-item { + font-family: DIN; + margin-left: .533vw; + margin-right: .533vw; +} + +.type-bar .rt .time-item { + background: #06a2b3; + border-radius: .933vw; + color: #fff; + display: inline-block; + height: 4.8vw; + line-height: 4.8vw; + padding: 0 .8vw; + width: 3vw; +} + +.type-bar .rt .day { + display: inline-block; + margin-right: .2rem; +} + +.separator { + display: inline; +} \ No newline at end of file diff --git a/pages/goodsDetails/recomondList/recomondList.js b/pages/goodsDetails/recomondList/recomondList.js new file mode 100644 index 0000000..33126f6 --- /dev/null +++ b/pages/goodsDetails/recomondList/recomondList.js @@ -0,0 +1,7 @@ +Component({ + properties: { + list: Array + }, + data: {}, + methods: {} +}); \ No newline at end of file diff --git a/pages/goodsDetails/recomondList/recomondList.json b/pages/goodsDetails/recomondList/recomondList.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/pages/goodsDetails/recomondList/recomondList.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/goodsDetails/recomondList/recomondList.wxml b/pages/goodsDetails/recomondList/recomondList.wxml new file mode 100644 index 0000000..aca1d08 --- /dev/null +++ b/pages/goodsDetails/recomondList/recomondList.wxml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + {{item.name}} + + + + + + + ¥ + {{item.price_buck}}. + {{item.price_cent}} + + + + ¥{{item.marketprice}} + + + + + {{item.num_buy}}已售 + + + + + + diff --git a/pages/goodsDetails/recomondList/recomondList.wxss b/pages/goodsDetails/recomondList/recomondList.wxss new file mode 100644 index 0000000..3a801b3 --- /dev/null +++ b/pages/goodsDetails/recomondList/recomondList.wxss @@ -0,0 +1,140 @@ +.small-list { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + flex-wrap: wrap; + margin: -5.333vw 0 0 -4vw; +} + +.small-list .item { + -webkit-box-flex: 50%; + box-sizing: border-box; + flex: 50% 0 0; + margin-top: 5.333vw; + padding: 0 0 0 4vw; + width: 50%; +} + +.small-list .hd { + border-radius: 1.067vw; + overflow: hidden; + position: relative; +} + +.image-box.__56 { + padding-top: 56.25%; +} + +.image-box image { + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} + +.small-list .bd { + padding: 2.667vw 0 0; +} + +.small-list .title { + -webkit-box-orient: vertical; + color: #222; + display: -webkit-box; + line-height: 1.4em; + margin: 0 0 .2em; + overflow: hidden; + text-overflow: ellipsis; + word-break: break-all; +} + +.small-list .title.__small { + font-size: 3.733vw; +} + +.small-list .bd-btm { + -webkit-box-align: end; + -ms-flex-align: end; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + align-items: flex-end; + height: 9.6vw; + justify-content: space-between; + margin: 0 0 .8vw; +} + +._btm_lt,.small-list .bd-btm { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} + +._btm_lt { + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + flex-direction: column; +} + +.now-price { + color: #eb5252; + font-family: DIN; + line-height: 1.75em; +} + +.now-price,.now-price.__normal { + font-size: 3.2vw; +} + +.now-price .symbol { + display: inline; + margin: 0 .267vw 0 0; +} + +.now-price.__normal .buck { + display: inline; + font-size: 4.8vw; +} + +.cent { + display: inline; +} + +.now-price .qi { + display: inline; + margin: 0 0 0 .267vw; +} + +.old-price { + color: #9b9b9b; + font-family: DIN; + font-size: 3.2vw; + text-decoration: line-through; +} + +.vip-price-wrap { + height: 3.467vw; +} + +.issaled { + align-items: center; + background: rgba(0,0,0,.4); + border-radius: 5px; + display: flex; + height: 100%; + justify-content: center; + left: 0; + position: absolute; + top: 0; + width: 100%; +} + +.issaled image { + height: 120rpx; + width: 120rpx; +} + +.hover { + background: transparent; +} \ No newline at end of file diff --git a/pages/goodsDetails/shopAdd/shopAdd.js b/pages/goodsDetails/shopAdd/shopAdd.js new file mode 100644 index 0000000..a2108a4 --- /dev/null +++ b/pages/goodsDetails/shopAdd/shopAdd.js @@ -0,0 +1,21 @@ +Component({ + properties: { + merchantList: Array + }, + data: {}, + methods: { + call: function(t) { + var e = t.currentTarget.dataset.tel; + wx.makePhoneCall({ + phoneNumber: e + }); + }, + toMap: function(t) { + var e = t.currentTarget.dataset, a = e.latitude, n = e.longitude; + wx.openLocation({ + latitude: a, + longitude: n + }); + } + } +}); \ No newline at end of file diff --git a/pages/goodsDetails/shopAdd/shopAdd.json b/pages/goodsDetails/shopAdd/shopAdd.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/pages/goodsDetails/shopAdd/shopAdd.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/goodsDetails/shopAdd/shopAdd.wxml b/pages/goodsDetails/shopAdd/shopAdd.wxml new file mode 100644 index 0000000..6fa4179 --- /dev/null +++ b/pages/goodsDetails/shopAdd/shopAdd.wxml @@ -0,0 +1,24 @@ + + + + + + + {{item.name}} + 营业时间:{{item.customerservice}} + + 商家电话:{{item.tel}} + + 拨打 + + + {{item.address}} + + 导航 + + + + + + + diff --git a/pages/goodsDetails/shopAdd/shopAdd.wxss b/pages/goodsDetails/shopAdd/shopAdd.wxss new file mode 100644 index 0000000..5ad521e --- /dev/null +++ b/pages/goodsDetails/shopAdd/shopAdd.wxss @@ -0,0 +1,73 @@ +.info-wrap { + border-top: 2.667vw solid #f8f8f8; + padding: 0 4vw 5.333vw; +} + +.business-info { + font-size: 4.267vw; +} + +.business-info .title { + color: #2a2a2a; + display: inline-block; + font-size: 4.8vw; + font-weight: 500; + padding: 4.267vw 0; + vertical-align: top; +} + +.business-info .shopinfo-item,.business-info-time-range { + color: #787878; + font-size: 3.733vw; + margin-top: 2.133vw; +} + +.business-info .shopinfo-item { + -ms-flex-line-pack: center; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + align-content: center; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + justify-content: space-between; +} + +.business-info .shopinfo-item .btn { + -ms-flex-negative: 0; + align-items: center; + background: #fff; + border: 1px solid #eb5252; + border-radius: 2.667vw; + color: #eb5252; + display: inline-flex; + flex-shrink: 0; + font-size: 3.2vw; + height: 5.333vw; + justify-content: center; + line-height: 5.333vw; + text-align: center; + width: 13.6vw; +} + +.business-info .shopinfo-item .shop-address { + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + display: -webkit-box; + overflow: hidden; + text-overflow: ellipsis; + width: 68.133vw; + word-break: break-all; +} + +.location,.phone { + height: 24rpx; + margin-right: 6rpx; + width: 24rpx; +} + +.location { + height: 26rpx; + width: 26rpx; +} \ No newline at end of file diff --git a/pages/goodsSearch/goodsSearch.js b/pages/goodsSearch/goodsSearch.js new file mode 100644 index 0000000..3ee570e --- /dev/null +++ b/pages/goodsSearch/goodsSearch.js @@ -0,0 +1,112 @@ +var t = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), a = require("../../@babel/runtime/helpers/toConsumableArray"), e = require("../../@babel/runtime/helpers/slicedToArray"), i = require("../../@babel/runtime/helpers/asyncToGenerator"), s = (getApp(), +require("../../utils/login.js")); + +Page({ + data: { + kw: "", + historyList: [], + data: [] + }, + onLoad: function(t) { + var a = this; + wx.getStorage({ + key: "historyList", + success: function(t) { + console.log(t), "getStorage:ok" == t.errMsg && a.setData({ + historyList: t.data + }); + } + }); + }, + onReachBottom: function() { + this.getData(); + }, + onShareAppMessage: function() {}, + onUnload: function() { + this.data.historyList.length > 0 && wx.setStorage({ + key: "historyList", + data: this.data.historyList + }); + }, + input: function(t) { + this.setData({ + kw: t.detail.value + }); + }, + submit: function() { + if ("" == this.data.kw.trim()) return wx.showToast({ + title: "请输入关键字", + icon: "none" + }), !1; + this.setData({ + loading: !1, + page: 1 + }); + var t = this.data.historyList.indexOf(this.data.kw); + t > -1 && this.data.historyList.splice(t, 1), this.data.historyList.unshift(this.data.kw), + this.setData({ + historyList: this.data.historyList + }), this.getData(); + }, + getData: function() { + var r = this; + return i(t.default.mark(function i() { + var n, o; + return t.default.wrap(function(t) { + for (;;) switch (t.prev = t.next) { + case 0: + if (!r.data.loading && r.data.page && "" != r.data.kw.trim()) { + t.next = 2; + break; + } + return t.abrupt("return", !1); + + case 2: + return r.setData({ + loading: !0 + }), r, t.prev = 4, t.next = 7, s.request(s.baseUrl + "shop/search", { + keyword: r.data.kw + }, !0); + + case 7: + n = t.sent, o = n.data, console.log("data,data", o), o.data.length < o.limit ? r.data.page = 0 : r.data.page += 1, + o.data.forEach(function(t) { + var a = t.price.split("."), i = e(a, 2); + t.price_buck = i[0], t.price_cent = i[1]; + }), r.setData({ + loading: !1, + page: r.data.page, + data: [].concat(a(r.data.data), a(o.data)) + }), t.next = 18; + break; + + case 15: + t.prev = 15, t.t0 = t.catch(4), console.log(t.t0); + + case 18: + case "end": + return t.stop(); + } + }, i, null, [ [ 4, 15 ] ]); + }))(); + }, + selectKw: function(t) { + this.setData({ + kw: t.currentTarget.dataset.kw + }), this.submit(); + }, + clearHistory: function() { + var t = this; + wx.showModal({ + title: "提示", + content: "清空后不能恢复哦~", + success: function(a) { + 1 == a.confirm && (t.setData({ + historyList: [] + }), wx.removeStorage({ + key: "historyList" + })); + } + }); + } +}); \ No newline at end of file diff --git a/pages/goodsSearch/goodsSearch.json b/pages/goodsSearch/goodsSearch.json new file mode 100644 index 0000000..0ca5d62 --- /dev/null +++ b/pages/goodsSearch/goodsSearch.json @@ -0,0 +1,6 @@ +{ + "navigationBarTitleText": "聚美汽服", + "usingComponents": { + "recomond-list": "../goodsDetails/recomondList/recomondList" + } +} \ No newline at end of file diff --git a/pages/goodsSearch/goodsSearch.wxml b/pages/goodsSearch/goodsSearch.wxml new file mode 100644 index 0000000..0005b56 --- /dev/null +++ b/pages/goodsSearch/goodsSearch.wxml @@ -0,0 +1,24 @@ + + + + + + + + + + + + 历史记录 + + + + + {{item}} + + + + + + 正在加载... + diff --git a/pages/goodsSearch/goodsSearch.wxss b/pages/goodsSearch/goodsSearch.wxss new file mode 100644 index 0000000..5dae21e --- /dev/null +++ b/pages/goodsSearch/goodsSearch.wxss @@ -0,0 +1,113 @@ +.top { + background-color: #06a2b3; + padding: 4vw; +} + +.top .search { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + color: #fff; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + height: 10.667vw; + overflow: hidden; + position: relative; +} + +.top .search input { + background: hsla(0,0%,96%,.3); + border: none; + border-radius: 5.333vw; + color: #fff; + font-size: 3.733vw; + font-weight: 500; + height: 100%; + line-height: 10.667vw; + padding-left: 12.8vw; + padding-right: 12vw; + width: 100%; +} + +.placeholder { + color: #fff; +} + +.top .search .icon-search { + font-size: 4.267vw; + left: 5.333vw; + position: absolute; + top: 50%; + transform: translateY(-50%); +} + +.message { + background-color: #fff; + bottom: 0; + left: 0; + padding: 9.333vw 2.933vw 2.933vw; + position: fixed; + right: 0; + top: 18.667vw; + z-index: 106; +} + +.message .title { + color: #787878; + font-size: 3.467vw; + font-weight: 500; + line-height: 4vw; + position: relative; +} + +.tag-list { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + flex-wrap: wrap; + margin-bottom: 5.333vw; + margin-top: 4vw; +} + +.tag-list .tag { + background-color: #f6f6f6; + border-radius: 3.733vw; + color: #2a2a2a; + font-size: 3.467vw; + font-weight: 500; + height: 7.467vw; + line-height: 7.467vw; + margin: 0 .933vw 3.2vw 1.067vw; + padding-left: 3.2vw; + padding-right: 3.2vw; +} + +.delete { + height: 60rpx; + position: absolute; + right: -15rpx; + top: -15rpx; + width: 60rpx; +} + +.delete image { + height: 40rpx; + margin: 10rpx; + width: 40rpx; +} + +.goods-list { + border-top: 2.667vw solid #f8f8f8; + padding: 0 4vw 5.333vw; +} + +.loading { + background: #fafafa; + color: #969799; + font-size: 14px; + line-height: 50px; + text-align: center; +} \ No newline at end of file diff --git a/pages/index/index.js b/pages/index/index.js new file mode 100644 index 0000000..c8609af --- /dev/null +++ b/pages/index/index.js @@ -0,0 +1,275 @@ +var e = getApp(), t = require("../../utils/login.js"); + +Page({ + data: { + showLoding: !0, + urlList: [ { + img: "https://jm-static.v0750.com/image/you.png", + name: "充值赠送", + dsc: "你的信任,我的回馈", + url: "voucher/voucher", + needlogin: !0 + }, { + img: "https://jm-static.v0750.com/image/juan.png", + name: "我的卡券", + dsc:"卡券集中地", + url: "washCodeList/washCodeList", + needlogin: !0 + }, { + img: "https://jm-static.v0750.com/image/xi.png", + name: "洗车教程", + dsc:"规范洗车,轻松安全", + url: "webview/webview?url=https://jmqf.v0750.com/video", + needlogin: !1 + }, { + img: "https://jm-static.v0750.com/image/dui.png", + name: "团购兑换", + dsc:"抖音、美团", + url: "duiquan/duiquan", + needlogin: !0 + }, { + img: "https://jm-static.v0750.com/image/member.png", + name: "会员中心", + dsc:"充值,消费明细", + url: "user/user", + needlogin: !0 + }, { + img: "https://jm-static.v0750.com/image/kefu.png", + name: "联系客服", + dsc:"拨打客服电话", + url: "", + showimg: !0 + } ], + wangdianList: [{ + name:"三和大道店", + liangdian: [ + {"name":"券","ys":"#FF6600"}, + {"name":"PA壶","ys":"#37CE05"}, + {"name":"人工帮洗","ys":"#0056A3"}, + {"name":"轮胎打气","ys":"#08AFDE"}, + ], + tag:"冲水|泡沫|吸尘|吹气|洗手", + ads:"会城帝临南路18号", + yingye:"24小时", + juli:"12.68KM", + bili: "83%", + jiqi_zs: 12, + jiqi_kx: 10 + },{ + name:"三和大道店", + liangdian: [ + {"name":"券","ys":"#FF6600"}, + {"name":"PA壶","ys":"#37CE05"}, + {"name":"人工帮洗","ys":"#0056A3"}, + {"name":"轮胎打气","ys":"#08AFDE"}, + ], + tag:"冲水|泡沫|吸尘|吹气|洗手", + ads:"会城帝临南路18号", + yingye:"24小时", + juli:"12.68KM", + bili: "43%", + jiqi_zs: 12, + jiqi_kx: 5 + },{ + name:"三和大道店", + liangdian: [ + {"name":"券","ys":"#FF6600"}, + {"name":"PA壶","ys":"#37CE05"}, + {"name":"人工帮洗","ys":"#0056A3"}, + {"name":"轮胎打气","ys":"#08AFDE"}, + ], + tag:"冲水|泡沫|吸尘|吹气|洗手", + ads:"会城帝临南路18号", + yingye:"24小时", + juli:"12.68KM", + bili: "13%", + jiqi_zs: 12, + jiqi_kx: 5 + },{ + name:"三和大道店", + liangdian: [ + {"name":"券","ys":"#FF6600"}, + {"name":"PA壶","ys":"#37CE05"}, + {"name":"人工帮洗","ys":"#0056A3"}, + {"name":"轮胎打气","ys":"#08AFDE"}, + ], + tag:"冲水|泡沫|吸尘|吹气|洗手", + ads:"会城帝临南路18号", + yingye:"24小时", + juli:"12.68KM", + bili: "53%", + jiqi_zs: 12, + jiqi_kx: 5 + }], + servicetel: "", + notice: "", + noticeurl: null, + banner: [], + isScan: !1, + user: {}, + tmplIds: [], + joinUs: "", + tabStatus: { + coupon: !1, + shop: !1 + } + }, + bindViewTap: function() { + wx.navigateTo({ + url: "../logs/logs" + }); + }, + onLoad: function() { + wx.showLoading({ + title: "" + }); + var a = this; + t.pageStart(e).then(function(t) { + a.getData(), a.setData({ + servicetel: e.globalData.servicetel, + isScan: !!e.globalData.devicecode + }); + }); + }, + getData: function() { + var a = this; + t.request(e.globalData.config.home, {}, !0).then(function(e) { + // a.data.urlList[1].url = e.data.tabStatus.shop ? "mall/mall" : "", a.setData({ + a.setData({ + banner: e.data.banner, + user: e.data.user, + tmplIds: e.data.tmplIds, + joinUs: e.data.joinUs, + notice: e.data.notice, + noticeurl: e.data.noticeurl, + tabStatus: e.data.tabStatus, + // urlList: e.data.urlList + }, function() { + wx.hideLoading(), 0 == e.data.banner.length ? a.setData({ + showLoding: !1 + }) : setTimeout(function() { + a.setData({ + showLoding: !1 + }); + }, 50); + }); + }); + }, + load: function(e) { + console.log(e); + var t = e.currentTarget.dataset.index, a = this.data.swiperWidth * e.detail.height / e.detail.width; + this.data.banner[t].height = a, this.setData({ + swiperHeight: a + }); + }, + onShow: function() { + this.setData({ + isScan: !!e.globalData.devicecode || this.data.isScan + }), e.globalData.config && e.globalData.config.home && (this.getData(), this.isneedUpload = !1); + }, + toPage: function(t) { + console.info(t); + var a = t.currentTarget.dataset, i = a.url, o = a.needlogin, n = a.showimg; + if (console.log("showImg", n), i) { + this.isneedUpload = !0; + if (o && !e.globalData.user.session) return this.isneedUpload = !0, wx.navigateTo({ + url: "/pages/login/login" + }), e.globalData.needJumpUrl = "/pages/".concat(i), !1; + wx.navigateTo({ + url: "/pages/".concat(i) + }), this.isneedUpload = !0; + } else { + if (!n) return !1; + wx.previewImage({ + urls: [ this.data.joinUs ] + }); + } + }, + toScan: function() { + e.globalData.needJumpUrl = !1; + var a = this; + wx.scanCode({ + success: function(i) { + console.log(i), wx.showLoading({ + title: "" + }), e.globalData.qrcode = i.result, t.request("https://jmqf.v0750.com/miniprogram/identify", i, !0).then(function(t) { + console.log("data", t), wx.hideLoading(), e.globalData.devicecode = t.data.devicecode || e.globalData.devicecode, + a.setData({ + isScan: !!t.data.devicecode + }); + }).catch(function(e) { + wx.hideLoading(); + }); + } + }); + }, + isSubmit: !1, + isneedUpload: !1, + isshowModal: !1, + needUpload: function() { + this.isneedUpload = !0; + }, + toStart: function() { + e.globalData.needJumpUrl = !1, this.isneedUpload = !0; + var t = this; + if (console.log("this.isSubmit", this.isSubmit), this.isSubmit) return !1; + if (t.data.user.money <= 0) return t.startup(), !1; + if (t.data.user.money < 10) { + if (this.isshowModal) return t.startup(), !1; + this.isshowModal = !0, wx.showModal({ + title: "提示", + content: "账户余额小于10元,是否立即充值?", + confirmText: "去充值", + cancelText: "立即启动", + success: function(e) { + e.confirm ? (wx.navigateTo({ + url: "/pages/voucher/voucher" + }), t.isneedUpload = !0) : t.startup(); + }, + fail: function(e) { + console.log("fail:", e); + } + }); + } else t.startup(); + }, + startup: function() { + var a = this; + wx.showModal({ + title: "提示", + content: "你当前将要使用的机器编号是:".concat(e.globalData.devicecode, ",确认开机吗?"), + success: function(i) { + i.confirm && (a.isSubmit = !0, wx.showLoading({ + title: "正在启动" + }), t.request(e.globalData.config.machine.startup, { + washcode: a.data.selectID + }, !0).then(function(e) { + a.isSubmit = !1, wx.hideLoading(), 200 == e.code && (wx.showModal({ + title: "", + content: e.message + }), a.data.tmplIds.length > 0 && a.requestSubscribeMessage(), wx.redirectTo({ + url: "/pages/user/user" + }), a.isneedUpload = !0), 888 == e.code && (wx.navigateTo({ + url: "/pages/voucher/voucher" + }), a.isneedUpload = !0); + }).catch(function(e) { + a.isSubmit = !1, wx.hideLoading(); + })); + }, + fail: function(e) { + console.log("fail:", e); + } + }); + }, + requestSubscribeMessage: function() { + wx.requestSubscribeMessage({ + tmplIds: this.data.tmplIds, + success: function(e) { + console.log("requestSubscribeMessage", e), t.request("https://jmqf.v0750.com/miniprogram/index/newtmpl", e, !0).then(function(e) {}).catch(function(e) {}); + }, + fail: function(e) { + console.log("requestSubscribeMessagefail", e); + } + }); + }, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/index/index.json b/pages/index/index.json new file mode 100644 index 0000000..74fc9aa --- /dev/null +++ b/pages/index/index.json @@ -0,0 +1,10 @@ +{ + "navigationBarTitleText": "聚美汽服", + "usingComponents": { + "service-tel": "../../template/serviceTel/serviceTel", + "my-money": "../../template/myMoney/myMoney", + "head-swiper": "../../template/headSwiper/headSwiper", + "page-loding": "../../template/pageLoding/pageLoding" + }, + "navigationStyle":"custom" +} \ No newline at end of file diff --git a/pages/index/index.wxml b/pages/index/index.wxml new file mode 100644 index 0000000..f8595eb --- /dev/null +++ b/pages/index/index.wxml @@ -0,0 +1,17 @@ + + + + + + + + + {{notice}} + + + + + + 扫码启动 + 立即启动 + diff --git a/pages/index/index.wxss b/pages/index/index.wxss new file mode 100644 index 0000000..5602648 --- /dev/null +++ b/pages/index/index.wxss @@ -0,0 +1,160 @@ +.container { + box-sizing: border-box; + min-height: 100vh; + padding: 0 0 170rpx; +} + +.money-box { + margin: 0 27rpx; +} + +.money { + padding: 0 0 0; +} + +.start-btn-box { + bottom: 0; + box-sizing: border-box; + display: flex; + height: 106rpx; + left: 0; + padding: 0 10rpx; + position: fixed; + width: 100vw; +} + +.start-btn-box .scan-btn { + align-items: center; + border-radius: 5px; + display: flex; + flex: 1; + justify-content: center; + position: static; +} + +.start-btn-box .scan-subscribe { + margin-right: 10rpx; +} + +.index-wangdian-list { + padding: 0 28rpx 28rpx; +} + +.index-wangdian-title { + line-height: 70rpx; + padding: 10rpx 0; + position: relative; +} + +.index-wangdian-title .title_c { + font-size: 36rpx; + color: #0056A3; +} + +.index-wangdian-title .title_c .line { + position: absolute; + bottom: 12rpx; + left: 18rpx; + height: 10rpx; + width: 15%; + border-radius: 20rpx; + background-color: #0056A3; +} + +.index-wangdian-title .more { + position: absolute; + right: 0; + font-size: 24rpx; + color: #999; +} + +.index-wangdian-box { + overflow: hidden; + padding: 20rpx; + border-radius: 20rpx; + background-color: #fff; + box-shadow: 0 6rpx 10rpx rgba(0, 0, 0, .4); + position: relative; + margin-bottom: 30rpx; +} + +.index-wangdian-box .info { + position: relative; +} + +.index-wangdian-box .info .title_c { + display: inline-block; + font-size: 36rpx; + line-height: 48rpx; + margin-bottom: 10rpx; +} + +.index-wangdian-box .info .title .ld { + display: inline-block; + font-size: 24rpx; + line-height: 36rpx; + height: 32rpx; + color: #fff; + border-radius: 10rpx; + padding: 0 6rpx; + margin-left: 6rpx; +} + +.index-wangdian-box .info .tag, .index-wangdian-box .info .ads { + font-size: 28rpx; + line-height: 2; + color: #999; +} + +.index-wangdian-box .info .jiqi { + font-size: 24rpx; + line-height: 2; + color: #37CE05; +} + +.index-wangdian-box .info .yingye { + position: absolute; + right: -20rpx; + top: -20rpx; + color: #fff; + background-color: #0056A3; + font-size: 24rpx; + padding: 0 12rpx; + line-height: 36rpx; + border-radius: 0 0 0 20rpx; +} + +.index-wangdian-box .info .dw { + position: absolute; + right: 20rpx; + bottom: 25rpx; + height: 120rpx; + width: 120rpx; + font-size: 24rpx; + color: #0056A3; + text-align: center; +} + +.index-wangdian-box .info .dw .ico { + font-size: 80rpx; +} + +.index-wangdian-box .xian { + position: absolute; + width: 100%; + bottom: 0; + left: 0; + /* color: #fff; */ + font-size: 22rpx; + height: 6rpx; + background-color: #0056A3; +} + +.index-wangdian-box .xian .bili { + position: absolute; + height: 6rpx; + bottom: 0; + right: 0; + display: block; + background-color: #37CE05; +} \ No newline at end of file diff --git a/pages/listDetail/listDetail.js b/pages/listDetail/listDetail.js new file mode 100644 index 0000000..2c61e29 --- /dev/null +++ b/pages/listDetail/listDetail.js @@ -0,0 +1,71 @@ +var t = getApp(), e = require("../../utils/login.js"); + +Page({ + data: { + showLoding: !0, + type: "", + list: [], + loading: !1, + page: { + next_page: 1 + } + }, + onLoad: function(a) { + var n = this; + this.setData({ + type: a.type + }), wx.setNavigationBarTitle({ + title: "invest" == a.type ? "充值记录" : "消费明细" + }), e.pageStart(t).then(function(t) { + n.getContent(); + }); + }, + onShow: function() { + this.refresh && this.refreshPage(); + }, + refreshPage: function() { + this.setData({ + list: [], + page: { + next_page: 1 + } + }), this.getContent(); + }, + onPullDownRefresh: function() { + if (!t.globalData.canGetData) return !1; + this.refreshPage(), wx.stopPullDownRefresh(); + }, + onReachBottom: function() { + if (!t.globalData.canGetData) return !1; + this.getContent(); + }, + onShareAppMessage: function() {}, + getContent: function() { + if (!this.data.page.next_page || this.data.loading) return !1; + wx.showLoading({ + title: "" + }); + var a = this, n = "invest" == this.data.type ? t.globalData.config.recharge.log : t.globalData.config.consume.init; + e.request(n, { + page: this.data.page.next_page + }, !0).then(function(t) { + if (wx.hideLoading(), 200 != t.code) return wx.showModal({ + title: "提示", + content: t.message + }), !1; + a.setData({ + showLoding: !1, + list: a.data.list.concat(t.data.list), + user: t.data.user, + page: t.data.page + }, function() {}); + }).catch(function(t) { + wx.hideLoading(); + }); + }, + toPage: function() { + this.refresh = 1, wx.navigateTo({ + url: "/pages/voucher/voucher" + }); + } +}); \ No newline at end of file diff --git a/pages/listDetail/listDetail.json b/pages/listDetail/listDetail.json new file mode 100644 index 0000000..120fe5d --- /dev/null +++ b/pages/listDetail/listDetail.json @@ -0,0 +1,9 @@ +{ + "navigationBarTitleText": "聚美汽服", + "enablePullDownRefresh": true, + "usingComponents": { + "service-tel": "../../template/serviceTel/serviceTel", + "my-money": "../../template/myMoney/myMoney", + "page-loding": "../../template/pageLoding/pageLoding" + } +} \ No newline at end of file diff --git a/pages/listDetail/listDetail.wxml b/pages/listDetail/listDetail.wxml new file mode 100644 index 0000000..f09b21b --- /dev/null +++ b/pages/listDetail/listDetail.wxml @@ -0,0 +1,21 @@ + + + + + + + + {{item.message}} + + {{item.timestamp}} + {{item.symbol}}{{item.amount}} + + + + + + 暂无相关数据 + + + 立即充值 + diff --git a/pages/listDetail/listDetail.wxss b/pages/listDetail/listDetail.wxss new file mode 100644 index 0000000..1b73093 --- /dev/null +++ b/pages/listDetail/listDetail.wxss @@ -0,0 +1,46 @@ +.container { + background: #fafafa; + box-sizing: border-box; + min-height: 100vh; + padding: 0rpx 0 40rpx; +} + +.voucher-container { + padding-bottom: 170rpx; +} + +.money { + margin: 36rpx 27rpx 0; +} + +.list-box { + padding: 18rpx 27rpx 48rpx; +} + +.item { + background: #fff; + border-bottom: 1px solid #eee; + padding: 16rpx 20rpx 12rpx 18rpx; +} + +.item .name { + color: #666; + font-size: 26rpx; + margin-bottom: 4rpx; +} + +.item .footer { + align-items: flex-end; + color: #999; + display: flex; + justify-content: space-between; +} + +.item .footer .time { + display: inline-flex; + font-size: 22rpx; +} + +.item .footer .num { + font-size: 33rpx; +} \ No newline at end of file diff --git a/pages/login/login.js b/pages/login/login.js new file mode 100644 index 0000000..48f4ef1 --- /dev/null +++ b/pages/login/login.js @@ -0,0 +1,59 @@ +var e = getApp(), o = require("../../utils/login.js"); + +Page({ + data: { + logs: [], + isnotInfo: 2 + }, + fromPage: "", + onLoad: function(e) { + var o = this; + this.fromPage = e.fromPage, wx.getUserInfo({ + success: function(e) { + o.setData({ + isnotInfo: 2 + }), o.userInfo = e; + } + }); + }, + onGotUserInfo: function(e) { + "getUserInfo:ok" == e.detail.errMsg ? (this.setData({ + isnotInfo: 2 + }), this.userInfo = e.detail) : wx.redirectTo({ + url: "/pages/login/login" + }); + }, + userInfo: {}, + toAuthorization: function(t, a) { + var n = Object.assign(this.userInfo, t, { + code: a + }); + o.request(e.globalData.config.authorization, n, !0).then(function(o) { + if (wx.hideLoading(), console.log("toAuthorization", "app.globalData.needJumpUrl", e.globalData.needJumpUrl, o), + 200 != o.code) return wx.showModal({ + title: "提示", + content: o.message + }), !1; + wx.setStorageSync("session", o.data.session), wx.showToast({ + title: o.message, + icon: "none" + }), e.globalData.user = o.data, e.globalData.isneedUpload = !0, e.globalData.needJumpUrl ? wx.redirectTo({ + url: e.globalData.needJumpUrl + }) : wx.navigateBack({}); + }).catch(function(e) { + wx.hideLoading(); + }); + }, + ongetPhoneNumber: function(o) { + console.log("ongetPhoneNumber", o); + var t = this; + if ("getPhoneNumber:ok" == o.detail.errMsg) return wx.login({ + success: function(a) { + e.globalData.code = a.code, t.toAuthorization(o.detail, a.code); + } + }), !1; + wx.redirectTo({ + url: "/pages/login/login" + }); + } +}); \ No newline at end of file diff --git a/pages/login/login.json b/pages/login/login.json new file mode 100644 index 0000000..9f7c42c --- /dev/null +++ b/pages/login/login.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "聚美汽服", + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/login/login.wxml b/pages/login/login.wxml new file mode 100644 index 0000000..045a0d7 --- /dev/null +++ b/pages/login/login.wxml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/pages/login/login.wxss b/pages/login/login.wxss new file mode 100644 index 0000000..da31742 --- /dev/null +++ b/pages/login/login.wxss @@ -0,0 +1,57 @@ +.container { + background: #fff; + height: 100vh; + overflow: hidden; +} + +.container,.login-bg { + width: 100vw; +} + +.yellow-bg { + background: #f5c82e; + height: 83vh; + transform: rotateZ(-45deg); + transform-origin: right top; + width: 187vw; + z-index: 1; +} + +.car,.yellow-bg { + bottom: 0; + position: fixed; + right: 0; +} + +.car { + height: 643rpx; + width: 557rpx; + z-index: 2; +} + +.logo { + height: 192rpx; + top: 180rpx; + width: 192rpx; + z-index: 2; +} + +.btn,.logo { + left: 50%; + position: fixed; + transform: translateX(-50%); +} + +.btn { + background-color: #1baa1c; + border: 1px solid #218721; + border-radius: 9rpx; + bottom: 360rpx; + color: #fff; + font-size: 33rpx; + height: 95rpx; + line-height: 95rpx; + text-align: center; + width: 403rpx; + z-index: 11; +} \ No newline at end of file diff --git a/pages/mall/activeWindow/activeWindow.js b/pages/mall/activeWindow/activeWindow.js new file mode 100644 index 0000000..a4a9be6 --- /dev/null +++ b/pages/mall/activeWindow/activeWindow.js @@ -0,0 +1,7 @@ +Component({ + properties: { + hotsale: Boolean + }, + data: {}, + methods: {} +}); \ No newline at end of file diff --git a/pages/mall/activeWindow/activeWindow.json b/pages/mall/activeWindow/activeWindow.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/pages/mall/activeWindow/activeWindow.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/mall/activeWindow/activeWindow.wxml b/pages/mall/activeWindow/activeWindow.wxml new file mode 100644 index 0000000..230970c --- /dev/null +++ b/pages/mall/activeWindow/activeWindow.wxml @@ -0,0 +1,50 @@ + + + + + + 距结束剩余 + 82 + + 06 + : + 17 + : + 44 + + + + + + + + + + + + + + 【蓬江】地道粤菜!138元起购「顺颐居酒家」3-4人套餐!盐焗鹅+生鱼捞起+生炒糯米饭....... + + + + + + ¥ + 138 + + + + + + + + + 立即抢购 + + × + + + + + diff --git a/pages/mall/activeWindow/activeWindow.wxss b/pages/mall/activeWindow/activeWindow.wxss new file mode 100644 index 0000000..80fd029 --- /dev/null +++ b/pages/mall/activeWindow/activeWindow.wxss @@ -0,0 +1,250 @@ +.alert-active { + background: rgba(0,0,0,.5); + height: 100vh; + left: 0; + position: fixed; + top: 0; + width: 100vw; +} + +.alert-active .inner { + height: 74.667vw; + left: 50%; + margin: 0 auto; + position: fixed; + top: 50%; + transform: translate(-50%,-50%); + width: 82.4vw; +} + +.content-inner { + position: relative; +} + +.bg { + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} + +.hotsale-popup { + height: 74.667vw; + margin: 0 auto; + position: relative; + width: 82.4vw; +} + +.hotsale-popup .bg { + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} + +.hotsale-popup .countdowns { + color: #2a2a2a; + font-family: DIN; + font-size: 3.2vw; + left: 0; + line-height: 4.267vw; + position: absolute; + text-align: center; + top: 18.667vw; + width: 100%; +} + +.countdown { + display: inline-block; +} + +.hotsale-popup .countdowns .time-item { + background-color: #cc5335; + border-radius: .533vw; + box-sizing: border-box; + color: #fff; + display: inline; + font-family: DIN; + font-size: 3.2vw; + height: 8.533vw; + line-height: 4.267vw; + margin-left: .533vw; + margin-right: .533vw; + min-width: 8.533vw; + padding: 0 .533vw; +} + +.separator { + display: inline-block; +} + +.hotsale-popup .content { + top: 27.2vw; + width: 74.667vw; +} + +.hotsale-popup .btn,.hotsale-popup .content { + left: 0; + margin: 0 auto; + position: absolute; + right: 0; +} + +.hotsale-popup .btn { + bottom: 0; + color: #c8484c; + font-size: 4vw; + height: 12vw; + line-height: 12vw; + text-align: center; + width: 54.133vw; +} + +.hotsale-goods { + background-color: #fff; + border: .533vw solid #c8484c; + border-radius: 2.133vw; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + padding: 2.667vw; +} + +.hotsale-goods .hd { + -webkit-box-flex: 21.333vw; + border-radius: 1.067vw; + flex: 21.333vw 0 0; + margin: 0 2.667vw 0 0; + overflow: hidden; + width: 21.333vw; +} + +.image-box,.image-box.__100 { + background-color: #ebebeb; + height: 0; + overflow: hidden; + position: relative; +} + +.image-box.__100 { + padding-top: 100%; +} + +.image-box image { + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} + +.hotsale-goods .bd { + -ms-flex-pack: justify; + -webkit-box-flex: 1; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + flex: 1; + flex-direction: column; + margin: -.533vw 0 -.8vw; +} + +.hotsale-goods .bd,.hotsale-goods .bd ._btm { + -webkit-box-pack: justify; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + justify-content: space-between; +} + +.hotsale-goods .bd,.hotsale-goods .bd ._btm { + -ms-flex-pack: justify; +} + +.title { + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + color: #222; + display: -webkit-box; + font-size: 3.733vw; + height: 2.6em; + line-height: 1.4em; + margin: 0 0 .2em; + overflow: hidden; + text-overflow: ellipsis; + word-break: break-all; +} + +.hotsale-goods .bd ._btm { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} + +.buck,.symbol { + display: inline-block; +} + +.likes { + color: #969696; + font-size: 3.2vw; +} + +.hotsale-goods .tag { + border-radius: .533vw; + display: inline-block; + font-size: 3.2vw; + line-height: 4.8vw; + padding: 0 1.333vw; + vertical-align: top; +} + +.hotsale-goods .tip { + color: #969696; + display: inline-block; + font-size: 3.2vw; +} + +.hotsale-goods .price { + color: #eb5252; + display: inline-block; + font-size: 3.2vw; +} + +.now-price.__normal .buck { + display: inline-block; + font-size: 4.8vw; +} + +.now-price .symbol { + display: inline-block; + margin: 0 .267vw 0 0; +} + +.hotsale-popup .closebtn { + border: .4vw solid #f8f8f8; + border-radius: 50%; + color: #fff; + font-size: 4vw; + height: 8vw; + left: 50%; + line-height: 8vw; + margin: 5.333vw 0 0; + position: absolute; + text-align: center; + top: 100%; + transform: translateX(-50%); + width: 8vw; +} + +.icon-close2 { + align-content: center; + align-items: center; + display: flex; + font-size: 7vw; + justify-content: center; + line-height: 7vw; +} \ No newline at end of file diff --git a/pages/mall/goodsList/goodsList.js b/pages/mall/goodsList/goodsList.js new file mode 100644 index 0000000..7888221 --- /dev/null +++ b/pages/mall/goodsList/goodsList.js @@ -0,0 +1,8 @@ +Component({ + properties: { + list: Array, + isdistance: Boolean + }, + data: {}, + methods: {} +}); \ No newline at end of file diff --git a/pages/mall/goodsList/goodsList.json b/pages/mall/goodsList/goodsList.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/pages/mall/goodsList/goodsList.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/mall/goodsList/goodsList.wxml b/pages/mall/goodsList/goodsList.wxml new file mode 100644 index 0000000..a01cdb5 --- /dev/null +++ b/pages/mall/goodsList/goodsList.wxml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + {{item.name}} + + {{item.companyname}} + {{item.distance}}km + + + + + + ¥ + {{item.price_buck}}. + {{item.price_cent}} + + + ¥{{item.marketprice}} + + + + 立即抢购 + 已售罄 + + + + + + + diff --git a/pages/mall/goodsList/goodsList.wxss b/pages/mall/goodsList/goodsList.wxss new file mode 100644 index 0000000..55cf3a3 --- /dev/null +++ b/pages/mall/goodsList/goodsList.wxss @@ -0,0 +1,218 @@ +.match-wrap { + border-top: 2.667vw solid #f8f8f8; +} + +.goods-match { + background-color: #fff; + border-radius: 2.133vw; + display: block; + padding: 12vw 3.6vw 3.6vw; + position: relative; +} + +.goods-match .til { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + background-color: #06a2b3; + border-radius: .533vw 2.933vw 2.933vw .533vw; + color: #fff; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + font-size: 3.2vw; + height: 5.867vw; + left: -.267vw; + padding-left: 1.467vw; + position: absolute; + top: 2.667vw; + width: 33.333vw; +} + +.goods-match .til view { + margin-right: 1.333vw; +} + +.goods-match .item { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + margin-bottom: 1rem; +} + +.goods-match .hd { + -webkit-box-flex: 25.333vw; + border-radius: 1.6vw; + flex: 25.333vw 0 0; + height: 25.333vw; + overflow: hidden; + position: relative; + width: 25.333vw; +} + +.image-box.__100 { + padding-top: 100%; +} + +.image-box { + background-color: #ebebeb; + height: 0; + overflow: hidden; + position: relative; +} + +.image-box image { + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} + +.goods-match .bd { + -webkit-box-flex: 1; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + flex: 1; + flex-direction: column; + justify-content: space-between; + padding: 0 0 0 2.667vw; +} + +.goods-match .bd_name { + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + color: #2a2a2a; + display: -webkit-box; + font-size: 3.733vw; + height: 16vw; + line-height: 5.333vw; + overflow: hidden; + text-overflow: ellipsis; + word-break: break-all; +} + +.goods-match .bd_name.isdistance { + -webkit-line-clamp: 2; + height: 11vw; +} + +.goods-match .bd ._btm { + -webkit-box-align: end; + -ms-flex-align: end; + align-items: flex-end; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} + +.goods-match .bd ._btm_lt { + -webkit-box-flex: 1; + flex: 1; +} + +.goods-match .bd_price { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} + +.now-price { + color: #eb5252; + font-family: DIN; + font-size: 3.2vw; + line-height: 1.75em; +} + +.goods-match .bd_price .old { + color: #9b9b9b; + font-family: DIN; + font-size: 3.2vw; + margin-left: 1.333vw; + text-decoration: line-through; +} + +.goods-match .bd_btn { + background-color: #06a2b3; + border-radius: 3.333vw; + color: #fff; + font-size: 3.2vw; + height: 6.667vw; + line-height: 6.667vw; + padding: 0 3.6vw; + text-align: center; +} + +.now-price .symbol { + display: inline; + margin: 0 .267vw 0 0; +} + +.now-price.__normal .buck { + display: inline; + font-size: 4.8vw; +} + +.cent { + display: inline; +} + +.hot { + display: inline-block; + height: 13px; + margin-right: 4px; + width: 13px; +} + +.goods-match .issele { + background: #9b9b9b; +} + +.issaled { + align-items: center; + background: rgba(0,0,0,.4); + border-radius: 5px; + display: flex; + height: 100%; + justify-content: center; + left: 0; + position: absolute; + top: 0; + width: 100%; +} + +.issaled image { + height: 120rpx; + width: 120rpx; +} + +.hover { + background: transparent; +} + +.bd_shop { + -webkit-box-pack: justify; + -ms-flex-pack: justify; + color: #9b9b9b; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + font-size: 3.2vw; + justify-content: space-between; + line-height: 4.533vw; + margin: 0 0 1.6vw; +} \ No newline at end of file diff --git a/pages/mall/mall.js b/pages/mall/mall.js new file mode 100644 index 0000000..bd46c5f --- /dev/null +++ b/pages/mall/mall.js @@ -0,0 +1,235 @@ +var e = require("../../@babel/runtime/helpers/interopRequireDefault"), t = require("../../@babel/runtime/helpers/toConsumableArray"), a = e(require("../../@babel/runtime/regenerator")), n = require("../../@babel/runtime/helpers/slicedToArray"), o = require("../../@babel/runtime/helpers/asyncToGenerator"), r = (getApp(), +require("../../utils/login.js")); + +Page({ + data: { + showLoding: !0, + hotsale: !1, + banner: [], + customerService: [], + recommendedList: [], + lists: [], + share: {}, + user: {}, + tab: "new", + tabList: [ { + type: "new", + name: "最新开抢" + }, { + type: "hot", + name: "热门" + }, { + type: "shortrange", + name: "离我最近" + } ], + point: {}, + loading: !1, + count: 0, + limit: 0, + page: 1 + }, + onLoad: function(e) { + this.pageStart(); + }, + onShow: function() {}, + onPullDownRefresh: function() { + this.setData({ + lists: [], + page: 1, + loading: !1 + }), this.pageStart(), wx.stopPullDownRefresh(); + }, + onReachBottom: function() { + if (this.data.loading) return !1; + this.getgoodsList(); + }, + onShareAppMessage: function() {}, + pageStart: function() { + this.getData(), this.getgoodsList(); + }, + getData: function() { + var e = this; + return o(a.default.mark(function t() { + var o, s; + return a.default.wrap(function(t) { + for (;;) switch (t.prev = t.next) { + case 0: + return e, t.prev = 1, t.next = 4, r.request(r.baseUrl + "shop/home", {}, !0); + + case 4: + o = t.sent, (s = o.data).recommendedList.forEach(function(e) { + var t = e.price.split("."), a = n(t, 2); + e.price_buck = a[0], e.price_cent = a[1]; + }), e.setData({ + showLoding: !1, + banner: s.banner, + customerService: s.customerService, + recommendedList: s.recommendedList, + share: s.share, + user: s.user, + tabList: s.tab + }), t.next = 14; + break; + + case 10: + t.prev = 10, t.t0 = t.catch(1), console.log(t.t0), e.setData({ + showLoding: !1 + }); + + case 14: + case "end": + return t.stop(); + } + }, t, null, [ [ 1, 10 ] ]); + }))(); + }, + getgoodsList: function(e) { + var s = this; + return o(a.default.mark(function e() { + var o, i, c, u; + return a.default.wrap(function(e) { + for (;;) switch (e.prev = e.next) { + case 0: + if (o = s, !s.data.loading && 0 != s.data.page) { + e.next = 3; + break; + } + return e.abrupt("return", !1); + + case 3: + return s.setData({ + loading: !0 + }), e.prev = 4, e.next = 7, r.request(r.baseUrl + "shop/home/shopList", { + type: s.data.tab, + point: { + lng: s.longitude, + lat: s.latitude + }, + page: s.data.page + }, !0); + + case 7: + i = e.sent, (c = i.data).data.forEach(function(e) { + var t = e.price.split("."), a = n(t, 2); + e.price_buck = a[0], e.price_cent = a[1]; + }), u = c.data.length < c.limit ? 0 : s.data.page + 1, s.setData({ + loading: !1, + lists: [].concat(t(s.data.lists), t(c.data)), + count: c.count, + page: u, + limit: c.limit + }), e.next = 18; + break; + + case 14: + e.prev = 14, e.t0 = e.catch(4), console.log(e.t0), o.setData({ + loading: !1 + }); + + case 18: + case "end": + return e.stop(); + } + }, e, null, [ [ 4, 14 ] ]); + }))(); + }, + latitude: null, + longitude: null, + changeTab: function(e) { + var t = this; + return o(a.default.mark(function n() { + var o, r; + return a.default.wrap(function(a) { + for (;;) switch (a.prev = a.next) { + case 0: + if (o = e.currentTarget.dataset.tab, t, "shortrange" != o) { + a.next = 20; + break; + } + return a.prev = 3, a.next = 6, t.getlocation(); + + case 6: + if (r = a.sent, console.log("result:", r), !r) { + a.next = 14; + break; + } + t.latitude = r.latitude, t.longitude = r.longitude, t.setData({ + tab: o + }), a.next = 15; + break; + + case 14: + return a.abrupt("return", !1); + + case 15: + a.next = 20; + break; + + case 17: + a.prev = 17, a.t0 = a.catch(3), console.log(a.t0); + + case 20: + t.setData({ + tab: o, + lists: [], + page: 1, + loading: !1 + }), t.getgoodsList(); + + case 22: + case "end": + return a.stop(); + } + }, n, null, [ [ 3, 17 ] ]); + }))(); + }, + getlocation: function() { + var e = this; + return new Promise(function(t, a) { + wx.getLocation({ + type: "wgs84", + success: function(e) { + e.latitude, e.longitude; + t(e); + }, + fail: function(a) { + wx.showModal({ + title: "用户未授权", + content: "请开启相关权限,以便更好使用小程序哦!", + showCancel: !0, + success: function(a) { + a.confirm ? wx.openSetting({ + success: function(a) { + console.log("authSetting", a), a.authSetting ? wx.chooseLocation({ + success: function(a) { + e.setData({ + receiver_address: a.name + }), "" == a.name ? wx.showToast({ + title: "未选择位置", + icon: "none", + duration: 2e3 + }) : (console.log("res ok ", a), t(a)); + }, + fail: function(a) { + e.showLocationFail(), t(!1); + } + }) : (e.showLocationFail(), t(!1)); + } + }) : a.cancel; + }, + fail: function(a) { + e.showLocationFail(), t(!1); + } + }); + } + }); + }); + }, + showLocationFail: function() { + wx.showToast({ + title: "位置失败", + icon: "none", + duration: 1e3 + }); + } +}); \ No newline at end of file diff --git a/pages/mall/mall.json b/pages/mall/mall.json new file mode 100644 index 0000000..4d77216 --- /dev/null +++ b/pages/mall/mall.json @@ -0,0 +1,12 @@ +{ + "navigationBarTitleText": "聚美汽服", + "navigationBarBackgroundColor": "#06acb3", + "navigationBarTextStyle": "white", + "enablePullDownRefresh": true, + "usingComponents": { + "active-window": "./activeWindow/activeWindow", + "popular-recommendation": "./popularRecommendation/popularRecommendation", + "goods-list": "./goodsList/goodsList", + "page-loding": "../../template/pageLoding/pageLoding" + } +} \ No newline at end of file diff --git a/pages/mall/mall.wxml b/pages/mall/mall.wxml new file mode 100644 index 0000000..1a295dd --- /dev/null +++ b/pages/mall/mall.wxml @@ -0,0 +1,48 @@ + + + + + + 搜索好物 + + + + + + + + + + + + + + + + + + + + + + + + {{item.name}} + + + + 正在加载... + 没有更多了 + + diff --git a/pages/mall/mall.wxss b/pages/mall/mall.wxss new file mode 100644 index 0000000..fb5d891 --- /dev/null +++ b/pages/mall/mall.wxss @@ -0,0 +1,198 @@ +.mall-container { + position: relative; +} + +.page-header { + background: #06acb3; +} + +.search { + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-box-align: center; + -ms-flex-align: center; + background: #06acb3; + box-sizing: border-box; + color: #fff; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + justify-content: space-between; + left: 0; + padding: 2.667vw 4vw; + position: sticky; + top: 0; + width: 100%; + z-index: 3; +} + +.hd-search,.search { + align-items: center; +} + +.hd-search { + -webkit-box-flex: 1; + background-color: #fff; + border-radius: 8vw; + color: #787878; + display: inline-flex; + flex: 1; + font-size: 3.2vw; + height: 8vw; + justify-content: center; + line-height: 8vw; + padding: 0 4vw; + text-align: center; +} + +.hd-search image { + height: 32rpx; + margin: 0 1.333vw 0 0; + width: 32rpx; +} + +.user-info { + box-sizing: border-box; + color: #fff; + padding: 4vw; + width: 100vw; +} + +.user-info .not-login { + align-items: center; + box-sizing: border-box; + color: #fff; + display: flex; + font-size: 15px; + width: 100%; +} + +.user-info .avatar { + border: 1px solid #fff; + border-radius: 50%; + flex: 0 0 40px; + height: 40px; + margin-right: 8px; + width: 40px; +} + +.user-info .is-login { + display: flex; + justify-content: space-between; + width: 100%; +} + +.user-info .is-login .l { + align-items: center; + display: inline-flex; + flex: 1; + justify-content: flex-start; + padding-right: 20px; +} + +.user-info .is-login .r { + align-items: flex-end; + display: inline-flex; + flex-direction: column; + font-size: 10px; + justify-content: flex-end; +} + +.user-info .is-login .r .num { + font-family: Impact,Haettenschweiler,Arial Narrow Bold,sans-serif; + font-size: 18px; + font-weight: 400; + margin-bottom: 2px; +} + +.module-wrap { + border-color: #f4f4f4; + margin: 0 0 2.667vw; + padding: 5.333vw 0 0; +} + +.ad-wrap { + margin: -1.333vw 0 -2.667vw; + padding: 0 4vw; +} + +.ad-wrap .list1 .item:not(:last-child) { + margin: 0 0 2.667vw; +} + +.ad-wrap .inner { + border-radius: .533vw; + display: block; + overflow: hidden; + position: relative; +} + +.ad-wrap .inner image { + display: block; + height: 43.49vw; + width: 100%; +} + +.recommend-tabs { + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-box-align: end; + -ms-flex-align: end; + align-items: flex-end; + background-color: #fff; + box-sizing: border-box; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + height: 12.8vw; + justify-content: space-between; + left: 0; + padding: 2.667vw 4vw; + position: sticky; + top: 13.333vw; + z-index: 2; +} + +.recommend-tabs .item { + color: #4a4a4a; + font-size: 4vw; + line-height: 6.133vw; + padding: 0 2.667vw; + position: relative; + transition: all .3s; +} + +.recommend-tabs .item.active { + color: #2a2a2a; + font-size: 5.333vw; + font-weight: 500; + line-height: 7.467vw; +} + +.recommend-tabs .item.active:before { + background: -webkit-gradient(linear,left top,left bottom,from(#efefef),to(#f8864a)); + background: linear-gradient(180deg,#efefef,#f8864a); + border-radius: 1.067vw; + bottom: 1.067vw; + content: ""; + height: 1.067vw; + left: 2.667vw; + position: absolute; + right: 2.667vw; + z-index: -1; +} + +.loading,.van-list__error-text,.van-list__finished-text,.van-list__loading,.van-pull-refresh__head { + background: #fafafa; + color: #969799; + font-size: 14px; + line-height: 50px; + text-align: center; +} + +swiper { + height: 43.49vw; + width: 100%; +} \ No newline at end of file diff --git a/pages/mall/popularRecommendation/popularRecommendation.js b/pages/mall/popularRecommendation/popularRecommendation.js new file mode 100644 index 0000000..33126f6 --- /dev/null +++ b/pages/mall/popularRecommendation/popularRecommendation.js @@ -0,0 +1,7 @@ +Component({ + properties: { + list: Array + }, + data: {}, + methods: {} +}); \ No newline at end of file diff --git a/pages/mall/popularRecommendation/popularRecommendation.json b/pages/mall/popularRecommendation/popularRecommendation.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/pages/mall/popularRecommendation/popularRecommendation.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/mall/popularRecommendation/popularRecommendation.wxml b/pages/mall/popularRecommendation/popularRecommendation.wxml new file mode 100644 index 0000000..265c616 --- /dev/null +++ b/pages/mall/popularRecommendation/popularRecommendation.wxml @@ -0,0 +1,53 @@ + + + + 爆款推荐 + + + + + + + + + + + + + + + 已售 {{item.num_buy}} + + + + {{item.name}} + + + + + ¥ + {{item.price_buck}}. + {{item.price_cent}} + + + ¥{{item.marketprice}} + + + + + + + {{item.discount}} + + + + + + + + + + + + + diff --git a/pages/mall/popularRecommendation/popularRecommendation.wxss b/pages/mall/popularRecommendation/popularRecommendation.wxss new file mode 100644 index 0000000..b457d0c --- /dev/null +++ b/pages/mall/popularRecommendation/popularRecommendation.wxss @@ -0,0 +1,306 @@ +.module-wrap { + border-color: #f4f4f4; + margin: 0 0 2.667vw; + padding: 5.333vw 0 0; +} + +.m-title { + -webkit-box-align: end; + -ms-flex-align: end; + align-items: flex-end; + color: #2a2a2a; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + font-size: 3.2vw; + line-height: 1; + padding: 0 4vw 5.333vw; +} + +.m-title .hd_name { + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + display: -webkit-box; + font-size: 5.333vw; + font-weight: 500; + height: 1.2em; + line-height: 1.2em; + margin: -.1em 0; + overflow: hidden; + text-overflow: ellipsis; + word-break: break-all; +} + +.m-title .bd { + -webkit-box-flex: 1; + flex: 1; + padding: 0 2.667vw; +} + +.m-title .fd { + -ms-flex-negative: 0; + flex-shrink: 0; +} + +.m-title .fd_more { + color: #aaa; + margin: -2.667vw 0; + padding: 2.667vw 0; +} + +.big-list { + padding: 0 4vw; +} + +.big-list .item:not(:last-child) { + margin: 0 0 4.8vw; +} + +.big-item { + display: block; +} + +.big-item .hd { + border-radius: 1.333vw; + overflow: hidden; + position: relative; +} + +.image-box.__56 { + padding-top: 56.25%; +} + +.image-box { + background-color: #ebebeb; + height: 0; + overflow: hidden; + position: relative; +} + +.image-box image { + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} + +.big-item .hd_sale { + background-color: rgba(0,0,0,.5); + border-radius: 0 3.2vw 0 0; + bottom: 0; + color: #fff; + font-size: 3.2vw; + height: 5.867vw; + left: 0; + line-height: 5.867vw; + padding: 0 2.133vw; + position: absolute; +} + +.big-item .bd { + padding: 2.133vw 0 0; +} + +.big-item .bd_shop { + color: #9b9b9b; + font-size: 3.2vw; + line-height: 4.533vw; + margin: 0 0 1.6vw; +} + +.title.__normal { + font-size: 4vw; +} + +.title { + -webkit-box-orient: vertical; + color: #222; + display: -webkit-box; + line-height: 1.4em; + margin: 0 0 .2em; + overflow: hidden; + text-overflow: ellipsis; + word-break: break-all; +} + +.big-item .bd .__flex,.big-item .bd_shop { + -webkit-box-pack: justify; + -ms-flex-pack: justify; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + justify-content: space-between; +} + +.big-item .bd .__flex { + -webkit-box-align: end; + -ms-flex-align: end; + align-items: flex-end; + line-height: 1; + margin: .8vw 0 0; +} + +.vip-price-wrap { + height: 3.467vw; +} + +.vip-price { + align-items: center; + background-color: #d7bc9f; + border-radius: 3.467vw; + color: #3d342d; + display: flex; + font-size: 2.667vw; + height: inherit; + line-height: 3.467vw; + overflow: hidden; + vertical-align: top; +} + +.vip-price .hd { + background-color: #40322f; + border-radius: 0; + color: #d7bc9f; + display: inline-block; + padding: 0 .8vw; +} + +.vip-price .bd { + display: inline-block; + padding: 0 1.867vw; +} + +.big-item .bd_price { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} + +.now-price.__large { + display: inline; + font-size: 3.467vw; +} + +.now-price { + color: #eb5252; + font-family: DIN; + font-size: 3.2vw; + line-height: 1.75em; +} + +.now-price>view { + display: inline; +} + +.now-price.__large .buck { + font-size: 5.333vw; +} + +.old-price { + color: #9b9b9b; + display: inline; + font-family: DIN; + font-size: 3.2vw; + text-decoration: line-through; +} + +.list-discount { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-inline-box; + display: -ms-inline-flexbox; + display: -webkit-inline-flex; + display: inline-flex; + font-size: 2.667vw; + height: 4.267vw; + line-height: 4.267vw; + overflow: hidden; +} + +.list-discount .hd { + border-radius: 0; + height: 4.267vw; + width: 2.4vw; +} + +.list-discount .tri { + background-color: #06acb3; + height: 4.267vw; + transform: translateY(50%) rotate(-45deg); + transform-origin: 0 0; + width: 4.267vw; +} + +.list-discount .bd { + background-color: #06acb3; + border-radius: 0 .533vw .533vw 0; + color: #fff; + padding: 0 .533vw 0 0; + position: relative; +} + +.list-discount .num { + display: inline; + font-family: DIN; + font-size: 2.933vw; +} + +.button.__large { + height: 7.467vw; + min-width: 18.667vw; +} + +.button { + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + background-color: #06acb3; + border-radius: 6.667vw; + box-sizing: border-box; + color: #fff; + display: -webkit-inline-box; + display: -ms-inline-flexbox; + display: -webkit-inline-flex; + display: inline-flex; + font-size: 3.2vw; + padding: 0 1.6vw; + text-align: center; +} + +.button,.issaled { + align-items: center; + justify-content: center; +} + +.issaled { + background: rgba(0,0,0,.4); + border-radius: 5px; + display: flex; + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} + +.issaled image { + height: 120px; + width: 120px; +} + +.issele { + background: #9b9b9b; +} + +.hover { + background: transparent; +} \ No newline at end of file diff --git a/pages/map/map.js b/pages/map/map.js new file mode 100644 index 0000000..bffd614 --- /dev/null +++ b/pages/map/map.js @@ -0,0 +1,164 @@ +var t = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), e = require("../../@babel/runtime/helpers/asyncToGenerator"), o = getApp(), a = require("../../utils/login.js"); + +Page({ + data: { + markers: [], + longitude: null, + latitude: null, + weather: {}, + totop: !1, + shop: {}, + showshop: !1, + zoomsize: 14, + showLocation: !0 + }, + onLoad: function(t) { + var e = this; + wx.showLoading({ + title: "" + }), a.pageStart(o).then(function(t) { + e.getuserLocation(); + }); + }, + getuserLocation: function() { + var o = this; + return e(t.default.mark(function e() { + var a; + return t.default.wrap(function(t) { + for (;;) switch (t.prev = t.next) { + case 0: + return t.next = 2, o.getlocation(); + + case 2: + a = t.sent, console.log("result:", a), a && (o.latitude = a.latitude, o.longitude = a.longitude), + o.getData(); + + case 6: + case "end": + return t.stop(); + } + }, e); + }))(); + }, + latitude: null, + longitude: null, + onShareAppMessage: function() {}, + tolocation: function() { + var t = wx.createMapContext("map"); + console.log("moveToLocation"), t.moveToLocation({ + success: function(t) { + console.log(t); + }, + fail: function(t) { + wx.showModal({ + title: "用户未授权", + content: "请开启相关权限,以便更好使用小程序哦!", + showCancel: !0, + success: function(t) { + t.confirm ? wx.openSetting({ + success: function(t) { + console.log("authSetting", t), t.authSetting || that.showLocationFail(); + } + }) : t.cancel; + }, + fail: function(t) { + that.showLocationFail(); + } + }); + } + }); + }, + clickMaker: function(t) { + wx.openLocation({ + latitude: latitude, + longitude: longitude, + scale: 18 + }); + }, + callUs: function() { + if (!o.globalData.servicetel) return !1; + wx.makePhoneCall({ + phoneNumber: "" + o.globalData.servicetel + }); + }, + getData: function() { + var t = this; + a.request(o.globalData.config.map, { + longitude: this.longitude, + latitude: this.latitude + }).then(function(e) { + wx.hideLoading(), 200 == e.code ? (e.data.list.forEach(function(t, e) { + t.id = e, t.width = 32, t.height = 32, t.latitude = 1 * t.latitude, t.longitude = 1 * t.longitude, + t.iconPath = "/img/location-blue.png", t.callout = { + content: t.name + }; + }), t.setData({ + weather: e.data.weather, + markers: e.data.list, + longitude: 1 * e.data.longitude, + latitude: 1 * e.data.latitude, + zoomsize: e.data.zoomsize + })) : wx.showModal({ + title: "提示", + content: e.message, + confirmColor: "#EF8176", + cancelColor: "#999999" + }); + }).catch(function(t) { + wx.hideLoading(); + }); + }, + bindmarkertap: function(t) { + console.log(t); + this.data.markers.forEach(function(t) { + t.iconPath = "/img/location-blue.png"; + }); + for (var e = 0; e < this.data.markers.length; e++) if (this.data.markers[e].id == t.detail.markerId) { + console.log(e), this.data.markers[e].iconPath = "/img/location-red.png", this.data.markers[e].width = 50, + this.data.markers[e].height = 50, this.setData({ + shop: Object.assign({}, this.data.markers[e]), + showshop: !0 + }); + break; + } + }, + closeshop: function() { + this.setData({ + showshop: !1 + }); + }, + changeTop: function() { + this.setData({ + totop: !this.data.totop + }); + }, + getlocation: function() { + return new Promise(function(t, e) { + wx.getLocation({ + type: "wgs84", + success: function(e) { + e.latitude, e.longitude; + t(e); + }, + fail: function(e) { + t(); + } + }); + }); + }, + showLocationFail: function() { + wx.showToast({ + title: "位置失败", + icon: "none", + duration: 1e3 + }); + }, + toMap: function() { + wx.openLocation({ + latitude: this.data.shop.latitude, + longitude: this.data.shop.longitude, + name: this.data.shop.name, + address: this.data.shop.address + }); + } +}); \ No newline at end of file diff --git a/pages/map/map.json b/pages/map/map.json new file mode 100644 index 0000000..421f4e6 --- /dev/null +++ b/pages/map/map.json @@ -0,0 +1,10 @@ +{ + "navigationBarTitleText": "聚美汽服", + "navigationBarBackgroundColor": "#4cadf1", + "navigationBarTextStyle": "white", + "enablePullDownRefresh": false, + "navigationStyle": "custom", + "usingComponents": { + "page-loding": "../../template/pageLoding/pageLoding" + } +} \ No newline at end of file diff --git a/pages/map/map.wxml b/pages/map/map.wxml new file mode 100644 index 0000000..58194c0 --- /dev/null +++ b/pages/map/map.wxml @@ -0,0 +1,50 @@ + + + + + + + {{weather.air_tips}} + + {{weather.tem}}℃ + {{weather.wea}} + + + 天气:{{weather.tem2}}~{{weather.tem1}}℃ {{weather.wea}} + {{weather.city}} + + + + + + + + + + + + {{shop.name}} + + + + + {{shop.address}} + + {{shop.distance}}kw + + + + 导航 + + + + + + + + + + + + + diff --git a/pages/map/map.wxss b/pages/map/map.wxss new file mode 100644 index 0000000..252da3c --- /dev/null +++ b/pages/map/map.wxss @@ -0,0 +1,235 @@ +.map { + position: relative; +} + +.custom-btn { + bottom: 200rpx; + left: 20rpx; + position: fixed; +} + +.custom-btn .btn { + background: #fff; + border: 2rpx solid #e4e4e4; + border-radius: 50%; + box-sizing: border-box; + font-size: 44rpx; + height: 88rpx; + line-height: 84rpx; + margin-bottom: 28rpx; + text-align: center; + width: 88rpx; + z-index: 130; +} + +.iconfont { + color: #333; + font-size: 48rpx; +} + +.circle { + border: 2rpx solid #333; + border-radius: 50%; + box-sizing: border-box; + height: 40rpx; + margin: 22rpx; + width: 40rpx; +} + +.circle-s { + height: 16rpx; + margin: 10rpx; + width: 16rpx; +} + +.btn .img { + display: block; + height: 40rpx; + margin: 22rpx; + width: 40rpx; +} + +map { + height: 100vh; + width: 100vw; + z-index: 0; +} + +.weather { + left: 0; + position: fixed; + top: 0; + width: 100vw; + z-index: 100; +} + +.blue-bg,.weather { + box-sizing: border-box; +} + +.blue-bg { + background: #4cadf1; + overflow: hidden; +} + +.inner-text { + padding: 70px 20px 10px; + position: relative; + z-index: 8; +} + +.sun { + height: 174px; + left: 0; + position: absolute; + top: 0; + width: 100vw; +} + +.air_tips { + color: #fff; + font-size: 13px; + overflow: hidden; + padding: 0 20px; + text-align: center; + text-overflow: ellipsis; + white-space: pre-wrap; + white-space: nowrap; + word-break: break-all; +} + +.wea { + color: #333; + padding: 10px 0 4px; +} + +.wea .temp { + display: inline-block; + font-size: 44px; + font-weight: 200; + line-height: 44px; + margin-right: 4px; + vertical-align: bottom; +} + +.wea .text { + display: inline; + font-size: 14px; + line-height: 32px; +} + +.intro { + align-items: center; + color: #333; + display: flex; + font-size: 13px; + justify-content: space-between; +} + +.bottom { + position: relative; + top: -24px; +} + +.top { + background: #a2cefb; + border-radius: 50%; + display: block; + margin: 0 auto; + z-index: 10; +} + +.top,.top image { + height: 48px; + width: 48px; +} + +.inner { + position: relative; + transition: all .3s; +} + +.inner.totop { + top: -144px; +} + +.inner.totop .bottom { + top: 0; + transform: rotateZ(180deg); +} + +.shop { + background: #fff; + border-radius: 10px; + left: 5vw; + position: fixed; + top: -900px; + width: 90vw; + z-index: 102; +} + +.shop.showshop { + top: 90px; +} + +.shop .name { + color: #333; + font-size: 16px; + line-height: 1.5; + padding: 14px; +} + +.border { + background: #f2f2f2; + height: 1px; + width: 100%; +} + +.shop .add { + color: #666; + display: flex; + font-size: 14px; + justify-content: space-between; + line-height: 1.5; + padding: 14px; +} + +.shop .add,.shop .add .l { + align-items: center; +} + +.shop .add .l { + display: inline-flex; +} + +.shop .add .text { + line-height: 1.5; + max-width: 50vw; + white-space: pre-wrap; + word-break: break-all; +} + +.shop .add .location { + display: inline-block; + height: 14px; + margin-right: 3px; + width: 14px; +} + +.shop .add .r { + align-items: center; + color: #4cadf1; +} + +.shop .add .right { + display: inline-block; + height: 12px; + margin-left: 3px; + width: 12px; +} + +.shop .tomap { + color: #4cadf1; + padding: 20px 0; + text-align: center; +} \ No newline at end of file diff --git a/pages/myAddress/myAddress.js b/pages/myAddress/myAddress.js new file mode 100644 index 0000000..6f17e86 --- /dev/null +++ b/pages/myAddress/myAddress.js @@ -0,0 +1,132 @@ +var t = getApp(), a = require("../../utils/login.js"); + +Page({ + data: { + showLoding: !0, + loading: !1, + data: [], + show: "index", + isdefault: 0, + region: [], + info: { + cityname: null, + countryname: null, + detailinfo: null, + provincename: null, + telnumber: null, + username: null + }, + issubmit: !1, + show_comfirm: { + show: !1, + tips: "" + }, + uniqid: "", + selectAddressUniqid: "" + }, + onLoad: function(i) { + var e = this; + wx.showLoading({ + title: "" + }), this.setData({ + selectAddressUniqid: i.selectAddressUniqid || "" + }), a.pageStart(t).then(function(t) { + e.getData(); + }); + }, + onShow: function() { + this.istoEdit && (this.istoEdit = !1, this.getData()); + }, + onShareAppMessage: function() {}, + istoEdit: !1, + getData: function() { + var i = this; + if (this.data.loading) return !1; + this.setData({ + loading: !0 + }), a.request(t.globalData.config.address.init, {}).then(function(t) { + wx.hideLoading(), i.setData({ + data: t.data, + loading: !1, + showLoding: !1 + }); + }).catch(function(t) { + wx.hideLoading(), i.setData({ + loading: !1 + }); + }); + }, + openEdit: function(t) { + var a = t.currentTarget.dataset.uniqid || ""; + return t.currentTarget.dataset.index || 0, this.data.show = a ? "edit" : "add", + wx.navigateTo({ + url: "/pages/addAddress/addAddress?id=" + a + }), this.istoEdit = !0, !1; + }, + select: function(t) { + return console.log("select"), !1; + }, + delAddress: function(i) { + if (this.data.issubmit) return !1; + var e = i.currentTarget.dataset, n = e.id, s = e.index, o = this; + wx.showModal({ + title: "是否删除该地址?", + content: "", + confirmColor: "#EF8176", + cancelColor: "#999999", + success: function(i) { + i.confirm && a.request(t.globalData.config.address.delete, { + id: n + }).then(function(t) { + o.setData({ + issubmit: !1 + }), 200 == t.code ? (wx.showToast({ + title: "删除成功" + }), o.data.data.splice(s, 1), o.setData({ + data: o.data.data + })) : wx.showModal({ + title: "提示", + content: t.message, + confirmColor: "#EF8176", + cancelColor: "#999999" + }); + }).catch(function(t) { + o.setData({ + issubmit: !1 + }); + }); + }, + fail: function(t) { + console.log("fail"), o.setData({ + issubmit: !0 + }); + } + }); + }, + setDefault: function(i) { + var e = i.currentTarget.dataset, n = e.id, s = e.index; + if (e.isdefault) return !1; + wx.showLoading({ + title: "" + }); + var o = this; + a.request(t.globalData.config.address.default, { + id: n + }).then(function(t) { + 200 == t.code ? (wx.hideLoading(), o.data.data.map(function(t) { + t.isdefault = 0; + }), o.data.data[s].isdefault = 1, o.setData({ + data: o.data.data + }), wx.showToast({ + title: t.message + })) : wx.showModal({ + title: "提示", + content: t.message, + confirmColor: "#EF8176", + cancelColor: "#999999" + }); + }).catch(function(t) { + wx.hideLoading(); + }); + } +}); \ No newline at end of file diff --git a/pages/myAddress/myAddress.json b/pages/myAddress/myAddress.json new file mode 100644 index 0000000..3fdf1d6 --- /dev/null +++ b/pages/myAddress/myAddress.json @@ -0,0 +1,9 @@ +{ + "navigationBarTitleText": "聚美汽服", + "enablePullDownRefresh": false, + "usingComponents": { + "service-tel": "../../template/serviceTel/serviceTel", + "my-money": "../../template/myMoney/myMoney", + "page-loding": "../../template/pageLoding/pageLoding" + } +} \ No newline at end of file diff --git a/pages/myAddress/myAddress.wxml b/pages/myAddress/myAddress.wxml new file mode 100644 index 0000000..6d74976 --- /dev/null +++ b/pages/myAddress/myAddress.wxml @@ -0,0 +1,27 @@ + + + + + + {{item.username}},{{item.telnumber}} + {{item.provincename+item.cityname+item.countryname+' '+item.detailinfo}} + + + + + 设为默认 + + + 编辑 + + 删除 + + + + + + + 赶紧新增地址吧 + + 新增地址 + diff --git a/pages/myAddress/myAddress.wxss b/pages/myAddress/myAddress.wxss new file mode 100644 index 0000000..34b3478 --- /dev/null +++ b/pages/myAddress/myAddress.wxss @@ -0,0 +1,82 @@ +.container { + background: #fafafa; + box-sizing: border-box; + min-height: 100vh; + padding: 0rpx 0 170rpx; +} + +.list-box { + padding: 40rpx 27rpx 0rpx; +} + +.item { + align-items: center; + background: #fff; + border-bottom: 1px solid #eee; + display: block; + justify-content: space-between; + margin-bottom: 10rpx; + padding: 18rpx 18rpx 0; +} + +.item .name { + color: #666; + font-size: 26rpx; + font-size: 28rpx; + margin-bottom: 16rpx; +} + +.item .address { + color: #999; + font-size: 22rpx; + font-size: 26rpx; +} + +.item .text { + flex-direction: column; +} + +.item .btn { + align-items: center; + display: inline-flex; + justify-content: center; +} + +.item .btn image { + height: 18px; + width: 18px; +} + +.footer { + border-top: 1px solid #eee; + display: flex; + font-size: 26rpx; + justify-content: space-between; + margin-top: 20rpx; +} + +.footer .icon,.footer icon,.footer image { + margin-right: 10rpx; +} + +.footer .icon { + border: 1px solid #999; + border-radius: 50%; + box-sizing: border-box; + flex: 0 0 18px; + height: 18px; + width: 18px; +} + +.footer .icon,.footer .r { + display: inline-flex; +} + +.footer .r { + align-items: center; +} + +.footer .r .btn { + padding: 20rpx 0 20rpx 40rpx; + white-space: nowrap; +} \ No newline at end of file diff --git a/pages/myDiscount/myDiscount.js b/pages/myDiscount/myDiscount.js new file mode 100644 index 0000000..825ae70 --- /dev/null +++ b/pages/myDiscount/myDiscount.js @@ -0,0 +1,15 @@ +Page({ + data: {}, + onLoad: function(n) { + wx.showModal({ + title: "开发中~" + }); + }, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/myDiscount/myDiscount.json b/pages/myDiscount/myDiscount.json new file mode 100644 index 0000000..7501eb5 --- /dev/null +++ b/pages/myDiscount/myDiscount.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + "page-loding": "../../template/pageLoding/pageLoding" + }, + "navigationBarTitleText": "聚美汽服" +} \ No newline at end of file diff --git a/pages/myDiscount/myDiscount.wxml b/pages/myDiscount/myDiscount.wxml new file mode 100644 index 0000000..df290c0 --- /dev/null +++ b/pages/myDiscount/myDiscount.wxml @@ -0,0 +1 @@ + diff --git a/pages/myDiscount/myDiscount.wxss b/pages/myDiscount/myDiscount.wxss new file mode 100644 index 0000000..e69de29 diff --git a/pages/orderDetails/orderDetails.js b/pages/orderDetails/orderDetails.js new file mode 100644 index 0000000..5e4b49d --- /dev/null +++ b/pages/orderDetails/orderDetails.js @@ -0,0 +1,83 @@ +var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), r = require("../../@babel/runtime/helpers/asyncToGenerator"), t = (getApp(), +require("../../utils/login.js")), a = require("../../utils/common.js"); + +Page({ + data: { + showLoding: !0, + orderid: "", + verificationQrcode: {}, + orderData: {}, + ordercart: [], + token: "", + orderValidity: [], + purchasenotes: "", + contentHidden: !0, + orderVerification: [] + }, + onLoad: function(e) { + this.setData({ + orderid: e.orderid || "" + }), this.getOrderDetail(); + }, + getOrderDetail: function() { + var i = this; + return r(e.default.mark(function r() { + var o, n, d, c; + return e.default.wrap(function(e) { + for (;;) switch (e.prev = e.next) { + case 0: + return i, o = i.data.orderid, e.prev = 2, e.next = 5, t.request(t.baseUrl + "shop/order/detail", { + orderid: o + }, !0); + + case 5: + if (n = e.sent, (d = n.data).orderData.updatetime = a.changeTime(new Date(1e3 * d.orderData.updatetime)), + d.orderValidity && d.orderValidity.length > 0) for (c = 0; c < d.orderValidity.length; c++) i.data.orderValidity[c] = a.changeTime(new Date(1e3 * d.orderValidity[c])); + i.setData({ + showLoding: !1, + companyList: d.companyList, + orderData: d.orderData, + token: d.token, + ordercart: d.ordercart, + verificationQrcode: d.verificationQrcode, + orderValidity: i.data.orderValidity, + purchasenotes: d.purchasenotes, + orderVerification: d.orderVerification + }), e.next = 15; + break; + + case 12: + e.prev = 12, e.t0 = e.catch(2), console.log(e.t0); + + case 15: + case "end": + return e.stop(); + } + }, r, null, [ [ 2, 12 ] ]); + }))(); + }, + call: function(e) { + var r = e.currentTarget.dataset.tel; + wx.makePhoneCall({ + phoneNumber: r + }); + }, + toMap: function(e) { + var r = e.currentTarget.dataset, t = r.latitude, a = r.longitude; + wx.openLocation({ + latitude: t, + longitude: a + }); + }, + showcontentHidden: function() { + this.setData({ + contentHidden: !1 + }); + }, + copy: function(e) { + var r = e.currentTarget.dataset.code; + wx.setClipboardData({ + data: r + }); + } +}); \ No newline at end of file diff --git a/pages/orderDetails/orderDetails.json b/pages/orderDetails/orderDetails.json new file mode 100644 index 0000000..fd0390d --- /dev/null +++ b/pages/orderDetails/orderDetails.json @@ -0,0 +1,6 @@ +{ + "navigationBarTitleText": "聚美汽服", + "usingComponents": { + "page-loding": "../../template/pageLoding/pageLoding" + } +} \ No newline at end of file diff --git a/pages/orderDetails/orderDetails.wxml b/pages/orderDetails/orderDetails.wxml new file mode 100644 index 0000000..7762f0b --- /dev/null +++ b/pages/orderDetails/orderDetails.wxml @@ -0,0 +1,88 @@ + + + + {{ordercart[0].shop.name}} + + + + + Scan me! + + 不可使用 + + 请将此二维码展示给商家核销 + + + + + 核销码 点击核销码可复制 + + + + + + + {{item.code}} + {{item.name}} + + {{item.merchantname}} + + + + + + + 订单总价: + ¥{{orderData.total_price}} + + + + + 姓名:{{orderData.recipient_name}} + + + 支付时间:{{orderData.updatetime}} + + + 订单号:{{orderData.orderid}} + + + 有效期:{{orderValidity[0]}} 至 {{orderValidity[1]}} + + + + + + + 商家信息: + + + + {{item.name}} + + + 营业时间:{{item.businesshours}} + + + 商家电话:{{item.tel}} + 拨号 + + + 商家地址:{{item.address}} + 导航 + + + + + + + + 注意事项: + + + + + + + + diff --git a/pages/orderDetails/orderDetails.wxss b/pages/orderDetails/orderDetails.wxss new file mode 100644 index 0000000..b98ae36 --- /dev/null +++ b/pages/orderDetails/orderDetails.wxss @@ -0,0 +1,279 @@ +.charge-off { + background: #f8f8f8; + min-height: 100vh; + padding: 3.333vw 4vw; +} + +.charge-off .coupon__box { + background: #fff; + border-radius: 1.6vw; + box-shadow: 0 0 2.667vw 0 rgba(11,2,5,.05); +} + +.charge-off .coupon__box__title { + color: #2a2a2a; + font-size: 4.8vw; + font-weight: 700; + line-height: 6.4vw; + padding: 6.667vw 4.667vw; +} + +.charge-off .coupon__box__split { + background: #eee; + height: 1px; + margin: 0 4.667vw; + position: relative; +} + +.charge-off .coupon__box__split:before { + left: -6vw; +} + +.charge-off .coupon__box__split:after,.charge-off .coupon__box__split:before { + background: #f8f8f8; + border-radius: 50%; + content: ""; + height: 2.667vw; + position: absolute; + top: -1.333vw; + width: 2.667vw; +} + +.charge-off .coupon__box__split:after { + right: -6vw; +} + +.charge-off .coupon__box__qrcode { + color: #787878; + font-size: 3.2vw; + font-weight: 500; + line-height: 4.8vw; + line-height: 3.2vw; + padding: 11.333vw 0 10.667vw; + text-align: center; +} + +.charge-off .coupon__box__qrcode .tips { + margin-top: 5.333vw; + text-align: center; +} + +.charge-off .components { + display: block; +} + +.charge-off .box { + background: #fff; + border-radius: 1.6vw; + box-shadow: 0 0 2.667vw 0 rgba(11,2,5,.05); + margin-top: 4vw; + padding: 5.333vw 4vw 0; +} + +.charge-off .box .tips { + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + align-items: center; + border-bottom: 1px solid #eee; + color: #2a2a2a; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + font-size: 4vw; + font-weight: 700; + justify-content: space-between; + line-height: 4vw; + padding-bottom: 4vw; +} + +.charge-off .box .tips .right { + color: #f60; +} + +.charge-off .box .box-items { + border-bottom: 1px dashed #eee; + padding: 3.733vw 0; +} + +.charge-off .box .box-items .item__tips { + font-size: 4vw; + font-weight: 700; + margin-bottom: 4.667vw; +} + +.charge-off .box .box-items .item__bd { + color: #2a2a2a; + font-size: 3.467vw; +} + +.charge-off .box .box-items .item__bd .line { + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + align-items: center; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + justify-content: space-between; + line-height: 6.667vw; +} + +.charge-off .box .box-items .item__bd .line .info { + -webkit-box-flex: 1; + flex: 1; +} + +.charge-off .box .box-items .item__bd .name { + display: block; + font-size: 3.6vw; + margin: 8px 0 10px; +} + +.charge-off .box .box-items .item__bd .merchant { + display: block; + font-size: 3vw; +} + +.charge-off .box .box-items .item__bd .merchant .shop { + display: inline-block; + height: 14px; + margin-right: 4px; + position: relative; + top: -1px; + vertical-align: middle; + width: 14px; +} + +.charge-off .box .box-items .item__bd .code { + color: #333; + font-size: 4.3vw; +} + +.charge-off .box .box-items .item__bd .line .btn { + background: #06a2b3; + border-radius: .667vw; + color: #fff; + font-size: 3.2vw; + font-weight: 500; + line-height: 3.2vw; + margin-left: 8vw; + padding: 1.333vw 2vw; +} + +.charge-off .box .box-items:last-child { + border-bottom: none; + padding-bottom: 5.333vw; +} + +.charge-off .box .list_body { + color: #2a2a2a; + font-size: 3.733vw; + font-weight: 500; + line-height: 6.667vw; + margin-top: 2.667vw; + position: relative; +} + +.charge-off .box .list_body .content { + padding-bottom: 4vw; +} + +.charge-off .box .list_body .content-hidden { + height: 106.667vw; + overflow: hidden; +} + +.charge-off .box .list_body .list_body__shade { + bottom: 0; + left: 0; + position: absolute; + width: 100%; +} + +.charge-off .box .list_body .list_body__shade .up { + background: -webkit-gradient(linear,left bottom,left top,from(#fff),to(hsla(0,0%,97%,0))); + background: linear-gradient(0deg,#fff,hsla(0,0%,97%,0)); + height: 12vw; + width: 100%; +} + +.charge-off .box .list_body .list_body__shade .down { + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + align-items: center; + background: #fff; + color: #2a2a2a; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + font-size: 3.733vw; + font-weight: 500; + height: 13.333vw; + justify-content: center; + line-height: 3.733vw; + width: 100%; +} + +.charge-off .box .list_body .list_body__shade .down .icon { + border-bottom: .4vw solid #1b1b1b; + border-left: .4vw solid #1b1b1b; + height: 2vw; + margin-left: 1.6vw; + margin-top: -1.333vw; + transform: rotate(-45deg); + width: 2vw; +} + +.charge-off .box .list_body .list_body__shade .down .icon--active { + margin-top: 1.333vw; + transform: rotate(135deg); +} + +.charge-off .qrcode-area { + display: inline-block; + position: relative; + vertical-align: top; +} + +.charge-off .qrcode-area .txt { + background-color: hsla(0,0%,92%,.6); + color: #989898; + font-size: 4vw; + font-weight: 500; + left: 50%; + line-height: 8vw; + padding: 0 2.667vw; + position: absolute; + top: 50%; + transform: translateX(-50%) translateY(-50%); + white-space: nowrap; +} + +.charge-off .coupon__box .gray { + filter: blur(2px); + opacity: .3; +} + +.coupon__box__qrcode { + position: relative; +} + +.coupon__box__title { + display: block; +} + +.box .tips .til { + color: #787878; + display: inline; + font-size: 3.2vw; + font-weight: 400; + margin-left: 1.333vw; +} \ No newline at end of file diff --git a/pages/orderIndex/orderIndex.js b/pages/orderIndex/orderIndex.js new file mode 100644 index 0000000..0d8fa99 --- /dev/null +++ b/pages/orderIndex/orderIndex.js @@ -0,0 +1,154 @@ +var t = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), e = require("../../@babel/runtime/helpers/asyncToGenerator"), a = (getApp(), +require("../../utils/login.js")); + +Page({ + data: { + showLoding: !0, + num: 1, + token: "", + name: "", + mobile: "", + totalprice: "", + price: "", + info: {}, + currency: "", + useMoney: 0, + allowMaxNum: 0 + }, + onLoad: function(t) { + this.setData({ + token: t.token + }), this.getOrder(); + }, + changeNum: function(t) { + var e = t.currentTarget.dataset.types; + if ("money" == t.currentTarget.dataset.name) { + if ("plus" == e) this.data.useMoney < this.data.allow_useintegralmax && this.data.useMoney++; else { + if (this.data.useMoney <= 0) return !1; + this.data.useMoney--; + } + this.setData({ + useMoney: this.data.useMoney + }); + } else { + if ("plus" == e) { + if (this.data.num >= this.data.allowMaxNum) return wx.showToast({ + title: "不能再加了啦~", + icon: "none" + }), !1; + this.data.num++; + } else { + if (this.data.num <= 1) return wx.showToast({ + title: "不能再少了哟~", + icon: "none" + }), !1; + this.data.num--; + } + this.setData({ + num: this.data.num + }), this.getPrice(); + } + }, + input: function(t) { + "money" == t.currentTarget.dataset.name ? this.setData({ + useMoney: t.detail.value + }) : (this.setData({ + num: t.detail.value + }), this.getPrice()); + }, + setMoney: function() { + var t = this.data.num * this.data.info.price, e = (t + "").split("."); + e[1] = e[1].padEnd(2, "0").slice(0, 2), t = e.join("."), this.setData({ + totalMoney: t + }); + }, + blur: function() { + this.data.num <= 1 && this.setData({ + num: 1 + }); + }, + inputtext: function(t) { + var e = t.detail.value; + "name" == t.currentTarget.dataset.text ? this.setData({ + name: e + }) : this.setData({ + mobile: e + }); + }, + getOrder: function() { + var n = this; + return e(t.default.mark(function e() { + var s, r; + return t.default.wrap(function(t) { + for (;;) switch (t.prev = t.next) { + case 0: + return t.prev = 0, t.next = 3, a.request(a.baseUrl + "shop/order/create", { + token: n.data.token + }, !0); + + case 3: + s = t.sent, r = s.data, n.setData({ + showLoding: !1, + totalprice: r.totalprice, + allow_useintegral: r.allow_useintegral, + allow_useintegralmax: r.allow_useintegralmax, + currency: r.currency, + money: r.money, + shoppingCartList: r.shoppingCartList, + address: r.address, + name: r.address.username || "", + mobile: r.address.telnumber ? r.address.telnumber + "" : "", + allowMaxNum: Math.min(r.shoppingCartList.shop.stock, r.shoppingCartList.shop.purchase_num) + }), t.next = 11; + break; + + case 8: + t.prev = 8, t.t0 = t.catch(0), console.log(t.t0); + + case 11: + case "end": + return t.stop(); + } + }, e, null, [ [ 0, 8 ] ]); + }))(); + }, + getPrice: function() { + var n = this; + return e(t.default.mark(function e() { + var s, r; + return t.default.wrap(function(t) { + for (;;) switch (t.prev = t.next) { + case 0: + return t.prev = 0, t.next = 3, a.request(a.baseUrl + "shop/order/num", { + uniqid: n.data.shoppingCartList.uniqid, + cartnum: n.data.num + }, !0); + + case 3: + s = t.sent, r = s.data, 200 == s.code && n.setData({ + totalprice: r.totalprice + }), t.next = 11; + break; + + case 8: + t.prev = 8, t.t0 = t.catch(0), console.log(t.t0); + + case 11: + case "end": + return t.stop(); + } + }, e, null, [ [ 0, 8 ] ]); + }))(); + }, + pay: function() { + return "" == this.data.name.trim() ? (wx.showModal({ + title: "提示", + content: "请输入姓名" + }), !1) : "" == this.data.mobile.trim() ? (wx.showModal({ + title: "提示", + content: "请输入手机号码" + }), !1) : (wx.setStorageSync("goodsInfo", this.data.info), void wx.redirectTo({ + url: "/pages/orderPay/orderPay?uniqid=".concat(this.data.shoppingCartList.uniqid, "&name=").concat(this.data.name, "&mobile=").concat(this.data.mobile, "&amount=").concat(this.data.useMoney) + })); + } +}); \ No newline at end of file diff --git a/pages/orderIndex/orderIndex.json b/pages/orderIndex/orderIndex.json new file mode 100644 index 0000000..9aef305 --- /dev/null +++ b/pages/orderIndex/orderIndex.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "聚美汽服", + "navigationBarBackgroundColor": "#06acb3", + "navigationBarTextStyle": "white", + "usingComponents": { + "page-loding": "../../template/pageLoding/pageLoding" + } +} \ No newline at end of file diff --git a/pages/orderIndex/orderIndex.wxml b/pages/orderIndex/orderIndex.wxml new file mode 100644 index 0000000..4725fa5 --- /dev/null +++ b/pages/orderIndex/orderIndex.wxml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + {{shoppingCartList.shop.name}} + + + ¥{{shoppingCartList.shop.price}} + ¥{{shoppingCartList.shop.marketprice}} + + + + + + + + 购买数量 + + + - + + + + + + + + + + 使用{{currency}}(最多可用{{allow_useintegralmax}}元) + + + - + + + + + + + + + + + + + 姓名 + + + + + + + + + + 手机 + + + + + + + + + + + + + 合计: ¥ {{totalprice}} + + + + + + + + diff --git a/pages/orderIndex/orderIndex.wxss b/pages/orderIndex/orderIndex.wxss new file mode 100644 index 0000000..e582231 --- /dev/null +++ b/pages/orderIndex/orderIndex.wxss @@ -0,0 +1,638 @@ +.order .section { + background-color: #fff; +} + +.order .section:not(:first-child) { + border-top: 3.2vw solid #f8f8f8; +} + +.order .section .section-title { + color: #2a2a2a; + font-size: 3.733vw; + font-weight: 400; + padding: 3.2vw 4vw; +} + +.order .section .section-title view { + color: #787878; + font-size: 3.2vw; + padding-left: 4.267vw; +} + +.order .attr-wrap { + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + color: #2a2a2a; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + font-size: 3.733vw; + justify-content: space-between; + padding-bottom: 4vw; + padding-top: 4vw; +} + +.van-stepper-container { + display: inline-flex; + flex: 1; + justify-content: flex-end; +} + +.order .attr-wrap .label { + font-weight: 500; +} + +.van-cell__title { + -webkit-box-flex: 0; + flex: none; +} + +.van-cell__value,.van-field__label { + box-sizing: border-box; + width: 90px; +} + +.van-cell__value { + word-wrap: break-word; + color: #969799; + display: inline-flex; + flex: 1; + overflow: hidden; + position: relative; + text-align: right; + vertical-align: middle; +} + +.van-field__body,.van-field__control { + display: block; + width: 100%; +} + +.van-field__control { + background-color: initial; + border: 0; + box-sizing: border-box; + color: #323233; + line-height: inherit; + margin: 0; + min-width: 0; + padding: 0; + resize: none; + text-align: right; +} + +.order .order-form .van-field__control:disabled { + color: #323232; +} + +.order .order-form .ems-radio+.ems-radio { + margin-left: 5.333vw; +} + +.order .order-form .van-field__error-message { + text-align: right; +} + +.order .order-menu-wrap { + background-color: #fff; + bottom: 0; + left: 0; + position: fixed; + width: 100%; + z-index: 5; +} + +.order .order-menu .order_btn .btn-cancel { + background-color: #434343; +} + +.order .order-menu .order_btn .btn-confirm { + background-color: #eb5252; +} + +.order .order-menu .only_btn .btn:last-child { + -webkit-box-flex: 1.5; + flex: 1.5; +} + +.order .order-viptip { + background-color: #eb5252; + border-radius: 4vw; + color: #fff; + font-size: 3.2vw; + padding: .667vw 2vw; + position: absolute; + right: 2.667vw; + top: 3.333vw; +} + +.order .viptip-arrow { + border-left: 2vw solid transparent; + border-right: 2vw solid transparent; + border-top: 2vw solid #eb5252; + bottom: -1.467vw; + height: 0; + position: absolute; + right: 2.267vw; + width: 0; +} + +.order .van-cell { + padding: 10px 16px; +} + +.order .van-cell:not(:last-child):after { + border-bottom: 1px solid #f4f4f4; +} + +.goods-info { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + padding-bottom: 4vw; + padding-top: 3.2vw; +} + +.goods-info .lt { + -webkit-box-flex: 16vw; + flex: 16vw 0 0; + width: 16vw; +} + +.goods-info .lt_pic { + border-radius: 1.067vw; + overflow: hidden; + padding-top: 100%; + position: relative; +} + +.goods-info .lt_pic image { + border-radius: 1.067vw; + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} + +.goods-info .rt { + -webkit-box-flex: 1; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + flex: 1; + flex-direction: column; + justify-content: space-between; + padding-left: 4vw; +} + +.goods-info .rt_tit { + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + color: #2a2a2a; + display: -webkit-box; + font-size: 3.733vw; + height: 9.6vw; + line-height: 4.8vw; + margin-top: -.533vw; + overflow: hidden; + text-overflow: ellipsis; + word-break: break-all; +} + +.goods-info .rt_price { + font-family: DIN; + line-height: 1; +} + +.goods-info .rt_price .now { + color: #eb5252; + display: inline; + font-size: 4vw; + font-weight: 500; +} + +.goods-info .rt_price .now view { + display: inline; + font-size: 3.2vw; +} + +.goods-info .rt_price .old { + color: #969696; + display: inline; + font-size: 3.467vw; + margin-left: 4vw; + text-decoration: line-through; +} + +.popup-wrap { + box-sizing: border-box; + font-family: DIN; + height: 70vh; + padding-bottom: 12.8vw; + position: relative; +} + +.popup-scroll { + height: 100%; + overflow: hidden; + overflow-y: auto; +} + +.popup-header { + color: #9b9b9b; + font-size: 3.2vw; + padding: 2.667vw 4vw; +} + +.popup-header .title { + color: #2a2a2a; + font-size: 3.733vw; + margin: 1.6vw 0 0; + padding: 0 0 0 3.733vw; + position: relative; +} + +.popup-header .title:before { + background-color: currentColor; + content: ""; + height: 3.2vw; + left: 0; + position: absolute; + top: 50%; + transform: translateY(-50%); + width: 1.067vw; +} + +.popup-btn { + background-color: #eb5252; + border-radius: 1.333vw; + bottom: 0; + color: #fff; + font-size: 4vw; + height: 12.8vw; + left: 4vw; + line-height: 12.8vw; + position: absolute; + right: 4vw; + text-align: center; + z-index: 6; +} + +.calendar-header { + background-color: #fafafa; + border: 1px solid #e4e4e4; + border-width: 1px 0; + box-sizing: border-box; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + font-size: 3.733vw; + height: 10.667vw; + left: 0; + line-height: 10.667vw; + padding: 0 4vw; + position: sticky; + text-align: center; + top: 0; + z-index: 6; +} + +.calendar-header .item { + -webkit-box-flex: 1; + flex: 1; +} + +.calendar-body { + padding: 0 4vw; +} + +.calendar-mouth { + background-color: #fff; + font-size: 4.267vw; + left: 0; + line-height: 6.667vw; + position: sticky; + top: 10.667vw; + z-index: 5; +} + +.calendar-day { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + flex-wrap: wrap; +} + +.calendar-day .item { + -webkit-box-flex: 14.285714%; + border-radius: .8vw; + color: #ff411e; + flex: 14.285714% 0 0; + font-size: 4vw; + line-height: 5.333vw; + overflow: hidden; + padding: 14.285714% 0 0; + position: relative; + text-align: center; + width: 14.285714%; +} + +.calendar-day .item.disabled,.calendar-day .item.disabled .day { + color: #9b9b9b!important; +} + +.calendar-day .item.active { + background-color: #eb5252; + color: #fff; +} + +.calendar-day .inner { + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-inline-box; + display: -ms-inline-flexbox; + display: -webkit-inline-flex; + display: inline-flex; + flex-direction: column; + height: 100%; + justify-content: center; + left: 0; + position: absolute; + top: 0; + width: 100%; +} + +.calendar-day .day { + color: #2a2a2a; +} + +.calendar-day .item.active .day { + color: inherit; +} + +.calendar-day .price { + font-size: 3.2vw; +} + +.calendar-day .price .s { + font-size: 2.933vw; +} + +.back-protocol { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + font-size: 3.467vw; + line-height: 4.8vw; + padding: 2.667vw 0; +} + +.back-protocol .txt { + -webkit-box-flex: 1; + flex: 1; + padding: 0 2.667vw; +} + +.back-protocol .iconfont { + color: #bebebe; + font-size: .8em; +} + +.protocol-modal { + background-color: #fff; + border-radius: 2.133vw; + padding: 5.867vw 5.067vw 4vw; + top: 45%; + width: 80%; +} + +.protocol-modal .title { + font-size: 4.8vw; + line-height: 6.667vw; + text-align: center; +} + +.protocol-modal .content { + font-size: 3.467vw; + height: 72vw; + line-height: 4.8vw; + margin: 4vw 0; + overflow: hidden; + overflow-y: auto; + white-space: pre-wrap; +} + +.protocol-modal .btn { + background-color: #fcdf21; + border-radius: 9.333vw; + display: block; + font-size: 4vw; + height: 9.333vw; + line-height: 9.333vw; + margin: 0 auto; + width: 53.333vw; +} + +.van-stepper { + border: 1px solid #ccc; + border-radius: 14px; + font-size: 0; + overflow: hidden; + user-select: none; +} + +.van-stepper__minus,.van-stepper__plus { + align-items: center; + border: 0; + box-sizing: border-box; + color: #323233; + cursor: pointer; + display: inline-block; + font-size: 6vw; + height: 28px; + justify-content: center; + line-height: 26px; + margin: 0; + padding: 0; + position: relative; + text-align: center; + vertical-align: middle; + width: 28px; +} + +.van-stepper__minus--disabled,.van-stepper__plus--disabled { + color: #c8c9cc; + cursor: not-allowed; + display: inline-block; + line-height: 26px; + text-align: center; +} + +.van-stepper__plus { + border-radius: 0 4px 4px 0; +} + +.van-stepper__minus { + border-radius: 4px 0 0 4px; +} + +.van-stepper__input { + -webkit-appearance: none; + border: 0; + border-radius: 0; + border-width: 1px 0; + border-left: 1px solid #ccc; + border-right: 1px solid #ccc; + box-sizing: border-box; + color: #323233; + display: inline-block; + font-size: 14px; + height: 28px; + padding: 0; + text-align: center; + vertical-align: middle; + width: 32px; +} + +.van-cell--required:before { + color: #ee0a24; + content: "*"; + font-size: 14px; + left: 8px; + position: absolute; +} + +.van-cell { + background-color: #fff; + box-sizing: border-box; + color: #323233; + display: flex; + font-size: 15px; + line-height: 24px; + overflow: hidden; + padding: 10px 16px; + position: relative; + width: 100%; +} + +.placehoder { + color: #ccc; +} + +[class*=van-hairline]:after { + border: 0 solid #ebedf0; + bottom: -50%; + box-sizing: border-box; + content: " "; + left: -50%; + pointer-events: none; + position: absolute; + right: -50%; + top: -50%; + transform: scale(.5); +} + +.van-hairline--top-bottom:after,.van-hairline-unset--top-bottom:after { + border-width: 1px 0; +} + +.page-footer { + bottom: 0; + left: 0; + position: fixed; + right: 0; +} + +.thin-border_t { + border-color: #f4f4f4; + position: relative; +} + +.order .order-menu { + background-color: #fff; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + font-size: 3.733vw; + height: 12.8vw; + line-height: 12.8vw; +} + +.thin-border_t:before { + border-bottom: .267vw solid; + border-color: inherit; + content: ""; + left: 0; + position: absolute; + top: 0; + transform: scaleY(.5); + width: 100%; +} + +.order .wp { + padding: 0 4vw; +} + +.order .order-menu .order_price { + -webkit-box-flex: 46.667vw; + border-color: #dedede; + box-sizing: border-box; + flex: 46.667vw 0 0; + padding-right: 0; + width: 46.667vw; +} + +.order .order-menu .order_price .num { + color: #eb5252; + display: inline; + font-size: 5.067vw; +} + +.order .order-menu .order_btn { + -webkit-box-flex: 1; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + flex: 1; + position: relative; +} + +.order .order-menu .order_btn .btn { + -webkit-box-flex: 1; + border: 0; + border-radius: 0; + color: #fff; + flex: 1; + font-size: 3.733vw; + height: 12.8vw; + line-height: 12.8vw; + text-align: center; +} + +.order .order-menu .order_btn .btn-confirm { + background-color: #06a2b3; +} \ No newline at end of file diff --git a/pages/orderList/orderList.js b/pages/orderList/orderList.js new file mode 100644 index 0000000..a2e23a3 --- /dev/null +++ b/pages/orderList/orderList.js @@ -0,0 +1,133 @@ +var t = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), a = require("../../@babel/runtime/helpers/toConsumableArray"), e = require("../../@babel/runtime/helpers/asyncToGenerator"), n = (getApp(), +require("../../utils/login.js")); + +Page({ + data: { + showLoding: !0, + navList: [ { + name: "全部", + tab: "all" + }, { + name: "待付款", + tab: "0" + }, { + name: "待使用", + tab: "1" + }, { + name: "已完成", + tab: "4" + } ], + tab: "all", + loading: !1, + next_page: 1, + data: [], + status: { + 0: "待付款", + 1: "待使用", + 2: "待收货", + 3: "待收货", + 4: "已完成" + } + }, + onLoad: function(t) { + this.setData({ + tab: t.tab || "all" + }), this.getList(); + }, + onPullDownRefresh: function() { + this.clearData(); + }, + onReachBottom: function() { + this.getList(); + }, + clearData: function() { + this.setData({ + next_page: 1, + loading: !1, + data: [] + }), this.getList(); + }, + changeTab: function(t) { + var a = t.currentTarget.dataset.tab; + if (a == this.data.tab) return !1; + this.setData({ + tab: a + }), this.clearData(); + }, + getList: function() { + var r = this; + return e(t.default.mark(function e() { + var s, i; + return t.default.wrap(function(t) { + for (;;) switch (t.prev = t.next) { + case 0: + if (r.data.next_page && !r.data.loading) { + t.next = 2; + break; + } + return t.abrupt("return", !1); + + case 2: + return r.setData({ + loading: !0 + }), t.prev = 3, t.next = 6, n.request(n.baseUrl + "shop/order/lists", { + page: r.data.next_page, + typeid: r.data.tab + }, !0); + + case 6: + s = t.sent, i = s.data, r.setData({ + loading: !1, + showLoding: !1 + }), 200 == s.code && (i.data.length < i.limit ? r.data.next_page = 0 : r.data.next_page += 1, + r.setData({ + type: i.type, + count: i.count, + limit: i.limit, + next_page: r.data.next_page, + data: [].concat(a(r.data.data), a(i.data)) + })), t.next = 15; + break; + + case 12: + t.prev = 12, t.t0 = t.catch(3), console.log(t.t0); + + case 15: + case "end": + return t.stop(); + } + }, e, null, [ [ 3, 12 ] ]); + }))(); + }, + deleteItem: function(a) { + var r = this; + return e(t.default.mark(function e() { + var s, i, o, d; + return t.default.wrap(function(t) { + for (;;) switch (t.prev = t.next) { + case 0: + return s = a.currentTarget.dataset, i = s.orderid, o = s.index, wx.showLoading({ + title: "正在删除" + }), t.prev = 2, t.next = 5, n.request(n.baseUrl + "shop/order/delete", { + orderid: i + }, !0); + + case 5: + d = t.sent, wx.hideLoading(), 200 == d.code && (r.data.data.splice(o, 1), r.setData({ + data: r.data.data + }), wx.showToast({ + title: d.message + })), t.next = 14; + break; + + case 10: + t.prev = 10, t.t0 = t.catch(2), console.log(t.t0), wx.hideLoading(); + + case 14: + case "end": + return t.stop(); + } + }, e, null, [ [ 2, 10 ] ]); + }))(); + } +}); \ No newline at end of file diff --git a/pages/orderList/orderList.json b/pages/orderList/orderList.json new file mode 100644 index 0000000..3e3458e --- /dev/null +++ b/pages/orderList/orderList.json @@ -0,0 +1,7 @@ +{ + "navigationBarTitleText": "聚美汽服", + "enablePullDownRefresh": true, + "usingComponents": { + "page-loding": "../../template/pageLoding/pageLoding" + } +} \ No newline at end of file diff --git a/pages/orderList/orderList.wxml b/pages/orderList/orderList.wxml new file mode 100644 index 0000000..1e87f84 --- /dev/null +++ b/pages/orderList/orderList.wxml @@ -0,0 +1,42 @@ + + + + + {{item.name}} + + + + + + 订单编号:{{item.orderid}} + {{status[item.status]}} + 付款超时 + + + + + + {{s.name}} + + + + 下单日期:{{item.timestamp}} + {{item.total_num}}件商品共:¥{{item.pay_money}} + + + + + 确认付款 + 查看订单 + 删除 + + + + + 正在加载... + 没有更多了 + + + 没有内容哦~ + + diff --git a/pages/orderList/orderList.wxss b/pages/orderList/orderList.wxss new file mode 100644 index 0000000..2715e56 --- /dev/null +++ b/pages/orderList/orderList.wxss @@ -0,0 +1,271 @@ +.main-container { + background: #f5f5f5; + font-size: 3.2vw; + min-height: 100vh; + padding-top: 10.667vw; + width: 100vw; +} + +.nav-list { + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + background-color: #fff; + border-bottom: 1px solid #e4e4e4; + box-shadow: 0 0 .267vw 0 rgba(0,0,0,.2); + box-sizing: border-box; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + height: 10.667vw; + justify-content: space-between; + left: 0; + padding: 0 1.333vw; + position: fixed; + top: 0; + width: 100vw; + z-index: 1; +} + +.nav-list .nav-item { + box-sizing: border-box; + color: #343434; + font-size: 3.467vw; + font-weight: 500; + line-height: 5.333vw; + padding: 3.467vw 2.667vw; +} + +.nav-list .nav-item .text--active { + color: #06a2b3; + position: relative; +} + +.nav-list .nav-item .text--active:after { + background: #06a2b3; + content: ""; + display: block; + height: .533vw; + left: 0; + position: absolute; + top: 6.667vw; + width: 100%; + z-index: 100; +} + +.order-list { + box-sizing: border-box; + padding: 2.267vw 4vw 0; +} + +.order-list .order-item { + background-color: #fff; + border-radius: 2.133vw; + margin-bottom: 2.667vw; + overflow: hidden; +} + +.thin-border_b { + border-color: #f4f4f4; + position: relative; +} + +.order-list .order-item .order-item__hd { + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + align-items: center; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + height: 10.267vw; + justify-content: space-between; + padding-left: 2.667vw; + padding-right: 2.667vw; +} + +.order-list .order-item .order-item__hd .state { + color: #06a2b3; + font-size: 3.2vw; + font-weight: 500; + line-height: 3.2vw; +} + +.thin-border_b:after { + border-bottom: .267vw solid; + border-color: inherit; + bottom: 0; + content: ""; + left: 0; + position: absolute; + transform: scaleY(.5); + width: 100%; +} + +.order-list .order-item .order-item__bd { + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + flex-direction: column; + padding: 3.2vw 2.667vw; +} + +.order-list .order-item .order-item__bd .order-mes { + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-box-align: start; + -ms-flex-align: start; + align-items: flex-start; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + justify-content: space-between; + margin-bottom: 2.667vw; +} + +.order-list .order-item .order-item__bd .order-mes .img-shop { + height: 18.4vw; + width: 18.667vw; +} + +.order-list .order-item .order-item__bd .order-mes .mes { + -webkit-box-align: start; + -ms-flex-align: start; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + align-items: flex-start; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + flex-direction: column; +} + +.overflow-1-row,.overflow-2-row { + overflow: hidden; + text-overflow: ellipsis; +} + +.overflow-2-row { + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + display: -webkit-box; + word-break: break-all; +} + +.order-list .order-item .order-item__bd .order-mes .mes .mes-name { + box-sizing: border-box; + color: #343434; + font-size: 3.733vw; + font-weight: 500; + line-height: 5.333vw; + margin-bottom: 1.333vw; + padding-left: 2vw; + width: 64vw; +} + +.order-list .order-item .order-item__bd .order-money { + -webkit-box-orient: horizontal; + align-content: center; + color: #3a3a3a; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + font-size: 12px; + font-weight: 500; + justify-content: space-between; + line-height: 3.733vw; +} + +.order-list .order-item .order-item__bd .date { + color: #999; +} + +.order-list .order-item .order-item__bd .order-money span { + color: #3a3a3a; + display: inline; + font-size: 4.533vw; + font-weight: 500; + line-height: 4.267vw; +} + +.thin-border_t { + border-color: #f4f4f4; + position: relative; +} + +.order-list .order-item .order-item__ft { + -webkit-box-pack: end; + -ms-flex-pack: end; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + height: 12.533vw; + justify-content: flex-end; + padding-left: 2.667vw; + padding-right: 2.667vw; +} + +.thin-border_t:before { + border-bottom: .267vw solid; + border-color: inherit; + content: ""; + left: 0; + position: absolute; + top: 0; + transform: scaleY(.5); + width: 100%; +} + +.order-list .order-item .order-item__ft .btn-box { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} + +.order-list .order-item .order-item__ft .btn-box .btn { + background-color: #06a2b3; + border-radius: 3.6vw; + box-sizing: border-box; + color: #fff; + font-size: 3.2vw; + font-weight: 500; + height: 7.2vw; + line-height: 7.2vw; + margin-left: 2.667vw; + min-width: 18vw; + padding: 0 1.333vw; + text-align: center; +} + +.order-list .order-item .order-item__ft .btn-box .btn-grey { + background-color: #fff; + border: .267vw solid #222; + color: #222; + line-height: 6.933vw; +} + +.van-list__error-text,.van-list__finished-text,.van-list__loading,.van-pull-refresh__head { + color: #969799; + font-size: 14px; + line-height: 50px; + text-align: center; +} \ No newline at end of file diff --git a/pages/orderPay/orderPay.js b/pages/orderPay/orderPay.js new file mode 100644 index 0000000..fb7f55e --- /dev/null +++ b/pages/orderPay/orderPay.js @@ -0,0 +1,192 @@ +var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), t = require("../../@babel/runtime/helpers/asyncToGenerator"), a = (getApp(), +require("../../utils/login.js")), r = require("../../utils/common.js"); + +Page({ + data: { + showLoding: !0, + num: "", + name: "", + mobile: "", + uniqid: "", + tips: "", + info: {}, + totalprice: "", + amount: 0, + data: {}, + ordercart: [], + orderData: {}, + token: "", + restTime: "", + orderid: "" + }, + onLoad: function(e) { + this.setData({ + num: e.num, + name: e.name, + mobile: e.mobile, + amount: e.amount, + uniqid: e.uniqid, + orderid: e.orderid + }), e.orderid ? this.getOrderDetail() : this.payCreate(); + }, + input: function(e) { + this.setData({ + tips: e.detail.value + }); + }, + payCreate: function() { + var r = this; + return t(e.default.mark(function t() { + var n, s; + return e.default.wrap(function(e) { + for (;;) switch (e.prev = e.next) { + case 0: + return r, e.prev = 1, e.next = 4, a.request(a.baseUrl + "shop/order/submit", { + uniqid: r.data.uniqid, + name: r.data.name, + mobile: r.data.mobile, + amount: r.data.amount, + orderid: r.data.orderid + }, !0); + + case 4: + n = e.sent, s = n.data, r.setData({ + message: n.message, + status: s.status, + data: s + }), r.getOrderDetail(), e.next = 13; + break; + + case 10: + e.prev = 10, e.t0 = e.catch(1), console.log(e.t0); + + case 13: + case "end": + return e.stop(); + } + }, t, null, [ [ 1, 10 ] ]); + }))(); + }, + getOrderDetail: function() { + var n = this; + return t(e.default.mark(function t() { + var s, i, o; + return e.default.wrap(function(e) { + for (;;) switch (e.prev = e.next) { + case 0: + return n, s = n.data.orderid || n.data.data.orderid, e.prev = 2, e.next = 5, a.request(a.baseUrl + "shop/order/detail", { + orderid: s + }, !0); + + case 5: + i = e.sent, o = i.data, console.log("(data.orderData.status", o.orderData.status), + 1 == o.orderData.status && wx.redirectTo({ + url: "/pages/orderPaySuccess/orderPaySuccess?orderid=" + o.orderData.orderid + }), o.orderData.updatetime = r.changeTime(new Date(1e3 * o.orderData.updatetime)), + n.setData({ + showLoding: !1, + ordercart: o.ordercart, + orderData: o.orderData, + token: o.token + }), n.calculateResttime(), e.next = 17; + break; + + case 14: + e.prev = 14, e.t0 = e.catch(2), console.log(e.t0); + + case 17: + case "end": + return e.stop(); + } + }, t, null, [ [ 2, 14 ] ]); + }))(); + }, + calculateResttime: function() { + var e = this; + if (0 == this.data.orderData.status) { + var t = r.restTime(this.data.orderData.payexpiredtime); + t ? (this.setData({ + restTime: t.minute + ":" + t.second + }), setTimeout(function() { + e.calculateResttime(); + })) : (this.data.orderData.status = -1, this.setData({ + orderData: this.data.orderData + })); + } + }, + ispay: !1, + topay: function() { + var r = this; + return t(e.default.mark(function t() { + var n, s, i; + return e.default.wrap(function(e) { + for (;;) switch (e.prev = e.next) { + case 0: + if (n = r, -1 != r.data.orderData.status) { + e.next = 3; + break; + } + return e.abrupt("return", !1); + + case 3: + if (r.data.token) { + e.next = 5; + break; + } + return e.abrupt("return", !1); + + case 5: + if (!r.ispay) { + e.next = 7; + break; + } + return e.abrupt("return", !1); + + case 7: + return r.ispay = !0, n = r, e.prev = 9, e.next = 12, a.request(a.baseUrl + "shop/order/pay", { + token: r.data.token, + mark: r.data.tips + }, !0); + + case 12: + if (s = e.sent, i = s.data.result) { + e.next = 17; + break; + } + return n.ispay = !1, e.abrupt("return", !1); + + case 17: + wx.showLoading({ + title: "正在发起支付..." + }), wx.requestPayment({ + timeStamp: i.timestamp, + nonceStr: i.nonceStr, + package: i.package, + signType: i.signType, + paySign: i.paySign, + success: function(e) { + var t = n.data.orderid || n.data.data.orderid; + wx.redirectTo({ + url: "/pages/orderPaySuccess/orderPaySuccess?orderid=" + t + }); + }, + fail: function(e) { + console.log(e); + }, + complete: function(e) { + n.ispay = !1, wx.hideLoading(), console.log("complate", e); + } + }), e.next = 25; + break; + + case 21: + e.prev = 21, e.t0 = e.catch(9), console.log(e.t0), n.ispay = !1; + + case 25: + case "end": + return e.stop(); + } + }, t, null, [ [ 9, 21 ] ]); + }))(); + } +}); \ No newline at end of file diff --git a/pages/orderPay/orderPay.json b/pages/orderPay/orderPay.json new file mode 100644 index 0000000..9aef305 --- /dev/null +++ b/pages/orderPay/orderPay.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "聚美汽服", + "navigationBarBackgroundColor": "#06acb3", + "navigationBarTextStyle": "white", + "usingComponents": { + "page-loding": "../../template/pageLoding/pageLoding" + } +} \ No newline at end of file diff --git a/pages/orderPay/orderPay.wxml b/pages/orderPay/orderPay.wxml new file mode 100644 index 0000000..0afab4a --- /dev/null +++ b/pages/orderPay/orderPay.wxml @@ -0,0 +1,75 @@ + + + + + 支付剩余时间 + {{restTime}} + + + 订单已过期,请重新下单 + + + + + + + + + + + + + {{item.shop.name}} + + + ×{{item.shop_num}} + + + + + + 订单编号: + {{data.orderid||orderid}} + + + 下单时间: + {{orderData.updatetime}} + + + + + + + 订单备注: + + + + + + + + + + + + + + 商品总额 + ¥{{orderData.total_price}} + + 共{{orderData.total_num}}件商品,实付: ¥ + {{orderData.pay_money}} + + + + + 立即支付 + + + + diff --git a/pages/orderPay/orderPay.wxss b/pages/orderPay/orderPay.wxss new file mode 100644 index 0000000..bd5ec75 --- /dev/null +++ b/pages/orderPay/orderPay.wxss @@ -0,0 +1,486 @@ +.payorder .container { + border: 0; + display: block; + min-height: 100vh; + padding-bottom: 17.6vw; +} + +.payorder .section { + background-color: #fff; + margin-bottom: 2.667vw; + padding: 0 4vw; +} + +.payorder .order-time { + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -webkit-box-pack: center; + -ms-flex-pack: center; + background-color: #06acb3; + box-sizing: border-box; + color: #fff; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + flex-direction: column; + font-size: 3.733vw; + height: 26.4vw; + justify-content: center; + text-align: center; +} + +.payorder .order-time .time { + font-size: 8vw; + font-weight: 700; +} + +.payorder .user-info { + color: #2a2a2a; + font-size: 3.467vw; + line-height: 4.533vw; + padding: 4vw 0; +} + +.payorder .user-info .top { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + font-size: 4vw; +} + +.payorder .user-info .top+view { + margin-top: 2.133vw; +} + +.payorder .user-info .name { + padding-right: 6.667vw; +} + +.payorder .user-info .tel { + -webkit-box-flex: 1; + flex: 1; +} + +.payorder .goods-info { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + padding: 3.733vw 0; +} + +.payorder .goods-info .lt { + -webkit-box-flex: 16vw; + border-radius: 1.067vw; + flex: 16vw 0 0; + margin-right: 3.2vw; + width: 16vw; +} + +.payorder .goods-info .lt_pic { + overflow: hidden; + padding-top: 100%; + position: relative; +} + +.payorder .goods-info .lt_pic image { + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} + +.payorder .goods-info .rt { + -webkit-box-flex: 1; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + display: -webkit-inline-box; + display: -ms-inline-flexbox; + display: -webkit-inline-flex; + display: inline-flex; + flex: 1; + flex-direction: column; +} + +.payorder .goods-info .rt,.payorder .goods-info .rt ._btm { + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; +} + +.payorder .goods-info .rt ._btm { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} + +.payorder .goods-info .rt_tit { + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + color: #2a2a2a; + display: -webkit-box; + font-size: 3.733vw; + line-height: 5.067vw; + overflow: hidden; + text-overflow: ellipsis; + word-break: break-all; +} + +.payorder .goods-info .rt_price { + font-size: 3.733vw; +} + +.payorder .goods-info .rt_num { + font-size: 3.2vw; +} + +.payorder .goods-attr { + padding: 2.667vw 0; +} + +.payorder .goods-attr .title { + color: #2a2a2a; + font-size: 3.733vw; + margin-bottom: 2.133vw; +} + +.payorder .goods-attr .item { + -webkit-box-pack: justify; + -ms-flex-pack: justify; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + font-size: 3.467vw; + justify-content: space-between; + line-height: 6.4vw; +} + +.payorder .goods-attr .it_name { + color: #787878; +} + +.payorder .goods-attr .it_name .text { + color: #2a2a2a; + margin-left: 2.667vw; +} + +.payorder .goods-attr .it_price { + color: #787878; +} + +.payorder .order-area { + border-top: 1px solid #eee; + padding: 2.667vw 0; +} + +.payorder .order-item { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + font-size: 3.733vw; + line-height: 7.467vw; +} + +.payorder .order-item .van-field__label { + line-height: 24px; +} + +.payorder .order-item .hd,.payorder .order-item .van-field__label { + -webkit-box-flex: 21.333vw; + flex: 21.333vw 0 0; + width: 21.333vw; +} + +.payorder .order-item .bd { + -webkit-box-flex: 1; + flex: 1; +} + +.van-cell { + align-items: flex-start; + background-color: #fff; + box-sizing: border-box; + color: #323233; + display: flex; + font-size: 14px; + line-height: 24px; + overflow: hidden; + padding: 10px 16px; + position: relative; + width: 100%; +} + +.van-cell__value { + word-wrap: break-word; + color: #969799; + display: inline-flex; + flex: 1; + overflow: visible; + position: relative; + text-align: right; + vertical-align: middle; +} + +.van-field__body { + -webkit-box-align: center; + align-items: center; + display: block; + width: 100%; +} + +.van-field__control { + background-color: initial; + border: 0; + box-sizing: border-box; + color: #323233; + display: block; + font-size: 14px; + line-height: 24px; + margin: 0; + min-width: 0; + resize: none; + text-align: left; + width: 100%; +} + +.van-cell__title { + line-height: 24px; +} + +.payorder .order-item .item_input { + height: 7.467vw; + line-height: 7.467vw; +} + +.payorder .jifen-area { + -webkit-box-orient: horizontal; + -webkit-box-direction: reverse; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + flex-direction: row-reverse; + height: 8vw; +} + +.payorder .jifen-area .van-checkbox__label { + -webkit-box-flex: 1; + flex: 1; +} + +.payorder .jifen-area .hd { + color: #06a2b3; + font-size: 3.733vw; + font-weight: 500; +} + +.payorder .jifen-area .bd { + -webkit-box-flex: 1; + flex: 1; +} + +.payorder .section-money { + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + background-color: #fff; + flex-direction: column; + padding-left: 4vw; + padding-top: 4.8vw; +} + +.payorder .section-money,.payorder .section-money>.money__row { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} + +.payorder .section-money>.money__row { + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + align-items: center; + justify-content: space-between; + margin-bottom: 4vw; + padding-right: 4vw; +} + +.payorder .money__row>.title { + color: #2a2a2a; + font-size: 3.733vw; +} + +.payorder .money__row>.title--big { + font-size: 3.733vw; +} + +.payorder .money__row>.money { + color: #eb5252; + font-family: DIN; + font-size: 3.733vw; +} + +.payorder .money__row>.money--black { + color: #2a2a2a; +} + +.payorder .section-money>.money__total { + -webkit-box-pack: end; + -ms-flex-pack: end; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + border-top: 1px solid #eee; + color: #2a2a2a; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + font-size: 3.733vw; + font-weight: 500; + height: 14.4vw; + justify-content: flex-end; + padding-right: 4vw; +} + +.payorder .section-money>.money__total>span { + color: #eb5252; + font-size: 3.467vw; + line-height: 3.467vw; +} + +.payorder .section-money>.money__total>.money { + color: #eb5252; + font-size: 4.8vw; + line-height: 4vw; + margin-left: .533vw; +} + +.payorder .pay-btn { + background-color: #fff; + bottom: 0; + left: 0; + position: fixed; + right: 0; +} + +.payorder .pay-btn .area { + padding: 2.667vw 4vw; +} + +.payorder .pay-btn .btn { + background-color: #06acb3; + border-radius: 4.8vw; + color: #fff; + font-size: 4vw; + height: 100%; + line-height: 9.6vw; + text-align: center; + width: 100%; +} + +.payorder .section-block { + -webkit-box-orient: horizontal; + -webkit-box-direction: reverse; + background-color: #fff; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + flex-direction: row-reverse; + font-size: 4vw; + margin-top: 2.667vw; + padding: 4vw; +} + +.payorder .section-block .van-checkbox__label { + -webkit-box-flex: 1; + flex: 1; +} + +.payorder .checkbox .wx-checkbox-input { + background-color: #ddd; + border: 0; + border-radius: 50%; + height: 4vw; + overflow: hidden; + width: 4vw; +} + +.payorder .checkbox .wx-checkbox-input.wx-checkbox-input-checked { + background: #ddd!important; +} + +.payorder .checkbox .wx-checkbox-input.wx-checkbox-input-checked:before { + background-color: #7fc167; + border: 0; + border-radius: 50%; + content: ""; + height: 100%; + transform: translate(-51%,-51%) scale(.6); + width: 100%; +} + +.payorder .popbox { + background: #fff; + border-radius: 4vw; + height: 65.467vw; + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%,-70%); + width: 72vw; +} + +.payorder .popbox .title { + color: #2a2a2a; + font-size: 4.8vw; + font-weight: 600; + height: 17.333vw; + line-height: 17.333vw; + text-align: center; +} + +.payorder .popbox .mesbox { + color: #2a2a2a; + font-size: 4vw; + line-height: 6.4vw; + padding: 7.6vw 0 12.267vw; + text-align: center; +} + +.payorder .popbox .btnbox { + -webkit-box-pack: justify; + -ms-flex-pack: justify; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + justify-content: space-between; + padding: 0 5.6vw; +} + +.payorder .popbox .btnbox .btn { + border-color: #2a2a2a; + border-radius: 12vw; + color: #2a2a2a; + font-size: 3.733vw; + height: 9.333vw; + line-height: 9.333vw; + text-align: center; + width: 28vw; +} + +.placeholder { + line-height: 24px; +} \ No newline at end of file diff --git a/pages/orderPaySuccess/matchList/matchList.js b/pages/orderPaySuccess/matchList/matchList.js new file mode 100644 index 0000000..a85704f --- /dev/null +++ b/pages/orderPaySuccess/matchList/matchList.js @@ -0,0 +1,5 @@ +Component({ + properties: {}, + data: {}, + methods: {} +}); \ No newline at end of file diff --git a/pages/orderPaySuccess/matchList/matchList.json b/pages/orderPaySuccess/matchList/matchList.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/pages/orderPaySuccess/matchList/matchList.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/orderPaySuccess/matchList/matchList.wxml b/pages/orderPaySuccess/matchList/matchList.wxml new file mode 100644 index 0000000..145afe0 --- /dev/null +++ b/pages/orderPaySuccess/matchList/matchList.wxml @@ -0,0 +1,23 @@ + + + 搭配更优惠 + + + + + + + + 【新会】椰子鸡再次返场!9.9元起抢「骨汁恋·星汇店」100元代金券! + + + + ¥9.90 + ¥100.00 + + 立即抢购 + + + + + diff --git a/pages/orderPaySuccess/matchList/matchList.wxss b/pages/orderPaySuccess/matchList/matchList.wxss new file mode 100644 index 0000000..85a80ee --- /dev/null +++ b/pages/orderPaySuccess/matchList/matchList.wxss @@ -0,0 +1,137 @@ +.info-wrap { + background-color: #fff; + border-top: 3.2vw solid #f8f8f8; + padding: 0 4vw 5.333vw; +} + +.module-title { + color: #2a2a2a; + font-size: 4.267vw; + font-weight: 700; + line-height: 1; + margin: 5.333vw 0 8.533vw; + text-align: center; +} + +.module-title .tit { + display: inline-block; + position: relative; + vertical-align: top; +} + +.module-title .line { + background-color: #06a2b3; + border-radius: .8vw; + height: .8vw; + left: 35%; + margin-top: 2.133vw; + position: absolute; + top: 100%; + width: 30%; +} + +.tuijian-goods { + border-radius: 1.6vw; + box-shadow: 0 1.067vw 2.667vw 0 rgba(0,0,0,.08); + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + padding: 3.6vw; +} + +.tuijian-goods .lt { + -ms-flex-negative: 0; + flex-shrink: 0; +} + +.tuijian-goods .lt image { + display: block; + height: 26vw; + width: 26vw; +} + +.tuijian-goods .tuijian-rt { + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-box-flex: 1; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + flex: 1; + flex-direction: column; + justify-content: space-between; + margin-left: 3.2vw; +} + +.tuijian-goods .vip-price { + width: max-content; +} + +.tuijian-goods .goods-name { + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + color: #2a2a2a; + display: -webkit-box; + font-size: 3.733vw; + font-weight: 500; + overflow: hidden; + text-overflow: ellipsis; + word-break: break-all; +} + +.tuijian-goods .goods-info .price { + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + align-items: center; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + justify-content: space-between; +} + +.tuijian-goods .goods-info .now-price { + color: #eb5252; + font-size: 3.467vw; + font-weight: 500; + margin-right: 3.2vw; +} + +.tuijian-goods .goods-info .old-price { + color: #9b9b9b; + font-size: 3.2vw; + text-decoration: line-through; +} + +.tuijian-goods .goods-info .btn { + -ms-flex-negative: 0; + background-color: #06a2b3; + border-radius: .933vw; + color: #fff; + flex-shrink: 0; + font-size: 3.2vw; + height: 6.667vw; + line-height: 6.667vw; + text-align: center; + width: 18.667vw; +} + +.vip-price { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + background-color: #2a2a2a; + border-radius: .8vw; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + font-size: 2.933vw; + margin-right: 2.667vw; +} \ No newline at end of file diff --git a/pages/orderPaySuccess/orderPaySuccess.js b/pages/orderPaySuccess/orderPaySuccess.js new file mode 100644 index 0000000..ea3c5ff --- /dev/null +++ b/pages/orderPaySuccess/orderPaySuccess.js @@ -0,0 +1,50 @@ +var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), r = require("../../@babel/runtime/helpers/slicedToArray"), t = require("../../@babel/runtime/helpers/asyncToGenerator"), i = (getApp(), +require("../../utils/login.js")); + +require("../../utils/common.js"); + +Page({ + data: { + showLoding: !0, + orderid: "", + recommendedList: [], + info: {} + }, + onLoad: function(e) { + this.setData({ + orderid: e.orderid || "" + }), this.getOrderDetail(); + }, + getOrderDetail: function() { + var n = this; + return t(e.default.mark(function t() { + var a, o, s; + return e.default.wrap(function(e) { + for (;;) switch (e.prev = e.next) { + case 0: + return n, e.prev = 1, a = n.data.orderid, e.next = 5, i.request(i.baseUrl + "shop/notify/paymentSuccessful", { + orderid: a + }, !0); + + case 5: + o = e.sent, console.log("getOrderDetail", o), (s = o.data).recommendedList.forEach(function(e) { + var t = e.price.split("."), i = r(t, 2); + e.price_buck = i[0], e.price_cent = i[1]; + }), n.setData({ + showLoding: !1, + info: s, + recommendedList: s.recommendedList + }), e.next = 15; + break; + + case 12: + e.prev = 12, e.t0 = e.catch(1), console.log(e.t0); + + case 15: + case "end": + return e.stop(); + } + }, t, null, [ [ 1, 12 ] ]); + }))(); + } +}); \ No newline at end of file diff --git a/pages/orderPaySuccess/orderPaySuccess.json b/pages/orderPaySuccess/orderPaySuccess.json new file mode 100644 index 0000000..3bb3c3a --- /dev/null +++ b/pages/orderPaySuccess/orderPaySuccess.json @@ -0,0 +1,7 @@ +{ + "usingComponents": { + "match-list": "./matchList/matchList", + "recomond-list": "../goodsDetails/recomondList/recomondList", + "page-loding": "../../template/pageLoding/pageLoding" + } +} \ No newline at end of file diff --git a/pages/orderPaySuccess/orderPaySuccess.wxml b/pages/orderPaySuccess/orderPaySuccess.wxml new file mode 100644 index 0000000..0e2cb2d --- /dev/null +++ b/pages/orderPaySuccess/orderPaySuccess.wxml @@ -0,0 +1,22 @@ + + + + + + + 订单支付成功 + ¥{{info.pay_money}} + + 查看订单 + 再去逛逛 + + + + + 为您推荐 + + + + + + diff --git a/pages/orderPaySuccess/orderPaySuccess.wxss b/pages/orderPaySuccess/orderPaySuccess.wxss new file mode 100644 index 0000000..57c717d --- /dev/null +++ b/pages/orderPaySuccess/orderPaySuccess.wxss @@ -0,0 +1,233 @@ +.pay-success { + background: #f5f5f5; +} + +.payok-top { + background-color: #fff; + text-align: center; +} + +.payok-top .icon { + padding-top: 6.667vw; +} + +.payok-top .icon image { + display: block; + height: 24vw; + margin: 0 auto; + width: 24vw; +} + +.payok-top .price { + color: #eb5252; + font-size: 6.933vw; + font-weight: 500; +} + +.payok-top .handle { + -webkit-box-pack: center; + -ms-flex-pack: center; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + justify-content: center; + padding-bottom: 4vw; +} + +.payok-top .tip { + color: #2a2a2a; + font-size: 4vw; + margin-bottom: 2vw; + margin-top: 2vw; +} + +.payok-top .btn { + border: 1px solid #b4b4b4; + border-radius: 8vw; + color: #2a2a2a; + font-size: 3.733vw; + line-height: 6.933vw; + margin: 3.2vw auto 0; + padding: 0 1.333vw; + width: 20%; +} + +.payok-redlist { + background-color: #fff; +} + +.payok-redlist .title { + color: #2a2a2a; + font-size: 3.733vw; + font-weight: 700; + margin: 0 auto 5.333vw; + position: relative; + width: max-content; +} + +.payok-redlist .title:after,.payok-redlist .title:before { + background-color: #2a2a2a; + content: ""; + height: .267vw; + position: absolute; + top: 50%; + transform: translateY(-50%); + width: 3.467vw; +} + +.payok-redlist .title:before { + left: -5.333vw; +} + +.payok-redlist .title:after { + right: -5.333vw; +} + +.payok-redlist .lists { + -webkit-overflow-scrolling: touch; + overflow: hidden; + overflow-x: auto; + padding-bottom: 4vw; +} + +.payok-redlist .list { + color: #ff985b; + padding-left: 4vw; + white-space: nowrap; +} + +.payok-redlist .list,.payok-redlist .list .item { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} + +.payok-redlist .list .item { + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + background: rgba(255,39,65,.05); + border: 1px solid #06a2b3; + border-radius: 2vw; + box-sizing: border-box; + flex-direction: column; + height: 24.133vw; + justify-content: space-between; + margin-right: 4vw; + padding: 2.667vw; + position: relative; + width: 39.6vw; + z-index: 1; +} + +.payok-redlist .list .item:after,.payok-redlist .list .item:before { + background-color: #fff; + border: 1px solid; + border-color: inherit; + border-radius: 50%; + content: ""; + display: none; + height: 4vw; + position: absolute; + top: 50%; + transform: translateY(-50%); + width: 4vw; +} + +.payok-redlist .list .item:before { + left: -2vw; +} + +.payok-redlist .list .item:after { + right: -2vw; +} + +.payok-redlist .list .item .name { + color: #2a2a2a; + font-size: 3.733vw; + height: 4.8vw; + line-height: 4.8vw; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.payok-redlist .list .item .money { + color: #fff; + font-size: 4.133vw; + font-weight: 500; +} + +.payok-redlist .list .item .btm { + -webkit-box-align: end; + -ms-flex-align: end; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + align-items: flex-end; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + justify-content: space-between; +} + +.payok-redlist .list .item .intro { + color: #2a2a2a; + font-size: 3.2vw; + margin-top: 2.133vw; +} + +.payok-redlist .list .item .btn { + background-color: #06a2b3; + border-radius: 2.667vw; + color: #fff; + font-size: 2.933vw; + padding: .8vw 2.133vw; +} + +.payok-title .title { + color: #2a2a2a; + font-size: 4.8vw; + font-weight: 700; + margin: 0 auto; + position: relative; + width: max-content; +} + +.payok-title .title:after,.payok-title .title:before { + background-color: #2a2a2a; + content: ""; + height: .667vw; + position: absolute; + top: 50%; + width: 2.667vw; +} + +.payok-title .title:before { + left: -4.267vw; +} + +.payok-title .title:after { + right: -4.267vw; +} + +.payok-section { + background-color: #fff; + margin-top: 3.2vw; +} + +.payok-title { + padding: 6.667vw 0; + text-align: center; +} + +.wrap { + margin: 0 5.333vw; +} + +.tuilist { + padding: 0; +} \ No newline at end of file diff --git a/pages/register/register.js b/pages/register/register.js new file mode 100644 index 0000000..1c8f7ed --- /dev/null +++ b/pages/register/register.js @@ -0,0 +1,111 @@ +var t = getApp(), o = require("../../utils/login.js"); + +Page({ + data: { + type: "login", + issubmit: !1, + info: { + mobile: "", + smscode: "" + }, + token: "", + provision: {}, + tips: [], + showTips: !1, + approve: !0 + }, + onLoad: function(a) { + var e = this; + this.setData({ + type: a.type || "login" + }), o.pageStart(t).then(function(o) { + console.log(t.globalData), e.setData({ + protocol: t.globalData.protocol + }); + }); + }, + input: function(t) { + this.data.info[t.currentTarget.dataset.name] = t.detail.value, this.setData({ + info: this.data.info + }); + }, + bindsubmit: function(t) { + if (console.log(t.detail.formId), this.data.issubmit) return !1; + this.setData({ + issubmit: !0 + }), wx.showLoading({ + title: "" + }); + var o = this; + "reset" == this.data.type ? this.submitForm() : wx.login({ + success: function(t) { + console.log(t.code), wx.getUserInfo({ + success: function(a) { + o.submitForm(t.code, a); + }, + fail: function() { + o.submitForm(t.code); + } + }); + }, + fail: function(t) {} + }); + }, + submitForm: function(a, e) { + var i = this, n = {}; + Object.assign(n, e, { + token: this.data.token, + smscode: this.data.info.smscode, + code: a + }), console.log(n), o.request(t.globalData.config.verify[i.data.type], n, !0).then(function(o) { + return wx.hideLoading(), i.setData({ + issubmit: !1 + }), 200 == o.code && (i.setData({ + countdowntime: 0 + }), "login" == i.data.type && wx.setStorageSync("session", o.data.session), wx.showToast({ + title: o.message, + icon: "none" + }), t.globalData.isneedUpload = !0, t.globalData.needJumpUrl ? (wx.redirectTo({ + url: t.globalData.needJumpUrl + }), t.globalData.needJumpUrl = !1, !1) : void wx.navigateBack({ + delta: 1 + })); + }).catch(function(t) { + i.setData({ + issubmit: !1 + }); + }); + }, + sendMsg: function() { + if ("" == this.data.info.mobile.trim()) return wx.showModal({ + title: "提示", + content: "请输入手机号码~" + }), !1; + var a = this; + o.request(t.globalData.config.verify.sms, { + mobile: a.data.info.mobile, + type: a.data.type + }, !0).then(function(t) { + console.log("daa", t), wx.showToast({ + title: "验证码已发送~", + icon: "none" + }), a.setData({ + token: t.data.token, + countdowntime: t.data.countdowntime + }, function() { + a.timer = setInterval(function() { + if (0 == a.data.countdowntime) return clearInterval(a.timer), !1; + a.data.countdowntime--, a.setData({ + countdowntime: a.data.countdowntime + }); + }, 1e3); + }); + }).catch(function(t) {}); + }, + timer: null, + showprovision: function() { + this.setData({ + showTips: !this.data.showTips + }); + } +}); \ No newline at end of file diff --git a/pages/register/register.json b/pages/register/register.json new file mode 100644 index 0000000..9f7c42c --- /dev/null +++ b/pages/register/register.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "聚美汽服", + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/register/register.wxml b/pages/register/register.wxml new file mode 100644 index 0000000..bf0ec19 --- /dev/null +++ b/pages/register/register.wxml @@ -0,0 +1,16 @@ + + +
+ + + 发送验证码 + {{countdowntime}}秒后重新发送 + + + + + 点击注册并登录,代表您已同意 《{{protocol.name}}》 + + +
+
diff --git a/pages/register/register.wxss b/pages/register/register.wxss new file mode 100644 index 0000000..c9e64f9 --- /dev/null +++ b/pages/register/register.wxss @@ -0,0 +1,81 @@ +.container { + background: #fff; + box-sizing: border-box; + height: 100vh; + overflow: hidden; + padding: 106rpx 105rpx 0; + width: 100vw; +} + +.logo { + height: 192rpx; + margin: 0 auto; + width: 192rpx; +} + +.form,.logo { + display: block; +} + +.form { + padding-top: 14rpx; +} + +.form .item { + background-color: #eee; + border-radius: 18rpx; + height: 82rpx; + margin: 38rpx 0 0; + position: relative; +} + +.item input { + box-sizing: border-box; + font-size: 26rpx; + padding: 0 24rpx; + width: calc(100% - 150rpx); +} + +.item .sendMsg,.item input { + height: 80rpx; + line-height: 80rpx; +} + +.item .sendMsg { + color: #0101a9; + font-size: 22rpx; + padding-right: 24rpx; + position: absolute; + right: 0; + text-align: right; + top: 0; +} + +.tips { + color: #555; + font-size: 22rpx; + margin-top: 14rpx; + text-align: center; +} + +.tips .a { + color: #0101a9; + display: inline-block; +} + +.btn { + background-color: #0068b7; + border: none; + border-radius: 18rpx; + color: #fff; + font-size: 33rpx; + height: 84rpx; + line-height: 84rpx; + margin: 50rpx auto 0; + text-align: center; + width: 418rpx; +} + +.btnsubmit { + opacity: .5; +} \ No newline at end of file diff --git a/pages/singleStart/singleStart.js b/pages/singleStart/singleStart.js new file mode 100644 index 0000000..fc7a6e6 --- /dev/null +++ b/pages/singleStart/singleStart.js @@ -0,0 +1,19 @@ +Page({ + data: { + banner: [], + selectIndex: 0 + }, + onLoad: function(n) {}, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {}, + selectItem: function(n) { + this.setData({ + selectIndex: n.currentTarget.dataset.index + }); + } +}); \ No newline at end of file diff --git a/pages/singleStart/singleStart.json b/pages/singleStart/singleStart.json new file mode 100644 index 0000000..0a80e1a --- /dev/null +++ b/pages/singleStart/singleStart.json @@ -0,0 +1,7 @@ +{ + "navigationBarTitleText": "聚美汽服", + "usingComponents": { + "service-tel": "../../template/serviceTel/serviceTel", + "head-swiper": "../../template/headSwiper/headSwiper" + } +} \ No newline at end of file diff --git a/pages/singleStart/singleStart.wxml b/pages/singleStart/singleStart.wxml new file mode 100644 index 0000000..682476d --- /dev/null +++ b/pages/singleStart/singleStart.wxml @@ -0,0 +1,12 @@ + + + 请选择单次洗车金额 + + 6.00元 + + + + 余额洗车 + 单次启动 + + diff --git a/pages/singleStart/singleStart.wxss b/pages/singleStart/singleStart.wxss new file mode 100644 index 0000000..ab19788 --- /dev/null +++ b/pages/singleStart/singleStart.wxss @@ -0,0 +1,52 @@ +.container { + box-sizing: border-box; + min-height: 100vh; + padding: 0 27rpx 170rpx; +} + +.title-tips { + color: #666; + font-size: 26rpx; + line-height: 90rpx; + padding: 0; +} + +.item { + background-color: #fff; + border-radius: 18rpx; + box-shadow: 0 0rpx 9rpx 4rpx hsla(0,0%,40%,.3); + color: #333; + font-size: 87rpx; + height: 180rpx; + line-height: 180rpx; + margin-bottom: 32rpx; + text-align: center; +} + +.item.active { + box-shadow: 0 0rpx 9rpx 4rpx rgba(255,102,0,.3); + color: #f60; +} + +.footer-btn-box { + bottom: 0; + color: #fff; + display: flex; + font-size: 44rpx; + left: 0; + position: fixed; + width: 100vw; +} + +.footer-btn-box .btn { + align-items: center; + background: #4cadf1; + display: inline-flex; + flex: 1; + height: 104rpx; + justify-content: center; +} + +.btn.yellow { + background: #fccaa9; +} \ No newline at end of file diff --git a/pages/user/user.js b/pages/user/user.js new file mode 100644 index 0000000..989ea9d --- /dev/null +++ b/pages/user/user.js @@ -0,0 +1,60 @@ +var t = getApp(), e = require("../../utils/login.js"); + +Page({ + data: { + showLoding: !0, + urlList: [], + user: {} + }, + onLoad: function(n) { + var o = this; + e.pageStart(t).then(function(t) { + o.getContent(); + }); + }, + onShow: function() { + this.refresh && this.getContent(); + }, + onPullDownRefresh: function() {}, + onShareAppMessage: function() {}, + getContent: function() { + var n = this; + wx.showLoading({ + title: "" + }), e.request(t.globalData.config.user.log, {}, !0).then(function(t) { + if (wx.hideLoading(), 200 != t.code) return wx.showModal({ + title: "提示", + content: t.message + }), !1; + n.setData({ + showLoding: !1, + user: t.data.user, + urlList: t.data.menu + }, function() {}); + }).catch(function(t) { + wx.hideLoading(); + }); + }, + islogin: function() { + wx.showLoading({ + title: "加载中" + }); + }, + refresh: 0, + toPage: function(t) { + var e = t.currentTarget.dataset, n = (e.refresh, e.url); + n ? wx.navigateTo({ + url: "/pages/".concat(n) + }) : wx.showToast({ + title: "页面开发中~", + icon: "none", + duration: 2e3 + }), this.refresh = 1; + }, + callUs: function() { + if (!t.globalData.servicetel) return !1; + wx.makePhoneCall({ + phoneNumber: "" + t.globalData.servicetel + }); + } +}); \ No newline at end of file diff --git a/pages/user/user.json b/pages/user/user.json new file mode 100644 index 0000000..23c85e9 --- /dev/null +++ b/pages/user/user.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "聚美汽服", + "usingComponents": { + "service-tel": "../../template/serviceTel/serviceTel", + "my-money": "../../template/myMoney/myMoney", + "page-loding": "../../template/pageLoding/pageLoding" + } +} \ No newline at end of file diff --git a/pages/user/user.wxml b/pages/user/user.wxml new file mode 100644 index 0000000..d1755ed --- /dev/null +++ b/pages/user/user.wxml @@ -0,0 +1,75 @@ + + + + + + + + 订单管理 + 全部订单 > + + + + + 待付款 + + + + 待使用 + + + + 已完成 + + + + + + + {{item.name}} + + + + 联系客服 + + + + 首页 + 扫一扫 + 充值 + + diff --git a/pages/user/user.wxss b/pages/user/user.wxss new file mode 100644 index 0000000..daa769f --- /dev/null +++ b/pages/user/user.wxss @@ -0,0 +1,227 @@ +.container { + background: #fafafa; + min-height: 100vh; + padding: 0rpx 0 100rpx; +} + +.container,.page-top { + box-sizing: border-box; +} + +.page-top { + background-image: linear-gradient(-70deg,#11b393,#4eb9f7); + height: 290rpx; + margin-bottom: 112rpx; + padding: 38rpx 27rpx; + position: relative; +} + +.shadow { + background: #fff; + border-radius: 18rpx; + box-shadow: 0 0rpx 9rpx 4rpx hsla(0,0%,80%,.75); +} + +.page-top .user-info { + align-items: center; + display: flex; +} + +.page-top .user-info .left { + display: inline-flex; + flex-direction: column; +} + +.page-top .user-info .avatar { + border: 5rpx solid #fff; + border-radius: 50%; + display: inline-flex; + flex: 0 0 110rpx; + height: 110rpx; + margin-right: 20rpx; + overflow: hidden; + width: 110rpx; +} + +.page-top .user-info .avatar image { + height: 100%; + width: 100%; +} + +.page-top .user-info .info { + align-items: center; + color: #fff; + display: inline-flex; + flex: 1; + font-size: 26rpx; + justify-content: space-between; +} + +.page-top .user-info .info .username { + font-size: 33rpx; + margin-bottom: 20rpx; +} + +.page-top .user-info .right { + display: inline-flex; +} + +.page-top .user-info .right .zhe { + height: 58rpx; + margin-left: 6px; + width: 58rpx; +} + +.page-top .user-info .right .xunzhang { + height: 59rpx; + width: 118rpx; +} + +.page-top .my-capital { + background: #fff; + height: 184rpx; + left: 27rpx; + position: absolute; + top: 182rpx; + width: calc(100vw - 54rpx); + z-index: 3; +} + +.title { + align-items: center; + color: #000; + display: flex; + font-size: 29rpx; + justify-content: space-between; + padding-left: 34rpx; + padding-top: 10rpx; +} + +.title .btn,.title .text { + display: inline-flex; +} + +.title .btn { + color: #666; + font-size: 22rpx; + padding: 10rpx 14rpx; +} + +.money-box { + display: flex; + padding: 16rpx 0 24rpx; +} + +.money-box .item { + align-items: center; + display: inline-flex; + flex: 1; + flex-direction: column; + font-weight: 400; + justify-content: center; +} + +.money-box .item .num { + color: #f60; + font-size: 33rpx; + margin-bottom: 4rpx; +} + +.money-box .item .name { + color: #666; + font-size: 22rpx; +} + +.order-manager { + box-sizing: border-box; + margin: 0 27rpx 36rpx; +} + +.order-manager .list { + display: flex; + padding: 18rpx 0 30rpx; +} + +.order-manager .list .item { + align-items: center; + background: #fff; + border: none; + color: #666; + display: inline-flex; + flex: 1; + flex-direction: column; + font-size: 50rpx; + height: 97rpx; + justify-content: space-between; +} + +button::after { + background: transparent; + border: none; +} + +.iconfont { + font-size: 64rpx; + margin: -10rpx; +} + +.order-manager .list .item .name { + font-size: 22rpx; + margin-top: 2rpx; +} + +.url-list { + align-items: flex-start; + box-sizing: border-box; + display: flex; + flex-wrap: wrap; + font-size: 0rpx; + margin: 0 27rpx 36rpx; + padding-bottom: 12rpx; +} + +.url-list .item { + align-items: center; + background: transparent; + color: #666; + display: inline-flex; + flex-direction: column; + font-size: 26rpx; + justify-content: space-between; + line-height: 1; + padding: 50rpx 0 34rpx; + text-align: center; + width: 33.33%; +} + +.url-list .item .name { + margin-top: 22rpx; +} + +.footer-btn { + background: #fff; + bottom: 0; + box-shadow: 0 0rpx 9rpx 4rpx hsla(0,0%,80%,.75); + color: #666; + display: flex; + font-size: 29rpx; + left: 0; + padding: 12rpx 0; + position: fixed; + width: 100vw; +} + +.footer-btn,.footer-btn .btn { + align-items: center; +} + +.footer-btn .btn { + display: inline-flex; + flex: 1; + height: 58rpx; + justify-content: center; +} + +.footer-btn .btn:not(:last-child) { + border-right: 1px solid #999; +} \ No newline at end of file diff --git a/pages/voucher/voucher.js b/pages/voucher/voucher.js new file mode 100644 index 0000000..5af263a --- /dev/null +++ b/pages/voucher/voucher.js @@ -0,0 +1,175 @@ +var t = getApp(), e = require("../../utils/login.js"); + +Page({ + data: { + showLoding: !0, + list: [], + user: {}, + page: { + next_page: 1 + }, + servicetel: "", + edition: 1, + selectItemID: null, + loading: !1, + provision: {}, + tips: [], + showTips: !1, + approve: !0 + }, + onLoad: function (a) { + var i = this; + e.pageStart(t).then(function (e) { + i.getList(), i.setData({ + servicetel: t.globalData.servicetel + }); + }); + }, + onShow: function (e) { + t.globalData.isneedUpload && (this.getList(), t.globalData.isneedUpload = !1); + }, + onPullDownRefresh: function () { + this.setData({ + list: [] + }), this.getList(); + }, + onReachBottom: function () { + this.getList(); + }, + onShareAppMessage: function () { }, + getList: function () { + var a = this; + if (this.data.loading) return !1; + this.setData({ + loading: !0 + }), wx.showLoading({ + title: "" + }), e.request(t.globalData.config.recharge.init, { + page: this.data.page.next_page + }, !0).then(function (t) { + if (wx.hideLoading(), a.setData({ + loading: !1 + }), 200 != t.code) return wx.showModal({ + title: "提示", + content: t.message + }), !1; + a.setData({ + showLoding: !1, + list: t.data.list, + user: t.data.user, + protocol: t.data.protocol, + tips: t.data.tips.split("\n") + }, function () { }); + }).catch(function (t) { + wx.hideLoading(); + }); + }, + tobuy: function (a) { + var i = a.currentTarget.dataset.id; + wx.showLoading({ + title: "" + }), e.request(t.globalData.config.recharge.create, { + id: i + }, !0).then(function (t) { + if (wx.hideLoading(), 200 != t.code) return wx.showModal({ + title: "提示", + content: t.message + }), !1; + var e = t.data.result; + + console.log('tobuy', e, t); + + wx.requestPayment({ + timeStamp: e.timeStamp, + nonceStr: e.nonceStr, + package: e.package, + signType: e.signType, + paySign: e.paySign, + success: function (t) { + + // 加载回调接口 + e.request(t.data.notify_url, { + orderid: t.data.orderid + }, !0).then(function (t) { + console.log('pay_success', t); + }).catch(function (t) { + console.log('pay_success', t); + }); + + getCurrentPages().length > 1 ? wx.navigateBack({}) : wx.redirectTo({ + url: "/pages/index/index" + }); + } + }); + }).catch(function (t) { + wx.hideLoading(); + }); + }, + selectItem: function (t) { + var e = t.currentTarget.dataset.id; + this.setData({ + selectItemID: e + }); + }, + isSubmit: !1, + tobuyNow: function (a) { + if (!this.data.approve) return wx.showToast({ + title: "请勾选同意相关条款", + icon: "none" + }), !1; + if (!this.data.selectItemID || this.isSubmit) return wx.showToast({ + title: "请选择充值金额~", + icon: "none" + }), !1; + this.isSubmit = !0, wx.showLoading({ + title: "" + }); + var i = this; + e.request(t.globalData.config.recharge.create, { + id: i.data.selectItemID + }, !0).then(function (t) { + if (wx.hideLoading(), i.isSubmit = !1, 200 != t.code) return wx.showModal({ + title: "提示", + content: t.message + }), !1; + var r = t.data.result; + wx.requestPayment({ + timeStamp: r.timeStamp, + nonceStr: r.nonceStr, + package: r.package, + signType: r.signType, + paySign: r.paySign, + success: function (o) { + + if (t.data.notify_url) { + // 加载回调接口 + e.request(t.data.notify_url, { + orderid: t.data.orderid + }, !0).then(function (t) { + console.log('pay_success', t); + }).catch(function (t) { + console.log('pay_success', t); + }); + } + + getCurrentPages().length > 1 ? wx.navigateBack({}) : wx.redirectTo({ + url: "/pages/index/index" + }); + } + }); + }).catch(function (t) { + wx.hideLoading(), i.isSubmit = !1; + }); + }, + showprovision: function () { + this.setData({ + showTips: !this.data.showTips + }); + }, + change: function (t) { + var e = t.detail.value.length; + this.setData({ + approve: 1 == e + }); + } +}); \ No newline at end of file diff --git a/pages/voucher/voucher.json b/pages/voucher/voucher.json new file mode 100644 index 0000000..23c85e9 --- /dev/null +++ b/pages/voucher/voucher.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "聚美汽服", + "usingComponents": { + "service-tel": "../../template/serviceTel/serviceTel", + "my-money": "../../template/myMoney/myMoney", + "page-loding": "../../template/pageLoding/pageLoding" + } +} \ No newline at end of file diff --git a/pages/voucher/voucher.wxml b/pages/voucher/voucher.wxml new file mode 100644 index 0000000..2fe5b7d --- /dev/null +++ b/pages/voucher/voucher.wxml @@ -0,0 +1,65 @@ + + + + + + + + + + {{item.title}} + {{item.message}} + + ¥{{item.paymentamount}}元 + ¥{{item.money*1+item.bonusamount*1}}元 + + + + 优惠 +购买 + + + + + 我的优惠券 + + + + 选择充值金额 + 余额:{{user.money}} + + + + {{item.paymentamount}}元 + 赠送{{item.bonusamount*1}}元 + + + + + + + + 暂无相关数据 + + 立即充值 + + + + + + {{protocol.name}} + + {{item}} + + + + + 温馨提示: + + {{item}} + + + + diff --git a/pages/voucher/voucher.wxss b/pages/voucher/voucher.wxss new file mode 100644 index 0000000..8686b67 --- /dev/null +++ b/pages/voucher/voucher.wxss @@ -0,0 +1,193 @@ +.container { + box-sizing: border-box; + min-height: 100vh; + padding: 0rpx 28rpx 168rpx; +} + +.money { + margin-top: 36rpx; +} + +.list-box { + padding: 36rpx 0; +} + +.list-box .item { + background-color: #fff; + border-radius: 18rpx; + box-shadow: 0 0rpx 9rpx 4rpx hsla(0,0%,80%,.75); + display: flex; + justify-content: space-between; + margin-bottom: 24rpx; +} + +.list-box .item.active { + box-shadow: 0 0rpx 9rpx 4rpx rgba(255,102,0,.4); +} + +.list-box .info { + display: inline-flex; + flex-direction: column; + padding: 14rpx 50rpx 14rpx 18rpx; +} + +.list-box .info .name { + color: #333; + font-size: 30rpx; + margin-bottom: 12rpx; +} + +.list-box .info .include { + color: #666; + font-size: 22rpx; + min-height: 64rpx; +} + +.list-box .info .click { + color: 999; + display: inline; +} + +.list-box .info .price { + display: inline-flex; + font-size: 22rpx; + margin-top: 14rpx; +} + +.info .now { + color: #f30; + margin-right: 50rpx; +} + +.info .origin { + color: #999; + text-decoration: line-through; +} + +.list-box .buy-btn { + align-items: center; + background-color: #4cadf1; + border-radius: 18rpx; + color: #fff; + display: inline-flex; + font-size: 33rpx; + justify-content: center; + width: 119rpx; +} + +.list-box .item.active .buy-btn { + background: #f60; +} + +.edition1-money { + color: #333; + display: flex; + font-size: 29rpx; + justify-content: space-between; + padding: 20rpx 0; +} + +.edition1-money .r { + font-size: 22rpx; +} + +.edition1-list { + display: flex; + flex-wrap: wrap; + justify-content: space-between; +} + +.edition1-list>view { + display: inline-flex; + width: calc(33.333% - 20rpx); +} + +.edition1-list .edition1-item { + align-items: center; + background: #fff; + border: 5rpx solid #4cadf1; + border-radius: 18rpx; + box-sizing: border-box; + color: #0281db; + display: inline-flex; + flex-direction: column; + height: 158rpx; + justify-content: center; + margin: 0 0 28rpx; +} + +.edition1-list .edition1-item:nth-child(3n+2) { + margin: 0 20rpx 28rpx; +} + +.edition1-list .edition1-item .now { + font-size: 42rpx; + margin-bottom: 4rpx; +} + +.edition1-list .edition1-item .origin { + font-size: 24rpx; +} + +.edition1-list .edition1-item.edition1-select { + border-color: #f50; + color: #f50; +} + +.edition1-list .edition1-item.active { + background: #4cadf1; + color: #fff; +} + +.edition1-list .edition1-item.edition1-select.active { + background: #f50; + color: #fff; +} + +.tobuy-btn { + align-items: center; + background: #1baa1c; + border: 2rpx solid #218721; + border-radius: 18rpx; + color: #fff; + display: flex; + font-size: 33rpx; + height: 91rpx; + justify-content: center; + margin-top: 3rpx; +} + +.tobuy-btn.disabled { + opacity: .7; +} + +.provision { + display: block; + margin: 40rpx 0 0; +} + +.provision .text { + color: #0281db; + display: inline-block; +} + +.warm-prompt { + padding: 60rpx 0; +} + +.warm-prompt .title { + color: #f30; + font-size: 32rpx; + font-weight: 600; + margin-bottom: 16rpx; +} + +.warm-prompt .content { + color: #666; + font-size: 26rpx; + line-height: 1.8; +} + +.warm-prompt .content .view { + margin-bottom: 10rpx; +} \ No newline at end of file diff --git a/pages/wangdian/wangdian.js b/pages/wangdian/wangdian.js new file mode 100644 index 0000000..7fb1438 --- /dev/null +++ b/pages/wangdian/wangdian.js @@ -0,0 +1,149 @@ +// pages/wangdian/wangdian.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + banner: [{ + "subject": "安全", + "url": "", + "aid": 81, + "image": "https:\/\/jmqf.v0750.com\/attachment\/Zvt57TuJSUvkyhw-xGrY2l-d__Y-fiaMucgip5B4ELaVVGL3d_RgQwUIEt40NDI5" + }, { + "subject": "网约车", + "url": null, + "aid": 89, + "image": "https:\/\/jmqf.v0750.com\/attachment\/Zvt57TuJSUvkyhw-xGrY2l-d9_Y-fiaMucgip5B4ELbDBWWicKZgQwUIEt40NDI5" + }, { + "subject": "肇康店", + "url": "pages\/map\/map", + "aid": 88, + "image": "https:\/\/jmqf.v0750.com\/attachment\/Zvt57TuJSUvkyhw-xGrY2l-d9vY-fiaMucgip5B4ELaZUm6jcvdgQwUIEt40NDI5" + }], + info: { + name:"三和大道店", + liangdian: [ + {"name":"券","ys":"#FF6600"}, + {"name":"PA壶","ys":"#37CE05"}, + {"name":"人工帮洗","ys":"#0056A3"}, + {"name":"轮胎打气","ys":"#08AFDE"}, + ], + tag:"冲水|泡沫|吸尘|吹气|洗手", + ads:"会城帝临南路18号", + yingye:"24小时", + juli:"12.68KM", + bili: "83%", + jiqi_zs: 12, + jiqi_kx: 10 + }, + jiqilist: [ + { + "id": "1840001", + "state": 1, //0:离线,1:空间,2:使用中,3:禁用 + "isPA": 1, //用接PA壶,0:不要,1:可接 + },{ + "id": "1840002", + "state": 2, + "isPA": 1, + },{ + "id": "1840003", + "state": 0, + "isPA": 1, + },{ + "id": "1840004", + "state": 3, + "isPA": 1, + },{ + "id": "1840005", + "state": 1, + "isPA": 0, + },{ + "id": "1840006", + "state": 2, + "isPA": 0, + },{ + "id": "1840007", + "state": 0, + "isPA": 1, + },{ + "id": "1840008", + "state": 1, + "isPA": 0, + },{ + "id": "1840009", + "state": 1, + "isPA": 0, + },{ + "id": "1840010", + "state": 2, + "isPA": 1, + },{ + "id": "1840011", + "state": 0, + "isPA": 0, + },{ + "id": "1840012", + "state": 1, + "isPA": 1, + + } + ] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/wangdian/wangdian.json b/pages/wangdian/wangdian.json new file mode 100644 index 0000000..342b817 --- /dev/null +++ b/pages/wangdian/wangdian.json @@ -0,0 +1,8 @@ +{ + "usingComponents": { + "service-tel": "../../template/serviceTel/serviceTel", + "my-money": "../../template/myMoney/myMoney", + "head-swiper": "../../template/headSwiper/headSwiper", + "page-loding": "../../template/pageLoding/pageLoding" + } +} \ No newline at end of file diff --git a/pages/wangdian/wangdian.wxml b/pages/wangdian/wangdian.wxml new file mode 100644 index 0000000..38b9432 --- /dev/null +++ b/pages/wangdian/wangdian.wxml @@ -0,0 +1,53 @@ + + + + + + + {{info.name}} + {{item_l.name}} + + {{info.tag}} + {{info.ads}} + {{info.yingye}} + + + {{info.juli}} + + + + + + + 空闲 {{info.jiqi_kx}}/{{info.jiqi_zs}}台 + 洗车机 + + + + + + {{i.id}} + PA壶 + + + + {{i.id}} + PA壶 + + + + {{i.id}} + PA壶 + + + + {{i.id}} + PA壶 + + + + + + + + \ No newline at end of file diff --git a/pages/wangdian/wangdian.wxss b/pages/wangdian/wangdian.wxss new file mode 100644 index 0000000..8d556b1 --- /dev/null +++ b/pages/wangdian/wangdian.wxss @@ -0,0 +1,173 @@ +.content { + padding: 0 30rpx 30rpx; + margin-bottom: 40rpx; + background-color: #fff; + box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, .2); +} + +.index-wangdian-title { + line-height: 70rpx; + padding: 10rpx 0; + position: relative; +} + +.index-wangdian-title .title_c { + font-size: 36rpx; + color: #0056A3; +} + +.index-wangdian-title .title_c .line { + position: absolute; + bottom: 12rpx; + left: 14rpx; + height: 10rpx; + width: 10%; + border-radius: 20rpx; + background-color: #0056A3; +} + +.index-wangdian-title .more { + position: absolute; + right: 0; + font-size: 28rpx; + color: #37CE05; +} + +.info { + position: relative; + padding-top: 10rpx; +} + +.info .title_c { + display: inline-block; + font-size: 36rpx; + line-height: 48rpx; + margin-bottom: 10rpx; +} + +.info .title .ld { + display: inline-block; + font-size: 24rpx; + line-height: 36rpx; + height: 32rpx; + color: #fff; + border-radius: 10rpx; + padding: 0 6rpx; + margin-left: 6rpx; +} + +.info .tag, .info .ads { + font-size: 28rpx; + line-height: 2; + color: #999; +} + +.info .jiqi { + font-size: 24rpx; + line-height: 2; + color: #37CE05; +} + +.info .yingye { + +} + +.info .dw { + position: absolute; + right: 20rpx; + top: 35rpx; + height: 120rpx; + width: 120rpx; + font-size: 24rpx; + color: #0056A3; + text-align: center; +} + +.info .dw .ico { + font-size: 80rpx; +} + + +.list { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + padding: 20rpx 0 0; + text-align: center; +} + +.list .jiqi { + flex-direction: column; + width: 22%; + margin: 20rpx 4% 20rpx 0; + position: relative; +} + +.list .jiqi:nth-child(4n+4) { + margin-right: 0; +} + +.mac_state { + width: 100rpx; + height: 100rpx; + border-radius: 50rpx; + margin: 0 auto; + font-size: 40rpx; + border: 10rpx solid #aaa; + box-sizing: border-box; + line-height: 80rpx; + +} + +.mac_state text { + color: #fff; +} + +.mac_id { + font-size: 24rpx; +} + +.jiqi .pa { + position: absolute; + left: 50%; + margin-left: -34rpx; + top: -15rpx; + padding: 2rpx 10rpx; + border-radius: 8rpx; +} + + +.list .jiqi .x, .x .mac_state text { + color: #30b504; +} + +.x .mac_state { + border-color: #30b504; +} + +.list .jiqi .j, .j .mac_state text { + color: #C13700; +} + +.j .mac_state { + border-color: #C13700; +} + +.list .jiqi .w, .w .mac_state text { + color: #08AFDE; +} + +.w .mac_state { + border-color: #08AFDE; +} + +.list .jiqi .d, .d .mac_state text { + color: #aaa; +} + + +.list .jiqi .pa { + font-size: 20rpx; + color: #fff; + background-color: #f60; +} \ No newline at end of file diff --git a/pages/wangdianList/wangdianList.wxml b/pages/wangdianList/wangdianList.wxml new file mode 100644 index 0000000..65f4e60 --- /dev/null +++ b/pages/wangdianList/wangdianList.wxml @@ -0,0 +1,27 @@ + \ No newline at end of file diff --git a/pages/washCodeDetail/washCodeDetail.js b/pages/washCodeDetail/washCodeDetail.js new file mode 100644 index 0000000..00c51fd --- /dev/null +++ b/pages/washCodeDetail/washCodeDetail.js @@ -0,0 +1,70 @@ +var e = getApp(), i = require("../../utils/login.js"), t = require("../../utils/common.js"); + +Page({ + data: { + showLoding: !0, + info: {}, + id: "" + }, + onLoad: function(t) { + var o = this; + wx.showLoading({ + title: "" + }), this.setData({ + id: t.id || 1 + }), i.pageStart(e).then(function(e) { + o.getList(); + }); + }, + getList: function() { + var o = this; + wx.showLoading({ + title: "" + }), i.request(e.globalData.config.carwashcoupon.details, { + id: this.data.id + }, !0).then(function(e) { + if (wx.hideLoading(), 200 != e.code) return wx.showModal({ + title: "提示", + content: e.message + }), !1; + e.data.starttime = t.changeTimeyear(new Date(1e3 * e.data.starttime)), e.data.deadline = t.changeTimeyear(new Date(1e3 * e.data.deadline)), + o.setData({ + info: e.data, + showLoding: !1 + }, function() {}); + }).catch(function(e) { + wx.hideLoading(); + }); + }, + isSubmit: !1, + received: function() { + if (this.isSubmit) return !1; + var t = this; + this.isSubmit = !0, wx.showLoading(), console.log("received"), i.request(e.globalData.config.carwashcoupon.receive, { + id: t.data.id, + token: t.data.info.token + }, !0).then(function(e) { + console.log("receiveddqta", e), wx.hideLoading(), t.isSubmit = !1, console.log("recief"), + wx.showModal({ + title: "提示", + content: e.message, + success: function(e) { + e.confirm && wx.redirectTo({ + url: "/pages/index/index" + }); + } + }); + }).catch(function(e) { + wx.hideLoading(), t.isSubmit = !1, console.log("提示提示提示提示", e), 201 == e.code && wx.showModal({ + title: "提示", + content: e.message, + success: function(e) { + if (!e.confirm) return console.log("弹窗取消"), !1; + wx.redirectTo({ + url: "/pages/index/index" + }); + } + }); + }); + } +}); \ No newline at end of file diff --git a/pages/washCodeDetail/washCodeDetail.json b/pages/washCodeDetail/washCodeDetail.json new file mode 100644 index 0000000..7501eb5 --- /dev/null +++ b/pages/washCodeDetail/washCodeDetail.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + "page-loding": "../../template/pageLoding/pageLoding" + }, + "navigationBarTitleText": "聚美汽服" +} \ No newline at end of file diff --git a/pages/washCodeDetail/washCodeDetail.wxml b/pages/washCodeDetail/washCodeDetail.wxml new file mode 100644 index 0000000..2c07522 --- /dev/null +++ b/pages/washCodeDetail/washCodeDetail.wxml @@ -0,0 +1,27 @@ + + + + + + + 领取洗车码 + {{info.name}} + 本洗车码可在以下网点使用 + {{item.t_name}} + + 有效期:{{info.starttime}} - {{info.deadline}} + + 立即领取 + 领取后在洗车码页面中查看 + + 如何使用洗车码 + + 1、打开微信扫一扫 +2、扫描洗车机上的二维码 +3、点击“洗车码”图标 +4、选择要使用的洗车码 +5、点击最下方按钮,启动机器 + + + + diff --git a/pages/washCodeDetail/washCodeDetail.wxss b/pages/washCodeDetail/washCodeDetail.wxss new file mode 100644 index 0000000..b8e60ce --- /dev/null +++ b/pages/washCodeDetail/washCodeDetail.wxss @@ -0,0 +1,162 @@ +.container { + background: #fff; + height: 100vh; + overflow: hidden; +} + +.container,.login-bg { + width: 100vw; +} + +.yellow-bg { + background: #f5c82e; + height: 83vh; + transform: rotateZ(-45deg); + transform-origin: right top; + width: 187vw; + z-index: 1; +} + +.car,.yellow-bg { + bottom: 0; + position: fixed; + right: 0; +} + +.car { + height: 643rpx; + width: 557rpx; + z-index: 2; +} + +.logo { + height: 192rpx; + left: 50%; + position: fixed; + top: 180rpx; + transform: translateX(-50%); + width: 192rpx; + z-index: 2; +} + +.btn { + background-color: #1baa1c; + border: 1px solid #218721; + border-radius: 10rpx; + color: #fff; + font-size: 33rpx; + height: 95rpx; + line-height: 95rpx; + margin: 0 auto; + text-align: center; + width: 485rpx; + z-index: 11; +} + +.btn,.text-inner { + box-sizing: border-box; +} + +.text-inner { + height: 100vh; + left: 0; + padding: 46rpx; + position: fixed; + top: 0; + width: 100vw; + z-index: 12; +} + +.page-title { + color: #000; + font-size: 44rpx; + margin-bottom: 34rpx; + text-align: center; +} + +.code { + align-items: center; + border: 1px solid #ccc; + border-radius: 10rpx; + display: flex; + font-size: 33rpx; + height: 95rpx; + justify-content: center; + margin: 0 auto 16rpx; + text-align: center; +} + +.code,.use-location { + background: #f1f1f1; + box-sizing: border-box; + color: #666; + width: 485rpx; +} + +.use-location { + border: 1px solid #ccc; + border-radius: 18rpx; + font-size: 26rpx; + font-weight: 400; + margin: 0 auto 18rpx; + padding: 20rpx 26rpx; + text-align: left; +} + +.use-location .list { + margin-top: 4rpx; +} + +.use-location .list .item { + display: block; + margin-top: 6rpx; +} + +.use-location .list .item::before { + background: #666; + border-radius: 50%; + content: ""; + display: inline-block; + height: 22rpx; + margin-right: 8rpx; + width: 22rpx; +} + +.time { + font-size: 22rpx; + margin-top: 52rpx; +} + +.tips { + color: #666; + font-size: 26rpx; + margin: 20rpx 0 60rpx; + opacity: .7; + text-align: center; +} + +.howTOuse { + background-color: #fff; + border-radius: 18rpx; + box-sizing: border-box; + color: #333; + font-size: 33rpx; + height: 363rpx; + opacity: .8; + padding: 14rpx 34rpx; + width: 660rpx; + z-index: 12; +} + +.howTOuse .title { + color: #000; + font-size: 44rpx; + margin-bottom: 4rpx; + text-align: center; +} + +text { + line-height: 52rpx; + margin: 0; + padding: 0; +} \ No newline at end of file diff --git a/pages/washCodeList/washCodeList.js b/pages/washCodeList/washCodeList.js new file mode 100644 index 0000000..3c0d399 --- /dev/null +++ b/pages/washCodeList/washCodeList.js @@ -0,0 +1,130 @@ +var t = getApp(), e = require("../../utils/login.js"), a = require("../../utils/common.js"); + +Page({ + data: { + showLoding: !0, + list: [], + user: {}, + loading: !1, + selectIndex: null, + selectID: null, + isScan: !1 + }, + onLoad: function(a) { + var i = this; + e.pageStart(t).then(function(e) { + i.getList(), console.log("app.globalData.devicecode", t.globalData.user.money, t.globalData.devicecode), + i.setData({ + isScan: !!t.globalData.devicecode + }); + }); + }, + onShow: function() { + this.isneedUpload && (this.getList(), this.isneedUpload = !1); + }, + onPullDownRefresh: function() {}, + onShareAppMessage: function() {}, + toPage: function(t) { + var e = t.currentTarget.dataset.url; + e ? wx.navigateTo({ + url: "/pages/".concat(e) + }) : wx.showToast({ + title: "页面开发中~", + icon: "none", + duration: 2e3 + }); + }, + selectItem: function(t) { + var e = t.currentTarget.dataset, a = (e.index, e.code); + if (1 != e.available) return wx.showToast({ + title: "该洗车券不可用~", + icon: "none" + }), !1; + this.setData({ + selectID: this.data.selectID == a ? null : a + }); + }, + isloading: !1, + getList: function(i) { + var o = this; + if (this.isloading) return !1; + wx.showLoading(), this.setData({ + loading: !0 + }), this.isloading = !0, e.request(t.globalData.config.carwashcoupon.lists, {}, !0).then(function(t) { + if (o.isloading = !1, o.setData({ + loading: !1 + }), wx.hideLoading(), 200 != t.code) return wx.showModal({ + title: "提示", + content: t.message + }), !1; + t.data.list.map(function(t) { + t.starttime = a.changeTimeyear(new Date(1e3 * t.starttime)), t.deadline = a.changeTimeyear(new Date(1e3 * t.deadline)); + }), o.setData({ + list: t.data.list, + user: t.data.user, + showLoding: !1 + }); + }).catch(function(t) { + o.isloading = !1, o.setData({ + loading: !1 + }), wx.hideLoading(); + }); + }, + toScan: function() { + var a = this; + if (this.isSubmit) return !1; + wx.scanCode({ + success: function(i) { + wx.showLoading({ + title: "" + }), t.globalData.qrcode = i.result, e.request("https://jmqf.v0750.com/miniprogram/identify", i, !0).then(function(e) { + if (wx.hideLoading(), 200 != e.code) return wx.showModal({ + title: "提示", + content: e.message + }), !1; + t.globalData.devicecode = e.data.devicecode || t.globalData.devicecode, a.setData({ + isScan: !!e.data.devicecode + }), a.getList(); + }).catch(function(t) { + wx.hideLoading(), a.isSubmit = !1; + }); + } + }); + }, + isSubmit: !1, + isneedUpload: !1, + isshowModal: !1, + toStart: function() { + var t = this; + return console.log("this.isSubmit", this.isSubmit), !this.isSubmit && (0 == this.data.list.length ? (wx.showModal({ + title: "提示", + content: "暂无可用洗车券~" + }), !1) : t.data.selectID ? void this.startup() : (wx.showModal({ + title: "提示", + content: "请选择洗车券" + }), !1)); + }, + startup: function() { + var a = this; + wx.showModal({ + title: "提示", + content: "你当前将要使用的机器编号是:".concat(t.globalData.devicecode, ",确认开机吗?"), + success: function(i) { + i.confirm && (a.isSubmit = !0, wx.showLoading({ + title: "正在启动" + }), e.request(t.globalData.config.machine.carwashcodestartup, { + washcode: a.data.selectID + }, !0).then(function(t) { + a.isSubmit = !1, wx.hideLoading(), 200 == t.code && wx.redirectTo({ + url: "/pages/user/user" + }); + }).catch(function(t) { + a.isSubmit = !1, wx.hideLoading(); + })); + }, + fail: function(t) { + console.log("fail:", t); + } + }); + } +}); \ No newline at end of file diff --git a/pages/washCodeList/washCodeList.json b/pages/washCodeList/washCodeList.json new file mode 100644 index 0000000..23c85e9 --- /dev/null +++ b/pages/washCodeList/washCodeList.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "聚美汽服", + "usingComponents": { + "service-tel": "../../template/serviceTel/serviceTel", + "my-money": "../../template/myMoney/myMoney", + "page-loding": "../../template/pageLoding/pageLoding" + } +} \ No newline at end of file diff --git a/pages/washCodeList/washCodeList.wxml b/pages/washCodeList/washCodeList.wxml new file mode 100644 index 0000000..4819047 --- /dev/null +++ b/pages/washCodeList/washCodeList.wxml @@ -0,0 +1,21 @@ + + + 请选择洗车券 + + + + + {{item.code}} + + 可使用网点:{{s.t_name+(i + + 有效期:{{item.starttime}} - {{item.deadline}} + + + + + 暂无洗车券 + + 扫码启动 + 立即启动 + diff --git a/pages/washCodeList/washCodeList.wxss b/pages/washCodeList/washCodeList.wxss new file mode 100644 index 0000000..efcaf18 --- /dev/null +++ b/pages/washCodeList/washCodeList.wxss @@ -0,0 +1,165 @@ +.container { + background: #fafafa; + box-sizing: border-box; + min-height: 100vh; + padding: 0 27rpx 140rpx; +} + +.form-box { + background: #fff; + height: 294rpx; + margin: 0 27rpx; +} + +.form-box .title { + border-bottom: 1px solid #eee; + color: #666; + font-size: 26rpx; + padding: 18rpx 24rpx 30rpx; +} + +.input-box { + background: #eee; + border-radius: 9rpx; + height: 90rpx; + margin: 60rpx 30rpx 0; + position: relative; +} + +.input-box input { + box-sizing: border-box; + display: block; + font-size: 32rpx; + height: 90rpx; + line-height: 90rpx; + padding: 0 28rpx; + width: calc(100% - 97rpx); +} + +.placeholder { + color: #999; +} + +.input-box .btn { + align-items: center; + display: flex; + height: 90rpx; + justify-content: center; + position: absolute; + right: 0; + top: 0; + width: 97rpx; +} + +.input-box .btn image { + height: 43rpx; + width: 45rpx; +} + +.title-tip { + border-bottom: 1px solid #f2f2f2; + color: #666; + font-size: 26rpx; + line-height: 80rpx; + padding-left: 14rpx; +} + +.list { + background: #fff; +} + +.item { + border-radius: 18rpx; + box-shadow: 0 0rpx 9rpx 4rpx hsla(0,0%,80%,.75); + padding: 14rpx 20rpx 14rpx 14rpx; +} + +.item .top { + align-items: center; + display: flex; +} + +.item .l { + align-items: flex-end; + color: #666; + font-size: 30rpx; +} + +.item .index,.item .l { + display: inline-flex; +} + +.item .index { + color: #999; +} + +.item .code { + color: #333; + display: inline-flex; + font-size: 33rpx; + line-height: 44rpx; +} + +.item .indate { + color: #999; + font-size: 22rpx; +} + +.item .r { + display: inline-flex; + padding: 14rpx; +} + +.item .radio { + border: 5rpx solid #666; + border-radius: 50%; + display: block; + height: 31rpx; + margin-right: 10rpx; + width: 31rpx; +} + +.item.active { + box-shadow: 0 0rpx 9rpx 4rpx rgba(255,102,0,.4); +} + +.item.active .code { + color: #f60; +} + +.item.active .radio { + border-color: #f60; + position: relative; +} + +.item.active .radio::after { + background: #f60; + border-radius: 50%; + content: ""; + display: block; + height: 15rpx; + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); + width: 15rpx; +} + +.item.item-notavailable .code { + color: #999; +} + +.item .location { + color: #666; + font-size: 22rpx; + line-height: 33rpx; + margin: 10rpx 0 2rpx; +} + +.item.item-notavailable .location { + color: #999; +} + +.scan-btn-unavailable { + opacity: .5; +} \ No newline at end of file diff --git a/pages/webview/webview.js b/pages/webview/webview.js new file mode 100644 index 0000000..ed79c0a --- /dev/null +++ b/pages/webview/webview.js @@ -0,0 +1,21 @@ +Page({ + data: { + url: "" + }, + onLoad: function(n) { + this.setData({ + url: n.url + }); + }, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() { + return { + path: "/pages/webview/webview?url=".concat(this.data.url) + }; + } +}); \ No newline at end of file diff --git a/pages/webview/webview.json b/pages/webview/webview.json new file mode 100644 index 0000000..3928faa --- /dev/null +++ b/pages/webview/webview.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/webview/webview.wxml b/pages/webview/webview.wxml new file mode 100644 index 0000000..34c346a --- /dev/null +++ b/pages/webview/webview.wxml @@ -0,0 +1 @@ + diff --git a/pages/webview/webview.wxss b/pages/webview/webview.wxss new file mode 100644 index 0000000..e69de29 diff --git a/project.config.json b/project.config.json new file mode 100644 index 0000000..1c05140 --- /dev/null +++ b/project.config.json @@ -0,0 +1,30 @@ +{ + "appid": "wxc7845752d17217d1", + "compileType": "miniprogram", + "libVersion": "3.3.4", + "packOptions": { + "ignore": [], + "include": [] + }, + "setting": { + "coverView": true, + "es6": false, + "postcss": true, + "minified": true, + "enhance": false, + "ignoreDevUnusedFiles": false, + "ignoreUploadUnusedFiles": false, + "showShadowRootInWxmlPanel": true, + "packNpmRelationList": [], + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" + } + }, + "condition": {}, + "editorSetting": { + "tabIndent": "insertSpaces", + "tabSize": 2 + } +} \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json new file mode 100644 index 0000000..5110753 --- /dev/null +++ b/project.private.config.json @@ -0,0 +1,10 @@ +{ + "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", + "projectname": "jmapp", + "setting": { + "compileHotReLoad": true, + "urlCheck": false + }, + "condition": {}, + "libVersion": "3.3.4" +} \ No newline at end of file diff --git a/template/headSwiper/headSwiper.js b/template/headSwiper/headSwiper.js new file mode 100644 index 0000000..c820be7 --- /dev/null +++ b/template/headSwiper/headSwiper.js @@ -0,0 +1,59 @@ +var t, e = require("../../@babel/runtime/helpers/defineProperty"); + +Component({ + properties: { + banner: Array + }, + lifetimes: { + attached: function() { + this.attachedIn(); + } + }, + attached: function() { + this.attachedIn(); + }, + data: (t = { + autoplay: !0 + }, e(t, "autoplay", !0), e(t, "interval", 3e3), e(t, "duration", 500), e(t, "circular", !0), + e(t, "swiperHeight", 100), e(t, "swiperWidth", 300), e(t, "imgUrl", []), t), + observers: { + banner: function(t) { + 0 == t.length && this.setData({ + swiperHeight: 0 + }); + } + }, + methods: { + attachedIn: function() { + var t = this, e = this.createSelectorQuery(); + e.select(".swiper").boundingClientRect(), e.exec(function(e) { + t.setData({ + swiperWidth: e[0].width + }); + }); + }, + previewImg: function(t) { + var e = t.currentTarget.dataset.url; + if (e) return wx.navigateTo({ + url: "/" + e + }), !1; + if (0 == this.data.imgUrl.length) { + var i = []; + this.properties.banner.map(function(t) { + i.push(t.image); + }), this.setData({ + imgUrl: i + }); + } + wx.previewImage({ + current: this.data.imgUrl[this.data.current], + urls: this.data.imgUrl + }); + }, + load: function(t) { + this.setData({ + swiperHeight: this.data.swiperWidth * t.detail.height / t.detail.width + }); + } + } +}); \ No newline at end of file diff --git a/template/headSwiper/headSwiper.json b/template/headSwiper/headSwiper.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/template/headSwiper/headSwiper.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/template/headSwiper/headSwiper.wxml b/template/headSwiper/headSwiper.wxml new file mode 100644 index 0000000..5f8e821 --- /dev/null +++ b/template/headSwiper/headSwiper.wxml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/template/headSwiper/headSwiper.wxss b/template/headSwiper/headSwiper.wxss new file mode 100644 index 0000000..506ce87 --- /dev/null +++ b/template/headSwiper/headSwiper.wxss @@ -0,0 +1,11 @@ +.slide-image { + width: 100%; +} + +.swiper { + margin:0 0 0; +} + +image { + height: 20px; +} \ No newline at end of file diff --git a/template/myMoney/myMoney.js b/template/myMoney/myMoney.js new file mode 100644 index 0000000..66be8bd --- /dev/null +++ b/template/myMoney/myMoney.js @@ -0,0 +1,7 @@ +Component({ + properties: { + user: Object + }, + data: {}, + methods: {} +}); \ No newline at end of file diff --git a/template/myMoney/myMoney.json b/template/myMoney/myMoney.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/template/myMoney/myMoney.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/template/myMoney/myMoney.wxml b/template/myMoney/myMoney.wxml new file mode 100644 index 0000000..5ec0704 --- /dev/null +++ b/template/myMoney/myMoney.wxml @@ -0,0 +1,8 @@ + + + 余额:{{user.money}} + 洗车金:{{user.principal}},赠送:{{user.givenamount}} + + 余额: 点击同步 + + diff --git a/template/myMoney/myMoney.wxss b/template/myMoney/myMoney.wxss new file mode 100644 index 0000000..dfe4c40 --- /dev/null +++ b/template/myMoney/myMoney.wxss @@ -0,0 +1,30 @@ +.money-box { + background: #eee; + color: #333; + justify-content: space-between; + margin: 0; + padding: 0 18rpx; +} + +.money-box,.money-box .l { + align-items: center; + display: flex; + height: 64rpx; +} + +.money-box .l { + flex: 1; + font-size: 29rpx; +} + +.money-box .r { + font-size: 22rpx; +} + +.hover { + background: transparent; +} + +.red { + color: #f50; +} \ No newline at end of file diff --git a/template/pageLoding/pageLoding.js b/template/pageLoding/pageLoding.js new file mode 100644 index 0000000..f87f0a1 --- /dev/null +++ b/template/pageLoding/pageLoding.js @@ -0,0 +1,21 @@ +getApp(), require("../../utils/login.js"); + +Component({ + properties: {}, + data: { + status: 0, + timer: null, + isUserAuthorization: 0 + }, + lifetimes: { + attached: function() { + this.attachedIn(); + } + }, + attached: function() { + this.attachedIn(); + }, + methods: { + attachedIn: function() {} + } +}); \ No newline at end of file diff --git a/template/pageLoding/pageLoding.json b/template/pageLoding/pageLoding.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/template/pageLoding/pageLoding.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/template/pageLoding/pageLoding.wxml b/template/pageLoding/pageLoding.wxml new file mode 100644 index 0000000..e3da721 --- /dev/null +++ b/template/pageLoding/pageLoding.wxml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/template/pageLoding/pageLoding.wxss b/template/pageLoding/pageLoding.wxss new file mode 100644 index 0000000..af6fe9b --- /dev/null +++ b/template/pageLoding/pageLoding.wxss @@ -0,0 +1,110 @@ +.loading { + align-items: center; + background: #fff; + color: #333; + display: flex; + font-size: 26rpx; + height: 100vh; + justify-content: center; + position: fixed; + width: 100vw; + z-index: 1000; +} + +.logo { + display: inline-flex; + height: 120rpx; + width: 120rpx; +} + +.circle { + border-radius: 50%; + box-sizing: border-box; + display: block; + left: calc(50vw - 120px); + position: fixed; + top: calc(50vh - 120px); +} + +.circle,.load-container { + height: 240px; + width: 240px; +} + +.load-container { + border: 1px solid hsla(0,0%,100%,.2); + box-sizing: border-box; + float: left; + overflow: hidden; + position: relative; +} + +.loader { + transform: translateZ(0); +} + +.load7 .loader:before,.loader:after { + content: ""; + position: absolute; + top: 0; +} + +.load6 .loader { + animation: load6 1.7s ease infinite; + border-radius: 50%; + font-size: 90px; + height: 1em; + margin: .8em auto; + overflow: hidden; + position: relative; + text-indent: -9999em; + width: 1em; +} + +@-webkit-keyframes load6 { + 0% { + box-shadow: -.11em -.83em 0 -.4em #e8e8e8,-.11em -.83em 0 -.42em #e8e8e8,-.11em -.83em 0 -.44em #e8e8e8,-.11em -.83em 0 -.46em #e8e8e8,-.11em -.83em 0 -.477em #e8e8e8; + transform: rotate(0deg); + } + + 5%,95% { + box-shadow: -.11em -.83em 0 -.4em #e8e8e8,-.11em -.83em 0 -.42em #e8e8e8,-.11em -.83em 0 -.44em #e8e8e8,-.11em -.83em 0 -.46em #e8e8e8,-.11em -.83em 0 -.477em #e8e8e8; + } + + 30% { + box-shadow: -.11em -.83em 0 -.4em #e8e8e8,-.51em -.66em 0 -.42em #e8e8e8,-.75em -.36em 0 -.44em #e8e8e8,-.83em -.03em 0 -.46em #e8e8e8,-.81em .21em 0 -.477em #e8e8e8; + } + + 55% { + box-shadow: -.11em -.83em 0 -.4em #e8e8e8,-.29em -.78em 0 -.42em #e8e8e8,-.43em -.72em 0 -.44em #e8e8e8,-.52em -.65em 0 -.46em #e8e8e8,-.57em -.61em 0 -.477em #e8e8e8; + } + + 100% { + box-shadow: -.11em -.83em 0 -.4em #e8e8e8,-.11em -.83em 0 -.42em #e8e8e8,-.11em -.83em 0 -.44em #e8e8e8,-.11em -.83em 0 -.46em #e8e8e8,-.11em -.83em 0 -.477em #e8e8e8; + transform: rotate(1turn); + } +} + +@keyframes load6 { + 0% { + box-shadow: -.11em -.83em 0 -.4em #e8e8e8,-.11em -.83em 0 -.42em #e8e8e8,-.11em -.83em 0 -.44em #e8e8e8,-.11em -.83em 0 -.46em #e8e8e8,-.11em -.83em 0 -.477em #e8e8e8; + transform: rotate(0deg); + } + + 5%,95% { + box-shadow: -.11em -.83em 0 -.4em #e8e8e8,-.11em -.83em 0 -.42em #e8e8e8,-.11em -.83em 0 -.44em #e8e8e8,-.11em -.83em 0 -.46em #e8e8e8,-.11em -.83em 0 -.477em #e8e8e8; + } + + 30% { + box-shadow: -.11em -.83em 0 -.4em #e8e8e8,-.51em -.66em 0 -.42em #e8e8e8,-.75em -.36em 0 -.44em #e8e8e8,-.83em -.03em 0 -.46em #e8e8e8,-.81em .21em 0 -.477em #e8e8e8; + } + + 55% { + box-shadow: -.11em -.83em 0 -.4em #e8e8e8,-.29em -.78em 0 -.42em #e8e8e8,-.43em -.72em 0 -.44em #e8e8e8,-.52em -.65em 0 -.46em #e8e8e8,-.57em -.61em 0 -.477em #e8e8e8; + } + + 100% { + box-shadow: -.11em -.83em 0 -.4em #e8e8e8,-.11em -.83em 0 -.42em #e8e8e8,-.11em -.83em 0 -.44em #e8e8e8,-.11em -.83em 0 -.46em #e8e8e8,-.11em -.83em 0 -.477em #e8e8e8; + transform: rotate(1turn); + } +} \ No newline at end of file diff --git a/template/serviceTel/serviceTel.js b/template/serviceTel/serviceTel.js new file mode 100644 index 0000000..2ce97eb --- /dev/null +++ b/template/serviceTel/serviceTel.js @@ -0,0 +1,36 @@ +var t = getApp(); + +Component({ + properties: {}, + data: { + tel: "" + }, + lifetimes: { + attached: function() { + this.attachedIn(); + } + }, + attached: function() { + this.attachedIn(); + }, + methods: { + attachedIn: function() { + this.getTel(); + }, + getTel: function() { + var e = this; + if (!t.globalData.canGetData) return setTimeout(function() { + e.getTel(); + }, 300), !1; + this.setData({ + tel: t.globalData.servicetel + }); + }, + callUs: function() { + if (!t.globalData.servicetel) return !1; + wx.makePhoneCall({ + phoneNumber: "" + t.globalData.servicetel + }); + } + } +}); \ No newline at end of file diff --git a/template/serviceTel/serviceTel.json b/template/serviceTel/serviceTel.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/template/serviceTel/serviceTel.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/template/serviceTel/serviceTel.wxml b/template/serviceTel/serviceTel.wxml new file mode 100644 index 0000000..311e882 --- /dev/null +++ b/template/serviceTel/serviceTel.wxml @@ -0,0 +1,4 @@ + + =客服电话= + {{tel}} + diff --git a/template/serviceTel/serviceTel.wxss b/template/serviceTel/serviceTel.wxss new file mode 100644 index 0000000..9e5867b --- /dev/null +++ b/template/serviceTel/serviceTel.wxss @@ -0,0 +1,9 @@ +.service-tel { + align-items: center; + color: #999; + display: flex; + flex-direction: column; + font-size: 26rpx; + justify-content: center; + line-height: 40rpx; +} \ No newline at end of file diff --git a/utils/common.js b/utils/common.js new file mode 100644 index 0000000..8f66087 --- /dev/null +++ b/utils/common.js @@ -0,0 +1,86 @@ +function e(e) { + return [ e.getFullYear(), e.getMonth() + 1, e.getDate() ].map(function(e) { + return e > 9 ? e : "0" + e; + }).join("-"); +} + +function t(e) { + return e > 9 ? e : "0" + e; +} + +module.exports = { + changeTimeyear: function(e) { + return [ e.getFullYear(), "年", e.getMonth() + 1, "月", e.getDate() ].map(function(e, t) { + return e > 9 || t % 2 == 1 ? e : "0" + e; + }).join(""); + }, + changeTime: e, + changeTimeMD: function(e) { + return [ e.getMonth() + 1, e.getDate() ].join("."); + }, + changeTimeDate: function(n) { + var o = new Date(), i = new Date(o.getTime() - 864e5); + return e(o) === e(n) ? "今日 " + [ t(n.getHours()), t(n.getMinutes()) ].join(":") : e(i) === e(n) ? "昨日 " + [ t(n.getHours()), t(n.getMinutes()) ].join(":") : [ n.getMonth() + 1, n.getDate() ].join("月") + " " + [ t(n.getHours()), t(n.getMinutes()) ].join(":"); + }, + caculateQueryHeight: function(e) { + return new Promise(function(t, n) { + wx.createSelectorQuery().select("." + e).boundingClientRect(function(e) { + console.log(e), t({ + width: e.width, + height: e.height, + left: e.left, + right: e.right, + top: e.top, + bottom: e.bottom + }); + }).exec(); + }); + }, + confirmAlert: function(e, t) { + return new Promise(function(n, o) { + wx.showModal({ + title: t || "提示", + content: e, + cancelColor: "#999999", + confirmColor: "#62C4A3", + success: function(e) { + e.confirm ? n(e) : o(); + } + }); + }); + }, + changeNum: t, + changeTimeHoursAgo: function(t) { + var n = new Date(), o = new Date(n.getTime() - 864e5); + if (e(n) === e(t)) { + var i = Math.floor((n.getTime() - t.getTime()) / 36e5); + return 0 == i ? Math.floor((n.getTime() - t.getTime()) / 6e4) + "分钟前" : i + "小时前"; + } + return e(o) === e(t) ? "昨天" : n.getFullYear() == t.getFullYear() ? [ t.getMonth() + 1, t.getDate() ].join("月") : [ t.getFullYear(), t.getMonth() + 1, t.getDate() ].join("."); + }, + showToast: function(e) { + wx.showToast({ + title: e, + icon: "none", + duration: 2e3, + mask: !0 + }); + }, + restTime: function(e) { + var t = 1e3 * e - new Date().getTime(); + if (t <= 0) return !1; + var n, o, i, r, a = t / 1e3 / 3600 / 24, u = 24 * (a - (n = Math.floor(a))), g = 60 * (u - (o = Math.floor(u))), c = 60 * (g - (i = Math.floor(g))); + return r = Math.floor(c), { + day: (n + "").padStart(2, "0"), + hour: (o + "").padStart(2, "0"), + minute: (i + "").padStart(2, "0"), + second: (r + "").padStart(2, "0") + }; + }, + replaceDetail: function(e) { + for (var t = ""; -1 != e.indexOf("") ? (t += e.substring(0, e.indexOf('style="') + 7) + "max-width:100%;height:auto;margin:0 auto;", + e = e.substring(e.indexOf('style="') + 7)) : t += ' style="max-width:100%;height:auto;margin:0 auto;" '; + return t += e; + } +}; \ No newline at end of file diff --git a/utils/login.js b/utils/login.js new file mode 100644 index 0000000..0581448 --- /dev/null +++ b/utils/login.js @@ -0,0 +1,116 @@ +var e = require("../@babel/runtime/helpers/typeof"), o = (require("./common.js"), +null), a = null; + +function t() { + return new Promise(function(e, o) { + return wx.login({ + success: e, + fail: o + }); + }); +} + +function n(a) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; + return wx.showLoading(), new Promise(function(n, c) { + console.log("requestdevicecode", o.globalData.devicecode); + var i = Object.assign({}, { + devicecode: o.globalData.devicecode + }, o.globalData.options, t); + console.log("sendData", a, i), wx.request({ + url: a, + data: i, + header: { + "content-type": "application/json", + Accept: "application/json, text/plain", + Cookie: "_miucms_session=" + wx.getStorageSync("_miucms_session"), + token: wx.getStorageSync("session") || "" + }, + method: "POST", + success: function(o) { + var t = o.data; + if ("object" != e(t) && null != t) { + t = t.replace("\ufeff", ""); + var i = JSON.parse(t); + o.data = i; + } + wx.hideLoading(); + var l = o.data; + switch (1 * l.code) { + case 200: + case 888: + n(l); + break; + + case 201: + a.indexOf("carwashcoupon/receive") > -1 || wx.showModal({ + title: "提示", + content: l.message + }), c(l); + break; + + case 404: + wx.showModal({ + title: "提示", + content: "未找到当前接口" + }), c(l); + break; + + case 401: + var s = getCurrentPages(), r = s[s.length - 1]; + console.log(401, a), wx.redirectTo({ + url: "/pages/login/login?fromPage=".concat(r.route) + }), c(l); + break; + + default: + wx.showModal({ + title: "提示", + content: l.message + }), c(l); + } + }, + fail: function(e) { + wx.hideLoading(), console.log("reqest error", e), c("fail"); + } + }); + }); +} + +function c(e, a) { + console.log("appstart", e), o = a, n("https://jmqf.v0750.com/miniprogram", { + code: e + }, !0).then(function(e) { + var o = e.data; + console.log("总接口", o), a.globalData.user = o.user, wx.setStorageSync("session", o.user.session), + a.globalData.isUserAuthorization = o.user > 0 ? 2 : 1, a.globalData.config = o.config, + a.globalData.servicetel = o.servicetel, a.globalData.canGetData = !0, a.globalData.protocol = o.protocol; + }); +} + +module.exports = { + initial_url: "https://jmqf.v0750.com/miniprogram", + login: t, + request: n, + pageStart: function(e) { + return new Promise(function(o, t) { + e.globalData.canGetData ? o() : a = setInterval(function() { + e.globalData.canGetData && (clearInterval(a), o()); + }, 1e3); + }); + }, + getLogin: function(e) { + o = e, t().then(function(a) { + console.log("获取用户登录态成功!", a.code), o.globalData.code = a.code, c(a.code, e); + }).catch(function(o) { + c(res.code, e); + }); + }, + baseUrl: "https://jmqf.v0750.com/", + getDevicecode: function(e, a) { + o = e, n("https://jmqf.v0750.com/miniprogram/identify/reload", a, !0).then(function(e) { + var a = e.data; + console.log("onshow获取到的数据", a), o.globalData.devicecode = a.devicecode || o.globalData.devicecode; + }); + } +}; \ No newline at end of file diff --git a/utils/xstat.js b/utils/xstat.js new file mode 100644 index 0000000..72cb022 --- /dev/null +++ b/utils/xstat.js @@ -0,0 +1,2558 @@ +"use strict"; +var e = "[X-STAT] -- ", + t = (function () { + var t = null, + n = !1; + function i() { + this.setDebug = function (e) { + n = e; + }; + this.d = function () { + if (n) + try { + "string" == typeof arguments[0] && + (arguments[0] = e + arguments[0]); + console.debug.apply(console, arguments); + } catch (e) { } + }; + this.i = function () { + try { + if (n) + try { + "string" == typeof arguments[0] && + (arguments[0] = e + arguments[0]); + console.info.apply(console, arguments); + } catch (e) { } + } catch (e) { } + }; + this.e = function () { + if (n) + try { + "string" == typeof arguments[0] && + (arguments[0] = e + arguments[0]); + console.error.apply(console, arguments); + } catch (e) { } + }; + this.w = function () { + if (n) + try { + "string" == typeof arguments[0] && + (arguments[0] = e + arguments[0]); + console.warn.apply(console, arguments); + } catch (e) { } + }; + this.v = function () { + if (n) + try { + "string" == typeof arguments[0] && + (arguments[0] = e + arguments[0]); + console.log.apply(console, arguments); + } catch (e) { } + }; + this.t = function () { + if (n) + try { + console.table.apply(console, arguments); + } catch (e) { } + }; + this.tip = function () { + try { + "string" == typeof arguments[0] && (arguments[0] = e + arguments[0]); + console.log.apply(console, arguments); + } catch (e) { } + }; + this.tip_w = function (e) { + try { + console.log( + "%c [UMENG] -- " + e, + "background:red; padding: 4px; padding-right: 8px; border-radius: 4px; color: #fff;", + ); + } catch (e) { } + }; + this.err = function () { + try { + "string" == typeof arguments[0] && (arguments[0] = e + arguments[0]); + console.error.apply(console, arguments); + } catch (e) { } + }; + this.repeat = function (e) { + for (var t = e; t.length < 86;) t += e; + return t; + }; + } + return function () { + null === t && (t = new i()); + return t; + }; + })(), + n = (function () { + var e = null; + function t() { + var e = {}; + this.useOpenid = function () { + return !!e.useOpenid; + }; + this.useSwanid = function () { + return !!e.useSwanid; + }; + this.autoGetOpenid = function () { + return !!e.autoGetOpenid; + }; + this.appKey = function () { + return e.appKey; + }; + this.url = function () { + return e.url; + }; + this.uploadUserInfo = function () { + return e.uploadUserInfo; + }; + this.enableVerify = function () { + return e.enableVerify; + }; + this.set = function (t) { + e = t; + }; + this.get = function () { + return e; + }; + this.setItem = function (t, n) { + e[t] = n; + }; + this.getItem = function (t) { + return e[t]; + }; + } + return function () { + e || (e = new t()); + return e; + }; + })(); +function i() { } +i.prototype = { + on: function (e, t, n) { + var i = this.e || (this.e = {}); + (i[e] || (i[e] = [])).push({ + fn: t, + ctx: n, + }); + return this; + }, + once: function (e, t, n) { + var i = this; + function r() { + i.off(e, r); + t.apply(n, arguments); + } + r._ = t; + return this.on(e, r, n); + }, + emit: function (e) { + for ( + var t = [].slice.call(arguments, 1), + n = ((this.e || (this.e = {}))[e] || []).slice(), + i = 0, + r = n.length; + i < r; + i++ + ) + n[i].fn.apply(n[i].ctx, t); + return this; + }, + off: function (e, t) { + var n = this.e || (this.e = {}), + i = n[e], + r = []; + if (i && t) + for (var o = 0, s = i.length; o < s; o++) + i[o].fn !== t && i[o].fn._ !== t && r.push(i[o]); + r.length ? (n[e] = r) : delete n[e]; + return this; + }, +}; +var r = new i(); +r.messageType = { + CONFIG_LOADED: 0, + UMA_LIB_INITED: 1, +}; +var o = new ((function () { + function e() { } + e.prototype.setStorage = function (e, t, n) { + wx.setStorage({ + key: e, + data: t, + success: function () { + "function" == typeof n && n(!0); + }, + fail: function () { + "function" == typeof n && n(!1); + }, + }); + }; + e.prototype.getStorage = function (e, n) { + wx.getStorage({ + key: e, + success: function (e) { + "function" == typeof n && n(e.data); + }, + fail: function (i) { + t().w(e + ": " + i.errMsg); + "function" == typeof n && n(); + }, + }); + }; + e.prototype.removeStorage = function (e, t) { + wx.removeStorage({ + key: e, + success: function () { + "function" == typeof t && t(!0); + }, + fail: function () { + "function" == typeof t && t(!1); + }, + }); + }; + e.prototype.getSystemInfo = function (e) { + wx.getSystemInfo({ + success: function (t) { + t.safeArea = t.safeArea || {}; + var n = ""; + t.host && "string" == typeof t.host.env && (n = t.host.env); + var i = { + model: t.model, + brand: t.brand, + pixelRatio: t.pixelRatio, + screenWidth: t.screenWidth, + screenHeight: t.screenHeight, + fontSizeSetting: t.fontSizeSetting, + platform: t.platform, + platformVersion: t.version, + platformSDKVersion: t.SDKVersion, + language: t.language, + deviceName: t.model, + OSVersion: t.system, + resolution: "", + theme: t.theme, + benchmarkLevel: t.benchmarkLevel, + safeArea: { + width: t.safeArea.width, + height: t.safeArea.height, + top: t.safeArea.top, + left: t.safeArea.left, + bottom: t.safeArea.bottom, + right: t.safeArea.right, + }, + statusBarHeight: t.statusBarHeight, + host: n, + }, + r = t.system.split(" "); + Array.isArray(r) && (i.OS = r[0]); + var o = Math.round(t.screenWidth * t.pixelRatio), + s = Math.round(t.screenHeight * t.pixelRatio); + i.resolution = o > s ? o + "*" + s : s + "*" + o; + "function" == typeof e && e(i); + }, + fail: function () { + "function" == typeof e && e(); + }, + }); + }; + e.prototype.getDeviceInfo = function (e) { + "function" == typeof e && e(""); + }; + e.prototype.checkNetworkAvailable = function (e) { + wx.getNetworkType({ + success: function (t) { + "function" == typeof e && e(t && "none" !== t.networkType); + }, + fail: function () { + "function" == typeof e && e(!1); + }, + }); + }; + e.prototype.getNetworkInfo = function (e) { + wx.getNetworkType({ + success: function (t) { + "function" == typeof e && + e({ + networkAvailable: "none" !== t.networkType, + networkType: t.networkType, + }); + }, + fail: function () { + "function" == typeof e && e(); + }, + }); + }; + e.prototype.getDeviceId = function (e) { + e(""); + }; + e.prototype.getAdvertisingId = function (e) { + "function" == typeof e && e(""); + }; + e.prototype.onNetworkStatusChange = function (e) { + wx.onNetworkStatusChange(function (t) { + "function" == typeof e && e(t.isConnected); + }); + }; + e.prototype.request = function (e) { + var t = e.success, + n = e.fail, + i = !1, + r = null; + e.success = function (e) { + if (!i) { + r && clearTimeout(r); + "function" == typeof t && t(e); + } + }; + e.fail = function () { + if (!i) { + r && clearTimeout(r); + "function" == typeof n && n(!1); + } + }; + wx.request(e); + r = setTimeout(function () { + r && clearTimeout(r); + i = !0; + "function" == typeof n && n(i); + }, e.timeout || 5e3); + }; + e.prototype.getSdkType = function () { + return "wxmp"; + }; + e.prototype.getPlatform = function () { + return "wx"; + }; + e.prototype.getUserInfo = function (e) { + e(); + }; + e.prototype.getAppInfoSync = function () { + if (wx.getAccountInfoSync) { + var e = wx.getAccountInfoSync(), + t = e && e.miniProgram ? e.miniProgram : {}; + return { + appId: t.appId, + appEnv: t.envVersion, + appVersion: t.version, + }; + } + return {}; + }; + e.prototype.onShareAppMessage = function (e) { + wx.onShareAppMessage(e); + }; + e.prototype.shareAppMessage = function (e) { + wx.shareAppMessage(e); + }; + e.prototype.getLaunchOptionsSync = function () { + var e = null; + if (e) return e; + if (!wx.getLaunchOptionsSync) return {}; + try { + e = wx.getLaunchOptionsSync(); + } catch (t) { + e = null; + } + return e || {}; + }; + return e; +})())(), + s = function (e, t) { + s = + Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && + function (e, t) { + e.__proto__ = t; + }) || + function (e, t) { + for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); + }; + return s(e, t); + }; +function a(e, t) { + s(e, t); + function n() { + this.constructor = e; + } + e.prototype = + null === t ? Object.create(t) : ((n.prototype = t.prototype), new n()); +} + +console.log(e); + +var u = { + SESSION_INTERVAL: 3e4, + LOG_URL: "https://stat.x-php.com/stat", + GET_OPENID_URL: "https://stat.x-php.com/stat/wx/getuut", + USERINFO_URL: "https://stat.x-php.com/stat/comm/uif", + FETCHURL: "https://stat.x-php.com/stat/fetch", + GETVALUEURL: "https://stat.x-php.com/stat/getVlue", + DEVICE_INFO_KEY: "device_info", + ADVERTISING_ID: "mobile_ad_id", + ANDROID_ID: "android_id", + CURRENT_SESSION: "current_session", + SESSION_PAUSE_TIME: "session_pause_time", + EVENT_SEND_DEFAULT_INTERVAL: 15e3, + EVENT_LAST_SEND_TIME: "last_send_time", + MAX_EVENTID_LENGTH: 128, + MAX_PROPERTY_KEY_LENGTH: 256, + MAX_PROPERTY_KEYS_COUNT: 100, + REPORT_POLICY: "report_policy", + REPORT_INTERVAL_TIME: "report_interval_time", + REPORT_POLICY_START_SEND: "1", + REPORT_POLICY_INTERVAL: "6", + IMPRINT: "imprint", + SEED_VERSION: "1.0.0", + IMPL_VERSION: "2.8.0", + ALIPAY_AVAILABLE_VERSION: "10.1.52", + SHARE_PATH: "xphp_share_path", + SHARES: "shares", + REQUESTS: "requests", + UUID: "xphp_uuid", + UUID_SUFFIX: "ud", + OPENID: "xphp_od", + UNIONID: "xphp_unid", + ALIPAYID: "xphp_alipayid", + USERID: "xphp_userid", + SWANID: "xphp_swanid", + ANONYMOUSID: "xphp_anonymousid", + LAUNCH_OPTIONS: "LAUNCH_OPTIONS", + XPHP_SSRC: "_xphp_ssrc", + USER_INFO: "user_info", + IS_ALIYUN: !1, +}; +var c, + f = { + isNumber: function (e) { + return !Number.isNaN(parseInt(e, 10)); + }, + compareVersion: function (e, t) { + for ( + var n = String(e).split("."), i = String(t).split("."), r = 0; + r < Math.max(n.length, i.length); + r++ + ) { + var o = parseInt(n[r] || 0, 10), + s = parseInt(i[r] || 0, 10); + if (o > s) return 1; + if (o < s) return -1; + } + return 0; + }, + getRandomStr: function (e) { + for ( + var t = "", + n = [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "a", + "b", + "c", + "d", + "e", + "f", + "g", + "h", + "i", + "j", + "k", + "l", + "m", + "n", + "o", + "p", + "q", + "r", + "s", + "t", + "u", + "v", + "w", + "x", + "y", + "z", + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "H", + "I", + "J", + "K", + "L", + "M", + "N", + "O", + "P", + "Q", + "R", + "S", + "T", + "U", + "V", + "W", + "X", + "Y", + "Z", + ], + i = 0; + i < Number(e); + i++ + ) { + t += n[Math.round(Math.random() * (n.length - 1))]; + } + return t; + }, + clone: function (e) { + return JSON.parse(JSON.stringify(e)); + }, + startsWith: function (e, t) { + return ( + !(!e || !t || 0 === t.length || t.length > e.length) && + e.substr(0, t.length) === t + ); + }, + endsWith: function (e, t) { + return ( + !(!t || 0 === e.length || t.length > e.length) && + e.substring(e.length - t.length) === t + ); + }, + assign: function (e) { + if (null == e) + throw new TypeError("Cannot convert undefined or null to object"); + for (var t = Object(e), n = 1; n < arguments.length; n++) { + var i = arguments[n]; + if (i) + for (var r in i) + Object.prototype.hasOwnProperty.call(i, r) && (t[r] = i[r]); + } + return t; + }, + deepEqual: function e(t, n) { + if (t === n) return !0; + if (t && "object" == typeof t && n && "object" == typeof n) { + if (Object.keys(t).length !== Object.keys(n).length) return !1; + for (var i in t) { + if (Object.prototype.hasOwnProperty.call(n, i)) return !1; + if (!e(t[i], n[i])) return !1; + } + return !0; + } + return !1; + }, + trimStart: function (e, t) { + if (!e) return ""; + if ("string" == typeof t && t.length) { + var n = new RegExp("^" + t + "*"); + e = e.replace(n, ""); + } else e = e.replace(/^s*/, ""); + return e; + }, + trimEnd: function (e, t) { + if (!e) return ""; + var n, i; + if ("string" == typeof t && t.length) { + n = new RegExp(t); + i = e.length; + for (; n.test(e.charAt(i));) i -= 1; + return e.slice(0, i + 1); + } + n = /s/; + i = e.length - 1; + for (; n.test(e.charAt(i));) i -= 1; + return e.slice(0, i + 1); + }, + isFunction: function (e) { + return "function" == typeof e; + }, + }, + p = (function (e) { + a(n, e); + function n() { + return (null !== e && e.apply(this, arguments)) || this; + } + n.prototype.getOpenIdAsync = function (e, n) { + var i = this; + wx.login({ + success: function (r) { + r.code + ? o.request({ + url: u.GET_OPENID_URL, + method: "GET", + data: { + key: e, + code: r.code, + }, + success: function (e) { + if (e && 200 === e.statusCode && e.data && e.data.data) { + var t = e.data.data; + i.setOpenid(t.oid); + i.setUnionid(t.uid); + return n && n(!0); + } + n && n(); + }, + fail: function (e) { + t().v("wx request failed...", e); + n && n(); + }, + }) + : n && n(); + }, + fail: function () { + n && n(); + }, + }); + }; + return n; + })( + (function (e) { + a(n, e); + function n() { + var t = (null !== e && e.apply(this, arguments)) || this; + t._openid = ""; + t._unionid = ""; + t._useOpenid = !1; + return t; + } + n.prototype.initID = function (e) { + var n = this; + n._idType = n._useOpenid ? "openid" : "uuid"; + t().v("id type: ", n._idType); + o.getStorage(u.UNIONID, function (e) { + n._unionid = e; + }); + this._useOpenid + ? o.getStorage(u.OPENID, function (t) { + n._openid = t; + e && e(); + }) + : e && e(); + }; + n.prototype.setUseOpenid = function (e) { + this._useOpenid = e; + }; + n.prototype.setOpenid = function (e) { + if (!this._openid && e) { + this._openid = e; + o.setStorage(u.OPENID, e); + } + }; + n.prototype.setUnionid = function (e) { + if (!this._unionid && e) { + this._unionid = e; + o.setStorage(u.UNIONID, e); + } + }; + n.prototype.getIdTracking = function () { + var t = e.prototype.getIdTracking.call(this); + this._openid && (t.openid = this._openid); + this._unionid && (t.unionid = this._unionid); + this._userid && (t.userid = this._userid); + return t; + }; + n.prototype.getId = function () { + return this._useOpenid ? this._openid : this._uuid; + }; + return n; + })( + (function () { + function e() { + this._uuid = ""; + this._userid = ""; + this._idType = ""; + } + e.prototype.createUUID = function () { + return ( + f.getRandomStr(10) + Date.now() + f.getRandomStr(7) + u.UUID_SUFFIX + ); + }; + e.prototype.initUUID = function (e) { + var t = this; + o.getStorage(u.UUID, function (n) { + if (n) t._uuid = n; + else { + t._uuid = t.createUUID(); + o.setStorage(u.UUID, t._uuid); + } + e && e(n); + }); + }; + e.prototype.initUserid = function () { + var e = this; + o.getStorage(u.USERID, function (n) { + if (!e._userid && n) { + e._userid = n; + t().v("userId is ", n); + } + }); + }; + e.prototype.init = function (e) { + var t = this; + t.initUUID(function () { + t.initUserid(); + t.initID(e); + }); + }; + e.prototype.setUserid = function (e) { + if (!this._userid && e) { + this._userid = e; + o.setStorage(u.USERID, e); + } + }; + e.prototype.removeUserid = function () { + this._userid = void 0; + o.removeStorageSync(u.USERID); + }; + e.prototype.getUserId = function () { + return this._userid; + }; + e.prototype.getIdType = function () { + return this._idType; + }; + e.prototype.getIdTracking = function () { + var e = {}; + this._uuid && (e.uuid = this._uuid); + this._userid && (e.userid = this._userid); + return e; + }; + return e; + })(), + ), + ), + l = + ((c = null), + function () { + c || (c = new p()); + return c; + }), + h = (function () { + var e = null; + function t() { + var e = !1, + t = null, + n = []; + this.addPageStart = function (n) { + if (n && !e) { + t = { + ts: Date.now(), + path: n, + page_name: n, + }; + e = !0; + } + }; + this.addPageEnd = function (i) { + if (e && i && t && i === t.page_name) { + var r = Date.now() - t.ts; + t.duration = Math.abs(r); + n.push(t); + t = null; + e = !1; + } + }; + this.get = function () { + return n; + }; + this.getCurrentPage = function () { + return t; + }; + this.clear = function () { + n.length = 0; + }; + } + return function () { + e || (e = new t()); + return e; + }; + })(), + d = {}; +var g = (function () { + var e = null, + n = [], + i = ""; + function r() { + return { + add: function (e, r) { + t().v("share origin: %o", e); + var o = { + title: e && e.title, + path: e && e.path && e.path.split("?")[0], + _xphp_sts: Date.now(), + }; + o.path && + o.path.length > 1 && + f.startsWith(o.path, "/") && + (o.path = f.trimStart(o.path, "/")); + var s = e.path || "", + a = l().getId(); + if (a) { + var u = i.split(","), + c = (u = u.filter(function (e) { + return e.length > 0; + })).indexOf(a); + c >= 0 && (u = u.slice(0, c)); + u.length < 3 && u.push(a); + var p = u.join(","); + -1 !== s.indexOf("?") + ? (s += "&_xphp_ssrc=" + p) + : (s += "?_xphp_ssrc=" + p); + var h = Date.now(); + s += "&_xphp_sts=" + h; + if (r) { + var g = (function (e) { + var t = []; + for (var n in e) + "_xphp_ssrc" !== n && + "_xphp_sts" !== n && + t.push(n + "=" + e[n]); + return t.join("&"); + })(d), + v = g + ? g + "&_xphp_ssrc=" + p + "&_xphp_sts=" + h + : "_xphp_ssrc=" + p + "&_xphp_sts=" + h; + e.query = e.query + ? e.query + "&_xphp_ssrc=" + p + "&_xphp_sts=" + h + : v; + } else e.path = s; + o._xphp_ssrc = p; + o._xphp_sts = h; + } + n.push(o); + t().v("share: %o", e); + return e; + }, + setShareSource: function (e) { + i = e; + }, + clear: function () { + n.length = 0; + }, + get: function () { + return n; + }, + }; + } + return function () { + e || (e = new r()); + return e; + }; +})(), + v = function (e) { + if (e) + try { + return JSON.stringify(e); + } catch (e) { } + return ""; + }, + _ = function (e) { + if (e) + try { + return JSON.parse(e); + } catch (e) { } + return null; + }, + y = (function () { + var e = null, + t = "", + i = null, + r = !1; + function s() { + this.load = function (e) { + if (i) { + o.removeStorage(t); + e(); + } else { + t = "xphp_cache_" + n().appKey(); + o.getStorage(t, function (n) { + i = _(n) || {}; + r = !0; + o.removeStorage(t); + e(); + }); + } + }; + this.save = function () { + i && o.setStorage(t, v(i)); + }; + this.set = function (e, t) { + i && (i[e] = t); + }; + this.get = function (e) { + return (i || {})[e]; + }; + this.remove = function (e) { + i && i[e] && delete i[e]; + }; + this.getAll = function () { + return i; + }; + this.clear = function () { + i = null; + }; + this.has = function (e) { + return !!this.get(e); + }; + this.isLoaded = function () { + return r; + }; + } + return function () { + e || (e = new s()); + return e; + }; + })(), + m = (function () { + var e, + n, + i = [], + r = []; + function o() { + if (i.length) { + var e = y().get("ekvs"); + if ( + (function (e) { + var t = 0; + for (var n in e) Array.isArray(e[n]) && (t += e[n].length); + return t; + })(e) + + i.length <= + 1e4 + ) { + e = s(e, i); + y().set("ekvs", e); + } + } + } + function s(e, t) { + var i = (e = e || {})[n]; + Array.isArray(i) && i.length + ? (e[n] = i.concat(t)) + : (e[n] = [].concat(t)); + return e; + } + return function () { + e || + (e = { + addEvent: function (e) { + if (n) { + i.unshift(e); + if (i.length > 1) { + o(); + i.length = 0; + } + } else { + t().w("session id is null: ", n); + r.unshift(e); + } + }, + setSessionId: function (e) { + n = e; + t().v("setSessionId: ", n); + if (Array.isArray(r) && r.length && n) { + for (var i = 0; i < r.length; i++) this.addEvent(r[i]); + r.length = 0; + } + }, + getEkvs: function () { + var e = y().get("ekvs"); + i && i.length && (e = s(e, i)); + return e; + }, + clear: function () { + y().remove("ekvs"); + i.length = 0; + }, + }); + return e; + }; + })(), + S = "2g", + I = "3g", + O = "4g", + A = "half_session", + E = "close_session", + N = "ekv", + T = ["access", "access_subtype"], + w = (function () { + var e = null; + function t() { + var e = !1, + t = {}; + function i(e) { + var i = y().get(u.IMPRINT); + i && (t.imprint = i); + t.device_type = "Phone"; + t.sdk_version = u.IMPL_VERSION; + t.appkey = n().appKey(); + o.getDeviceInfo(function (e) { + t.device_info = e || ""; + }); + var r = o.getAppInfoSync(); + t.appid = r.appId; + t.app_env = r.appEnv; + t.app_version = r.appVersion; + o.getSystemInfo(function (n) { + o.getNetworkInfo(function (i) { + var r = (function (e, t) { + var n = {}; + (e = e || {}).safeArea = e.safeArea || {}; + var i = (t = t || {}).networkType; + "none" === i && (i = "unknown"); + var r = e.model || "", + s = e.platform || "", + a = e.brand || "", + u = a.toLowerCase(); + n.sdk_type = o.getSdkType(); + n.platform = o.getPlatform(); + n.platform_sdk_version = e.platformSDKVersion; + n.platform_version = e.platformVersion; + n.resolution = e.resolution; + n.pixel_ratio = e.pixelRatio; + n.os = s; + n.font_size_setting = e.fontSizeSetting; + n.device_model = r; + n.device_brand = a; + n.device_manufacturer = u; + n.device_manuid = r; + n.device_name = r; + n.os_version = e.OSVersion; + n.language = e.language; + n.theme = e.theme; + n.benchmark_level = e.benchmarkLevel; + n.status_bar_height = e.statusBarHeight; + n.safe_area_top = e.safeArea.top; + n.safe_area_left = e.safeArea.left; + n.safe_area_right = e.safeArea.right; + n.safe_area_bottom = e.safeArea.bottom; + n.safe_area_height = e.safeArea.height; + n.safe_area_width = e.safeArea.width; + n.storage = e.storage; + n.screen_width = e.screenWidth; + n.screen_height = e.screenHeight; + n.host = e.host; + switch ((i = i ? i.toLowerCase() : "")) { + case O: + n.access_subtype = "LTE"; + n.access = "4G"; + break; + case I: + n.access_subtype = "CDMA"; + n.access = "3G"; + break; + case S: + n.access_subtype = "GRPS"; + n.access = "2G"; + break; + default: + n.access = i; + delete n.access_subtype; + } + return n; + })(n, i); + f.assign(t, r); + e && e(); + }); + }); + } + return { + init: function () { + i(function () { + e = !0; + }); + }, + isLoaded: function () { + return e; + }, + get: function () { + return t; + }, + getRealtimeFields: function () { + var e = {}; + T.forEach(function (n) { + e[n] = t[n]; + }); + return e; + }, + setIdTracking: function (e) { + this.setItem("id_tracking", e); + }, + setIdType: function (e) { + this.setItem("id_type", e); + }, + setAppVersion: function (e) { + this.setItem("app_version", e); + }, + setSuperProperty: function (e) { + t.sp || (t.sp = {}); + t.sp.isv = e; + }, + getSuperProperty: function () { + return t && t.sp ? t.sp.isv : ""; + }, + setItem: function (e, n) { + t[e] = n; + }, + getItem: function (e) { + return t[e]; + }, + }; + } + return { + instance: function () { + e || (e = t()); + return e; + }, + }; + })(), + k = (function () { + var e = null, + n = null, + i = null; + function r() { + return { + resume: function (e) { + var r = !1; + i || (i = y().get(u.CURRENT_SESSION)); + var s = new Date(); + n = s.getTime(); + if (!i || !i.end_time || n - i.end_time > u.SESSION_INTERVAL) { + r = !0; + !(function (e) { + try { + var n = (i || {}).options || {}, + r = f.assign( + {}, + (function (e) { + var n = {}; + for (var i in e) + 0 === i.indexOf("_xphp_") && (n[i] = e[i]); + t().v("query: ", e); + t().v("_xphp_params: ", n); + return n; + })(e.query), + ); + r.path = e.path || n.path; + "gaode" !== o.getPlatform() && + (r.scene = e.scene + ? o.getPlatform() + "_" + e.scene + : n.scene); + var s = e.referrerInfo; + s && (r.referrerAppId = s.appId); + t().v("session options: ", r); + var a = r[u.XPHP_SSRC]; + a && g().setShareSource(a); + var c = Date.now(); + i = { + id: f.getRandomStr(10) + c, + start_time: c, + options: r, + }; + } catch (e) { + t().e("生成新session失败: ", e); + } + })(e); + t().v("开始新的session(%s): ", i.id, i); + } else + t().v( + "延续上一次session(%s): %s ", + i.id, + s.toLocaleTimeString(), + i, + ); + return r; + }, + pause: function () { + !(function () { + if (i) { + var e = new Date(); + i.end_time = e.getTime(); + "number" != typeof i.duration && (i.duration = 0); + i.duration = i.end_time - n; + y().set(u.CURRENT_SESSION, i); + t().v("退出会话(%s): %s ", i.id, e.toLocaleTimeString(), i); + } + })(); + }, + getCurrentSessionId: function () { + return (i || {}).id; + }, + getCurrentSession: function () { + return i; + }, + cloneCurrentSession: function () { + return f.clone(i); + }, + }; + } + return function () { + e || (e = r()); + return e; + }; + })(); +function b(e) { + var t = null; + switch (e) { + case A: + t = (function () { + var e = null, + t = k().cloneCurrentSession(); + t && + (e = { + header: { + st: "1", + }, + analytics: { + sessions: [t], + }, + }); + return e; + })(); + break; + case E: + t = (function () { + var e = null, + t = {}, + n = k().cloneCurrentSession(); + if (n) { + var i = h().get(), + r = g().get(); + Array.isArray(i) && i.length && (n.pages = f.clone(i)); + Array.isArray(r) && r.length && (n.shares = f.clone(r)); + h().clear(); + g().clear(); + t.sessions = [n]; + } + var o = m().getEkvs(); + if (o) { + t.ekvs = f.clone(o); + m().clear(); + } + (t.sessions || t.ekvs) && + (e = { + analytics: t, + }); + return e; + })(); + break; + case N: + t = (function () { + var e = null, + t = m().getEkvs(); + if (t) { + e = { + analytics: { + ekvs: f.clone(t), + }, + }; + m().clear(); + } + return e; + })(); + } + return t; +} +var D = { + sessions: "sn", + ekvs: "e", + active_user: "active_user", +}, + U = { + sdk_type: "sdt", + access: "ac", + access_subtype: "acs", + device_model: "dm", + language: "lang", + device_type: "dt", + device_manufacturer: "dmf", + device_name: "dn", + platform_version: "pv", + id_type: "it", + font_size_setting: "fss", + os_version: "ov", + device_manuid: "did", + platform_sdk_version: "psv", + device_brand: "db", + appkey: "ak", + _id: "id", + id_tracking: "itr", + imprint: "imp", + sdk_version: "sv", + resolution: "rl", + testToken: "ttn", + theme: "t5", + benchmark_level: "bml", + screen_width: "sw", + screen_height: "sh", + status_bar_height: "sbh", + safe_area_top: "sat", + safe_area_left: "sal", + safe_area_right: "sar", + safe_area_bottom: "sab", + safe_area_height: "sah", + safe_area_width: "saw", + pixel_ratio: "pr", + storage: "s7", + host: "hs", + }, + P = { + uuid: "ud", + unionid: "und", + openid: "od", + anonymousid: "nd", + alipay_id: "ad", + device_id: "dd", + userid: "puid", + }; +function R(e, t) { + var n = L(e, t); + e && + e.id_tracking && + (n[t.id_tracking || "id_tracking"] = L(e.id_tracking, P)); + return n; +} +function L(e, t) { + var n = {}; + for (var i in e) t[i] ? (n[t[i]] = e[i]) : (n[i] = e[i]); + return n; +} +function C(e, t) { + var n = {}; + if (e) for (var i in e) e[i] && (n[t[i]] = e[i]); + return n; +} +var M = ""; +function x() { + return M; +} +var V = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", + j = (function (e) { + for (var t = {}, n = 0, i = e.length; n < i; n++) t[e.charAt(n)] = n; + return t; + })(V), + F = String.fromCharCode, + G = function (e) { + if (e.length < 2) { + return (t = e.charCodeAt(0)) < 128 + ? e + : t < 2048 + ? F(192 | (t >>> 6)) + F(128 | (63 & t)) + : F(224 | ((t >>> 12) & 15)) + + F(128 | ((t >>> 6) & 63)) + + F(128 | (63 & t)); + } + var t = + 65536 + 1024 * (e.charCodeAt(0) - 55296) + (e.charCodeAt(1) - 56320); + return ( + F(240 | ((t >>> 18) & 7)) + + F(128 | ((t >>> 12) & 63)) + + F(128 | ((t >>> 6) & 63)) + + F(128 | (63 & t)) + ); + }, + q = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, + K = function (e) { + var t = [0, 2, 1][e.length % 3], + n = + (e.charCodeAt(0) << 16) | + ((e.length > 1 ? e.charCodeAt(1) : 0) << 8) | + (e.length > 2 ? e.charCodeAt(2) : 0); + return [ + V.charAt(n >>> 18), + V.charAt((n >>> 12) & 63), + t >= 2 ? "=" : V.charAt((n >>> 6) & 63), + t >= 1 ? "=" : V.charAt(63 & n), + ].join(""); + }, + H = function (e) { + return ( + (t = (function (e) { + return e.replace(q, G); + })(e)), + t.replace(/[\s\S]{1,3}/g, K) + ); + var t; + }, + Y = new RegExp(["[À-ß][€-¿]", "[à-ï][€-¿]{2}", "[ð-÷][€-¿]{3}"].join("|"), "g"), + J = function (e) { + switch (e.length) { + case 4: + var t = + (((7 & e.charCodeAt(0)) << 18) | + ((63 & e.charCodeAt(1)) << 12) | + ((63 & e.charCodeAt(2)) << 6) | + (63 & e.charCodeAt(3))) - + 65536; + return F(55296 + (t >>> 10)) + F(56320 + (1023 & t)); + case 3: + return F( + ((15 & e.charCodeAt(0)) << 12) | + ((63 & e.charCodeAt(1)) << 6) | + (63 & e.charCodeAt(2)), + ); + default: + return F(((31 & e.charCodeAt(0)) << 6) | (63 & e.charCodeAt(1))); + } + }, + B = function (e) { + var t = e.length, + n = t % 4, + i = + (t > 0 ? j[e.charAt(0)] << 18 : 0) | + (t > 1 ? j[e.charAt(1)] << 12 : 0) | + (t > 2 ? j[e.charAt(2)] << 6 : 0) | + (t > 3 ? j[e.charAt(3)] : 0), + r = [F(i >>> 16), F((i >>> 8) & 255), F(255 & i)]; + r.length -= [0, 0, 2, 1][n]; + return r.join(""); + }, + X = function (e) { + return ( + (t = (function (e) { + return e.replace(/[\s\S]{1,4}/g, B); + })(e)), + t.replace(Y, J) + ); + var t; + }, + W = function (e, t) { + return t + ? H(String(e)) + .replace(/[+\/]/g, function (e) { + return "+" == e ? "-" : "_"; + }) + .replace(/=/g, "") + : H(String(e)); + }, + z = function (e) { + return X( + String(e) + .replace(/[-_]/g, function (e) { + return "-" == e ? "+" : "/"; + }) + .replace(/[^A-Za-z0-9\+\/]/g, ""), + ); + }; +var Q = new (function () { + var e = "", + t = this; + this.set = function (t) { + e = t; + }; + this.get = function () { + return e; + }; + this.getImpObj = function () { + return _(z(e)); + }; + this.getItem = function (e) { + var n = t.getImpObj(); + return (n && n[e]) || ""; + }; + this.load = function () { + e = y().get(u.IMPRINT); + }; + this.save = function () { + e && y().set(u.IMPRINT, e); + }; +})(); +function Z(e, n, i, r) { + w.instance().setIdType(l().getIdType()); + w.instance().setIdTracking(l().getIdTracking()); + var s = l().getUserId(); + s && + e.analytics && + (e.analytics.active_user = { + uid: s, + }); + var a = f.clone(w.instance().get()); + e.header = f.assign(a, e.header, { + ts: Date.now(), + testToken: x(), + traceId: f.getRandomStr(10) + Date.now() + f.getRandomStr(9), + }); + var c = (function (e) { + return { + h: R(e.header, U), + a: C(e.analytics, D), + }; + })(e), + p = v(c), + h = { + url: u.LOG_URL, + method: "POST", + data: c, + success: function (r) { + var o = r.code || r.status || r.statusCode; + if (200 === o || 413 === o) { + t().i("数据发送成功: ", e, p); + !(function (e) { + if (e) { + w.instance().setItem(u.IMPRINT, e); + Q.set(e); + Q.save(); + t().v("imprint: ", Q.getImpObj()); + Q.getItem("ttn_invalid") && (M = ""); + } + })((r.data || {}).imprint); + "function" == typeof n && n(r); + } else { + t().w("数据发送失败: ", p); + "function" == typeof i && i(); + } + }, + fail: function (e) { + t().w("超时: ", p); + "function" == typeof i && i(); + }, + complete: function () { + "function" == typeof r && r(); + }, + }; + o.request( + f.assign(h, { + header: { + "Msg-Type": o.getSdkType() + "/json", + "disable-base64": "Y", + }, + }), + ); +} +function $(e) { + var t = e, + n = []; + this.enqueue = function (e) { + "number" == typeof t && this.size() >= t && this.dequeue(); + n.push(e); + }; + this.dequeue = function () { + return n.shift(); + }; + this.front = function () { + return n[0]; + }; + this.isEmpty = function () { + return 0 === n.length; + }; + this.clear = function () { + n.length = 0; + }; + this.size = function () { + return n.length; + }; + this.items = function () { + return n; + }; + this.print = function () { + console.log(n.toString()); + }; +} +var ee = (function () { + var e = null, + n = !1, + i = [], + r = new $(50); + function o(e, t, n) { + if (w.instance().isLoaded()) { + t = t || {}; + var i = b(e); + if (i) { + var s = w.instance().getRealtimeFields(); + i.header = f.assign({}, i.header, s); + i.noCache = t.noCache; + r.enqueue(i); + } + "function" == typeof n && n(); + } else + setTimeout(function () { + o(e, t, n); + }, 100); + } + function s(e) { + var t = r.front(); + if (t) + Z( + t, + function () { + r.dequeue(); + s(e); + }, + function () { + var t = r.dequeue(); + t && !t.noCache && i.push(t); + s(e); + }, + ); + else { + !(function () { + i.forEach(function (e) { + r.enqueue(e); + }); + i.length = 0; + })(); + e(); + } + } + function a(e) { + if (l().getId()) + if (n) t().i("队列正在发送中"); + else { + n = !0; + s(function () { + n = !1; + "function" == typeof e && e(); + }); + } + else { + t().i("获取id标识失败,暂缓发送"); + "function" == typeof e && e(); + } + } + function c() { + this.send = function (e, t, n) { + e + ? this.add(e, t, function () { + a(n); + }) + : a(n); + }; + this.add = function (e, t, n) { + o(e, t, n); + }; + this.load = function () { + var e = y().get(u.REQUESTS); + e && + e.length && + e.forEach(function (e) { + r.enqueue(e); + }); + y().remove(u.REQUESTS); + }; + this.save = function () { + y().set(u.REQUESTS, f.clone(r.items())); + r.clear(); + }; + } + return function () { + e || (e = new c()); + return e; + }; +})(), + te = (function () { + var e = null, + i = null; + function r() { + this.setUserInfo = function (e) { + i = e; + }; + this.update = function () { + e(i) || + o.getUserInfo(function (t) { + e(t); + }); + }; + function e(e) { + if (e && "object" == typeof e) { + var i = y().get(u.USER_INFO); + (i && f.deepEqual(e, i)) || + (function (e, i) { + var r = n().appKey(), + s = o.getSdkType(), + a = l().getId(), + c = l().getIdType(); + if (!(r && s && a && c)) return; + var f = { + ak: n().appKey(), + sdt: o.getSdkType(), + uin: e.nickName, + uia: e.avatar || e.avatarUrl, + uig: e.gender, + uit: e.country, + uip: e.province, + uic: e.city, + uil: e.language, + id: l().getId(), + it: l().getIdType(), + age: e.age, + cln: e.constellation, + }, + p = JSON.stringify(f); + p = W(p); + o.request({ + url: u.USERINFO_URL, + method: "POST", + header: { + "content-type": "application/x-www-form-urlencoded", + }, + data: "ui=" + p, + success: function (n) { + t().v("用户信息上传成功: ", e); + i && i(n && n.data && 200 === n.data.code); + }, + fail: function () { + t().e("用户信息上传失败: ", e); + i && i(!1); + }, + }); + })(e, function (t) { + t && y().set(u.USER_INFO, e); + }); + return !0; + } + return !1; + } + } + return function () { + e || (e = new r()); + return e; + }; + })(); +function ne(e, t) { + this.id = e; + this.ts = Date.now(); + var n = typeof t; + if ("string" === n && t) this[e] = t; + else if ("object" === n) + for (var i in t) ({}).hasOwnProperty.call(t, i) && (this[i] = t[i]); +} +function ie() { + var e = !1, + i = !1, + r = 0; + this.init = function (i) { + t().v("sdk version: " + u.IMPL_VERSION); + e + ? t().v("Lib重复实例化") + : y().load(function () { + t().v("cache初始化成功: ", y().getAll()); + !(function () { + l().setUseOpenid && l().setUseOpenid(n().useOpenid()); + l().init(function () { + w.instance().init(); + t().v("Header初始化成功"); + }); + })(); + e = !0; + "function" == typeof i && i(); + t().tip("SDK集成成功"); + }); + }; + this.resume = function (r) { + if (e && !i) { + t().v("showOptions: ", r); + var o; + i = !0; + n().enableVerify() && r && r.query && ((o = r.query._ttn), (M = o || M)); + this._resume(r); + } + }; + this._resume = function (e) { + ee().load(); + var i = k().resume(e), + r = k().getCurrentSessionId(); + m().setSessionId(r); + i && + ee().add(A, {}, function () { + l().setUseOpenid && l().setUseOpenid(n().useOpenid()); + if (n().useOpenid() && n().autoGetOpenid() && !l().getId()) { + t().v("get id async"); + o(10, 3e3); + } else { + t().v("session auto send"); + ee().send(); + } + }); + function o(e, i) { + l().getId() || + e <= 0 || + l().getOpenIdAsync(n().appKey(), function (n) { + if (n) { + t().v("获取id成功"); + ee().send(); + } else { + t().v("获取openid失败,启动重试,剩余可用次数", e - 1); + setTimeout(function () { + o(e - 1, i); + }, i); + } + }); + } + }; + this.pause = function (o) { + if (e) { + i = !1; + r = 0; + k().pause(); + n().uploadUserInfo() && te().update(); + ee().send(E, {}, function () { + ee().save(); + y().save(); + t().v("cache save success"); + "function" == typeof o && o(); + }); + } + }; + this.setOpenid = function (e) { + t().v("setOpenId: %s", e); + l().setOpenid(e); + ee().send(); + }; + this.setUnionid = function (e) { + t().v("setUnionid: %s", e); + l().setUnionid(e); + }; + this.setUserid = function (e, n) { + t().v("setUserid: %s", e, n); + l().setUserid(e, n); + }; + this.removeUserid = function () { + t().v("removeUserid"); + l().removeUserid(); + }; + this.setUserInfo = function (e) { + t().v("setUserInfo: %s", e); + te().setUserInfo(e); + }; + this.setAnonymousid = function (e) { + t().v("setAnonymousId: %s", e); + l().setAnonymousid(e); + ee().send(); + }; + this.setAppVersion = function (e) { + e && "string" != typeof e + ? t().w("setAppVersion方法只接受字符串类型参数") + : w.instance().setAppVersion(e); + }; + this.setAlipayUserid = function (e) { + if (e && "string" != typeof e) + t().w("setAlipayUserid方法只接受字符串类型参数"); + else { + t().v("setAlipayUserid: %s", e); + l().setAlipayUserid(e); + } + }; + this.setDeviceId = function (e) { + if ("string" == typeof e) { + l().setDeviceId(e); + return e; + } + }; + this.setSuperProperty = function (e) { + if (e && "string" != typeof e) t().w("超级属性只支持字符串类型"); + else { + var n = this; + if (w.instance().getSuperProperty() !== e) { + w.instance().setSuperProperty(e); + n.pause(function () { + n.resume(); + }); + } + } + }; + this.trackEvent = function (n, i) { + if (e) { + t().v("event: ", n, i); + if ( + (function (e, n) { + if (!e || "string" != typeof e) { + t().e( + 'please check trackEvent id. id should be "string" and not null', + ); + return !1; + } + var i = ["id", "ts", "du"], + r = {}; + i.forEach(function (e) { + r[e] = 1; + }); + if (r[e]) { + t().e("eventId不能与以下保留字冲突: " + i.join(",")); + return !1; + } + if (e.length > u.MAX_EVENTID_LENGTH) { + t().e( + "The maximum length of event id shall not exceed " + + u.MAX_EVENTID_LENGTH, + ); + return !1; + } + if ( + n && + ("object" != typeof n || Array.isArray(n)) && + "string" != typeof n + ) { + t().e( + "please check trackEvent properties. properties should be string or object(not include Array)", + ); + return !1; + } + if ("object" == typeof n) { + var o = 0; + for (var s in n) + if ({}.hasOwnProperty.call(n, s)) { + if (s.length > u.MAX_PROPERTY_KEY_LENGTH) { + t().e( + "The maximum length of property key shall not exceed " + + u.MAX_PROPERTY_KEY_LENGTH, + ); + return !1; + } + if (o >= u.MAX_PROPERTY_KEYS_COUNT) { + t().e( + "The maximum count of properties shall not exceed " + + u.MAX_PROPERTY_KEYS_COUNT, + ); + return !1; + } + if (r[s]) { + t().e("属性中的key不能与以下保留字冲突: " + i.join(",")); + return !1; + } + o += 1; + } + } + return !0; + })(n, i) + ) { + var o = new ne(n, i); + m().addEvent(o); + var s = !!x(), + a = s ? 0 : u.EVENT_SEND_DEFAULT_INTERVAL, + c = Date.now(); + if ( + (function (e, t) { + return ( + "number" != typeof r || + "number" != typeof t || + r <= 0 || + e - r > t + ); + })(c, a) + ) { + r = c; + ee().send( + N, + { + noCache: s, + }, + function () { }, + ); + } + } + } + }; + this.trackShare = function (n) { + if (e) + try { + if (o.getSdkType().indexOf("game") > -1) { + n = g().add(n, !0); + t().v("shareQuery: ", n); + } else { + n = g().add(n, !1); + t().v("sharePath: ", n.path); + } + } catch (e) { + t().v("shareAppMessage: ", e); + } + return n; + }; + this.trackPageStart = function (t) { + e && h().addPageStart(t); + }; + this.trackPageEnd = function (t) { + e && h().addPageEnd(t); + }; + this.onShareAppMessage = function (e) { + var t = this; + o.onShareAppMessage(function () { + return t.trackShare(e()); + }); + }; + this.shareAppMessage = function (e) { + this.trackShare(e); + o.shareAppMessage(e); + }; +} +var re = []; +function oe() { } +oe.prototype = { + createMethod: function (e, n, i) { + try { + e[n] = + i && i[n] + ? function () { + return i[n].apply(i, arguments); + } + : function () { + re.push([n, [].slice.call(arguments)]); + }; + } catch (e) { + t().v("create method errror: ", e); + } + }, + installApi: function (e, n) { + try { + var i, + r, + o = + "resume,pause,trackEvent,trackPageStart,trackPageEnd,trackShare,setUserid,setOpenid,setUnionid,setSuperProperty,setUserInfo".split( + ",", + ); + for (i = 0, r = o.length; i < r; i++) this.createMethod(e, o[i], n); + if (n) + for (i = 0, r = re.length; i < r; i++) { + var s = re[i]; + try { + n[s[0]].apply(n, s[1]); + } catch (e) { + t().v("impl[v[0]].apply error: ", s[0], e); + } + } + } catch (e) { + t().v("install api errror: ", e); + } + }, +}; +var ue = { + init: function (e) { }, +}, + ce = new oe(), + fe = { + _inited: !1, + _log: t(), + preinit: function (e) { + if (e && "object" == typeof e) for (var t in e) u[t] = e[t]; + return u; + }, + use: function (e, t) { + e && f.isFunction(e.install) + ? e.install(fe, t) + : f.isFunction(e) && e(fe, t); + return fe; + }, + messager: r, + init: function (e) { + if (this._inited) t().v("已经实例过,请避免重复初始化"); + else if (e) + if (e.appKey) { + "boolean" != typeof e.useOpenid && (e.useOpenid = !1); + n().set(e); + t().setDebug(e.debug); + this._inited = !0; + var i = this; + r.emit(r.messageType.CONFIG_LOADED, e); + try { + var o = new ie(); + t().v("成功创建Lib对象"); + 0; + o.init(function () { + t().v("Lib对象初始化成功"); + ce.installApi(i, o); + t().v("安装Lib接口成功"); + r.emit(r.messageType.UMA_LIB_INITED, e); + }); + ue.init(3e3); + } catch (e) { + t().w("创建Lib对象异常: " + e); + } + } else t().err("请确保传入正确的appkey"); + else t().err("请正确设置相关信息!"); + }, + }; +try { + ce.installApi(fe, null); +} catch (e) { + t().w("xphp赋值异常: ", e); +} +var le = "", + he = "2.8.0", + de = "none", + ge = {}, + ve = Array.isArray; +ge.isArray = + ve || + function (e) { + return "[object Array]" === toString.call(e); + }; +ge.isObject = function (e) { + return e === Object(e) && !ge.isArray(e); +}; +ge.isEmptyObject = function (e) { + if (ge.isObject(e)) { + for (var t in e) if (hasOwnProperty.call(e, t)) return !1; + return !0; + } + return !1; +}; +ge.isUndefined = function (e) { + return void 0 === e; +}; +ge.isString = function (e) { + return "[object String]" === toString.call(e); +}; +ge.isDate = function (e) { + return "[object Date]" === toString.call(e); +}; +ge.isNumber = function (e) { + return "[object Number]" === toString.call(e); +}; +ge.each = function (e, t, n) { + if (null != e) { + var i = {}, + r = Array.prototype.forEach; + if (r && e.forEach === r) e.forEach(t, n); + else if (e.length === +e.length) { + for (var o = 0, s = e.length; o < s; o++) + if (o in e && t.call(n, e[o], o, e) === i) return; + } else + for (var a in e) + if (hasOwnProperty.call(e, a) && t.call(n, e[a], a, e) === i) return; + } +}; +ge.buildQuery = function (e, t) { + var n, + i, + r = []; + void 0 === t && (t = "&"); + ge.each(e, function (e, t) { + n = encodeURIComponent(e.toString()); + i = encodeURIComponent(t); + r[r.length] = i + "=" + n; + }); + return r.join(t); +}; +ge.JSONDecode = function (e) { + if (e) { + try { + return JSON.parse(e); + } catch (e) { + console.error("JSONDecode error", e); + } + return null; + } +}; +ge.JSONEncode = function (e) { + try { + return JSON.stringify(e); + } catch (e) { + console.error("JSONEncode error", e); + } +}; +var _e = Object.create(null); +function ye(e) { + t().v("开始构建 fetch body"); + o.getSystemInfo(function (t) { + o.getNetworkInfo(function (i) { + var r = (i = i || {}).networkType; + r = r === de ? "unknown" : r.toUpperCase(); + _e.access = r; + !(function (e, t) { + var i = e.brand || ""; + _e.deviceType = "Phone"; + _e.sdkVersion = he; + _e.appkey = n().appKey(); + _e.sdkType = o.getSdkType(); + _e.umid = l().getId(); + if (e) { + _e.language = e.language || ""; + _e.os = e.OS; + _e.osVersion = e.OSVersion; + _e.deviceName = e.deviceName; + _e.platformVersion = e.platformVersion; + _e.platformSdkVersion = e.platformSDKVersion; + _e.deviceBrand = i; + var r = e.resolution.split("*"); + if (ge.isArray(r)) { + _e.resolutionHeight = Number(r[0]); + _e.resolutionWidth = Number(r[1]); + } + } + !(function (e) { + if (e) { + _e.installTime = + e.install_datetime && Date.parse(e.install_datetime); + _e.scene = e.install_scene; + _e.channel = e.install_channel; + _e.campaign = e.install_campaign; + } + })(Q.getImpObj()); + t && t(_e); + })(t, e); + }); + }); +} +var me = Object.create(null), + Se = null, + Ie = !1, + Oe = { + minFetchIntervalSeconds: 43200, + }; +function Ae(e) { + e && + ge.each(e, function (e) { + me[e.k] = e; + }); +} +function Ee() { + var e = this; + this.STORAGE_NAME = null; + r.once(r.messageType.CONFIG_LOADED, function (n) { + t().v("云配初始化开始..."); + e.init(n); + }); +} +Ee.prototype = { + setDefaultValues: function (e) { + Ie && + ge.isObject(e) && + ge.each(e, function (e, t) { + (me[t] && me[t].v) || + (me[t] = { + v: e, + }); + }); + }, + getValue: function (e) { + t().v("从配置项中读取 value, 当前配置为: ", me); + t().v("待读取的 key : ", e); + try { + if (!Ie) return; + var i = me[e] || {}; + t().v("读取相应配置ing..., 结果为: ", i); + if (ge.isNumber(i.e) && ge.isNumber(i.g)) { + t().v("读取到相应配置, 开始数据上报..."); + !(function (e) { + var i = { + appkey: n().appKey(), + sdkType: o.getSdkType(), + expId: e && e.e, + groupId: e && e.g, + clientTs: Date.now(), + key: e && e.k, + value: e && e.v, + umid: l().getId(), + }; + try { + o.request({ + url: u.GETVALUEURL, + method: "POST", + data: [i], + success: function (e) { + e && 200 === e.statusCode + ? t().v("上传数据成功", i) + : t().w("ablog 请求成功, 返回结果异常 ", e); + }, + fail: function (e) { + t().w("ablog 请求数据错误 ", i, e); + }, + }); + } catch (e) { + t().w("urequest 调用错误", e); + } + })(i); + } + return i.v; + } catch (n) { + t().w("getValue error, key: ", e); + } + }, + active: function (e) { + try { + if (!Ie) return; + var n, i; + e && e.params && (n = e.params); + e && e.callback && (i = e.callback); + t().v("激活配置项: ", n); + if (n) { + t().v("本地已缓存的配置项: ", me); + Ae(n); + t().v("合并后的配置项: ", me); + i && i(me); + t().v("active 结束"); + } else { + t().v("配置项为空!! 读取本地配置..."); + o.getStorage(this.STORAGE_NAME, function (e) { + if (e) { + Ae((e = ge.JSONDecode(e) || {}).params); + t().v("当前本地配置项为: ", me); + i && i(me); + t().v("active 结束"); + } else t().v("当前本地配置项为空, 退出激活"); + }); + } + } catch (e) { + t().w("SDK active 错误", e); + } + }, + init: function (e) { + if (e.appKey) { + Se = e.appKey; + this.STORAGE_NAME = "xphp_remote_config{{" + Se + "}}"; + if (e.LOG_URL) u.LOG_URL = e.LOG_URL; + if (e.GET_OPENID_URL) u.GET_OPENID_URL = e.GET_OPENID_URL; + if (e.USERINFO_URL) u.USERINFO_URL = e.USERINFO_URL; + } + if (Se) + if (Ie) t().w("SDK 已经初始化, 请避免重复初始化"); + else { + Ie = !0; + this.setOptions(e); + this.active(); + } + else t().err("请检查您的小程序 appKey, appKey 不能为空"); + }, + setOptions: function (e) { + if (ge.isObject(e)) { + var t = e.minFetchIntervalSeconds; + ge.isNumber(t) && (Oe.minFetchIntervalSeconds = Math.max(t, 5)); + } + }, + fetch: function (e) { + if (Ie && this.STORAGE_NAME) { + var n, i; + e && e.active && (n = e.active); + e && e.callback && (i = e.callback); + var r = this; + o.getStorage(this.STORAGE_NAME, function (e) { + t().v("开始读缓存 data is ", e); + if ( + (e = ge.JSONDecode(e) || {}).params && + e.ts && + Date.now() - e.ts < 1e3 * Oe.minFetchIntervalSeconds + ) { + t().v( + "缓存数据存在, 并且本次触发时间距离上次fetch触发时间未超过 fetch 时间间隔, 无需 fetch", + ); + i && i(e.params); + } else + ye(function (e) { + t().v("缓存数据不存在, 构建 fetch body :", e); + try { + o.request({ + url: u.FETCHURL, + method: "POST", + data: e, + success: function (e) { + if (e && 200 === e.statusCode && e.data && e.data.cc) { + t().v("fetch 请求成功, 响应数据: ", e.data); + var s = Object.create(null); + ge.each(e.data.cc, function (e) { + s[e.k] = e; + }); + var a = { + ts: Date.now(), + params: s, + }; + t().v("开始缓存 fetch 请求的云配置结果..."); + o.setStorage( + r.STORAGE_NAME, + ge.JSONEncode(a), + function (e) { + t().v("缓存云配置成功, 缓存数据为: ", a); + t().v("缓存云配置成功, 成功消息为: ", e); + t().v("云配拉取数据是否自动激活: ", n); + if (e && n) { + t().v("激活云配置..."); + r.active({ + params: s, + callback: i, + }); + } + }, + ); + } else { + t().w("fetch 请求成功,返回结果异常 ", e.data); + i && i(); + } + }, + fail: function (n) { + t().w("fetch请求数据错误 ", e, n); + i && i(); + }, + }); + } catch (e) { + t().w("urequest调用错误", e); + } + }); + }); + } + }, +}; +var Ne = { + install: function (e, t) { + e.rc || (e.rc = new Ee()); + e.messager.once(e.messager.messageType.CONFIG_LOADED, function () { + e._log.v("plugin rc installed"); + }); + return e.rc; + }, +}, + Te = !1, + we = { + install: function (e, t) { + e.wxpluginwraper || + (e.wxpluginwraper = function (t) { + if (!Te) { + t.onAppShow && + t.onAppShow(function (t) { + e.resume(t); + }); + t.onAppHide && + t.onAppHide(function (t) { + e.pause(t); + }); + Te = !0; + } + }); + }, + }, + ke = "", + be = {}; +function De(e) { + e && (ke = e); +} +function Ue(e, t) { + if (e.onShareAppMessage) { + var n = e.onShareAppMessage; + e.onShareAppMessage = function (e) { + var i = n.call(this, e) || {}, + r = (function (e, t) { + if (!e) return ""; + var n = []; + for (var i in t) + "_xphp_ssrc" !== i && "_xphp_sts" !== i && n.push(i + "=" + t[i]); + var r = n.join("&"); + return r ? e + "?" + r : e; + })(ke, be[ke]); + !i.path && r && (i.path = r); + var o = t.trackShare.call(this, i); + return void 0 === o ? i : o; + }; + } +} +function Pe(e, t, n) { + var i = e[t]; + e[t] = function (e) { + n.call(this, e); + i && i.call(this, e); + }; +} +function Re(e) { + try { + fe.resume(e, !0); + } catch (e) { + t().v("onAppShow: ", e); + } +} +function Le() { + try { + fe.pause(); + } catch (e) { + t().v("onAppHide: ", e); + } +} +function Ce() { + try { + De(this.route); + fe.trackPageStart(this.route); + } catch (e) { + t().v("onPageShow: ", e); + } +} +function Me(e) { + try { + De(this.route); + e && ((n = this.route), (i = e), n && (be[n] = i)); + t().v("Page onLoad: ", this.route, e); + } catch (e) { + t().v("onPageLoad: ", e); + } + var n, i; +} +function xe() { + try { + fe.trackPageEnd(this.route); + } catch (e) { + t().v("onPageHide: ", e); + } +} +try { + var Ve = App; + App = function (e) { + Pe(e, "onLaunch", function () { + !(function (e) { + try { + fe.init(e); + } catch (e) { + t().v("onAppLaunch: ", e); + } + })(e.xstatConfig); + }); + Pe(e, "onShow", Re); + Pe(e, "onHide", Le); + Ve(e); + }; +} catch (e) { + t().w("App重写异常"); +} +try { + var je = Page; + Page = function (e) { + Pe(e, "onShow", Ce); + Pe(e, "onHide", xe); + Pe(e, "onUnload", xe); + Pe(e, "onLoad", Me); + Ue(e, fe); + je(e); + }; +} catch (e) { + t().w("Page重写异常"); +} +try { + var Fe = Component; + Component = function (e) { + try { + e.methods = e.methods || {}; + var t = e.methods; + Pe(t, "onShow", Ce); + Pe(t, "onHide", xe); + Pe(t, "onUnload", xe); + Pe(t, "onLoad", Me); + Ue(t, fe); + Fe(e); + } catch (t) { + Fe(e); + } + }; +} catch (e) { + t().w("Component重写异常"); +} +var Ge = fe.init; +fe.init = function (e) { + if (e && e.useOpenid) { + t().tip_w(t().repeat("!")); + t().tip_w( + "openid已开启,请确保使用setOpenid设置openid或通过设置autoGetOpenid为true,并在xstat后台设置secret由xstat帮您获取", + ); + t().tip_w(t().repeat("!")); + } + Ge.call(fe, e); +}; +fe.use(Ne); +fe.use(we); +wx.xstat = fe; +module.exports = fe; \ No newline at end of file