fix:更新首页,logo,渐变色
This commit is contained in:
parent
1b753d9ee4
commit
4bd816a608
@ -14,7 +14,8 @@ const useWeAppAuthStore = common_vendor.defineStore("we_app_auth", () => {
|
||||
environment: "",
|
||||
house_occupant: false,
|
||||
house_register: false,
|
||||
is_house_exist: 0
|
||||
is_house_exist: 0,
|
||||
config: {}
|
||||
});
|
||||
function login(app) {
|
||||
common_vendor.index.login({
|
||||
@ -28,12 +29,13 @@ const useWeAppAuthStore = common_vendor.defineStore("we_app_auth", () => {
|
||||
}
|
||||
const getWXToken = (app, code) => {
|
||||
gen_Apis.Apis.Login.Auth.Login({ code, app_id: wxAppId }).then((res) => {
|
||||
var _a, _b, _c, _d;
|
||||
var _a, _b, _c, _d, _e;
|
||||
console.log("登录", res == null ? void 0 : res.data);
|
||||
data.value.user = (_a = res.data) == null ? void 0 : _a.user;
|
||||
data.value.selected_house = (_b = res.data) == null ? void 0 : _b.selected_house;
|
||||
data.value.config = (_c = res.data) == null ? void 0 : _c.config;
|
||||
loading.value = false;
|
||||
common_vendor.index.setStorageSync("ACCESS_TOKEN_CUSTOMER", (_d = (_c = res == null ? void 0 : res.data) == null ? void 0 : _c.token) == null ? void 0 : _d.token);
|
||||
common_vendor.index.setStorageSync("ACCESS_TOKEN_CUSTOMER", (_e = (_d = res == null ? void 0 : res.data) == null ? void 0 : _d.token) == null ? void 0 : _e.token);
|
||||
if (data.value.user) {
|
||||
getIsHouseExist();
|
||||
}
|
||||
|
||||
595
dist/dev/mp-weixin/common/vendor.js
vendored
595
dist/dev/mp-weixin/common/vendor.js
vendored
@ -11679,305 +11679,316 @@ class Request2 {
|
||||
}
|
||||
}
|
||||
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
||||
var dayjs_minExports = {};
|
||||
function getDefaultExportFromCjs(x) {
|
||||
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
||||
}
|
||||
var dayjs_minExports$1 = {};
|
||||
var dayjs_min = {
|
||||
get exports() {
|
||||
return dayjs_minExports;
|
||||
return dayjs_minExports$1;
|
||||
},
|
||||
set exports(v) {
|
||||
dayjs_minExports = v;
|
||||
dayjs_minExports$1 = v;
|
||||
}
|
||||
};
|
||||
(function(module2, exports2) {
|
||||
!function(t2, e2) {
|
||||
module2.exports = e2();
|
||||
}(commonjsGlobal, function() {
|
||||
var t2 = 1e3, e2 = 6e4, n2 = 36e5, r2 = "millisecond", i = "second", s2 = "minute", u = "hour", a = "day", o2 = "week", c = "month", f2 = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t3) {
|
||||
var e3 = ["th", "st", "nd", "rd"], n3 = t3 % 100;
|
||||
return "[" + t3 + (e3[(n3 - 20) % 10] || e3[n3] || e3[0]) + "]";
|
||||
} }, m = function(t3, e3, n3) {
|
||||
var r3 = String(t3);
|
||||
return !r3 || r3.length >= e3 ? t3 : "" + Array(e3 + 1 - r3.length).join(n3) + t3;
|
||||
}, v = { s: m, z: function(t3) {
|
||||
var e3 = -t3.utcOffset(), n3 = Math.abs(e3), r3 = Math.floor(n3 / 60), i2 = n3 % 60;
|
||||
return (e3 <= 0 ? "+" : "-") + m(r3, 2, "0") + ":" + m(i2, 2, "0");
|
||||
}, m: function t3(e3, n3) {
|
||||
if (e3.date() < n3.date())
|
||||
return -t3(n3, e3);
|
||||
var r3 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), i2 = e3.clone().add(r3, c), s3 = n3 - i2 < 0, u2 = e3.clone().add(r3 + (s3 ? -1 : 1), c);
|
||||
return +(-(r3 + (n3 - i2) / (s3 ? i2 - u2 : u2 - i2)) || 0);
|
||||
}, a: function(t3) {
|
||||
return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
|
||||
}, p: function(t3) {
|
||||
return { M: c, y: h, w: o2, d: a, D: d, h: u, m: s2, s: i, ms: r2, Q: f2 }[t3] || String(t3 || "").toLowerCase().replace(/s$/, "");
|
||||
}, u: function(t3) {
|
||||
return void 0 === t3;
|
||||
} }, g = "en", D = {};
|
||||
D[g] = M;
|
||||
var p2 = "$isDayjsObject", S = function(t3) {
|
||||
return t3 instanceof _ || !(!t3 || !t3[p2]);
|
||||
}, w = function t3(e3, n3, r3) {
|
||||
var i2;
|
||||
if (!e3)
|
||||
return g;
|
||||
if ("string" == typeof e3) {
|
||||
var s3 = e3.toLowerCase();
|
||||
D[s3] && (i2 = s3), n3 && (D[s3] = n3, i2 = s3);
|
||||
var u2 = e3.split("-");
|
||||
if (!i2 && u2.length > 1)
|
||||
return t3(u2[0]);
|
||||
} else {
|
||||
var a2 = e3.name;
|
||||
D[a2] = e3, i2 = a2;
|
||||
}
|
||||
return !r3 && i2 && (g = i2), i2 || !r3 && g;
|
||||
}, O = function(t3, e3) {
|
||||
if (S(t3))
|
||||
return t3.clone();
|
||||
var n3 = "object" == typeof e3 ? e3 : {};
|
||||
return n3.date = t3, n3.args = arguments, new _(n3);
|
||||
}, b = v;
|
||||
b.l = w, b.i = S, b.w = function(t3, e3) {
|
||||
return O(t3, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
|
||||
};
|
||||
var _ = function() {
|
||||
function M2(t3) {
|
||||
this.$L = w(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p2] = true;
|
||||
}
|
||||
var m2 = M2.prototype;
|
||||
return m2.parse = function(t3) {
|
||||
this.$d = function(t4) {
|
||||
var e3 = t4.date, n3 = t4.utc;
|
||||
if (null === e3)
|
||||
return new Date(NaN);
|
||||
if (b.u(e3))
|
||||
return new Date();
|
||||
if (e3 instanceof Date)
|
||||
return new Date(e3);
|
||||
if ("string" == typeof e3 && !/Z$/i.test(e3)) {
|
||||
var r3 = e3.match($);
|
||||
if (r3) {
|
||||
var i2 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3);
|
||||
return n3 ? new Date(Date.UTC(r3[1], i2, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3)) : new Date(r3[1], i2, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3);
|
||||
}
|
||||
}
|
||||
return new Date(e3);
|
||||
}(t3), this.init();
|
||||
}, m2.init = function() {
|
||||
var t3 = this.$d;
|
||||
this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds();
|
||||
}, m2.$utils = function() {
|
||||
return b;
|
||||
}, m2.isValid = function() {
|
||||
return !(this.$d.toString() === l);
|
||||
}, m2.isSame = function(t3, e3) {
|
||||
var n3 = O(t3);
|
||||
return this.startOf(e3) <= n3 && n3 <= this.endOf(e3);
|
||||
}, m2.isAfter = function(t3, e3) {
|
||||
return O(t3) < this.startOf(e3);
|
||||
}, m2.isBefore = function(t3, e3) {
|
||||
return this.endOf(e3) < O(t3);
|
||||
}, m2.$g = function(t3, e3, n3) {
|
||||
return b.u(t3) ? this[e3] : this.set(n3, t3);
|
||||
}, m2.unix = function() {
|
||||
return Math.floor(this.valueOf() / 1e3);
|
||||
}, m2.valueOf = function() {
|
||||
return this.$d.getTime();
|
||||
}, m2.startOf = function(t3, e3) {
|
||||
var n3 = this, r3 = !!b.u(e3) || e3, f3 = b.p(t3), l2 = function(t4, e4) {
|
||||
var i2 = b.w(n3.$u ? Date.UTC(n3.$y, e4, t4) : new Date(n3.$y, e4, t4), n3);
|
||||
return r3 ? i2 : i2.endOf(a);
|
||||
}, $2 = function(t4, e4) {
|
||||
return b.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3);
|
||||
}, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
|
||||
switch (f3) {
|
||||
case h:
|
||||
return r3 ? l2(1, 0) : l2(31, 11);
|
||||
case c:
|
||||
return r3 ? l2(1, M3) : l2(0, M3 + 1);
|
||||
case o2:
|
||||
var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
|
||||
return l2(r3 ? m3 - D2 : m3 + (6 - D2), M3);
|
||||
case a:
|
||||
case d:
|
||||
return $2(v2 + "Hours", 0);
|
||||
case u:
|
||||
return $2(v2 + "Minutes", 1);
|
||||
case s2:
|
||||
return $2(v2 + "Seconds", 2);
|
||||
case i:
|
||||
return $2(v2 + "Milliseconds", 3);
|
||||
default:
|
||||
return this.clone();
|
||||
var hasRequiredDayjs_min;
|
||||
function requireDayjs_min() {
|
||||
if (hasRequiredDayjs_min)
|
||||
return dayjs_minExports$1;
|
||||
hasRequiredDayjs_min = 1;
|
||||
(function(module2, exports2) {
|
||||
!function(t2, e2) {
|
||||
module2.exports = e2();
|
||||
}(commonjsGlobal, function() {
|
||||
var t2 = 1e3, e2 = 6e4, n2 = 36e5, r2 = "millisecond", i = "second", s2 = "minute", u = "hour", a = "day", o2 = "week", c = "month", f2 = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t3) {
|
||||
var e3 = ["th", "st", "nd", "rd"], n3 = t3 % 100;
|
||||
return "[" + t3 + (e3[(n3 - 20) % 10] || e3[n3] || e3[0]) + "]";
|
||||
} }, m = function(t3, e3, n3) {
|
||||
var r3 = String(t3);
|
||||
return !r3 || r3.length >= e3 ? t3 : "" + Array(e3 + 1 - r3.length).join(n3) + t3;
|
||||
}, v = { s: m, z: function(t3) {
|
||||
var e3 = -t3.utcOffset(), n3 = Math.abs(e3), r3 = Math.floor(n3 / 60), i2 = n3 % 60;
|
||||
return (e3 <= 0 ? "+" : "-") + m(r3, 2, "0") + ":" + m(i2, 2, "0");
|
||||
}, m: function t3(e3, n3) {
|
||||
if (e3.date() < n3.date())
|
||||
return -t3(n3, e3);
|
||||
var r3 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), i2 = e3.clone().add(r3, c), s3 = n3 - i2 < 0, u2 = e3.clone().add(r3 + (s3 ? -1 : 1), c);
|
||||
return +(-(r3 + (n3 - i2) / (s3 ? i2 - u2 : u2 - i2)) || 0);
|
||||
}, a: function(t3) {
|
||||
return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
|
||||
}, p: function(t3) {
|
||||
return { M: c, y: h, w: o2, d: a, D: d, h: u, m: s2, s: i, ms: r2, Q: f2 }[t3] || String(t3 || "").toLowerCase().replace(/s$/, "");
|
||||
}, u: function(t3) {
|
||||
return void 0 === t3;
|
||||
} }, g = "en", D = {};
|
||||
D[g] = M;
|
||||
var p2 = "$isDayjsObject", S = function(t3) {
|
||||
return t3 instanceof _ || !(!t3 || !t3[p2]);
|
||||
}, w = function t3(e3, n3, r3) {
|
||||
var i2;
|
||||
if (!e3)
|
||||
return g;
|
||||
if ("string" == typeof e3) {
|
||||
var s3 = e3.toLowerCase();
|
||||
D[s3] && (i2 = s3), n3 && (D[s3] = n3, i2 = s3);
|
||||
var u2 = e3.split("-");
|
||||
if (!i2 && u2.length > 1)
|
||||
return t3(u2[0]);
|
||||
} else {
|
||||
var a2 = e3.name;
|
||||
D[a2] = e3, i2 = a2;
|
||||
}
|
||||
}, m2.endOf = function(t3) {
|
||||
return this.startOf(t3, false);
|
||||
}, m2.$set = function(t3, e3) {
|
||||
var n3, o3 = b.p(t3), f3 = "set" + (this.$u ? "UTC" : ""), l2 = (n3 = {}, n3[a] = f3 + "Date", n3[d] = f3 + "Date", n3[c] = f3 + "Month", n3[h] = f3 + "FullYear", n3[u] = f3 + "Hours", n3[s2] = f3 + "Minutes", n3[i] = f3 + "Seconds", n3[r2] = f3 + "Milliseconds", n3)[o3], $2 = o3 === a ? this.$D + (e3 - this.$W) : e3;
|
||||
if (o3 === c || o3 === h) {
|
||||
var y2 = this.clone().set(d, 1);
|
||||
y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
|
||||
} else
|
||||
l2 && this.$d[l2]($2);
|
||||
return this.init(), this;
|
||||
}, m2.set = function(t3, e3) {
|
||||
return this.clone().$set(t3, e3);
|
||||
}, m2.get = function(t3) {
|
||||
return this[b.p(t3)]();
|
||||
}, m2.add = function(r3, f3) {
|
||||
var d2, l2 = this;
|
||||
r3 = Number(r3);
|
||||
var $2 = b.p(f3), y2 = function(t3) {
|
||||
var e3 = O(l2);
|
||||
return b.w(e3.date(e3.date() + Math.round(t3 * r3)), l2);
|
||||
};
|
||||
if ($2 === c)
|
||||
return this.set(c, this.$M + r3);
|
||||
if ($2 === h)
|
||||
return this.set(h, this.$y + r3);
|
||||
if ($2 === a)
|
||||
return y2(1);
|
||||
if ($2 === o2)
|
||||
return y2(7);
|
||||
var M3 = (d2 = {}, d2[s2] = e2, d2[u] = n2, d2[i] = t2, d2)[$2] || 1, m3 = this.$d.getTime() + r3 * M3;
|
||||
return b.w(m3, this);
|
||||
}, m2.subtract = function(t3, e3) {
|
||||
return this.add(-1 * t3, e3);
|
||||
}, m2.format = function(t3) {
|
||||
var e3 = this, n3 = this.$locale();
|
||||
if (!this.isValid())
|
||||
return n3.invalidDate || l;
|
||||
var r3 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s3 = this.$H, u2 = this.$m, a2 = this.$M, o3 = n3.weekdays, c2 = n3.months, f3 = n3.meridiem, h2 = function(t4, n4, i3, s4) {
|
||||
return t4 && (t4[n4] || t4(e3, r3)) || i3[n4].slice(0, s4);
|
||||
}, d2 = function(t4) {
|
||||
return b.s(s3 % 12 || 12, t4, "0");
|
||||
}, $2 = f3 || function(t4, e4, n4) {
|
||||
var r4 = t4 < 12 ? "AM" : "PM";
|
||||
return n4 ? r4.toLowerCase() : r4;
|
||||
};
|
||||
return r3.replace(y, function(t4, r4) {
|
||||
return r4 || function(t5) {
|
||||
switch (t5) {
|
||||
case "YY":
|
||||
return String(e3.$y).slice(-2);
|
||||
case "YYYY":
|
||||
return b.s(e3.$y, 4, "0");
|
||||
case "M":
|
||||
return a2 + 1;
|
||||
case "MM":
|
||||
return b.s(a2 + 1, 2, "0");
|
||||
case "MMM":
|
||||
return h2(n3.monthsShort, a2, c2, 3);
|
||||
case "MMMM":
|
||||
return h2(c2, a2);
|
||||
case "D":
|
||||
return e3.$D;
|
||||
case "DD":
|
||||
return b.s(e3.$D, 2, "0");
|
||||
case "d":
|
||||
return String(e3.$W);
|
||||
case "dd":
|
||||
return h2(n3.weekdaysMin, e3.$W, o3, 2);
|
||||
case "ddd":
|
||||
return h2(n3.weekdaysShort, e3.$W, o3, 3);
|
||||
case "dddd":
|
||||
return o3[e3.$W];
|
||||
case "H":
|
||||
return String(s3);
|
||||
case "HH":
|
||||
return b.s(s3, 2, "0");
|
||||
case "h":
|
||||
return d2(1);
|
||||
case "hh":
|
||||
return d2(2);
|
||||
case "a":
|
||||
return $2(s3, u2, true);
|
||||
case "A":
|
||||
return $2(s3, u2, false);
|
||||
case "m":
|
||||
return String(u2);
|
||||
case "mm":
|
||||
return b.s(u2, 2, "0");
|
||||
case "s":
|
||||
return String(e3.$s);
|
||||
case "ss":
|
||||
return b.s(e3.$s, 2, "0");
|
||||
case "SSS":
|
||||
return b.s(e3.$ms, 3, "0");
|
||||
case "Z":
|
||||
return i2;
|
||||
}
|
||||
return null;
|
||||
}(t4) || i2.replace(":", "");
|
||||
});
|
||||
}, m2.utcOffset = function() {
|
||||
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
||||
}, m2.diff = function(r3, d2, l2) {
|
||||
var $2, y2 = this, M3 = b.p(d2), m3 = O(r3), v2 = (m3.utcOffset() - this.utcOffset()) * e2, g2 = this - m3, D2 = function() {
|
||||
return b.m(y2, m3);
|
||||
};
|
||||
switch (M3) {
|
||||
case h:
|
||||
$2 = D2() / 12;
|
||||
break;
|
||||
case c:
|
||||
$2 = D2();
|
||||
break;
|
||||
case f2:
|
||||
$2 = D2() / 3;
|
||||
break;
|
||||
case o2:
|
||||
$2 = (g2 - v2) / 6048e5;
|
||||
break;
|
||||
case a:
|
||||
$2 = (g2 - v2) / 864e5;
|
||||
break;
|
||||
case u:
|
||||
$2 = g2 / n2;
|
||||
break;
|
||||
case s2:
|
||||
$2 = g2 / e2;
|
||||
break;
|
||||
case i:
|
||||
$2 = g2 / t2;
|
||||
break;
|
||||
default:
|
||||
$2 = g2;
|
||||
}
|
||||
return l2 ? $2 : b.a($2);
|
||||
}, m2.daysInMonth = function() {
|
||||
return this.endOf(c).$D;
|
||||
}, m2.$locale = function() {
|
||||
return D[this.$L];
|
||||
}, m2.locale = function(t3, e3) {
|
||||
if (!t3)
|
||||
return this.$L;
|
||||
var n3 = this.clone(), r3 = w(t3, e3, true);
|
||||
return r3 && (n3.$L = r3), n3;
|
||||
}, m2.clone = function() {
|
||||
return b.w(this.$d, this);
|
||||
}, m2.toDate = function() {
|
||||
return new Date(this.valueOf());
|
||||
}, m2.toJSON = function() {
|
||||
return this.isValid() ? this.toISOString() : null;
|
||||
}, m2.toISOString = function() {
|
||||
return this.$d.toISOString();
|
||||
}, m2.toString = function() {
|
||||
return this.$d.toUTCString();
|
||||
}, M2;
|
||||
}(), k = _.prototype;
|
||||
return O.prototype = k, [["$ms", r2], ["$s", i], ["$m", s2], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach(function(t3) {
|
||||
k[t3[1]] = function(e3) {
|
||||
return this.$g(e3, t3[0], t3[1]);
|
||||
return !r3 && i2 && (g = i2), i2 || !r3 && g;
|
||||
}, O = function(t3, e3) {
|
||||
if (S(t3))
|
||||
return t3.clone();
|
||||
var n3 = "object" == typeof e3 ? e3 : {};
|
||||
return n3.date = t3, n3.args = arguments, new _(n3);
|
||||
}, b = v;
|
||||
b.l = w, b.i = S, b.w = function(t3, e3) {
|
||||
return O(t3, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
|
||||
};
|
||||
}), O.extend = function(t3, e3) {
|
||||
return t3.$i || (t3(e3, _, O), t3.$i = true), O;
|
||||
}, O.locale = w, O.isDayjs = S, O.unix = function(t3) {
|
||||
return O(1e3 * t3);
|
||||
}, O.en = D[g], O.Ls = D, O.p = {}, O;
|
||||
});
|
||||
})(dayjs_min);
|
||||
const dayjs = dayjs_minExports;
|
||||
var _ = function() {
|
||||
function M2(t3) {
|
||||
this.$L = w(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p2] = true;
|
||||
}
|
||||
var m2 = M2.prototype;
|
||||
return m2.parse = function(t3) {
|
||||
this.$d = function(t4) {
|
||||
var e3 = t4.date, n3 = t4.utc;
|
||||
if (null === e3)
|
||||
return new Date(NaN);
|
||||
if (b.u(e3))
|
||||
return new Date();
|
||||
if (e3 instanceof Date)
|
||||
return new Date(e3);
|
||||
if ("string" == typeof e3 && !/Z$/i.test(e3)) {
|
||||
var r3 = e3.match($);
|
||||
if (r3) {
|
||||
var i2 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3);
|
||||
return n3 ? new Date(Date.UTC(r3[1], i2, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3)) : new Date(r3[1], i2, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3);
|
||||
}
|
||||
}
|
||||
return new Date(e3);
|
||||
}(t3), this.init();
|
||||
}, m2.init = function() {
|
||||
var t3 = this.$d;
|
||||
this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds();
|
||||
}, m2.$utils = function() {
|
||||
return b;
|
||||
}, m2.isValid = function() {
|
||||
return !(this.$d.toString() === l);
|
||||
}, m2.isSame = function(t3, e3) {
|
||||
var n3 = O(t3);
|
||||
return this.startOf(e3) <= n3 && n3 <= this.endOf(e3);
|
||||
}, m2.isAfter = function(t3, e3) {
|
||||
return O(t3) < this.startOf(e3);
|
||||
}, m2.isBefore = function(t3, e3) {
|
||||
return this.endOf(e3) < O(t3);
|
||||
}, m2.$g = function(t3, e3, n3) {
|
||||
return b.u(t3) ? this[e3] : this.set(n3, t3);
|
||||
}, m2.unix = function() {
|
||||
return Math.floor(this.valueOf() / 1e3);
|
||||
}, m2.valueOf = function() {
|
||||
return this.$d.getTime();
|
||||
}, m2.startOf = function(t3, e3) {
|
||||
var n3 = this, r3 = !!b.u(e3) || e3, f3 = b.p(t3), l2 = function(t4, e4) {
|
||||
var i2 = b.w(n3.$u ? Date.UTC(n3.$y, e4, t4) : new Date(n3.$y, e4, t4), n3);
|
||||
return r3 ? i2 : i2.endOf(a);
|
||||
}, $2 = function(t4, e4) {
|
||||
return b.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3);
|
||||
}, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
|
||||
switch (f3) {
|
||||
case h:
|
||||
return r3 ? l2(1, 0) : l2(31, 11);
|
||||
case c:
|
||||
return r3 ? l2(1, M3) : l2(0, M3 + 1);
|
||||
case o2:
|
||||
var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
|
||||
return l2(r3 ? m3 - D2 : m3 + (6 - D2), M3);
|
||||
case a:
|
||||
case d:
|
||||
return $2(v2 + "Hours", 0);
|
||||
case u:
|
||||
return $2(v2 + "Minutes", 1);
|
||||
case s2:
|
||||
return $2(v2 + "Seconds", 2);
|
||||
case i:
|
||||
return $2(v2 + "Milliseconds", 3);
|
||||
default:
|
||||
return this.clone();
|
||||
}
|
||||
}, m2.endOf = function(t3) {
|
||||
return this.startOf(t3, false);
|
||||
}, m2.$set = function(t3, e3) {
|
||||
var n3, o3 = b.p(t3), f3 = "set" + (this.$u ? "UTC" : ""), l2 = (n3 = {}, n3[a] = f3 + "Date", n3[d] = f3 + "Date", n3[c] = f3 + "Month", n3[h] = f3 + "FullYear", n3[u] = f3 + "Hours", n3[s2] = f3 + "Minutes", n3[i] = f3 + "Seconds", n3[r2] = f3 + "Milliseconds", n3)[o3], $2 = o3 === a ? this.$D + (e3 - this.$W) : e3;
|
||||
if (o3 === c || o3 === h) {
|
||||
var y2 = this.clone().set(d, 1);
|
||||
y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
|
||||
} else
|
||||
l2 && this.$d[l2]($2);
|
||||
return this.init(), this;
|
||||
}, m2.set = function(t3, e3) {
|
||||
return this.clone().$set(t3, e3);
|
||||
}, m2.get = function(t3) {
|
||||
return this[b.p(t3)]();
|
||||
}, m2.add = function(r3, f3) {
|
||||
var d2, l2 = this;
|
||||
r3 = Number(r3);
|
||||
var $2 = b.p(f3), y2 = function(t3) {
|
||||
var e3 = O(l2);
|
||||
return b.w(e3.date(e3.date() + Math.round(t3 * r3)), l2);
|
||||
};
|
||||
if ($2 === c)
|
||||
return this.set(c, this.$M + r3);
|
||||
if ($2 === h)
|
||||
return this.set(h, this.$y + r3);
|
||||
if ($2 === a)
|
||||
return y2(1);
|
||||
if ($2 === o2)
|
||||
return y2(7);
|
||||
var M3 = (d2 = {}, d2[s2] = e2, d2[u] = n2, d2[i] = t2, d2)[$2] || 1, m3 = this.$d.getTime() + r3 * M3;
|
||||
return b.w(m3, this);
|
||||
}, m2.subtract = function(t3, e3) {
|
||||
return this.add(-1 * t3, e3);
|
||||
}, m2.format = function(t3) {
|
||||
var e3 = this, n3 = this.$locale();
|
||||
if (!this.isValid())
|
||||
return n3.invalidDate || l;
|
||||
var r3 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s3 = this.$H, u2 = this.$m, a2 = this.$M, o3 = n3.weekdays, c2 = n3.months, f3 = n3.meridiem, h2 = function(t4, n4, i3, s4) {
|
||||
return t4 && (t4[n4] || t4(e3, r3)) || i3[n4].slice(0, s4);
|
||||
}, d2 = function(t4) {
|
||||
return b.s(s3 % 12 || 12, t4, "0");
|
||||
}, $2 = f3 || function(t4, e4, n4) {
|
||||
var r4 = t4 < 12 ? "AM" : "PM";
|
||||
return n4 ? r4.toLowerCase() : r4;
|
||||
};
|
||||
return r3.replace(y, function(t4, r4) {
|
||||
return r4 || function(t5) {
|
||||
switch (t5) {
|
||||
case "YY":
|
||||
return String(e3.$y).slice(-2);
|
||||
case "YYYY":
|
||||
return b.s(e3.$y, 4, "0");
|
||||
case "M":
|
||||
return a2 + 1;
|
||||
case "MM":
|
||||
return b.s(a2 + 1, 2, "0");
|
||||
case "MMM":
|
||||
return h2(n3.monthsShort, a2, c2, 3);
|
||||
case "MMMM":
|
||||
return h2(c2, a2);
|
||||
case "D":
|
||||
return e3.$D;
|
||||
case "DD":
|
||||
return b.s(e3.$D, 2, "0");
|
||||
case "d":
|
||||
return String(e3.$W);
|
||||
case "dd":
|
||||
return h2(n3.weekdaysMin, e3.$W, o3, 2);
|
||||
case "ddd":
|
||||
return h2(n3.weekdaysShort, e3.$W, o3, 3);
|
||||
case "dddd":
|
||||
return o3[e3.$W];
|
||||
case "H":
|
||||
return String(s3);
|
||||
case "HH":
|
||||
return b.s(s3, 2, "0");
|
||||
case "h":
|
||||
return d2(1);
|
||||
case "hh":
|
||||
return d2(2);
|
||||
case "a":
|
||||
return $2(s3, u2, true);
|
||||
case "A":
|
||||
return $2(s3, u2, false);
|
||||
case "m":
|
||||
return String(u2);
|
||||
case "mm":
|
||||
return b.s(u2, 2, "0");
|
||||
case "s":
|
||||
return String(e3.$s);
|
||||
case "ss":
|
||||
return b.s(e3.$s, 2, "0");
|
||||
case "SSS":
|
||||
return b.s(e3.$ms, 3, "0");
|
||||
case "Z":
|
||||
return i2;
|
||||
}
|
||||
return null;
|
||||
}(t4) || i2.replace(":", "");
|
||||
});
|
||||
}, m2.utcOffset = function() {
|
||||
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
||||
}, m2.diff = function(r3, d2, l2) {
|
||||
var $2, y2 = this, M3 = b.p(d2), m3 = O(r3), v2 = (m3.utcOffset() - this.utcOffset()) * e2, g2 = this - m3, D2 = function() {
|
||||
return b.m(y2, m3);
|
||||
};
|
||||
switch (M3) {
|
||||
case h:
|
||||
$2 = D2() / 12;
|
||||
break;
|
||||
case c:
|
||||
$2 = D2();
|
||||
break;
|
||||
case f2:
|
||||
$2 = D2() / 3;
|
||||
break;
|
||||
case o2:
|
||||
$2 = (g2 - v2) / 6048e5;
|
||||
break;
|
||||
case a:
|
||||
$2 = (g2 - v2) / 864e5;
|
||||
break;
|
||||
case u:
|
||||
$2 = g2 / n2;
|
||||
break;
|
||||
case s2:
|
||||
$2 = g2 / e2;
|
||||
break;
|
||||
case i:
|
||||
$2 = g2 / t2;
|
||||
break;
|
||||
default:
|
||||
$2 = g2;
|
||||
}
|
||||
return l2 ? $2 : b.a($2);
|
||||
}, m2.daysInMonth = function() {
|
||||
return this.endOf(c).$D;
|
||||
}, m2.$locale = function() {
|
||||
return D[this.$L];
|
||||
}, m2.locale = function(t3, e3) {
|
||||
if (!t3)
|
||||
return this.$L;
|
||||
var n3 = this.clone(), r3 = w(t3, e3, true);
|
||||
return r3 && (n3.$L = r3), n3;
|
||||
}, m2.clone = function() {
|
||||
return b.w(this.$d, this);
|
||||
}, m2.toDate = function() {
|
||||
return new Date(this.valueOf());
|
||||
}, m2.toJSON = function() {
|
||||
return this.isValid() ? this.toISOString() : null;
|
||||
}, m2.toISOString = function() {
|
||||
return this.$d.toISOString();
|
||||
}, m2.toString = function() {
|
||||
return this.$d.toUTCString();
|
||||
}, M2;
|
||||
}(), k = _.prototype;
|
||||
return O.prototype = k, [["$ms", r2], ["$s", i], ["$m", s2], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach(function(t3) {
|
||||
k[t3[1]] = function(e3) {
|
||||
return this.$g(e3, t3[0], t3[1]);
|
||||
};
|
||||
}), O.extend = function(t3, e3) {
|
||||
return t3.$i || (t3(e3, _, O), t3.$i = true), O;
|
||||
}, O.locale = w, O.isDayjs = S, O.unix = function(t3) {
|
||||
return O(1e3 * t3);
|
||||
}, O.en = D[g], O.Ls = D, O.p = {}, O;
|
||||
});
|
||||
})(dayjs_min);
|
||||
return dayjs_minExports$1;
|
||||
}
|
||||
var dayjs_minExports = requireDayjs_min();
|
||||
const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
|
||||
var relativeTimeExports = {};
|
||||
var relativeTime$1 = {
|
||||
get exports() {
|
||||
@ -12041,7 +12052,7 @@ var zhCn = {
|
||||
};
|
||||
(function(module2, exports2) {
|
||||
!function(e2, _) {
|
||||
module2.exports = _(dayjs_minExports);
|
||||
module2.exports = _(requireDayjs_min());
|
||||
}(commonjsGlobal, function(e2) {
|
||||
function _(e3) {
|
||||
return e3 && "object" == typeof e3 && "default" in e3 ? e3 : { default: e3 };
|
||||
|
||||
@ -45,6 +45,25 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
const handleSelectedHouse = (e) => {
|
||||
show.value = false;
|
||||
};
|
||||
const getPageBgFun = () => {
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F;
|
||||
let cssStrColor = ((_g = (_f = (_e = (_d = (_c = (_b = (_a = pages_index_model.useModel) == null ? void 0 : _a.pageConfig) == null ? void 0 : _b.value) == null ? void 0 : _c.pageColorValue) == null ? void 0 : _d.colors) == null ? void 0 : _e[0]) == null ? void 0 : _f.color) == null ? void 0 : _g.metaColor) || "#d3d7ff";
|
||||
let cssEndColor = ((_n = (_m = (_l = (_k = (_j = (_i = (_h = pages_index_model.useModel) == null ? void 0 : _h.pageConfig) == null ? void 0 : _i.value) == null ? void 0 : _j.pageColorValue) == null ? void 0 : _k.colors) == null ? void 0 : _l[1]) == null ? void 0 : _m.color) == null ? void 0 : _n.metaColor) || "#dffff3";
|
||||
let strBgCode = ((_r = (_q = (_p = (_o = pages_index_model.useModel) == null ? void 0 : _o.pageConfig) == null ? void 0 : _p.value) == null ? void 0 : _q.pageColorValue) == null ? void 0 : _r.colors) ? `rgba(${cssStrColor == null ? void 0 : cssStrColor.r},${cssStrColor == null ? void 0 : cssStrColor.g},${cssStrColor == null ? void 0 : cssStrColor.b},${cssStrColor == null ? void 0 : cssStrColor.a})` : (_w = (_v = (_u = (_t = (_s = pages_index_model.useModel) == null ? void 0 : _s.pageConfig) == null ? void 0 : _t.value) == null ? void 0 : _u.pageColorValue) == null ? void 0 : _v[0]) == null ? void 0 : _w.color;
|
||||
let endBgCode = ((_A = (_z = (_y = (_x = pages_index_model.useModel) == null ? void 0 : _x.pageConfig) == null ? void 0 : _y.value) == null ? void 0 : _z.pageColorValue) == null ? void 0 : _A.colors) ? `rgba(${cssEndColor == null ? void 0 : cssEndColor.r},${cssEndColor == null ? void 0 : cssEndColor.g},${cssEndColor == null ? void 0 : cssEndColor.b},${cssEndColor == null ? void 0 : cssEndColor.a})` : (_F = (_E = (_D = (_C = (_B = pages_index_model.useModel) == null ? void 0 : _B.pageConfig) == null ? void 0 : _C.value) == null ? void 0 : _D.pageColorValue) == null ? void 0 : _E[1]) == null ? void 0 : _F.color;
|
||||
let bhg = `background: linear-gradient(180deg,rgba(208, 229, 255, 0.44) 0%,rgba(255, 255, 255, 0) 100%),linear-gradient(146deg, ${strBgCode} 0%, rgba(255, 255, 255, 0) 55%),linear-gradient(194deg, ${endBgCode} 0%, #f8f8f8 65%);`;
|
||||
return bhg;
|
||||
};
|
||||
const truncateString = (str) => {
|
||||
if (!str)
|
||||
return "-";
|
||||
const maxLength = 15;
|
||||
if (str.length <= maxLength)
|
||||
return str;
|
||||
const start = 6;
|
||||
const end = 6;
|
||||
return str.slice(0, start) + "..." + str.slice(-end);
|
||||
};
|
||||
common_vendor.watch(
|
||||
() => {
|
||||
var _a;
|
||||
@ -73,26 +92,29 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
show.value = false;
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h;
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
||||
return common_vendor.e({
|
||||
a: !((_a = userData.value) == null ? void 0 : _a.user)
|
||||
}, !((_b = userData.value) == null ? void 0 : _b.user) ? {} : !((_c = userData.value) == null ? void 0 : _c.selected_house) ? {} : {
|
||||
c: common_vendor.t(((_e = (_d = userData.value) == null ? void 0 : _d.selected_house) == null ? void 0 : _e.full_name) || "-")
|
||||
a: (_f = (_e = (_d = (_c = (_b = (_a = userData.value) == null ? void 0 : _a.config) == null ? void 0 : _b.companyConfig) == null ? void 0 : _c.config_value) == null ? void 0 : _d.logo) == null ? void 0 : _e[0]) == null ? void 0 : _f.url
|
||||
}, ((_l = (_k = (_j = (_i = (_h = (_g = userData.value) == null ? void 0 : _g.config) == null ? void 0 : _h.companyConfig) == null ? void 0 : _i.config_value) == null ? void 0 : _j.logo) == null ? void 0 : _k[0]) == null ? void 0 : _l.url) ? {
|
||||
b: ((_r = (_q = (_p = (_o = (_n = (_m = userData.value) == null ? void 0 : _m.config) == null ? void 0 : _n.companyConfig) == null ? void 0 : _o.config_value) == null ? void 0 : _p.logo) == null ? void 0 : _q[0]) == null ? void 0 : _r.url) || ""
|
||||
} : {}, {
|
||||
c: !((_s = userData.value) == null ? void 0 : _s.user)
|
||||
}, !((_t = userData.value) == null ? void 0 : _t.user) ? {} : !((_u = userData.value) == null ? void 0 : _u.selected_house) ? {} : {
|
||||
e: common_vendor.t(truncateString(((_w = (_v = userData.value) == null ? void 0 : _v.selected_house) == null ? void 0 : _w.full_name) || ""))
|
||||
}, {
|
||||
b: !((_f = userData.value) == null ? void 0 : _f.selected_house),
|
||||
d: common_vendor.p({
|
||||
d: !((_x = userData.value) == null ? void 0 : _x.selected_house),
|
||||
f: common_vendor.p({
|
||||
name: "arrow-down-fill",
|
||||
size: "12",
|
||||
color: "#333"
|
||||
}),
|
||||
e: common_vendor.o(handlePopupSwitchHouse),
|
||||
f: common_vendor.o(($event) => show.value = false),
|
||||
g: common_vendor.o(handleSelectedHouse),
|
||||
h: common_vendor.p({
|
||||
g: common_vendor.o(handlePopupSwitchHouse),
|
||||
h: common_vendor.o(($event) => show.value = false),
|
||||
i: common_vendor.o(handleSelectedHouse),
|
||||
j: common_vendor.p({
|
||||
show: show.value
|
||||
}),
|
||||
i: common_vendor.n(`custom-title ${((_h = (_g = common_vendor.unref(pages_index_model.useModel)) == null ? void 0 : _g.scrollTop) == null ? void 0 : _h.value) > 10 ? "custom_title_scroll_bg" : ""}`),
|
||||
j: common_vendor.s(`padding-top:${capsuleRect.value.top}px;height:${capsuleRect.value.height}px;line-height:${capsuleRect.value.height}px;${props == null ? void 0 : props.objStyle}`)
|
||||
k: common_vendor.s(`padding-top:${capsuleRect.value.top}px;height:${capsuleRect.value.height}px;line-height:${capsuleRect.value.height}px;${props == null ? void 0 : props.objStyle};${((_z = (_y = common_vendor.unref(pages_index_model.useModel)) == null ? void 0 : _y.scrollTop) == null ? void 0 : _z.value) > 10 ? getPageBgFun() : ""}`)
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
@ -1 +1 @@
|
||||
<view class="{{['data-v-f5a8911c', i]}}" style="{{j}}"><view bindtap="{{e}}" class="user_houses_info data-v-f5a8911c"><text wx:if="{{a}}" class="data-v-f5a8911c">请先登录</text><text wx:elif="{{b}}" class="data-v-f5a8911c">请绑定您的房屋</text><text wx:else class="data-v-f5a8911c">{{c}}</text><up-icon wx:if="{{d}}" class="data-v-f5a8911c" u-i="f5a8911c-0" bind:__l="__l" u-p="{{d}}"></up-icon></view><hs-popup-switch-house wx:if="{{h}}" class="data-v-f5a8911c" bindclose="{{f}}" bindchange="{{g}}" u-i="f5a8911c-1" bind:__l="__l" u-p="{{h}}"/></view>
|
||||
<view class="custom-title data-v-f5a8911c" style="{{k}}"><view bindtap="{{g}}" class="user_houses_info data-v-f5a8911c"><image wx:if="{{a}}" class="data-v-f5a8911c" mode="aspectFill" src="{{b}}"/><text wx:if="{{c}}" class="data-v-f5a8911c">请先登录</text><text wx:elif="{{d}}" class="data-v-f5a8911c">请绑定您的房屋</text><view wx:else class="full_name data-v-f5a8911c">{{e}}</view><up-icon wx:if="{{f}}" class="data-v-f5a8911c" u-i="f5a8911c-0" bind:__l="__l" u-p="{{f}}"></up-icon></view><hs-popup-switch-house wx:if="{{j}}" class="data-v-f5a8911c" bindclose="{{h}}" bindchange="{{i}}" u-i="f5a8911c-1" bind:__l="__l" u-p="{{j}}"/></view>
|
||||
@ -19,6 +19,15 @@
|
||||
justify-content: space-between;
|
||||
min-width: 100rpx;
|
||||
}
|
||||
.custom-title .user_houses_info .full_name.data-v-f5a8911c {
|
||||
max-width: 300rpx;
|
||||
padding: 0 15rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.custom-title .user_houses_info image.data-v-f5a8911c {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
.custom_title_scroll_bg.data-v-f5a8911c {
|
||||
background: linear-gradient(270deg, #def6f8 0%, #d8e2fe 100%);
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
12
dist/dev/mp-weixin/pages/index/index.js
vendored
12
dist/dev/mp-weixin/pages/index/index.js
vendored
@ -32,12 +32,13 @@ const _sfc_defineComponent = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
pages_index_model.useModel.scrollTop.value = e.scrollTop;
|
||||
});
|
||||
common_vendor.onShow(async (e) => {
|
||||
var _a, _b, _c, _d;
|
||||
var _a, _b, _c, _d, _e, _f, _g;
|
||||
await ((_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$onLaunched);
|
||||
pages_index_model.useModel.user.value = (_b = auth == null ? void 0 : auth.data) == null ? void 0 : _b.user;
|
||||
pages_index_model.useModel.pageConfig.value = ((_e = (_d = (_c = auth == null ? void 0 : auth.data) == null ? void 0 : _c.config) == null ? void 0 : _d.companyConfig) == null ? void 0 : _e.config_value) || {};
|
||||
console.log("页面显示");
|
||||
if ((_c = common_libraries_userUserLogin.getUserLogin) == null ? void 0 : _c.getLoginStatus()) {
|
||||
(_d = pages_index_method.method) == null ? void 0 : _d.getCountBills();
|
||||
if ((_f = common_libraries_userUserLogin.getUserLogin) == null ? void 0 : _f.getLoginStatus()) {
|
||||
(_g = pages_index_method.method) == null ? void 0 : _g.getCountBills();
|
||||
}
|
||||
if (auth == null ? void 0 : auth.data.house_register) {
|
||||
console.log("house_register", auth == null ? void 0 : auth.data.house_register);
|
||||
@ -57,7 +58,10 @@ const _sfc_defineComponent = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
};
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return {};
|
||||
var _a, _b, _c;
|
||||
return {
|
||||
a: common_vendor.s(`background:${(_c = (_b = (_a = common_vendor.unref(pages_index_model.useModel)) == null ? void 0 : _a.pageConfig) == null ? void 0 : _b.value) == null ? void 0 : _c.pageColor}`)
|
||||
};
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
2
dist/dev/mp-weixin/pages/index/index.wxml
vendored
2
dist/dev/mp-weixin/pages/index/index.wxml
vendored
@ -1 +1 @@
|
||||
<view class="home_page"><my-page-head-title u-i="723af36b-0" bind:__l="__l"/><my-page-banner u-i="723af36b-1" bind:__l="__l"/><my-classification u-i="723af36b-2" bind:__l="__l"/><my-news-list u-i="723af36b-3" bind:__l="__l"/><my-ai-input u-i="723af36b-4" bind:__l="__l"/><my-tabs u-i="723af36b-5" bind:__l="__l"/><my-modal-server u-i="723af36b-6" bind:__l="__l"/><my-official-account u-i="723af36b-7" bind:__l="__l"/></view>
|
||||
<view class="home_page"><view class="home_page_bg" style="{{a}}"></view><view class="home_page_content"><my-page-head-title u-i="723af36b-0" bind:__l="__l"/><my-page-banner u-i="723af36b-1" bind:__l="__l"/><my-classification u-i="723af36b-2" bind:__l="__l"/><my-news-list u-i="723af36b-3" bind:__l="__l"/><my-ai-input u-i="723af36b-4" bind:__l="__l"/><my-tabs u-i="723af36b-5" bind:__l="__l"/><my-modal-server u-i="723af36b-6" bind:__l="__l"/><my-official-account u-i="723af36b-7" bind:__l="__l"/></view></view>
|
||||
12
dist/dev/mp-weixin/pages/index/index.wxss
vendored
12
dist/dev/mp-weixin/pages/index/index.wxss
vendored
@ -1,10 +1,20 @@
|
||||
page {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
.home_page {
|
||||
.home_page_bg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 37%;
|
||||
z-index: 0;
|
||||
background: linear-gradient(180deg, rgba(208, 229, 255, 0.44) 0%, rgba(255, 255, 255, 0) 100%), linear-gradient(146deg, #d3d7ff 0%, rgba(255, 255, 255, 0) 100rpx), linear-gradient(194deg, #dffff3 0%, #f7f7f7 200rpx);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.home_page_content {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
}
|
||||
button::after {
|
||||
border: none;
|
||||
padding: 0;
|
||||
|
||||
1
dist/dev/mp-weixin/pages/index/model.js
vendored
1
dist/dev/mp-weixin/pages/index/model.js
vendored
@ -1,6 +1,7 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const useModel = {
|
||||
pageConfig: common_vendor.ref({}),
|
||||
formData: common_vendor.reactive({}),
|
||||
user: common_vendor.ref({}),
|
||||
scrollTop: common_vendor.ref(0),
|
||||
|
||||
@ -18,6 +18,15 @@ type DataType = {
|
||||
house_register?: boolean
|
||||
house_occupant?: boolean
|
||||
is_house_exist?: number
|
||||
config?: {
|
||||
companyConfig?: {
|
||||
config_value?: {
|
||||
color?: string
|
||||
pageColor?: string
|
||||
logo?: { url?: string }[]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const useWeAppAuthStore = defineStore('we_app_auth', () => {
|
||||
@ -31,7 +40,8 @@ export const useWeAppAuthStore = defineStore('we_app_auth', () => {
|
||||
environment: '',
|
||||
house_occupant: false,
|
||||
house_register: false,
|
||||
is_house_exist: 0
|
||||
is_house_exist: 0,
|
||||
config: {}
|
||||
})
|
||||
|
||||
function login(app: any) {
|
||||
@ -50,6 +60,7 @@ export const useWeAppAuthStore = defineStore('we_app_auth', () => {
|
||||
console.log('登录', res?.data)
|
||||
data.value.user = res.data?.user
|
||||
data.value.selected_house = res.data?.selected_house
|
||||
data.value.config = res.data?.config
|
||||
loading.value = false
|
||||
uni.setStorageSync(import.meta.env.VITE_ACCESS_TOKEN_KEY, res?.data?.token?.token)
|
||||
if (data.value.user) {
|
||||
|
||||
@ -1,12 +1,20 @@
|
||||
<template>
|
||||
<!-- :class="`custom-title ${useModel?.scrollTop?.value > 10 ? 'custom_title_scroll_bg' : ''}`" -->
|
||||
<view
|
||||
:class="`custom-title ${useModel?.scrollTop?.value > 10 ? 'custom_title_scroll_bg' : ''}`"
|
||||
:style="`padding-top:${capsuleRect.top}px;height:${capsuleRect.height}px;line-height:${capsuleRect.height}px;${props?.objStyle}`"
|
||||
class="custom-title"
|
||||
:style="`padding-top:${capsuleRect.top}px;height:${capsuleRect.height}px;line-height:${capsuleRect.height}px;${props?.objStyle};${useModel?.scrollTop?.value > 10 ? getPageBgFun() : ''}`"
|
||||
>
|
||||
<view @click="handlePopupSwitchHouse" class="user_houses_info">
|
||||
<image
|
||||
mode="aspectFill"
|
||||
v-if="userData?.config?.companyConfig?.config_value?.logo?.[0]?.url"
|
||||
:src="userData?.config?.companyConfig?.config_value?.logo?.[0]?.url || ''"
|
||||
/>
|
||||
<text v-if="!userData?.user">请先登录</text>
|
||||
<text v-else-if="!userData?.selected_house">请绑定您的房屋</text>
|
||||
<text v-else>{{ userData?.selected_house?.full_name || '-' }}</text>
|
||||
<view v-else class="full_name">{{
|
||||
truncateString(userData?.selected_house?.full_name || '')
|
||||
}}</view>
|
||||
<up-icon name="arrow-down-fill" size="12" color="#333"></up-icon>
|
||||
</view>
|
||||
<hs-popup-switch-house :show="show" @close="show = false" @change="handleSelectedHouse" />
|
||||
@ -43,6 +51,32 @@ const handleSelectedHouse = (e: any) => {
|
||||
show.value = false
|
||||
}
|
||||
|
||||
const getPageBgFun = () => {
|
||||
let cssStrColor =
|
||||
useModel?.pageConfig?.value?.pageColorValue?.colors?.[0]?.color?.metaColor || '#d3d7ff'
|
||||
let cssEndColor =
|
||||
useModel?.pageConfig?.value?.pageColorValue?.colors?.[1]?.color?.metaColor || '#dffff3'
|
||||
let strBgCode = useModel?.pageConfig?.value?.pageColorValue?.colors
|
||||
? `rgba(${cssStrColor?.r},${cssStrColor?.g},${cssStrColor?.b},${cssStrColor?.a})`
|
||||
: useModel?.pageConfig?.value?.pageColorValue?.[0]?.color
|
||||
let endBgCode = useModel?.pageConfig?.value?.pageColorValue?.colors
|
||||
? `rgba(${cssEndColor?.r},${cssEndColor?.g},${cssEndColor?.b},${cssEndColor?.a})`
|
||||
: useModel?.pageConfig?.value?.pageColorValue?.[1]?.color
|
||||
let bhg = `background: linear-gradient(180deg,rgba(208, 229, 255, 0.44) 0%,rgba(255, 255, 255, 0) 100%),linear-gradient(146deg, ${strBgCode} 0%, rgba(255, 255, 255, 0) 55%),linear-gradient(194deg, ${endBgCode} 0%, #f8f8f8 65%);`
|
||||
return bhg
|
||||
}
|
||||
|
||||
// 截断字符串,限制15个中文字,超过的从中间截取
|
||||
const truncateString = (str: string): string => {
|
||||
if (!str) return '-'
|
||||
const maxLength = 15
|
||||
if (str.length <= maxLength) return str
|
||||
// 因为...占3个字符,所以前后各显示6个字符,总共6+3+6=15
|
||||
const start = 6
|
||||
const end = 6
|
||||
return str.slice(0, start) + '...' + str.slice(-end)
|
||||
}
|
||||
|
||||
watch(
|
||||
() => auth?.data?.user,
|
||||
() => {
|
||||
@ -90,6 +124,15 @@ onHide(() => {
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
min-width: 100rpx;
|
||||
.full_name {
|
||||
max-width: 300rpx;
|
||||
padding: 0 15rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
image {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.custom_title_scroll_bg {
|
||||
|
||||
@ -1,13 +1,17 @@
|
||||
<template>
|
||||
<view class="home_page">
|
||||
<MyPageHeadTitle />
|
||||
<MyPageBanner />
|
||||
<MyClassification />
|
||||
<MyNewsList />
|
||||
<MyAiInput />
|
||||
<MyTabs />
|
||||
<MyModalServer />
|
||||
<MyOfficialAccount />
|
||||
<view class="home_page_bg" :style="`background:${useModel?.pageConfig?.value?.pageColor}`">
|
||||
</view>
|
||||
<view class="home_page_content">
|
||||
<MyPageHeadTitle />
|
||||
<MyPageBanner />
|
||||
<MyClassification />
|
||||
<MyNewsList />
|
||||
<MyAiInput />
|
||||
<MyTabs />
|
||||
<MyModalServer />
|
||||
<MyOfficialAccount />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -46,6 +50,7 @@ onShow(async e => {
|
||||
// }
|
||||
await getCurrentInstance()?.appContext.config.globalProperties.$onLaunched
|
||||
useModel.user.value = auth?.data?.user
|
||||
useModel.pageConfig.value = auth?.data?.config?.companyConfig?.config_value || {}
|
||||
console.log('页面显示')
|
||||
if (getLoginStatus?.getLoginStatus()) {
|
||||
method?.getCountBills()
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { reactive, ref } from 'vue'
|
||||
export default {
|
||||
pageConfig: ref<any>({}),
|
||||
formData: reactive({}),
|
||||
user: ref<any>({}),
|
||||
scrollTop: ref(0),
|
||||
|
||||
@ -4,12 +4,24 @@ page {
|
||||
|
||||
.home_page {
|
||||
// padding-bottom: 68px;
|
||||
}
|
||||
.home_page_bg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 37%;
|
||||
z-index: 0;
|
||||
background:
|
||||
linear-gradient(180deg, rgba(208, 229, 255, 0.44) 0%, rgba(255, 255, 255, 0) 100%),
|
||||
linear-gradient(146deg, #d3d7ff 0%, rgba(255, 255, 255, 0) 100rpx),
|
||||
linear-gradient(194deg, #dffff3 0%, #f7f7f7 200rpx);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.home_page_content {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
}
|
||||
button::after {
|
||||
border: none;
|
||||
padding: 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user