创建
7
@babel/runtime/helpers/arrayLikeToArray.js
Normal file
@ -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;
|
5
@babel/runtime/helpers/arrayWithHoles.js
Normal file
@ -0,0 +1,5 @@
|
||||
function _arrayWithHoles(r) {
|
||||
if (Array.isArray(r)) return r;
|
||||
}
|
||||
|
||||
module.exports = _arrayWithHoles;
|
7
@babel/runtime/helpers/arrayWithoutHoles.js
Normal file
@ -0,0 +1,7 @@
|
||||
var arrayLikeToArray = require("./arrayLikeToArray");
|
||||
|
||||
function _arrayWithoutHoles(r) {
|
||||
if (Array.isArray(r)) return arrayLikeToArray(r);
|
||||
}
|
||||
|
||||
module.exports = _arrayWithoutHoles;
|
26
@babel/runtime/helpers/asyncToGenerator.js
Normal file
@ -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;
|
10
@babel/runtime/helpers/defineProperty.js
Normal file
@ -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;
|
7
@babel/runtime/helpers/interopRequireDefault.js
Normal file
@ -0,0 +1,7 @@
|
||||
function _interopRequireDefault(e) {
|
||||
return e && e.__esModule ? e : {
|
||||
default: e
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = _interopRequireDefault;
|
5
@babel/runtime/helpers/iterableToArray.js
Normal file
@ -0,0 +1,5 @@
|
||||
function _iterableToArray(r) {
|
||||
if ("undefined" != typeof Symbol && Symbol.iterator in Object(r)) return Array.from(r);
|
||||
}
|
||||
|
||||
module.exports = _iterableToArray;
|
20
@babel/runtime/helpers/iterableToArrayLimit.js
Normal file
@ -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;
|
5
@babel/runtime/helpers/nonIterableRest.js
Normal file
@ -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;
|
5
@babel/runtime/helpers/nonIterableSpread.js
Normal file
@ -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;
|
7
@babel/runtime/helpers/slicedToArray.js
Normal file
@ -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;
|
7
@babel/runtime/helpers/toConsumableArray.js
Normal file
@ -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;
|
18
@babel/runtime/helpers/typeof.js
Normal file
@ -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;
|
11
@babel/runtime/helpers/unsupportedIterableToArray.js
Normal file
@ -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;
|
273
@babel/runtime/regenerator.js
Normal file
@ -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")());
|
54
app.js
Normal file
@ -0,0 +1,54 @@
|
||||
var t = require("./utils/login.js");
|
||||
|
||||
App({
|
||||
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: ""
|
||||
}
|
||||
});
|
37
app.json
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
"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"
|
||||
],
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationBarTitleText": "聚美汽服",
|
||||
"navigationBarTextStyle": "black"
|
||||
},
|
||||
"permission": {
|
||||
"scope.address": { "desc": "获取您的通讯地址" },
|
||||
"scope.userLocation": { "desc": "你的位置信息将用于定位效果展示" }
|
||||
},
|
||||
"requiredPrivateInfos": ["chooseAddress", "getLocation", "chooseLocation"]
|
||||
}
|
BIN
img/car.png
Normal file
After Width: | Height: | Size: 428 KiB |
BIN
img/carcode.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
img/delete.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
img/discount.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
img/edit.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
29
img/font2/iconfont.svg
Normal file
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<!--
|
||||
2013-9-30: Created.
|
||||
-->
|
||||
<svg>
|
||||
<metadata>
|
||||
Created by iconfont
|
||||
</metadata>
|
||||
<defs>
|
||||
|
||||
<font id="iconfont" horiz-adv-x="1024" >
|
||||
<font-face
|
||||
font-family="iconfont"
|
||||
font-weight="500"
|
||||
font-stretch="normal"
|
||||
units-per-em="1024"
|
||||
ascent="896"
|
||||
descent="-128"
|
||||
/>
|
||||
<missing-glyph />
|
||||
|
||||
<glyph glyph-name="dingdanliebiao" unicode="" d="M429.9 667.1h186c23 0 41.8 18.8 41.8 41.8 0 23-18.8 41.8-41.8 41.8h-186c-23 0-41.8-18.8-41.8-41.8 0-23 18.8-41.8 41.8-41.8zM827.3 334.4V647.7c0 38.1-31.1 69.2-69.2 69.2h-49.2c0.2-2.7 0.8-5.3 0.8-8 0-51.7-42-93.7-93.7-93.7H430c-51.7 0-93.7 42-93.7 93.7 0 2.7 0.6 5.3 0.8 8H265c-38.1 0-69.2-31.1-69.2-69.2v-313.3c0-0.8-0.3-1.6-0.3-2.5l-0.3-246.6c0-38.1 31.1-69.2 69.2-69.2H758c38.1 0 69.2 31.1 69.2 69.2l0.3 246.6c0 0.9-0.2 1.7-0.2 2.5zM342.7 480.9h337.4c19 0 34.6-15.6 34.6-34.6s-15.6-34.6-34.6-34.6H342.7c-19 0-34.6 15.6-34.6 34.6s15.6 34.6 34.6 34.6z m372.8-323.7c0-18.6-15.2-33.9-33.9-33.9H341.3c-18.6 0-33.9 15.3-33.9 33.9v1.1c0 18.6 15.2 33.9 33.9 33.9h340.3c18.6 0 33.9-15.3 33.9-33.9v-1.1z m0 144.9c0-18.6-15.2-33.9-33.9-33.9H341.3c-18.6 0-33.9 15.3-33.9 33.9v1.1c0 18.6 15.2 33.9 33.9 33.9h340.3c18.6 0 33.9-15.3 33.9-33.9v-1.1z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
|
||||
|
||||
</font>
|
||||
</defs></svg>
|
After Width: | Height: | Size: 1.4 KiB |
BIN
img/hot.png
Normal file
After Width: | Height: | Size: 750 B |
BIN
img/hotsale-bg.png
Normal file
After Width: | Height: | Size: 22 KiB |
83
img/iconfont.svg
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
img/issaled.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
BIN
img/jiameng.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
img/local.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
img/location-blue.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
img/location-red.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
img/location.png
Normal file
After Width: | Height: | Size: 654 B |
BIN
img/login-bg.png
Normal file
After Width: | Height: | Size: 712 KiB |
BIN
img/logo.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
img/logo2.jpeg
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
img/mall.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
img/menberc.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
img/nocontent.png
Normal file
After Width: | Height: | Size: 7.3 KiB |
BIN
img/phone.png
Normal file
After Width: | Height: | Size: 812 B |
BIN
img/right.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
img/scan.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
img/search.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
img/service.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
img/shop.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
img/sun.jpeg
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
img/top.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
img/video.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
img/voucher.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
175
pages/addAddress/addAddress.js
Normal file
@ -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({}));
|
||||
}
|
||||
});
|
6
pages/addAddress/addAddress.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "地址",
|
||||
"usingComponents": {
|
||||
"page-loding": "../../template/pageLoding/pageLoding"
|
||||
}
|
||||
}
|
42
pages/addAddress/addAddress.wxml
Normal file
@ -0,0 +1,42 @@
|
||||
<view class="edit-box">
|
||||
<page-loding wx:if="{{showLoding}}"></page-loding>
|
||||
<view class="add-form">
|
||||
<picker bindchange="bindRegionChange" customItem="{{customItem}}" mode="region" value="{{region}}">
|
||||
<view class="item">
|
||||
<view class="name">所在地区</view>
|
||||
<view class="content">
|
||||
<view class="placeholder" wx:if="{{!info.provincename}}">所在地区</view>
|
||||
<view wx:if="{{info.provincename}}">{{info.provincename}} {{info.cityname}} {{info.countryname}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</picker>
|
||||
<view class="item">
|
||||
<view class="name">详细地址</view>
|
||||
<view class="content">
|
||||
<input bindinput="input" data-input="detailinfo" placeholder="详细地址" placeholderClass="placeholder" value="{{info.detailinfo}}"></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="name">姓名</view>
|
||||
<view class="content">
|
||||
<input bindinput="input" data-input="username" placeholder="姓名" placeholderClass="placeholder" value="{{info.username}}"></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="name">手机号码</view>
|
||||
<view class="content">
|
||||
<input bindinput="input" data-input="telnumber" placeholder="手机号码" placeholderClass="placeholder" value="{{info.telnumber}}"></input>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-box">
|
||||
<button bindopensetting="bindopensetting" class="btn" openType="openSetting" wx:if="{{isrefusedAuthLocation==1}}"> 导入微信地址 </button>
|
||||
<view bindtap="getSystemAddress" class="btn" wx:if="{{isrefusedAuthLocation==0}}">导入微信地址</view>
|
||||
<view bindtap="submit" class="btn submit">立即保存</view>
|
||||
</view>
|
||||
</view>
|
||||
<view bindtap="close_alert" class="alert-comfirm-box" hidden="{{!show_comfirm.show}}">
|
||||
<view class="reminder_box">
|
||||
<view class="tips">{{show_comfirm.tips}}</view>
|
||||
</view>
|
||||
</view>
|
134
pages/addAddress/addAddress.wxss
Normal file
@ -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;
|
||||
}
|
11
pages/common/common.wxml
Normal file
@ -0,0 +1,11 @@
|
||||
<template name="pageList">
|
||||
<view class="index-href-box">
|
||||
<view bindtap="toPage" class="item" data-needlogin="{{item.needlogin}}" data-refresh="{{item.refresh}}" data-showimg="{{item.showimg}}" data-url="{{item.url}}" wx:for="{{urlList}}" wx:key="index">
|
||||
<view class="btn">
|
||||
<image class="video" src="../../img/video.png" wx:if="{{item.img=='video'}}"></image>
|
||||
<text class="iconfont icon-{{item.img}}" wx:else></text>
|
||||
</view>
|
||||
<view class="name">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
0
pages/common/common.wxss
Normal file
137
pages/goodsDetails/goodsDetails.js
Normal file
@ -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
|
||||
});
|
||||
}
|
||||
});
|
14
pages/goodsDetails/goodsDetails.json
Normal file
@ -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"
|
||||
}
|
||||
}
|
69
pages/goodsDetails/goodsDetails.wxml
Normal file
@ -0,0 +1,69 @@
|
||||
<view>
|
||||
<page-loding wx:if="{{showLoding}}"></page-loding>
|
||||
<view class="position-top-tab" hidden="{{!scrolltocontent}}">
|
||||
<view bindtap="toId" class="tab {{tapid=='merchantList'?'active':''}}" data-id="merchantList">商家</view>
|
||||
<view bindtap="toId" class="tab {{tapid=='needknow'?'active':''}}" data-id="needknow">购买须知</view>
|
||||
<view bindtap="toId" class="tab {{tapid=='infomes'?'active':''}}" data-id="infomes">详情</view>
|
||||
</view>
|
||||
<scroll-view bindscroll="bindscroll" class="scrollview" scrollIntoView="{{scrollid}}" scrollWithAnimation="true" scrollY="true">
|
||||
<view id="header">
|
||||
<page-header formData="{{formData}}" info="{{info}}"></page-header>
|
||||
</view>
|
||||
<view class="info-main">
|
||||
<view class="info-content">
|
||||
<view id="title">
|
||||
<view class="info-wrap __nospace">
|
||||
<view class="info-title">
|
||||
<view>{{info.name}}</view>
|
||||
</view>
|
||||
<view class="info-inventory">
|
||||
<view class="sold">已售{{info.num_buy+info.unit_name}}</view>
|
||||
</view>
|
||||
<view class="goods-tags">
|
||||
<view class="tag" wx:for="{{info.tags}}" wx:key="index">{{item}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view id="merchantList">
|
||||
<shop-add merchantList="{{merchantList}}"></shop-add>
|
||||
</view>
|
||||
<view class="info-wrap need-know" id="needknow">
|
||||
<view class="m-title">
|
||||
<view class="bd">购买须知 <view class="line"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="richbox">
|
||||
<rich-text nodes="{{info.purchasenotes}}"></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-wrap info-mes" id="infomes">
|
||||
<view class="m-title">
|
||||
<view class="bd">商品详情 <view class="line"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="richbox">
|
||||
<rich-text nodes="{{info.message}}"></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-wrap" wx:if="{{priceDescription}}">
|
||||
<view class="info-picrule">
|
||||
<view class="title">价格说明</view>
|
||||
<view>
|
||||
<view class="richbox">
|
||||
<rich-text nodes="{{priceDescription}}"></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-wrap info-mes">
|
||||
<view class="m-title">
|
||||
<view class="bd">为您推荐 <view class="line"></view>
|
||||
</view>
|
||||
</view>
|
||||
<recomond-list list="{{recommendedList}}"></recomond-list>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<page-bottom info="{{info}}" token="{{token}}"></page-bottom>
|
||||
</view>
|
216
pages/goodsDetails/goodsDetails.wxss
Normal file
@ -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%;
|
||||
}
|
7
pages/goodsDetails/kefuBox/kefuBox.js
Normal file
@ -0,0 +1,7 @@
|
||||
Component({
|
||||
properties: {},
|
||||
data: {
|
||||
showDialog: !1
|
||||
},
|
||||
methods: {}
|
||||
});
|
4
pages/goodsDetails/kefuBox/kefuBox.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
37
pages/goodsDetails/kefuBox/kefuBox.wxml
Normal file
@ -0,0 +1,37 @@
|
||||
<view>
|
||||
<view class="keufubox">
|
||||
<view class="kebox">
|
||||
<view class="mykefu ">
|
||||
<view class="le">
|
||||
<image src="http://q990.img.aiyichuan.com/urm_huodong/20190416/1555414945804.jpg"></image>
|
||||
<view class="box">
|
||||
<view class="title">霸王餐福利</view>
|
||||
<view class="desc">加客服进「声色福利群」</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn">点我添加</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="modal-dialog" wx:if="{{showDialog}}">
|
||||
<view class="modal">
|
||||
<view class="infopop-wrap">
|
||||
<view class="infopop-content">
|
||||
<view class="info-buy_notice">
|
||||
<view class="top">
|
||||
<view class="_top"></view>
|
||||
<view class="title">购买须知</view>
|
||||
</view>
|
||||
<view style="max-height: 280px; overflow: auto;">
|
||||
<view class="txt">
|
||||
<view class="txt_p">此券属平台与商家补贴,一经售出无法退款,请确认后再下单。</view>
|
||||
</view>
|
||||
</view>
|
||||
<button class="btn">我知道了</button>
|
||||
</view>
|
||||
</view>
|
||||
<button class="infopop-close">×</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
189
pages/goodsDetails/kefuBox/kefuBox.wxss
Normal file
@ -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;
|
||||
}
|
5
pages/goodsDetails/matchWrap/matchWrap.js
Normal file
@ -0,0 +1,5 @@
|
||||
Component({
|
||||
properties: {},
|
||||
data: {},
|
||||
methods: {}
|
||||
});
|
4
pages/goodsDetails/matchWrap/matchWrap.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
34
pages/goodsDetails/matchWrap/matchWrap.wxml
Normal file
@ -0,0 +1,34 @@
|
||||
<view>
|
||||
<view class="match-wrap">
|
||||
<navigator class="goods-match" href="/pages/goodsDetails/goodsDetails">
|
||||
<view class="til">
|
||||
<image class="hot" src="/img/hot.png"></image> 为您搭配更优惠 </view>
|
||||
<view class="item">
|
||||
<view class="hd">
|
||||
<view class="image-box __100">
|
||||
<image lazyLoad="true" src="http://q990.img.aiyichuan.com/urm_huodong/20200331/1585643794622.jpg?imageView2/1/w/400/h/400"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bd">
|
||||
<view class="bd_name">【新会】椰子鸡再次返场!9.9元起抢「骨汁恋·星汇店」100元代金券!</view>
|
||||
<view class="_btm">
|
||||
<view class="_btm_lt">
|
||||
<view class="bd_price">
|
||||
<view class="now-price __normal">
|
||||
<view class="symbol">¥</view>
|
||||
<view class="buck">9.</view>
|
||||
<view class="cent">90</view>
|
||||
<view></view>
|
||||
</view>
|
||||
<view class="old">¥100.00</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="_btm_rt">
|
||||
<view class="bd_btn">立即抢购</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
171
pages/goodsDetails/matchWrap/matchWrap.wxss
Normal file
@ -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;
|
||||
}
|
15
pages/goodsDetails/pageBottom/pageBottom.js
Normal file
@ -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)
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
4
pages/goodsDetails/pageBottom/pageBottom.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
36
pages/goodsDetails/pageBottom/pageBottom.wxml
Normal file
@ -0,0 +1,36 @@
|
||||
<view class="bottom-bar">
|
||||
<view class="left thin-border_t">
|
||||
<navigator class="bottom-bar-btn " openType="reLaunch" url="/pages/mall/mall">
|
||||
<image class="icon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAMAAAANIilAAAAAaVBMVEUAAAAlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiXioXAkAAAAInRSTlMACfP52xIoZ87sr6Y75L2Tjk5JM5l/x3JEG6CFel8Y1FYgEq6YZgAAAZ1JREFUSMftltuSgjAMhi20lEOB0nJGXeX9H3LT1aUqWFpudschN06Gfpj++Yfk8C8DNaGflsEmVuJRhU83sNQf75Ej15IToDyKWAi/GXFigy9gwuD3Ldjl4hcPiPJe7VHVUFiXzNXx05QX6lVHO7arVaHy8RJK98RGtjaCk/HzSZIpCbpVtvKhtc3sJjnQETOjJIZDKVts+5pfZKq6el58xqIfv5hNNbx7er35xWQqYWhhrP2yaKqrWc3JLwZTzcLoF5RrU83D7JeuNrnf7Jcz1qYyhS4S63b2ylRun4l+ykAFcXCIAqz6CBMXmIC4UxK5w/qf4Q7IBUag0ZSAfJaYBnZ4h3f4w+EGD8vTaMDNKpxCElbyCURtpQZZugpToCG8jNNWBoEUlNe3dS6lFncWvTfOwkuEpWBI8NB/IHFZoLeCRQufXsROVZkk5UBbYlQb9gW2eWJw2FRcYAENmRIGb+ocYNhNuM5gtmfImr3AtAl0yuyGu95L+tc1B5/OFlq1sTr63AA+OgR+XbioZ83GZF7QsbbgozCXh7+Pb3sQSPMdR14UAAAAAElFTkSuQmCC"></image>
|
||||
<view class="text">首页</view>
|
||||
</navigator>
|
||||
<button class="bottom-bar-btn " openType="share">
|
||||
<view>
|
||||
<image class="icon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAMAAAANIilAAAAAZlBMVEUAAAAlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiVcd6OBAAAAIXRSTlMA7xDd9hwI2fri0iR16rlFFZTmrqFqNy3JxJxhUj2CWH5MxJO9AAABjUlEQVRIx+3W2Y6DMAwFUJMmYd+60b29//+TgwutAqqU4JfRjHqfkKWDURQZ07+IVbPQLGPZzOv57aAxD01SR3jl7NabLZc8OMM72inv02epXM0yxcePr93zB29q6zmS7rhapXrWWfV913sKyb3EM/G70vbWhFD7PpnsVTIJcA2xXTx0dXEBbELsWTPVRe7iCrgE2BacQ07GxStAeamqmCYPoinW0F5rMrbpcDQlsKUxQOSzecr22IzXYnNqwnG3ZntyL1Ewzku2BZEAm5TtjiRYZT1N7iTC1dBXhFu2NxLhM9stiXCn+UpaEbZxb0tDInxCn5pE+MK2JRFW697G9pOAFz+HzpVE+Mr2RBI8nHTUyPB+uJYynD/HsxBTkUS1GJMlkmP64i/+dayhl1kLJDQmBppFuAPS+U7iz3wDGp6rRTh2JozRQL2ssVbuj7DMg22dAA9nuMe95t6hq1xmnUIe8dZ7abyyuR8BpIbI1cNWqSNPhiXQ0DSqTRAWffswF01RrX0vSNJqp+iP5wfio0RY03mMqQAAAABJRU5ErkJggg=="></image>
|
||||
<view class="text">分享</view>
|
||||
</view>
|
||||
</button>
|
||||
<navigator class="bottom-bar-btn" url="/pages/user/user">
|
||||
<view>
|
||||
<image class="icon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAMAAAANIilAAAAAWlBMVEUAAAAlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiV6c6IWAAAAHXRSTlMA9QVzPB8VuJ0N3M4k08ioalPsfC1mQ+HEjl6ENG6yr8QAAAIWSURBVEjHtVfZdqswDPQCDvsWQkJb/v837ziOr0rkxqQ+nZeUCjHSWJZl8QdQmS5uV7lt8tr1OlPHPc3lJLcd5OliDrnOBTw5ZDFHXfPevVsVw5KXQpT5MhSV+1+fv071fGdt9dNruW7v7OcXyTf1BpyykC07WVvd/OQ7Smv2rty9tuRj2DhYm1YvktL260PIdLYyfYmX+LLSncO8nYmWQBfiHq1SpYiitLqNTzpL8MI3jhLccqe5qpGvOVi8yLtWe7HkLA5iljvRcjxqcRgaVFSCvQskDkqy/68WBMzEG8jg4DUrsEriLWC9iof4khGP/Wq+6bv2I6OWbmE/sAd5xdSKUuR1gR364WJgUl/xtjO6jwNXJvg9U4Won/Z+twGf/unTPnVP3QFxKxs/i9pxTeaR8URxECqnk/bKESAhcDN33xv+9PIQCuTqKuQiPChSYFrHcQUv5UAYHGUXqJCy3XZo2YZbEJmTNuetEISEibc9KFbhB/mVghvbb7w5t5f4JH5gDXe76UEb7okQkZw51KLXVS8qbISzD/ttGITkBXsbDQSjpYqCLxUVSRy8SHx5xsHLkzZGHHxj0JaMg29JagZx8GYgLr+Iu/UqG3lgsXgDNOmtV8y/afpzynGTdNClHLFJh3vKWJEy0KSMUilDXPL4mD64po/M6cM6vyY0RinTsGtCygUl/WoUv5RVE86UKnwpS8c/fhNBy/dVYcEAAAAASUVORK5CYII="></image>
|
||||
<view class="text">我的</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<view bindtap="order" class="right">
|
||||
<view class="menu-btns">
|
||||
<view class="btn btn-pri {{info.status!=1?'bg-grey':''}}">
|
||||
<view class="fmt-price" style="margin-bottom: 5px;">
|
||||
<view class="now" wx:if="{{info.status==1&&info.stock>0}}">
|
||||
<view class="dollar">¥</view>
|
||||
<view class="price">{{info.price}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<block wx:if="{{info.status==1}}">立即购买</block>
|
||||
<block wx:if="{{info.status==-1}}">还未开售</block>
|
||||
<block wx:if="{{info.status==-2}}">抢购已结束</block>
|
||||
<block wx:if="{{info.status==-3}}">已售罄</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
121
pages/goodsDetails/pageBottom/pageBottom.wxss
Normal file
@ -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;
|
||||
}
|
53
pages/goodsDetails/pageHeader/pageHeader.js
Normal file
@ -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)
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
4
pages/goodsDetails/pageHeader/pageHeader.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
55
pages/goodsDetails/pageHeader/pageHeader.wxml
Normal file
@ -0,0 +1,55 @@
|
||||
<view>
|
||||
<view class="header" style="position: relative;">
|
||||
<swiper circular="true" class="info-swiper" indicatorActiveColor="#ffffff" indicatorColor="rgba(235,237,240,0.3)" indicatorDots="true" style="height: {{swiperHeight}}px">
|
||||
<swiper-item wx:for="{{info.attachment}}" wx:for-index="i" wx:for-item="s" wx:key="i">
|
||||
<image bindload="load" class="swiper-item-img" mode="widthFix" src="{{s}}"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class=""></view>
|
||||
<swiper autoplay="true" circular="true" class="top-swiper" interval="5000" style="width:190px;" vertical="true" wx:if="{{formData.length>0}}">
|
||||
<swiper-item wx:for="{{formData}}" wx:for-index="i" wx:for-item="s" wx:key="i">
|
||||
<view>
|
||||
<view class="swperitem van-swipe-item" data-v-87e7c3a0="" style="width: 190px; height: 28px; transform: translateY(0px);">
|
||||
<image class="avatar" src="{{s.avatar}}"></image>
|
||||
<view class="txt" data-v-87e7c3a0="">{{s.nickname}} 刚刚购买了本商品</view>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="like" wx:if="{{info.num_views>0}}">{{info.num_views}}人喜欢</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="type-bar">
|
||||
<view class="lt">
|
||||
<view class="info-price">
|
||||
<view class="count">
|
||||
<view class="discount">
|
||||
<view class="doller">¥ </view>
|
||||
<view class="_price_free">{{info.price}}</view>
|
||||
</view>
|
||||
<view class="original">
|
||||
<view>¥{{info.marketprice}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt" wx:if="{{info.status==1}}">
|
||||
<view> 距结束还剩 <view class="countdown">
|
||||
<view class="day">{{day}}</view>
|
||||
<view class="separator">天</view>
|
||||
<view class="time-item">{{hour}}</view>
|
||||
<view class="separator">:</view>
|
||||
<view class="time-item">{{minute}}</view>
|
||||
<view class="separator">:</view>
|
||||
<view class="time-item">{{second}}</view>
|
||||
<view class="separator"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt" wx:if="{{info.status==-1||info.status==-2}}">
|
||||
<view class="time"> {{info.status==-1?'开始':'结束'}}时间 {{startTime[0]}} <view> {{startTime[1]}} </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
245
pages/goodsDetails/pageHeader/pageHeader.wxss
Normal file
@ -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;
|
||||
}
|
7
pages/goodsDetails/recomondList/recomondList.js
Normal file
@ -0,0 +1,7 @@
|
||||
Component({
|
||||
properties: {
|
||||
list: Array
|
||||
},
|
||||
data: {},
|
||||
methods: {}
|
||||
});
|
4
pages/goodsDetails/recomondList/recomondList.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
39
pages/goodsDetails/recomondList/recomondList.wxml
Normal file
@ -0,0 +1,39 @@
|
||||
<view class="small-list">
|
||||
<navigator class="item router-link-active" hoverClass="hover" url="/pages/goodsDetails/goodsDetails?id={{item.id}}" wx:for="{{list}}" wx:key="index">
|
||||
<view class="inner">
|
||||
<view class="hd">
|
||||
<view class="image-box __56">
|
||||
<image lazy="loaded" mode="widthFix" src="{{item.image}}"></image>
|
||||
</view>
|
||||
<view class="issaled" wx:if="{{item.stock==0}}">
|
||||
<image src="/img/issaled.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bd">
|
||||
<view style="margin: 0px 0px 4px;">
|
||||
<view style="overflow: hidden;">
|
||||
<view class="title __small" style="-webkit-line-clamp: 2; height: 2.6em;">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bd-btm">
|
||||
<view class="_btm_lt">
|
||||
<view style="margin: 0px 0px -3px;">
|
||||
<view class="now-price __normal">
|
||||
<view class="symbol">¥</view>
|
||||
<view class="buck">{{item.price_buck}}.</view>
|
||||
<view class="cent">{{item.price_cent}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="margin: 3px 0px 0px; font-size: 0px; line-height: 1.2;">
|
||||
<view class="old-price">¥{{item.marketprice}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="text-align: right;">
|
||||
<view class="vip-price-wrap"></view>
|
||||
<view style="margin: 5px 0px 0px; font-size: 12px; line-height: 1.2; color: rgb(150, 150, 150);">{{item.num_buy}}已售</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
140
pages/goodsDetails/recomondList/recomondList.wxss
Normal file
@ -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;
|
||||
}
|
21
pages/goodsDetails/shopAdd/shopAdd.js
Normal file
@ -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
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
4
pages/goodsDetails/shopAdd/shopAdd.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
24
pages/goodsDetails/shopAdd/shopAdd.wxml
Normal file
@ -0,0 +1,24 @@
|
||||
<view>
|
||||
<view :key="index" class="info-wrap" id="info-shop" wx:for="{{merchantList}}">
|
||||
<view class="info-shopinfo">
|
||||
<view>
|
||||
<view class="business-box">
|
||||
<view class="business-info">
|
||||
<view class="title" href="#/info/shop?id=41">{{item.name}}</view>
|
||||
<view class="business-info-time-range">营业时间:{{item.customerservice}}</view>
|
||||
<view class="shopinfo-item">
|
||||
<view>商家电话:{{item.tel}}</view>
|
||||
<view bindtap="call" class="btn" data-tel="{{item.tel}}" mycolor="">
|
||||
<image class="phone" src="/img/phone.png"></image>拨打</view>
|
||||
</view>
|
||||
<view class="shopinfo-item">
|
||||
<view class="shop-address">{{item.address}}</view>
|
||||
<view bindtap="toMap" class="btn" data-latitude="{{item.lat*1}}" data-longitude="{{item.lng*1}}" mycolor="">
|
||||
<image class="location" src="/img/location.png"></image>导航</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
73
pages/goodsDetails/shopAdd/shopAdd.wxss
Normal file
@ -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;
|
||||
}
|
112
pages/goodsSearch/goodsSearch.js
Normal file
@ -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"
|
||||
}));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
6
pages/goodsSearch/goodsSearch.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "聚美汽服",
|
||||
"usingComponents": {
|
||||
"recomond-list": "../goodsDetails/recomondList/recomondList"
|
||||
}
|
||||
}
|
24
pages/goodsSearch/goodsSearch.wxml
Normal file
@ -0,0 +1,24 @@
|
||||
<view>
|
||||
<view class="fixed">
|
||||
<view class="top">
|
||||
<view class="search">
|
||||
<input bindconfirm="submit" bindinput="input" class="input-placeholder" placeholder="搜索你心仪的商品" placeholderClass="placeholder" value="{{kw}}"></input>
|
||||
<view class="icon-search iconfont icon-sousuo"></view>
|
||||
<view class="img-close iconfont icon-guanbi"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="message" wx:if="{{historyList.length>0&&data.length==0}}">
|
||||
<view class="title">历史记录 <view bindtap="clearHistory" class="delete">
|
||||
<image src="/img/delete.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tag-list">
|
||||
<view :key="index" bindtap="selectKw" class="tag" data-kw="{{item}}" wx:for="{{historyList}}"> {{item}} </view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-list">
|
||||
<recomond-list list="{{data}}"></recomond-list>
|
||||
</view>
|
||||
<view class="loading" wx:if="{{loading}}">正在加载...</view>
|
||||
</view>
|
113
pages/goodsSearch/goodsSearch.wxss
Normal file
@ -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;
|
||||
}
|
204
pages/index/index.js
Normal file
@ -0,0 +1,204 @@
|
||||
var e = getApp(), t = require("../../utils/login.js");
|
||||
|
||||
Page({
|
||||
data: {
|
||||
showLoding: !0,
|
||||
urlList: [ {
|
||||
img: "chongzhi",
|
||||
name: "充值赠送",
|
||||
url: "voucher/voucher",
|
||||
needlogin: !0
|
||||
}, {
|
||||
img: "video",
|
||||
name: "洗车教程",
|
||||
url: "webview/webview?url=https://jm.v0750.com/video",
|
||||
needlogin: !1
|
||||
}, {
|
||||
img: "xichequan",
|
||||
name: "网点分布",
|
||||
url: "map/map"
|
||||
}, {
|
||||
img: "huiyuanzhongxin",
|
||||
name: "会员中心",
|
||||
url: "user/user",
|
||||
needlogin: !0
|
||||
}, {
|
||||
img: "youhuiquan1",
|
||||
name: "洗车券",
|
||||
url: "washCodeList/washCodeList"
|
||||
}, {
|
||||
img: "shangjiajiameng",
|
||||
name: "招募合伙人",
|
||||
url: "",
|
||||
showimg: !0
|
||||
} ],
|
||||
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({
|
||||
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) {
|
||||
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://jm.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://jm.v0750.com/miniprogram/index/newtmpl", e, !0).then(function(e) {}).catch(function(e) {});
|
||||
},
|
||||
fail: function(e) {
|
||||
console.log("requestSubscribeMessagefail", e);
|
||||
}
|
||||
});
|
||||
},
|
||||
onShareAppMessage: function() {}
|
||||
});
|
9
pages/index/index.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"navigationBarTitleText": "聚美汽服",
|
||||
"usingComponents": {
|
||||
"service-tel": "../../template/serviceTel/serviceTel",
|
||||
"my-money": "../../template/myMoney/myMoney",
|
||||
"head-swiper": "../../template/headSwiper/headSwiper",
|
||||
"page-loding": "../../template/pageLoding/pageLoding"
|
||||
}
|
||||
}
|
15
pages/index/index.wxml
Normal file
@ -0,0 +1,15 @@
|
||||
<import src="../common/common.wxml"></import>
|
||||
<view class="container">
|
||||
<page-loding wx:if="{{showLoding}}"></page-loding>
|
||||
<head-swiper banner="{{banner}}"></head-swiper>
|
||||
<view class="money">
|
||||
<my-money user="{{user}}"></my-money>
|
||||
<view class="marquee-wrap" wx:if="{{notice}}">
|
||||
<view bindtap="toPage" class="marquee-content" data-refresh="1" data-url="{{noticeurl}}"> {{notice}} </view>
|
||||
</view>
|
||||
</view>
|
||||
<template is="pageList" data="{{urlList:urlList}}"></template>
|
||||
<service-tel></service-tel>
|
||||
<view bindtap="toScan" class="scan-btn" wx:if="{{!isScan}}">扫码启动</view>
|
||||
<view bindtap="toStart" class="scan-btn" wx:if="{{isScan}}">立即启动</view>
|
||||
</view>
|
37
pages/index/index.wxss
Normal file
@ -0,0 +1,37 @@
|
||||
.container {
|
||||
box-sizing: border-box;
|
||||
min-height: 100vh;
|
||||
padding: 0 0 170rpx;
|
||||
}
|
||||
|
||||
.money-box {
|
||||
margin: 0 27rpx;
|
||||
}
|
||||
|
||||
.money {
|
||||
padding: 34rpx 27rpx 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;
|
||||
}
|
71
pages/listDetail/listDetail.js
Normal file
@ -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"
|
||||
});
|
||||
}
|
||||
});
|
9
pages/listDetail/listDetail.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"navigationBarTitleText": "聚美汽服",
|
||||
"enablePullDownRefresh": true,
|
||||
"usingComponents": {
|
||||
"service-tel": "../../template/serviceTel/serviceTel",
|
||||
"my-money": "../../template/myMoney/myMoney",
|
||||
"page-loding": "../../template/pageLoding/pageLoding"
|
||||
}
|
||||
}
|
21
pages/listDetail/listDetail.wxml
Normal file
@ -0,0 +1,21 @@
|
||||
<page-loding wx:if="{{showLoding}}"></page-loding>
|
||||
<view class="{{types=='voucher'?'container voucher-container':'container'}}">
|
||||
<view class="money">
|
||||
<my-money user="{{user}}"></my-money>
|
||||
</view>
|
||||
<view class="list-box">
|
||||
<view class="item" wx:for="{{list}}" wx:key="index">
|
||||
<view class="name">{{item.message}}</view>
|
||||
<view class="footer">
|
||||
<view class="time">{{item.timestamp}}</view>
|
||||
<view class="num">{{item.symbol}}{{item.amount}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="no-content" wx:if="{{list.length==0&&!loading}}">
|
||||
<image src="/img/nocontent.png"></image>
|
||||
<view>暂无相关数据</view>
|
||||
</view>
|
||||
<service-tel></service-tel>
|
||||
<view bindtap="toPage" class="scan-btn" wx:if="{{type=='invest'}}"> 立即充值 </view>
|
||||
</view>
|
46
pages/listDetail/listDetail.wxss
Normal file
@ -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;
|
||||
}
|
59
pages/login/login.js
Normal file
@ -0,0 +1,59 @@
|
||||
var e = getApp(), o = require("../../utils/login.js");
|
||||
|
||||
Page({
|
||||
data: {
|
||||
logs: [],
|
||||
isnotInfo: 1
|
||||
},
|
||||
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/register/register"
|
||||
});
|
||||
},
|
||||
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/register/register"
|
||||
});
|
||||
}
|
||||
});
|
4
pages/login/login.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"navigationBarTitleText": "聚美汽服",
|
||||
"usingComponents": {}
|
||||
}
|
9
pages/login/login.wxml
Normal file
@ -0,0 +1,9 @@
|
||||
<view class="container">
|
||||
<image class="login-bg" mode="widthFix" src="/img/login-bg.png"></image>
|
||||
<view class="logo"></view>
|
||||
<view class="yellow-bg"></view>
|
||||
<image class="car" src="/img/car.png"></image>
|
||||
<image class="logo" src="/img/logo.png"></image>
|
||||
<button bindgetuserinfo="onGotUserInfo" class="btn" lang="zh_CN" openType="getUserInfo" wx:if="{{isnotInfo==1}}">微信快捷登录</button>
|
||||
<button bindgetphonenumber="ongetPhoneNumber" class="btn" lang="zh_CN" openType="getPhoneNumber" wx:if="{{isnotInfo==2}}">授权手机号快速注册</button>
|
||||
</view>
|
57
pages/login/login.wxss
Normal file
@ -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;
|
||||
}
|
7
pages/mall/activeWindow/activeWindow.js
Normal file
@ -0,0 +1,7 @@
|
||||
Component({
|
||||
properties: {
|
||||
hotsale: Boolean
|
||||
},
|
||||
data: {},
|
||||
methods: {}
|
||||
});
|