2024-01-22 18:48:00 +08:00
|
|
|
|
var a, t;
|
2024-01-23 19:04:21 +08:00
|
|
|
|
(t = getApp()),
|
2024-01-22 18:48:00 +08:00
|
|
|
|
Page({
|
|
|
|
|
data: {
|
|
|
|
|
ioszf: 1,
|
|
|
|
|
ioskg: 1,
|
|
|
|
|
phone: t.globalData.myDevice.platform,
|
|
|
|
|
isShow: !1,
|
|
|
|
|
parent_uid: 0,
|
|
|
|
|
is_ok: !1,
|
|
|
|
|
banner: [],
|
|
|
|
|
indicatorDots: !0,
|
|
|
|
|
autoplay: !0,
|
|
|
|
|
interval: 5e3,
|
|
|
|
|
duration: 1e3,
|
|
|
|
|
textJson: [],
|
|
|
|
|
textIndex: 0,
|
|
|
|
|
show_new: !0,
|
|
|
|
|
brand_show: !1,
|
|
|
|
|
sort_show: !1,
|
|
|
|
|
keyword: "汽车用品",
|
|
|
|
|
appscene: 0,
|
|
|
|
|
currentData: 0,
|
|
|
|
|
active_index: 0,
|
|
|
|
|
page: 1,
|
|
|
|
|
index: 0,
|
|
|
|
|
fenlei_id: 0,
|
|
|
|
|
pinpai_id: 0,
|
|
|
|
|
nianxian_id: 0,
|
|
|
|
|
km_id: 0,
|
|
|
|
|
sort_id: 0,
|
|
|
|
|
car_year: "",
|
|
|
|
|
car_brand: "",
|
|
|
|
|
car_km: "",
|
|
|
|
|
car_class: "",
|
|
|
|
|
search_arr: [],
|
|
|
|
|
market: [],
|
|
|
|
|
brand: [],
|
|
|
|
|
check_name: "",
|
|
|
|
|
carList: [],
|
|
|
|
|
sort_show: !1,
|
|
|
|
|
leftid: 1,
|
|
|
|
|
show_new: !0,
|
|
|
|
|
brand_show: !1,
|
|
|
|
|
recom: 0,
|
|
|
|
|
home_arr: [],
|
|
|
|
|
brandname: "",
|
|
|
|
|
selectbrand: "",
|
|
|
|
|
brand_status: 0,
|
|
|
|
|
plate_type: 1,
|
|
|
|
|
scanReachBottom: !1,
|
|
|
|
|
unitid: 123,
|
|
|
|
|
latitude: 0,
|
|
|
|
|
longitude: 0,
|
|
|
|
|
region: ["", "", ""],
|
|
|
|
|
showPrivacy: t.globalData.showPrivacy,
|
2024-01-23 19:04:21 +08:00
|
|
|
|
banner: [],
|
|
|
|
|
dhlist: [],
|
2024-01-22 18:48:00 +08:00
|
|
|
|
},
|
|
|
|
|
dcbg: function (a) {
|
|
|
|
|
wx.navigateTo({ url: "/packageA/pages/dcbg/incxjl" });
|
|
|
|
|
},
|
|
|
|
|
gscx: function (a) {
|
|
|
|
|
wx.navigateTo({ url: "/packageA/pages/gscx/incxjl" });
|
|
|
|
|
},
|
|
|
|
|
gslxcx: function (a) {
|
|
|
|
|
wx.navigateTo({ url: "/packageA/pages/gslxcx/incxjl" });
|
|
|
|
|
},
|
|
|
|
|
wncx: function (a) {
|
|
|
|
|
wx.navigateTo({ url: "/packageA/pages/wannen/incxjl?id=1307" });
|
|
|
|
|
},
|
|
|
|
|
syxcx: function (a) {
|
|
|
|
|
wx.navigateTo({ url: "/packageA/pages/carsyx/incxjl" });
|
|
|
|
|
},
|
|
|
|
|
onLoad: function (a) {
|
2024-01-23 19:04:21 +08:00
|
|
|
|
wx.getStorageSync("uid") || getApp().wxlogin().then((a) => {
|
|
|
|
|
console.log("回调数据:", a), this.setData({ showPrivacy: a });
|
|
|
|
|
});
|
|
|
|
|
this.look();
|
2024-01-22 18:48:00 +08:00
|
|
|
|
var e = this;
|
2024-01-23 19:04:21 +08:00
|
|
|
|
a && a.scene && (e.setData({ parent_uid: a.scene }),
|
2024-01-22 18:48:00 +08:00
|
|
|
|
t.util.getUserInfo(function (a) {
|
|
|
|
|
wx.setStorageSync("uid", a.memberInfo.uid),
|
|
|
|
|
a.memberInfo ? e.firstin(a.memberInfo) : e.setData({ isShow: !0 });
|
|
|
|
|
})),
|
2024-01-23 19:04:21 +08:00
|
|
|
|
// this._list(1),
|
2024-01-22 18:48:00 +08:00
|
|
|
|
wx.getPrivacySetting({
|
|
|
|
|
success: (a) => {
|
|
|
|
|
console.log(a),
|
2024-01-23 19:04:21 +08:00
|
|
|
|
a.needAuthorization ? this.setData({ showPrivacy: !0 }) : this.setData({ showPrivacy: !1 });
|
2024-01-22 18:48:00 +08:00
|
|
|
|
},
|
2024-01-23 19:04:21 +08:00
|
|
|
|
fail: () => { },
|
|
|
|
|
complete: () => { },
|
2024-01-22 18:48:00 +08:00
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
handleAgreePrivacyAuthorization() {
|
|
|
|
|
this.setData({ showPrivacy: !1 }),
|
|
|
|
|
wx.getStorageSync("uid") || getApp().wxlogin(),
|
|
|
|
|
this.look(),
|
|
|
|
|
wx.showToast({
|
|
|
|
|
title: "感谢您的同意,请开始使用~",
|
|
|
|
|
icon: "none",
|
|
|
|
|
duration: 2e3,
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
handleOpenPrivacyContract() {
|
|
|
|
|
wx.openPrivacyContract({
|
2024-01-23 19:04:21 +08:00
|
|
|
|
success: () => { },
|
|
|
|
|
fail: () => { },
|
|
|
|
|
complete: () => { },
|
2024-01-22 18:48:00 +08:00
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
info_notice: function () {
|
|
|
|
|
wx.navigateTo({ url: "../dting/index" });
|
|
|
|
|
},
|
|
|
|
|
changeurl: function (a) {
|
|
|
|
|
let t = {};
|
|
|
|
|
return (
|
|
|
|
|
a.replace(/([^?&]+)=([^?&]+)/g, function (a, e, i) {
|
|
|
|
|
return (t[e] = decodeURIComponent(i)), i + "=" + e;
|
|
|
|
|
}),
|
|
|
|
|
t
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
bindRegionChange: function (a) {
|
|
|
|
|
this.setData({ region: a.detail.value }), this._list(2);
|
|
|
|
|
},
|
|
|
|
|
hideDialog: function () {
|
|
|
|
|
this.setData({ isShow: !this.data.isShow });
|
|
|
|
|
},
|
|
|
|
|
updateUserInfo: function (a) {
|
|
|
|
|
var e = this;
|
|
|
|
|
t.util.getUserInfo(function (a) {
|
|
|
|
|
e.hideDialog(), e.firstin(a.memberInfo);
|
|
|
|
|
}, a.detail);
|
|
|
|
|
},
|
|
|
|
|
firstin: function (a) {
|
|
|
|
|
t.util.request({
|
|
|
|
|
url: "entry/wxapp/Api",
|
|
|
|
|
data: {
|
|
|
|
|
r: "me.binding",
|
|
|
|
|
uid: a.uid,
|
|
|
|
|
head_image: a.avatar,
|
|
|
|
|
nickname: a.nickname,
|
|
|
|
|
parent_uid: this.data.parent_uid,
|
|
|
|
|
},
|
2024-01-23 19:04:21 +08:00
|
|
|
|
success: function (a) { },
|
2024-01-22 18:48:00 +08:00
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
_notice: function () {
|
|
|
|
|
var a = this;
|
|
|
|
|
t.util.request({
|
|
|
|
|
url: "entry/wxapp/Api",
|
2024-01-23 19:04:21 +08:00
|
|
|
|
data: { r: "home.index.home" },
|
2024-01-22 18:48:00 +08:00
|
|
|
|
cachetime: "0",
|
|
|
|
|
success: function (t) {
|
|
|
|
|
console.log(t),
|
|
|
|
|
t.data.data.info_name.name &&
|
2024-01-23 19:04:21 +08:00
|
|
|
|
wx.setNavigationBarTitle({
|
|
|
|
|
title: t.data.data.info_name.name + "",
|
|
|
|
|
}),
|
2024-01-22 18:48:00 +08:00
|
|
|
|
1 == t.data.data.info_name.recom &&
|
2024-01-23 19:04:21 +08:00
|
|
|
|
2 == t.data.data.info_name.plate_type &&
|
|
|
|
|
a.setData({ plate_type: 2 }),
|
2024-01-22 18:48:00 +08:00
|
|
|
|
a.setData({
|
|
|
|
|
ioszf: t.data.data.info_name.ioszf,
|
|
|
|
|
banner: t.data.data.banner,
|
|
|
|
|
market: t.data.data.market,
|
|
|
|
|
brand: t.data.data.brand,
|
|
|
|
|
textJson: t.data.data.notice,
|
|
|
|
|
info_name: t.data.data.info_name.name,
|
|
|
|
|
recom: t.data.data.info_name.recom,
|
2024-01-23 19:04:21 +08:00
|
|
|
|
maiche: t.data.data.info_name.maiche,
|
2024-01-22 18:48:00 +08:00
|
|
|
|
info: t.data.data.info_name,
|
|
|
|
|
dhlist: t.data.data.dhdata,
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
ok: function () {
|
|
|
|
|
this.setData({ is_ok: !1 });
|
|
|
|
|
},
|
|
|
|
|
banner: function (a) {
|
2024-01-23 19:04:21 +08:00
|
|
|
|
var i = t.getAttr(a, "url");
|
|
|
|
|
|
|
|
|
|
console.log(i)
|
|
|
|
|
|
|
|
|
|
wx.navigateTo({ url: i });
|
2024-01-22 18:48:00 +08:00
|
|
|
|
},
|
|
|
|
|
market_class: function (a) {
|
|
|
|
|
var e = t.getAttr(a, "active_index"),
|
|
|
|
|
i = !1;
|
|
|
|
|
this.data.active_index == e && ((e = 0), (i = !0)),
|
|
|
|
|
this.setData({
|
|
|
|
|
car_type: this.data.market,
|
|
|
|
|
brand_show: !1,
|
|
|
|
|
sort_show: !1,
|
|
|
|
|
active_index: e,
|
|
|
|
|
show_new: i,
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
market_brand: function (a) {
|
|
|
|
|
wx.navigateTo({ url: "../selectscards/index" });
|
|
|
|
|
},
|
|
|
|
|
navtonew: function (a) {
|
|
|
|
|
console.log(a);
|
|
|
|
|
var t = a.currentTarget.dataset.url,
|
|
|
|
|
e = a.currentTarget.dataset.appid,
|
|
|
|
|
i = a.currentTarget.dataset.tzpage,
|
2024-01-23 19:04:21 +08:00
|
|
|
|
n = a.currentTarget.dataset.page,
|
2024-01-22 18:48:00 +08:00
|
|
|
|
r = a.currentTarget.dataset.id;
|
|
|
|
|
"ios" != this.data.phone || 0 != this.data.ioszf
|
|
|
|
|
? n
|
|
|
|
|
? wx.navigateTo({ url: n + "?id=" + r })
|
|
|
|
|
: e
|
2024-01-23 19:04:21 +08:00
|
|
|
|
? wx.navigateToMiniProgram({
|
2024-01-22 18:48:00 +08:00
|
|
|
|
appId: e,
|
|
|
|
|
path: i,
|
2024-01-23 19:04:21 +08:00
|
|
|
|
extarData: { open: "xphp" },
|
2024-01-22 18:48:00 +08:00
|
|
|
|
envVersion: "release",
|
2024-01-23 19:04:21 +08:00
|
|
|
|
success(a) { },
|
2024-01-22 18:48:00 +08:00
|
|
|
|
})
|
2024-01-23 19:04:21 +08:00
|
|
|
|
: t && wx.navigateTo({ url: "/pages/website/website?url=" + t })
|
2024-01-22 18:48:00 +08:00
|
|
|
|
: wx.showModal({
|
2024-01-23 19:04:21 +08:00
|
|
|
|
title: "温馨提示",
|
|
|
|
|
content: "由于相关规范,iOS功能暂不可用",
|
|
|
|
|
success: function (a) {
|
|
|
|
|
a.confirm ? console.log("点击确认回调") : console.log("点击取消回调");
|
|
|
|
|
},
|
|
|
|
|
});
|
2024-01-22 18:48:00 +08:00
|
|
|
|
},
|
|
|
|
|
carList: function (a) {
|
|
|
|
|
var e = t.getAttr(a, "name"),
|
|
|
|
|
i = t.getAttr(a, "id");
|
|
|
|
|
if (1 == this.data.active_index)
|
|
|
|
|
(n = {
|
|
|
|
|
fenlei_id: i,
|
|
|
|
|
car_class: e,
|
|
|
|
|
active_index: 1,
|
|
|
|
|
mark: (o = "active_index1"),
|
|
|
|
|
check_name: e,
|
|
|
|
|
}),
|
|
|
|
|
(c = this.data.search_arr.filter(function (a) {
|
|
|
|
|
return a.mark != o;
|
|
|
|
|
})).push(n),
|
|
|
|
|
this.setData({
|
|
|
|
|
car_class: e,
|
|
|
|
|
fenlei_id: i,
|
|
|
|
|
check_name: e,
|
|
|
|
|
search_arr: c,
|
|
|
|
|
leftid: 1,
|
|
|
|
|
show_new: !0,
|
|
|
|
|
});
|
|
|
|
|
else if (2 == this.data.active_index) {
|
|
|
|
|
e = t.getAttr(a, "name");
|
|
|
|
|
var n = {
|
|
|
|
|
pinpai_id: (i = t.getAttr(a, "id")),
|
|
|
|
|
car_brand: e,
|
|
|
|
|
active_index: 2,
|
|
|
|
|
mark: (o = "active_index2"),
|
|
|
|
|
check_name: e,
|
|
|
|
|
};
|
|
|
|
|
(c = this.data.search_arr.filter(function (a) {
|
|
|
|
|
return a.mark != o;
|
|
|
|
|
})).push(n),
|
|
|
|
|
this.setData({
|
|
|
|
|
is_ok: !1,
|
|
|
|
|
car_brand: e,
|
|
|
|
|
pinpai_id: i,
|
|
|
|
|
search_arr: c,
|
|
|
|
|
leftid: 1,
|
|
|
|
|
show_new: !0,
|
|
|
|
|
brand_show: !1,
|
|
|
|
|
});
|
|
|
|
|
} else if (3 == this.data.active_index) {
|
|
|
|
|
var r = t.getAttr(a, "year");
|
|
|
|
|
(n = {
|
|
|
|
|
nianxian_id: (i = t.getAttr(a, "index")),
|
|
|
|
|
car_year: r,
|
|
|
|
|
active_index: 3,
|
|
|
|
|
mark: (o = "active_index3"),
|
|
|
|
|
check_name: r,
|
|
|
|
|
}),
|
|
|
|
|
(c = this.data.search_arr.filter(function (a) {
|
|
|
|
|
return a.mark != o;
|
|
|
|
|
})).push(n),
|
|
|
|
|
this.setData({
|
|
|
|
|
is_ok: !1,
|
|
|
|
|
car_year: r,
|
|
|
|
|
nianxian_id: 1 + parseInt(i),
|
|
|
|
|
search_arr: c,
|
|
|
|
|
leftid: 1,
|
|
|
|
|
show_new: !0,
|
|
|
|
|
});
|
|
|
|
|
} else if (4 == this.data.active_index) {
|
|
|
|
|
var s = t.getAttr(a, "km"),
|
|
|
|
|
o = "active_index4",
|
|
|
|
|
c =
|
|
|
|
|
((n = {
|
|
|
|
|
km_id: (i = t.getAttr(a, "index")),
|
|
|
|
|
car_km: s,
|
|
|
|
|
active_index: 4,
|
|
|
|
|
mark: o,
|
|
|
|
|
check_name: s,
|
|
|
|
|
}),
|
2024-01-23 19:04:21 +08:00
|
|
|
|
this.data.search_arr.filter(function (a) {
|
|
|
|
|
return a.mark != o;
|
|
|
|
|
}));
|
2024-01-22 18:48:00 +08:00
|
|
|
|
c.push(n),
|
|
|
|
|
this.setData({
|
|
|
|
|
is_ok: !1,
|
|
|
|
|
car_km: s,
|
|
|
|
|
km_id: 1 + parseInt(i),
|
|
|
|
|
search_arr: c,
|
|
|
|
|
leftid: 1,
|
|
|
|
|
show_new: !0,
|
|
|
|
|
});
|
|
|
|
|
}
|
2024-01-23 19:04:21 +08:00
|
|
|
|
// this._list(1);
|
2024-01-22 18:48:00 +08:00
|
|
|
|
},
|
|
|
|
|
_list: function (a) {
|
|
|
|
|
var e = this;
|
|
|
|
|
1 == a
|
|
|
|
|
? this.setData({ carList: [] })
|
|
|
|
|
: 2 == a && this.setData({ carList: [], leftid: 1, show_new: !0 }),
|
|
|
|
|
this.setData({ active_index: 0 }),
|
|
|
|
|
t.util.request({
|
|
|
|
|
url: "entry/wxapp/Api",
|
|
|
|
|
data: {
|
|
|
|
|
r: "home.index.carList",
|
|
|
|
|
fenlei_id: this.data.fenlei_id,
|
|
|
|
|
pinpai_id: this.data.pinpai_id,
|
|
|
|
|
nianxian_id: this.data.nianxian_id,
|
|
|
|
|
km_id: parseInt(this.data.km_id),
|
|
|
|
|
sort_id: this.data.sort_id,
|
|
|
|
|
leftid: this.data.leftid++,
|
|
|
|
|
latitude: this.data.latitude,
|
|
|
|
|
longitude: this.data.longitude,
|
|
|
|
|
province: this.data.region[0],
|
|
|
|
|
city: this.data.region[1],
|
|
|
|
|
district: this.data.region[2],
|
|
|
|
|
},
|
|
|
|
|
cachetime: "0",
|
|
|
|
|
success: function (a) {
|
|
|
|
|
var t;
|
|
|
|
|
a.data.data.length > 0
|
|
|
|
|
? ((t = e.data.carList).push.apply(
|
2024-01-23 19:04:21 +08:00
|
|
|
|
t,
|
|
|
|
|
(function (a) {
|
|
|
|
|
if (Array.isArray(a)) {
|
|
|
|
|
for (var t = 0, e = Array(a.length); t < a.length; t++)
|
|
|
|
|
e[t] = a[t];
|
|
|
|
|
return e;
|
|
|
|
|
}
|
|
|
|
|
return Array.from(a);
|
|
|
|
|
})(a.data.data)
|
|
|
|
|
),
|
2024-01-22 18:48:00 +08:00
|
|
|
|
e.setData({ scanReachBottom: !1 }),
|
|
|
|
|
e.setData({ is_ok: !1, carList: e.data.carList }))
|
|
|
|
|
: (e.setData({ scanReachBottom: !0 }), (e.data.show_new = !1));
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
previewImage: function (a) {
|
|
|
|
|
var e = t.getAttr(a, "src"),
|
|
|
|
|
i = t.getAttr(a, "index"),
|
|
|
|
|
n = [],
|
|
|
|
|
r = !0,
|
|
|
|
|
s = !1,
|
|
|
|
|
o = void 0;
|
|
|
|
|
try {
|
|
|
|
|
for (
|
|
|
|
|
var c, d = this.data.carList[i].image[Symbol.iterator]();
|
|
|
|
|
!(r = (c = d.next()).done);
|
|
|
|
|
r = !0
|
|
|
|
|
) {
|
|
|
|
|
var h = c.value;
|
|
|
|
|
n.push(h.img_patch);
|
|
|
|
|
}
|
|
|
|
|
} catch (a) {
|
|
|
|
|
(s = !0), (o = a);
|
|
|
|
|
} finally {
|
|
|
|
|
try {
|
|
|
|
|
!r && d.return && d.return();
|
|
|
|
|
} finally {
|
|
|
|
|
if (s) throw o;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
wx.previewImage({ current: e, urls: n });
|
|
|
|
|
},
|
|
|
|
|
detile: function (a) {
|
|
|
|
|
var e = t.getAttr(a, "id");
|
|
|
|
|
wx.navigateTo({ url: "/pages/home/carMessage/carMessage?id=" + e });
|
|
|
|
|
},
|
|
|
|
|
onShareAppMessage: function (a) {
|
|
|
|
|
return {
|
|
|
|
|
title: this.data.info_name + "",
|
|
|
|
|
path: "/pages/index/index",
|
2024-01-23 19:04:21 +08:00
|
|
|
|
success: function (a) { },
|
|
|
|
|
fail: function (a) { },
|
2024-01-22 18:48:00 +08:00
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
onShow: function () {
|
2024-01-23 19:04:21 +08:00
|
|
|
|
// this.look();
|
2024-01-22 18:48:00 +08:00
|
|
|
|
},
|
|
|
|
|
look: function () {
|
|
|
|
|
var a = this;
|
|
|
|
|
if (
|
|
|
|
|
(this._notice(),
|
2024-01-23 19:04:21 +08:00
|
|
|
|
"" != a.data.brandid &&
|
2024-01-22 18:48:00 +08:00
|
|
|
|
"" != a.data.brandname &&
|
|
|
|
|
1 == a.data.brand_status)
|
|
|
|
|
) {
|
|
|
|
|
var t = a.data.brandname,
|
|
|
|
|
e = a.data.brandid,
|
|
|
|
|
i = "active_index2",
|
|
|
|
|
n = {
|
|
|
|
|
pinpai_id: e,
|
|
|
|
|
car_brand: t,
|
|
|
|
|
active_index: 2,
|
|
|
|
|
mark: i,
|
|
|
|
|
check_name: t,
|
|
|
|
|
},
|
|
|
|
|
r = this.data.search_arr.filter(function (a) {
|
|
|
|
|
return a.mark != i;
|
|
|
|
|
});
|
|
|
|
|
r.push(n),
|
|
|
|
|
this.setData({
|
|
|
|
|
is_ok: !1,
|
|
|
|
|
car_brand: t,
|
|
|
|
|
pinpai_id: e,
|
|
|
|
|
search_arr: r,
|
|
|
|
|
leftid: 1,
|
|
|
|
|
show_new: !0,
|
|
|
|
|
brand_show: !1,
|
|
|
|
|
brandid: 0,
|
|
|
|
|
brandname: "",
|
2024-01-23 19:04:21 +08:00
|
|
|
|
});
|
|
|
|
|
// this._list(1);
|
2024-01-22 18:48:00 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
bindKeyInput: function (a) {
|
|
|
|
|
var t = a.detail.value;
|
|
|
|
|
this.setData({ keyword: t, page: 1 });
|
|
|
|
|
},
|
|
|
|
|
checkCurrent: function (a) {
|
|
|
|
|
if (
|
|
|
|
|
(console.log(a),
|
2024-01-23 19:04:21 +08:00
|
|
|
|
console.log(a.currentTarget.dataset.current),
|
|
|
|
|
this.data.currentData === a.currentTarget.dataset.current)
|
2024-01-22 18:48:00 +08:00
|
|
|
|
)
|
|
|
|
|
return !1;
|
|
|
|
|
this.setData({
|
|
|
|
|
currentData: a.currentTarget.dataset.current,
|
|
|
|
|
keyword: a.currentTarget.dataset.title,
|
|
|
|
|
page: 1,
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
active_nav: function (a) {
|
|
|
|
|
var e = t.getAttr(a, "active_index");
|
|
|
|
|
this.data.active_index != e
|
|
|
|
|
? this.setData({
|
2024-01-23 19:04:21 +08:00
|
|
|
|
sort_show: !0,
|
|
|
|
|
show_new: !1,
|
|
|
|
|
active_index: e,
|
|
|
|
|
brand_show: !1,
|
|
|
|
|
})
|
2024-01-22 18:48:00 +08:00
|
|
|
|
: this.setData({ sort_show: !1, active_index: 0, show_new: !1 });
|
|
|
|
|
},
|
|
|
|
|
sort_car: function (a) {
|
|
|
|
|
console.log(a);
|
|
|
|
|
var t = a.currentTarget.dataset.index,
|
|
|
|
|
e = this.data.sortArrb[t];
|
|
|
|
|
this.setData({
|
|
|
|
|
page: 1,
|
|
|
|
|
cindex: t,
|
|
|
|
|
sort_show: !1,
|
|
|
|
|
is_ok: !0,
|
|
|
|
|
sort_id: e,
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
});
|